Rules¶
Behavioural rules live as flat files under src/apothem/rules/ with the
*.md suffix. Each rule is self-contained — Purpose,
Obligations, Seriousness Scaling, Anti-Patterns, Enforcement, Bindings — and
either always-on or path-filtered.
Active rules¶
The canonical registry is CLAUDE.md §7.2. The same set in flat form:
| Rule | Scope | Implements |
|---|---|---|
| Auto Memory | Always-on | CM-26 |
| Clean-Room Generation | Always-on | CM-5 / CM-7 / CM-21 |
| Cognitive Identity | Always-on | CM-21 |
| Context Management | Always-on | CM-12 / CM-14 / CM-18 / CM-19 / CM-24 |
| Context Management Scratch | Path-filtered | CM-12 / CM-24 (companion) |
| Conventions Vigilance | Always-on | CM-22 |
| Interactive Questions | Always-on | CM-2 extension |
| Interactive Questions Sweep Matchers | Path-filtered | CM-2 extension (companion) |
| Operational Mandates | Always-on | CM-1–10 |
| Agent Orchestration | Always-on | CM-17 / CM-25 |
| Clean Architecture | Path-filtered | CM-27 |
| Large File Generation | Path-filtered | CM-23 |
| Performance Discipline | Path-filtered | Performance axis |
| Planning Techniques | Path-filtered | CM-20 / CM-21 |
| Python Senior Architect | Path-filtered | CM-28 |
Frontmatter contract¶
Every rule file carries:
---
name: <rule name>
description: <one-line role>
type: instruction
pathFilter: <optional list of glob patterns>
---
The pathFilter field is omitted on always-on rules and present on
path-filtered ones. The validator's frontmatter-cohort check verifies the
contract on every rule file.
Authoring discipline¶
- Self-contained. Each rule has its own Purpose, Obligations, Anti-Patterns, and Enforcement sections.
- Bindings block. Every rule ends with the canonical five-direction Bindings block (Drives → / Satisfies → / Established by ↑ / Gated by ← / Cross-bound with ↔).
- Domain language only. No plan-internal references — see
CLAUDE.mdCM-7.