@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,12 +2,14 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- APE (Action, Purpose, Expectation) is the most minimal structured prompt framework — even simpler than RTF or CTF. It is designed for ultra-quick, single-sentence or two-sentence prompts where adding more structure would be overkill. APE answers three essential questions in the fewest possible words: what to do, why it matters, and what success looks like.
5
+ APE (Action, Purpose, Expectation) is the most minimal structured prompt framework — even simpler than RTF or CTF. It is designed for ultra-quick, self-contained tasks where adding more structure would be overkill. APE answers three essential questions in the fewest possible words: what to do, why it matters, and what success looks like. A complete APE prompt emits as three short sentences, which makes it the shortest template in this package.
6
+
7
+ **Origin:** No single documented originator. Action-Purpose-Expectation is a community prompt-engineering convention, documented in practitioner guides from 2024 onward (earliest found: fvivas.com, 15 March 2024) with no attributed creator. It does not appear in any peer-reviewed prompting survey, including The Prompt Report (arXiv 2406.06608). **Not to be confused with** APE = "Automatic Prompt Engineer" from Zhou et al., "Large Language Models Are Human-Level Prompt Engineers" (arXiv 2211.01910, ICLR 2023) — an unrelated automated method that searches over LLM-generated candidate instructions and selects the highest-scoring one. That APE is an algorithm, not a prompt template; the two share only the acronym.
6
8
 
7
9
  ## Components
8
10
 
9
11
  ### A - Action
10
- **Purpose:** State the core action to take. One clear verb-driven instruction.
12
+ **Purpose:** State the core action to take, as one complete imperative sentence. Nothing else in an APE prompt states the task, so a bare noun phrase ("meeting summary") leaves the emitted prompt with no instruction in it at all.
11
13
 
12
14
  **Questions to Ask:**
13
15
  - What exactly should happen?
@@ -15,13 +17,13 @@ APE (Action, Purpose, Expectation) is the most minimal structured prompt framewo
15
17
  - What's the one thing needed?
16
18
 
17
19
  **Examples:**
18
- - "Write a function that..."
19
- - "Summarize this document..."
20
- - "Translate the following..."
21
- - "List three alternatives to..."
20
+ - "Write a JSDoc comment for the function above."
21
+ - "Summarize the key decisions in the transcript above."
22
+ - "Translate the error message above into Brazilian Portuguese."
23
+ - "List three alternative approaches to the indexing problem described above."
22
24
 
23
25
  ### P - Purpose
24
- **Purpose:** State why this action is needed. Provides just enough context to calibrate the output without a full background brief.
26
+ **Purpose:** State why this action is needed. Provides just enough context to calibrate the output without a full background brief. It ships inside the carrier sentence `Calibrate the result to this purpose: …`, so the slot itself may be a fragment.
25
27
 
26
28
  **Questions to Ask:**
27
29
  - Why is this needed?
@@ -29,13 +31,13 @@ APE (Action, Purpose, Expectation) is the most minimal structured prompt framewo
29
31
  - Who needs it and why?
30
32
 
31
33
  **Examples:**
32
- - "...so a new engineer can understand the codebase quickly"
33
- - "...for inclusion in a weekly stakeholder email"
34
- - "...because our target market is in Brazil"
35
- - "...to help decide which approach to take"
34
+ - "a new engineer who needs to understand the codebase quickly"
35
+ - "inclusion in a weekly stakeholder email"
36
+ - "end users in Brazil, who will see this message in production"
37
+ - "the team deciding which approach to pursue in tomorrow's planning session"
36
38
 
37
39
  ### E - Expectation
38
- **Purpose:** Define what a good result looks like. The standard for success.
40
+ **Purpose:** Define what a good result looks like. The standard for success. It ships inside the carrier sentence `A good result meets this standard: …`, so the slot itself may be a fragment, and may hold several clauses.
39
41
 
40
42
  **Questions to Ask:**
41
43
  - What does a good result look like?
@@ -43,36 +45,65 @@ APE (Action, Purpose, Expectation) is the most minimal structured prompt framewo
43
45
  - Length, format, or tone requirements?
44
46
 
45
47
  **Examples:**
