@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
@@ -2,14 +2,14 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- CO-STAR is a comprehensive prompting framework that emphasizes context, audience, and communication style. It's particularly effective for content creation, writing tasks, and scenarios where tone and audience considerations significantly impact output quality.
5
+ CO-STAR is a comprehensive prompting framework that emphasizes context, audience, and communication style. It's particularly effective for content creation, writing tasks, and scenarios where tone and audience considerations significantly impact output quality. Section headers are stripped at emission, so a CO-STAR prompt lands as a flat block of prose — a paragraph of context, a stated objective, and self-standing sentences for style, tone, audience, and response format — preceded by an optional source-material block whenever the content is built from an artifact the user already has. Because the `STYLE`, `TONE`, and `AUDIENCE` labels do not survive, those slots have to be written as complete sentences rather than the bare descriptors ("professional yet friendly," "senior executives") they would otherwise collapse to.
6
6
 
7
7
  **Origin:** Developed by the Data Science & AI team at GovTech (Government Technology Agency of Singapore), and popularized by Sheila Teo, who won GovTech's "Prompt Royale" — Singapore's first GPT-4 prompt engineering competition, 400+ participants, finale 8 November 2023. Teo credits the framework to GovTech rather than to herself: "The CO-STAR framework, a brainchild of GovTech Singapore's Data Science & AI team, is a handy template for structuring prompts." Practitioner framework — no controlled evaluation of CO-STAR has been published.
8
8
 
9
9
  ## Components
10
10
 
11
11
  ### C - Context
12
- **Purpose:** Provide background information, situational details, and constraints.
12
+ **Purpose:** Provide background information, situational details, and constraints. It fills as a self-contained paragraph and survives header stripping on its own, so long as it reads as description of a situation rather than a bare label.
13
13
 
14
14
  **Questions to Ask:**
15
15
  - What's the background situation?
@@ -19,12 +19,12 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
19
19
  - Are there any limitations or restrictions?
20
20
 
21
21
  **Examples:**
22
- - "You're working with a startup that has limited resources..."
23
- - "This is for a formal government report..."
24
- - "The user base is primarily non-technical..."
22
+ - "You're working with a startup that has limited resources."
23
+ - "This is for a formal government report."
24
+ - "The user base is primarily non-technical."
25
25
 
26
26
  ### O - Objective
27
- **Purpose:** Define the clear, specific goal to be achieved.
27
+ **Purpose:** Define the clear, specific goal to be achieved, as one complete imperative sentence. Nothing else in the prompt states the task, so once the `OBJECTIVE` header is gone a bare goal fragment leaves the emitted prompt without an instruction.
28
28
 
29
29
  **Questions to Ask:**
30
30
  - What exactly do you want accomplished?
@@ -33,12 +33,12 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
33
33
  - Are there secondary goals?
34
34
 
35
35
  **Examples:**
36
- - "Create a comprehensive product comparison..."
37
- - "Generate ideas for reducing customer churn..."
38
- - "Explain the concept in simple terms..."
36
+ - "Create a comprehensive product comparison of the three tools above."
37
+ - "Generate ideas for reducing customer churn."
38
+ - "Explain the concept in simple terms."
39
39
 
40
40
  ### S - Style
41
- **Purpose:** Specify the writing style, format, and structural preferences.
41
+ **Purpose:** Specify the writing style, format, and structural preferences. Phrase it as an instruction ("Write in…", "Follow…"), not a bare descriptor, because the `STYLE` header is stripped and a fragment like "journalistic, short paragraphs" no longer reads as a directive on its own.
42
42
 
43
43
  **Questions to Ask:**
44
44
  - What writing style is appropriate?
@@ -48,12 +48,12 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
48
48
  - Any style guides to follow?
49
49
 
50
50
  **Examples:**
51
- - "Use a journalistic style with short paragraphs..."
52
- - "Follow AP style guidelines..."
53
- - "Write in a conversational, blog-post style..."
51
+ - "Use a journalistic style with short paragraphs."
52
+ - "Follow AP style guidelines."
53
+ - "Write in a conversational, blog-post style."
54
54
 
