@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.
Files changed (70) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/CHANGELOG.md +135 -5
  4. package/MIGRATION.md +1 -1
  5. package/README.md +32 -47
  6. package/adapters/README.md +1 -1
  7. package/adapters/system-prompt.md +115 -59
  8. package/package.json +5 -4
  9. package/scripts/install.js +52 -22
  10. package/scripts/test.js +88 -40
  11. package/scripts/validate-skill.js +184 -56
  12. package/skills/prompt-architect/SKILL.md +94 -79
  13. package/skills/prompt-architect/assets/templates/ape_template.txt +14 -3
  14. package/skills/prompt-architect/assets/templates/bab_template.txt +23 -10
  15. package/skills/prompt-architect/assets/templates/broke_template.txt +31 -6
  16. package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +16 -8
  17. package/skills/prompt-architect/assets/templates/care_template.txt +4 -0
  18. package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +64 -35
  19. package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +8 -0
  20. package/skills/prompt-architect/assets/templates/co-star_template.txt +8 -0
  21. package/skills/prompt-architect/assets/templates/crispe_template.txt +6 -0
  22. package/skills/prompt-architect/assets/templates/ctf_template.txt +8 -0
  23. package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +7 -0
  24. package/skills/prompt-architect/assets/templates/hybrid_template.txt +44 -24
  25. package/skills/prompt-architect/assets/templates/iterative-compression_template.txt +74 -0
  26. package/skills/prompt-architect/assets/templates/least-to-most_template.txt +4 -0
  27. package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +4 -0
  28. package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +24 -14
  29. package/skills/prompt-architect/assets/templates/race_template.txt +9 -0
  30. package/skills/prompt-architect/assets/templates/rcot_template.txt +8 -0
  31. package/skills/prompt-architect/assets/templates/react_template.txt +38 -16
  32. package/skills/prompt-architect/assets/templates/rise-ie_template.txt +4 -0
  33. package/skills/prompt-architect/assets/templates/rise-ix_template.txt +3 -3
  34. package/skills/prompt-architect/assets/templates/risen_template.txt +7 -0
  35. package/skills/prompt-architect/assets/templates/rpef_template.txt +16 -11
  36. package/skills/prompt-architect/assets/templates/rtf_template.txt +9 -0
  37. package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +18 -10
  38. package/skills/prompt-architect/assets/templates/step-back_template.txt +4 -0
  39. package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +54 -31
  40. package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +37 -21
  41. package/skills/prompt-architect/references/frameworks/ape.md +145 -57
  42. package/skills/prompt-architect/references/frameworks/bab.md +139 -58
  43. package/skills/prompt-architect/references/frameworks/broke.md +157 -57
  44. package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +184 -76
  45. package/skills/prompt-architect/references/frameworks/care.md +67 -36
  46. package/skills/prompt-architect/references/frameworks/chain-of-density.md +111 -417
  47. package/skills/prompt-architect/references/frameworks/chain-of-thought.md +45 -19
  48. package/skills/prompt-architect/references/frameworks/co-star.md +102 -44
  49. package/skills/prompt-architect/references/frameworks/crispe.md +7 -5
  50. package/skills/prompt-architect/references/frameworks/ctf.md +75 -37
  51. package/skills/prompt-architect/references/frameworks/devils-advocate.md +105 -58
  52. package/skills/prompt-architect/references/frameworks/iterative-compression.md +448 -0
  53. package/skills/prompt-architect/references/frameworks/least-to-most.md +35 -13
  54. package/skills/prompt-architect/references/frameworks/plan-and-solve.md +38 -9
  55. package/skills/prompt-architect/references/frameworks/pre-mortem.md +182 -72
  56. package/skills/prompt-architect/references/frameworks/race.md +93 -38
  57. package/skills/prompt-architect/references/frameworks/rcot.md +1 -1
  58. package/skills/prompt-architect/references/frameworks/react.md +230 -97
  59. package/skills/prompt-architect/references/frameworks/reverse-role.md +23 -16
  60. package/skills/prompt-architect/references/frameworks/rise.md +120 -77
  61. package/skills/prompt-architect/references/frameworks/risen.md +82 -28
  62. package/skills/prompt-architect/references/frameworks/rpef.md +227 -58
  63. package/skills/prompt-architect/references/frameworks/rtf.md +4 -2
  64. package/skills/prompt-architect/references/frameworks/self-refine.md +4 -2
  65. package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +68 -22
  66. package/skills/prompt-architect/references/frameworks/step-back.md +48 -16
  67. package/skills/prompt-architect/references/frameworks/tidd-ec.md +129 -51
  68. package/skills/prompt-architect/references/frameworks/tree-of-thought.md +112 -37
  69. package/skills/prompt-architect/scripts/framework_analyzer.py +0 -807
  70. package/skills/prompt-architect/scripts/prompt_evaluator.py +0 -336
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
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.
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. A complete Devil's Advocate prompt emits as an opening instruction paragraph that establishes the adversarial frame, followed by the position under attack, an optional supporting document, and the attack directives — the section headers are stripped at emission, so each block is written to carry its own meaning in prose rather than lean on the header above it.
6
6
 
