AGENT SKILL

implement-a-change

Build a change from its spec in this repository: tests first where a rule is claimed, small commits, the tests of what changed green for the right reason, and each review finding answered in the next round. For a step that writes the code.

License 许可
MIT
所属仓库
emyann/nemia
最近更新
2026-11-15
Stars
★ 3
Forks
0

01 前言 Front Matter

name
implement-a-change
description
Build a change from its spec in this repository: tests first where a rule is claimed, small commits, the tests of what changed green for the right reason, and each review finding answered in the next round. For a step that writes the code.

02 资源文件 1

03 SKILL.md 正文

Implement a change

  1. Read the spec (handed to you in your brief) and the CLAUDE.md of each package it touches. If main moved since your branch was cut, merge it in first. Build each change where the spec places it (its where); one that cannot live there is a wrong spec.
  2. Prove before you build where the spec claims a rule: write the test that makes it refuse, see it fail, then make it pass. Where the spec names the layer that proves a rule, prove it there and nowhere else: one fact restated at every level is three tests to change for it. Assert the fact a refusal carries (that it refused, its kind, its exit code), never its sentence. A new step of a story is a checkpoint of its scenario, and a new input of a function a row of its table: a focused test of its own is for what no story reaches. Before you write a test of one of these kinds, read its entry in traps.md, beside this skill, and only then: a guard; a rule about order or names; a time or a wait; a failure that shows only under load; a test that depends on the environment; a test that reads source text; a field moved to another key or added to a returned type; a value that comes from outside (a file, a page, JSON, a child process); a stand-in for the real thing.
  3. Work in small commits with plain messages, as you go; the run commits only what you leave, in one commit under your step's name.
  4. Check what you changed: its test files, the tests that read a doc, skill or workflow file you touched, and the packages you touched where a file alone does not say enough, each as the repository's instructions say how; then the checks the repository's instructions say a session runs whole. Never more than they say: where your step has a check, it runs the rest outside your session, and a failing test you did not run comes back as its refusal, answered in the next try. Green is the floor, not the bar. You run as a job, and a turn you end is your last: run each long command in the foreground, where one call may take 10 minutes (run_in_background runs it there too), or start it with a shell & and wait on it with a blocking call (timeout 580 bash -c "while kill -0 <pid>; do sleep 5; done"). Never sign off while a check you started is still running. Stop only what you started: bound it with timeout, or keep the pid of what you start in the background ($!) and kill <pid>. Never pkill or killall: other runs share this machine, and your fence refuses them.
  5. Never make it pass by weakening it: a test loosened, a limit's ceiling raised, a check skipped. Cut the function; lower the ceiling of a file you shrank.
  6. Answer the review, from the second round: for each finding, fix it, or say in replies why not (won't fix, and the reason). A finding you cannot answer honestly is a reason to sign off blocked, saying what you need.

When the spec is wrong — it names what is not there, or asks what a rule refuses — do not build around it: sign off blocked and say so.

04 同仓库更多 Skills

emyann
emyann/nemia

groom-the-inbox

Read each card in play in the inbox against the repository and say, per card, done (the commit on the base that landed it), replaced (the decision or card that did), stale (each fact that moved, what it said and what it says now) or standing, reading closely only what the period touched. For the janitor's step, which proposes and never acts: a person removes or amends each card by the command the check writes.

★ 3
emyann
emyann/nemia

write-a-spec

Turn an accepted intent into a spec an engineer can build from in this repository: the goal restated, the approach and why, every path it touches, the steps, the tests that prove it, the risks, and what is still open. For a step that designs a change before anyone builds it.

★ 3
emyann
emyann/nemia

review-a-change

Review a change in this repository as a second engineer would: against its intent and spec, by reading the diff and the suite's verdict, with findings that name the file, the line and what goes wrong. For a read-only step that decides whether the work goes round again.

★ 3
emyann
emyann/nemia

read-the-stats

Read a factory's stats since the janitor's last run, against the same length of time before it, write a short report, and propose one correction per card — an allow or deny by name, a line in an agent's body or a skill, or a refusal kept on purpose — each with the numbers behind it, never one already in the inbox. For the janitor's step, which proposes and never acts.

★ 3
emyann
emyann/nemia

land-a-branch

Land a run's result on the base branch in this repository's own checkout, the way the step says it lands: make that one act, read its result, and write the message that records what landed — or change nothing and say why it refused. For a gated ending step (workspace: base).

★ 3
emyann
emyann/nemia

trial-merge-a-branch

Stages the merge of a run's result branch in the repository's own checkout, and writes its commit message.

★ 3