55
55
  ### T - Tone
56
- **Purpose:** Set the emotional quality and attitude of the response.
56
+ **Purpose:** Set the emotional quality and attitude of the response. Because the `TONE` header does not survive emission, write the slot as a complete sentence ("Keep the tone…", "Sound…") — a bare adjective phrase like "professional yet friendly" dangles once the label is deleted.
57
57
 
58
58
  **Questions to Ask:**
59
59
  - What emotional quality should it have?
@@ -62,13 +62,13 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
62
62
  - Urgent or measured?
63
63
 
64
64
  **Examples:**
65
- - "Professional yet friendly..."
66
- - "Urgent and action-oriented..."
67
- - "Empathetic and supportive..."
68
- - "Confident and authoritative..."
65
+ - "Keep the tone professional yet friendly."
66
+ - "Make it urgent and action-oriented."
67
+ - "Keep it empathetic and supportive."
68
+ - "Sound confident and authoritative."
69
69
 
70
70
  ### A - Audience
71
- **Purpose:** Identify who will consume the output and their characteristics.
71
+ **Purpose:** Identify who will consume the output and their characteristics. Name the audience in a complete sentence ("The audience is…"), because the `AUDIENCE` header is stripped and a bare noun phrase like "senior executives" would otherwise sit in the flat block with nothing marking it as the reader.
72
72
 
73
73
  **Questions to Ask:**
74
74
  - Who is the target audience?
@@ -78,12 +78,12 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
78
78
  - What's their context?
79
79
 
80
80
  **Examples:**
81
- - "Senior executives with limited technical knowledge..."
82
- - "Junior developers learning the framework..."
83
- - "Parents of elementary school children..."
81
+ - "The audience is senior executives with limited technical knowledge."
82
+ - "The audience is junior developers learning the framework."
83
+ - "The audience is parents of elementary school children."
84
84
 
85
85
  ### R - Response
86
- **Purpose:** Define the expected output format and structure.
86
+ **Purpose:** Define the expected output format and structure. Phrase it as an instruction about the output ("Provide…", "Format the result as…") so it still reads as a directive once the `RESPONSE FORMAT` header is removed.
87
87
 
88
88
  **Questions to Ask:**
89
89
  - What format should the output take?
@@ -93,61 +93,117 @@ CO-STAR is a comprehensive prompting framework that emphasizes context, audience
93
93
  - What level of detail is needed?
94
94
 
95
95
  **Examples:**
96
- - "Provide a 500-word article with 3 main sections..."
97
- - "Create a bulleted list of 10 items..."
98
- - "Generate a table comparing features..."
96
+ - "Provide a 500-word article with 3 main sections."
97
+ - "Format the result as a bulleted list of 10 items."
98
+ - "Generate a table comparing features."
99
99
 
100
100
  ## Template Structure
101
101
 
102
+ Section headers are stripped at emission, so every slot's meaning is carried by the prose
103
+ around and inside it rather than by the header above it. Context is a self-contained
104
+ paragraph and survives on its own; Objective must be a complete imperative sentence; and
105
+ Style, Tone, Audience, and Response Format each have to be phrased as a full sentence,
106
+ because the labels that would otherwise mark them as style, tone, audience, or format are
107
+ the first thing deleted.
108
+
102
109
  ```
110
+ SOURCE MATERIAL:
111
+ [OPTIONAL — include only if the content is built from material the user already has.
112
+ If so, emit a literal paste instruction naming the specific artifact, e.g. "[Paste the Q3 revenue report here]"
113
+ or "[Paste the blog post whose voice should be matched here]" — never a generic word like "content" —
114
+ then one line of prose tying it to what follows, e.g. "Use the material above as the factual and stylistic
115
+ basis for what you produce; do not invent details it does not support."
116
+ If the content is written entirely from scratch, omit this section — do not emit an empty placeholder.]
117
+
103
118
  CONTEXT:
104
- [Background information, situation, constraints]
119
+ [Provide background information, situation, and any relevant constraints. What's the setting? What's happened before? What limitations exist?]
105
120
 
106
121
  OBJECTIVE:
107
- [Clear, specific goal to achieve]
122
+ [State the clear, specific goal you want to achieve. What exactly do you want accomplished? What does success look like?]
108
123
 
109
124
  STYLE:
110
- [Writing style, format preferences]
125
+ [Specify the writing style, format preferences, and structural approach. Should it follow a particular style guide? What format is needed?]
111
126
 
112
127
  TONE:
113
- [Emotional quality, formality level]
128
+ [Define the emotional quality and attitude. Should it be professional, casual, urgent, friendly, authoritative, empathetic, etc.?]
114
129
 
115
130
  AUDIENCE:
116
- [Target audience characteristics]
131
+ [Identify who will consume this output. What's their expertise level? What do they care about? What are their characteristics?]
117
132
 
118
133
  RESPONSE FORMAT:
119
- [Expected output structure and format]
134
+ [Specify the expected output structure. How long? What sections? What level of detail? Any specific format requirements?]
120
135
  ```
