@ckelsoe/prompt-architect 3.0.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 (76) hide show
  1. package/.claude-plugin/marketplace.json +20 -0
  2. package/.claude-plugin/plugin.json +18 -0
  3. package/CHANGELOG.md +264 -0
  4. package/LICENSE +21 -0
  5. package/MIGRATION.md +66 -0
  6. package/README.md +1184 -0
  7. package/adapters/README.md +267 -0
  8. package/adapters/for-cursor.mdc +138 -0
  9. package/adapters/for-gemini-cli.md +70 -0
  10. package/adapters/for-github-copilot.md +141 -0
  11. package/adapters/for-openai-codex-cli.md +158 -0
  12. package/adapters/for-windsurf.md +136 -0
  13. package/adapters/system-prompt.md +243 -0
  14. package/package.json +135 -0
  15. package/scripts/install.js +490 -0
  16. package/scripts/test.js +213 -0
  17. package/scripts/validate-skill.js +350 -0
  18. package/skills/prompt-architect/SKILL.md +331 -0
  19. package/skills/prompt-architect/assets/templates/ape_template.txt +5 -0
  20. package/skills/prompt-architect/assets/templates/bab_template.txt +15 -0
  21. package/skills/prompt-architect/assets/templates/broke_template.txt +15 -0
  22. package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +18 -0
  23. package/skills/prompt-architect/assets/templates/care_template.txt +16 -0
  24. package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +46 -0
  25. package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +49 -0
  26. package/skills/prompt-architect/assets/templates/co-star_template.txt +17 -0
  27. package/skills/prompt-architect/assets/templates/crispe_template.txt +14 -0
  28. package/skills/prompt-architect/assets/templates/ctf_template.txt +15 -0
  29. package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +25 -0
  30. package/skills/prompt-architect/assets/templates/hybrid_template.txt +101 -0
  31. package/skills/prompt-architect/assets/templates/least-to-most_template.txt +16 -0
  32. package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +7 -0
  33. package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +27 -0
  34. package/skills/prompt-architect/assets/templates/race_template.txt +19 -0
  35. package/skills/prompt-architect/assets/templates/rcot_template.txt +31 -0
  36. package/skills/prompt-architect/assets/templates/react_template.txt +27 -0
  37. package/skills/prompt-architect/assets/templates/reverse-role_template.txt +11 -0
  38. package/skills/prompt-architect/assets/templates/rise-ie_template.txt +23 -0
  39. package/skills/prompt-architect/assets/templates/rise-ix_template.txt +28 -0
  40. package/skills/prompt-architect/assets/templates/risen_template.txt +21 -0
  41. package/skills/prompt-architect/assets/templates/rpef_template.txt +26 -0
  42. package/skills/prompt-architect/assets/templates/rtf_template.txt +13 -0
  43. package/skills/prompt-architect/assets/templates/self-refine_template.txt +16 -0
  44. package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +15 -0
  45. package/skills/prompt-architect/assets/templates/step-back_template.txt +10 -0
  46. package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +45 -0
  47. package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +30 -0
  48. package/skills/prompt-architect/references/frameworks/ape.md +200 -0
  49. package/skills/prompt-architect/references/frameworks/bab.md +242 -0
  50. package/skills/prompt-architect/references/frameworks/broke.md +242 -0
  51. package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +230 -0
  52. package/skills/prompt-architect/references/frameworks/care.md +235 -0
  53. package/skills/prompt-architect/references/frameworks/chain-of-density.md +479 -0
  54. package/skills/prompt-architect/references/frameworks/chain-of-thought.md +424 -0
  55. package/skills/prompt-architect/references/frameworks/co-star.md +256 -0
  56. package/skills/prompt-architect/references/frameworks/crispe.md +253 -0
  57. package/skills/prompt-architect/references/frameworks/ctf.md +207 -0
  58. package/skills/prompt-architect/references/frameworks/devils-advocate.md +206 -0
  59. package/skills/prompt-architect/references/frameworks/least-to-most.md +226 -0
  60. package/skills/prompt-architect/references/frameworks/plan-and-solve.md +210 -0
  61. package/skills/prompt-architect/references/frameworks/pre-mortem.md +197 -0
  62. package/skills/prompt-architect/references/frameworks/race.md +243 -0
  63. package/skills/prompt-architect/references/frameworks/rcot.md +203 -0
  64. package/skills/prompt-architect/references/frameworks/react.md +304 -0
  65. package/skills/prompt-architect/references/frameworks/reverse-role.md +189 -0
  66. package/skills/prompt-architect/references/frameworks/rise.md +555 -0
  67. package/skills/prompt-architect/references/frameworks/risen.md +297 -0
  68. package/skills/prompt-architect/references/frameworks/rpef.md +195 -0
  69. package/skills/prompt-architect/references/frameworks/rtf.md +358 -0
  70. package/skills/prompt-architect/references/frameworks/self-refine.md +205 -0
  71. package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +186 -0
  72. package/skills/prompt-architect/references/frameworks/step-back.md +206 -0
  73. package/skills/prompt-architect/references/frameworks/tidd-ec.md +470 -0
  74. package/skills/prompt-architect/references/frameworks/tree-of-thought.md +260 -0
  75. package/skills/prompt-architect/scripts/framework_analyzer.py +807 -0
  76. package/skills/prompt-architect/scripts/prompt_evaluator.py +336 -0
