Docs menu

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

Surface

MCPcommit_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.

  1. commit_validate
  2. enforcement_check
  3. dryRun true
  4. dryRun false
MCP: commit_checkpoint json
{
  "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

Related reference

AGS documentation