121
136
 
122
- ## Complete Example
137
+ `SOURCE MATERIAL` is a seventh block in a six-letter acronym, and it carries no letter
138
+ because it is optional. Much CO-STAR work rewrites, repurposes, or matches the voice of
139
+ something that already exists — a report to summarize, a press release to adapt, a post
140
+ whose style should be echoed — and that artifact is pasted here, named concretely (never
141
+ the generic word "content"), and referred to as "the … above" from inside the Objective.
142
+ Delete the block whenever the content is written entirely from scratch; do not leave an
143
+ empty placeholder.
144
+
145
+ ## Complete Examples
123
146
 
124
- ### Before CO-STAR:
147
+ Every example below is shown in emitted form: each slot carries its own role in prose.
148
+ Read the headers as scaffolding that will be deleted — the examples are written so that
149
+ nothing is lost when it is, which is why Style, Tone, Audience, and Response Format each
150
+ read as a complete sentence.
151
+
152
+ ### Example 1: Health Blog Article
153
+
154
+ **Before CO-STAR:**
125
155
  "Write about the benefits of exercise."
126
156
 
127
- ### After CO-STAR:
157
+ **After CO-STAR** (no source material — the article is written from scratch, so the
158
+ `SOURCE MATERIAL` block is omitted):
128
159
  ```
129
160
  CONTEXT:
130
161
  I'm creating content for a health blog aimed at busy professionals who struggle to find time for fitness. Previous articles have focused on nutrition, and this is part of a series on lifestyle improvements.
131
162
 
132
163
  OBJECTIVE:
133
- Create an engaging article that convinces time-pressed professionals that exercise is worth prioritizing, focusing on benefits beyond just physical health.
164
+ Write an engaging article that convinces time-pressed professionals that exercise is worth prioritizing, focusing on benefits beyond just physical health.
134
165
 
135
166
  STYLE:
136
167
  Use a conversational blog style with short paragraphs (2-3 sentences), subheadings every 150-200 words, and occasional bullet points for key takeaways. Include specific examples and avoid medical jargon.
137
168
 
138
169
  TONE:
139
- Encouraging and motivating without being preachy. Acknowledge their time constraints and show empathy for their challenges. Be practical and realistic rather than idealistic.
170
+ Keep the tone encouraging and motivating without being preachy. Acknowledge their time constraints and show empathy for their challenges, and stay practical and realistic rather than idealistic.
171
+
172
+ AUDIENCE:
173
+ The audience is professionals aged 30-50 who work 50+ hour weeks, have limited free time, may have families, and currently don't exercise regularly. They're skeptical of fitness advice that seems unrealistic for their lifestyle.
174
+
175
+ RESPONSE FORMAT:
176
+ Produce an 800-word article with an engaging headline, a brief 2-3 sentence introduction, 4-5 main sections with subheadings, bullet points highlighting key benefits, and a practical conclusion with next steps.
177
+ ```
178
+
179
+ ### Example 2: Executive Summary from a Report
180
+
181
+ **Before CO-STAR:**
182
+ "Summarize this report for the board."
183
+
184
+ **After CO-STAR** (source material supplied):
185
+ ```
186
+ SOURCE MATERIAL:
187
+ [Paste the Q3 revenue report here]
188
+ Use the material above as the factual and stylistic basis for what you produce; do not invent details it does not support.
189
+
190
+ CONTEXT:
191
+ I'm the head of finance at a mid-size SaaS company, preparing a summary of our Q3 performance for the board's quarterly meeting. The full report above is 20 pages of financial detail, and the board sees dozens of documents per meeting.
192
+
193
+ OBJECTIVE:
194
+ Distill the Q3 revenue report above into a one-page summary the board can absorb in two minutes, surfacing the numbers and trends that bear on strategic decisions.
195
+
196
+ STYLE:
197
+ Write in a crisp executive-brief style: lead with the conclusion, use short declarative sentences, and support each claim with a figure drawn from the report above rather than a general statement.
198
+
199
+ TONE:
200
+ Keep the tone measured and factual — neither alarmist about the misses nor promotional about the wins.
140
201
 
141
202
  AUDIENCE:
142
- Professionals aged 30-50 who work 50+ hour weeks, have limited free time, may have families, and currently don't exercise regularly. They're skeptical of fitness advice that seems unrealistic for their lifestyle.
203
+ The audience is board members who are financially literate but not close to day-to-day operations; they care about growth, runway, and risk, not implementation detail.
143
204
 
144
205
  RESPONSE FORMAT:
145
- 800-word article with:
146
- - Engaging headline
147
- - Brief introduction (2-3 sentences)
148
- - 4-5 main sections with subheadings
149
- - Bullet points highlighting key benefits
150
- - Practical conclusion with next steps
206
+ Produce a single page: three sentences of headline takeaways, then a short table of the key metrics with quarter-over-quarter change, then a four-item bulleted list of the decisions or risks that need the board's attention.
151
207
  ```
