Skip to content

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

Merged
pelikhan merged 1 commit into
mainfrom
rig-claude-compat/2026-11-28-8da0b417d2973bbd
Nov 28, 2026
Merged

pelikhan merged 1 commit into
mainfrom
rig-claude-compat/2026-11-28-8da0b417d2973bbd

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Compatibility gap addressed

Claude dynamic workflows inject budget (and log, phase) as globals. The flat-script port path (rig/globals) covered call/pipeline/parallel, and phase/log are importable from rig, but nothing said how to reach budget (or that until is body-only) at module scope. A Claude user porting a flat script that reads budget.remaining() had no documented route.

Why it helps transfer

currentWorkflow() already returns the active run context including budget, so the flat port can use const { 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 ambient budget and until being 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:check passes; the 340-flat-workflow-port sample runs under the stub client.

Remaining intentional differences

No new API; budget is not exported as an ambient global (it is read from the run context). Budget counts agent calls, not tokens; effort/agentType options have no equivalents; Anthropic aliases ("sonnet") are not translated.

Generated by Daily Rig Claude Dynamic Workflow Compatibility · copilot · routed: sonnet55 high · ~40 AIC · ⌖ ~1 AIC · ⊞ 3.5K · history

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 28, 2026 14:53
@pelikhan
pelikhan merged commit bbbc5dd into main Nov 28, 2026
1 check passed
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~4 AIC · ⌖ ~2 AIC · ⊞ 5.8K · history

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.

1 participant