@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
@@ -4,7 +4,9 @@
4
4
 
5
5
  BROKE (Background, Role, Objective, Key Results, Evolve) is a business-oriented prompt framework that combines OKR-style measurable outcomes with a built-in self-improvement loop. Its defining feature — the **Evolve** step — instructs the AI to critique its own output and suggest 3 ways to improve it, turning a single prompt into a structured iteration cycle without requiring manual re-prompting.
6
6
 
7
- **Origin:** Community/practitioner framework (documented at myframework.net and in educational AI research). Cited in peer-reviewed educational technology research (Springer, 2025). Widely adopted in business and marketing AI workflows.
7
+ **Origin:** Community/practitioner framework, documented at myframework.net. Practitioner framework no controlled evaluation of BROKE has been published.
8
+
9
+ *Correction:* an earlier version of this file stated that BROKE was "Cited in peer-reviewed educational technology research (Springer, 2025)" and "widely adopted in business and marketing AI workflows." The first named no title, author, or DOI and was not checkable as written; the second was an unsupported adoption claim. Both have been removed.
8
10
 
9
11
  ## Components
10
12
 
@@ -44,18 +46,27 @@ BROKE (Background, Role, Objective, Key Results, Evolve) is a business-oriented
44
46
  - "Create a set of 10 FAQ entries covering the most common support topics..."
45
47
 
46
48
  ### K — Key Results
47
- **Purpose:** Define measurable outcomes that the output should help achieve. This is the OKR element — it sets a business success bar, not just a quality bar.
49
+
50
+ **Purpose:** Define measurable *business* outcomes the output should help achieve — a business success bar, not only a quality bar. This is the reading BROKE is routed on in this package, and it is what the template's `KEY RESULTS` slot holds.
51
+
52
+ **Source reading, and how this package splits it.** The source framework at myframework.net glosses K as the key result of the *answer* — a specification of what the response must contain and what form it must take. This package does not discard that reading; it carries it in a separate slot. `broke_template.txt` holds response-shape requirements in `OUTPUT FORMAT` (placed immediately after `OBJECTIVE`) and business outcomes in `KEY RESULTS`. Both readings are implemented; they simply live in different slots, because a single slot holding both produced templates that specified neither well.
53
+
54
+ *Correction:* an earlier version of this file gave the business-KPI reading alone — "Define measurable outcomes that the output should help achieve. This is the OKR element" — and presented it as the source framework's own definition of K, with no note that it diverged. It does diverge: myframework.net's gloss of K is the key result of the answer, i.e. a specification of the response itself. The divergence is now disclosed rather than silent, and the discarded half is implemented as `OUTPUT FORMAT`. Caveat on this correction's evidence: myframework.net is a practitioner site with no versioning or archival copy, and the gloss above is a paraphrase of a short entry rather than a quotation from a stable document. Treat the split as this package's disclosed design choice, not as a settled reading of the source.
48
55
 
49
56
  **Questions to Ask:**
50
- - What measurable outcome should this drive?
51
- - How will we know this worked?
52
- - What metric should improve?
57
+ - What measurable business outcome should this drive?
58
+ - What metric should improve, and how will we know this worked?
59
+ - *(feeds `OUTPUT FORMAT`)* What must the response itself contain, and in what form, length, and depth?
53
60
 
54
- **Examples:**
61
+ **Examples — business outcome (`KEY RESULTS`):**
55
62
  - "Key result: reduce average sales cycle from 90 to 60 days within one quarter"
56
63
  - "Key result: reduce repeat tickets by 30% within 60 days of publishing"
57
64
  - "Key result: increase trial-to-paid conversion from 12% to 18%"
58
65
 
66
+ **Examples — answer specification (`OUTPUT FORMAT`):**
67
+ - "Rank the top 3 friction points, with supporting evidence and a proposed fix for each"
68
+ - "Cover all 10 topics, one FAQ entry each, in question-and-answer form"
69
+
59
70
  ### E — Evolve
60
71
  **Purpose:** After completing the task, the AI provides 3 specific suggestions for improving the output or the prompt itself. This creates a self-improving loop.
61
72
 
@@ -69,58 +80,110 @@ BROKE (Background, Role, Objective, Key Results, Evolve) is a business-oriented
69
80
 
70
81
  ## Template Structure
71
82
 