152
208
 
153
209
  ## Best Use Cases
@@ -4,11 +4,13 @@
4
4
 
5
5
  CRISPE is a comprehensive general-purpose prompting framework covering six dimensions: Capacity and Role, Insight, Instructions, Personality, and Experiment. Its defining feature — the **Experiment** component — sets it apart from similar frameworks by explicitly asking the AI to produce multiple variants, approaches, or versions, enabling the user to compare and choose the best output rather than accepting a single answer.
6
6
 
7
- **Origin:** Developed by Matt Nigh (community framework, 2022). Since adopted in clinical AI literature (cited in PMC peer-reviewed medical AI studies, 2024-2025) and educational technology research (Springer, 2025).
7
+ **Origin:** Community framework, commonly attributed to Matt Nigh (2022). No primary source for that attribution has been verified for this package. Practitioner framework no controlled evaluation of CRISPE has been published.
8
+
9
+ *Correction:* an earlier version of this file stated that CRISPE was "cited in PMC peer-reviewed medical AI studies, 2024-2025" and in "educational technology research (Springer, 2025)." Those claims named no title, author, DOI, or PMCID and were not checkable as written, so they have been removed. Being *mentioned* in a paper would not constitute evaluation of the framework in any case.
8
10
 
9
11
  ## Components
10
12
 
11
- ### C — Capacity and Role
13
+ ### C, R — Capacity and Role
12
14
  **Purpose:** Define the expertise level and professional role the AI should embody. More specific than a simple "you are a..." — it combines the *type* of expertise with the *level* of sophistication expected.
13
15
 
14
16
  **Questions to Ask:**
@@ -21,7 +23,7 @@ CRISPE is a comprehensive general-purpose prompting framework covering six dimen
21
23
  - "You are a senior software architect specializing in distributed systems..."
22
24
  - "Act as a world-class UX researcher who has run hundreds of user interviews..."
23
25
 
24
- ### R — Insight
26
+ ### I — Insight
25
27
  **Purpose:** Provide the background context, data, or knowledge the AI needs to perform the task effectively. This is the "briefing" — what you'd tell a new consultant before they start work.
