aiblueprint-cli 1.4.87 → 1.4.89

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 (55) hide show
  1. package/agents-config/skills/agents-manager/SKILL.md +14 -3
  2. package/agents-config/skills/agents-manager/references/writing-agent-prompts.md +1 -1
  3. package/agents-config/skills/apex/SKILL.md +116 -55
  4. package/agents-config/skills/apex/scripts/setup-templates.sh +154 -0
  5. package/agents-config/skills/apex/scripts/update-progress.sh +80 -0
  6. package/agents-config/skills/apex/steps/step-00-init.md +278 -0
  7. package/agents-config/skills/apex/steps/step-00b-branch.md +126 -0
  8. package/agents-config/skills/apex/steps/step-00b-economy.md +247 -0
  9. package/agents-config/skills/apex/steps/step-00b-interactive.md +170 -0
  10. package/agents-config/skills/apex/steps/step-00b-save.md +125 -0
  11. package/agents-config/skills/apex/steps/step-01-analyze.md +388 -0
  12. package/agents-config/skills/apex/steps/step-02-plan.md +593 -0
  13. package/agents-config/skills/apex/steps/step-02b-tasks.md +301 -0
  14. package/agents-config/skills/apex/steps/step-03-execute-teams.md +296 -0
  15. package/agents-config/skills/apex/steps/step-03-execute.md +240 -0
  16. package/agents-config/skills/apex/steps/step-04-validate.md +272 -0
  17. package/agents-config/skills/apex/steps/step-05-examine.md +400 -0
  18. package/agents-config/skills/apex/steps/step-06-resolve.md +239 -0
  19. package/agents-config/skills/apex/steps/step-07-tests.md +250 -0
  20. package/agents-config/skills/apex/steps/step-08-run-tests.md +314 -0
  21. package/agents-config/skills/apex/steps/step-09-finish.md +223 -0
  22. package/agents-config/skills/apex/steps/step-10-verify.md +296 -0
  23. package/agents-config/skills/apex/templates/00-context.md +55 -0
  24. package/agents-config/skills/apex/templates/01-analyze.md +10 -0
  25. package/agents-config/skills/apex/templates/02-plan.md +10 -0
  26. package/agents-config/skills/apex/templates/03-execute.md +10 -0
  27. package/agents-config/skills/apex/templates/04-validate.md +10 -0
  28. package/agents-config/skills/apex/templates/05-examine.md +10 -0
  29. package/agents-config/skills/apex/templates/06-resolve.md +10 -0
  30. package/agents-config/skills/apex/templates/07-tests.md +10 -0
  31. package/agents-config/skills/apex/templates/08-run-tests.md +10 -0
  32. package/agents-config/skills/apex/templates/09-finish.md +10 -0
  33. package/agents-config/skills/apex/templates/10-verify.md +9 -0
  34. package/agents-config/skills/apex/templates/README.md +195 -0
  35. package/agents-config/skills/apex/templates/step-complete.md +7 -0
  36. package/agents-config/skills/appstore-connect/SKILL.md +3 -9
  37. package/agents-config/skills/environments-manager/SKILL.md +86 -94
  38. package/agents-config/skills/environments-manager/examples/{skills/dev/SKILL.md → claude/commands/dev.md} +1 -2
  39. package/agents-config/skills/environments-manager/examples/{skills/lint/SKILL.md → claude/commands/lint.md} +1 -2
  40. package/agents-config/skills/environments-manager/examples/{skills/test/SKILL.md → claude/commands/test.md} +1 -2
  41. package/agents-config/skills/environments-manager/examples/{skills/typecheck/SKILL.md → claude/commands/typecheck.md} +1 -2
  42. package/agents-config/skills/environments-manager/examples/scripts/worktree-down.sh +5 -12
  43. package/agents-config/skills/environments-manager/examples/scripts/worktree-up.sh +11 -21
  44. package/agents-config/skills/environments-manager/references/claude.md +9 -13
  45. package/agents-config/skills/environments-manager/references/convex.md +120 -0
  46. package/agents-config/skills/environments-manager/references/cursor.md +2 -2
  47. package/agents-config/skills/environments-manager/references/postgresql.md +89 -0
  48. package/agents-config/skills/oneshot/SKILL.md +21 -37
  49. package/agents-config/skills/rules-manager/SKILL.md +15 -2
  50. package/agents-config/skills/skill-manager/SKILL.md +30 -2
  51. package/agents-config/skills/ultrathink/SKILL.md +1 -1
  52. package/agents-config/skills/use-fable/SKILL.md +64 -0
  53. package/package.json +1 -1
  54. package/agents-config/skills/appstore-connect/references/setup.md +0 -156
  55. package/agents-config/skills/appstore-connect/references/testflight.md +0 -212
