@atlashub/smartstack-cli 3.32.0 → 3.34.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/.documentation/agents.html +5 -1
- package/.documentation/apex.html +644 -0
- package/.documentation/business-analyse.html +81 -1
- package/.documentation/cli-commands.html +5 -1
- package/.documentation/commands.html +5 -1
- package/.documentation/efcore.html +5 -1
- package/.documentation/gitflow.html +5 -1
- package/.documentation/hooks.html +5 -1
- package/.documentation/index.html +60 -2
- package/.documentation/init.html +5 -1
- package/.documentation/installation.html +5 -1
- package/.documentation/ralph-loop.html +365 -216
- package/.documentation/test-web.html +5 -1
- package/package.json +1 -1
- package/templates/agents/ba-writer.md +142 -15
- package/templates/skills/apex/SKILL.md +7 -1
- package/templates/skills/apex/_shared.md +49 -4
- package/templates/skills/{ralph-loop → apex}/references/core-seed-data.md +20 -11
- package/templates/skills/{ralph-loop → apex}/references/error-classification.md +2 -1
- package/templates/skills/apex/references/post-checks.md +238 -3
- package/templates/skills/apex/references/smartstack-api.md +47 -7
- package/templates/skills/apex/references/smartstack-frontend.md +47 -1
- package/templates/skills/apex/references/smartstack-layers.md +3 -1
- package/templates/skills/apex/steps/step-00-init.md +48 -1
- package/templates/skills/apex/steps/step-01-analyze.md +37 -0
- package/templates/skills/apex/steps/step-02-plan.md +36 -0
- package/templates/skills/apex/steps/step-03-execute.md +42 -2
- package/templates/skills/apex/steps/step-04-examine.md +110 -2
- package/templates/skills/business-analyse/SKILL.md +29 -19
- package/templates/skills/business-analyse/_module-loop.md +68 -9
- package/templates/skills/business-analyse/_shared.md +71 -21
- package/templates/skills/business-analyse/questionnaire/00-application.md +4 -2
- package/templates/skills/business-analyse/questionnaire/00b-project.md +85 -0
- package/templates/skills/business-analyse/references/deploy-modes.md +69 -0
- package/templates/skills/business-analyse/references/team-orchestration.md +158 -7
- package/templates/skills/business-analyse/schemas/application-schema.json +2 -1
- package/templates/skills/business-analyse/schemas/project-schema.json +490 -0
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -1
- package/templates/skills/business-analyse/steps/step-00-init.md +30 -4
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +62 -2
- package/templates/skills/business-analyse/steps/step-01b-applications.md +252 -0
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +23 -6
- package/templates/skills/business-analyse/steps/step-03d-validate.md +27 -6
- package/templates/skills/business-analyse/steps/step-04a-collect.md +111 -0
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +296 -103
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +46 -14
- package/templates/skills/documentation/SKILL.md +92 -2
- package/templates/skills/ralph-loop/SKILL.md +9 -17
- package/templates/skills/ralph-loop/references/category-rules.md +43 -692
- package/templates/skills/ralph-loop/references/compact-loop.md +104 -427
- package/templates/skills/ralph-loop/references/team-orchestration.md +13 -14
- package/templates/skills/ralph-loop/steps/step-02-execute.md +49 -704
- package/templates/skills/ralph-loop/steps/step-03-commit.md +38 -79
- package/templates/skills/ralph-loop/steps/step-04-check.md +39 -58
- package/templates/skills/ralph-loop/steps/step-05-report.md +12 -123
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<header class="global-header">
|
|
13
13
|
<div class="logo">SS</div>
|
|
14
14
|
<span class="site-title">SmartStack CLI</span>
|
|
15
|
-
<span class="version-badge">v3.
|
|
15
|
+
<span class="version-badge">v3.34.0</span>
|
|
16
16
|
<div class="header-divider"></div>
|
|
17
17
|
<span class="page-title">Test Web</span>
|
|
18
18
|
<nav class="breadcrumb">
|
|
@@ -90,6 +90,10 @@
|
|
|
90
90
|
<span class="icon">🔄</span>
|
|
91
91
|
<span class="nav-text">Ralph Loop</span>
|
|
92
92
|
</a>
|
|
93
|
+
<a href="apex.html" class="nav-item">
|
|
94
|
+
<span class="icon">⚙</span>
|
|
95
|
+
<span class="nav-text">APEX</span>
|
|
96
|
+
</a>
|
|
93
97
|
</div>
|
|
94
98
|
|
|
95
99
|
<div class="nav-section">
|
package/package.json
CHANGED
|
@@ -10,11 +10,14 @@ You are a business analysis writer agent specialized in managing feature.json fi
|
|
|
10
10
|
|
|
11
11
|
## Mission
|
|
12
12
|
|
|
13
|
-
Write and update feature.json files for
|
|
13
|
+
Write and update feature.json files for project-level (multi-app), application-level (master), and module-level documents. Handle progressive enrichment of features as they move through analysis phases, manage versioning for refactoring, and enforce schema consistency.
|
|
14
14
|
|
|
15
|
-
**Directory structure:**
|
|
16
|
-
-
|
|
17
|
-
-
|
|
15
|
+
**Directory structure (3-tier hierarchy):**
|
|
16
|
+
- Project-level (multi-app only): `docs/business-analyse/v{X.Y}/feature.json`
|
|
17
|
+
- Application-level: `docs/{context}/{app}/business-analyse/v{X.Y}/feature.json`
|
|
18
|
+
- Module-level: `docs/{context}/{app}/{module}/business-analyse/v{X.Y}/feature.json`
|
|
19
|
+
|
|
20
|
+
> **Backward compatibility:** If only 1 application, the project level is NOT created. The application-level feature.json remains the master.
|
|
18
21
|
|
|
19
22
|
## Core Operations
|
|
20
23
|
|
|
@@ -23,16 +26,19 @@ Create an initial feature.json with metadata and draft status.
|
|
|
23
26
|
|
|
24
27
|
**Input:**
|
|
25
28
|
- metadata: object with app, module, language, featureDescription, featureType, useCase
|
|
26
|
-
- scope: "application" or "module" (default: "module")
|
|
29
|
+
- scope: "project", "application", or "module" (default: "module")
|
|
27
30
|
- Optional: applicationRef (FEAT-NNN of master, required when scope = "module" in app mode)
|
|
31
|
+
- Optional: projectRef (PROJ-NNN of project master, required when scope = "application" in project mode)
|
|
32
|
+
- Optional: context (default: "business", allows "platform" or "personal" in project mode)
|
|
28
33
|
- Optional: initialSections for pre-populated content
|
|
29
34
|
|
|
30
35
|
**Process:**
|
|
31
|
-
1. Read `.business-analyse/config.json` to get lastFeatureId
|
|
32
|
-
2. Increment FEAT-NNN identifier
|
|
36
|
+
1. Read `.business-analyse/config.json` to get lastFeatureId (or lastProjectId for scope = "project")
|
|
37
|
+
2. Increment FEAT-NNN (or PROJ-NNN) identifier
|
|
33
38
|
3. Create directory structure based on scope:
|
|
34
|
-
- If scope = "
|
|
35
|
-
- If scope = "
|
|
39
|
+
- If scope = "project": `docs/business-analyse/v1.0/`
|
|
40
|
+
- If scope = "application": `docs/{context}/{app}/business-analyse/v1.0/`
|
|
41
|
+
- If scope = "module": `docs/{context}/{app}/{module}/business-analyse/v1.0/`
|
|
36
42
|
4. Generate initial feature.json with:
|
|
37
43
|
- **`$schema`**: relative path to the deployed schema file (MANDATORY — see $schema rules below)
|
|
38
44
|
- id: FEAT-NNN (from config)
|
|
@@ -40,6 +46,7 @@ Create an initial feature.json with metadata and draft status.
|
|
|
40
46
|
- status: "draft"
|
|
41
47
|
- scope: "application" or "module"
|
|
42
48
|
- metadata: createdAt, updatedAt, createdBy, updatedBy, previousVersion: null, scope, applicationRef
|
|
49
|
+
- For project scope: cadrage: {}, applications: [], applicationDependencyGraph: {}, consolidation: {}, suggestions: [], changelog: []
|
|
43
50
|
- For application scope: cadrage: {}, modules: [], dependencyGraph: {}, consolidation: {}, suggestions: [], changelog: []
|
|
44
51
|
- For module scope: discovery: {}, analysis: {}, specification: {}, validation: {}, handoff: {}, suggestions: [], applicationContext: {}
|
|
45
52
|
5. Update `.business-analyse/config.json` with new lastFeatureId
|
|
@@ -64,6 +71,83 @@ Create a master application-level feature.json. Shorthand for `create` with `sco
|
|
|
64
71
|
2. Initialize `metadata.workflow` with mode, moduleOrder: [], currentModuleIndex: 0, completedModules: [], currentModule: null
|
|
65
72
|
3. Return feature ID and path
|
|
66
73
|
|
|
74
|
+
### createProjectFeature
|
|
75
|
+
Create a project-level feature.json for multi-application analysis. Only used when 2+ applications are identified.
|
|
76
|
+
|
|
77
|
+
**Input:**
|
|
78
|
+
- metadata: object with projectName, language, featureDescription
|
|
79
|
+
- cadrage: object with project-level cadrage data (problem, stakeholders, globalScope, globalRoles, risks)
|
|
80
|
+
|
|
81
|
+
**Process:**
|
|
82
|
+
1. Read `.business-analyse/config.json` to get lastProjectId (default: 0)
|
|
83
|
+
2. Increment PROJ-NNN identifier
|
|
84
|
+
3. Create directory: `docs/business-analyse/v1.0/`
|
|
85
|
+
4. Generate project feature.json with:
|
|
86
|
+
- `$schema`: `"../schemas/project-schema.json"`
|
|
87
|
+
- id: PROJ-NNN
|
|
88
|
+
- version: "1.0"
|
|
89
|
+
- status: "draft"
|
|
90
|
+
- scope: "project"
|
|
91
|
+
- metadata: projectName, language, workflow: { mode: "project", applicationOrder: [], currentApplicationIndex: 0, completedApplications: [], currentApplication: null }
|
|
92
|
+
- cadrage: from input
|
|
93
|
+
- applications: []
|
|
94
|
+
- applicationDependencyGraph: {}
|
|
95
|
+
- consolidation: {}
|
|
96
|
+
- suggestions: []
|
|
97
|
+
- changelog: []
|
|
98
|
+
5. Update `.business-analyse/config.json` with new lastProjectId
|
|
99
|
+
6. Deploy schemas to `docs/business-analyse/schemas/` (including project-schema.json)
|
|
100
|
+
7. Return project ID (PROJ-NNN) and path
|
|
101
|
+
|
|
102
|
+
### enrichApplicationRegistry
|
|
103
|
+
Update the applications array and dependency graph in a project-level feature.json.
|
|
104
|
+
|
|
105
|
+
**Input:**
|
|
106
|
+
- projectId: PROJ-NNN of the project feature.json
|
|
107
|
+
- applications: array of application objects (code, name, context, tablePrefix, icon, description, applicationRoles[], scope, dependencies[], estimatedComplexity)
|
|
108
|
+
- applicationDependencyGraph: object with edges[], topologicalOrder[], layers[]
|
|
109
|
+
|
|
110
|
+
**Process:**
|
|
111
|
+
1. Find project feature.json (verify scope = "project")
|
|
112
|
+
2. Replace `applications` array entirely
|
|
113
|
+
3. Replace `applicationDependencyGraph` object entirely
|
|
114
|
+
4. For each application, set initial status: "pending"
|
|
115
|
+
5. Set metadata.workflow.applicationOrder from applicationDependencyGraph.topologicalOrder
|
|
116
|
+
6. Set metadata.workflow.currentApplication to first application in order
|
|
117
|
+
7. Update metadata.updatedAt
|
|
118
|
+
8. Write back
|
|
119
|
+
9. Return confirmation
|
|
120
|
+
|
|
121
|
+
### updateApplicationStatus
|
|
122
|
+
Update the status of a specific application in the project feature.json.
|
|
123
|
+
|
|
124
|
+
**Input:**
|
|
125
|
+
- projectId: PROJ-NNN of the project
|
|
126
|
+
- applicationCode: string (PascalCase application code)
|
|
127
|
+
- status: "pending" | "in-progress" | "decomposed" | "specified" | "consolidated"
|
|
128
|
+
|
|
129
|
+
**Process:**
|
|
130
|
+
1. Find project feature.json
|
|
131
|
+
2. Find application by code in `applications[]`
|
|
132
|
+
3. Update application.status
|
|
133
|
+
4. Update metadata.updatedAt
|
|
134
|
+
5. Write back
|
|
135
|
+
6. Return confirmation
|
|
136
|
+
|
|
137
|
+
### advanceApplicationLoop
|
|
138
|
+
Increment the application loop counter in the project feature.json.
|
|
139
|
+
|
|
140
|
+
**Process:**
|
|
141
|
+
1. Find project feature.json
|
|
142
|
+
2. Read `metadata.workflow.currentApplicationIndex` and `metadata.workflow.applicationOrder`
|
|
143
|
+
3. Add current application to `metadata.workflow.completedApplications`
|
|
144
|
+
4. Increment `metadata.workflow.currentApplicationIndex`
|
|
145
|
+
5. If new index < applicationOrder.length: set `currentApplication` to next application
|
|
146
|
+
6. If new index >= applicationOrder.length: set `currentApplication` to null
|
|
147
|
+
7. Update metadata.updatedAt
|
|
148
|
+
8. Write back
|
|
149
|
+
9. Return new index, next application code (or null), and whether loop is complete
|
|
150
|
+
|
|
67
151
|
### enrichSection
|
|
68
152
|
Merge a section into an existing feature.json.
|
|
69
153
|
|
|
@@ -223,9 +307,16 @@ Transition the status through defined workflow.
|
|
|
223
307
|
- specified → consolidated
|
|
224
308
|
- consolidated → handed-off
|
|
225
309
|
|
|
310
|
+
**Valid transitions (project-level):**
|
|
311
|
+
- draft → framed
|
|
312
|
+
- framed → decomposed
|
|
313
|
+
- decomposed → specified
|
|
314
|
+
- specified → consolidated
|
|
315
|
+
- consolidated → handed-off
|
|
316
|
+
|
|
226
317
|
**Process:**
|
|
227
318
|
1. Read feature.json
|
|
228
|
-
2. Detect scope (application or module) to determine valid transitions
|
|
319
|
+
2. Detect scope (project, application, or module) to determine valid transitions
|
|
229
320
|
3. Verify current status allows transition
|
|
230
321
|
4. Update status field
|
|
231
322
|
5. Update metadata.steps object with timestamp for the corresponding step
|
|
@@ -498,17 +589,23 @@ On EVERY `enrichSection()` call:
|
|
|
498
589
|
## Directory Structure
|
|
499
590
|
|
|
500
591
|
```
|
|
501
|
-
docs/business
|
|
592
|
+
docs/business-analyse/
|
|
593
|
+
v1.0/
|
|
594
|
+
feature.json ← PROJECT (multi-app master, only if 2+ apps)
|
|
595
|
+
|
|
596
|
+
docs/{context}/{app}/business-analyse/
|
|
502
597
|
v1.0/
|
|
503
598
|
feature.json ← APPLICATION (master)
|
|
504
599
|
|
|
505
|
-
docs/
|
|
600
|
+
docs/{context}/{app}/{module}/business-analyse/
|
|
506
601
|
v1.0/
|
|
507
602
|
feature.json ← MODULE (detailed)
|
|
508
603
|
v1.1/
|
|
509
604
|
feature.json
|
|
510
605
|
```
|
|
511
606
|
|
|
607
|
+
> **{context}** = "business" (default) | "platform" | "personal" — determined per application in project mode.
|
|
608
|
+
|
|
512
609
|
Versions are stored as separate files in versioned directories. Always store feature.json at the root of each version folder.
|
|
513
610
|
|
|
514
611
|
## Config Management
|
|
@@ -519,6 +616,7 @@ Versions are stored as separate files in versioned directories. Always store fea
|
|
|
519
616
|
```json
|
|
520
617
|
{
|
|
521
618
|
"lastFeatureId": 42,
|
|
619
|
+
"lastProjectId": 1,
|
|
522
620
|
"lastMigrationId": 15,
|
|
523
621
|
"schema": "1.0"
|
|
524
622
|
}
|
|
@@ -670,8 +768,9 @@ If a module feature.json exceeds 500KB despite incremental operations:
|
|
|
670
768
|
|
|
671
769
|
| Scope | Feature.json location | $schema value |
|
|
672
770
|
|-------|----------------------|---------------|
|
|
673
|
-
|
|
|
674
|
-
|
|
|
771
|
+
| project | `docs/business-analyse/v1.0/feature.json` | `"../schemas/project-schema.json"` |
|
|
772
|
+
| application | `docs/{context}/{app}/business-analyse/v1.0/feature.json` | `"../schemas/application-schema.json"` |
|
|
773
|
+
| module | `docs/{context}/{app}/{module}/business-analyse/v1.0/feature.json` | `"../../../business-analyse/schemas/feature-schema.json"` |
|
|
675
774
|
|
|
676
775
|
**Rules:**
|
|
677
776
|
- `$schema` is ALWAYS the FIRST field in feature.json (before `id`)
|
|
@@ -726,7 +825,7 @@ If a module feature.json exceeds 500KB despite incremental operations:
|
|
|
726
825
|
"version": "1.0",
|
|
727
826
|
"status": "draft",
|
|
728
827
|
"scope": "application",
|
|
729
|
-
"metadata": { "..." },
|
|
828
|
+
"metadata": { "...", "projectRef": "PROJ-001" },
|
|
730
829
|
"cadrage": {},
|
|
731
830
|
"modules": [],
|
|
732
831
|
"dependencyGraph": {},
|
|
@@ -735,3 +834,31 @@ If a module feature.json exceeds 500KB despite incremental operations:
|
|
|
735
834
|
"changelog": []
|
|
736
835
|
}
|
|
737
836
|
```
|
|
837
|
+
|
|
838
|
+
**Project-level (multi-app only):**
|
|
839
|
+
```json
|
|
840
|
+
{
|
|
841
|
+
"$schema": "../schemas/project-schema.json",
|
|
842
|
+
"id": "PROJ-001",
|
|
843
|
+
"version": "1.0",
|
|
844
|
+
"status": "draft",
|
|
845
|
+
"scope": "project",
|
|
846
|
+
"metadata": {
|
|
847
|
+
"projectName": "Enterprise HR Platform",
|
|
848
|
+
"language": "fr",
|
|
849
|
+
"workflow": {
|
|
850
|
+
"mode": "project",
|
|
851
|
+
"applicationOrder": ["HumanResources", "EmployeeSelfService"],
|
|
852
|
+
"currentApplicationIndex": 0,
|
|
853
|
+
"completedApplications": [],
|
|
854
|
+
"currentApplication": "HumanResources"
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
"cadrage": {},
|
|
858
|
+
"applications": [],
|
|
859
|
+
"applicationDependencyGraph": {},
|
|
860
|
+
"consolidation": {},
|
|
861
|
+
"suggestions": [],
|
|
862
|
+
"changelog": []
|
|
863
|
+
}
|
|
864
|
+
```
|
|
@@ -38,6 +38,7 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
38
38
|
| `-e` | Economy mode: no subagents |
|
|
39
39
|
| `-r` | Resume: continue from previous state |
|
|
40
40
|
| `-pr` | PR mode: create pull request at end |
|
|
41
|
+
| `-d {path}` | Delegate mode: read context from PRD file at `{path}`. Implies `-a -e`. Used by `/ralph-loop`. |
|
|
41
42
|
|
|
42
43
|
</parameters>
|
|
43
44
|
|
|
@@ -52,6 +53,8 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
52
53
|
| `{save_mode}` | boolean | Save outputs to `.claude/output/apex/{task-id}/` |
|
|
53
54
|
| `{economy_mode}` | boolean | No subagents |
|
|
54
55
|
| `{pr_mode}` | boolean | Create PR at end |
|
|
56
|
+
| `{delegate_mode}` | boolean | Delegated by `/ralph-loop` via `-d` flag |
|
|
57
|
+
| `{delegate_prd_path}` | string? | Path to PRD file (`.ralph/prd.json` or `.ralph/prd-{module}.json`) |
|
|
55
58
|
| `{context_code}` | string | "business", "platform", "personal" |
|
|
56
59
|
| `{app_name}` | string | Application name |
|
|
57
60
|
| `{module_code}` | string | Module code |
|
|
@@ -95,7 +98,7 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
95
98
|
|
|
96
99
|
| Phase | Step | Obligatory | Description |
|
|
97
100
|
|-------|------|------------|-------------|
|
|
98
|
-
| *Init* | 00 | Yes | Setup, hierarchy, challenge the need |
|
|
101
|
+
| *Init* | 00 | Yes | Setup, hierarchy, challenge the need (skipped in `-d` delegate mode) |
|
|
99
102
|
| **A** — Analyze | 01 | Yes | Explore existing code |
|
|
100
103
|
| **P** — Plan | 02 | Yes | File-by-file plan with skill/MCP mapping |
|
|
101
104
|
| **E** — Execute | 03 | Yes | Orchestrate creation via skills and MCP |
|
|
@@ -112,6 +115,8 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
112
115
|
|------|---------|-----------|
|
|
113
116
|
| `references/smartstack-api.md` | BaseEntity, interfaces, entity/config/controller patterns | step-01, step-03 |
|
|
114
117
|
| `references/smartstack-layers.md` | Layer execution rules, skill/MCP mapping, seed data | step-02, step-03 |
|
|
118
|
+
| `references/core-seed-data.md` | Comprehensive seed data templates (navigation, permissions, roles) | step-03 (delegate mode + seedData tasks) |
|
|
119
|
+
| `references/error-classification.md` | Build error diagnosis categories A-F | step-03 (build failure), step-04 |
|
|
115
120
|
| `references/agent-teams-protocol.md` | TeamCreate, coordination, shutdown protocol | step-01, step-03 |
|
|
116
121
|
</reference_files>
|
|
117
122
|
|
|
@@ -125,6 +130,7 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
125
130
|
- **Agent Teams** - Parallel execution for scan (step-01) and Layer 1 (step-03), unless economy_mode
|
|
126
131
|
- **Save outputs** if `{save_mode}` = true
|
|
127
132
|
- **Commits per layer** - Atomic commits after each execution layer
|
|
133
|
+
- **Delegate mode** (`-d`): Read PRD context, skip challenge questions, auto+economy mode implied. Used when `/ralph-loop` delegates code generation to `/apex`.
|
|
128
134
|
|
|
129
135
|
</execution_rules>
|
|
130
136
|
|
|
@@ -24,6 +24,42 @@
|
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
+
## Delegate Mode Context
|
|
28
|
+
|
|
29
|
+
> **Active when:** `-d {path}` flag is set. Implies `-a` (auto) + `-e` (economy).
|
|
30
|
+
|
|
31
|
+
When `/ralph-loop` invokes `/apex -d {prd_path}`:
|
|
32
|
+
|
|
33
|
+
1. **Read PRD** from `{delegate_prd_path}` (`.ralph/prd.json` or `.ralph/prd-{module}.json`)
|
|
34
|
+
2. **Extract context:**
|
|
35
|
+
- `context_code` = `prd.project.context` (e.g., "business")
|
|
36
|
+
- `app_name` = `prd.project.application` (e.g., "HumanResources")
|
|
37
|
+
- `module_code` = `prd.project.module` (e.g., "EmployeeManagement")
|
|
38
|
+
- `sections` = from `_seedDataMeta.coreSeedData.navigationSections` in infrastructure tasks
|
|
39
|
+
- `entities` = from `prd.tasks` filtered by `category == 'domain'` (entity names from description)
|
|
40
|
+
- `feature_path` = `prd.source.feature_json_path`
|
|
41
|
+
3. **Read task metadata** per category:
|
|
42
|
+
- `_seedDataMeta` → seed data scope (coreSeedData, navRoute, appLabels)
|
|
43
|
+
- `_frontendMeta` → wireframes, filesToCreate, fkFields
|
|
44
|
+
- `_migrationMeta` → entities[], moduleCode
|
|
45
|
+
4. **Skip:** challenge questions (step-00 §5), user checkpoints (step-01 §6, step-02 §6)
|
|
46
|
+
5. **No nested teams:** `-e` implied, all execution sequential on agent principal
|
|
47
|
+
|
|
48
|
+
### PRD State Update Protocol (delegate mode only)
|
|
49
|
+
|
|
50
|
+
After completing each layer in step-03, update the PRD file:
|
|
51
|
+
```
|
|
52
|
+
Read {delegate_prd_path}
|
|
53
|
+
For each task executed in this layer:
|
|
54
|
+
task.status = 'completed' (or 'failed')
|
|
55
|
+
task.completed_at = ISO timestamp
|
|
56
|
+
task.commit_hash = git rev-parse --short HEAD
|
|
57
|
+
task.files_changed = { created: [...], modified: [...] }
|
|
58
|
+
Write back to {delegate_prd_path}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
27
63
|
## MCP Tools Reference
|
|
28
64
|
|
|
29
65
|
### Mandatory (every execution)
|
|
@@ -41,9 +77,18 @@
|
|
|
41
77
|
| Resource | `{context}.{app}.{module}.{section}.{resource}.{action}` | 5+1 segments |
|
|
42
78
|
|
|
43
79
|
**Examples:**
|
|
44
|
-
- Module: `business.
|
|
45
|
-
- Section: `business.
|
|
46
|
-
- Resource: `business.
|
|
80
|
+
- Module: `business.human-resources.employees.read` (3+1)
|
|
81
|
+
- Section: `business.human-resources.employees.departments.read` (4+1)
|
|
82
|
+
- Resource: `business.human-resources.employees.departments.export.execute` (5+1)
|
|
83
|
+
|
|
84
|
+
> **CRITICAL — Permission codes use the SAME kebab-case segments as NavRoute codes.**
|
|
85
|
+
> Every dot-separated segment in a permission path is a navigation entity code.
|
|
86
|
+
> Multi-word codes MUST be kebab-case: `human-resources`, NOT `humanresources`.
|
|
87
|
+
>
|
|
88
|
+
> SmartStack.app reference: `business.support-client.my-tickets.read`, `platform.administration.email-templates.read`
|
|
89
|
+
>
|
|
90
|
+
> **FORBIDDEN:** `business.humanresources.employees.read` (concatenated — no kebab-case)
|
|
91
|
+
> **CORRECT:** `business.human-resources.employees.read` (kebab-case — matches NavRoute)
|
|
47
92
|
|
|
48
93
|
### Generation (step-03)
|
|
49
94
|
|
|
@@ -55,7 +100,7 @@
|
|
|
55
100
|
| `scaffold_api_client` | Generate TypeScript API client | Frontend changes |
|
|
56
101
|
| `scaffold_routes` | Generate React Router routes | Frontend changes |
|
|
57
102
|
|
|
58
|
-
### eXamine (step-04) —
|
|
103
|
+
### eXamine (step-04) — 43 POST-CHECKs
|
|
59
104
|
|
|
60
105
|
| Tool | Purpose | Condition |
|
|
61
106
|
|------|---------|-----------|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# Core Seed Data - Execution Reference
|
|
2
2
|
|
|
3
|
-
> **Loaded by:** step-
|
|
4
|
-
> **Condition:**
|
|
3
|
+
> **Loaded by:** apex step-03-execute (delegate mode + seedData tasks) and step-04-examine
|
|
4
|
+
> **Condition:** Seed data generation — infrastructure or seedData category tasks
|
|
5
5
|
> **Applies to:** Client projects only (seeding_strategy = "provider", ExtensionsDbContext)
|
|
6
6
|
>
|
|
7
7
|
> **Source of truth:** `/application` skill `templates-seed.md` (lines 608-916)
|
|
8
|
+
> **Moved from:** `ralph-loop/references/core-seed-data.md` (delegation refactoring)
|
|
8
9
|
|
|
9
10
|
---
|
|
10
11
|
|
|
@@ -25,9 +26,9 @@ const permissions = coreSeedData.permissions || [];
|
|
|
25
26
|
const rolePerms = coreSeedData.rolePermissions || [];
|
|
26
27
|
|
|
27
28
|
// Derived context (from guardrail or PRD)
|
|
28
|
-
const navRoute = meta.navRoute; // e.g. "business.
|
|
29
|
+
const navRoute = meta.navRoute; // e.g. "business.human-resources.projects"
|
|
29
30
|
const contextCode = meta.contextCode; // e.g. "business"
|
|
30
|
-
const appCode = meta.appCode; // e.g. "
|
|
31
|
+
const appCode = meta.appCode; // e.g. "human-resources"
|
|
31
32
|
const moduleCode = task.module; // e.g. "projects"
|
|
32
33
|
|
|
33
34
|
// If _seedDataMeta is absent, fallback to PRD source
|
|
@@ -41,9 +42,9 @@ if (!navRoute) {
|
|
|
41
42
|
|
|
42
43
|
| Variable | Example | Source |
|
|
43
44
|
|----------|---------|--------|
|
|
44
|
-
| `navRoute` | `business.
|
|
45
|
+
| `navRoute` | `business.human-resources.projects` | `_seedDataMeta.navRoute` |
|
|
45
46
|
| `contextCode` | `business` | `_seedDataMeta.contextCode` |
|
|
46
|
-
| `appCode` | `
|
|
47
|
+
| `appCode` | `human-resources` | `_seedDataMeta.appCode` |
|
|
47
48
|
| `moduleCode` | `projects` | `task.module` |
|
|
48
49
|
| `navModules[]` | `[{code, label, icon, route, translations}]` | `coreSeedData.navigationModules` |
|
|
49
50
|
| `navSections[]` | `[{code, label, icon, route, parentCode, permission, sort}]` | `coreSeedData.navigationSections` |
|
|
@@ -85,7 +86,7 @@ From `seedDataCore.navigationApplications[0]` in feature.json (generated by BA s
|
|
|
85
86
|
// Deterministic GUID for APPLICATION (not context — contexts are pre-seeded by SmartStack core)
|
|
86
87
|
public static readonly Guid ApplicationId =
|
|
87
88
|
GenerateDeterministicGuid("navigation-application-{contextCode}.{appCode}");
|
|
88
|
-
// Example: GenerateDeterministicGuid("navigation-application-business.
|
|
89
|
+
// Example: GenerateDeterministicGuid("navigation-application-business.human-resources")
|
|
89
90
|
//
|
|
90
91
|
// FORBIDDEN — Context IDs must NOT be generated:
|
|
91
92
|
// public static readonly Guid BusinessContextId = GenerateDeterministicGuid("nav:business"); // WRONG!
|
|
@@ -244,7 +245,7 @@ private static Guid GenerateDeterministicGuid(string seed)
|
|
|
244
245
|
|
|
245
246
|
// Usage: GUIDs are derived from the navigation path
|
|
246
247
|
public static readonly Guid ModuleId = GenerateDeterministicGuid("navigation-module-{navRoute}");
|
|
247
|
-
// Example: GenerateDeterministicGuid("navigation-module-business.
|
|
248
|
+
// Example: GenerateDeterministicGuid("navigation-module-business.human-resources.projects")
|
|
248
249
|
```
|
|
249
250
|
|
|
250
251
|
### Template
|
|
@@ -405,12 +406,12 @@ public class NavigationTranslationSeedEntry
|
|
|
405
406
|
// Section GUID: deterministic from navRoute + section code
|
|
406
407
|
public static readonly Guid {SectionPascal}SectionId =
|
|
407
408
|
GenerateDeterministicGuid("navigation-section-{navRoute}.{sectionCode}");
|
|
408
|
-
// Example: GenerateDeterministicGuid("navigation-section-business.
|
|
409
|
+
// Example: GenerateDeterministicGuid("navigation-section-business.human-resources.employees.list")
|
|
409
410
|
|
|
410
411
|
// Resource GUID: deterministic from navRoute + section code + resource code
|
|
411
412
|
public static readonly Guid {ResourcePascal}ResourceId =
|
|
412
413
|
GenerateDeterministicGuid("navigation-resource-{navRoute}.{sectionCode}.{resourceCode}");
|
|
413
|
-
// Example: GenerateDeterministicGuid("navigation-resource-business.
|
|
414
|
+
// Example: GenerateDeterministicGuid("navigation-resource-business.human-resources.employees.list.employees-grid")
|
|
414
415
|
```
|
|
415
416
|
|
|
416
417
|
### Section Methods (add to {ModulePascal}NavigationSeedData.cs)
|
|
@@ -676,15 +677,23 @@ MCP returns:
|
|
|
676
677
|
|
|
677
678
|
### Step B: Write Permissions.cs (Application layer)
|
|
678
679
|
|
|
680
|
+
> **CRITICAL — Permission paths use the SAME kebab-case as NavRoute codes.**
|
|
681
|
+
> `{navRoute}` is already kebab-case (e.g., `business.human-resources.employees`).
|
|
682
|
+
> NEVER strip hyphens or derive codes from C# class names.
|
|
683
|
+
> FORBIDDEN: `business.humanresources.employees.read` → CORRECT: `business.human-resources.employees.read`
|
|
684
|
+
> SmartStack.app reference: `business.support-client.my-tickets.read`
|
|
685
|
+
|
|
679
686
|
```csharp
|
|
680
687
|
// Add to Application/Common/Authorization/Permissions.cs
|
|
688
|
+
// IMPORTANT: {navRoute} uses kebab-case segments (e.g., "business.human-resources.employees")
|
|
689
|
+
// Do NOT derive permission codes from C# identifiers — use navRoute directly
|
|
681
690
|
public static class {ContextPascal}
|
|
682
691
|
{
|
|
683
692
|
public const string Access = "{contextCode}.{appCode}";
|
|
684
693
|
|
|
685
694
|
public static class {ModulePascal}
|
|
686
695
|
{
|
|
687
|
-
public const string View = "{navRoute}.read";
|
|
696
|
+
public const string View = "{navRoute}.read"; // e.g., "business.human-resources.employees.read"
|
|
688
697
|
public const string Create = "{navRoute}.create";
|
|
689
698
|
public const string Update = "{navRoute}.update";
|
|
690
699
|
public const string Delete = "{navRoute}.delete";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Error Classification Reference
|
|
2
2
|
|
|
3
|
-
> **Loaded by:**
|
|
3
|
+
> **Loaded by:** apex step-03-execute (build failure) and step-04-examine (validation)
|
|
4
4
|
> **Purpose:** Classify build and runtime errors to apply the correct fix strategy.
|
|
5
5
|
> **Key insight:** Not all errors are code errors. Package/config errors require different fixes than code errors.
|
|
6
|
+
> **Moved from:** `ralph-loop/references/error-classification.md` (delegation refactoring)
|
|
6
7
|
|
|
7
8
|
---
|
|
8
9
|
|