Skip to content

Convert planning/decisions to numbered ADRs in docs/adr - #8

Closed
lesnik512 wants to merge 1 commit into
chore/agent-skills-configfrom
docs/native-adrs
Closed

Convert planning/decisions to numbered ADRs in docs/adr#8
lesnik512 wants to merge 1 commit into
chore/agent-skills-configfrom
docs/native-adrs

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Why

planning/decisions/ is a private convention at a private address. Every agent
skill that reads decisions looks in docs/adr/ by default, so chat-app had to
either configure each one or accept that /domain-modeling would eventually
stand up a second decision home next to the first. planning/README.md already
argues at length against exactly that: a prose copy of a fact another file owns
goes stale in the copy nobody edits, which is why architecture/ was deleted.

Dated slugs also carry nothing here. All thirteen files are 2026-08-21, so the
date sorts them into an order that means nothing, and there is no short, stable
way to cite one.

Design

Move the thirteen decisions to docs/adr/NNNN-slug.md and keep the content
discipline that made them better than stock ADRs. This is a port, not a
replacement: ## Rejected: <option>, ## Consequence and ## Revisit trigger
all survive, and docs/adr/README.md records that the local standard is
deliberately stricter than the format /domain-modeling writes, which treats
rejected alternatives as optional and expects a three-sentence body.

Numbers are dependency order, not chronology. Reading 0001 upward
introduces the system in the order its decisions build on each other: identity
(0001), auth (0002-0004), the error and authorization vocabulary
(0005-0006), write patterns (0007-0008), chat state (0009-0010),
events (0011-0012), then testing policy (0013). New ADRs take the next
free number and land at the end regardless of where they belong conceptually;
renumbering would break every reference, so that cost is accepted.

summary frontmatter is dropped. It existed to feed just index, and
dated slugs needed it because they do not sort by meaning. Numbered slugs do. In
four of the thirteen files the slug and the # title were already the same
sentence with different punctuation, so summary was a third telling. The
directory listing is now the index: numbered, ordered, zero code, cannot drift.
Frontmatter appears only on a superseded ADR, so no frontmatter means accepted.

docs/adr/check.py replaces the half of planning/index.py that validated
decisions, and validates more than it did. _check_decision only ever checked
the filename and a non-empty summary; the new checker enforces contiguous
unique numbering (the real hazard: two branches both grabbing 0014), the
NNNN-slug name, a ## Revisit trigger on every ADR, and that superseded_by
resolves to an ADR that exists. The revisit trigger was previously enforced for
deferred items only and held for decisions by habit; all thirteen already had
one, so enforcing it costs nothing today and stops the habit lapsing.

It lives beside the files it governs, following planning/index.py's own
precedent, and is wired into just check-adrs, the CI lint job, and
pyproject.toml's coverage omit list for the same reason the other two
planning/ scripts are there.

planning/ keeps deferred/ and everything that serves it. index.py loses
load_decisions, _check_decision, the superseded_by rendering and the
Decisions section; links.py is untouched.

Non-goals

  • Does not convert modern-di. planning/README.md records this as
    deviation 7 and states plainly that deviations 1-5 match modern-di and this
    one does not yet. Promotion to convention 3.0.0 waits until the layout has
    been lived with, which is the whole point of not doing both repos at once.
  • Does not extract CLAUDE.md's Vocabulary section to CONTEXT.md. That is
    the next PR. docs/agents/domain.md still names a CONTEXT.md that does not
    exist, and its own consumer rules say to proceed silently when it is absent.
  • Does not record this conversion as an ADR. It is a decision about where
    decisions live, and this body plus deviation 7 is where that reasoning belongs.
  • Does not edit any decision's substance. The only content change inside the
    thirteen is 0002's cross-link, repointed from the dated filename to 0003.
  • Does not add a generated ADR listing. At thirteen files with slugs this
    descriptive the directory is enough. Past roughly forty it would not be, and
    that is the point to revisit, not now.

Verification

  • just test: 109 passed, total coverage 100.00% (Required test coverage of 100% reached). This matters more than it looks: --cov=. with
    --cov-fail-under=100 would have failed on the new uncovered script had the
    omit entry been missed.
  • just test-migrations: 4 passed.
  • just lint: ruff format reformatted 1 file (docs/adr/check.py), ruff check and ty check both clean under select = ["ALL"].
  • just check-adrs: adr: OK.
  • just check-planning: planning: OK.
  • just check-links: links: OK — the gate that covers the cross-reference
    updates in CLAUDE.md, readme.md, the PR template, planning/README.md and
    the one deferred item that cites a decision.
  • The checker was exercised against a fixture directory holding a duplicate
    number, a numbering gap, a malformed name, a missing revisit trigger and a
    dangling superseded_by: all five reported, exit 1.
  • grep confirms no planning/decisions reference remains anywhere in the repo.

Note on the diff

This branch carries the staged Justfilejustfile rename that was already
in the working tree, since the recipe for just check-adrs is added to that
file.

@lesnik512
lesnik512 deleted the branch chore/agent-skills-config August 23, 2026 10:34
@lesnik512 lesnik512 closed this Aug 23, 2026
@lesnik512

Copy link
Copy Markdown
Member Author

Closed automatically when its base branch chore/agent-skills-config was deleted on the squash-merge of #7. It cannot be reopened: GitHub refuses with state cannot be changed. The docs/native-adrs branch was force-pushed or recreated. after the branch was restacked onto main. Continues as #9 with the same commits.

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