@atlashub/smartstack-cli 4.41.0 → 4.43.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/apex.html +2 -2
- package/.documentation/business-analyse.html +26 -27
- package/.documentation/commands.html +6 -6
- package/dist/index.js +24 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/templates/agents/ba-reader.md +2 -2
- package/templates/agents/ba-writer.md +44 -9
- package/templates/hooks/stop-hook.sh +6 -6
- package/templates/ralph/README.md +1 -1
- package/templates/scripts/setup-ralph-loop.sh +2 -2
- package/templates/skills/_resources/context-digest-template.md +1 -1
- package/templates/skills/_shared.md +13 -13
- package/templates/skills/apex/SKILL.md +14 -7
- package/templates/skills/apex/_shared.md +1 -1
- package/templates/skills/apex/references/challenge-questions.md +46 -13
- package/templates/skills/apex/references/core-seed-data.md +4 -4
- package/templates/skills/apex/references/error-classification.md +3 -3
- package/templates/skills/apex/references/smartstack-api.md +1 -1
- package/templates/skills/apex/references/smartstack-layers.md +1 -1
- package/templates/skills/apex/steps/step-00-init.md +46 -8
- package/templates/skills/apex/steps/step-01-analyze.md +1 -1
- package/templates/skills/apex/steps/step-02-plan.md +1 -1
- package/templates/skills/apex/steps/step-03-execute.md +1 -1
- package/templates/skills/business-analyse/SKILL.md +83 -22
- package/templates/skills/business-analyse/_shared.md +12 -9
- package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +24 -9
- package/templates/skills/business-analyse/questionnaire/03-data-ui.md +33 -0
- package/templates/skills/business-analyse/questionnaire/04-risks-metrics.md +1 -1
- package/templates/skills/business-analyse/react/components.md +1 -22
- package/templates/skills/business-analyse/react/schema.md +1 -1
- package/templates/skills/business-analyse/references/acceptance-criteria.md +3 -3
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +1 -1
- package/templates/skills/business-analyse/references/detection-strategies.md +2 -2
- package/templates/skills/business-analyse/references/entity-architecture-decision.md +1 -1
- package/templates/skills/business-analyse/references/naming-conventions.md +6 -6
- package/templates/skills/business-analyse/references/robustness-checks.md +4 -4
- package/templates/skills/business-analyse/references/spec-auto-inference.md +2 -2
- package/templates/skills/business-analyse/references/validation-checklist.md +3 -3
- package/templates/skills/business-analyse/schemas/feature-schema.json +1 -1
- package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +2 -2
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +3 -2
- package/templates/skills/business-analyse/steps/step-00-init.md +15 -5
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +15 -6
- package/templates/skills/business-analyse/steps/step-02-structure.md +17 -1
- package/templates/skills/business-analyse/steps/step-03-specify.md +136 -26
- package/templates/skills/business-analyse/steps/step-04-consolidate.md +44 -8
- package/templates/skills/business-analyse/templates/tpl-handoff.md +5 -5
- package/templates/skills/business-analyse/templates/tpl-launch-displays.md +4 -4
- package/templates/skills/business-analyse/templates-frd.md +4 -4
- package/templates/skills/{ba-design-ui → business-analyse-design}/SKILL.md +9 -9
- package/templates/skills/{ba-design-ui → business-analyse-design}/steps/step-01-screens.md +9 -0
- package/templates/skills/{ba-design-ui → business-analyse-design}/steps/step-03-navigation.md +9 -2
- package/templates/skills/business-analyse-develop/SKILL.md +248 -0
- package/templates/skills/{ralph-loop → business-analyse-develop}/references/category-completeness.md +1 -1
- package/templates/skills/{ralph-loop → business-analyse-develop}/references/init-resume-recovery.md +8 -8
- package/templates/skills/{ralph-loop → business-analyse-develop}/references/multi-module-queue.md +1 -1
- package/templates/skills/business-analyse-develop/references/quality-gates.md +70 -0
- package/templates/skills/{ralph-loop → business-analyse-develop}/references/task-transform-legacy.md +1 -1
- package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-00-init.md +20 -4
- package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-01-task.md +3 -2
- package/templates/skills/business-analyse-develop/steps/step-01-v4-execute.md +131 -0
- package/templates/skills/business-analyse-develop/steps/step-02-v4-verify.md +156 -0
- package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-04-check.md +1 -1
- package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-05-report.md +1 -1
- package/templates/skills/{derive-prd → business-analyse-handoff}/SKILL.md +7 -7
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/acceptance-criteria.md +5 -5
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/handoff-file-templates.md +1 -1
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/handoff-mappings.md +1 -1
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/handoff-seeddata-generation.md +2 -2
- package/templates/skills/{derive-prd → business-analyse-handoff}/references/prd-generation.md +14 -14
- package/templates/skills/{derive-prd → business-analyse-handoff}/schemas/handoff-schema.json +2 -2
- package/templates/skills/{derive-prd → business-analyse-handoff}/steps/step-00-validate.md +7 -7
- package/templates/skills/{derive-prd → business-analyse-handoff}/steps/step-01-transform.md +50 -11
- package/templates/skills/{derive-prd → business-analyse-handoff}/steps/step-02-export.md +36 -16
- package/templates/skills/{ba-generate-html → business-analyse-html}/SKILL.md +4 -4
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/ba-interactive.html +714 -286
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/build-html.js +25 -3
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/01-data-init.js +54 -0
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/02-navigation.js +102 -12
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/03-render-cadrage.js +8 -7
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/04-render-modules.js +7 -7
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/05-render-specs.js +188 -85
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/06-render-consolidation.js +15 -14
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/06-render-mockups.js +19 -19
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/07-render-handoff.js +24 -4
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/08-editing.js +6 -2
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/09-export.js +27 -57
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/10-comments.js +67 -45
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/scripts/11-review-panel.js +15 -13
- package/templates/skills/business-analyse-html/html/src/styles/02-layout.css +216 -0
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/05-modules.css +36 -0
- package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/template.html +22 -12
- package/templates/skills/{ba-generate-html → business-analyse-html}/references/data-build.md +1 -1
- package/templates/skills/{ba-generate-html → business-analyse-html}/references/data-mapping.md +5 -1
- package/templates/skills/{ba-generate-html → business-analyse-html}/references/output-modes.md +7 -7
- package/templates/skills/{ba-generate-html → business-analyse-html}/steps/step-01-collect.md +25 -1
- package/templates/skills/{ba-generate-html → business-analyse-html}/steps/step-02-build-data.md +33 -5
- package/templates/skills/{ba-generate-html → business-analyse-html}/steps/step-03-render.md +2 -2
- package/templates/skills/{ba-generate-html → business-analyse-html}/steps/step-04-verify.md +2 -2
- package/templates/skills/{ba-review → business-analyse-review}/SKILL.md +11 -10
- package/templates/skills/{ba-review → business-analyse-review}/references/review-data-mapping.md +2 -2
- package/templates/skills/business-analyse-review/steps/step-00-init.md +107 -0
- package/templates/skills/{ba-review → business-analyse-review}/steps/step-01-apply.md +19 -11
- package/templates/skills/business-analyse-status/SKILL.md +118 -0
- package/templates/skills/documentation/SKILL.md +2 -2
- package/templates/skills/sketch/SKILL.md +172 -0
- package/templates/skills/sketch/references/domain-heuristics.md +116 -0
- package/templates/skills/ba-generate-html/html/src/styles/02-layout.css +0 -101
- package/templates/skills/ralph-loop/SKILL.md +0 -240
- /package/templates/skills/{ba-design-ui → business-analyse-design}/steps/step-02-wireframes.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/category-rules.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/compact-loop.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/module-transition.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/parallel-execution.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/section-splitting.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/references/team-orchestration.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-02-execute.md +0 -0
- /package/templates/skills/{ralph-loop → business-analyse-develop}/steps/step-03-commit.md +0 -0
- /package/templates/skills/{derive-prd → business-analyse-handoff}/references/entity-domain-mapping.md +0 -0
- /package/templates/skills/{derive-prd → business-analyse-handoff}/references/readiness-scoring.md +0 -0
- /package/templates/skills/{derive-prd → business-analyse-handoff}/templates/tpl-progress.md +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/cadrage-context.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/cadrage-scope.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/cadrage-stakeholders.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/cadrage-success.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/consol-datamodel.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/consol-flows.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/consol-interactions.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/consol-permissions.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/decomp-dependencies.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/decomp-modules.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/handoff-summary.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/partials/module-spec-container.html +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/01-variables.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/03-navigation.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/04-cards.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/06-wireframes.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/07-comments.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/08-review-panel.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/html/src/styles/09-mockups-html.css +0 -0
- /package/templates/skills/{ba-generate-html → business-analyse-html}/references/wireframe-svg-style-guide.md +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlashub/smartstack-cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.43.0",
|
|
4
4
|
"description": "SmartStack Claude Code automation toolkit - GitFlow, EF Core migrations, prompts and more",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SmartStack",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"scripts": {
|
|
55
55
|
"postinstall": "node scripts/postinstall.js || exit 0",
|
|
56
56
|
"dev": "tsup --watch",
|
|
57
|
-
"build:html": "node templates/skills/
|
|
57
|
+
"build:html": "node templates/skills/business-analyse-html/html/build-html.js",
|
|
58
58
|
"build": "npm run build:html && npx tsup",
|
|
59
59
|
"lint": "eslint src --ext .ts",
|
|
60
60
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
@@ -276,7 +276,7 @@ Generate compact context for use by other skills and agents.
|
|
|
276
276
|
5. Keep output to max 100 lines
|
|
277
277
|
|
|
278
278
|
**Used by:**
|
|
279
|
-
-
|
|
279
|
+
- business-analyse-develop: for context during feature development
|
|
280
280
|
- feature-full: for comprehensive documentation generation
|
|
281
281
|
- Code generation skills: for understanding scope and permissions
|
|
282
282
|
|
|
@@ -356,7 +356,7 @@ When encountering ID references, resolve them by reading appropriate thematic fi
|
|
|
356
356
|
## Integration Points
|
|
357
357
|
|
|
358
358
|
This agent provides context for:
|
|
359
|
-
- **
|
|
359
|
+
- **business-analyse-develop**: Entity and permission context during feature implementation
|
|
360
360
|
- **feature-full**: Source for comprehensive feature documentation
|
|
361
361
|
- **Code generation**: Permission paths and entity definitions from thematic files
|
|
362
362
|
- **ba-writer**: Finding features for enrichment operations
|
|
@@ -22,7 +22,7 @@ Write and update granular JSON files for project-level (multi-app), application-
|
|
|
22
22
|
- `cadrage.json` — stakeholders, problem/vision, risks, acceptance criteria (ALL scopes)
|
|
23
23
|
- `validation.json` — validation rules and consistency checks (ALL scopes)
|
|
24
24
|
- `consolidation.json` — cross-module interactions and E2E flows (application/project ONLY)
|
|
25
|
-
- `navigation.json` — navigation tree (application/project ONLY, created by
|
|
25
|
+
- `navigation.json` — navigation tree (application/project ONLY, created by business-analyse-design)
|
|
26
26
|
- `entities.json` — entity definitions with attributes and relationships (**MODULE ONLY**)
|
|
27
27
|
- `rules.json` — business rules with categories and conditions (**MODULE ONLY**)
|
|
28
28
|
- `usecases.json` — use cases and functional requirements (**MODULE ONLY**)
|
|
@@ -242,7 +242,7 @@ Write the handoff thematic file into a module index.json. Specialized operation
|
|
|
242
242
|
|
|
243
243
|
**Process:**
|
|
244
244
|
1. Locate the module index.json via findFeature
|
|
245
|
-
2. Validate handoffData.filesToCreate has all
|
|
245
|
+
2. Validate handoffData.filesToCreate has all 8 categories (domain, application, infrastructure, api, frontend, seedData, tests, documentation)
|
|
246
246
|
3. Validate each fileSpec has at minimum path + type
|
|
247
247
|
4. Read module rules.json and validate brToCodeMapping[].ruleId references exist
|
|
248
248
|
5. Create handoff.json with handoffData
|
|
@@ -250,7 +250,7 @@ Write the handoff thematic file into a module index.json. Specialized operation
|
|
|
250
250
|
7. Update fileHashes in index.json
|
|
251
251
|
8. **POST-WRITE VERIFICATION:** Re-read handoff.json and confirm:
|
|
252
252
|
- handoff !== {}
|
|
253
|
-
- filesToCreate contains all
|
|
253
|
+
- filesToCreate contains all 8 categories
|
|
254
254
|
- brToCodeMapping.length > 0
|
|
255
255
|
9. IF verification fails → return error with details
|
|
256
256
|
10. Return confirmation with stats (files per category, total BRs mapped)
|
|
@@ -270,14 +270,22 @@ Transition the status through defined workflow.
|
|
|
270
270
|
- framed → decomposed
|
|
271
271
|
- decomposed → specified
|
|
272
272
|
- specified → consolidated
|
|
273
|
-
- consolidated →
|
|
273
|
+
- consolidated → designed
|
|
274
|
+
- consolidated → handed-off (skip design/review)
|
|
275
|
+
- designed → reviewed
|
|
276
|
+
- designed → handed-off (skip review)
|
|
277
|
+
- reviewed → handed-off
|
|
274
278
|
|
|
275
279
|
**Valid transitions (project-level):**
|
|
276
280
|
- draft → framed
|
|
277
281
|
- framed → decomposed
|
|
278
282
|
- decomposed → specified
|
|
279
283
|
- specified → consolidated
|
|
280
|
-
- consolidated →
|
|
284
|
+
- consolidated → designed
|
|
285
|
+
- consolidated → handed-off (skip design/review)
|
|
286
|
+
- designed → reviewed
|
|
287
|
+
- designed → handed-off (skip review)
|
|
288
|
+
- reviewed → handed-off
|
|
281
289
|
|
|
282
290
|
**Process:**
|
|
283
291
|
1. Read index.json
|
|
@@ -391,7 +399,11 @@ Transition the status through defined workflow.
|
|
|
391
399
|
- framed → decomposed
|
|
392
400
|
- decomposed → specified
|
|
393
401
|
- specified → consolidated
|
|
394
|
-
- consolidated →
|
|
402
|
+
- consolidated → designed
|
|
403
|
+
- consolidated → handed-off (skip design/review)
|
|
404
|
+
- designed → reviewed
|
|
405
|
+
- designed → handed-off (skip review)
|
|
406
|
+
- reviewed → handed-off
|
|
395
407
|
|
|
396
408
|
**Process:**
|
|
397
409
|
1. Read index.json
|
|
@@ -403,6 +415,29 @@ Transition the status through defined workflow.
|
|
|
403
415
|
7. Write back index.json
|
|
404
416
|
8. Return confirmation with new status
|
|
405
417
|
|
|
418
|
+
### updateManifest
|
|
419
|
+
|
|
420
|
+
Upsert an entry in docs/index.json manifest. Keyed by {appCode, moduleCode, version}.
|
|
421
|
+
|
|
422
|
+
**Input:**
|
|
423
|
+
- appCode: string (PascalCase application code)
|
|
424
|
+
- moduleCode: string or null (PascalCase module code, null if application-level)
|
|
425
|
+
- version: string (e.g., "1.0")
|
|
426
|
+
- status: string (draft, framed, decomposed, specified, consolidated, designed, reviewed, handed-off)
|
|
427
|
+
- lastModified: ISO timestamp
|
|
428
|
+
|
|
429
|
+
**Process:**
|
|
430
|
+
1. Read or create docs/index.json if not present
|
|
431
|
+
2. Find entry keyed by {appCode, moduleCode, version}
|
|
432
|
+
- If entry exists: update status and lastModified
|
|
433
|
+
- If entry does not exist: create new entry with appCode, moduleCode, version, status, lastModified
|
|
434
|
+
3. Write docs/index.json back with updated timestamp
|
|
435
|
+
4. Return confirmation with total entries in manifest
|
|
436
|
+
|
|
437
|
+
**Rules:**
|
|
438
|
+
- This is the ONLY method that should write to docs/index.json — skills must NOT write directly.
|
|
439
|
+
- All downstream operations that update status must call updateManifest to keep the manifest in sync.
|
|
440
|
+
|
|
406
441
|
## Schema Validation Rules
|
|
407
442
|
|
|
408
443
|
Perform these structural checks before every write:
|
|
@@ -417,7 +452,7 @@ Perform these structural checks before every write:
|
|
|
417
452
|
**Metadata:**
|
|
418
453
|
- id, version, status, scope are required
|
|
419
454
|
- metadata.createdAt, metadata.updatedAt must be valid ISO timestamps
|
|
420
|
-
- For application scope: status must be in [draft, framed, decomposed, specified, consolidated, handed-off]
|
|
455
|
+
- For application scope: status must be in [draft, framed, decomposed, specified, consolidated, designed, reviewed, handed-off]
|
|
421
456
|
- For module scope: status must be in [draft, analysed, specified, approved, rejected, handed-off]
|
|
422
457
|
|
|
423
458
|
**Thematic files:**
|
|
@@ -464,7 +499,7 @@ Perform these structural checks before every write:
|
|
|
464
499
|
- layout: `{type, regions[]}` where regions[]: `{id, position, span?, components[]}`
|
|
465
500
|
|
|
466
501
|
**handoff** in handoff.json — REQUIRED: `complexity`, `filesToCreate`, `brToCodeMapping[]`, `apiEndpointSummary[]`, `prdFile`, `totalFiles`, `totalTasks`, `handedOffAt`
|
|
467
|
-
- filesToCreate: REQUIRED
|
|
502
|
+
- filesToCreate: REQUIRED 8 categories: `domain[]`, `application[]`, `infrastructure[]`, `api[]`, `frontend[]`, `seedData[]`, `tests[]`, `documentation[]`
|
|
468
503
|
- brToCodeMapping[]: `{ruleId, files[], implementation}`
|
|
469
504
|
|
|
470
505
|
### Application-Level Thematic Files
|
|
@@ -499,7 +534,7 @@ docs/{app}/business-analyse/
|
|
|
499
534
|
cadrage.json
|
|
500
535
|
validation.json
|
|
501
536
|
consolidation.json
|
|
502
|
-
navigation.json ← (created by
|
|
537
|
+
navigation.json ← (created by business-analyse-design)
|
|
503
538
|
# NO entities/rules/usecases/permissions/screens/handoff — MODULE ONLY
|
|
504
539
|
|
|
505
540
|
docs/{app}/{module}/business-analyse/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
3
|
# Ralph Loop Stop Hook
|
|
4
|
-
# Prevents session exit when a
|
|
4
|
+
# Prevents session exit when a business-analyse-develop is active
|
|
5
5
|
# Feeds Claude's output back as input to continue the loop
|
|
6
6
|
|
|
7
7
|
set -euo pipefail
|
|
@@ -9,8 +9,8 @@ set -euo pipefail
|
|
|
9
9
|
# Read hook input from stdin (advanced stop hook API)
|
|
10
10
|
HOOK_INPUT=$(cat)
|
|
11
11
|
|
|
12
|
-
# Check if
|
|
13
|
-
RALPH_STATE_FILE=".claude/
|
|
12
|
+
# Check if business-analyse-develop is active
|
|
13
|
+
RALPH_STATE_FILE=".claude/business-analyse-develop.local.md"
|
|
14
14
|
|
|
15
15
|
if [[ ! -f "$RALPH_STATE_FILE" ]]; then
|
|
16
16
|
# No active loop - allow exit
|
|
@@ -31,7 +31,7 @@ if [[ ! "$ITERATION" =~ ^[0-9]+$ ]]; then
|
|
|
31
31
|
echo " Problem: 'iteration' field is not a valid number (got: '$ITERATION')" >&2
|
|
32
32
|
echo "" >&2
|
|
33
33
|
echo " This usually means the state file was manually edited or corrupted." >&2
|
|
34
|
-
echo " Ralph loop is stopping. Run /
|
|
34
|
+
echo " Ralph loop is stopping. Run /business-analyse-develop again to start fresh." >&2
|
|
35
35
|
rm "$RALPH_STATE_FILE"
|
|
36
36
|
exit 0
|
|
37
37
|
fi
|
|
@@ -42,7 +42,7 @@ if [[ ! "$MAX_ITERATIONS" =~ ^[0-9]+$ ]]; then
|
|
|
42
42
|
echo " Problem: 'max_iterations' field is not a valid number (got: '$MAX_ITERATIONS')" >&2
|
|
43
43
|
echo "" >&2
|
|
44
44
|
echo " This usually means the state file was manually edited or corrupted." >&2
|
|
45
|
-
echo " Ralph loop is stopping. Run /
|
|
45
|
+
echo " Ralph loop is stopping. Run /business-analyse-develop again to start fresh." >&2
|
|
46
46
|
rm "$RALPH_STATE_FILE"
|
|
47
47
|
exit 0
|
|
48
48
|
fi
|
|
@@ -144,7 +144,7 @@ if [[ -z "$PROMPT_TEXT" ]]; then
|
|
|
144
144
|
echo " • State file was manually edited" >&2
|
|
145
145
|
echo " • File was corrupted during writing" >&2
|
|
146
146
|
echo "" >&2
|
|
147
|
-
echo " Ralph loop is stopping. Run /
|
|
147
|
+
echo " Ralph loop is stopping. Run /business-analyse-develop again to start fresh." >&2
|
|
148
148
|
rm "$RALPH_STATE_FILE"
|
|
149
149
|
exit 0
|
|
150
150
|
fi
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# SmartStack CLI - https://atlashub.ch
|
|
4
4
|
#
|
|
5
5
|
# This script initializes the Ralph loop with MCP validation
|
|
6
|
-
# Usage: setup-
|
|
6
|
+
# Usage: setup-business-analyse-develop.sh "PROMPT" [--max-iterations N] [--completion-promise TEXT]
|
|
7
7
|
|
|
8
8
|
set -e
|
|
9
9
|
|
|
@@ -142,7 +142,7 @@ echo ""
|
|
|
142
142
|
# Validate prompt
|
|
143
143
|
if [[ -z "$PROMPT" ]]; then
|
|
144
144
|
log_error "No prompt provided!"
|
|
145
|
-
log_info "Usage: /
|
|
145
|
+
log_info "Usage: /business-analyse-develop \"Your feature description\""
|
|
146
146
|
exit 1
|
|
147
147
|
fi
|
|
148
148
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
Reduces token usage between multi-step skill executions (BA,
|
|
5
|
+
Reduces token usage between multi-step skill executions (BA, business-analyse-develop) by compressing step outputs into compact summaries.
|
|
6
6
|
|
|
7
7
|
## How It Works
|
|
8
8
|
|
|
@@ -179,7 +179,7 @@ If MCP is not available, display this message and **STOP the skill immediately**
|
|
|
179
179
|
| business-analyse | **YES** | Analysis, specification, validation |
|
|
180
180
|
| application | **YES** | Navigation + code generation |
|
|
181
181
|
| controller | **YES** | Controller scaffolding |
|
|
182
|
-
|
|
|
182
|
+
| business-analyse-develop | **YES** | Iterative code generation |
|
|
183
183
|
| validate | **YES** | Convention validation |
|
|
184
184
|
| efcore | **YES** | Migration management |
|
|
185
185
|
| review-code | **YES** | Code review |
|
|
@@ -193,29 +193,29 @@ If MCP is not available, display this message and **STOP the skill immediately**
|
|
|
193
193
|
|
|
194
194
|
| Tool | Usage | Used By |
|
|
195
195
|
|------|-------|---------|
|
|
196
|
-
| `mcp__smartstack__validate_conventions` | Valider conventions SmartStack (tables, migrations, services, namespaces, entities, tenants, controllers) | application, controller,
|
|
197
|
-
| `mcp__smartstack__scaffold_extension` | Génération code (feature, entity, service, controller, component, dto, validator, repository) | application,
|
|
198
|
-
| `mcp__smartstack__check_migrations` | Analyser migrations EF Core (conflits, ordre, ModelSnapshot) | application,
|
|
196
|
+
| `mcp__smartstack__validate_conventions` | Valider conventions SmartStack (tables, migrations, services, namespaces, entities, tenants, controllers) | application, controller, business-analyse-develop |
|
|
197
|
+
| `mcp__smartstack__scaffold_extension` | Génération code (feature, entity, service, controller, component, dto, validator, repository) | application, business-analyse-develop |
|
|
198
|
+
| `mcp__smartstack__check_migrations` | Analyser migrations EF Core (conflits, ordre, ModelSnapshot) | application, business-analyse-develop |
|
|
199
199
|
| `mcp__smartstack__api_docs` | Documentation API depuis Swagger/OpenAPI ou controllers | controller |
|
|
200
|
-
| `mcp__smartstack__suggest_migration` | Suggérer nom migration ({context}_v{version}_{sequence}_{Description}) | application,
|
|
201
|
-
| `mcp__smartstack__generate_permissions` | Générer permissions RBAC depuis NavRoute | application,
|
|
200
|
+
| `mcp__smartstack__suggest_migration` | Suggérer nom migration ({context}_v{version}_{sequence}_{Description}) | application, business-analyse-develop |
|
|
201
|
+
| `mcp__smartstack__generate_permissions` | Générer permissions RBAC depuis NavRoute | application, business-analyse-develop |
|
|
202
202
|
|
|
203
203
|
### Outils Tests
|
|
204
204
|
|
|
205
205
|
| Tool | Usage | Used By |
|
|
206
206
|
|------|-------|---------|
|
|
207
|
-
| `mcp__smartstack__scaffold_tests` | Générer tests unitaires/intégration/sécurité | application,
|
|
208
|
-
| `mcp__smartstack__analyze_test_coverage` | Analyser couverture de tests du projet |
|
|
209
|
-
| `mcp__smartstack__validate_test_conventions` | Valider conventions de nommage des tests |
|
|
210
|
-
| `mcp__smartstack__suggest_test_scenarios` | Suggérer scénarios de test basés sur le code |
|
|
207
|
+
| `mcp__smartstack__scaffold_tests` | Générer tests unitaires/intégration/sécurité | application, business-analyse-develop |
|
|
208
|
+
| `mcp__smartstack__analyze_test_coverage` | Analyser couverture de tests du projet | business-analyse-develop |
|
|
209
|
+
| `mcp__smartstack__validate_test_conventions` | Valider conventions de nommage des tests | business-analyse-develop |
|
|
210
|
+
| `mcp__smartstack__suggest_test_scenarios` | Suggérer scénarios de test basés sur le code | business-analyse-develop |
|
|
211
211
|
|
|
212
212
|
### Outils Frontend
|
|
213
213
|
|
|
214
214
|
| Tool | Usage | Used By |
|
|
215
215
|
|------|-------|---------|
|
|
216
|
-
| `mcp__smartstack__scaffold_api_client` | Générer client TypeScript avec NavRoute | application,
|
|
217
|
-
| `mcp__smartstack__scaffold_routes` | Générer React Router depuis NavRoute backend | application,
|
|
218
|
-
| `mcp__smartstack__validate_frontend_routes` | Valider synchronisation routes frontend/backend | application,
|
|
216
|
+
| `mcp__smartstack__scaffold_api_client` | Générer client TypeScript avec NavRoute | application, business-analyse-develop |
|
|
217
|
+
| `mcp__smartstack__scaffold_routes` | Générer React Router depuis NavRoute backend | application, business-analyse-develop |
|
|
218
|
+
| `mcp__smartstack__validate_frontend_routes` | Valider synchronisation routes frontend/backend | application, business-analyse-develop |
|
|
219
219
|
| `mcp__smartstack__scaffold_frontend_extension` | Générer infrastructure extension frontend | application |
|
|
220
220
|
| `mcp__smartstack__analyze_extension_points` | Analyser points d'extension dans les pages React | application |
|
|
221
221
|
|
|
@@ -5,7 +5,7 @@ description: |
|
|
|
5
5
|
Use this skill when:
|
|
6
6
|
- Adding a new section/resource to an existing module
|
|
7
7
|
- Developing feature by feature without /business-analyse
|
|
8
|
-
- Fixing or extending code generated by /
|
|
8
|
+
- Fixing or extending code generated by /business-analyse-develop
|
|
9
9
|
- Any incremental SmartStack development task
|
|
10
10
|
argument-hint: "[-a] [-x] [-s] [-e] [-r] [-pr] <task description>"
|
|
11
11
|
---
|
|
@@ -19,11 +19,18 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
19
19
|
<quick_start>
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
+
# Direct use (you know exactly what to build):
|
|
22
23
|
/apex add absence management to HR module # Add section to module
|
|
23
24
|
/apex -a fix the leave request controller # Auto fix
|
|
24
25
|
/apex -a -x -s -pr add PDF export to Orders # Full workflow
|
|
25
26
|
/apex -e add status field to Project entity # Economy (no agents)
|
|
26
27
|
/apex -r # Resume previous
|
|
28
|
+
|
|
29
|
+
# From /sketch (vague idea → precise command):
|
|
30
|
+
/sketch une app RH avec employés et absences # → generates /apex command
|
|
31
|
+
|
|
32
|
+
# From /business-analyse-develop (automated multi-module):
|
|
33
|
+
# /business-analyse-develop delegates to /apex -d automatically
|
|
27
34
|
```
|
|
28
35
|
|
|
29
36
|
</quick_start>
|
|
@@ -38,8 +45,8 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
38
45
|
| `-e` | Economy mode: no subagents |
|
|
39
46
|
| `-r` | Resume: continue from previous state |
|
|
40
47
|
| `-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 `/
|
|
42
|
-
| `--foundation` | Foundation mode: generate ONLY entities + EF configs + migration. No services/controllers/frontend. Used by
|
|
48
|
+
| `-d {path}` | Delegate mode: read context from PRD file at `{path}`. Implies `-a -e`. Used by `/business-analyse-develop`. |
|
|
49
|
+
| `--foundation` | Foundation mode: generate ONLY entities + EF configs + migration. No services/controllers/frontend. Used by business-analyse-develop Phase 0. |
|
|
43
50
|
|
|
44
51
|
</parameters>
|
|
45
52
|
|
|
@@ -54,9 +61,9 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
54
61
|
| `{save_mode}` | boolean | Save outputs to `.claude/output/apex/{task-id}/` |
|
|
55
62
|
| `{economy_mode}` | boolean | No subagents |
|
|
56
63
|
| `{pr_mode}` | boolean | Create PR at end |
|
|
57
|
-
| `{delegate_mode}` | boolean | Delegated by `/
|
|
64
|
+
| `{delegate_mode}` | boolean | Delegated by `/business-analyse-develop` via `-d` flag |
|
|
58
65
|
| `{delegate_prd_path}` | string? | Path to PRD file (`.ralph/prd.json` or `.ralph/prd-{module}.json`) |
|
|
59
|
-
| `{foundation_mode}` | boolean | Foundation mode: entities-only (no services/controllers/frontend). Used by
|
|
66
|
+
| `{foundation_mode}` | boolean | Foundation mode: entities-only (no services/controllers/frontend). Used by business-analyse-develop Phase 0. |
|
|
60
67
|
| `{app_name}` | string | Application name |
|
|
61
68
|
| `{module_code}` | string | Module code |
|
|
62
69
|
| `{sections}` | object[] | Sections (required, min 1) with code/labels/icon/displayOrder |
|
|
@@ -159,8 +166,8 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
159
166
|
- **Frontend pages: ALWAYS via Skill("ui-components")** — economy_mode affects parallelization only, NOT whether /ui-components is called. NEVER generate .tsx pages directly, even in delegate or economy mode.
|
|
160
167
|
- **Save outputs** if `{save_mode}` = true
|
|
161
168
|
- **Commits per layer** - Atomic commits after each execution layer
|
|
162
|
-
- **Delegate mode** (`-d`): Read PRD context, skip challenge questions, auto+economy mode implied. Used when `/
|
|
163
|
-
- **Foundation mode** (`--foundation`): Generate ONLY entities + EF configs + migration (domain + infrastructure layers). Skip application/api/frontend/tests. Used by
|
|
169
|
+
- **Delegate mode** (`-d`): Read PRD context, skip challenge questions, auto+economy mode implied. Used when `/business-analyse-develop` delegates code generation to `/apex`.
|
|
170
|
+
- **Foundation mode** (`--foundation`): Generate ONLY entities + EF configs + migration (domain + infrastructure layers). Skip application/api/frontend/tests. Used by business-analyse-develop Phase 0 to create database foundation before spawning parallel teammates.
|
|
164
171
|
|
|
165
172
|
</execution_rules>
|
|
166
173
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
> **Active when:** `-d {path}` flag is set. Implies `-a` (auto) + `-e` (economy).
|
|
21
21
|
|
|
22
|
-
When `/
|
|
22
|
+
When `/business-analyse-develop` invokes `/apex -d {prd_path}`:
|
|
23
23
|
|
|
24
24
|
1. **Read PRD** from `{delegate_prd_path}` (`.ralph/prd.json` or `.ralph/prd-{module}.json`)
|
|
25
25
|
2. **Extract context:**
|
|
@@ -148,20 +148,53 @@ questions:
|
|
|
148
148
|
|
|
149
149
|
---
|
|
150
150
|
|
|
151
|
-
## 5b.
|
|
151
|
+
## 5b. Dependency Auto-Detection (NO user question)
|
|
152
|
+
|
|
153
|
+
> **Principle:** The agent detects dependencies — the user should NEVER be asked about this.
|
|
154
|
+
|
|
155
|
+
### Algorithm
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
1. INTRA-MODULE FK detection (from {entities} collected in 5a):
|
|
159
|
+
For each entity pair (A, B) in {entities}:
|
|
160
|
+
IF entity A name appears as "{B}Id" pattern in typical HR/business domain:
|
|
161
|
+
→ Record: { entity: A, fkProperty: "{B}Id", targetEntity: B, isInterModule: false }
|
|
162
|
+
Example: entities = [Employee, Absence] → Absence likely has EmployeeId FK
|
|
163
|
+
|
|
164
|
+
2. INTER-MODULE FK detection (scan existing codebase):
|
|
165
|
+
existing_entities = Glob("**/Domain/Entities/**/*.cs") → extract class names (exclude enums, VOs)
|
|
166
|
+
|
|
167
|
+
IF existing_entities.length > 0:
|
|
168
|
+
For each entity in {entities}:
|
|
169
|
+
For each existing in existing_entities:
|
|
170
|
+
IF task description or entity context suggests relationship to existing:
|
|
171
|
+
→ Record: { entity, fkProperty: "{existing}Id", targetEntity: existing, isInterModule: true }
|
|
172
|
+
|
|
173
|
+
IF existing_entities.length == 0 (fresh project):
|
|
174
|
+
→ {has_dependencies} = "none" or "intra-only"
|
|
175
|
+
→ Skip inter-module detection entirely
|
|
176
|
+
|
|
177
|
+
3. STORE results:
|
|
178
|
+
{has_dependencies} = "none" | "intra-only" | "inter-module"
|
|
179
|
+
{detected_fks} = [{ entity, fkProperty, targetEntity, isInterModule }]
|
|
180
|
+
|
|
181
|
+
4. DISPLAY summary (no question, just confirmation):
|
|
182
|
+
"Dependencies detected: Absence → Employee (intra-module FK)"
|
|
183
|
+
Or: "No inter-module dependencies detected (fresh project)"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### False Positive Guards
|
|
187
|
+
|
|
188
|
+
- Only match against classes extending `BaseEntity` / `AuditableEntity` (not enums, value objects)
|
|
189
|
+
- If entity name is a substring of another (e.g., "Employee" in "EmployeeStatus"), verify the target is a navigable entity
|
|
190
|
+
- Limit inter-module scan to entities whose names appear in the task description or {entities} list
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 5b-bis. Key Properties
|
|
152
195
|
|
|
153
196
|
```yaml
|
|
154
197
|
questions:
|
|
155
|
-
- header: "Dependencies"
|
|
156
|
-
question: "Does this module reference entities from other existing modules?"
|
|
157
|
-
options:
|
|
158
|
-
- label: "No dependencies"
|
|
159
|
-
description: "Standalone module — no FK relationships to other modules"
|
|
160
|
-
- label: "Yes, has FK references"
|
|
161
|
-
description: "References entities from other modules (specify in Other)"
|
|
162
|
-
- label: "Not sure yet"
|
|
163
|
-
description: "Will determine during analysis — may require EntityLookup components"
|
|
164
|
-
multiSelect: false
|
|
165
198
|
- header: "Key fields"
|
|
166
199
|
question: "Beyond standard fields (Id, TenantId, Audit), what are the key business properties of the main entity?"
|
|
167
200
|
options:
|
|
@@ -183,7 +216,7 @@ questions:
|
|
|
183
216
|
|
|
184
217
|
```
|
|
185
218
|
IF delegate_mode (-d flag):
|
|
186
|
-
→ SKIP (
|
|
219
|
+
→ SKIP (business-analyse-develop / PRD already defines code patterns)
|
|
187
220
|
|
|
188
221
|
IF feature.json exists AND ALL entities have codePattern defined:
|
|
189
222
|
→ SKIP (BA already collected code patterns)
|
|
@@ -320,7 +353,7 @@ questions:
|
|
|
320
353
|
|
|
321
354
|
## Delegate Mode Skip (if -d flag)
|
|
322
355
|
|
|
323
|
-
When `/
|
|
356
|
+
When `/business-analyse-develop` invokes `/apex -d {prd_path}`, ALL hierarchy is extracted from the PRD file:
|
|
324
357
|
- Skip sections 4a-5b (no interactive questions)
|
|
325
358
|
- Jump directly to MCP verify section
|
|
326
359
|
```
|
|
@@ -5,7 +5,7 @@
|
|
|
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:** `
|
|
8
|
+
> **Moved from:** `business-analyse-develop/references/core-seed-data.md` (delegation refactoring)
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -1309,7 +1309,7 @@ services.AddScoped<IClientSeedDataProvider, {AppPascalName}SeedDataProvider>();
|
|
|
1309
1309
|
|
|
1310
1310
|
## 7. Multi-Module Handling
|
|
1311
1311
|
|
|
1312
|
-
When processing multiple modules in the same
|
|
1312
|
+
When processing multiple modules in the same business-analyse-develop run:
|
|
1313
1313
|
|
|
1314
1314
|
### Module 1 (first): Creates everything from scratch
|
|
1315
1315
|
|
|
@@ -1352,7 +1352,7 @@ Before marking the task as completed, verify ALL:
|
|
|
1352
1352
|
**Application-Level (FIRST — before modules):**
|
|
1353
1353
|
- [ ] `NavigationApplicationSeedData.cs` created (once per application, at `Infrastructure/Persistence/Seeding/Data/`)
|
|
1354
1354
|
- [ ] Application GUID is random (`Guid.NewGuid()`) — FK resolution is by Code lookup, not fixed ID
|
|
1355
|
-
- [ ] GetApplicationEntry() takes no parameters
|
|
1355
|
+
- [ ] GetApplicationEntry() takes no parameters, includes `Zone = ApplicationZone.Business`
|
|
1356
1356
|
- [ ] Application translations created (4 languages: fr, en, it, de, EntityType = Application), using `app.Id` (actual DB ID) for EntityId
|
|
1357
1357
|
- [ ] `IClientSeedDataProvider.SeedNavigationAsync()` uses `NavigationApplicationSeedData` (NO hardcoded `{appLabel_en}` / `{appIcon}` placeholders)
|
|
1358
1358
|
- [ ] `ApplicationRolesSeedData.ApplicationId` references `NavigationApplicationSeedData.ApplicationId` (DTO only — provider code resolves from DB by Code)
|
|
@@ -1452,7 +1452,7 @@ public class {Module}DevDataSeeder : IDevDataSeeder
|
|
|
1452
1452
|
> If you use a custom GUID, ensure it is created BEFORE `DevDataSeeder` runs (Order >= 200).
|
|
1453
1453
|
>
|
|
1454
1454
|
> **Pipeline validation:**
|
|
1455
|
-
> -
|
|
1455
|
+
> - business-analyse-develop POST-CHECK warns if GUID not found in project config
|
|
1456
1456
|
> - validate-feature step-05 verifies FK exists in real database via SQL query
|
|
1457
1457
|
|
|
1458
1458
|
---
|
|
@@ -3,7 +3,7 @@
|
|
|
3
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:** `
|
|
6
|
+
> **Moved from:** `business-analyse-develop/references/error-classification.md` (delegation refactoring)
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
|
|
89
89
|
### Category F: Code Error (FIX = edit source code)
|
|
90
90
|
|
|
91
|
-
> **Only this category should trigger code editing in
|
|
91
|
+
> **Only this category should trigger code editing in business-analyse-develop iterations.**
|
|
92
92
|
|
|
93
93
|
| Error Pattern | Example | Fix |
|
|
94
94
|
|--------------|---------|-----|
|
|
@@ -140,5 +140,5 @@ BUILD/RUNTIME ERROR
|
|
|
140
140
|
3. **Category C:** Edit DI file only. One targeted fix, rebuild, verify
|
|
141
141
|
4. **Category D:** Run migration commands. Do NOT edit code
|
|
142
142
|
5. **Category E:** Edit config file only
|
|
143
|
-
6. **Category F:** Normal
|
|
143
|
+
6. **Category F:** Normal business-analyse-develop code fix iteration
|
|
144
144
|
7. **If 2+ consecutive iterations fail on same error after code fixes -> re-classify** (likely wrong category)
|
|
@@ -329,7 +329,7 @@ public class {Name}Controller : ControllerBase
|
|
|
329
329
|
| Section | `{app}.{module}.{section}` (3 segments) | `administration.users.groups` |
|
|
330
330
|
| Sub-resource | `{app}.{module}` + `Suffix` | `[NavRoute("administration.ai", Suffix = "prompts")]` |
|
|
331
331
|
|
|
332
|
-
>
|
|
332
|
+
> ROUTING: 2-segment minimum. `NavigationRouteRegistryBuilder` builds 2-segment paths from DB. 3+ segments use fallback route generator.
|
|
333
333
|
|
|
334
334
|
**Sub-resource completeness:** If a parent page has a navigate() to a sub-resource route, the frontend MUST include a page for that route. Otherwise → dead link → white screen. Prefer separate controllers (with Suffix) over sub-endpoints in parent controller.
|
|
335
335
|
|
|
@@ -537,7 +537,7 @@ See `references/parallel-execution.md` for agent launch patterns, task coordinat
|
|
|
537
537
|
|
|
538
538
|
## Delegate Mode Fast Path
|
|
539
539
|
|
|
540
|
-
When `/
|
|
540
|
+
When `/business-analyse-develop` invokes `/apex -d {prd_path}`, PRD tasks already define the scope.
|
|
541
541
|
|
|
542
542
|
Map each PRD task to a layer based on `task.category`:
|
|
543
543
|
- `domain` → Layer 0
|
|
@@ -61,6 +61,43 @@ When `-d {prd_path}` is used, extract all context from PRD file and skip section
|
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
64
|
+
## 1c. Prompt Precision Guard
|
|
65
|
+
|
|
66
|
+
> **APEX executes, it does not explore.** If the prompt is too vague, redirect to `/business-analyse`.
|
|
67
|
+
|
|
68
|
+
**Score the prompt — count how many of these are present or inferable:**
|
|
69
|
+
|
|
70
|
+
| Element | Example | Weight |
|
|
71
|
+
|---------|---------|--------|
|
|
72
|
+
| Module name/code | "employees", "absence management" | 1 |
|
|
73
|
+
| At least 1 entity name | "Employee", "Absence" | 1 |
|
|
74
|
+
| At least 1 property/field | "FirstName, StartDate, Status" | 1 |
|
|
75
|
+
| Target application | "HR module", "HumanResources" | 0.5 |
|
|
76
|
+
| Section hint | "list", "dashboard", "approval" | 0.5 |
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
precision_score = sum of weights for elements found in task description
|
|
80
|
+
|
|
81
|
+
IF precision_score < 2:
|
|
82
|
+
DISPLAY:
|
|
83
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
84
|
+
║ ⚠ Prompt too vague for /apex ║
|
|
85
|
+
║ ║
|
|
86
|
+
║ /apex needs precise features to execute in one shot. ║
|
|
87
|
+
║ Your request looks more like a discovery/design task. ║
|
|
88
|
+
║ ║
|
|
89
|
+
║ Suggestions: ║
|
|
90
|
+
║ 1. Use /sketch to quickly design your module (~2 min) ║
|
|
91
|
+
║ 2. Use /business-analyse for full analysis (40+ questions) ║
|
|
92
|
+
║ 3. Rewrite your prompt with entities and fields, e.g.: ║
|
|
93
|
+
║ /apex add employees section with Employee entity ║
|
|
94
|
+
║ (FirstName, LastName, Email) to HumanResources module ║
|
|
95
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
96
|
+
→ STOP — do NOT proceed to section 2
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
64
101
|
## 2. Detect SmartStack Application
|
|
65
102
|
|
|
66
103
|
Scan project: Glob("*.sln"), Glob("docs/business/**/*"), Glob(".ralph/prd-*.json"), Glob("src/pages/**/*.tsx")
|
|
@@ -112,11 +149,12 @@ Call `mcp__smartstack__validate_conventions` after computing derivations. Fix an
|
|
|
112
149
|
|
|
113
150
|
---
|
|
114
151
|
|
|
115
|
-
## 5.
|
|
152
|
+
## 5. Collect Technical Parameters
|
|
116
153
|
|
|
117
|
-
Rapid
|
|
154
|
+
Rapid technical parameter collection — load and execute questions from `references/challenge-questions.md`:
|
|
118
155
|
- **5a:** Entity scope & relationships
|
|
119
|
-
- **5b:**
|
|
156
|
+
- **5b:** Dependency auto-detection (NO question — agent scans codebase and infers from {entities})
|
|
157
|
+
- **5b-bis:** Key properties (question kept — user may have specific field requirements)
|
|
120
158
|
- **5c:** Code generation strategy
|
|
121
159
|
|
|
122
160
|
**Skip 5c if:**
|
|
@@ -136,7 +174,7 @@ Propagated to: step-01 (code focus), step-02 (layer mapping), step-03 (scaffoldi
|
|
|
136
174
|
|
|
137
175
|
## 5e. Scope Complexity Guard
|
|
138
176
|
|
|
139
|
-
**Design:** `/apex` handles 1 module at a time. Use `/
|
|
177
|
+
**Design:** `/apex` handles 1 module at a time. Use `/business-analyse-develop` for multi-module projects.
|
|
140
178
|
|
|
141
179
|
**Calculate:**
|
|
142
180
|
```
|
|
@@ -144,10 +182,10 @@ scope_score = entity_count + (section_count * 0.5) + (app_count * 3)
|
|
|
144
182
|
```
|
|
145
183
|
|
|
146
184
|
**Rules:**
|
|
147
|
-
- `delegate_mode (-d)` → SKIP guard (
|
|
148
|
-
- `app_count > 1` → Warning: use `/
|
|
149
|
-
- `entity_count > 6` → BLOCKING: max 6 entities. Solutions: `/
|
|
150
|
-
- `scope_score > 8` → WARNING: ask user to split or use `/
|
|
185
|
+
- `delegate_mode (-d)` → SKIP guard (business-analyse-develop handles scope per module)
|
|
186
|
+
- `app_count > 1` → Warning: use `/business-analyse-develop` or split requests
|
|
187
|
+
- `entity_count > 6` → BLOCKING: max 6 entities. Solutions: `/business-analyse-develop`, `/apex -d`, or split manually
|
|
188
|
+
- `scope_score > 8` → WARNING: ask user to split or use `/business-analyse-develop`
|
|
151
189
|
|
|
152
190
|
**Recommended Scope:**
|
|
153
191
|
| Metric | Safe | Warning | Blocking |
|
|
@@ -39,7 +39,7 @@ This saves ~2 minutes of Glob searches on an empty project.
|
|
|
39
39
|
|
|
40
40
|
## 0b. Delegate Mode Fast Path (if delegate_mode)
|
|
41
41
|
|
|
42
|
-
> **When called via `/
|
|
42
|
+
> **When called via `/business-analyse-develop -d`, PRD tasks provide pre-computed scope. Reduce exploration to verification only.**
|
|
43
43
|
|
|
44
44
|
```
|
|
45
45
|
IF delegate_mode:
|
|
@@ -21,7 +21,7 @@ Read `references/smartstack-layers.md` for layer execution rules, skill/MCP mapp
|
|
|
21
21
|
|
|
22
22
|
## 0. Delegate Mode Fast Path (if delegate_mode)
|
|
23
23
|
|
|
24
|
-
> **When called via `/
|
|
24
|
+
> **When called via `/business-analyse-develop -d`, PRD tasks already define the scope. Map directly to layers.**
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
IF delegate_mode:
|
|
@@ -81,7 +81,7 @@ Load each sub-step sequentially:
|
|
|
81
81
|
|
|
82
82
|
## PRD State Update (delegate mode only)
|
|
83
83
|
|
|
84
|
-
> **After completing EACH layer**, update the PRD file so `/
|
|
84
|
+
> **After completing EACH layer**, update the PRD file so `/business-analyse-develop` can track progress.
|
|
85
85
|
|
|
86
86
|
```
|
|
87
87
|
IF delegate_mode:
|