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.
Files changed (107) hide show
  1. package/README.md +0 -1
  2. package/agents-config/skills/agents-manager/SKILL.md +2 -2
  3. package/agents-config/skills/agents-manager/agents/openai.yaml +7 -0
  4. package/agents-config/skills/agents-manager/assets/codex-icon.svg +20 -0
  5. package/agents-config/skills/apex/SKILL.md +120 -118
  6. package/agents-config/skills/apex/agents/openai.yaml +10 -0
  7. package/agents-config/skills/apex/assets/codex-icon.svg +15 -0
  8. package/agents-config/skills/apex/scripts/apex-state.py +740 -0
  9. package/agents-config/skills/apex/scripts/setup-templates.sh +27 -145
  10. package/agents-config/skills/apex/scripts/test_apex_state.py +413 -0
  11. package/agents-config/skills/apex/scripts/update-progress.sh +17 -73
  12. package/agents-config/skills/apex/steps/step-00-init.md +85 -231
  13. package/agents-config/skills/apex/steps/step-00b-branch.md +10 -118
  14. package/agents-config/skills/apex/steps/step-00b-economy.md +12 -239
  15. package/agents-config/skills/apex/steps/step-00b-interactive.md +13 -162
  16. package/agents-config/skills/apex/steps/step-00b-save.md +13 -114
  17. package/agents-config/skills/apex/steps/step-01-analyze.md +40 -361
  18. package/agents-config/skills/apex/steps/step-02-plan.md +55 -562
  19. package/agents-config/skills/apex/steps/step-02b-tasks.md +15 -291
  20. package/agents-config/skills/apex/steps/step-03-execute-teams.md +47 -267
  21. package/agents-config/skills/apex/steps/step-03-execute.md +32 -212
  22. package/agents-config/skills/apex/steps/step-04-validate.md +42 -246
  23. package/agents-config/skills/apex/steps/step-05-examine.md +47 -371
  24. package/agents-config/skills/apex/steps/step-06-resolve.md +19 -221
  25. package/agents-config/skills/apex/steps/step-07-tests.md +19 -234
  26. package/agents-config/skills/apex/steps/step-08-run-tests.md +13 -300
  27. package/agents-config/skills/apex/steps/step-09-finish.md +36 -200
  28. package/agents-config/skills/apex/steps/step-10-verify.md +46 -264
  29. package/agents-config/skills/appstore-connect/agents/openai.yaml +7 -0
  30. package/agents-config/skills/appstore-connect/assets/codex-icon.svg +17 -0
  31. package/agents-config/skills/commit/agents/openai.yaml +10 -0
  32. package/agents-config/skills/commit/assets/codex-icon.svg +17 -0
  33. package/agents-config/skills/create-pr/agents/openai.yaml +10 -0
  34. package/agents-config/skills/create-pr/assets/codex-icon.svg +17 -0
  35. package/agents-config/skills/environments-manager/SKILL.md +1 -1
  36. package/agents-config/skills/environments-manager/agents/openai.yaml +7 -0
  37. package/agents-config/skills/environments-manager/assets/codex-icon.svg +16 -0
  38. package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-remove.sh +19 -3
  39. package/agents-config/skills/environments-manager/examples/scripts/worktree-up.sh +1 -1
  40. package/agents-config/skills/environments-manager/references/claude.md +1 -1
  41. package/agents-config/skills/fix-pr-comments/agents/openai.yaml +10 -0
  42. package/agents-config/skills/fix-pr-comments/assets/codex-icon.svg +17 -0
  43. package/agents-config/skills/grill-me/SKILL.md +25 -4
  44. package/agents-config/skills/grill-me/agents/openai.yaml +8 -0
  45. package/agents-config/skills/grill-me/assets/codex-icon.svg +16 -0
  46. package/agents-config/skills/hooks-manager/SKILL.md +19 -9
  47. package/agents-config/skills/hooks-manager/assets/codex-icon.svg +15 -4
  48. package/agents-config/skills/hooks-manager/references/claude-code.md +32 -0
  49. package/agents-config/skills/hooks-manager/references/codex.md +23 -0
  50. package/agents-config/skills/hooks-manager/references/cursor.md +18 -0
  51. package/agents-config/skills/hooks-manager/references/hook-types.md +5 -3
  52. package/agents-config/skills/hooks-manager/references/input-output-schemas.md +2 -2
  53. package/agents-config/skills/hooks-manager/references/research-sources.md +25 -0
  54. package/agents-config/skills/hooks-manager/references/router.md +32 -0
  55. package/agents-config/skills/hooks-manager/references/troubleshooting.md +3 -3
  56. package/agents-config/skills/merge/agents/openai.yaml +10 -0
  57. package/agents-config/skills/merge/assets/codex-icon.svg +17 -0
  58. package/agents-config/skills/oneshot/SKILL.md +4 -0
  59. package/agents-config/skills/oneshot/agents/openai.yaml +10 -0
  60. package/agents-config/skills/oneshot/assets/codex-icon.svg +18 -0
  61. package/agents-config/skills/rules-manager/agents/openai.yaml +7 -0
  62. package/agents-config/skills/rules-manager/assets/codex-icon.svg +23 -0
  63. package/agents-config/skills/skill-manager/SKILL.md +45 -3
  64. package/agents-config/skills/skill-manager/agents/openai.yaml +7 -0
  65. package/agents-config/skills/skill-manager/assets/codex-icon.svg +23 -0
  66. package/agents-config/skills/skill-manager/references/skill-writing-glossary.md +201 -0
  67. package/agents-config/skills/skill-manager/scripts/setup-codex-icons.ts +143 -0
  68. package/agents-config/skills/ultrathink/agents/openai.yaml +10 -0
  69. package/agents-config/skills/ultrathink/assets/codex-icon.svg +20 -0
  70. package/agents-config/skills/use-artifacts/SKILL.md +102 -51
  71. package/agents-config/skills/use-artifacts/assets/local-runtime.js +299 -0
  72. package/agents-config/skills/use-artifacts/scripts/create_artifact.py +1 -1
  73. package/agents-config/skills/use-delegate/SKILL.md +4 -0
  74. package/agents-config/skills/use-delegate/agents/openai.yaml +10 -0
  75. package/agents-config/skills/use-delegate/assets/codex-icon.svg +20 -0
  76. package/agents-config/skills/use-goal/SKILL.md +70 -9
  77. package/agents-config/skills/use-goal/agents/openai.yaml +1 -1
  78. package/agents-config/skills/use-goal/assets/codex-icon.svg +17 -3
  79. package/agents-config/skills/use-goal/references/claude-code-goal.md +54 -6
  80. package/agents-config/skills/use-goal/references/codex-goal.md +59 -4
  81. package/agents-config/skills/use-goal/references/verification-harnesses.md +104 -3
  82. package/dist/cli.js +365 -363
  83. package/package.json +1 -1
  84. package/agents-config/skills/apex/templates/00-context.md +0 -55
  85. package/agents-config/skills/apex/templates/01-analyze.md +0 -10
  86. package/agents-config/skills/apex/templates/02-plan.md +0 -10
  87. package/agents-config/skills/apex/templates/03-execute.md +0 -10
  88. package/agents-config/skills/apex/templates/04-validate.md +0 -10
  89. package/agents-config/skills/apex/templates/05-examine.md +0 -10
  90. package/agents-config/skills/apex/templates/06-resolve.md +0 -10
  91. package/agents-config/skills/apex/templates/07-tests.md +0 -10
  92. package/agents-config/skills/apex/templates/08-run-tests.md +0 -10
  93. package/agents-config/skills/apex/templates/09-finish.md +0 -10
  94. package/agents-config/skills/apex/templates/10-verify.md +0 -9
  95. package/agents-config/skills/apex/templates/README.md +0 -195
  96. package/agents-config/skills/apex/templates/step-complete.md +0 -7
  97. package/agents-config/skills/prompt-creator/SKILL.md +0 -285
  98. package/agents-config/skills/prompt-creator/references/anthropic-best-practices.md +0 -126
  99. package/agents-config/skills/prompt-creator/references/anti-patterns.md +0 -57
  100. package/agents-config/skills/prompt-creator/references/clarity-principles.md +0 -54
  101. package/agents-config/skills/prompt-creator/references/context-management.md +0 -389
  102. package/agents-config/skills/prompt-creator/references/few-shot-patterns.md +0 -47
  103. package/agents-config/skills/prompt-creator/references/openai-best-practices.md +0 -50
  104. package/agents-config/skills/prompt-creator/references/prompt-templates.md +0 -110
  105. package/agents-config/skills/prompt-creator/references/reasoning-techniques.md +0 -52
  106. package/agents-config/skills/prompt-creator/references/system-prompt-patterns.md +0 -48
  107. package/agents-config/skills/prompt-creator/references/xml-structure.md +0 -36
