@ckelsoe/prompt-architect 3.2.2 → 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 (70) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/CHANGELOG.md +135 -5
  4. package/MIGRATION.md +1 -1
  5. package/README.md +32 -47
  6. package/adapters/README.md +1 -1
  7. package/adapters/system-prompt.md +115 -59
  8. package/package.json +5 -4
  9. package/scripts/install.js +52 -22
  10. package/scripts/test.js +88 -40
  11. package/scripts/validate-skill.js +184 -56
  12. package/skills/prompt-architect/SKILL.md +94 -79
  13. package/skills/prompt-architect/assets/templates/ape_template.txt +14 -3
  14. package/skills/prompt-architect/assets/templates/bab_template.txt +23 -10
  15. package/skills/prompt-architect/assets/templates/broke_template.txt +31 -6
  16. package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +16 -8
  17. package/skills/prompt-architect/assets/templates/care_template.txt +4 -0
  18. package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +64 -35
  19. package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +8 -0
  20. package/skills/prompt-architect/assets/templates/co-star_template.txt +8 -0
  21. package/skills/prompt-architect/assets/templates/crispe_template.txt +6 -0
  22. package/skills/prompt-architect/assets/templates/ctf_template.txt +8 -0
  23. package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +7 -0
  24. package/skills/prompt-architect/assets/templates/hybrid_template.txt +44 -24
  25. package/skills/prompt-architect/assets/templates/iterative-compression_template.txt +74 -0
  26. package/skills/prompt-architect/assets/templates/least-to-most_template.txt +4 -0
  27. package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +4 -0
  28. package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +24 -14
  29. package/skills/prompt-architect/assets/templates/race_template.txt +9 -0
  30. package/skills/prompt-architect/assets/templates/rcot_template.txt +8 -0
  31. package/skills/prompt-architect/assets/templates/react_template.txt +38 -16
  32. package/skills/prompt-architect/assets/templates/rise-ie_template.txt +4 -0
  33. package/skills/prompt-architect/assets/templates/rise-ix_template.txt +3 -3
  34. package/skills/prompt-architect/assets/templates/risen_template.txt +7 -0
  35. package/skills/prompt-architect/assets/templates/rpef_template.txt +16 -11
  36. package/skills/prompt-architect/assets/templates/rtf_template.txt +9 -0
  37. package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +18 -10
  38. package/skills/prompt-architect/assets/templates/step-back_template.txt +4 -0
  39. package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +54 -31
  40. package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +37 -21
  41. package/skills/prompt-architect/references/frameworks/ape.md +145 -57
  42. package/skills/prompt-architect/references/frameworks/bab.md +139 -58
  43. package/skills/prompt-architect/references/frameworks/broke.md +157 -57
  44. package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +184 -76
  45. package/skills/prompt-architect/references/frameworks/care.md +67 -36
  46. package/skills/prompt-architect/references/frameworks/chain-of-density.md +111 -417
  47. package/skills/prompt-architect/references/frameworks/chain-of-thought.md +45 -19
  48. package/skills/prompt-architect/references/frameworks/co-star.md +102 -44
  49. package/skills/prompt-architect/references/frameworks/crispe.md +7 -5
  50. package/skills/prompt-architect/references/frameworks/ctf.md +75 -37
  51. package/skills/prompt-architect/references/frameworks/devils-advocate.md +105 -58
  52. package/skills/prompt-architect/references/frameworks/iterative-compression.md +448 -0
  53. package/skills/prompt-architect/references/frameworks/least-to-most.md +35 -13
  54. package/skills/prompt-architect/references/frameworks/plan-and-solve.md +38 -9
  55. package/skills/prompt-architect/references/frameworks/pre-mortem.md +182 -72
  56. package/skills/prompt-architect/references/frameworks/race.md +93 -38
  57. package/skills/prompt-architect/references/frameworks/rcot.md +1 -1
  58. package/skills/prompt-architect/references/frameworks/react.md +230 -97
  59. package/skills/prompt-architect/references/frameworks/reverse-role.md +23 -16
  60. package/skills/prompt-architect/references/frameworks/rise.md +120 -77
  61. package/skills/prompt-architect/references/frameworks/risen.md +82 -28
  62. package/skills/prompt-architect/references/frameworks/rpef.md +227 -58
  63. package/skills/prompt-architect/references/frameworks/rtf.md +4 -2
  64. package/skills/prompt-architect/references/frameworks/self-refine.md +4 -2
  65. package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +68 -22
  66. package/skills/prompt-architect/references/frameworks/step-back.md +48 -16
  67. package/skills/prompt-architect/references/frameworks/tidd-ec.md +129 -51
  68. package/skills/prompt-architect/references/frameworks/tree-of-thought.md +112 -37
  69. package/skills/prompt-architect/scripts/framework_analyzer.py +0 -807
  70. package/skills/prompt-architect/scripts/prompt_evaluator.py +0 -336
