@ckelsoe/prompt-architect 3.3.1 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/CHANGELOG.md +34 -0
  4. package/README.md +7 -3
  5. package/adapters/system-prompt.md +96 -55
  6. package/package.json +6 -4
  7. package/scripts/test.js +32 -0
  8. package/skills/prompt-architect/SKILL.md +74 -41
  9. package/skills/prompt-architect/assets/templates/ape_template.txt +14 -3
  10. package/skills/prompt-architect/assets/templates/bab_template.txt +23 -10
  11. package/skills/prompt-architect/assets/templates/broke_template.txt +31 -6
  12. package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +16 -8
  13. package/skills/prompt-architect/assets/templates/care_template.txt +4 -0
  14. package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +30 -31
  15. package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +8 -0
  16. package/skills/prompt-architect/assets/templates/chain-of-verification_template.txt +26 -0
  17. package/skills/prompt-architect/assets/templates/co-star_template.txt +8 -0
  18. package/skills/prompt-architect/assets/templates/crispe_template.txt +6 -0
  19. package/skills/prompt-architect/assets/templates/ctf_template.txt +8 -0
  20. package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +7 -0
  21. package/skills/prompt-architect/assets/templates/hybrid_template.txt +44 -24
  22. package/skills/prompt-architect/assets/templates/iterative-compression_template.txt +43 -28
  23. package/skills/prompt-architect/assets/templates/least-to-most_template.txt +4 -0
  24. package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +4 -0
  25. package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +24 -14
  26. package/skills/prompt-architect/assets/templates/race_template.txt +9 -0
  27. package/skills/prompt-architect/assets/templates/rcot_template.txt +8 -0
  28. package/skills/prompt-architect/assets/templates/react_template.txt +38 -16
  29. package/skills/prompt-architect/assets/templates/rise-ie_template.txt +4 -0
  30. package/skills/prompt-architect/assets/templates/rise-ix_template.txt +3 -3
  31. package/skills/prompt-architect/assets/templates/risen_template.txt +7 -0
  32. package/skills/prompt-architect/assets/templates/rpef_template.txt +16 -11
  33. package/skills/prompt-architect/assets/templates/rtf_template.txt +9 -0
  34. package/skills/prompt-architect/assets/templates/self-consistency_template.txt +12 -0
  35. package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +18 -10
  36. package/skills/prompt-architect/assets/templates/step-back_template.txt +4 -0
  37. package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +54 -31
  38. package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +37 -21
  39. package/skills/prompt-architect/references/frameworks/ape.md +143 -57
  40. package/skills/prompt-architect/references/frameworks/bab.md +137 -58
  41. package/skills/prompt-architect/references/frameworks/broke.md +157 -57
  42. package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +183 -75
  43. package/skills/prompt-architect/references/frameworks/care.md +67 -36
  44. package/skills/prompt-architect/references/frameworks/chain-of-density.md +49 -27
  45. package/skills/prompt-architect/references/frameworks/chain-of-thought.md +28 -7
  46. package/skills/prompt-architect/references/frameworks/chain-of-verification.md +231 -0
  47. package/skills/prompt-architect/references/frameworks/co-star.md +100 -44
  48. package/skills/prompt-architect/references/frameworks/crispe.md +7 -5
  49. package/skills/prompt-architect/references/frameworks/ctf.md +73 -37
  50. package/skills/prompt-architect/references/frameworks/devils-advocate.md +105 -58
  51. package/skills/prompt-architect/references/frameworks/iterative-compression.md +236 -269
  52. package/skills/prompt-architect/references/frameworks/least-to-most.md +35 -13
  53. package/skills/prompt-architect/references/frameworks/plan-and-solve.md +38 -9
  54. package/skills/prompt-architect/references/frameworks/pre-mortem.md +176 -66
  55. package/skills/prompt-architect/references/frameworks/race.md +91 -38
  56. package/skills/prompt-architect/references/frameworks/rcot.md +1 -1
  57. package/skills/prompt-architect/references/frameworks/react.md +230 -97
  58. package/skills/prompt-architect/references/frameworks/reverse-role.md +22 -15
  59. package/skills/prompt-architect/references/frameworks/rise.md +94 -70
  60. package/skills/prompt-architect/references/frameworks/risen.md +80 -28
  61. package/skills/prompt-architect/references/frameworks/rpef.md +227 -58
  62. package/skills/prompt-architect/references/frameworks/rtf.md +2 -2
  63. package/skills/prompt-architect/references/frameworks/self-consistency.md +195 -0
  64. package/skills/prompt-architect/references/frameworks/self-refine.md +4 -2
  65. package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +67 -21
  66. package/skills/prompt-architect/references/frameworks/step-back.md +47 -15
  67. package/skills/prompt-architect/references/frameworks/tidd-ec.md +110 -45
  68. package/skills/prompt-architect/references/frameworks/tree-of-thought.md +112 -37
  69. package/skills/prompt-architect/references/techniques/few-shot.md +121 -0
