@ckelsoe/prompt-architect 3.3.1 → 3.4.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 (63) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +19 -0
  4. package/adapters/system-prompt.md +77 -51
  5. package/package.json +2 -2
  6. package/scripts/test.js +26 -0
  7. package/skills/prompt-architect/SKILL.md +49 -36
  8. package/skills/prompt-architect/assets/templates/ape_template.txt +14 -3
  9. package/skills/prompt-architect/assets/templates/bab_template.txt +23 -10
  10. package/skills/prompt-architect/assets/templates/broke_template.txt +31 -6
  11. package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +16 -8
  12. package/skills/prompt-architect/assets/templates/care_template.txt +4 -0
  13. package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +30 -31
  14. package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +8 -0
  15. package/skills/prompt-architect/assets/templates/co-star_template.txt +8 -0
  16. package/skills/prompt-architect/assets/templates/crispe_template.txt +6 -0
  17. package/skills/prompt-architect/assets/templates/ctf_template.txt +8 -0
  18. package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +7 -0
  19. package/skills/prompt-architect/assets/templates/hybrid_template.txt +44 -24
  20. package/skills/prompt-architect/assets/templates/iterative-compression_template.txt +43 -28
  21. package/skills/prompt-architect/assets/templates/least-to-most_template.txt +4 -0
  22. package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +4 -0
  23. package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +24 -14
  24. package/skills/prompt-architect/assets/templates/race_template.txt +9 -0
  25. package/skills/prompt-architect/assets/templates/rcot_template.txt +8 -0
  26. package/skills/prompt-architect/assets/templates/react_template.txt +38 -16
  27. package/skills/prompt-architect/assets/templates/rise-ie_template.txt +4 -0
  28. package/skills/prompt-architect/assets/templates/rise-ix_template.txt +3 -3
  29. package/skills/prompt-architect/assets/templates/risen_template.txt +7 -0
  30. package/skills/prompt-architect/assets/templates/rpef_template.txt +16 -11
  31. package/skills/prompt-architect/assets/templates/rtf_template.txt +9 -0
  32. package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +18 -10
  33. package/skills/prompt-architect/assets/templates/step-back_template.txt +4 -0
  34. package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +54 -31
  35. package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +37 -21
  36. package/skills/prompt-architect/references/frameworks/ape.md +143 -57
  37. package/skills/prompt-architect/references/frameworks/bab.md +137 -58
  38. package/skills/prompt-architect/references/frameworks/broke.md +157 -57
  39. package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +183 -75
  40. package/skills/prompt-architect/references/frameworks/care.md +67 -36
  41. package/skills/prompt-architect/references/frameworks/chain-of-density.md +49 -27
  42. package/skills/prompt-architect/references/frameworks/chain-of-thought.md +28 -7
  43. package/skills/prompt-architect/references/frameworks/co-star.md +100 -44
  44. package/skills/prompt-architect/references/frameworks/crispe.md +7 -5
  45. package/skills/prompt-architect/references/frameworks/ctf.md +73 -37
  46. package/skills/prompt-architect/references/frameworks/devils-advocate.md +105 -58
  47. package/skills/prompt-architect/references/frameworks/iterative-compression.md +236 -269
  48. package/skills/prompt-architect/references/frameworks/least-to-most.md +35 -13
  49. package/skills/prompt-architect/references/frameworks/plan-and-solve.md +38 -9
  50. package/skills/prompt-architect/references/frameworks/pre-mortem.md +176 -66
  51. package/skills/prompt-architect/references/frameworks/race.md +91 -38
  52. package/skills/prompt-architect/references/frameworks/rcot.md +1 -1
  53. package/skills/prompt-architect/references/frameworks/react.md +230 -97
  54. package/skills/prompt-architect/references/frameworks/reverse-role.md +22 -15
  55. package/skills/prompt-architect/references/frameworks/rise.md +94 -70
  56. package/skills/prompt-architect/references/frameworks/risen.md +80 -28
  57. package/skills/prompt-architect/references/frameworks/rpef.md +227 -58
  58. package/skills/prompt-architect/references/frameworks/rtf.md +2 -2
  59. package/skills/prompt-architect/references/frameworks/self-refine.md +4 -2
  60. package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +67 -21
  61. package/skills/prompt-architect/references/frameworks/step-back.md +47 -15
  62. package/skills/prompt-architect/references/frameworks/tidd-ec.md +110 -45
  63. package/skills/prompt-architect/references/frameworks/tree-of-thought.md +112 -37
@@ -12,7 +12,7 @@
12
12
  "name": "prompt-architect",
13
13
  "source": "./",
14
14
  "description": "Analyzes and improves prompts using 29 frameworks. Intent-based selection routes to the right framework — from ultra-minimal (APE) to agentic (ReAct).",
15
- "version": "3.3.1",
15
+ "version": "3.4.0",
16
16
  "keywords": ["prompt-engineering", "prompt-frameworks", "agent-skills"],
17
17
  "category": "productivity"
18
18
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prompt-architect",
3
3
  "description": "29-framework prompt engineering skill for analyzing and improving prompts across 7 intent categories",