7
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
8
 
@@ -17,13 +17,16 @@ Devil's Advocate Prompting instructs the AI to generate the strongest possible c
17
17
  ## Components
18
18
 
19
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.
20
+ **Purpose:** The argument, plan, or decision to attack. State it clearly — the stronger the devil's advocate, the clearer the target must be. Write it as complete sentences: the opening instruction promises a case "against the following position," and once the `POSITION TO ATTACK` header is stripped, nothing else names what that position is, so the statement itself has to read as the thing being attacked.
21
+
22
+ ### Supporting Material (optional)
23
+ **Purpose:** The proposal, design doc, or strategy memo that sets the position out in full. Supplying it lets the attack engage the position's actual claims and reasoning rather than the model's assumptions about a position of that description. The template's slot is optional and self-deleting: if there is nothing to paste, the bracketed block and the carrier sentence directly below it both come out. That carrier sentence — "Treat the document above as the detailed source of the position's claims, assumptions, and reasoning" — lets the pasted document stay a bare artifact by naming, in prose, what to do with it once its header is gone.
21
24
 
22
25
  ### 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.
26
+ **Purpose:** Explicit instruction to be adversarial, not balanced. This is what makes it devil's advocate rather than a pros/cons analysis. It ships as a list of standing imperatives, and the prohibition among them — "Do not acknowledge positives or offer a balanced view" — must survive into the emitted prompt as that explicit "Do not…" text. Per SKILL.md step 5, a restriction the user relies on cannot be left to a section header, because headers are stripped at emission; phrased as a standing imperative, the instruction carries with or without its header.
24
27
 
25
28
  ### Attack Dimensions
26
- **Purpose:** The specific dimensions to attack. Without these, critique stays superficial.
29
+ **Purpose:** The specific dimensions to attack. Without these, critique stays superficial. They ship under a "Focus on:" carrier line as an enumerated list, so the dimensions read as directives once `ATTACK DIMENSIONS` is removed rather than as a bare heading over a list of nouns.
27
30
 
28
31
  **Common dimensions:**
29
32
  - **Assumptions**: What must be true for this to work? Attack each assumption.
@@ -34,71 +37,101 @@ Devil's Advocate Prompting instructs the AI to generate the strongest possible c
34
37
  - **Falsification criteria**: What evidence would prove this wrong?
35
38
 
36
39
  ### Severity Ranking (optional)
37
- **Purpose:** Rank identified weaknesses by how fatal they are. Separates show-stoppers from minor issues.
40
+ **Purpose:** Rank identified weaknesses by how fatal they are. Separates show-stoppers from minor issues. When included it ships as a closing instruction — "After the full attack, list the THREE MOST FATAL flaws…" — phrased as a sequenced directive so the "do this last" ordering survives the header being stripped.
38
41
 
39
42
  ## Template Structure
40
43
 