26
28
 
27
29
  **Questions to Ask:**
@@ -34,7 +36,7 @@ CRISPE is a comprehensive general-purpose prompting framework covering six dimen
34
36
  - "Context: our team uses Python exclusively, we have a 3-month deadline, and our infrastructure is AWS..."
35
37
  - "Background: this is for a Series A startup pitching to enterprise buyers for the first time..."
36
38
 
37
- ### I — Instructions
39
+ ### S — Instructions
38
40
  **Purpose:** State clearly and specifically what the AI should do. The task itself, with enough detail to remove ambiguity.
39
41
 
40
42
  **Questions to Ask:**
@@ -47,7 +49,7 @@ CRISPE is a comprehensive general-purpose prompting framework covering six dimen
47
49
  - "Create a technical design document for this feature..."
48
50
  - "Analyze this data and identify the top 3 risk factors..."
49
51
 
50
- ### S — Personality (Style)
52
+ ### P — Personality (Style)
51
53
  **Purpose:** Define the tone, voice, and communication style of the response. Sets how the output should *feel* — the personality it should embody.
52
54
 
53
55
  **Questions to Ask:**
@@ -2,14 +2,14 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- CTF is a simple 3-component framework focused on situational context, task clarity, and output format. It is ideal for tasks where background/situation is more important than AI persona framing, and the primary concern is getting a clearly defined output from a well-understood context.
5
+ CTF is a simple 3-component framework focused on situational context, task clarity, and output format. It is ideal for tasks where background/situation is more important than AI persona framing, and the primary concern is getting a clearly defined output from a well-understood context. Section headers are stripped when the prompt is emitted, so a CTF prompt lands as a short flat block — a paragraph of situation, a sentence naming the task, and a format specification — preceded by an optional source-material block whenever the task operates on an artifact that already exists.
6
6
 
7
7
  **Origin:** No single documented originator. CTF appears in the community framework literature as a variant of RTF, with Context substituted for Role, documented alongside it in unattributed practitioner listings from 2024 onward (e.g. fvivas.com, 15 March 2024). No academic treatment; absent from The Prompt Report (arXiv 2406.06608).
8
8
 
9
9
  ## Components
10
10
 
11
11
  ### C - Context
12
- **Purpose:** Describe the situation, background, or circumstances surrounding the task.
12
+ **Purpose:** Describe the situation, background, or circumstances surrounding the task. It fills naturally as a self-contained paragraph of situational prose, so it survives header stripping on its own — but keep it descriptive narrative, not a bare label like "legacy code," so the paragraph still reads as a situation once the `CONTEXT` header is gone.
13
13
 
14
14
  **Questions to Ask:**
15
15
  - What is the current situation?
@@ -19,12 +19,12 @@ CTF is a simple 3-component framework focused on situational context, task clari
19
19
  - What constraints or circumstances apply?
20
20
 
21
21
  **Examples:**
22
- - "We are mid-sprint and the client has changed the acceptance criteria for the login flow..."
23
- - "I'm a junior developer onboarding to a legacy Python codebase with no documentation..."
24
- - "Our team writes internal status reports weekly and we need to standardize the format..."
22
+ - "We are mid-sprint and the client has revised the acceptance criteria in the requirements doc above; the dev team has not been told yet."
23
+ - "I am a junior developer onboarding to the legacy Python module above, which nobody has documented."
24
+ - "Our team writes internal status reports weekly and the format drifts every time, so we want one reusable structure."
25
25
 
26
26
  ### T - Task
27
- **Purpose:** State exactly what needs to be done.
27
+ **Purpose:** State exactly what needs to be done, as one complete imperative sentence. Nothing else in a CTF prompt states the task, so once the `TASK` header is stripped a bare noun phrase ("a summary") leaves the emitted prompt with no instruction in it.
28
28
 
29
29
  **Questions to Ask:**
30
30
  - What exactly needs to be done?
@@ -32,12 +32,12 @@ CTF is a simple 3-component framework focused on situational context, task clari
32
32
  - What's the core action?
