Skip to content

Commands

ontrack has seven commands. Only apply writes to the repository.

Command What it does Writes
apply Imports the ADRs and updates AGENTS.md, as plan reports docs/adr/, AGENTS.md
check Runs the check command of each decided ADR Nothing itself
decide Prints a prompt asking a coding agent to record a new decision with you Nothing
instructions Prints the decided traits as the instructions block of AGENTS.md Nothing
plan Shows what importing the tracks would change Nothing
review Prints a prompt asking a coding agent to import the new ADRs and rule on them Nothing
suggest Prints a prompt asking a coding agent to find the decisions the repository never recorded Nothing

The files these commands read and write are described in File formats.

Every command accepts -h, --help and -v, --version.

The commands ontrack prints, in the next step of apply, the instructions block and the review prompts, say npx ontrack. When the project does not install ontrack (there is no node_modules/.bin/ontrack), they say npx -p @trivoallan/ontrack ontrack instead: there, npx ontrack would download and run the unrelated ontrack package from the registry.

This page says what each command does and what it prints. The exact format of each output is a contract: scripts, CI jobs and agents rely on it, and it changes here before it changes in the code.

Every command shares the same exit codes.

Code Meaning
0 Nothing to do
2 Changes pending, or a check failed
1 Error (unknown command, unreadable track…)

A CI job can detect an out-of-date repository on 2 without parsing the output.

On 1, standard error holds one line that starts with ontrack[E<nnn>]:. The code between the brackets is a contract, like the exit codes: it names the same failure from one version to the next, whatever the sentence after it becomes. Error messages lists every code.

Every error a command prints on 1 is listed, with what to do about it, in Error messages.

Every command takes --json. It then prints one JSON document on standard output, in place of the text, with the same facts. Like the text, the document is a contract: its keys change here before they change in the code.

  • A document starts with $schema, the address of its own schema (see the table below). A validator or an editor finds the schema from the document alone. The tables of keys below do not repeat it.
  • Every key below is always present. Where the text prints nothing, the value is null, or an empty list.
  • A path is relative to the repository, with forward slashes.
  • The exit codes do not change.
  • Nothing else is printed: the lines the text form writes on standard error (the next step of apply and of plan, the nothing to review line of review) are keys of the document.
  • A key may be added in a later version. A key is not removed or given another meaning without a breaking change.

Each document has a JSON Schema, published in the repository and shipped in the package under schema/:

Document Schema
plan --json schema/plan.schema.json
apply --json schema/apply.schema.json
check --json schema/check.schema.json
instructions --json schema/instructions.schema.json
review --json schema/review.schema.json
suggest --json schema/suggest.schema.json
An error schema/error.schema.json

A validator reads one from https://raw.githubusercontent.com/trivoallan/ontrack/main/schema/<name>.schema.json, or from node_modules/@trivoallan/ontrack/schema/, which is the one of the version you run. A schema requires every key below and refuses none: a document of a later version, with a key more, is still valid.

Terminal window
npx ontrack plan --json

plan and apply describe an ADR of a track the same way:

Key Value
name The file name without .md
title The title, or null
category revised, new, removed, undetermined, unreadable, check or unchanged
status The status of your copy, as plan --all prints it; null where it prints -
revision { "from", "to" } for a revised or undetermined ADR, each a number or null; else null
check { "from", "to" } for a check ADR: the line of your copy and the line of the track, each null when absent; else null

check, instructions and review describe an ADR under docs/adr/ the same way:

Key Value
ref The reference: <namespace>/<file name without .md>
title The title, or null
status The status: of the file, or null
path The file
Key Value
tracks One entry per track, then one for local when your own ADRs have to move: namespace, adrs (every ADR of the track, the unchanged ones too), rename ({ "from", "to" }, two folders, or null), migration (the files to move)
unresolved One entry per supersedes: entry that designates no ADR: ref (the ADR that holds it), name (the entry, as written)
agents The lines about AGENTS.md, as the text prints them
pending true when the exit code is 2

--all changes nothing: the document always holds every ADR. With no track, tracks is empty.

Key Value
dryRun true under --dry-run: the document says what would be done
actions In the order they ran: kind (renamed, imported, moved, confirmed, synced or pruned), track, adr (the ADR of the track, or null for renamed and moved), from (a path, or null for confirmed, synced and pruned), to
links The links to update: file, line, old, new
supersedes The supersedes: entries to update, in the same form
agents The lines about AGENTS.md
remaining What plan --json gives under tracks, once the actions are done
next { "proposed", "revised" }: how many ADRs are left to rule, and to rule again
pending true when the exit code is 2
Key Value
results One entry per ADR checked: the ADR of the repository, then check (the command, or null), result (pass, fail or unchecked) and output (the lines a failed command printed)
counts { "fail", "pass", "unchecked" }
Key Value
hint The sentence that sends an agent to review
decided The ADRs in force that decide traits: the ADR of the repository, then traits, its YAML as one text
pending The ADRs not yet decided
block The whole block, as the text form prints it
Key Value
kind import, sequence, review, revision, revisions or supersession: which prompt; none when there is nothing to review
adrs The ADRs the prompt names. For import, { "path", "title" } of each new ADR; else the ADR of the repository, with revision ({ "from", "to" }) for revision and revisions
prompt The prompt, as the text form prints it; null for none
Key Value
adrs The ADRs the repository holds
new { "path", "title" } of each ADR its tracks would import
prompt The prompt, as the text form prints it
Key Value
adrs The ADRs the repository holds
new { "path", "title" } of each ADR its tracks would import
prompt The prompt, as the text form prints it

On exit code 1, standard output is empty and standard error holds one document:

{
"$schema": "https://raw.githubusercontent.com/trivoallan/ontrack/main/schema/error.schema.json",
"error": {
"code": "E105",
"message": "dependency \"platform\" is not installed; run npm install",
"docs": "https://trivoallan.github.io/ontrack/error-messages/#e105"
}
}

code is the code of the error, and docs the address of its row. Both are null for a failure ontrack did not foresee.

Brings the repository in line with what plan reports. It is the only command that writes. It never commits, and it never touches an ADR you already decided on, except for its check: line.

Terminal window
npx ontrack apply --dry-run # print what apply would do, write nothing
npx ontrack apply # import new ADRs, move flat files
npx ontrack apply --prune # also delete ADRs the track no longer ships
npx ontrack apply --confirm ADR-0003 # declare an undetermined ruling still holds
npx ontrack apply --confirm all # same, for every undetermined ADR
Option Effect
--dry-run Print what apply would do, write nothing
--prune Also delete ADRs the track no longer ships
--confirm <name> Declare that an undetermined ruling still holds; --confirm all for every one. Without a name, it is a usage error, with 1

