scoping-a-change
Skill0 starsChanged 3 months agoMITView on GitHub
Use when starting work on a change, before reading or reviewing a diff, or before deciding what a change affects — any time you need to know exactly which files it touches. Also use again after merging or retargeting onto a new base. DO NOT invoke to choose which checks to run over that scope — route that to ledger:refusing-busywork.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adapting-to-a-projectSkill
- curating-decision-recordsSkill
- designing-concurrent-testsSkill
- diagnosing-flakesSkill
- fact-checking-by-executionSkill
- metabolizing-knowledgeSkill
- planning-the-workSkill
- proving-code-is-deadSkill
- proving-the-regressionSkill
- pushing-safelySkill
- qualifying-a-requestSkill
- receiptsSkill
- recording-ui-evidenceSkill
- refusing-busyworkSkill
- reviewing-as-cis-complementSkill
- running-a-bounded-loopSkill
- specifying-acceptanceSkill
- trimming-session-vantageSkill
- using-ledgerSkill
- validating-real-scenariosSkill
- what-counts-as-evidenceSkill
- writing-complete-propositionsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 8
Every later decision — which checks to run, which surfaces to review, what evidence a claim needs — is computed from the change set.
- Distinctive: line 46
After merging or retargeting onto a changed base: recompute the scope, reassess which behavior the combined scope can affect, and re-run …
- Distinctive: line 48
Do not carry a pre-merge scope forward.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Scoping a change
Every later decision — which checks to run, which surfaces to review, what evidence a claim needs — is computed from the change set. Get the change set wrong and every one of those decisions is wrong in a way that looks fine.
This skill owns computing the change set. It does not decide what to run over it, or what a review of it must cover.
The branch's tracking ref is not the base. It is wrong for a branch created fresh from a worktree, wrong for a branch whose change request targets another feature branch, and wrong again after anyone merges. Inferring it is the single most common way an agent ends up reviewing the wrong diff and running the wrong checks with total confidence.
Resolve the base explicitly
- Confirm where you are:
git status --short --branch
git rev-parse --show-toplevel- Determine the base from observed state, not from a naming convention: the change request's declared target branch, or the parent in a dependency chain. Read
default_branchfrom.ledger.yml, and verify against the remote rather than assuming the local ref is current. - Fetch that ref, then compute the scope against it. Never let a scoping tool guess or auto-fetch a base — a tool that picks a base silently moves the error from you to the tool.
Report four layers separately
Committed paths, staged paths, unstaged paths, and untracked paths answer different questions, and collapsing them hides real problems.
- Committed paths are relative to the resolved merge base: this is what a reviewer sees.
- Staged, unstaged, and untracked paths describe your current working tree: this is what is not yet anywhere else.
An untracked file is the one that bites. It is part of the change in every practical sense and part of the diff in none, so a scope that omits it produces checks that pass locally and a change request that is missing a file.
scripts/change-scope.sh computes all four from a base you supply, using nothing but git:
./scripts/change-scope.sh <verified-base-ref>It refuses to run without an explicit base, by design.
Re-scope when the base moves
After merging or retargeting onto a changed base: recompute the scope, reassess which behavior the combined scope can affect, and re-run only the checks the merge invalidated.
Do not carry a pre-merge scope forward. A merge can bring in a change that makes your untouched code wrong, and the diff you already read will not show it.
What the scope is for
Hand the result to the next decision rather than acting on it directly:
- selecting the narrowest sufficient checks —
ledger:refusing-busywork; - deciding what a review must cover —
ledger:reviewing-as-cis-complement; - knowing which documentation claims a change invalidated —
ledger:fact-checking-by-execution.
Report
State the base ref you resolved and how you verified it, then the four layers. If you could not verify the base, say so and stop rather than proceeding on a guess — an unverified base is not a small imprecision, it is a wrong answer to every question that follows.
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.

