agentleFS
patrick-xinpatrick-xin/tonex/.claude/skills/adr/SKILL.md

adr

Skill1 starsChanged 6 months agoApache-2.0View on GitHub

Author, amend, cite, and audit Architecture Decision Records in tonex, plus the citation/anchor guard behind `pnpm check:adr`. Use when writing or changing an ADR, citing one from code, when `pnpm check:adr` fails, or auditing the ADR set during a sweep.

105 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use fdr, adr-review and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • thiagofgfSkill

    fdr

    Use when creating, changing, reviewing, retiring, auditing, or backfilling implemented user-visible feature behavior, permissions, feature-specific rationale, tradeoffs, or relationships to architectural decisions.

    Also in 3 projects that use this

  • zgagnonSkill

    adr-review

    Use when reviewing code for Architecture Decision Record (ADR) compliance during refactoring or code review - checks code against all project ADRs and reports violations with specific fixes

    Also in 3 projects that use this

  • AnthropicSkill

    runbook

    Create or update an operational runbook for a recurring task or procedure. Use when documenting a task that on-call or ops needs to run repeatably, turning tribal knowledge into exact step-by-step commands, adding troubleshooting and rollback steps to an existing procedure, or writing escalation paths for when things go wrong.

    Also in 5 projects that use this

  • montymiSkill

    tech-spec

    Parse and review Technical Specification documents for completeness, consistency, and implementation readiness

    Also in 4 projects that use this

  • JkudjoSkill

    incident

    Production incident response — structured triage, hypothesis tree, safe remediation, incident record

    Also in 5 projects that use this

  • dedeneSkill

    untangle-codebase

    Audit or refactor a codebase or subsystem to reduce hidden coupling, scattered business rules, and unnecessary abstractions while preserving behavior and framework conventions. Use when asked to untangle, de-spaghetti, or reduce coupling in a codebase; when code is tangled or hard to change, tech debt has piled up, or one change needs edits in many places; or for an architecture cleanup or broad structural refactor. Not for incidental cleanup during an unrelated feature or a defect-only diff review.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 87 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run pnpm check:adr first — clear everything it flags (a footer-less new ADR, a fold-orphaned citation, a breadcrumb deleted from a code …

    line 25

“Common” is measured: kept by at least 6 in 10 of the 87 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

ADRs

ADRs record decisions and the road not taken, not implementation. The doctrine is ADR-0034 Part B (commitments c.6–c.11); this skill is how to live within it. The deterministic half is bundled here as scripts/check-adr-citations.mjs, run via pnpm check:adr — wired into lint-staged (every staged .ts/.tsx/.md) and CI, so a dangling citation or a missing code anchor fails the build. Run it and fix what it names; don't hand-write one-off ADR checks.

Writing or amending an ADR

  1. Decision + why + road-not-taken, not a spec mirror (c.6). Strip file paths, signatures, schema versions, test references, slice-plans — code is the truth-source, prose rots against it. Keep a code block only when it names the exact contract surface the decision changes (a relaxed tsconfig flag, an added union case).
  2. Lead with current truth (c.7). The body states the decision as it stands; fold decision-bearing amendments inline and keep a compact Amendment anchors ledger so every cited date still resolves in one hop. Pure spec-drift amendments drop to the code/tests that carry them.
  3. No command-falsifiable results in the prose (c.9). The litmus: could a command prove a sentence false with no re-decision? If yes it's a result — it belongs to the code or test the ADR cites. A decision's shape (a chosen type, a field name) stays; its measured behavior (config/constant values, error counts, "passes strict") leaves. Cite the test or name the symbol that carries the live truth.
  4. Declare a Code anchors: footer (c.11) — backtick file path(s), each carrying an ADR-N breadcrumb at the code site, or none — <reason> if the decision has no single code home. This is what lets an agent standing on the code hop back to the decision in one step.
  5. Citations are an API (c.8). Never renumber or drop a cited commitment (c.M), amendment date, or ADR number — supersede with a redirect stub, don't orphan.
  6. Run pnpm check:adr — green proves the fold orphaned no citation and the footer resolves.

A net-new ADR is written straight to its layer's adr/ dir (system-wide docs/adr/, engine packages/core/docs/adr/, web apps/www/docs/adr/); a refinement is an append-amendment folded per step 2. Never renumber an ADR (ADR-0011 §5) — the number is the cross-layer join key.

Auditing the ADR set (periodic / during sweep)

Run pnpm check:adr first — clear everything it flags (a footer-less new ADR, a fold-orphaned citation, a breadcrumb deleted from a code anchor). Then, per ADR by hand:

  1. Still load-bearing? — constrains runtime behavior, code structure, or a contract surface → keep.
  2. Constrains nothing? — binds no behavior, structure, or contract → archive, don't delete: move to _archive/, relocate live vocabulary to the layer glossary.md, never renumber.
  3. Holds a command-falsifiable result? — apply the c.9 litmus above; strip the result back to decision + why, then re-run pnpm check:adr — the Code anchors: footer must survive the trim.

Surface anything ambiguous (an ADR whose load-bearingness is unclear) rather than archiving it.

What the guard checks

scripts/check-adr-citations.mjs (bundled here) indexes every ADR under docs/packages/apps, then resolves both directions: forward (c.8) — each ADR-N c.M / amendment <date> cited in code or docs points to a live anchor (the ADR exists, the commitment number is declared, the date still appears); backward (c.11) — each active ADR's Code anchors: paths exist and carry the ADR-N breadcrumb. Known limits: ranges (c.6–c.10) validate only the first endpoint; §N / Part X only assert the ADR exists.

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.