What it does, per track:

Action When Effect
renamed A rename: line The old folder moved, as a whole and first, to docs/adr/<alias>/ (git mv in a git repository, a plain rename otherwise); its files are unchanged
imported A new ADR Copied, byte for byte, into docs/adr/<alias>/
moved A flat-layout file Moved from docs/adr/ to docs/adr/<alias>/, or to docs/adr/local/ for one of your own ADRs, under a local: line (git mv in a git repository, a plain rename otherwise)
pruned A removed ADR, with --prune Deleted
confirmed An undetermined ADR, with --confirm Gets the upstream revision:; nothing else changes
synced A check ADR Gets the track’s check: line, set, replaced or removed; nothing else changes. It needs no option

The check: line of an imported ADR belongs to its track: to run a different check, supersede the ADR with one of your own.

A revised or unreadable ADR is never written to or deleted (only moved by a migration): a person must rule again. For a revised one, ontrack review prints the prompt that asks a coding agent to do it with you.

apply also writes the instructions block of AGENTS.md. Every check runs before the first write, so an error never leaves a half-applied repository.

Exit code. Computed on what remains after the run: 0 nothing left, 2 something still needs a person, 1 error.

The output lists the actions, then every Markdown link a migration or a rename breaks (links to a moved file, and links held by a moved file to a file left in place), then, after a rename, every supersedes: entry that names the old namespace. It lists them, it does not rewrite them. Then comes what still needs a human, in the plan format:

dry run: nothing written
platform: 1 imported, 2 moved
imported ADR-0015 Observability
moved ADR-0006.md
moved ADR-0010.md
links to update:
docs/arc42.md:12 adr/ADR-0006.md → adr/platform/ADR-0006.md
remaining:
platform: 1 revised, 2 unchanged
revised ADR-0010 Forge and CI (revision 3 → 4)

After a rename, the actions start with the renamed line, and the supersedes: entries follow the links:

engineering: 1 renamed
renamed docs/adr/trivoallan/ → docs/adr/engineering/
links to update:
docs/adr/local/ADR-0001-propose.md:20 ../trivoallan/ADR-0014-work-tracking.md → ../engineering/ADR-0014-work-tracking.md
supersedes to update:
docs/adr/local/ADR-0024-cooldown.md:8 trivoallan/ADR-0018 → engineering/ADR-0018

Until those entries are edited, they match no ADR, so the ADRs they named are in force again; when they decide a trait the replacing ADR decides too, the instructions block is skipped. Fix the entries and run apply again.

The first line only appears with --dry-run. With nothing to do, apply prints the same output as plan.

When ADRs are proposed in docs/adr/ after the run (the ones it imported, and any left from an earlier run), apply names the next step on stderr, as a shell command and as a prompt to give a coding agent. proposed ADRs make neither plan nor check fail, so the hint says the repository works with them open. Standard output and the exit code are unchanged.

next: 3 proposed ADRs, ruled when you choose: the repository works as it is
check runs only the decided ADRs. Start with a few:
from a shell: claude "$(npx ontrack review)"
as a prompt: Run `npx ontrack review` and follow its output.

Once no ADR is proposed, the first line counts the ruled ADRs that remain revised instead, without the check line: next: 2 revised ADRs to rule again.

Runs the check command of each decided ADR and reports one line per ADR. ontrack judges nothing itself: an ADR names the command that does, in the check: key of its frontmatter.

Terminal window
npx ontrack check
Status Meaning
pass The command exited with 0
fail The command exited with anything else, including a program that is not installed
unchecked The ADR has decided traits and no check:, or its command exited with 78
  • An ADR carries a check when it is accepted, is not superseded, and has a non-empty check: value.
  • Commands run through the shell, from the project root, with your environment, one at a time. A failure does not stop the run.
  • Each command gets ONTRACK_ADR: the path of its ADR’s file, relative to the project root.
  • Only ADRs committed under docs/adr/ are read, never node_modules. A track’s command runs only once apply has written it into your copy and your repository holds the ADR as accepted.

Exit code. 2 when at least one check failed, 0 otherwise, 1 on an error. unchecked ADRs do not change it.

instructions tells an agent what the repository decided. check tells it when its work departs from a decision. ontrack judges nothing itself: an ADR names the command that does, in a top-level check: key of its frontmatter.

---
adr: ADR-0006
title: Commits
status: accepted
check: npx commitlint --from origin/main
traits:
commits:
scopes: [api, cli, docs]
tool: commitlint
---

check runs each command and reports one line per ADR:

unchecked Record architecture decisions (trivoallan/ADR-0001-record-architecture-decisions)
fail Commits (trivoallan/ADR-0006-commits)
adr: docs/adr/trivoallan/ADR-0006-commits.md
check: echo "scope may not be empty"; exit 1
| scope may not be empty
pass Branching (trivoallan/ADR-0009-branching)
1 failed, 1 passed, 1 unchecked
  • The ADRs read, their status and their supersession are those of instructions. An ADR carries a check when it is accepted, is not superseded, and has a non-empty check: value. A local ADR that supersedes a track’s ADR silences its check and may carry its own.
  • The command is the rest of the check: line. A trailing # comment is removed, and so is one pair of matching quotes around the whole value. Lines below are not part of it: put a longer command in a script.
  • Commands run through the shell, from the project root, with your environment, one at a time, in reference order. A failure does not stop the run.
  • Each command also gets ONTRACK_ADR: the path of its ADR’s file, relative to the project root, with forward slashes, the value of the adr: line. A script that reads the ruled traits opens that file instead of searching for it.
  • pass: the command exited with 0. fail: anything else, including a program that is not installed. unchecked: the ADR carries decided traits and no check:, or its command exited with 78, the code reserved for a command that has nothing to verify (a tool the decision does not use, for instance). Like a pass, its output is not printed.
  • A fail line is followed by the ADR’s path, the command, and the command’s standard output then standard error, each line after |. The output of a passing command is not printed.
  • Lines are sorted by reference. The last line counts each status, and is the only line when there is nothing to report.
  • Conflicting traits are an error, as in instructions, and no command runs.
  • check exits with 2 when at least one check failed, 0 otherwise, 1 on an error. unchecked ADRs do not change the exit code.
  • Only ADRs committed under docs/adr/ are read, never node_modules. A track’s command therefore runs only once apply has written it into your copy and your repository holds the ADR as accepted. apply keeps that line in step with the track, so updating a track can change what runs here: plan prints the old and new lines first. Read them as you would an npm install script.

