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.

35 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use coverage, observability and 10 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.
  • PydanticSkill

    coverage

    Fetch coverage diff from Codecov for the current branch or a specific PR. Shows uncovered lines, patch coverage, and overall coverage change.

    Also in 3 projects that use this

  • OpenAISkill

    observability

    Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.

    Also in 5 projects that use this

  • SentrySkill

    agents-md

    This skill should be used when the user asks to "create AGENTS.md", "update AGENTS.md", "maintain agent docs", "set up CLAUDE.md", or needs to keep agent instructions concise. Guides discovery of local skills and enforces minimal documentation style.

    Also in 3 projects that use this

  • MongoDBSkill

    jira

    Use this skill for any Jira operation in the DOCSP project — creating, viewing, searching, updating, transitioning, commenting on, or linking tickets. Also handles follow-up ticket creation to manage scope creep. TRIGGER when: user mentions a DOCSP-XXXXX ticket number or any Jira ticket URL; user asks to view, open, check, update, transition, close, comment on, link, or search tickets; user references \"the ticket\", \"the Jira\", or \"open a ticket\". SKIP: GitHub issues; non-Jira platforms; questions unrelated to ticket operations.

    Also in 4 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 6 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 5 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 31 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 31 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.