| name | spec-authoring |
| description | Route to minimal context, then author or revise spec/instruction files with lean, testable, deduplicated guidance, and self-audit the result. |
Spec Authoring
Use when creating or revising any file under agents/ (reference specs, AGENTS.md, skills). Covers context routing, writing, and self-audit in one pass.
1. Route to minimal context
- Identify the request type and changed bounded contexts.
- Load
agents/reference/interfaces.md first (canonical contracts).
- Load the files from the
AGENTS.md request-to-file matrix for the matched row(s); for mixed requests use the union.
- Add
agents/reference/quality.md when behavior, contracts, security, verification, or any normative MUST/SHOULD rule changes.
- Add
AGENTS.md and affected agents/skills/* when instruction or skill workflows change.
- Do not bulk-load unrelated domains.
2. Write / revise
- For a new domain file, start from
templates/domain-template.md.
- Keep one dominant responsibility per file (see ownership map in
AGENTS.md). Split only on a real split trigger: mixed concerns, conflict-causing churn, or size that impairs safe editing.
- State observable, testable behavior: explicit condition โ outcome. Use
MUST/SHOULD/MAY consistently; reserve MUST for hard constraints.
- Own each concept in exactly one file. If another file owns it, write a one-line pointer instead of restating the rule.
- Keep canonical type/interface names in
agents/reference/interfaces.md; reference them, never redefine.
- Document contracts, failure modes, and at least one corner case for changed behavior. Keep examples concise and tied to real behavior.
- Renumber lists cleanly; never leave duplicate list numbers.
3. Keep cross-references in sync
- When a domain file is added, renamed, or has its scope changed, update the
AGENTS.md domain catalog and request-to-file matrix in the same change.
- When persisted metadata/context/bundle contracts change, update
schemas/*.json in the same change (see agents/reference/quality.md).
4. Self-audit (before handoff)
- Run
checklists/consistency-checklist.md and mark each item pass / fail / needs-clarification.
- Provide concrete remediation for every fail; resolve fails before handoff or surface them as blockers.
- Confirm: no interface drift from
interfaces.md, no duplicated rules across files, no references to missing files, normative language consistent, every new rule has a traceable test expectation.