AGENTS.md · git:20261118.51dd05f · 2026-11-18 · sha256 13036c8ae748cb77
AGENTS.md git:20261118.51dd05fA
Immutable. This exact content never changes and is served at /api/v1/blob/13036c8ae748cb77.
# 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 survive a symlink install. - `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. - 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. ## 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.