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-Scope | Use when | Typical bump |
|---|---|---|
| file-create | Adding a new file that stands alone | minor |
| type-create | New types / interfaces without behavior wire-up | patch / minor |
| function-create | New function / method body | minor |
| module-wire | Connecting existing pieces (imports, registry, DI) | minor |
| single-change | One focused behavior change in existing code | patch |
| single-delete | Removing one concern cleanly | patch |
| single-fix | Bugfix for one behavior | patch |
| single-format | Formatting / lint-only | none / patch |
| breaking-change | API or contract break | major |
| milestone-close | Closing a milestone after approval gate | none |
Bump mapping is configured in .ags/versioning.yml — see Versioning.
Classify a diff
// MCP tool: staging_classify
{
"paths": ["src/auth/session.ts", "src/auth/session.test.ts"]
}
// → Commit-Scope suggestion: function-create | single-change | module-wireCommit with the locked scope
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: mcpRules 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.