Write a well-structured standard document with headers, rules, and examples
Create a new standard document that defines clear rules for a specific aspect of your project.
You're documenting a pattern, convention, or requirement that your team should follow. The standard becomes the source of truth — it's wired into agent context and used to verify compliance in ceremonies and enforcement.
Standards in claude-standards follow the format established in levels/L1-context/library/. Each standard:
Reference: levels/L1-context/README.md
Identify scope — What rule are you documenting? (e.g., "error handling", "API design", "test coverage")
Check if standard already exists — Search docs/standards/ for related files
grep -r "keyword" docs/standards/*/README.mdDraft the standard — Follow the template:
---
category: [engineering|design|quality|operations|architecture]
standard: [kebab-case-name]
version: 1.0
customize: [true|false]
---
# Standard Title
## Principles
[Why this matters — 2-3 paragraphs]
## Rules
1. **Rule Name** — What must be true
- Details and context
- [CUSTOMIZE]: Project-specific value needed here
2. **Rule Name** — What must be true
## Examples
### Right ✓
[Code/pattern that follows the standard]
### Wrong ✗
[Code/pattern that violates the standard]
## Exceptions
When this standard does NOT apply:
- [Scenario where exception is valid]
## Compliance Checklist
- [ ] [Verifiable check 1]
- [ ] [Verifiable check 2]
docs/standards/[category]/[standard-name].mdAdd to category README index — Update docs/standards/[category]/README.md
- [Standard Title](./standard-name.md) — One-line descriptionWire into agent context — Update context files to reference the standard
CLAUDE.md: Add reference if widely applicableAGENTS.md: Link if agents should know about it.cursor/rules/ or equivalent: Create rule file if applicableVerify with check-doc-index.sh — Run verification
./levels/L2-ceremonies/scripts/check-doc-index.sh
./levels/L2-ceremonies/scripts/check-standards-refs.sh
Duplicating content into CLAUDE.md — Wrong approach
docs/standards/, agent files reference itVague rules that can't be verified — Unclear standards
Missing [CUSTOMIZE] markers — Makes standard unusable by other projects
Standards hoarding — Writing standards for everything
levels/L1-context/README.md — How the library is organizedlevels/L1-context/library/quality/governance.md — Example standardAGENTS.md — How to wire standards into agent contextlevels/L2-ceremonies/ceremonies/pr-gate.md — How standards are verified