Skip to content

Restructure ADRs into short decision records #3744

Open

Description

@thymikee

Purpose

ADRs must record decisions, not implementations. Today docs/adr/ has 33 ADRs and 689 KB. Several ADRs are 40–94 KB and mix the decision with file maps, measurements, rollout plans, and amendment history. Contributors and agents cannot find the current decision quickly, and the implementation detail gets stale.

Required behavior

  • Add docs/adr/FORMAT.md with the authoring rules. Give it its own byte budget in the agent-guidance test.
  • Split the AGENTS.md route: "Read architecture decisions" goes to docs/adr/README.md. "Write or amend an ADR" goes to docs/adr/FORMAT.md.
  • Write an ADR only if the decision is hard to reverse, surprising without context, and the result of a real trade-off.
  • An ADR contains the decision (API, data flow, invariants, constraints, boundaries), why, the rejected alternatives with reasons, and the consequences and open gaps. Exact names (commands, wire fields, typed reasons) stay when they explain the decision.
  • An ADR does not contain implementation inventories, measurements, rollout or migration plans, PR logs, or status change-logs. Each moves to its owner: registries, types, and gates; package docs and help; docs/evidence/; or an umbrella issue.
  • An ADR is a living record. The decision states the current truth. An optional dated "Decision history" line records a real change of direction, with its reason and a link. A new ADR is written only when the problem or the scope changes.
  • Proposals live in umbrella issues. An ADR is written when a decision is accepted.

Completion conditions

  • Each ADR has one classification: keep, merge, move to evidence, or convert to an issue.
  • Each kept decision is checked against the code. If the code changed for a good reason, the ADR states the new decision and its reason. If the code drifted by mistake, an issue records it.
  • Each PR has a migration ledger: old section → kept, moved to a named owner, or deleted with a reason.
  • Each PR updates the code comments that cite the ADR sections that it changes.
  • A size gate (about 8 KB for each ADR) runs last, with no allowlist.

Dependencies

Activity

  1. thymikee commented on Oct 16, 2026

    @thymikee
    MemberAuthor

    Decision: classification of the ADRs (maintainer, 2026-10-16).

    • Delete the Proposed ADRs 0018 (unified event journal), 0020 (composable recorded fragments), and 0028 (capability cell vocabulary). Create no issue for them. Git history keeps their text.
    • ADR 0024 (screen recording): move its implemented decisions to an accepted record. Track the remaining work in its own umbrella issue. Then delete the proposal.
    • ADR 0023 (hop trace): move to docs/evidence/. It is a measurement, not a decision.
    • ADR 0033 (collocation table): move the placement audit to docs/evidence/. Keep only a general decision, if one passes the three-condition test.
    • ADR 0003 (daemon command registry): merge into ADR 0008 (command descriptor registry). ADR 0003 becomes a short redirect.
    • ADRs 0022 (coupling audit) and 0027 (closure budget): move the audits and tables to docs/evidence/. Merge their lasting decisions into ADR 0019.
    • Keep the other ADRs, after a check that each decision still holds.
    • Use PRs of one to three related ADRs. Start with a pilot on ADR 0003/0008 and ADR 0012.
  2. thymikee commented on Oct 16, 2026

    @thymikee
    MemberAuthor

    Decision: results of the ADR decision audit (maintainer, 2026-10-16).

    Four read-only audits checked each decision of each kept ADR against the code at bd4fd688e7. About 33 differences are deliberate: the ADR text follows the code, with one dated "Decision history" line when the direction changed. These differences are real drift, and the code gets fixed:

    1. ADR 0019: binding cleanup runs after the execution lock is released. The lock must cover the cleanup.
    2. ADR 0012: a healed script drops snapshots that the author wrote and --record corrections.
    3. ADR 0031: a macOS screenshot can capture the largest window instead of the front window. Refuse with a typed error.
    4. ADR 0025: panel identity can come from array order when no panel is primary. Refuse with a typed error.
    5. ADR 0012: replay suggestions do not rank candidates in the same scroll region first.
    6. ADR 0010: the SDK lease client throws a bare Error.
    7. ADR 0033: two internal barrels in packages/daemon/src/sessions/.
    8. ADR 0022: the R75 gate message offers an ADR approval that the gate does not have.

    Text-only drift (ADRs 0007, 0011, 0012, 0025) is corrected in the restructure.

    ADR 0012 splits into about five short ADRs, one for each independent decision: no unattended selector rewriting; resolution disclosure; portable target identity; resume and divergence; repair ownership. Each contract that lives only in ADR 0012 gets an owner before it leaves the ADR.

    The classification in the first Decision: comment still fits: every kept ADR passes the three-condition test.

  3. thymikee commented on Oct 16, 2026

    @thymikee
    MemberAuthor

    Current state: 2026-10-16.

    Merged:

    Open, ready for review:

    Ready, not opened:

    Next step: after #3729, #3731, and the stale-facts PR merge, add docs/adr/FORMAT.md and the two AGENTS.md routes. Then start the pilot on ADR 0003/0008 and the split of ADR 0012.

  4. thymikee commented on Oct 18, 2026

    @thymikee
    MemberAuthor

    Current state: 2026-10-18.

    The prerequisites have merged: #3729, #3731, and stale-facts PR #3796. The stale-facts merge is 0fb25c474a. All 25 source threads received the PR link. Those threads remain open, as requested. The independent sentence review and all required checks passed before merge.

    The first restructure batch is now in progress. It adds docs/adr/FORMAT.md, separate read and write routes in AGENTS.md, and a byte budget for FORMAT.md. It changes no ADR record. It adds no general ADR size gate.

    After that PR merges, the next batch is the ADR 0003/0008 pilot. The ADR 0012 split follows in the planned five decision groups. Each migration must move a still-true contract to its owner before deletion. The general ADR size gate remains last.

    Separate open follow-up: #3791 was rebased onto the stale-facts merge. It awaits independent review and CI. Its daemon startup changes do not alter the restructure sequence.

  5. thymikee commented on Oct 18, 2026

    @thymikee
    MemberAuthor

    Current state: 2026-10-18.

    #3799 has merged. It adds docs/adr/FORMAT.md, the read and write routes in AGENTS.md, and the format file's 4,000-byte budget. Independent sentence review and all required checks passed at 8e46e04c1e.

    No ADR record changed in that batch. The next batch remains the ADR 0003/0008 pilot. The ADR 0012 split follows in five decision groups. The migration ledger and move-before-delete rule apply to each batch. The general ADR size gate remains last.

    The maintainer requested a design review of #3797. That review now has priority. The ADR pilot is queued until this review is complete.

  6. thymikee commented on Oct 19, 2026

    @thymikee
    MemberAuthor

    Current state: 2026-10-19.

    #3810 merged at 82c0d705e4. ADR 0008 now owns the command-descriptor and daemon-policy decision. ADR 0003 is a short redirect. The migration ledger, independent sentence review, and validation evidence are in #3810. The FORMAT/routes batch #3799 and stale-facts batch #3796 are also merged.

    No restructure PR remains open from this coordinator. ADR 0012 is next. Its read-only plan keeps five decisions: no unattended selector rewrites, resolution disclosure, portable target identity, divergence/resume, and repair ownership. Authoring has not started. Refresh the code evidence and available ADR numbers before implementation. Move every still-true contract to its owner before deleting its old home. Use batches of one to three related ADRs. Keep the general size gate last.

    This coordinator thread is closing at the maintainer's request. The remaining classification and migration work stays open in this issue.

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

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions