Docs menu

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
MCPcommit_authorize · commit_get
CLIpnpm commit-cap -- get · pnpm commit-cap -- set on
Configtemp/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.

temp/commit-cap/state.json json
{ "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.

  1. commit_authorize {}
  2. User enables commit mode → state on
  3. Work + micro-commits
  4. End session → confirm CAP-OFF
MCP: commit_authorize json
{ "state": "on", "note": "feature work session" }

Disable safely

Setting CAP off via MCP requires an explicit confirm string to prevent accidental disable mid-session.

Disable json
{ "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

Related reference

AGS documentation