Skip to content

feat(docs): generate the ADR index with the status of each ADR #4918

Open

Description

@dan-petty

Problem or Motivation

docs/adr/ has 24 ADRs and no index. 3 of them are superseded (0002, 0011, 0012), but an agent or the brain sees the status only when it reads each file. The content census found 136 findings in superseded ADRs and 48 in ADRs in force, so the status decides if a finding matters.

Proposed Solution & Architectural Design

  1. Add a generator output docs/adr/README.md from read_adrs of src/devops_cli/roadmap/adr.py: number, title link, status (in force, or superseded or amended by N) and date.
  2. Add it to the generated class of CONST_DOCS_INVENTORY, so the attribute of chore(docs): mark the generated documents as generated #4888 marks it.
  3. The docs/index.md block of feat(docs): generated pages name their source and stay complete #4889 lists it.
  4. A new ADR PR regenerates it. A conflict follows the conflict step of chore(docs): mark the generated documents as generated #4888.

Target Subsystem

SDLC, Git & PR Governance (docs/adr/, the docs generator).

Existing Tool Considered

The adr-tools generate toc practice, built on the existing ADR parser. adr-tools itself does not read the status form of these ADRs. Cost: about 60 lines plus tests, about 40k tokens and 1 h (estimate).

Acceptance Criteria

  • docs/adr/README.md lists all ADRs and shows 0002, 0011 and 0012 as superseded.
  • The docs row fails when a new ADR file has no index row.
  • git check-attr linguist-generated is true for the file.

Dependencies

#4889.

Source: #4880

