/trails-dev:trails-adrsfrom trails-dev
Authors, updates, and manages Trails ADRs. Creates new ADRs, promotes drafts, updates the index, renames/renumbers records, and references the decision graph.
Ships in trails-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
ADRs document the significant design decisions behind Trails — choices that, if reversed, would produce a different framework.
These are from the Trails tenets (docs/tenets.md). Every ADR must be consistent with them. When writing or reviewing an ADR, use these as the evaluation lens:
When an ADR proposes something new, test it against these. Does it reinforce the primitives or add to the concept count? Does it derive from what's already authored or require new authoring? Does it make drift harder or easier?
Read related ADRs before drafting. Use docs/adr/decision-map.json or browse docs/adr/ and docs/adr/drafts/ to find ADRs that touch similar concerns. Good ADRs build on the existing decision graph — they reference specific sections of prior ADRs, link to their headings, and explain how the new decision compounds with or extends what's already decided.
For drafting, voice, prose craft, and document maintenance, load the singular trails-editorial workflow.
When your ADR relates to an existing one:
[ADR-000: The information architecture](000-core-premise.md#the-information-architecture))All ADR operations go through scripts/adr.ts (adjacent to this skill):
Destructive commands preview by default. Pass --yes to apply changes.
# Create a new draft (applies immediately — non-destructive)
bun scripts/adr.ts create --title "Reactive Trail Activation"
# Preview a promote, then apply
bun scripts/adr.ts promote events-runtime
bun scripts/adr.ts promote events-runtime --yes
# Update title, slug, status, or number
bun scripts/adr.ts update core-premise --title "Core Premise — Contract-First Design"
bun scripts/adr.ts update 013 --renumber 0013
bun scripts/adr.ts update events-runtime --slug events-runtime-v2
bun scripts/adr.ts update events-runtime --status proposed --yes
# Demote a numbered ADR back to drafts
bun scripts/adr.ts demote 0014 --yes
# Auto-fix common issues (number padding NNN→NNNN, cross-refs)
bun scripts/adr.ts fix
bun scripts/adr.ts fix --yes
# Validate format and consistency
bun scripts/adr.ts check
# Regenerate decision maps and draft index
bun scripts/adr.ts map
The script handles file creation, git moves, title/slug/number updates, index rebuilding, decision map generation for numbered and draft ADRs, and cross-reference updates.
For manual ADR management without the script, see assets/adr-management.md.
#ADR-NNNN unless in draft status, which omits the numberTopic — Explanation structure. The em dash subtitle is a fallback for when a short title genuinely can't stand alone, not the default patternExamples:
docs/adr/NNNN-slug.mddocs/adr/drafts/YYYYMMDD-slug.mddocs/adr/README.mddocs/adr/decision-map.jsondocs/adr/drafts/decision-map.jsondocs/tenets.md — the governing design principles. ADRs must be consistent with the tenets.| Status | Location | Numbered | Meaning |
|---|---|---|---|
draft | docs/adr/drafts/ | No | Decision proposed, open for discussion |
proposed | docs/adr/ | Yes | Decision refined, ready for review |
accepted | docs/adr/ | Yes | Decision approved, guides implementation |
rejected | docs/adr/ | Yes | Decision considered and declined (reasoning preserved) |
superseded | docs/adr/ | Yes | Replaced by a later ADR (link to successor) |
---
status: draft # draft, proposed, accepted, rejected, superseded
created: YYYY-MM-DD
updated: YYYY-MM-DD
owners: ['[galligan](https://github.com/galligan)'] # array of owners with GitHub details
# depends_on: [9, events-runtime] # accepted ADR numbers or draft slugs
---
depends_on accepts accepted ADR numbers (integers) and draft slugs (the filename without date prefix and .md). Use integers for accepted ADRs, slugs for drafts. The decision map renders these as graph edges.
<adr_template>
# ADR: { Descriptive sentence-case title }
## Context
<!-- what problem or tension prompted the decision -->
## Decision
<!-- what we chose and why, with concrete code examples -->
## Consequences
<!-- what this enables, what it constrains, what it leaves open -->
## References
<!-- links to related ADRs, internal documentation, and external resources -->
</adr_template>
<adr_template_detailed>
# ADR: { Descriptive sentence-case title }
## Context
## Decision
{ Prose that provides a narrative for the decision }
### { Sections providing logical groupings of detail }
- { Details listed out as list items }[^1]
- { Sublist items should be used for expressing additional detail }[^named-footnote]
## Non-goals
<!-- what the ADR is *NOT* trying to solve (optional, but recommended) -->
## Consequences
### Positive
<!-- what this enables (required) -->
### Tradeoffs
<!-- known costs/considerations you accept (required) -->
### Risks
<!-- uncertain outcomes you're watching, with mitigation (optional, omit if all downsides are known tradeoffs) -->
## Non-decisions
<!-- explicitly deferred decisions (optional, but recommended; different than non-goals) -->
## References
[^1]: A footnote [link alias](link)
[^named-footnote]: A named footnote with a consistent slug
</adr_template_detailed>
For accepted ADRs:
- [ADR-NNNN: Title](NNNN-slug.md) — one-line relationship
For draft ADRs:
- ADR: Title (draft) — one-line relationship
For docs:
- [Doc title](../path.md) — one-line description
Synthesized from ADR-000 (Core Premise) and ADR-001 (Naming Conventions).
### subsections named descriptively: "Where this came from", "The missing inner loop" — not "Background", "Problem", "Motivation."[^1]) rather than inline links that clutter the sentence[see Decision](#decision-subsection) rather than "as described in the Decision section above." Headings must be unique within a document to make this work### 1., ### 2. etc. — it breaks markdown anchor links and makes reordering painful. Use descriptive heading text aloneUse the accepted project vocabulary consistently: trail (not action/handler), topo (not registry), compose (not follow or cross), implementation (not handler/impl), surface (not transport), and tracing (not crumbs or tracker). Write current ADRs in current terms, preserve retired terms only in explicitly historical release, migration, or decision evidence, and use trails-editorial for prose craft.
Read docs/tenets.md before writing. Every ADR must be consistent with the tenets.
Read your draft aloud. If it sounds like a corporate design document, rewrite it. If it sounds like a blog post, tighten it. The target: the precision of a spec with the readability of a well-written README. Someone who knows the domain deeply explaining their reasoning to someone who will have to live with the consequences.
LICENSE.txt (opens in a new tab)assets/adr-management.md (opens in a new tab)scripts/__tests__/promote-rewrite.test.ts (opens in a new tab)scripts/adr.ts (opens in a new tab)scripts/lib/cli.ts (opens in a new tab)scripts/lib/decision-map.ts (opens in a new tab)scripts/lib/discovery.ts (opens in a new tab)scripts/lib/frontmatter.ts (opens in a new tab)scripts/lib/git.ts (opens in a new tab)scripts/lib/index.ts (opens in a new tab)scripts/lib/paths.ts (opens in a new tab)scripts/lib/references.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
14 skills in this plugin
/building-trailsThe working-on-Trails doctrine digest — what governs the framework, the decision tools for framework work, and where truth lives. Use at the start of any session that changes Trails itself (framework code, docs, vocabulary, governance), when orienting a new agent or persona, or when deciding which governing source answers a question. Not for building apps with Trails; the trails skill covers consuming the framework./regrade-loopRun a Trails Regrade migration loop with dry-run discovery, occurrence judgment, safe apply, verification, ledger capture, and per-cycle resume./tenetsTrails framework design tenets — the foundational beliefs, promises, primitives, and patterns that govern the framework. Use when evaluating architectural decisions, reviewing feature proposals, checking alignment with framework principles, or when tenets, principles, or design philosophy are mentioned./trails-derive-from-sourceUse when a Trails change derives framework facts, derived views, rule data, or surface metadata. Helps agents find authoritative owner exports and avoid shadow registries, duplicated maps, and canonical-source indirection./trails-discriminate-unionCompatibility entry for older public-union review prompts. Use Trails Warden's public-output discriminant rule and the building-trails owner-first workflow./trails-dogfood-checkUse when reviewing Trails-owned framework code for Result-shaped failures, resource and cwd boundaries, app loading, and documented host construction exceptions.npx claudepluginhub outfitter-dev/trails --plugin trails-dev