@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,242 +1,242 @@
1
- # BAB Framework
2
-
3
- ## Overview
4
-
5
- BAB (Before, After, Bridge) is a transformation-focused framework ideal for rewrite, refactor, and conversion tasks. It explicitly defines the current state, the desired state, and asks for the path between them. Nothing in the standard framework set handles "change this into that" as cleanly as BAB.
6
-
7
- ## Components
8
-
9
- ### B - Before
10
- **Purpose:** Describe the current state — what exists now, what's wrong with it, or what needs to change.
11
-
12
- **Questions to Ask:**
13
- - What is the current state?
14
- - What problem does it have?
15
- - What are the limitations?
16
- - What does it look like right now?
17
-
18
- **Examples:**
19
- - "This function uses nested callbacks and is difficult to read..."
20
- - "Our homepage copy is written for developers, not customers..."
21
- - "This README is disorganized with no clear structure..."
22
-
23
- ### A - After
24
- **Purpose:** Describe the desired end state — what it should look like once the transformation is complete.
25
-
26
- **Questions to Ask:**
27
- - What should the result look like?
28
- - What qualities should it have?
29
- - What problems should be solved?
30
- - What does success look like?
31
-
32
- **Examples:**
33
- - "...should use async/await and be readable by a junior developer"
34
- - "...should speak to non-technical buyers who care about outcomes"
35
- - "...should have a clear structure with quick start and API docs sections"
36
-
37
- ### B - Bridge
38
- **Purpose:** Describe how to get from Before to After — the approach, constraints, and rules for the transformation.
39
-
40
- **Questions to Ask:**
41
- - What rules govern the transformation?
42
- - What must be preserved?
43
- - What should be changed vs. left alone?
44
- - Any constraints on approach?
45
-
46
- **Examples:**
47
- - "Preserve all existing functionality, only change syntax"
48
- - "Keep the same information but reframe for a non-technical audience"
49
- - "Maintain existing section content, just restructure the order and add missing sections"
50
-
51
- ## Template Structure
52
-
53
- ```
54
- BEFORE:
55
- [Current state — what exists, what's wrong, what needs to change]
56
-
57
- AFTER:
58
- [Desired state — what it should look like, qualities it should have]
59
-
60
- BRIDGE:
61
- [How to get there — transformation rules, constraints, what to preserve]
62
- ```
63
-
64
- ## Complete Examples
65
-
66
- ### Example 1: Code Refactoring
67
-
68
- **Before BAB:**
69
- "Refactor this code."
70
-
71
- **After BAB:**
72
- ```
73
- BEFORE:
74
- This JavaScript function uses nested callbacks (callback hell) and is difficult
75
- to read, test, and maintain. It fetches user data, then fetches their orders,
76
- then fetches order details — all nested three levels deep.
77
-
78
- AFTER:
79
- The same logic implemented using async/await with proper error handling. Should
80
- be readable by a junior developer who is comfortable with ES6+ but unfamiliar
81
- with Promises. Each step should be clearly separated and independently testable.
82
-
83
- BRIDGE:
84
- - Preserve all existing functionality and API call structure
85
- - Replace only the async pattern (callbacks → async/await)
86
- - Add try/catch error handling at the top level
87
- - Do not change variable names or data structures
88
- - Add inline comments explaining the flow
89
- ```
90
-
91
- ### Example 2: Copy Rewrite
92
-
93
- **Before BAB:**
94
- "Rewrite our landing page."
95
-
96
- **After BAB:**
97
- ```
98
- BEFORE:
99
- Our current homepage headline reads: "A robust, scalable event-driven
100
- microservices orchestration platform." It was written by engineers for
101
- engineers. Conversion rate is poor because our actual buyers are non-technical
102
- operations managers.
103
-
104
- AFTER:
105
- A headline and 3-sentence description that immediately communicates business
106
- value to an operations manager. Should answer "what problem does this solve
107
- for me?" within the first 10 words. Should not use any technical jargon.
108
-
109
- BRIDGE:
110
- - Keep the core value proposition (automation, reliability, scale)
111
- - Replace technical terms with business outcomes
112
- - Use active voice and plain language
113
- - Tone: confident, clear, outcome-focused
114
- - Length: headline (8 words max) + 2-3 supporting sentences
115
- ```
116
-
117
- ### Example 3: Documentation Restructure
118
-
119
- **Before BAB:**
120
- "Fix our README."
121
-
122
- **After BAB:**
123
- ```
124
- BEFORE:
125
- Our README starts with a 500-word technical architecture explanation. New
126
- contributors can't find the quick start. There is no installation section —
127
- setup instructions are buried in a wiki link. The API docs section is empty.
128
-
129
- AFTER:
130
- A README that a new contributor can use to be productive within 15 minutes.
131
- Clear sections, scannable with headers, quick start in the first screen.
132
-
133
- BRIDGE:
134
- - Keep all existing content (do not delete information, only reorganize)
135
- - Reorder sections: Overview → Quick Start → Installation → Usage → API → Contributing
136
- - Move architecture explanation to a collapsible section or link to wiki
137
- - Add a minimal API docs skeleton with TODO placeholders
138
- - Add a table of contents at the top
139
- ```
140
-
141
- ### Example 4: Tone Transformation
142
-
143
- **Before BAB:**
144
- "Make this email sound better."
145
-
146
- **After BAB:**
147
- ```
148
- BEFORE:
149
- This customer complaint response sounds defensive and shifts blame to the
150
- customer. It uses passive voice and doesn't offer a clear resolution path.
151
-
152
- AFTER:
153
- A response that acknowledges the problem, takes responsibility, and gives the
154
- customer a clear next step. Should feel warm, professional, and solution-focused.
155
-
156
- BRIDGE:
157
- - Keep the factual information (what happened, timeline)
158
- - Remove defensive language and blame shifting
159
- - Add an explicit apology in the first sentence
160
- - End with a single, specific action item the customer should take
161
- - Tone: empathetic but professional, not overly apologetic
162
- - Length: match original (under 150 words)
163
- ```
164
-
165
- ## Best Use Cases
166
-
167
- 1. **Code Transformations**
168
- - Refactoring (callbacks → async/await, class → functional, etc.)
169
- - Language migration
170
- - Pattern replacement (e.g., raw SQL → ORM)
171
-
172
- 2. **Content Rewrites**
173
- - Tone changes (technical → business-friendly)
174
- - Audience shifts (developers → executives)
175
- - Style changes (formal → casual)
176
-
177
- 3. **Document Restructuring**
178
- - README reorganization
179
- - Proposal reformatting
180
- - Report restructuring
181
-
182
- 4. **Version Upgrades**
183
- - API migration guides
184
- - Framework upgrades
185
- - Standard/spec changes
186
-
187
- 5. **Communication Transforms**
188
- - Email tone adjustments
189
- - Feedback softening
190
- - Stakeholder translation
191
-
192
- ## Selection Criteria
193
-
194
- **Choose BAB when:**
195
- - ✅ You have existing content that needs transformation
196
- - ✅ There is a clear current state and desired state
197
- - ✅ Rules for transformation need to be explicit
198
- - ✅ Something must be preserved while something else changes
199
- - ✅ The task is "change this into that"
200
-
201
- **Avoid BAB when:**
202
- - ❌ Creating from scratch (no "before" exists) → use CO-STAR, RISEN, or RTF
203
- - ❌ Reasoning through a problem → use Chain of Thought
204
- - ❌ Need to specify audience, tone, style in detail → use CO-STAR
205
- - ❌ Complex multi-step process → use RISEN
206
-
207
- ## Common Mistakes
208
-
209
- 1. **Vague Before**
210
- - Include specific details about current problems, not just "it's bad"
211
- - Quote actual content when possible
212
-
213
- 2. **Vague After**
214
- - Define success criteria explicitly
215
- - Include the audience/consumer of the result
216
-
217
- 3. **Missing Bridge Rules**
218
- - Always specify what must be preserved
219
- - Define constraints on the transformation approach
220
- - State what should NOT change
221
-
222
- 4. **Using BAB for Net-New Creation**
223
- - If there's no "before", use a different framework
224
- - BAB requires something to transform
225
-
226
- ## Quick Reference
227
-
228
- | Component | Focus | Key Question |
229
- |-----------|-------|--------------|
230
- | Before | Current state | "What exists now / what's wrong?" |
231
- | After | Desired state | "What should it become?" |
232
- | Bridge | Transformation rules | "How do we get there?" |
233
-
234
- ## BAB vs. Other Frameworks
235
-
236
- | Situation | Framework |
237
- |---|---|
238
- | Transform existing content | **BAB** |
239
- | Create from scratch for an audience | CO-STAR |
240
- | Simple task, no transformation | RTF / CTF |
241
- | Multi-step process | RISEN |
242
- | Reasoning through a problem | Chain of Thought |
1
+ # BAB Framework
2
+
3
+ ## Overview
4
+
5
+ BAB (Before, After, Bridge) is a transformation-focused framework ideal for rewrite, refactor, and conversion tasks. It explicitly defines the current state, the desired state, and asks for the path between them. Nothing in the standard framework set handles "change this into that" as cleanly as BAB.
6
+
7
+ ## Components
8
+
9
+ ### B - Before
10
+ **Purpose:** Describe the current state — what exists now, what's wrong with it, or what needs to change.
11
+
12
+ **Questions to Ask:**
13
+ - What is the current state?
14
+ - What problem does it have?
15
+ - What are the limitations?
16
+ - What does it look like right now?
17
+
18
+ **Examples:**
19
+ - "This function uses nested callbacks and is difficult to read..."
20
+ - "Our homepage copy is written for developers, not customers..."
21
+ - "This README is disorganized with no clear structure..."
22
+
23
+ ### A - After
24
+ **Purpose:** Describe the desired end state — what it should look like once the transformation is complete.
25
+
26
+ **Questions to Ask:**
27
+ - What should the result look like?
28
+ - What qualities should it have?
29
+ - What problems should be solved?
30
+ - What does success look like?
31
+
32
+ **Examples:**
33
+ - "...should use async/await and be readable by a junior developer"
34
+ - "...should speak to non-technical buyers who care about outcomes"
35
+ - "...should have a clear structure with quick start and API docs sections"
36
+
37
+ ### B - Bridge
38
+ **Purpose:** Describe how to get from Before to After — the approach, constraints, and rules for the transformation.
39
+
40
+ **Questions to Ask:**
41
+ - What rules govern the transformation?
42
+ - What must be preserved?
43
+ - What should be changed vs. left alone?
44
+ - Any constraints on approach?
45
+
46
+ **Examples:**
47
+ - "Preserve all existing functionality, only change syntax"
48
+ - "Keep the same information but reframe for a non-technical audience"
49
+ - "Maintain existing section content, just restructure the order and add missing sections"
50
+
51
+ ## Template Structure
52
+
53
+ ```
54
+ BEFORE:
55
+ [Current state — what exists, what's wrong, what needs to change]
56
+
57
+ AFTER:
58
+ [Desired state — what it should look like, qualities it should have]
59
+
60
+ BRIDGE:
61
+ [How to get there — transformation rules, constraints, what to preserve]
62
+ ```
63
+
64
+ ## Complete Examples
65
+
66
+ ### Example 1: Code Refactoring
67
+
68
+ **Before BAB:**
69
+ "Refactor this code."
70
+
71
+ **After BAB:**
72
+ ```
73
+ BEFORE:
74
+ This JavaScript function uses nested callbacks (callback hell) and is difficult
75
+ to read, test, and maintain. It fetches user data, then fetches their orders,
76
+ then fetches order details — all nested three levels deep.
77
+
78
+ AFTER:
79
+ The same logic implemented using async/await with proper error handling. Should
80
+ be readable by a junior developer who is comfortable with ES6+ but unfamiliar
81
+ with Promises. Each step should be clearly separated and independently testable.
82
+
83
+ BRIDGE:
84
+ - Preserve all existing functionality and API call structure
85
+ - Replace only the async pattern (callbacks → async/await)
86
+ - Add try/catch error handling at the top level
87
+ - Do not change variable names or data structures
88
+ - Add inline comments explaining the flow
89
+ ```
90
+
91
+ ### Example 2: Copy Rewrite
92
+
93
+ **Before BAB:**
94
+ "Rewrite our landing page."
95
+
96
+ **After BAB:**
97
+ ```
98
+ BEFORE:
99
+ Our current homepage headline reads: "A robust, scalable event-driven
100
+ microservices orchestration platform." It was written by engineers for
101
+ engineers. Conversion rate is poor because our actual buyers are non-technical
102
+ operations managers.
103
+
104
+ AFTER:
105
+ A headline and 3-sentence description that immediately communicates business
106
+ value to an operations manager. Should answer "what problem does this solve
107
+ for me?" within the first 10 words. Should not use any technical jargon.
108
+
109
+ BRIDGE:
110
+ - Keep the core value proposition (automation, reliability, scale)
111
+ - Replace technical terms with business outcomes
112
+ - Use active voice and plain language
113
+ - Tone: confident, clear, outcome-focused
114
+ - Length: headline (8 words max) + 2-3 supporting sentences
115
+ ```
116
+
117
+ ### Example 3: Documentation Restructure
118
+
119
+ **Before BAB:**
120
+ "Fix our README."
121
+
122
+ **After BAB:**
123
+ ```
124
+ BEFORE:
125
+ Our README starts with a 500-word technical architecture explanation. New
126
+ contributors can't find the quick start. There is no installation section —
127
+ setup instructions are buried in a wiki link. The API docs section is empty.
128
+
129
+ AFTER:
130
+ A README that a new contributor can use to be productive within 15 minutes.
131
+ Clear sections, scannable with headers, quick start in the first screen.
132
+
133
+ BRIDGE:
134
+ - Keep all existing content (do not delete information, only reorganize)
135
+ - Reorder sections: Overview → Quick Start → Installation → Usage → API → Contributing
136
+ - Move architecture explanation to a collapsible section or link to wiki
137
+ - Add a minimal API docs skeleton with TODO placeholders
138
+ - Add a table of contents at the top
139
+ ```
140
+
141
+ ### Example 4: Tone Transformation
142
+
143
+ **Before BAB:**
144
+ "Make this email sound better."
145
+
146
+ **After BAB:**
147
+ ```
148
+ BEFORE:
149
+ This customer complaint response sounds defensive and shifts blame to the
150
+ customer. It uses passive voice and doesn't offer a clear resolution path.
151
+
152
+ AFTER:
153
+ A response that acknowledges the problem, takes responsibility, and gives the
154
+ customer a clear next step. Should feel warm, professional, and solution-focused.
155
+
156
+ BRIDGE:
157
+ - Keep the factual information (what happened, timeline)
158
+ - Remove defensive language and blame shifting
159
+ - Add an explicit apology in the first sentence
160
+ - End with a single, specific action item the customer should take
161
+ - Tone: empathetic but professional, not overly apologetic
162
+ - Length: match original (under 150 words)
163
+ ```
164
+
165
+ ## Best Use Cases
166
+
167
+ 1. **Code Transformations**
168
+ - Refactoring (callbacks → async/await, class → functional, etc.)
169
+ - Language migration
170
+ - Pattern replacement (e.g., raw SQL → ORM)
171
+
172
+ 2. **Content Rewrites**
173
+ - Tone changes (technical → business-friendly)
174
+ - Audience shifts (developers → executives)
175
+ - Style changes (formal → casual)
176
+
177
+ 3. **Document Restructuring**
178
+ - README reorganization
179
+ - Proposal reformatting
180
+ - Report restructuring
181
+
182
+ 4. **Version Upgrades**
183
+ - API migration guides
184
+ - Framework upgrades
185
+ - Standard/spec changes
186
+
187
+ 5. **Communication Transforms**
188
+ - Email tone adjustments
189
+ - Feedback softening
190
+ - Stakeholder translation
191
+
192
+ ## Selection Criteria
193
+
194
+ **Choose BAB when:**
195
+ - ✅ You have existing content that needs transformation
196
+ - ✅ There is a clear current state and desired state
197
+ - ✅ Rules for transformation need to be explicit
198
+ - ✅ Something must be preserved while something else changes
199
+ - ✅ The task is "change this into that"
200
+
201
+ **Avoid BAB when:**
202
+ - ❌ Creating from scratch (no "before" exists) → use CO-STAR, RISEN, or RTF
203
+ - ❌ Reasoning through a problem → use Chain of Thought
204
+ - ❌ Need to specify audience, tone, style in detail → use CO-STAR
205
+ - ❌ Complex multi-step process → use RISEN
206
+
207
+ ## Common Mistakes
208
+
209
+ 1. **Vague Before**
210
+ - Include specific details about current problems, not just "it's bad"
211
+ - Quote actual content when possible
212
+
213
+ 2. **Vague After**
214
+ - Define success criteria explicitly
215
+ - Include the audience/consumer of the result
216
+
217
+ 3. **Missing Bridge Rules**
218
+ - Always specify what must be preserved
219
+ - Define constraints on the transformation approach
220
+ - State what should NOT change
221
+
222
+ 4. **Using BAB for Net-New Creation**
223
+ - If there's no "before", use a different framework
224
+ - BAB requires something to transform
225
+
226
+ ## Quick Reference
227
+
228
+ | Component | Focus | Key Question |
229
+ |-----------|-------|--------------|
230
+ | Before | Current state | "What exists now / what's wrong?" |
231
+ | After | Desired state | "What should it become?" |
232
+ | Bridge | Transformation rules | "How do we get there?" |
233
+
234
+ ## BAB vs. Other Frameworks
235
+
236
+ | Situation | Framework |
237
+ |---|---|
238
+ | Transform existing content | **BAB** |
239
+ | Create from scratch for an audience | CO-STAR |
240
+ | Simple task, no transformation | RTF / CTF |
241
+ | Multi-step process | RISEN |
242
+ | Reasoning through a problem | Chain of Thought |