Opus 5.5 — 一般難易度: Advanced制作パス: Coding & simulation

不変条件分析付きディープリファクタリング

本番の決済/クレジットコードを触る前に、ループ不変条件と安全なリファクタ手順を出させる推論プロンプト。

プロンプト

91 words · 637 characters
Analyze the supplied module for a safe refactor.

Steps (show work):
1. List public entrypoints and side effects (DB, HTTP, filesystem).
2. For each non-trivial loop/recursion: state invariant, variant function, and termination argument.
3. Identify hidden coupling (shared mutable state, implicit ordering).
4. Propose refactor as small steps; each step must preserve observational equivalence for listed entrypoints.
5. Flag race conditions under concurrent calls.
6. Output test cases that would fail if invariants break (table: input, expected, property checked).

Do NOT rewrite code until step 6 is approved. Use markdown headings.

ワークフロー注

modules のサービスを1ファイルずつ。既存テストと照合。

目を開いたまま、Fable5 の上に築こう

コミットする前に、コスト計算、セーフガードの挙動、適切なティアを知っておきましょう。無料アカウントを作成すると、スペック・価格・アクセス経路の変更時に通知を受け取れます。