Primitive of the day · 2026-11-02
approved-map-before-any-edit
Before an agent edits a large file, require a no-edit MAP of its logical sections (name, approximate line range, one-sentence purpose, coupling risks) and a human approval of that map — the one cheap moment to re-scope.
When this applies
An agent is about to modify a large, multi-concern file where an unscoped pass would be hard to review or debug.
Preconditions
- The agent has been instructed to return only the map and make no edits
- A reviewer is available to approve or adjust the map before any code changes
Do this
Have the agent read the file and list sections with line ranges, purposes, and coupling risks; review the map, adjust boundaries, delete out-of-scope sections; only then allow per-section work to begin.
What you should see
An explicit, approved scope: every subsequent edit maps to a named section the reviewer sanctioned.
How it fails if ignored
The agent edits during mapping despite instructions (check the diff is empty); a rubber-stamped map that misses coupling between sections.
Do not use when
Small single-concern files; mechanical global changes (e.g., a rename) where sectioning adds nothing.
Kind: discipline. Part of the skill Legacy refactor chunk checkpoint. Free to reuse in your own agent skills.
Get the whole skill
All 7 primitives of this skill as one package, with the order to apply them.
Get just this primitive
This one primitive for 1 credit (≈ €0.10); the other primitives of the skill are on its page.
Upgrade your own skill
Paste your skill; we pick the 5 primitives from the shelf that fit it best, as one bundle for 5 credits (≈ €0.50).
Upgrade my skill