83
+ 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.
84
+
72
85
  ```
86
+ This is a business task with a defined success bar. Everything below describes one
87
+ deliverable.
88
+
89
+ SOURCE MATERIAL:
90
+ [Optional — paste the material this task works from here, named specifically: the current
91
+ process document, the performance data, the existing draft. If you have nothing to paste,
92
+ delete this bracketed block along with the sentence directly below it.]
93
+ Use the material above as the factual basis for the work described below.
94
+
73
95
  BACKGROUND:
74
- [Current situation, why this task exists, relevant constraints and history]
96
+ Here is the situation this task arises from:
97
+ [Describe the current state as narrative prose: what the organization is, what is
98
+ happening now, and why this task exists. Add prior attempts and constraints only where the
99
+ user supplied them; never invent them.]
75
100
 
76
101
  ROLE:
77
- [Professional persona and expertise to embody]
102
+ Take on this professional persona for the work:
103
+ [One second-person sentence beginning "You are…", naming the domain expertise and level of
104
+ experience this task requires.]
78
105
 
79
106
  OBJECTIVE:
80
- [The specific task and deliverable]
107
+ Your task is to do the following:
108
+ [One imperative sentence naming what to analyze or produce and what the finished artifact
109
+ is.]
110
+
111
+ OUTPUT FORMAT:
112
+ Deliver your response in this shape:
113
+ [Name the sections the response should contain, its approximate length or item count, and
114
+ how much supporting detail each part carries.]
81
115
 
82
116
  KEY RESULTS:
83
- [Measurable outcomes this output should help achieve how success is defined]
117
+ Your response will be judged on whether it can plausibly move the measurable outcomes
118
+ below. They are the success bar, not tasks to carry out:
119
+ [List each outcome as a statement naming the metric and its target. Add a baseline or time
120
+ frame only where the user gave one; never invent one — write "[you fill this in: current
121
+ value of <metric>]" instead.]
84
122
 
85
123
  EVOLVE:
86
- After completing your response, provide 3 specific suggestions for improving
87
- this output or approach in a follow-up iteration.
124
+ After completing your response, provide 3 specific suggestions for improving this output
125
+ or approach in a follow-up iteration.
88
126
  ```
89
127
 
128
+ `OUTPUT FORMAT` is a sixth element in a five-letter acronym. It exists because this package reads K as a business success bar (see the K component above), which leaves the deliverable's shape unspecified. It sits between `OBJECTIVE` and `KEY RESULTS` so that the response's shape is fixed before the metrics appear — which keeps the metrics readable as an evaluation bar for an already-defined artifact rather than as a second set of tasks.
129
+
90
130
  ## Complete Examples
91
131
 
132
+ Every example below is shown in emitted form: the framing sentence first, then each
133
+ slot carrying its own role in prose. Read the headers as scaffolding that will be
134
+ deleted — the examples are written so that nothing is lost when it is.
135
+
92
136
  ### Example 1: Sales Process Improvement
93
137
 
94
138
  **Before BROKE:**
95
139
  "Help us improve our sales process."
96
140
 
