/arch:to-adrfrom Agentic Architecture
Record one architecture decision as an ADR. Read the system, check that the decision is architecturally significant and that each part of it has the condition it needs, ask what is open in rounds with recommendations, and write docs/adr/NNNN-slug.md with Compliance pointing to a fitness function or a gap task. Closes the decision task it answers.
Ships in Agentic Architecture. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turn one architecture decision into an ADR: the forces at play, each part of the decision with the condition it needs, the options, the decision and its why, the consequences, and the fitness function that checks it. You propose: you read, recommend and ask; the user decides, and every question comes with your recommendation.
The input is what the user wrote with the command: the decision in quotes ("per-task ceiling and loop circuit breaker"), a path to a project, or nothing. With a path or nothing, work from that project or the current repository, and pick the decision in step 2.
Read references/vocabulary.md before you start: use its terms with its meanings. Do not mention the source book in generated files.
Write every file, task and question in the user's language, template headings included, following references/language.md.
Templates for the files you write:
Fixed sentences in this skill (the Next: lines, the title of the gap task) are written here in
the plugin's language: translate each into the user's language, and keep commands and file names
as they are.
One decision per run. Another decision is another run of this skill.
docs/agents/architecture.md. It gives the tracker (github or local), the layout and
the artifact locations.docs/architecture/<quantum>/ for brief, characteristics, risk and its
README.md; ADRs stay in docs/adr/ and tasks in the tracker. Every docs/architecture/ path
below then means that folder, and the index row of the ADRs links to ../../adr/.docs/agents/architecture.md, the setup has not run. Use the defaults:
ADRs at docs/adr/, dossier index at
docs/architecture/README.md, tasks as local files in .scratch/architecture/issues/. Do not
ask about the tracker. Tell the user in one line, and suggest /arch:setup-architecture (Claude
Code) or $arch:setup-architecture (Codex) for later. Then go on.docs/adr/: number, title and status. You need them to number the new one, to
find an ADR on the same subject, and to supersede it.docs/architecture/brief.md) and the characteristics
(docs/architecture/characteristics.md), or the locations the setup gives, if they exist: their
Open Decisions, Targets and fitness functions are settled, do not ask them again.docs/architecture/risk.md, or the location the setup gives), if it
exists: its scores and mitigations are evidence, do not ask them again.decision, gap and high-risk tasks in the tracker. A gap or high-risk
task whose body has a Next: /arch:to-adr "..." line is a request for an ADR. The line is
translated in the user's language (for example Próximo: /arch:to-adr "..."): match it by the command, not by the word before it.
gh issue list --label decision --state open,
gh issue list --label gap --state open and gh issue list --label high-risk --state open..scratch/architecture/issues/ with a Labels: decision,
Labels: gap or Labels: high-risk line and a Status: open line.pom.xml, build.gradle, package.json, ...), configuration (application.properties,
application.yaml, environment files), tests, and the code where the decision lives. For a
decision about cost: where the model is called, how agents are composed, the token limits, the
retries, and every loop. For a decision about resilience: every call over the network with its
timeout, retries and fallback, how the work runs (in the request, through an emitter, through a
queue), the state kept between requests, and the effectful actions. Treat what they show as
answered, and say where you saw it.Show the user, in a few lines, what you read and what you did not find. Done when you know where each file goes and what is already answered.
decision tasks, gap and high-risk tasks with a
Next: /arch:to-adr "..." line in any language (matched by the command, as in step 1), and the
Open Decisions of the brief. Recommend one, with its
reason in one line, and ask in one round. With no candidate, ask the user for the decision in
one line.Done when there is one decision to record.
proposed, recommend completing that file
instead of writing a new one; when it is accepted, recommend a new ADR that supersedes it.Done when the decision is significant (or the user insisted) and you know whether it is a new ADR,
the completion of a proposed one, or a new ADR that supersedes an accepted one.
not now, recorded with the
condition that reopens it. Do not invent what the code does not show: no loop in the code means
no loop for the loop circuit breaker to stop.Done when every part has its condition, met or not, with the evidence.
not now for each part without its condition.proposed, and the
decision task stays open (or is opened, in step 7) with what is missing to decide.Done when the decision and each part of it are settled, or the user left the decision open.
gap task titled "Fitness function for ADR NNNN: "
(translated), whose body says what the check must confirm and links the ADR.
Done when the ADR has its Consequences, with at least one thing that gets worse, and a Compliance
with a path or a gap task.
Show the user the ADR as a draft, with the tasks you will close, update and open. Write only after the user confirms or corrects it.
ADR: get the number by running the script that ships in this skill's folder (the folder
that holds this SKILL.md), from the project root, with the ADR folder as the argument:
java <this skill's folder>/scripts/NextAdrNumber.java docs/adr
(In Claude Code, this skill's folder is ${CLAUDE_SKILL_DIR}. Requires Java 11 or later.)
It prints the next free number (0001 in a repository without ADRs). When you complete a
proposed ADR, keep its number and file. Write docs/adr/<number>-<slug>.md from the ADR
template, where slug is the title already translated, in kebab-case. In Context, each part of
the decision with its condition and the options; in Decision, the decision with its why, and
each part that is not now with the condition that reopens it. Status is accepted when the
user confirmed the decision, otherwise proposed. not now is never a status.
Superseding: when the new ADR supersedes an accepted one, change only the Status line of
the old ADR, to superseded by ADR-<new number>, and link the old ADR in the Notes of the new
one. No other line of an accepted ADR is ever edited.
Tasks (a Next: /arch:to-adr "..." line below is matched in any language, by the command,
as in step 1):
decision task the ADR answers, when the ADR is accepted. GitHub tracker:
gh issue close <number> --comment "<link to the ADR>". Local tracker: change its line to
Status: closed and add a line with the path of the ADR; never delete the task file. With the
decision in the input, the task the ADR answers is the open decision task whose
Next: /arch:to-adr "..." line holds the same decision, matched by the subject and not by the exact text.gap task that asked for this ADR with a Next: /arch:to-adr line stays open and becomes
the gap task of Compliance, when there is no fitness function: the subject is the same, now
checked against the ADR. Never close it and open another task for the same check. Update its
body with what the check must confirm and the link to the ADR, without the Next: line:
GitHub tracker, gh issue edit <number> --body "<what the check must confirm, and a link to the ADR>";
local tracker, the body of the file, keeping its # title, Labels: and Status: open
lines. When Compliance points to a fitness function, close it the same way as the decision
task. When the ADR stays proposed, leave it as it is. It is matched like the decision
task: by the subject of its Next: /arch:to-adr "..." line.high-risk task, keep the high-risk task open: the risk falls when the mitigation
reaches the code, and to-risk closes it then. Add the link to the ADR to it: a comment on
GitHub (gh issue comment <number> --body "<link to the ADR>"), a line with the path of the
ADR in the local file. With the decision in the input, the task the ADR answers is the open
high-risk task whose Next: /arch:to-adr "..." line holds the same decision, matched by the
subject and not by the exact text (the user types it in their own words). With no task that
matches, the ADR answers no high-risk task.proposed, keep the decision task open, or open one with what is
missing to decide.gap task of Compliance, when there is no fitness function and no gap task asked
for this ADR (that task is the one, as above). Before creating, look
for an open task with the same label and subject and reuse it. Match by the label and the
subject, not by the exact title: an earlier run may have translated the title differently,
and a gap task for the same check opened by another skill serves.
gh issue list --label <label> --state open --search "<subject>";
create with gh issue create --title "<title>" --label <label> --body "<what the check must confirm, and a link to the ADR>"..scratch/architecture/issues/ with the Labels: <label>
line, a Status: open line and the subject in its # title. Create a file
.scratch/architecture/issues/NN-slug.md (next free NN, from 01; slug is the title
already translated, in kebab-case) with a # <title> line, a Labels: <label> line, a
Status: open line, and the same body as on GitHub.
Put the link or file name of each task in the Compliance or the Notes of the ADR.Dossier index: in docs/architecture/README.md (the README.md of the quantum
folder, with the per-quantum layout), set the row that links to ../adr/ to
generated with today's date. Find the row by its link, never by its label, which is
translated into the user's language. If the row is missing, add it. If the file does not
exist, create it from references/dossier-readme.md, translated,
with that row as generated and the other rows as pending.
Done when the ADR has all seven sections, every task is closed, updated or opened as above, and the dossier
index shows the ADRs as generated.
List the files written and the tasks closed, updated and opened. State the decision in one line, and each
part that is not now with the condition that reopens it. Say that another decision is another
run of this skill. Then end with one of these lines, translated into the user's language, with
commands and file names as they are:
proposed, end with the decision task and what is missing to decide, in the form
Next: decide <what is missing> (<decision task>), then /arch:to-adr "<decision>" (Claude Code) · $arch:to-adr "<decision>" (Codex).
No mitigation was decided yet, so never send the user to the code.accepted and answers a high-risk task, end with
Next: put the mitigation in the code, then /arch:to-risk to close the high-risk task (Claude Code) · $arch:to-risk (Codex).to-risk skill, end with
Next: /arch:to-risk (Claude Code) · $arch:to-risk (Codex).Next: review ADR <number>, and mark it reviewed in docs/architecture/README.md.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub eldermoraes/java-ai-specialist --plugin arch5 skills in this plugin
/grill-architectureInterview the user about an agentic system, one round of questions at a time, and write the kata brief plus ADR 0001 (agent, workflow or multi-agent). Works from a short idea or from an existing project./setup-architecturePrepare a repository for the architecture skills. Chooses the task tracker, the labels and the dossier layout, then creates docs/architecture/, docs/adr/ and docs/agents/architecture.md./to-characteristicsRead an agentic system (brief, ADRs, code, or a two-line description), find its architecture quanta, propose the architecture characteristics that meet the three defining criteria, set a Target for each, find the fitness function that checks it, and write characteristics.md. A characteristic without a fitness function becomes a gap task./to-riskAssess the architecture risk of a system in one dimension, as a risk storming. Read the system, list the areas at risk with evidence, recommend an impact and a likelihood for each, score them with the risk matrix script, check every effectful retry and every unproven technology, and write docs/architecture/risk.md. Opens a high-risk task for each risk of 6 or 9 without mitigation in place. Does not decide permissions.