33
33
 
34
34
  **Examples:**
35
- - "Write a summary of the changed requirements for the team..."
36
- - "Explain what this function does in plain language..."
37
- - "Create a template for our weekly status report..."
35
+ - "Summarize the changed requirements in the doc above for the development team."
36
+ - "Explain in plain language what the function above does."
37
+ - "Create a reusable weekly status report template the team can fill out in under 10 minutes."
38
38
 
39
39
  ### F - Format
40
- **Purpose:** Specify how the output should be structured.
40
+ **Purpose:** Specify how the output should be structured. Phrase it as an instruction about the output rather than a bare descriptor — a fragment like "markdown table" dangles once the `FORMAT` header is deleted, whereas "Provide the output as a markdown table" still reads as a directive.
41
41
 
42
42
  **Questions to Ask:**
43
43
  - What format should the output take?
@@ -46,46 +46,80 @@ CTF is a simple 3-component framework focused on situational context, task clari
46
46
  - Any specific formatting requirements?
47
47
 
48
48
  **Examples:**
49
- - "Provide as a markdown table..."
50
- - "Format as a bulleted list under three headings..."
51
- - "Write as a concise paragraph, 100 words max..."
49
+ - "Provide the output as a markdown table."
50
+ - "Format the answer as a bulleted list under three headings."
51
+ - "Write the answer as a single paragraph of 100 words or fewer."
52
52
 
53
53
  ## Template Structure
54
54
 
55
+ Section headers are stripped at emission, so every slot's meaning is carried by the prose
56
+ around and inside it rather than by the header above it. Context is a self-contained
57
+ paragraph and survives on its own; Task must be a complete imperative sentence, and Format
58
+ must be phrased as an instruction about the output, because neither has a header to lean on
59
+ once emitted.
60
+
55
61
  ```
62
+ SOURCE MATERIAL:
63
+ [Optional — include only if this task operates on material you already have. Paste the
64
+ specific artifact here and name it in this line, e.g. "Paste the legacy authentication
65
+ function here", "Paste the revised requirements doc here" — the artifact itself, not a
66
+ description of it. If this task generates from scratch, delete this bracketed block along
67
+ with the sentence directly below it.]
68
+ Use the material above as the basis for the task described below.
69
+
56
70
  CONTEXT:
57
- [Situation, background, circumstances]
71
+ [Describe the situation, background, or circumstances surrounding this task.
72
+ Include relevant details like: current state, constraints, what's already been done,
73
+ why this is needed, and any important background the AI should know.]
58
74
 
59
75
  TASK:
60
- [What needs to be done]
76
+ [State clearly and specifically what needs to be done. Be explicit about the deliverable.]
61
77
 
62
78
  FORMAT:
63
- [How output should be structured]
79
+ [Specify exactly how the output should be structured:
80
+ - Overall format (document, code, list, table, etc.)
81
+ - Required sections or components
82
+ - Length constraints
83
+ - Style requirements
84
+ - Any specific formatting rules]
64
85
  ```
65
86
 
87
+ `SOURCE MATERIAL` is a fourth block in a three-letter acronym, and it carries no letter
88
+ because it is optional. CTF is often pointed at something that already exists — a legacy
89
+ function, a revised requirements doc, a draft — and that artifact is pasted here and
90
+ referred to as "the … above" from inside the Task. Delete the block and the sentence
91
+ beneath it whenever the task generates something from scratch.
92
+
66
93
  ## Complete Examples
67
94
 
95
+ Every example below is shown in emitted form: each slot carries its own role in prose.
96
+ Read the headers as scaffolding that will be deleted — the examples are written so that
97
+ nothing is lost when it is.
98
+
68
99
  ### Example 1: Requirement Change Summary
69
100
 
70
101
  **Before CTF:**
71
102
  "Summarize the new requirements."
72
103
 
