backnotprop/pstack

principle-minimize-reader-load

Apply when reviewing or shaping code that's hard to trace.

Vedi sorgente

Come usare

  1. Copia il comando e controlla il pacchetto prima di installarlo nel tuo ambiente agente.
  2. Controlla strumenti, credenziali e ambienti richiesti nel documento originale.
  3. Descrivi input e risultato desiderato; confronta l’output con le fonti.
npx skills add https://github.com/backnotprop/pstack --skill principle-minimize-reader-load

Prima di iniziare

  • L’installazione non include abbonamenti, quote API o accesso ai file.
  • Stelle e installazioni indicano attività, non un test indipendente di qualità o sicurezza.
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

Minimize Reader Load

Reader 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.

  • Collapse layers that only forward: wrappers with one caller, adapters with no second implementation, pass-through methods. Inline them.
  • Shrink state scope: returns over mutations, locals over fields, fields over module state, module state over globals. Derive instead of sync.
  • Name an invariant once at the boundary, not in every consumer.

The 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.

dallo stesso repository

Altri Skills

Tutti gli Skills