agentleFS
requierequie/endostack/skills/principle-minimize-reader-load/SKILL.md

principle-minimize-reader-load

Skill4 starsChanged 15 days agoMITView on GitHub

Use when shaping or reviewing code that is hard to follow, deciding whether new indirection or state is worth it, or writing output for people. Reduce the indirections and hidden mutable state a reader has to track.

46 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-pstack, poteto-help and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • bnemaSkill

    setup-pstack

    Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.

    Also in 25 projects that use this

  • ianclearySkill

    poteto-help

    Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.

    Also in 14 projects that use this

  • tristanphvnSkill

    ketchup-video

    Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.

    Also in 11 projects that use this

  • JoshueOsunaSkill

    Poteto Mode

    poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.

    Also in 3 projects that use this

  • instructureSkill

    ketchup

    Rebuild context after /clear by analyzing uncommitted changes across Canvas LMS and all plugin repositories

    Also in 18 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 46 edited versions we read keep these.

  • 3

    Distinctive

    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
  1. Distinctive:

    Treat line counts, cyclomatic complexity, and architectural tidiness as proxies.

    line 17
  2. Distinctive:

    Delete layers whose cost exceeds their benefit: wrappers with one caller, interfaces with one implementation, and indirection added for a …

    line 19
  3. Distinctive:

    Prefer interfaces that hide meaningful decisions.

    line 21

“Common” is measured: kept by at least 6 in 10 of the 46 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Minimize reader load

Measure maintainability by how hard a reader must work to understand the code. Two separate axes set that effort: the number of hops between a question and its answer, and the amount of hidden or changeable state the reader has to keep in mind.

When it applies

Reviewing or shaping hard-to-follow code, deciding whether new indirection or new state is justified, and writing anything people will read, including verdicts and reports. It is a lens you always hold, not a procedure with preconditions.

What to do

  1. Treat line counts, cyclomatic complexity, and architectural tidiness as proxies. Reader effort is the target.
  2. Guard both axes. They vary independently. A flat file full of globals can be as hard to read as a deep stack of adapters.
  3. Delete layers whose cost exceeds their benefit: wrappers with one caller, interfaces with one implementation, and indirection added for a future that never came. Inline them.
  4. Require each layer to change the abstraction. A layer that forwards the same methods with the same arguments is pass-through, so collapse it.
  5. Prefer interfaces that hide meaningful decisions. A broad interface that conceals little forces readers to learn its surface and its internals as well.
  6. Narrow the scope of state. From most to least preferred: pure functions that return values instead of mutating, then local variables, then object fields, then module-level state, and globals last. Compute values instead of keeping copies synchronized.
  7. State each invariant one time, where data enters, and let consumers rely on it.
  8. Any new indirection or state must remove at least as much reader load somewhere else as it introduces.
  9. Apply the half-minute test: a newcomer should be able to say where a value comes from and what can change it in about thirty seconds.

Reader load is a security property. A permission check that a reviewer has to trace through four decorators and a mutable global request context is a check that reviewers stop verifying. An authorization decision a reader can find and confirm in one function is one they will actually audit.

The failure it prevents

Deep wrapper stacks, hidden global state, and invariants restated in every consumer.

Done when

The half-minute test passes.

principle-guard-the-context-window is the agent analog of this principle.

Related: principle-guard-the-context-window, principle-laziness-protocol, principle-boundary-discipline.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.