Repository navigation
Description
Problem or Motivation
The architecture decision records in docs/adr/ have no structure for their status, and no rule controls their life:
- The 25 records hold 66,287 words. Only 8 have 1,000 words or fewer.
- Records 0001 to 0017 have no status section.
- 38 of the 49 commits that changed
docs/adr/since 2026-10-25 edited an accepted record in place. - The records in force give the alternatives check 8,464 tokens against its cap of 8,192 tokens, so the check leaves out ADR 0001 and ADR 0003. Status prose is 1,121 of those tokens.
src/devops_cli/roadmap/adr.pyreads the status from prose with three regexes (_STATUS_VERB,_SUPERSEDED_BYand_SUPERSEDES, lines 37-43).
This pull request changes no decision.
Proposed Solution & Architectural Design
Bookkeeping only. The pull request holds the status keys, the existing notes moved word for word into a Status History, dated lines for facts that are out of date, the mark on ADR 0003 (superseded by ADR 0017 and ADR 0021), the README with its index, and the parser. It folds #4918 (the ADR index) and #4617 (the link from ADR 0021 to ADR 0022).
- Add
docs/adr/README.md. It holds:- The scope rule: a record is for a choice of structure, a quality attribute, a dependency or tool, an interface, or a process that is difficult to reverse. A value, a permission, a row, a timeout or a rename goes to the spec and the issue.
- The MADR 4 template and the status values: proposed, accepted, rejected, deprecated, superseded.
- The approval rule: an agent writes
proposed, and the owner's merge accepts (decision-makers: [owner]). - An index that a program generates from the front matter.
CONTRIBUTING.md:26and:205link the README and do not copy it.
- Give each record 0001 to 0025 MADR 4 front matter:
status,date,decision-makers,issue,supersedes,superseded-by,amends,amended-by,trackerand a body hash. Move the existing top notes and Status sections word for word to## Status History. - Freeze accepted bodies. After acceptance, a pull request can only change the status keys, add one dated Status History line or fix a broken link. The index test computes the body hash again, so an edit in place fails.
- One form for a Status History line, 30 words at most:
YYYY-MM-DD: Amended by ADR NNNN, section S | Amended by the owner decision in #N, section S | Superseded by ADR NNNN | Fact out of date: <what> (#N) | Living detail moved to <path> (#PR).The pull request that makes a fact of a record wrong adds the line (AGENTS.md rule 8). An agent never edits the body of an accepted record. - Add these Status History lines: 0001 (ROADMAP.md, board fields, milestones), 0006 (where the living detail is; githubkit 0.17.0 prefers httpx2), 0007 (rule edit by fix(tests): repair the bwrap contract suite and gate it #5110), 0008 (go on feat(k8s): the argo workflows controller runs in its own namespace under argo cd and deploy-stack, and a --version workflow measures start-up and api-server load for the go/no-go on moving the roadmap jobs onto it #1535; pins and replicas live in the manifests), 0009 (issues only since feat(release): release-please makes every release from main #1952; replicas), 0015 (permission sets in
constants.pyand the github-app-identity spec; replicas), 0017 (triage lane; 5-minute sweep), 0021 (edits by docs(adr): add the resolve, group, split and step rows #4792, docs(adr): start the watch row in mode on #5056 and feat(roadmap): a fix-plan step repairs a plan PR with open findings #5061; the order is in feat(roadmap): move Service work to Workflows and Valkey #4517; new rows go in their OpenSpec change), 0022 (link to 0021), 0023 (tracker feat(roadmap): track the project brain #4624), 0024 and 0025 (Zensical, feat(docs): move the docs site to Zensical with a full nav and version #5183). - Supersession: the new record sets
supersedes, and the same pull request setsstatusandsuperseded-byon the old record. A link that goes only one way fails the test. The new record restates each rule and each rejected option that still holds, because the alternatives check drops superseded records. A superseded record is never amended. After a third amendment, or when a body contradicts the code, the next change is a supersession. - Length: the body of a new record has 1,000 words or fewer, its title 10 words or fewer and its slug 60 characters or fewer. Designs, catalogues, row tables, cutover plans, caps and measurements go to OpenSpec changes and specs, to settings or to docs, with a link under More Information.
- One Considered Options section. Each bullet ends with
chosen.,rejected, because <reason>.ordeferred until <condition>.. Each record has a Confirmation section that names its test, CI row or metric. src/devops_cli/roadmap/adr.pyreads the front matter with thefront_matterplugin of mdit-py-plugins (pinned inpyproject.tomlanduv.lock) andyaml.safe_load, and drops_STATUS_VERB,_SUPERSEDED_BYand_SUPERSEDES. Updatetests/roadmap/test_roadmap_adr.py. An OpenSpec change updatesopenspec/specs/roadmap-alternatives/spec.md:393-401.- Add a
tests/invariantstest: the index, the links in both directions, the body hash and the length of new records. - Add the status entries to
zensical.toml. - Declare the scope
adr: add the labelscope/adrto.github/labels.ymlandadrto thescopeslist of.github/workflows/pr-title.yml(CONTRIBUTING.md section 4), because the titles of the ADR items use it. - Merge ADR changes in batches. Each change of the ADR set changes
adr_hash(alternatives.py:634-644, 1006) and makes every checked item due again. So all pure status changes go in this pull request, and the record pull requests merge one at a time in the planned order.
Cost to build (estimate, AGENTS.md rule 3): the parser change and the invariant test are small, about 0.5 M tokens and 3 hours elapsed. Keep: the test runs in the static rows in less than 1 second. No open tool keeps a body hash of a MADR record and checks links in both directions.
Target Subsystem
docs/adr/, src/devops_cli/roadmap/adr.py, tests/roadmap/test_roadmap_adr.py, tests/invariants/, openspec/specs/roadmap-alternatives/spec.md, zensical.toml, CONTRIBUTING.md, .github/labels.yml, .github/workflows/pr-title.yml.
Existing Tool Considered
MADR 4 (the template and the front matter keys), the front_matter plugin of mdit-py-plugins and PyYAML, which the project uses now. No new dependency.
Acceptance Criteria
- A test fails on a record with no
status, on a supersession link that goes only one way, and on a missing link. - A test fails when the generated index differs from
docs/adr/README.md. - A test fails on an edit of the body of an accepted record, through the body hash.
- A test fails on a new record with more than 1,000 words.
-
uv run pytest tests/roadmap/test_roadmap_adr.pypasses, andadr.pyholds no status regex. - Measured: the alternatives check fits every record in force under its cap of 8,192 tokens (
fit_to_budgetkeeps each one, ADR 0001 and ADR 0003 included). The pull request comment gives the token count before and after. -
uv run devops ci --check --only docspasses. - This pull request changes no decision.
Dependencies
None. Each other pull request that changes docs/adr/ waits for this one.
Related
- Folds feat(docs): generate the ADR index with the status of each ADR #4918 (generate the ADR index with the status of each ADR) and docs(adr): link the naming record ADR 0022 and the move record ADR 0021 #4617 (link ADR 0022 and ADR 0021).
- fix(roadmap): the ADRs in force fill the alternatives ADR budget #5049 (the budget test of the alternatives check).
Activity
dan-petty commentedon Nov 12, 2026
adr, and .github/labels.yml declares no scope/adr label. Add the label to the file to give the scope to this item.Both work on the ADR index in docs/adr/README.md, but #4918 asks only for the generated index while the candidate adds the full MADR structure, Status History, rules, and parser changes around it.docs(openspec): archive the change of #5225
docs(openspec): archive the change of #5225