agentleFS
teltringhamteltringham/sdd-plugin/skills/sdd-adr/SKILL.md

sdd-adr

Skill0 starsChanged 8 months agoMITView on GitHub

Creates an Architecture Decision Record documenting a technical decision with alternatives considered and tradeoffs. Links to affected specs and stories. Use when making significant technical choices, resolving decision requests, or documenting backpropagation amendments.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Document technical decisions with context, alternatives, tradeoffs, and a Y-statement summary.

    line 8
  2. Distinctive:

    If the decision is a two-way door (easy to reverse, low blast radius), skip the ADR — note it in a commit message or spec comment instead.

    line 20
  3. Distinctive:

    Create the directory if it doesn't exist

    line 29
  4. Very specific:

    If $ARGUMENTS is a path to decision-request.md:

    line 33
  5. Distinctive:

    Read it for context, options, and recommendation

    line 34
  6. Very specific:

    If $ARGUMENTS is a title:

    line 37
  7. Distinctive:

    Ask 2-4 clarifying questions if needed:

    line 38
  8. Very specific:

    Use the template at ${CLAUDE_PLUGIN_ROOT}/templates/adr/adr.md.

    line 46
  9. Very specific:

    Writing style: write the Context, Decision drivers, Considered options, Decision, and Consequences sections in STE-100 controlled language …

    line 55
  10. Very specific:

    If Status: Proposed, optionally invoke sdd-skeptic to challenge:

    line 70
  11. Distinctive:

    If this resolves a decision-request.md, update the Resolution section of that file

    line 81
  12. Very specific:

    If spec amendments are needed, note them for /sdd-iterate

    line 82
  13. Very specific:

    Add a reverse-link entry to each affected spec's "Decisions" section (or create the section): - ADR-{NNN}: {title}

    line 84
  14. Very specific:

    When the human moves Status: from Proposed to Accepted:

    line 88
  15. Distinctive:

    If a proposed spec amendment would force an architectural change that contradicts an Accepted ADR:

    line 99
  16. Distinctive:

    Never modify a spec to silently work around an ADR.

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SDD ADR (Architecture Decision Record)

Document technical decisions with context, alternatives, tradeoffs, and a Y-statement summary.

Arguments

$ARGUMENTS — decision title or path to a decision-request.md to resolve.

When to write an ADR

  • The decision constrains future work and is hard to reverse (Bezos one-way door).
  • The decision affects mechanism or architecture, not implementation choice.
  • The decision will outlive any single feature.

If the decision is a two-way door (easy to reverse, low blast radius), skip the ADR — note it in a commit message or spec comment instead. Magpie discipline: ADRs are not for filing every choice.

Process

1. Determine next ADR number

  • Scan context/decisions/ (or spec/decisions/) for existing ADR files
  • Pattern: ADR-{NNN}-{slug}.md
  • Next number = highest existing + 1 (or 001 if none exist)
  • Create the directory if it doesn't exist

2. Gather context

If $ARGUMENTS is a path to decision-request.md:

  • Read it for context, options, and recommendation
  • Pre-fill the ADR from the decision request

If $ARGUMENTS is a title:

  • Ask 2-4 clarifying questions if needed:
    • What problem does this decision solve?
    • What 2-3 alternatives were seriously considered? (If you can only name one, you haven't considered enough.)
    • What constraints / decision drivers apply?
    • Is this a one-way or two-way door?

3. Generate ADR

Use the template at ${CLAUDE_PLUGIN_ROOT}/templates/adr/adr.md. Required elements:

  • Y-statement (top of file): "In the context of {use case}, facing {concern}, we decided for {option} and against {alternatives}, to achieve {quality}, accepting {downside}." This is the executive summary; everything below elaborates.
  • Decision drivers: 3–6 named criteria. The decision must satisfy these.
  • Considered options: at least 2, preferably 3, with one steel-manned alternative the team rejected. If the rejection rationale is "we didn't think of it", the analysis is incomplete.
  • Decision: one paragraph. Plain language. What we commit to and when it takes effect.
  • Consequences: Positive, Negative/Risks, Mitigations.
  • Compliance: constitution articles touched, spec amendments required, migration notes.

Writing style: write the Context, Decision drivers, Considered options, Decision, and Consequences sections in STE-100 controlled language per ${CLAUDE_PLUGIN_ROOT}/rules/ste100-writing.md — active voice, one topic per sentence, one term per concept. The Y-statement keeps its fixed template shape.

4. Frontmatter (machine-readable)

The template's header carries:

  • Status: Proposed | Accepted | Deprecated | Superseded by ADR-NNN
  • Affects specs: array of SPEC-slug values
  • Affects stories: array of STORY-N values
  • Supersedes: ADR-NNN | none
  • Tags: (auth, storage, ...) — used for top-k retrieval into implementer context

Agents drafting an ADR MUST set Status: Proposed. Only humans move to Accepted.

5. Optional adversarial review

If Status: Proposed, optionally invoke sdd-skeptic to challenge:

  • Are the "considered options" steel-manned, or strawmen?
  • Does the Y-statement actually capture the tradeoff, or hide it?
  • Is the "accepted downside" specific enough to be measured, or hand-wavy?
  • Does this contradict an existing accepted ADR?

This counters Zimmermann's Fairy Tale and Sprint anti-patterns.

6. Save and link

  • Save to context/decisions/ADR-{NNN}-{slug}.md
  • If this resolves a decision-request.md, update the Resolution section of that file
  • If spec amendments are needed, note them for /sdd-iterate
  • Append to progress.txt: [{timestamp}] [NOTE] ADR-{NNN}: {title} (Status: Proposed)
  • Add a reverse-link entry to each affected spec's "Decisions" section (or create the section): - [ADR-{NNN}](../decisions/ADR-{NNN}-{slug}.md): {title}

7. Promotion to Accepted

When the human moves Status: from Proposed to Accepted:

  • The PreToolUse hook treats the file as immutable.
  • The ADR is now part of the constraint hierarchy: Constitution > Accepted ADR > Spec > Plan > Story.
  • Implementer agents at task start receive ADR Decision + Consequences via sdd_query_adrs (filtered by affects_specs intersection).

To change an Accepted ADR: write a new ADR with Supersedes: ADR-NNN, then mark the old one Deprecated.

Constraint hierarchy (when ADR and Spec disagree)

ADRs constrain HOW (mechanism). Specs constrain WHAT (behavior).

If a proposed spec amendment would force an architectural change that contradicts an Accepted ADR:

  1. Implementer halts and reports the conflict.
  2. The user must either (a) write a superseding ADR first, then apply the spec amendment, or (b) revise the amendment to comply.
  3. Never modify a spec to silently work around an ADR.

Output contract

  • context/decisions/ADR-{NNN}-{slug}.md created with all sections including Y-statement and Decision Drivers
  • Auto-numbered (no gaps, no conflicts)
  • Status: Proposed for agent-drafted ADRs; only humans promote
  • Reverse-linked from affected spec(s)
  • ≤2 pages of body content (Mega-ADR anti-pattern guard)
  • progress.txt updated

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.