From adrtrail
Enforce a spec-first engineering discipline. Before any non-trivial implementation, lock a spec, then record an Architecture Decision Record (ADR) for every significant choice, and maintain an append-only CLAUDE_LOG of decisions across the session. Use this skill whenever the user starts a new feature, service, or refactor; mentions "spec", "ADR", "architecture decision", "design doc", "decision log", "lock the spec", or "spec-first"; asks how to structure a build before coding; or wants Claude to stop coding-first and instead think, decide, and document before writing code. Trigger even when the user does not explicitly say "ADR" but is clearly about to make an architectural choice that future readers will need explained.
How this skill is triggered — by the user, by Claude, or both
Slash command
/adrtrail:adrtrailThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill installs a working discipline: **decide before you build, and write down why.**
This skill installs a working discipline: decide before you build, and write down why.
The failure mode it prevents is the most common one in AI-assisted engineering — jumping straight to code, accumulating undocumented decisions, and producing a system nobody (including the author six weeks later) can reason about. This skill front-loads the thinking and leaves a durable trail.
There are three artifacts, produced in order:
Apply the full discipline for: new services, new features with non-obvious design, refactors that change a contract or boundary, anything multi-step, and anything where a reasonable engineer would later ask "why was it done this way?"
Skip the heavy machinery for trivial, reversible, single-file changes (a typo fix, a copy tweak, a one-line config). For those, a CLAUDE_LOG line is enough; no spec, no ADR. Judge by reversibility and blast radius, not by line count.
If in doubt, write the ADR. A cheap ADR beats an expensive archaeology session.
Before writing any implementation code, produce a spec and get explicit sign-off. Do not start coding while the spec is still open. The point of locking is that downstream work has a fixed target; a moving spec produces churn.
Use the template at references/spec-template.md. Read it and fill every section. A spec is "locked" only when:
State the lock clearly in the conversation, e.g. "Spec locked. Proceeding to implementation." After lock, scope changes are handled as a new spec revision (bump the version, note what changed), not silent edits — silent scope creep is exactly what this discipline exists to stop.
Whenever the build forces a real choice — a database, a framework, a sync-vs-async boundary, a consistency tradeoff, a build-vs-buy — stop and record it as an ADR before committing to it in code. Use references/adr-template.md.
Number ADRs sequentially and immutably: ADR-0001, ADR-0002, ... Once an ADR has status Accepted, never rewrite its body. If a later decision overturns it, write a NEW ADR with status Accepted and set the old one's status to Superseded by ADR-XXXX. The chain of superseded records IS the architectural history; destroying it destroys the value.
A good ADR is short and honest. The "Consequences" section must include the downsides you are accepting, not just the upsides. An ADR with no listed downside is a red flag that the decision wasn't actually examined.
ADR statuses: Proposed → Accepted → (optionally) Superseded or Deprecated.
The CLAUDE_LOG is an append-only, human-readable ledger of decisions and meaningful actions taken during the session. It is lighter than an ADR: one line per entry, chronological, never edited or reordered. Where ADRs capture architectural decisions in depth, the CLAUDE_LOG captures the sequence — including small calls that don't warrant a full ADR but that a reviewer would want to see.
Append to CLAUDE_LOG.md at the repo root (create it if absent). Use the format in references/claude-log-format.md. One entry per decision/action, newest at the bottom. Never rewrite history; corrections are new lines that reference the earlier one.
Cross-link: when an entry corresponds to an ADR, reference it (-> ADR-0003). When the spec is locked or revised, log that too.
The order is not negotiable and is the whole point: Spec lock → ADR per decision → CLAUDE_LOG throughout. If you find yourself writing code before the spec is locked, stop and lock it. If you find yourself making a choice without an ADR, stop and write the ADR. The discipline only pays off if the order holds.
Default layout in the target repo (create directories as needed):
<repo-root>/
├── CLAUDE_LOG.md # append-only session ledger
└── docs/
├── specs/
│ └── <feature>-spec.md # one per feature, versioned in-file
└── adr/
├── ADR-0001-<slug>.md
├── ADR-0002-<slug>.md
└── ...
If the repo already has an established docs convention, follow it instead of imposing this one — match the house style, but keep the three-artifact discipline.
references/spec-template.md — the spec template to fill before coding.references/adr-template.md — the ADR template (one per decision).references/claude-log-format.md — CLAUDE_LOG entry format and rules.references/examples.md — a worked example: a small feature taken from spec → two ADRs → log entries, so you can see what "good" looks like.Read the relevant template before producing each artifact rather than reconstructing it from memory — the templates carry the exact section ordering reviewers expect.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
npx claudepluginhub havascxistanbul/adrtrail --plugin adrtrail