@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
@@ -34,91 +34,6 @@ Think of it as "progressive enhancement" for prompts.
34
34
  - Time-critical quick tasks
35
35
  - Tasks with fixed formats that can't improve
36
36
 
37
- ## Implementation Approaches
38
-
39
- ### Approach 1: Explicit Multi-Pass
40
- Request multiple iterations upfront.
41
-
42
- **Example:**
43
- ```
44
- Create a summary of this article using Iterative Compression:
45
-
46
- ITERATION 1:
47
- Write a verbose summary hitting all main points (150-200 words)
48
-
49
- ITERATION 2:
50
- Refine the summary: increase information density, remove redundancy, keep it under 150 words
51
-
52
- ITERATION 3:
53
- Further refine: make every word count, increase precision, keep it under 120 words
54
-
55
- ITERATION 4:
56
- Final pass: maximize information density while maintaining clarity (100 words max)
57
-
58
- ITERATION 5:
59
- Ultimate compression: distill to absolute essentials (50 words max)
60
-
61
- After all iterations, explain what improved in each pass.
62
- ```
63
-
64
- ### Approach 2: Recursive Refinement
65
- Use output from one iteration as input to the next.
66
-
67
- **Example:**
68
- ```
69
- PASS 1: Write a first draft explanation of quantum entanglement for a general audience.
70
-
71
- PASS 2: Review your explanation. What's unclear? What's redundant? Rewrite it, addressing these issues.
72
-
73
- PASS 3: Review again. Where can you be more precise? Where can you use better examples? Rewrite.
74
-
75
- PASS 4: Final review. Every sentence should earn its place. Remove or improve anything that doesn't. Final version.
76
-
77
- Show all passes so we can see the evolution.
78
- ```
79
-
80
- ### Approach 3: Targeted Improvement
81
- Focus each iteration on specific aspect.
82
-
83
- **Example:**
84
- ```
85
- Write a product description, then improve it iteratively:
86
-
87
- DRAFT:
88
- [Initial version]
89
-
90
- ITERATION 1 - CLARITY:
91
- Rewrite focusing on making it clearer and easier to understand.
92
-
93
- ITERATION 2 - IMPACT:
94
- Rewrite focusing on making it more compelling and persuasive.
95
-
96
- ITERATION 3 - CONCISION:
97
- Rewrite focusing on removing every unnecessary word.
98
-
99
- ITERATION 4 - PRECISION:
100
- Rewrite focusing on being more specific and accurate.
101
-
102
- FINAL:
103
- Combine the best elements from all iterations.
104
- ```
105
-
106
- ### Approach 4: Constraint-Based Refinement
107
- Add tighter constraints with each iteration.
108
-
109
- **Example:**
110
- ```
111
- Explain this technical concept through progressive refinement:
112
-
113
- VERSION 1: Explain in 500 words or less
114
- VERSION 2: Reduce to 300 words without losing key information
115
- VERSION 3: Reduce to 150 words, keeping only essentials
116
- VERSION 4: Create a 50-word version capturing the core idea
117
- VERSION 5: One sentence (25 words max)
118
-
119
- Each version should be complete and self-contained.
120
- ```
121
-
122
37
  ## Best Practices
123
38
 
124
39
  ### 1. Define What to Optimize
@@ -161,237 +76,289 @@ Poor:
161
76
  "Make it shorter"
162
77
  ```
163
78
 
164
- ## Complete Examples
165
-
166
- ### Example 1: Summarization
79
+ ## Template Structure
167
80
 
168
- **Without Iterative Compression:**
169
- ```
170
- Summarize this research paper.
171
- ```
81
+ Section headers are stripped at emission, along with the divider rules that separate them in the shipped `.txt`, so every slot's meaning is carried by the unbracketed prose that travels with it rather than by the header above it. The one exception is the `Iteration 1:` / `Iteration 2:` / `Iteration 3:` labels — those are literal labels inside the protocol, not section headers, and they must survive into the emitted prompt exactly as written.
172
82
 
173
- **With Iterative Compression:**
174
83
  ```