@@ -0,0 +1,278 @@
1
+ ---
2
+ name: step-00-init
3
+ description: Initialize APEX workflow - parse flags, detect continuation, setup state
4
+ next_step: steps/step-01-analyze.md
5
+ ---
6
+
7
+ # Step 0: Initialization
8
+
9
+ ## MANDATORY EXECUTION RULES (READ FIRST):
10
+
11
+ - 🛑 NEVER skip flag parsing
12
+ - 🛑 ONLY check for existing workflow if resume_task is set
13
+ - ✅ ALWAYS parse ALL flags before any other action
14
+ - ✅ ONLY check for resume if {resume_task} is set
15
+ - 📋 YOU ARE AN INITIALIZER, not an executor
16
+ - 💬 FOCUS on setup only - don't look ahead to implementation
17
+ - 🚫 FORBIDDEN to load step-01 until init is complete
18
+
19
+ ## EXECUTION PROTOCOLS:
20
+
21
+ - 🎯 Parse flags first, then check resume, then setup
22
+ - 💾 Create output structure if save_mode enabled
23
+ - 📖 Initialize all state variables before proceeding
24
+ - 🚫 FORBIDDEN to start analysis (that's step-01's job)
25
+ - ✅ ALWAYS show COMPACT summary (one table) and proceed immediately
26
+ - 🚫 FORBIDDEN to show verbose parsing logs or explanations
27
+
28
+ ## CONTEXT BOUNDARIES:
29
+
30
+ - This is the FIRST step - no previous context exists
31
+ - User input contains flags and task description
32
+ - Output folder may or may not exist
33
+ - Don't assume anything about the codebase yet
34
+
35
+ ## YOUR TASK:
36
+
37
+ Initialize the APEX workflow by parsing flags, detecting continuation state, and setting up the execution environment.
38
+
39
+ ---
40
+
41
+ <defaults>
42
+ ## Default Configuration
43
+
44
+ **Edit these values to change default behavior. Flags always override defaults.**
45
+
46
+ ```yaml
47
+ # ===========================================
48
+ # APEX DEFAULT SETTINGS
49
+ # ===========================================
50
+
51
+ auto_mode: false # -a: Skip confirmations, use recommended options
52
+ examine_mode: false # -x: Auto-proceed to adversarial review
53
+ save_mode: false # -s: Save outputs to .claude/output/apex/
54
+ test_mode: false # -t: Include test creation and runner steps
55
+ verify_mode: false # -v: Launch app and verify feature works via real user surface
56
+ economy_mode: false # -e: No subagents, save tokens (for limited plans)
57
+ branch_mode: false # -b: Verify not on main, create branch if needed
58
+ pr_mode: false # -pr: Create pull request at end (enables -b)
59
+ interactive_mode: false # -i: Configure flags interactively
60
+ tasks_mode: false # -k: Generate task breakdown after plan
61
+ teams_mode: false # -m: Use Claude Code Agent Teams for parallel execution
62
+
63
+ # Presets:
64
+ # Budget-friendly: economy_mode: true
65
+ # Full quality: examine_mode: true, save_mode: true, test_mode: true
66
+ # Autonomous: auto_mode: true, examine_mode: true, save_mode: true, test_mode: true
67
+ ```
68
+
69
+ **Flag Reference:** See `SKILL.md` for complete flag documentation and examples.
70
+
71
+ </defaults>
72
+
73
+ ---
74
+
75
+ ## EXECUTION SEQUENCE:
76
+
77
+ ### 1. Parse Flags and Input
78
+
79
+ **Step 1: Load defaults from config above**
80
+
81
+ ```
82
+ {auto_mode} = <default>
83
+ {examine_mode} = <default>
84
+ {save_mode} = <default>
85
+ {test_mode} = <default>
86
+ {verify_mode} = <default>
87
+ {economy_mode} = <default>
88
+ {branch_mode} = <default>
89
+ {pr_mode} = <default>
90
+ {interactive_mode} = <default>
91
+ {tasks_mode} = <default>
92
+ {teams_mode} = <default>
93
+ ```
94
+
95
+ **Step 2: Parse user input and override defaults:**
96
+
97
+ ```
98
+ Enable flags (lowercase - turn ON):
99
+ -a or --auto → {auto_mode} = true
100
+ -x or --examine → {examine_mode} = true
101
+ -s or --save → {save_mode} = true
102
+ -t or --test → {test_mode} = true
103
+ -v or --verify → {verify_mode} = true
104
+ -e or --economy → {economy_mode} = true
105
+
106
+ Disable flags (UPPERCASE - turn OFF):
107
+ -A or --no-auto → {auto_mode} = false
108
+ -X or --no-examine → {examine_mode} = false
109
+ -S or --no-save → {save_mode} = false
110
+ -T or --no-test → {test_mode} = false
111
+ -V or --no-verify → {verify_mode} = false
112
+ -E or --no-economy → {economy_mode} = false
113
+ -B or --no-branch → {branch_mode} = false
114
+ -PR or --no-pull-request → {pr_mode} = false
115
+ -K or --no-tasks → {tasks_mode} = false
116
+ -M or --no-teams → {teams_mode} = false
117
+
118
+ Tasks mode:
119
+ -k or --tasks → {tasks_mode} = true
120
+
121
+ Teams mode:
122
+ -m or --teams → {teams_mode} = true, {tasks_mode} = true
123
+
124
+ Branch/PR flags:
125
+ -b or --branch → {branch_mode} = true
126
+ -pr or --pull-request → {pr_mode} = true, {branch_mode} = true
127
+
128
+ Interactive:
129
+ -i or --interactive → {interactive_mode} = true
130
+
131
+ Other:
132
+ -r or --resume → {resume_task} = <next argument>
133
+ Remainder → {task_description}
134
+ ```
135
+
136
+ **Step 3: Generate feature_name and task_id:**
137
+
138
+ ```
139
+ {feature_name} = kebab-case-description (without number prefix)
140
+
141
+ Example: "add user authentication" → "add-user-authentication"
142
+
143
+ {task_id} will be generated by the setup script:
144
+ - Script auto-detects next available number in .claude/output/apex/
145
+ - Result: "01-add-user-authentication" (or 02, 03, etc.)
146
+ ```
147
+
148
+ ### 2. Check Resume Mode
149
+
150
+ <critical>
151
+ ONLY execute this section if {resume_task} is set!
152
+ If {resume_task} is NOT set, skip directly to step 3.
153
+ </critical>
154
+
155
+ **If `{resume_task}` is set:**
156
+
157
+ 1. **Search for matching task:**
158
+
159
+ ```bash
160
+ ls .claude/output/apex/ | grep "^{resume_task}"
161
+ ```
162
+
163
+ 2. **If exact match found:**
164
+ - Read `00-context.md` to restore state variables
165
+ - Scan step files to find last completed step (check for completion marker)
166
+ - Load next incomplete step
167
+ - **STOP** - do not continue with fresh init
168
+
169
+ 3. **If partial match (e.g., `-r 01`):**
170
+ - If single match: use it
171
+ - If multiple matches: list them and ask user to specify
172
+
173
+ 4. **If no match found:**
174
+ - List available tasks
175
+ - Ask user to provide correct ID
176
+
177
+ **If {resume_task} is NOT set:** → Skip directly to step 3
178
+
179
+ ### 3. Run Optional Sub-Steps
180
+
181
+ **Load sub-steps in order (if flags enabled):**
182
+
183
+ ```
184
+ IF {interactive_mode} = true:
185
+ → Load steps/step-00b-interactive.md
186
+ → User configures flags interactively
187
+ → Return here with updated flags
188
+
189
+ IF {branch_mode} = true:
190
+ → Load steps/step-00b-branch.md
191
+ → Verify/create branch
192
+ → Return here with {branch_name} set
193
+
194
+ IF {economy_mode} = true:
195
+ → Load steps/step-00b-economy.md
196
+ → Apply economy overrides
197
+
198
+ IF {save_mode} = true:
199
+ → Load steps/step-00b-save.md
200
+ → Create output structure, generate {task_id} and {output_dir}
201
+ → Return here with {task_id} and {output_dir} set
202
+ ```
203
+
204
+ ### 4. Initialize and Proceed
205
+
206
+ **Always (regardless of auto_mode):**
207
+
208
+ Show COMPACT initialization summary (one table, then proceed immediately):
209
+
210
+ ```
211
+ ✓ APEX: {task_description}
212
+
213
+ | Variable | Value |
214
+ |----------|-------|
215
+ | `{task_id}` | 01-kebab-name |
216
+ | `{auto_mode}` | true/false |
217
+ | `{examine_mode}` | true/false |
218
+ | `{save_mode}` | true/false |
219
+ | `{test_mode}` | true/false |
220
+ | `{verify_mode}` | true/false |
221
+ | `{economy_mode}` | true/false |
222
+ | `{branch_mode}` | true/false |
223
+ | `{pr_mode}` | true/false |
224
+ | `{tasks_mode}` | true/false |
225
+ | `{teams_mode}` | true/false |
226
+
227
+ → Analyzing...
228
+ ```
229
+
230
+ <critical>
231
+ KEEP OUTPUT MINIMAL:
232
+ - One line header with task
233
+ - One table with ALL variables (use brackets to show they're available)
234
+ - One line "→ Analyzing..." then IMMEDIATELY load step-01
235
+ - NO verbose explanations, NO parsing logs, NO separators
236
+ </critical>
237
+
238
+ **Then proceed directly to step-01-analyze.md**
239
+
240
+ ---
241
+
242
+ ## SUCCESS METRICS:
243
+
244
+ ✅ All flags correctly parsed (enable AND disable)
245
+ ✅ Output is COMPACT (one table, no verbose logs)
246
+ ✅ Variables shown with `{brackets}` notation
247
+ ✅ Proceeded to step-01 immediately after table
248
+ ✅ Output folder created with 00-context.md (if save_mode)
249
+
250
+ ## FAILURE MODES:
251
+
252
+ ❌ Verbose output with separators and explanations
253
+ ❌ Showing parsing steps/logs to user
254
+ ❌ Not using `{variable}` bracket notation
255
+ ❌ Not proceeding immediately after summary
256
+ ❌ **CRITICAL**: Blocking workflow with unnecessary confirmations
257
+
258
+ ## INITIALIZATION PROTOCOLS:
259
+
260
+ - Parse ALL flags before any other action
261
+ - Check resume BEFORE creating new output folder
262
+ - Verify branch BEFORE creating output structure (if branch_mode)
263
+ - Create output structure BEFORE confirming start
264
+ - Load economy overrides BEFORE proceeding to step-01
265
+
266
+ ---
267
+
268
+ ## NEXT STEP:
269
+
270
+ After showing initialization summary, always proceed directly to `./step-01-analyze.md`
271
+
272
+ <critical>
273
+ Remember:
274
+ - Step-00 is an INITIALIZER, not a GATEKEEPER
275
+ - Output MUST be compact: one table, no verbose logs
276
+ - Use `{variable}` notation to show available state
277
+ - Proceed immediately - never block!
278
+ </critical>
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: step-00b-branch
3
+ description: Verify and setup git branch for APEX workflow
4
+ returns_to: step-00-init.md
5
+ ---
6
+
7
+ # Step 0b: Branch Setup
8
+
9
+ ## MANDATORY EXECUTION RULES (READ FIRST):
10
+
11
+ - 🛑 NEVER commit directly to main/master when branch_mode enabled
12
+ - 🛑 NEVER skip branch verification
13
+ - ✅ ALWAYS check current branch first
14
+ - ✅ ALWAYS store {branch_name} before returning
15
+ - 📋 YOU ARE A BRANCH MANAGER, not an implementer
16
+ - 💬 FOCUS on branch setup only
17
+ - 🚫 FORBIDDEN to start any implementation work
18
+
19
+ ## CONTEXT BOUNDARIES:
20
+
21
+ - Variables available: `{task_id}`, `{auto_mode}`, `{pr_mode}`
22
+ - This sub-step sets: `{branch_name}`
23
+ - Return to step-00-init.md after completion
24
+
25
+ ## YOUR TASK:
26
+
27
+ Verify the current git branch and create a feature branch if on main/master.
28
+
29
+ ---
30
+
31
+ ## EXECUTION SEQUENCE:
32
+
33
+ ### 1. Check Current Branch
34
+
35
+ ```bash
36
+ git branch --show-current
37
+ ```
38
+
39
+ Store result as `{current_branch}`
40
+
41
+ ### 2. Evaluate Branch Status
42
+
43
+ **If `{current_branch}` is `main` or `master`:**
44
+ → Go to step 3 (Create Branch)
45
+
46
+ **If `{current_branch}` is NOT main/master:**
47
+ → Store `{branch_name}` = `{current_branch}`
48
+ → Display: "✓ Already on branch: {branch_name}"
49
+ → Return to step-00-init.md
50
+
51
+ ### 3. Create Feature Branch
52
+
53
+ **If `{auto_mode}` = true:**
54
+ → Auto-create branch: `feat/{task_id}`
55
+
56
+ **If `{auto_mode}` = false:**
57
+ Use AskUserQuestion:
58
+ ```yaml
59
+ questions:
60
+ - header: "Branch"
61
+ question: "You're on {current_branch}. Create a new branch for this task?"
62
+ options:
63
+ - label: "Create feat/{task_id} (Recommended)"
64
+ description: "Create new feature branch and switch to it"
65
+ - label: "Custom branch name"
66
+ description: "I'll specify a custom branch name"
67
+ - label: "Stay on {current_branch}"
68
+ description: "Continue without creating a branch (not recommended for PRs)"
69
+ multiSelect: false
70
+ ```
71
+
72
+ ### 4. Execute Branch Creation
73
+
74
+ **If user chose "Create feat/{task_id}" or auto_mode:**
75
+ ```bash
76
+ git checkout -b feat/{task_id}
77
+ ```
78
+ → `{branch_name}` = `feat/{task_id}`
79
+
80
+ **If user chose "Custom branch name":**
81
+ → Ask for branch name
82
+ ```bash
83
+ git checkout -b {custom_name}
84
+ ```
85
+ → `{branch_name}` = `{custom_name}`
86
+
87
+ **If user chose "Stay on {current_branch}":**
88
+ → `{branch_name}` = `{current_branch}`
89
+ → Display warning if `{pr_mode}` = true:
90
+ "⚠️ Warning: Creating PR from {current_branch} directly"
91
+
92
+ ### 5. Confirm and Return
93
+
94
+ Display:
95
+ ```
96
+ ✓ Branch: {branch_name}
97
+ {if new branch created: "Created and switched to new branch"}
98
+ ```
99
+
100
+ → Return to step-00-init.md with `{branch_name}` set
101
+
102
+ ---
103
+
104
+ ## SUCCESS METRICS:
105
+
106
+ ✅ Current branch verified
107
+ ✅ Feature branch created if on main/master (unless user declined)
108
+ ✅ `{branch_name}` variable set
109
+ ✅ User warned if staying on main with PR mode
110
+
111
+ ## FAILURE MODES:
112
+
113
+ ❌ Starting implementation before returning
114
+ ❌ Not setting `{branch_name}` variable
115
+ ❌ Creating branch without user consent (when not auto_mode)
116
+ ❌ **CRITICAL**: Using plain text prompts instead of AskUserQuestion
117
+
118
+ ---
119
+
120
+ ## RETURN:
121
+
122
+ After branch setup complete, return to `./step-00-init.md` to continue initialization.
123
+
124
+ <critical>
125
+ Remember: This sub-step ONLY handles branch setup. Return immediately after setting {branch_name}.
126
+ </critical>
@@ -0,0 +1,247 @@
1
+ ---
2
+ name: step-00b-economy
3
+ description: Economy mode overrides - no subagents, direct tool usage to save tokens
4
+ load_condition: economy_mode = true
5
+ ---
6
+
7
+ # Economy Mode Overrides
8
+
9
+ **This file is ONLY loaded when `-e` or `--economy` flag is active.**
10
+
11
+ These instructions OVERRIDE the default behavior in all steps to save tokens by avoiding subagent launches.
12
+
13
+ ---
14
+
15
+ <why_economy_mode>
16
+ **Purpose:** Reduce token usage for users with limited Claude Code plans.
17
+
18
+ **Trade-offs:**
19
+ - ✅ Uses ~70% fewer tokens
20
+ - ✅ Faster execution (no agent overhead)
21
+ - ⚠️ Less thorough exploration
22
+ - ⚠️ No parallel research
23
+ - ⚠️ May miss some context
24
+
25
+ **When to use:**
26
+ - Limited monthly token budget
27
+ - Simple, well-defined tasks
28
+ - Familiar codebase
29
+ - Quick fixes or small features
30
+ </why_economy_mode>
31
+
32
+ ---
33
+
34
+ <override_rules>
35
+
36
+ ## CRITICAL: Apply These Overrides to ALL Steps
37
+
38
+ **When `{economy_mode}` = true, these rules OVERRIDE the default instructions:**
39
+
40
+ ---
41
+
42
+ ### Override 1: No Subagent Launches
43
+
44
+ **DEFAULT behavior (when economy_mode = false):**
45
+ ```
46
+ Launch parallel agents:
47
+ - Agent 1: explore-codebase
48
+ - Agent 2: explore-docs
49
+ - Agent 3: websearch
50
+ ```
51
+
52
+ **ECONOMY behavior (when economy_mode = true):**
53
+ ```
54
+ Use direct tools instead:
55
+ - Glob to find files
56
+ - Grep to search content
57
+ - Read to examine files
58
+ - find-docs only if current technical docs are necessary
59
+ - exa-search only if broader online research is necessary
60
+ ```
61
+
62
+ **NEVER launch sub-agents in economy mode.**
63
+
64
+ ---
65
+
66
+ ### Override 2: Direct Tool Usage Pattern
67
+
68
+ Instead of launching exploration agents, use this pattern:
69
+
70
+ ```
71
+ 1. Glob to find relevant files:
72
+ - Glob: "**/*auth*" or "**/*{keyword}*"
73
+ - Glob: "src/**/*.ts" for specific areas
74
+
75
+ 2. Grep to find specific code:
76
+ - Grep: "function login" or "class Auth"
77
+ - Grep: pattern in specific directory
78
+
79
+ 3. Read to examine found files:
80
+ - Read the most relevant 3-5 files
81
+ - Focus on files matching the task
82
+
83
+ 4. Online research ONLY if:
84
+ - Library documentation needed
85
+ - Unknown API or pattern
86
+ - Limit to 1-2 searches max
87
+ - Use /Users/melvynx/.agents/skills/find-docs/SKILL.md for technical docs
88
+ - Use /Users/melvynx/.agents/skills/exa-search/SKILL.md for broader web research
89
+ ```
90
+
91
+ ---
92
+
93
+ ### Override 3: Reduced Exploration Scope
94
+
95
+ **DEFAULT:** Explore comprehensively, find all related code
96
+ **ECONOMY:** Focus on most likely locations only
97
+
98
+ ```
99
+ Economy exploration strategy:
100
+ 1. Start with obvious paths (src/auth/, src/api/, etc.)
101
+ 2. Search for exact keywords from task
102
+ 3. Read only files directly related to task
103
+ 4. Skip "nice to have" context
104
+ 5. Stop exploring when you have enough to proceed
105
+ ```
106
+
107
+ ---
108
+
109
+ ### Override 4: Skip Optional Steps
110
+
111
+ **In economy mode, skip or minimize:**
112
+ - Extensive documentation research (use existing knowledge)
113
+ - Web searches for common patterns (use best practices you know)
114
+ - Multiple rounds of exploration (one round is enough)
115
+ - Deep pattern analysis (quick scan is sufficient)
116
+
117
+ **Always do:**
118
+ - Find the files to modify
119
+ - Understand existing patterns (quick read)
120
+ - Identify dependencies
121
+ - Create the plan
122
+
123
+ ---
124
+
125
+ ### Override 5: Leaner Validation
126
+
127
+ **DEFAULT:** Launch code-reviewer agent for adversarial review
128
+ **ECONOMY:** Self-review without subagent
129
+
130
+ ```
131
+ Economy validation:
132
+ 1. Run typecheck and lint (required)
133
+ 2. Run affected tests (required)
134
+ 3. Quick self-review checklist:
135
+ - [ ] No obvious bugs
136
+ - [ ] Follows existing patterns
137
+ - [ ] Error handling present
138
+ - [ ] No security issues
139
+ 4. Skip adversarial review agent
140
+ ```
141
+
142
+ ---
143
+
144
+ ### Override 6: Test Mode Adjustments
145
+
146
+ **If both `{economy_mode}` and `{test_mode}` are true:**
147
+
148
+ ```
149
+ Economy test strategy:
150
+ 1. Analyze tests with Glob + Grep (not explore-codebase agent)
151
+ 2. Read 1-2 similar test files for patterns
152
+ 3. Create essential tests only:
153
+ - 1 happy path test
154
+ - 1 error case test
155
+ - Skip edge cases unless critical
156
+ 4. Run tests directly (no agent)
157
+ ```
158
+
159
+ </override_rules>
160
+
161
+ ---
162
+
163
+ <step_specific_overrides>
164
+
165
+ ## Step-by-Step Economy Overrides
166
+
167
+ ### Step 01: Analyze (Economy)
168
+ ```
169
+ INSTEAD OF: 3 parallel exploration agents
170
+ DO:
171
+ 1. Glob "**/*{keyword}*" for task-related files
172
+ 2. Grep for specific patterns in src/
173
+ 3. Read top 3-5 most relevant files
174
+ 4. Skip online research unless stuck. If needed, use find-docs for technical docs and exa-search for broader web research.
175
+ ```
176
+
177
+ ### Step 02: Plan (Economy)
178
+ ```
179
+ Same as default - planning doesn't use agents
180
+ ```
181
+
182
+ ### Step 03: Execute (Economy)
183
+ ```
184
+ Same as default - execution doesn't use agents
185
+ ```
186
+
187
+ ### Step 04: Validate (Economy)
188
+ ```
189
+ INSTEAD OF: Comprehensive validation
190
+ DO:
191
+ 1. Run typecheck + lint
192
+ 2. Run only affected tests
193
+ 3. Quick manual review
194
+ 4. Skip coverage analysis
195
+ ```
196
+
197
+ ### Step 05: Examine (Economy)
198
+ ```
199
+ INSTEAD OF: code-reviewer agent
200
+ DO:
201
+ 1. Self-review with checklist:
202
+ - Security: no injection, no secrets
203
+ - Logic: handles errors, edge cases
204
+ - Quality: follows patterns, readable
205
+ 2. Note any concerns
206
+ 3. Move to resolve if issues found
207
+ ```
208
+
209
+ ### Step 07: Tests (Economy)
210
+ ```
211
+ INSTEAD OF: Deep test analysis with agents
212
+ DO:
213
+ 1. Glob for existing test files
214
+ 2. Read 1 similar test file
215
+ 3. Create minimal test coverage
216
+ 4. Focus on critical paths only
217
+ ```
218
+
219
+ ### Step 08: Run Tests (Economy)
220
+ ```
221
+ Same as default - test running doesn't use agents
222
+ ```
223
+
224
+ </step_specific_overrides>
225
+
226
+ ---
227
+
228
+ <economy_indicator>
229
+ **When economy mode is active, start each step with:**
230
+
231
+ ```
232
+ ⚡ ECONOMY MODE - Using direct tools, no subagents
233
+ ```
234
+
235
+ This reminds both Claude and the user that economy mode is active.
236
+ </economy_indicator>
237
+
238
+ ---
239
+
240
+ <success_metrics>
241
+ Economy mode is successful when:
242
+ - No sub-agent launches
243
+ - Direct Glob/Grep/Read usage instead
244
+ - Fewer than 3 WebSearch calls total
245
+ - Implementation still correct and working
246
+ - Tests pass (if test_mode enabled)
247
+ </success_metrics>