Skip to content

docs(decisions): accept ADRs 0018, 0020, 0021 and enforce the record contract - #576

Merged
ss-o merged 1 commit into
mainfrom
code/adr-acceptance-0018-0020-0021
Aug 30, 2026
Merged

docs(decisions): accept ADRs 0018, 0020, 0021 and enforce the record contract#576
ss-o merged 1 commit into
mainfrom
code/adr-acceptance-0018-0020-0021

Conversation

@ss-o

@ss-o ss-o commented Aug 30, 2026

Copy link
Copy Markdown
Member

Summary

Maintainer ss-o accepts three decision records whose source issues are closed and whose implementations already exist in the repository:

ADR Title Source issue
0018 Adopt Portable Worktree Management #542 (closed)
0020 Adopt Zsh Plugin Standard 2 #557 (closed)
0021 Derive Chroma Command Knowledge at Runtime z-shell/F-Sy-H#73 (closed)

Acceptance follows runbooks/adr.md: the flip happens on main through a merged pull request, and each record names its accepting maintainer. ADR 0010 is deliberately not included; it stays PROPOSED pending the open items tracked in #454.

Defects fixed

Two problems were found while reviewing the proposed set.

ADR 0011 used a non-standard header. It carried a bare ## Status section with standalone Date: / Deciders: lines, while every other record uses the - **Status:** bullet block. Any tooling that reads status by the common pattern skipped it silently. Its header now matches its neighbours; no decision content changed.

decisions/ had no index. A stale status was discoverable only by reading all 21 files. Rather than add prose that would drift in turn, scripts/decision-records.py now owns both the header contract and the generated index at decisions/README.md, and CI runs it.

The contract checks header field presence and order, recognized statuses, ISO 8601 dates, agreement between the title number and the filename number, and refuses an ACCEPTED record that still names no deciding maintainer, which is the Deciders: TBD rule from runbooks/adr.md made executable.

The renderer pads table columns to match the repository formatter, so the generated index is a fixed point under trunk fmt and cannot oscillate against its own --check.

Supporting changes

  • scripts/validate-agent-policy.py learns a GENERATED_INVENTORY map, so a generated file inside a scanned inventory directory is recognized without becoming unconditionally required of every synthetic test fixture.
  • Both new files are declared as manifest surfaces in .github/instruction-surfaces.json.
  • The routed-worktree test pinned ADR 0018 to the literal string - **Status:** PROPOSED. It now pins the accepted state instead; the general header shape is the new validator's job.
  • agent-instructions.yml runs the new unit tests and --check, and its pull_request and push path filters both cover the new files.

Verification

python3 -m unittest scripts/test_validate_agent_policy.py        84 tests, OK
python3 -m unittest scripts/test_decision_records.py             15 tests, OK
python3 -m unittest scripts/test_validate_zsh_standard_policy.py 99 tests, OK
python3 scripts/validate-zsh-standard-policy.py                  passed
python3 scripts/validate-agent-policy.py                         passed
python3 scripts/decision-records.py --check                      passed
trunk check --no-fix                                             no new findings

Pre-existing defect, reported not fixed

scripts/test_validate_zsh_standard_policy.py fails trunk black formatting on a clean checkout of main, before any change in this branch. It is untouched here and needs its own change.

References

…contract

Maintainer ss-o accepts three decision records whose source issues are closed
and whose implementations already exist in the repository:

- 0018 Adopt Portable Worktree Management (#542)
- 0020 Adopt Zsh Plugin Standard 2 (#557)
- 0021 Derive Chroma Command Knowledge at Runtime (z-shell/F-Sy-H#73)

Acceptance follows runbooks/adr.md: the flip happens on main through a merged
pull request and each record names its accepting maintainer.

Two defects found while reviewing the set are fixed here:

ADR 0011 used a different header shape from every other record, with a bare
`## Status` section instead of the `- **Status:**` bullet block. Any tooling
that reads status by the common pattern skipped it silently. Its header now
matches its neighbours; no decision content changed.

decisions/ had no index, so a stale status was discoverable only by reading
all 21 files. Rather than add prose that would drift in turn,
scripts/decision-records.py owns both the header contract and the generated
index at decisions/README.md, and CI runs it. The contract checks field
presence and order, recognized statuses, ISO dates, number agreement between
title and filename, and refuses an ACCEPTED record that still names no
deciding maintainer.

The renderer pads table columns to match the repository formatter, so the
generated index is a fixed point under `trunk fmt` and cannot oscillate
against its own `--check`.

Supporting changes: the agent policy validator learns a GENERATED_INVENTORY
map so a generated file inside a scanned inventory directory is recognized
without being unconditionally required of every fixture; both new files are
declared as manifest surfaces; and the routed-worktree test now pins ADR 0018
to its accepted state instead of the pre-acceptance PROPOSED text.
@ss-o
ss-o requested a review from a team as a code owner August 30, 2026 05:42
@ss-o
ss-o merged commit d0d5dc9 into main Aug 30, 2026
7 checks passed
@ss-o
ss-o deleted the code/adr-acceptance-0018-0020-0021 branch August 30, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant