✨ Add verify skill for the agent loop
A project-local Agent Skill (.agents/skills/verify/SKILL.md) wraps the correctness ladder as an on-demand procedure: run npm run test, recover by fixing the root cause in the types (not by suppressing them), optionally run whole-project npm run check, and commit through the hook. Exposed as /skill:verify for pi, and read by any Agent-Skills harness from .agents/skills/. It is a procedure, not a doc fork: it links AGENTS.md / CONTRIBUTING.md / package.json instead of restating the rules, so there is no drift. Agents must not start `npm run watch` -- it never returns and blocks the turn. The skill's ladder drops watch and calls it out under "What not to run here"; AGENTS.md gains a matching guardrail.
This commit is contained in:
1 parent
103cf04f8d
commit
3d0fe18d6a
2 files changed
+44
No files matched your search
@@ -20,6 +20,8 @@ first-action facts. Do not restate evolving prose here — it will drift.
|
||||
|
||||
The bot's definition of done: `npm run test` green, commit normally after.
|
||||
|
||||
- A project skill wraps this loop as an on-demand procedure: `/skill:verify` → [`.agents/skills/verify/SKILL.md`](./.agents/skills/verify/SKILL.md).
|
||||
|
||||
## Never do
|
||||
|
||||
Don't silence the type system to force a green run. As an agent these are forbidden:
|
||||
@@ -32,6 +34,8 @@ Fix the root cause with the type system instead — narrowing, generics, `satisf
|
||||
|
||||
The same applies to the checks themselves: **never `git commit --no-verify`** (or otherwise skip a pre-commit / pre-push hook). The checks are fast and offline, so a redundant run is fine — bypassing a hook to get green is the identical anti-pattern. If a commit already skipped a hook, redo it through one: `git reset --soft HEAD~1 && git commit -C <skipped-sha>`.
|
||||
|
||||
Never start a long-lived / blocking process such as `npm run watch`. It runs until a human stops it with Ctrl-C, so in an agent turn it hangs forever and floods the context with continuous output. Reach for a one-shot command instead — `npm run test` (or `npm run check`) — to get feedback.
|
||||
|
||||
## Read these
|
||||
|
||||
- [CONTRIBUTING.md § Rules the tools don't enforce](./CONTRIBUTING.md#rules-the-tools-dont-enforce) — the constraints the linters don't catch; CI/review bounce these. **The most important section.**
|
||||
|
||||
Reference in new issue
Block a user