Skip to content

Add bounded dynamic workflow orchestration - #247

Merged
pelikhan merged 5 commits into
mainfrom
copilot/dynamics
Jul 28, 2026
Merged

Add bounded dynamic workflow orchestration#247
pelikhan merged 5 commits into
mainfrom
copilot/dynamics

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Rig lacked deterministic, resource-bounded primitives for coordinating typed agents. This introduces the core dynamic workflow API while preserving existing agent typing and engine independence.

  • Workflow API

    • Add workflow() and runWorkflow() via rig/workflow and root exports.
    • Provide typed input, metadata, phases, logs, cancellation, and structured events.
  • Orchestration

    • Add typed call and call.text.
    • Add ordered pipeline, parallel, and bounded until primitives.
    • Return null for agent failures while propagating workflow programming errors.
  • Resource controls

    • Enforce shared concurrency, total-agent, and wall-clock limits.
    • Abort in-flight work when a run fails.
    • Emit advisory warnings for large runs.
  • Documentation

    • Add a focused dynamic-workflow reference and README example.
const audit = workflow({
  meta: { name: "audit", description: "Inspect files", phases: ["Audit"] },
  input: s.object({ files: s.array(s.string) }),
  body: ({ input, call, phase, pipeline }) => {
    phase("Audit");
    return pipeline(input.files, (file) =>
      call(inspect, file, { label: file }));
  },
});

await runWorkflow(audit, {
  args: { files: ["src/a.ts", "src/b.ts"] },
  limits: { concurrency: 8, maxAgents: 100 },
});

Copilot AI linked an issue Jul 28, 2026 that may be closed by this pull request
Copilot AI and others added 3 commits July 28, 2026 12:52
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add dynamic workflow orchestration to rig Add bounded dynamic workflow orchestration Jul 28, 2026
Copilot AI requested a review from pelikhan July 28, 2026 13:03
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot merge rig/workflow into rig . single file, single module.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@copilot merge rig/workflow into rig . single file, single module.

Implemented in cedfc6d: workflow APIs and implementation now live directly in skills/rig/rig.ts; the rig/workflow subpath and standalone module were removed, with tests and docs updated to import from rig.

@pelikhan
pelikhan marked this pull request as ready for review July 28, 2026 14:22
@pelikhan
pelikhan merged commit 94cf660 into main Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dynamics

2 participants