build-rules
Skill2 starsChanged 9 days agoMITView on GitHub
Holds the build rules for a code change: smallest change and reuse first, no speculative abstraction or impossible-case error handling, the change placed in the layer that owns the invariant, comments, option docs and tests. Use before the first edit when asked to build, implement, add, change or fix code, a feature or a bug.
In this repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ask-teamSkill
- assemble-metaSkill
- brainstormSkill
- craft-itSkill
- cut-milestonesSkill
- external-reviewSkill
- frictionSkill
- milestone-closeSkill
- qa-reviewSkill
- review-benchSkill
- scope-commitSkill
- scope-issueSkill
- scope-mrSkill
- scope-specSkill
- setup-dream-teamSkill
- ship-itSkill
- triage-issueSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 14 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Add no abstraction for a hypothetical requirement.
- Distinctive: line 17
Leave the code around the change as it is: no cleanup beyond the dedup rules in Scope and Tests.
- Distinctive: line 23
Add no error handling or validation for a case that cannot happen.
- Distinctive: line 30
Put the change where the invariant lives.
- Distinctive: line 31
Never force the change into one file or a local patch.
- Distinctive: line 32
Before fixing a shared function, grep every caller.
- Distinctive: line 38
Write a comment only for what the code cannot say: a non-obvious constraint, a decision, a gotcha.
- Distinctive: line 40
Keep a comment to one sentence where one sentence does.
- Distinctive: line 41
Never narrate what the next line does.
- Distinctive: line 42
Never restate in prose what readable YAML or config already says.
- Distinctive: line 44
Put rationale in the commit body, never in a code comment.
- Distinctive: line 53
Write no usage scenario, deployment advice, "set this when …" or consequence of leaving it unset.
- Distinctive: line 65
Prefer a new case in an existing table-driven test over a new test function.
- Distinctive: line 68
Test through exported APIs where possible.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
build-rules
Scope
- Implement the smallest change that resolves the task.
- Reuse what is already in the repo before writing anything new.
- Add no abstraction for a hypothetical requirement.
- Leave the code around the change as it is: no cleanup beyond the dedup rules in Scope and Tests.
- Change the code instead of adding a feature flag or a back-compat shim.
- Dedup that keeps the line count roughly flat → do it; it need not shrink the diff.
Error handling
- Add no error handling or validation for a case that cannot happen; trust internal code and framework guarantees.
- Validate at system boundaries only: user input, external APIs.
Where the change goes
- Trace the entry point through the layers to the one that owns the invariant.
- Put the change where the invariant lives.
- Never force the change into one file or a local patch.
- Before fixing a shared function, grep every caller.
Comments
These rules cover the comment you are about to write, not only the ones you find.
- Write a comment only for what the code cannot say: a non-obvious constraint, a decision, a gotcha.
- Keep a comment to one sentence where one sentence does.
- Never narrate what the next line does.
- Never restate in prose what readable YAML or config already says.
- Give declarative code a header line, not a paragraph.
- Put rationale in the commit body, never in a code comment.
- A workaround needs a paragraph of defence → fix the code instead.
Option docs
These rules cover README option lists, reference config comments, --help strings and the
comment on the option's own field or constant.
- Give a config key, flag or env var its accepted values and its default, and stop there.
- Write no usage scenario, deployment advice, "set this when …" or consequence of leaving it unset.
Tests
- A bug fix gets a test that reproduces the bug.
- New behaviour or an exported API change gets a unit or e2e test.
- A test helper, mock, stub or fixture the change needs → reuse one in the test tree that does the same job.
- A helper the change would copy from another test file → move it to a shared test module and use it from both files.
- A path an existing test already covers at another level (unit versus e2e) → extend that test instead of adding a new one.
- Prefer a new case in an existing table-driven test over a new test function.
- Convert an existing test to table-driven rather than duplicate it.
- Mirror realistic data and behaviour.
- Test through exported APIs where possible.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

