/adr-tools:adr-searchfrom adr-tools
Find the past decisions (ADRs) that apply to a task and say which of them are still in force, using `adr search` and `adr refs` instead of reading the generated indexes. Use it when asked to find related ADRs or past decisions, and before designing or implementing something that earlier decisions may constrain. Trigger when the user says: "related ADRs", "past decisions", "is this decided already", "which ADR applies", "find the ADR", "関連 ADR", "過去の決定", "過去の判断", "ADR を探して", "決まっていることはある", or similar phrases.
Ships in adr-tools. 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.
None: SKILL.md is the whole skill.
Answer one question: which past decisions apply here, and which of them are still in
force? The repo's ADRs are Markdown files with YAML frontmatter, checked by the adr
CLI from @kompiro/adr-tools.
The report classifies every ADR it mentions as exactly one of:
| Class | Means |
|---|---|
| in force | status: accepted, not superseded, and no newer ADR changes part of its decision |
| in force, partly revised | as above, but a newer ADR changes part of its decision. Name that ADR and the part |
| superseded | status: superseded. Name the ADR at the end of its superseded_by chain, and classify that ADR by its own status |
| no longer in force | status: deprecated or not_adopted. A not_adopted ADR is still worth citing: it records an option that was rejected and why |
| proposed | status: proposed. Not decided yet |
| unresolved | what exists cannot settle the class, as when a newer revision's chain ends at a missing ADR. Say what is missing |
and these hold:
search prints
superseded→ADR-99(deprecated)), say that no ADR in the chain is in force. When it
ends at a missing ADR ((not found)), the class is unresolved: name the missing id.adr refs marks ← NEWER has been
checked.adr.config.json names generated files under paths.outputs, written by adr regenerate
into paths.adrDir (adr init names them effective.md, graph.md and graph/). Do not
open them. They are large, they cannot show a partial revision, and everything this skill
needs comes back from adr search and adr refs with the status already attached.
search and refs arrived in adr-tools v0.0.14. Try these in order and use the first
for which <cli> search --help succeeds:
pnpm adr). The host decides the
flags; do not build your own.pnpm exec adr, or npx --no-install adr, when @kompiro/adr-tools is a dependency.
Never a bare npx adr: when the dependency is not installed, npx downloads and runs
an unrelated npm package named adr.adr on PATH (the standalone binary).A host may pin an older version as a dependency while a newer binary is on PATH; the
newer one is fine for these read-only lookups. If none has search, use the fallback at
the end of this file and suggest upgrading.
Both commands read paths.adrDir and idFormat from adr.config.json. Pass
--dir=<path> only when the ADRs live somewhere the config does not name.
Write down the terms before searching:
icon mode may say アイコンモード in one place and
icon mode in anotherThree to six terms are usually enough. Terms that differ only in case count once.
Quote a term that has a space in it ("icon mode"); unquoted, the shell splits it into
icon and mode, and mode alone matches far too much.
adr search <term> [<term> ...] # e.g. adr search "icon mode" アイコンモード removal
One line per ADR, best match first:
1 ADR-2376 superseded→ADR-2906 2026-09-04 <title> [icon mode(15) removal(10)]
2 ADR-2906 accepted 2026-09-26 <title> [icon mode*(8) removal(4)]
superseded_by chain;
the last step carries its status when it is not accepted
(superseded→ADR-99(not found)).* marks a term found in the title or filename. The number counts matching body lines.1 with no ADR matched: ... on stderr means nothing matched. It is an
answer, not a failure: try the synonyms from step 1 before reporting that nothing
matched. Exit status 1 with any other message (a missing or invalid
adr.config.json, a missing ADR directory) is a failed lookup: report the error, not
an empty result.-n <N> until it prints fewer. --format=json
is there for programs; the text is shorter to read.Pick the candidates from the titles. Skip an ADR whose only hits are a passing mention.
For each candidate you keep, read the section that states its decision before you say what
it requires. Do not depend on the heading text: the reference template calls it
## Decision, but a host may use another heading or another language (check the host's
TEMPLATE.md in the ADR directory if one exists). Read the rejected alternatives too when
the ADR has them; they feed the second list in step 4. search and refs return
metadata, not the decision.
adr refs <id> [<id> ...]
For each ADR this prints its superseded_by chain, the ADRs whose relationship fields
point at it (referenced by:, labelled with the field), and the ADRs that mention it only
in the body (mentioned only in body:). Ids may be written ADR-38, adr-38 or 38.
Apply one rule to every ADR you would cite, the candidates first. Keep a list of the ADRs already checked, so that each is checked once and a cycle ends:
(not found)) leaves
the class unresolved.← NEWER entry's decision (step 2 says how to find it). Each newer ADR
is judged by what is in force now:
proposed is a pending change, not_adopted a rejected one and deprecated a
withdrawn one: name it in the report, and it leaves the class as it is.supersedes
(report it as superseding in substance, and say the frontmatter does not record it),
or builds on it without changing it (no effect on the class).adr refs: a still
newer ADR may revise it without naming the original.Stop when every ADR you would cite has had its ← NEWER entries read. In the report, name
for each changed part the latest in-force ADR that changes it, not the first revision you
met.
← NEWER) cannot revise the candidate. Read them only if they
explain why the candidate exists.adr validate reports errors, an ADR whose frontmatter
does not parse is missing from the results. Say so in the report.Start with a table:
| ADR | Status | Class | Why it applies | Newer ADRs checked |
|---|---|---|---|---|
| ADR-2906 | accepted | in force | ADR-2996 (no change) | |
| ADR-2376 | superseded | superseded → ADR-2906 | n/a |
Then two lists:
not_adopted, or a
rejected-alternatives section). Overriding one means a new ADR that records why, not a
silent change.If nothing matched, write that, and list the terms tried in step 1.
Still do not read the generated outputs. Instead:
In every grep below, leave out the generated outputs (paths.outputs) and the
non-ADR files in the directory (README.md, TEMPLATE.md): they mention many ids and
carry no ADR frontmatter.
grep -rilF -- '<term>' under paths.adrDir (adr init uses docs/adr), and also
match each term against the filenames there (ls <dir> | grep -iF -- '<term>'): a
filename such as 38-mtls.md may carry a term the body never spells out. -F keeps
a term like cache[0] literal, as adr search does.status, superseded_by, and the
relationship fields (supersedes, depends_on, related_to, conflicts_with,
refines).grep -rlwF -- '<id>' under the ADR directory
(-w keeps ADR-38 from matching ADR-380). A hit is newer when its date is
later, or when the dates are equal and its id sorts after the candidate's, as
adr refs decides.Then read the decision of each candidate you keep (step 2 above), classify and report as above, and say that the lookup used the fallback.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
adr-tools@kompiro-hane is listed by kompiro/hane — review the source before installing
npx claudepluginhub kompiro/hane --plugin adr-tools