Companion Templates

Agents can instantly scaffold structured artifacts using the ready-to-use templates in templates/. Every planning artifact mandatorily includes at least one embedded Mermaid diagram (a plan without Mermaid is incomplete and blocks the approval gate):

  • brainstorm-intent-template.md: Intent Lock Report before any plan is written. It records verbatim user intent, maps tasks A/B/C/D into interpreted scope, embeds a scope map Mermaid flowchart, documents non-goals and trade-offs (distinguishing Human-locked from Agent-default choices), and enforces the human approval gate before planning.
  • spec-template.md: Architectural design spec written at brainstorm step 6: problem and solution from the user's side, a long user-story list, implementation decisions with no file paths, testing decisions with what each seam catches and misses, glossary terms, out of scope, and a Mermaid map. The plan carries the paths.
  • implementation-plan-template.md: MANDATORY Mermaid visual map (tasks, dependencies, gates, verification), task breakdown, failing tests (RED), implementation (GREEN), and verification matrix.
  • spike-report-template.md: Hypothesis testing flow, epistemic unknowns exploration, architectural trade-off evaluations, and a Prototype Location section that keeps the prototype under docs/code-plan/spikes/<spike-id>/ as the primary source.
  • systematic-debugging-log-template.md: Phase 0 red-capable feedback loop, then reproduce and minimise, ranked falsifiable hypotheses with tagged debug logs, the smallest fix with a regression test at a correct seam, and cleanup, plus the bug reproduction log.
  • verification-checklist-template.md: Evidence gate flowchart, pre-completion checks (test logs, zero warnings, build pass, git hygiene).
  • pull-request-template.md: delivery metadata, the smallest visual of the change, acceptance-criteria-to-evidence table, local verification with before and after evidence, independent review, risk and rollback with a one-way or two-way door call, deferred debt.
  • pr-review-template.md: remote PR target, fetched-state record, coverage table, findings anchored to changed lines on the Standards and Spec axes, merge readiness, binary verdict, and what gets posted.
  • handoff-template.md: Session handoff document - fill at the end of every session so the next session can resume exactly where you left off (last verified state, next action, open decisions, blockers).
  • progress-log-template.md: Persistent task state log - the single source of truth for a task across multiple sessions (checklist, decisions, evidence trail, session log).
  • adr-template.md: Architecture Decision Record (ADR) - structured decision tree, alternative trade-off comparison, and consequences.
  • subagent-contract-template.md: Subagent task contract - task chunking and fan-out plan, strict scope isolation, permitted target files, gather & synthesize checkpoint, and parent diff audit gate sequence.
  • vault-index-subagent-contract.md: Vault Index Extraction Contract (Semantic Layer). Subagent task contract for reading notes and emitting concept / attribute nodes into isolated chunk files with strict source_file provenance and chunk-schema validation.
  • code-review-template.md: Reviewer output contract - Standards and Spec axes run as two parallel reviewers, rule attribution precedence, 8-point bug qualification filter, an assumed load recorded per review and a scale lens (check-then-write race, unbounded growth, query per item, per-process state) applied under that same filter, P0–P3 priority with confidence, exhaustiveness and dedupe rules, non-blocking design notes from a twelve-smell baseline, suggestion block format, and the binary correct / not correct verdict.
  • deep-research-report-template.md: Citation-grounded long-form research report - executive summary, ## themes with ### subsections, inline [n] citations, LaTeX notation, and a closing synthesis.
  • follow-up-injection-template.md: Session-close debt sweep - harvested debt candidates, NOW/LATER classification, the ranked 3-5 follow-up set, the batched multi-select question, the execution record, and the deferred backlog.
  • session-learning-ledger-template.md: Self-learning ledger filled during the Step 6 Learning Harvest - records the agent's own operational mistakes (wrong tool calls, misread rules, blind retries, premature guesses, scope creep), distills them into WHEN → DO → NOT rules through the Minimum-Signal and 30-Day Horizon gates, writes kept rules in-repo automatically into MEMORY.md, and promotes recurring rules to ~/AGENTS.md only with per-item user approval. The next session reads these before starting work.