Skip to content

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

Merged
pelikhan merged 1 commit into
mainfrom
rig-claude-compat/2026-08-01-5d5f64e5781d301a
Aug 1, 2026
Merged

[rig-claude] Improve Claude dynamic-workflow compatibility for rig#325
pelikhan merged 1 commit into
mainfrom
rig-claude-compat/2026-08-01-5d5f64e5781d301a

Conversation

@github-actions

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

Copy link
Copy Markdown
Contributor

Compatibility gap addressed

The 310-workflow-audit-verify.md sample — the canonical Claude-to-rig port example — hardcoded its areas list, hiding the most common first step when porting a Claude dynamic workflow: translating argsinput.

Claude dynamic workflows read caller data from an untyped args global. Rig's equivalent is a typed input schema declared on the workflow. Until this change, no runnable sample showed this mapping end-to-end.

Why this improves transfer

  • Adds input: s.object({ areas: s.array(s.string(...)) }) to the audit workflow so input.areas directly mirrors args.areas from the Claude original.
  • Adds a side-by-side Claude dynamic workflow snippet (JS) and the rig port (TS) at the top of the sample, with an explicit callout that argsinput with an s.object schema.
  • The sample now matches the worked-conversion example in claude-workflow-conversion.md, reinforcing the same mapping in runnable code.

Files changed

  • skills/rig/samples/310-workflow-audit-verify.md — typed input, side-by-side Claude/rig code, argsinput callout comment

Validation

npm run sample -- --testNamePattern="skill markdown samples typecheck"

✅ 1 passed (412 skipped) — typechecks all extracted rig programs including the updated sample.

Remaining intentional differences

  • { effort: "high" } — not modeled in rig; documented as "encode importance structurally or in the model id" in the conversion table.
  • { agentType: "Explore" } — no built-in read-only agent type; documented as "prompt wording plus a narrow tools list".
  • Resume journal, worktree isolation, human checkpoints — Claude Code runtime features, not API surface; documented in behavior-differences section.

Generated by Daily Rig Claude Dynamic Workflow Compatibility · sonnet46 50.7 AIC · ⌖ 8.2 AIC · ⊞ 5.4K ·

The sample now matches the worked-conversion example in
claude-workflow-conversion.md, making the args→input translation
visible in code rather than only in docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review August 1, 2026 20:08
@pelikhan
pelikhan merged commit 8cdbf65 into main Aug 1, 2026
1 check passed
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /grill-with-docs — clean documentation-only change; approving with one minor note.

📋 Key Themes & Highlights

Positive Highlights

  • ✅ Side-by-side Claude/rig snippets make the argsinput mapping immediately concrete
  • ✅ Inline comment in the rig code reinforces the mapping at the right reading level
  • ✅ Hardcoded list replaced with input.areas, making the sample genuinely runnable against caller-supplied data
  • ✅ PR description is thorough and accurately describes scope
  • ✅ Typecheck validation confirmed

Minor Note

Line 23 says "everything else maps 1-to-1" but the pipeline body differs slightly between the Claude snippet and the rig port (filter(Boolean).flatMap vs .flatMap(r => r?.findings ?? [])). This is idiomatic TypeScript and fine in practice, but the wording could set a false expectation for readers trying a literal port. Consider softening to "the structure maps 1-to-1" or adding a short note that null-handling idioms differ.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 23 AIC · ⌖ 4.1 AIC · ⊞ 6.3K
Comment /matt to run again

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