4
- "version": "3.3.1",
4
+ "version": "3.4.0",
5
5
  "author": {
6
6
  "name": "Charles Kelsoe",
7
7
  "email": "charles@kelsoe.com"
package/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to the Prompt Architect Claude Code skill will be documented
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.4.0] - 2026-07-22
9
+
10
+ This release makes the **emission contract** explicit and consistent across the whole skill. When Prompt Architect delivers the final prompt, framework section headers (`CONTEXT:`, `ROLE:`, `BEFORE:`, …) are stripped — the user pastes a flat block of prose with no labels. Previously the framework docs and templates were written as if those headers would survive, so slots that were bare fragments ("meeting summary", "busy professionals") lost their meaning once the header was removed. Every framework now carries its own meaning in prose.
11
+
12
+ ### Added
13
+ - **Optional `SOURCE MATERIAL` block on every template that operates on an artifact.** It names the artifact concretely (never a generic "content"), ties it to the task with one carrier sentence, and self-deletes for from-scratch tasks. Three frameworks are deliberately exempt because they have no pasted-material slot: **ReAct** (material arrives as live tool output), **Reverse Role** (everything is gathered through the interview), and **RISE-IX** (its samples land in the EXAMPLES slot).
14
+ - **Emission-contract test guard.** `scripts/test.js` now fails if the load-bearing output-delivery rules (no section headers in the deliverable, paste-verbatim, "revised prompt is last element", the negation-survival and no-defaulting rules, and the worked example obeying them) diverge between `SKILL.md` and `adapters/system-prompt.md`. The prior drift checks compared only step headings and framework names, so prose drift — like the adapter shipping a BAB example *with* `BEFORE:/AFTER:/BRIDGE:` headers — passed silently.
15
+
16
+ ### Changed
17
+ - **All 28 framework reference docs rewritten for the emission contract.** Each Overview now states how the framework emits; each component's guidance says whether its slot must be a complete sentence or ships inside a carrier sentence; and every Complete Example is shown in emitted form — with the `SOURCE MATERIAL` block, "the … above" references, and at least one from-scratch variant showing the block deleted. Origin/citation facts were preserved verbatim throughout.
18
+ - **Elicitation questions in `SKILL.md` and the adapter now ask for the user's own material** ("Paste the Q3 revenue report here", "paste 2-3 actual samples whose style should be matched") instead of one-word checklists ("Context, audience, tone?"). A framework that operates on an artifact and never asks for it will otherwise invent one. The material-question exemptions above are documented inline.
19
+ - **APE loses its collapsed single-sentence form.** The two inconsistent inline syntaxes it advertised were never implemented by the template and break when source material or multi-clause expectations are present; the doc now explains why. A complete APE prompt is still three sentences.
20
+ - **`RISE` → `RISE-IE` in cross-references.** Docs that pointed to RISE as the input-transformation framework now use the skill's `RISE-IE` shorthand consistently. `RISEN` references are unchanged.
21
+
22
+ ### Fixed
23
+ - **`RACE` examples no longer dangle.** Two examples referenced material "described below" when the `SOURCE MATERIAL` block places it above; they now say "above", matching the template's positioning rule.
24
+
25
+ ---
26
+
8
27
  ## [3.3.1] - 2026-07-19
9
28
 
10
29
  ### Fixed
@@ -127,7 +127,7 @@ Most prompts need exactly one framework. Combine only when the task genuinely ha
127
127
  | Multi-step procedure executed with tools | **RISEN + ReAct** | RISEN specifies the steps and success criteria; ReAct governs the tool-use cycle within each step |
128
128
  | Business deliverable with a hostile audience | **BROKE + Devil's Advocate** | BROKE sets objective and key results; Devil's Advocate stress-tests them before they reach a stakeholder |
129
129
 
130
- When you combine, state plainly in your analysis which framework owns which phase. Never stack more than two — a third adds structure the model spends attention parsing rather than following.
130
+ When you combine, state plainly in your analysis which framework owns which phase. Never stack more than two — beyond that the frameworks' instructions start to overlap and contradict, and no single framework clearly owns any phase.
131
131
 
132
132
  ---
133
133
 
@@ -147,51 +147,77 @@ When you combine, state plainly in your analysis which framework owns which phas
147
147
 
148
148
  Ask targeted questions (3-5 at a time) based on identified gaps:
149
149
 
