$npx -y skills add UnpaidAttention/fable5-methodology --skill context-economyProtect the context window as a scarce resource — read at the right altitude, delegate bulk reconnaissance to subagents so only conclusions enter the main thread, externalize durable facts to disk, and respond to your own degradation signals. Trigger this when about to read a lar
| 1 | # Context Economy |
| 2 | |
| 3 | Everything you read enters the same window your reasoning runs in. Fill it with noise and the |
| 4 | noise wins: instructions decay, early decisions blur, retrieval degrades — and output quality |
| 5 | collapses without any error message announcing it. An advanced model husbands its context |
| 6 | implicitly; you do it as explicit procedure. |
| 7 | |
| 8 | ## Rule 1: Read at the right altitude |
| 9 | |
| 10 | Match reading depth to need, before opening anything: |
| 11 | |
| 12 | | Need | Action | |
| 13 | |------|--------| |
| 14 | | One fact ("does X call Y?", "what's the version?") | grep / targeted search — never open the file | |
| 15 | | Call something correctly | Read the signature + one existing call site, not the whole module | |
| 16 | | Edit a file | Read it fully (non-negotiable — Prime Directive 2) | |
| 17 | | Understand a subsystem's shape | Symbol map / headings / one representative flow — not every file | |
| 18 | | Judge a large artifact (logs, datasets) | Head/tail/sample + targeted filters, never the whole thing | |
| 19 | |
| 20 | The violation to catch: opening a 2,000-line file to answer a one-line question. Ask "what is |
| 21 | the smallest read that answers this?" before every Read. |
| 22 | |
| 23 | ## Rule 2: Delegate bulk work to protect the main thread |
| 24 | |
| 25 | When a task requires sweeping many files, digging long logs, or broad reconnaissance whose raw |
| 26 | content you will NOT reference again: hand it to a subagent. The subagent burns its own context |
| 27 | on the haystack and returns only the needle. The main conversation stays at decision altitude. |
| 28 | |
| 29 | Delegation test — delegate when ALL of: the raw material is large, only the conclusion matters |
| 30 | downstream, and the sub-task is separable with a crisp question. Don't delegate when you'll |
| 31 | need the raw content in-thread anyway, or the task is a two-minute look. |
| 32 | |
| 33 | This is the primary reason to delegate, beyond parallelism: context preservation. |
| 34 | |
| 35 | ## Rule 3: Don't re-read what hasn't changed |
| 36 | |
| 37 | If you read a file this session and it's unchanged, trust your knowledge and your notes. |
| 38 | Re-read only when: someone else (user, formatter, another agent) may have modified it, an edit |
| 39 | of yours failed unexpectedly, or you've had a context loss. Redundant re-reads are pure |
| 40 | context burn. |
| 41 | |
| 42 | ## Rule 4: Externalize durable facts the moment they matter |
| 43 | |
| 44 | Decisions, discovered constraints, findings, and todo state go to disk (WORKING_NOTES.md, a |
| 45 | scratchpad file) when they're established — not "later", and not only when compaction looms. |
| 46 | The context window is working memory; disk is long-term memory. Facts that live only in |
| 47 | context die with it. (The file format and resume protocol belong to session-state-management; |
| 48 | this rule is about WHEN to move facts out of context.) |
| 49 | |
| 50 | ## Rule 5: React to your own degradation signals |
| 51 | |
| 52 | The signals that your context is failing you: re-running a search you already ran; re-deriving |
| 53 | a fact you established an hour ago; surprise at your own earlier decision; instructions from |
| 54 | the original request feeling new on re-read. On any of them: STOP consuming new content, |
| 55 | re-read the notes file, and only then continue. Pushing on from fog produces confident work |
| 56 | built on a forgotten foundation. |
| 57 | |
| 58 | ## Worked example |
| 59 | |
| 60 | Task: "Find why checkout intermittently 500s — logs are in /var/log/app/ (14 files, ~2 GB)." |
| 61 | |
| 62 | - Weak: `Read` the newest log → floods context with 50k lines → asks for the next file → |
| 63 | by file three, the original error pattern from file one has blurred; analysis restarts. |
| 64 | - Context-economy: |
| 65 | 1. Rule 1: never open a log raw. `grep -c 'HTTP 500'` per file → the needle is in 3 files. |
| 66 | 2. Rule 2: delegate — subagent per file with a crisp question ("extract each 500 with the |
| 67 | 20 lines before it; return timestamps + the exception class only"). Three subagents burn |
| 68 | their own contexts; the main thread receives ~40 lines of conclusions. |
| 69 | 3. Rule 4: findings ("all 500s follow a connection-pool-exhausted warning within 2s; only |
| 70 | during the 02:00 batch job") go into WORKING_NOTES.md immediately. |
| 71 | 4. Main thread proceeds to the fix with a nearly-empty window and complete knowledge. |
| 72 | |
| 73 | ## Done when |
| 74 | |
| 75 | Ongoing — an ambient discipline. You are following it when: nothing large was read where a |
| 76 | grep or a sample would answer; bulk reconnaissance ran in subagent contexts, not the main |
| 77 | thread; no |