46
- - "Should be under 100 words and jargon-free"
47
- - "Should be actionable, not just descriptive"
48
- - "Should fit in a single Slack message"
49
- - "Should have a clear recommendation at the end"
48
+ - "under 100 words and jargon-free"
49
+ - "actionable, not just descriptive"
50
+ - "short enough to fit in a single Slack message"
51
+ - "ends with a clear recommendation"
50
52
 
51
53
  ## Template Structure
52
54
 
53
- ```
54
- ACTION: [What to do]
55
- PURPOSE: [Why it's needed]
56
- EXPECTATION: [What a good result looks like]
57
- ```
55
+ 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. That is why `ACTION` has to be a complete sentence, and why `PURPOSE` and `EXPECTATION` ship with carrier sentences that let their own slots stay fragments.
58
56
 
59
- Or as a single sentence:
60
57
  ```
61
- [ACTION] so that [PURPOSE], and it should [EXPECTATION].
58
+ SOURCE MATERIAL:
59
+ [Optional — paste the artifact the task operates on here, named concretely (the meeting
60
+ transcript, the function). If the task creates something from scratch, delete this
61
+ bracketed block along with the sentence directly below it.]
62
+ Use the material above as the input for the task described below.
63
+
64
+ ACTION:
65
+ [One complete imperative sentence naming what to produce, e.g. "Summarize the decisions in
66
+ the transcript above." Never a bare noun phrase like "meeting summary" — nothing else here
67
+ states the task. The two fields below may be fragments.]
68
+
69
+ PURPOSE:
70
+ Calibrate the result to this purpose: [who needs it and what they will do with it].
71
+
72
+ EXPECTATION:
73
+ A good result meets this standard: [the success bar — length, format, tone, or quality].
62
74
  ```
63
75
 
76
+ `SOURCE MATERIAL` is a fourth block in a three-letter acronym, and it carries no letter because it is optional. APE is usually pointed at something that already exists — a transcript, a function, a draft — and with no named place to put it, that artifact gets pasted into `ACTION`, the one field that cannot afford to lose its shape. Delete the block and the sentence beneath it whenever the task creates something from scratch.
77
+
78
+ There is no collapsed single-sentence variant; see **Why There Is No Inline Form** below.
79
+
64
80
  ## Complete Examples
65
81
 
82
+ Every example below is shown in emitted form: each slot carries its own role in prose.
83
+ Read the headers as scaffolding that will be deleted — the examples are written so that
84
+ nothing is lost when it is.
85
+
66
86
  ### Example 1: Code Comment
67
87
 
68
88
  **Before APE:**
69
89
  "Add a comment to this function."
70
90
 
71
- **After APE:**
91
+ **After APE** (source material supplied):
72
92
  ```
73
- ACTION: Write a JSDoc comment for this function.
74
- PURPOSE: So a new team member can understand what it does without reading the implementation.
75
- EXPECTATION: Should cover parameters, return value, and one usage example. Under 8 lines.
93
+ SOURCE MATERIAL:
94
+ [Paste the function you want documented here]
95
+ Use the material above as the input for the task described below.
96
+
97
+ ACTION:
98
+ Write a JSDoc comment for the function above.
99
+
100
+ PURPOSE:
101
+ Calibrate the result to this purpose: a new team member who needs to understand what the
102
+ function does without reading its implementation.
103
+
104
+ EXPECTATION:
105
+ A good result meets this standard: covers every parameter and the return value, includes
106
+ one usage example, and stays under 8 lines.
76
107
  ```
77
108
 
78
109
  ### Example 2: Meeting Summary
@@ -80,11 +111,22 @@ EXPECTATION: Should cover parameters, return value, and one usage example. Under
80
111
  **Before APE:**
81
112
  "Summarize this meeting."
82
113
 
83
- **After APE:**
114
+ **After APE** (source material supplied):
84
115
  ```
85
- ACTION: Summarize the key decisions and action items from this meeting transcript.
86
- PURPOSE: For team members who missed the meeting and need to catch up quickly.
87
- EXPECTATION: Bullet points only, max 10 bullets, each under 15 words.
116
+ SOURCE MATERIAL:
117
+ [Paste the meeting transcript here]
118
+ Use the material above as the input for the task described below.
119
+
120
+ ACTION:
121
+ Summarize the key decisions and action items in the transcript above.
122
+
123
+ PURPOSE:
124
+ Calibrate the result to this purpose: team members who missed the meeting and need to
125
+ catch up quickly.
126
+
127
+ EXPECTATION:
128
+ A good result meets this standard: bullet points only, at most 10 bullets, each under 15
129
+ words.
88
130
  ```
