aiblueprint-cli 1.4.99 → 1.4.101
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/README.md +0 -1
- package/agents-config/skills/agents-manager/SKILL.md +2 -2
- package/agents-config/skills/agents-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/agents-manager/assets/codex-icon.svg +20 -0
- package/agents-config/skills/apex/SKILL.md +120 -118
- package/agents-config/skills/apex/agents/openai.yaml +10 -0
- package/agents-config/skills/apex/assets/codex-icon.svg +15 -0
- package/agents-config/skills/apex/scripts/apex-state.py +740 -0
- package/agents-config/skills/apex/scripts/setup-templates.sh +27 -145
- package/agents-config/skills/apex/scripts/test_apex_state.py +413 -0
- package/agents-config/skills/apex/scripts/update-progress.sh +17 -73
- package/agents-config/skills/apex/steps/step-00-init.md +85 -231
- package/agents-config/skills/apex/steps/step-00b-branch.md +10 -118
- package/agents-config/skills/apex/steps/step-00b-economy.md +12 -239
- package/agents-config/skills/apex/steps/step-00b-interactive.md +13 -162
- package/agents-config/skills/apex/steps/step-00b-save.md +13 -114
- package/agents-config/skills/apex/steps/step-01-analyze.md +40 -361
- package/agents-config/skills/apex/steps/step-02-plan.md +55 -562
- package/agents-config/skills/apex/steps/step-02b-tasks.md +15 -291
- package/agents-config/skills/apex/steps/step-03-execute-teams.md +47 -267
- package/agents-config/skills/apex/steps/step-03-execute.md +32 -212
- package/agents-config/skills/apex/steps/step-04-validate.md +42 -246
- package/agents-config/skills/apex/steps/step-05-examine.md +47 -371
- package/agents-config/skills/apex/steps/step-06-resolve.md +19 -221
- package/agents-config/skills/apex/steps/step-07-tests.md +19 -234
- package/agents-config/skills/apex/steps/step-08-run-tests.md +13 -300
- package/agents-config/skills/apex/steps/step-09-finish.md +36 -200
- package/agents-config/skills/apex/steps/step-10-verify.md +46 -264
- package/agents-config/skills/appstore-connect/agents/openai.yaml +7 -0
- package/agents-config/skills/appstore-connect/assets/codex-icon.svg +17 -0
- package/agents-config/skills/commit/agents/openai.yaml +10 -0
- package/agents-config/skills/commit/assets/codex-icon.svg +17 -0
- package/agents-config/skills/create-pr/agents/openai.yaml +10 -0
- package/agents-config/skills/create-pr/assets/codex-icon.svg +17 -0
- package/agents-config/skills/environments-manager/SKILL.md +1 -1
- package/agents-config/skills/environments-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/environments-manager/assets/codex-icon.svg +16 -0
- package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-remove.sh +19 -3
- package/agents-config/skills/environments-manager/examples/scripts/worktree-up.sh +1 -1
- package/agents-config/skills/environments-manager/references/claude.md +1 -1
- package/agents-config/skills/fix-pr-comments/agents/openai.yaml +10 -0
- package/agents-config/skills/fix-pr-comments/assets/codex-icon.svg +17 -0
- package/agents-config/skills/grill-me/SKILL.md +25 -4
- package/agents-config/skills/grill-me/agents/openai.yaml +8 -0
- package/agents-config/skills/grill-me/assets/codex-icon.svg +16 -0
- package/agents-config/skills/hooks-manager/SKILL.md +19 -9
- package/agents-config/skills/hooks-manager/assets/codex-icon.svg +15 -4
- package/agents-config/skills/hooks-manager/references/claude-code.md +32 -0
- package/agents-config/skills/hooks-manager/references/codex.md +23 -0
- package/agents-config/skills/hooks-manager/references/cursor.md +18 -0
- package/agents-config/skills/hooks-manager/references/hook-types.md +5 -3
- package/agents-config/skills/hooks-manager/references/input-output-schemas.md +2 -2
- package/agents-config/skills/hooks-manager/references/research-sources.md +25 -0
- package/agents-config/skills/hooks-manager/references/router.md +32 -0
- package/agents-config/skills/hooks-manager/references/troubleshooting.md +3 -3
- package/agents-config/skills/merge/agents/openai.yaml +10 -0
- package/agents-config/skills/merge/assets/codex-icon.svg +17 -0
- package/agents-config/skills/oneshot/SKILL.md +4 -0
- package/agents-config/skills/oneshot/agents/openai.yaml +10 -0
- package/agents-config/skills/oneshot/assets/codex-icon.svg +18 -0
- package/agents-config/skills/rules-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/rules-manager/assets/codex-icon.svg +23 -0
- package/agents-config/skills/skill-manager/SKILL.md +45 -3
- package/agents-config/skills/skill-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/skill-manager/assets/codex-icon.svg +23 -0
- package/agents-config/skills/skill-manager/references/skill-writing-glossary.md +201 -0
- package/agents-config/skills/skill-manager/scripts/setup-codex-icons.ts +143 -0
- package/agents-config/skills/ultrathink/agents/openai.yaml +10 -0
- package/agents-config/skills/ultrathink/assets/codex-icon.svg +20 -0
- package/agents-config/skills/use-artifacts/SKILL.md +102 -51
- package/agents-config/skills/use-artifacts/assets/local-runtime.js +299 -0
- package/agents-config/skills/use-artifacts/scripts/create_artifact.py +1 -1
- package/agents-config/skills/use-delegate/SKILL.md +4 -0
- package/agents-config/skills/use-delegate/agents/openai.yaml +10 -0
- package/agents-config/skills/use-delegate/assets/codex-icon.svg +20 -0
- package/agents-config/skills/use-goal/SKILL.md +70 -9
- package/agents-config/skills/use-goal/agents/openai.yaml +1 -1
- package/agents-config/skills/use-goal/assets/codex-icon.svg +17 -3
- package/agents-config/skills/use-goal/references/claude-code-goal.md +54 -6
- package/agents-config/skills/use-goal/references/codex-goal.md +59 -4
- package/agents-config/skills/use-goal/references/verification-harnesses.md +104 -3
- package/dist/cli.js +365 -363
- package/package.json +1 -1
- package/agents-config/skills/apex/templates/00-context.md +0 -55
- package/agents-config/skills/apex/templates/01-analyze.md +0 -10
- package/agents-config/skills/apex/templates/02-plan.md +0 -10
- package/agents-config/skills/apex/templates/03-execute.md +0 -10
- package/agents-config/skills/apex/templates/04-validate.md +0 -10
- package/agents-config/skills/apex/templates/05-examine.md +0 -10
- package/agents-config/skills/apex/templates/06-resolve.md +0 -10
- package/agents-config/skills/apex/templates/07-tests.md +0 -10
- package/agents-config/skills/apex/templates/08-run-tests.md +0 -10
- package/agents-config/skills/apex/templates/09-finish.md +0 -10
- package/agents-config/skills/apex/templates/10-verify.md +0 -9
- package/agents-config/skills/apex/templates/README.md +0 -195
- package/agents-config/skills/apex/templates/step-complete.md +0 -7
- package/agents-config/skills/prompt-creator/SKILL.md +0 -285
- package/agents-config/skills/prompt-creator/references/anthropic-best-practices.md +0 -126
- package/agents-config/skills/prompt-creator/references/anti-patterns.md +0 -57
- package/agents-config/skills/prompt-creator/references/clarity-principles.md +0 -54
- package/agents-config/skills/prompt-creator/references/context-management.md +0 -389
- package/agents-config/skills/prompt-creator/references/few-shot-patterns.md +0 -47
- package/agents-config/skills/prompt-creator/references/openai-best-practices.md +0 -50
- package/agents-config/skills/prompt-creator/references/prompt-templates.md +0 -110
- package/agents-config/skills/prompt-creator/references/reasoning-techniques.md +0 -52
- package/agents-config/skills/prompt-creator/references/system-prompt-patterns.md +0 -48
- package/agents-config/skills/prompt-creator/references/xml-structure.md +0 -36
package/package.json
CHANGED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# APEX Task: {{task_id}}
|
|
2
|
-
|
|
3
|
-
**Created:** {{timestamp}}
|
|
4
|
-
**Task:** {{task_description}}
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Configuration
|
|
9
|
-
|
|
10
|
-
| Flag | Value |
|
|
11
|
-
|------|-------|
|
|
12
|
-
| Auto mode (`-a`) | {{auto_mode}} |
|
|
13
|
-
| Examine mode (`-x`) | {{examine_mode}} |
|
|
14
|
-
| Save mode (`-s`) | {{save_mode}} |
|
|
15
|
-
| Test mode (`-t`) | {{test_mode}} |
|
|
16
|
-
| Economy mode (`-e`) | {{economy_mode}} |
|
|
17
|
-
| Branch mode (`-b`) | {{branch_mode}} |
|
|
18
|
-
| PR mode (`-pr`) | {{pr_mode}} |
|
|
19
|
-
| Interactive mode (`-i`) | {{interactive_mode}} |
|
|
20
|
-
| Tasks mode (`-k`) | {{tasks_mode}} |
|
|
21
|
-
| Verify mode (`-v`) | {{verify_mode}} |
|
|
22
|
-
| Branch name | {{branch_name}} |
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## User Request
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
{{original_input}}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## Acceptance Criteria
|
|
35
|
-
|
|
36
|
-
_To be defined in step-01-analyze.md_
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Progress
|
|
41
|
-
|
|
42
|
-
| Step | Status | Timestamp |
|
|
43
|
-
|------|--------|-----------|
|
|
44
|
-
| 00-init | ⏸ Pending | |
|
|
45
|
-
| 01-analyze | ⏸ Pending | |
|
|
46
|
-
| 02-plan | ⏸ Pending | |
|
|
47
|
-
| 02b-tasks | {{tasks_status}} | |
|
|
48
|
-
| 03-execute | ⏸ Pending | |
|
|
49
|
-
| 04-validate | ⏸ Pending | |
|
|
50
|
-
| 05-examine | {{examine_status}} | |
|
|
51
|
-
| 06-resolve | {{examine_status}} | |
|
|
52
|
-
| 07-tests | {{test_status}} | |
|
|
53
|
-
| 08-run-tests | {{test_status}} | |
|
|
54
|
-
| 10-verify | {{verify_status}} | |
|
|
55
|
-
| 09-finish | {{pr_status}} | |
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
# APEX Template System
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
This directory contains template files used to initialize APEX workflow outputs when save mode (`-s`) is enabled. This template system significantly reduces token usage by moving repetitive content out of step files.
|
|
6
|
-
|
|
7
|
-
## Template Files
|
|
8
|
-
|
|
9
|
-
| Template | Purpose | Created When |
|
|
10
|
-
|----------|---------|--------------|
|
|
11
|
-
| `00-context.md` | Workflow configuration and progress tracking | Always (if save_mode) |
|
|
12
|
-
| `01-analyze.md` | Analysis findings | Always (if save_mode) |
|
|
13
|
-
| `02-plan.md` | Implementation plan | Always (if save_mode) |
|
|
14
|
-
| `03-execute.md` | Implementation log | Always (if save_mode) |
|
|
15
|
-
| `04-validate.md` | Validation results | Always (if save_mode) |
|
|
16
|
-
| `05-examine.md` | Adversarial review findings | Only if examine_mode enabled |
|
|
17
|
-
| `06-resolve.md` | Finding resolution log | Only if examine_mode enabled |
|
|
18
|
-
| `07-tests.md` | Test analysis and creation | Only if test_mode enabled |
|
|
19
|
-
| `08-run-tests.md` | Test runner log | Only if test_mode enabled |
|
|
20
|
-
| `09-finish.md` | PR creation log | Only if pr_mode enabled |
|
|
21
|
-
| `step-complete.md` | Completion marker template | Referenced in steps |
|
|
22
|
-
|
|
23
|
-
## Template Variables
|
|
24
|
-
|
|
25
|
-
Templates use `{{variable}}` syntax for placeholders:
|
|
26
|
-
|
|
27
|
-
| Variable | Description | Example |
|
|
28
|
-
|----------|-------------|---------|
|
|
29
|
-
| `{{task_id}}` | Kebab-case task identifier | `01-add-auth-middleware` |
|
|
30
|
-
| `{{task_description}}` | Plain text task description | `add authentication middleware` |
|
|
31
|
-
| `{{timestamp}}` | ISO 8601 timestamp | `2026-01-12T10:30:00Z` |
|
|
32
|
-
| `{{auto_mode}}` | Auto mode flag | `true` or `false` |
|
|
33
|
-
| `{{examine_mode}}` | Examine mode flag | `true` or `false` |
|
|
34
|
-
| `{{save_mode}}` | Save mode flag | `true` or `false` |
|
|
35
|
-
| `{{test_mode}}` | Test mode flag | `true` or `false` |
|
|
36
|
-
| `{{economy_mode}}` | Economy mode flag | `true` or `false` |
|
|
37
|
-
| `{{branch_mode}}` | Branch mode flag | `true` or `false` |
|
|
38
|
-
| `{{pr_mode}}` | PR mode flag | `true` or `false` |
|
|
39
|
-
| `{{interactive_mode}}` | Interactive mode flag | `true` or `false` |
|
|
40
|
-
| `{{branch_name}}` | Git branch name | `feature/add-auth` |
|
|
41
|
-
| `{{original_input}}` | Raw user input | `/apex -a -s add auth` |
|
|
42
|
-
| `{{examine_status}}` | Progress status for examine steps | `⏸ Pending` or `⏭ Skip` |
|
|
43
|
-
| `{{test_status}}` | Progress status for test steps | `⏸ Pending` or `⏭ Skip` |
|
|
44
|
-
| `{{pr_status}}` | Progress status for PR step | `⏸ Pending` or `⏭ Skip` |
|
|
45
|
-
|
|
46
|
-
## Setup Script
|
|
47
|
-
|
|
48
|
-
### `setup-templates.sh`
|
|
49
|
-
|
|
50
|
-
Initializes all template files in the output directory with variables replaced.
|
|
51
|
-
|
|
52
|
-
**Usage:**
|
|
53
|
-
```bash
|
|
54
|
-
bash scripts/setup-templates.sh \
|
|
55
|
-
"task_id" \
|
|
56
|
-
"task_description" \
|
|
57
|
-
"auto_mode" \
|
|
58
|
-
"examine_mode" \
|
|
59
|
-
"save_mode" \
|
|
60
|
-
"test_mode" \
|
|
61
|
-
"economy_mode" \
|
|
62
|
-
"branch_mode" \
|
|
63
|
-
"pr_mode" \
|
|
64
|
-
"interactive_mode" \
|
|
65
|
-
"branch_name" \
|
|
66
|
-
"original_input"
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
**Output:**
|
|
70
|
-
```
|
|
71
|
-
.claude/output/apex/01-add-auth-middleware/
|
|
72
|
-
├── 00-context.md # Always created
|
|
73
|
-
├── 01-analyze.md # Always created
|
|
74
|
-
├── 02-plan.md # Always created
|
|
75
|
-
├── 03-execute.md # Always created
|
|
76
|
-
├── 04-validate.md # Always created
|
|
77
|
-
├── 05-examine.md # Only if examine_mode
|
|
78
|
-
├── 06-resolve.md # Only if examine_mode
|
|
79
|
-
├── 07-tests.md # Only if test_mode
|
|
80
|
-
├── 08-run-tests.md # Only if test_mode
|
|
81
|
-
└── 09-finish.md # Only if pr_mode
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Progress Update Script
|
|
85
|
-
|
|
86
|
-
### `update-progress.sh`
|
|
87
|
-
|
|
88
|
-
Updates the progress table in `00-context.md` without manual markdown editing.
|
|
89
|
-
|
|
90
|
-
**Usage:**
|
|
91
|
-
```bash
|
|
92
|
-
bash scripts/update-progress.sh <task_id> <step_number> <step_name> <status>
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**Examples:**
|
|
96
|
-
```bash
|
|
97
|
-
# Mark step 01 as in progress
|
|
98
|
-
bash scripts/update-progress.sh "01-add-auth" "01" "analyze" "in_progress"
|
|
99
|
-
|
|
100
|
-
# Mark step 01 as complete
|
|
101
|
-
bash scripts/update-progress.sh "01-add-auth" "01" "analyze" "complete"
|
|
102
|
-
|
|
103
|
-
# Mark step 02 as in progress
|
|
104
|
-
bash scripts/update-progress.sh "01-add-auth" "02" "plan" "in_progress"
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Status Values:**
|
|
108
|
-
- `in_progress` → `⏳ In Progress`
|
|
109
|
-
- `complete` → `✓ Complete`
|
|
110
|
-
|
|
111
|
-
## Token Savings
|
|
112
|
-
|
|
113
|
-
### Before Optimization
|
|
114
|
-
|
|
115
|
-
Each step file contained full template content inline:
|
|
116
|
-
|
|
117
|
-
```markdown
|
|
118
|
-
### 1. Initialize Save Output (if save_mode)
|
|
119
|
-
|
|
120
|
-
**If `{save_mode}` = true:**
|
|
121
|
-
|
|
122
|
-
Create `{output_dir}/01-analyze.md`:
|
|
123
|
-
```markdown
|
|
124
|
-
# Step 01: Analyze
|
|
125
|
-
|
|
126
|
-
**Task:** {task_description}
|
|
127
|
-
**Started:** {ISO timestamp}
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## Context Discovery
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Update `00-context.md` progress:
|
|
135
|
-
```markdown
|
|
136
|
-
| 01-analyze | ⏳ In Progress | {timestamp} |
|
|
137
|
-
```
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**Token cost per step:** ~200 tokens × 9 steps = ~1,800 tokens
|
|
141
|
-
|
|
142
|
-
### After Optimization
|
|
143
|
-
|
|
144
|
-
Step files now reference templates and scripts:
|
|
145
|
-
|
|
146
|
-
```markdown
|
|
147
|
-
### 1. Initialize Save Output (if save_mode)
|
|
148
|
-
|
|
149
|
-
**If `{save_mode}` = true:**
|
|
150
|
-
|
|
151
|
-
The file `{output_dir}/01-analyze.md` has already been created by the setup script.
|
|
152
|
-
|
|
153
|
-
Update progress:
|
|
154
|
-
```bash
|
|
155
|
-
bash {skill_dir}/scripts/update-progress.sh "{task_id}" "01" "analyze" "in_progress"
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
Append your findings to `01-analyze.md` as you work.
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
**Token cost per step:** ~50 tokens × 9 steps = ~450 tokens
|
|
162
|
-
|
|
163
|
-
**Total savings:** ~1,350 tokens per workflow execution (75% reduction)
|
|
164
|
-
|
|
165
|
-
## How It Works
|
|
166
|
-
|
|
167
|
-
1. **Initialization (step-00-init.md):**
|
|
168
|
-
- Runs `setup-templates.sh` once at workflow start
|
|
169
|
-
- Creates all template files with variables replaced
|
|
170
|
-
- Output directory is ready with pre-initialized files
|
|
171
|
-
|
|
172
|
-
2. **Each Step:**
|
|
173
|
-
- Runs `update-progress.sh` to mark step as "in_progress"
|
|
174
|
-
- Appends findings/logs to the pre-created step file
|
|
175
|
-
- Runs `update-progress.sh` again to mark step as "complete"
|
|
176
|
-
|
|
177
|
-
3. **Benefits:**
|
|
178
|
-
- AI doesn't need to hold template content in context
|
|
179
|
-
- Consistent formatting across all workflows
|
|
180
|
-
- Easy to update templates without editing step files
|
|
181
|
-
- Scripts handle the tedious markdown updates
|
|
182
|
-
|
|
183
|
-
## Updating Templates
|
|
184
|
-
|
|
185
|
-
To modify template content:
|
|
186
|
-
|
|
187
|
-
1. Edit the template file in `templates/`
|
|
188
|
-
2. Changes apply to all future workflows automatically
|
|
189
|
-
3. No need to update step files
|
|
190
|
-
|
|
191
|
-
## Maintenance
|
|
192
|
-
|
|
193
|
-
- Templates are stateless (no workflow-specific logic)
|
|
194
|
-
- Scripts are idempotent (safe to run multiple times)
|
|
195
|
-
- Variables use `{{var}}` syntax to avoid conflicts with markdown
|
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prompt-creator
|
|
3
|
-
description: Expert prompt engineering for creating effective prompts for Claude, GPT, and other LLMs. Use when writing system prompts, user prompts, few-shot examples, or optimizing existing prompts for better performance.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Create highly effective prompts using proven techniques from Anthropic and OpenAI research. This skill covers all major prompting methodologies: clarity, structure, examples, reasoning, and advanced patterns.
|
|
8
|
-
|
|
9
|
-
Every prompt created should be clear, specific, and optimized for the target model.
|
|
10
|
-
</objective>
|
|
11
|
-
|
|
12
|
-
<quick_start>
|
|
13
|
-
<workflow>
|
|
14
|
-
|
|
15
|
-
1. **Clarify purpose**: What should the prompt accomplish?
|
|
16
|
-
2. **Identify model**: Claude, GPT, or other (techniques vary slightly)
|
|
17
|
-
3. **Select techniques**: Choose from core techniques based on task complexity
|
|
18
|
-
4. **Structure content**: Use XML tags (Claude) or markdown (GPT) for organization
|
|
19
|
-
5. **Add examples**: Include few-shot examples for format-sensitive outputs
|
|
20
|
-
6. **Define success**: Add clear success criteria
|
|
21
|
-
7. **Test and iterate**: Refine based on outputs
|
|
22
|
-
</workflow>
|
|
23
|
-
|
|
24
|
-
<core_structure>
|
|
25
|
-
Every effective prompt has:
|
|
26
|
-
|
|
27
|
-
```xml
|
|
28
|
-
<context>
|
|
29
|
-
Background information the model needs
|
|
30
|
-
</context>
|
|
31
|
-
|
|
32
|
-
<task>
|
|
33
|
-
Clear, specific instruction of what to do
|
|
34
|
-
</task>
|
|
35
|
-
|
|
36
|
-
<requirements>
|
|
37
|
-
- Specific constraints
|
|
38
|
-
- Output format
|
|
39
|
-
- Edge cases to handle
|
|
40
|
-
</requirements>
|
|
41
|
-
|
|
42
|
-
<examples>
|
|
43
|
-
Input/output pairs demonstrating expected behavior
|
|
44
|
-
</examples>
|
|
45
|
-
|
|
46
|
-
<success_criteria>
|
|
47
|
-
How to know the task was completed correctly
|
|
48
|
-
</success_criteria>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
</core_structure>
|
|
52
|
-
</quick_start>
|
|
53
|
-
|
|
54
|
-
<core_techniques>
|
|
55
|
-
<technique name="be_clear_and_direct">
|
|
56
|
-
**Priority**: Always apply first
|
|
57
|
-
|
|
58
|
-
- State exactly what you want
|
|
59
|
-
- Avoid ambiguous language ("try to", "maybe", "generally")
|
|
60
|
-
- Use "Always..." or "Never..." instead of "Should probably..."
|
|
61
|
-
- Provide specific output format requirements
|
|
62
|
-
|
|
63
|
-
See: [references/clarity-principles.md](references/clarity-principles.md)
|
|
64
|
-
</technique>
|
|
65
|
-
|
|
66
|
-
<technique name="use_xml_tags">
|
|
67
|
-
**When**: Claude prompts, complex structure needed
|
|
68
|
-
|
|
69
|
-
Claude was trained with XML tags. Use them for:
|
|
70
|
-
|
|
71
|
-
- Separating sections: `<context>`, `<task>`, `<output>`
|
|
72
|
-
- Wrapping data: `<document>`, `<schema>`, `<example>`
|
|
73
|
-
- Defining boundaries: Clear start/end of sections
|
|
74
|
-
|
|
75
|
-
See: [references/xml-structure.md](references/xml-structure.md)
|
|
76
|
-
</technique>
|
|
77
|
-
|
|
78
|
-
<technique name="few_shot_examples">
|
|
79
|
-
**When**: Output format matters, pattern recognition easier than rules
|
|
80
|
-
|
|
81
|
-
Provide 2-4 input/output pairs:
|
|
82
|
-
|
|
83
|
-
```xml
|
|
84
|
-
<examples>
|
|
85
|
-
<example number="1">
|
|
86
|
-
<input>User clicked signup button</input>
|
|
87
|
-
<output>track('signup_initiated', { source: 'homepage' })</output>
|
|
88
|
-
</example>
|
|
89
|
-
</examples>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
See: [references/few-shot-patterns.md](references/few-shot-patterns.md)
|
|
93
|
-
</technique>
|
|
94
|
-
|
|
95
|
-
<technique name="chain_of_thought">
|
|
96
|
-
**When**: Complex reasoning, math, multi-step analysis
|
|
97
|
-
|
|
98
|
-
Add explicit reasoning instructions:
|
|
99
|
-
|
|
100
|
-
- "Think step by step before answering"
|
|
101
|
-
- "First analyze X, then consider Y, finally conclude Z"
|
|
102
|
-
- Use `<thinking>` tags for Claude's extended thinking
|
|
103
|
-
|
|
104
|
-
See: [references/reasoning-techniques.md](references/reasoning-techniques.md)
|
|
105
|
-
</technique>
|
|
106
|
-
|
|
107
|
-
<technique name="system_prompts">
|
|
108
|
-
**When**: Setting persistent behavior, role, constraints
|
|
109
|
-
|
|
110
|
-
System prompts set the foundation:
|
|
111
|
-
|
|
112
|
-
- Define Claude's role and expertise
|
|
113
|
-
- Set constraints and boundaries
|
|
114
|
-
- Establish output format expectations
|
|
115
|
-
|
|
116
|
-
See: [references/system-prompt-patterns.md](references/system-prompt-patterns.md)
|
|
117
|
-
</technique>
|
|
118
|
-
|
|
119
|
-
<technique name="prefilling">
|
|
120
|
-
**When**: Enforcing specific output format (Claude-specific)
|
|
121
|
-
|
|
122
|
-
Start Claude's response to guide format:
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
Assistant: {"result":
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Forces JSON output without preamble.
|
|
129
|
-
</technique>
|
|
130
|
-
|
|
131
|
-
<technique name="context_management">
|
|
132
|
-
**When**: Long-running tasks, multi-session work, large context usage
|
|
133
|
-
|
|
134
|
-
For Claude 4.5 with context awareness:
|
|
135
|
-
|
|
136
|
-
- Inform about automatic context compaction
|
|
137
|
-
- Add state tracking (JSON, progress.txt, git)
|
|
138
|
-
- Use test-first patterns for complex implementations
|
|
139
|
-
- Enable autonomous task completion across context windows
|
|
140
|
-
|
|
141
|
-
See: [references/context-management.md](references/context-management.md)
|
|
142
|
-
</technique>
|
|
143
|
-
</core_techniques>
|
|
144
|
-
|
|
145
|
-
<prompt_creation_workflow>
|
|
146
|
-
<step_0>
|
|
147
|
-
**Gather requirements** using AskUserQuestion:
|
|
148
|
-
|
|
149
|
-
1. What is the prompt's purpose?
|
|
150
|
-
- Generate content
|
|
151
|
-
- Analyze/extract information
|
|
152
|
-
- Transform data
|
|
153
|
-
- Make decisions
|
|
154
|
-
- Other
|
|
155
|
-
|
|
156
|
-
2. What model will use this prompt?
|
|
157
|
-
- Claude (use XML tags)
|
|
158
|
-
- GPT (use markdown structure)
|
|
159
|
-
- Other/multiple
|
|
160
|
-
|
|
161
|
-
3. What complexity level?
|
|
162
|
-
- Simple (single task, clear output)
|
|
163
|
-
- Medium (multiple steps, some nuance)
|
|
164
|
-
- Complex (reasoning, edge cases, validation)
|
|
165
|
-
|
|
166
|
-
4. Output format requirements?
|
|
167
|
-
- Free text
|
|
168
|
-
- JSON/structured data
|
|
169
|
-
- Code
|
|
170
|
-
- Specific template
|
|
171
|
-
</step_0>
|
|
172
|
-
|
|
173
|
-
<step_1>
|
|
174
|
-
**Draft the prompt** using this template:
|
|
175
|
-
|
|
176
|
-
```xml
|
|
177
|
-
<context>
|
|
178
|
-
[Background the model needs to understand the task]
|
|
179
|
-
</context>
|
|
180
|
-
|
|
181
|
-
<objective>
|
|
182
|
-
[Clear statement of what to accomplish]
|
|
183
|
-
</objective>
|
|
184
|
-
|
|
185
|
-
<instructions>
|
|
186
|
-
[Step-by-step process, numbered if sequential]
|
|
187
|
-
</instructions>
|
|
188
|
-
|
|
189
|
-
<constraints>
|
|
190
|
-
[Rules, limitations, things to avoid]
|
|
191
|
-
</constraints>
|
|
192
|
-
|
|
193
|
-
<output_format>
|
|
194
|
-
[Exact structure of expected output]
|
|
195
|
-
</output_format>
|
|
196
|
-
|
|
197
|
-
<examples>
|
|
198
|
-
[2-4 input/output pairs if format matters]
|
|
199
|
-
</examples>
|
|
200
|
-
|
|
201
|
-
<success_criteria>
|
|
202
|
-
[How to verify the task was done correctly]
|
|
203
|
-
</success_criteria>
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
</step_1>
|
|
207
|
-
|
|
208
|
-
<step_2>
|
|
209
|
-
**Apply relevant techniques** based on complexity:
|
|
210
|
-
|
|
211
|
-
- **Simple**: Clear instructions + output format
|
|
212
|
-
- **Medium**: Add examples + constraints
|
|
213
|
-
- **Complex**: Add reasoning steps + edge cases + validation
|
|
214
|
-
</step_2>
|
|
215
|
-
|
|
216
|
-
<step_3>
|
|
217
|
-
**Review checklist**:
|
|
218
|
-
|
|
219
|
-
- [ ] Is the task clearly stated?
|
|
220
|
-
- [ ] Are ambiguous words removed?
|
|
221
|
-
- [ ] Is output format specified?
|
|
222
|
-
- [ ] Are edge cases addressed?
|
|
223
|
-
- [ ] Would a person with no context understand it?
|
|
224
|
-
</step_3>
|
|
225
|
-
</prompt_creation_workflow>
|
|
226
|
-
|
|
227
|
-
<anti_patterns>
|
|
228
|
-
<pitfall name="vague_instructions">
|
|
229
|
-
❌ "Help with the data"
|
|
230
|
-
✅ "Extract email addresses from the CSV, remove duplicates, output as JSON array"
|
|
231
|
-
</pitfall>
|
|
232
|
-
|
|
233
|
-
<pitfall name="negative_prompting">
|
|
234
|
-
❌ "Don't use technical jargon"
|
|
235
|
-
✅ "Write in plain language suitable for a non-technical audience"
|
|
236
|
-
</pitfall>
|
|
237
|
-
|
|
238
|
-
<pitfall name="no_examples">
|
|
239
|
-
❌ Describing format in words only
|
|
240
|
-
✅ Showing 2-3 concrete input/output examples
|
|
241
|
-
</pitfall>
|
|
242
|
-
|
|
243
|
-
<pitfall name="missing_edge_cases">
|
|
244
|
-
❌ "Process the file"
|
|
245
|
-
✅ "Process the file. If empty, return []. If malformed, return error with line number."
|
|
246
|
-
</pitfall>
|
|
247
|
-
|
|
248
|
-
See: [references/anti-patterns.md](references/anti-patterns.md)
|
|
249
|
-
</anti_patterns>
|
|
250
|
-
|
|
251
|
-
<reference_guides>
|
|
252
|
-
**Core principles:**
|
|
253
|
-
|
|
254
|
-
- [references/clarity-principles.md](references/clarity-principles.md) - Being clear and direct
|
|
255
|
-
- [references/xml-structure.md](references/xml-structure.md) - Using XML tags effectively
|
|
256
|
-
|
|
257
|
-
**Techniques:**
|
|
258
|
-
|
|
259
|
-
- [references/few-shot-patterns.md](references/few-shot-patterns.md) - Example-based prompting
|
|
260
|
-
- [references/reasoning-techniques.md](references/reasoning-techniques.md) - Chain of thought, step-by-step
|
|
261
|
-
- [references/system-prompt-patterns.md](references/system-prompt-patterns.md) - System prompt templates
|
|
262
|
-
- [references/context-management.md](references/context-management.md) - Context windows, long-horizon reasoning, state tracking
|
|
263
|
-
|
|
264
|
-
**Best practices by vendor:**
|
|
265
|
-
|
|
266
|
-
- [references/anthropic-best-practices.md](references/anthropic-best-practices.md) - Claude-specific techniques
|
|
267
|
-
- [references/openai-best-practices.md](references/openai-best-practices.md) - GPT-specific techniques
|
|
268
|
-
|
|
269
|
-
**Quality:**
|
|
270
|
-
|
|
271
|
-
- [references/anti-patterns.md](references/anti-patterns.md) - Common mistakes to avoid
|
|
272
|
-
- [references/prompt-templates.md](references/prompt-templates.md) - Ready-to-use templates
|
|
273
|
-
</reference_guides>
|
|
274
|
-
|
|
275
|
-
<success_criteria>
|
|
276
|
-
A well-crafted prompt has:
|
|
277
|
-
|
|
278
|
-
- Clear, unambiguous objective
|
|
279
|
-
- Specific output format with example
|
|
280
|
-
- Relevant context provided
|
|
281
|
-
- Edge cases addressed
|
|
282
|
-
- No vague language (try, maybe, generally)
|
|
283
|
-
- Appropriate technique selection for task complexity
|
|
284
|
-
- Success criteria defined
|
|
285
|
-
</success_criteria>
|