agent-scope-lock
Overview
agent-scope-lock creates and validates deterministic edit-scope locks for agent workflows. It is designed for skills that need a
mechanical boundary around which repo paths an agent may change.
The default lock file is stored outside tracked files through:
Pass --lock-file PATH to use an explicit file for tests or advanced workflows.
Package vs binary name
| Field | Value |
|---|---|
| Package name | nils-agent-scope-lock |
| Binary name | agent-scope-lock |
Usage
Create and validate deterministic agent edit-scope locks.
Usage: agent-scope-lock <COMMAND>
Commands:
create Create a lock with allowed repo-relative path prefixes
read Read the current lock
validate Validate changed paths against the current lock
clear Remove the current lock if present
completion Print shell completion script
Options:
-h, --help Print help
-V, --version Print version
Examples:
Commands
create --path PATH [--path PATH ...] [--owner OWNER] [--note NOTE] [--force] [--lock-file PATH] [--format text|json]: create a lock file with repo-relative allowed prefixes. Existing locks are not overwritten unless--forceis passed.read [--lock-file PATH] [--format text|json]: print the current lock.validate [--changes all|staged|unstaged] [--lock-file PATH] [--format text|json]: compare changed git paths against the lock.allincludes staged, unstaged, and untracked paths.clear [--lock-file PATH] [--format text|json]: remove the lock idempotently.completion <bash|zsh>: print clap-generated shell completions.
Output contract
Human-readable text is the default. JSON is opt-in with --format json on command subcommands.
JSON output uses versioned envelopes:
Failure envelopes use ok=false with stable error.code, error.message, and optional error.details.
Exit codes:
0: success1: runtime failure or scope violation64: usage/configuration error
Secret-safety boundary
validate inspects changed path names from git only. It does not read changed file contents, so secret-like files can appear as path
violations without expanding their contents into stdout, stderr, or JSON.