AGENTS.md · git:20261120.a693330 · 2026-11-20 · sha256 b694ca5758d8c891
AGENTS.md git:20261120.a693330A
Immutable. This exact content never changes and is served at /api/v1/blob/b694ca5758d8c891.
# Working on this repo This repo ships skills, hooks and scripts for Claude Code and OpenCode. It is not an application. ## Layout - `skills/<name>/SKILL.md`: one directory per skill, flat. Detail goes in sibling files one level deep. Skills link to each other only within `skills/` (`../do-it/STATE.md`), so links resolve in a copied install too. - `agents/`: role agents (scout, reviewer, builder, planner, skeptic), each pinning its model and tools; skills name them instead of describing a tier. The voice block in each is copied from `skills/it-core/VOICE.md` by `npm run gen`; edit the source, not the copies. - `hooks/`: `claude.mjs` (Claude Code entry), `lib/` (host-neutral checks and context), `hooks.json` (plugin hook config). - `.opencode/do-it-plugin/`: the OpenCode plugin, a thin adapter over `hooks/lib`. Not `plugin/` or `plugins/`: OpenCode discovers either name in a project by itself, which would load the plugin twice. - `.opencode/command/` and `.opencode/commands/`: generated by `npm run gen`. Never edit by hand. - `scripts/`: install, generate, check. - `docs/DESIGN.md`, `docs/adr/`: why things are the way they are. ## Rules How to write a skill (typed vs automatic, descriptions, calling other skills, file layout, line budget, `-it` names) is in [skills/skill-it/SKILL-MECHANICS.md](skills/skill-it/SKILL-MECHANICS.md); `npm run check` enforces it. This repo adds: - `skills/it-core/SKILL.md` is the single source of the coding posture; the hooks and the OpenCode plugin read it. Do not restate it elsewhere. - Check a new skill name against mattpocock/skills and rshingleton/skills. - A new model-invoked skill needs positive and negative prompts in `evals/routing.json`; `npm run check` runs the routing eval. - Skills are written in this repo's own words. Ideas from other repos are welcome and credited in the README; their text is not copied in. Check a source's licence first and record it in `docs/SOURCES.md` ([CONTRIBUTING.md](CONTRIBUTING.md)). - No em-dashes in skills. - No runtime dependencies. Node 18+ built-ins and bash only. - Hooks fail open: a crash or bad input must never block the agent. - No AI attribution in commits, docs or code comments. - The plugin version moves once per release, in the commit that lands a run: `.claude-plugin/plugin.json` and `package.json` together. A slice never names either file, and CI's version gate, not `npm run check`, enforces it ([ADR 0020](docs/adr/0020-the-version-bumps-once-per-release.md)). ## Before handing off ```bash npm test && npm run check ``` In the inner loop, run the files you touched, not the suite: `node --test tests/run-gate.test.mjs tests/work.test.mjs`. The slow files are `run-commit`, `changeset`, `scripts-regressions`, `install-links` and the `tracks-*` set; nothing runs faster than the suite as a whole for those. Pushed means the commit is on the remote: `git status --short` is empty and `git log origin/<branch> -1` names it. `Everything up-to-date` while anything is staged means nothing was committed. After a push to a PR branch, read the checks before calling it fixed (`gh pr view <n> --json statusCheckRollup`) and confirm `.headRefOid` is the sha you pushed. Add an ADR in `docs/adr/` for a decision that is hard to reverse, surprising without context, and the result of a real trade-off.