Skip to content

Commit 1a3c2a9

Browse files
authored
Refactor Rig skill documentation (#86)
1 parent 6a6ce19 commit 1a3c2a9

6 files changed

Lines changed: 663 additions & 532 deletions

File tree

AGENTS.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ Rig is a minimal TypeScript agent harness. The core runtime (`skills/rig/rig.ts`
99
```
1010
skills/rig/rig.ts — Core runtime (agent, p, copilotEngine, schemas)
1111
skills/rig/samples/ — 51 sample agents demonstrating patterns
12+
skills/rig/references/ — Focused documentation loaded on demand from SKILL.md
1213
src/engines/copilot.test.ts — Copilot engine unit tests (vitest)
1314
src/rig.test.ts — Unit tests (vitest)
1415
scripts/run-sample.test.ts — Sample runner with a stub Copilot SDK client (dry-run)
15-
skills/rig/SKILL.md — Framework reference docs
16+
skills/rig/SKILL.md — Compact skill entry point and reference router
1617
```
1718

1819
All imports use the `"rig"` path alias (resolved via tsconfig paths + vitest alias). `copilotEngine` is exported directly from `rig` for client construction.
@@ -36,6 +37,18 @@ All imports use the `"rig"` path alias (resolved via tsconfig paths + vitest ali
3637
- Trailing underscore on object keys (`key_`) means optional field
3738
- Do not add legacy compatibility bridges; update callers, samples, and docs to the current API
3839

40+
## Skill Documentation
41+
42+
- Treat `skills/rig/SKILL.md` as prompt context: keep only high-frequency construction rules, decisions, and a minimal canonical example.
43+
- Target roughly 200 lines or fewer. Use line/word/byte counts as regression signals, not as a reason to compress prose until it is unclear.
44+
- Put detailed API tables, edge cases, provider behavior, and scenario-specific patterns in focused files under `skills/rig/references/`.
45+
- Route every reference from `SKILL.md` with a short “read when” description so an agent can load only the relevant secondary context.
46+
- Prefer one representative example, decision tables, and checklists over repeated prose. Remove duplication before adding guidance.
47+
- Keep each fact canonical. A compact rule may be summarized in `SKILL.md`, but its examples and edge cases should live in one reference file.
48+
- Add new material to `SKILL.md` only when it changes how most Rig programs should be generated; otherwise update or add a focused reference.
49+
- When the API changes, update the affected reference and then audit `SKILL.md`, `README.md`, and samples for stale summaries or links.
50+
- Before finishing documentation changes, verify relative links and compare `wc -l -w -c skills/rig/SKILL.md skills/rig/references/*.md` with the previous version.
51+
3952
## Testing
4053

4154
- Framework: vitest

0 commit comments

Comments
 (0)