@@ -4,6 +4,8 @@
4
4
 
5
5
  Least-to-Most (LtM) prompting is a decomposition-first framework that breaks a complex problem into an ordered sequence of simpler subproblems, then solves them sequentially — using each prior answer as context for the next. Unlike Chain of Thought (which reasons through a problem in one pass), LtM explicitly separates decomposition from execution, and the subproblems are sequenced from simplest to most complex.
6
6
 
7
+ When the prompt is emitted, its section headers — PROBLEM, SOURCE MATERIAL, DECOMPOSE, SOLVE SEQUENTIALLY — are stripped and the model receives a flat block; the decomposition and solving instructions are written as complete sentences, and the `Subproblem 1:` / `Final:` labels survive as literal labels inside the protocol, so the ordered structure is preserved without the headers.
8
+
7
9
  **Research basis:** "Least-to-Most Prompting Enables Complex Reasoning in Large Language Models" (Zhou et al., Google Brain, arXiv:2205.10625, ICLR 2023). On SCAN compositional generalization: LtM achieves 99.7% vs. CoT's 16%. On GSM8K math: matches or exceeds CoT with fewer errors.
8
10
 
9
11
  ## Why LtM Differs from Chain of Thought
@@ -19,7 +21,7 @@ Least-to-Most (LtM) prompting is a decomposition-first framework that breaks a c
19
21
  ## Components
20
22
 
21
23
  ### Phase 1: Decomposition
22
- **Purpose:** Break the original problem into an ordered list of subproblems, from simplest to most complex. The key: later subproblems should build on earlier ones.
24
+ **Purpose:** Break the original problem into an ordered list of subproblems, from simplest to most complex. The key: later subproblems should build on earlier ones. The DECOMPOSE header is stripped at emission, so the instruction that opens this phase must be a complete sentence; the numbered `Subproblem 1:`, `Subproblem 2:`, `Final:` labels are literal labels in the protocol and survive the stripping, which is what preserves the ordering once the header is gone.
23
25
 
24
26
  **Trigger:** "To solve [problem], we need to first solve: [list subproblems in order]"
25
27
 
@@ -29,29 +31,39 @@ Least-to-Most (LtM) prompting is a decomposition-first framework that breaks a c
29
31
  - What is the correct ordering — which must come first?
30
32
 
31
33
  ### Phase 2: Sequential Solving
32
- **Purpose:** Solve each subproblem in order, explicitly using prior answers as context.
34
+ **Purpose:** Solve each subproblem in order, explicitly using prior answers as context. Once the SOLVE SEQUENTIALLY header is removed, the only thing telling the model to reuse earlier answers is this instruction, so it ships as an explicit sentence — carry each answer forward as context for the next subproblem — rather than resting on the header.
33
35
 
34
36
  **Pattern:** Answer subproblem 1 → use that answer when solving subproblem 2 → use both when solving subproblem 3 → ... → solve original problem.
35
37
 
36
38
  ## Template Structure
37
39
 
40
+ Section headers — `PROBLEM:`, `SOURCE MATERIAL:`, `DECOMPOSE:`, `SOLVE SEQUENTIALLY:` —
41
+ are stripped at emission, so the instruction beneath each one carries its meaning, and the
42
+ `Subproblem N:` / `Final:` labels stay as literal labels rather than headings. The
43
+ `SOURCE MATERIAL` block is optional: it names the artifact the subproblems reason over and
44
+ is deleted when the problem is self-contained.
45
+
38
46
  ```
39
47
  PROBLEM:
40
48
  [The full, complex problem to solve]
41
49
 
50
+ SOURCE MATERIAL:
51
+ [Optional — paste the source material this problem depends on here (the dataset, figures, code, or document the subproblems must reason over). Delete this line and the one below it if the problem above is self-contained.]
52
+ Every subproblem below must be answered against the material above, not from assumption.
53
+
42
54
  DECOMPOSE:
43
- Break this problem into ordered subproblems, from simplest to most complex.
55
+ Break this problem into ordered subproblems, from simplest prerequisite to most complex.
44
56
  Each later subproblem should build on the answer to the previous.
45
57
 
46
- Subproblem 1: [Simplest prerequisite]
47
- Subproblem 2: [Next level, may depend on #1]
48
- Subproblem 3: [More complex, depends on #1-2]
49
- ...
58
+ Subproblem 1: [Simplest prerequisite — must be answered first]
59
+ Subproblem 2: [Builds on #1]
60
+ Subproblem 3: [Builds on #1-2]
61
+ [Add subproblems as needed]
50
62
  Final: [The original problem, now solvable using all prior answers]
51
63
 
52
64
  SOLVE SEQUENTIALLY:
53
- Solve each subproblem in order. Use prior answers as context for each
54
- subsequent subproblem. Show each solution before moving to the next.
65
+ Solve each subproblem in order. Use prior answers explicitly as context
66
+ for each subsequent subproblem. Show each solution before moving to the next.
55
67
  ```
