aiblueprint-cli 1.4.24 → 1.4.26

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 (20) hide show
  1. package/claude-code-config/skills/workflow-apex-free/SKILL.md +261 -0
  2. package/claude-code-config/skills/workflow-apex-free/scripts/setup-templates.sh +100 -0
  3. package/claude-code-config/skills/workflow-apex-free/scripts/update-progress.sh +80 -0
  4. package/claude-code-config/skills/workflow-apex-free/steps/step-00-init.md +267 -0
  5. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-branch.md +126 -0
  6. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-economy.md +244 -0
  7. package/claude-code-config/skills/workflow-apex-free/steps/step-00b-interactive.md +153 -0
  8. package/claude-code-config/skills/workflow-apex-free/steps/step-01-analyze.md +361 -0
  9. package/claude-code-config/skills/workflow-apex-free/steps/step-02-plan.md +264 -0
  10. package/claude-code-config/skills/workflow-apex-free/steps/step-03-execute.md +239 -0
  11. package/claude-code-config/skills/workflow-apex-free/steps/step-04-validate.md +251 -0
  12. package/claude-code-config/skills/workflow-apex-free/templates/00-context.md +43 -0
  13. package/claude-code-config/skills/workflow-apex-free/templates/01-analyze.md +10 -0
  14. package/claude-code-config/skills/workflow-apex-free/templates/02-plan.md +10 -0
  15. package/claude-code-config/skills/workflow-apex-free/templates/03-execute.md +10 -0
  16. package/claude-code-config/skills/workflow-apex-free/templates/04-validate.md +10 -0
  17. package/claude-code-config/skills/workflow-apex-free/templates/README.md +176 -0
  18. package/claude-code-config/skills/workflow-apex-free/templates/step-complete.md +7 -0
  19. package/dist/cli.js +179 -37
  20. package/package.json +1 -1