44
+ 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 sets the adversarial frame, and it ships with the prompt. `POSITION TO ATTACK` comes first so the document that follows reads as backing an already-stated claim; the `SUPPORTING MATERIAL` block is optional and self-deleting, and its bracketed contents and the carrier sentence beneath them both come out whenever the position is stated inline with no document behind it.
45
+
41
46
  ```
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].
47
+ You are a rigorous devil's advocate. Your task is NOT to give a balanced view —
48
+ your task is to generate the strongest possible case against the following position.
45
49
 
46
50
  POSITION TO ATTACK:
47
- [State the position, plan, or decision clearly]
51
+ [State the position, plan, decision, or proposal clearly]
52
+
53
+ SUPPORTING MATERIAL (optional):
54
+ [Optional — paste the proposal, design doc, strategy memo, or other document
55
+ that sets out this position here. If you have nothing to paste, delete this
56
+ bracketed block and the sentence below it.]
57
+ Treat the document above as the detailed source of the position's claims,
58
+ assumptions, and reasoning.
48
59
 
49
60
  ATTACK INSTRUCTIONS:
50
- - Do not offer a balanced view or acknowledge positives
61
+ - Do not acknowledge positives or offer a balanced view
51
62
  - Attack every assumption the position depends on
52
63
  - Identify every logical gap or unsupported claim
53
64
  - Surface every significant risk or failure mode
54
65
  - Point out what better alternatives are being ignored
55
- - Be as forceful and specific as possible — no vague objections
66
+ - Be as forceful and specific as possible
56
67
 
57
68
  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]
69
+ Focus on:
70
+ 1. Core assumptions (what must be true for this to work?)
71
+ 2. Internal logic (where does the reasoning break down?)
72
+ 3. Execution risks (what makes this fail in practice?)
73
+ 4. Overlooked alternatives (what better options exist?)
74
+ 5. [Add domain-specific dimensions as needed]
64
75
 
65
76
  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.
77
+ After the full attack, list the THREE MOST FATAL flaws — the ones that,
78
+ if unaddressed, would cause this to fail regardless of execution quality.
68
79
  ```
69
80
 
70
81
  ## Complete Examples
71
82
 
83
+ Every example below keeps the headers on the page for readability, but is written in emitted form beneath them: the opening instruction 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.
84
+
72
85
  ### Example 1: Architecture Decision
73
86
 
87
+ **Before Devil's Advocate:**
88
+ "Should we move to microservices?"
89
+
90
+ **After Devil's Advocate** (supporting material supplied):
74
91
  ```
75
- You are a rigorous devil's advocate.
92
+ You are a rigorous devil's advocate. Your task is NOT to give a balanced view —
93
+ your task is to generate the strongest possible case against the following position.
76
94
 
77
95
  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.
96
+ We should rewrite our monolithic Python backend as microservices. The motivation:
97
+ our deployment pipeline is slow, different teams want to deploy independently, and
98
+ we're seeing performance issues in the payments module.
99
+
100
+ SUPPORTING MATERIAL:
101
+ [Paste the migration RFC and the current deployment-pipeline metrics here]
102
+ Treat the document above as the detailed source of the position's claims,
103
+ assumptions, and reasoning.
82
104
 
83
105
  ATTACK INSTRUCTIONS:
84
- Generate the strongest possible case against this decision. Do not
85
- acknowledge any benefits. Attack the reasoning, assumptions, and plan.
106
+ - Do not acknowledge positives or offer a balanced view
107
+ - Attack every assumption the position depends on
108
+ - Identify every logical gap or unsupported claim
109
+ - Surface every significant risk or failure mode
110
+ - Point out what better alternatives are being ignored
111
+ - Be as forceful and specific as possible
86
112
 
87
113
  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
114
+ Focus on:
115
+ 1. Core assumptions about what microservices actually solve
116
+ 2. Organizational and team readiness
117
+ 3. The technical complexity being introduced
118
+ 4. Whether the stated problems actually require microservices
119
+ 5. Migration risks and the transition period
93
120
 
94
121
  SEVERITY RANKING:
95
- End with the 3 most fatal flaws that would cause this to fail.
122
+ After the full attack, list the THREE MOST FATAL flaws the ones that,
123
+ if unaddressed, would cause this to fail regardless of execution quality.
96
124
  ```
97
125
 
98
126
  ### Example 2: Business Strategy
99
127
 
