generate-rules
Skill0 starsChanged 7 months agoMITView on GitHub
This skill should be used when the user asks to 'generate engineering rules', 'create architecture contract', 'write engineering principles', 'set up testing strategy', or 'create anti-pattern rules'. Generates 4 mandatory always-loaded engineering rules and vault cards adapted to the project's stack and architecture.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- nurettincoban/ai-prd-workflowtheir own version, first seen Oct 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- nurettincoban/ai-prd-workflow★ 317same 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 repository5 other files it gives its agents.
- detect-stackSkill
- map-architectureSkill
- mine-anti-patternsSkill
- setupSkill
- validate-contextSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
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 44
Test type by layer table (adapted to project's test framework)
- Distinctive: line 45
Test type by situation table (bug fix -> regression, new feature -> behavior, refactor -> existing suite)
- Distinctive: line 47
Test directory structure (adapted to project)
- Distinctive: line 81
NEVER use generic examples — use REAL names and paths from the codebase
- Very specific: line 82
ALWAYS include ⛔ NUNCA section at top of each rule (compactation-safe)
- Very specific: line 83
ALWAYS add vault triggers: SE [situation] -> vault:engineering/[card]
≈ “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
Generate Engineering Rules
Generate 4 mandatory always-loaded engineering rules and vault cards adapted to the project.
Prerequisites
- PROJECT_PROFILE from
detect-stack - ARCHITECTURE_MAP from
map-architecture - Anti-pattern catalog from
mine-anti-patterns
Rules to Generate
Rule 50: Architecture Contract
Create .claude/rules/50-architecture-contract.md:
⛔ NUNCAsection with forbidden imports (from ARCHITECTURE_MAP)- Layer diagram showing dependency direction
- Dependency rules table (CAN import / CANNOT import)
- Mandatory flows (from ARCHITECTURE_MAP)
- Vault triggers:
SE implementing [X] -> vault:engineering/adr-*
Rule 51: Engineering Principles
Create .claude/rules/51-engineering-principles.md:
⛔ NUNCAsection (no premature abstraction, no silenced exceptions, no YAGNI, no DRY violations)- SOLID table with REAL examples from the codebase (not generic)
- DRY / YAGNI / KISS rules with concrete examples
- Coupling detection rules
- Error handling section (adapted to project's language)
- Vault triggers for deep consultation
Rule 52: Testing Strategy
Create .claude/rules/52-testing-strategy.md:
⛔ NUNCAsection (no task without test, no silenced failures, no implementation-coupled tests, no continuing on regression failure)- Test type by layer table (adapted to project's test framework)
- Test type by situation table (bug fix -> regression, new feature -> behavior, refactor -> existing suite)
- Regression rules (THE MOST IMPORTANT — pytest/ equivalent after ANY change)
- Test directory structure (adapted to project)
- Vault triggers
Rule 53: Anti-Patterns
Create .claude/rules/53-anti-patterns.md:
⛔ NUNCAtable with anti-patterns found during scan- Evolution rule: when fixing bug without test -> MUST add entry + regression test + vault card
- Vault triggers
Vault Cards
Generate in vault/engineering/:
| Card | Content |
adr-001-[key-decision].md | Most important architectural decision |
adr-002-[second-decision].md | Second most important decision |
layer-contract.md | Detailed import rules with code examples |
pattern-srp-examples.md | 3 real SRP examples from codebase |
testing-strategy-examples.md | Example of each test type in project's framework |
Language Adaptation
Adapt code examples and patterns:
- Python:
pytest,pydantic,structlog,ValueError,ruff - TypeScript:
jest/vitest,zod, typed error classes,eslint - Go:
go test, stdlib,fmt.Errorf, sentinel errors,golangci-lint - Ruby:
rspec, Rails conventions, custom exceptions,rubocop
Critical Rules
- NEVER use generic examples — use REAL names and paths from the codebase
- ALWAYS include
⛔ NUNCAsection at top of each rule (compactation-safe) - ALWAYS add vault triggers:
SE [situation] -> vault:engineering/[card]
Detailed Templates
Rule templates with full examples are in references/templates.md.
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.

