veto_decisions
Record architectural decisions as machine-checkable constraints and check diffs or working trees for forbidden patterns, blocking or warning on violations.
Instructions
Decision-drift enforcement: records architectural decisions as machine-checkable constraints, then flags diffs that violate them. AI assistants forget decisions and re-litigate them sessions later — record "we use Postgres" with forbidden_patterns ["mongoose", "mongodb"] once, and veto_diff_review / veto_ci_gate automatically fail any future diff that adds them. Actions: add (rule + forbidden_patterns), list, check (a diff or the working tree), disable / enable (by id), decline (a constraint_invitation the user said no to). When a council verdict or ADR carries a constraint_invitation, pass its invitation_id to add or decline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | disable/enable: the constraint id. | |
| why | No | add: rationale, shown alongside violations. | |
| diff | No | check: a unified diff to check. Omit to read uncommitted git changes from project_dir. | |
| rule | No | add: the decision in human terms, e.g. "We use Postgres — no Mongo". | |
| action | Yes | What to do. | |
| severity | No | add: 'block' (default — fails reviews/gates) or 'warn'. | |
| file_scope | No | add: optional glob limiting which files the constraint applies to, e.g. "src/**/*.ts". Default: all files. | |
| project_dir | No | Scope the constraint / check to a project. Defaults to the active project; constraints saved without one apply everywhere. | |
| invitation_id | No | add / decline: the constraint_invitation.invitation_id from a council verdict or ADR, so Veto records the user's answer. | |
| include_inactive | No | list: include disabled constraints (default false). | |
| forbidden_patterns | No | add: case-insensitive regexes (fallback: substring) that violate the decision when they appear in added lines, e.g. ["mongoose", "mongodb"]. Refused if longer than 200 characters or if a repeated group itself repeats, e.g. "(a+)+" — those can hang diff review. |