feat(adr): MADR 4.0.0 tooling for adr new/check, plus a new adr init #484

Merged
hexajon merged 2 commits from issue-483-adr-align-the-adr-tooling-with-madr-4-exactly-docs into main 2026-09-14 15:41:03 +00:00
Owner

Summary

Aligns madt_adr / madtea adr with MADR 4.0.0.

  • Layout detection: docs/decisions/ is MADR mode, docs/adr/ is the legacy mode (behaviour unchanged). A repo with both trees is an error. A repo with neither points at adr init.
  • New adr init action: creates docs/decisions/ with the MADR 4.0.0 templates (bare and explained), record 0000, and a README index.
  • adr new in MADR mode writes the bare MADR template with the status, date, decision-makers, optional impacts, title, and tracking substitutions. Numbering stays origin-first and is layout-aware.
  • adr check in MADR mode validates the YAML frontmatter (status grammar, date, mandatory sections in order, unique numbers, resolvable links, two-way supersedence) and, for an undecided record, that its tracking issues are open in the top-level repo (git config madtea.adr.topLevelRepo) and every impacts repo. --offline skips the forge round trip. Legacy docs/adr/ trees keep the current checks unchanged.
  • Vendors the MADR 4.0.0 templates verbatim from adr/madr tag 4.0.0 under internal/service/adr/madr/ (MIT OR CC0-1.0).

Refs #483. The repository's own docs/adr/ tree stays on the legacy format in this change; converting it to docs/decisions/ MADR is the follow-up pass under the same issue.

Refs #483

## Summary Aligns `madt_adr` / `madtea adr` with MADR 4.0.0. - Layout detection: `docs/decisions/` is MADR mode, `docs/adr/` is the legacy mode (behaviour unchanged). A repo with both trees is an error. A repo with neither points at `adr init`. - New `adr init` action: creates `docs/decisions/` with the MADR 4.0.0 templates (bare and explained), record 0000, and a README index. - `adr new` in MADR mode writes the bare MADR template with the status, date, decision-makers, optional impacts, title, and tracking substitutions. Numbering stays origin-first and is layout-aware. - `adr check` in MADR mode validates the YAML frontmatter (status grammar, date, mandatory sections in order, unique numbers, resolvable links, two-way supersedence) and, for an undecided record, that its tracking issues are open in the top-level repo (git config `madtea.adr.topLevelRepo`) and every `impacts` repo. `--offline` skips the forge round trip. Legacy `docs/adr/` trees keep the current checks unchanged. - Vendors the MADR 4.0.0 templates verbatim from adr/madr tag 4.0.0 under `internal/service/adr/madr/` (MIT OR CC0-1.0). Refs #483. The repository's own `docs/adr/` tree stays on the legacy format in this change; converting it to `docs/decisions/` MADR is the follow-up pass under the same issue. Refs #483
feat(adr): MADR 4.0.0 tooling for adr new/check, plus a new adr init
All checks were successful
drift / govulncheck (pull_request) Has been skipped
drift / surface-diff (pull_request) Successful in 1m8s
drift / forgejo-smoke (pull_request) Has been skipped
ci / mcp-conformance (pull_request) Successful in 1m56s
ci / mcp-conformance (push) Successful in 6s
drift / govulncheck (push) Has been skipped
drift / surface-diff (push) Successful in 3s
drift / forgejo-smoke (push) Has been skipped
ci / gate (push) Successful in 9m1s
ci / gate (pull_request) Successful in 16m18s
6bb572615a
Refs #483
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea!484
No description provided.