97
- **After BROKE:**
141
+ **After BROKE** (source material supplied):
98
142
  ```
143
+ This is a business task with a defined success bar. Everything below describes one
144
+ deliverable.
145
+
146
+ SOURCE MATERIAL:
147
+ [Paste the CRM stage-duration export for the last two quarters here]
148
+ Use the material above as the factual basis for the work described below.
149
+
99
150
  BACKGROUND:
100
- We're a B2B SaaS company (40 employees, $3M ARR) selling to mid-market
101
- operations teams. Our average deal size is $24K ARR. Sales cycle has
102
- lengthened from 45 days to 90 days over the last 2 quarters. Win rate
103
- has held steady at 28% so the issue isn't qualification it's cycle time.
104
- Primary bottleneck appears to be the "legal review" stage, which now
105
- averages 35 days after verbal agreement.
151
+ Here is the situation this task arises from:
152
+ We are a B2B SaaS company of 40 employees at $3M ARR, selling to mid-market
153
+ operations teams at an average deal size of $24K ARR. Our sales cycle has
154
+ lengthened from 45 days to 90 days over the last two quarters. Win rate has held
155
+ steady at 28%, so the problem is not qualification — it is cycle time. The primary
156
+ bottleneck appears to be the legal review stage, which now averages 35 days after
157
+ verbal agreement.
106
158
 
107
159
  ROLE:
108
- You are an experienced enterprise SaaS sales consultant who specializes
109
- in deal velocity and reducing friction in the close process.
160
+ Take on this professional persona for the work:
161
+ You are an experienced enterprise SaaS sales consultant who specializes in deal
162
+ velocity and in removing friction from the close process.
110
163
 
111
164
  OBJECTIVE:
112
- Identify the root causes of the 35-day legal review bottleneck and
113
- provide a prioritized action plan to reduce it.
165
+ Your task is to do the following:
166
+ Identify the root causes of the 35-day legal review bottleneck and produce a
167
+ prioritized action plan for reducing it.
168
+
169
+ OUTPUT FORMAT:
170
+ Deliver your response in this shape:
171
+ Open with a ranked list of root causes, each stated in one sentence with the
172
+ evidence from the material above that supports it. Follow with an action plan of
173
+ five to eight items ordered by expected impact, giving each item an owning role, an
174
+ effort estimate, and the root cause it addresses. Close with a short paragraph
175
+ naming which causes the supplied data cannot settle.
114
176
 
115
177
  KEY RESULTS:
116
- - Reduce legal review stage from 35 days to 15 days within 2 quarters
117
- - Increase overall win rate from 28% to 32% by removing friction at close
118
- - Reduce sales rep time spent on legal coordination by 50%
178
+ Your response will be judged on whether it can plausibly move the measurable outcomes
179
+ below. They are the success bar, not tasks to carry out:
180
+ - Reduce the legal review stage from 35 days to 15 days within 2 quarters.
181
+ - Increase overall win rate from 28% to 32% by removing friction at close.
182
+ - Reduce sales rep time spent on legal coordination by 50%.
119
183
 
120
184
  EVOLVE:
121
- After your response, provide 3 suggestions for how this analysis or
122
- action plan could be improved with additional information or a different
123
- approach.
185
+ After completing your response, provide 3 specific suggestions for improving this
186
+ analysis or action plan in a follow-up iteration.
124
187
  ```
125
188
 
126
189
  ### Example 2: Content Strategy
@@ -128,30 +191,46 @@ approach.
128
191
  **Before BROKE:**
129
192
  "Create a content plan for our blog."
130
193
 
131
- **After BROKE:**
194
+ **After BROKE** (no source material — the calendar is generated from scratch, so the
195
+ `SOURCE MATERIAL` block and the sentence below it are both deleted):
132
196
  ```
197
+ This is a business task with a defined success bar. Everything below describes one
198
+ deliverable.
199
+
133
200
  BACKGROUND:
134
- We are a developer tools company (open-source project management for engineers).
135
- Our blog currently publishes 2 posts/month with low organic traffic (500
136
- visits/month). Competitors publish 8-12 posts/month and dominate searches for
137
- our core keywords. Our DevRel team has capacity for 4 posts/month.
201
+ Here is the situation this task arises from:
202
+ We are a developer tools company building open-source project management for
203
+ engineers. Our blog currently publishes 2 posts per month and draws about 500
204
+ organic visits per month. Competitors publish 8 to 12 posts per month and dominate
205
+ search for our core keywords. Our DevRel team has capacity for 4 posts per month.
138
206
 
139
207
  ROLE:
140
- You are a content strategist specializing in developer-focused technical
141
- content marketing and SEO.
208
+ Take on this professional persona for the work:
209
+ You are a content strategist who specializes in developer-focused technical content
210
+ marketing and technical SEO.
142
211
 
143
212
  OBJECTIVE:
144
- Create a 3-month content calendar targeting keywords with real traffic
145
- potential and aligned with our product's value proposition.
213
+ Your task is to do the following:
214
+ Create a 3-month content calendar targeting keywords with real traffic potential
215
+ and aligned with our product's value proposition.
216
+
217
+ OUTPUT FORMAT:
218
+ Deliver your response in this shape:
219
+ Produce a month-by-month calendar of 12 posts, 4 per month. Give each post a
220
+ working title, its target keyword, the search intent it serves, the funnel stage it
221
+ belongs to, and a two-sentence summary of the angle. Follow the calendar with a
222
+ short section explaining the sequencing logic across the three months.
146
223
 
147
224
  KEY RESULTS:
148
- - Increase organic blog traffic from 500 to 2,000 visits/month in 3 months
149
- - Generate 50+ qualified leads from content monthly by month 4
150
- - Rank on page 1 for at least 5 target keywords within 6 months
225
+ Your response will be judged on whether it can plausibly move the measurable outcomes
226
+ below. They are the success bar, not tasks to carry out:
227
+ - Increase organic blog traffic from 500 to 2,000 visits per month within 3 months.
228
+ - Generate 50 or more qualified leads from content per month by month 4.
229
+ - Rank on page 1 for at least 5 target keywords within 6 months.
151
230
 
152
231
  EVOLVE:
153
- After your content calendar, suggest 3 improvements either to the
154
- plan itself or additional information that would make it more effective.
232
+ After completing your calendar, provide 3 specific suggestions for improving this
233
+ plan, or name the additional information that would make it more effective.
155
234
  ```
