Repository navigation
[rig-claude] Improve Claude dynamic-workflow compatibility for rig - #981
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
This was referenced Dec 1, 2026
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
Claude dynamic workflows inject
budget(andlog,phase) as globals. The flat-script port path (rig/globals) coveredcall/pipeline/parallel, andphase/logare importable fromrig, but nothing said how to reachbudget(or thatuntilis body-only) at module scope. A Claude user porting a flat script that readsbudget.remaining()had no documented route.Why it helps transfer
currentWorkflow()already returns the active run context includingbudget, so the flat port can useconst { budget } = currentWorkflow()!. This is now documented in the conversion guide and shown in the flat-port sample (log+budget.remaining()/total), so all Claude globals have a discoverable home in the flat style.Files changed
skills/rig/claude-workflow-conversion.md— note on ambientbudgetanduntilbeing body-only.skills/rig/samples/340-flat-workflow-port.md— Claude original and rig port now log the agent budget.Validation
npm run sample -- --testNamePattern="skill markdown samples typecheck"(passes with a raised--testTimeout; the default 5s timeout is hit by the tsc run in this environment, unrelated to the change).npm run sample:checkpasses; the 340-flat-workflow-port sample runs under the stub client.Remaining intentional differences
No new API;
budgetis not exported as an ambient global (it is read from the run context). Budget counts agent calls, not tokens;effort/agentTypeoptions have no equivalents; Anthropic aliases ("sonnet") are not translated.