73
- **After CTF:**
104
+ **After CTF** (source material supplied):
74
105
  ```
106
+ SOURCE MATERIAL:
107
+ [Paste the client's revised login-flow requirements here]
108
+ Use the material above as the basis for the task described below.
109
+
75
110
  CONTEXT:
76
111
  We are in sprint 3 of a 6-sprint project. The client just revised the login flow
77
- requirements: they now want SSO via Google instead of email/password. The dev team
78
- hasn't been told yet and we need to communicate this clearly without causing panic.
112
+ requirements in the document above: they now want SSO via Google instead of
113
+ email/password. The dev team hasn't been told yet and we need to communicate this
114
+ clearly without causing panic.
79
115
 
80
116
  TASK:
81
- Write a brief summary of the requirement change to share with the development team
117
+ Write a brief summary of the requirement change above to share with the development team
82
118
  in Slack.
83
119
 
84
120
  FORMAT:
85
- - 3-5 bullet points
86
- - Plain language, no jargon
87
- - End with a single action item
88
- - Keep total under 150 words
121
+ Format the summary as 3-5 bullet points in plain language with no jargon, ending with a
122
+ single action item, and keep the total under 150 words.
89
123
  ```
90
124
 
91
125
  ### Example 2: Code Explanation
@@ -93,21 +127,24 @@ FORMAT:
93
127
  **Before CTF:**
94
128
  "Explain this code."
95
129
 
96
- **After CTF:**
130
+ **After CTF** (source material supplied):
97
131
  ```
132
+ SOURCE MATERIAL:
133
+ [Paste the undocumented legacy authentication function here]
134
+ Use the material above as the basis for the task described below.
135
+
98
136
  CONTEXT:
99
- I'm a junior developer new to this codebase. The function below is from a legacy
137
+ I'm a junior developer new to this codebase. The function above is from a legacy
100
138
  authentication module that nobody has documented. I need to understand it before
101
139
  refactoring it next week.
102
140
 
103
141
  TASK:
104
- Explain what this function does, why each section exists, and flag any potential
142
+ Explain what the function above does, why each section exists, and flag any potential
105
143
  issues I should know before touching it.
106
144
 
107
145
  FORMAT:
108
- - Short plain-language summary (2-3 sentences)
109
- - Line-by-line breakdown as a numbered list
110
- - Potential issues section at the end (bullet points)
146
+ Open with a short plain-language summary of 2-3 sentences, then give a line-by-line
147
+ breakdown as a numbered list, and end with a bulleted "Potential issues" section.
111
148
  ```
112
149
 
113
150
  ### Example 3: Template Creation
@@ -115,7 +152,8 @@ FORMAT:
115
152
  **Before CTF:**
116
153
  "Create a status report template."
117
154
 
118
- **After CTF:**
155
+ **After CTF** (no source material — the template is designed from scratch, so the
156
+ `SOURCE MATERIAL` block and the sentence below it are both deleted):
119
157
  ```
120
158
  CONTEXT:
121
159
  Our team of 6 engineers sends weekly status reports to a non-technical product
@@ -126,11 +164,9 @@ TASK:
126
164
  Create a weekly status report template that balances completeness with brevity.
127
165
 
128
166
  FORMAT:
129
- Markdown template with:
130
- - Section headers with fill-in placeholders
131
- - Brief instruction comment under each header
132
- - Total estimated fill-in time: under 10 minutes
133
- - Length when filled: 200-300 words
167
+ Produce a markdown template with section headers, a fill-in placeholder under each header,
168
+ and a brief instruction comment beneath it. Aim for under 10 minutes of fill-in time and a
169
+ filled length of 200-300 words.
134
170
  ```
135
171
 
136
172
  ## Best Use Cases
@@ -170,7 +206,7 @@ Markdown template with:
170
206
  - ❌ Audience and tone are critical (use CO-STAR)
171
207
  - ❌ Multi-step process with methodology needed (use RISEN)
172
208
  - ❌ Explicit dos/don'ts required (use TIDD-EC)
173
- - ❌ Input→output transformation (use RISE — the Role/Input/Steps/Expectation form)
209
+ - ❌ Input→output transformation (use RISE-IE — the Role/Input/Steps/Expectation form)
174
210
 
175
211
  ## CTF vs RTF
176
212