[rig-claude] Improve Claude dynamic-workflow compatibility for rig - #488
Draft
github-actions[bot] wants to merge 1 commit into
Draft
[rig-claude] Improve Claude dynamic-workflow compatibility for rig#488github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compatibility gap addressed
The
dynamic-workflow paritydescribe block insrc/workflow.test.tswas missingtest coverage for two of the most fundamental Claude dynamic-workflow primitives:
call.text—await agent(prompt)without a schema: The most commonfirst call a Claude dynamic-workflow developer writes. The mapping
(
await agent(prompt)→await call.text(prompt)) appears in the conversiontable and is exercised in the
workflow one-off agentsblock, but was absentfrom the dedicated parity block where a developer porting Claude code would
look for evidence.
log(message)— emits a{ type: "log" }event: Claude dynamic workflowsrely on
log(message)for observability. The parity block referencedlogincomments and tested
budget, but never verified thatlog()surfaces as a{ type: "log" }event in theonEventstream.Why this improves transfer
A developer porting a Claude dynamic workflow reads the
dynamic-workflow paritydescribe to confirm that rig covers the primitives they rely on. A missing test
for
call.text(the no-schema agent call) or forlogevents creates doubt evenwhen 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,phaseoverride,parallel,pipeline,call.workflow, non-object schema — now has a test in that block.Files changed
src/workflow.test.ts— 30 lines added: two newit(...)cases inside theexisting
describe("dynamic-workflow parity")block.Validation
The 2 pre-existing failing test files (
src/launcher-default-engine.test.ts) andtheir 439 failures were already present on
mainbefore this change.Remaining intentional differences
effortmapping; prefer a more capable model id.agentType: "Explore"mapping; narrow thetoolslist and prompt instead.budgetcounts agent calls, not tokens.parallelrequires uniform thunk return types;Promise.allfor heterogeneous agents.pipelinestage signature is(previous, item, index)vs Claude's(item, index).All intentional differences are documented in
skills/rig/references/claude-workflow-conversion.md.