128
+ **Before Devil's Advocate:**
129
+ "Is expanding to Europe a good idea?"
130
+
131
+ **After Devil's Advocate** (no supporting material — the position is stated inline, so the optional block and its carrier sentence are both deleted):
100
132
  ```
101
- You are a rigorous devil's advocate.
133
+ You are a rigorous devil's advocate. Your task is NOT to give a balanced view —
134
+ your task is to generate the strongest possible case against the following position.
102
135
 
103
136
  POSITION TO ATTACK:
104
137
  We should expand to the European market in Q3. We have strong US NPS (72),
@@ -106,48 +139,61 @@ product-market fit with SMBs, and three European companies have expressed
106
139
  interest. We'll hire a country manager in the UK and use them as a beachhead.
107
140
 
108
141
  ATTACK INSTRUCTIONS:
109
- Argue forcefully against this expansion strategy. Be specific use
110
- facts, numbers, and logic. No acknowledgment of positives.
142
+ - Do not acknowledge positives or offer a balanced view
143
+ - Attack every assumption the position depends on
144
+ - Identify every logical gap or unsupported claim
145
+ - Surface every significant risk or failure mode
146
+ - Point out what better alternatives are being ignored
147
+ - Be as forceful and specific as possible
111
148
 
112
149
  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
150
+ Focus on:
151
+ 1. Whether inbound interest indicates real market demand
152
+ 2. Resource and runway requirements versus what's being allocated
153
+ 3. The UK-as-beachhead strategy for EU expansion
154
+ 4. Timing relative to the current US growth trajectory
155
+ 5. GDPR, data residency, and regulatory readiness
118
156
 
119
157
  SEVERITY RANKING:
120
- The 3 most fatal flaws, in order.
158
+ After the full attack, list the THREE MOST FATAL flaws the ones that,
159
+ if unaddressed, would cause this to fail regardless of execution quality.
121
160
  ```
122
161
 
123
162
  ### Example 3: Product Decision
124
163
 
164
+ **Before Devil's Advocate:**
165
+ "Should we build a mobile app?"
166
+
167
+ **After Devil's Advocate** (supporting material supplied; severity ranking omitted — the opening paragraph already carries the adversarial frame, so a leaner variant still stands):
125
168
  ```
126
- You are a rigorous devil's advocate.
169
+ You are a rigorous devil's advocate. Your task is NOT to give a balanced view —
170
+ your task is to generate the strongest possible case against the following position.
127
171
 
128
172
  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.
173
+ We should add a native mobile app to our web SaaS product. Our top users are asking
174
+ for it, mobile usage of similar tools is growing, and a competitor just launched one.
132
175
 
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
176
+ SUPPORTING MATERIAL:
177
+ [Paste the product one-pager and the top-user feature requests here]
178
+ Treat the document above as the detailed source of the position's claims,
179
+ assumptions, and reasoning.
139
180
 
140
- SEVERITY RANKING:
141
- 3 most fatal flaws.
181
+ ATTACK DIMENSIONS:
182
+ Focus on:
183
+ 1. Whether "top users asking" is representative demand
184
+ 2. Resource cost versus ROI for a 4-person engineering team
185
+ 3. Whether mobile actually expands the TAM or just cannibalizes web
186
+ 4. The competitor's mobile launch as a signal versus noise
187
+ 5. What is given up by doing this instead of something else
142
188
  ```
143
189
 
144
190
  ### Example 4: Self-Attack (Devil's Advocate on AI Output)
145
191
 
146
- After receiving any AI recommendation:
192
+ This one needs no template. It is a follow-up turn pasted after any AI recommendation, and "your own recommendation above" points at that prior output — which is the source material, already in place:
147
193
  ```
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.
194
+ Now argue forcefully against your own recommendation above. What are the
195
+ strongest reasons it's wrong? What did you overlook? What assumptions did
196
+ you make that may not hold? Be as critical as possible.
151
197
  ```
152
198
 
153
199
  ## Best Use Cases
@@ -200,7 +246,8 @@ assumptions did you make that may not hold? Be as critical as possible.
200
246
 
201
247
  | Component | Purpose |
202
248
  |-----------|---------|
203
- | Position Statement | What to attack |
249
+ | Position Statement | What to attack, stated as complete sentences |
250
+ | Supporting Material | Optional document behind the position; self-deleting |
204
251
  | Adversarial Instruction | Be forceful, not balanced |
205
252
  | Attack Dimensions | What aspects to critique |
206
253
  | Severity Ranking | The 3 most fatal flaws |