Atomic commits with commit_checkpoint
Create CAP-gated checkpoints through MCP with dryRun, files list, and commit_close for milestones.
What you will learn
- Dry-run checkpoint
- Write SHA
- Use commit_close only after approval
Prerequisites
- Commit Authorization Protocol (CAP)
- Agent commit message schema
- Staging Engine — one Commit-Scope per commit
- Enforcement sessions
Surface
| MCP | commit_checkpoint · commit_close · commit_validate · enforcement_check |
|---|
What this feature does
Prefer `commit_checkpoint` over raw git. Pipeline: enforcement_begin → staging_enforce → confidence_enforce → commit_checkpoint. `dryRun` defaults true.
How to call it
Call these MCP tools through your AGS / tower-gov host — commit_checkpoint, commit_close, commit_validate, enforcement_check.. Prefer scan/get before validate/diff, and enforce only when the change set is ready.
- commit_validate
- enforcement_check
- dryRun true
- dryRun false
{
"message": "status/checkpoint(staging): classify auth diff\n\n…trailers…",
"files": ["src/auth/session.ts", "src/auth/session.test.ts"],
"dryRun": false
}commit_close
Under CAP close-only, after explicit user approval, call commit_close with User-approved: yes and Approved-by: user. Never for ordinary checkpoints.
What success looks like
Returns new commit SHA
Message survives commit-msg hook
Enforcement trailer present
Common failure modes
CAP off
enforcement_check not ok
files span multiple Commit-Scopes