@@ -1,126 +0,0 @@
1
- <overview>
2
- Claude-specific prompting techniques from Anthropic's official documentation.
3
- </overview>
4
-
5
- <techniques>
6
- <technique name="xml_tags">
7
- Claude was trained with XML tags. Use them for structure:
8
- - `<context>` - Background information
9
- - `<instructions>` - Task description
10
- - `<document>` - Content to process
11
- - `<example>` - Input/output pairs
12
- </technique>
13
-
14
- <technique name="be_explicit">
15
- State exactly what you want:
16
- - Use "Always..." or "Never..." instead of "try to"
17
- - Specify format, length, style explicitly
18
- - Add context about WHY (helps Claude make better decisions)
19
- </technique>
20
-
21
- <technique name="extended_thinking">
22
- For complex reasoning:
23
- - Add "Think step by step"
24
- - Guide: "First analyze X, then consider Y, finally conclude Z"
25
- </technique>
26
-
27
- <technique name="prefilling">
28
- Start Claude's response to enforce format:
29
- - Begin with `{"result":` for JSON
30
- - Prevents preamble text
31
- </technique>
32
-
33
- <technique name="positive_framing">
34
- State what TO DO, not what NOT to do:
35
- - BAD: "Don't use jargon"
36
- - GOOD: "Write in plain language for non-technical readers"
37
- </technique>
38
-
39
- <technique name="prompt_chaining">
40
- Break complex tasks into steps:
41
- - Output of one prompt becomes input for next
42
- - Each step has clear, focused objective
43
- </technique>
44
- </techniques>
45
-
46
- <claude_4_specific>
47
- <extended_thinking>
48
- - Leverage extended thinking for complex tasks
49
- - Use trigger phrases: "Thoroughly analyze...", "Consider multiple approaches..."
50
- - Extended thinking tokens count toward context but are auto-stripped from subsequent turns
51
- </extended_thinking>
52
-
53
- <parallel_tools>
54
- - Direct parallel tool calls explicitly
55
- - "Invoke all independent operations simultaneously"
56
- - Improves performance for file reads, searches, API calls
57
- </parallel_tools>
58
-
59
- <investigation_first>
60
- - Instruct to investigate/read files BEFORE answering
61
- - "Read existing implementation before proposing changes"
62
- - Prevents hallucination and ensures context-aware responses
63
- </investigation_first>
64
-
65
- <context_awareness>
66
- **Claude Sonnet 4.5 and Haiku 4.5** have built-in context awareness:
67
- - Track remaining token budget throughout conversation
68
- - Receive periodic updates on capacity
69
- - Manage long-running tasks more effectively
70
-
71
- For systems with automatic context compaction (like Claude Code):
72
- ```xml
73
- <context>
74
- Your context window will be automatically compacted as it approaches
75
- its limit, allowing you to continue working indefinitely from where
76
- you left off.
77
- </context>
78
- ```
79
-
80
- This prevents Claude from stopping work prematurely.
81
- </context_awareness>
82
-
83
- <long_horizon_tasks>
84
- For tasks spanning multiple context windows:
85
-
86
- **State tracking:**
87
- - Use structured formats (JSON) for task status
88
- - Use unstructured notes (progress.txt) for context
89
- - Leverage git for work logs and checkpoints
90
-
91
- **Instructions pattern:**
92
- ```xml
93
- <instructions>
94
- Work systematically through all tasks. Track progress in:
95
- - progress.json (structured status)
96
- - progress.txt (session notes)
97
- - git commits (implementation history)
98
-
99
- If context refreshes, review these files to resume.
100
- </instructions>
101
- ```
102
-
103
- **Test-first pattern:**
104
- ```xml
105
- <requirements>
106
- Create all tests in tests.json first. It is unacceptable to
107
- remove or edit tests - they are the source of truth.
108
- </requirements>
109
- ```
110
-
111
- See: [context-management.md](context-management.md) for comprehensive patterns.
112
- </long_horizon_tasks>
113
-
114
- <context_window_management>
115
- **Size limits:**
116
- - Standard: 200K tokens
117
- - Enterprise: 500K tokens
118
- - Sonnet 4/4.5 (beta): 1M tokens
119
-
120
- **Best practices:**
121
- - Plan for context accumulation
122
- - Use token counting API for estimates
123
- - Consider premium pricing (>200K = 2x input, 1.5x output)
124
- - Images count toward budget
125
- </context_window_management>
126
- </claude_4_specific>
@@ -1,57 +0,0 @@
1
- <overview>
2
- Common prompt mistakes and how to avoid them.
3
- </overview>
4
-
5
- <anti_patterns>
6
- <pitfall name="vague_instructions">
7
- BAD: "Help with the data"
8
- GOOD: "Extract emails from CSV, remove duplicates, output as JSON array"
9
- </pitfall>
10
-
11
- <pitfall name="negative_prompting">
12
- BAD: "Don't use technical jargon"
13
- GOOD: "Write in plain language for non-technical readers"
14
-
15
- Negative instructions can backfire - state what to do instead.
16
- </pitfall>
17
-
18
- <pitfall name="no_examples">
19
- BAD: Describing format in words only
20
- GOOD: Showing 2-3 concrete input/output examples
21
-
22
- Examples communicate nuances words cannot.
23
- </pitfall>
24
-
25
- <pitfall name="missing_edge_cases">
26
- BAD: "Process the file"
27
- GOOD: "Process the file. If empty, return []. If malformed, return error with line number."
28
- </pitfall>
29
-
30
- <pitfall name="ambiguous_language">
31
- BAD: "Try to keep it short", "Maybe add examples"
32
- GOOD: "Maximum 3 paragraphs", "Include 2 examples"
33
- </pitfall>
34
-
35
- <pitfall name="no_success_criteria">
36
- BAD: "Analyze the data"
37
- GOOD: "Analyze the data. Success: identify top 3 trends with supporting metrics."
38
- </pitfall>
39
-
40
- <pitfall name="too_many_options">
41
- BAD: "You can use library A, B, C, D, or E..."
42
- GOOD: "Use library A. For edge case X, use B instead."
43
-
44
- Provide one default with escape hatch.
45
- </pitfall>
46
-
47
- <pitfall name="inconsistent_terminology">
48
- BAD: Mixing "API endpoint", "URL", "route", "path"
49
- GOOD: Pick one term and use consistently throughout
50
- </pitfall>
51
- </anti_patterns>
52
-
53
- <testing>
54
- Ask: "Could I hand these instructions to someone with no context and expect correct results?"
55
-
56
- If unclear to a human, it's unclear to the model.
57
- </testing>
@@ -1,54 +0,0 @@
1
- <overview>
2
- Clarity reduces errors and improves output quality.
3
- </overview>
4
-
5
- <golden_rule>
6
- Show your prompt to someone with minimal context. If they're confused, the model will be too.
7
- </golden_rule>
8
-
9
- <guidelines>
10
- <guideline name="specificity">
11
- BAD: "Help with the report"
12
- GOOD: "Generate markdown report with: Executive Summary, Key Findings, Recommendations"
13
- </guideline>
14
-
15
- <guideline name="sequential_steps">
16
- Provide numbered instructions:
17
- 1. Extract data
18
- 2. Transform format
19
- 3. Validate
20
- 4. Save output
21
- </guideline>
22
-
23
- <guideline name="avoid_ambiguity">
24
- Replace ambiguous phrases:
25
- - "Try to..." → "Always..."
26
- - "Should probably..." → "Must..."
27
- - "Generally..." → "Always... except when..."
28
- </guideline>
29
-
30
- <guideline name="define_edge_cases">
31
- Anticipate edge cases:
32
- - What if no results?
33
- - What if duplicates?
34
- - What if invalid format?
35
- </guideline>
36
-
37
- <guideline name="output_format">
38
- Specify format with example:
39
- ```json
40
- {"name": "string", "email": "string"}
41
- ```
42
- </guideline>
43
-
44
- <guideline name="success_criteria">
45
- Define success:
46
- - All rows parsed
47
- - No validation errors
48
- - Output file created
49
- </guideline>
50
- </guidelines>
51
-
52
- <show_dont_tell>
53
- When format matters, show an example rather than describing it.
54
- </show_dont_tell>
@@ -1,389 +0,0 @@
1
- <overview>
2
- Claude 4 context window management, long-horizon reasoning strategies, and state tracking best practices from Anthropic's official documentation.
3
- </overview>
4
-
5
- <context_windows>
6
-
7
- <size_limits>
8
- **Standard models:** 200,000 tokens
9
- **Claude.ai Enterprise:** 500,000 tokens
10
- **Claude Sonnet 4 and 4.5** (beta, tier 4+ orgs): 1,000,000 tokens
11
-
12
- **Premium pricing:** Requests exceeding 200K tokens incur 2x input, 1.5x output pricing.
13
- </size_limits>
14
-
15
- <how_context_accumulates>
16
- Each user message and assistant response accumulates within the context window. Previous exchanges remain intact, creating linear growth.
17
-
18
- **Each turn consists of:**
19
- - Input phase: prior history + current message
20
- - Output phase: response that becomes future input
21
-
22
- **Extended thinking integration:**
23
- All tokens (including thinking blocks) count toward limits. However, thinking blocks are automatically stripped from subsequent turns, preserving token capacity.
24
-
25
- Formula: `context_window = (input_tokens - previous_thinking_tokens) + current_turn_tokens`
26
-
27
- During tool use with extended thinking, thinking blocks must accompany tool results to maintain reasoning continuity, then can be dropped afterward.
28
- </how_context_accumulates>
29
-
30
- <context_awareness>
31
- **Claude Sonnet 4.5 and Haiku 4.5** include context awareness - tracking remaining tokens throughout conversations.
32
-
33
- Models receive:
34
- - Initial budget information
35
- - Periodic updates on remaining capacity
36
-
37
- This enables more effective task execution and resource management.
38
-
39
- **Key instruction for systems with auto-compaction:**
40
- ```xml
41
- <context>
42
- Your context window will be automatically compacted as it approaches
43
- its limit, allowing you to continue working indefinitely from where
44
- you left off.
45
- </context>
46
- ```
47
-
48
- This prevents Claude from artificially stopping work early when using systems like Claude Code that handle context compaction.
49
- </context_awareness>
50
-
51
- <best_practices>
52
- - Use token counting API to estimate usage before sending requests
53
- - Plan carefully to avoid exceeding limits; newer models return validation errors rather than silently truncating
54
- - For long-running agent sessions, leverage context awareness to manage token expenditure strategically
55
- - Image tokens count toward context budgets
56
- </best_practices>
57
-
58
- </context_windows>
59
-
60
- <long_horizon_reasoning>
61
-
62
- <core_capabilities>
63
- Claude 4.5 excels at extended reasoning tasks with strong state management. The model maintains orientation across extended sessions by focusing on incremental progress.
64
-
65
- Can work across multiple context windows by:
66
- - Saving state to filesystem
67
- - Continuing with fresh contexts
68
- - Discovering state through files (tests, progress, git logs)
69
- </core_capabilities>
70
-
71
- <multi_context_strategies>
72
-
73
- <strategy name="differentiated_first_context">
74
- Start with framework setup (tests, scripts), then use subsequent windows for iterative work on task lists.
75
-
76
- First context: Infrastructure
77
- Later contexts: Task execution
78
- </strategy>
79
-
80
- <strategy name="structured_test_tracking">
81
- Create tests before starting and maintain them in organized formats like `tests.json`.
82
-
83
- **Critical instruction:**
84
- ```xml
85
- <requirements>
86
- It is unacceptable to remove or edit tests because this could lead to
87
- missing or buggy functionality. Tests are the source of truth.
88
- </requirements>
89
- ```
90
- </strategy>
91
-
92
- <strategy name="quality_of_life_tools">
93
- Encourage Claude to build setup scripts (`init.sh`) for graceful server startup, test execution, and linting.
94
-
95
- Benefits:
96
- - Prevents repeated work across context windows
97
- - Standardizes development workflow
98
- - Enables quick verification
99
- </strategy>
100
-
101
- <strategy name="fresh_start_advantages">
102
- Rather than context compaction, begin fresh and have Claude discover state through the filesystem.
103
-
104
- **Prescriptive instruction:**
105
- ```xml
106
- <instructions>
107
- 1. Review progress.txt for completed work
108
- 2. Check tests.json for test status
109
- 3. Examine git logs for implementation history
110
- 4. Continue from last checkpoint
111
- </instructions>
112
- ```
113
- </strategy>
114
-
115
- <strategy name="verification_mechanisms">
116
- Provide tools like Playwright for UI testing so Claude can verify work without continuous human feedback.
117
-
118
- Self-verification enables autonomous task completion.
119
- </strategy>
120
-
121
- <strategy name="complete_context_usage">
122
- Prompt Claude to work systematically through tasks:
123
-
124
- ```xml
125
- <objective>
126
- Continue working systematically until you have completed this task.
127
- Use your full context window efficiently.
128
- </objective>
129
- ```
130
- </strategy>
131
-
132
- </multi_context_strategies>
133
-
134
- <state_management>
135
-
136
- <structured_formats>
137
- Use JSON for test results and task status - enables schema clarity.
138
-
139
- **Example:**
140
- ```json
141
- {
142
- "tests": [
143
- {"id": 1, "name": "authentication_flow", "status": "passing"}
144
- ],
145
- "total": 200,
146
- "passing": 150
147
- }
148
- ```
149
-
150
- **Benefits:**
151
- - Machine-parseable
152
- - Clear schema
153
- - Easy validation
154
- - Enables programmatic checks
155
- </structured_formats>
156
-
157
- <unstructured_notes>
158
- Freeform progress tracking works well for general advancement context.
159
-
160
- **Example progress.txt:**
161
- ```
162
- Session 1: Created JWT middleware and types
163
- Session 2: Implemented token refresh logic
164
- Session 3: Added rate limiting (TODO: add tests)
165
- ```
166
-
167
- **Benefits:**
168
- - Quick to write
169
- - Human-readable
170
- - Captures context and decisions
171
- </unstructured_notes>
172
-
173
- <git_integration>
174
- Version control provides work logs and restoration checkpoints. Claude 4.5 performs exceptionally well leveraging git across sessions.
175
-
176
- **Recommended instructions:**
177
- ```xml
178
- <context>
179
- Use git to track your work:
180
- - Commit after each logical unit
181
- - Write descriptive commit messages
182
- - Use git log to understand previous sessions
183
- - Check git diff before starting to see current state
184
- </context>
185
- ```
186
- </git_integration>
187
-
188
- <incremental_tracking>
189
- Explicitly request progress documentation and incremental advancement focus.
190
-
191
- **Pattern:**
192
- ```xml
193
- <requirements>
194
- After completing each task:
195
- 1. Update progress.json with status
196
- 2. Update progress.txt with summary
197
- 3. Commit changes with descriptive message
198
- 4. Continue to next task
199
- </requirements>
200
- ```
201
- </incremental_tracking>
202
-
203
- </state_management>
204
-
205
- <key_principles>
206
- Frame instructions to emphasize persistent, autonomous task completion despite context limitations, making clear that infrastructure handles windowing automatically.
207
-
208
- **Effective framing:**
209
- ```xml
210
- <objective>
211
- Complete the entire feature implementation. Your context window
212
- will be automatically managed, so focus on systematic progress
213
- through all requirements.
214
- </objective>
215
-
216
- <requirements>
217
- Work autonomously through the task list. Document progress in
218
- progress.json and tests.json so you can resume seamlessly if needed.
219
- </requirements>
220
- ```
221
- </key_principles>
222
-
223
- </long_horizon_reasoning>
224
-
225
- <prompt_patterns>
226
-
227
- <pattern name="context_aware_system_prompt">
228
- For assistants that may work across multiple sessions:
229
-
230
- ```xml
231
- <context>
232
- You are working in Claude Code, which automatically manages your
233
- context window. You can work indefinitely on complex tasks without
234
- worrying about token limits.
235
-
236
- Track your progress in:
237
- - progress.json - structured task status
238
- - progress.txt - session notes
239
- - git commits - implementation history
240
- </context>
241
-
242
- <objective>
243
- Complete the full task systematically. Use your context awareness
244
- to manage token usage efficiently.
245
- </objective>
246
- ```
247
- </pattern>
248
-
249
- <pattern name="state_recovery_prompt">
250
- For resuming work after context refresh:
251
-
252
- ```xml
253
- <instructions>
254
- Before starting:
255
- 1. Read progress.json to understand completed tasks
256
- 2. Read progress.txt for context and decisions
257
- 3. Check git log --oneline -10 for recent work
258
- 4. Review tests.json for test status
259
- 5. Continue from the next incomplete task
260
- </instructions>
261
-
262
- <requirements>
263
- Never redo completed work. Always verify current state before
264
- proceeding.
265
- </requirements>
266
- ```
267
- </pattern>
268
-
269
- <pattern name="test_first_long_horizon">
270
- For complex implementations across multiple context windows:
271
-
272
- ```xml
273
- <objective>
274
- Implement {feature} with complete test coverage. Tests are the
275
- source of truth and must never be removed or edited to pass.
276
- </objective>
277
-
278
- <phase_1_setup>
279
- 1. Create tests.json with all required tests (status: "pending")
280
- 2. Create init.sh for dev environment setup
281
- 3. Commit infrastructure before starting implementation
282
- </phase_1_setup>
283
-
284
- <phase_2_implementation>
285
- For each test in tests.json:
286
- 1. Implement the feature code
287
- 2. Run the test
288
- 3. If passing: Update tests.json status to "passing"
289
- 4. If failing: Fix code (never edit test)
290
- 5. Commit when passing
291
- 6. Continue to next test
292
- </phase_2_implementation>
293
-
294
- <verification>
295
- All tests.json entries must show "passing" before task is complete.
296
- </verification>
297
- ```
298
- </pattern>
299
-
300
- <pattern name="parallel_research_long_horizon">
301
- For research tasks that may span multiple contexts:
302
-
303
- ```xml
304
- <objective>
305
- Research {topic} comprehensively. Save findings incrementally to
306
- enable resumption if context refreshes.
307
- </objective>
308
-
309
- <instructions>
310
- 1. Create research-outline.md with all areas to investigate
311
- 2. For each area:
312
- a. Research thoroughly
313
- b. Append findings to findings.md
314
- c. Update research-outline.md to mark completed
315
- d. Commit progress
316
- 3. When all areas complete, synthesize into final-research.md
317
- </instructions>
318
-
319
- <output_format>
320
- findings.md should be append-only with clear section markers:
321
- ```
322
- ## Area 1: Authentication Methods [COMPLETE]
323
- ...
324
-
325
- ## Area 2: Session Management [COMPLETE]
326
- ...
327
-
328
- ## Area 3: Rate Limiting [IN PROGRESS]
329
- ...
330
- ```
331
- </output_format>
332
- ```
333
- </pattern>
334
-
335
- </prompt_patterns>
336
-
337
- <when_to_use>
338
-
339
- <context_awareness_instructions>
340
- Use when:
341
- - Building agents that may work across multiple sessions
342
- - Tasks likely to use >50% of context window
343
- - Long-running implementations with multiple phases
344
- - Research that may need to be paused and resumed
345
-
346
- Don't use when:
347
- - Simple, single-shot tasks
348
- - Tasks with clear completion in <10K tokens
349
- - One-off code generation
350
- </context_awareness_instructions>
351
-
352
- <state_tracking_patterns>
353
- Use when:
354
- - Task has >5 distinct subtasks
355
- - Implementation may span hours or days
356
- - Multiple people may need to understand progress
357
- - Resumability is important
358
-
359
- Don't use when:
360
- - Quick fixes or patches
361
- - Single-file modifications
362
- - Tasks with no meaningful checkpoints
363
- </state_tracking_patterns>
364
-
365
- </when_to_use>
366
-
367
- <anti_patterns>
368
-
369
- <pitfall name="over_documenting_simple_tasks">
370
- ❌ Adding progress.json for a 3-line bug fix
371
- ✅ Simple tasks don't need state tracking overhead
372
- </pitfall>
373
-
374
- <pitfall name="vague_progress_updates">
375
- ❌ "Made progress on auth" in progress.txt
376
- ✅ "Implemented JWT signing with jose library, created middleware.ts, next: refresh token rotation"
377
- </pitfall>
378
-
379
- <pitfall name="ignoring_context_limits">
380
- ❌ "Complete this entire 50-file refactor in one response"
381
- ✅ "Refactor files systematically, tracking progress in refactor-status.json"
382
- </pitfall>
383
-
384
- <pitfall name="forgetting_to_inform_about_compaction">
385
- ❌ Not telling Claude about automatic context management
386
- ✅ "Your context will be automatically compacted, continue working indefinitely"
387
- </pitfall>
388
-
389
- </anti_patterns>
@@ -1,47 +0,0 @@
1
- <overview>
2
- Few-shot prompting uses input/output examples to guide model behavior.
3
- </overview>
4
-
5
- <when_to_use>
6
- - Output format has nuances text can't capture
7
- - Pattern recognition easier than rule following
8
- - Edge cases need demonstration
9
- - Consistency across outputs matters
10
- </when_to_use>
11
-
12
- <structure>
13
- ```xml
14
- <examples>
15
- <example number="1">
16
- <input>Added user authentication</input>
17
- <output>feat(auth): implement user authentication</output>
18
- </example>
19
-
20
- <example number="2">
21
- <input>Fixed date display bug</input>
22
- <output>fix(ui): correct date formatting</output>
23
- </example>
24
-
25
- <example number="3">
26
- <input>Updated README</input>
27
- <output>docs: update README with setup instructions</output>
28
- </example>
29
- </examples>
30
- ```
31
- </structure>
32
-
33
- <best_practices>
34
- - Use 2-4 examples (usually sufficient)
35
- - Cover common cases AND edge cases
36
- - Ensure examples match desired behavior exactly
37
- - Show variety in inputs
38
- - Keep examples consistent in format
39
- </best_practices>
40
-
41
- <example_selection>
42
- Choose examples that demonstrate:
43
- 1. Typical/common case
44
- 2. Edge case or exception
45
- 3. Format nuances (spacing, capitalization)
46
- 4. Boundary conditions
47
- </example_selection>