89
131
 
90
132
  ### Example 3: Alternative Ideas
@@ -92,11 +134,22 @@ EXPECTATION: Bullet points only, max 10 bullets, each under 15 words.
92
134
  **Before APE:**
93
135
  "Give me options."
94
136
 
95
- **After APE:**
137
+ **After APE** (source material supplied):
96
138
  ```
97
- ACTION: List 3 alternative approaches to the database indexing problem described below.
98
- PURPOSE: To help the team decide which direction to pursue in tomorrow's planning session.
99
- EXPECTATION: Each option needs a one-sentence tradeoff (pro and con). No implementation details yet.
139
+ SOURCE MATERIAL:
140
+ [Paste the description of the database indexing problem here]
141
+ Use the material above as the input for the task described below.
142
+
143
+ ACTION:
144
+ List three alternative approaches to the indexing problem described above.
145
+
146
+ PURPOSE:
147
+ Calibrate the result to this purpose: the team deciding which direction to pursue in
148
+ tomorrow's planning session.
149
+
150
+ EXPECTATION:
151
+ A good result meets this standard: each option gets a one-sentence tradeoff naming one
152
+ advantage and one cost, and none of them go into implementation detail yet.
100
153
  ```
101
154
 
102
155
  ### Example 4: Translation
@@ -104,11 +157,43 @@ EXPECTATION: Each option needs a one-sentence tradeoff (pro and con). No impleme
104
157
  **Before APE:**
105
158
  "Translate this."
106
159
 
107
- **After APE:**
160
+ **After APE** (source material supplied):
161
+ ```
162
+ SOURCE MATERIAL:
163
+ [Paste the error message to be translated here]
164
+ Use the material above as the input for the task described below.
165
+
166
+ ACTION:
167
+ Translate the error message above into Brazilian Portuguese.
168
+
169
+ PURPOSE:
170
+ Calibrate the result to this purpose: end users in Brazil, who will see this message in
171
+ production when the app fails.
172
+
173
+ EXPECTATION:
174
+ A good result meets this standard: natural-sounding Brazilian Portuguese rather than a
175
+ literal translation, with technical terms left in English.
108
176
  ```
109
- ACTION: Translate the following error message into Portuguese (Brazilian).
110
- PURPOSE: Our app is launching in Brazil and this error will be seen by end users.
111
- EXPECTATION: Natural-sounding Brazilian Portuguese, not a literal translation. Keep technical terms in English.
177
+
178
+ ### Example 5: Deploy Freeze Announcement
179
+
180
+ **Before APE:**
181
+ "Write an announcement."
182
+
183
+ **After APE** (no source material — the announcement is written from scratch, so the
184
+ `SOURCE MATERIAL` block and the sentence below it are both deleted):
185
+ ```
186
+ ACTION:
187
+ Write a Slack announcement telling the engineering team that Friday deploys are frozen
188
+ until January 5.
189
+
190
+ PURPOSE:
191
+ Calibrate the result to this purpose: engineers who need to know what changed and what to
192
+ do instead, not why the policy exists.
193
+
194
+ EXPECTATION:
195
+ A good result meets this standard: one short paragraph, plain and direct, no more than
196
+ four sentences, ending with who to contact for an exception.
112
197
  ```
113
198
 
114
199
  ## Best Use Cases
@@ -158,24 +243,27 @@ EXPECTATION: Natural-sounding Brazilian Portuguese, not a literal translation. K
158
243
  | Context needed? | Minimal (Purpose) | Yes | No |
159
244
  | Best for | Ultra-quick, one-off | Context-heavy | Expertise-driven |
160
245
 
