agent-rules
Skill0 starsChanged 12 days agoMITView on GitHub
Writing and maintaining the agent instruction layer — AGENTS.md tiers, one-rule-one-home ownership, resolving a rule that drifted or collided, and the issue-first/plan-first tracker gates.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- dirien/yet-another-agent-harnesstheir own version, first seen Nov 8, 2026
- netresearch/agent-rules-skilltheir own version, first seen Oct 22, 2026
- lankz/skillstheir own version, first seen Sep 1, 2026
- tornikegomareli/agent-rulestheir own version, first seen Jul 30, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- netresearch/agent-rules-skill★ 89same name
- dirien/yet-another-agent-harness★ 19same name
- tornikegomareli/agent-rules★ 11same name
- lankz/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- code-discoverySkill
- designSkill
- project-scaffoldSkill
- repo-alignSkill
- repo-auditSkill
- repo-initSkill
- skills-installSkill
- standardSkill
- verify-changeSkill
- workflowSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Every rule has exactly one home.
- Distinctive: line 36
Find the owner: If the rule already exists, extend that owner's statement.
- Very specific: line 39
Point, don't restate: Every other mention is a link phrased so it reads correctly where it sits: the apps run on the host — see …
- Distinctive: line 80
Write it down: if it will recur: the loser becomes a pointer or gets deleted.
- Very specific: line 93
When the section tracker is on, work that outlives the session moves issue → plan → code:
- Distinctive: line 95
Issue first: No implementing code, no branch, no plan file until the issue exists.
- Distinctive: line 99
Never mutate the tracker unprompted: No creating, editing, closing, commenting, or moving issues and PRs without the user's go-ahead in …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Rules
How the instruction layer is written and kept honest. Read this before adding a rule, and when two rules disagree.
The problem it solves: a rule stated twice is a rule stated zero times plus a drift. The two copies diverge, a reader finds the incomplete one, and the rule is violated — often by an agent that would have obeyed either copy alone.
The tier test
Every rule has exactly one home. Which tier it belongs to is decided by one question:
Would an agent that never opened the detail file break this rule?
- Yes → binding tier.
AGENTS.md§ Hard rules, andCODING_STANDARDS.md§ Rules that apply to every file. Loaded every session, so a line here costs on every turn. - No → detail tier.
docs/agents/<area>.mdor the nearestDESIGN.md. Reached only when its pointer fires.
A rule that governs how to work is binding. A rule that governs how to do one task may be detail. The test is about the agent's default behaviour, not about how important the rule feels.
Full reasoning, including why a rule that matters but sits in a skill gets missed:
RULE-TIERS.md.
One rule, one home
- Find the owner. If the rule already exists, extend that owner's statement. Do not write a second copy.
- State it once, at the place a reader would look for it.
- Point, don't restate. Every other mention is a link phrased so it reads correctly where it
sits:
the apps run on the host — see environment.md § Docker. - Name the consequence. A prohibition with no concrete boundary ("never touch production") is decoration. Say which host, which path, which command.
Adding a rule
| Step | Ask | If the answer is no |
| 1 | Does an existing rule already cover this? | Extend that rule. |
| 2 | Would a fresh agent break this without being told? | It is a no-op. Delete it. |
| 3 | Can it be stated as a positive behaviour? | Try harder; see § Negation below. |
| 4 | Does it carry a concrete boundary? | Add the boundary, or it will not bind. |
| 5 | Is it already stated in another file? | You found a duplicate. Fix the duplicate. |
A rule earns its cost only when a competent default would get it wrong. "Be thorough", "write clean code", "follow best practices" fail step 2 and are noise.
Cap the binding tier at about seven rules. Past that, rules trade against each other and none dominate. If you have ten, four are detail.
Negation
Steering by prohibition drags the forbidden behaviour into context and makes it more available. Prompt the target behaviour instead: "write one-line comments explaining the why" beats "don't write long comments".
A prohibition earns its place only as a hard guardrail you cannot phrase positively — and even then, pair it with the positive target so attention lands on what to do.
When two rules collide
The repo's own files outrank this skill, and a generic instruction outranks a stylistic one. Beyond that:
- Safety, then correctness, then policy, then style. A style rule never turns a blocked action into a permitted one.
- The more specific owner wins. A rule about
packages/uibeats a repo-wide rule on the same subject. - State the collision once, in the reply, naming both files. Then obey the winner. Silence looks like agreement and the drift survives the session.
- Write it down if it will recur: the loser becomes a pointer or gets deleted.
Keeping the registry
The registry is the index of binding rules: rule → one-line statement → owner → detail file.
It is a quote, never a second statement of the rule. Full format and maintenance procedure:
RULE-REGISTRY.md.
Regenerate or spot-check it whenever you add a binding rule. An unregistered rule is invisible to the next reader and to any duplication check.
Tracker gates
When the section tracker is on, work that outlives the session moves issue → plan → code:
- Issue first. No implementing code, no branch, no plan file until the issue exists. An issue written from a finished diff is a record, not a scope — it cannot be reviewed or declined.
- Plan before code. Scope or approach changes land in a plan file before the implementing code.
- Never mutate the tracker unprompted. No creating, editing, closing, commenting, or moving issues and PRs without the user's go-ahead in this conversation. Filing is a mutation: ask, then file.
- A runbook is an issue, not a plan. Steps only a human can execute belong where they survive the branch — usually an issue whose body is the runbook.
With tracker off, the same discipline collapses to a todo list in the reply and no mutations at
all.
Related
- The tier reasoning →
RULE-TIERS.md - The registry format →
RULE-REGISTRY.md - Writing a skill or doc an agent consumes → skill
writing-for-agents(if installed) - Bootstrapping the layer → skill
repo-init
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.

