@ckelsoe/prompt-architect 3.0.2 → 3.2.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 +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +264 -264
- package/LICENSE +21 -21
- package/README.md +1064 -1184
- package/adapters/README.md +75 -267
- package/adapters/for-windsurf.md +136 -136
- package/adapters/system-prompt.md +243 -243
- package/package.json +139 -138
- package/scripts/build-skill.js +64 -0
- package/scripts/install.js +4 -54
- package/scripts/test.js +205 -213
- package/scripts/validate-skill.js +350 -350
- package/skills/prompt-architect/SKILL.md +343 -331
- package/skills/prompt-architect/assets/templates/ape_template.txt +5 -5
- package/skills/prompt-architect/assets/templates/bab_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/broke_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +18 -18
- package/skills/prompt-architect/assets/templates/care_template.txt +16 -16
- package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +46 -46
- package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +49 -49
- package/skills/prompt-architect/assets/templates/co-star_template.txt +17 -17
- package/skills/prompt-architect/assets/templates/crispe_template.txt +14 -14
- package/skills/prompt-architect/assets/templates/ctf_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +25 -25
- package/skills/prompt-architect/assets/templates/hybrid_template.txt +101 -101
- package/skills/prompt-architect/assets/templates/least-to-most_template.txt +16 -16
- package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +7 -7
- package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +27 -27
- package/skills/prompt-architect/assets/templates/race_template.txt +19 -19
- package/skills/prompt-architect/assets/templates/rcot_template.txt +31 -31
- package/skills/prompt-architect/assets/templates/react_template.txt +27 -27
- package/skills/prompt-architect/assets/templates/reverse-role_template.txt +11 -11
- package/skills/prompt-architect/assets/templates/rise-ie_template.txt +23 -23
- package/skills/prompt-architect/assets/templates/rise-ix_template.txt +28 -28
- package/skills/prompt-architect/assets/templates/risen_template.txt +21 -21
- package/skills/prompt-architect/assets/templates/rpef_template.txt +26 -26
- package/skills/prompt-architect/assets/templates/rtf_template.txt +13 -13
- package/skills/prompt-architect/assets/templates/self-refine_template.txt +16 -16
- package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/step-back_template.txt +10 -10
- package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +45 -45
- package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +30 -30
- package/skills/prompt-architect/references/frameworks/ape.md +200 -200
- package/skills/prompt-architect/references/frameworks/bab.md +242 -242
- package/skills/prompt-architect/references/frameworks/broke.md +242 -242
- package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +230 -230
- package/skills/prompt-architect/references/frameworks/care.md +235 -235
- package/skills/prompt-architect/references/frameworks/chain-of-density.md +479 -479
- package/skills/prompt-architect/references/frameworks/chain-of-thought.md +424 -424
- package/skills/prompt-architect/references/frameworks/co-star.md +256 -256
- package/skills/prompt-architect/references/frameworks/crispe.md +253 -253
- package/skills/prompt-architect/references/frameworks/ctf.md +207 -207
- package/skills/prompt-architect/references/frameworks/devils-advocate.md +206 -206
- package/skills/prompt-architect/references/frameworks/least-to-most.md +226 -226
- package/skills/prompt-architect/references/frameworks/plan-and-solve.md +210 -210
- package/skills/prompt-architect/references/frameworks/pre-mortem.md +197 -197
- package/skills/prompt-architect/references/frameworks/race.md +243 -243
- package/skills/prompt-architect/references/frameworks/rcot.md +203 -203
- package/skills/prompt-architect/references/frameworks/react.md +304 -304
- package/skills/prompt-architect/references/frameworks/reverse-role.md +189 -189
- package/skills/prompt-architect/references/frameworks/rise.md +555 -555
- package/skills/prompt-architect/references/frameworks/risen.md +297 -297
- package/skills/prompt-architect/references/frameworks/rpef.md +195 -195
- package/skills/prompt-architect/references/frameworks/rtf.md +358 -358
- package/skills/prompt-architect/references/frameworks/self-refine.md +205 -205
- package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +186 -186
- package/skills/prompt-architect/references/frameworks/step-back.md +206 -206
- package/skills/prompt-architect/references/frameworks/tidd-ec.md +470 -470
- package/skills/prompt-architect/references/frameworks/tree-of-thought.md +260 -260
- package/skills/prompt-architect/scripts/framework_analyzer.py +807 -807
- package/skills/prompt-architect/scripts/prompt_evaluator.py +336 -336
- package/adapters/for-cursor.mdc +0 -138
- package/adapters/for-gemini-cli.md +0 -70
- package/adapters/for-github-copilot.md +0 -141
- package/adapters/for-openai-codex-cli.md +0 -158
|
@@ -1,243 +1,243 @@
|
|
|
1
|
-
# RACE Framework
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
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.
|
|
6
|
-
|
|
7
|
-
## Components
|
|
8
|
-
|
|
9
|
-
### R - Role
|
|
10
|
-
**Purpose:** Define the expertise or persona needed for the task.
|
|
11
|
-
|
|
12
|
-
**Questions to Ask:**
|
|
13
|
-
- What expertise is required?
|
|
14
|
-
- What viewpoint should the AI take?
|
|
15
|
-
- What level of knowledge is assumed?
|
|
16
|
-
|
|
17
|
-
**Examples:**
|
|
18
|
-
- "You are a senior backend engineer..."
|
|
19
|
-
- "Act as an experienced UX designer..."
|
|
20
|
-
- "You are a plain-language technical writer..."
|
|
21
|
-
|
|
22
|
-
### A - Action
|
|
23
|
-
**Purpose:** State what needs to be done — the task.
|
|
24
|
-
|
|
25
|
-
**Questions to Ask:**
|
|
26
|
-
- What exactly needs to happen?
|
|
27
|
-
- What is the deliverable?
|
|
28
|
-
- What's the scope?
|
|
29
|
-
|
|
30
|
-
**Examples:**
|
|
31
|
-
- "Review this API design for consistency..."
|
|
32
|
-
- "Write user onboarding copy for..."
|
|
33
|
-
- "Identify the top 3 risks in..."
|
|
34
|
-
|
|
35
|
-
### C - Context
|
|
36
|
-
**Purpose:** Provide the situational background needed to calibrate the output.
|
|
37
|
-
|
|
38
|
-
**Questions to Ask:**
|
|
39
|
-
- What's the situation?
|
|
40
|
-
- What's already happened?
|
|
41
|
-
- What constraints apply?
|
|
42
|
-
- What does the audience/recipient need?
|
|
43
|
-
|
|
44
|
-
**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..."
|
|
48
|
-
|
|
49
|
-
### E - Expectation
|
|
50
|
-
**Purpose:** Define what a successful output looks like — the quality bar.
|
|
51
|
-
|
|
52
|
-
**Questions to Ask:**
|
|
53
|
-
- What does success look like?
|
|
54
|
-
- What format should the output take?
|
|
55
|
-
- What should be true of a good result?
|
|
56
|
-
- Any specific requirements for the output?
|
|
57
|
-
|
|
58
|
-
**Examples:**
|
|
59
|
-
- "Should prioritize breaking changes and security risks over style issues"
|
|
60
|
-
- "Should be conversational, not instructional — guide rather than command"
|
|
61
|
-
- "Should fit in a single Confluence page, scannable with headers"
|
|
62
|
-
|
|
63
|
-
## Template Structure
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
ROLE: [Expertise or persona]
|
|
67
|
-
|
|
68
|
-
ACTION: [What needs to be done]
|
|
69
|
-
|
|
70
|
-
CONTEXT: [Background, situation, constraints]
|
|
71
|
-
|
|
72
|
-
EXPECTATION: [What a good result looks like]
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Complete Examples
|
|
76
|
-
|
|
77
|
-
### Example 1: API Review
|
|
78
|
-
|
|
79
|
-
**Before RACE:**
|
|
80
|
-
"Review my API design."
|
|
81
|
-
|
|
82
|
-
**After RACE:**
|
|
83
|
-
```
|
|
84
|
-
ROLE: You are a senior backend engineer with API design experience, familiar with
|
|
85
|
-
REST conventions and developer experience best practices.
|
|
86
|
-
|
|
87
|
-
ACTION: Review this REST API design for consistency, usability, and potential issues.
|
|
88
|
-
|
|
89
|
-
CONTEXT: This is a public API that will be used by third-party developers. We are
|
|
90
|
-
about to publish v1 and changes after launch will be breaking. The team is small
|
|
91
|
-
(3 engineers) and we have not done a formal API review before.
|
|
92
|
-
|
|
93
|
-
EXPECTATION: Prioritize issues by severity (breaking vs. cosmetic). Flag anything
|
|
94
|
-
that would frustrate external developers or cause versioning headaches. Format as
|
|
95
|
-
a prioritized list with issue, reason, and suggested fix for each.
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Example 2: Onboarding Copy
|
|
99
|
-
|
|
100
|
-
**Before RACE:**
|
|
101
|
-
"Write onboarding text for our app."
|
|
102
|
-
|
|
103
|
-
**After RACE:**
|
|
104
|
-
```
|
|
105
|
-
ROLE: You are a UX writer who specializes in onboarding flows for consumer apps.
|
|
106
|
-
|
|
107
|
-
ACTION: Write the copy for a 3-screen onboarding flow for our task management app.
|
|
108
|
-
|
|
109
|
-
CONTEXT: Users are downloading the app after seeing a social ad. Many are switching
|
|
110
|
-
from pen/paper or spreadsheets. They are not tech-savvy. They've already created
|
|
111
|
-
an account before seeing this onboarding. The screens are: (1) value prop, (2)
|
|
112
|
-
import/create first task, (3) invite team.
|
|
113
|
-
|
|
114
|
-
EXPECTATION: Each screen needs a headline (5 words max), one-sentence subhead, and
|
|
115
|
-
CTA button label. Tone: encouraging, simple, no jargon. The copy should build
|
|
116
|
-
momentum toward the first meaningful action.
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Example 3: Risk Assessment
|
|
120
|
-
|
|
121
|
-
**Before RACE:**
|
|
122
|
-
"What are the risks of this approach?"
|
|
123
|
-
|
|
124
|
-
**After RACE:**
|
|
125
|
-
```
|
|
126
|
-
ROLE: You are a software architect with experience in distributed systems and
|
|
127
|
-
enterprise migrations.
|
|
128
|
-
|
|
129
|
-
ACTION: Identify the top risks in the proposed database migration plan described below.
|
|
130
|
-
|
|
131
|
-
CONTEXT: We are migrating from a monolithic PostgreSQL database to a microservices
|
|
132
|
-
architecture with separate databases per service. Timeline is 6 months. Team has
|
|
133
|
-
strong SQL skills but limited microservices experience. The system handles financial
|
|
134
|
-
transactions and has a 99.9% uptime SLA.
|
|
135
|
-
|
|
136
|
-
EXPECTATION: List the top 5 risks ranked by likelihood × impact. For each: name,
|
|
137
|
-
description (2 sentences), and one mitigation approach. Flag any risks that could
|
|
138
|
-
violate the SLA or create data integrity issues as critical.
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Example 4: Code Documentation
|
|
142
|
-
|
|
143
|
-
**Before RACE:**
|
|
144
|
-
"Document this module."
|
|
145
|
-
|
|
146
|
-
**After RACE:**
|
|
147
|
-
```
|
|
148
|
-
ROLE: You are a technical writer who writes developer documentation for open-source
|
|
149
|
-
libraries.
|
|
150
|
-
|
|
151
|
-
ACTION: Write documentation for the authentication module described below.
|
|
152
|
-
|
|
153
|
-
CONTEXT: This is an open-source library used by developers integrating our platform.
|
|
154
|
-
Readers are competent developers but unfamiliar with our specific auth flow. The
|
|
155
|
-
docs will live on our developer portal alongside API reference docs.
|
|
156
|
-
|
|
157
|
-
EXPECTATION: Include: overview paragraph, when-to-use section, installation snippet,
|
|
158
|
-
quickstart code example, and a table of configuration options. Should be completable
|
|
159
|
-
in one reading session (under 500 words). Use clear headings and real code examples.
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
## Best Use Cases
|
|
163
|
-
|
|
164
|
-
1. **Technical Reviews**
|
|
165
|
-
- Code reviews with context
|
|
166
|
-
- Architecture assessments
|
|
167
|
-
- Design critiques
|
|
168
|
-
|
|
169
|
-
2. **Content with Expertise**
|
|
170
|
-
- Technical documentation
|
|
171
|
-
- UX/product copy
|
|
172
|
-
- Expert analysis
|
|
173
|
-
|
|
174
|
-
3. **Contextual Analysis**
|
|
175
|
-
- Risk assessments
|
|
176
|
-
- Recommendations with constraints
|
|
177
|
-
- Prioritization tasks
|
|
178
|
-
|
|
179
|
-
4. **When RTF Isn't Enough**
|
|
180
|
-
- Role alone doesn't capture enough
|
|
181
|
-
- Background materially changes the output
|
|
182
|
-
- "What does good look like?" is unclear
|
|
183
|
-
|
|
184
|
-
## Selection Criteria
|
|
185
|
-
|
|
186
|
-
**Choose RACE when:**
|
|
187
|
-
- ✅ Role/expertise matters
|
|
188
|
-
- ✅ Background context is needed
|
|
189
|
-
- ✅ Success criteria need to be explicit
|
|
190
|
-
- ✅ RTF feels too thin but CO-STAR feels too heavy
|
|
191
|
-
- ✅ Task has both "who" and "why" dimensions
|
|
192
|
-
|
|
193
|
-
**Avoid RACE when:**
|
|
194
|
-
- ❌ No role/expertise needed → use CTF or APE
|
|
195
|
-
- ❌ Audience, tone, style are critical → use CO-STAR
|
|
196
|
-
- ❌ Complex methodology required → use RISEN
|
|
197
|
-
- ❌ Transforming existing content → use BAB
|
|
198
|
-
- ❌ Ultra-simple task → use APE or RTF
|
|
199
|
-
|
|
200
|
-
## RACE vs. RTF vs. CO-STAR
|
|
201
|
-
|
|
202
|
-
| | APE | RTF | RACE | CO-STAR |
|
|
203
|
-
|---|---|---|---|---|
|
|
204
|
-
| Role | No | Yes | Yes | Implicit |
|
|
205
|
-
| Context | Minimal | No | Yes | Yes (rich) |
|
|
206
|
-
| Expectation | Yes | Partial (Format) | Yes (explicit) | Yes (Response) |
|
|
207
|
-
| Audience/Tone | No | No | No | Yes |
|
|
208
|
-
| Complexity | Minimal | Low | Medium | High |
|
|
209
|
-
| Best for | One-liners | Format-driven | Expert + context | Full content |
|
|
210
|
-
|
|
211
|
-
**Rule of thumb:**
|
|
212
|
-
- No role needed, quick → APE
|
|
213
|
-
- Role matters, no context → RTF
|
|
214
|
-
- Role + context + explicit outcome → RACE
|
|
215
|
-
- Full content with audience/tone → CO-STAR
|
|
216
|
-
|
|
217
|
-
## Common Mistakes
|
|
218
|
-
|
|
219
|
-
1. **Weak Expectation**
|
|
220
|
-
- "Good quality" is not an expectation
|
|
221
|
-
- Define format, length, priority, tone, or success criteria specifically
|
|
222
|
-
|
|
223
|
-
2. **Context Overload**
|
|
224
|
-
- Context should be background, not instructions
|
|
225
|
-
- Instructions belong in Action
|
|
226
|
-
- If Context is longer than Role + Action combined, consider CO-STAR
|
|
227
|
-
|
|
228
|
-
3. **Skipping Role**
|
|
229
|
-
- Even when obvious, Role calibrates expertise level and perspective
|
|
230
|
-
- Don't skip it
|
|
231
|
-
|
|
232
|
-
4. **Confusing Action and Expectation**
|
|
233
|
-
- Action = what to do
|
|
234
|
-
- Expectation = what a good result looks like after it's done
|
|
235
|
-
|
|
236
|
-
## Quick Reference
|
|
237
|
-
|
|
238
|
-
| Component | Focus | Key Question |
|
|
239
|
-
|-----------|-------|--------------|
|
|
240
|
-
| Role | Expertise | "Who should do this?" |
|
|
241
|
-
| Action | Task | "What needs to be done?" |
|
|
242
|
-
| Context | Background | "What's the situation?" |
|
|
243
|
-
| Expectation | Success bar | "What does good look like?" |
|
|
1
|
+
# RACE Framework
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
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.
|
|
6
|
+
|
|
7
|
+
## Components
|
|
8
|
+
|
|
9
|
+
### R - Role
|
|
10
|
+
**Purpose:** Define the expertise or persona needed for the task.
|
|
11
|
+
|
|
12
|
+
**Questions to Ask:**
|
|
13
|
+
- What expertise is required?
|
|
14
|
+
- What viewpoint should the AI take?
|
|
15
|
+
- What level of knowledge is assumed?
|
|
16
|
+
|
|
17
|
+
**Examples:**
|
|
18
|
+
- "You are a senior backend engineer..."
|
|
19
|
+
- "Act as an experienced UX designer..."
|
|
20
|
+
- "You are a plain-language technical writer..."
|
|
21
|
+
|
|
22
|
+
### A - Action
|
|
23
|
+
**Purpose:** State what needs to be done — the task.
|
|
24
|
+
|
|
25
|
+
**Questions to Ask:**
|
|
26
|
+
- What exactly needs to happen?
|
|
27
|
+
- What is the deliverable?
|
|
28
|
+
- What's the scope?
|
|
29
|
+
|
|
30
|
+
**Examples:**
|
|
31
|
+
- "Review this API design for consistency..."
|
|
32
|
+
- "Write user onboarding copy for..."
|
|
33
|
+
- "Identify the top 3 risks in..."
|
|
34
|
+
|
|
35
|
+
### C - Context
|
|
36
|
+
**Purpose:** Provide the situational background needed to calibrate the output.
|
|
37
|
+
|
|
38
|
+
**Questions to Ask:**
|
|
39
|
+
- What's the situation?
|
|
40
|
+
- What's already happened?
|
|
41
|
+
- What constraints apply?
|
|
42
|
+
- What does the audience/recipient need?
|
|
43
|
+
|
|
44
|
+
**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..."
|
|
48
|
+
|
|
49
|
+
### E - Expectation
|
|
50
|
+
**Purpose:** Define what a successful output looks like — the quality bar.
|
|
51
|
+
|
|
52
|
+
**Questions to Ask:**
|
|
53
|
+
- What does success look like?
|
|
54
|
+
- What format should the output take?
|
|
55
|
+
- What should be true of a good result?
|
|
56
|
+
- Any specific requirements for the output?
|
|
57
|
+
|
|
58
|
+
**Examples:**
|
|
59
|
+
- "Should prioritize breaking changes and security risks over style issues"
|
|
60
|
+
- "Should be conversational, not instructional — guide rather than command"
|
|
61
|
+
- "Should fit in a single Confluence page, scannable with headers"
|
|
62
|
+
|
|
63
|
+
## Template Structure
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
ROLE: [Expertise or persona]
|
|
67
|
+
|
|
68
|
+
ACTION: [What needs to be done]
|
|
69
|
+
|
|
70
|
+
CONTEXT: [Background, situation, constraints]
|
|
71
|
+
|
|
72
|
+
EXPECTATION: [What a good result looks like]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Complete Examples
|
|
76
|
+
|
|
77
|
+
### Example 1: API Review
|
|
78
|
+
|
|
79
|
+
**Before RACE:**
|
|
80
|
+
"Review my API design."
|
|
81
|
+
|
|
82
|
+
**After RACE:**
|
|
83
|
+
```
|
|
84
|
+
ROLE: You are a senior backend engineer with API design experience, familiar with
|
|
85
|
+
REST conventions and developer experience best practices.
|
|
86
|
+
|
|
87
|
+
ACTION: Review this REST API design for consistency, usability, and potential issues.
|
|
88
|
+
|
|
89
|
+
CONTEXT: This is a public API that will be used by third-party developers. We are
|
|
90
|
+
about to publish v1 and changes after launch will be breaking. The team is small
|
|
91
|
+
(3 engineers) and we have not done a formal API review before.
|
|
92
|
+
|
|
93
|
+
EXPECTATION: Prioritize issues by severity (breaking vs. cosmetic). Flag anything
|
|
94
|
+
that would frustrate external developers or cause versioning headaches. Format as
|
|
95
|
+
a prioritized list with issue, reason, and suggested fix for each.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Example 2: Onboarding Copy
|
|
99
|
+
|
|
100
|
+
**Before RACE:**
|
|
101
|
+
"Write onboarding text for our app."
|
|
102
|
+
|
|
103
|
+
**After RACE:**
|
|
104
|
+
```
|
|
105
|
+
ROLE: You are a UX writer who specializes in onboarding flows for consumer apps.
|
|
106
|
+
|
|
107
|
+
ACTION: Write the copy for a 3-screen onboarding flow for our task management app.
|
|
108
|
+
|
|
109
|
+
CONTEXT: Users are downloading the app after seeing a social ad. Many are switching
|
|
110
|
+
from pen/paper or spreadsheets. They are not tech-savvy. They've already created
|
|
111
|
+
an account before seeing this onboarding. The screens are: (1) value prop, (2)
|
|
112
|
+
import/create first task, (3) invite team.
|
|
113
|
+
|
|
114
|
+
EXPECTATION: Each screen needs a headline (5 words max), one-sentence subhead, and
|
|
115
|
+
CTA button label. Tone: encouraging, simple, no jargon. The copy should build
|
|
116
|
+
momentum toward the first meaningful action.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Example 3: Risk Assessment
|
|
120
|
+
|
|
121
|
+
**Before RACE:**
|
|
122
|
+
"What are the risks of this approach?"
|
|
123
|
+
|
|
124
|
+
**After RACE:**
|
|
125
|
+
```
|
|
126
|
+
ROLE: You are a software architect with experience in distributed systems and
|
|
127
|
+
enterprise migrations.
|
|
128
|
+
|
|
129
|
+
ACTION: Identify the top risks in the proposed database migration plan described below.
|
|
130
|
+
|
|
131
|
+
CONTEXT: We are migrating from a monolithic PostgreSQL database to a microservices
|
|
132
|
+
architecture with separate databases per service. Timeline is 6 months. Team has
|
|
133
|
+
strong SQL skills but limited microservices experience. The system handles financial
|
|
134
|
+
transactions and has a 99.9% uptime SLA.
|
|
135
|
+
|
|
136
|
+
EXPECTATION: List the top 5 risks ranked by likelihood × impact. For each: name,
|
|
137
|
+
description (2 sentences), and one mitigation approach. Flag any risks that could
|
|
138
|
+
violate the SLA or create data integrity issues as critical.
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Example 4: Code Documentation
|
|
142
|
+
|
|
143
|
+
**Before RACE:**
|
|
144
|
+
"Document this module."
|
|
145
|
+
|
|
146
|
+
**After RACE:**
|
|
147
|
+
```
|
|
148
|
+
ROLE: You are a technical writer who writes developer documentation for open-source
|
|
149
|
+
libraries.
|
|
150
|
+
|
|
151
|
+
ACTION: Write documentation for the authentication module described below.
|
|
152
|
+
|
|
153
|
+
CONTEXT: This is an open-source library used by developers integrating our platform.
|
|
154
|
+
Readers are competent developers but unfamiliar with our specific auth flow. The
|
|
155
|
+
docs will live on our developer portal alongside API reference docs.
|
|
156
|
+
|
|
157
|
+
EXPECTATION: Include: overview paragraph, when-to-use section, installation snippet,
|
|
158
|
+
quickstart code example, and a table of configuration options. Should be completable
|
|
159
|
+
in one reading session (under 500 words). Use clear headings and real code examples.
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Best Use Cases
|
|
163
|
+
|
|
164
|
+
1. **Technical Reviews**
|
|
165
|
+
- Code reviews with context
|
|
166
|
+
- Architecture assessments
|
|
167
|
+
- Design critiques
|
|
168
|
+
|
|
169
|
+
2. **Content with Expertise**
|
|
170
|
+
- Technical documentation
|
|
171
|
+
- UX/product copy
|
|
172
|
+
- Expert analysis
|
|
173
|
+
|
|
174
|
+
3. **Contextual Analysis**
|
|
175
|
+
- Risk assessments
|
|
176
|
+
- Recommendations with constraints
|
|
177
|
+
- Prioritization tasks
|
|
178
|
+
|
|
179
|
+
4. **When RTF Isn't Enough**
|
|
180
|
+
- Role alone doesn't capture enough
|
|
181
|
+
- Background materially changes the output
|
|
182
|
+
- "What does good look like?" is unclear
|
|
183
|
+
|
|
184
|
+
## Selection Criteria
|
|
185
|
+
|
|
186
|
+
**Choose RACE when:**
|
|
187
|
+
- ✅ Role/expertise matters
|
|
188
|
+
- ✅ Background context is needed
|
|
189
|
+
- ✅ Success criteria need to be explicit
|
|
190
|
+
- ✅ RTF feels too thin but CO-STAR feels too heavy
|
|
191
|
+
- ✅ Task has both "who" and "why" dimensions
|
|
192
|
+
|
|
193
|
+
**Avoid RACE when:**
|
|
194
|
+
- ❌ No role/expertise needed → use CTF or APE
|
|
195
|
+
- ❌ Audience, tone, style are critical → use CO-STAR
|
|
196
|
+
- ❌ Complex methodology required → use RISEN
|
|
197
|
+
- ❌ Transforming existing content → use BAB
|
|
198
|
+
- ❌ Ultra-simple task → use APE or RTF
|
|
199
|
+
|
|
200
|
+
## RACE vs. RTF vs. CO-STAR
|
|
201
|
+
|
|
202
|
+
| | APE | RTF | RACE | CO-STAR |
|
|
203
|
+
|---|---|---|---|---|
|
|
204
|
+
| Role | No | Yes | Yes | Implicit |
|
|
205
|
+
| Context | Minimal | No | Yes | Yes (rich) |
|
|
206
|
+
| Expectation | Yes | Partial (Format) | Yes (explicit) | Yes (Response) |
|
|
207
|
+
| Audience/Tone | No | No | No | Yes |
|
|
208
|
+
| Complexity | Minimal | Low | Medium | High |
|
|
209
|
+
| Best for | One-liners | Format-driven | Expert + context | Full content |
|
|
210
|
+
|
|
211
|
+
**Rule of thumb:**
|
|
212
|
+
- No role needed, quick → APE
|
|
213
|
+
- Role matters, no context → RTF
|
|
214
|
+
- Role + context + explicit outcome → RACE
|
|
215
|
+
- Full content with audience/tone → CO-STAR
|
|
216
|
+
|
|
217
|
+
## Common Mistakes
|
|
218
|
+
|
|
219
|
+
1. **Weak Expectation**
|
|
220
|
+
- "Good quality" is not an expectation
|
|
221
|
+
- Define format, length, priority, tone, or success criteria specifically
|
|
222
|
+
|
|
223
|
+
2. **Context Overload**
|
|
224
|
+
- Context should be background, not instructions
|
|
225
|
+
- Instructions belong in Action
|
|
226
|
+
- If Context is longer than Role + Action combined, consider CO-STAR
|
|
227
|
+
|
|
228
|
+
3. **Skipping Role**
|
|
229
|
+
- Even when obvious, Role calibrates expertise level and perspective
|
|
230
|
+
- Don't skip it
|
|
231
|
+
|
|
232
|
+
4. **Confusing Action and Expectation**
|
|
233
|
+
- Action = what to do
|
|
234
|
+
- Expectation = what a good result looks like after it's done
|
|
235
|
+
|
|
236
|
+
## Quick Reference
|
|
237
|
+
|
|
238
|
+
| Component | Focus | Key Question |
|
|
239
|
+
|-----------|-------|--------------|
|
|
240
|
+
| Role | Expertise | "Who should do this?" |
|
|
241
|
+
| Action | Task | "What needs to be done?" |
|
|
242
|
+
| Context | Background | "What's the situation?" |
|
|
243
|
+
| Expectation | Success bar | "What does good look like?" |
|