156
235
 
157
236
  ### Example 3: Team Process
@@ -159,30 +238,50 @@ plan itself or additional information that would make it more effective.
159
238
  **Before BROKE:**
160
239
  "How should we run better sprint retrospectives?"
161
240
 
162
- **After BROKE:**
241
+ **After BROKE** (source material supplied):
163
242
  ```
243
+ This is a business task with a defined success bar. Everything below describes one
244
+ deliverable.
245
+
246
+ SOURCE MATERIAL:
247
+ [Paste the notes and action-item lists from the last 4 retrospectives here]
248
+ Use the material above as the factual basis for the work described below.
249
+
164
250
  BACKGROUND:
251
+ Here is the situation this task arises from:
165
252
  Our 8-person engineering team has been running 2-week sprints for 6 months.
166
- Retrospectives currently take 45 minutes and follow Start/Stop/Continue.
167
- Team feedback: retros feel repetitive, same issues come up every sprint,
168
- no visible follow-through on action items between retros.
253
+ Retrospectives currently take 45 minutes and follow a Start/Stop/Continue format.
254
+ The team reports that retros feel repetitive, that the same issues resurface every
255
+ sprint, and that there is no visible follow-through on action items between retros.
169
256
 
170
257
  ROLE:
171
- You are an experienced Agile coach who has worked with engineering teams
172
- at growth-stage startups.
258
+ Take on this professional persona for the work:
259
+ You are an experienced Agile coach who has worked with engineering teams at
260
+ growth-stage startups.
173
261
 
174
262
  OBJECTIVE:
175
- Redesign our retrospective format and process to make action items
176
- stick and prevent the same issues from recurring.
263
+ Your task is to do the following:
264
+ Redesign our retrospective format and the process around it so that action items
265
+ stick and the same issues stop recurring.
266
+
267
+ OUTPUT FORMAT:
268
+ Deliver your response in this shape:
269
+ Begin with a short diagnosis of why the current format is recycling issues, citing
270
+ specific patterns from the retro notes above. Then give the redesigned format as a
271
+ timeboxed agenda totalling 45 minutes or less. Then describe the between-retro
272
+ follow-through process, naming who owns each step. Close with the first three
273
+ changes to make and the order to make them in.
177
274
 
178
275
  KEY RESULTS:
179
- - Reduce repeat items in retros by 70% within 2 months
180
- - At least 80% of action items closed before next retro
181
- - Team satisfaction with retros (currently 5/10) above 7.5/10 by month 2
276
+ Your response will be judged on whether it can plausibly move the measurable outcomes
277
+ below. They are the success bar, not tasks to carry out:
278
+ - Reduce repeat items across retros by 70% within 2 months.
279
+ - Close at least 80% of action items before the next retro.
280
+ - Raise team satisfaction with retros from 5/10 to above 7.5/10 by month 2.
182
281
 
183
282
  EVOLVE:
184
- After your recommendations, provide 3 things you would need to know
185
- to make this advice more specific or likely to succeed.
283
+ After completing your recommendations, provide 3 specific things you would need to
284
+ know to make this advice more specific or more likely to succeed.
186
285
  ```
187
286
 
188
287
  ## Best Use Cases
@@ -238,5 +337,6 @@ to make this advice more specific or likely to succeed.
238
337
  | Background | Situation | "What's the context and history?" |
239
338
  | Role | Expertise | "Who should do this?" |
240
339
  | Objective | Task | "What needs to be delivered?" |
241
- | Key Results | Success metrics | "How will we measure success?" |
340
+ | Output Format | Response shape | "What structure, length, and depth does the answer need?" |
341
+ | Key Results | Business success metrics | "What metric should this move, and by how much?" |
242
342
  | Evolve | Self-improvement | "How can this be better?" |