Reducing Entropy

作者 softaworks3027f20f3181無授權條款2.5K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫7 個月前更新

Manual-only skill for minimizing total codebase size. Only activate when explicitly requested by user. Measures success by final code amount, not effort. Bias toward deletion.

AI 產生的概覽

引導代理以刪除為優先,透過衡量最終程式碼量來最小化程式碼庫總規模。

功能
提供一套僅手動啟用的決策框架,用來縮減程式碼庫總規模,核心是三個問題:最小可行結果是什麼、變更是否減少總程式碼量、以及可以刪除什麼。它列出若干警示訊號,例如維持現狀的偏誤和增加彈性,並說明此法不適用的情形。它還要求代理在繼續之前,從其參考目錄中至少載入一種理念。
適用情境
當使用者明確要求縮減程式碼庫規模或進行以刪除為導向的重構時使用。它不應自動啟用,也不適用於已經足夠精簡的程式碼庫、約定很強的框架,或法規與合規要求規定的結構。
執行需求
無需指令碼或工具,僅為說明性指示。代理需要能夠讀取隨附的參考 Markdown 檔案,包括 references 目錄和 adding-reference-mindsets.md。

Reducing Entropy

More code begets more code. Entropy accumulates. This skill biases toward the smallest possible codebase.

Core question: "What does the codebase look like after?"

Before You Begin

Load at least one mindset from references/

  1. List the files in the reference directory
  2. Read frontmatter descriptions to pick which applies
  3. Load at least one
  4. State which you loaded and its core principle

Do not proceed until you've done this.

The Goal

The goal is less total code in the final codebase - not less code to write right now.

  • Writing 50 lines that delete 200 lines = net win
  • Keeping 14 functions to avoid writing 2 = net loss
  • "No churn" is not a goal. Less code is the goal.

Measure the end state, not the effort.

Three Questions

1. What's the smallest codebase that solves this?

Not "what's the smallest change" - what's the smallest result.

  • Could this be 2 functions instead of 14?
  • Could this be 0 functions (delete the feature)?
  • What would we delete if we did this?

2. Does the proposed change result in less total code?

Count lines before and after. If after > before, reject it.

  • "Better organized" but more code = more entropy
  • "More flexible" but more code = more entropy
  • "Cleaner separation" but more code = more entropy

3. What can we delete?

Every change is an opportunity to delete. Ask:

  • What does this make obsolete?
  • What was only needed because of what we're replacing?
  • What's the maximum we could remove?

Red Flags

  • "Keep what exists" - Status quo bias. The question is total code, not churn.
  • "This adds flexibility" - Flexibility for what? YAGNI.
  • "Better separation of concerns" - More files/functions = more code. Separation isn't free.
  • "Type safety" - Worth how many lines? Sometimes runtime checks in less code wins.
  • "Easier to understand" - 14 things are not easier than 2 things.

When This Doesn't Apply

  • The codebase is already minimal for what it does
  • You're in a framework with strong conventions (don't fight it)
  • Regulatory/compliance requirements mandate certain structures

Reference Mindsets

See references/ for philosophical grounding.

To add new mindsets, see adding-reference-mindsets.md.


Bias toward deletion. Measure the end state.

來源與署名

來源:softaworks/agent-toolkit位於skills/reducing-entropy提交3027f20

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架