agentleFS
b310-digitalb310-digital/speculatius/skills/spec-decision/SKILL.md

spec-decision

Skill3 starsChanged 9 days agoMITView on GitHub

Record one hard-to-reverse technical decision as an append-only record in docs/decisions/NNNN-title.md, or supersede an existing one. Use when the user makes or asks about an architecture, dependency, interface or non-functional decision, wants an ADR, or wants to reverse an earlier decision.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No for: reversible choices.

    line 13
  2. Very specific:

    Create docs/decisions/ if missing.

    line 17
  3. Very specific:

    Update docs/architecture.md if the decision changes current structure, linking to the record.

    line 21
  4. Distinctive:

    Never rewrite an existing record's content.

    line 25
  5. Distinctive:

    Write a new record whose Context names the old one and why it no longer applies.

    line 27
  6. Very specific:

    Update docs/architecture.md to the new current state, if the file exists.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

spec-decision

Decision records say why the system is built as it is, including what was rejected. Agents read the current files and skip git log. When the rejected alternatives stay in the text, agents stop proposing them again.

Is a record needed?

Yes for: structure, dependencies, interfaces, data storage, non-functional characteristics, anything expensive to undo. No for: reversible choices. Decide and move on. Say so to the user instead of writing a record.

New record

  1. Create docs/decisions/ if missing. Next number: highest NNNN in docs/decisions/ + 1 (0001 for the first), zero-padded to four digits. Title in kebab-case: 0008-use-event-store.md.
  2. Fill template.md from this folder. If spec-write --explore left an exploration summary for this decision (.speculatius/*-exploration-*.md), take the alternatives and their reasons from it. One decision, one page (~60 lines) maximum.
  3. Alternatives considered: at least one, each with the concrete reason it lost.
  4. Consequences: good and bad. A record with only good consequences is incomplete.
  5. Update docs/architecture.md if the decision changes current structure, linking to the record. If the file is missing, do not create it; spec-init does that.

Reversing a decision

Never rewrite an existing record's content. Instead:

  1. Write a new record whose Context names the old one and why it no longer applies.
  2. In the old record change only the status line: Status: Superseded by [0012](0012-title.md).
  3. Update docs/architecture.md to the new current state, if the file exists.

Allowed edits to an existing record: status, superseded-by links, typos. spec-check and the plan review of spec-write flag other edits.

Reading

docs/architecture.md comes first. Read superseded records only when the decision is being revisited.

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.