161
- ## Inline APE Pattern
162
-
163
- APE works especially well as a single sentence:
164
-
165
- ```
166
- [ACTION] for [PURPOSE], and it should [EXPECTATION].
167
- ```
168
-
169
- **Examples:**
170
- ```
171
- Summarize this PR description for a non-technical stakeholder, and it should fit in two sentences.
172
- ```
173
- ```
174
- List three naming alternatives for this function for a code review discussion, and each should be self-explanatory without comments.
175
- ```
176
- ```
177
- Write a commit message for these changes for git history, and it should follow conventional commits format.
178
- ```
246
+ ## Why There Is No Inline Form
247
+
248
+ Earlier versions of this document offered a collapsed single sentence as an equal option,
249
+ in two different and mutually inconsistent syntaxes — `[ACTION] so that [PURPOSE], and it
250
+ should [EXPECTATION].` and `[ACTION] for [PURPOSE], and it should [EXPECTATION].` The
251
+ shipped template implements neither, and the emitted prompt should not use them. Two
252
+ things break when APE is collapsed:
253
+
254
+ - **There is nowhere to put source material.** Most APE tasks operate on something that
255
+ already exists. In the collapsed form that artifact has to be pasted into the middle of
256
+ the instruction sentence, which is the one field the template protects.
257
+ - **The connectives are load-bearing and rigid.** `so that` and `and it should` only fit
258
+ purposes and expectations that happen to be single clauses. A real expectation is
259
+ usually several ("bullet points only, at most 10 bullets, each under 15 words"), and
260
+ splicing that after `and it should` yields a sentence that no longer parses as an
261
+ instruction.
262
+
263
+ Brevity is preserved without the collapse. A complete APE prompt is three sentences, and
264
+ for a from-scratch task the emitted block is three lines of prose — still the shortest
265
+ output any template in this package produces. The brevity comes from APE having only
266
+ three fields, not from compressing them onto one line.
179
267
 
180
268
  ## Common Mistakes
181
269
 
@@ -4,6 +4,8 @@
4
4
 
5
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
6
 
7
+ **Origin:** Predates LLMs as a direct-response copywriting formula. The earliest verified dated appearance is Kevan Lee's "27 Best Copywriting Formulas" (Buffer blog, 13 October 2014), which lists Before-After-Bridge as formula #1 and — unlike the other formulas in that article, which it credits to named copywriters such as Bob Stone — presents it as already-common property with no attributed author. No individual coiner has been verified. Its use in prompt engineering is a later community adaptation of the copywriting formula.
8
+
7
9
  ## Components
8
10
 
9
11
  ### B - Before
@@ -15,10 +17,10 @@ BAB (Before, After, Bridge) is a transformation-focused framework ideal for rewr
15
17
  - What are the limitations?
16
18
  - What does it look like right now?
17
19
 
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..."
20
+ **Examples** (complete sentences, not bare noun phrases):
21
+ - "The function above nests three fetch calls as callbacks, so the control flow is hard to follow and no step can be tested on its own."
22
+ - "The homepage copy above is written for developers rather than for the operations managers who actually buy the product."
23
+ - "The README above has no section headers and buries the setup instructions behind a wiki link."
22
24
 
23
25
  ### A - After
24
26
  **Purpose:** Describe the desired end state — what it should look like once the transformation is complete.
@@ -29,10 +31,10 @@ BAB (Before, After, Bridge) is a transformation-focused framework ideal for rewr
29
31
  - What problems should be solved?
30
32
  - What does success look like?
31
33
 
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"
34
+ **Examples** (complete sentences, not bare noun phrases):
35
+ - "The same logic implemented with async/await, readable by a junior developer who has not worked with Promises."
36
+ - "Copy that speaks to non-technical buyers in terms of the outcomes they care about."
37
+ - "A README with a clear structure, a quick start on the first screen, and a populated API docs section."
36
38
 
37
39
  ### B - Bridge
38
40
  **Purpose:** Describe how to get from Before to After — the approach, constraints, and rules for the transformation.
@@ -43,26 +45,61 @@ BAB (Before, After, Bridge) is a transformation-focused framework ideal for rewr
43
45
  - What should be changed vs. left alone?
44
46
  - Any constraints on approach?
45
47
 
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"
48
+ **Examples** (each a self-contained imperative carrying its own verb):
49
+ - "Preserve all existing functionality and change only the syntax."
50
+ - "Keep the same information but reframe it for a non-technical audience."
51
+ - "Maintain the existing section content; restructure the order and add the missing sections."
52
+ - *Prohibitions take explicit "Do not…" / "Never…" form:* "Do not rename any variable." / "Never introduce a new dependency."
50
53
 
51
54
  ## Template Structure
52
55
 
