{"data":{"slug":"discovered-07a237fb76d450138a20c886e41eaf8d7b0c6a27c46956a8","title":"Principle: Minimize Reader Load","summary":"Reduce the cognitive effort required for a reader to understand code by minimizing layers and hidden state.","url":"https:\/\/skillshunter.net\/skills\/discovered-07a237fb76d450138a20c886e41eaf8d7b0c6a27c46956a8","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-07a237fb76d450138a20c886e41eaf8d7b0c6a27c46956a8","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-07a237fb76d450138a20c886e41eaf8d7b0c6a27c46956a8.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-07a237fb76d450138a20c886e41eaf8d7b0c6a27c46956a8\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before applying this principle, ensure that the code is reviewed for unnecessary layers and hidden state. The first deliverable is a code review report identifying areas where reader load can be reduced.","instructions":"---\nname: principle-minimize-reader-load\ndescription: When code is hard to trace, cut layers and hidden state.\ndisable-model-invocation: true\n---\n\n# Minimize Reader Load\n\nReader load is the work a reader must do to understand code. It has two independent axes: layers to trace between the question and the answer, and hidden or mutable state to hold in their head. Guard both.\n\n- Collapse layers that only forward: wrappers with one caller, adapters with no second implementation, pass-through methods. Inline them.\n- Shrink state scope: returns over mutations, locals over fields, fields over module state, module state over globals. Derive instead of sync.\n- Name an invariant once at the boundary, not in every consumer.\n\nThe test: can a new reader answer \"where does X come from?\" and \"what can change X?\" in under 30 seconds? If not, cut layers or cut state.\n","use_cases":["Refactoring complex code to improve readability","Simplifying nested function calls and wrappers","Reducing the use of global and module-level state"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/jueyi6\/empstack\/blob\/74181e31d2f00313f8683ba157966efcabbe109e\/skills\/principle-minimize-reader-load\/SKILL.md","source_commit":"74181e31d2f00313f8683ba157966efcabbe109e","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T08:56:20.000000Z","updated_at":"2026-12-02T09:15:14.000000Z","seo_title":"Minimize Reader Load in Code","seo_description":"Learn how to reduce cognitive load for readers by simplifying code structure and minimizing hidden state.","seo_keywords":["code readability","reduce cognitive load","simplify code structure","minimize hidden state","software development best practices"]}}