spec-harness-rules
Skill34 starsChanged 5 months agoMITView on GitHub
Per-directory rules — resolve the nearest RULES.md for a path (coding/architecture/packages/testing/reviewing), or generate it from a directory's real code when missing. Use when Malik says 'different directories have different rules', 'add rules per directory', 'each package needs its own rules', 'what rules apply here', or when working in a monorepo with mixed stacks. Each section is owned by one SDD agent; deepest-wins cascade.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/app_feature_first_architecture.mdcCursor rule
- .cursor/rules/app_rules.mdcCursor rule
- .cursor/rules/best_practices.mdcCursor rule
- mobilelauncherSkill
- spec-harness-auditSkill
- spec-harness-buildSkill
- spec-harness-generate-agentsSkill
- spec-harness-installSkill
- spec-harness-learnSkill
- spec-harness-planSkill
- spec-harnessSkill
- spec-harness-specSkill
- spec-harness-tasksSkill
- spec-harness-ticketsSkill
- spec-harness-verifySkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Every correction or FAIL cause goes through spec-harness-learn → a dated rule.
- Distinctive: line 20
Never scaffold the second-brain vault.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
spec-harness-rules
Make per-directory rules exist and resolve them. --scan: at each rules-boundary dir (own manifest/stack) generate a RULES.md with the 5 concern sections from that dir's real code, never copied across stacks. --check <path>: print the merged rules an agent would see (root→…→dir, deepest wins). The build flow scans first so subagents resolve, not invent.
Run it
- Load the full procedure — read the command doc and follow it exactly:
.claude/commands/spec-harness/rules.md(this repo) or the spec-harness sourcecommands/rules.md. - Agents — spawn from
.claude/agents/: researcher, implementer. - Stay inside the 3 pillars — memory bank (
.memory/) · Spec-Driven Development · Harness (ratchetAGENTS.md+ verifier + learning loop). ReadSPEC-HARNESS.mdfor how this repo is wired.
Non-negotiables
- The ratchet only tightens (rules are append/sharpen, never drop).
- Nothing is "done" until the separate verifier returns PASS against
goal.md. - Every correction or FAIL cause goes through
spec-harness-learn→ a dated rule. - Never scaffold the second-brain vault. Never commit a client repo unless asked.
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.

