agentleFS
B16B1RDB16B1RD/bb-writ/skills/principle-no-speculative-structure/SKILL.md

principle-no-speculative-structure

Skill0 starsChanged 6 days agoMITView on GitHub

設定の鍵・予約フィールド・拡張点・抽象・互換層・分岐を足そうとしたとき、「将来のために」と考えたときに適用する。実需の無い構造は足さない。

The file

Files
SKILL.md

将来に備えない

実需が無い構造(設定の鍵、予約フィールド、拡張点、抽象、互換層、言語や環境ごとの分岐)を足さない。その未来は滅多に来ないし、来たらそのときに作れば足りる。

なぜ: 備えは保守の費用になり、読み手の負担になり、後の設計の自由を奪う。生成 AI 時代には作り直しが安いので、備える理由はさらに弱い。

適用する場面:

  • 「こういう場合もあるだろう」と条件分岐や設定を足そうとしたとき。
  • 言語・環境・ホストの差を本体のコードで吸収しようとしたとき(対象を読んで決められることは、その場で決める)。
  • 互換層を残して旧 API と新 API を並べようとしたとき。

やること:

  • 今回の依頼を満たす最小の形を作る。足したくなった構造は、実需(具体的な依頼・失敗例)が出たときの仕事として書き残す。
  • 旧 API は呼び出し元を移してから消す。互換層を置かない。
  • 対象ごとの差は、対象側のリポジトリ(CI・設定・スクリプト)に置く。製品側に表を増やさない。

使わないとき: 既に実需がある(今回の依頼そのもの、または記録された失敗例)。それは備えではない。

確かめる例: 変更の差分に、今回の依頼で使われないフィールド・鍵・分岐が無い。設定の説明に「将来」「必要になれば」が無い。

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.