@ckelsoe/prompt-architect 3.2.2 → 3.4.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.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +135 -5
- package/MIGRATION.md +1 -1
- package/README.md +32 -47
- package/adapters/README.md +1 -1
- package/adapters/system-prompt.md +115 -59
- package/package.json +5 -4
- package/scripts/install.js +52 -22
- package/scripts/test.js +88 -40
- package/scripts/validate-skill.js +184 -56
- package/skills/prompt-architect/SKILL.md +94 -79
- package/skills/prompt-architect/assets/templates/ape_template.txt +14 -3
- package/skills/prompt-architect/assets/templates/bab_template.txt +23 -10
- package/skills/prompt-architect/assets/templates/broke_template.txt +31 -6
- package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +16 -8
- package/skills/prompt-architect/assets/templates/care_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +64 -35
- package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/co-star_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/crispe_template.txt +6 -0
- package/skills/prompt-architect/assets/templates/ctf_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +7 -0
- package/skills/prompt-architect/assets/templates/hybrid_template.txt +44 -24
- package/skills/prompt-architect/assets/templates/iterative-compression_template.txt +74 -0
- package/skills/prompt-architect/assets/templates/least-to-most_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +24 -14
- package/skills/prompt-architect/assets/templates/race_template.txt +9 -0
- package/skills/prompt-architect/assets/templates/rcot_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/react_template.txt +38 -16
- package/skills/prompt-architect/assets/templates/rise-ie_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/rise-ix_template.txt +3 -3
- package/skills/prompt-architect/assets/templates/risen_template.txt +7 -0
- package/skills/prompt-architect/assets/templates/rpef_template.txt +16 -11
- package/skills/prompt-architect/assets/templates/rtf_template.txt +9 -0
- package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +18 -10
- package/skills/prompt-architect/assets/templates/step-back_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +54 -31
- package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +37 -21
- package/skills/prompt-architect/references/frameworks/ape.md +145 -57
- package/skills/prompt-architect/references/frameworks/bab.md +139 -58
- package/skills/prompt-architect/references/frameworks/broke.md +157 -57
- package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +184 -76
- package/skills/prompt-architect/references/frameworks/care.md +67 -36
- package/skills/prompt-architect/references/frameworks/chain-of-density.md +111 -417
- package/skills/prompt-architect/references/frameworks/chain-of-thought.md +45 -19
- package/skills/prompt-architect/references/frameworks/co-star.md +102 -44
- package/skills/prompt-architect/references/frameworks/crispe.md +7 -5
- package/skills/prompt-architect/references/frameworks/ctf.md +75 -37
- package/skills/prompt-architect/references/frameworks/devils-advocate.md +105 -58
- package/skills/prompt-architect/references/frameworks/iterative-compression.md +448 -0
- package/skills/prompt-architect/references/frameworks/least-to-most.md +35 -13
- package/skills/prompt-architect/references/frameworks/plan-and-solve.md +38 -9
- package/skills/prompt-architect/references/frameworks/pre-mortem.md +182 -72
- package/skills/prompt-architect/references/frameworks/race.md +93 -38
- package/skills/prompt-architect/references/frameworks/rcot.md +1 -1
- package/skills/prompt-architect/references/frameworks/react.md +230 -97
- package/skills/prompt-architect/references/frameworks/reverse-role.md +23 -16
- package/skills/prompt-architect/references/frameworks/rise.md +120 -77
- package/skills/prompt-architect/references/frameworks/risen.md +82 -28
- package/skills/prompt-architect/references/frameworks/rpef.md +227 -58
- package/skills/prompt-architect/references/frameworks/rtf.md +4 -2
- package/skills/prompt-architect/references/frameworks/self-refine.md +4 -2
- package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +68 -22
- package/skills/prompt-architect/references/frameworks/step-back.md +48 -16
- package/skills/prompt-architect/references/frameworks/tidd-ec.md +129 -51
- package/skills/prompt-architect/references/frameworks/tree-of-thought.md +112 -37
- package/skills/prompt-architect/scripts/framework_analyzer.py +0 -807
- package/skills/prompt-architect/scripts/prompt_evaluator.py +0 -336
|
@@ -2,20 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
Pre-Mortem Prompting adapts Gary Klein's prospective hindsight technique to AI prompting. Instead of asking "what could go wrong?" (which triggers optimism bias and produces vague risks), it instructs the AI to *assume* the project or decision has already failed catastrophically — then work backwards to identify the specific reasons why.
|
|
5
|
+
Pre-Mortem Prompting adapts Gary Klein's prospective hindsight technique to AI prompting. Instead of asking "what could go wrong?" (which triggers optimism bias and produces vague risks), it instructs the AI to *assume* the project or decision has already failed catastrophically — then work backwards to identify the specific reasons why. In practice this committed-failure frame tends to yield more specific, actionable failure identification than an open-ended "what could go wrong?" question.
|
|
6
6
|
|
|
7
|
-
**Research basis:**
|
|
7
|
+
**Research basis:** Mitchell, Russo & Pennington, "Back to the Future: Temporal Perspective in the Explanation of Events" (*Journal of Behavioral Decision Making*, 1989) found that prospective hindsight — imagining an event has *already occurred* — increases the ability to correctly identify **reasons for future outcomes** by ~30%, compared with imagining it *might* occur. Gary Klein popularized the technique as the "pre-mortem" (*Harvard Business Review*, September 2007), which is where the 30% figure is most often cited from. Note the measured comparison is already-happened vs. might-happen framing, not pre-mortem vs. forward risk analysis. Application to LLM prompting is practitioner-level (no dedicated AI paper), but the cognitive mechanism is well-established.
|
|
8
8
|
|
|
9
|
-
## Why Assumed
|
|
9
|
+
## Why the Assumed-Failure Frame Helps
|
|
10
10
|
|
|
11
|
-
Forward risk: *"What could go wrong?"* →
|
|
11
|
+
Forward risk: *"What could go wrong?"* → Tends to produce vague, hedged answers ("there might be delays", "adoption could be low")
|
|
12
12
|
|
|
13
|
-
Pre-mortem: *"This has already failed — why did it fail?"* →
|
|
13
|
+
Pre-mortem: *"This has already failed — why did it fail?"* → Tends to produce specific, committed answers ("the integration with Salesforce took 3x longer than estimated because we didn't account for their API rate limits")
|
|
14
14
|
|
|
15
|
-
The
|
|
15
|
+
The mechanism: committing to the failure frame bypasses optimism bias and elicits specific causal narratives rather than probabilistic hedges. This is the practitioner rationale for the technique — the 1989 study measured the certainty framing itself, not a head-to-head against forward risk analysis, so treat the comparison above as an observed pattern rather than a measured result.
|
|
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 difference: by committing to the failure frame, the model bypasses optimism
|
|
|
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 difference: by committing to the failure frame, the model bypasses optimism
|
|
|
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
|
-
###
|
|
45
|
-
**Purpose:** A
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
60
|
-
|
|
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
|
-
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
94
|
-
|
|
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
|
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
116
|
-
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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.
|
|
129
|
-
significant downtime, data integrity
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
|
|
|
299
|
+
| Template slot | Purpose |
|
|
191
300
|
|-----------|---------|
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
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 |
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
RACE (Role, Action, Context, Expectation) is a medium-complexity framework that sits between RTF's simplicity and CO-STAR's richness. It adds two critical improvements over RTF: situational context (missing from RTF) and an explicit expectation of success (missing from both RTF and CTF). RACE is ideal when you need all four pillars — expertise framing, task clarity, background, and a defined success bar — without the full overhead of CO-STAR or RISEN.
|
|
5
|
+
RACE (Role, Action, Context, Expectation) is a medium-complexity framework that sits between RTF's simplicity and CO-STAR's richness. It adds two critical improvements over RTF: situational context (missing from RTF) and an explicit expectation of success (missing from both RTF and CTF). RACE is ideal when you need all four pillars — expertise framing, task clarity, background, and a defined success bar — without the full overhead of CO-STAR or RISEN. Section headers are stripped at emission, so a RACE prompt lands as a flat block — a role sentence, an action sentence, a paragraph of context, and a success-bar statement — preceded by an optional source-material block whenever the task applies to an artifact the user already has.
|
|
6
|
+
|
|
7
|
+
**Origin:** No single documented originator. RACE is a community prompt-engineering convention documented in practitioner guides (e.g. fvivas.com, 20 April 2025) with no attributed creator, and does not appear in any peer-reviewed prompting survey. **Not to be confused with** the RACE digital-marketing planning model (Reach, Act, Convert, Engage), created by Dave Chaffey of Smart Insights in 2010 — an unrelated marketing framework that shares only the acronym.
|
|
6
8
|
|
|
7
9
|
## Components
|
|
8
10
|
|
|
9
11
|
### R - Role
|
|
10
|
-
**Purpose:** Define the expertise or persona needed for the task.
|
|
12
|
+
**Purpose:** Define the expertise or persona needed for the task. Written as a complete sentence — usually beginning "You are…" — so it still reads as a persona assignment once the `ROLE` header is stripped.
|
|
11
13
|
|
|
12
14
|
**Questions to Ask:**
|
|
13
15
|
- What expertise is required?
|
|
@@ -15,12 +17,12 @@ RACE (Role, Action, Context, Expectation) is a medium-complexity framework that
|
|
|
15
17
|
- What level of knowledge is assumed?
|
|
16
18
|
|
|
17
19
|
**Examples:**
|
|
18
|
-
- "You are a senior backend engineer
|
|
19
|
-
- "Act as an experienced UX designer
|
|
20
|
-
- "You are a plain-language technical writer
|
|
20
|
+
- "You are a senior backend engineer familiar with REST conventions."
|
|
21
|
+
- "Act as an experienced UX designer who works on consumer onboarding flows."
|
|
22
|
+
- "You are a plain-language technical writer for developer documentation."
|
|
21
23
|
|
|
22
24
|
### A - Action
|
|
23
|
-
**Purpose:** State what needs to be done — the task.
|
|
25
|
+
**Purpose:** State what needs to be done — the task — as one complete imperative sentence. When source material is supplied above, refer to it as "the … above," never "described below": the artifact precedes the action once emitted, so a downward reference would dangle.
|
|
24
26
|
|
|
25
27
|
**Questions to Ask:**
|
|
26
28
|
- What exactly needs to happen?
|
|
@@ -28,12 +30,12 @@ RACE (Role, Action, Context, Expectation) is a medium-complexity framework that
|
|
|
28
30
|
- What's the scope?
|
|
29
31
|
|
|
30
32
|
**Examples:**
|
|
31
|
-
- "Review
|
|
32
|
-
- "Write
|
|
33
|
-
- "Identify the top
|
|
33
|
+
- "Review the REST API design above for consistency, usability, and potential issues."
|
|
34
|
+
- "Write the copy for a 3-screen onboarding flow for our task management app."
|
|
35
|
+
- "Identify the top 5 risks in the migration plan above."
|
|
34
36
|
|
|
35
37
|
### C - Context
|
|
36
|
-
**Purpose:** Provide the situational background needed to calibrate the output.
|
|
38
|
+
**Purpose:** Provide the situational background needed to calibrate the output. It fills as a self-contained paragraph and survives header stripping on its own, so long as it reads as description of a situation rather than a bare label.
|
|
37
39
|
|
|
38
40
|
**Questions to Ask:**
|
|
39
41
|
- What's the situation?
|
|
@@ -42,12 +44,12 @@ RACE (Role, Action, Context, Expectation) is a medium-complexity framework that
|
|
|
42
44
|
- What does the audience/recipient need?
|
|
43
45
|
|
|
44
46
|
**Examples:**
|
|
45
|
-
- "This is a public API used by third-party developers who expect stable contracts
|
|
46
|
-
- "The users are first-time app users who may be unfamiliar with our terminology
|
|
47
|
-
- "This is for a Series A startup with a 3-person engineering team
|
|
47
|
+
- "This is a public API used by third-party developers who expect stable contracts."
|
|
48
|
+
- "The users are first-time app users who may be unfamiliar with our terminology."
|
|
49
|
+
- "This is for a Series A startup with a 3-person engineering team."
|
|
48
50
|
|
|
49
51
|
### E - Expectation
|
|
50
|
-
**Purpose:** Define what a successful output looks like — the quality bar.
|
|
52
|
+
**Purpose:** Define what a successful output looks like — the quality bar. Phrase it as a complete statement about the result, not a bare fragment: a phrase like "prioritized list" dangles once the `EXPECTATION` header is deleted, whereas "The review should prioritize the highest-severity issues" still names the standard.
|
|
51
53
|
|
|
52
54
|
**Questions to Ask:**
|
|
53
55
|
- What does success look like?
|
|
@@ -56,43 +58,86 @@ RACE (Role, Action, Context, Expectation) is a medium-complexity framework that
|
|
|
56
58
|
- Any specific requirements for the output?
|
|
57
59
|
|
|
58
60
|
**Examples:**
|
|
59
|
-
- "
|
|
60
|
-
- "
|
|
61
|
-
- "
|
|
61
|
+
- "The review should prioritize breaking changes and security risks over style issues."
|
|
62
|
+
- "The copy should be conversational, not instructional — guiding rather than commanding."
|
|
63
|
+
- "The output should fit on a single Confluence page, scannable with headers."
|
|
62
64
|
|
|
63
65
|
## Template Structure
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
Section headers are stripped at emission, so every slot's meaning is carried by the prose
|
|
68
|
+
around and inside it rather than by the header above it. Role fills as a "You are…"
|
|
69
|
+
sentence and Context as a self-contained paragraph, so both stand on their own; Action must
|
|
70
|
+
be a complete imperative sentence, and Expectation must be phrased as a statement about the
|
|
71
|
+
result, because neither can lean on a header once emitted.
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
```
|
|
74
|
+
SOURCE MATERIAL:
|
|
75
|
+
[OPTIONAL — include only if this task operates on something the user already has.
|
|
76
|
+
If so, emit a literal paste instruction naming the specific artifact, e.g. "[Paste the REST API design here]"
|
|
77
|
+
or "[Paste the migration plan here]" — then one line of prose tying it to what follows,
|
|
78
|
+
e.g. "The material above is what the task below applies to."
|
|
79
|
+
When this section is used, word ACTION to refer to the material ABOVE ("the migration plan above"),
|
|
80
|
+
never "described below" — the artifact precedes it and a downward reference would dangle.
|
|
81
|
+
If the task generates entirely from scratch, omit this section — do not emit an empty placeholder.]
|
|
82
|
+
|
|
83
|
+
ROLE:
|
|
84
|
+
[Define the expertise or persona needed — who should do this task and at what level]
|
|
85
|
+
|
|
86
|
+
ACTION:
|
|
87
|
+
[State clearly what needs to be done — the task and deliverable]
|
|
88
|
+
|
|
89
|
+
CONTEXT:
|
|
90
|
+
[Provide the situational background:
|
|
91
|
+
- What's the current state / situation?
|
|
92
|
+
- Who is the audience or recipient of the output?
|
|
93
|
+
- Any relevant constraints or prior decisions?
|
|
94
|
+
- What has already been done?]
|
|
95
|
+
|
|
96
|
+
EXPECTATION:
|
|
97
|
+
[Define what a successful output looks like:
|
|
98
|
+
- Format and structure requirements
|
|
99
|
+
- Quality bar or success criteria
|
|
100
|
+
- What should be prioritized
|
|
101
|
+
- Length or scope constraints]
|
|
73
102
|
```
|
|
74
103
|
|
|
104
|
+
`SOURCE MATERIAL` is a fifth block in a four-letter acronym, and it carries no letter
|
|
105
|
+
because it is optional. When RACE is pointed at something that already exists — an API
|
|
106
|
+
design, a migration plan, a module — that artifact is pasted here, and the Action refers to
|
|
107
|
+
it as "the … above." The upward reference is deliberate: the artifact precedes the Action
|
|
108
|
+
once headers are gone, so any "described below" phrasing would point past the end of the
|
|
109
|
+
prompt. Delete the block and the sentence beneath it whenever the task generates from
|
|
110
|
+
scratch.
|
|
111
|
+
|
|
75
112
|
## Complete Examples
|
|
76
113
|
|
|
114
|
+
Every example below is shown in emitted form: each slot carries its own role in prose.
|
|
115
|
+
Read the headers as scaffolding that will be deleted — the examples are written so that
|
|
116
|
+
nothing is lost when it is.
|
|
117
|
+
|
|
77
118
|
### Example 1: API Review
|
|
78
119
|
|
|
79
120
|
**Before RACE:**
|
|
80
121
|
"Review my API design."
|
|
81
122
|
|
|
82
|
-
**After RACE
|
|
123
|
+
**After RACE** (source material supplied):
|
|
83
124
|
```
|
|
125
|
+
SOURCE MATERIAL:
|
|
126
|
+
[Paste the REST API design here]
|
|
127
|
+
The material above is what the task below applies to.
|
|
128
|
+
|
|
84
129
|
ROLE: You are a senior backend engineer with API design experience, familiar with
|
|
85
130
|
REST conventions and developer experience best practices.
|
|
86
131
|
|
|
87
|
-
ACTION: Review
|
|
132
|
+
ACTION: Review the REST API design above for consistency, usability, and potential issues.
|
|
88
133
|
|
|
89
134
|
CONTEXT: This is a public API that will be used by third-party developers. We are
|
|
90
135
|
about to publish v1 and changes after launch will be breaking. The team is small
|
|
91
136
|
(3 engineers) and we have not done a formal API review before.
|
|
92
137
|
|
|
93
138
|
EXPECTATION: Prioritize issues by severity (breaking vs. cosmetic). Flag anything
|
|
94
|
-
that would frustrate external developers or cause versioning headaches. Format
|
|
95
|
-
a prioritized list with issue, reason, and suggested fix for each.
|
|
139
|
+
that would frustrate external developers or cause versioning headaches. Format the
|
|
140
|
+
result as a prioritized list with issue, reason, and suggested fix for each.
|
|
96
141
|
```
|
|
97
142
|
|
|
98
143
|
### Example 2: Onboarding Copy
|
|
@@ -100,7 +145,8 @@ a prioritized list with issue, reason, and suggested fix for each.
|
|
|
100
145
|
**Before RACE:**
|
|
101
146
|
"Write onboarding text for our app."
|
|
102
147
|
|
|
103
|
-
**After RACE
|
|
148
|
+
**After RACE** (no source material — the copy is written from scratch, so the
|
|
149
|
+
`SOURCE MATERIAL` block and the sentence below it are both deleted):
|
|
104
150
|
```
|
|
105
151
|
ROLE: You are a UX writer who specializes in onboarding flows for consumer apps.
|
|
106
152
|
|
|
@@ -112,8 +158,8 @@ an account before seeing this onboarding. The screens are: (1) value prop, (2)
|
|
|
112
158
|
import/create first task, (3) invite team.
|
|
113
159
|
|
|
114
160
|
EXPECTATION: Each screen needs a headline (5 words max), one-sentence subhead, and
|
|
115
|
-
CTA button label.
|
|
116
|
-
momentum toward the first meaningful action.
|
|
161
|
+
CTA button label. Keep the tone encouraging, simple, and jargon-free, and let the
|
|
162
|
+
copy build momentum toward the first meaningful action.
|
|
117
163
|
```
|
|
118
164
|
|
|
119
165
|
### Example 3: Risk Assessment
|
|
@@ -121,12 +167,16 @@ momentum toward the first meaningful action.
|
|
|
121
167
|
**Before RACE:**
|
|
122
168
|
"What are the risks of this approach?"
|
|
123
169
|
|
|
124
|
-
**After RACE
|
|
170
|
+
**After RACE** (source material supplied):
|
|
125
171
|
```
|
|
172
|
+
SOURCE MATERIAL:
|
|
173
|
+
[Paste the proposed database migration plan here]
|
|
174
|
+
The material above is what the task below applies to.
|
|
175
|
+
|
|
126
176
|
ROLE: You are a software architect with experience in distributed systems and
|
|
127
177
|
enterprise migrations.
|
|
128
178
|
|
|
129
|
-
ACTION: Identify the top risks in the
|
|
179
|
+
ACTION: Identify the top risks in the database migration plan above.
|
|
130
180
|
|
|
131
181
|
CONTEXT: We are migrating from a monolithic PostgreSQL database to a microservices
|
|
132
182
|
architecture with separate databases per service. Timeline is 6 months. Team has
|
|
@@ -143,20 +193,25 @@ violate the SLA or create data integrity issues as critical.
|
|
|
143
193
|
**Before RACE:**
|
|
144
194
|
"Document this module."
|
|
145
195
|
|
|
146
|
-
**After RACE
|
|
196
|
+
**After RACE** (source material supplied):
|
|
147
197
|
```
|
|
198
|
+
SOURCE MATERIAL:
|
|
199
|
+
[Paste the authentication module source here]
|
|
200
|
+
The material above is what the task below applies to.
|
|
201
|
+
|
|
148
202
|
ROLE: You are a technical writer who writes developer documentation for open-source
|
|
149
203
|
libraries.
|
|
150
204
|
|
|
151
|
-
ACTION: Write documentation for the authentication module
|
|
205
|
+
ACTION: Write documentation for the authentication module above.
|
|
152
206
|
|
|
153
207
|
CONTEXT: This is an open-source library used by developers integrating our platform.
|
|
154
208
|
Readers are competent developers but unfamiliar with our specific auth flow. The
|
|
155
209
|
docs will live on our developer portal alongside API reference docs.
|
|
156
210
|
|
|
157
|
-
EXPECTATION: Include
|
|
158
|
-
quickstart code example, and a table of configuration options.
|
|
159
|
-
in one reading session (under 500 words)
|
|
211
|
+
EXPECTATION: Include an overview paragraph, a when-to-use section, an installation
|
|
212
|
+
snippet, a quickstart code example, and a table of configuration options. It should be
|
|
213
|
+
completable in one reading session (under 500 words), with clear headings and real
|
|
214
|
+
code examples.
|
|
160
215
|
```
|
|
161
216
|
|
|
162
217
|
## Best Use Cases
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Reverse Chain-of-Thought (RCoT) is a verification framework that catches reasoning errors by working backwards. After generating an initial answer using standard reasoning, the model is instructed to reconstruct what the original question must have been — given only its answer. The reconstructed question is then compared condition-by-condition against the actual question to identify overlooked conditions, misinterpreted constraints, and logical gaps. Discrepancies found in this cross-check feed back into a corrected response.
|
|
6
6
|
|
|
7
|
-
**Research basis:**
|
|
7
|
+
**Research basis:** Xue et al., "RCoT: Detecting and Rectifying Factual Inconsistency in Reasoning by Reversing Chain-of-Thought" (arXiv 2305.11499, 2023; unreviewed preprint, no venue), which reports gains over standard CoT on seven arithmetic reasoning datasets (§4.1; +3.1 on GSM8K and +5.0 on Date, zero-shot ChatGPT). What ships here is an ablated variant: the paper's Problem Decomposition stage — which converts both the original and the reconstructed question into explicit condition lists and then runs pairwise *entailment* checks between them — is not implemented, and the Condition Cross-Check below substitutes a direct question-to-question comparison with surface set-difference, which §3.2 names as the weaker baseline the paper was built to replace ("such comparisons usually fail to produce high-quality detection results"). Read the reported gains as evidence for the paper's full pipeline, not for the simplified form documented here and on LearnPrompting.org and Mirascope; FOBAR (forward-backward reasoning), "Reversal of Thought" (ACL 2025, arXiv 2410.12323), and "Reverse Thinking Makes LLMs Stronger Reasoners" (NAACL 2025) are adjacent backward-reasoning methods rather than grounding for this variant.
|
|
8
8
|
|
|
9
9
|
## Why RCoT Works
|
|
10
10
|
|