Skip to content

agentsope/SkillAlchemy / skills/agentsop-context-scope-discipline

agentsop-context-scope-discipline

Verified

Coder-agent working-file budget discipline: keep the editable working set (files you /add into writable context) under ~25k tokens, separate "read" from "edit", delegate breadth to a read-only repo-map, and drop files once edited. Use when an LLM coder-agent edits multiple files, when the working set must stay focused, or when the model starts editing the wrong file / missing targets because too much context dilutes attention. Search keywords: context window full, agent edits wrong file, too much context, /add /drop files, working file budget, context dilution, lost in the middle.

FileKindSize
README.mdmarkdown3.1 KB
SKILL.mdskill md20.2 KB
intermediate/operation_candidates.jsonconfig5.3 KB
references/R1-source-evidence.mdmarkdown4.9 KB
# context-scope-discipline skill

Phase D / A5 of the 7-SOP coder-agent skill landscape. **Enhancement overlay.**

This skill distills a single coding-agent-specific rule on top of generic
token-budget advice: **only put files you will actually edit into the working
set, and keep that working-file budget under ~25k tokens.** Past that threshold,
"more context ≠ better edits" — the model loses focus, edits the wrong files,
and misses targets you just added. Breadth (finding files) is delegated to the
sibling [[agentsop-repo-map]] skill (read-only signature map); the working set is reserved
for depth (the files you're changing this turn).

The canonical evidence is Aider's measured distraction threshold:

> "Above about 25k tokens of context, most models start to become distracted."
> — aider.chat/docs/troubleshooting/edit-errors.html

## Why this is an enhancement overlay, not a standalone skill

Generic "manage your token budget" advice exists everywhere. This overlay adds
the part that's specific to coding agents:

- The **read vs edit distinction** — two different context layers with two
  different budgets. Read-only context (repo-map signatures, `/read` files) buys
  breadth cheaply; the write-set (`/add`-ed files) is where depth and cost live.
- The **"don't add to feel safe" correction** — Aider's data shows repo-map
  *alone* hits the correct file 70.3% of the time on SWE-Bench Lite, so locating
  files never requires loading them into the editable working set.
- A concrete **~25k working-file budget** with monitor/drop/split operations.

## Relationship to sibling skills

- **[[agentsop-repo-map]]** — the breadth partner. Repo-map gives "where" (signatures,
  cheap, whole-repo); this skill governs "which files enter the write-set" (full
  text, expensive, ≤5 files). Read both before a multi-file edit.
- **[[agentsop-session-state-hygiene]]** — the history partner. Both draw on the same ~25k
  budget. `/drop` reclaims budget on the *file* axis (this skill); `/clear`
  reclaims it on the *conversation-history* axis (session-state-hygiene).

## Files

- `SKILL.md` — 7-section operational skill. Front-matter `name: context-scope-discipline`, `version: 0.1.0`.
- `references/R1-source-evidence.md` — verbatim source quotes with citations.
- `intermediate/operation_candidates.json` — operation-extraction working notes.

## How to use

Read `SKILL.md` end-to-end before your first multi-file edit task. For day-to-day
reference jump to:

- §2 mental model — read vs edit, the two-budget split, the 25k dilution threshold.
- §3 SOP — classify → locate-then-add → add/read → watch → drop → split.
- §4 operations — 8 named ops with Trigger/Action/Output/Evidence.
- §5 dilemmas — "understand 10, edit 2" and "budget full mid-task" decision trees.
- §7 cross-framework — `/add` (Aider) vs `Read` (Claude Code) vs `@file` (Cursor)
  vs `read_file` (Cline).

## Citation policy

Inline bracketed citations point to aider.chat docs/blog where a specific claim
or figure (the 25k threshold, the 70.3% file-hit rate) is load-bearing.
`references/R1-source-evidence.md` carries the verbatim quotes.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall