@ckelsoe/prompt-architect 3.0.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 +20 -0
- package/.claude-plugin/plugin.json +18 -0
- package/CHANGELOG.md +264 -0
- package/LICENSE +21 -0
- package/MIGRATION.md +66 -0
- package/README.md +1184 -0
- package/adapters/README.md +267 -0
- package/adapters/for-cursor.mdc +138 -0
- package/adapters/for-gemini-cli.md +70 -0
- package/adapters/for-github-copilot.md +141 -0
- package/adapters/for-openai-codex-cli.md +158 -0
- package/adapters/for-windsurf.md +136 -0
- package/adapters/system-prompt.md +243 -0
- package/package.json +135 -0
- package/scripts/install.js +490 -0
- package/scripts/test.js +213 -0
- package/scripts/validate-skill.js +350 -0
- package/skills/prompt-architect/SKILL.md +331 -0
- package/skills/prompt-architect/assets/templates/ape_template.txt +5 -0
- package/skills/prompt-architect/assets/templates/bab_template.txt +15 -0
- package/skills/prompt-architect/assets/templates/broke_template.txt +15 -0
- package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +18 -0
- package/skills/prompt-architect/assets/templates/care_template.txt +16 -0
- package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +46 -0
- package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +49 -0
- package/skills/prompt-architect/assets/templates/co-star_template.txt +17 -0
- package/skills/prompt-architect/assets/templates/crispe_template.txt +14 -0
- package/skills/prompt-architect/assets/templates/ctf_template.txt +15 -0
- package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +25 -0
- package/skills/prompt-architect/assets/templates/hybrid_template.txt +101 -0
- package/skills/prompt-architect/assets/templates/least-to-most_template.txt +16 -0
- package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +7 -0
- package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +27 -0
- package/skills/prompt-architect/assets/templates/race_template.txt +19 -0
- package/skills/prompt-architect/assets/templates/rcot_template.txt +31 -0
- package/skills/prompt-architect/assets/templates/react_template.txt +27 -0
- package/skills/prompt-architect/assets/templates/reverse-role_template.txt +11 -0
- package/skills/prompt-architect/assets/templates/rise-ie_template.txt +23 -0
- package/skills/prompt-architect/assets/templates/rise-ix_template.txt +28 -0
- package/skills/prompt-architect/assets/templates/risen_template.txt +21 -0
- package/skills/prompt-architect/assets/templates/rpef_template.txt +26 -0
- package/skills/prompt-architect/assets/templates/rtf_template.txt +13 -0
- package/skills/prompt-architect/assets/templates/self-refine_template.txt +16 -0
- package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +15 -0
- package/skills/prompt-architect/assets/templates/step-back_template.txt +10 -0
- package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +45 -0
- package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +30 -0
- package/skills/prompt-architect/references/frameworks/ape.md +200 -0
- package/skills/prompt-architect/references/frameworks/bab.md +242 -0
- package/skills/prompt-architect/references/frameworks/broke.md +242 -0
- package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +230 -0
- package/skills/prompt-architect/references/frameworks/care.md +235 -0
- package/skills/prompt-architect/references/frameworks/chain-of-density.md +479 -0
- package/skills/prompt-architect/references/frameworks/chain-of-thought.md +424 -0
- package/skills/prompt-architect/references/frameworks/co-star.md +256 -0
- package/skills/prompt-architect/references/frameworks/crispe.md +253 -0
- package/skills/prompt-architect/references/frameworks/ctf.md +207 -0
- package/skills/prompt-architect/references/frameworks/devils-advocate.md +206 -0
- package/skills/prompt-architect/references/frameworks/least-to-most.md +226 -0
- package/skills/prompt-architect/references/frameworks/plan-and-solve.md +210 -0
- package/skills/prompt-architect/references/frameworks/pre-mortem.md +197 -0
- package/skills/prompt-architect/references/frameworks/race.md +243 -0
- package/skills/prompt-architect/references/frameworks/rcot.md +203 -0
- package/skills/prompt-architect/references/frameworks/react.md +304 -0
- package/skills/prompt-architect/references/frameworks/reverse-role.md +189 -0
- package/skills/prompt-architect/references/frameworks/rise.md +555 -0
- package/skills/prompt-architect/references/frameworks/risen.md +297 -0
- package/skills/prompt-architect/references/frameworks/rpef.md +195 -0
- package/skills/prompt-architect/references/frameworks/rtf.md +358 -0
- package/skills/prompt-architect/references/frameworks/self-refine.md +205 -0
- package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +186 -0
- package/skills/prompt-architect/references/frameworks/step-back.md +206 -0
- package/skills/prompt-architect/references/frameworks/tidd-ec.md +470 -0
- package/skills/prompt-architect/references/frameworks/tree-of-thought.md +260 -0
- package/skills/prompt-architect/scripts/framework_analyzer.py +807 -0
- package/skills/prompt-architect/scripts/prompt_evaluator.py +336 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# CRISPE Framework
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
CRISPE is a comprehensive general-purpose prompting framework covering six dimensions: Capacity and Role, Insight, Instructions, Personality, and Experiment. Its defining feature — the **Experiment** component — sets it apart from similar frameworks by explicitly asking the AI to produce multiple variants, approaches, or versions, enabling the user to compare and choose the best output rather than accepting a single answer.
|
|
6
|
+
|
|
7
|
+
**Origin:** Developed by Matt Nigh (community framework, 2022). Since adopted in clinical AI literature (cited in PMC peer-reviewed medical AI studies, 2024-2025) and educational technology research (Springer, 2025).
|
|
8
|
+
|
|
9
|
+
## Components
|
|
10
|
+
|
|
11
|
+
### C — Capacity and Role
|
|
12
|
+
**Purpose:** Define the expertise level and professional role the AI should embody. More specific than a simple "you are a..." — it combines the *type* of expertise with the *level* of sophistication expected.
|
|
13
|
+
|
|
14
|
+
**Questions to Ask:**
|
|
15
|
+
- What domain expertise is needed?
|
|
16
|
+
- At what level? (practitioner, expert, specialist, world-class?)
|
|
17
|
+
- Any specific sub-specialty?
|
|
18
|
+
|
|
19
|
+
**Examples:**
|
|
20
|
+
- "Act as an expert in marketing strategy with deep experience in B2B SaaS go-to-market..."
|
|
21
|
+
- "You are a senior software architect specializing in distributed systems..."
|
|
22
|
+
- "Act as a world-class UX researcher who has run hundreds of user interviews..."
|
|
23
|
+
|
|
24
|
+
### R — Insight
|
|
25
|
+
**Purpose:** Provide the background context, data, or knowledge the AI needs to perform the task effectively. This is the "briefing" — what you'd tell a new consultant before they start work.
|
|
26
|
+
|
|
27
|
+
**Questions to Ask:**
|
|
28
|
+
- What background does the AI need?
|
|
29
|
+
- What relevant data, constraints, or history applies?
|
|
30
|
+
- What does the AI need to know about the situation?
|
|
31
|
+
|
|
32
|
+
**Examples:**
|
|
33
|
+
- "Here's what we know: our churn rate is 8% monthly, concentrated in the SMB segment..."
|
|
34
|
+
- "Context: our team uses Python exclusively, we have a 3-month deadline, and our infrastructure is AWS..."
|
|
35
|
+
- "Background: this is for a Series A startup pitching to enterprise buyers for the first time..."
|
|
36
|
+
|
|
37
|
+
### I — Instructions
|
|
38
|
+
**Purpose:** State clearly and specifically what the AI should do. The task itself, with enough detail to remove ambiguity.
|
|
39
|
+
|
|
40
|
+
**Questions to Ask:**
|
|
41
|
+
- What exactly should be done?
|
|
42
|
+
- What's the deliverable?
|
|
43
|
+
- Any specific requirements for the output?
|
|
44
|
+
|
|
45
|
+
**Examples:**
|
|
46
|
+
- "Write a 6-week email drip campaign for free trial users..."
|
|
47
|
+
- "Create a technical design document for this feature..."
|
|
48
|
+
- "Analyze this data and identify the top 3 risk factors..."
|
|
49
|
+
|
|
50
|
+
### S — Personality (Style)
|
|
51
|
+
**Purpose:** Define the tone, voice, and communication style of the response. Sets how the output should *feel* — the personality it should embody.
|
|
52
|
+
|
|
53
|
+
**Questions to Ask:**
|
|
54
|
+
- What tone is appropriate?
|
|
55
|
+
- What writing style?
|
|
56
|
+
- How should the AI communicate — formal, casual, direct, nurturing?
|
|
57
|
+
- Any persona to embody?
|
|
58
|
+
|
|
59
|
+
**Examples:**
|
|
60
|
+
- "Write in the style of a direct, no-nonsense VP of Engineering..."
|
|
61
|
+
- "Use a warm, conversational tone that feels human and approachable..."
|
|
62
|
+
- "Be concise and data-driven; avoid fluff; treat the reader as intelligent..."
|
|
63
|
+
|
|
64
|
+
### E — Experiment
|
|
65
|
+
**Purpose:** Explicitly request multiple variants, approaches, or versions of the output. This is CRISPE's unique differentiator — instead of one answer, get 2-4 options with different approaches so you can compare and select or combine.
|
|
66
|
+
|
|
67
|
+
**Questions to Ask:**
|
|
68
|
+
- How many variants would be useful?
|
|
69
|
+
- What dimension of variation? (tone, approach, structure, length, angle)
|
|
70
|
+
- Should variants be compared or presented side-by-side?
|
|
71
|
+
|
|
72
|
+
**Examples:**
|
|
73
|
+
- "Provide 3 variations: one data-heavy, one narrative, one bulleted"
|
|
74
|
+
- "Give me 2 versions — one for a technical audience, one for executives"
|
|
75
|
+
- "Write 3 headline options with different angles"
|
|
76
|
+
- "Provide your best answer, then offer 2 alternative approaches I could take instead"
|
|
77
|
+
|
|
78
|
+
## Template Structure
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
CAPACITY AND ROLE:
|
|
82
|
+
[Define expertise level and professional role]
|
|
83
|
+
|
|
84
|
+
INSIGHT:
|
|
85
|
+
[Background context, data, and situation the AI needs to know]
|
|
86
|
+
|
|
87
|
+
INSTRUCTIONS:
|
|
88
|
+
[What exactly needs to be done — the task and deliverable]
|
|
89
|
+
|
|
90
|
+
PERSONALITY (STYLE):
|
|
91
|
+
[Tone, voice, communication style]
|
|
92
|
+
|
|
93
|
+
EXPERIMENT:
|
|
94
|
+
[Request N variants along a specific dimension — tone, approach, format, etc.]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Complete Examples
|
|
98
|
+
|
|
99
|
+
### Example 1: Marketing Campaign
|
|
100
|
+
|
|
101
|
+
**Before CRISPE:**
|
|
102
|
+
"Write email campaigns for our SaaS product."
|
|
103
|
+
|
|
104
|
+
**After CRISPE:**
|
|
105
|
+
```
|
|
106
|
+
CAPACITY AND ROLE:
|
|
107
|
+
Act as an expert B2B SaaS email marketer with 10+ years of experience in
|
|
108
|
+
trial-to-paid conversion campaigns.
|
|
109
|
+
|
|
110
|
+
INSIGHT:
|
|
111
|
+
Our product is a project management tool for engineering teams. Free trial is
|
|
112
|
+
14 days. Current trial-to-paid conversion is 12%. Data shows most conversions
|
|
113
|
+
happen on days 3-5 or not at all. Our best customers are teams of 5-20 engineers
|
|
114
|
+
at growth-stage startups. Key value props: GitHub integration, sprint planning,
|
|
115
|
+
and automated reporting.
|
|
116
|
+
|
|
117
|
+
INSTRUCTIONS:
|
|
118
|
+
Write a 3-email drip sequence for free trial users. Emails trigger on: Day 1
|
|
119
|
+
(welcome), Day 4 (mid-trial activation), Day 12 (pre-expiry urgency).
|
|
120
|
+
|
|
121
|
+
PERSONALITY:
|
|
122
|
+
Direct, peer-to-peer tone — like advice from a fellow engineer, not a sales rep.
|
|
123
|
+
No corporate speak. Short. Respect the reader's time.
|
|
124
|
+
|
|
125
|
+
EXPERIMENT:
|
|
126
|
+
Provide 2 versions of the Day 12 urgency email: one that leads with FOMO/loss
|
|
127
|
+
framing, one that leads with social proof/success stories. Note which performs
|
|
128
|
+
better in most A/B tests and why.
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Example 2: Technical Documentation
|
|
132
|
+
|
|
133
|
+
**Before CRISPE:**
|
|
134
|
+
"Document our REST API."
|
|
135
|
+
|
|
136
|
+
**After CRISPE:**
|
|
137
|
+
```
|
|
138
|
+
CAPACITY AND ROLE:
|
|
139
|
+
You are a senior technical writer specializing in developer documentation for
|
|
140
|
+
APIs, with experience at developer-tools companies.
|
|
141
|
+
|
|
142
|
+
INSIGHT:
|
|
143
|
+
This is a public REST API for a payment processing service. Primary users are
|
|
144
|
+
backend developers integrating payments into their apps. Most are comfortable
|
|
145
|
+
with REST but may be unfamiliar with our specific auth flow (OAuth 2.0 with
|
|
146
|
+
JWT). The API has 12 endpoints. The most commonly used are: POST /charges,
|
|
147
|
+
GET /charges/{id}, POST /refunds.
|
|
148
|
+
|
|
149
|
+
INSTRUCTIONS:
|
|
150
|
+
Document the POST /charges endpoint. Include: endpoint description, authentication
|
|
151
|
+
requirements, request body parameters (table), response codes, example request
|
|
152
|
+
(curl), example response (JSON), and common errors.
|
|
153
|
+
|
|
154
|
+
PERSONALITY:
|
|
155
|
+
Clear, precise technical writing. Minimal prose — mostly structured tables,
|
|
156
|
+
code blocks, and bullet points. Treat the reader as an experienced developer
|
|
157
|
+
who wants facts, not hand-holding.
|
|
158
|
+
|
|
159
|
+
EXPERIMENT:
|
|
160
|
+
Provide 2 formats: (1) full formal API reference style, (2) a quick-start
|
|
161
|
+
"cookbook" style with opinionated examples. Note which format works best for
|
|
162
|
+
onboarding vs. reference.
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Example 3: Strategic Analysis
|
|
166
|
+
|
|
167
|
+
**Before CRISPE:**
|
|
168
|
+
"Analyze our pricing strategy."
|
|
169
|
+
|
|
170
|
+
**After CRISPE:**
|
|
171
|
+
```
|
|
172
|
+
CAPACITY AND ROLE:
|
|
173
|
+
Act as a SaaS pricing strategy consultant with expertise in value-based pricing,
|
|
174
|
+
packaging, and competitive positioning.
|
|
175
|
+
|
|
176
|
+
INSIGHT:
|
|
177
|
+
We offer 3 plans: Free (limited features), Pro ($49/month), Enterprise (custom).
|
|
178
|
+
Current split: 60% free, 35% Pro, 5% Enterprise. Our main competitor charges
|
|
179
|
+
$39/month for similar Pro features. We're seeing strong NPS (72) but sluggish
|
|
180
|
+
expansion revenue — most Pro users stay on Pro indefinitely. Our top 10%
|
|
181
|
+
customers drive 60% of revenue and are all on Enterprise.
|
|
182
|
+
|
|
183
|
+
INSTRUCTIONS:
|
|
184
|
+
Analyze our current pricing structure and recommend improvements to increase
|
|
185
|
+
expansion revenue and ARPU without hurting free-to-paid conversion.
|
|
186
|
+
|
|
187
|
+
PERSONALITY:
|
|
188
|
+
Direct, CEO-level strategic thinking. Back recommendations with data logic.
|
|
189
|
+
Be willing to challenge assumptions. Avoid hedging everything — take a position.
|
|
190
|
+
|
|
191
|
+
EXPERIMENT:
|
|
192
|
+
Give 3 strategic options: (1) a conservative tweak, (2) a mid-range restructure,
|
|
193
|
+
(3) a bold rethink. For each, state the hypothesis, expected impact on ARPU and
|
|
194
|
+
churn risk, and one key assumption that must be true for it to work.
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Best Use Cases
|
|
198
|
+
|
|
199
|
+
1. **When You Want Options, Not Just One Answer**
|
|
200
|
+
- Creative decisions with multiple valid approaches
|
|
201
|
+
- A/B test candidates
|
|
202
|
+
- Exploratory analysis with multiple angles
|
|
203
|
+
|
|
204
|
+
2. **Content Creation With Quality Bar**
|
|
205
|
+
- Marketing copy, campaigns, messaging
|
|
206
|
+
- Documentation with different audience cuts
|
|
207
|
+
- Communications requiring tone judgment
|
|
208
|
+
|
|
209
|
+
3. **Strategic or Analytical Work**
|
|
210
|
+
- When multiple strategic options should be compared
|
|
211
|
+
- Analysis that might have different valid conclusions
|
|
212
|
+
|
|
213
|
+
4. **When Style/Personality Matters Significantly**
|
|
214
|
+
- Brand voice must be carefully calibrated
|
|
215
|
+
- Audience-sensitive communications
|
|
216
|
+
- High-stakes external communications
|
|
217
|
+
|
|
218
|
+
## Selection Criteria
|
|
219
|
+
|
|
220
|
+
**Choose CRISPE when:**
|
|
221
|
+
- ✅ You want multiple output variants to compare
|
|
222
|
+
- ✅ Tone and personality need explicit control
|
|
223
|
+
- ✅ Background context is extensive and critical
|
|
224
|
+
- ✅ High-quality content where first draft is rarely final
|
|
225
|
+
- ✅ Expertise level significantly affects output quality
|
|
226
|
+
|
|
227
|
+
**Avoid CRISPE when:**
|
|
228
|
+
- ❌ You need one definitive answer → use CO-STAR or RACE
|
|
229
|
+
- ❌ Task is simple → use APE, RTF, or CTF
|
|
230
|
+
- ❌ Multi-step process with methodology → use RISEN
|
|
231
|
+
- ❌ Transforming existing content → use BAB
|
|
232
|
+
|
|
233
|
+
## CRISPE vs. CO-STAR
|
|
234
|
+
|
|
235
|
+
| | CRISPE | CO-STAR |
|
|
236
|
+
|---|---|---|
|
|
237
|
+
| Unique feature | Experiment — multiple variants | Style + Tone as explicit components |
|
|
238
|
+
| Best when | You want options to compare | You know exactly what you want |
|
|
239
|
+
| Output count | Multiple variants | Single polished output |
|
|
240
|
+
| Audience component | Implicit in Insight/Personality | Explicit (Audience component) |
|
|
241
|
+
| Complexity | Medium | High |
|
|
242
|
+
|
|
243
|
+
**Rule of thumb:** If you want one great output → CO-STAR. If you want multiple options to compare → CRISPE.
|
|
244
|
+
|
|
245
|
+
## Quick Reference
|
|
246
|
+
|
|
247
|
+
| Component | Focus | Key Question |
|
|
248
|
+
|-----------|-------|--------------|
|
|
249
|
+
| Capacity & Role | Expertise | "What level of expert should do this?" |
|
|
250
|
+
| Insight | Background | "What does the AI need to know?" |
|
|
251
|
+
| Instructions | Task | "What exactly needs to be done?" |
|
|
252
|
+
| Personality | Style | "How should it sound?" |
|
|
253
|
+
| Experiment | Variants | "How many options do I want to compare?" |
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# CTF Framework
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
CTF is a simple 3-component framework focused on situational context, task clarity, and output format. It is ideal for tasks where background/situation is more important than AI persona framing, and the primary concern is getting a clearly defined output from a well-understood context.
|
|
6
|
+
|
|
7
|
+
## Components
|
|
8
|
+
|
|
9
|
+
### C - Context
|
|
10
|
+
**Purpose:** Describe the situation, background, or circumstances surrounding the task.
|
|
11
|
+
|
|
12
|
+
**Questions to Ask:**
|
|
13
|
+
- What is the current situation?
|
|
14
|
+
- What background does the AI need to know?
|
|
15
|
+
- What has already been done?
|
|
16
|
+
- Why is this task needed?
|
|
17
|
+
- What constraints or circumstances apply?
|
|
18
|
+
|
|
19
|
+
**Examples:**
|
|
20
|
+
- "We are mid-sprint and the client has changed the acceptance criteria for the login flow..."
|
|
21
|
+
- "I'm a junior developer onboarding to a legacy Python codebase with no documentation..."
|
|
22
|
+
- "Our team writes internal status reports weekly and we need to standardize the format..."
|
|
23
|
+
|
|
24
|
+
### T - Task
|
|
25
|
+
**Purpose:** State exactly what needs to be done.
|
|
26
|
+
|
|
27
|
+
**Questions to Ask:**
|
|
28
|
+
- What exactly needs to be done?
|
|
29
|
+
- What's the deliverable?
|
|
30
|
+
- What's the core action?
|
|
31
|
+
|
|
32
|
+
**Examples:**
|
|
33
|
+
- "Write a summary of the changed requirements for the team..."
|
|
34
|
+
- "Explain what this function does in plain language..."
|
|
35
|
+
- "Create a template for our weekly status report..."
|
|
36
|
+
|
|
37
|
+
### F - Format
|
|
38
|
+
**Purpose:** Specify how the output should be structured.
|
|
39
|
+
|
|
40
|
+
**Questions to Ask:**
|
|
41
|
+
- What format should the output take?
|
|
42
|
+
- How should it be structured?
|
|
43
|
+
- What's the preferred presentation?
|
|
44
|
+
- Any specific formatting requirements?
|
|
45
|
+
|
|
46
|
+
**Examples:**
|
|
47
|
+
- "Provide as a markdown table..."
|
|
48
|
+
- "Format as a bulleted list under three headings..."
|
|
49
|
+
- "Write as a concise paragraph, 100 words max..."
|
|
50
|
+
|
|
51
|
+
## Template Structure
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
CONTEXT:
|
|
55
|
+
[Situation, background, circumstances]
|
|
56
|
+
|
|
57
|
+
TASK:
|
|
58
|
+
[What needs to be done]
|
|
59
|
+
|
|
60
|
+
FORMAT:
|
|
61
|
+
[How output should be structured]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Complete Examples
|
|
65
|
+
|
|
66
|
+
### Example 1: Requirement Change Summary
|
|
67
|
+
|
|
68
|
+
**Before CTF:**
|
|
69
|
+
"Summarize the new requirements."
|
|
70
|
+
|
|
71
|
+
**After CTF:**
|
|
72
|
+
```
|
|
73
|
+
CONTEXT:
|
|
74
|
+
We are in sprint 3 of a 6-sprint project. The client just revised the login flow
|
|
75
|
+
requirements: they now want SSO via Google instead of email/password. The dev team
|
|
76
|
+
hasn't been told yet and we need to communicate this clearly without causing panic.
|
|
77
|
+
|
|
78
|
+
TASK:
|
|
79
|
+
Write a brief summary of the requirement change to share with the development team
|
|
80
|
+
in Slack.
|
|
81
|
+
|
|
82
|
+
FORMAT:
|
|
83
|
+
- 3-5 bullet points
|
|
84
|
+
- Plain language, no jargon
|
|
85
|
+
- End with a single action item
|
|
86
|
+
- Keep total under 150 words
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Example 2: Code Explanation
|
|
90
|
+
|
|
91
|
+
**Before CTF:**
|
|
92
|
+
"Explain this code."
|
|
93
|
+
|
|
94
|
+
**After CTF:**
|
|
95
|
+
```
|
|
96
|
+
CONTEXT:
|
|
97
|
+
I'm a junior developer new to this codebase. The function below is from a legacy
|
|
98
|
+
authentication module that nobody has documented. I need to understand it before
|
|
99
|
+
refactoring it next week.
|
|
100
|
+
|
|
101
|
+
TASK:
|
|
102
|
+
Explain what this function does, why each section exists, and flag any potential
|
|
103
|
+
issues I should know before touching it.
|
|
104
|
+
|
|
105
|
+
FORMAT:
|
|
106
|
+
- Short plain-language summary (2-3 sentences)
|
|
107
|
+
- Line-by-line breakdown as a numbered list
|
|
108
|
+
- Potential issues section at the end (bullet points)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Example 3: Template Creation
|
|
112
|
+
|
|
113
|
+
**Before CTF:**
|
|
114
|
+
"Create a status report template."
|
|
115
|
+
|
|
116
|
+
**After CTF:**
|
|
117
|
+
```
|
|
118
|
+
CONTEXT:
|
|
119
|
+
Our team of 6 engineers sends weekly status reports to a non-technical product
|
|
120
|
+
manager. Reports are currently inconsistent and take too long to write. We want
|
|
121
|
+
a reusable template that takes under 10 minutes to fill out.
|
|
122
|
+
|
|
123
|
+
TASK:
|
|
124
|
+
Create a weekly status report template that balances completeness with brevity.
|
|
125
|
+
|
|
126
|
+
FORMAT:
|
|
127
|
+
Markdown template with:
|
|
128
|
+
- Section headers with fill-in placeholders
|
|
129
|
+
- Brief instruction comment under each header
|
|
130
|
+
- Total estimated fill-in time: under 10 minutes
|
|
131
|
+
- Length when filled: 200-300 words
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Best Use Cases
|
|
135
|
+
|
|
136
|
+
1. **Situational Tasks**
|
|
137
|
+
- When background drives everything
|
|
138
|
+
- Handoff documents
|
|
139
|
+
- Mid-project updates
|
|
140
|
+
- Onboarding assistance
|
|
141
|
+
|
|
142
|
+
2. **Context-Heavy Requests**
|
|
143
|
+
- Legacy code explanations
|
|
144
|
+
- Requirement change communication
|
|
145
|
+
- Stakeholder summaries
|
|
146
|
+
|
|
147
|
+
3. **Simple, Well-Defined Tasks with Rich Background**
|
|
148
|
+
- Template creation
|
|
149
|
+
- Meeting prep
|
|
150
|
+
- Quick documentation
|
|
151
|
+
|
|
152
|
+
4. **When Role is Obvious or Irrelevant**
|
|
153
|
+
- The expertise is implied by the context
|
|
154
|
+
- No need to establish an AI persona
|
|
155
|
+
|
|
156
|
+
## Selection Criteria
|
|
157
|
+
|
|
158
|
+
**Choose CTF when:**
|
|
159
|
+
- ✅ Background/situation is the key driver
|
|
160
|
+
- ✅ Role/persona is obvious or irrelevant
|
|
161
|
+
- ✅ Task is simple and well-defined
|
|
162
|
+
- ✅ Output format is a primary concern
|
|
163
|
+
- ✅ Quick, focused execution needed
|
|
164
|
+
- ✅ Context would be redundant in a Role definition
|
|
165
|
+
|
|
166
|
+
**Avoid CTF when:**
|
|
167
|
+
- ❌ AI expertise/persona materially changes output quality (use RTF)
|
|
168
|
+
- ❌ Audience and tone are critical (use CO-STAR)
|
|
169
|
+
- ❌ Multi-step process with methodology needed (use RISEN)
|
|
170
|
+
- ❌ Explicit dos/don'ts required (use TIDD-EC)
|
|
171
|
+
- ❌ Input→output transformation (use RISE-IE)
|
|
172
|
+
|
|
173
|
+
## CTF vs RTF
|
|
174
|
+
|
|
175
|
+
| | CTF | RTF |
|
|
176
|
+
|---|---|---|
|
|
177
|
+
| First component | **Context** — situational background | **Role** — AI persona/expertise |
|
|
178
|
+
| Primary driver | "What's the situation?" | "Who should answer this?" |
|
|
179
|
+
| Best for | Context-heavy, obvious expertise | Expertise-driven, minimal background |
|
|
180
|
+
| Weakness | No persona framing | Context must fit inside Role |
|
|
181
|
+
|
|
182
|
+
**Rule of thumb**: If you'd start writing "You are a..." → use RTF. If you'd start writing "Here's the situation..." → use CTF.
|
|
183
|
+
|
|
184
|
+
## Common Mistakes
|
|
185
|
+
|
|
186
|
+
1. **Vague Context**
|
|
187
|
+
- Include specific details: what already happened, what the constraints are, why it matters
|
|
188
|
+
- Don't just say "I need help with a project"
|
|
189
|
+
|
|
190
|
+
2. **Insufficient Task Description**
|
|
191
|
+
- Be specific about the deliverable
|
|
192
|
+
- Define scope clearly
|
|
193
|
+
|
|
194
|
+
3. **Missing Format Specification**
|
|
195
|
+
- Don't assume default output is correct
|
|
196
|
+
- Specify structure, length, and presentation
|
|
197
|
+
|
|
198
|
+
4. **Using CTF for Complex Tasks**
|
|
199
|
+
- If context is long and task has multiple steps, upgrade to RISEN or CO-STAR
|
|
200
|
+
|
|
201
|
+
## Quick Reference
|
|
202
|
+
|
|
203
|
+
| Component | Focus | Key Question |
|
|
204
|
+
|-----------|-------|--------------|
|
|
205
|
+
| Context | Situation | "What's the background?" |
|
|
206
|
+
| Task | Action | "What needs to be done?" |
|
|
207
|
+
| Format | Structure | "How should it look?" |
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Devil's Advocate Prompting
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Devil's Advocate Prompting instructs the AI to generate the strongest possible case *against* a position, plan, decision, or idea — not a balanced view, not a straw man, but the most forceful and substantive opposing argument possible. Named after the historical role in Catholic canonization proceedings where someone was appointed specifically to argue against sainthood, it is the framework for deliberately attacking your own thinking to find weaknesses before others do.
|
|
6
|
+
|
|
7
|
+
**Research basis:** "Enhancing AI-Assisted Group Decision Making through LLM-Powered Devil's Advocate" (ACM IUI 2024, peer-reviewed). Key finding: AI devil's advocates arguing against AI recommendations (not just the user's position) produced more appropriate human reliance on AI. Related: Steelman (steelman.dylanamartin.com) implements a four-round structured adversarial argumentation framework.
|
|
8
|
+
|
|
9
|
+
## When to Use
|
|
10
|
+
|
|
11
|
+
- Testing a plan, decision, or proposal before committing
|
|
12
|
+
- Preparing for pushback from stakeholders or opponents
|
|
13
|
+
- Debiasing: countering groupthink or confirmation bias
|
|
14
|
+
- Architecture/design reviews — find the fatal flaws first
|
|
15
|
+
- Any high-stakes decision where being wrong is costly
|
|
16
|
+
|
|
17
|
+
## Components
|
|
18
|
+
|
|
19
|
+
### Position Statement
|
|
20
|
+
**Purpose:** The argument, plan, or decision to attack. State it clearly — the stronger the devil's advocate, the clearer the target must be.
|
|
21
|
+
|
|
22
|
+
### Adversarial Instruction
|
|
23
|
+
**Purpose:** Explicit instruction to be adversarial, not balanced. This is what makes it devil's advocate rather than a pros/cons analysis.
|
|
24
|
+
|
|
25
|
+
### Attack Dimensions
|
|
26
|
+
**Purpose:** The specific dimensions to attack. Without these, critique stays superficial.
|
|
27
|
+
|
|
28
|
+
**Common dimensions:**
|
|
29
|
+
- **Assumptions**: What must be true for this to work? Attack each assumption.
|
|
30
|
+
- **Logic**: Where does the reasoning fail?
|
|
31
|
+
- **Risks**: What are the most likely failure modes?
|
|
32
|
+
- **Alternatives**: What better options are being ignored?
|
|
33
|
+
- **Blind spots**: What has the author failed to consider?
|
|
34
|
+
- **Falsification criteria**: What evidence would prove this wrong?
|
|
35
|
+
|
|
36
|
+
### Severity Ranking (optional)
|
|
37
|
+
**Purpose:** Rank identified weaknesses by how fatal they are. Separates show-stoppers from minor issues.
|
|
38
|
+
|
|
39
|
+
## Template Structure
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
You are a rigorous devil's advocate. Your task is NOT to give a balanced
|
|
43
|
+
view — your task is to generate the strongest possible case against the
|
|
44
|
+
following [position / plan / decision / proposal].
|
|
45
|
+
|
|
46
|
+
POSITION TO ATTACK:
|
|
47
|
+
[State the position, plan, or decision clearly]
|
|
48
|
+
|
|
49
|
+
ATTACK INSTRUCTIONS:
|
|
50
|
+
- Do not offer a balanced view or acknowledge positives
|
|
51
|
+
- Attack every assumption the position depends on
|
|
52
|
+
- Identify every logical gap or unsupported claim
|
|
53
|
+
- Surface every significant risk or failure mode
|
|
54
|
+
- Point out what better alternatives are being ignored
|
|
55
|
+
- Be as forceful and specific as possible — no vague objections
|
|
56
|
+
|
|
57
|
+
ATTACK DIMENSIONS:
|
|
58
|
+
Focus your attack on: [select relevant dimensions]
|
|
59
|
+
- Core assumptions (what must be true for this to work?)
|
|
60
|
+
- Internal logic (where does the reasoning break down?)
|
|
61
|
+
- Execution risks (what makes this fail in practice?)
|
|
62
|
+
- Overlooked alternatives (what better options exist?)
|
|
63
|
+
- [Add domain-specific dimensions as needed]
|
|
64
|
+
|
|
65
|
+
SEVERITY RANKING:
|
|
66
|
+
After the attack, list the THREE MOST FATAL flaws — the ones that, if
|
|
67
|
+
unaddressed, would cause this to fail regardless of execution quality.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Complete Examples
|
|
71
|
+
|
|
72
|
+
### Example 1: Architecture Decision
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
You are a rigorous devil's advocate.
|
|
76
|
+
|
|
77
|
+
POSITION TO ATTACK:
|
|
78
|
+
We should rewrite our monolithic Python backend as microservices.
|
|
79
|
+
The motivation: our deployment pipeline is slow, different teams want
|
|
80
|
+
to deploy independently, and we're seeing performance issues in the
|
|
81
|
+
payments module.
|
|
82
|
+
|
|
83
|
+
ATTACK INSTRUCTIONS:
|
|
84
|
+
Generate the strongest possible case against this decision. Do not
|
|
85
|
+
acknowledge any benefits. Attack the reasoning, assumptions, and plan.
|
|
86
|
+
|
|
87
|
+
ATTACK DIMENSIONS:
|
|
88
|
+
- Core assumptions about what microservices solve
|
|
89
|
+
- Organizational and team readiness
|
|
90
|
+
- Technical complexity being introduced
|
|
91
|
+
- Whether the stated problems actually require microservices
|
|
92
|
+
- Migration risks and the transition period
|
|
93
|
+
|
|
94
|
+
SEVERITY RANKING:
|
|
95
|
+
End with the 3 most fatal flaws that would cause this to fail.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Example 2: Business Strategy
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
You are a rigorous devil's advocate.
|
|
102
|
+
|
|
103
|
+
POSITION TO ATTACK:
|
|
104
|
+
We should expand to the European market in Q3. We have strong US NPS (72),
|
|
105
|
+
product-market fit with SMBs, and three European companies have expressed
|
|
106
|
+
interest. We'll hire a country manager in the UK and use them as a beachhead.
|
|
107
|
+
|
|
108
|
+
ATTACK INSTRUCTIONS:
|
|
109
|
+
Argue forcefully against this expansion strategy. Be specific — use
|
|
110
|
+
facts, numbers, and logic. No acknowledgment of positives.
|
|
111
|
+
|
|
112
|
+
ATTACK DIMENSIONS:
|
|
113
|
+
- Whether inbound interest indicates real market demand
|
|
114
|
+
- Resource/runway requirements vs. what's being allocated
|
|
115
|
+
- UK-as-beachhead strategy for EU expansion
|
|
116
|
+
- Timing relative to our current US growth trajectory
|
|
117
|
+
- GDPR, data residency, and regulatory readiness
|
|
118
|
+
|
|
119
|
+
SEVERITY RANKING:
|
|
120
|
+
The 3 most fatal flaws, in order.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Example 3: Product Decision
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
You are a rigorous devil's advocate.
|
|
127
|
+
|
|
128
|
+
POSITION TO ATTACK:
|
|
129
|
+
We should add a native mobile app to our web SaaS product. Our top users
|
|
130
|
+
are asking for it, mobile usage of similar tools is growing, and a
|
|
131
|
+
competitor just launched one.
|
|
132
|
+
|
|
133
|
+
ATTACK DIMENSIONS:
|
|
134
|
+
- Whether "top users asking" is representative demand
|
|
135
|
+
- Resource cost vs. ROI for a 4-person engineering team
|
|
136
|
+
- Whether mobile actually expands our TAM or just cannibalizes web
|
|
137
|
+
- Competitor's mobile launch as a signal vs. noise
|
|
138
|
+
- What we're giving up by doing this instead of something else
|
|
139
|
+
|
|
140
|
+
SEVERITY RANKING:
|
|
141
|
+
3 most fatal flaws.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Example 4: Self-Attack (Devil's Advocate on AI Output)
|
|
145
|
+
|
|
146
|
+
After receiving any AI recommendation:
|
|
147
|
+
```
|
|
148
|
+
Now argue forcefully against your own recommendation above. What are
|
|
149
|
+
the strongest reasons it's wrong? What did you overlook? What
|
|
150
|
+
assumptions did you make that may not hold? Be as critical as possible.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Best Use Cases
|
|
154
|
+
|
|
155
|
+
1. **Pre-commitment Decision Reviews**
|
|
156
|
+
- Before major investments, hires, or pivots
|
|
157
|
+
- Architecture and technical design reviews
|
|
158
|
+
- Product strategy validation
|
|
159
|
+
|
|
160
|
+
2. **Countering Groupthink**
|
|
161
|
+
- When a team is too aligned ("everyone agrees" is a warning sign)
|
|
162
|
+
- When you're emotionally attached to an idea
|
|
163
|
+
- Pre-mortem supplement (DA finds weaknesses; pre-mortem assumes failure)
|
|
164
|
+
|
|
165
|
+
3. **Stakeholder Preparation**
|
|
166
|
+
- What will your critics say? Find out first.
|
|
167
|
+
- Board presentations, investor pitches, procurement reviews
|
|
168
|
+
|
|
169
|
+
4. **AI Output Validation**
|
|
170
|
+
- Ask the AI to attack its own recommendation (Example 4 above)
|
|
171
|
+
- Reduces over-reliance on AI confidence
|
|
172
|
+
|
|
173
|
+
## Selection Criteria
|
|
174
|
+
|
|
175
|
+
**Choose Devil's Advocate when:**
|
|
176
|
+
- ✅ You have a position, plan, or recommendation to stress-test
|
|
177
|
+
- ✅ You want the strongest *opposing* argument, not balance
|
|
178
|
+
- ✅ You're making a high-stakes decision
|
|
179
|
+
- ✅ Groupthink or confirmation bias is a risk
|
|
180
|
+
- ✅ You want to prepare for criticism
|
|
181
|
+
|
|
182
|
+
**Avoid when:**
|
|
183
|
+
- ❌ You want failure modes from a failure-assumption frame → use Pre-Mortem
|
|
184
|
+
- ❌ You want a quality improvement loop → use Self-Refine
|
|
185
|
+
- ❌ You want principle-based critique → use CAI Critique-Revise
|
|
186
|
+
- ❌ You need a balanced pros/cons analysis → use Tree of Thought
|
|
187
|
+
|
|
188
|
+
## Devil's Advocate vs. Pre-Mortem
|
|
189
|
+
|
|
190
|
+
| | Devil's Advocate | Pre-Mortem |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| Frame | "Here's why this is wrong" | "This has already failed — why?" |
|
|
193
|
+
| Output | Strongest opposing argument | Specific failure causes |
|
|
194
|
+
| Bias | Attacks position directly | Prospective hindsight |
|
|
195
|
+
| Best for | Testing reasoning and assumptions | Risk identification and mitigation |
|
|
196
|
+
|
|
197
|
+
**Use both:** Devil's Advocate finds the weakest arguments; Pre-Mortem finds the most likely failure paths. They complement each other.
|
|
198
|
+
|
|
199
|
+
## Quick Reference
|
|
200
|
+
|
|
201
|
+
| Component | Purpose |
|
|
202
|
+
|-----------|---------|
|
|
203
|
+
| Position Statement | What to attack |
|
|
204
|
+
| Adversarial Instruction | Be forceful, not balanced |
|
|
205
|
+
| Attack Dimensions | What aspects to critique |
|
|
206
|
+
| Severity Ranking | The 3 most fatal flaws |
|