@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.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +2 -2
- package/CHANGELOG.md +34 -0
- package/README.md +7 -3
- package/adapters/system-prompt.md +96 -55
- package/package.json +6 -4
- package/scripts/test.js +32 -0
- package/skills/prompt-architect/SKILL.md +74 -41
- package/skills/prompt-architect/assets/templates/ape_template.txt +14 -3
- package/skills/prompt-architect/assets/templates/bab_template.txt +23 -10
- package/skills/prompt-architect/assets/templates/broke_template.txt +31 -6
- package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +16 -8
- package/skills/prompt-architect/assets/templates/care_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +30 -31
- package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/chain-of-verification_template.txt +26 -0
- package/skills/prompt-architect/assets/templates/co-star_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/crispe_template.txt +6 -0
- package/skills/prompt-architect/assets/templates/ctf_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +7 -0
- package/skills/prompt-architect/assets/templates/hybrid_template.txt +44 -24
- package/skills/prompt-architect/assets/templates/iterative-compression_template.txt +43 -28
- package/skills/prompt-architect/assets/templates/least-to-most_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +24 -14
- package/skills/prompt-architect/assets/templates/race_template.txt +9 -0
- package/skills/prompt-architect/assets/templates/rcot_template.txt +8 -0
- package/skills/prompt-architect/assets/templates/react_template.txt +38 -16
- package/skills/prompt-architect/assets/templates/rise-ie_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/rise-ix_template.txt +3 -3
- package/skills/prompt-architect/assets/templates/risen_template.txt +7 -0
- package/skills/prompt-architect/assets/templates/rpef_template.txt +16 -11
- package/skills/prompt-architect/assets/templates/rtf_template.txt +9 -0
- package/skills/prompt-architect/assets/templates/self-consistency_template.txt +12 -0
- package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +18 -10
- package/skills/prompt-architect/assets/templates/step-back_template.txt +4 -0
- package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +54 -31
- package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +37 -21
- package/skills/prompt-architect/references/frameworks/ape.md +143 -57
- package/skills/prompt-architect/references/frameworks/bab.md +137 -58
- package/skills/prompt-architect/references/frameworks/broke.md +157 -57
- package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +183 -75
- package/skills/prompt-architect/references/frameworks/care.md +67 -36
- package/skills/prompt-architect/references/frameworks/chain-of-density.md +49 -27
- package/skills/prompt-architect/references/frameworks/chain-of-thought.md +28 -7
- package/skills/prompt-architect/references/frameworks/chain-of-verification.md +231 -0
- package/skills/prompt-architect/references/frameworks/co-star.md +100 -44
- package/skills/prompt-architect/references/frameworks/crispe.md +7 -5
- package/skills/prompt-architect/references/frameworks/ctf.md +73 -37
- package/skills/prompt-architect/references/frameworks/devils-advocate.md +105 -58
- package/skills/prompt-architect/references/frameworks/iterative-compression.md +236 -269
- package/skills/prompt-architect/references/frameworks/least-to-most.md +35 -13
- package/skills/prompt-architect/references/frameworks/plan-and-solve.md +38 -9
- package/skills/prompt-architect/references/frameworks/pre-mortem.md +176 -66
- package/skills/prompt-architect/references/frameworks/race.md +91 -38
- package/skills/prompt-architect/references/frameworks/rcot.md +1 -1
- package/skills/prompt-architect/references/frameworks/react.md +230 -97
- package/skills/prompt-architect/references/frameworks/reverse-role.md +22 -15
- package/skills/prompt-architect/references/frameworks/rise.md +94 -70
- package/skills/prompt-architect/references/frameworks/risen.md +80 -28
- package/skills/prompt-architect/references/frameworks/rpef.md +227 -58
- package/skills/prompt-architect/references/frameworks/rtf.md +2 -2
- package/skills/prompt-architect/references/frameworks/self-consistency.md +195 -0
- package/skills/prompt-architect/references/frameworks/self-refine.md +4 -2
- package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +67 -21
- package/skills/prompt-architect/references/frameworks/step-back.md +47 -15
- package/skills/prompt-architect/references/frameworks/tidd-ec.md +110 -45
- package/skills/prompt-architect/references/frameworks/tree-of-thought.md +112 -37
- package/skills/prompt-architect/references/techniques/few-shot.md +121 -0
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
RACE (Role, Action, Context, Expectation) is a medium-complexity framework that sits between RTF's simplicity and CO-STAR's richness. It adds two critical improvements over RTF: situational context (missing from RTF) and an explicit expectation of success (missing from both RTF and CTF). RACE is ideal when you need all four pillars — expertise framing, task clarity, background, and a defined success bar — without the full overhead of CO-STAR or RISEN.
|
|
5
|
+
RACE (Role, Action, Context, Expectation) is a medium-complexity framework that sits between RTF's simplicity and CO-STAR's richness. It adds two critical improvements over RTF: situational context (missing from RTF) and an explicit expectation of success (missing from both RTF and CTF). RACE is ideal when you need all four pillars — expertise framing, task clarity, background, and a defined success bar — without the full overhead of CO-STAR or RISEN. Section headers are stripped at emission, so a RACE prompt lands as a flat block — a role sentence, an action sentence, a paragraph of context, and a success-bar statement — preceded by an optional source-material block whenever the task applies to an artifact the user already has.
|
|
6
6
|
|
|
7
7
|
**Origin:** No single documented originator. RACE is a community prompt-engineering convention documented in practitioner guides (e.g. fvivas.com, 20 April 2025) with no attributed creator, and does not appear in any peer-reviewed prompting survey. **Not to be confused with** the RACE digital-marketing planning model (Reach, Act, Convert, Engage), created by Dave Chaffey of Smart Insights in 2010 — an unrelated marketing framework that shares only the acronym.
|
|
8
8
|
|
|
9
9
|
## Components
|
|
10
10
|
|
|
11
11
|
### R - Role
|
|
12
|
-
**Purpose:** Define the expertise or persona needed for the task.
|
|
12
|
+
**Purpose:** Define the expertise or persona needed for the task. Written as a complete sentence — usually beginning "You are…" — so it still reads as a persona assignment once the `ROLE` header is stripped.
|
|
13
13
|
|
|
14
14
|
**Questions to Ask:**
|
|
15
15
|
- What expertise is required?
|
|
@@ -17,12 +17,12 @@ RACE (Role, Action, Context, Expectation) is a medium-complexity framework that
|
|
|
17
17
|
- What level of knowledge is assumed?
|
|
18
18
|
|
|
19
19
|
**Examples:**
|
|
20
|
-
- "You are a senior backend engineer
|
|
21
|
-
- "Act as an experienced UX designer
|
|
22
|
-
- "You are a plain-language technical writer
|
|
20
|
+
- "You are a senior backend engineer familiar with REST conventions."
|
|
21
|
+
- "Act as an experienced UX designer who works on consumer onboarding flows."
|
|
22
|
+
- "You are a plain-language technical writer for developer documentation."
|
|
23
23
|
|
|
24
24
|
### A - Action
|
|
25
|
-
**Purpose:** State what needs to be done — the task.
|
|
25
|
+
**Purpose:** State what needs to be done — the task — as one complete imperative sentence. When source material is supplied above, refer to it as "the … above," never "described below": the artifact precedes the action once emitted, so a downward reference would dangle.
|
|
26
26
|
|
|
27
27
|
**Questions to Ask:**
|
|
28
28
|
- What exactly needs to happen?
|
|
@@ -30,12 +30,12 @@ RACE (Role, Action, Context, Expectation) is a medium-complexity framework that
|
|
|
30
30
|
- What's the scope?
|
|
31
31
|
|
|
32
32
|
**Examples:**
|
|
33
|
-
- "Review
|
|
34
|
-
- "Write
|
|
35
|
-
- "Identify the top
|
|
33
|
+
- "Review the REST API design above for consistency, usability, and potential issues."
|
|
34
|
+
- "Write the copy for a 3-screen onboarding flow for our task management app."
|
|
35
|
+
- "Identify the top 5 risks in the migration plan above."
|
|
36
36
|
|
|
37
37
|
### C - Context
|
|
38
|
-
**Purpose:** Provide the situational background needed to calibrate the output.
|
|
38
|
+
**Purpose:** Provide the situational background needed to calibrate the output. 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.
|
|
39
39
|
|
|
40
40
|
**Questions to Ask:**
|
|
41
41
|
- What's the situation?
|
|
@@ -44,12 +44,12 @@ RACE (Role, Action, Context, Expectation) is a medium-complexity framework that
|
|
|
44
44
|
- What does the audience/recipient need?
|
|
45
45
|
|
|
46
46
|
**Examples:**
|
|
47
|
-
- "This is a public API used by third-party developers who expect stable contracts
|
|
48
|
-
- "The users are first-time app users who may be unfamiliar with our terminology
|
|
49
|
-
- "This is for a Series A startup with a 3-person engineering team
|
|
47
|
+
- "This is a public API used by third-party developers who expect stable contracts."
|
|
48
|
+
- "The users are first-time app users who may be unfamiliar with our terminology."
|
|
49
|
+
- "This is for a Series A startup with a 3-person engineering team."
|
|
50
50
|
|
|
51
51
|
### E - Expectation
|
|
52
|
-
**Purpose:** Define what a successful output looks like — the quality bar.
|
|
52
|
+
**Purpose:** Define what a successful output looks like — the quality bar. Phrase it as a complete statement about the result, not a bare fragment: a phrase like "prioritized list" dangles once the `EXPECTATION` header is deleted, whereas "The review should prioritize the highest-severity issues" still names the standard.
|
|
53
53
|
|
|
54
54
|
**Questions to Ask:**
|
|
55
55
|
- What does success look like?
|
|
@@ -58,43 +58,86 @@ RACE (Role, Action, Context, Expectation) is a medium-complexity framework that
|
|
|
58
58
|
- Any specific requirements for the output?
|
|
59
59
|
|
|
60
60
|
**Examples:**
|
|
61
|
-
- "
|
|
62
|
-
- "
|
|
63
|
-
- "
|
|
61
|
+
- "The review should prioritize breaking changes and security risks over style issues."
|
|
62
|
+
- "The copy should be conversational, not instructional — guiding rather than commanding."
|
|
63
|
+
- "The output should fit on a single Confluence page, scannable with headers."
|
|
64
64
|
|
|
65
65
|
## Template Structure
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
CONTEXT: [Background, situation, constraints]
|
|
67
|
+
Section headers are stripped at emission, so every slot's meaning is carried by the prose
|
|
68
|
+
around and inside it rather than by the header above it. Role fills as a "You are…"
|
|
69
|
+
sentence and Context as a self-contained paragraph, so both stand on their own; Action must
|
|
70
|
+
be a complete imperative sentence, and Expectation must be phrased as a statement about the
|
|
71
|
+
result, because neither can lean on a header once emitted.
|
|
73
72
|
|
|
74
|
-
EXPECTATION: [What a good result looks like]
|
|
75
73
|
```
|
|
74
|
+
SOURCE MATERIAL:
|
|
75
|
+
[OPTIONAL — include only if this task operates on something the user already has.
|
|
76
|
+
If so, emit a literal paste instruction naming the specific artifact, e.g. "[Paste the REST API design here]"
|
|
77
|
+
or "[Paste the migration plan here]" — then one line of prose tying it to what follows,
|
|
78
|
+
e.g. "The material above is what the task below applies to."
|
|
79
|
+
When this section is used, word ACTION to refer to the material ABOVE ("the migration plan above"),
|
|
80
|
+
never "described below" — the artifact precedes it and a downward reference would dangle.
|
|
81
|
+
If the task generates entirely from scratch, omit this section — do not emit an empty placeholder.]
|
|
82
|
+
|
|
83
|
+
ROLE:
|
|
84
|
+
[Define the expertise or persona needed — who should do this task and at what level]
|
|
85
|
+
|
|
86
|
+
ACTION:
|
|
87
|
+
[State clearly what needs to be done — the task and deliverable]
|
|
88
|
+
|
|
89
|
+
CONTEXT:
|
|
90
|
+
[Provide the situational background:
|
|
91
|
+
- What's the current state / situation?
|
|
92
|
+
- Who is the audience or recipient of the output?
|
|
93
|
+
- Any relevant constraints or prior decisions?
|
|
94
|
+
- What has already been done?]
|
|
95
|
+
|
|
96
|
+
EXPECTATION:
|
|
97
|
+
[Define what a successful output looks like:
|
|
98
|
+
- Format and structure requirements
|
|
99
|
+
- Quality bar or success criteria
|
|
100
|
+
- What should be prioritized
|
|
101
|
+
- Length or scope constraints]
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`SOURCE MATERIAL` is a fifth block in a four-letter acronym, and it carries no letter
|
|
105
|
+
because it is optional. When RACE is pointed at something that already exists — an API
|
|
106
|
+
design, a migration plan, a module — that artifact is pasted here, and the Action refers to
|
|
107
|
+
it as "the … above." The upward reference is deliberate: the artifact precedes the Action
|
|
108
|
+
once headers are gone, so any "described below" phrasing would point past the end of the
|
|
109
|
+
prompt. Delete the block and the sentence beneath it whenever the task generates from
|
|
110
|
+
scratch.
|
|
76
111
|
|
|
77
112
|
## Complete Examples
|
|
78
113
|
|
|
114
|
+
Every example below is shown in emitted form: each slot carries its own role in prose.
|
|
115
|
+
Read the headers as scaffolding that will be deleted — the examples are written so that
|
|
116
|
+
nothing is lost when it is.
|
|
117
|
+
|
|
79
118
|
### Example 1: API Review
|
|
80
119
|
|
|
81
120
|
**Before RACE:**
|
|
82
121
|
"Review my API design."
|
|
83
122
|
|
|
84
|
-
**After RACE
|
|
123
|
+
**After RACE** (source material supplied):
|
|
85
124
|
```
|
|
125
|
+
SOURCE MATERIAL:
|
|
126
|
+
[Paste the REST API design here]
|
|
127
|
+
The material above is what the task below applies to.
|
|
128
|
+
|
|
86
129
|
ROLE: You are a senior backend engineer with API design experience, familiar with
|
|
87
130
|
REST conventions and developer experience best practices.
|
|
88
131
|
|
|
89
|
-
ACTION: Review
|
|
132
|
+
ACTION: Review the REST API design above for consistency, usability, and potential issues.
|
|
90
133
|
|
|
91
134
|
CONTEXT: This is a public API that will be used by third-party developers. We are
|
|
92
135
|
about to publish v1 and changes after launch will be breaking. The team is small
|
|
93
136
|
(3 engineers) and we have not done a formal API review before.
|
|
94
137
|
|
|
95
138
|
EXPECTATION: Prioritize issues by severity (breaking vs. cosmetic). Flag anything
|
|
96
|
-
that would frustrate external developers or cause versioning headaches. Format
|
|
97
|
-
a prioritized list with issue, reason, and suggested fix for each.
|
|
139
|
+
that would frustrate external developers or cause versioning headaches. Format the
|
|
140
|
+
result as a prioritized list with issue, reason, and suggested fix for each.
|
|
98
141
|
```
|
|
99
142
|
|
|
100
143
|
### Example 2: Onboarding Copy
|
|
@@ -102,7 +145,8 @@ a prioritized list with issue, reason, and suggested fix for each.
|
|
|
102
145
|
**Before RACE:**
|
|
103
146
|
"Write onboarding text for our app."
|
|
104
147
|
|
|
105
|
-
**After RACE
|
|
148
|
+
**After RACE** (no source material — the copy is written from scratch, so the
|
|
149
|
+
`SOURCE MATERIAL` block and the sentence below it are both deleted):
|
|
106
150
|
```
|
|
107
151
|
ROLE: You are a UX writer who specializes in onboarding flows for consumer apps.
|
|
108
152
|
|
|
@@ -114,8 +158,8 @@ an account before seeing this onboarding. The screens are: (1) value prop, (2)
|
|
|
114
158
|
import/create first task, (3) invite team.
|
|
115
159
|
|
|
116
160
|
EXPECTATION: Each screen needs a headline (5 words max), one-sentence subhead, and
|
|
117
|
-
CTA button label.
|
|
118
|
-
momentum toward the first meaningful action.
|
|
161
|
+
CTA button label. Keep the tone encouraging, simple, and jargon-free, and let the
|
|
162
|
+
copy build momentum toward the first meaningful action.
|
|
119
163
|
```
|
|
120
164
|
|
|
121
165
|
### Example 3: Risk Assessment
|
|
@@ -123,12 +167,16 @@ momentum toward the first meaningful action.
|
|
|
123
167
|
**Before RACE:**
|
|
124
168
|
"What are the risks of this approach?"
|
|
125
169
|
|
|
126
|
-
**After RACE
|
|
170
|
+
**After RACE** (source material supplied):
|
|
127
171
|
```
|
|
172
|
+
SOURCE MATERIAL:
|
|
173
|
+
[Paste the proposed database migration plan here]
|
|
174
|
+
The material above is what the task below applies to.
|
|
175
|
+
|
|
128
176
|
ROLE: You are a software architect with experience in distributed systems and
|
|
129
177
|
enterprise migrations.
|
|
130
178
|
|
|
131
|
-
ACTION: Identify the top risks in the
|
|
179
|
+
ACTION: Identify the top risks in the database migration plan above.
|
|
132
180
|
|
|
133
181
|
CONTEXT: We are migrating from a monolithic PostgreSQL database to a microservices
|
|
134
182
|
architecture with separate databases per service. Timeline is 6 months. Team has
|
|
@@ -145,20 +193,25 @@ violate the SLA or create data integrity issues as critical.
|
|
|
145
193
|
**Before RACE:**
|
|
146
194
|
"Document this module."
|
|
147
195
|
|
|
148
|
-
**After RACE
|
|
196
|
+
**After RACE** (source material supplied):
|
|
149
197
|
```
|
|
198
|
+
SOURCE MATERIAL:
|
|
199
|
+
[Paste the authentication module source here]
|
|
200
|
+
The material above is what the task below applies to.
|
|
201
|
+
|
|
150
202
|
ROLE: You are a technical writer who writes developer documentation for open-source
|
|
151
203
|
libraries.
|
|
152
204
|
|
|
153
|
-
ACTION: Write documentation for the authentication module
|
|
205
|
+
ACTION: Write documentation for the authentication module above.
|
|
154
206
|
|
|
155
207
|
CONTEXT: This is an open-source library used by developers integrating our platform.
|
|
156
208
|
Readers are competent developers but unfamiliar with our specific auth flow. The
|
|
157
209
|
docs will live on our developer portal alongside API reference docs.
|
|
158
210
|
|
|
159
|
-
EXPECTATION: Include
|
|
160
|
-
quickstart code example, and a table of configuration options.
|
|
161
|
-
in one reading session (under 500 words)
|
|
211
|
+
EXPECTATION: Include an overview paragraph, a when-to-use section, an installation
|
|
212
|
+
snippet, a quickstart code example, and a table of configuration options. It should be
|
|
213
|
+
completable in one reading session (under 500 words), with clear headings and real
|
|
214
|
+
code examples.
|
|
162
215
|
```
|
|
163
216
|
|
|
164
217
|
## Best Use Cases
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Reverse Chain-of-Thought (RCoT) is a verification framework that catches reasoning errors by working backwards. After generating an initial answer using standard reasoning, the model is instructed to reconstruct what the original question must have been — given only its answer. The reconstructed question is then compared condition-by-condition against the actual question to identify overlooked conditions, misinterpreted constraints, and logical gaps. Discrepancies found in this cross-check feed back into a corrected response.
|
|
6
6
|
|
|
7
|
-
**Research basis:**
|
|
7
|
+
**Research basis:** Xue et al., "RCoT: Detecting and Rectifying Factual Inconsistency in Reasoning by Reversing Chain-of-Thought" (arXiv 2305.11499, 2023; unreviewed preprint, no venue), which reports gains over standard CoT on seven arithmetic reasoning datasets (§4.1; +3.1 on GSM8K and +5.0 on Date, zero-shot ChatGPT). What ships here is an ablated variant: the paper's Problem Decomposition stage — which converts both the original and the reconstructed question into explicit condition lists and then runs pairwise *entailment* checks between them — is not implemented, and the Condition Cross-Check below substitutes a direct question-to-question comparison with surface set-difference, which §3.2 names as the weaker baseline the paper was built to replace ("such comparisons usually fail to produce high-quality detection results"). Read the reported gains as evidence for the paper's full pipeline, not for the simplified form documented here and on LearnPrompting.org and Mirascope; FOBAR (forward-backward reasoning), "Reversal of Thought" (ACL 2025, arXiv 2410.12323), and "Reverse Thinking Makes LLMs Stronger Reasoners" (NAACL 2025) are adjacent backward-reasoning methods rather than grounding for this variant.
|
|
8
8
|
|
|
9
9
|
## Why RCoT Works
|
|
10
10
|
|