scope-freeze
Skill6 starsChanged 3 months agoMITView on GitHub
Explicitly limit blast radius before any implementation or file changes.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- analyze-miniSkill
- bug-captureSkill
- build-oneSkill
- ceremony-budgetSkill
- checklist-miniSkill
- constitution-liteSkill
- context-checkSkill
- diagnose-loopSkill
- eco-modeSkill
- falsify-specSkill
- grill-with-docs-liteSkill
- handoffSkill
- lean-modeSkill
- mini-specSkill
- operator-profileSkill
- ship-miniSkill
- teach-backSkill
- test-miniSkill
- thin-planSkill
- tool-noise-guardSkill
- verify-contractSkill
- workspace-checkpointSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Do not use repo-wide catch-all patterns (*,
, /*) in Allowed writes. - Distinctive: line 37
After the implementation diff is complete, run:
- Very specific: line 43
Treat scope-gate FAIL as a hard stop: revert the violating write or renegotiate scope before continuing.
- Very specific: line 45
Do not widen SCOPE.md after an out-of-scope change merely to make the gate pass.
- Distinctive: line 95
No violating write is justified retroactively by silently widening the scope artifact.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scope Freeze
Purpose
Prevent uncontrolled changes by defining a narrow, enforceable boundary. This freezes write scope, not discovery.
When to use
Immediately before editing files or running state-changing commands.
Inputs
- SPEC.md / PLAN.md / TODO.md
- Selected task
- Current repo state
- Git base used to judge the implementation diff
- Optional SPEC implementation diff budget
Workflow
- Name the exact task.
- List allowed files/folders as exact paths, directory prefixes, or globs.
- Do not use repo-wide catch-all patterns (
*,**,**/*) inAllowed writes. If the task genuinely spans multiple areas, enumerate the narrowest relevant prefixes and set a changed-file budget. - List read-only files/folders.
- List forbidden paths and operations.
- Set max files changed and rename/deletion rules when helpful. If SPEC.md has an enforced implementation diff budget, keep the scope's hard file cap at or below that accepted file budget unless scope is renegotiated before implementation.
- List allowed commands.
- List compatibility seams and test-integrity triggers before editing.
- Define clear stop condition.
- Note that reads/searches are allowed unless explicitly forbidden.
- Persist the canonical block as
SCOPE.mdbefore the first implementation write when the route invokesscope-freezeandscripts/scope_gate.pyis available. After the implementation diff is complete, run:
python scripts/scope_gate.py --base <frozen-base>- Treat scope-gate
FAILas a hard stop: revert the violating write or renegotiate scope before continuing. TreatREVIEW_REQUIREDas unresolved review, not implicit permission.
Do not widen SCOPE.md after an out-of-scope change merely to make the gate pass. A legitimate scope expansion must be surfaced and agreed before the newly allowed write.
The scope gate's Max files changed is a hard write-boundary rule and remains a FAIL when exceeded. An optional SPEC implementation diff budget is different: verify_gate.py treats file/added-line overruns as REVIEW_REQUIRED so a legitimate but unexpectedly large patch can be reconsidered rather than mislabeled as a functional failure.
Outputs
Canonical output block:
SCOPE FREEZE
Task: ...
Allowed writes: ...
Read-only: ...
Forbidden: ...
Compatibility seams to preserve:
- Public imports / APIs: ...
- CLI behavior: ...
- Output schema: ...
- Fixture/data meaning: ...
- Existing tests that must remain meaningful: ...
Test integrity:
- Existing tests may be added to: yes/no
- Existing tests may be changed only if: ...
Review required if:
- tests changed
- dependencies changed
- protected paths touched
- compatibility seams changed
Max files changed: ...
Renames allowed: yes/no
Deletions allowed: yes/no
Allowed commands: ...
Stop when: ...
Invalid if: ...Use path/glob entries for the machine-enforceable portions of Allowed writes, Read-only, and Forbidden. Allowed writes must remain meaningfully narrower than the repository root; repo-wide catch-all globs are invalid scope-freeze output. Non-path forbidden operations remain part of the human contract but cannot be proven by a file-diff gate.
See Deterministic Scope Gate for status semantics and supported review triggers.
Success looks like
- The canonical block above exists before implementation writes.
Allowed writesnames a real blast-radius boundary rather than a repo-wide catch-all.- The final live diff receives scope-gate
PASS, or an explicit human resolves everyREVIEW_REQUIREDtrigger. - No violating write is justified retroactively by silently widening the scope artifact.
Stop conditions
- Scope is narrow enough for safe implementation.
- Task requires changes outside boundary → pause and renegotiate before the write.
- Scope gate returns
FAIL→ stop, revert, or renegotiate. - Scope gate returns
REVIEW_REQUIRED→ obtain the named review before claiming completion.
Anti-patterns
- Roaming the entire repo for a small fix.
- Using
*,**, or**/*asAllowed writesand calling the result scoped. - Expanding scope because "nearby code looked easy."
- Running write commands before boundary is agreed.
- Editing
SCOPE.mdafter a violation to manufacture compliance. - Treating an allowed path as proof that all behavior inside it is authorized.
- Forbidding necessary discovery reads.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

