madtea plugin: steer decision records through madtea adr #17

Open
opened 2026-09-28 20:27:47 +00:00 by hexajon · 0 comments
Owner

Problem

madtea adr new numbers a new decision record from the forge and
adds its index row. madtea adr check verifies the whole tree:
frontmatter, sections, and the linked issues. Nothing in the madtea
plugin steers an agent to use them. An agent can write
docs/decisions/0042-x.md by hand, with a wrong number, no index row,
and no check. The tree then drifts until someone runs adr check by
chance.

Proposal

A new hook in plugins/madtea/hooks/scripts/, next to the
check-git-*.sh hooks:

  1. A new file under docs/decisions/, created by a file write, is
    denied. The deny message names madt_adr action=new
    (CLI: madtea adr new).
  2. A commit or finish that touches docs/decisions/ is denied while
    madtea adr check fails on that tree. The deny message holds the
    check output.
  3. A repo with no docs/decisions/ tree is never affected.

Acceptance criteria

  • Writing a new record file by hand is denied, and the message
    names madt_adr action=new.
  • madt_adr action=new itself is not blocked.
  • A commit or finish that leaves madtea adr check failing is
    denied, with the check output in the message.
  • A repo without docs/decisions/ is never blocked.
  • Tests cover each case.

Related: sixfold-space/madtea#496 (adr tooling guides the author).

## Problem `madtea adr new` numbers a new decision record from the forge and adds its index row. `madtea adr check` verifies the whole tree: frontmatter, sections, and the linked issues. Nothing in the madtea plugin steers an agent to use them. An agent can write `docs/decisions/0042-x.md` by hand, with a wrong number, no index row, and no check. The tree then drifts until someone runs `adr check` by chance. ## Proposal A new hook in `plugins/madtea/hooks/scripts/`, next to the `check-git-*.sh` hooks: 1. A new file under `docs/decisions/`, created by a file write, is denied. The deny message names `madt_adr action=new` (CLI: `madtea adr new`). 2. A commit or finish that touches `docs/decisions/` is denied while `madtea adr check` fails on that tree. The deny message holds the check output. 3. A repo with no `docs/decisions/` tree is never affected. ## Acceptance criteria - [ ] Writing a new record file by hand is denied, and the message names `madt_adr action=new`. - [ ] `madt_adr action=new` itself is not blocked. - [ ] A commit or finish that leaves `madtea adr check` failing is denied, with the check output in the message. - [ ] A repo without `docs/decisions/` is never blocked. - [ ] Tests cover each case. Related: sixfold-space/madtea#496 (adr tooling guides the author).
Sign in to join this conversation.
No labels
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/claude-plugins#17
No description provided.