@@ -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>
@@ -0,0 +1,153 @@
1
+ ---
2
+ name: step-00b-interactive
3
+ description: Interactively configure APEX workflow flags
4
+ returns_to: step-00-init.md
5
+ ---
6
+
7
+ # Step 0b: Interactive Configuration
8
+
9
+ ## MANDATORY EXECUTION RULES (READ FIRST):
10
+
11
+ - 🛑 NEVER skip the interactive menu
12
+ - 🛑 NEVER assume user preferences
13
+ - ✅ ALWAYS use AskUserQuestion for flag selection
14
+ - ✅ ALWAYS update all flag variables before returning
15
+ - 📋 YOU ARE A CONFIGURATOR, not an implementer
16
+ - 💬 FOCUS on flag configuration only
17
+ - 🚫 FORBIDDEN to start any workflow steps
18
+
19
+ ## CONTEXT BOUNDARIES:
20
+
21
+ - Variables available: All current flag values from step-00-init
22
+ - This sub-step updates: All flag variables based on user selection
23
+ - Return to step-00-init.md after completion
24
+
25
+ ## YOUR TASK:
26
+
27
+ Present an interactive menu for the user to enable/disable workflow flags.
28
+
29
+ ---
30
+
31
+ ## EXECUTION SEQUENCE:
32
+
33
+ ### 1. Display Current Configuration
34
+
35
+ Show current flag values:
36
+ ```
37
+ **Current APEX Configuration:**
38
+
39
+ | Flag | Status | Description |
40
+ |------|--------|-------------|
41
+ | Auto (`-a`) | {auto_mode ? "✓ ON" : "✗ OFF"} | Skip confirmations |
42
+ | Examine (`-x`) | {examine_mode ? "✓ ON" : "✗ OFF"} | Adversarial review |
43
+ | Save (`-s`) | {save_mode ? "✓ ON" : "✗ OFF"} | Save outputs to files |
44
+ | Test (`-t`) | {test_mode ? "✓ ON" : "✗ OFF"} | Include test steps |
45
+ | Economy (`-e`) | {economy_mode ? "✓ ON" : "✗ OFF"} | No subagents |
46
+ | Branch (`-b`) | {branch_mode ? "✓ ON" : "✗ OFF"} | Verify/create branch |
47
+ | PR (`-pr`) | {pr_mode ? "✓ ON" : "✗ OFF"} | Create pull request |
48
+ ```
49
+
50
+ ### 2. Ask for Flag Changes
51
+
52
+ Use AskUserQuestion with multiSelect:
53
+ ```yaml
54
+ questions:
55
+ - header: "Configure"
56
+ question: "Select flags to TOGGLE (currently shown flags will flip their state):"
57
+ options:
58
+ - label: "Auto mode"
59
+ description: "{auto_mode ? 'Disable' : 'Enable'} - skip confirmations"
60
+ - label: "Examine mode"
61
+ description: "{examine_mode ? 'Disable' : 'Enable'} - adversarial review at end"
62
+ - label: "Save mode"
63
+ description: "{save_mode ? 'Disable' : 'Enable'} - save outputs to .claude/output/"
64
+ - label: "Test mode"
65
+ description: "{test_mode ? 'Disable' : 'Enable'} - include test creation/runner"
66
+ multiSelect: true
67
+ ```
68
+
69
+ ### 3. Ask for Additional Flags
70
+
71
+ Use AskUserQuestion with multiSelect:
72
+ ```yaml
73
+ questions:
74
+ - header: "More"
75
+ question: "Select additional flags to TOGGLE:"
76
+ options:
77
+ - label: "Economy mode"
78
+ description: "{economy_mode ? 'Disable' : 'Enable'} - no subagents, save tokens"
79
+ - label: "Branch mode"
80
+ description: "{branch_mode ? 'Disable' : 'Enable'} - verify/create git branch"
81
+ - label: "PR mode"
82
+ description: "{pr_mode ? 'Disable' : 'Enable'} - create pull request at end"
83
+ - label: "Done - keep current"
84
+ description: "No more changes, proceed with workflow"
85
+ multiSelect: true
86
+ ```
87
+
88
+ ### 4. Apply Changes
89
+
90
+ For each selected flag, toggle its value:
91
+ ```
92
+ IF "Auto mode" selected → {auto_mode} = !{auto_mode}
93
+ IF "Examine mode" selected → {examine_mode} = !{examine_mode}
94
+ IF "Save mode" selected → {save_mode} = !{save_mode}
95
+ IF "Test mode" selected → {test_mode} = !{test_mode}
96
+ IF "Economy mode" selected → {economy_mode} = !{economy_mode}
97
+ IF "Branch mode" selected → {branch_mode} = !{branch_mode}
98
+ IF "PR mode" selected → {pr_mode} = !{pr_mode}
99
+ ```
100
+
101
+ **Special rule:** If PR mode enabled, auto-enable branch mode:
102
+ ```
103
+ IF {pr_mode} = true → {branch_mode} = true
104
+ ```
105
+
106
+ ### 5. Show Final Configuration
107
+
108
+ Display updated configuration:
109
+ ```
110
+ **Updated APEX Configuration:**
111
+
112
+ | Flag | Status |
113
+ |------|--------|
114
+ | Auto | {auto_mode ? "✓ ON" : "✗ OFF"} |
115
+ | Examine | {examine_mode ? "✓ ON" : "✗ OFF"} |
116
+ | Save | {save_mode ? "✓ ON" : "✗ OFF"} |
117
+ | Test | {test_mode ? "✓ ON" : "✗ OFF"} |
118
+ | Economy | {economy_mode ? "✓ ON" : "✗ OFF"} |
119
+ | Branch | {branch_mode ? "✓ ON" : "✗ OFF"} |
120
+ | PR | {pr_mode ? "✓ ON" : "✗ OFF"} |
121
+ ```
122
+
123
+ ### 6. Return
124
+
125
+ → Return to step-00-init.md with all flags updated
126
+
127
+ ---
128
+
129
+ ## SUCCESS METRICS:
130
+
131
+ ✅ Current configuration displayed
132
+ ✅ User able to toggle any flag
133
+ ✅ All selected flags properly toggled
134
+ ✅ PR mode auto-enables branch mode
135
+ ✅ Final configuration shown
136
+
137
+ ## FAILURE MODES:
138
+
139
+ ❌ Not showing current flag states
140
+ ❌ Forgetting to toggle selected flags
141
+ ❌ Not enabling branch_mode when pr_mode selected
142
+ ❌ Starting workflow instead of returning
143
+ ❌ **CRITICAL**: Using plain text prompts instead of AskUserQuestion
144
+
145
+ ---
146
+
147
+ ## RETURN:
148
+
149
+ After configuration complete, return to `./step-00-init.md` to continue initialization.
150
+
151
+ <critical>
152
+ Remember: This sub-step ONLY handles flag configuration. Return immediately after updating flags.
153
+ </critical>