150
- **For CO-STAR**: Context, audience, tone, style, objective, format?
151
- **For RISEN**: Role, principles, steps, success criteria, constraints?
152
- **For RISE-IE**: Role, input format/characteristics, processing steps, output expectations?
153
- **For RISE-IX**: Role, task instructions, workflow steps, reference examples?
154
- **For TIDD-EC**: Task type, exact steps, what to include (dos), what to avoid (don'ts), examples, context?
155
- **For CTF**: What is the situation/background, exact task, output format?
156
- **For RTF**: Expertise needed, exact task, output format?
157
- **For APE**: Core action, why it's needed, what success looks like?
158
- **For BAB**: What is the current state/problem, what should it become, transformation rules?
159
- **For RACE**: Role/expertise, action, situational context, explicit expectation?
160
- **For CRISPE**: Capacity/role, background insight, instructions, personality/style, how many variants?
161
- **For BROKE**: Background situation, role, objective, measurable key results, evolve instructions?
162
- **For CARE**: Context/situation, specific ask, explicit rules and constraints, examples of good output?
163
- **For Tree of Thought**: Problem, distinct solution branches to explore, evaluation criteria?
164
- **For ReAct**: Goal, available tools, constraints and stop condition?
165
- **For Skeleton of Thought**: Topic/question, number of skeleton points, expansion depth per point?
166
- **For Step-Back**: Original question, what higher-level principle governs it?
167
- **For Least-to-Most**: Full problem, decomposed subproblems in dependency order?
168
- **For Plan-and-Solve**: Problem with all relevant numbers/variables?
169
- **For Chain of Thought**: Problem, reasoning steps, verification?
170
- **For Chain of Density**: Source document to summarize, fixed target length, number of iterations?
171
- **For Iterative Compression**: Content to compress, target length, optimization goal, stopping criterion?
172
- **For Self-Refine**: Output to improve, feedback dimensions, stop condition?
173
- **For CAI Critique-Revise**: The principle to enforce, output to critique?
174
- **For Devil's Advocate**: Position to attack, attack dimensions, severity ranking needed?
175
- **For Pre-Mortem**: Project/decision, time horizon, domains to analyze?
176
- **For RCoT**: Question with all conditions, initial answer to verify?
177
- **For RPEF**: Output sample to reverse-engineer, input data if available?
178
- **For Reverse Role**: Intent statement, domain of expertise, interview mode (batch vs. conversational)?
150
+ **For CO-STAR**: Paste the material this is built from if any, the situation and constraints behind it, who the audience is and what you want them to do, the tone and style to write in, the output format and length?
151
+ **For RISEN**: Paste the material the procedure runs on if any, the expertise and methodology to adopt, the steps in order, what must be true when it is done, what is out of scope or must not happen?
152
+ **For RISE-IE**: Paste the actual data to be processed (not a description of it), its format and any quirks to expect, the expertise needed, the processing steps in order, what the output must look like?
153
+ **For RISE-IX**: The expertise to embody, what to create and its core requirements, the workflow steps, paste 2-3 actual samples whose style and format the output should match?
154
+ **For TIDD-EC**: Paste the material this task operates on (the message, document, or dataset itself, not a description of it), what kind of task this is and the background that shapes it, the exact steps in order, what must always be included and what must never happen (state each as a prohibition, not a topic), examples of a good result?
155
+ **For CTF**: Paste the artifact this operates on if you have one, the situation and background around it, the exact task and deliverable, the output format?
156
+ **For RTF**: Paste the material the task applies to if any, the expertise needed, the exact task and deliverable, the output format and length?
157
+ **For APE**: Paste the material the action applies to if any, the one action to perform, why it is needed and who uses the result, what a good result looks like?
158
+ **For BAB**: Paste the actual artifact being transformed, what is wrong with it now, what it should become, what rules govern the transformation?
159
+ **For RACE**: Paste the material the task applies to if any, the role and expertise needed, the action to perform, the situational context and audience, what a successful output looks like?
160
+ **For CRISPE**: The expertise and role to embody, paste the data or style sample it should work from, the background it needs, the exact task and deliverable, the tone and how many variants?
161
+ **For BROKE**: Paste the supporting material or performance data if you have it, the current situation and why this task exists, the role to embody, the specific deliverable and the structure and length the response should have, the measurable business outcome it should move?
162
+ **For CARE**: Paste the source document or draft this works from if any, your situation and why this task exists, the specific ask and deliverable, what must be included and what would make this output wrong or unusable, an example of what good looks like?
163
+ **For Tree of Thought**: The decision or problem and its constraints, paste the evidence the branches must be judged against, the 2-5 distinct approaches to compare, the criteria that decide between them?
164
+ **For ReAct**: Does the environment this runs in actually have callable tools — if not, stop and use Chain of Thought instead, which tools are available and how each is invoked, what end state counts as success, what limits apply and when to stop?
165
+ **For Skeleton of Thought**: The topic or question to outline, paste the document, data, or notes the answer must be drawn from if you have any, who the answer is for and what scope it should cover, how far each point should be expanded (a few sentences, a paragraph, full detail)?
166
+ **For Step-Back**: The specific question you want answered, paste the code, document, or design it is about if any, what higher-level principle or concept governs it?
167
+ **For Least-to-Most**: The full problem in one statement, paste the material the subproblems must reason over, what is the simplest thing that must be answered first, what does the final answer depend on?
168
+ **For Plan-and-Solve**: The problem with every number, unit, and constraint written out, paste the dataset or figures the calculation runs on if any, which values are given and which must be derived?
169
+ **For Chain of Thought**: The problem with all its conditions stated, paste the code, data, or document to reason over if any, what the reasoning steps should be?
170
+ **For Chain of Density**: Paste the full document to summarize, the fixed word budget every summary must hit, how many densification passes (the paper uses 5)?
171
+ **For Iterative Compression**: Paste the content to compress, where it should end up (word count, reading level, single paragraph), what should improve on each pass, how many passes and when to stop?
172
+ **For Self-Refine**: Paste the actual draft to improve, which dimensions the critique should cover (clarity, completeness, tone), what would make this output wrong or unusable?
173
+ **For CAI Critique-Revise**: Paste the actual output to be critiqued, the specific standard it must satisfy stated precisely enough to be checkable, what would make this output wrong or unusable?
174
+ **For Devil's Advocate**: The position, plan, or decision to attack, paste the proposal or memo that sets it out if you have one, which dimensions the attack should cover?
175
+ **For Pre-Mortem**: The project or decision being analyzed with its team, timeline, and goals, paste the plan or proposal document if you have one, how far in the future the imagined failure should be dated?
176
+ **For RCoT**: The question with every condition and constraint written out, paste the document those conditions come from if any, any implicit requirement not yet written into the question (units, deadlines, exclusions, edge cases) that a correct answer must still satisfy?
177
+ **For RPEF**: Paste the actual output sample to reverse-engineer, paste the input that produced it or confirm it is output-only, which details are one-off specifics that should become [PLACEHOLDER] variables?
178
+ **For Reverse Role**: What you want to achieve in one or two sentences, the domain of expertise to consult, questions one at a time or all at once, should it then do the task or synthesize a structured prompt for you to approve?
179
+
180
+ Every set above asks for the user's own material, because a framework that operates on an
181
+ artifact and never asks for it will invent one. Three frameworks are deliberately exempt:
182
+ **ReAct** (its material arrives as live tool output, not pasted text), **Reverse Role** (it
183
+ elicits everything through the interview and its template has no material slot), and
184
+ **RISE-IX** (its samples land in the EXAMPLES slot, which its own question already covers).
185
+ Do not add a material question to those three.
179
186
 
180
187
  ### 5. Apply Framework
181
188
 
182
189
  Using gathered information:
183
190
  1. Apply the appropriate framework structure from your knowledge of the framework
184
191
  2. Map user's information to framework components
185
- 3. Fill missing elements with reasonable defaults
192
+ 3. Fill missing elements with reasonable defaults — **with two exceptions, below**
186
193
  4. Structure according to framework format
187
194
 
195
+ **Never default a fact about the user's world.** Their business, metrics, history, policies, staff, customers, data, or constraints are things only they know. A plausible-sounding default here is a fabrication the user may not notice before sending — asserting "our first price increase in three years" in an email to paying customers, or inventing a phone number in a published review reply. Where such a slot is unanswered, emit a visible `[you fill this in: <what is needed>]` placeholder and list every placeholder in your analysis section.
196
+
197
+ **Never soften or drop a prohibition.** If the user said something must not happen, it must survive into the emitted prompt as an explicit "Do not…" or "Never…" instruction. It cannot rely on a section header to carry the negation, because headers are stripped at emission (see step 6).
198
+
188
199
  ### 6. Present Improvements
189
200
 
190
- Show improved prompt with:
191
- - Clear before/after comparison
192
- - Explanation of changes made
201
+ Structure your output in this exact order:
202
+
203
+ **A. Analysis section** (comes first):
204
+ - Framework selected and why
205
+ - Changes made and reasoning
193
206
  - Framework components applied
194
- - Reasoning for improvements
207
+
208
+ **B. Usage instructions** (transition block, immediately before the prompt):
209
+
210
+ > **Your revised prompt is ready.**
211
+ > - **New chat**: Copy the prompt below and paste it as your first message in a new conversation.
212
+ > - **Same chat**: Tell the assistant: *"Use the revised prompt you just provided as a new instruction and execute it."*
213
+
214
+ **C. The revised prompt** (comes last, in a fenced code block):
215
+ - Present as a clean, flat-text block inside triple backticks
216
+ - **No framework section headers** (no "BEFORE:", "BRIDGE:", "CONTEXT:", etc.) — these are scaffolding, not part of the deliverable
217
+ - **No indentation** beyond what the prompt itself genuinely requires
218
+ - **No markdown formatting** inside the block unless the prompt explicitly needs it (e.g., it asks for tables)
219
+ - The user must be able to copy the entire block contents and paste it verbatim with zero editing — the one exception is `[...]` placeholders for material or facts only the user can supply (see step 5). Keep these to a minimum, make each self-explanatory, and name them in the analysis section so the user knows exactly what to fill in before sending.
220
+ - **Nothing after the code block** — the revised prompt must be the absolute last element in the response. No trailing suggestions, tips, or follow-up text after the closing backticks.
195
221
 
196
222
  ### 7. Iterate
197
223
 
@@ -244,25 +270,25 @@ Frameworks add structure — but structure has overhead. Skip them when:
244
270
  **Improved Prompt** (BAB):
245
271
 
246
272
  ```
247
- BEFORE (current state):
248
273
  [Paste the current job posting here]
249
- This posting suffers from: corporate-speak, passive voice, overly formal tone,
250
- and generic language that doesn't reflect actual team culture.
251
-
252
- AFTER (desired state):
253
- A job posting that sounds like it was written by engineers, for engineers.
254
- Early-career developers should read it and think "I want to work there."
255
- It should feel honest, direct, and human — not like legal boilerplate.
256
-
257
- BRIDGE (transformation rules):
258
- 1. Replace all passive constructions with active voice
259
- 2. Convert corporate jargon to plain English (e.g., "leverage" → "use")
260
- 3. Add one specific, concrete detail about the team/culture per section
261
- 4. Keep all technical requirements and must-haves verbatim
262
- 5. Target reading level: conversational, not academic
263
- 6. Length: same or shorter than original — cut fluff, don't add it
274
+
275
+ The job posting above suffers from corporate-speak, passive voice, overly formal tone, and generic language that doesn't reflect actual team culture.
276
+
277
+ The rewritten version should sound like it was written by engineers, for engineers. Early-career developers should read it and think "I want to work there." It should feel honest, direct, and human — not like legal boilerplate.
278
+
279
+ Follow these rules:
280
+ - Replace all passive constructions with active voice.
281
+ - Convert corporate jargon to plain English (e.g., "leverage" → "use").
282
+ - Add one specific, concrete detail about the team or culture per section.
283
+ - Keep all technical requirements and must-haves verbatim — do not change these.
284
+ - Target reading level: conversational, not academic.
285
+ - Length: same or shorter than the original. Cut fluff, don't add it.
286
+
287
+ Now rewrite the job posting above.
264
288
  ```
265
289
 
290
+ Note that the emitted prompt carries no `BEFORE:` / `AFTER:` / `BRIDGE:` headers. The BAB structure shaped what the prompt says; it is not part of what the user receives.
291
+
266
292
  ## Usage Notes
267
293
 
268
294
  - Always start by analyzing the original prompt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckelsoe/prompt-architect",
3
- "version": "3.3.1",
3
+ "version": "3.4.0",
4
4
  "description": "Agent skill for analyzing and improving prompts using 29 frameworks across 7 intent categories. Works with Claude Code, Gemini CLI, Cursor, Copilot, and 30+ Agent Skills compatible tools.",
5
5
  "main": "skills/prompt-architect/SKILL.md",
6
6
  "keywords": [
@@ -81,7 +81,7 @@
81
81
  "type": "skill",
82
82
  "skillName": "prompt-architect",
83
83
  "skillPath": "skills/prompt-architect",
84
- "version": "3.3.1",
84
+ "version": "3.4.0",
85
85
  "compatibility": {
86
86
  "claudeCode": ">=1.0.0"
87
87
  },
package/scripts/test.js CHANGED
@@ -183,6 +183,32 @@ test('Adapter has not drifted from SKILL.md', () => {
183
183
  throw new Error(`Frameworks in SKILL.md but missing from adapter: ${dropped.join(', ')}`);
184
184
  }
185
185
  void missing;
186
+
187
+ // 4. Load-bearing rules must be present in BOTH files.
188
+ // Checks 1-3 compare only step headings and framework names, so they cannot
189
+ // see prose drift. The adapter shipped without SKILL.md's entire output
190
+ // delivery contract -- the rules that define what the skill actually emits --
191
+ // while this test passed. Any rule that changes the emitted artifact goes here.
192
+ const invariants = [
193
+ 'No framework section headers',
194
+ 'scaffolding, not part of the deliverable',
195
+ 'paste it verbatim with zero editing',
196
+ 'the absolute last element in the response',
197
+ 'Your revised prompt is ready.',
198
+ 'Never stack more than two',
199
+ 'Never default a fact about the user',
200
+ 'Never soften or drop a prohibition',
201
+ // The worked example must demonstrate the emission rules, not violate them.
202
+ // The adapter previously shipped a BAB example with BEFORE:/AFTER:/BRIDGE: headers.
203
+ 'Now rewrite the job posting above.',
204
+ ];
205
+ const divergent = invariants.filter(r => skill.includes(r) !== adapter.includes(r));
206
+ if (divergent.length > 0) {
207
+ const detail = divergent
208
+ .map(r => `${JSON.stringify(r)} (SKILL.md: ${skill.includes(r) ? 'yes' : 'NO'}, adapter: ${adapter.includes(r) ? 'yes' : 'NO'})`)
209
+ .join('\n ');
210
+ throw new Error(`Emission-contract rules differ between SKILL.md and the adapter:\n ${detail}`);
211
+ }
186
212
  });
187
213
 
188
214
  // Agent Skills compliance tests
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: Requires no external dependencies. Works with any Agent Skills compatible tool.
6
6
  metadata:
7
7
  author: ckelsoe
8
- version: "3.3.1"
8
+ version: "3.4.0"
9
9
  homepage: https://github.com/ckelsoe/prompt-architect
10
10
  ---
11
11
 
@@ -131,7 +131,7 @@ Most prompts need exactly one framework. Combine only when the task genuinely ha
131
131
  | Multi-step procedure executed with tools | **RISEN + ReAct** | RISEN specifies the steps and success criteria; ReAct governs the tool-use cycle within each step |
132
132
  | Business deliverable with a hostile audience | **BROKE + Devil's Advocate** | BROKE sets objective and key results; Devil's Advocate stress-tests them before they reach a stakeholder |
133
133
 
134
- When you combine, load `assets/templates/hybrid_template.txt` and state plainly in your analysis which framework owns which phase. Never stack more than two — a third adds structure the model spends attention parsing rather than following.
134
+ When you combine, load `assets/templates/hybrid_template.txt` and state plainly in your analysis which framework owns which phase. Never stack more than two — beyond that the frameworks' instructions start to overlap and contradict, and no single framework clearly owns any phase.
135
135
 
136
136
  ---
137
137
 
@@ -153,44 +153,55 @@ One-line per framework (load `references/frameworks/` for full detail):
153
153
 
154
154
  Ask targeted questions (3-5 at a time) based on identified gaps:
155
155
 
156
- **For CO-STAR**: Context, audience, tone, style, objective, format?
157
- **For RISEN**: Role, principles, steps, success criteria, constraints?
158
- **For RISE-IE**: Role, input format/characteristics, processing steps, output expectations?
159
- **For RISE-IX**: Role, task instructions, workflow steps, reference examples?
160
- **For TIDD-EC**: Task type, exact steps, what to include (dos), what to avoid (don'ts), examples, context?
161
- **For CTF**: What is the situation/background, exact task, output format?
162
- **For RTF**: Expertise needed, exact task, output format?
163
- **For APE**: Core action, why it's needed, what success looks like?
164
- **For BAB**: What is the current state/problem, what should it become, transformation rules?
165
- **For RACE**: Role/expertise, action, situational context, explicit expectation?
166
- **For CRISPE**: Capacity/role, background insight, instructions, personality/style, how many variants?
167
- **For BROKE**: Background situation, role, objective, measurable key results, evolve instructions?
168
- **For CARE**: Context/situation, specific ask, explicit rules and constraints, examples of good output?
169
- **For Tree of Thought**: Problem, distinct solution branches to explore, evaluation criteria?
170
- **For ReAct**: Goal, available tools, constraints and stop condition?
171
- **For Skeleton of Thought**: Topic/question, number of skeleton points, expansion depth per point?
172
- **For Step-Back**: Original question, what higher-level principle governs it?
173
- **For Least-to-Most**: Full problem, decomposed subproblems in dependency order?
174
- **For Plan-and-Solve**: Problem with all relevant numbers/variables?
175
- **For Chain of Thought**: Problem, reasoning steps, verification?
176
- **For Chain of Density**: Source document to summarize, fixed target length, number of iterations?
177
- **For Iterative Compression**: Content to compress, target length, optimization goal, stopping criterion?
178
- **For Self-Refine**: Output to improve, feedback dimensions, stop condition?
179
- **For CAI Critique-Revise**: The principle to enforce, output to critique?
180
- **For Devil's Advocate**: Position to attack, attack dimensions, severity ranking needed?
181
- **For Pre-Mortem**: Project/decision, time horizon, domains to analyze?
182
- **For RCoT**: Question with all conditions, initial answer to verify?
183
- **For RPEF**: Output sample to reverse-engineer, input data if available?
184
- **For Reverse Role**: Intent statement, domain of expertise, interview mode (batch vs. conversational)?
156
+ **For CO-STAR**: Paste the material this is built from if any, the situation and constraints behind it, who the audience is and what you want them to do, the tone and style to write in, the output format and length?
157
+ **For RISEN**: Paste the material the procedure runs on if any, the expertise and methodology to adopt, the steps in order, what must be true when it is done, what is out of scope or must not happen?
158
+ **For RISE-IE**: Paste the actual data to be processed (not a description of it), its format and any quirks to expect, the expertise needed, the processing steps in order, what the output must look like?
159
+ **For RISE-IX**: The expertise to embody, what to create and its core requirements, the workflow steps, paste 2-3 actual samples whose style and format the output should match?
160
+ **For TIDD-EC**: Paste the material this task operates on (the message, document, or dataset itself, not a description of it), what kind of task this is and the background that shapes it, the exact steps in order, what must always be included and what must never happen (state each as a prohibition, not a topic), examples of a good result?
161
+ **For CTF**: Paste the artifact this operates on if you have one, the situation and background around it, the exact task and deliverable, the output format?
162
+ **For RTF**: Paste the material the task applies to if any, the expertise needed, the exact task and deliverable, the output format and length?
163
+ **For APE**: Paste the material the action applies to if any, the one action to perform, why it is needed and who uses the result, what a good result looks like?
164
+ **For BAB**: Paste the actual artifact being transformed, what is wrong with it now, what it should become, what rules govern the transformation?
165
+ **For RACE**: Paste the material the task applies to if any, the role and expertise needed, the action to perform, the situational context and audience, what a successful output looks like?
166
+ **For CRISPE**: The expertise and role to embody, paste the data or style sample it should work from, the background it needs, the exact task and deliverable, the tone and how many variants?
167
+ **For BROKE**: Paste the supporting material or performance data if you have it, the current situation and why this task exists, the role to embody, the specific deliverable and the structure and length the response should have, the measurable business outcome it should move?
168
+ **For CARE**: Paste the source document or draft this works from if any, your situation and why this task exists, the specific ask and deliverable, what must be included and what would make this output wrong or unusable, an example of what good looks like?
169
+ **For Tree of Thought**: The decision or problem and its constraints, paste the evidence the branches must be judged against, the 2-5 distinct approaches to compare, the criteria that decide between them?
170
+ **For ReAct**: Does the environment this runs in actually have callable tools — if not, stop and use Chain of Thought instead, which tools are available and how each is invoked, what end state counts as success, what limits apply and when to stop?
171
+ **For Skeleton of Thought**: The topic or question to outline, paste the document, data, or notes the answer must be drawn from if you have any, who the answer is for and what scope it should cover, how far each point should be expanded (a few sentences, a paragraph, full detail)?
172
+ **For Step-Back**: The specific question you want answered, paste the code, document, or design it is about if any, what higher-level principle or concept governs it?
173
+ **For Least-to-Most**: The full problem in one statement, paste the material the subproblems must reason over, what is the simplest thing that must be answered first, what does the final answer depend on?
174
+ **For Plan-and-Solve**: The problem with every number, unit, and constraint written out, paste the dataset or figures the calculation runs on if any, which values are given and which must be derived?
175
+ **For Chain of Thought**: The problem with all its conditions stated, paste the code, data, or document to reason over if any, what the reasoning steps should be?
176
+ **For Chain of Density**: Paste the full document to summarize, the fixed word budget every summary must hit, how many densification passes (the paper uses 5)?
177
+ **For Iterative Compression**: Paste the content to compress, where it should end up (word count, reading level, single paragraph), what should improve on each pass, how many passes and when to stop?
178
+ **For Self-Refine**: Paste the actual draft to improve, which dimensions the critique should cover (clarity, completeness, tone), what would make this output wrong or unusable?
179
+ **For CAI Critique-Revise**: Paste the actual output to be critiqued, the specific standard it must satisfy stated precisely enough to be checkable, what would make this output wrong or unusable?
180
+ **For Devil's Advocate**: The position, plan, or decision to attack, paste the proposal or memo that sets it out if you have one, which dimensions the attack should cover?
181
+ **For Pre-Mortem**: The project or decision being analyzed with its team, timeline, and goals, paste the plan or proposal document if you have one, how far in the future the imagined failure should be dated?
182
+ **For RCoT**: The question with every condition and constraint written out, paste the document those conditions come from if any, any implicit requirement not yet written into the question (units, deadlines, exclusions, edge cases) that a correct answer must still satisfy?
183
+ **For RPEF**: Paste the actual output sample to reverse-engineer, paste the input that produced it or confirm it is output-only, which details are one-off specifics that should become [PLACEHOLDER] variables?
184
+ **For Reverse Role**: What you want to achieve in one or two sentences, the domain of expertise to consult, questions one at a time or all at once, should it then do the task or synthesize a structured prompt for you to approve?
185
+
186
+ Every set above asks for the user's own material, because a framework that operates on an
187
+ artifact and never asks for it will invent one. Three frameworks are deliberately exempt:
188
+ **ReAct** (its material arrives as live tool output, not pasted text), **Reverse Role** (it
189
+ elicits everything through the interview and its template has no material slot), and
190
+ **RISE-IX** (its samples land in the EXAMPLES slot, which its own question already covers).
191
+ Do not add a material question to those three.
185
192
 
186
193
  ### 5. Apply Framework
187
194
 
188
195
  Using gathered information:
189
196
  1. Load appropriate template from `assets/templates/`
190
197
  2. Map user's information to framework components
191
- 3. Fill missing elements with reasonable defaults
198
+ 3. Fill missing elements with reasonable defaults — **with two exceptions, below**
192
199
  4. Structure according to framework format
193
200
 
201
+ **Never default a fact about the user's world.** Their business, metrics, history, policies, staff, customers, data, or constraints are things only they know. A plausible-sounding default here is a fabrication the user may not notice before sending — asserting "our first price increase in three years" in an email to paying customers, or inventing a phone number in a published review reply. Where such a slot is unanswered, emit a visible `[you fill this in: <what is needed>]` placeholder and list every placeholder in your analysis section.
202
+
203
+ **Never soften or drop a prohibition.** If the user said something must not happen, it must survive into the emitted prompt as an explicit "Do not…" or "Never…" instruction. It cannot rely on a section header to carry the negation, because headers are stripped at emission (see step 6).
204
+
194
205
  ### 6. Present Improvements
195
206
 
196
207
  Structure your output in this exact order:
@@ -211,14 +222,14 @@ Structure your output in this exact order:
211
222
  - **No framework section headers** (no "BEFORE:", "BRIDGE:", "CONTEXT:", etc.) — these are scaffolding, not part of the deliverable
212
223
  - **No indentation** beyond what the prompt itself genuinely requires
213
224
  - **No markdown formatting** inside the block unless the prompt explicitly needs it (e.g., it asks for tables)
214
- - The user must be able to copy the entire block contents and paste it verbatim with zero editing
225
+ - The user must be able to copy the entire block contents and paste it verbatim with zero editing — the one exception is `[...]` placeholders for material or facts only the user can supply (see step 5). Keep these to a minimum, make each self-explanatory, and name them in the analysis section so the user knows exactly what to fill in before sending.
215
226
  - **Nothing after the code block** — the revised prompt must be the absolute last element in the response. No trailing suggestions, tips, or follow-up text after the closing backticks.
216
227
 
217
228
  ### 7. Iterate
218
229
 
219
230
  - Confirm improvements align with intent
220
231
  - Refine based on feedback
221
- - Switch or combine frameworks if needed (see **Combining Frameworks** below)
232
+ - Switch or combine frameworks if needed (see **Combining Frameworks** above)
222
233
  - Continue until satisfactory
223
234
 
224
235
  ## Framework References
@@ -316,10 +327,10 @@ This example shows the full intent-based flow — detecting intent, using the di
316
327
  > - **Same chat**: Tell the assistant: *"Use the revised prompt you just provided as a new instruction and execute it."*
317
328
 
318
329
  ```
319
- Rewrite the following job posting. The current version suffers from corporate-speak, passive voice, overly formal tone, and generic language that doesn't reflect actual team culture.
320
-
321
330
  [Paste the current job posting here]
322
331
 
332
+ The job posting above suffers from corporate-speak, passive voice, overly formal tone, and generic language that doesn't reflect actual team culture.
333
+
323
334
  The rewritten version should sound like it was written by engineers, for engineers. Early-career developers should read it and think "I want to work there." It should feel honest, direct, and human — not like legal boilerplate.
324
335
 
325
336
  Follow these rules:
@@ -329,6 +340,8 @@ Follow these rules:
329
340
  - Keep all technical requirements and must-haves verbatim — do not change these.
330
341
  - Target reading level: conversational, not academic.
331
342
  - Length: same or shorter than the original. Cut fluff, don't add it.
343
+
344
+ Now rewrite the job posting above.
332
345
  ```
333
346
 
334
347
  ---
@@ -1,5 +1,16 @@
1
- ACTION: [What to do — one clear verb-driven instruction]
1
+ SOURCE MATERIAL:
2
+ [Optional — paste the artifact the task operates on here, named concretely (the meeting
3
+ transcript, the function). If the task creates something from scratch, delete this
4
+ bracketed block along with the sentence directly below it.]
5
+ Use the material above as the input for the task described below.
2
6
 
3
- PURPOSE: [Why it's needed — one sentence on how it will be used or who needs it]
7
+ ACTION:
8
+ [One complete imperative sentence naming what to produce, e.g. "Summarize the decisions in
9
+ the transcript above." Never a bare noun phrase like "meeting summary" — nothing else here
10
+ states the task. The two fields below may be fragments.]
4
11
 
5
- EXPECTATION: [What a good result looks like — format, length, quality bar, or tone]
12
+ PURPOSE:
13
+ Calibrate the result to this purpose: [who needs it and what they will do with it].
14
+
15
+ EXPECTATION:
16
+ A good result meets this standard: [the success bar — length, format, tone, or quality].
@@ -1,15 +1,28 @@
1
+ SOURCE MATERIAL:
2
+ [Paste the artifact to be transformed here — the artifact itself, never a description of it.
3
+ Name it concretely and keep it bracketed for the user to fill in, e.g. "[Paste the current
4
+ job posting here]".]
5
+ Use the material above as the material to be transformed for the work described below.
6
+
1
7
  BEFORE:
2
- [Describe the current state what exists now, what's wrong with it, what needs to change.
3
- Be specific: quote actual content, describe current problems, name limitations.]
8
+ This is the state that material is in now, and why it must change:
9
+ [Describe the current state in complete sentences, not a bare noun phrase. Say what exists
10
+ now, what is wrong with it, and what needs to change. Quote the material above wherever a
11
+ specific flaw is visible in it.]
4
12
 
5
13
  AFTER:
6
- [Describe the desired end state what it should look like once transformed.
7
- Include: qualities it should have, audience/consumer of the result, success criteria.]
14
+ This is what it must become once the transformation is complete:
15
+ [Describe the desired end state in complete sentences. Cover the qualities the result must
16
+ have and the criteria that make it successful. Name the audience only if the user identified
17
+ one; otherwise leave "[you fill this in: who will read the result]".]
8
18
 
9
19
  BRIDGE:
10
- [Define the transformation rules how to get from Before to After.
11
- Include:
12
- - What must be preserved (do not change)
13
- - What should change
14
- - Any constraints on approach or style
15
- - Tone, length, or format requirements for the result]
20
+ Follow these rules when carrying out the transformation:
21
+ [State each rule as a self-contained imperative carrying its own verb — "Preserve every salary
22
+ and benefits detail exactly as written", not "salary details". Write prohibitions as
23
+ "Do not…" or "Never…". Cover:
24
+ - What must be preserved unchanged, and what should change
25
+ - Any constraint on approach, style, tone, length, or format]
26
+
27
+ Now [state the transformation as an imperative naming the material, e.g. "rewrite the job
28
+ posting above"].
@@ -1,15 +1,40 @@
1
+ This is a business task with a defined success bar. Everything below describes one
2
+ deliverable.
3
+
4
+ SOURCE MATERIAL:
5
+ [Optional — paste the material this task works from here, named specifically: the current
6
+ process document, the performance data, the existing draft. If you have nothing to paste,
7
+ delete this bracketed block along with the sentence directly below it.]
8
+ Use the material above as the factual basis for the work described below.
9
+
1
10
  BACKGROUND:
2
- [Current situation, why this task exists, relevant history and constraints]
11
+ Here is the situation this task arises from:
12
+ [Describe the current state as narrative prose: what the organization is, what is
13
+ happening now, and why this task exists. Add prior attempts and constraints only where the
14
+ user supplied them; never invent them.]
3
15
 
4
16
  ROLE:
5
- [Professional persona and expertise to embody]
17
+ Take on this professional persona for the work:
18
+ [One second-person sentence beginning "You are…", naming the domain expertise and level of
19
+ experience this task requires.]
6
20
 
7
21
  OBJECTIVE:
8
- [The specific task and deliverable]
22
+ Your task is to do the following:
23
+ [One imperative sentence naming what to analyze or produce and what the finished artifact
24
+ is.]
25
+
26
+ OUTPUT FORMAT:
27
+ Deliver your response in this shape:
28
+ [Name the sections the response should contain, its approximate length or item count, and
29
+ how much supporting detail each part carries.]
9
30
 
10
31
  KEY RESULTS:
11
- [Measurable outcomes this output should help achieve how success is defined in business terms]
32
+ Your response will be judged on whether it can plausibly move the measurable outcomes
33
+ below. They are the success bar, not tasks to carry out:
34
+ [List each outcome as a statement naming the metric and its target. Add a baseline or time
35
+ frame only where the user gave one; never invent one — write "[you fill this in: current
36
+ value of <metric>]" instead.]
12
37
 
13
38
  EVOLVE:
14
- After completing your response, provide 3 specific suggestions for improving
15
- this output or approach in a follow-up iteration.
39
+ After completing your response, provide 3 specific suggestions for improving this output
40
+ or approach in a follow-up iteration.
@@ -1,18 +1,26 @@
1
+ You are enforcing a stated principle against an existing piece of writing. This is a
2
+ two-phase task: write a critique, then write a revision. Do not skip the critique and go
3
+ straight to the rewrite, and do not merge the two.
4
+
1
5
  PRINCIPLE:
2
- [State the specific standard the output must satisfy — be precise and measurable]
6
+ The principle to enforce is this:
7
+ [State the standard the output must satisfy — one principle or a small set — as complete
8
+ sentences whose compliance a reader could check. Be precise and measurable.]
3
9
 
4
- INITIAL OUTPUT:
5
- [The output to evaluate — AI-generated or human-written]
10
+ SOURCE MATERIAL:
11
+ [Paste the output to be critiqued here — AI-generated or human-written.]
12
+ Use the material above as the text to be critiqued and revised for the work described
13
+ below.
6
14
 
7
15
  CRITIQUE:
8
- Identify specific ways the output above violates or falls short of the
9
- principle stated above.
16
+ Before rewriting anything, identify the specific ways the material above violates or falls
17
+ short of the principle.
10
18
  - Quote the specific passages that are problematic
11
19
  - Explain precisely why each passage violates the principle
12
- - Focus only on failures against the principle (not general quality)
20
+ - Focus only on failures against the principle, not general quality
13
21
 
14
22
  REVISION:
15
- Rewrite the output to fully satisfy the principle.
23
+ Then rewrite the material above so it fully satisfies the principle.
16
24
  - Address every critique point identified above
17
25
  - Preserve all content that already satisfies the principle
18
- - Do not introduce new violations of the principle
26
+ - Do not introduce new violations
@@ -1,3 +1,7 @@
1
+ SOURCE MATERIAL:
2
+ [Optional — include only if this task works from material you already have. Paste the source document, data, or draft this task operates on here. If you have nothing to paste, delete this bracketed block along with the sentence directly below it.]
3
+ Use the material above as the factual basis for the work described below.
4
+
1
5
  CONTEXT:
2
6
  [Who you are, the situation you're in, and why this task exists]
3
7