56
68
 
57
69
  ### Single-Pass Trigger (model decomposes and solves itself):
@@ -66,12 +78,17 @@ Problem: [your problem]
66
78
 
67
79
  ## Complete Examples
68
80
 
81
+ Every example below is shown in emitted form. Where the subproblems reason over an existing
82
+ artifact, the `SOURCE MATERIAL` block carries it and later subproblems refer to "the
83
+ material above"; where the problem is self-contained, that block is deleted.
84
+
69
85
  ### Example 1: Multi-Hop Reasoning
70
86
 
71
87
  **Before LtM:**
72
88
  "What would the tax implications be for a US remote employee working from Portugal for 3 months?"
73
89
 
74
- **After LtM:**
90
+ **After LtM** (no source material — the problem is self-contained, so the `SOURCE MATERIAL`
91
+ block is deleted):
75
92
  ```
76
93
  PROBLEM:
77
94
  What are the tax implications for a US citizen employed by a US company who
@@ -102,7 +119,8 @@ SOLVE SEQUENTIALLY:
102
119
  **Before LtM:**
103
120
  "How do I add real-time notifications to my Django app?"
104
121
 
105
- **After LtM:**
122
+ **After LtM** (no source material — the problem is self-contained, so the `SOURCE MATERIAL`
123
+ block is deleted):
106
124
  ```
107
125
  PROBLEM:
108
126
  I need to add real-time push notifications to a Django app with PostgreSQL.
@@ -132,12 +150,16 @@ SOLVE SEQUENTIALLY:
132
150
  **Before LtM:**
133
151
  "Should we expand to the European market?"
134
152
 
135
- **After LtM:**
153
+ **After LtM** (source material supplied):
136
154
  ```
137
155
  PROBLEM:
138
156
  Our B2B SaaS has strong US traction. Should we expand to the European market
139
157
  now, given our current 20-person team and 18 months of runway?
140
158
 
159
+ SOURCE MATERIAL:
160
+ [Paste the current financials, team breakdown, and US traction metrics here]
161
+ Every subproblem below must be answered against the material above, not from assumption.
162
+
141
163
  DECOMPOSE:
142
164
  Subproblem 1: What are the key differences between US and European B2B SaaS
143
165
  markets that affect a US-native product? (GDPR, sales cycles, localization needs)
@@ -148,7 +170,7 @@ Subproblem 2: What resources are typically required for a credible EU market ent
148
170
  Subproblem 3: What are the signals that a company is or isn't ready for
149
171
  international expansion?
150
172
 
151
- Subproblem 4: Given our specific constraints (20 people, 18 months runway),
173
+ Subproblem 4: Given the team size, runway, and traction shown in the material above,
152
174
  how do our resources map to those requirements?
153
175
 
154
176
  Final: Should we expand to Europe now, wait, or explore a different
@@ -4,6 +4,8 @@
4
4
 
5
5
  Plan-and-Solve (PS+) is a zero-shot prompting technique that improves upon standard Chain of Thought by instructing the model to explicitly plan the solution approach before executing it — and to be careful about extracting variables and calculating intermediate results. It requires no examples or demonstrations and consistently outperforms Zero-Shot CoT ("Let's think step by step") on reasoning tasks.
6
6
 
7
+ When the prompt is emitted, the `PROBLEM:` and `SOURCE MATERIAL:` headers are stripped and the instruction reaches the model as a flat block. The plan-and-solve trigger is already a complete sentence, so it survives the stripping intact and needs no carrier sentence; the optional `SOURCE MATERIAL` block names the figures the calculation runs on and ties them to the problem in prose, and is deleted when the problem already states every value.
8
+
7
9
  **Research basis:** "Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models" (Wang et al., ACL 2023, arXiv:2305.04091). Tested across 10 reasoning datasets — consistently outperforms Zero-Shot-CoT and is competitive with few-shot CoT.
8
10
 
9
11
  ## The Core Trigger Phrases
@@ -29,11 +31,22 @@ The PS+ additions over PS:
29
31
 
30
32
  ## Template Structure
31
33
 
34
+ Section headers — `PROBLEM:` and `SOURCE MATERIAL:` — are stripped at emission, so the
35
+ trigger that follows is written as a complete sentence and survives on its own; it was
36
+ already prose, not a header, which is why PS+ needs no carrier sentence for it. The template
37
+ drops the old `INSTRUCTION:` header for the same reason: a header there would only be
38
+ stripped anyway, so the trigger now sits as bare prose. The `SOURCE MATERIAL` block is
39
+ optional — it names the dataset or table the calculation runs on and is deleted when the
40
+ problem already states every value needed.
41
+
32
42
  ```