Any change to this format goes through this page first.

Prints a prompt that asks a coding agent to record, with you, a new decision of this repository: the one your request states, such as “we use pnpm from now on”. The agent checks that no ADR already decides it, proposes traits and a check, shows you the file it would write, and writes it only once you agree. The guide Record a decision takes you through it. It never writes a file and makes no network call.

Terminal window
claude "$(npx ontrack decide)"

You do not have to run it yourself: the instructions block of AGENTS.md tells an agent you ask to record a decision to run it.

To Run
Record a decision you take now decide
Find the decisions the repository took and never recorded, once, at adoption suggest
Change a decision already recorded review <adr>

decide takes no argument: the decision is in your request to the agent.

Exit code. Always 2, because there is always a prompt to follow, as for suggest.

As for suggest, ontrack gives the agent only the ADRs here and those the tracks would import (see local/ADR-0029). The agent reads the repository, and its history to number the new file. With one ADR here and one to import, the prompt is:

Record, with the user, the decision their request states as a new architecture decision record of this repository. To change a decision already recorded, run `npx ontrack review <adr>` instead.
The repository holds these ADRs:
- `docs/adr/local/ADR-0001-release.md` (Release), accepted
Its tracks would import these ADRs:
- `docs/adr/platform/ADR-0006-commits.md` (Commits)
A decision one of them covers is already recorded, or awaits a ruling: do not record it again.
1. Read the rules of this repository on recording decisions, in AGENTS.md and in the ADR they come from. Write nothing yet.
2. Establish the decision from the user's request; ask the user what is decided when the request does not say. Name the alternative it rules out. When no credible alternative exists, say that a fact with no alternative is not a decision, and stop.
3. When an `accepted` ADR in force already decides it, stop: name that ADR, and propose `npx ontrack review <its reference>` to supersede it. When the ADR that decides it is `proposed`, or among the ADRs to import, stop and say that `npx ontrack review` rules it.
4. Start from what this repository does today on the subject: its files, configuration, CI and history. Cite the evidence as a file and line, a commit, or a review comment. Where it does nothing, say so.
5. Propose the traits that state the decision (keys under a top-level key that no ADR in force uses), or say that it has none: an ADR without traits does not reach AGENTS.md. Propose a check command when one can verify it.
6. Present the proposal: a title, the decision in one sentence, the alternative it rules out, the traits, the check, the evidence, and the file name the new ADR would take, in `docs/adr/local/` and numbered after the highest number ever used in that directory, by a file there or one the git history shows deleted, and after the repository's own ADRs still placed directly in `docs/adr/`, from 0001 when there is none. Then stop and ask for the user's agreement, with a question tool such as `AskUserQuestion` when you have one. Write nothing until the user agrees.
7. Once the user agrees: write the new ADR in `docs/adr/local/`, in the format the repository's rules prescribe, with `status: accepted`, `supersedes: []`, its traits under `traits:` and its check under `check:` when it has one, its context drawn from the evidence. Then run `npx ontrack apply` to update AGENTS.md: an ADR without traits does not reach it.
  • The lists, and the line that follows them, are those of the suggest prompt, with the same text.
  • Step 1 and what follows “Once the user agrees:” in step 7 are the text of steps 1 and 7 of the suggest prompt. The numbering in step 6 is the text of the supersession prompt of review and of the suggest prompt.
  • The prompt names no convention, tool or value of its own: it is fixed text, paths, titles and statuses.

Any change to this prompt goes through this page first.

See Record a decision for the steps from your side.

Prints the traits decided in the repository’s ADRs as the instructions block of AGENTS.md. It is a preview: you do not paste it, apply writes it. It never writes a file and makes no network call.

Terminal window
npx ontrack instructions
  • It reads the ADRs of every docs/adr/<namespace>/: the imported ones, and the repository’s own in docs/adr/local/. Own ADRs still placed directly in docs/adr/ are read too, as local/<name>; the same file name in both places is an error. It does not read the tracks in node_modules: a shipped ADR holds a convention, not a ruling.
  • An ADR carries decided traits when it is accepted, is not superseded, and has a traits: block.
  • proposed ADRs are listed under “Not yet decided”.
  • Two decided ADRs that share a top-level trait key are an error that names both.

Exit code. 0, or 1 on an error. It never returns 2.

Coding agents read AGENTS.md, not ADRs. A trivoallan/ontrack-engineering ADR ships a convention with empty trait keys. Your repository rules in its own copy: it fills the keys and switches status: to accepted.

---
adr: ADR-0006
title: Commits
status: accepted
traits:
commits:
scopes: [api, cli, docs]
tool: commitlint
---

instructions prints the decided traits as the instructions block of AGENTS.md. You do not paste it: ontrack apply writes it (see File formats), and instructions only previews it:

