[rig-claude] Improve Claude dynamic-workflow compatibility for rig - #383
Merged
Merged
Conversation
The primitive mapping table incorrectly stated that call.json's schema
argument is s.object({ ... }). In fact, call.json accepts any s.* schema
— s.enum, s.array, s.string, or any nested combination — and infers the
TypeScript return type automatically. Claude dynamic workflows only
support object schemas; this rig capability is a meaningful difference.
- Fix the table row for `await agent(prompt, { schema })` to describe the
full schema type rather than restricting to s.object.
- Add a 'Richer schema types' bullet to the behavior-differences section
so Claude users know the schema restriction no longer applies.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
Contributor
Author
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /grill-with-docs — the changes are accurate, well-placed, and use the project's existing vocabulary. No blocking issues found.
📋 Summary
What was reviewed
Two edits to skills/rig/references/claude-workflow-conversion.md:
- Primitive mapping table: updated the
call.jsonrow to stateschemaaccepts anys.*value, not justs.object, with an explicit note that Claude restricts to objects while rig does not. - Behavior-differences section: added a Richer schema types bullet with the same information in prose form.
Positive highlights
- Factually correct — verified against
rig.ts:call.jsonis generic overOutput extends Schema, which includesEnumSchema,ArraySchema,StringSchema, etc. - Terminology consistent with the rest of the docs (
s.*,call.json,s.enum,s.array) - Information is discoverable in two places (table + behavior diffs), appropriate given users scan both
- No duplication: the table gives the API mapping; the bullet gives the rationale and contrast
- Tight, minimal change — no stale references introduced
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 20.2 AIC · ⌖ 2.62 AIC · ⊞ 6.3K
Comment /matt to run again
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
The primitive mapping table in
claude-workflow-conversion.mdincorrectly stated thatcall.json'sschemaargument must bes.object({ ... }). This is a meaningful inaccuracy: Claude Code dynamic workflows only support object schemas inagent(prompt, { schema }), but rig'scall.json(prompt, schema)accepts anys.*schema —s.enum,s.array,s.string, or any nested combination — and infers the TypeScript return type automatically.A user porting a Claude workflow that returns an enum classification (e.g.
"high" | "medium" | "low") would naturally trycall.json(prompt, s.enum(...))and it would work, but the documentation said otherwise, creating confusion about what is and isn't supported.Why this improves transfer from Claude dynamic workflows to rig
rig.ts:call.jsonacceptsOutput extends Schema)Files changed
skills/rig/references/claude-workflow-conversion.md— two edits:await agent(prompt, { schema })table row to describeschemaas anys.*value with a note that Claude restricts to objects but rig does notValidation run
Docs-only change. No broken links were introduced; existing samples and references are unaffected.
Remaining intentional differences
{ effort: "high" }— not modeled in rig; users encode importance structurally or via model id{ agentType: "Explore" }— no built-in read-only agent type; addressed via prompt wording and narrow tool lists