diff --git a/SKILLS_INDEX.md b/SKILLS_INDEX.md index e808bc0..9df9960 100644 --- a/SKILLS_INDEX.md +++ b/SKILLS_INDEX.md @@ -9,6 +9,7 @@ the SKILL.md, not the table. | Skill | Description | Use when | Surfaces | |-------|-------------|----------|----------| +| `adr` | Architecture Decision Records — house format, and how to record a decision you cannot make yet | Recording an architectural decision; revisiting one; or deciding between options where the right answer genuinely is not knowable yet | claude-code, library | | `atdd` | Acceptance Test-Driven Development workflow | Feature development with acceptance criteria | claude-code, library | | `cad-babysit` | Focused human-in-the-loop session working CAD's stuck queue (read-only) | Picking up whatever `cad stuck` flags, with a human present | claude-code, library | | `clean-code` | Clean code principles with Go adaptation | Code review, refactoring, new code | claude-code, library | @@ -21,6 +22,7 @@ the SKILL.md, not the table. | `feature-spec` | Implementation-level feature spec (tighter than spec-driven-dev) | Scoping one feature inside an already-specced project | claude-code, library | | `gitea-ci` | Gitea CI/CD pipeline with act_runner, buildah, k3s, GitHub mirror | Setting up or debugging CI on this infra | claude-code, library | | `grill-me` | Structured plan interrogation — Quick Poke, Full Grill, Pre-mortem | Stress-testing a plan before committing; end of Diamond 1; before promoting to pre-prod | claude-code, library, chat | +| `lineage` | Backward decision archaeology — was this tried before, and does the reason it failed still hold | Before proposing something that feels new; when an idea keeps resurfacing; when you inherit code whose reason is gone | claude-code, library | | `own-the-task` | Delegation ownership — Intake → Brief → Plan → Execute | A task is handed over open-ended; \"take this off my plate\"; before a plan exists | claude-code, library, chat | | `planning` | Planning and task breakdown | Sprint planning, task decomposition | claude-code, library | | `playwright` | Playwright E2E testing — setup, HTMX patterns, SSE streams, CI wiring | Adding browser tests to any project with a web UI | claude-code, library | diff --git a/skills/adr/SKILL.md b/skills/adr/SKILL.md new file mode 100644 index 0000000..b9058d0 --- /dev/null +++ b/skills/adr/SKILL.md @@ -0,0 +1,204 @@ +--- +name: adr +surfaces: [claude-code, library] +summary: "Architecture Decision Records — house format, and how to record a decision you cannot make yet" +use_when: "Recording an architectural decision; revisiting one; or deciding between options where the right answer genuinely is not knowable yet" +description: Write an Architecture Decision Record in this estate's format — YAML frontmatter, Status/Context/Decision/Consequences/Validation — including the case where the tradeoff is genuinely context-dependent and forcing a resolution would be worse than preserving the tension. Use when recording or superseding an architectural decision, or when a decision keeps getting re-litigated because nobody wrote down why. +--- + +# ADR + +## Overview + +An ADR is the *record* of a decision — the artifact someone reads in eight months when +they are about to undo it without knowing why it exists. It does not confer the decision; +a person with authority does that, and this skill never is that person. + +Two things make one useful, and neither is the prose quality: a **format consistent +enough to grep across repos**, and an honest account of **what was not decided**. + +## Before you write + +Both of these change what goes in the ADR, so they are not cross-references, they are +steps: + +1. **`lineage`** — was this decided before and reversed? The reason it was dropped is + usually the most valuable sentence in your Context, and if an earlier ADR exists, + yours supersedes it rather than ignoring it. +2. **`grill-me`** (Full Grill) — find the hole now. It is cheaper here than in the + Consequences section of the ADR that supersedes yours. + +## When to Use + +- Any choice where a reasonable alternative existed and was not taken +- Superseding or amending an earlier ADR (never edit the old one — see Status) +- A decision that keeps getting re-litigated, which means the reasoning was never recorded +- A tradeoff that is genuinely context-dependent — see *Preserving a productive tension* + +**Do not use for:** implementation choices with no alternative worth naming, or anything +a code comment answers. An ADR per function is an ADR nobody reads. + +## The format + +**Where it goes:** `docs/adr/NNNN-kebab-slug.md`, zero-padded to four digits, numbered +sequentially within the repo. Frontmatter you cannot locate is not greppable, and half +the value of the format is that `docs/adr/*` is a known path in every repo here. + +**The number is repo-local.** `cad` ADR-0002 and `infra` ADR-0002 are different +documents. When referring across repos — including in `supersedes` — qualify it: +`cad#0002`. Within a repo the bare number is fine. + +Frontmatter first. It exists so the corpus is machine-readable — "which ADRs does 0004 +supersede", "what is still `proposed`" — and a bespoke header block, however well +written, cannot answer those. + +```markdown +--- +adr: 0004 +title: +status: proposed | accepted | superseded | amended +date: 2026-08-29 +deciders: " while proposed> +supersedes: +--- + +# ADR-0004 — + +## Status + +**The frontmatter is authoritative for status and date.** This section exists for the one +thing the frontmatter cannot hold: *why* it moved — what superseded it and on what +evidence, or what accepting it was contingent on. If it would only restate the YAML, +delete it. + +## Context + +The forces. What is true that makes this a decision rather than a default — constraints, +the failure that prompted it, what was tried. Name the unknowns explicitly; a decision +made under uncertainty is not weaker for saying so, it is auditable. + +## Decision + +One sentence of what was decided, then why *this* option rather than the named +alternatives. Address the strongest case against, not the weakest. + +## Consequences + +**Positive:** what this buys. + +**Negative / watch:** what it costs, and the specific thing to watch that would tell you +it was wrong. "Some added complexity" is not a consequence; "the event schema is now the +coupling surface between cad and every executor — version it deliberately" is. + +## Validation + +How you will know. A link to the experiment or the metric that proves or kills it, and +the condition that fires a revisit. An ADR with no validation section is a preference +with a template around it. +``` + +## Preserving a productive tension + +Some tradeoffs are not unresolved because nobody thought hard enough. They are +context-dependent, the context is not settled, and picking now means picking blind. +Forcing resolution there produces a confident record that is wrong half the time. + +Record the tension instead, in the Decision section: + +```markdown +## Decision + +Provisional: **