@@ -0,0 +1,235 @@
1
+ # CARE Framework
2
+
3
+ ## Overview
4
+
5
+ CARE (Context, Ask, Rules, Examples) is a practitioner framework from Nielsen Norman Group that adds an explicit **Rules** component to the standard context-task-examples pattern. This makes it particularly effective for tasks where constraints, guardrails, or quality standards need to be enforced — the Rules component directly addresses what the AI should and should not do, reducing the need for post-hoc correction.
6
+
7
+ **Origin:** Nielsen Norman Group (nngroup.com) — a leading UX and AI research firm. The NNg formulation focuses on making prompts "CAREFUL" — ensuring AI outputs are constrained, targeted, and appropriately scoped.
8
+
9
+ ## Components
10
+
11
+ ### C — Context
12
+ **Purpose:** Provide the background and situation needed to understand the task — who you are, what the situation is, and why this task matters.
13
+
14
+ **Questions to Ask:**
15
+ - Who are you in this situation?
16
+ - What's the broader context?
17
+ - Why is this task being done?
18
+
19
+ **Examples:**
20
+ - "I am a UX designer preparing for a usability study..."
21
+ - "We are a healthcare startup building a patient-facing mobile app..."
22
+ - "I am a manager writing a performance review for a direct report..."
23
+
24
+ ### A — Ask
25
+ **Purpose:** State the specific request — what you want the AI to produce or do.
26
+
27
+ **Questions to Ask:**
28
+ - What is the exact deliverable?
29
+ - What should the output be?
30
+
31
+ **Examples:**
32
+ - "Write a set of 5 interview questions for testing navigation usability..."
33
+ - "Draft a 3-paragraph executive summary of this technical report..."
34
+ - "Create a rubric for evaluating onboarding email effectiveness..."
35
+
36
+ ### R — Rules
37
+ **Purpose:** Define explicit constraints, guardrails, standards, and dos/don'ts that govern the output. This is the defining component of CARE — it makes requirements explicit rather than assumed.
38
+
39
+ **Questions to Ask:**
40
+ - What must be included?
41
+ - What must be avoided?
42
+ - What quality standards apply?
43
+ - What are the constraints (length, format, tone, reading level)?
44
+ - What would make this output wrong or unusable?
45
+
46
+ **Examples:**
47
+ - "Rules: Use plain language (max grade 8 reading level). Avoid medical jargon. Each question must be open-ended, not yes/no. Do not suggest answers in the question wording."
48
+ - "Rules: Under 300 words. No bullet points — prose only. Must include a clear recommendation. Do not mention competitor names."
49
+ - "Rules: Must comply with ADA language guidelines. No deficit-based language. First-person framing only."
50
+
51
+ ### E — Examples
52
+ **Purpose:** Provide 1-3 examples that demonstrate the desired output format, tone, style, or quality level.
53
+
54
+ **Questions to Ask:**
55
+ - Is there an existing example of what good looks like?
56
+ - What format should it match?
57
+ - What tone should it mirror?
58
+
59
+ **Examples:**
60
+ - "Example question: 'Walk me through how you would find the settings for your account.'"
61
+ - "Example summary paragraph: [paste existing example]"
62
+ - "Example format: [show template]"
63
+
64
+ ## Template Structure
65
+
66
+ ```
67
+ CONTEXT:
68
+ [Who you are, the situation, why this task exists]
69
+
70
+ ASK:
71
+ [The specific request and deliverable]
72
+
73
+ RULES:
74
+ [Explicit constraints — what must be included, what must be avoided,
75
+ quality standards, format requirements, length limits, tone requirements,
76
+ compliance requirements, reading level, etc.]
77
+
78
+ EXAMPLES:
79
+ [1-3 examples of desired output format, tone, or style]
80
+ ```
81
+
82
+ ## Complete Examples
83
+
84
+ ### Example 1: UX Research
85
+
86
+ **Before CARE:**
87
+ "Write interview questions for our usability study."
88
+
89
+ **After CARE:**
90
+ ```
91
+ CONTEXT:
92
+ I am a UX researcher preparing for a moderated usability study on our
93
+ mobile banking app's new money transfer flow. Participants are adults
94
+ aged 35-65 who are non-technical but regular smartphone users. The
95
+ study will be conducted remotely via Zoom with screen sharing.
96
+
97
+ ASK:
98
+ Write 6 interview questions for the post-task debrief, focusing on
99
+ comprehension, confidence, and friction points in the transfer flow.
100
+
101
+ RULES:
102
+ - All questions must be open-ended (no yes/no questions)
103
+ - Use plain, everyday language — no banking or UX jargon
104
+ - Do not suggest answers within the question (no leading questions)
105
+ - Each question should address one thing only (no double-barreled)
106
+ - Avoid "why" questions (use "what made you..." instead)
107
+ - Questions should take no more than 3 minutes each to answer
108
+
109
+ EXAMPLES:
110
+ Good: "What went through your mind when you reached the confirmation screen?"
111
+ Bad: "Was the confirmation screen clear and easy to understand?" (yes/no, leading)
112
+ ```
113
+
114
+ ### Example 2: Healthcare Content
115
+
116
+ **Before CARE:**
117
+ "Write patient education content about diabetes management."
118
+
119
+ **After CARE:**
120
+ ```
121
+ CONTEXT:
122
+ I am a health content writer for a patient portal used by adults with
123
+ Type 2 diabetes. Many patients have low health literacy. The content
124
+ will appear in a mobile app alongside their care plan.
125
+
126
+ ASK:
127
+ Write a 200-word article explaining why blood sugar monitoring matters
128
+ and how often to check.
129
+
130
+ RULES:
131
+ - Maximum 6th grade reading level (use Flesch-Kincaid as guide)
132
+ - Avoid medical jargon; if medical term must be used, define it
133
+ - Use active voice and second-person ("you") throughout
134
+ - No numbers or statistics unless critical — prefer plain descriptions
135
+ - Must include a clear, simple call to action at the end
136
+ - Do not recommend specific monitoring frequency — use "as directed by your doctor"
137
+ - Comply with plain language guidelines (short sentences, common words)
138
+
139
+ EXAMPLES:
140
+ Good sentence: "Checking your blood sugar helps you and your doctor
141
+ understand how your body responds to food and activity."
142
+ Bad sentence: "Glycemic monitoring enables patients to assess metabolic
143
+ response to dietary and physical stimuli."
144
+ ```
145
+
146
+ ### Example 3: Technical Writing
147
+
148
+ **Before CARE:**
149
+ "Write error messages for our app."
150
+
151
+ **After CARE:**
152
+ ```
153
+ CONTEXT:
154
+ I am a product designer writing UI error messages for a B2B data analytics
155
+ platform. Users are data analysts — technically literate but not developers.
156
+ Errors occur during data upload, query execution, and report generation.
157
+
158
+ ASK:
159
+ Write error messages for these 3 error states: (1) file format not supported,
160
+ (2) query timeout, (3) insufficient permissions to view a report.
161
+
162
+ RULES:
163
+ - Maximum 2 sentences per error message
164
+ - Must include: what happened + what the user can do about it
165
+ - Use plain language — no HTTP status codes, no stack traces, no internal IDs
166
+ - Active voice, direct address ("You can..." not "The user can...")
167
+ - Do not blame the user ("You uploaded the wrong format" is bad)
168
+ - Must include a specific actionable next step (not just "try again")
169
+ - Tone: calm, helpful, matter-of-fact — not apologetic or alarming
170
+
171
+ EXAMPLES:
172
+ Good: "This file type isn't supported. Try uploading a .CSV or .XLSX file."
173
+ Bad: "ERROR 415: Unsupported Media Type. The file format you attempted to
174
+ upload is not compatible with the system's ingestion pipeline."
175
+ ```
176
+
177
+ ## Best Use Cases
178
+
179
+ 1. **Compliance and Standards-Driven Content**
180
+ - Healthcare, legal, accessibility-compliant content
181
+ - Brand voice guidelines enforcement
182
+ - Plain language requirements
183
+
184
+ 2. **User-Facing Copy**
185
+ - UI text, error messages, onboarding
186
+ - When exact wording constraints matter
187
+ - When reading level or language standards apply
188
+
189
+ 3. **Research and Interview Materials**
190
+ - Survey questions, interview guides
191
+ - When question bias must be avoided
192
+ - When methodological standards apply
193
+
194
+ 4. **Any Task With Explicit Guardrails**
195
+ - Legal constraints ("do not mention X")
196
+ - Style guide compliance
197
+ - Format requirements that must not be violated
198
+
199
+ ## Selection Criteria
200
+
201
+ **Choose CARE when:**
202
+ - ✅ Explicit rules/constraints need to be enforced
203
+ - ✅ Quality standards are specific and non-negotiable
204
+ - ✅ Examples help clarify the standard
205
+ - ✅ The "what not to do" is as important as "what to do"
206
+ - ✅ Compliance, accessibility, or style guide requirements exist
207
+
208
+ **Avoid CARE when:**
209
+ - ❌ No specific rules apply → use simpler RTF, CTF, or APE
210
+ - ❌ Rich audience/tone work needed → use CO-STAR
211
+ - ❌ Multi-step process → use RISEN
212
+ - ❌ Transforming existing content → use BAB
213
+ - ❌ Need explicit Do/Don't lists with more structure → use TIDD-EC
214
+
215
+ ## CARE vs. TIDD-EC
216
+
217
+ Both have explicit constraint components. Key differences:
218
+
219
+ | | CARE | TIDD-EC |
220
+ |---|---|---|
221
+ | Rules format | Single Rules section (combined) | Separate Do and Don't sections |
222
+ | Examples position | At end | In the middle |
223
+ | Context | Yes | Yes |
224
+ | Best for | Constraint + example-driven tasks | High-precision tasks needing detailed positive/negative guidance |
225
+
226
+ **Rule of thumb:** If you need separate "do this" and "don't do this" lists → TIDD-EC. If rules can be combined in one section and examples are critical → CARE.
227
+
228
+ ## Quick Reference
229
+
230
+ | Component | Focus | Key Question |
231
+ |-----------|-------|--------------|
232
+ | Context | Situation | "What's the background?" |
233
+ | Ask | Request | "What do I need?" |
234
+ | Rules | Constraints | "What must / must not be done?" |
235
+ | Examples | Standard | "What does good look like?" |
@@ -0,0 +1,479 @@
1
+ # Chain of Density (CoD) Framework
2
+
3
+ ## Overview
4
+
5
+ Chain of Density is an iterative refinement technique that progressively improves outputs through multiple passes. Each iteration increases information density, removes redundancy, and enhances quality without significantly increasing length. It's based on the insight that iteration often produces better results than trying to get everything perfect in one shot.
6
+
7
+ ## Core Concept
8
+
9
+ Instead of requesting the perfect output immediately, CoD:
10
+ 1. Starts with a basic/verbose version
11
+ 2. Iteratively refines through multiple passes
12
+ 3. Increases information density each time
13
+ 4. Removes fluff and redundancy
14
+ 5. Enhances clarity and precision
15
+ 6. Converges on optimal output
16
+
17
+ Think of it as "progressive enhancement" for prompts.
18
+
19
+ ## When to Use Chain of Density
20
+
21
+ **Ideal for:**
22
+ - Summarization tasks
23
+ - Content compression
24
+ - Iterative improvement of writing
25
+ - Optimizing explanations
26
+ - Refining complex outputs
27
+ - Tasks where quality improves with iteration
28
+
29
+ **Not needed for:**
30
+ - Simple one-shot tasks
31
+ - When first draft is sufficient
32
+ - Time-critical quick tasks
33
+ - Tasks with fixed formats that can't improve
34
+
35
+ ## Implementation Approaches
36
+
37
+ ### Approach 1: Explicit Multi-Pass
38
+ Request multiple iterations upfront.
39
+
40
+ **Example:**
41
+ ```
42
+ Create a summary of this article using Chain of Density:
43
+
44
+ ITERATION 1:
45
+ Write a verbose summary hitting all main points (150-200 words)
46
+
47
+ ITERATION 2:
48
+ Refine the summary: increase information density, remove redundancy, keep it under 150 words
49
+
50
+ ITERATION 3:
51
+ Further refine: make every word count, increase precision, keep it under 120 words
52
+
53
+ ITERATION 4:
54
+ Final pass: maximize information density while maintaining clarity (100 words max)
55
+
56
+ ITERATION 5:
57
+ Ultimate compression: distill to absolute essentials (50 words max)
58
+
59
+ After all iterations, explain what improved in each pass.
60
+ ```
61
+
62
+ ### Approach 2: Recursive Refinement
63
+ Use output from one iteration as input to the next.
64
+
65
+ **Example:**
66
+ ```
67
+ PASS 1: Write a first draft explanation of quantum entanglement for a general audience.
68
+
69
+ PASS 2: Review your explanation. What's unclear? What's redundant? Rewrite it, addressing these issues.
70
+
71
+ PASS 3: Review again. Where can you be more precise? Where can you use better examples? Rewrite.
72
+
73
+ PASS 4: Final review. Every sentence should earn its place. Remove or improve anything that doesn't. Final version.
74
+
75
+ Show all passes so we can see the evolution.
76
+ ```
77
+
78
+ ### Approach 3: Targeted Improvement
79
+ Focus each iteration on specific aspect.
80
+
81
+ **Example:**
82
+ ```
83
+ Write a product description, then improve it iteratively:
84
+
85
+ DRAFT:
86
+ [Initial version]
87
+
88
+ ITERATION 1 - CLARITY:
89
+ Rewrite focusing on making it clearer and easier to understand.
90
+
91
+ ITERATION 2 - IMPACT:
92
+ Rewrite focusing on making it more compelling and persuasive.
93
+
94
+ ITERATION 3 - CONCISION:
95
+ Rewrite focusing on removing every unnecessary word.
96
+
97
+ ITERATION 4 - PRECISION:
98
+ Rewrite focusing on being more specific and accurate.
99
+
100
+ FINAL:
101
+ Combine the best elements from all iterations.
102
+ ```
103
+
104
+ ### Approach 4: Constraint-Based Refinement
105
+ Add tighter constraints with each iteration.
106
+
107
+ **Example:**
108
+ ```
109
+ Explain this technical concept through progressive refinement:
110
+
111
+ VERSION 1: Explain in 500 words or less
112
+ VERSION 2: Reduce to 300 words without losing key information
113
+ VERSION 3: Reduce to 150 words, keeping only essentials
114
+ VERSION 4: Create a 50-word version capturing the core idea
115
+ VERSION 5: One sentence (25 words max)
116
+
117
+ Each version should be complete and self-contained.
118
+ ```
119
+
120
+ ## Best Practices
121
+
122
+ ### 1. Define What to Optimize
123
+ ```
124
+ Good:
125
+ "Iterate to improve:
126
+ - Information density
127
+ - Clarity
128
+ - Conciseness
129
+ - Precision"
130
+
131
+ Poor:
132
+ "Make it better"
133
+ ```
134
+
135
+ ### 2. Specify Number of Iterations
136
+ ```
137
+ Good:
138
+ "Refine through 4 iterations, showing each version"
139
+
140
+ Poor:
141
+ "Keep improving until it's good"
142
+ ```
143
+
144
+ ### 3. Show Evolution
145
+ ```
146
+ Good:
147
+ "Show each iteration and explain what changed and why"
148
+
149
+ Poor:
150
+ "Just give me the final version"
151
+ ```
152
+
153
+ ### 4. Set Clear Constraints
154
+ ```
155
+ Good:
156
+ "Each iteration should be 20% shorter while maintaining completeness"
157
+
158
+ Poor:
159
+ "Make it shorter"
160
+ ```
161
+
162
+ ## Complete Examples
163
+
164
+ ### Example 1: Summarization
165
+
166
+ **Without CoD:**
167
+ ```
168
+ Summarize this research paper.
169
+ ```
170
+
171
+ **With CoD:**
172
+ ```
173
+ Summarize this research paper using Chain of Density:
174
+
175
+ [Paper content]
176
+
177
+ ITERATION 1 (200 words):
178
+ Create a comprehensive summary covering all major points. Prioritize completeness over brevity.
179
+
180
+ ITERATION 2 (150 words):
181
+ Refine the summary:
182
+ - Remove redundant information
183
+ - Combine related points
184
+ - Increase information density
185
+
186
+ ITERATION 3 (100 words):
187
+ Further compression:
188
+ - Keep only essential information
189
+ - Make every sentence count
190
+ - Maintain accuracy
191
+
192
+ ITERATION 4 (75 words):
193
+ Maximum density:
194
+ - Distill to core findings
195
+ - Remove all fluff
196
+ - Preserve critical details
197
+
198
+ For each iteration, highlight what you removed and why.
199
+ ```
200
+
201
+ ### Example 2: Code Documentation
202
+
203
+ **Without CoD:**
204
+ ```
205
+ Document this function.
206
+ ```
207
+
208
+ **With CoD:**
209
+ ```
210
+ Document this function through iterative refinement:
211
+
212
+ [Code]
213
+
214
+ DRAFT DOCUMENTATION:
215
+ Write complete documentation with examples, edge cases, everything.
216
+
217
+ ITERATION 1 - CLARITY:
218
+ Review and rewrite confusing sections. Add examples where helpful.
219
+
220
+ ITERATION 2 - CONCISION:
221
+ Remove redundancy. Combine related points. Make it tighter.
222
+
223
+ ITERATION 3 - PRECISION:
224
+ Be more specific about types, behaviors, edge cases.
225
+
226
+ ITERATION 4 - USABILITY:
227
+ Optimize for developer experience. What do they need to know most?
228
+
229
+ Show each version and explain key changes.
230
+ ```
231
+
232
+ ### Example 3: Email Refinement
233
+
234
+ **Without CoD:**
235
+ ```
236
+ Write an email announcing this feature.
237
+ ```
238
+
239
+ **With CoD:**
240
+ ```
241
+ Draft an announcement email, then refine it:
242
+
243
+ DRAFT:
244
+ Write a first draft covering all important information.
245
+
246
+ ITERATION 1 - STRUCTURE:
247
+ Reorganize for better flow. Most important information first.
248
+
249
+ ITERATION 2 - CLARITY:
250
+ Simplify language. Remove jargon. Make it scannable.
251
+
252
+ ITERATION 3 - ENGAGEMENT:
253
+ Strengthen the call-to-action. Make it more compelling.
254
+
255
+ ITERATION 4 - POLISH:
256
+ Final edits for tone, concision, impact.
257
+
258
+ Show the evolution and explain major changes.
259
+ ```
260
+
261
+ ### Example 4: Technical Explanation
262
+
263
+ **Without CoD:**
264
+ ```
265
+ Explain how this algorithm works.
266
+ ```
267
+
268
+ **With CoD:**
269
+ ```
270
+ Explain this algorithm through progressive refinement:
271
+
272
+ PASS 1 - COMPREHENSIVE:
273
+ Explain thoroughly, assuming no prior knowledge. Include:
274
+ - What it does
275
+ - How it works
276
+ - Why it's designed this way
277
+ - Example walkthrough
278
+
279
+ PASS 2 - REFINED:
280
+ Review Pass 1. What's unclear? What's redundant? Rewrite addressing these.
281
+
282
+ PASS 3 - OPTIMIZED:
283
+ Make it maximally clear and concise. Every paragraph must earn its place.
284
+
285
+ PASS 4 - POLISHED:
286
+ Final pass. Perfect clarity, zero fluff, optimal examples.
287
+
288
+ Show all passes and note significant improvements.
289
+ ```
290
+
291
+ ## Combining CoD with Other Frameworks
292
+
293
+ ### CoD + CO-STAR
294
+ ```
295
+ CONTEXT: [Background]
296
+ OBJECTIVE: [Goal]
297
+ STYLE: [Writing style]
298
+ TONE: [Tone]
299
+ AUDIENCE: [Readers]
300
+
301
+ RESPONSE PROCESS (Chain of Density):
302
+ Draft 1: [Comprehensive version]
303
+ Draft 2: [Refined for clarity]
304
+ Draft 3: [Optimized for audience]
305
+ Draft 4: [Final polished version]
306
+ ```
307
+
308
+ ### CoD + RISEN
309
+ ```
310
+ ROLE: [Expertise]
311
+ INSTRUCTIONS: Use iterative refinement
312
+ STEPS:
313
+ 1. Create initial version
314
+ 2. Review and identify weaknesses
315
+ 3. Refine addressing weaknesses
316
+ 4. Repeat until optimal
317
+ END GOAL: [Final quality criteria]
318
+ NARROWING: [Constraints on iterations]
319
+ ```
320
+
321
+ ### CoD + Chain of Thought
322
+ ```
323
+ For each iteration of Chain of Density, use Chain of Thought:
324
+
325
+ ITERATION 1:
326
+ Think through: What should this initial version include?
327
+ [Create version]
328
+
329
+ ITERATION 2:
330
+ Think through: What weaknesses exist? How to address them?
331
+ [Refine version]
332
+
333
+ ITERATION 3:
334
+ Think through: What can be compressed or improved?
335
+ [Further refine]
336
+ ```
337
+
338
+ ## Advanced Techniques
339
+
340
+ ### Aspect-Focused Iteration
341
+ Each iteration improves a different dimension:
342
+
343
+ ```
344
+ ITERATION 1 - ACCURACY: Get the facts right
345
+ ITERATION 2 - CLARITY: Make it understandable
346
+ ITERATION 3 - CONCISION: Remove waste
347
+ ITERATION 4 - IMPACT: Make it compelling
348
+ ITERATION 5 - STYLE: Polish the voice
349
+ ```
350
+
351
+ ### A/B Iteration Branches
352
+ Create alternative versions and merge best parts:
353
+
354
+ ```
355
+ DRAFT: [Initial version]
356
+
357
+ BRANCH A - CONCISION:
358
+ [Optimize for brevity]
359
+
360
+ BRANCH B - COMPLETENESS:
361
+ [Optimize for thoroughness]
362
+
363
+ MERGE:
364
+ Combine the best elements of both branches.
365
+ ```
366
+
367
+ ### Constrained Progressive Compression
368
+ ```
369
+ VERSION 1: 1000 words - Complete explanation
370
+ VERSION 2: 500 words - 50% compression
371
+ VERSION 3: 250 words - 75% compression
372
+ VERSION 4: 100 words - 90% compression
373
+ VERSION 5: 25 words - 97.5% compression
374
+
375
+ Each version must be self-contained and accurate.
376
+ ```
377
+
378
+ ### Quality Metric Iteration
379
+ ```
380
+ ITERATION 1:
381
+ [Create initial version]
382
+ Self-assess (1-10): Clarity ___ Concision ___ Accuracy ___ Impact ___
383
+
384
+ ITERATION 2:
385
+ [Improve lowest scoring dimension]
386
+ Self-assess: Clarity ___ Concision ___ Accuracy ___ Impact ___
387
+
388
+ ITERATION 3:
389
+ [Improve next lowest dimension]
390
+ Self-assess: Clarity ___ Concision ___ Accuracy ___ Impact ___
391
+
392
+ Continue until all metrics > 8
393
+ ```
394
+
395
+ ## Refinement Strategies
396
+
397
+ ### What to Remove
398
+ - Redundant information
399
+ - Obvious statements
400
+ - Unnecessary qualifiers ("very", "really")
401
+ - Passive voice (often)
402
+ - Filler words
403
+ - Overly general statements
404
+
405
+ ### What to Add
406
+ - Specific examples
407
+ - Precise numbers
408
+ - Concrete details
409
+ - Missing context (if essential)
410
+ - Clarifying examples
411
+
412
+ ### What to Improve
413
+ - Vague language → specific language
414
+ - Long sentences → shorter, punchier
415
+ - Complex words → simpler alternatives (if clearer)
416
+ - Weak verbs → strong verbs
417
+ - Passive voice → active voice
418
+
419
+ ## Quality Indicators
420
+
421
+ **Good CoD iterations show:**
422
+ - ✅ Measurable improvement each pass
423
+ - ✅ Increased information density
424
+ - ✅ Reduced redundancy
425
+ - ✅ Maintained accuracy
426
+ - ✅ Enhanced clarity
427
+ - ✅ Clear evolution path
428
+
429
+ **Poor CoD iterations show:**
430
+ - ❌ No meaningful change
431
+ - ❌ Loss of important information
432
+ - ❌ Decreased clarity
433
+ - ❌ Introduced errors
434
+ - ❌ Just made it shorter without improvement
435
+
436
+ ## Use Cases
437
+
438
+ ### 1. Content Summarization
439
+ Taking long documents and progressively distilling essence
440
+
441
+ ### 2. Message Refinement
442
+ Iteratively improving emails, announcements, communications
443
+
444
+ ### 3. Documentation Optimization
445
+ Making docs clearer and more concise through iteration
446
+
447
+ ### 4. Explanation Enhancement
448
+ Progressively improving how concepts are explained
449
+
450
+ ### 5. Writing Polish
451
+ Iterative editing of creative or professional writing
452
+
453
+ ### 6. Presentation Optimization
454
+ Refining slides/talks through multiple passes
455
+
456
+ ## Assessment Checklist
457
+
458
+ When using Chain of Density:
459
+ - [ ] Task benefits from iteration
460
+ - [ ] Number of iterations specified
461
+ - [ ] Optimization goals are clear
462
+ - [ ] Each iteration has purpose
463
+ - [ ] Constraints defined for each pass
464
+ - [ ] Evolution is tracked/shown
465
+ - [ ] Quality criteria established
466
+ - [ ] Stopping condition exists
467
+ - [ ] Final version is actually better
468
+ - [ ] Process improved understanding
469
+
470
+ ## Tips for Success
471
+
472
+ 1. **Start Verbose**: First iteration should be complete, even if wordy
473
+ 2. **One Focus Per Iteration**: Don't try to improve everything at once
474
+ 3. **Show Your Work**: Display each iteration to see progress
475
+ 4. **Set Constraints**: Give specific targets (word counts, focus areas)
476
+ 5. **Verify Improvement**: Check that each iteration actually improves quality
477
+ 6. **Don't Over-Iterate**: 3-5 iterations usually sufficient
478
+ 7. **Preserve Accuracy**: Never sacrifice correctness for brevity
479
+ 8. **Explain Changes**: Note what improved and why