plugin hook: refuse an agent commit that decides or edits a record without the person's token #662
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#673 epic: a decided record needs a second contributor's sign-off
sixfold-space/madtea
#656 adr check: count contributors by access to the repo
sixfold-space/madtea
Reference
sixfold-space/madtea#662
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
A hook in madtea's Claude Code plugin, before
madt_commitandmadt_finish. When the change moves a record to a decided status, or edits a decided record, the hook looks in the agent's own session file for the token: a message the person typed, or an answer the person picked that is exactly the token. When the session has none, a token already on a decision issue, from a contributor who is not the session's account, also counts. Otherwise the hook refuses: nothing is committed, and the refusal tells the agent to ask the person, with one option labelled exactly with the token.The session file format is not a documented contract, so the hook refuses with a clear message when it cannot read the file. The hook reads no setting that the agent can change (ADR 0009).
Depends on
Acceptance
Tests with session files taken from real sessions: a typed token allows; an answer that is exactly the token allows; a token in the agent's own text or in a tool output does not; no token refuses; an unreadable session file refuses; an edit to a decided record with no token refuses.