@ckelsoe/prompt-architect 3.0.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +264 -264
  4. package/LICENSE +21 -21
  5. package/README.md +1064 -1184
  6. package/adapters/README.md +75 -267
  7. package/adapters/for-windsurf.md +136 -136
  8. package/adapters/system-prompt.md +243 -243
  9. package/package.json +139 -135
  10. package/scripts/build-skill.js +64 -0
  11. package/scripts/install.js +35 -56
  12. package/scripts/test.js +205 -213
  13. package/scripts/validate-skill.js +350 -350
  14. package/skills/prompt-architect/SKILL.md +331 -331
  15. package/skills/prompt-architect/assets/templates/ape_template.txt +5 -5
  16. package/skills/prompt-architect/assets/templates/bab_template.txt +15 -15
  17. package/skills/prompt-architect/assets/templates/broke_template.txt +15 -15
  18. package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +18 -18
  19. package/skills/prompt-architect/assets/templates/care_template.txt +16 -16
  20. package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +46 -46
  21. package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +49 -49
  22. package/skills/prompt-architect/assets/templates/co-star_template.txt +17 -17
  23. package/skills/prompt-architect/assets/templates/crispe_template.txt +14 -14
  24. package/skills/prompt-architect/assets/templates/ctf_template.txt +15 -15
  25. package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +25 -25
  26. package/skills/prompt-architect/assets/templates/hybrid_template.txt +101 -101
  27. package/skills/prompt-architect/assets/templates/least-to-most_template.txt +16 -16
  28. package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +7 -7
  29. package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +27 -27
  30. package/skills/prompt-architect/assets/templates/race_template.txt +19 -19
  31. package/skills/prompt-architect/assets/templates/rcot_template.txt +31 -31
  32. package/skills/prompt-architect/assets/templates/react_template.txt +27 -27
  33. package/skills/prompt-architect/assets/templates/reverse-role_template.txt +11 -11
  34. package/skills/prompt-architect/assets/templates/rise-ie_template.txt +23 -23
  35. package/skills/prompt-architect/assets/templates/rise-ix_template.txt +28 -28
  36. package/skills/prompt-architect/assets/templates/risen_template.txt +21 -21
  37. package/skills/prompt-architect/assets/templates/rpef_template.txt +26 -26
  38. package/skills/prompt-architect/assets/templates/rtf_template.txt +13 -13
  39. package/skills/prompt-architect/assets/templates/self-refine_template.txt +16 -16
  40. package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +15 -15
  41. package/skills/prompt-architect/assets/templates/step-back_template.txt +10 -10
  42. package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +45 -45
  43. package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +30 -30
  44. package/skills/prompt-architect/references/frameworks/ape.md +200 -200
  45. package/skills/prompt-architect/references/frameworks/bab.md +242 -242
  46. package/skills/prompt-architect/references/frameworks/broke.md +242 -242
  47. package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +230 -230
  48. package/skills/prompt-architect/references/frameworks/care.md +235 -235
  49. package/skills/prompt-architect/references/frameworks/chain-of-density.md +479 -479
  50. package/skills/prompt-architect/references/frameworks/chain-of-thought.md +424 -424
  51. package/skills/prompt-architect/references/frameworks/co-star.md +256 -256
  52. package/skills/prompt-architect/references/frameworks/crispe.md +253 -253
  53. package/skills/prompt-architect/references/frameworks/ctf.md +207 -207
  54. package/skills/prompt-architect/references/frameworks/devils-advocate.md +206 -206
  55. package/skills/prompt-architect/references/frameworks/least-to-most.md +226 -226
  56. package/skills/prompt-architect/references/frameworks/plan-and-solve.md +210 -210
  57. package/skills/prompt-architect/references/frameworks/pre-mortem.md +197 -197
  58. package/skills/prompt-architect/references/frameworks/race.md +243 -243
  59. package/skills/prompt-architect/references/frameworks/rcot.md +203 -203
  60. package/skills/prompt-architect/references/frameworks/react.md +304 -304
  61. package/skills/prompt-architect/references/frameworks/reverse-role.md +189 -189
  62. package/skills/prompt-architect/references/frameworks/rise.md +555 -555
  63. package/skills/prompt-architect/references/frameworks/risen.md +297 -297
  64. package/skills/prompt-architect/references/frameworks/rpef.md +195 -195
  65. package/skills/prompt-architect/references/frameworks/rtf.md +358 -358
  66. package/skills/prompt-architect/references/frameworks/self-refine.md +205 -205
  67. package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +186 -186
  68. package/skills/prompt-architect/references/frameworks/step-back.md +206 -206
  69. package/skills/prompt-architect/references/frameworks/tidd-ec.md +470 -470
  70. package/skills/prompt-architect/references/frameworks/tree-of-thought.md +260 -260
  71. package/skills/prompt-architect/scripts/framework_analyzer.py +807 -807
  72. package/skills/prompt-architect/scripts/prompt_evaluator.py +336 -336
  73. package/adapters/for-cursor.mdc +0 -138
  74. package/adapters/for-gemini-cli.md +0 -70
  75. package/adapters/for-github-copilot.md +0 -141
  76. package/adapters/for-openai-codex-cli.md +0 -158
@@ -1,206 +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 |
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 |