agentleFS
jpablodrexlerjpablodrexler/backlog-kit/skills/decision-record/SKILL.md

decision-record

Skill3 starsChanged 19 days agoMITView on GitHub

Records a lightweight Architecture Decision Record (ADR) in the project's decisions folder whenever a real architectural or technical decision is made — a pattern chosen over an alternative, a library rejected, a constraint discovered the hard way (e.g. "Library X rejected — its licence changed to a paid one"). Gives each decision its own durable, numbered, append-only record instead of a footnote buried in CLAUDE.md or docs/*.md. TRIGGER when asked to record/log a decision, write an ADR, or capture "why did we do X" context. Also TRIGGER proactively, right after making or reversing a non-obvious architectural choice during a feature or fix — before the reasoning is lost. Does not replace docs/*.md reference material (see "Relationship to reference docs").

  • Commits and pushes

12 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not every implementation choice needs a record.

    line 39
  2. Distinctive:

    If the user's request doesn't make clear what was rejected or why, ask one clarifying question before drafting rather than inventing a …

    line 47
  3. Very specific:

    Read every file in <decisions>/ (and its README.md index, if present).

    line 53
  4. Distinctive:

    If the user's description reverses or replaces a decision already recorded (e.g.

    line 138
  5. Very specific:

    Records are append-only: Never rewrite or delete an existing record's Context/Decision/Alternatives/Consequences — only a Status line …

    line 179
  6. Distinctive:

    Not every choice is decision-worthy: Don't create a record for a routine implementation detail with no rejected alternative — see step 1.

    line 182
  7. Distinctive:

    When in doubt, ask rather than pad the log.

    line 184

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “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

Record a short, numbered Architecture Decision Record (ADR) under <decisions>/, capturing a real decision, the alternatives it rejected, and its consequences — not a description of what the code does.

<decisions> is docs/decisions: the decisions folder next to the backlog folder (so JPPhotoManagerWeb/docs/decisions when .backlog-kit.toml sets [paths] backlog_dir = "JPPhotoManagerWeb/docs/backlog").

Input: A description of the decision (what was decided, and ideally what alternative(s) were considered and why they lost). As much or as little detail as the user gives; ask a clarifying question only if there's no rejected alternative or no discoverable reason at all to work from (see step 1).


Steps

1. Confirm this is actually decision-worthy

Not every implementation choice needs a record. A good heuristic: would a future engineer or agent plausibly ask "why not X instead?" about this? If yes — record it. If it's just "how Y was implemented" with no real fork in the road (no alternative seriously considered, no non-obvious constraint that forced the outcome), it belongs in a code comment or the relevant docs/*.md file, not an ADR — say so and skip rather than padding <decisions>/ with routine choices.

If the user's request doesn't make clear what was rejected or why, ask one clarifying question before drafting rather than inventing a plausible- sounding alternative.

2. Read the existing records and determine the next number

Read every file in <decisions>/ (and its README.md index, if present). If the directory or index doesn't exist yet, this is the first record — create <decisions>/README.md with this skeleton before continuing:

# Architecture Decision Records

Numbered, append-only records of non-obvious technical decisions for
this project — what was decided, what alternatives were rejected and
why, and what it costs going forward. This is a decision *history*, not
current-state reference material (that's the reference docs under
`docs/`); a decision recorded here stays as-written even
after a later record supersedes it.

## Index

| # | Title | Status | Date |
| - | ----- | ------ | ---- |

Run python3 .claude/skills/decision-record/scripts/next_id.py <repo-root> — it scans existing filenames for the NNNN- prefix (4-digit, zero-padded), takes the highest number found, and returns max + 1 (or 0001 if none exist yet). Numbers are a single sequence and are never reused, even for a decision later superseded or reversed.

3. Derive a short kebab-case title slug

Short, descriptive, no filler words — e.g. reject-library-x-licensing, no-environment-split. This becomes <decisions>/NNNN-title-slug.md.

4. Draft the record

# NNNN. <Title, a plain declarative sentence>

**Date:** <YYYY-MM-DD>
**Status:** Accepted

## Context

<The problem or question that forced a decision — 2-4 sentences. What was
about to go wrong, or what genuinely had more than one reasonable answer?>

## Decision

<What was decided, stated plainly — one or two sentences, not a summary of
the whole discussion.>

## Alternatives considered

- **<Alternative A>** — <why it was rejected>
- **<Alternative B>** — <why it was rejected>

## Consequences

- <What this makes easier, or what it protects against>
- <What this makes harder, or what future work needs to watch for>

Reuse whatever technical detail the user already gave; fill gaps with reasonable, clearly-inferable detail consistent with the actual code/repo state — don't invent an alternative that wasn't genuinely considered just to fill the template.

5. Confirm with the user before writing

Display the fully drafted record and use the AskUserQuestion tool with a single question — "Record this decision?" — options: "Yes, record it as drafted", "Let me edit something first" (resolve free-text edits and re-display before writing), "Cancel". Do not write anything until the user confirms.

6. Write the record and update the index

  1. Write <decisions>/NNNN-title-slug.md.
  2. Append a row to the ## Index table in <decisions>/README.md: | NNNN | <Title> | Accepted | <YYYY-MM-DD> |.

7. If this decision supersedes an earlier one

If the user's description reverses or replaces a decision already recorded (e.g. re-evaluating a past rejection), find that earlier record and change only its Status: line to Superseded by NNNN (using the new record's number). Never edit or delete its Context/Decision/Alternatives/ Consequences sections — the record of what was believed and decided at the time stays intact; only its current standing changes. Update its row in the index table's Status column to match.

8. Display confirmation

## Decision Recorded

**#NNNN** `<decisions>/NNNN-title-slug.md` — <Title>
[If superseding:] Marked **#MMMM** as superseded by this record.

If this decision changes what CLAUDE.md/docs/*.md should currently say
about the topic, sync those files separately — this skill only records
*why* the decision was made, not the current-state narrative.

Relationship to reference docs

<decisions>/ is out of scope for the reference docs under docs/*.md — it's append-only decision history, not current-state reference material those files are kept synced against the code. The two complement each other but never overlap:

  • This skill captures why a decision was made, once, at the time it was made. It never edits CLAUDE.md/docs/*.md.
  • The reference docs (for example docs/architecture.md) keep the current-state narrative accurate against the code as it exists today. If recording a new decision means that narrative needs updating, this skill says so in step 8's confirmation but doesn't do it — update those files separately.

Guardrails

  • Records are append-only. Never rewrite or delete an existing record's Context/Decision/Alternatives/Consequences — only a Status line changes, and only per step 7.
  • Not every choice is decision-worthy. Don't create a record for a routine implementation detail with no rejected alternative — see step 1. When in doubt, ask rather than pad the log.
  • Never touch CLAUDE.md/docs/*.md directly. If a decision affects what those files should currently say, update them separately — don't edit them from this skill.
  • Never write anything before the user confirms the draft in step 5.
  • Never assign a record number that already exists — numbers are a single global sequence, scanned fresh from <decisions>/ each run, never reused even for a later-superseded decision.
  • Preserve the exact Markdown table formatting of the ## Index table when appending a row.
  • Never run git commit, git push or open a PR.

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.