Commit Authorization Protocol (CAP)
Read/set CAP with commit_authorize: off, on, or close-only.
What you will learn
- Read CAP
- Enable on
- Disable with CAP-OFF confirm
Prerequisites
Surface
| Imports | @tmrxjd/agent-governance-system/commit-cap |
|---|---|
| MCP | commit_authorize · commit_get |
| CLI | pnpm commit-cap -- get · pnpm commit-cap -- set on |
| Config | temp/commit-cap/state.json |
What this feature does
CAP gates whether agents may create commits. Default `off`. `on` requires micro-commits per staging category. `close-only` is for milestone `awaiting-user` then `user-approved` via `commit_close`.
Configuration
Wire these surfaces first: temp/commit-cap/state.json.. Treat them as the contract agents must not invent around.
{ "state": "on", "note": "feature work session" }How to call it
Call these MCP tools through your AGS / tower-gov host — commit_authorize, commit_get.. Prefer scan/get before validate/diff, and enforce only when the change set is ready.
- commit_authorize {}
- User enables commit mode → state on
- Work + micro-commits
- End session → confirm CAP-OFF
{ "state": "on", "note": "feature work session" }Disable safely
Setting CAP off via MCP requires an explicit confirm string to prevent accidental disable mid-session.
{ "state": "off", "confirm": "CAP-OFF", "note": "session complete" }What success looks like
commit_get reflects new state
commit_checkpoint allowed when on
Common failure modes
checkpoint while off
state off without confirm: CAP-OFF
close-only used for ordinary checkpoints