Skip to content

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

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
rig-claude-compat/2026-08-25-265b34254609f2b3
Draft

[rig-claude] Improve Claude dynamic-workflow compatibility for rig#488
github-actions[bot] wants to merge 1 commit into
mainfrom
rig-claude-compat/2026-08-25-265b34254609f2b3

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Compatibility gap addressed

The dynamic-workflow parity describe block in src/workflow.test.ts was missing
test coverage for two of the most fundamental Claude dynamic-workflow primitives:

  1. call.textawait agent(prompt) without a schema: The most common
    first call a Claude dynamic-workflow developer writes. The mapping
    (await agent(prompt)await call.text(prompt)) appears in the conversion
    table and is exercised in the workflow one-off agents block, but was absent
    from the dedicated parity block where a developer porting Claude code would
    look for evidence.

  2. log(message) — emits a { type: "log" } event: Claude dynamic workflows
    rely on log(message) for observability. The parity block referenced log in
    comments and tested budget, but never verified that log() surfaces as a
    { type: "log" } event in the onEvent stream.

Why this improves transfer

A developer porting a Claude dynamic workflow reads the dynamic-workflow parity
describe to confirm that rig covers the primitives they rely on. A missing test
for call.text (the no-schema agent call) or for log events creates doubt even
when the behaviour is correct. These two additions make the parity block
exhaustive: every row in the conversion table's core primitives — call.text,
call.json, log, budget, phase override, parallel, pipeline,
call.workflow, non-object schema — now has a test in that block.

Files changed

  • src/workflow.test.ts — 30 lines added: two new it(...) cases inside the
    existing describe("dynamic-workflow parity") block.

Validation

npm run typecheck  # tsc --noEmit: no errors
npm test           # 597 passed (up from 595), same 2 pre-existing failing files

The 2 pre-existing failing test files (src/launcher-default-engine.test.ts) and
their 439 failures were already present on main before this change.

Remaining intentional differences

  • No effort mapping; prefer a more capable model id.
  • No agentType: "Explore" mapping; narrow the tools list and prompt instead.
  • No resume journal, worktree isolation, or human checkpoints.
  • budget counts agent calls, not tokens.
  • parallel requires uniform thunk return types; Promise.all for heterogeneous agents.
  • pipeline stage signature is (previous, item, index) vs Claude's (item, index).

All intentional differences are documented in
skills/rig/references/claude-workflow-conversion.md.

Generated by Daily Rig Claude Dynamic Workflow Compatibility · sonnet46 125.1 AIC · ⌖ 8.2 AIC · ⊞ 5.4K ·

…w describe block

Add two tests to the 'dynamic-workflow parity' describe block that were
missing coverage for the two most fundamental Claude dynamic-workflow
primitives:

- call.text: validates that the rig equivalent of Claude's plain
  `await agent(prompt)` returns a string, matching the conversion-table
  row that's otherwise only covered in the 'workflow one-off agents' block.

- log: validates that `log(message)` emits a { type: 'log' } event in the
  onEvent stream, so the mapping is exercised in the parity section where
  a reader converting Claude code will look for it.

Both tests use the same fakeAgent / configureAgent pattern as the
surrounding block for consistency.

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