Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skills/rig/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Defaults: `name: "agent"`, `model: "small"`, `maxTurns: 4`, string input/output,
| Several known files | `p.readAll(paths)` |
| Static shell command | `p.bash(command)`; use ``p.bashRaw`...` `` for literal backslashes |
| Caller-supplied path(s) | `p.readInput(field)` / `p.readAllInput(field)` with `s.path` schemas |
| Discover workspace paths | `p.glob(pattern)` (prefer over `p.bash("find ...")` for static discovery) |
| Discover workspace paths | `p.glob(pattern)` returns paths only; follow with a read intent for contents (prefer over `p.bash("find ...")` for static discovery) |
| Persist generated output | `p.writeOutput(field, path)` or `p.writeInput(pathField, outputField)` |
| String-keyed map | `s.record(value)`; keys are always `string` — do not wrap in `s.object`; use `s.record(s.int)` for count maps |
| Numeric schema choice | `s.int` for counts/line numbers; `s.number` for measurements and ratios |
Expand Down
5 changes: 5 additions & 0 deletions skills/rig/references/composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ When a task asks for runnable markdown:

Rig starts with no addons. `maxTurns` is only the total budget; automatic parse/schema correction requires `repair()`:

| Scenario | Addons | What happens |
|----------|--------|--------------|
| Invalid parsed or schema-validated output | `repair()` | Retries with the validation error |
| The same failure needs stronger final guidance | `[steering(), repair()]` | Adds a last-chance warning to repair's final retry |

```ts
import { agent, repair } from "rig";

Expand Down