56
+ Section headers are stripped at emission, so every header's meaning is carried by the
57
+ unbracketed prose that ships inside each slot rather than by the label above it. Do not
58
+ reintroduce header-only structure.
59
+
60
+ Two elements of the shipped template are not framework components. The leading
61
+ `SOURCE MATERIAL` block holds the artifact being transformed and is **not optional here** —
62
+ BAB requires something to transform, so unlike the source-material slot in other templates
63
+ it is never deleted. The closing `Now …` line restates the transformation as an imperative
64
+ so the prompt ends with an instruction rather than with a list of constraints.
65
+
53
66
  ```
67
+ SOURCE MATERIAL:
68
+ [Paste the artifact to be transformed here — the artifact itself, never a description of it.
69
+ Name it concretely and keep it bracketed for the user to fill in, e.g. "[Paste the current
70
+ job posting here]".]
71
+ Use the material above as the material to be transformed for the work described below.
72
+
54
73
  BEFORE:
55
- [Current state what exists, what's wrong, what needs to change]
74
+ This is the state that material is in now, and why it must change:
75
+ [Describe the current state in complete sentences, not a bare noun phrase. Say what exists
76
+ now, what is wrong with it, and what needs to change. Quote the material above wherever a
77
+ specific flaw is visible in it.]
56
78
 
57
79
  AFTER:
58
- [Desired state what it should look like, qualities it should have]
80
+ This is what it must become once the transformation is complete:
81
+ [Describe the desired end state in complete sentences. Cover the qualities the result must
82
+ have and the criteria that make it successful. Name the audience only if the user identified
83
+ one; otherwise leave "[you fill this in: who will read the result]".]
59
84
 
60
85
  BRIDGE:
61
- [How to get there transformation rules, constraints, what to preserve]
86
+ Follow these rules when carrying out the transformation:
87
+ [State each rule as a self-contained imperative carrying its own verb — "Preserve every salary
88
+ and benefits detail exactly as written", not "salary details". Write prohibitions as
89
+ "Do not…" or "Never…". Cover:
90
+ - What must be preserved unchanged, and what should change
91
+ - Any constraint on approach, style, tone, length, or format]
92
+
93
+ Now [state the transformation as an imperative naming the material, e.g. "rewrite the job
94
+ posting above"].
62
95
  ```
63
96
 
64
97
  ## Complete Examples
65
98
 
99
+ Every example below is shown in emitted form: the source material first, then each slot
100
+ carrying its own role in prose, then the closing imperative. Read the headers as scaffolding
101
+ that will be deleted — the examples are written so that nothing is lost when it is.
102
+
66
103
  ### Example 1: Code Refactoring
67
104
 
68
105
  **Before BAB:**
@@ -70,22 +107,33 @@ BRIDGE:
70
107
 
71
108
  **After BAB:**
72
109
  ```
110
+ SOURCE MATERIAL:
111
+ [Paste the JavaScript function to be refactored here]
112
+ Use the material above as the material to be transformed for the work described below.
113
+
73
114
  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.
115
+ This is the state that material is in now, and why it must change:
116
+ The function above fetches user data, then that user's orders, then the details for
117
+ each order, with the three calls nested inside one another as callbacks. The nesting
118
+ makes the control flow hard to follow, error handling is repeated separately at every
119
+ level, and no individual step can be tested on its own.
77
120
 
78
121
  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.
122
+ This is what it must become once the transformation is complete:
123
+ The same logic implemented with async/await, with each of the three fetch steps clearly
124
+ separated and independently testable, and with error handling consolidated in one place
125
+ rather than repeated per level. The result must be readable by a junior developer who is
126
+ comfortable with ES6+ syntax but has not worked with Promises.
82
127
 
83
128
  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
129
+ Follow these rules when carrying out the transformation:
130
+ - Preserve every existing behavior, along with the sequence and shape of the API calls, exactly as written.
131
+ - Replace only the asynchronous pattern, converting the nested callbacks to async/await.
132
+ - Add a single try/catch at the top level that covers all three fetch steps.
133
+ - Do not rename any variable and do not change any data structure.
134
+ - Add one inline comment per fetch step stating what that step retrieves.
135
+
136
+ Now rewrite the JavaScript function above.
89
137
  ```
90
138
 
91
139
  ### Example 2: Copy Rewrite
@@ -95,23 +143,34 @@ BRIDGE:
95
143
 
96
144
  **After BAB:**
