@ckelsoe/prompt-architect 3.0.2 → 3.2.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +264 -264
- package/LICENSE +21 -21
- package/README.md +1064 -1184
- package/adapters/README.md +75 -267
- package/adapters/for-windsurf.md +136 -136
- package/adapters/system-prompt.md +243 -243
- package/package.json +139 -138
- package/scripts/build-skill.js +64 -0
- package/scripts/install.js +4 -54
- package/scripts/test.js +205 -213
- package/scripts/validate-skill.js +350 -350
- package/skills/prompt-architect/SKILL.md +343 -331
- package/skills/prompt-architect/assets/templates/ape_template.txt +5 -5
- package/skills/prompt-architect/assets/templates/bab_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/broke_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +18 -18
- package/skills/prompt-architect/assets/templates/care_template.txt +16 -16
- package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +46 -46
- package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +49 -49
- package/skills/prompt-architect/assets/templates/co-star_template.txt +17 -17
- package/skills/prompt-architect/assets/templates/crispe_template.txt +14 -14
- package/skills/prompt-architect/assets/templates/ctf_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +25 -25
- package/skills/prompt-architect/assets/templates/hybrid_template.txt +101 -101
- package/skills/prompt-architect/assets/templates/least-to-most_template.txt +16 -16
- package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +7 -7
- package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +27 -27
- package/skills/prompt-architect/assets/templates/race_template.txt +19 -19
- package/skills/prompt-architect/assets/templates/rcot_template.txt +31 -31
- package/skills/prompt-architect/assets/templates/react_template.txt +27 -27
- package/skills/prompt-architect/assets/templates/reverse-role_template.txt +11 -11
- package/skills/prompt-architect/assets/templates/rise-ie_template.txt +23 -23
- package/skills/prompt-architect/assets/templates/rise-ix_template.txt +28 -28
- package/skills/prompt-architect/assets/templates/risen_template.txt +21 -21
- package/skills/prompt-architect/assets/templates/rpef_template.txt +26 -26
- package/skills/prompt-architect/assets/templates/rtf_template.txt +13 -13
- package/skills/prompt-architect/assets/templates/self-refine_template.txt +16 -16
- package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +15 -15
- package/skills/prompt-architect/assets/templates/step-back_template.txt +10 -10
- package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +45 -45
- package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +30 -30
- package/skills/prompt-architect/references/frameworks/ape.md +200 -200
- package/skills/prompt-architect/references/frameworks/bab.md +242 -242
- package/skills/prompt-architect/references/frameworks/broke.md +242 -242
- package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +230 -230
- package/skills/prompt-architect/references/frameworks/care.md +235 -235
- package/skills/prompt-architect/references/frameworks/chain-of-density.md +479 -479
- package/skills/prompt-architect/references/frameworks/chain-of-thought.md +424 -424
- package/skills/prompt-architect/references/frameworks/co-star.md +256 -256
- package/skills/prompt-architect/references/frameworks/crispe.md +253 -253
- package/skills/prompt-architect/references/frameworks/ctf.md +207 -207
- package/skills/prompt-architect/references/frameworks/devils-advocate.md +206 -206
- package/skills/prompt-architect/references/frameworks/least-to-most.md +226 -226
- package/skills/prompt-architect/references/frameworks/plan-and-solve.md +210 -210
- package/skills/prompt-architect/references/frameworks/pre-mortem.md +197 -197
- package/skills/prompt-architect/references/frameworks/race.md +243 -243
- package/skills/prompt-architect/references/frameworks/rcot.md +203 -203
- package/skills/prompt-architect/references/frameworks/react.md +304 -304
- package/skills/prompt-architect/references/frameworks/reverse-role.md +189 -189
- package/skills/prompt-architect/references/frameworks/rise.md +555 -555
- package/skills/prompt-architect/references/frameworks/risen.md +297 -297
- package/skills/prompt-architect/references/frameworks/rpef.md +195 -195
- package/skills/prompt-architect/references/frameworks/rtf.md +358 -358
- package/skills/prompt-architect/references/frameworks/self-refine.md +205 -205
- package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +186 -186
- package/skills/prompt-architect/references/frameworks/step-back.md +206 -206
- package/skills/prompt-architect/references/frameworks/tidd-ec.md +470 -470
- package/skills/prompt-architect/references/frameworks/tree-of-thought.md +260 -260
- package/skills/prompt-architect/scripts/framework_analyzer.py +807 -807
- package/skills/prompt-architect/scripts/prompt_evaluator.py +336 -336
- package/adapters/for-cursor.mdc +0 -138
- package/adapters/for-gemini-cli.md +0 -70
- package/adapters/for-github-copilot.md +0 -141
- package/adapters/for-openai-codex-cli.md +0 -158
|
@@ -1,358 +1,358 @@
|
|
|
1
|
-
# RTF Framework
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
RTF is the simplest prompting framework, focusing on Role, Task, and Format. It's ideal for straightforward, well-defined tasks where minimal context is needed and the primary concern is output formatting.
|
|
6
|
-
|
|
7
|
-
## Components
|
|
8
|
-
|
|
9
|
-
### R - Role
|
|
10
|
-
**Purpose:** Define the expertise or perspective needed.
|
|
11
|
-
|
|
12
|
-
**Questions to Ask:**
|
|
13
|
-
- What expertise is required?
|
|
14
|
-
- What viewpoint matters?
|
|
15
|
-
|
|
16
|
-
**Examples:**
|
|
17
|
-
- "You are a technical writer..."
|
|
18
|
-
- "Act as a Python expert..."
|
|
19
|
-
- "You're a hiring manager..."
|
|
20
|
-
|
|
21
|
-
### T - Task
|
|
22
|
-
**Purpose:** State what needs to be done clearly and concisely.
|
|
23
|
-
|
|
24
|
-
**Questions to Ask:**
|
|
25
|
-
- What exactly needs to be done?
|
|
26
|
-
- What's the deliverable?
|
|
27
|
-
- What's the core action?
|
|
28
|
-
|
|
29
|
-
**Examples:**
|
|
30
|
-
- "Write a function that sorts a list..."
|
|
31
|
-
- "Create a job description for..."
|
|
32
|
-
- "Explain how authentication works..."
|
|
33
|
-
|
|
34
|
-
### F - Format
|
|
35
|
-
**Purpose:** Specify how the output should be structured.
|
|
36
|
-
|
|
37
|
-
**Questions to Ask:**
|
|
38
|
-
- What format should output take?
|
|
39
|
-
- How should it be structured?
|
|
40
|
-
- What's the preferred presentation?
|
|
41
|
-
- Any specific formatting requirements?
|
|
42
|
-
|
|
43
|
-
**Examples:**
|
|
44
|
-
- "Provide as a markdown table..."
|
|
45
|
-
- "Format as JSON with fields..."
|
|
46
|
-
- "Write as a bullet list with..."
|
|
47
|
-
|
|
48
|
-
## Template Structure
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
ROLE: [Expertise or perspective]
|
|
52
|
-
|
|
53
|
-
TASK: [What needs to be done]
|
|
54
|
-
|
|
55
|
-
FORMAT: [How output should be structured]
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Complete Examples
|
|
59
|
-
|
|
60
|
-
### Example 1: Code Generation
|
|
61
|
-
|
|
62
|
-
**Before RTF:**
|
|
63
|
-
"Write a sorting function."
|
|
64
|
-
|
|
65
|
-
**After RTF:**
|
|
66
|
-
```
|
|
67
|
-
ROLE: You are a Python developer who writes clean, efficient code.
|
|
68
|
-
|
|
69
|
-
TASK: Write a function that sorts a list of dictionaries by a specified key, with support for ascending/descending order.
|
|
70
|
-
|
|
71
|
-
FORMAT: Provide the solution as:
|
|
72
|
-
1. Function signature with type hints
|
|
73
|
-
2. Docstring with examples
|
|
74
|
-
3. Implementation
|
|
75
|
-
4. 2-3 usage examples
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Example 2: Content Creation
|
|
79
|
-
|
|
80
|
-
**Before RTF:**
|
|
81
|
-
"Write about API security."
|
|
82
|
-
|
|
83
|
-
**After RTF:**
|
|
84
|
-
```
|
|
85
|
-
ROLE: You are a technical documentation specialist.
|
|
86
|
-
|
|
87
|
-
TASK: Create a quick reference guide for API authentication best practices, covering OAuth 2.0, JWT, and API keys.
|
|
88
|
-
|
|
89
|
-
FORMAT: Structured as:
|
|
90
|
-
- Title
|
|
91
|
-
- One-paragraph overview
|
|
92
|
-
- Three sections (one per auth method) with:
|
|
93
|
-
* When to use
|
|
94
|
-
* Pros and cons (bullet points)
|
|
95
|
-
* Implementation example
|
|
96
|
-
- Resources section with links
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Example 3: Data Presentation
|
|
100
|
-
|
|
101
|
-
**Before RTF:**
|
|
102
|
-
"Show me the comparison."
|
|
103
|
-
|
|
104
|
-
**After RTF:**
|
|
105
|
-
```
|
|
106
|
-
ROLE: You are a data analyst presenting to executives.
|
|
107
|
-
|
|
108
|
-
TASK: Compare three cloud providers (AWS, Azure, GCP) across cost, performance, and features for a mid-size company.
|
|
109
|
-
|
|
110
|
-
FORMAT: Provide as:
|
|
111
|
-
- Markdown table with providers as columns
|
|
112
|
-
- Rows: Cost (tier 1-3), Performance metrics, Key features, Pros, Cons
|
|
113
|
-
- Below table: 2-3 sentence recommendation
|
|
114
|
-
- Keep total output under 300 words
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Best Use Cases
|
|
118
|
-
|
|
119
|
-
1. **Quick Tasks**
|
|
120
|
-
- Simple explanations
|
|
121
|
-
- Short code snippets
|
|
122
|
-
- Brief comparisons
|
|
123
|
-
- Format conversions
|
|
124
|
-
|
|
125
|
-
2. **Format-Critical Tasks**
|
|
126
|
-
- When output structure is primary concern
|
|
127
|
-
- Template filling
|
|
128
|
-
- Structured data generation
|
|
129
|
-
- Report formatting
|
|
130
|
-
|
|
131
|
-
3. **Well-Defined Problems**
|
|
132
|
-
- Requirements are clear
|
|
133
|
-
- No ambiguity
|
|
134
|
-
- Standard approach exists
|
|
135
|
-
- Minimal context needed
|
|
136
|
-
|
|
137
|
-
4. **One-Off Requests**
|
|
138
|
-
- Not part of larger workflow
|
|
139
|
-
- Standalone task
|
|
140
|
-
- Doesn't need extensive setup
|
|
141
|
-
|
|
142
|
-
## Selection Criteria
|
|
143
|
-
|
|
144
|
-
**Choose RTF when:**
|
|
145
|
-
- ✅ Task is simple and well-defined
|
|
146
|
-
- ✅ Minimal context required
|
|
147
|
-
- ✅ Output format is primary concern
|
|
148
|
-
- ✅ Quick, focused execution needed
|
|
149
|
-
- ✅ No complex methodology required
|
|
150
|
-
- ✅ One-off or standalone task
|
|
151
|
-
|
|
152
|
-
**Avoid RTF when:**
|
|
153
|
-
- ❌ Complex multi-step process (use RISEN)
|
|
154
|
-
- ❌ Rich context needed (use CO-STAR)
|
|
155
|
-
- ❌ Audience/tone matters (use CO-STAR)
|
|
156
|
-
- ❌ Specific methodology required (use RISEN)
|
|
157
|
-
- ❌ Input transformation needed (use RISE)
|
|
158
|
-
|
|
159
|
-
## Common Mistakes
|
|
160
|
-
|
|
161
|
-
1. **Insufficient Task Description**
|
|
162
|
-
- Be specific about what's needed
|
|
163
|
-
- Include key requirements
|
|
164
|
-
- Define scope clearly
|
|
165
|
-
|
|
166
|
-
2. **Vague Format Requirements**
|
|
167
|
-
- Specify exact structure
|
|
168
|
-
- Mention required sections
|
|
169
|
-
- Define length/detail level
|
|
170
|
-
|
|
171
|
-
3. **Missing Role Context**
|
|
172
|
-
- Even simple tasks benefit from role
|
|
173
|
-
- Expertise level affects output
|
|
174
|
-
- Don't skip role definition
|
|
175
|
-
|
|
176
|
-
4. **Using RTF for Complex Tasks**
|
|
177
|
-
- If you need more than 3-4 sentences per component
|
|
178
|
-
- Switch to more comprehensive framework
|
|
179
|
-
|
|
180
|
-
## RTF Variations
|
|
181
|
-
|
|
182
|
-
### Minimal RTF
|
|
183
|
-
For very simple tasks:
|
|
184
|
-
```
|
|
185
|
-
As a [ROLE], [TASK] in [FORMAT].
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
Example:
|
|
189
|
-
```
|
|
190
|
-
As a Python developer, write a function to validate email addresses in a code block with docstring.
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
### Extended RTF
|
|
194
|
-
When slightly more detail needed:
|
|
195
|
-
```
|
|
196
|
-
ROLE: [Expertise]
|
|
197
|
-
|
|
198
|
-
TASK: [What needs doing]
|
|
199
|
-
|
|
200
|
-
REQUIREMENTS:
|
|
201
|
-
- [Key requirement 1]
|
|
202
|
-
- [Key requirement 2]
|
|
203
|
-
|
|
204
|
-
FORMAT: [Output structure]
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### RTF with Examples
|
|
208
|
-
When showing examples helps:
|
|
209
|
-
```
|
|
210
|
-
ROLE: [Expertise]
|
|
211
|
-
|
|
212
|
-
TASK: [What needs doing]
|
|
213
|
-
|
|
214
|
-
EXAMPLES OF GOOD OUTPUT:
|
|
215
|
-
[Show 1-2 examples]
|
|
216
|
-
|
|
217
|
-
FORMAT: [Follow this structure]
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
## When to Upgrade from RTF
|
|
221
|
-
|
|
222
|
-
**Upgrade to RISE if:**
|
|
223
|
-
- Need to specify input characteristics
|
|
224
|
-
- Processing steps matter
|
|
225
|
-
- Input → output transformation
|
|
226
|
-
|
|
227
|
-
**Upgrade to RISEN if:**
|
|
228
|
-
- Multiple steps required
|
|
229
|
-
- Need constraints/boundaries
|
|
230
|
-
- Methodology matters
|
|
231
|
-
- Success criteria complex
|
|
232
|
-
|
|
233
|
-
**Upgrade to CO-STAR if:**
|
|
234
|
-
- Audience considerations important
|
|
235
|
-
- Tone/style matter
|
|
236
|
-
- Rich context needed
|
|
237
|
-
- Content creation task
|
|
238
|
-
|
|
239
|
-
## Quick Reference
|
|
240
|
-
|
|
241
|
-
| Component | Focus | Key Question |
|
|
242
|
-
|-----------|-------|--------------|
|
|
243
|
-
| Role | Expertise | "Who should do this?" |
|
|
244
|
-
| Task | Action | "What needs to be done?" |
|
|
245
|
-
| Format | Structure | "How should it look?" |
|
|
246
|
-
|
|
247
|
-
## Format Specification Best Practices
|
|
248
|
-
|
|
249
|
-
### Good Format Specifications:
|
|
250
|
-
```
|
|
251
|
-
FORMAT:
|
|
252
|
-
Return as JSON with structure:
|
|
253
|
-
{
|
|
254
|
-
"summary": "1-2 sentence overview",
|
|
255
|
-
"items": [
|
|
256
|
-
{
|
|
257
|
-
"name": "string",
|
|
258
|
-
"priority": "high|medium|low",
|
|
259
|
-
"details": "string"
|
|
260
|
-
}
|
|
261
|
-
],
|
|
262
|
-
"total_count": number
|
|
263
|
-
}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
```
|
|
267
|
-
FORMAT:
|
|
268
|
-
Markdown document with:
|
|
269
|
-
- H1 title
|
|
270
|
-
- Brief intro paragraph
|
|
271
|
-
- 3-5 H2 sections, each with:
|
|
272
|
-
* 2-3 paragraphs
|
|
273
|
-
* Bullet points for key takeaways
|
|
274
|
-
- Conclusion paragraph
|
|
275
|
-
- Total length: 500-700 words
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### Poor Format Specifications:
|
|
279
|
-
```
|
|
280
|
-
FORMAT: Make it nice
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
```
|
|
284
|
-
FORMAT: JSON or something
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
## Real-World Examples
|
|
288
|
-
|
|
289
|
-
### API Documentation
|
|
290
|
-
```
|
|
291
|
-
ROLE: Senior API documentation writer
|
|
292
|
-
|
|
293
|
-
TASK: Document the POST /users endpoint that creates a new user account with email, password, and optional profile data.
|
|
294
|
-
|
|
295
|
-
FORMAT:
|
|
296
|
-
Structure as:
|
|
297
|
-
- Endpoint details (method, path, auth required)
|
|
298
|
-
- Request body parameters (table: name, type, required, description)
|
|
299
|
-
- Response codes (200, 400, 409 with meanings)
|
|
300
|
-
- Example request (curl)
|
|
301
|
-
- Example response (JSON)
|
|
302
|
-
- Notes section for special behaviors
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
### Code Review Comment
|
|
306
|
-
```
|
|
307
|
-
ROLE: Experienced code reviewer
|
|
308
|
-
|
|
309
|
-
TASK: Review this function for security vulnerabilities and performance issues. Identify specific problems and suggest fixes.
|
|
310
|
-
|
|
311
|
-
FORMAT:
|
|
312
|
-
For each issue found:
|
|
313
|
-
🔴 ISSUE: [Brief title]
|
|
314
|
-
LINE: [Line number]
|
|
315
|
-
PROBLEM: [What's wrong]
|
|
316
|
-
FIX: [How to fix it]
|
|
317
|
-
SEVERITY: [High/Medium/Low]
|
|
318
|
-
|
|
319
|
-
End with overall assessment (2-3 sentences).
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
### Meeting Summary
|
|
323
|
-
```
|
|
324
|
-
ROLE: Executive assistant
|
|
325
|
-
|
|
326
|
-
TASK: Summarize this meeting transcript, focusing on decisions made and action items.
|
|
327
|
-
|
|
328
|
-
FORMAT:
|
|
329
|
-
Meeting Summary: [Title]
|
|
330
|
-
Date: [Date]
|
|
331
|
-
|
|
332
|
-
KEY DECISIONS:
|
|
333
|
-
- [Decision 1]
|
|
334
|
-
- [Decision 2]
|
|
335
|
-
|
|
336
|
-
ACTION ITEMS:
|
|
337
|
-
- [ ] [Task] - Assigned to [Person] - Due: [Date]
|
|
338
|
-
|
|
339
|
-
DISCUSSION POINTS:
|
|
340
|
-
- [Topic 1]: [Brief summary]
|
|
341
|
-
|
|
342
|
-
NEXT STEPS:
|
|
343
|
-
[What happens next]
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
## Assessment Checklist
|
|
347
|
-
|
|
348
|
-
When applying RTF, verify:
|
|
349
|
-
- [ ] Role defines clear expertise
|
|
350
|
-
- [ ] Task is specific and unambiguous
|
|
351
|
-
- [ ] Task scope is well-defined
|
|
352
|
-
- [ ] Format requirements are detailed
|
|
353
|
-
- [ ] Format is appropriate for task
|
|
354
|
-
- [ ] All three components work together
|
|
355
|
-
- [ ] Task isn't too complex for RTF
|
|
356
|
-
- [ ] No need for richer framework
|
|
357
|
-
- [ ] Output structure is clear
|
|
358
|
-
- [ ] Length/detail level specified
|
|
1
|
+
# RTF Framework
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
RTF is the simplest prompting framework, focusing on Role, Task, and Format. It's ideal for straightforward, well-defined tasks where minimal context is needed and the primary concern is output formatting.
|
|
6
|
+
|
|
7
|
+
## Components
|
|
8
|
+
|
|
9
|
+
### R - Role
|
|
10
|
+
**Purpose:** Define the expertise or perspective needed.
|
|
11
|
+
|
|
12
|
+
**Questions to Ask:**
|
|
13
|
+
- What expertise is required?
|
|
14
|
+
- What viewpoint matters?
|
|
15
|
+
|
|
16
|
+
**Examples:**
|
|
17
|
+
- "You are a technical writer..."
|
|
18
|
+
- "Act as a Python expert..."
|
|
19
|
+
- "You're a hiring manager..."
|
|
20
|
+
|
|
21
|
+
### T - Task
|
|
22
|
+
**Purpose:** State what needs to be done clearly and concisely.
|
|
23
|
+
|
|
24
|
+
**Questions to Ask:**
|
|
25
|
+
- What exactly needs to be done?
|
|
26
|
+
- What's the deliverable?
|
|
27
|
+
- What's the core action?
|
|
28
|
+
|
|
29
|
+
**Examples:**
|
|
30
|
+
- "Write a function that sorts a list..."
|
|
31
|
+
- "Create a job description for..."
|
|
32
|
+
- "Explain how authentication works..."
|
|
33
|
+
|
|
34
|
+
### F - Format
|
|
35
|
+
**Purpose:** Specify how the output should be structured.
|
|
36
|
+
|
|
37
|
+
**Questions to Ask:**
|
|
38
|
+
- What format should output take?
|
|
39
|
+
- How should it be structured?
|
|
40
|
+
- What's the preferred presentation?
|
|
41
|
+
- Any specific formatting requirements?
|
|
42
|
+
|
|
43
|
+
**Examples:**
|
|
44
|
+
- "Provide as a markdown table..."
|
|
45
|
+
- "Format as JSON with fields..."
|
|
46
|
+
- "Write as a bullet list with..."
|
|
47
|
+
|
|
48
|
+
## Template Structure
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
ROLE: [Expertise or perspective]
|
|
52
|
+
|
|
53
|
+
TASK: [What needs to be done]
|
|
54
|
+
|
|
55
|
+
FORMAT: [How output should be structured]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Complete Examples
|
|
59
|
+
|
|
60
|
+
### Example 1: Code Generation
|
|
61
|
+
|
|
62
|
+
**Before RTF:**
|
|
63
|
+
"Write a sorting function."
|
|
64
|
+
|
|
65
|
+
**After RTF:**
|
|
66
|
+
```
|
|
67
|
+
ROLE: You are a Python developer who writes clean, efficient code.
|
|
68
|
+
|
|
69
|
+
TASK: Write a function that sorts a list of dictionaries by a specified key, with support for ascending/descending order.
|
|
70
|
+
|
|
71
|
+
FORMAT: Provide the solution as:
|
|
72
|
+
1. Function signature with type hints
|
|
73
|
+
2. Docstring with examples
|
|
74
|
+
3. Implementation
|
|
75
|
+
4. 2-3 usage examples
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Example 2: Content Creation
|
|
79
|
+
|
|
80
|
+
**Before RTF:**
|
|
81
|
+
"Write about API security."
|
|
82
|
+
|
|
83
|
+
**After RTF:**
|
|
84
|
+
```
|
|
85
|
+
ROLE: You are a technical documentation specialist.
|
|
86
|
+
|
|
87
|
+
TASK: Create a quick reference guide for API authentication best practices, covering OAuth 2.0, JWT, and API keys.
|
|
88
|
+
|
|
89
|
+
FORMAT: Structured as:
|
|
90
|
+
- Title
|
|
91
|
+
- One-paragraph overview
|
|
92
|
+
- Three sections (one per auth method) with:
|
|
93
|
+
* When to use
|
|
94
|
+
* Pros and cons (bullet points)
|
|
95
|
+
* Implementation example
|
|
96
|
+
- Resources section with links
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Example 3: Data Presentation
|
|
100
|
+
|
|
101
|
+
**Before RTF:**
|
|
102
|
+
"Show me the comparison."
|
|
103
|
+
|
|
104
|
+
**After RTF:**
|
|
105
|
+
```
|
|
106
|
+
ROLE: You are a data analyst presenting to executives.
|
|
107
|
+
|
|
108
|
+
TASK: Compare three cloud providers (AWS, Azure, GCP) across cost, performance, and features for a mid-size company.
|
|
109
|
+
|
|
110
|
+
FORMAT: Provide as:
|
|
111
|
+
- Markdown table with providers as columns
|
|
112
|
+
- Rows: Cost (tier 1-3), Performance metrics, Key features, Pros, Cons
|
|
113
|
+
- Below table: 2-3 sentence recommendation
|
|
114
|
+
- Keep total output under 300 words
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Best Use Cases
|
|
118
|
+
|
|
119
|
+
1. **Quick Tasks**
|
|
120
|
+
- Simple explanations
|
|
121
|
+
- Short code snippets
|
|
122
|
+
- Brief comparisons
|
|
123
|
+
- Format conversions
|
|
124
|
+
|
|
125
|
+
2. **Format-Critical Tasks**
|
|
126
|
+
- When output structure is primary concern
|
|
127
|
+
- Template filling
|
|
128
|
+
- Structured data generation
|
|
129
|
+
- Report formatting
|
|
130
|
+
|
|
131
|
+
3. **Well-Defined Problems**
|
|
132
|
+
- Requirements are clear
|
|
133
|
+
- No ambiguity
|
|
134
|
+
- Standard approach exists
|
|
135
|
+
- Minimal context needed
|
|
136
|
+
|
|
137
|
+
4. **One-Off Requests**
|
|
138
|
+
- Not part of larger workflow
|
|
139
|
+
- Standalone task
|
|
140
|
+
- Doesn't need extensive setup
|
|
141
|
+
|
|
142
|
+
## Selection Criteria
|
|
143
|
+
|
|
144
|
+
**Choose RTF when:**
|
|
145
|
+
- ✅ Task is simple and well-defined
|
|
146
|
+
- ✅ Minimal context required
|
|
147
|
+
- ✅ Output format is primary concern
|
|
148
|
+
- ✅ Quick, focused execution needed
|
|
149
|
+
- ✅ No complex methodology required
|
|
150
|
+
- ✅ One-off or standalone task
|
|
151
|
+
|
|
152
|
+
**Avoid RTF when:**
|
|
153
|
+
- ❌ Complex multi-step process (use RISEN)
|
|
154
|
+
- ❌ Rich context needed (use CO-STAR)
|
|
155
|
+
- ❌ Audience/tone matters (use CO-STAR)
|
|
156
|
+
- ❌ Specific methodology required (use RISEN)
|
|
157
|
+
- ❌ Input transformation needed (use RISE)
|
|
158
|
+
|
|
159
|
+
## Common Mistakes
|
|
160
|
+
|
|
161
|
+
1. **Insufficient Task Description**
|
|
162
|
+
- Be specific about what's needed
|
|
163
|
+
- Include key requirements
|
|
164
|
+
- Define scope clearly
|
|
165
|
+
|
|
166
|
+
2. **Vague Format Requirements**
|
|
167
|
+
- Specify exact structure
|
|
168
|
+
- Mention required sections
|
|
169
|
+
- Define length/detail level
|
|
170
|
+
|
|
171
|
+
3. **Missing Role Context**
|
|
172
|
+
- Even simple tasks benefit from role
|
|
173
|
+
- Expertise level affects output
|
|
174
|
+
- Don't skip role definition
|
|
175
|
+
|
|
176
|
+
4. **Using RTF for Complex Tasks**
|
|
177
|
+
- If you need more than 3-4 sentences per component
|
|
178
|
+
- Switch to more comprehensive framework
|
|
179
|
+
|
|
180
|
+
## RTF Variations
|
|
181
|
+
|
|
182
|
+
### Minimal RTF
|
|
183
|
+
For very simple tasks:
|
|
184
|
+
```
|
|
185
|
+
As a [ROLE], [TASK] in [FORMAT].
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Example:
|
|
189
|
+
```
|
|
190
|
+
As a Python developer, write a function to validate email addresses in a code block with docstring.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Extended RTF
|
|
194
|
+
When slightly more detail needed:
|
|
195
|
+
```
|
|
196
|
+
ROLE: [Expertise]
|
|
197
|
+
|
|
198
|
+
TASK: [What needs doing]
|
|
199
|
+
|
|
200
|
+
REQUIREMENTS:
|
|
201
|
+
- [Key requirement 1]
|
|
202
|
+
- [Key requirement 2]
|
|
203
|
+
|
|
204
|
+
FORMAT: [Output structure]
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### RTF with Examples
|
|
208
|
+
When showing examples helps:
|
|
209
|
+
```
|
|
210
|
+
ROLE: [Expertise]
|
|
211
|
+
|
|
212
|
+
TASK: [What needs doing]
|
|
213
|
+
|
|
214
|
+
EXAMPLES OF GOOD OUTPUT:
|
|
215
|
+
[Show 1-2 examples]
|
|
216
|
+
|
|
217
|
+
FORMAT: [Follow this structure]
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## When to Upgrade from RTF
|
|
221
|
+
|
|
222
|
+
**Upgrade to RISE if:**
|
|
223
|
+
- Need to specify input characteristics
|
|
224
|
+
- Processing steps matter
|
|
225
|
+
- Input → output transformation
|
|
226
|
+
|
|
227
|
+
**Upgrade to RISEN if:**
|
|
228
|
+
- Multiple steps required
|
|
229
|
+
- Need constraints/boundaries
|
|
230
|
+
- Methodology matters
|
|
231
|
+
- Success criteria complex
|
|
232
|
+
|
|
233
|
+
**Upgrade to CO-STAR if:**
|
|
234
|
+
- Audience considerations important
|
|
235
|
+
- Tone/style matter
|
|
236
|
+
- Rich context needed
|
|
237
|
+
- Content creation task
|
|
238
|
+
|
|
239
|
+
## Quick Reference
|
|
240
|
+
|
|
241
|
+
| Component | Focus | Key Question |
|
|
242
|
+
|-----------|-------|--------------|
|
|
243
|
+
| Role | Expertise | "Who should do this?" |
|
|
244
|
+
| Task | Action | "What needs to be done?" |
|
|
245
|
+
| Format | Structure | "How should it look?" |
|
|
246
|
+
|
|
247
|
+
## Format Specification Best Practices
|
|
248
|
+
|
|
249
|
+
### Good Format Specifications:
|
|
250
|
+
```
|
|
251
|
+
FORMAT:
|
|
252
|
+
Return as JSON with structure:
|
|
253
|
+
{
|
|
254
|
+
"summary": "1-2 sentence overview",
|
|
255
|
+
"items": [
|
|
256
|
+
{
|
|
257
|
+
"name": "string",
|
|
258
|
+
"priority": "high|medium|low",
|
|
259
|
+
"details": "string"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"total_count": number
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
FORMAT:
|
|
268
|
+
Markdown document with:
|
|
269
|
+
- H1 title
|
|
270
|
+
- Brief intro paragraph
|
|
271
|
+
- 3-5 H2 sections, each with:
|
|
272
|
+
* 2-3 paragraphs
|
|
273
|
+
* Bullet points for key takeaways
|
|
274
|
+
- Conclusion paragraph
|
|
275
|
+
- Total length: 500-700 words
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Poor Format Specifications:
|
|
279
|
+
```
|
|
280
|
+
FORMAT: Make it nice
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
FORMAT: JSON or something
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## Real-World Examples
|
|
288
|
+
|
|
289
|
+
### API Documentation
|
|
290
|
+
```
|
|
291
|
+
ROLE: Senior API documentation writer
|
|
292
|
+
|
|
293
|
+
TASK: Document the POST /users endpoint that creates a new user account with email, password, and optional profile data.
|
|
294
|
+
|
|
295
|
+
FORMAT:
|
|
296
|
+
Structure as:
|
|
297
|
+
- Endpoint details (method, path, auth required)
|
|
298
|
+
- Request body parameters (table: name, type, required, description)
|
|
299
|
+
- Response codes (200, 400, 409 with meanings)
|
|
300
|
+
- Example request (curl)
|
|
301
|
+
- Example response (JSON)
|
|
302
|
+
- Notes section for special behaviors
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Code Review Comment
|
|
306
|
+
```
|
|
307
|
+
ROLE: Experienced code reviewer
|
|
308
|
+
|
|
309
|
+
TASK: Review this function for security vulnerabilities and performance issues. Identify specific problems and suggest fixes.
|
|
310
|
+
|
|
311
|
+
FORMAT:
|
|
312
|
+
For each issue found:
|
|
313
|
+
🔴 ISSUE: [Brief title]
|
|
314
|
+
LINE: [Line number]
|
|
315
|
+
PROBLEM: [What's wrong]
|
|
316
|
+
FIX: [How to fix it]
|
|
317
|
+
SEVERITY: [High/Medium/Low]
|
|
318
|
+
|
|
319
|
+
End with overall assessment (2-3 sentences).
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Meeting Summary
|
|
323
|
+
```
|
|
324
|
+
ROLE: Executive assistant
|
|
325
|
+
|
|
326
|
+
TASK: Summarize this meeting transcript, focusing on decisions made and action items.
|
|
327
|
+
|
|
328
|
+
FORMAT:
|
|
329
|
+
Meeting Summary: [Title]
|
|
330
|
+
Date: [Date]
|
|
331
|
+
|
|
332
|
+
KEY DECISIONS:
|
|
333
|
+
- [Decision 1]
|
|
334
|
+
- [Decision 2]
|
|
335
|
+
|
|
336
|
+
ACTION ITEMS:
|
|
337
|
+
- [ ] [Task] - Assigned to [Person] - Due: [Date]
|
|
338
|
+
|
|
339
|
+
DISCUSSION POINTS:
|
|
340
|
+
- [Topic 1]: [Brief summary]
|
|
341
|
+
|
|
342
|
+
NEXT STEPS:
|
|
343
|
+
[What happens next]
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
## Assessment Checklist
|
|
347
|
+
|
|
348
|
+
When applying RTF, verify:
|
|
349
|
+
- [ ] Role defines clear expertise
|
|
350
|
+
- [ ] Task is specific and unambiguous
|
|
351
|
+
- [ ] Task scope is well-defined
|
|
352
|
+
- [ ] Format requirements are detailed
|
|
353
|
+
- [ ] Format is appropriate for task
|
|
354
|
+
- [ ] All three components work together
|
|
355
|
+
- [ ] Task isn't too complex for RTF
|
|
356
|
+
- [ ] No need for richer framework
|
|
357
|
+
- [ ] Output structure is clear
|
|
358
|
+
- [ ] Length/detail level specified
|