agentleFS
B16B1RDB16B1RD/bb-writ/skills/principle-fail-loud/SKILL.md

principle-fail-loud

Skill0 starsChanged 6 days agoMITView on GitHub

例外を握りつぶす、既定値で埋める、フォールバックで続ける、「たぶん大丈夫」で進めそうなときに適用する。見過ごしを許さず、エラーを出して止める。

The file

Files
SKILL.md

フォールバックよりエラー出力

想定外の状態は、捕まえて、原因が分かる形で出して、止める。黙って既定値を入れたり、別の経路に逃げたりしない。guard・fallback・既定値の代入が正当なのは、止めることができない場合だけ。

なぜ: 黙って続けた処理は、後で見つけにくい誤りになる。止まった処理は、その場で直せる。「動いているように見える」が最も高い。

適用する場面:

  • 例外を捕まえて続けようとしたとき。
  • 無いファイル・無い鍵・空の値に既定値を入れようとしたとき。
  • 検査が落ちたのに「環境のせい」と判断して先へ進もうとしたとき。

やること:

  • 止まる理由を、落ちたコマンド自身の文脈(何を・どこで・なぜ)で出す。直し方が分かる文にする。
  • 環境の失敗(権限・網・道具の不在)と、成果物の欠陥を分けて報告する。どちらも合格にはしない。
  • 既定値を入れるなら、それが正しい値である根拠を同じ場所に書く。

使わないとき: 停止そのものが害になる場所(配送の途中で止めると外部が不整合になる操作)では、実際の状態を照合してから続ける。それは fallback ではなく照合。

確かめる例: 失敗の出力から、読み手が原因と直し方に到達できる。except: pass や無言の既定値が差分に無い。

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.