[rig-claude] Improve Claude dynamic-workflow compatibility for rig - #344
Draft
github-actions[bot] wants to merge 1 commit into
Draft
[rig-claude] Improve Claude dynamic-workflow compatibility for rig#344github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
…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>
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
Sample
360-parallel-branch-analysis-workflow.mdusedPromise.allinstead ofparallel(thunks), which is the idiomatic primitive in both Claude dynamic workflows and rig. This breaks knowledge transfer in two ways:Promise.allbypasses the shared concurrency limiter;parallel(thunks)respects it.Promise.allrejects the entire batch on any failure;parallel(thunks)converts individual failures tonullholes — matching Claude's behavior.A user porting a Claude dynamic workflow who searches for
parallelwould 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.mdreference explicitly mapsparallel(thunks)→parallel(thunks)with identical semantics. Sample 360 is the most prominent heterogeneous-fan-out example but showedPromise.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 useparallel(thunks), simplified to a sharedmetricoutput schema (avoids TypeScript union-type inference issues with heterogeneous thunks), added prose explaining whyparallelis preferred overPromise.allwhen porting Claude workflows, and reduced to exactly 30 lines to pass the test.Validation run
Remaining intentional differences
None introduced by this change. All existing documented differences between Claude dynamic workflows and rig (no
effortoption, noagentType: "Explore", no resume journal) remain as documented inreferences/claude-workflow-conversion.md.