97
145
  ```
146
+ SOURCE MATERIAL:
147
+ [Paste the current homepage headline and body copy here]
148
+ Use the material above as the material to be transformed for the work described below.
149
+
98
150
  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.
151
+ This is the state that material is in now, and why it must change:
152
+ The headline above reads "A robust, scalable event-driven microservices orchestration
153
+ platform." It was written by engineers for engineers, and it names the architecture
154
+ rather than the problem the product solves. Our actual buyers are non-technical
155
+ operations managers, and conversion on this page is poor.
103
156
 
104
157
  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.
158
+ This is what it must become once the transformation is complete:
159
+ A headline plus a three-sentence description that communicates business value to a
160
+ non-technical operations manager. The reader must be able to answer "what problem does
161
+ this solve for me?" from the first ten words alone, without knowing what a microservice
162
+ is.
108
163
 
109
164
  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
165
+ Follow these rules when carrying out the transformation:
166
+ - Preserve the core value proposition of automation, reliability, and scale.
167
+ - Replace every technical term with the business outcome it produces.
168
+ - Write in active voice and plain language.
169
+ - Keep the tone confident, clear, and outcome-focused.
170
+ - Limit the headline to 8 words and the supporting copy to 2-3 sentences.
171
+ - Do not use technical jargon anywhere in the result.
172
+
173
+ Now rewrite the homepage headline and body copy above.
115
174
  ```
116
175
 
117
176
  ### Example 3: Documentation Restructure
@@ -121,21 +180,32 @@ BRIDGE:
121
180
 
122
181
  **After BAB:**
123
182
  ```
183
+ SOURCE MATERIAL:
184
+ [Paste the current README here]
185
+ Use the material above as the material to be transformed for the work described below.
186
+
124
187
  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.
188
+ This is the state that material is in now, and why it must change:
189
+ The README above opens with a 500-word technical architecture explanation, so a new
190
+ contributor cannot find the quick start without scrolling past it. There is no
191
+ installation section — setup instructions exist only behind a wiki link — and the API
192
+ docs section is present but empty.
128
193
 
129
194
  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.
195
+ This is what it must become once the transformation is complete:
196
+ A README that a new contributor can follow to a working local setup within 15 minutes,
197
+ organized into clearly headed sections that can be scanned rather than read, with the
198
+ quick start visible on the first screen.
132
199
 
133
200
  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
201
+ Follow these rules when carrying out the transformation:
202
+ - Preserve all existing content; reorganize it rather than deleting any information.
203
+ - Order the sections as Overview, Quick Start, Installation, Usage, API, Contributing.
204
+ - Move the architecture explanation into a collapsible section or replace it with the wiki link.
205
+ - Add a minimal API docs skeleton with TODO placeholders where content is missing.
206
+ - Add a table of contents at the top.
207
+
208
+ Now restructure the README above.
139
209
  ```
140
210
 
141
211
  ### Example 4: Tone Transformation
@@ -145,21 +215,32 @@ BRIDGE:
145
215
 
146
216
  **After BAB:**
147
217
  ```
218
+ SOURCE MATERIAL:
219
+ [Paste the draft response to the customer complaint here]
220
+ Use the material above as the material to be transformed for the work described below.
221
+
148
222
  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.
223
+ This is the state that material is in now, and why it must change:
224
+ The draft above reads as defensive and shifts blame onto the customer. It states what
225
+ happened in passive voice, and it closes without telling the customer what will happen
226
+ next or what they should do.
151
227
 
152
228
  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.
229
+ This is what it must become once the transformation is complete:
230
+ A response that acknowledges the problem, takes responsibility for it, and gives the
231
+ customer one clear next step. It must read as warm, professional, and focused on
232
+ resolving the issue.
155
233
 
156
234
  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)
235
+ Follow these rules when carrying out the transformation:
236
+ - Preserve the factual account of what happened and the timeline exactly as given.
237
+ - Open with an explicit apology in the first sentence.
238
+ - Close with a single specific action item for the customer.
239
+ - Remove all defensive language and every statement that assigns blame to the customer.
240
+ - Keep the tone empathetic but professional, and do not over-apologize.
241
+ - Match the original length and stay under 150 words.
242
+
243
+ Now rewrite the customer complaint response above.
163
244
  ```
164
245
 
165
246
  ## Best Use Cases