@atlashub/smartstack-cli 3.24.0 → 3.26.0
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/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +51 -14
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/skills/apex/SKILL.md +26 -5
- package/templates/skills/apex/_shared.md +3 -3
- package/templates/skills/apex/references/agent-teams-protocol.md +8 -8
- package/templates/skills/apex/references/challenge-questions.md +165 -0
- package/templates/skills/apex/references/post-checks.md +457 -0
- package/templates/skills/apex/references/smartstack-api.md +234 -14
- package/templates/skills/apex/references/smartstack-frontend.md +20 -0
- package/templates/skills/apex/references/smartstack-layers.md +16 -4
- package/templates/skills/apex/steps/step-00-init.md +84 -56
- package/templates/skills/apex/steps/step-01-analyze.md +73 -87
- package/templates/skills/apex/steps/step-03-execute.md +6 -4
- package/templates/skills/apex/steps/step-04-examine.md +198 -0
- package/templates/skills/apex/steps/{step-05-examine.md → step-05-deep-review.md} +6 -6
- package/templates/skills/apex/steps/step-06-resolve.md +2 -2
- package/templates/skills/business-analyse/SKILL.md +28 -0
- package/templates/skills/business-analyse/references/agent-module-prompt.md +255 -0
- package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +26 -10
- package/templates/skills/business-analyse/references/team-orchestration.md +437 -0
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +31 -4
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +21 -0
- package/templates/skills/business-analyse/steps/step-03d-validate.md +84 -0
- package/templates/skills/efcore/steps/migration/step-02-create.md +14 -1
- package/templates/skills/ralph-loop/references/category-rules.md +26 -2
- package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
- package/templates/skills/ralph-loop/references/core-seed-data.md +45 -10
- package/templates/skills/ralph-loop/steps/step-02-execute.md +128 -1
- package/templates/skills/validate-feature/steps/step-01-compile.md +4 -1
- package/templates/skills/apex/steps/step-04-validate.md +0 -448
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
33
33
|
| Flag | Description |
|
|
34
34
|
|------|-------------|
|
|
35
35
|
| `-a` | Auto mode: skip confirmations |
|
|
36
|
-
| `-x` |
|
|
36
|
+
| `-x` | Deep review: adversarial code review (beyond step-04 automated checks) |
|
|
37
37
|
| `-s` | Save mode: output to `.claude/output/apex/` |
|
|
38
38
|
| `-t` | Test mode: scaffold + run tests via MCP |
|
|
39
39
|
| `-e` | Economy mode: no subagents |
|
|
@@ -57,11 +57,17 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
57
57
|
| `{context_code}` | string | "business", "platform", "personal" |
|
|
58
58
|
| `{app_name}` | string | Application name |
|
|
59
59
|
| `{module_code}` | string | Module code |
|
|
60
|
-
| `{sections}` |
|
|
60
|
+
| `{sections}` | object[] | Sections (MANDATORY, min 1) with code/labels/icon/displayOrder |
|
|
61
|
+
| `{entities}` | string[] | Main entities to manage (from need-challenge) |
|
|
62
|
+
| `{module_complexity}` | string | "simple-crud", "crud-rules", "crud-workflow", "complex" |
|
|
63
|
+
| `{has_dependencies}` | string | "none", "references", "unknown" |
|
|
64
|
+
| `{key_properties}` | string[] | Key business properties mentioned by user |
|
|
61
65
|
| `{prd_path}` | string? | `.ralph/prd-{module}.json` if exists |
|
|
62
66
|
| `{feature_path}` | string? | `docs/business/.../feature.json` if exists |
|
|
63
67
|
| `{needs_seed_data}` | boolean | Seed data creation required |
|
|
64
68
|
| `{needs_migration}` | boolean | EF Core migration required |
|
|
69
|
+
| `{needs_workflow}` | boolean | Workflow integration required |
|
|
70
|
+
| `{needs_notification}` | boolean | Notification integration required |
|
|
65
71
|
</state_variables>
|
|
66
72
|
|
|
67
73
|
<entry_point>
|
|
@@ -75,17 +81,32 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
75
81
|
|
|
76
82
|
| Step | File | Model | Purpose |
|
|
77
83
|
|------|------|-------|---------|
|
|
78
|
-
| 00 | `steps/step-00-init.md` | Sonnet | Parse flags, detect
|
|
84
|
+
| 00 | `steps/step-00-init.md` | Sonnet | Parse flags, detect context, verify MCP, define hierarchy (5 levels), challenge need |
|
|
79
85
|
| 01 | `steps/step-01-analyze.md` | Opus | Explore existing code (Agent Teams or direct) |
|
|
80
86
|
| 02 | `steps/step-02-plan.md` | Opus | Layer-by-layer plan with skill/MCP mapping |
|
|
81
87
|
| 03 | `steps/step-03-execute.md` | Opus | Orchestrate execution via skills and MCP |
|
|
82
|
-
| 04 | `steps/step-04-
|
|
83
|
-
| 05 | `steps/step-05-
|
|
88
|
+
| 04 | `steps/step-04-examine.md` | Opus | eXamine: MCP validation, build, 21 POST-CHECKs, acceptance criteria |
|
|
89
|
+
| 05 | `steps/step-05-deep-review.md` | Opus | Deep Review: adversarial code review (if -x) |
|
|
84
90
|
| 06 | `steps/step-06-resolve.md` | Opus | Fix BLOCKING findings (if any) |
|
|
85
91
|
| 07 | `steps/step-07-tests.md` | Opus | Scaffold tests via MCP (if -t) |
|
|
86
92
|
| 08 | `steps/step-08-run-tests.md` | Opus | Run tests until 100% pass (if -t) |
|
|
87
93
|
</step_files>
|
|
88
94
|
|
|
95
|
+
<apex_phases>
|
|
96
|
+
**APEX = Analyze → Plan → Execute → eXamine**
|
|
97
|
+
|
|
98
|
+
| Phase | Step | Obligatory | Description |
|
|
99
|
+
|-------|------|------------|-------------|
|
|
100
|
+
| *Init* | 00 | Yes | Setup, hierarchy, challenge the need |
|
|
101
|
+
| **A** — Analyze | 01 | Yes | Explore existing code |
|
|
102
|
+
| **P** — Plan | 02 | Yes | File-by-file plan with skill/MCP mapping |
|
|
103
|
+
| **E** — Execute | 03 | Yes | Orchestrate creation via skills and MCP |
|
|
104
|
+
| **X** — eXamine | 04 | Yes | 21 POST-CHECKs, MCP validation, build, acceptance criteria |
|
|
105
|
+
| *Deep Review* | 05 (if -x) | No | Adversarial code review beyond automated checks |
|
|
106
|
+
| *Resolve* | 06 (if BLOCKING) | No | Fix BLOCKING findings |
|
|
107
|
+
| *Tests* | 07-08 (if -t) | No | Scaffold and run tests |
|
|
108
|
+
</apex_phases>
|
|
109
|
+
|
|
89
110
|
<reference_files>
|
|
90
111
|
**Loaded conditionally by steps that need them:**
|
|
91
112
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
| Tool | Purpose | Step |
|
|
32
32
|
|------|---------|------|
|
|
33
|
-
| `validate_conventions` | Validate SmartStack conventions | 00 (check), 04 (
|
|
33
|
+
| `validate_conventions` | Validate SmartStack conventions | 00 (check), 04 (examine) |
|
|
34
34
|
|
|
35
35
|
### Generation (step-03)
|
|
36
36
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
| `scaffold_api_client` | Generate TypeScript API client | Frontend changes |
|
|
43
43
|
| `scaffold_routes` | Generate React Router routes | Frontend changes |
|
|
44
44
|
|
|
45
|
-
###
|
|
45
|
+
### eXamine (step-04)
|
|
46
46
|
|
|
47
47
|
| Tool | Purpose | Condition |
|
|
48
48
|
|------|---------|-----------|
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
| `suggest_test_scenarios` | Suggest test scenarios |
|
|
66
66
|
| `analyze_test_coverage` | Check coverage percentage |
|
|
67
67
|
|
|
68
|
-
### Review (step-05, if -x)
|
|
68
|
+
### Deep Review (step-05, if -x)
|
|
69
69
|
|
|
70
70
|
| Tool | Purpose |
|
|
71
71
|
|------|---------|
|
|
@@ -22,7 +22,7 @@ Always provide both `team_name` and `description`.
|
|
|
22
22
|
|
|
23
23
|
```yaml
|
|
24
24
|
Task:
|
|
25
|
-
subagent_type: "general-purpose"
|
|
25
|
+
subagent_type: "Explore" | "general-purpose" # See assignment table below
|
|
26
26
|
team_name: "apex-{phase}" # Must match TeamCreate
|
|
27
27
|
name: "{teammate-name}" # e.g., "scan-backend", "exec-frontend"
|
|
28
28
|
model: "sonnet" | "opus" # sonnet for scan, opus for dev (T02/T06)
|
|
@@ -30,14 +30,14 @@ Task:
|
|
|
30
30
|
prompt: "{detailed task prompt}"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
### Model Assignment (T02/T06)
|
|
33
|
+
### Model & Agent Assignment (T02/T03/T06)
|
|
34
34
|
|
|
35
|
-
| Task Type | Model | Justification |
|
|
36
|
-
|
|
37
|
-
| Scan/read files | Sonnet | Read-only,
|
|
38
|
-
| Read context (PRD, feature.json) | Sonnet | Read-only extraction |
|
|
39
|
-
| Code development | Opus |
|
|
40
|
-
| Fix/resolve | Opus | Requires reasoning |
|
|
35
|
+
| Task Type | subagent_type | Model | Justification |
|
|
36
|
+
|-----------|---------------|-------|---------------|
|
|
37
|
+
| Scan/read files | Explore | Sonnet | Read-only (Glob, Grep, Read) |
|
|
38
|
+
| Read context (PRD, feature.json) | Explore | Sonnet | Read-only extraction |
|
|
39
|
+
| Code development | general-purpose | Opus | Full tools via skills/MCP |
|
|
40
|
+
| Fix/resolve | general-purpose | Opus | Requires reasoning + editing |
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Challenge Questions — APEX
|
|
2
|
+
|
|
3
|
+
> **Referenced by:** step-00-init.md
|
|
4
|
+
> Question templates for context detection, hierarchy validation, and need challenging.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Context Detection (section 2)
|
|
9
|
+
|
|
10
|
+
If hierarchy cannot be inferred, ask the user:
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
questions:
|
|
14
|
+
- header: "Context"
|
|
15
|
+
question: "What is the SmartStack context for this work?"
|
|
16
|
+
options:
|
|
17
|
+
- label: "Business (Recommended)"
|
|
18
|
+
description: "Business application module"
|
|
19
|
+
- label: "Platform"
|
|
20
|
+
description: "Platform administration or support"
|
|
21
|
+
- label: "Personal"
|
|
22
|
+
description: "Personal user space"
|
|
23
|
+
multiSelect: false
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 4a. Application Validation
|
|
29
|
+
|
|
30
|
+
If `{app_name}` was NOT clearly inferred from the task description:
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
questions:
|
|
34
|
+
- header: "Application"
|
|
35
|
+
question: "Which application does this module belong to?"
|
|
36
|
+
options:
|
|
37
|
+
- label: "<best guess from task> (Recommended)"
|
|
38
|
+
description: "Inferred from your task description"
|
|
39
|
+
- label: "New application"
|
|
40
|
+
description: "Create a new application in the {context_code} context"
|
|
41
|
+
- label: "Existing application"
|
|
42
|
+
description: "Add to an existing application (specify in Other)"
|
|
43
|
+
multiSelect: false
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If "New application": collect `{app_name}`, `{app_code}`, `{app_icon}`, `{app_labels}` (4 langs).
|
|
47
|
+
If "Existing application": scan `**/Seeding/Data/**/NavigationApplicationSeedData.cs` and present discovered apps.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 4b. Module Validation
|
|
52
|
+
|
|
53
|
+
If `{module_code}` was NOT clearly inferred from the task description:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
questions:
|
|
57
|
+
- header: "Module"
|
|
58
|
+
question: "What is the module code? (kebab-case, e.g., 'order-management', 'employees')"
|
|
59
|
+
options:
|
|
60
|
+
- label: "<inferred module code> (Recommended)"
|
|
61
|
+
description: "Inferred from your task description"
|
|
62
|
+
- label: "<alternative suggestion>"
|
|
63
|
+
description: "Alternative based on keywords"
|
|
64
|
+
multiSelect: false
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 4c. Section Selection
|
|
70
|
+
|
|
71
|
+
> **BLOCKING:** This question MUST be asked. `{sections}` MUST contain at least one entry before proceeding.
|
|
72
|
+
|
|
73
|
+
Infer section suggestions from:
|
|
74
|
+
1. Task description (extract nouns/concepts that suggest functional sub-areas)
|
|
75
|
+
2. PRD/feature.json if available (module.sections)
|
|
76
|
+
3. Common patterns: "list" (default for simple CRUD), "dashboard", "settings", "reports"
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
questions:
|
|
80
|
+
- header: "Sections"
|
|
81
|
+
question: "What sections should the module '{module_code}' contain? (Select at least one — use 'Other' to add custom sections)"
|
|
82
|
+
options:
|
|
83
|
+
- label: "<inferred section 1>"
|
|
84
|
+
description: "Primary functional area based on module purpose"
|
|
85
|
+
- label: "<inferred section 2>"
|
|
86
|
+
description: "Secondary functional area"
|
|
87
|
+
- label: "<inferred section 3>"
|
|
88
|
+
description: "Additional area inferred from context"
|
|
89
|
+
multiSelect: true
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Validation (BLOCKING):**
|
|
93
|
+
```
|
|
94
|
+
IF {sections}.length == 0:
|
|
95
|
+
DISPLAY: "Every module must have at least one section. Please select or define at least one."
|
|
96
|
+
→ Re-ask the sections question
|
|
97
|
+
→ DO NOT proceed to next step
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Store for each section:**
|
|
101
|
+
```yaml
|
|
102
|
+
sections:
|
|
103
|
+
- code: "section-kebab"
|
|
104
|
+
labels: { fr: "...", en: "...", it: "...", de: "..." }
|
|
105
|
+
icon: "LucideIconName"
|
|
106
|
+
displayOrder: 10
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 5a. Entity Scope & Relationships
|
|
112
|
+
|
|
113
|
+
```yaml
|
|
114
|
+
questions:
|
|
115
|
+
- header: "Entities"
|
|
116
|
+
question: "What are the main entities this module manages? (e.g., 'Order, OrderLine, OrderStatus')"
|
|
117
|
+
options:
|
|
118
|
+
- label: "<inferred primary entity>"
|
|
119
|
+
description: "Main entity inferred from module name"
|
|
120
|
+
- label: "<inferred primary + secondary>"
|
|
121
|
+
description: "Primary entity plus related entities from context"
|
|
122
|
+
- label: "Only the primary entity"
|
|
123
|
+
description: "Simple module — single entity '{module_code}' with standard CRUD"
|
|
124
|
+
multiSelect: false
|
|
125
|
+
- header: "Complexity"
|
|
126
|
+
question: "What best describes this module's behavior?"
|
|
127
|
+
options:
|
|
128
|
+
- label: "Simple CRUD (Recommended)"
|
|
129
|
+
description: "Standard list/create/edit/delete — no special business logic"
|
|
130
|
+
- label: "CRUD + Business rules"
|
|
131
|
+
description: "CRUD with validations, computed fields, status transitions, or constraints"
|
|
132
|
+
- label: "CRUD + Workflow/Notifications"
|
|
133
|
+
description: "CRUD with automated actions (emails, approvals, webhooks)"
|
|
134
|
+
- label: "Complex module"
|
|
135
|
+
description: "Multiple interrelated entities with specific business logic"
|
|
136
|
+
multiSelect: false
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 5b. Dependencies & Key Properties
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
questions:
|
|
145
|
+
- header: "Dependencies"
|
|
146
|
+
question: "Does this module reference entities from other existing modules?"
|
|
147
|
+
options:
|
|
148
|
+
- label: "No dependencies"
|
|
149
|
+
description: "Standalone module — no FK relationships to other modules"
|
|
150
|
+
- label: "Yes, has FK references"
|
|
151
|
+
description: "References entities from other modules (specify in Other)"
|
|
152
|
+
- label: "Not sure yet"
|
|
153
|
+
description: "Will determine during analysis — may require EntityLookup components"
|
|
154
|
+
multiSelect: false
|
|
155
|
+
- header: "Key fields"
|
|
156
|
+
question: "Beyond standard fields (Id, TenantId, Audit), what are the key business properties of the main entity?"
|
|
157
|
+
options:
|
|
158
|
+
- label: "<inferred properties from context>"
|
|
159
|
+
description: "Properties inferred from module purpose"
|
|
160
|
+
- label: "Standard fields only"
|
|
161
|
+
description: "I'll define properties later during implementation"
|
|
162
|
+
- label: "I have specific requirements"
|
|
163
|
+
description: "Describe your fields in 'Other'"
|
|
164
|
+
multiSelect: false
|
|
165
|
+
```
|