33
43
  PROBLEM:
34
- [Your problem or question]
44
+ [Your question, calculation, or reasoning problem]
45
+
46
+ SOURCE MATERIAL:
47
+ [Optional — paste the source data the problem depends on here (the dataset, table, figures, or constraint list the calculation runs on). Delete this line and the one below it if the problem above already states every value needed.]
48
+ The figures and constraints in the material above are authoritative — extract from them rather than from assumed or recalled values.
35
49
 
36
- INSTRUCTION:
37
50
  Let's first understand the problem, extract relevant variables and their
38
51
  corresponding numerals, and devise a complete plan. Then, let's carry out
39
52
  the plan, calculate intermediate values, pay attention to computation,
@@ -50,12 +63,19 @@ step by step.
50
63
 
51
64
  ## Complete Examples
52
65
 
66
+ Every example below is shown in emitted form. The plan-and-solve trigger is the same
67
+ complete sentence in each — it is what survives header stripping. Where the calculation runs
68
+ on a pasted dataset or constraint list, the `SOURCE MATERIAL` block carries it and the
69
+ problem refers to "the material above"; where every value is already in the problem
70
+ statement, that block is deleted.
71
+
53
72
  ### Example 1: Math / Calculation
54
73
 
55
74
  **Before PS+:**
56
75
  "If a SaaS company has 500 customers at $200/month each, 5% monthly churn, and adds 30 new customers per month, what is the MRR in 6 months?"
57
76
 
58
- **After PS+:**
77
+ **After PS+** (no source material — every value is stated in the problem, so the
78
+ `SOURCE MATERIAL` block is deleted):
59
79
  ```
60
80
  PROBLEM:
61
81
  A SaaS company has 500 customers paying $200/month each. Monthly churn
@@ -98,13 +118,16 @@ Final answer: Month 6 MRR = $X
98
118
  **Before PS+:**
99
119
  "Our API is returning responses in 800ms average. We want to get it under 200ms. What should we do?"
100
120
 
101
- **After PS+:**
121
+ **After PS+** (source material supplied):
102
122
  ```
103
123
  PROBLEM:
104
124
  Our REST API averages 800ms response time. Target is under 200ms.
105
125
  The API serves product catalog queries (read-heavy), is Node.js with