<!-- ontrack:begin -->
## Project instructions (ontrack)
When asked to review, rule on or supersede an ADR, run `npx ontrack review [adr]` and follow its output. When asked to record a new decision, run `npx ontrack decide` and follow its output.
### Commits (trivoallan/ADR-0006-commits)
```yaml
commits:
scopes: [api, cli, docs]
tool: commitlint
```
### Not yet decided
- Localization (trivoallan/ADR-0002-localization)
<!-- ontrack:end -->
  • The ADRs read are the repository’s: docs/adr/*.md, named local/<file name without .md>, and docs/adr/<namespace>/*.md, named <namespace>/<file name without .md>. Tracks in node_modules are not read, because a shipped ADR holds a convention, not a ruling.
  • An ADR carries decided traits when it is accepted, is not superseded, and has an indented traits: block. The block is copied verbatim, dedented, and its values are never interpreted. traits: {} declares nothing, and any other inline value is an error.
  • An accepted ADR supersedes the ADRs named in its supersedes: key ([A, B] or - A lines). A plain name matches an ADR’s adr: value, or its file name, in the same directory. <namespace>/<name> and local/<name> reach another directory.
  • The line under the heading names review and decide, so an agent asked to review an ADR, or to record a decision, runs the command instead of improvising.
  • proposed ADRs are listed under “Not yet decided”. Every other status is ignored.
  • Two decided ADRs sharing a top-level trait key are an error that names both. Superseding one of them settles it.
  • Sections are sorted by reference. With nothing decided and nothing pending, the block holds only its heading.
  • instructions never writes a file and makes no network call. It exits with 0, or with 1 on an error; it never returns 2.

Any change to this format goes through this page first.

Shows what importing the tracks would change in the repository. It never modifies a file and makes no network call.

Terminal window
npx ontrack plan

Each ADR that is not up to date falls in one category:

Category Meaning
new Not imported yet
revised The convention moved upstream; the line ends with (revision <local> → <upstream>)
removed No longer shipped by the track
undetermined No usable revision: to compare
unreadable No recognizable frontmatter
check Up to date, but the track’s check: line differs from yours

plan also reports files to move from a flat docs/adr/ layout: a track’s ADRs to docs/adr/<alias>/, your own to docs/adr/local/. It reports the supersedes: entries that designate no ADR, and the state of the instructions block in AGENTS.md (missing or out of date).

Exit code. 0 when every ADR is unchanged, or when there is no track at all. 2 for any other category, a migration, a rename, a supersedes: entry that designates no ADR, or a instructions block to write.

Options.

Option Effect
--all Lists every ADR, the unchanged ones too, each with your status
Terminal window
npx ontrack plan --all
trivoallan: 1 revised, 2 unchanged
unchanged accepted ADR-0005-validation
revised accepted ADR-0006-commits (revision 2 → 3)
unchanged rejected ADR-0013-frontend

The exit code is the same with and without --all.

plan never modifies a file and makes no network call. Its output follows this format, one block per track, tracks sorted by alias:

platform: 2 revised, 1 new, 3 unchanged
revised ADR-0006 Commits (revision 1 → 2)
revised ADR-0010 Forge and CI (revision 3 → 4)
new ADR-0015 Observability
migration: 5 files docs/adr/ → docs/adr/platform/
move ADR-0001.md
move ADR-0003.md
move ADR-0006.md
move ADR-0008.md
move ADR-0010.md
  • Line 1, per track: <alias>: <count per category>, in the order revised, new, removed, undetermined, unreadable, check, unchanged. Zero counts are omitted, except “unchanged”.

  • Then one line per ADR that is not unchanged, sorted by name: two spaces, the category in a 12-character column, two spaces, the file name without .md, then two spaces and the ADR’s title, unless the name already carries a slug (ADR-0006-commits). A revised line ends with (revision <local> → <upstream>).

  • The title is the frontmatter title: key, or else the first # heading, without a leading <name>: that repeats the file name. It comes from the track’s copy (the local copy for a removed ADR). An ADR without a title shows its name only.

  • Categories: new (not imported yet), revised (the convention moved upstream), removed (no longer shipped by the track), undetermined (no usable revision: to compare), unreadable (no recognizable frontmatter), check (up to date, but the track’s check: line differs from yours).

  • A check line is followed by the check: line that would go (four spaces, - ) and the one that would come (four spaces, + ), so you read the command before apply writes it:

    trivoallan: 1 check, 13 unchanged
    check ADR-0006-commits
    - check: exit 0
    + check: npx commitlint --last

    The check: line is the first one at column zero in the frontmatter. Only an ADR that is up to date can be check: a revised ADR gets its check once you have ruled again.

  • A rename, when the track was installed under another alias before: the track has no docs/adr/<alias>/, and exactly one other folder of docs/adr/ (not local, not the alias of an installed track) holds at least one file the track ships. The ADRs are classified against that folder, as if the rename were done, and the ADR lines are followed by rename: docs/adr/<old>/ → docs/adr/<alias>/. It counts as a change to make: exit code 2. Two folders that could be the old one for a track, or one folder that could be the old one for two tracks, make plan fail with exit code 1.

  • A flat-layout migration (docs/adr/<file> that belongs to the track but is not under docs/adr/<alias>/) is always shown: migration: <n> file(s) docs/adr/ → docs/adr/<alias>/, then one move line per file.

  • Your own ADRs live in docs/adr/local/. Those still placed directly in docs/adr/ (the root files no track ships) are shown the same way, after the last track: migration: <n> file(s) docs/adr/ → docs/adr/local/, then one move line per file.

  • With --all, the unchanged ADRs get a line too, so every ADR has one, sorted by name whatever its category. Each ADR line then carries a status between the category and the name: the category in its 12-character column, two spaces, the verdict in a 10-character column, two spaces, then the name and the rest of the line as above. The summary line, the - and + lines, the migration lines and the exit code do not change.

  • The status is the status: of your copy, never the track’s: the first status: line at column zero in its frontmatter, without a trailing # comment. It is - when you have no copy yet (a new ADR), when the copy has no recognizable frontmatter, or when it states no status.

  • After the last track, the supersedes: entries of your accepted ADRs that designate no ADR: supersedes: <n> reference(s) to no ADR, then one line per entry, sorted by reference: two spaces, unresolved in the 12-character column, two spaces, the reference of the ADR that holds it, supersedes, and the entry as written. An entry designates an ADR by its adr: identifier, or else its file name without .md, prefixed by <namespace>/ when it is not in the same folder: ADR-0022 or local/ADR-0022, not ADR-0022-a-package-of-questions-is-called-a-track. Each one counts as a change to make: exit code 2.

    supersedes: 1 reference to no ADR
    unresolved local/ADR-0027-a-track-ships-conventions supersedes ADR-0022-a-package-of-questions-is-called-a-track
  • When there is nothing to do, one line per track (platform: 14 unchanged), and the exit code is 0. Any other category, or a migration, gives 2.

  • With no track at all, plan prints no track found and exits with 0, or prints the migration of your own ADRs after that line and exits with 2. It then names the next step on standard error, so that standard output keeps this format: next: install a track, then npm i -D <alias>@npm:<track-package>.

Any change to this format goes through this page first.

Prints a prompt that asks a coding agent to rule on ADRs with you: the agent proposes, you agree, and only then does it write. It never writes a file and makes no network call.

Terminal window
claude "$(npx ontrack review)" # import the new ADRs, then every proposed ADR, in sequence
claude "$(npx ontrack review ADR-0006)" # this one alone
claude "$(npx ontrack review ADR-0001)" # an accepted one: supersede it
Argument Prompt
None, and the track ships ADRs not imported yet Run apply to import them, then review again
None Sort the proposed ADRs, then rule them one at a time, in the order you agree; skip one or stop at any time
A proposed ADR Rule that ADR alone
An accepted ADR Write a new ADR that supersedes it

The argument is a reference (trivoallan/ADR-0006-commits), a file name without .md (ADR-0006-commits) or an adr: identifier (ADR-0006). It must name exactly one ADR.

Exit code. 2 when it prints a prompt, because a ruling is pending. 0 when no ADR is new, proposed or revised: it then says so on standard error and prints nothing. 1 for an unknown or ambiguous name, a rejected ADR, or one already superseded.

An ADR stays proposed until someone rules. review prints a prompt that asks a coding agent to rule them with you, one at a time: the agent proposes, you agree, and only then does it write.

Terminal window
claude "$(npx ontrack review)" # every proposed ADR, in sequence
claude "$(npx ontrack review ADR-0006)" # this one alone
claude "$(npx ontrack review ADR-0001)" # an accepted one: supersede it
claude "$(npx ontrack review ADR-0012)" # a revised one: rule it again

Without an argument, the prompt lists every proposed ADR and gives the steps once. Before the first ruling, the agent sorts the ADRs into those the repository already answers and those that need a discussion, and you agree to the order. You can skip an ADR, which stays proposed, or stop at any time: the agent then sums up what was ruled and what is still open. None of them has to be ruled for plan or check to pass.

Review the architecture decision records of this repository that are still `proposed`, one at a time, in the order agreed with the user:
- `docs/adr/trivoallan/ADR-0002-localization.md` (Localization)
- `docs/adr/trivoallan/ADR-0006-commits.md` (Commits)
Each is a convention this repository has not ruled on yet, shipped with the values its track recommends. Propose a ruling; the user decides. Where an ADR itself says how to rule, it prevails over this prompt.
None of them has to be ruled now: the repository works with them open, and `npx ontrack check` runs only the decided ADRs. The user rules as many as they choose.
First, when the list holds more than one ADR, survey them, writing nothing. The survey decides which conventions the user meets first: those this repository already answers, which the user can check against what they know, come before those that need a discussion.
Read every ADR in the list and look at this repository's files, configuration, CI and history. For each ADR, take every value it asks for (every key under `traits:`) and look for a citation: a file, a configuration entry or a command output in this repository. Give a count only when it comes from a command you ran, and name the command. Label each citation with exactly one of these two labels, word for word:
- `shows the value`: the citation states the value itself. For instance, `"license": "MIT"` in `package.json` shows `license.spdx: MIT`. A value read from the file tree also shows the value: the main language, counted from the source files listed by `git ls-files`.
- `next to it`: the citation shows something from which you would infer the value. For instance, a `renovate.json` that extends a preset and has no `automerge` key does not show the automerge setting, which the preset holds; a contributing guide that says releases are published by hand does not show the build provenance, which the registry holds. A citation drawn from history alone, such as scopes read from past commits, is `next to it`.
An absence counts as a citation only when the thing, if it existed, would have to leave a file or a configuration in this repository, and none is there: no workflow that runs an audit tool shows `forge.audit: none`, and no OpenSpec directory shows `changes.framework: none`. An absence does not count for a thing that could exist without leaving a trace in this repository, such as a dependency-update app, the provenance a registry records, a convention like the language of the documentation, or which agents contributors use: an ADR that rests on such an absence goes to the second group.
Put an ADR in the first group only when every one of its values has a citation labelled `shows the value`. Put every other ADR in the second group, including one where a single value is held outside this repository or is inferred.
Do not put an ADR in the first group on a `next to it` citation, however likely the value seems. Do not leave a value you could not show without saying where it lives: a forge setting, a file outside this repository, a choice people make, or "unknown".
Present the survey in this form, the first group first:
- a heading per group with its number of ADRs, equal to the ADRs listed under it;
- for the first group, one row per value: ADR, key, value, citation;
- for the second group, one row per value you could not show, and no row for the values you could: ADR, key, where the value lives or "unknown", and any citation you have, with its label.
Then ask the user to agree to that order or give another, with a question tool such as `AskUserQuestion` when you have one.
Then, for each ADR, in the agreed order:
1. Read its file in full. Do not edit any other ADR.
2. Start from what this repository does today on this convention: its files, configuration, CI and history. Where it does nothing, say so: an absence is evidence too. Describe the repository as it is, not as the other `proposed` ADRs would make it. Then compare with the recommendation the ADR makes, and name every difference.
3. When a recommendation is conditional ("if this repository…"), check the condition and cite the file or command output that settles it.
4. For every key under `traits:` that the ADR leaves to the repository, propose a value with its evidence, and mark it `observed` when the repository does it today, or `absent` when it does not and the ruling would make it do so.
5. Propose `rejected` only on evidence that the convention does not apply here, and say what stands in for it.
6. Present the proposed ruling: the status, one line per trait key with its value, marked observed or absent, and its evidence, and every departure from the recommendation with its reason. Then stop and ask for the user's agreement, with a question tool such as `AskUserQuestion` when you have one. Write nothing until the user agrees.
7. Once the user agrees: fill the `traits:` keys, or remove the block when rejected; set the status; write in the ADR the reason for every departure from the recommendation; then run `npx ontrack apply` to update AGENTS.md.
When you present a ruling, the user can also skip the ADR: leave its file untouched and take the next one. The user can stop the review at any time: then write nothing more for the open ADR.
Then take the next ADR in the list. Do not start an ADR before the previous one is ruled or skipped.
When the list is done or the user stops, give a summary: the ADRs ruled in this review, the ADRs still `proposed` with the group each belongs to, and a sentence saying the repository works with them open.
Once the review ends, whether every ADR is ruled or the user stops, list the rulings this repository does not follow yet: a value its code, configuration or tooling does not match, or a tool the ruling names that is not set up. A ruling is identified by its ADR's reference without the slug, in brackets, and its trait key, as in `[trivoallan/ADR-0015] secrets.guard`. The tracker is the one named by the decided `tracking` trait in AGENTS.md. Before proposing, list the items in that tracker that carry the label `ontrack`, open and closed: propose nothing for a ruling whose identifier starts the title of one of those items, and say in one line which closed items name a ruling this repository still does not follow. When you cannot list the tracker's items, propose every ruling and say that duplicates were not checked. For each ruling left, propose a tracking item: its title starts with the ruling's identifier, as in `[trivoallan/ADR-0015] secrets.guard: install gitleaks`, and it names the ADR it serves. Create in the tracker (`tracking.tool`, in `tracking.project`) only the items the user agrees to, asked with a question tool such as `AskUserQuestion` when you have one, each with the label `ontrack`, creating the label first when the tracker requires it. When no `tracking` trait is decided, or `tracking.tool` is `none`, give the list in your reply and create nothing.

With an argument, the prompt names that ADR alone, with the same steps. It is the same text for every ADR, apart from its path and title:

Review one architecture decision record of this repository: `docs/adr/trivoallan/ADR-0006-commits.md` (Commits).
It is `proposed`: a convention this repository has not ruled on yet, shipped with the values its track recommends. Propose a ruling; the user decides. Where the ADR itself says how to rule, it prevails over this prompt.
1. Read its file in full. Do not edit any other ADR.
2. Start from what this repository does today on this convention: its files, configuration, CI and history. Where it does nothing, say so: an absence is evidence too. Describe the repository as it is, not as the other `proposed` ADRs would make it. Then compare with the recommendation the ADR makes, and name every difference.
3. When a recommendation is conditional ("if this repository…"), check the condition and cite the file or command output that settles it.
4. For every key under `traits:` that the ADR leaves to the repository, propose a value with its evidence, and mark it `observed` when the repository does it today, or `absent` when it does not and the ruling would make it do so.
5. Propose `rejected` only on evidence that the convention does not apply here, and say what stands in for it.
6. Present the proposed ruling: the status, one line per trait key with its value, marked observed or absent, and its evidence, and every departure from the recommendation with its reason. Then stop and ask for the user's agreement, with a question tool such as `AskUserQuestion` when you have one. Write nothing until the user agrees.
7. Once the user agrees: fill the `traits:` keys, or remove the block when rejected; set the status; write in the ADR the reason for every departure from the recommendation; then run `npx ontrack apply` to update AGENTS.md.
Once the review ends, whether every ADR is ruled or the user stops, list the rulings this repository does not follow yet: a value its code, configuration or tooling does not match, or a tool the ruling names that is not set up. A ruling is identified by its ADR's reference without the slug, in brackets, and its trait key, as in `[trivoallan/ADR-0015] secrets.guard`. The tracker is the one named by the decided `tracking` trait in AGENTS.md. Before proposing, list the items in that tracker that carry the label `ontrack`, open and closed: propose nothing for a ruling whose identifier starts the title of one of those items, and say in one line which closed items name a ruling this repository still does not follow. When you cannot list the tracker's items, propose every ruling and say that duplicates were not checked. For each ruling left, propose a tracking item: its title starts with the ruling's identifier, as in `[trivoallan/ADR-0015] secrets.guard: install gitleaks`, and it names the ADR it serves. Create in the tracker (`tracking.tool`, in `tracking.project`) only the items the user agrees to, asked with a question tool such as `AskUserQuestion` when you have one, each with the label `ontrack`, creating the label first when the tracker requires it. When no `tracking` trait is decided, or `tracking.tool` is `none`, give the list in your reply and create nothing.

Naming an accepted ADR reopens its decision. Its text is frozen, so the prompt asks for a new ADR in docs/adr/local/ that supersedes it. It is the same text for every ADR, apart from its path, title and reference:

Supersede one architecture decision record of this repository: `docs/adr/trivoallan/ADR-0001-record-architecture-decisions.md` (Record architecture decisions).
It is `accepted`: a decision this repository has taken, whose text is frozen. Changing the decision takes a new ADR that supersedes it. Propose that ADR; the user decides. Where the rules of this repository on recording decisions say how to supersede an ADR, they prevail over this prompt.
1. Read its file in full. Read the rules of this repository on recording decisions, in AGENTS.md and in the ADR they come from.
2. Establish what changes in the decision; ask the user when they have not said. Cite the file or command output that supports the change: what moved in this repository since the decision was taken, or what the decision never matched. If you find nothing, say so in one line.
3. List every key under its `traits:`. For each one, propose the value it keeps or the value it takes, with the evidence for every change. Leave no key out: a key the new ADR omits is no longer decided.
4. When it has a `check:` command, propose to keep it, change it or drop it, and say why.
5. Present the proposal: the new ADR's file name, in `docs/adr/local/` and numbered after the highest number ever used in that directory, by a file there or one the git history shows deleted, and after the repository's own ADRs still placed directly in `docs/adr/`, from 0001 when there is none; its title; one line per trait key with its value; the check; and the reason for the change. Then stop and ask for the user's agreement, with a question tool such as `AskUserQuestion` when you have one. Write nothing until the user agrees.
6. Once the user agrees: write the new ADR in `docs/adr/local/`, in the format the repository's rules prescribe, with `status: accepted`, `supersedes: [trivoallan/ADR-0001]` and the traits; refer to the superseded ADR for context instead of restating it. Mark the superseded ADR only as the repository's rules spell out; when they do not say what to write in it, leave its file untouched. Then run `npx ontrack apply` to update AGENTS.md.
Once the review ends, whether every ADR is ruled or the user stops, list the rulings this repository does not follow yet: a value its code, configuration or tooling does not match, or a tool the ruling names that is not set up. A ruling is identified by its ADR's reference without the slug, in brackets, and its trait key, as in `[trivoallan/ADR-0015] secrets.guard`. The tracker is the one named by the decided `tracking` trait in AGENTS.md. Before proposing, list the items in that tracker that carry the label `ontrack`, open and closed: propose nothing for a ruling whose identifier starts the title of one of those items, and say in one line which closed items name a ruling this repository still does not follow. When you cannot list the tracker's items, propose every ruling and say that duplicates were not checked. For each ruling left, propose a tracking item: its title starts with the ruling's identifier, as in `[trivoallan/ADR-0015] secrets.guard: install gitleaks`, and it names the ADR it serves. Create in the tracker (`tracking.tool`, in `tracking.project`) only the items the user agrees to, asked with a question tool such as `AskUserQuestion` when you have one, each with the label `ontrack`, creating the label first when the tracker requires it. When no `tracking` trait is decided, or `tracking.tool` is `none`, give the list in your reply and create nothing.

When a track revises a convention you already ruled, plan reports the ADR as revised, and the ruling must be taken again. Naming that ADR prints the prompt for it: the agent compares your copy with the track’s, keeps the ruling where the convention did not move, and proposes one where it did. It is the same text for every ADR, apart from its path, its title, the path of the track’s copy and the two revisions:

Rule again one architecture decision record of this repository: `docs/adr/trivoallan/ADR-0012-delivery.md` (Delivery).
Its track has revised the convention: this repository ruled on revision 1, and `node_modules/trivoallan/adr/ADR-0012-delivery.md` asks revision 2. The ruling stands until it is taken again. Propose the new ruling; the user decides. Where the track's copy itself says how to rule, it prevails over this prompt.
1. Read both files in full: the repository's copy, which holds the ruling, and the track's copy, which holds the convention as it stands now. Edit neither the track's copy nor any other ADR.
2. List what moved in the convention between the two: every key under `traits:` added, removed or renamed, every set of allowed values that changed, and every recommendation that changed. Leave out what only the ruling changed. If nothing that moved touches the ruling, say so in one line.
3. For every trait key that did not move, keep the value this repository ruled, and the reason written for it where it departs from the recommendation.
4. For every trait key that moved, start from the recommendation the track's copy makes. Look in this repository for evidence that it does not apply here, check every condition it states ("if this repository…"), and propose a value drawn from the repository, with its evidence.
5. Keep the status, unless what moved settles whether the convention applies here. Propose `rejected` only on evidence that it does not, and say what stands in for it.
6. Present the proposed ruling: the status, one line per trait key with its value, marked kept or changed, the evidence for every change, and every departure from the recommendation with its reason. Then stop and ask for the user's agreement, with a question tool such as `AskUserQuestion` when you have one. Write nothing until the user agrees.
7. Once the user agrees: replace the repository's copy with the track's copy, which carries the new `revision:`; write the ruling in it: the agreed status, the `traits:` keys filled, or the block removed when rejected, and the reason for every departure from the recommendation; then run `npx ontrack apply` to update AGENTS.md.
Once the review ends, whether every ADR is ruled or the user stops, list the rulings this repository does not follow yet: a value its code, configuration or tooling does not match, or a tool the ruling names that is not set up. A ruling is identified by its ADR's reference without the slug, in brackets, and its trait key, as in `[trivoallan/ADR-0015] secrets.guard`. The tracker is the one named by the decided `tracking` trait in AGENTS.md. Before proposing, list the items in that tracker that carry the label `ontrack`, open and closed: propose nothing for a ruling whose identifier starts the title of one of those items, and say in one line which closed items name a ruling this repository still does not follow. When you cannot list the tracker's items, propose every ruling and say that duplicates were not checked. For each ruling left, propose a tracking item: its title starts with the ruling's identifier, as in `[trivoallan/ADR-0015] secrets.guard: install gitleaks`, and it names the ADR it serves. Create in the tracker (`tracking.tool`, in `tracking.project`) only the items the user agrees to, asked with a question tool such as `AskUserQuestion` when you have one, each with the label `ontrack`, creating the label first when the tracker requires it. When no `tracking` trait is decided, or `tracking.tool` is `none`, give the list in your reply and create nothing.

Without an argument, once no ADR is proposed, the prompt lists every revised ADR and gives the steps once:

Rule again the architecture decision records of this repository whose track has revised the convention, one at a time, in this order:
- `docs/adr/trivoallan/ADR-0001-record-architecture-decisions.md` (Record architecture decisions), ruled on revision 1: `node_modules/trivoallan/adr/ADR-0001-record-architecture-decisions.md` asks revision 3
- `docs/adr/trivoallan/ADR-0012-delivery.md` (Delivery), ruled on revision 1: `node_modules/trivoallan/adr/ADR-0012-delivery.md` asks revision 2
Each holds a ruling of this repository; the file named after it is its track's copy. The ruling stands until it is taken again. Propose the new ruling; the user decides. Where a track's copy itself says how to rule, it prevails over this prompt.
For each ADR, in turn:
1. Read both files in full: the repository's copy, which holds the ruling, and the track's copy, which holds the convention as it stands now. Edit neither the track's copy nor any other ADR.
2. List what moved in the convention between the two: every key under `traits:` added, removed or renamed, every set of allowed values that changed, and every recommendation that changed. Leave out what only the ruling changed. If nothing that moved touches the ruling, say so in one line.
3. For every trait key that did not move, keep the value this repository ruled, and the reason written for it where it departs from the recommendation.
4. For every trait key that moved, start from the recommendation the track's copy makes. Look in this repository for evidence that it does not apply here, check every condition it states ("if this repository…"), and propose a value drawn from the repository, with its evidence.
5. Keep the status, unless what moved settles whether the convention applies here. Propose `rejected` only on evidence that it does not, and say what stands in for it.
6. Present the proposed ruling: the status, one line per trait key with its value, marked kept or changed, the evidence for every change, and every departure from the recommendation with its reason. Then stop and ask for the user's agreement, with a question tool such as `AskUserQuestion` when you have one. Write nothing until the user agrees.
7. Once the user agrees: replace the repository's copy with the track's copy, which carries the new `revision:`; write the ruling in it: the agreed status, the `traits:` keys filled, or the block removed when rejected, and the reason for every departure from the recommendation; then run `npx ontrack apply` to update AGENTS.md.
Then take the next ADR in the list. Do not start an ADR before the previous one is ruled.
Once the review ends, whether every ADR is ruled or the user stops, list the rulings this repository does not follow yet: a value its code, configuration or tooling does not match, or a tool the ruling names that is not set up. A ruling is identified by its ADR's reference without the slug, in brackets, and its trait key, as in `[trivoallan/ADR-0015] secrets.guard`. The tracker is the one named by the decided `tracking` trait in AGENTS.md. Before proposing, list the items in that tracker that carry the label `ontrack`, open and closed: propose nothing for a ruling whose identifier starts the title of one of those items, and say in one line which closed items name a ruling this repository still does not follow. When you cannot list the tracker's items, propose every ruling and say that duplicates were not checked. For each ruling left, propose a tracking item: its title starts with the ruling's identifier, as in `[trivoallan/ADR-0015] secrets.guard: install gitleaks`, and it names the ADR it serves. Create in the tracker (`tracking.tool`, in `tracking.project`) only the items the user agrees to, asked with a question tool such as `AskUserQuestion` when you have one, each with the label `ontrack`, creating the label first when the tracker requires it. When no `tracking` trait is decided, or `tracking.tool` is `none`, give the list in your reply and create nothing.

When the track ships ADRs this repository has not imported yet, those plan reports as new, review without an argument prints the import prompt first, whatever else is pending. The agent runs apply, then review again, which prints the sequence prompt for the ADRs just imported. You run plan then review, for a new convention as for a revised one:

Import the architecture decision records this repository does not hold yet, then review them.
1. Run `npx ontrack apply`. It imports these ADRs as `proposed`, and writes nothing to an ADR this repository has ruled:
- `docs/adr/platform/ADR-0002-localization.md` (Localization)
- `docs/adr/platform/ADR-0015-observability.md` (Observability)
If `apply` fails, stop and report its error.
2. Run `npx ontrack review` and follow the prompt it prints. It exits with `2` when it prints a prompt: that is not an error.
  • A new ADR is one plan reports as new: its track ships it and this repository holds no copy. Without an argument, one new ADR is enough for the import prompt, which then names no proposed and no revised ADR. It lists each new ADR by the path apply gives its copy, docs/adr/<namespace>/<file name>, in reference order, with its title when it has one.
  • With an argument, new ADRs are not considered: naming a proposed ADR rules it without importing anything, and naming an ADR that is not imported is an error, as for any unknown name.
  • The new ADRs are found by reading the tracks, as plan does. When they cannot be read, review sees no new ADR.
  • The ADRs read are those of instructions. Without an argument, and once no ADR is new, the prompt lists every proposed ADR in reference order, the order of “Not yet decided”, even when there is only one.
  • An argument with a / is a reference (trivoallan/ADR-0006-commits). Any other argument is a file name without .md (ADR-0006-commits) or an adr: identifier (ADR-0006), looked up in every directory. It must name exactly one ADR, and that ADR must be proposed, or accepted and not superseded.
  • A revised ADR is one plan reports as revised and whose copy here is no longer proposed, whatever its status: accepted, rejected, or superseded. Named, it gets the prompt to rule again, not the supersession prompt: rule on the convention as it is asked now, then supersede. Without an argument, the revised ADRs come only once no ADR is proposed, in reference order.
  • A proposed ADR whose track revised the convention gets the review prompt, like any other proposed one.
  • The revised ADRs are found by reading the tracks, as plan does. When they cannot be read (no package.json, a dependency not installed), review sees no revised ADR. It still prints the prompt for the ADRs it found. With nothing to print, it does not say that nothing is left to review: it fails with the error plan gives, and exits with 1.
  • An accepted ADR gets the supersession prompt only when named: without an argument, review never reopens a decision. Supersession is that of instructions: an ADR another accepted ADR names in supersedes: is already superseded, and naming it is an error that says which ADR supersedes it.
  • The supersession prompt does not say how a superseded ADR is marked, nor which sections the new ADR has: those are the repository’s rules on recording decisions, which the agent reads. When they say nothing on marking, the superseded file is left untouched.
  • An ADR without a title is named by its path alone.
  • Once the review is ruled, the agent proposes a tracking item for every ruling the repository does not follow yet, skipping those an item labelled ontrack already tracks, and creates only those you agree to, in the tracker your tracking trait names, with the label ontrack and a title that starts with the ruling ([trivoallan/ADR-0015] secrets.guard: …). Without a tracker, it lists them.
  • To rule again, the agent replaces your copy with the track’s, which carries the new revision:, and writes the ruling in it. plan then reports the ADR as unchanged.
  • review never writes a file and makes no network call. Two decided ADRs sharing a trait key do not stop it.
  • It exits with 2 when it prints a prompt, because a ruling is pending. With no new, no proposed and no revised ADR it exits with 0, says so on standard error and prints nothing, so that no agent receives that sentence as a prompt. An unknown or ambiguous name, a rejected ADR, or one already superseded, is an error, with 1, unless the ADR is revised.

Any change to this prompt goes through this page first.

Prints a prompt that asks a coding agent to find the decisions this repository made and never recorded, and to record the ones you agree to. Run it once, when the repository adopts ontrack. From then on, a change records its own decisions. The guide Record the decisions you never wrote down takes you through it. It never writes a file and makes no network call.

Terminal window
claude "$(npx ontrack suggest)"

Exit code. Always 2, because there is always a prompt to follow.

ontrack does not read the repository itself: the agent does, and ontrack gives it what only ontrack holds, namely the ADRs here and those the tracks would import (see local/ADR-0029). With one ADR here and one to import, the prompt is:

Audit this repository for the decisions it holds and has not recorded as architecture decision records, then record the ones the user agrees to. This is done once, when the repository adopts ontrack: a decision taken from now on is recorded by the change that takes it.
The repository holds these ADRs:
- `docs/adr/local/ADR-0001-release.md` (Release), accepted
Its tracks would import these ADRs:
- `docs/adr/platform/ADR-0006-commits.md` (Commits)
A decision one of them covers is already recorded, or awaits a ruling: do not record it again.
1. Read the rules of this repository on recording decisions, in AGENTS.md and in the ADR they come from. Write nothing yet.
2. Look for the decisions this repository made, in this order of weight: review comments a maintainer repeats on pull requests; reversals in the git history, where a dependency, a tool or a pattern was replaced by another; rules written by hand in AGENTS.md or CLAUDE.md that no ADR backs; design notes and change proposals, archived ones included, where a choice was argued; then configuration and dependencies, which show what is, not what was chosen. When the forge cannot be read, or holds no review comment, say so in one line and go on with the other sources.
3. Keep a candidate only when a credible alternative exists, one an agent or a newcomer could take instead. A fact with no alternative is not a decision.
4. Drop a candidate that an `accepted` ADR in force already covers. When the ADR that covers it is `proposed`, or among the ADRs to import, drop it and say that `npx ontrack review` rules it. An ADR that only mentions a fact in passing does not cover it.
5. Merge into one the candidates a single decision explains. Keep at most five candidates, the weightiest first. For each: a title, the decision in one sentence, the alternative it rules out, the traits that state it (keys under a top-level key that no ADR in force uses), a check command when one can verify it, and its evidence, each piece cited as a file and line, a commit, or a review comment. When none is left, say so and stop.
6. Present the candidates, with their traits and checks and the file name each new ADR would take, in `docs/adr/local/` and numbered after the highest number ever used in that directory, by a file there or one the git history shows deleted, and after the repository's own ADRs still placed directly in `docs/adr/`, from 0001 when there is none. Then stop and ask the user which ones to record, with a question tool such as `AskUserQuestion` when you have one. Write nothing until the user agrees.
7. For each candidate the user agrees to: write the new ADR in `docs/adr/local/`, in the format the repository's rules prescribe, with `status: accepted`, `supersedes: []`, its traits under `traits:` and its check under `check:` when it has one, its context drawn from the evidence. Then run `npx ontrack apply` to update AGENTS.md: an ADR without traits does not reach it.
  • The ADRs here are those of instructions, in reference order, each with its path, its title when it has one, and its status. The ADRs to import are those plan reports as new, by the path apply would give them. An empty list is one line: “The repository holds no ADR.”, “Its tracks would import no ADR.”.
  • When the tracks cannot be read (no package.json, a dependency not installed), there is no ADR to import, and no error.
  • At most five candidates: run suggest again for the next ones.
  • The prompt names no convention, tool or value of its own: it is fixed text, paths, titles and statuses.

Any change to this prompt goes through this page first.