スキル一覧に戻る

pre-mortem

avelikiy
更新日 2 days ago
7 閲覧
30
6
30
GitHubで表示
メタaidesign

について

事前検証スキルは、プロジェクトが壊滅的に失敗したと想定し、その原因を遡って特定することで、開発者が実装前に具体的なリスクを明らかにする手法です。取り返しのつかない機能や影響度の高い機能に対して、アーキテクチャレビューや脅威モデリングなどの計画段階で使用されます。この手法は、一般的なリスク一覧を超えた具体的なリスク特定を促し、構造化された5段階のプロセスに沿って進められます。

クイックインストール

Claude Code

推奨
メイン
npx skills add avelikiy/great_cto -a claude-code
プラグインコマンド代替
/plugin add https://github.com/avelikiy/great_cto
Git クローン代替
git clone https://github.com/avelikiy/great_cto.git ~/.claude/skills/pre-mortem

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Pre-mortem — fail-it-before-you-build-it

A retrospective for a project that hasn't happened yet. Surfaces real risks that "list every risk" prompts miss.

Originated in Gary Klein's research at MIT Sloan, now standard at AWS and other ops-mature orgs.

The 5-step pre-mortem

Step 1. Imagine you're 6 months in the future

The project shipped. It is a clear, public failure. There's a Reddit thread about it. The CEO is asking what went wrong.

Step 2. Write the post-mortem newspaper headline

One sentence. Concrete. Specific. Examples:

  • ❌ Bad: "We had some quality issues."
  • ✅ Good: "On 2026-09-12, the Stripe webhook handler deduplicated by raw body hash, so 30K customers were double-charged after Stripe retried delivery during a network blip."

The headline forces you to name the failure mode SPECIFICALLY.

Step 3. List every individual reason this exact failure happened

Brainstorm 10-15 reasons. Be specific. Each item should reference:

  • A real component / file
  • A real failure mode (race condition, schema mismatch, expired credential)
  • A real human factor (oncall didn't see alert, runbook was outdated)

Reject hand-waves like "testing was insufficient." Replace with "we didn't write a property-based test for the dedup-key collision case."

Step 4. Rank by likelihood × severity

For each cause, score:

  • Likelihood: 1-5 (1=once-in-a-decade, 5=monthly)
  • Severity: 1-5 (1=cosmetic, 5=data loss / regulatory breach)
  • Risk score: likelihood × severity

Top 3 by risk score → these are your highest-priority mitigations.

Step 5. For each top-3 cause, write a guardrail in the plan

Each guardrail is a concrete change to the plan:

  • A test that would have caught it
  • A circuit breaker / feature flag
  • A runbook entry
  • A monitoring alert with specific SLO

If a top-3 cause CANNOT be mitigated within the time/budget, escalate to the user: "This plan accepts the risk of X with no mitigation."

Template — add to PLAN-*.md

## Pre-mortem

Six months from now, this project failed. Headline:

> <one-sentence failure headline>

### Top reasons (likelihood × severity)

| Cause | L | S | Risk | Mitigation in plan |
|---|---|---|---|---|
| <specific cause> | 4 | 5 | 20 | <Task #N: write idempotency test> |
| ... | | | | |

### Accepted risks (no mitigation)

- <risk> — accepted because <budget/scope reason>. Owner: <name>.

Common failure modes by archetype

Quick start — most-common pre-mortem causes per archetype:

ArchetypeCommon failure
fintech / commerceIdempotency-key collision; double-charge during retry storm
healthcarePHI leak via debug log; BAA not signed with vendor
web3Oracle staleness; flash-loan exploit on bonding curve
mlopsTraining/serving skew; model drift undetected
iot-embeddedOTA bricks devices in a region with no recovery path
data-platformLate-arriving data overwrites correct values
ai-system / agent-productPrompt injection exfiltrates other users' data
enterprise-saasCross-tenant data leak via RLS gap
cli-toolDestructive flag with no confirmation (rm -rf equivalent)
libraryBreaking change in minor version bump

Anti-patterns in pre-mortems

Vague risks. "Performance might be a problem." Be specific: which operation, at what load, what's the SLO.

Cosmic risks. "AWS could go down." Yes, but that's not actionable. Focus on what you can mitigate.

Defensive list. Listing risks you've already mitigated to look thorough. Only list risks the current plan does NOT yet address.

Skip the headline. Without the headline, the team won't believe the failure scenario is real.

When to skip

  • nano project_size — pre-mortem is overhead.
  • Pure refactor with full test coverage — guardrails already exist.
  • Bug-fix with one-line repro — risk is well-bounded.

GitHub リポジトリ

avelikiy/great_cto
パス: skills/pre-mortem
0
agentic-codingclaude-code-pluginclaude-code-skillsclaude-code-subagentscode-reviewcto

関連スキル

content-collections

メタ

このスキルは、Content Collections(Markdown/MDXファイルを型安全なデータコレクションに変換するTypeScriptファーストのツール)の本番環境でテストされた設定を提供します。Zodバリデーションによる型安全性を実現し、ブログ、ドキュメントサイト、コンテンツ重視のVite + Reactアプリケーション構築時にご利用ください。Viteプラグインの設定、MDXコンパイルから、デプロイ最適化、スキーマバリデーションまで、すべてを網羅しています。

スキルを見る

polymarket

メタ

このスキルは、開発者がPolymarket予測市場プラットフォームを活用したアプリケーション構築を可能にします。API統合による取引や市場データの取得に加え、WebSocketを介したリアルタイムデータストリーミングにより、ライブ取引や市場活動を監視できます。取引戦略の実装や、ライブ市場更新を処理するツールの作成にご利用ください。

スキルを見る

creating-opencode-plugins

メタ

このスキルは、開発者がコマンド、ファイル、LSP操作など25種類以上のイベントタイプにフックするOpenCodeプラグインを作成することを支援します。JavaScript/TypeScriptモジュール向けに、プラグイン構造、イベントAPI仕様、および実装パターンを提供します。カスタムイベント駆動ロジックでOpenCode AIアシスタントのライフサイクルをインターセプト、監視、または拡張する必要がある場合にご利用ください。

スキルを見る

sglang

メタ

SGLangは、高性能なLLMサービングフレームワークであり、RadixAttentionプレフィックスキャッシュを活用したJSON、正規表現、エージェントワークフロー向けの高速で構造化された生成を特長とします。特にプレフィックスが繰り返されるタスクにおいて、大幅に高速な推論を実現し、複雑な構造化出力やマルチターン対話に最適です。制約付きデコードが必要な場合や、広範なプレフィックス共有を伴うアプリケーションを構築する場合は、vLLMなどの代替案ではなくSGLangを選択してください。

スキルを見る