[rig-claude] Improve Claude dynamic-workflow compatibility for rig - #396
Conversation
…kflow-conversion Fills the gap where Claude dynamic-workflow users know model = 'sonnet' but don't know how to configure the Anthropic engine in rig or which full Claude model IDs to use. - Expand model/effort rows in the primitive mapping table with concrete ids - Add 'Running with the Anthropic engine' section with configureAgent() snippet and a model tier table (haiku/sonnet/opus) - Update SKILL.md focused-reference blurb to surface 'model selection' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /grill-with-docs — requesting changes on two correctness issues in the new section.
📋 Key Themes & Highlights
Issues
- Incorrect
callusage (line 184):callis not a named export from"rig"— it is a destructured parameter in aworkflowbody. The snippet imports{ agent, s, workflow }but usescallas a free function, which is aReferenceError. - Inaccurate
RIG_ENGINEdescription (line 169): described as "auto-select" when it is actually an explicit override. True auto-selection happens whenRIG_ENGINEis absent andANTHROPIC_API_KEYis set.
Positive Highlights
- ✅ The overall structure of the new section is well-targeted; it fills a real discoverability gap
- ✅ The model tier table is clear and useful
- ✅ The
effortrow expansion gives actionable guidance where before there was none - ✅ SKILL.md blurb update correctly surfaces "model selection" for routing
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 50.9 AIC · ⌖ 4.27 AIC · ⊞ 6.3K
Comment /matt to run again
| }); | ||
|
|
||
| // Per-call model override — equivalent to { model: "claude-opus-4-5" } in a dynamic workflow: | ||
| const result = await call(classifier, { text }, { model: "claude-opus-4-5" }); |
There was a problem hiding this comment.
[/grill-with-docs] call is not a named export from "rig" — it is only available as a destructured parameter inside a workflow body (body: async ({ call }) => { ... }). Using it as a standalone function will cause a ReferenceError at runtime and mislead readers porting Claude workflows.
💡 Suggested fix
Either wrap the per-call override in a workflow body:
const myWorkflow = workflow({
input: s.object({ text: s.string }),
body: async ({ call }, { text }) => {
return await call(classifier, { text }, { model: "claude-opus-4-5" });
},
});Or use the callable AgentFn signature directly (since AgentFn is callable):
const result = await classifier({ text }, { model: "claude-opus-4-5" });| configureAgent(anthropicEngine()); // reads ANTHROPIC_API_KEY | ||
| ``` | ||
|
|
||
| Or set `RIG_ENGINE=anthropic` to let the launcher auto-select based on |
There was a problem hiding this comment.
[/grill-with-docs] Slight inaccuracy: RIG_ENGINE=anthropic is an explicit override, not auto-selection. Auto-selection happens when RIG_ENGINE is not set and ANTHROPIC_API_KEY is present. Swapping the description avoids confusion for users who rely on env-based auto-detection.
💡 Suggested wording
Or omit `configureAgent` entirely — if `ANTHROPIC_API_KEY` is set and `COPILOT_SDK_URI` is not,
rig auto-selects the Anthropic engine. Set `RIG_ENGINE=anthropic` to force it explicitly.
Compatibility gap addressed
Claude dynamic-workflow users know how to select models with
{ model: "sonnet" }and quality with{ effort: "high" }, but the conversion reference didn't show:effort: "high"(the table said—with no actionable guidance)This is the single highest-confidence discoverability gap: a user porting a Claude workflow would copy
model: "sonnet"and wonder why it doesn't resolve, then have no docs pointing them toanthropicEngine()orclaude-sonnet-4-5.Why this improves transfer
configureAgent(anthropicEngine())snippet,RIG_ENGINE=anthropicnote, and a model tier table (haiku/sonnet/opus)effortrow actionable: "use a more capable model id or increasemaxTurns"modelrow note to surface the full-id requirement withanthropicEngine()Files changed
skills/rig/references/claude-workflow-conversion.md— new section + expanded table rowsskills/rig/SKILL.md— blurb update for the claude-workflow-conversion referenceValidation
Docs-only change; no typecheck or test run required per the validation rules. Checked for broken relative links — all sample and reference links are unchanged.
Remaining intentional differences
effortfield in rig (by design); the guidance now directs users to the model tier table instead.agentType: "Explore"equivalent; the existing guidance (prompt wording + narrow tools list) remains correct.