backnotprop/pstack

principle-minimize-reader-load

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

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/backnotprop/pstack --skill principle-minimize-reader-load

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

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.

同じリポジトリから

関連する Skills

すべての Skills