@atlashub/smartstack-cli 3.8.0 → 3.10.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 +365 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/templates/agents/action.md +1 -0
- package/templates/agents/ba-writer.md +211 -0
- package/templates/agents/explore-codebase.md +1 -0
- package/templates/agents/explore-docs.md +1 -0
- package/templates/agents/fix-grammar.md +1 -0
- package/templates/agents/snipper.md +1 -0
- package/templates/skills/admin/SKILL.md +6 -0
- package/templates/skills/ai-prompt/SKILL.md +32 -136
- package/templates/skills/ai-prompt/steps/step-01-implementation.md +122 -0
- package/templates/skills/apex/SKILL.md +120 -0
- package/templates/skills/apex/_shared.md +86 -0
- package/templates/skills/apex/references/agent-teams-protocol.md +164 -0
- package/templates/skills/apex/references/smartstack-layers.md +173 -0
- package/templates/skills/apex/steps/step-00-init.md +156 -0
- package/templates/skills/apex/steps/step-01-analyze.md +169 -0
- package/templates/skills/apex/steps/step-02-plan.md +160 -0
- package/templates/skills/apex/steps/step-03-execute.md +166 -0
- package/templates/skills/apex/steps/step-04-validate.md +138 -0
- package/templates/skills/apex/steps/step-05-examine.md +124 -0
- package/templates/skills/apex/steps/step-06-resolve.md +105 -0
- package/templates/skills/apex/steps/step-07-tests.md +130 -0
- package/templates/skills/apex/steps/step-08-run-tests.md +115 -0
- package/templates/skills/application/SKILL.md +10 -0
- package/templates/skills/application/references/application-roles-template.md +227 -0
- package/templates/skills/application/references/backend-controller-hierarchy.md +58 -0
- package/templates/skills/application/references/backend-entity-seeding.md +72 -0
- package/templates/skills/application/references/backend-verification.md +88 -0
- package/templates/skills/application/references/frontend-verification.md +111 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +200 -0
- package/templates/skills/application/references/provider-template.md +158 -0
- package/templates/skills/application/references/test-frontend.md +73 -0
- package/templates/skills/application/references/test-prerequisites.md +72 -0
- package/templates/skills/application/steps/step-01-navigation.md +7 -198
- package/templates/skills/application/steps/step-03-roles.md +45 -7
- package/templates/skills/application/steps/step-03b-provider.md +15 -132
- package/templates/skills/application/steps/step-04-backend.md +20 -350
- package/templates/skills/application/steps/step-05-frontend.md +12 -101
- package/templates/skills/application/steps/step-07-tests.md +12 -132
- package/templates/skills/business-analyse/SKILL.md +67 -6
- package/templates/skills/business-analyse/html/ba-interactive.html +176 -14
- package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +1 -0
- package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +16 -4
- package/templates/skills/business-analyse/html/src/scripts/06-render-consolidation.js +7 -2
- package/templates/skills/business-analyse/html/src/scripts/09-export.js +103 -0
- package/templates/skills/business-analyse/html/src/scripts/10-comments.js +12 -6
- package/templates/skills/business-analyse/html/src/scripts/11-review-panel.js +24 -2
- package/templates/skills/business-analyse/html/src/styles/08-review-panel.css +12 -0
- package/templates/skills/business-analyse/html/src/template.html +1 -0
- package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +477 -0
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +578 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +78 -0
- package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +97 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +92 -0
- package/templates/skills/business-analyse/references/deploy-data-build.md +121 -0
- package/templates/skills/business-analyse/references/deploy-modes.md +49 -0
- package/templates/skills/business-analyse/references/handoff-file-templates.md +119 -0
- package/templates/skills/business-analyse/references/handoff-mappings.md +81 -0
- package/templates/skills/business-analyse/references/html-data-mapping.md +10 -2
- package/templates/skills/business-analyse/references/init-schema-deployment.md +65 -0
- package/templates/skills/business-analyse/references/review-data-mapping.md +363 -0
- package/templates/skills/business-analyse/references/robustness-checks.md +538 -0
- package/templates/skills/business-analyse/references/spec-auto-inference.md +57 -0
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +85 -0
- package/templates/skills/business-analyse/references/ui-resource-cards.md +110 -0
- package/templates/skills/business-analyse/references/validate-incremental-html.md +55 -0
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +33 -1
- package/templates/skills/business-analyse/steps/step-00-init.md +186 -53
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +5 -194
- package/templates/skills/business-analyse/steps/step-03a-data.md +42 -49
- package/templates/skills/business-analyse/steps/step-03b-ui.md +12 -178
- package/templates/skills/business-analyse/steps/step-03c-compile.md +71 -2
- package/templates/skills/business-analyse/steps/step-03d-validate.md +277 -48
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +175 -104
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +66 -438
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +35 -184
- package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +526 -0
- package/templates/skills/business-analyse/steps/step-06-review.md +277 -0
- package/templates/skills/cc-agent/references/agent-behavior-patterns.md +95 -0
- package/templates/skills/cc-agent/steps/step-02-generate.md +5 -78
- package/templates/skills/check-version/SKILL.md +7 -0
- package/templates/skills/controller/references/controller-code-templates.md +159 -0
- package/templates/skills/controller/references/permission-sync-templates.md +152 -0
- package/templates/skills/controller/steps/step-03-generate.md +166 -158
- package/templates/skills/controller/steps/step-04-perms.md +5 -144
- package/templates/skills/controller/templates.md +11 -2
- package/templates/skills/debug/SKILL.md +7 -0
- package/templates/skills/explore/SKILL.md +6 -0
- package/templates/skills/feature-full/SKILL.md +39 -142
- package/templates/skills/feature-full/steps/step-01-implementation.md +120 -0
- package/templates/skills/gitflow/references/init-config-template.md +135 -0
- package/templates/skills/gitflow/references/init-name-normalization.md +103 -0
- package/templates/skills/gitflow/references/plan-template.md +69 -0
- package/templates/skills/gitflow/references/start-efcore-preflight.md +70 -0
- package/templates/skills/gitflow/references/start-local-config.md +110 -0
- package/templates/skills/gitflow/steps/step-init.md +18 -289
- package/templates/skills/gitflow/steps/step-plan.md +6 -63
- package/templates/skills/gitflow/steps/step-start.md +16 -126
- package/templates/skills/mcp/SKILL.md +9 -213
- package/templates/skills/mcp/steps/step-01-healthcheck.md +108 -0
- package/templates/skills/mcp/steps/step-02-tools.md +73 -0
- package/templates/skills/notification/SKILL.md +7 -0
- package/templates/skills/quick-search/SKILL.md +5 -0
- package/templates/skills/ralph-loop/SKILL.md +99 -381
- package/templates/skills/ralph-loop/references/category-rules.md +259 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +182 -0
- package/templates/skills/ralph-loop/references/core-seed-data.md +173 -21
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +259 -0
- package/templates/skills/ralph-loop/references/team-orchestration.md +189 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +111 -383
- package/templates/skills/ralph-loop/steps/step-01-task.md +79 -896
- package/templates/skills/ralph-loop/steps/step-02-execute.md +68 -680
- package/templates/skills/ralph-loop/steps/step-03-commit.md +47 -277
- package/templates/skills/ralph-loop/steps/step-04-check.md +124 -607
- package/templates/skills/ralph-loop/steps/step-05-report.md +68 -367
- package/templates/skills/refactor/SKILL.md +12 -176
- package/templates/skills/refactor/steps/step-01-discover.md +60 -0
- package/templates/skills/refactor/steps/step-02-execute.md +67 -0
- package/templates/skills/review-code/SKILL.md +19 -257
- package/templates/skills/review-code/steps/step-01-smartstack.md +96 -0
- package/templates/skills/review-code/steps/step-02-detailed-review.md +80 -0
- package/templates/skills/review-code/steps/step-03-react.md +44 -0
- package/templates/skills/ui-components/SKILL.md +7 -0
- package/templates/skills/utils/SKILL.md +6 -0
- package/templates/skills/validate/SKILL.md +6 -0
- package/templates/skills/validate-feature/SKILL.md +8 -0
- package/templates/skills/workflow/SKILL.md +40 -118
- package/templates/skills/workflow/steps/step-01-implementation.md +84 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Team Orchestration — Multi-Module Parallel Execution
|
|
2
|
+
|
|
3
|
+
> **Loaded by:** step-00 when multi-module detected (PRD_COUNT > 1)
|
|
4
|
+
> **Purpose:** Parallelize independent modules via Agent Teams.
|
|
5
|
+
> **Rule:** Single module = NO team. Only create team for 2+ modules.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Layer Detection
|
|
10
|
+
|
|
11
|
+
Read dependency graph from master feature.json:
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
const master = readJSON(MASTER_FEATURE);
|
|
15
|
+
const layers = master.metadata?.workflow?.dependencyGraph?.layers
|
|
16
|
+
|| master.dependencyGraph?.layers;
|
|
17
|
+
|
|
18
|
+
// Example layers:
|
|
19
|
+
// [
|
|
20
|
+
// { layer: 0, modules: ["employees"], reason: "foundation" },
|
|
21
|
+
// { layer: 1, modules: ["timetracking", "leavemanagement"], reason: "depends on employees" },
|
|
22
|
+
// { layer: 2, modules: ["reporting"], reason: "depends on all" }
|
|
23
|
+
// ]
|
|
24
|
+
|
|
25
|
+
// Fallback: if no layers, treat all modules as sequential (layer 0, 1, 2...)
|
|
26
|
+
if (!layers) {
|
|
27
|
+
const modules = queue.modules.map((m, i) => ({
|
|
28
|
+
layer: i, modules: [m.code], reason: "sequential"
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 2. Team Setup
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
// Create team
|
|
39
|
+
TeamCreate({ team_name: `ralph-${appName}` });
|
|
40
|
+
|
|
41
|
+
// Store team context
|
|
42
|
+
const teamContext = {
|
|
43
|
+
teamName: `ralph-${appName}`,
|
|
44
|
+
layers: layers,
|
|
45
|
+
currentLayer: 0,
|
|
46
|
+
teammates: {} // name → agentId mapping (populated after spawn)
|
|
47
|
+
};
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 3. Teammate Spawn — Per Layer
|
|
53
|
+
|
|
54
|
+
For each layer, spawn teammates IN PARALLEL (single message, multiple Task calls):
|
|
55
|
+
|
|
56
|
+
```javascript
|
|
57
|
+
for (const layer of layers) {
|
|
58
|
+
// Wait for previous layer to complete (except layer 0)
|
|
59
|
+
if (layer.layer > 0) {
|
|
60
|
+
// WAIT: check for MODULE_COMPLETE messages from all previous layer teammates
|
|
61
|
+
// Messages are automatically delivered via SendMessage
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Spawn all modules in this layer in parallel
|
|
65
|
+
for (const moduleCode of layer.modules) {
|
|
66
|
+
const prdFile = `.ralph/prd-${moduleCode}.json`;
|
|
67
|
+
const prdContent = readJSON(prdFile);
|
|
68
|
+
|
|
69
|
+
Task({
|
|
70
|
+
subagent_type: "general-purpose",
|
|
71
|
+
team_name: `ralph-${appName}`,
|
|
72
|
+
name: `mod-${moduleCode}`,
|
|
73
|
+
mode: "bypassPermissions",
|
|
74
|
+
prompt: TEAMMATE_PROMPT(moduleCode, prdContent),
|
|
75
|
+
description: `Module ${moduleCode}`
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 4. Teammate Prompt Template
|
|
84
|
+
|
|
85
|
+
Each teammate receives a self-contained prompt with all context:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
You are a Ralph Loop module worker for module "${moduleCode}".
|
|
89
|
+
|
|
90
|
+
## Your Mission
|
|
91
|
+
Implement ALL tasks in the PRD below, following SmartStack conventions.
|
|
92
|
+
Execute autonomously: domain → infrastructure → MIGRATION → seed data → application → api → frontend → i18n → tests → validation.
|
|
93
|
+
|
|
94
|
+
## PRD (your task list)
|
|
95
|
+
${JSON.stringify(prdContent, null, 2)}
|
|
96
|
+
|
|
97
|
+
## Execution Rules
|
|
98
|
+
1. Read the skill file at: templates/skills/ralph-loop/references/category-rules.md
|
|
99
|
+
2. For seed data tasks, also read: templates/skills/ralph-loop/references/core-seed-data.md
|
|
100
|
+
3. Follow SmartStack conventions (MCP validation after each batch)
|
|
101
|
+
4. MIGRATION is MANDATORY after EF configs: mcp suggest_migration → dotnet ef migrations add → database update
|
|
102
|
+
5. Tests MUST pass before proceeding (dotnet test = 0 failures)
|
|
103
|
+
6. Frontend in src/pages/{Context}/{App}/{Module}/ (NOT flat)
|
|
104
|
+
7. Commit after each batch: git add + git commit
|
|
105
|
+
|
|
106
|
+
## Communication Protocol
|
|
107
|
+
- After domain + infrastructure + migration are done and build passes:
|
|
108
|
+
SendMessage({ type: "message", recipient: "team-lead", content: "LAYER_READY:${moduleCode}", summary: "${moduleCode} foundation ready" })
|
|
109
|
+
- When ALL tasks complete:
|
|
110
|
+
SendMessage({ type: "message", recipient: "team-lead", content: "MODULE_COMPLETE:${moduleCode}", summary: "${moduleCode} complete" })
|
|
111
|
+
- On blocking error:
|
|
112
|
+
SendMessage({ type: "message", recipient: "team-lead", content: "ERROR:${moduleCode}:{error}", summary: "${moduleCode} blocked" })
|
|
113
|
+
|
|
114
|
+
## Project Context
|
|
115
|
+
- Project path: ${projectPath}
|
|
116
|
+
- Branch: ${branch}
|
|
117
|
+
- Application: ${appName}
|
|
118
|
+
- Context: ${contextCode}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 5. Team Lead Wait Logic
|
|
124
|
+
|
|
125
|
+
After spawning a layer, the team lead waits for completion:
|
|
126
|
+
|
|
127
|
+
```javascript
|
|
128
|
+
// Track expected messages
|
|
129
|
+
const expectedMessages = layer.modules.length;
|
|
130
|
+
let receivedComplete = 0;
|
|
131
|
+
let receivedReady = 0;
|
|
132
|
+
let errors = [];
|
|
133
|
+
|
|
134
|
+
// Messages arrive automatically via SendMessage
|
|
135
|
+
// When a teammate sends "MODULE_COMPLETE:xxx", increment counter
|
|
136
|
+
// When a teammate sends "ERROR:xxx:yyy", record error
|
|
137
|
+
|
|
138
|
+
// For LAYER_READY: wait until all layer 0 modules signal before spawning layer 1
|
|
139
|
+
// For MODULE_COMPLETE: wait until all layer N modules complete before spawning layer N+1
|
|
140
|
+
|
|
141
|
+
// If error received:
|
|
142
|
+
// - Log to progress.txt
|
|
143
|
+
// - Decide: retry module or mark as partial
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 6. Cross-Module Verification
|
|
149
|
+
|
|
150
|
+
After all layers complete, team lead runs:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Full solution build
|
|
154
|
+
dotnet build --no-restore
|
|
155
|
+
|
|
156
|
+
# Full test suite
|
|
157
|
+
dotnet test --no-build
|
|
158
|
+
|
|
159
|
+
# MCP validation
|
|
160
|
+
mcp__smartstack__validate_conventions checks=["all"]
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 7. Cleanup
|
|
166
|
+
|
|
167
|
+
After all modules done and report generated:
|
|
168
|
+
|
|
169
|
+
```javascript
|
|
170
|
+
// Shutdown all teammates
|
|
171
|
+
for (const [name, _] of Object.entries(teamContext.teammates)) {
|
|
172
|
+
SendMessage({ type: "shutdown_request", recipient: name, content: "All modules complete" });
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Wait for shutdown confirmations, then:
|
|
176
|
+
TeamDelete();
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Decision Matrix
|
|
182
|
+
|
|
183
|
+
| Condition | Action |
|
|
184
|
+
|-----------|--------|
|
|
185
|
+
| 1 module | NO team, classic compact loop |
|
|
186
|
+
| 2+ modules, no dependency graph | Sequential layers (one at a time) |
|
|
187
|
+
| 2+ modules, with layers | Parallel within each layer |
|
|
188
|
+
| Teammate error | Log, try to continue other modules |
|
|
189
|
+
| All modules done | Cross-module verify → step-05 → TeamDelete |
|