Alternatives check of 2026-11-27: partly.
Tool: thomvaill/log4brains (https://github.com/thomvaill/log4brains), Apache-2.0, last activity 2024-12-17, not maintained.
Reason: Searches found log4brains, which builds an ADR index and timeline from MADR front matter, so it covers index generation with status, but it publishes a static site with no committed README block and no stale-index check.

Covers:

  • Builds an index and timeline of all ADRs
  • Reads MADR front matter and guesses status from git logs
  • Serves a searchable ADR site

Lacks:

  • Writes no committed docs/adr/README.md block
  • No check that fails when a record has no index row
  • Node toolchain instead of the project's Python read_adrs parser

Proposed design

Problem statement

A reader must open each record of docs/adr/ to learn its status. 4 of the 26 records are superseded, and a finding in a superseded record does not matter, so the status decides the reading. The item adds a generated index of number, title, status and date to docs/adr/README.md, and a check that fails when a record has no row. #5225 carries that generator and its invariant test, so this item waits on the merge of #5225.

Acceptance criteria

Requirement: Index lists each record

docs/adr/README.md SHALL hold one row for each record of docs/adr/ with its number, its linked title, its status and its date.

Scenario: A superseded record shows its status

  • WHEN the index block is generated from the 26 records, including 0002, 0003, 0011 and 0012
  • THEN the Status cell of each of 0002, 0003, 0011 and 0012 reads superseded, and the row links to the file of that record.

Requirement: Stale index fails the docs row

uv run devops docs check SHALL exit non-zero when the index block differs from the records.

Scenario: A new record has no index row

  • WHEN a test writes a record file into docs/adr/ and leaves the index block unchanged
  • THEN uv run devops docs check exits non-zero and names docs/adr/README.md.

Requirement: The generator rewrites only the block

uv run devops docs generate MUST change only the text between <!-- ADR_INDEX_START --> and <!-- ADR_INDEX_END -->.

Scenario: The hand-written rules stay

  • WHEN the generator runs on docs/adr/README.md
  • THEN the text before <!-- ADR_INDEX_START --> and the text after <!-- ADR_INDEX_END --> is unchanged.

Requirement: The page keeps its hand-written class

docs/adr/README.md MUST stay in the hand-written class of CONST_DOCS_INVENTORY, and git check-attr linguist-generated MUST report unspecified for it.

Scenario: The file is not marked generated

  • WHEN git check-attr linguist-generated docs/adr/README.md runs in the repository
  • THEN the output ends in unspecified, and CONST_DOCS_INVENTORY holds that path in a class other than generated.

Existing Tool Considered

thomvaill/log4brains (https://github.com/thomvaill/log4brains, Apache-2.0, last activity 2024-12-17, not maintained) generates an index and a timeline of the ADRs from the MADR front matter of each record. It publishes a static site instead of a committed docs/adr/README.md, it has no invariant test that fails when a record has no row, and it needs a Node toolchain while the reader of the records, read_adrs, is Python. The project keeps its own generator: about 60 lines plus tests, about 40k tokens and 1 h.

Key questions

  • How many records does docs/adr/ hold, and which of them are superseded?: The folder holds 26 records, 0001 to 0026. 4 are superseded: 0002 by 0015, 0003 by 0017 and 0021, 0011 by 0012, and 0012 by 0013. The body counts 24 records and 3 superseded records, and that count is out of date. [sources: docs/adr/README.md, docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md, docs/adr/0012-releases-are-derived-by-release-please-from-trunk-and-milestones-are-planning-buckets.md]
  • Which columns does the index hold for the status of a record?: The index holds the front matter status in a Status column, and the numbers of supersedes, superseded-by, amends and amended-by in a Links column. (best practice) [sources: docs/adr/README.md, src/devops_cli/roadmap/adr.py]
    • Rejected: One Status cell with the prose form. The cell then holds a different sentence for each record, and the generator needs a grammar for each form.
    • Chosen: A Status column from status and a Links column from the link keys. Each cell copies a front matter value, so the generator writes the text that AdrFrontMatter gives it.
  • Is docs/adr/README.md a generated document, or a hand-written document with a generated block?: It is a hand-written document, and the index is a generated block between the two markers. The page keeps the hand-written class of CONST_DOCS_INVENTORY, and no linguist-generated attribute applies to it. (best practice) [sources: docs/adr/0025-generated-documents-stay-in-git-and-the-project-brain-cites-them.md, docs/adr/README.md, CONTEXT.md, CONTRIBUTING.md]
    • Rejected: A generated document in the generated class. The page holds the ADR rules, the front matter table and the template, and no generator writes them. A generated document is never edited by hand, and the docs row refuses it when it is not the output of its generator.
    • Chosen: A hand-written document with a generated block. ADR 0025 names the command matrix of README.md as a generated block in a hand-written file, and the page already delimits the index with two markers.
  • Does this item build the index generator, or does it wait on docs(adr): add MADR front matter, a Status History and the ADR rules #5225?: It waits on docs(adr): add MADR front matter, a Status History and the ADR rules #5225. The pull request of docs(adr): add MADR front matter, a Status History and the ADR rules #5225 adds the generator and the invariant test, and the page states that devops docs generate writes the table and that devops docs check fails when the table is out of date. (best practice) [sources: docs/adr/README.md, src/devops_cli/roadmap/adr.py:197]
  • Which open, maintained tool covers the ADR index?: No tool covers the whole need. thomvaill/log4brains generates an index from the MADR front matter, but it publishes a static site, it has no invariant test, and it needs Node. The project keeps its own generator on read_adrs. (best practice) [sources: src/devops_cli/roadmap/adr.py:197]
    • Rejected: Adopt thomvaill/log4brains. Its last activity is 2024-12-17, it writes no committed markdown file, and its Node toolchain does not read the records through read_adrs.
    • Chosen: Keep the project's generator on read_adrs. It costs about 60 lines plus tests, about 40k tokens and 1 h, and it reads the records with the parser that the alternatives check already uses.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4889, #5225

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/feature
    scope/docs
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  3. removed
    effort/low
    on Nov 12, 2026
  4. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/docs. The (docs) scope of the title gives the scope.
    • Priority: P2-Medium. It improves ADR navigation for agents and people but does not block a release or fix a defect.
    • Value: Medium. It saves time reading 24 ADR files to find their status, but the information is still available in each file.
    • Effort: Low. The body estimates about 60 lines plus tests and 1 hour of work.
    • Related: feat(ai): generate the project digest from code at run time #3904, which asks for a different change. Both generate documentation files from source data, but #3904 produces a project digest while this candidate produces an ADR status index.
  5. added
    effort/low
    on Nov 12, 2026
  6. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/docs. The (docs) scope of the title gives the scope.
    • Priority: P2-Medium. The index helps agents and readers find superseded ADRs, but no defect blocks the work.
    • Value: Medium. Readers see the status of each ADR in one file and skip 136 findings in superseded records.
    • Effort: Low. The body estimates about 60 lines plus tests, near 1 hour of work.
    • Related: docs(adr): link the naming record ADR 0022 and the move record ADR 0021 #4617, which asks for a different change. Both items work on the links in docs/adr, but 4617 adds two missing ADR links and the candidate generates an index file.
  7. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    #5225 folds this item. Its pull request adds docs/adr/README.md with an index that a program generates from the MADR front matter of each record, and a tests/invariants test fails when the index differs. The status of each record comes from its front matter, not from prose.

    This item stays open until #5225 merges. Its pull request names this item with no closing keyword.

  8. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: The only ADR-aware tool the searches surfaced is Log4brains, which reads ADRs written in markdown (MADR by default) in git and generates a browsable index/timeline of them with their metadata, so it covers the "generate an index of all ADRs from their records" part. It does not produce a committed docs/adr/README.md marked as generated, nor an invariant that fails when a new ADR has no index row, and the reply says the project's own PR #5225 already adds exactly that generator and test.

    Tool: thomvaill/log4brains (https://github.com/thomvaill/log4brains)

    • License: Apache-2.0
    • Last activity: 2024-12-17
    • Maintained: no

    Covers:

    • Generates an index/timeline of all ADRs from the markdown records kept in the git repository
    • Reads each ADR's metadata (including its status) from its raw text and git logs, using the MADR template by default
    • Keeps the ADR files themselves in the repository as the source of truth

    Lacks:

    • Writes a generated markdown file such as docs/adr/README.md committed in git; it publishes a static website instead
    • No invariant test that fails when a new ADR has no index row
    • No marking of the output as linguist-generated
    • Node/npm toolchain, while the project's generator and read_adrs are Python

    Tools considered:

    Searches run:

    • generate ADR index table of contents from markdown front matter status tool, results: 5
    • adr-tools generate toc status of ADRs, results: 5
    • log4brains architecture decision records index status, results: 5
    • adr-tools github nat Pryce generate toc, results: 5
    • log4brains, results: 5
    • adr-tools, results: 5
    • adr-viewer, results: 5
    • "adr generate toc", results: 5
    • MADR markdown architecture decision records, results: 5
    • architecture decision records tooling index status, results: 5

    Sources:

    Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.

  9. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at fccb781 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

  10. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    This item is delivered on main by #5270, but it stays open and refine-blocked on #4889. Close it as completed. No acceptance point of the refine design stays open.

    Evidence (origin/main 0d90de5, 2026-11-19)

    Each requirement of the refine design, checked on main:

    Requirement State Evidence
    Index lists each record Done docs/adr/README.md:144-178 holds the ADR_INDEX_START block with 29 rows for the 29 records 0001 to 0029. Each row links to its file. 0002, 0003, 0011 and 0012 show superseded (lines 149, 150, 158, 159).
    Stale index fails the docs row Done DocGenerator.synced_blocks (src/devops_cli/docs/generator.py:1320) adds the block to generate_all_docs (line 1380), so devops docs check compares it. tests/invariants/test_adr_records.py:22 fails when the block is not the output of sync_index (src/devops_cli/docs/adr_records.py:120).
    The generator rewrites only the block Done sync_index keeps the text before the start marker and after the end marker (adr_records.py:123-127). tests/docs/test_docs_adr_records.py:189 and :201 test it.
    The page keeps its hand-written class Done git check-attr linguist-generated docs/adr/README.md prints unspecified. The record glob docs/adr/[0-9]*.md (src/devops_cli/config/constants.py:527) does not match the README.

    Body points that the refine design replaced or that moved

    Why the item stays open

    Proposed action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/docssource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions