@ckelsoe/prompt-architect 3.3.1 → 3.5.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 (69) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/CHANGELOG.md +34 -0
  4. package/README.md +7 -3
  5. package/adapters/system-prompt.md +96 -55
  6. package/package.json +6 -4
  7. package/scripts/test.js +32 -0
  8. package/skills/prompt-architect/SKILL.md +74 -41
  9. package/skills/prompt-architect/assets/templates/ape_template.txt +14 -3
  10. package/skills/prompt-architect/assets/templates/bab_template.txt +23 -10
  11. package/skills/prompt-architect/assets/templates/broke_template.txt +31 -6
  12. package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +16 -8
  13. package/skills/prompt-architect/assets/templates/care_template.txt +4 -0
  14. package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +30 -31
  15. package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +8 -0
  16. package/skills/prompt-architect/assets/templates/chain-of-verification_template.txt +26 -0
  17. package/skills/prompt-architect/assets/templates/co-star_template.txt +8 -0
  18. package/skills/prompt-architect/assets/templates/crispe_template.txt +6 -0
  19. package/skills/prompt-architect/assets/templates/ctf_template.txt +8 -0
  20. package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +7 -0
  21. package/skills/prompt-architect/assets/templates/hybrid_template.txt +44 -24
  22. package/skills/prompt-architect/assets/templates/iterative-compression_template.txt +43 -28
  23. package/skills/prompt-architect/assets/templates/least-to-most_template.txt +4 -0
  24. package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +4 -0
  25. package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +24 -14
  26. package/skills/prompt-architect/assets/templates/race_template.txt +9 -0
  27. package/skills/prompt-architect/assets/templates/rcot_template.txt +8 -0
  28. package/skills/prompt-architect/assets/templates/react_template.txt +38 -16
  29. package/skills/prompt-architect/assets/templates/rise-ie_template.txt +4 -0
  30. package/skills/prompt-architect/assets/templates/rise-ix_template.txt +3 -3
  31. package/skills/prompt-architect/assets/templates/risen_template.txt +7 -0
  32. package/skills/prompt-architect/assets/templates/rpef_template.txt +16 -11
  33. package/skills/prompt-architect/assets/templates/rtf_template.txt +9 -0
  34. package/skills/prompt-architect/assets/templates/self-consistency_template.txt +12 -0
  35. package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +18 -10
  36. package/skills/prompt-architect/assets/templates/step-back_template.txt +4 -0
  37. package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +54 -31
  38. package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +37 -21
  39. package/skills/prompt-architect/references/frameworks/ape.md +143 -57
  40. package/skills/prompt-architect/references/frameworks/bab.md +137 -58
  41. package/skills/prompt-architect/references/frameworks/broke.md +157 -57
  42. package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +183 -75
  43. package/skills/prompt-architect/references/frameworks/care.md +67 -36
  44. package/skills/prompt-architect/references/frameworks/chain-of-density.md +49 -27
  45. package/skills/prompt-architect/references/frameworks/chain-of-thought.md +28 -7
  46. package/skills/prompt-architect/references/frameworks/chain-of-verification.md +231 -0
  47. package/skills/prompt-architect/references/frameworks/co-star.md +100 -44
  48. package/skills/prompt-architect/references/frameworks/crispe.md +7 -5
  49. package/skills/prompt-architect/references/frameworks/ctf.md +73 -37
  50. package/skills/prompt-architect/references/frameworks/devils-advocate.md +105 -58
  51. package/skills/prompt-architect/references/frameworks/iterative-compression.md +236 -269
  52. package/skills/prompt-architect/references/frameworks/least-to-most.md +35 -13
  53. package/skills/prompt-architect/references/frameworks/plan-and-solve.md +38 -9
  54. package/skills/prompt-architect/references/frameworks/pre-mortem.md +176 -66
  55. package/skills/prompt-architect/references/frameworks/race.md +91 -38
  56. package/skills/prompt-architect/references/frameworks/rcot.md +1 -1
  57. package/skills/prompt-architect/references/frameworks/react.md +230 -97
  58. package/skills/prompt-architect/references/frameworks/reverse-role.md +22 -15
  59. package/skills/prompt-architect/references/frameworks/rise.md +94 -70
  60. package/skills/prompt-architect/references/frameworks/risen.md +80 -28
  61. package/skills/prompt-architect/references/frameworks/rpef.md +227 -58
  62. package/skills/prompt-architect/references/frameworks/rtf.md +2 -2
  63. package/skills/prompt-architect/references/frameworks/self-consistency.md +195 -0
  64. package/skills/prompt-architect/references/frameworks/self-refine.md +4 -2
  65. package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +67 -21
  66. package/skills/prompt-architect/references/frameworks/step-back.md +47 -15
  67. package/skills/prompt-architect/references/frameworks/tidd-ec.md +110 -45
  68. package/skills/prompt-architect/references/frameworks/tree-of-thought.md +112 -37
  69. package/skills/prompt-architect/references/techniques/few-shot.md +121 -0