106
- PostgreSQL, and currently has no caching layer. Database queries are
107
- the main bottleneck (600ms average per request).
126
+ PostgreSQL, and currently has no caching layer.
127
+
128
+ SOURCE MATERIAL:
129
+ [Paste the endpoint's profiling output and the current server and database configuration here]
130
+ The figures and constraints in the material above are authoritative — extract from them rather than from assumed or recalled values.
108
131
 
109
132
  Let's first understand the problem, extract relevant variables and their
110
133
  corresponding numerals, and devise a complete plan. Then, let's carry out
@@ -116,7 +139,8 @@ the plan and solve step by step.
116
139
  **Before PS+:**
117
140
  "What's our payback period if CAC is $1,200 and average MRR per customer is $150 with 70% gross margin?"
118
141
 
119
- **After PS+:**
142
+ **After PS+** (no source material — every value is stated in the problem, so the
143
+ `SOURCE MATERIAL` block is deleted):
120
144
  ```
121
145
  PROBLEM:
122
146
  Customer Acquisition Cost (CAC): $1,200
@@ -136,10 +160,15 @@ and solve the problem step by step.
136
160
  **Before PS+:**
137
161
  "Given these constraints [complex scheduling problem], is there a valid schedule?"
138
162
 
139
- **After PS+:**
163
+ **After PS+** (source material supplied):
140
164
  ```
141
165
  PROBLEM:
142
- [Complex scheduling problem with constraints]
166
+ Determine whether a valid schedule exists that satisfies every constraint,
167
+ or prove that none does.
168
+
169
+ SOURCE MATERIAL:
170
+ [Paste the full list of scheduling constraints — resources, time windows, and dependencies — here]
171
+ The figures and constraints in the material above are authoritative — extract from them rather than from assumed or recalled values.
143
172
 
144
173
  Let's first understand the problem, extract all constraints and their
145
174
  relationships, and devise a complete plan for finding a valid schedule
@@ -16,6 +16,9 @@ The mechanism: committing to the failure frame bypasses optimism bias and elicit
16
16
 
17
17
  ## Components
18
18
 
19
+ ### Source Material (optional)
20
+ **Purpose:** The project plan, proposal, or decision document the analysis works from. Supplying it grounds the failure causes in what the plan actually says rather than in the model's assumptions about a project of that description. The template's slot is optional and self-deleting: if there is nothing to paste, the bracketed block and the sentence directly below it both come out.
21
+
19
22
  ### Project/Decision Description
20
23
  **Purpose:** What is being analyzed. Include enough context for the model to generate specific (not generic) failure causes.
21
24
 
@@ -27,6 +30,8 @@ The mechanism: committing to the failure frame bypasses optimism bias and elicit
27
30
 
28
31
  **Standard framing:** *"It is [future date] and [project/decision] has completely and catastrophically failed."*
29
32
 
33
+ **The frame has to be defended, not just stated.** A model given only the assumption will drift back into probabilistic language within a few sentences — "adoption may have lagged", "the integration could have slipped" — which collapses the pre-mortem back into ordinary forward risk analysis and throws away the entire mechanism. The template therefore opens by declaring the failure settled fact rather than a possibility, and closes that opening with an explicit prohibition: *do not hedge with "could," "might," or "may."* Keep both. Per SKILL.md step 5, a prohibition the user relies on must survive into the emitted prompt as explicit instruction text — it cannot be left to a section header, because headers are stripped at emission.
34
+
30
35
  ### Domain Analysis
31
36
  **Purpose:** The specific dimensions to analyze for failure causes. More dimensions = more comprehensive coverage.
32
37
 
@@ -41,102 +46,206 @@ The mechanism: committing to the failure frame bypasses optimism bias and elicit
41
46
  ### Warning Signs
42
47
  **Purpose:** For each failure cause, identify the earliest observable warning sign. This is what makes pre-mortem actionable — not just "this could fail" but "this is what we'd see 30 days before it fails."
43
48
 
44
- ### Mitigation Pass (optional)
45
- **Purpose:** A second pass ranking the failure causes by likelihood × preventability and suggesting pre-emptive actions.
49
+ ### Priority Assessment
50
+ **Purpose:** A closing pass over the causes already listed, singling out three things: the 3 most LIKELY to be what actually happened, the 3 most PREVENTABLE — where action taken today would have made the most difference — and any single point of failure that could have killed the project on its own.
51
+
52
+ These are two separate top-3 lists, not one ranking by a combined likelihood-and-preventability score. A cause can be near-certain and unpreventable, or unlikely and trivially preventable; collapsing them into a single ranking buries both. The preventable list is the one that converts the analysis into action. Unlike Source Material above, this slot is unconditional — the template gives it no bracketed block and no deletion instruction.
46
53
 
47
54
  ## Template Structure
48
55
 
56
+ Section headers are stripped at emission, so every slot's meaning is carried by the prose around and inside it rather than by the header above it. The opening paragraph is not a title — it is the instruction that establishes the settled-failure frame, and it ships with the prompt.
57
+
49
58
  ```
50
- PRE-MORTEM ANALYSIS
59
+ You are conducting a pre-mortem on the project described below. The failure stated further
60
+ down is settled fact, not a possibility — work backwards from it and explain why it happened.
61
+ Do not hedge with "could," "might," or "may."
62
+
63
+ SOURCE MATERIAL:
64
+ [Optional — paste the project plan, proposal, or decision document here. If you have nothing
65
+ to paste, delete this bracketed block along with the sentence directly below it.]
66
+ Use the material above as the factual basis for the work described below.
51
67
 
52
68
  PROJECT/DECISION:
53
- [Describe the project, plan, or decision being analyzed]
69
+ [Describe the project, plan, or decision being analyzed in full sentences — what is being
70
+ attempted, plus team size, timeline, resources, goals, and constraints]
54
71
 
55
72
  FAILURE ASSUMPTION:
56
- It is [DATE — e.g., 12 months from now] and [project/decision] has
57
- completely and catastrophically failed. It did not achieve [primary goal].
73
+ It is [DATE — e.g., 12 months from now] and [project/decision] has completely and
74
+ catastrophically failed. It did not achieve [primary goal].
58
75
 
59
- FAILURE ANALYSIS:
60
- Describe the failure in 2-3 sentences from the perspective of someone
61
- looking back on it.
76
+ FAILURE NARRATIVE:
77
+ Begin by describing how that failure unfolded, in 2-3 sentences, in past tense from the
78
+ perspective of someone looking back on it.
62
79
 
63
- Then identify [8-12] specific reasons this failed. For each reason:
80
+ FAILURE CAUSES:
81
+ Then identify [8-12] specific reasons it failed, each stated as something that already went
82
+ wrong. Cover technical/product, team/organizational, market/adoption, financial/resource,
83
+ external dependencies, and timeline/scope. Give each cause three lines:
64
84
  - CAUSE: [What specifically went wrong — be specific, not generic]
65
85
  - DOMAIN: [Technical / People / Market / Financial / External / Timeline]
66
86
  - WARNING SIGN: [What was the earliest observable indicator this was happening?]
67
-
68
- PRIORITY:
69
- After listing all causes, identify:
70
- 1. The 3 most likely failure causes (given our specific situation)
71
- 2. The 3 most preventable failure causes (where action now would help most)
72
- 3. Any single point of failure that could kill the project alone
87
+ "CAUSE:", "DOMAIN:" and "WARNING SIGN:" are literal labels in this protocol, not headings —
88
+ keep them exactly as written.
89
+
90
+ PRIORITY ASSESSMENT:
91
+ After listing every cause, close by singling out three things:
92
+ 1. The 3 causes most LIKELY to be what actually happened, given the situation above.
93
+ 2. The 3 most PREVENTABLE causes — where action taken today would have made the most
94
+ difference.
95
+ 3. Any single point of failure that could have killed the project on its own.
73
96
  ```
74
97
 
98
+ Three notes on why the shape is what it is:
99
+
100
+ `FAILURE NARRATIVE` and `FAILURE CAUSES` are separate slots because they ask for different things — one continuous retrospective paragraph, then a structured enumeration. Collapsing them into a single analysis slot reliably produces a list with a narrative sentence stapled to the front, losing the retrospective voice that carries the frame.
101
+
102
+ The `CAUSE` / `DOMAIN` / `WARNING SIGN` labels are the one place in this template where bare labels do survive into the output, because they are labels *inside* the requested response format rather than scaffolding headers around the prompt. The template says so explicitly, which is why that line is part of the prompt and not a comment about it.
103
+
104
+ Every instruction slot is phrased as a sequenced directive — "Begin by", "Then identify", "After listing every cause, close by" — so the ordering survives even with the headers removed.
105
+
75
106
  ## Complete Examples
76
107
 
108
+ Every example below keeps the headers on the page for readability, but is written in emitted form beneath them: the settled-failure paragraph first, then each slot carrying its own role in prose. Read the headers as scaffolding that will be deleted — the examples are written so that nothing is lost when it is. Note that only the user-supplied slots (source material, project, failure assumption) differ between examples; the instruction slots are the protocol and stay as written.
109
+
77
110
  ### Example 1: Product Launch
78
111
 
112
+ **Before Pre-Mortem:**
113
+ "What are the risks with our Q3 launch?"
114
+
115
+ **After Pre-Mortem** (source material supplied):
79
116
  ```
80
- PROJECT:
81
- We are launching a new B2B project management tool for engineering teams
82
- in Q3. Our team is 4 engineers, 1 designer, and 1 PM. We have 3 design
83
- partners signed up for beta. Target: 50 paying customers by end of Q4.
117
+ You are conducting a pre-mortem on the project described below. The failure stated further
118
+ down is settled fact, not a possibility work backwards from it and explain why it happened.
119
+ Do not hedge with "could," "might," or "may."
84
120
 
85
- FAILURE ASSUMPTION:
86
- It is December 31st and we have failed to reach 50 paying customers.
87
- The product launched in October with 8 beta customers but growth stalled.
121
+ SOURCE MATERIAL:
122
+ [Paste the Q3 launch plan and the three design partners' beta feedback notes here]
123
+ Use the material above as the factual basis for the work described below.
88
124
 
89
- FAILURE ANALYSIS:
90
- Describe how this played out. Then identify 10 specific failure causes
91
- with domain, and earliest warning sign for each.
125
+ PROJECT/DECISION:
126
+ We are launching a new B2B project management tool for engineering teams in Q3. The team is
127
+ 4 engineers, 1 designer, and 1 PM. Three design partners are signed up for the beta. The
128
+ target is 50 paying customers by the end of Q4, against two quarters of remaining runway.
92
129
 
93
- PRIORITY:
94
- Rank by likelihood. Flag any single points of failure.
130
+ FAILURE ASSUMPTION:
131
+ It is December 31st and the launch has completely and catastrophically failed. It did not
132
+ achieve 50 paying customers. The product shipped in October with 8 beta customers and
133
+ growth stalled there.
134
+
135
+ FAILURE NARRATIVE:
136
+ Begin by describing how that failure unfolded, in 2-3 sentences, in past tense from the
137
+ perspective of someone looking back on it.
138
+
139
+ FAILURE CAUSES:
140
+ Then identify 10 specific reasons it failed, each stated as something that already went
141
+ wrong. Cover technical/product, team/organizational, market/adoption, financial/resource,
142
+ external dependencies, and timeline/scope. Give each cause three lines:
143
+ - CAUSE: [What specifically went wrong — be specific, not generic]
144
+ - DOMAIN: [Technical / People / Market / Financial / External / Timeline]
145
+ - WARNING SIGN: [What was the earliest observable indicator this was happening?]
146
+ "CAUSE:", "DOMAIN:" and "WARNING SIGN:" are literal labels in this protocol, not headings —
147
+ keep them exactly as written.
148
+
149
+ PRIORITY ASSESSMENT:
150
+ After listing every cause, close by singling out three things:
151
+ 1. The 3 causes most LIKELY to be what actually happened, given the situation above.
152
+ 2. The 3 most PREVENTABLE causes — where action taken today would have made the most
153
+ difference.
154
+ 3. Any single point of failure that could have killed the launch on its own.
95
155
  ```
96
156
 
97
157
  ### Example 2: Organizational Change
98
158
 
99
- ```
100
- PROJECT:
101
- We are implementing a company-wide shift to OKRs across a 200-person
102
- organization. Executive sponsorship is in place. We're starting with
103
- a 2-day offsite to train team leads, then cascading to individual
104
- contributors over the following 6 weeks.
159
+ **Before Pre-Mortem:**
160
+ "What could go wrong with our OKR rollout?"
105
161
 
106
- FAILURE ASSUMPTION:
107
- It is 6 months from now and the OKR implementation has failed.
108
- Most teams have abandoned OKRs and reverted to old goal-setting methods.
162
+ **After Pre-Mortem** (no source material — the optional block and its follow-on sentence are both deleted):
163
+ ```
164
+ You are conducting a pre-mortem on the project described below. The failure stated further
165
+ down is settled fact, not a possibility — work backwards from it and explain why it happened.
166
+ Do not hedge with "could," "might," or "may."
109
167
 
110
- FAILURE ANALYSIS:
111
- 10 specific reasons the rollout failed. Include: leadership domain,
112
- middle management domain, cultural domain, process domain, and tooling.
113
- For each: earliest warning sign.
168
+ PROJECT/DECISION:
169
+ We are implementing a company-wide shift to OKRs across a 200-person organization.
170
+ Executive sponsorship is in place. The rollout starts with a 2-day offsite to train team
171
+ leads, then cascades to individual contributors over the following 6 weeks. No dedicated
172
+ program manager is assigned; team leads absorb the work alongside their existing roles.
114
173
 
115
- PRIORITY:
116
- The 3 most likely. The most preventable. Any single point of failure.
174
+ FAILURE ASSUMPTION:
175
+ It is 6 months from now and the OKR implementation has completely and catastrophically
176
+ failed. It did not achieve durable adoption — most teams abandoned OKRs and reverted to
177
+ their old goal-setting methods.
178
+
179
+ FAILURE NARRATIVE:
180
+ Begin by describing how that failure unfolded, in 2-3 sentences, in past tense from the
181
+ perspective of someone looking back on it.
182
+
183
+ FAILURE CAUSES:
184
+ Then identify 10 specific reasons it failed, each stated as something that already went
185
+ wrong. Cover leadership behavior, middle-management incentives, culture, process design,
186
+ tooling, and timeline/scope. Give each cause three lines:
187
+ - CAUSE: [What specifically went wrong — be specific, not generic]
188
+ - DOMAIN: [Leadership / Middle management / Culture / Process / Tooling / Timeline]
189
+ - WARNING SIGN: [What was the earliest observable indicator this was happening?]
190
+ "CAUSE:", "DOMAIN:" and "WARNING SIGN:" are literal labels in this protocol, not headings —
191
+ keep them exactly as written.
192
+
193
+ PRIORITY ASSESSMENT:
194
+ After listing every cause, close by singling out three things:
195
+ 1. The 3 causes most LIKELY to be what actually happened, given the situation above.
196
+ 2. The 3 most PREVENTABLE causes — where action taken today would have made the most
197
+ difference.
198
+ 3. Any single point of failure that could have killed the rollout on its own.
117
199
  ```
118
200
 
201
+ Note the substituted `DOMAIN` values. The template's six domains are the general-purpose default; where a project's real failure surfaces are known, naming them gets better coverage than the generic set. The label itself stays literal.
202
+
119
203
  ### Example 3: Technical Decision
120
204
 
205
+ **Before Pre-Mortem:**
206
+ "Review our database migration plan for risks."
207
+
208
+ **After Pre-Mortem** (source material supplied):
121
209
  ```
122
- PROJECT:
123
- We are migrating our primary database from MySQL to PostgreSQL. Timeline:
124
- 3 months. Team: 2 senior engineers part-time. We're running 2M daily
125
- active users with a 99.9% uptime SLA.
210
+ You are conducting a pre-mortem on the project described below. The failure stated further
211
+ down is settled fact, not a possibility — work backwards from it and explain why it happened.
212
+ Do not hedge with "could," "might," or "may."
213
+
214
+ SOURCE MATERIAL:
215
+ [Paste the migration runbook, the current schema, and the rollback plan here]
216
+ Use the material above as the factual basis for the work described below.
217
+
218
+ PROJECT/DECISION:
219
+ We are migrating our primary database from MySQL to PostgreSQL over a 3-month timeline. The
220
+ team is 2 senior engineers working part-time on it. The system serves 2M daily active users
221
+ under a 99.9% uptime SLA, and neither engineer has run a migration at this scale before.
126
222
 
127
223
  FAILURE ASSUMPTION:
128
- It is 4 months from now and the migration has failed. We experienced
129
- significant downtime, data integrity issues, or were forced to roll back.
130
-
131
- FAILURE ANALYSIS:
132
- 10 specific technical and organizational failure causes.
133
- Cover: migration strategy, testing gaps, rollback planning,
134
- team knowledge gaps, operational issues, and unforeseen dependencies.
135
- For each: earliest warning sign.
136
-
137
- PRIORITY:
138
- The 3 most likely. The most preventable. Any single point of failure
139
- that could cause a full rollback or data loss.
224
+ It is 4 months from now and the migration has completely and catastrophically failed. It did
225
+ not achieve a clean cutover — we took significant downtime, hit data integrity problems, and
226
+ were forced to roll back.
227
+
228
+ FAILURE NARRATIVE:
229
+ Begin by describing how that failure unfolded, in 2-3 sentences, in past tense from the
230
+ perspective of someone looking back on it.
231
+
232
+ FAILURE CAUSES:
233
+ Then identify 10 specific reasons it failed, each stated as something that already went
234
+ wrong. Cover migration strategy, testing gaps, rollback planning, team knowledge gaps,
235
+ operational and on-call issues, and unforeseen dependencies. Give each cause three lines:
236
+ - CAUSE: [What specifically went wrong — be specific, not generic]
237
+ - DOMAIN: [Strategy / Testing / Rollback / Knowledge / Operations / Dependencies]
238
+ - WARNING SIGN: [What was the earliest observable indicator this was happening?]
239
+ "CAUSE:", "DOMAIN:" and "WARNING SIGN:" are literal labels in this protocol, not headings —
240
+ keep them exactly as written.
241
+
242
+ PRIORITY ASSESSMENT:
243
+ After listing every cause, close by singling out three things:
244
+ 1. The 3 causes most LIKELY to be what actually happened, given the situation above.
245
+ 2. The 3 most PREVENTABLE causes — where action taken today would have made the most
246
+ difference.
247
+ 3. Any single point of failure that could have forced a full rollback or caused data loss
248
+ on its own.
140
249
  ```
141
250
 
142
251
  ## Best Use Cases
@@ -187,11 +296,12 @@ that could cause a full rollback or data loss.
187
296
 
188
297
  ## Quick Reference
189
298
 
190
- | Component | Purpose |
299
+ | Template slot | Purpose |
191
300
  |-----------|---------|
192
- | Project Description | What's being analyzed |
193
- | Future Date | Time horizon |
194
- | Failure Framing | "Has already failed" (committed, not probabilistic) |
195
- | Domain Analysis | Dimensions to cover |
196
- | Warning Signs | Earliest observable indicators |
197
- | Priority Pass | Most likely + most preventable + single points of failure |
301
+ | Opening paragraph | Declares the failure settled fact; bans "could / might / may" |
302
+ | `SOURCE MATERIAL` | Optional plan or decision document to ground causes in; self-deleting |
303
+ | `PROJECT/DECISION` | What's being analyzed, with team, timeline, resources, constraints |
304
+ | `FAILURE ASSUMPTION` | Time horizon + "has already failed" + the goal it missed |
305
+ | `FAILURE NARRATIVE` | 2-3 sentences, past tense, retrospective voice |
306
+ | `FAILURE CAUSES` | 8-12 causes, each as CAUSE / DOMAIN / WARNING SIGN |
307
+ | `PRIORITY ASSESSMENT` | Most likely + most preventable + single points of failure |