Skip to content

[rig-claude] Improve Claude dynamic-workflow compatibility for rig - #449

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
rig-claude-compat/2026-08-18-4f700270d7766019
Draft

[rig-claude] Improve Claude dynamic-workflow compatibility for rig#449
github-actions[bot] wants to merge 1 commit into
mainfrom
rig-claude-compat/2026-08-18-4f700270d7766019

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Compatibility gap addressed

Two documented Claude dynamic-workflow compatibility points had no automated test coverage:

  1. warnAgents advisory warning — Claude dynamic workflows emit a session-level advisory warning when many agents are scheduled. Rig maps this to a warning event emitted after warnAgents agent calls. No test verified this behavior, making it easy to regress without notice.

  2. call.json with non-object schemas — Claude dynamic workflows only support object schemas in agent(prompt, { schema }). Rig's call.json accepts any s.* schema (s.enum, s.array, s.string, etc.) — a documented rig advantage. No test covered this, so users porting Claude workflows couldn't confirm the richer schema support was real.

Why this improves transfer from Claude dynamic workflows to rig

Both tests live in the dynamic-workflow parity describe block in src/workflow.test.ts, making them immediately discoverable by anyone searching for Claude compatibility coverage. The tests serve as executable specs that:

  • Confirm the warnAgentswarning event mapping works as documented in claude-workflow-conversion.md
  • Confirm call.json is not limited to object schemas, matching the documented advantage over Claude workflows

Files changed

  • src/workflow.test.ts — added two tests to the dynamic-workflow parity describe block

Validation run

npm run typecheck  →  passed (no errors)
npx vitest run src/workflow.test.ts  →  24/24 tests passed

Remaining intentional differences

  • No effort option — use a more capable model id instead (claude-opus-4-5 over claude-haiku-3-5)
  • No agentType: "Explore" — use prompt wording plus a narrow tools list
  • Retries are turn-based (maxTurns + repair()), not process-based ({ retries })
  • No resume journal, worktree isolation, or human checkpoints
  • Budget is denominated in agent calls (limits.maxAgents), not tokens

Generated by Daily Rig Claude Dynamic Workflow Compatibility · sonnet46 64.1 AIC · ⌖ 5.31 AIC · ⊞ 5.4K ·

… call.json schema

Adds two tests to src/workflow.test.ts that cover two documented compatibility
points between Claude dynamic workflows and rig that had no automated coverage:

1. warnAgents advisory warning: verifies that a run emits exactly one 'warning'
   event when the warnAgents threshold is crossed — the rig counterpart to the
   session-level advisory warning in Claude dynamic workflows.

2. call.json with a non-object schema (s.enum): verifies that call.json accepts
   any s.* schema, not just s.object. This is a documented rig advantage over
   Claude dynamic workflows, which only support object schemas.

Both tests are placed in the 'dynamic-workflow parity' describe block, making
them discoverable by anyone porting a Claude dynamic workflow to rig.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants