aiblueprint-cli 1.4.23 → 1.4.25

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 (108) hide show
  1. package/claude-code-config/skills/git-commit/SKILL.md +42 -0
  2. package/claude-code-config/{commands/git/create-pr.md → skills/git-create-pr/SKILL.md} +12 -18
  3. package/claude-code-config/skills/git-fix-pr-comments/SKILL.md +51 -0
  4. package/claude-code-config/skills/git-merge/SKILL.md +68 -0
  5. package/claude-code-config/skills/{claude-memory → meta-claude-memory}/SKILL.md +7 -2
  6. package/claude-code-config/skills/meta-claude-memory/references/rules-directory-guide.md +298 -0
  7. package/claude-code-config/skills/meta-prompt-creator/SKILL.md +285 -0
  8. package/claude-code-config/skills/meta-prompt-creator/references/anthropic-best-practices.md +126 -0
  9. package/claude-code-config/skills/meta-prompt-creator/references/anti-patterns.md +57 -0
  10. package/claude-code-config/skills/meta-prompt-creator/references/clarity-principles.md +54 -0
  11. package/claude-code-config/skills/meta-prompt-creator/references/context-management.md +389 -0
  12. package/claude-code-config/skills/meta-prompt-creator/references/few-shot-patterns.md +47 -0
  13. package/claude-code-config/skills/meta-prompt-creator/references/openai-best-practices.md +50 -0
  14. package/claude-code-config/skills/meta-prompt-creator/references/prompt-templates.md +110 -0
  15. package/claude-code-config/skills/meta-prompt-creator/references/reasoning-techniques.md +52 -0
  16. package/claude-code-config/skills/meta-prompt-creator/references/system-prompt-patterns.md +48 -0
  17. package/claude-code-config/skills/meta-prompt-creator/references/xml-structure.md +36 -0
  18. package/claude-code-config/skills/meta-skill-creator/LICENSE.txt +202 -0
  19. package/claude-code-config/skills/meta-skill-creator/SKILL.md +421 -0
  20. package/claude-code-config/skills/meta-skill-creator/package.json +5 -0
  21. package/claude-code-config/skills/meta-skill-creator/references/output-patterns.md +82 -0
  22. package/claude-code-config/skills/meta-skill-creator/references/progressive-disclosure-patterns.md +374 -0
  23. package/claude-code-config/skills/meta-skill-creator/references/prompting-integration.md +363 -0
  24. package/claude-code-config/skills/meta-skill-creator/references/real-world-examples.md +513 -0
  25. package/claude-code-config/skills/meta-skill-creator/references/script-patterns.md +385 -0
  26. package/claude-code-config/skills/meta-skill-creator/references/workflows.md +28 -0
  27. package/claude-code-config/skills/meta-skill-creator/references/xml-tag-guide.md +606 -0
  28. package/claude-code-config/skills/meta-skill-creator/scripts/init-skill.ts +214 -0
  29. package/claude-code-config/skills/meta-skill-creator/scripts/package-skill.ts +146 -0
  30. package/claude-code-config/skills/meta-skill-creator/scripts/validate.ts +138 -0
  31. package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/SKILL.md +41 -15
  32. package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-00-init.md +2 -3
  33. package/claude-code-config/skills/utils-fix-errors/SKILL.md +61 -0
  34. package/claude-code-config/skills/utils-fix-grammar/SKILL.md +59 -0
  35. package/claude-code-config/skills/utils-oneshot/SKILL.md +56 -0
  36. package/claude-code-config/skills/workflow-apex/SKILL.md +303 -0
  37. package/claude-code-config/skills/workflow-apex/scripts/setup-templates.sh +134 -0
  38. package/claude-code-config/skills/workflow-apex/scripts/update-progress.sh +80 -0
  39. package/claude-code-config/skills/workflow-apex/steps/step-00-init.md +288 -0
  40. package/claude-code-config/skills/workflow-apex/steps/step-00b-branch.md +126 -0
  41. package/claude-code-config/skills/workflow-apex/steps/step-00b-economy.md +244 -0
  42. package/claude-code-config/skills/workflow-apex/steps/step-00b-interactive.md +153 -0
  43. package/claude-code-config/skills/workflow-apex/steps/step-01-analyze.md +361 -0
  44. package/claude-code-config/skills/workflow-apex/steps/step-02-plan.md +264 -0
  45. package/claude-code-config/skills/workflow-apex/steps/step-03-execute.md +239 -0
  46. package/claude-code-config/skills/workflow-apex/steps/step-04-validate.md +264 -0
  47. package/claude-code-config/skills/workflow-apex/steps/step-05-examine.md +294 -0
  48. package/claude-code-config/skills/workflow-apex/steps/step-06-resolve.md +237 -0
  49. package/claude-code-config/skills/workflow-apex/steps/step-07-tests.md +250 -0
  50. package/claude-code-config/skills/workflow-apex/steps/step-08-run-tests.md +308 -0
  51. package/claude-code-config/skills/workflow-apex/steps/step-09-finish.md +193 -0
  52. package/claude-code-config/skills/workflow-apex/templates/00-context.md +51 -0
  53. package/claude-code-config/skills/workflow-apex/templates/01-analyze.md +10 -0
  54. package/claude-code-config/skills/workflow-apex/templates/02-plan.md +10 -0
  55. package/claude-code-config/skills/workflow-apex/templates/03-execute.md +10 -0
  56. package/claude-code-config/skills/workflow-apex/templates/04-validate.md +10 -0
  57. package/claude-code-config/skills/workflow-apex/templates/05-examine.md +10 -0
  58. package/claude-code-config/skills/workflow-apex/templates/06-resolve.md +10 -0
  59. package/claude-code-config/skills/workflow-apex/templates/07-tests.md +10 -0
  60. package/claude-code-config/skills/workflow-apex/templates/08-run-tests.md +10 -0
  61. package/claude-code-config/skills/workflow-apex/templates/09-finish.md +10 -0
  62. package/claude-code-config/skills/workflow-apex/templates/README.md +195 -0
  63. package/claude-code-config/skills/workflow-apex/templates/step-complete.md +7 -0
  64. package/claude-code-config/skills/workflow-apex-free/SKILL.md +261 -0
  65. package/claude-code-config/skills/workflow-apex-free/scripts/setup-templates.sh +100 -0
  66. package/claude-code-config/skills/workflow-apex-free/scripts/update-progress.sh +80 -0
  67. package/claude-code-config/skills/workflow-apex-free/steps/step-00-init.md +267 -0
  68. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-branch.md +126 -0
  69. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-economy.md +244 -0
  70. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-interactive.md +153 -0
  71. package/claude-code-config/skills/workflow-apex-free/steps/step-01-analyze.md +361 -0
  72. package/claude-code-config/skills/workflow-apex-free/steps/step-02-plan.md +264 -0
  73. package/claude-code-config/skills/workflow-apex-free/steps/step-03-execute.md +239 -0
  74. package/claude-code-config/skills/workflow-apex-free/steps/step-04-validate.md +251 -0
  75. package/claude-code-config/skills/workflow-apex-free/templates/00-context.md +43 -0
  76. package/claude-code-config/skills/workflow-apex-free/templates/01-analyze.md +10 -0
  77. package/claude-code-config/skills/workflow-apex-free/templates/02-plan.md +10 -0
  78. package/claude-code-config/skills/workflow-apex-free/templates/03-execute.md +10 -0
  79. package/claude-code-config/skills/workflow-apex-free/templates/04-validate.md +10 -0
  80. package/claude-code-config/skills/workflow-apex-free/templates/README.md +176 -0
  81. package/claude-code-config/skills/workflow-apex-free/templates/step-complete.md +7 -0
  82. package/dist/cli.js +146 -9
  83. package/package.json +1 -1
  84. package/claude-code-config/commands/explore.md +0 -90
  85. package/claude-code-config/commands/git/commit.md +0 -60
  86. package/claude-code-config/commands/git/fix-pr-comments.md +0 -59
  87. package/claude-code-config/commands/oneshot.md +0 -57
  88. package/claude-code-config/skills/create-slash-commands/SKILL.md +0 -1110
  89. package/claude-code-config/skills/create-slash-commands/references/arguments.md +0 -273
  90. package/claude-code-config/skills/create-slash-commands/references/patterns.md +0 -947
  91. package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +0 -656
  92. package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +0 -389
  93. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/comprehensive-example.md +0 -0
  94. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/project-patterns.md +0 -0
  95. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/prompting-techniques.md +0 -0
  96. /package/claude-code-config/skills/{claude-memory → meta-claude-memory}/references/section-templates.md +0 -0
  97. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/context-management.md +0 -0
  98. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/debugging-agents.md +0 -0
  99. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/error-handling-and-recovery.md +0 -0
  100. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/evaluation-and-testing.md +0 -0
  101. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/orchestration-patterns.md +0 -0
  102. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/subagents.md +0 -0
  103. /package/claude-code-config/skills/{create-subagents → meta-subagent-creator}/references/writing-subagent-prompts.md +0 -0
  104. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/SKILL.md +0 -0
  105. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/scripts/setup.sh +0 -0
  106. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-01-interactive-prd.md +0 -0
  107. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-02-create-stories.md +0 -0
  108. /package/claude-code-config/skills/{setup-ralph → ralph-loop}/steps/step-03-finish.md +0 -0
@@ -0,0 +1,288 @@
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
+ economy_mode: false # -e: No subagents, save tokens (for limited plans)
56
+ branch_mode: false # -b: Verify not on main, create branch if needed
57
+ pr_mode: false # -pr: Create pull request at end (enables -b)
58
+ interactive_mode: false # -i: Configure flags interactively
59
+
60
+ # Presets:
61
+ # Budget-friendly: economy_mode: true
62
+ # Full quality: examine_mode: true, save_mode: true, test_mode: true
63
+ # Autonomous: auto_mode: true, examine_mode: true, save_mode: true, test_mode: true
64
+ ```
65
+
66
+ **Flag Reference:** See `SKILL.md` for complete flag documentation and examples.
67
+
68
+ </defaults>
69
+
70
+ ---
71
+
72
+ ## EXECUTION SEQUENCE:
73
+
74
+ ### 1. Parse Flags and Input
75
+
76
+ **Step 1: Load defaults from config above**
77
+
78
+ ```
79
+ {auto_mode} = <default>
80
+ {examine_mode} = <default>
81
+ {save_mode} = <default>
82
+ {test_mode} = <default>
83
+ {economy_mode} = <default>
84
+ {branch_mode} = <default>
85
+ {pr_mode} = <default>
86
+ {interactive_mode} = <default>
87
+ ```
88
+
89
+ **Step 2: Parse user input and override defaults:**
90
+
91
+ ```
92
+ Enable flags (lowercase - turn ON):
93
+ -a or --auto → {auto_mode} = true
94
+ -x or --examine → {examine_mode} = true
95
+ -s or --save → {save_mode} = true
96
+ -t or --test → {test_mode} = true
97
+ -e or --economy → {economy_mode} = true
98
+
99
+ Disable flags (UPPERCASE - turn OFF):
100
+ -A or --no-auto → {auto_mode} = false
101
+ -X or --no-examine → {examine_mode} = false
102
+ -S or --no-save → {save_mode} = false
103
+ -T or --no-test → {test_mode} = false
104
+ -E or --no-economy → {economy_mode} = false
105
+ -B or --no-branch → {branch_mode} = false
106
+ -PR or --no-pull-request → {pr_mode} = false
107
+
108
+ Branch/PR flags:
109
+ -b or --branch → {branch_mode} = true
110
+ -pr or --pull-request → {pr_mode} = true, {branch_mode} = true
111
+
112
+ Interactive:
113
+ -i or --interactive → {interactive_mode} = true
114
+
115
+ Other:
116
+ -r or --resume → {resume_task} = <next argument>
117
+ Remainder → {task_description}
118
+ ```
119
+
120
+ **Step 3: Generate feature_name and task_id:**
121
+
122
+ ```
123
+ {feature_name} = kebab-case-description (without number prefix)
124
+
125
+ Example: "add user authentication" → "add-user-authentication"
126
+
127
+ {task_id} will be generated by the setup script:
128
+ - Script auto-detects next available number in .claude/output/apex/
129
+ - Result: "01-add-user-authentication" (or 02, 03, etc.)
130
+ ```
131
+
132
+ ### 2. Check Resume Mode
133
+
134
+ <critical>
135
+ ONLY execute this section if {resume_task} is set!
136
+ If {resume_task} is NOT set, skip directly to step 3.
137
+ </critical>
138
+
139
+ **If `{resume_task}` is set:**
140
+
141
+ 1. **Search for matching task:**
142
+
143
+ ```bash
144
+ ls .claude/output/apex/ | grep "^{resume_task}"
145
+ ```
146
+
147
+ 2. **If exact match found:**
148
+ - Read `00-context.md` to restore state variables
149
+ - Scan step files to find last completed step (check for completion marker)
150
+ - Load next incomplete step
151
+ - **STOP** - do not continue with fresh init
152
+
153
+ 3. **If partial match (e.g., `-r 01`):**
154
+ - If single match: use it
155
+ - If multiple matches: list them and ask user to specify
156
+
157
+ 4. **If no match found:**
158
+ - List available tasks
159
+ - Ask user to provide correct ID
160
+
161
+ **If {resume_task} is NOT set:** → Skip directly to step 3
162
+
163
+ ### 3. Run Optional Sub-Steps
164
+
165
+ **Load sub-steps in order (if flags enabled):**
166
+
167
+ ```
168
+ IF {interactive_mode} = true:
169
+ → Load steps/step-00b-interactive.md
170
+ → User configures flags interactively
171
+ → Return here with updated flags
172
+
173
+ IF {branch_mode} = true:
174
+ → Load steps/step-00b-branch.md
175
+ → Verify/create branch
176
+ → Return here with {branch_name} set
177
+
178
+ IF {economy_mode} = true:
179
+ → Load steps/step-00b-economy.md
180
+ → Apply economy overrides
181
+ ```
182
+
183
+ ### 4. Create Output Structure (if save_mode)
184
+
185
+ **If `{save_mode}` = true:**
186
+
187
+ Run the template setup script to initialize all output files:
188
+
189
+ ```bash
190
+ bash {skill_dir}/scripts/setup-templates.sh \
191
+ "{feature_name}" \
192
+ "{task_description}" \
193
+ "{auto_mode}" \
194
+ "{examine_mode}" \
195
+ "{save_mode}" \
196
+ "{test_mode}" \
197
+ "{economy_mode}" \
198
+ "{branch_mode}" \
199
+ "{pr_mode}" \
200
+ "{interactive_mode}" \
201
+ "{branch_name}" \
202
+ "{original_input}"
203
+ ```
204
+
205
+ **Note:** Pass `{feature_name}` (without number prefix), NOT `{task_id}`.
206
+ The script auto-detects the next available number from existing folders.
207
+
208
+ This script:
209
+
210
+ - Auto-generates `{task_id}` = `NN-{feature_name}` (next available number)
211
+ - Creates `.claude/output/apex/{task_id}/` directory
212
+ - Initializes `00-context.md` with configuration and progress table
213
+ - Pre-creates all step files from templates (01-analyze.md, 02-plan.md, etc.)
214
+ - Only creates files for enabled steps (examine, tests, PR)
215
+ - Outputs the generated `{task_id}` for use in subsequent steps
216
+
217
+ ### 5. Initialize and Proceed
218
+
219
+ **Always (regardless of auto_mode):**
220
+
221
+ Show COMPACT initialization summary (one table, then proceed immediately):
222
+
223
+ ```
224
+ ✓ APEX: {task_description}
225
+
226
+ | Variable | Value |
227
+ |----------|-------|
228
+ | `{task_id}` | 01-kebab-name |
229
+ | `{auto_mode}` | true/false |
230
+ | `{examine_mode}` | true/false |
231
+ | `{save_mode}` | true/false |
232
+ | `{test_mode}` | true/false |
233
+ | `{economy_mode}` | true/false |
234
+ | `{branch_mode}` | true/false |
235
+ | `{pr_mode}` | true/false |
236
+
237
+ → Analyzing...
238
+ ```
239
+
240
+ <critical>
241
+ KEEP OUTPUT MINIMAL:
242
+ - One line header with task
243
+ - One table with ALL variables (use brackets to show they're available)
244
+ - One line "→ Analyzing..." then IMMEDIATELY load step-01
245
+ - NO verbose explanations, NO parsing logs, NO separators
246
+ </critical>
247
+
248
+ **Then proceed directly to step-01-analyze.md**
249
+
250
+ ---
251
+
252
+ ## SUCCESS METRICS:
253
+
254
+ ✅ All flags correctly parsed (enable AND disable)
255
+ ✅ Output is COMPACT (one table, no verbose logs)
256
+ ✅ Variables shown with `{brackets}` notation
257
+ ✅ Proceeded to step-01 immediately after table
258
+ ✅ Output folder created with 00-context.md (if save_mode)
259
+
260
+ ## FAILURE MODES:
261
+
262
+ ❌ Verbose output with separators and explanations
263
+ ❌ Showing parsing steps/logs to user
264
+ ❌ Not using `{variable}` bracket notation
265
+ ❌ Not proceeding immediately after summary
266
+ ❌ **CRITICAL**: Blocking workflow with unnecessary confirmations
267
+
268
+ ## INITIALIZATION PROTOCOLS:
269
+
270
+ - Parse ALL flags before any other action
271
+ - Check resume BEFORE creating new output folder
272
+ - Verify branch BEFORE creating output structure (if branch_mode)
273
+ - Create output structure BEFORE confirming start
274
+ - Load economy overrides BEFORE proceeding to step-01
275
+
276
+ ---
277
+
278
+ ## NEXT STEP:
279
+
280
+ After showing initialization summary, always proceed directly to `./step-01-analyze.md`
281
+
282
+ <critical>
283
+ Remember:
284
+ - Step-00 is an INITIALIZER, not a GATEKEEPER
285
+ - Output MUST be compact: one table, no verbose logs
286
+ - Use `{variable}` notation to show available state
287
+ - Proceed immediately - never block!
288
+ </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,244 @@
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
+ - WebSearch only if absolutely necessary
59
+ ```
60
+
61
+ **NEVER use Task tool with subagent_type in economy mode.**
62
+
63
+ ---
64
+
65
+ ### Override 2: Direct Tool Usage Pattern
66
+
67
+ Instead of launching exploration agents, use this pattern:
68
+
69
+ ```
70
+ 1. Glob to find relevant files:
71
+ - Glob: "**/*auth*" or "**/*{keyword}*"
72
+ - Glob: "src/**/*.ts" for specific areas
73
+
74
+ 2. Grep to find specific code:
75
+ - Grep: "function login" or "class Auth"
76
+ - Grep: pattern in specific directory
77
+
78
+ 3. Read to examine found files:
79
+ - Read the most relevant 3-5 files
80
+ - Focus on files matching the task
81
+
82
+ 4. WebSearch ONLY if:
83
+ - Library documentation needed
84
+ - Unknown API or pattern
85
+ - Limit to 1-2 searches max
86
+ ```
87
+
88
+ ---
89
+
90
+ ### Override 3: Reduced Exploration Scope
91
+
92
+ **DEFAULT:** Explore comprehensively, find all related code
93
+ **ECONOMY:** Focus on most likely locations only
94
+
95
+ ```
96
+ Economy exploration strategy:
97
+ 1. Start with obvious paths (src/auth/, src/api/, etc.)
98
+ 2. Search for exact keywords from task
99
+ 3. Read only files directly related to task
100
+ 4. Skip "nice to have" context
101
+ 5. Stop exploring when you have enough to proceed
102
+ ```
103
+
104
+ ---
105
+
106
+ ### Override 4: Skip Optional Steps
107
+
108
+ **In economy mode, skip or minimize:**
109
+ - Extensive documentation research (use existing knowledge)
110
+ - Web searches for common patterns (use best practices you know)
111
+ - Multiple rounds of exploration (one round is enough)
112
+ - Deep pattern analysis (quick scan is sufficient)
113
+
114
+ **Always do:**
115
+ - Find the files to modify
116
+ - Understand existing patterns (quick read)
117
+ - Identify dependencies
118
+ - Create the plan
119
+
120
+ ---
121
+
122
+ ### Override 5: Leaner Validation
123
+
124
+ **DEFAULT:** Launch code-reviewer agent for adversarial review
125
+ **ECONOMY:** Self-review without subagent
126
+
127
+ ```
128
+ Economy validation:
129
+ 1. Run typecheck and lint (required)
130
+ 2. Run affected tests (required)
131
+ 3. Quick self-review checklist:
132
+ - [ ] No obvious bugs
133
+ - [ ] Follows existing patterns
134
+ - [ ] Error handling present
135
+ - [ ] No security issues
136
+ 4. Skip adversarial review agent
137
+ ```
138
+
139
+ ---
140
+
141
+ ### Override 6: Test Mode Adjustments
142
+
143
+ **If both `{economy_mode}` and `{test_mode}` are true:**
144
+
145
+ ```
146
+ Economy test strategy:
147
+ 1. Analyze tests with Glob + Grep (not explore-codebase agent)
148
+ 2. Read 1-2 similar test files for patterns
149
+ 3. Create essential tests only:
150
+ - 1 happy path test
151
+ - 1 error case test
152
+ - Skip edge cases unless critical
153
+ 4. Run tests directly (no agent)
154
+ ```
155
+
156
+ </override_rules>
157
+
158
+ ---
159
+
160
+ <step_specific_overrides>
161
+
162
+ ## Step-by-Step Economy Overrides
163
+
164
+ ### Step 01: Analyze (Economy)
165
+ ```
166
+ INSTEAD OF: 3 parallel exploration agents
167
+ DO:
168
+ 1. Glob "**/*{keyword}*" for task-related files
169
+ 2. Grep for specific patterns in src/
170
+ 3. Read top 3-5 most relevant files
171
+ 4. Skip web research unless stuck
172
+ ```
173
+
174
+ ### Step 02: Plan (Economy)
175
+ ```
176
+ Same as default - planning doesn't use agents
177
+ ```
178
+
179
+ ### Step 03: Execute (Economy)
180
+ ```
181
+ Same as default - execution doesn't use agents
182
+ ```
183
+
184
+ ### Step 04: Validate (Economy)
185
+ ```
186
+ INSTEAD OF: Comprehensive validation
187
+ DO:
188
+ 1. Run typecheck + lint
189
+ 2. Run only affected tests
190
+ 3. Quick manual review
191
+ 4. Skip coverage analysis
192
+ ```
193
+
194
+ ### Step 05: Examine (Economy)
195
+ ```
196
+ INSTEAD OF: code-reviewer agent
197
+ DO:
198
+ 1. Self-review with checklist:
199
+ - Security: no injection, no secrets
200
+ - Logic: handles errors, edge cases
201
+ - Quality: follows patterns, readable
202
+ 2. Note any concerns
203
+ 3. Move to resolve if issues found
204
+ ```
205
+
206
+ ### Step 07: Tests (Economy)
207
+ ```
208
+ INSTEAD OF: Deep test analysis with agents
209
+ DO:
210
+ 1. Glob for existing test files
211
+ 2. Read 1 similar test file
212
+ 3. Create minimal test coverage
213
+ 4. Focus on critical paths only
214
+ ```
215
+
216
+ ### Step 08: Run Tests (Economy)
217
+ ```
218
+ Same as default - test running doesn't use agents
219
+ ```
220
+
221
+ </step_specific_overrides>
222
+
223
+ ---
224
+
225
+ <economy_indicator>
226
+ **When economy mode is active, start each step with:**
227
+
228
+ ```
229
+ ⚡ ECONOMY MODE - Using direct tools, no subagents
230
+ ```
231
+
232
+ This reminds both Claude and the user that economy mode is active.
233
+ </economy_indicator>
234
+
235
+ ---
236
+
237
+ <success_metrics>
238
+ Economy mode is successful when:
239
+ - No Task tool calls with subagent_type
240
+ - Direct Glob/Grep/Read usage instead
241
+ - Fewer than 3 WebSearch calls total
242
+ - Implementation still correct and working
243
+ - Tests pass (if test_mode enabled)
244
+ </success_metrics>