Docs menu

Staging Engine — one Commit-Scope per commit

Classify diffs, enforce one staging category, split/stash mixed indexes.

What you will learn

  • Classify
  • Enforce one scope
  • Split mixed indexes

Prerequisites

Surface

MCPstaging_classify · staging_validate · staging_diff · staging_enforce · staging_split · staging_stash

What this feature does

Staging turns a dirty tree into atomic Commit-Scope units (`function-create`, `single-change`, `module-wire`, `milestone-close`, …). One scope per SHA — no Gate-override for mixed batches.

How to call it

Call these MCP tools through your AGS / tower-gov host — staging_classify, staging_validate, staging_diff, staging_enforce, staging_split, staging_stash.. Prefer scan/get before validate/diff, and enforce only when the change set is ready.

  1. staging_classify { includeUnstaged: true }
  2. Pick one scope
  3. staging_stash others if needed
  4. staging_enforce → commit
MCP: staging_enforce json
{
  "commitScope": "function-create",
  "message": "status/checkpoint(auth): add refresh\n\nCommit-Scope: function-create\n…"
}

Classify first

Always classify before writing Commit-Scope into the message.

MCP: staging_classify json
{ "includeUnstaged": true }

What success looks like

staging_enforce ok for declared scope

classify agrees with message

Common failure modes

Message scope ≠ staged paths

Docs+code mixed illegally

Ignoring staging_diff graph drift

Related reference

AGS documentation