175
- Summarize this research paper using Iterative Compression:
84
+ SOURCE MATERIAL:
85
+ [Paste the full text to be compressed here.]
86
+ Use the material above as the text to be compressed for the work described below.
87
+ Every version must be a rewrite of that material — never introduce a claim it does
88
+ not support.
176
89
 
177
- [Paper content]
90
+ OPTIMIZATION GOAL:
91
+ Every pass must move the text toward this goal:
92
+ [A full sentence naming what improves and by how much, not a bare label like
93
+ "concision." For example: "Reduce word count by 20% each pass while retaining all key
94
+ information," or "Raise information density — cut filler until every sentence earns
95
+ its place."]
178
96
 
179
- ITERATION 1 (200 words):
180
- Create a comprehensive summary covering all major points. Prioritize completeness over brevity.
97
+ TARGET:
98
+ The final version must reach this end state:
99
+ [A phrase completing the sentence above, e.g. "under 150 words and readable by a
100
+ non-specialist." Name the unit, not a bare number.]
181
101
 
182
- ITERATION 2 (150 words):
183
- Refine the summary:
184
- - Remove redundant information
185
- - Combine related points
186
- - Increase information density
102
+ NUMBER OF ITERATIONS:
103
+ Run this many passes in total:
104
+ [The count as a phrase completing the sentence above, e.g. "three passes."
105
+ Typical: 2-4]
106
+ Iteration 1: [What this first pass must do to the source text, as a full sentence.]
107
+ Iteration 2: [How this pass tightens the result of pass 1, as a full sentence.]
108
+ Iteration 3: [Optional — what this final polish pass must do, as a full sentence.
109
+ Delete this line if running fewer than three passes; add further Iteration lines in
110
+ the same form if running more.]
187
111
 
188
- ITERATION 3 (100 words):
189
- Further compression:
190
- - Keep only essential information
191
- - Make every sentence count
192
- - Maintain accuracy
112
+ ITERATION INSTRUCTIONS:
113
+ In each pass, identify what can be cut, compressed, or clarified, apply the changes,
114
+ then check both that the result serves the goal above better than the version before
115
+ it and that nothing the goal requires keeping was lost. Stop when [a clause completing
116
+ this sentence, e.g. "no filler words remain" or "all three passes are complete"].
193
117
 
194
- ITERATION 4 (75 words):
195
- Maximum density:
196
- - Distill to core findings
197
- - Remove all fluff
198
- - Preserve critical details
118
+ OUTPUT FORMAT:
119
+ Deliver the final version in this format:
120
+ [A phrase completing the sentence above, e.g. "a single paragraph of continuous
121
+ prose," a bullet list, or a one-sentence summary.]
199
122
 
200
- For each iteration, highlight what you removed and why.
201
- ```
202
-
203
- ### Example 2: Code Documentation
123
+ INTERMEDIATE VERSIONS:
124
+ [Optional — keep exactly one of these two sentences as the entire content of this
125
+ block, or delete the block: "Show the output of every iteration in order, labelled by
126
+ pass number." / "Show only the final version — do not print the intermediate
127
+ passes."]
204
128
 
205
- **Without Iterative Compression:**
206
- ```
207
- Document this function.
208
- ```
209
-
210
- **With Iterative Compression:**
129
+ Compression has a floor. Past a point, passes strip meaning rather than filler. If a
130
+ pass would remove something a reader needs, stop at the previous version and deliver
131
+ that.
211
132
  ```
212
- Document this function through iterative refinement:
213
133
 
214
- [Code]
134
+ Two slots behave differently from their counterparts in other frameworks in this package. `SOURCE MATERIAL` is **not** optional here — several frameworks let you delete that block when you have nothing to paste, but this one cannot: compression is defined as a rewrite of supplied text, so with no source there is nothing to compress. `INTERMEDIATE VERSIONS` is the opposite — it is genuinely optional, and when kept it takes exactly one of the two supplied sentences as its entire content rather than free-form instructions.
215
135
 
216
- DRAFT DOCUMENTATION:
217
- Write complete documentation with examples, edge cases, everything.
136
+ The closing paragraph about compression's floor is unbracketed prose, not a fillable slot. It ships verbatim in every emitted prompt and is the stopping condition that keeps the last pass from stripping meaning.
218
137
 
219
- ITERATION 1 - CLARITY:
220
- Review and rewrite confusing sections. Add examples where helpful.
138
+ The `Iteration N:` lines admit two shapes. A **length ladder** names a shrinking word count for each pass (200 → 150 → 100 → 75), which suits material with a hard limit to hit. **Progressive tightening** instead names what each pass removes — restatement first, then inferable detail, then hedges — which suits material where the floor matters more than the number. Either shape is on-method; what is not is assigning each pass a *different quality dimension* (clarity, then impact, then tone). That is multi-dimensional refinement rather than compression, the text does not get shorter, and it is what `self-refine.md` is for. Use this framework only when the text should shrink.
221
139
 
222
- ITERATION 2 - CONCISION:
223
- Remove redundancy. Combine related points. Make it tighter.
224
-
225
- ITERATION 3 - PRECISION:
226
- Be more specific about types, behaviors, edge cases.
227
-
228
- ITERATION 4 - USABILITY:
229
- Optimize for developer experience. What do they need to know most?
140
+ ## Complete Examples
230
141
 
231
- Show each version and explain key changes.
232
- ```
142
+ Every example below is shown in emitted form: each slot carries its own role in prose.
143
+ Read the section headers as scaffolding that will be deleted — the examples are written
144
+ so that nothing is lost when it is. The `Iteration N:` lines are the exception: they are
145
+ literal labels inside the protocol, not section headers, and they survive emission
146
+ exactly as written.
233
147
 
234
- ### Example 3: Email Refinement
148
+ ### Example 1: Summarization
235
149
 
236
150
  **Without Iterative Compression:**
237
151
  ```
238
- Write an email announcing this feature.
152
+ Summarize this research paper.
239
153
  ```
240
154
 
241
155
  **With Iterative Compression:**
242
156
  ```
243
- Draft an announcement email, then refine it:
244
-
245
- DRAFT:
246
- Write a first draft covering all important information.
247
-
248
- ITERATION 1 - STRUCTURE:
249
- Reorganize for better flow. Most important information first.
250
-
251
- ITERATION 2 - CLARITY:
252
- Simplify language. Remove jargon. Make it scannable.
253
-
254
- ITERATION 3 - ENGAGEMENT:
255
- Strengthen the call-to-action. Make it more compelling.
256
-
257
- ITERATION 4 - POLISH:
258
- Final edits for tone, concision, impact.
259
-
260
- Show the evolution and explain major changes.
157
+ SOURCE MATERIAL:
158
+ [Paste the full text of the research paper here]
159
+ Use the material above as the text to be compressed for the work described below.
160
+ Every version must be a rewrite of that material never introduce a claim it does
161
+ not support.
162
+
163
+ OPTIMIZATION GOAL:
164
+ Every pass must move the text toward this goal:
165
+ Cut roughly a quarter of the word count on each pass while retaining every finding,
166
+ the method that produced it, and the limitations the authors state.
167
+
168
+ TARGET:
169
+ The final version must reach this end state:
170
+ Under 75 words, covering the core findings, and readable by someone outside the field.
171
+
172
+ NUMBER OF ITERATIONS:
173
+ Run this many passes in total:
174
+ four passes.
175
+ Iteration 1: Write a comprehensive summary of roughly 200 words covering every major
176
+ point, prioritizing completeness over brevity.
177
+ Iteration 2: Cut that summary to roughly 150 words by removing repeated information
178
+ and combining related points.
179
+ Iteration 3: Cut to roughly 100 words, keeping only what a reader needs in order to
180
+ understand what was found and how it was established.
181
+ Iteration 4: Cut to 75 words, distilling to the core findings while preserving the
182
+ numbers and qualifiers that keep them accurate.
183
+
184
+ ITERATION INSTRUCTIONS:
185
+ In each pass, identify what can be cut, compressed, or clarified, apply the changes,
186
+ then check both that the result serves the goal above better than the version before
187
+ it and that nothing the goal requires keeping was lost. Stop when all four passes are
188
+ complete.
189
+
190
+ OUTPUT FORMAT:
191
+ Deliver the final version in this format:
192
+ a single paragraph of continuous prose.
193
+
194
+ INTERMEDIATE VERSIONS:
195
+ Show the output of every iteration in order, labelled by pass number.
196
+
197
+ Compression has a floor. Past a point, passes strip meaning rather than filler. If a
198
+ pass would remove something a reader needs, stop at the previous version and deliver
199
+ that.
261
200
  ```
262
201
 
263
- ### Example 4: Technical Explanation
202
+ ### Example 2: Code Documentation
264
203
 
265
204
  **Without Iterative Compression:**
266
205
  ```
267
- Explain how this algorithm works.
206
+ Document this function.
268
207
  ```
269
208
 
270
209
  **With Iterative Compression:**
271
210
  ```
272
- Explain this algorithm through progressive refinement:
273
-
274
- PASS 1 - COMPREHENSIVE:
275
- Explain thoroughly, assuming no prior knowledge. Include:
276
- - What it does
277
- - How it works
278
- - Why it's designed this way
279
- - Example walkthrough
280
-
281
- PASS 2 - REFINED:
282
- Review Pass 1. What's unclear? What's redundant? Rewrite addressing these.
283
-
284
- PASS 3 - OPTIMIZED:
285
- Make it maximally clear and concise. Every paragraph must earn its place.
286
-
287
- PASS 4 - POLISHED:
288
- Final pass. Perfect clarity, zero fluff, optimal examples.
289
-
290
- Show all passes and note significant improvements.
291
- ```
292
-
293
- ## Combining Iterative Compression with Other Frameworks
294
-
295
- ### Iterative Compression + CO-STAR
296
- ```
297
- CONTEXT: [Background]
298
- OBJECTIVE: [Goal]
299
- STYLE: [Writing style]
300
- TONE: [Tone]
301
- AUDIENCE: [Readers]
302
-
303
- RESPONSE PROCESS (Iterative Compression):
304
- Draft 1: [Comprehensive version]
305
- Draft 2: [Refined for clarity]
306
- Draft 3: [Optimized for audience]
307
- Draft 4: [Final polished version]
211
+ SOURCE MATERIAL:
212
+ [Paste the function's signature and its existing documentation here]
213
+ Use the material above as the text to be compressed for the work described below.
214
+ Every version must be a rewrite of that material — never introduce a claim it does
215
+ not support.
216
+
217
+ OPTIMIZATION GOAL:
218
+ Every pass must move the text toward this goal:
219
+ Cut length while keeping every parameter, return value, raised exception, and edge
220
+ case a caller must know about — remove restatement of what the signature already
221
+ shows, not the behaviour it does not.
222
+
223
+ TARGET:
224
+ The final version must reach this end state:
225
+ Under 120 words, readable without scrolling, and complete enough that a caller never
226
+ has to open the implementation.
227
+
228
+ NUMBER OF ITERATIONS:
229
+ Run this many passes in total:
230
+ three passes.
231
+ Iteration 1: Cut every sentence that restates the signature or names types the
232
+ signature already declares.
233
+ Iteration 2: Merge the remaining prose so each parameter, return value, and raised
234
+ exception is described exactly once, in one place.
235
+ Iteration 3: Cut to 120 words by reducing the examples to the single shortest call
236
+ that still shows the edge case a caller is most likely to hit.
237
+
238
+ ITERATION INSTRUCTIONS:
239
+ In each pass, identify what can be cut, compressed, or clarified, apply the changes,
240
+ then check both that the result serves the goal above better than the version before
241
+ it and that nothing the goal requires keeping was lost. Stop when all three passes are
242
+ complete.
243
+
244
+ OUTPUT FORMAT:
245
+ Deliver the final version in this format:
246
+ a docstring with a one-line summary, a parameter list, a return description, and at
247
+ most one example.
248
+
249
+ INTERMEDIATE VERSIONS:
250
+ Show only the final version — do not print the intermediate passes.
251
+
252
+ Compression has a floor. Past a point, passes strip meaning rather than filler. If a
253
+ pass would remove something a reader needs, stop at the previous version and deliver
254
+ that.
308
255
  ```
309
256
 
310
- ### Iterative Compression + RISEN
311
- ```
312
- ROLE: [Expertise]
313
- INSTRUCTIONS: Use iterative refinement
314
- STEPS:
315
- 1. Create initial version
316
- 2. Review and identify weaknesses
317
- 3. Refine addressing weaknesses
318
- 4. Repeat until optimal
319
- END GOAL: [Final quality criteria]
320
- NARROWING: [Constraints on iterations]
321
- ```
257
+ ### Example 3: Email Refinement
322
258
 
323
- ### Iterative Compression + Chain of Thought
259
+ **Without Iterative Compression:**
324
260
  ```
325
- For each iteration of Iterative Compression, use Chain of Thought:
326
-
327
- ITERATION 1:
328
- Think through: What should this initial version include?
329
- [Create version]
330
-
331
- ITERATION 2:
332
- Think through: What weaknesses exist? How to address them?
333
- [Refine version]
334
-
335
- ITERATION 3:
336
- Think through: What can be compressed or improved?
337
- [Further refine]
261
+ Write an email announcing this feature.
338
262
  ```
339
263
 
340
- ## Advanced Techniques
341
-
342
- ### Aspect-Focused Iteration
343
- Each iteration improves a different dimension:
344
-
345
- ```
346
- ITERATION 1 - ACCURACY: Get the facts right
347
- ITERATION 2 - CLARITY: Make it understandable
348
- ITERATION 3 - CONCISION: Remove waste
349
- ITERATION 4 - IMPACT: Make it compelling
350
- ITERATION 5 - STYLE: Polish the voice
264
+ **With Iterative Compression:**
351
265
  ```
352
-
353
- ### A/B Iteration Branches
354
- Create alternative versions and merge best parts:
355
-
266
+ SOURCE MATERIAL:
267
+ [Paste the full draft of the announcement email here]
268
+ Use the material above as the text to be compressed for the work described below.
269
+ Every version must be a rewrite of that material — never introduce a claim it does
270
+ not support.
271
+
272
+ OPTIMIZATION GOAL:
273
+ Every pass must move the text toward this goal:
274
+ Cut roughly a third of the word count on each pass while keeping what the feature
275
+ does, who it affects, when it ships, and what the reader has to do about it.
276
+
277
+ TARGET:
278
+ The final version must reach this end state:
279
+ Under 120 words, scannable in fifteen seconds, with the action the reader must take
280
+ stated in the first two sentences.
281
+
282
+ NUMBER OF ITERATIONS:
283
+ Run this many passes in total:
284
+ three passes.
285
+ Iteration 1: Move the action the reader must take to the opening and cut the
286
+ throat-clearing that currently precedes it.
287
+ Iteration 2: Cut the background to the single sentence a reader needs in order to
288
+ understand why the change is happening.
289
+ Iteration 3: Cut to 120 words by removing hedges, restated benefits, and any sentence
290
+ whose removal a reader would not notice.
291
+
292
+ ITERATION INSTRUCTIONS:
293
+ In each pass, identify what can be cut, compressed, or clarified, apply the changes,
294
+ then check both that the result serves the goal above better than the version before
295
+ it and that nothing the goal requires keeping was lost. Stop when all three passes are
296
+ complete.
297
+
298
+ OUTPUT FORMAT:
299
+ Deliver the final version in this format:
300
+ a subject line followed by no more than three short paragraphs.
301
+
302
+ INTERMEDIATE VERSIONS:
303
+ Show the output of every iteration in order, labelled by pass number.
304
+
305
+ Compression has a floor. Past a point, passes strip meaning rather than filler. If a
306
+ pass would remove something a reader needs, stop at the previous version and deliver
307
+ that.
356
308
  ```
357
- DRAFT: [Initial version]
358
-
359
- BRANCH A - CONCISION:
360
- [Optimize for brevity]
361
-
362
- BRANCH B - COMPLETENESS:
363
- [Optimize for thoroughness]
364
309
 
365
- MERGE:
366
- Combine the best elements of both branches.
367
- ```
310
+ ### Example 4: Technical Explanation
368
311
 
369
- ### Constrained Progressive Compression
312
+ **Without Iterative Compression:**
370
313
  ```
371
- VERSION 1: 1000 words - Complete explanation
372
- VERSION 2: 500 words - 50% compression
373
- VERSION 3: 250 words - 75% compression
374
- VERSION 4: 100 words - 90% compression
375
- VERSION 5: 25 words - 97.5% compression
376
-
377
- Each version must be self-contained and accurate.
314
+ Explain how this algorithm works.
378
315
  ```
379
316
 
380
- ### Quality Metric Iteration
317
+ **With Iterative Compression:**
381
318
  ```
382
- ITERATION 1:
383
- [Create initial version]
384
- Self-assess (1-10): Clarity ___ Concision ___ Accuracy ___ Impact ___
385
-
386
- ITERATION 2:
387
- [Improve lowest scoring dimension]
388
- Self-assess: Clarity ___ Concision ___ Accuracy ___ Impact ___
389
-
390
- ITERATION 3:
391
- [Improve next lowest dimension]
392
- Self-assess: Clarity ___ Concision ___ Accuracy ___ Impact ___
393
-
394
- Continue until all metrics > 8
319
+ SOURCE MATERIAL:
320
+ [Paste the full existing explanation of the algorithm here]
321
+ Use the material above as the text to be compressed for the work described below.
322
+ Every version must be a rewrite of that material — never introduce a claim it does
323
+ not support.
324
+
325
+ OPTIMIZATION GOAL:
326
+ Every pass must move the text toward this goal:
327
+ Roughly halve the word count on each pass while keeping the algorithm's inputs, its
328
+ outputs, the step that does the real work, and its complexity.
329
+
330
+ TARGET:
331
+ The final version must reach this end state:
332
+ Under 100 words, understandable by a developer who has never seen the algorithm, with
333
+ no step omitted that they would need in order to implement it.
334
+
335
+ NUMBER OF ITERATIONS:
336
+ Run this many passes in total:
337
+ three passes.
338
+ Iteration 1: Cut to roughly 400 words by removing history, motivation, and
339
+ comparisons to other algorithms.
340
+ Iteration 2: Cut to roughly 200 words by reducing the worked example to its shortest
341
+ form and dropping any step the reader can infer from the ones around it.
342
+ Iteration 3: Cut to 100 words, keeping the inputs, the outputs, the central step, and
343
+ the complexity, and nothing else.
344
+
345
+ ITERATION INSTRUCTIONS:
346
+ In each pass, identify what can be cut, compressed, or clarified, apply the changes,
347
+ then check both that the result serves the goal above better than the version before
348
+ it and that nothing the goal requires keeping was lost. Stop when all three passes are
349
+ complete.
350
+
351
+ OUTPUT FORMAT:
352
+ Deliver the final version in this format:
353
+ a numbered list of steps followed by one sentence naming the time and space
354
+ complexity.
355
+
356
+ INTERMEDIATE VERSIONS:
357
+ Show the output of every iteration in order, labelled by pass number.
358
+
359
+ Compression has a floor. Past a point, passes strip meaning rather than filler. If a
360
+ pass would remove something a reader needs, stop at the previous version and deliver
361
+ that.
395
362
  ```
396
363
 
397
364
  ## Refinement Strategies