Docs menu

Staging scopes

When an agent edits files, staging_classify inspects the diff and proposes a scope. staging_enforce locks that scope for the enforcement session. The commit message’s Commit-Scope: trailer must match.

Allowed scopes

Commit-ScopeUse whenTypical bump
file-createAdding a new file that stands aloneminor
type-createNew types / interfaces without behavior wire-uppatch / minor
function-createNew function / method bodyminor
module-wireConnecting existing pieces (imports, registry, DI)minor
single-changeOne focused behavior change in existing codepatch
single-deleteRemoving one concern cleanlypatch
single-fixBugfix for one behaviorpatch
single-formatFormatting / lint-onlynone / patch
breaking-changeAPI or contract breakmajor
milestone-closeClosing a milestone after approval gatenone

Bump mapping is configured in .ags/versioning.yml — see Versioning.

Classify a diff

staging_classify json
// MCP tool: staging_classify
{
  "paths": ["src/auth/session.ts", "src/auth/session.test.ts"]
}
// → Commit-Scope suggestion: function-create | single-change | module-wire

Commit with the locked scope

Matching Commit-Scope trailer text
status/checkpoint(auth-middleware): add session refresh helper

Status: checkpoint
Scope: auth-middleware
Commit-Scope: function-create
Not-done: wire helper into request pipeline
Next: module-wire for refresh on 401
Evidence: vitest packages/auth/src/session.test.ts
Token: mid
Graph-ids: none (infra)
User-approved: no
Enforcement: mcp

Rules that keep agents honest

  • One Commit-Scope per commit — never batch categories.
  • Do not invent new scope ids; extend policy only through AGS releases.
  • If the diff spans multiple scopes, split the work (stash / sequential checkpoints) instead of forcing a single commit.
AGS documentation