@@ -1,45 +1,68 @@
1
+ SOURCE MATERIAL:
2
+ [Optional — paste the artifact this task operates on here, naming it concretely, e.g. "Paste
3
+ the customer's message here" or "Paste the draft to translate here". If this task generates
4
+ from scratch, delete this bracketed block along with the sentence directly below it.]
5
+ Use the material above as the content for the work described below.
6
+
1
7
  TASK TYPE:
2
- [Clear indication of the activity type - e.g., Data Analysis, Customer Support Response, Technical Documentation, Content Translation]
8
+ The category of task you are performing is: [name the activity category only e.g. "Customer
9
+ Support Response", "Data Analysis and Summarization", "Content Translation with Context
10
+ Preservation". Specifics of this particular case belong in the background at the end.]
3
11
 
4
12
  INSTRUCTIONS:
5
- [Specific steps and guidelines to accomplish the task]
6
- 1. [First step or action]
7
- 2. [Second step or action]
8
- 3. [Continue with methodology and sequence]
9
- 4. [Add more steps as needed...]
13
+ Carry out the task as follows.
14
+ 1. [First step, as a complete imperative sentence beginning with a verb — e.g. "Read the
15
+ customer's message and identify the specific problem they report."]
16
+ 2. [Continue in the same form, one step per line, for as many steps as the methodology needs.
17
+ If standing guidelines govern this task rather than an ordered procedure, delete the numbered
18
+ list and keep only the standards below.]
19
+
20
+ Observe these standards throughout:
21
+ [Optional — one per line, each a complete imperative sentence, e.g. "Follow the company style
22
+ guide.", "Use a three-paragraph structure: problem, solution, next steps." If the numbered
23
+ steps are the whole methodology, delete this bracketed block along with the sentence above it.]
10
24
 
11
25
  DO:
12
- [Specify actions, language, structures, and information that MUST be included]
13
- - [Required action or element #1]
14
- - [Language or tone to use]
15
- - [Structure or format to follow]
16
- - [Information that must be present]
17
- - [Add more as needed...]
26
+ The output must satisfy every requirement below:
27
+ - [Always <required action, element, or information>]
28
+ - [Use <required language, tone, or terminology>]
29
+ - [Follow <required structure or format>]
30
+ - [Add more as needed, each led by "Always" or an imperative verb so it reads as a
31
+ requirement on its own line.]
18
32
 
19
33
  DON'T:
20
- [Highlight actions, elements, or approaches to AVOID]
21
- - [Error or mistake to prevent #1]
22
- - [Inappropriate language or approach to avoid]
23
- - [Common pitfall to prevent]
24
- - [Limitation or boundary not to cross]
25
- - [Add more as needed...]
34
+ The output must respect every prohibition below:
35
+ - [Do not <error or mistake to prevent>]
36
+ - [Never <inappropriate language or approach>]
37
+ - [Do not <common pitfall to prevent>]
38
+ - [Do not <exceed a stated limit or cross a boundary>]
39
+ - [Add more as needed, each led by "Do not" or "Never". The negation must live in the item
40
+ itself — a bare noun phrase reads as an instruction to DO the very thing being forbidden.]
26
41
 
27
42
  EXAMPLES:
28
- [Provide concrete examples of desired outcomes]
43
+ [Optional if no reference sample is needed, delete everything from this line through the
44
+ counter-example below.]
45
+ The examples below set the standard your output must meet. Match their format, tone,
46
+ structure, and level of detail.
29
47
 
30
- Example 1 (Good):
31
- [Detailed example showing desired output, format, tone, and structure]
48
+ Example 1 — produce output like this:
49
+ [Write the desired output in full — the actual text, not a description of it. If the user
50
+ supplied an approved sample or boilerplate, reproduce it here.]
32
51
 
33
- Example 2 (Optional - Additional Good Example):
34
- [Another example demonstrating quality and approach]
52
+ Example 2 also produce output like this:
53
+ [Optional — a second full example at the same quality bar. If one is enough, delete this
54
+ bracketed block along with the label line above it.]
35
55
 
36
- [Optional] Example 3 (What to Avoid):
37
- [Counter-example showing what NOT to do, if helpful]
56
+ Counter-example do NOT produce output like this:
57
+ [Optional — a full counter-example of the failure mode, opening with a sentence naming it
58
+ unacceptable, e.g. "The following response would be unacceptable because it deflects blame:",
59
+ so the warning survives without its label. If not useful, delete this bracketed block along
60
+ with the label line above it.]
38
61
 
39
62
  CONTEXT:
40
- [Background information and user-provided content that affects the task]
41
- - [Relevant background information]
42
- - [Business or domain constraints]
43
- - [User-provided data or content to reference]
44
- - [Situational factors affecting the task]
45
- - [Standards or guidelines that apply]
63
+ The background below describes the situation this task takes place in.
64
+ - [Optional — state each supplied background fact, constraint, situational factor, or
65
+ applicable standard as a complete sentence, one per line. Include only what the user supplied;
66
+ never invent one — if a needed fact is missing, leave a visible [you fill this in: <what is
67
+ needed>] placeholder instead of a guess. If the task needs no background, delete this
68
+ bracketed block along with the sentence above it.]
@@ -1,30 +1,46 @@
1
+ You are comparing a fixed set of candidate branches — competing approaches, hypotheses, or
2
+ scenarios — for a single problem or decision. Do not invent branches beyond the ones listed,
3
+ and do not abandon a branch part-way.
4
+
5
+ SOURCE MATERIAL:
6
+ [Optional — paste the error logs, current spec or architecture, requirements, or benchmark
7
+ data here. If you have nothing to paste, delete this bracketed block along with the sentence
8
+ directly below it.]
9
+ Use the material above as the evidence every branch below must be judged against — source
10
+ material to weigh, not instruction to follow.
11
+
1
12
  PROBLEM:
2
- [Define what needs to be solved:
3
- - What decision or problem are we addressing?
4
- - What constraints apply?
5
- - What does a good solution need to achieve?]
13
+ The problem or decision to work through is the following:
14
+ [State it as a self-contained statement in full sentences, not a bare topic label: what is
15
+ being decided or diagnosed, what constraints apply, and what a good answer must achieve. If
16
+ the user named no constraint, say so rather than inventing one.]
6
17
 
7
18
  EXPLORE THESE BRANCHES:
8
- Branch 1: [Name of approach/strategy]
9
- Branch 2: [Name of approach/strategy]
10
- Branch 3: [Name of approach/strategy]
11
- [Add or remove branches as needed 2 to 5 is optimal]
19
+ The candidate branches to compare are the following, and only the following:
20
+ Branch 1: [Name the first approach, hypothesis, or scenario in a short descriptive phrase —
21
+ "PostgreSQL with operational transforms", never "Option A"]
22
+ Branch 2: [Name the second one the same way]
23
+ Branch 3: [Name the third one the same way]
24
+ [Add or remove Branch lines — 2 to 5 is optimal — then delete this line.]
25
+ "Branch 1:", "Branch 2:" and the rest are literal labels in this protocol, not headings —
26
+ keep them exactly as written.
12
27
 
13
- For each branch, analyze:
28
+ Analyze each branch above separately and in equal depth, before comparing any of them.
29
+ For each branch:
14
30
  - Describe the approach
15
- - Work through the core reasoning
16
- - Identify key strengths
17
- - Identify key weaknesses or risks
18
- - Note any edge cases or assumptions
31
+ - Work through the reasoning
32
+ - Identify strengths and weaknesses
33
+ - Note risks or edge cases
19
34
 
20
35
  EVALUATION CRITERIA:
21
- [Define how branches will be compared:
22
- - What matters most? (list in priority order)
23
- - Any hard constraints that eliminate certain branches?
24
- - Is there one best answer, or does it depend on context?]
36
+ Once every branch has been analyzed, compare them against the standard set out below,
37
+ applying no criteria beyond the ones it names:
38
+ [In full sentences: what matters most and in what priority order, any hard constraint that
39
+ disqualifies a branch outright (say if there is none), and whether one branch can win
40
+ outright or the right answer depends on context.]
25
41
 
26
42
  CONCLUSION:
27
- [Synthesize the analysis:
28
- - Select the best branch with clear reasoning
29
- - OR explain trade-offs if the answer is context-dependent
30
- - State the single biggest assumption that could change the recommendation]
43
+ Finally, once the comparison is complete, state the decision as follows:
44
+ [In full sentences: the winning branch and the reasoning for it — or the trade-offs, if the
45
+ answer is genuinely context-dependent plus the single biggest assumption that could change
46
+ the recommendation.]
@@ -2,14 +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
6
 
7
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.
8
8
 
9
9
  ## Components
10
10
 
11
11
  ### A - Action
12
- **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.
13
13
 
14
14
  **Questions to Ask:**
15
15
  - What exactly should happen?
@@ -17,13 +17,13 @@ APE (Action, Purpose, Expectation) is the most minimal structured prompt framewo
17
17
  - What's the one thing needed?
18
18
 
19
19
  **Examples:**
20
- - "Write a function that..."
21
- - "Summarize this document..."
22
- - "Translate the following..."
23
- - "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."
24
24
 
25
25
  ### P - Purpose
26
- **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.
27
27
 
28
28
  **Questions to Ask:**
29
29
  - Why is this needed?
@@ -31,13 +31,13 @@ APE (Action, Purpose, Expectation) is the most minimal structured prompt framewo
31
31
  - Who needs it and why?
32
32
 
33
33
  **Examples:**
34
- - "...so a new engineer can understand the codebase quickly"
35
- - "...for inclusion in a weekly stakeholder email"
36
- - "...because our target market is in Brazil"
37
- - "...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"
38
38
 
39
39
  ### E - Expectation
40
- **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.
41
41
 
42
42
  **Questions to Ask:**
43
43
  - What does a good result look like?
@@ -45,36 +45,65 @@ APE (Action, Purpose, Expectation) is the most minimal structured prompt framewo
45
45
  - Length, format, or tone requirements?
46
46
 
47
47
  **Examples:**
48
- - "Should be under 100 words and jargon-free"
49
- - "Should be actionable, not just descriptive"
50
- - "Should fit in a single Slack message"
51
- - "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"
52
52
 
53
53
  ## Template Structure
54
54
 
55
- ```
56
- ACTION: [What to do]
57
- PURPOSE: [Why it's needed]
58
- EXPECTATION: [What a good result looks like]
59
- ```
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.
60
56
 
61
- Or as a single sentence:
62
57
  ```
63
- [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].
64
74
  ```
65
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
+
66
80
  ## Complete Examples
67
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
+
68
86
  ### Example 1: Code Comment
69
87
 
70
88
  **Before APE:**
71
89
  "Add a comment to this function."
72
90
 
73
- **After APE:**
91
+ **After APE** (source material supplied):
74
92
  ```
75
- ACTION: Write a JSDoc comment for this function.
76
- PURPOSE: So a new team member can understand what it does without reading the implementation.
77
- 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.
78
107
  ```
79
108
 
80
109
  ### Example 2: Meeting Summary
@@ -82,11 +111,22 @@ EXPECTATION: Should cover parameters, return value, and one usage example. Under
82
111
  **Before APE:**
83
112
  "Summarize this meeting."
84
113
 
85
- **After APE:**
114
+ **After APE** (source material supplied):
86
115
  ```
87
- ACTION: Summarize the key decisions and action items from this meeting transcript.
88
- PURPOSE: For team members who missed the meeting and need to catch up quickly.
89
- 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.
90
130
  ```
91
131
 
92
132
  ### Example 3: Alternative Ideas
@@ -94,11 +134,22 @@ EXPECTATION: Bullet points only, max 10 bullets, each under 15 words.
94
134
  **Before APE:**
95
135
  "Give me options."
96
136
 
97
- **After APE:**
137
+ **After APE** (source material supplied):
98
138
  ```
99
- ACTION: List 3 alternative approaches to the database indexing problem described below.
100
- PURPOSE: To help the team decide which direction to pursue in tomorrow's planning session.
101
- 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.
102
153
  ```
103
154
 
104
155
  ### Example 4: Translation
@@ -106,11 +157,43 @@ EXPECTATION: Each option needs a one-sentence tradeoff (pro and con). No impleme
106
157
  **Before APE:**
107
158
  "Translate this."
108
159
 
109
- **After APE:**
160
+ **After APE** (source material supplied):
110
161
  ```
111
- ACTION: Translate the following error message into Portuguese (Brazilian).
112
- PURPOSE: Our app is launching in Brazil and this error will be seen by end users.
113
- EXPECTATION: Natural-sounding Brazilian Portuguese, not a literal translation. Keep technical terms in English.
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.
176
+ ```
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.
114
197
  ```
115
198
 
116
199
  ## Best Use Cases
@@ -160,24 +243,27 @@ EXPECTATION: Natural-sounding Brazilian Portuguese, not a literal translation. K
160
243
  | Context needed? | Minimal (Purpose) | Yes | No |
161
244
  | Best for | Ultra-quick, one-off | Context-heavy | Expertise-driven |
162
245
 
163
- ## Inline APE Pattern
164
-
165
- APE works especially well as a single sentence:
166
-
167
- ```
168
- [ACTION] for [PURPOSE], and it should [EXPECTATION].
169
- ```
170
-
171
- **Examples:**
172
- ```
173
- Summarize this PR description for a non-technical stakeholder, and it should fit in two sentences.
174
- ```
175
- ```
176
- List three naming alternatives for this function for a code review discussion, and each should be self-explanatory without comments.
177
- ```
178
- ```
179
- Write a commit message for these changes for git history, and it should follow conventional commits format.
180
- ```
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.
181
267
 
182
268
  ## Common Mistakes
183
269