@atlashub/smartstack-cli 2.7.2 → 2.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.documentation/agents.html +0 -4
- package/.documentation/business-analyse.html +0 -4
- package/.documentation/cli-commands.html +0 -4
- package/.documentation/commands.html +0 -77
- package/.documentation/css/styles.css +0 -8
- package/.documentation/efcore.html +0 -4
- package/.documentation/gitflow.html +0 -4
- package/.documentation/hooks.html +0 -4
- package/.documentation/index.html +2 -28
- package/.documentation/init.html +8 -14
- package/.documentation/installation.html +0 -11
- package/.documentation/js/app.js +2 -16
- package/.documentation/ralph-loop.html +0 -4
- package/.documentation/test-web.html +0 -4
- package/README.md +0 -1
- package/dist/index.js +3 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/templates/agents/docs-sync-checker.md +2 -2
- package/templates/agents/efcore/squash.md +3 -1
- package/templates/hooks/docs-drift-check.md +4 -5
- package/templates/skills/_resources/context-digest-template.md +2 -2
- package/templates/skills/_resources/doc-context-cache.md +0 -2
- package/templates/skills/_resources/docs-manifest-schema.md +1 -3
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +1 -3
- package/templates/skills/_shared.md +24 -25
- package/templates/skills/application/steps/step-04-backend.md +185 -11
- package/templates/skills/application/steps/step-06-migration.md +41 -2
- package/templates/skills/application/templates-seed.md +151 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +59 -17
- package/templates/skills/controller/steps/step-01-analyze.md +1 -1
- package/templates/skills/efcore/steps/squash/step-03-create.md +39 -0
- package/templates/skills/ralph-loop/SKILL.md +35 -3
- package/templates/skills/ralph-loop/steps/step-00-init.md +93 -0
- package/templates/skills/ralph-loop/steps/step-01-task.md +202 -3
- package/templates/skills/ralph-loop/steps/step-02-execute.md +75 -3
- package/templates/skills/ralph-loop/steps/step-03-commit.md +8 -1
- package/templates/skills/ralph-loop/steps/step-04-check.md +77 -13
- package/templates/skills/ralph-loop/steps/step-05-report.md +79 -0
- package/.documentation/apex.html +0 -1027
- package/templates/skills/apex/SKILL.md +0 -297
- package/templates/skills/apex/steps/step-00-init.md +0 -212
- package/templates/skills/apex/steps/step-01-analyze.md +0 -263
- package/templates/skills/apex/steps/step-02-plan.md +0 -255
- package/templates/skills/apex/steps/step-03-execute.md +0 -217
- package/templates/skills/apex/steps/step-04-validate.md +0 -273
- package/templates/skills/apex/steps/step-04b-doc-sync.md +0 -162
- package/templates/skills/apex/steps/step-05-examine.md +0 -214
- package/templates/skills/apex/steps/step-06-resolve.md +0 -181
- package/templates/skills/apex/steps/step-07-tests.md +0 -206
- package/templates/skills/apex/steps/step-08-run-tests.md +0 -207
- package/templates/skills/apex/templates/00-context.md +0 -46
- package/templates/skills/apex/templates/01-analyze.md +0 -63
- package/templates/skills/apex/templates/02-plan.md +0 -63
- package/templates/skills/apex/templates/03-execute.md +0 -34
- package/templates/skills/apex/templates/04-validate.md +0 -61
- package/templates/skills/apex/templates/04b-doc-sync.md +0 -31
- package/templates/skills/apex/templates/05-examine.md +0 -58
- package/templates/skills/apex/templates/06-resolve.md +0 -39
- package/templates/skills/apex/templates/07-tests.md +0 -56
- package/templates/skills/apex/templates/08-run-tests.md +0 -41
- package/templates/skills/apex/templates/README.md +0 -69
- package/templates/skills/apex/templates/context-digest.md +0 -35
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: apex
|
|
3
|
-
description: Systematic implementation using APEX methodology (Analyze-Plan-Execute-eXamine) with progressive step loading and context refresh.
|
|
4
|
-
argument-hint: "[-a] [-x] [-s] [-t] [-e] [-i] [-b] [-pr] [-r <task-id>] <task description>"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Execute systematic implementation workflows using the APEX methodology. This skill uses progressive step loading to minimize context usage and maintain fresh context throughout the workflow.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<quick_start>
|
|
12
|
-
**Basic usage:**
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
/apex add authentication middleware
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
**Recommended workflow (autonomous with save):**
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
/apex -a -s implement user registration
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**With adversarial review:**
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
/apex -a -x -s fix login bug
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
**Flags:**
|
|
31
|
-
|
|
32
|
-
- `-a` (auto): Skip confirmations
|
|
33
|
-
- `-s` (save): Save outputs to `.claude/output/apex/`
|
|
34
|
-
- `-x` (examine): Include adversarial code review
|
|
35
|
-
- `-t` (test): Create and run tests
|
|
36
|
-
- `-e` (economy): No subagents, direct tool usage
|
|
37
|
-
|
|
38
|
-
See `<parameters>` for complete flag list.
|
|
39
|
-
</quick_start>
|
|
40
|
-
|
|
41
|
-
<parameters>
|
|
42
|
-
|
|
43
|
-
<flags>
|
|
44
|
-
**Enable flags (turn ON):**
|
|
45
|
-
| Short | Long | Description |
|
|
46
|
-
|-------|------|-------------|
|
|
47
|
-
| `-a` | `--auto` | Autonomous mode: skip confirmations, auto-approve plans |
|
|
48
|
-
| `-x` | `--examine` | Auto-examine mode: proceed to adversarial review |
|
|
49
|
-
| `-s` | `--save` | Save mode: output each step to `.claude/output/apex/` |
|
|
50
|
-
| `-t` | `--test` | Test mode: include test creation and runner steps |
|
|
51
|
-
| `-e` | `--economy` | Economy mode: no subagents, save tokens |
|
|
52
|
-
| `-d` | `--doc` | Documentation sync: update docs after validation (ON by default) |
|
|
53
|
-
| `-r` | `--resume` | Resume mode: continue from a previous task |
|
|
54
|
-
| `-b` | `--branch` | Branch mode: verify not on main, create branch if needed |
|
|
55
|
-
| `-pr` | `--pull-request` | PR mode: create pull request at end (enables -b) |
|
|
56
|
-
| `-i` | `--interactive` | Interactive mode: configure flags via AskUserQuestion |
|
|
57
|
-
|
|
58
|
-
**Disable flags (turn OFF):**
|
|
59
|
-
| Short | Long | Description |
|
|
60
|
-
|-------|------|-------------|
|
|
61
|
-
| `-A` | `--no-auto` | Disable auto mode |
|
|
62
|
-
| `-X` | `--no-examine` | Disable examine mode |
|
|
63
|
-
| `-S` | `--no-save` | Disable save mode |
|
|
64
|
-
| `-T` | `--no-test` | Disable test mode |
|
|
65
|
-
| `-E` | `--no-economy` | Disable economy mode |
|
|
66
|
-
| `-D` | `--no-doc` | Disable documentation sync |
|
|
67
|
-
| `-B` | `--no-branch` | Disable branch mode |
|
|
68
|
-
| `-PR` | `--no-pull-request` | Disable PR mode |
|
|
69
|
-
</flags>
|
|
70
|
-
|
|
71
|
-
<examples>
|
|
72
|
-
```bash
|
|
73
|
-
# Basic usage
|
|
74
|
-
/apex add auth middleware
|
|
75
|
-
|
|
76
|
-
# Autonomous mode (no confirmations)
|
|
77
|
-
/apex -a add auth middleware
|
|
78
|
-
|
|
79
|
-
# Save outputs for review
|
|
80
|
-
/apex -s add auth middleware
|
|
81
|
-
|
|
82
|
-
# With adversarial review
|
|
83
|
-
/apex -x add auth middleware
|
|
84
|
-
|
|
85
|
-
# Full autonomous with examine and save
|
|
86
|
-
/apex -a -x -s add auth middleware
|
|
87
|
-
|
|
88
|
-
# Include test creation and runner
|
|
89
|
-
/apex -t add auth middleware
|
|
90
|
-
|
|
91
|
-
# Resume a previous task
|
|
92
|
-
/apex -r 01-auth-middleware
|
|
93
|
-
/apex -r 01 # Partial match supported
|
|
94
|
-
|
|
95
|
-
# Combined flags
|
|
96
|
-
/apex -a -x -s -t add auth middleware
|
|
97
|
-
|
|
98
|
-
# Interactive mode (configure flags via menu)
|
|
99
|
-
/apex -i add auth middleware
|
|
100
|
-
|
|
101
|
-
# Economy mode (save tokens, no subagents)
|
|
102
|
-
/apex -e add auth middleware
|
|
103
|
-
|
|
104
|
-
# Branch mode (ensure not on main, create branch if needed)
|
|
105
|
-
/apex -b add auth middleware
|
|
106
|
-
|
|
107
|
-
# Create PR at end (automatically enables -b)
|
|
108
|
-
/apex -pr add auth middleware
|
|
109
|
-
/apex -a -pr add auth middleware # Auto + PR mode
|
|
110
|
-
|
|
111
|
-
# Full workflow: auto + examine + save + tests + PR
|
|
112
|
-
/apex -a -x -s -t -pr add auth middleware
|
|
113
|
-
```
|
|
114
|
-
</examples>
|
|
115
|
-
|
|
116
|
-
<parsing_rules>
|
|
117
|
-
**Flag parsing:**
|
|
118
|
-
|
|
119
|
-
1. Defaults loaded from `steps/step-00-init.md` `<defaults>` section
|
|
120
|
-
2. Command-line flags override defaults
|
|
121
|
-
3. Flags removed from input, remainder becomes `{task_description}`
|
|
122
|
-
4. Task ID generated as `NN-kebab-case-description`
|
|
123
|
-
</parsing_rules>
|
|
124
|
-
|
|
125
|
-
</parameters>
|
|
126
|
-
|
|
127
|
-
<output_structure>
|
|
128
|
-
**When `{save_mode}` = true:**
|
|
129
|
-
|
|
130
|
-
All outputs saved to PROJECT directory:
|
|
131
|
-
```
|
|
132
|
-
.claude/output/apex/{task-id}/
|
|
133
|
-
├── 00-context.md # Params, user request, timestamp
|
|
134
|
-
├── 01-analyze.md # Analysis findings
|
|
135
|
-
├── 02-plan.md # Implementation plan
|
|
136
|
-
├── 03-execute.md # Execution log
|
|
137
|
-
├── 04-validate.md # Validation results
|
|
138
|
-
├── 04b-doc-sync.md # Documentation sync (if -d)
|
|
139
|
-
├── 05-examine.md # Review findings (if -x)
|
|
140
|
-
├── 06-resolve.md # Resolution log (if -x)
|
|
141
|
-
├── 07-tests.md # Test creation (if -t)
|
|
142
|
-
├── 08-run-tests.md # Test runner log (if -t)
|
|
143
|
-
└── 09-finish.md # PR creation (if -pr)
|
|
144
|
-
```
|
|
145
|
-
</output_structure>
|
|
146
|
-
|
|
147
|
-
<resume_workflow>
|
|
148
|
-
**Resume mode (`-r {task-id}`):**
|
|
149
|
-
|
|
150
|
-
When provided, step-00 will:
|
|
151
|
-
|
|
152
|
-
1. Locate the task folder in `.claude/output/apex/`
|
|
153
|
-
2. Read `00-context.md` to restore state
|
|
154
|
-
3. Find the last completed step
|
|
155
|
-
4. Continue from the next step
|
|
156
|
-
</resume_workflow>
|
|
157
|
-
|
|
158
|
-
<workflow>
|
|
159
|
-
**Standard flow:**
|
|
160
|
-
1. Parse flags and task description
|
|
161
|
-
2. If `-r`: Execute resume workflow
|
|
162
|
-
3. If `-s`: Create output folder and 00-context.md
|
|
163
|
-
4. Load step-01-analyze.md -> gather context
|
|
164
|
-
5. Load step-02-plan.md -> create strategy
|
|
165
|
-
6. Load step-03-execute.md -> implement
|
|
166
|
-
7. Load step-04-validate.md -> verify
|
|
167
|
-
7b. If `{doc_mode}` = true: Load step-04b-doc-sync.md -> sync documentation
|
|
168
|
-
8. If `--test`: Load step-07-tests.md -> create tests
|
|
169
|
-
9. If `--test`: Load step-08-run-tests.md -> run until green
|
|
170
|
-
10. If `-x` or user requests: Load step-05-examine.md -> adversarial review
|
|
171
|
-
11. If findings: Load step-06-resolve.md -> fix findings
|
|
172
|
-
12. If `-pr`: Load step-09-finish.md -> create pull request
|
|
173
|
-
</workflow>
|
|
174
|
-
|
|
175
|
-
<state_variables>
|
|
176
|
-
**Persist throughout all steps:**
|
|
177
|
-
|
|
178
|
-
| Variable | Type | Description |
|
|
179
|
-
| ----------------------- | ------- | ------------------------------------------------------ |
|
|
180
|
-
| `{task_description}` | string | What to implement (flags removed) |
|
|
181
|
-
| `{feature_name}` | string | Kebab-case name (e.g., `add-auth-middleware`) |
|
|
182
|
-
| `{task_id}` | string | Full identifier (e.g., `01-add-auth-middleware`) |
|
|
183
|
-
| `{acceptance_criteria}` | list | Success criteria (inferred or explicit) |
|
|
184
|
-
| `{auto_mode}` | boolean | Skip confirmations |
|
|
185
|
-
| `{examine_mode}` | boolean | Auto-proceed to adversarial review |
|
|
186
|
-
| `{save_mode}` | boolean | Save outputs to .claude/output/apex/ |
|
|
187
|
-
| `{test_mode}` | boolean | Include test steps (07-08) |
|
|
188
|
-
| `{economy_mode}` | boolean | No subagents, direct tool usage only |
|
|
189
|
-
| `{doc_mode}` | boolean | Documentation sync after validation (ON by default) |
|
|
190
|
-
| `{branch_mode}` | boolean | Verify not on main, create branch if needed |
|
|
191
|
-
| `{pr_mode}` | boolean | Create pull request at end |
|
|
192
|
-
| `{interactive_mode}` | boolean | Configure flags interactively |
|
|
193
|
-
| `{resume_task}` | string | Task ID to resume (if -r provided) |
|
|
194
|
-
| `{output_dir}` | string | Full path to output directory |
|
|
195
|
-
| `{branch_name}` | string | Created branch name (if branch_mode) |
|
|
196
|
-
|
|
197
|
-
</state_variables>
|
|
198
|
-
|
|
199
|
-
<entry_point>
|
|
200
|
-
|
|
201
|
-
**FIRST ACTION:** Load `steps/step-00-init.md`
|
|
202
|
-
|
|
203
|
-
</entry_point>
|
|
204
|
-
|
|
205
|
-
<step_files>
|
|
206
|
-
**Progressive loading - only load current step:**
|
|
207
|
-
|
|
208
|
-
| Step | File | Purpose |
|
|
209
|
-
| ---- | ---------------------------- | ---------------------------------------------------- |
|
|
210
|
-
| 00 | `steps/step-00-init.md` | Parse flags, create output folder, initialize state |
|
|
211
|
-
| 01 | `steps/step-01-analyze.md` | Pure context gathering (what exists, not what to do) |
|
|
212
|
-
| 02 | `steps/step-02-plan.md` | File-by-file implementation strategy |
|
|
213
|
-
| 03 | `steps/step-03-execute.md` | Todo-driven implementation |
|
|
214
|
-
| 04 | `steps/step-04-validate.md` | Self-check and validation |
|
|
215
|
-
| 04b | `steps/step-04b-doc-sync.md` | Documentation sync (if doc_mode, manifest exists) |
|
|
216
|
-
| 05 | `steps/step-05-examine.md` | Adversarial code review (optional) |
|
|
217
|
-
| 06 | `steps/step-06-resolve.md` | Finding resolution (optional) |
|
|
218
|
-
| 07 | `steps/step-07-tests.md` | Test analysis and creation (if --test) |
|
|
219
|
-
| 08 | `steps/step-08-run-tests.md` | Test runner loop until green (if --test) |
|
|
220
|
-
| 09 | `steps/step-09-finish.md` | Create pull request (if --pull-request) |
|
|
221
|
-
|
|
222
|
-
</step_files>
|
|
223
|
-
|
|
224
|
-
<execution_rules>
|
|
225
|
-
|
|
226
|
-
- **Load one step at a time** - Only load the current step file
|
|
227
|
-
- **ULTRA THINK** before major decisions
|
|
228
|
-
- **Persist state variables** across all steps
|
|
229
|
-
- **Follow next_step directive** at end of each step
|
|
230
|
-
- **Save outputs** if `{save_mode}` = true (write to step file)
|
|
231
|
-
- **Use parallel agents** for independent exploration tasks (unless economy_mode)
|
|
232
|
-
</execution_rules>
|
|
233
|
-
|
|
234
|
-
<mcp_requirements>
|
|
235
|
-
**SmartStack MCP Integration:**
|
|
236
|
-
|
|
237
|
-
APEX est fortement couplé au développement SmartStack via les outils MCP.
|
|
238
|
-
Référence complète dans `_shared.md` section "MCP Tools References".
|
|
239
|
-
|
|
240
|
-
### Outils obligatoires (chaque exécution APEX)
|
|
241
|
-
|
|
242
|
-
| Tool | Quand | Step |
|
|
243
|
-
|------|-------|------|
|
|
244
|
-
| `mcp__smartstack__api_docs` | Analyse contexte API existant | step-01-analyze |
|
|
245
|
-
| `mcp__smartstack__validate_conventions` | Validation finale du code généré | step-04-validate |
|
|
246
|
-
|
|
247
|
-
### Outils conditionnels (step-03-execute)
|
|
248
|
-
|
|
249
|
-
| Tool | Condition |
|
|
250
|
-
|------|-----------|
|
|
251
|
-
| `mcp__smartstack__scaffold_extension` | Génération entités/services/controllers |
|
|
252
|
-
| `mcp__smartstack__suggest_migration` | Création nouvelle migration EF Core |
|
|
253
|
-
| `mcp__smartstack__generate_permissions` | Génération permissions RBAC |
|
|
254
|
-
| `mcp__smartstack__scaffold_api_client` | Génération client TypeScript |
|
|
255
|
-
| `mcp__smartstack__scaffold_routes` | Génération routes React Router |
|
|
256
|
-
|
|
257
|
-
### Outils conditionnels (step-04-validate)
|
|
258
|
-
|
|
259
|
-
| Tool | Condition |
|
|
260
|
-
|------|-----------|
|
|
261
|
-
| `mcp__smartstack__check_migrations` | Si modifications EF Core détectées |
|
|
262
|
-
| `mcp__smartstack__validate_frontend_routes` | Si code frontend généré |
|
|
263
|
-
|
|
264
|
-
### Outils tests (step-07-tests, si `-t`)
|
|
265
|
-
|
|
266
|
-
| Tool | Usage |
|
|
267
|
-
|------|-------|
|
|
268
|
-
| `mcp__smartstack__scaffold_tests` | Générer tests unitaires/intégration |
|
|
269
|
-
| `mcp__smartstack__suggest_test_scenarios` | Suggérer scénarios de test |
|
|
270
|
-
| `mcp__smartstack__analyze_test_coverage` | Analyser couverture existante |
|
|
271
|
-
|
|
272
|
-
### Outils analyse (step-01-analyze)
|
|
273
|
-
|
|
274
|
-
| Tool | Usage |
|
|
275
|
-
|------|-------|
|
|
276
|
-
| `mcp__smartstack__analyze_extension_points` | Identifier points d'extension React |
|
|
277
|
-
|
|
278
|
-
### Vérification MCP (step-00)
|
|
279
|
-
|
|
280
|
-
Au démarrage, vérifier la disponibilité du MCP SmartStack :
|
|
281
|
-
- Si disponible : utiliser les outils MCP pour génération et validation
|
|
282
|
-
- Si indisponible : avertir l'utilisateur, continuer en mode dégradé (outils manuels)
|
|
283
|
-
|
|
284
|
-
### Mode économie (`-e`)
|
|
285
|
-
|
|
286
|
-
En mode économie, les outils MCP restent disponibles mais les subagents sont désactivés.
|
|
287
|
-
Privilégier les outils MCP (`scaffold_*`) pour la génération plutôt que l'écriture manuelle.
|
|
288
|
-
</mcp_requirements>
|
|
289
|
-
|
|
290
|
-
<success_criteria>
|
|
291
|
-
|
|
292
|
-
- Each step loaded progressively
|
|
293
|
-
- All validation checks passing
|
|
294
|
-
- Outputs saved if `{save_mode}` enabled
|
|
295
|
-
- Tests passing if `{test_mode}` enabled
|
|
296
|
-
- Clear completion summary provided
|
|
297
|
-
</success_criteria>
|
|
@@ -1,212 +0,0 @@
|
|
|
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:
|
|
10
|
-
|
|
11
|
-
- NEVER skip flag parsing
|
|
12
|
-
- ALWAYS parse ALL flags before any other action
|
|
13
|
-
- ONLY check for resume if {resume_task} is set
|
|
14
|
-
- YOU ARE AN INITIALIZER, not an executor
|
|
15
|
-
- FORBIDDEN to load step-01 until init is complete
|
|
16
|
-
|
|
17
|
-
## YOUR TASK:
|
|
18
|
-
|
|
19
|
-
Initialize the APEX workflow by parsing flags, detecting continuation state, and setting up the execution environment.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
<defaults>
|
|
24
|
-
## Default Configuration
|
|
25
|
-
|
|
26
|
-
```yaml
|
|
27
|
-
auto_mode: false # -a: Skip confirmations
|
|
28
|
-
examine_mode: false # -x: Auto-proceed to adversarial review
|
|
29
|
-
save_mode: false # -s: Save outputs to .claude/output/apex/
|
|
30
|
-
test_mode: false # -t: Include test creation and runner steps
|
|
31
|
-
economy_mode: false # -e: No subagents, save tokens
|
|
32
|
-
doc_mode: true # -d: Documentation sync (ON by default)
|
|
33
|
-
```
|
|
34
|
-
</defaults>
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## EXECUTION SEQUENCE:
|
|
39
|
-
|
|
40
|
-
### 1. Parse Flags and Input
|
|
41
|
-
|
|
42
|
-
**Step 1: Load defaults from config above**
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
{auto_mode} = false
|
|
46
|
-
{examine_mode} = false
|
|
47
|
-
{save_mode} = false
|
|
48
|
-
{test_mode} = false
|
|
49
|
-
{economy_mode} = false
|
|
50
|
-
{doc_mode} = true
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**Step 2: Parse user input and override defaults:**
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
Enable flags (lowercase - turn ON):
|
|
57
|
-
-a or --auto -> {auto_mode} = true
|
|
58
|
-
-x or --examine -> {examine_mode} = true
|
|
59
|
-
-s or --save -> {save_mode} = true
|
|
60
|
-
-t or --test -> {test_mode} = true
|
|
61
|
-
-e or --economy -> {economy_mode} = true
|
|
62
|
-
-d or --doc -> {doc_mode} = true
|
|
63
|
-
|
|
64
|
-
Disable flags (UPPERCASE - turn OFF):
|
|
65
|
-
-A or --no-auto -> {auto_mode} = false
|
|
66
|
-
-X or --no-examine -> {examine_mode} = false
|
|
67
|
-
-S or --no-save -> {save_mode} = false
|
|
68
|
-
-T or --no-test -> {test_mode} = false
|
|
69
|
-
-E or --no-economy -> {economy_mode} = false
|
|
70
|
-
-D or --no-doc -> {doc_mode} = false
|
|
71
|
-
|
|
72
|
-
Other:
|
|
73
|
-
-r or --resume -> {resume_task} = <next argument>
|
|
74
|
-
-i or --interactive -> {interactive_mode} = true
|
|
75
|
-
Remainder -> {task_description}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**Step 3: Generate feature_name and task_id:**
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
{feature_name} = kebab-case-description
|
|
82
|
-
Example: "add user authentication" -> "add-user-authentication"
|
|
83
|
-
|
|
84
|
-
{task_id} = NN-{feature_name}
|
|
85
|
-
- Auto-detect next available number from .claude/output/apex/
|
|
86
|
-
- Example: "01-add-user-authentication"
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 2. Check Resume Mode
|
|
90
|
-
|
|
91
|
-
**ONLY execute if {resume_task} is set!**
|
|
92
|
-
|
|
93
|
-
If `{resume_task}` is set:
|
|
94
|
-
|
|
95
|
-
1. Search for matching task in `.claude/output/apex/`
|
|
96
|
-
2. If found: Read `00-context.md` to restore state variables
|
|
97
|
-
3. Find last completed step (look for "Status: Complete" markers)
|
|
98
|
-
4. Load next incomplete step
|
|
99
|
-
5. **STOP** - do not continue with fresh init
|
|
100
|
-
|
|
101
|
-
If no match found: List available tasks and ask user to specify.
|
|
102
|
-
|
|
103
|
-
### 3. Interactive Mode (if -i flag)
|
|
104
|
-
|
|
105
|
-
If `{interactive_mode}` = true:
|
|
106
|
-
|
|
107
|
-
```yaml
|
|
108
|
-
questions:
|
|
109
|
-
- header: "Configure"
|
|
110
|
-
question: "Select flags to enable for this workflow:"
|
|
111
|
-
options:
|
|
112
|
-
- label: "Auto mode (-a)"
|
|
113
|
-
description: "Skip all confirmations, use recommended options"
|
|
114
|
-
- label: "Examine mode (-x)"
|
|
115
|
-
description: "Include adversarial code review at end"
|
|
116
|
-
- label: "Save mode (-s)"
|
|
117
|
-
description: "Save all outputs to .claude/output/apex/"
|
|
118
|
-
- label: "Test mode (-t)"
|
|
119
|
-
description: "Include test creation and runner steps"
|
|
120
|
-
- label: "Economy mode (-e)"
|
|
121
|
-
description: "No subagents, direct tools only (saves tokens)"
|
|
122
|
-
- label: "Doc sync mode (-d) — ON by default"
|
|
123
|
-
description: "Sync documentation after validation (disable with -D)"
|
|
124
|
-
multiSelect: true
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### 4. Create Output Structure (if save_mode)
|
|
128
|
-
|
|
129
|
-
**If `{save_mode}` = true:**
|
|
130
|
-
|
|
131
|
-
1. Create directory: `.claude/output/apex/{task_id}/`
|
|
132
|
-
|
|
133
|
-
2. Write `00-context.md`:
|
|
134
|
-
|
|
135
|
-
```markdown
|
|
136
|
-
# APEX Task: {task_id}
|
|
137
|
-
|
|
138
|
-
**Created:** {timestamp}
|
|
139
|
-
**Task:** {task_description}
|
|
140
|
-
|
|
141
|
-
## Configuration
|
|
142
|
-
|
|
143
|
-
| Flag | Value |
|
|
144
|
-
|------|-------|
|
|
145
|
-
| Auto mode | {auto_mode} |
|
|
146
|
-
| Examine mode | {examine_mode} |
|
|
147
|
-
| Save mode | {save_mode} |
|
|
148
|
-
| Test mode | {test_mode} |
|
|
149
|
-
| Economy mode | {economy_mode} |
|
|
150
|
-
| Doc mode | {doc_mode} |
|
|
151
|
-
|
|
152
|
-
## User Request
|
|
153
|
-
|
|
154
|
-
{original user input}
|
|
155
|
-
|
|
156
|
-
## Acceptance Criteria
|
|
157
|
-
|
|
158
|
-
_To be defined in step-01-analyze_
|
|
159
|
-
|
|
160
|
-
## Progress
|
|
161
|
-
|
|
162
|
-
| Step | Status |
|
|
163
|
-
|------|--------|
|
|
164
|
-
| 00-init | In Progress |
|
|
165
|
-
| 01-analyze | Pending |
|
|
166
|
-
| 02-plan | Pending |
|
|
167
|
-
| 03-execute | Pending |
|
|
168
|
-
| 04-validate | Pending |
|
|
169
|
-
| 04b-doc-sync | {doc_mode ? "Pending" : "Skip"} |
|
|
170
|
-
| 05-examine | {examine_mode ? "Pending" : "Skip"} |
|
|
171
|
-
| 06-resolve | {examine_mode ? "Pending" : "Skip"} |
|
|
172
|
-
| 07-tests | {test_mode ? "Pending" : "Skip"} |
|
|
173
|
-
| 08-run-tests | {test_mode ? "Pending" : "Skip"} |
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
3. Mark 00-init as Complete in the Progress table
|
|
177
|
-
|
|
178
|
-
### 5. Show Summary and Proceed
|
|
179
|
-
|
|
180
|
-
**Always show COMPACT summary:**
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
APEX: {task_description}
|
|
184
|
-
|
|
185
|
-
| Variable | Value |
|
|
186
|
-
|----------|-------|
|
|
187
|
-
| {task_id} | 01-kebab-name |
|
|
188
|
-
| {auto_mode} | true/false |
|
|
189
|
-
| {examine_mode} | true/false |
|
|
190
|
-
| {save_mode} | true/false |
|
|
191
|
-
| {test_mode} | true/false |
|
|
192
|
-
| {economy_mode} | true/false |
|
|
193
|
-
| {doc_mode} | true/false |
|
|
194
|
-
|
|
195
|
-
-> Analyzing...
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
**Then proceed directly to step-01-analyze.md**
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## SUCCESS METRICS:
|
|
203
|
-
|
|
204
|
-
- All flags correctly parsed
|
|
205
|
-
- Output is COMPACT (one table, no verbose logs)
|
|
206
|
-
- Variables shown with `{brackets}` notation
|
|
207
|
-
- Proceeded to step-01 immediately after summary
|
|
208
|
-
- Output folder created with 00-context.md (if save_mode)
|
|
209
|
-
|
|
210
|
-
## NEXT STEP:
|
|
211
|
-
|
|
212
|
-
After showing initialization summary, always proceed directly to `./step-01-analyze.md`
|