Skip to content

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

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

[rig-claude] Improve Claude dynamic-workflow compatibility for rig#344
github-actions[bot] wants to merge 1 commit into
mainfrom
rig-claude-compat/2026-08-03-be4609dc3871b594

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Compatibility gap addressed

Sample 360-parallel-branch-analysis-workflow.md used Promise.all instead of parallel(thunks), which is the idiomatic primitive in both Claude dynamic workflows and rig. This breaks knowledge transfer in two ways:

  1. Wrong concurrency semantics: Promise.all bypasses the shared concurrency limiter; parallel(thunks) respects it.
  2. Wrong failure semantics: Promise.all rejects the entire batch on any failure; parallel(thunks) converts individual failures to null holes — matching Claude's behavior.

A user porting a Claude dynamic workflow who searches for parallel would find a sample using the wrong primitive and learn incorrect patterns.

Additionally, the original sample was already failing the 30-line validation test at baseline (60 lines vs the 30-line limit), causing npm run sample -- --testNamePattern="skill markdown samples typecheck" to fail.

Why this improves Claude→Rig transfer

The claude-workflow-conversion.md reference explicitly maps parallel(thunks)parallel(thunks) with identical semantics. Sample 360 is the most prominent heterogeneous-fan-out example but showed Promise.all. Fixing it makes the mapping obvious and keeps the sample runnable.

Files changed

  • skills/rig/samples/360-parallel-branch-analysis-workflow.md — rewrote to use parallel(thunks), simplified to a shared metric output schema (avoids TypeScript union-type inference issues with heterogeneous thunks), added prose explaining why parallel is preferred over Promise.all when porting Claude workflows, and reduced to exactly 30 lines to pass the test.

Validation run

npx vitest run scripts/run-sample.test.ts --testNamePattern="360"
# Tests: 1 passed

npx vitest run scripts/run-sample.test.ts --testNamePattern="typechecks"
# Tests: 1 passed

Remaining intentional differences

None introduced by this change. All existing documented differences between Claude dynamic workflows and rig (no effort option, no agentType: "Explore", no resume journal) remain as documented in references/claude-workflow-conversion.md.

Generated by Daily Rig Claude Dynamic Workflow Compatibility · sonnet46 151.8 AIC · ⌖ 8.39 AIC · ⊞ 5.4K ·

…e count

Sample 360 used Promise.all instead of parallel(thunks), which bypasses
the shared concurrency limiter and doesn't convert failures to null holes.
This diverges from Claude dynamic-workflow semantics where parallel(thunks)
is the idiomatic primitive. A user porting a Claude workflow would look for
parallel and find a sample using the wrong primitive.

Also: the sample was already failing the 30-line test at baseline (60 lines).
This commit rewrites it to be idiomatic and within the 30-line limit.

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