Skip to content

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

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
rig-claude-compat/2026-08-19-2746374b66ae4b1b
Draft

[rig-claude] Improve Claude dynamic-workflow compatibility for rig#454
github-actions[bot] wants to merge 1 commit into
mainfrom
rig-claude-compat/2026-08-19-2746374b66ae4b1b

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Compatibility gap addressed

parallel(thunks) in rig uses a single TypeScript generic Result, meaning all thunks must return the same type. Claude dynamic workflows have no such restriction — parallel accepts heterogeneous thunks freely. This mismatch was undocumented, causing confusion when porting workflows where agents produce different output shapes.

Why this improves transfer from Claude dynamic workflows

A porter following the primitive mapping table would read parallel(thunks) → parallel(thunks) and assume exact behavior parity. When they try to use parallel with two agents that have different output types (a very common case), TypeScript fails silently or with an opaque error. The fix makes the limitation explicit at the first place a porter would look: the mapping table.

Three samples (390, 412, 430) were already using Promise.all for heterogeneous agents but without explanation. Adding a brief comment in each sample and an explicit note in the conversion doc ensures consistent, discoverable guidance.

Files changed

  • skills/rig/references/claude-workflow-conversion.md — added TypeScript note to the parallel row explaining the uniform-type constraint and the Promise.all fallback
  • skills/rig/samples/390-parallel-multi-tool-workflow.md — added comment clarifying why Promise.all is used (heterogeneous agent types)
  • skills/rig/samples/412-parallel-branch-analysis-workflow.md — same
  • skills/rig/samples/430-parallel-git-stats-workflow.md — same

Validation run

npm run sample -- --testNamePattern="skill markdown samples typecheck"
# Tests  1 passed | 585 skipped (586)

Remaining intentional differences

  • parallel in Claude dynamic workflows is type-heterogeneous; rig's parallel<Result> is homogeneous. Workaround: cast with parallel<A | B>([...]) as Promise<[A | null, B | null]> or use Promise.all when limiter semantics are not needed.
  • { effort: "high" } has no rig equivalent; use a more capable model ID.
  • { agentType: "Explore" } has no rig equivalent; use prompt wording + narrow tools list.

Generated by Daily Rig Claude Dynamic Workflow Compatibility · sonnet46 142.8 AIC · ⌖ 8.43 AIC · ⊞ 5.4K ·

Clarify that rig's parallel() requires all thunks to return the same
TypeScript type (single generic Result), while Claude dynamic workflows
accept heterogeneous thunk return types.

Three samples (390, 412, 430) were using Promise.all with a comment
explaining that parallel() requires uniform thunk types. Add the same
clarification to the primitive mapping table in claude-workflow-conversion.md
so porters know when to use Promise.all instead.

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