@@ -1,27 +1,49 @@
1
+ You are an agent that reaches a goal by calling tools, not by answering in one pass from what
2
+ you already know. Work in a Thought → Action → Observation loop, letting each real tool result
3
+ decide your next step. If the tools below are not actually callable here, stop and say so —
4
+ without live tools this protocol is only formatted guesswork, and plain step-by-step reasoning
5
+ fits better.
6
+
1
7
  GOAL:
2
- [Define the end state to achieve what does success look like?]
8
+ The end state you must reach before you stop:
9
+ [A full sentence naming what must be produced or determined. Write it as an outcome, not an
10
+ activity.]
3
11
 
4
12
  AVAILABLE TOOLS:
5
- - [tool_name]: [What it does and how to invoke it]
6
- - [tool_name]: [What it does and how to invoke it]
7
- - [tool_name]: [What it does and how to invoke it]
13
+ Do not call any tool that is not named here:
14
+ - [tool_name]: [Full sentence on what this tool does and what input it takes, drawn only from
15
+ what the user actually told you do not invent inputs or return values they did not state.]
16
+ - [tool_name]: [Same form, one line per tool the user named. Delete any unused line rather
17
+ than inventing a tool to fill it.]
8
18
 
9
19
  CONSTRAINTS:
10
- - [Rules, limits, or guardrails on actions]
11
- - [Stop condition: when to stop and deliver Final Answer]
12
- - [Optional: max iterations or tool call limit]
20
+ Every action is bound by these rules — each is a requirement or a prohibition, not a
21
+ suggestion:
22
+ - [A self-contained imperative, e.g. "Base every conclusion on data you actually retrieved."
23
+ Phrase restrictions as "Do not…" or "Never…" so each prohibition stands on its own line.]
24
+ - Stop and deliver your Final Answer when [full clause naming the observable situation that
25
+ means the goal is reached, or that it cannot be].
26
+ - [Optional — a hard ceiling as a full sentence, e.g. "Make no more than 8 tool calls in
27
+ total." Delete this line if there is no limit.]
13
28
 
14
29
  APPROACH:
15
- Use the Thought Action Observation cycle until the goal is reached:
30
+ Repeat this cycle until the goal is reached, each step on its own line starting with its
31
+ label. Replace each description below with your actual content:
16
32
 
17
- Thought: [Reason about current state and what to do next]
18
- Action: [tool_name] [specific query or operation]
19
- Observation: [Result of the action]
33
+ Thought: your reasoning about where things stand and what to do next
34
+ Action: the tool name, then an em dash, then the exact input you are passing to that tool
35
+ Observation: the exact result that tool returned
20
36
 
21
- Thought: [Reason about the observation what does it mean? what to do next?]
22
- Action: [tool_name] — [next operation]
23
- Observation: [Result]
37
+ When the cycle has stopped, write this one line, one time only:
24
38
 
25
- [Continue cycling until goal is achieved or stop condition is met]
39
+ Final Answer: the deliverable the goal asked for, supported by what your Observations showed
26
40
 
27
- Final Answer: [Deliver the result once goal is reached]
41
+ Rules for the cycle:
42
+ - Every Action must name one tool from the list above, never prose — e.g. Action:
43
+ search_docs — "token refresh policy"
44
+ - Take ONE action at a time, then wait for its real Observation before continuing; each
45
+ Thought must respond to the Observation directly before it.
46
+ - Never write an Observation yourself. An Observation is the actual output of an actual tool
47
+ call. Inventing one produces a fabricated investigation that reads as though it happened.
48
+ - "Thought:", "Action:", "Observation:" and "Final Answer:" are literal labels in this
49
+ protocol, not headings — keep them exactly as written.
@@ -2,6 +2,10 @@ ROLE:
2
2
  [Define the perspective or expertise needed for this task]
3
3
 
4
4
  INPUT:
5
+ [Paste the data or content to be processed here — name it specifically in this line, e.g.
6
+ "Paste the customer review export (CSV) here". Paste the material itself, not a description of it.]
7
+
8
+ About the material above:
5
9
  [Specify what data/content is being provided:
6
10
  - Format and structure (CSV, JSON, text, etc.)
7
11
  - Key characteristics and fields
@@ -21,8 +21,8 @@ EXAMPLES:
21
21
  - Successful outputs from similar tasks
22
22
  - 2-3 concrete examples recommended]
23
23
 
24
- Example 1: [First reference example demonstrating desired output]
24
+ Example 1: [Paste the first reference sample here the actual piece whose style and format the output should match, not a description of it]
25
25
 
26
- Example 2: [Second reference example showing format/style to match]
26
+ Example 2: [Paste a second reference sample here]
27
27
 
28
- [Optional] Example 3: [Third example if additional clarity needed]
28
+ Example 3: [Optional paste a third reference sample here if more clarity is needed. If you only have two, delete this line and the blank line above it.]
@@ -1,3 +1,10 @@
1
+ SOURCE MATERIAL:
2
+ [OPTIONAL — include only if the procedure below operates on something the user already has.
3
+ If so, emit a literal paste instruction naming the specific artifact, e.g. "[Paste the authentication module source here]"
4
+ or "[Paste the Q3 sales dataset here]" — then one line of prose tying it to what follows,
5
+ e.g. "The material above is what the steps below are applied to."
6
+ If the task generates entirely from scratch, omit this section — do not emit an empty placeholder.]
7
+
1
8
  ROLE:
2
9
  [Define the expertise level, persona, or perspective to adopt. What knowledge should be demonstrated?]
3
10
 
@@ -1,18 +1,21 @@
1
1
  You are an expert Prompt Engineer performing reverse prompt engineering.
2
2
 
3
3
  TASK:
4
- Analyze the following [input and] output. Reconstruct the prompt that would
5
- consistently produce this type of output. Your recovered prompt should be
6
- reusable — replace specific details with clearly marked [PLACEHOLDER] variables.
4
+ Analyze the sample material below and reconstruct the prompt that would
5
+ consistently produce this type of output.
7
6
 
8
- [INPUT DATA (if applicable omit if output-only):]
9
- [Paste the input that produced the output, or remove this section]
7
+ SOURCE MATERIALORIGINAL INPUT:
8
+ [Optional — paste here, verbatim, the input that originally produced the output
9
+ sample below. If you have nothing to paste, delete this bracketed block along with
10
+ the sentence directly below it.]
11
+ Use the material above as the input that produced the output sample below.
10
12
 
11
- OUTPUT SAMPLE:
12
- [Paste the output you want to reverse-engineer]
13
+ SOURCE MATERIAL — OUTPUT SAMPLE:
14
+ [Paste here, verbatim, the output you want to reverse-engineer.]
15
+ Use the material above as the finished output to reverse-engineer.
13
16
 
14
17
  ANALYSIS INSTRUCTIONS:
15
- Examine the output for:
18
+ First, examine the output above and report what you find for each of these dimensions:
16
19
  - Implied role or persona
17
20
  - Tone and voice
18
21
  - Structural and formatting patterns
@@ -21,6 +24,8 @@ Examine the output for:
21
24
  - Reasoning style
22
25
 
23
26
  RECOVERED PROMPT:
24
- Generate a reusable prompt template that reliably reproduces this type of output.
25
- Use [PLACEHOLDER] for variable elements.
26
- Only proceed when at least 80% confident in the reconstruction.
27
+ After completing that analysis, write out a reusable prompt template that reliably
28
+ reproduces this type of output. Mark every variable element with the literal token
29
+ [PLACEHOLDER], written exactly that way rather than replaced with a specific value.
30
+ If you are less than 80% confident in the reconstruction, do not guess: say so, and
31
+ name the additional sample material that would resolve the uncertainty.
@@ -1,3 +1,12 @@
1
+ SOURCE MATERIAL:
2
+ [OPTIONAL — include only if this task operates on something the user already has.
3
+ If so, emit a literal paste instruction naming the specific artifact, e.g. "[Paste the meeting transcript here]"
4
+ or "[Paste the function here]" — never a generic word like "content" — then one line of prose
5
+ tying it to what follows, e.g. "The material above is what the task below applies to."
6
+ When this section is used, word TASK to refer to the material ABOVE ("the transcript above"),
7
+ never "below" — the artifact precedes it and a downward reference would dangle.
8
+ If the task generates entirely from scratch, omit this section — do not emit an empty placeholder.]
9
+
1
10
  ROLE:
2
11
  [Define the expertise or perspective needed for this task]
3
12
 
@@ -1,15 +1,23 @@
1
- PHASE 1 — SKELETON:
2
- Generate a skeleton outline for the following topic or question.
3
- List only the key points one per line in this format:
4
- N. [Point name] | [One-sentence description of what this point covers]
5
- Do not expand yet. Skeleton only.
1
+ SOURCE MATERIAL:
2
+ [Optional paste the document, data, or notes the answer must be drawn from here. If you
3
+ have nothing to paste, delete this bracketed block along with the sentence directly below
4
+ it.]
5
+ Use the material above as the factual basis for the work described below.
6
+
7
+ Answer the topic or question below in two phases: first a skeleton outline, then a full
8
+ expansion of every point in that skeleton.
6
9
 
7
10
  TOPIC / QUESTION:
8
- [Your topic or question]
11
+ [Write out the full topic or question as a complete, self-contained sentence rather than a
12
+ bare noun phrase, including any audience, scope, or depth of coverage specified]
9
13
 
10
- ---
14
+ PHASE 1 — SKELETON:
15
+ First, outline the topic above. List only the key points, one per line, in this format:
16
+ N. [Point name] | [One-sentence description of what this point covers]
17
+ Replace N with the point's number and fill in both bracketed parts, keeping that line's
18
+ format exactly. Produce the skeleton and nothing else — do not expand any point yet.
11
19
 
12
20
  PHASE 2 — EXPAND:
13
- Now expand each skeleton point into [2-4 sentences / a paragraph / detailed coverage].
14
- Each point should be self-contained and complete.
15
- [Optional: expand points in parallel by sending each as a separate API call]
21
+ Once the skeleton is complete, expand each of its points into [2-4 sentences / a paragraph /
22
+ detailed coverage]. Restate a point's name before expanding it, and make each expansion
23
+ self-contained.
@@ -1,6 +1,10 @@
1
1
  ORIGINAL QUESTION:
2
2
  [The specific question you want answered]
3
3
 
4
+ SOURCE MATERIAL:
5
+ [Optional — paste the code, document, or system design the question above is about here. If you have nothing to paste, delete this bracketed block along with the sentence directly below it.]
6
+ Use the material above as the factual basis for the reasoning below — evaluate what is actually there, not what is typical or assumed.
7
+
4
8
  STEP-BACK:
5
9
  Before answering directly, first answer this higher-level question:
6
10
  [Rephrase the original into a more abstract question about underlying principles, concepts, or rules]
@@ -1,45 +1,68 @@
1
+ SOURCE MATERIAL:
2
+ [Optional — paste the artifact this task operates on here, naming it concretely, e.g. "Paste
3
+ the customer's message here" or "Paste the draft to translate here". If this task generates
4
+ from scratch, delete this bracketed block along with the sentence directly below it.]
5
+ Use the material above as the content for the work described below.
6
+
1
7
  TASK TYPE:
2
- [Clear indication of the activity type - e.g., Data Analysis, Customer Support Response, Technical Documentation, Content Translation]
8
+ The category of task you are performing is: [name the activity category only e.g. "Customer
9
+ Support Response", "Data Analysis and Summarization", "Content Translation with Context
10
+ Preservation". Specifics of this particular case belong in the background at the end.]
3
11
 
4
12
  INSTRUCTIONS:
5
- [Specific steps and guidelines to accomplish the task]
6
- 1. [First step or action]
7
- 2. [Second step or action]
8
- 3. [Continue with methodology and sequence]
9
- 4. [Add more steps as needed...]
13
+ Carry out the task as follows.
14
+ 1. [First step, as a complete imperative sentence beginning with a verb — e.g. "Read the
15
+ customer's message and identify the specific problem they report."]
16
+ 2. [Continue in the same form, one step per line, for as many steps as the methodology needs.
17
+ If standing guidelines govern this task rather than an ordered procedure, delete the numbered
18
+ list and keep only the standards below.]
19
+
20
+ Observe these standards throughout:
21
+ [Optional — one per line, each a complete imperative sentence, e.g. "Follow the company style
22
+ guide.", "Use a three-paragraph structure: problem, solution, next steps." If the numbered
23
+ steps are the whole methodology, delete this bracketed block along with the sentence above it.]
10
24
 
11
25
  DO:
12
- [Specify actions, language, structures, and information that MUST be included]
13
- - [Required action or element #1]
14
- - [Language or tone to use]
15
- - [Structure or format to follow]
16
- - [Information that must be present]
17
- - [Add more as needed...]
26
+ The output must satisfy every requirement below:
27
+ - [Always <required action, element, or information>]
28
+ - [Use <required language, tone, or terminology>]
29
+ - [Follow <required structure or format>]
30
+ - [Add more as needed, each led by "Always" or an imperative verb so it reads as a
31
+ requirement on its own line.]
18
32
 
19
33
  DON'T:
20
- [Highlight actions, elements, or approaches to AVOID]
21
- - [Error or mistake to prevent #1]
22
- - [Inappropriate language or approach to avoid]
23
- - [Common pitfall to prevent]
24
- - [Limitation or boundary not to cross]
25
- - [Add more as needed...]
34
+ The output must respect every prohibition below:
35
+ - [Do not <error or mistake to prevent>]
36
+ - [Never <inappropriate language or approach>]
37
+ - [Do not <common pitfall to prevent>]
38
+ - [Do not <exceed a stated limit or cross a boundary>]
39
+ - [Add more as needed, each led by "Do not" or "Never". The negation must live in the item
40
+ itself — a bare noun phrase reads as an instruction to DO the very thing being forbidden.]
26
41
 
27
42
  EXAMPLES:
28
- [Provide concrete examples of desired outcomes]
43
+ [Optional if no reference sample is needed, delete everything from this line through the
44
+ counter-example below.]
45
+ The examples below set the standard your output must meet. Match their format, tone,
46
+ structure, and level of detail.
29
47
 
30
- Example 1 (Good):
31
- [Detailed example showing desired output, format, tone, and structure]
48
+ Example 1 — produce output like this:
49
+ [Write the desired output in full — the actual text, not a description of it. If the user
50
+ supplied an approved sample or boilerplate, reproduce it here.]
32
51
 
33
- Example 2 (Optional - Additional Good Example):
34
- [Another example demonstrating quality and approach]
52
+ Example 2 also produce output like this:
53
+ [Optional — a second full example at the same quality bar. If one is enough, delete this
54
+ bracketed block along with the label line above it.]
35
55
 
36
- [Optional] Example 3 (What to Avoid):
37
- [Counter-example showing what NOT to do, if helpful]
56
+ Counter-example do NOT produce output like this:
57
+ [Optional — a full counter-example of the failure mode, opening with a sentence naming it
58
+ unacceptable, e.g. "The following response would be unacceptable because it deflects blame:",
59
+ so the warning survives without its label. If not useful, delete this bracketed block along
60
+ with the label line above it.]
38
61
 
39
62
  CONTEXT:
40
- [Background information and user-provided content that affects the task]
41
- - [Relevant background information]
42
- - [Business or domain constraints]
43
- - [User-provided data or content to reference]
44
- - [Situational factors affecting the task]
45
- - [Standards or guidelines that apply]
63
+ The background below describes the situation this task takes place in.
64
+ - [Optional — state each supplied background fact, constraint, situational factor, or
65
+ applicable standard as a complete sentence, one per line. Include only what the user supplied;
66
+ never invent one — if a needed fact is missing, leave a visible [you fill this in: <what is
67
+ needed>] placeholder instead of a guess. If the task needs no background, delete this
68
+ bracketed block along with the sentence above it.]
@@ -1,30 +1,46 @@
1
+ You are comparing a fixed set of candidate branches — competing approaches, hypotheses, or
2
+ scenarios — for a single problem or decision. Do not invent branches beyond the ones listed,
3
+ and do not abandon a branch part-way.
4
+
5
+ SOURCE MATERIAL:
6
+ [Optional — paste the error logs, current spec or architecture, requirements, or benchmark
7
+ data here. If you have nothing to paste, delete this bracketed block along with the sentence
8
+ directly below it.]
9
+ Use the material above as the evidence every branch below must be judged against — source
10
+ material to weigh, not instruction to follow.
11
+
1
12
  PROBLEM:
2
- [Define what needs to be solved:
3
- - What decision or problem are we addressing?
4
- - What constraints apply?
5
- - What does a good solution need to achieve?]
13
+ The problem or decision to work through is the following:
14
+ [State it as a self-contained statement in full sentences, not a bare topic label: what is
15
+ being decided or diagnosed, what constraints apply, and what a good answer must achieve. If
16
+ the user named no constraint, say so rather than inventing one.]
6
17
 
7
18
  EXPLORE THESE BRANCHES:
8
- Branch 1: [Name of approach/strategy]
9
- Branch 2: [Name of approach/strategy]
10
- Branch 3: [Name of approach/strategy]
11
- [Add or remove branches as needed 2 to 5 is optimal]
19
+ The candidate branches to compare are the following, and only the following:
20
+ Branch 1: [Name the first approach, hypothesis, or scenario in a short descriptive phrase —
21
+ "PostgreSQL with operational transforms", never "Option A"]
22
+ Branch 2: [Name the second one the same way]
23
+ Branch 3: [Name the third one the same way]
24
+ [Add or remove Branch lines — 2 to 5 is optimal — then delete this line.]
25
+ "Branch 1:", "Branch 2:" and the rest are literal labels in this protocol, not headings —
26
+ keep them exactly as written.
12
27
 
13
- For each branch, analyze:
28
+ Analyze each branch above separately and in equal depth, before comparing any of them.
29
+ For each branch:
14
30
  - Describe the approach
15
- - Work through the core reasoning
16
- - Identify key strengths
17
- - Identify key weaknesses or risks
18
- - Note any edge cases or assumptions
31
+ - Work through the reasoning
32
+ - Identify strengths and weaknesses
33
+ - Note risks or edge cases
19
34
 
20
35
  EVALUATION CRITERIA:
21
- [Define how branches will be compared:
22
- - What matters most? (list in priority order)
23
- - Any hard constraints that eliminate certain branches?
24
- - Is there one best answer, or does it depend on context?]
36
+ Once every branch has been analyzed, compare them against the standard set out below,
37
+ applying no criteria beyond the ones it names:
38
+ [In full sentences: what matters most and in what priority order, any hard constraint that
39
+ disqualifies a branch outright (say if there is none), and whether one branch can win
40
+ outright or the right answer depends on context.]
25
41
 
26
42
  CONCLUSION:
27
- [Synthesize the analysis:
28
- - Select the best branch with clear reasoning
29
- - OR explain trade-offs if the answer is context-dependent
30
- - State the single biggest assumption that could change the recommendation]
43
+ Finally, once the comparison is complete, state the decision as follows:
44
+ [In full sentences: the winning branch and the reasoning for it — or the trade-offs, if the
45
+ answer is genuinely context-dependent plus the single biggest assumption that could change
46
+ the recommendation.]