@atlashub/smartstack-cli 4.18.0 → 4.19.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.
Files changed (160) hide show
  1. package/package.json +1 -1
  2. package/templates/agents/ba-reader.md +86 -80
  3. package/templates/agents/ba-writer.md +318 -415
  4. package/templates/agents/docs-context-reader.md +3 -3
  5. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
  6. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +126 -0
  7. package/templates/skills/apex/SKILL.md +29 -16
  8. package/templates/skills/apex/_shared.md +62 -9
  9. package/templates/skills/apex/references/analysis-methods.md +8 -6
  10. package/templates/skills/apex/references/challenge-questions.md +5 -5
  11. package/templates/skills/apex/references/core-seed-data.md +68 -45
  12. package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +26 -21
  13. package/templates/skills/apex/references/parallel-execution.md +156 -0
  14. package/templates/skills/apex/references/person-extension-pattern.md +12 -12
  15. package/templates/skills/apex/references/post-checks.md +1748 -1726
  16. package/templates/skills/apex/references/smartstack-api.md +63 -57
  17. package/templates/skills/apex/references/smartstack-frontend-compliance.md +594 -0
  18. package/templates/skills/apex/references/smartstack-frontend.md +1246 -1842
  19. package/templates/skills/apex/references/smartstack-layers.md +98 -145
  20. package/templates/skills/apex/steps/step-00-init.md +30 -6
  21. package/templates/skills/apex/steps/step-01-analyze.md +27 -23
  22. package/templates/skills/apex/steps/step-02-plan.md +12 -12
  23. package/templates/skills/apex/steps/step-03-execute.md +198 -143
  24. package/templates/skills/apex/steps/step-04-examine.md +24 -93
  25. package/templates/skills/apex/steps/step-05-deep-review.md +16 -16
  26. package/templates/skills/apex/steps/step-06-resolve.md +9 -9
  27. package/templates/skills/apex/steps/step-07-tests.md +3 -1
  28. package/templates/skills/apex/steps/step-08-run-tests.md +1 -1
  29. package/templates/skills/business-analyse/SKILL.md +182 -301
  30. package/templates/skills/business-analyse/_shared.md +119 -336
  31. package/templates/skills/business-analyse/html/ba-interactive.html +703 -82
  32. package/templates/skills/business-analyse/html/build-html.js +41 -3
  33. package/templates/skills/business-analyse/html/src/partials/cadrage-context.html +34 -0
  34. package/templates/skills/business-analyse/html/src/partials/cadrage-risks.html +48 -0
  35. package/templates/skills/business-analyse/html/src/partials/cadrage-scope.html +49 -0
  36. package/templates/skills/business-analyse/html/src/partials/cadrage-stakeholders.html +55 -0
  37. package/templates/skills/business-analyse/html/src/partials/cadrage-success.html +34 -0
  38. package/templates/skills/business-analyse/html/src/partials/consol-datamodel.html +8 -0
  39. package/templates/skills/business-analyse/html/src/partials/consol-flows.html +29 -0
  40. package/templates/skills/business-analyse/html/src/partials/consol-interactions.html +8 -0
  41. package/templates/skills/business-analyse/html/src/partials/consol-permissions.html +8 -0
  42. package/templates/skills/business-analyse/html/src/partials/decomp-dependencies.html +38 -0
  43. package/templates/skills/business-analyse/html/src/partials/decomp-modules.html +51 -0
  44. package/templates/skills/business-analyse/html/src/partials/handoff-summary.html +24 -0
  45. package/templates/skills/business-analyse/html/src/partials/module-spec-container.html +4 -0
  46. package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +17 -1
  47. package/templates/skills/business-analyse/html/src/scripts/02-navigation.js +31 -5
  48. package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +100 -63
  49. package/templates/skills/business-analyse/html/src/scripts/06-render-mockups.js +372 -0
  50. package/templates/skills/business-analyse/html/src/scripts/10-comments.js +41 -13
  51. package/templates/skills/business-analyse/html/src/styles/09-mockups-html.css +136 -0
  52. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +7 -5
  53. package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +142 -0
  54. package/templates/skills/business-analyse/questionnaire/03-data-ui.md +94 -0
  55. package/templates/skills/business-analyse/questionnaire/04-risks-metrics.md +150 -0
  56. package/templates/skills/business-analyse/questionnaire/05-cross-module.md +69 -0
  57. package/templates/skills/business-analyse/questionnaire.md +23 -280
  58. package/templates/skills/business-analyse/react/application-viewer.md +2 -2
  59. package/templates/skills/business-analyse/react/components.md +4 -4
  60. package/templates/skills/business-analyse/react/i18n-template.md +1 -1
  61. package/templates/skills/business-analyse/react/schema.md +14 -14
  62. package/templates/skills/business-analyse/references/acceptance-criteria.md +21 -21
  63. package/templates/skills/business-analyse/references/analysis-semantic-checks.md +3 -3
  64. package/templates/skills/business-analyse/references/compilation-structure-cards.md +1 -1
  65. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +5 -5
  66. package/templates/skills/business-analyse/references/deploy-data-build.md +12 -11
  67. package/templates/skills/business-analyse/references/deploy-modes.md +10 -10
  68. package/templates/skills/business-analyse/references/detection-strategies.md +6 -6
  69. package/templates/skills/business-analyse/references/html-data-mapping.md +15 -15
  70. package/templates/skills/business-analyse/references/naming-conventions.md +4 -4
  71. package/templates/skills/business-analyse/references/review-data-mapping.md +29 -29
  72. package/templates/skills/business-analyse/references/robustness-checks.md +36 -36
  73. package/templates/skills/business-analyse/references/spec-auto-inference.md +2 -2
  74. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
  75. package/templates/skills/business-analyse/references/ui-resource-cards.md +1 -1
  76. package/templates/skills/business-analyse/references/validation-checklist.md +3 -3
  77. package/templates/skills/business-analyse/references/wireframe-svg-style-guide.md +2 -2
  78. package/templates/skills/business-analyse/schemas/application-schema.json +8 -8
  79. package/templates/skills/business-analyse/schemas/feature-schema.json +3 -3
  80. package/templates/skills/business-analyse/schemas/index-schema.json +47 -0
  81. package/templates/skills/business-analyse/schemas/project-schema.json +6 -6
  82. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +1 -1
  83. package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +5 -3
  84. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +4 -4
  85. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +1 -1
  86. package/templates/skills/business-analyse/schemas/shared/common-defs.json +4 -4
  87. package/templates/skills/business-analyse/steps/step-00-init.md +68 -77
  88. package/templates/skills/business-analyse/steps/step-01-cadrage.md +54 -180
  89. package/templates/skills/business-analyse/steps/step-02-structure.md +175 -0
  90. package/templates/skills/business-analyse/steps/step-03-specify.md +198 -0
  91. package/templates/skills/business-analyse/steps/step-04-consolidate.md +478 -0
  92. package/templates/skills/business-analyse/steps/step-05-deploy.md +220 -0
  93. package/templates/skills/business-analyse/steps/step-06-review.md +51 -69
  94. package/templates/skills/business-analyse/templates/tpl-frd.md +1 -1
  95. package/templates/skills/business-analyse/templates/tpl-handoff.md +20 -17
  96. package/templates/skills/business-analyse/templates/tpl-launch-displays.md +2 -2
  97. package/templates/skills/business-analyse/templates-react.md +2 -2
  98. package/templates/skills/derive-prd/SKILL.md +92 -0
  99. package/templates/skills/derive-prd/references/acceptance-criteria.md +169 -0
  100. package/templates/skills/derive-prd/references/entity-domain-mapping.md +115 -0
  101. package/templates/skills/{business-analyse → derive-prd}/references/handoff-file-templates.md +131 -120
  102. package/templates/skills/{business-analyse → derive-prd}/references/handoff-mappings.md +95 -95
  103. package/templates/skills/{business-analyse → derive-prd}/references/handoff-seeddata-generation.md +312 -312
  104. package/templates/skills/{business-analyse → derive-prd}/references/prd-generation.md +262 -263
  105. package/templates/skills/derive-prd/references/readiness-scoring.md +104 -0
  106. package/templates/skills/derive-prd/schemas/handoff-schema.json +95 -0
  107. package/templates/skills/derive-prd/steps/step-00-validate.md +130 -0
  108. package/templates/skills/derive-prd/steps/step-01-transform.md +206 -0
  109. package/templates/skills/derive-prd/steps/step-02-export.md +181 -0
  110. package/templates/skills/{business-analyse → derive-prd}/templates/tpl-progress.md +172 -172
  111. package/templates/skills/ralph-loop/SKILL.md +2 -1
  112. package/templates/skills/ralph-loop/references/init-resume-recovery.md +1 -1
  113. package/templates/skills/ralph-loop/steps/step-01-task.md +2 -2
  114. package/templates/skills/apex/references/agent-teams-protocol.md +0 -203
  115. package/templates/skills/business-analyse/_architecture.md +0 -124
  116. package/templates/skills/business-analyse/_elicitation.md +0 -206
  117. package/templates/skills/business-analyse/_module-loop.md +0 -115
  118. package/templates/skills/business-analyse/_rules.md +0 -142
  119. package/templates/skills/business-analyse/_suggestions.md +0 -34
  120. package/templates/skills/business-analyse/questionnaire/00-application.md +0 -160
  121. package/templates/skills/business-analyse/questionnaire/00b-project.md +0 -85
  122. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +0 -189
  123. package/templates/skills/business-analyse/questionnaire/03-scope.md +0 -164
  124. package/templates/skills/business-analyse/questionnaire/04-data.md +0 -88
  125. package/templates/skills/business-analyse/questionnaire/05-integrations.md +0 -58
  126. package/templates/skills/business-analyse/questionnaire/06-security.md +0 -68
  127. package/templates/skills/business-analyse/questionnaire/07-ui.md +0 -76
  128. package/templates/skills/business-analyse/questionnaire/08-performance.md +0 -42
  129. package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -45
  130. package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -58
  131. package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +0 -59
  132. package/templates/skills/business-analyse/questionnaire/12-migration.md +0 -58
  133. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +0 -69
  134. package/templates/skills/business-analyse/questionnaire/14-risk-assumptions.md +0 -135
  135. package/templates/skills/business-analyse/questionnaire/15-success-metrics.md +0 -136
  136. package/templates/skills/business-analyse/references/agent-module-prompt.md +0 -366
  137. package/templates/skills/business-analyse/references/agent-pooling-best-practices.md +0 -557
  138. package/templates/skills/business-analyse/references/cache-warming-strategy.md +0 -566
  139. package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +0 -41
  140. package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +0 -74
  141. package/templates/skills/business-analyse/references/cadrage-pre-analysis.md +0 -115
  142. package/templates/skills/business-analyse/references/cadrage-shared-modules.md +0 -68
  143. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +0 -85
  144. package/templates/skills/business-analyse/references/team-orchestration.md +0 -1093
  145. package/templates/skills/business-analyse/references/validate-incremental-html.md +0 -121
  146. package/templates/skills/business-analyse/steps/step-01b-applications.md +0 -419
  147. package/templates/skills/business-analyse/steps/step-02-decomposition.md +0 -387
  148. package/templates/skills/business-analyse/steps/step-03a-data.md +0 -16
  149. package/templates/skills/business-analyse/steps/step-03a1-setup.md +0 -486
  150. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +0 -300
  151. package/templates/skills/business-analyse/steps/step-03b-ui.md +0 -405
  152. package/templates/skills/business-analyse/steps/step-03c-compile.md +0 -516
  153. package/templates/skills/business-analyse/steps/step-03d-validate.md +0 -691
  154. package/templates/skills/business-analyse/steps/step-04-consolidation.md +0 -17
  155. package/templates/skills/business-analyse/steps/step-04a-collect.md +0 -415
  156. package/templates/skills/business-analyse/steps/step-04b-analyze.md +0 -163
  157. package/templates/skills/business-analyse/steps/step-04c-decide.md +0 -186
  158. package/templates/skills/business-analyse/steps/step-05a-handoff.md +0 -937
  159. package/templates/skills/business-analyse/steps/step-05b-deploy.md +0 -522
  160. package/templates/skills/business-analyse/steps/step-05c-ralph-readiness.md +0 -703
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlashub/smartstack-cli",
3
- "version": "4.18.0",
3
+ "version": "4.19.0",
4
4
  "description": "SmartStack Claude Code automation toolkit - GitFlow, EF Core migrations, prompts and more",
5
5
  "author": {
6
6
  "name": "SmartStack",
@@ -1,25 +1,25 @@
1
1
  ---
2
2
  name: ba-reader
3
- description: Reads feature.json to answer questions, provide context to other skills, or search across features.
3
+ description: Reads granular JSON files to answer questions, provide context to other skills, or search across features.
4
4
  color: green
5
5
  tools: Read, Glob, Grep
6
6
  model: haiku
7
7
  ---
8
8
 
9
- You are a business analysis reader agent specialized in extracting and synthesizing information from feature.json files. Your role is to answer questions about features, provide context for other skills and agents, and search across the business analysis repository.
9
+ You are a business analysis reader agent specialized in extracting and synthesizing information from granular JSON files (index.json and thematic files). Your role is to answer questions about features, provide context for other skills and agents, and search across the business analysis repository.
10
10
 
11
11
  ## Mission
12
12
 
13
- Read feature.json files at both application-level and module-level, and provide structured answers, context summaries, or cross-feature insights. Support discovery, documentation, and skill orchestration.
13
+ Read index.json and thematic JSON files at both application-level and module-level, and provide structured answers, context summaries, or cross-feature insights. Support discovery, documentation, and skill orchestration.
14
14
 
15
15
  **File locations:**
16
- - Application-level: `docs/{app}/business-analyse/v{X.Y}/feature.json`
17
- - Module-level: `docs/{app}/{module}/business-analyse/v{X.Y}/feature.json`
16
+ - Application-level: `docs/{app}/business-analyse/v{X.Y}/index.json` + thematic files
17
+ - Module-level: `docs/{app}/{module}/business-analyse/v{X.Y}/index.json` + thematic files
18
18
 
19
19
  ## Core Operations
20
20
 
21
21
  ### findFeature
22
- Locate a feature by ID and return its latest version path.
22
+ Locate a feature by ID and return its latest version path (index.json).
23
23
 
24
24
  **Input:**
25
25
  - featureId: FEAT-NNN (e.g., FEAT-042)
@@ -27,46 +27,48 @@ Locate a feature by ID and return its latest version path.
27
27
  - Optional: scope ("application" | "module" | "any") — default: "any"
28
28
 
29
29
  **Process:**
30
- 1. Glob pattern: `docs/**/business-analyse/*/feature.json`
31
- 2. Read each feature.json and check id field
30
+ 1. Glob pattern: `docs/**/business-analyse/*/index.json`
31
+ 2. Read each index.json and check id field
32
32
  3. If scope filter provided, also check scope field
33
33
  4. If multiple versions exist, sort numerically by version
34
34
  5. Return highest matching version path
35
35
  6. If not found, check legacy `.business-analyse/` format
36
36
 
37
37
  **Output:**
38
- - Full path to feature.json
38
+ - Full path to index.json
39
39
  - Version number
40
40
  - Scope (application or module)
41
41
  - Status
42
42
  - Last updated timestamp
43
43
 
44
44
  ### findApplicationFeature
45
- Locate the master (application-level) feature.json for a given app.
45
+ Locate the master (application-level) index.json for a given app.
46
46
 
47
47
  **Input:**
48
48
  - app: string (application code, e.g., "Sales")
49
49
  - OR featureId: FEAT-NNN
50
50
 
51
51
  **Process:**
52
- 1. Glob: `docs/{app}/business-analyse/*/feature.json`
52
+ 1. Glob: `docs/{app}/business-analyse/*/index.json`
53
53
  2. Read and verify scope = "application"
54
54
  3. Return latest version path
55
55
 
56
56
  **Output:**
57
- - Full path to master feature.json
57
+ - Full path to master index.json
58
58
  - Workflow state (mode, currentModuleIndex, completedModules)
59
59
 
60
60
  ### readApplicationContext
61
- Read the master feature.json and extract application-level context.
61
+ Read the master index.json and extract application-level context from index.json + cadrage.json.
62
62
 
63
63
  **Input:**
64
64
  - featureId: FEAT-NNN of the master
65
65
 
66
66
  **Process:**
67
- 1. Find master feature.json
68
- 2. Extract: cadrage.applicationRoles, modules[], dependencyGraph, metadata.workflow
69
- 3. Format as compact context block
67
+ 1. Find master index.json
68
+ 2. Read index.json for metadata and modules[]
69
+ 3. Read cadrage.json for applicationRoles and problem/vision context
70
+ 4. Extract: cadrage.applicationRoles, modules[], dependencyGraph, metadata.workflow
71
+ 5. Format as compact context block
70
72
 
71
73
  **Output (max 50 lines):**
72
74
  ```markdown
@@ -93,9 +95,10 @@ Get status overview of all modules in the application.
93
95
  - featureId: FEAT-NNN of the master
94
96
 
95
97
  **Process:**
96
- 1. Read master feature.json
98
+ 1. Read master index.json
97
99
  2. Extract modules[].status for each module
98
- 3. Return status table
100
+ 3. For each module, read its module-level index.json and extract entity count, BR count
101
+ 4. Return status table
99
102
 
100
103
  **Output:**
101
104
  - Markdown table: Module | Status | Complexity | Entities | BRs
@@ -107,13 +110,13 @@ Get a compact summary of all completed (specified) modules, for use as context w
107
110
  - featureId: FEAT-NNN of the master
108
111
 
109
112
  **Process:**
110
- 1. Read master feature.json → get list of completed modules
111
- 2. For each completed module, read its module-level feature.json
112
- 3. Extract compact summary:
113
- - Entity names (list only)
114
- - Key business rules (IDs + 1-line descriptions)
115
- - Permission paths (list only)
116
- - Key relationships / FK references
113
+ 1. Read master index.json → get list of completed modules
114
+ 2. For each completed module, read its module-level index.json + thematic files
115
+ 3. Extract compact summary from each module:
116
+ - From entities.json: Entity names (list only)
117
+ - From rules.json: Key business rules (IDs + 1-line descriptions)
118
+ - From permissions.json: Permission paths (list only)
119
+ - From entities.json: Key relationships / FK references
117
120
  4. Keep total output under 100 lines
118
121
 
119
122
  **Output:**
@@ -134,16 +137,17 @@ FKs exposed: Product.Id, Category.Id
134
137
  ```
135
138
 
136
139
  ### listAllModuleIds
137
- List all UC, BR, FR IDs across all specified module feature.json files. Used by ba-writer for collision detection.
140
+ List all UC, BR, FR IDs across all specified module thematic JSON files. Used by ba-writer for collision detection.
138
141
 
139
142
  **Input:**
140
143
  - applicationFeatureId: FEAT-NNN (master)
141
144
 
142
145
  **Process:**
143
- 1. Read master feature.json → get modules[].code and modules[].featureJsonPath
146
+ 1. Read master index.json → get modules[].code and modules[].indexJsonPath
144
147
  2. For each module with status "specified" or "handed-off":
145
- a. Read module feature.json
146
- b. Extract: specification.useCases[].id, analysis.businessRules[].id, specification.functionalRequirements[].id
148
+ a. Read module index.json
149
+ b. Read module usecases.json and rules.json
150
+ c. Extract: usecases.json useCases[].id + functionalRequirements[].id, rules.json businessRules[].id
147
151
  3. Return map of all IDs per module
148
152
 
149
153
  **Output:**
@@ -157,18 +161,19 @@ List all UC, BR, FR IDs across all specified module feature.json files. Used by
157
161
  Used by: ba-writer.enrichSection() for ID collision check before writing specification section.
158
162
 
159
163
  ### readSection
160
- Extract and format a specific section from a feature.json.
164
+ Extract and format a specific thematic file from a module's JSON directory.
161
165
 
162
166
  **Input:**
163
- - featureId: FEAT-NNN or full path to feature.json
164
- - section: one of [discovery, analysis, specification, validation, handoff, suggestions]
167
+ - featureId: FEAT-NNN or full path to index.json
168
+ - themeName: one of [discovery, analysis, specification, validation, handoff, suggestions, cadrage, consolidation, entities, rules, usecases, permissions, screens, review]
165
169
 
166
170
  **Process:**
167
- 1. Find feature.json (use findFeature if given ID)
168
- 2. Read and extract the named section
169
- 3. Resolve cross-references (BR-XXX, UC-XXX, FR-XXX to their full definitions)
170
- 4. Format for readability
171
- 5. Return with metadata (feature ID, version, status)
171
+ 1. Find index.json (use findFeature if given ID)
172
+ 2. Determine thematic filename: `{themeName}.json`
173
+ 3. Read the thematic file from the same directory as index.json
174
+ 4. Resolve cross-references (BR-XXX, UC-XXX, FR-XXX to their full definitions)
175
+ 5. Format for readability
176
+ 6. Return with metadata (feature ID, version, status)
172
177
 
173
178
  **Output:**
174
179
  - Formatted section content
@@ -183,22 +188,23 @@ Answer natural language questions about a feature.
183
188
  - question: free-form question (e.g., "What permissions does this feature need?")
184
189
 
185
190
  **Process:**
186
- 1. Find feature.json
191
+ 1. Find index.json
187
192
  2. Parse the question to understand intent (permissions, rules, entities, actors, use cases, scope)
188
- 3. Extract relevant data from appropriate sections
189
- 4. Cross-reference related items
190
- 5. Format answer with examples and citations
193
+ 3. Read appropriate thematic files (permissions.json for permissions, rules.json for rules, entities.json for entities, etc.)
194
+ 4. Extract relevant data from appropriate files
195
+ 5. Cross-reference related items
196
+ 6. Format answer with examples and citations
191
197
 
192
198
  **Common Question Types:**
193
- - "What are the business rules?" → return analysis.businessRules with full details
194
- - "What permissions are needed?" → extract from specification.permissionMatrix
195
- - "What are the main entities?" → return specification.entities / analysis.entities with relationships
196
- - "Who are the actors?" → extract from specification.actors or cadrage.applicationRoles
197
- - "What use cases are covered?" → return specification.useCases with descriptions
198
- - "What's the current status?" → return status, steps timeline, and next actions
199
- - "Which modules are defined?" → return modules[] from master (application-level)
200
- - "What are the cross-module interactions?" → return consolidation.crossModuleInteractions
201
- - "What roles does the application have?" → return cadrage.applicationRoles from master
199
+ - "What are the business rules?" → read rules.json, return businessRules with full details
200
+ - "What permissions are needed?" → read permissions.json, extract from permissionMatrix
201
+ - "What are the main entities?" → read entities.json, return entities with relationships
202
+ - "Who are the actors?" → read cadrage.json for applicationRoles or usecases.json for primaryActors
203
+ - "What use cases are covered?" → read usecases.json, return useCases with descriptions
204
+ - "What's the current status?" → read index.json status, steps timeline, and next actions
205
+ - "Which modules are defined?" → read index.json modules[] array
206
+ - "What are the cross-module interactions?" → read consolidation.json, return crossModuleInteractions
207
+ - "What roles does the application have?" → read cadrage.json applicationRoles from master
202
208
 
203
209
  **Output:**
204
210
  - Answer formatted as markdown
@@ -207,7 +213,7 @@ Answer natural language questions about a feature.
207
213
  - Max 150 lines output
208
214
 
209
215
  ### searchAcrossFeatures
210
- Search all features for matching content.
216
+ Search all features for matching content across thematic files.
211
217
 
212
218
  **Input:**
213
219
  - searchTerm: string (entity name, permission path, role, business rule keyword)
@@ -215,14 +221,12 @@ Search all features for matching content.
215
221
  - Optional: scope (all | names-only | ids-only)
216
222
 
217
223
  **Process:**
218
- 1. Glob all feature.json files in docs/
219
- 2. Search across:
220
- - Feature IDs
221
- - Entity names
222
- - Permission paths
223
- - Business rule names
224
- - Use case names
225
- - Functional requirement names
224
+ 1. Glob all index.json files in docs/
225
+ 2. For each index.json directory, read relevant thematic files based on searchTerm:
226
+ - If searchTerm matches entity pattern → search entities.json
227
+ - If searchTerm matches permission pattern → search permissions.json
228
+ - If searchTerm matches rule/usecase pattern → search rules.json, usecases.json
229
+ - Default: search all thematic files
226
230
  3. Return summary table of matches
227
231
  4. Sort by feature ID and status
228
232
 
@@ -240,9 +244,9 @@ Get the highest version number for a feature or module.
240
244
 
241
245
  **Process:**
242
246
  1. Glob paths:
243
- - Single feature: `docs/**/business-analyse/v*/feature.json` filtered by ID
244
- - Module: `docs/{app}/{module}/business-analyse/v*/feature.json`
245
- 2. Extract version numbers (v1.0, v1.5, v2.1, etc.)
247
+ - Single feature: `docs/**/business-analyse/v*/index.json` filtered by ID
248
+ - Module: `docs/{app}/{module}/business-analyse/v*/index.json`
249
+ 2. Extract version numbers from index.json files (v1.0, v1.5, v2.1, etc.)
246
250
  3. Sort numerically
247
251
  4. Return highest version path and number
248
252
 
@@ -260,14 +264,13 @@ Generate compact context for use by other skills and agents.
260
264
  - Optional: detailed (true/false - default: false)
261
265
 
262
266
  **Process:**
263
- 1. Find and read feature.json
264
- 2. Extract and compress key information:
265
- - Feature metadata (ID, app, module, status, version)
266
- - Entity list (names only)
267
- - Permission list (paths only)
268
- - Business rule list (IDs + 1-line names)
269
- - Use case list (IDs + 1-line names)
270
- - Functional requirement list (IDs + 1-line names)
267
+ 1. Find and read index.json
268
+ 2. Read thematic files as needed to extract key information:
269
+ - From index.json: Feature metadata (ID, app, module, status, version)
270
+ - From entities.json: Entity list (names only)
271
+ - From permissions.json: Permission list (paths only)
272
+ - From rules.json: Business rule list (IDs + 1-line names)
273
+ - From usecases.json: Use case list (IDs + 1-line names) and FR list
271
274
  3. If detailed: include cross-references and counts
272
275
  4. Format as structured markdown for easy parsing
273
276
  5. Keep output to max 100 lines
@@ -321,8 +324,8 @@ Generate compact context for use by other skills and agents.
321
324
 
322
325
  When searching for feature data:
323
326
 
324
- 1. **Primary (application):** `docs/{app}/business-analyse/*/feature.json` (scope: application)
325
- 2. **Primary (module):** `docs/{app}/{module}/business-analyse/*/feature.json` (scope: module)
327
+ 1. **Primary (application):** `docs/{app}/business-analyse/*/index.json` (scope: application)
328
+ 2. **Primary (module):** `docs/{app}/{module}/business-analyse/*/index.json` (scope: module)
326
329
  3. **Fallback:** `.business-analyse/` (legacy format)
327
330
  - Read: `00-context.md` + `3-functional-specification.md`
328
331
  - Warn user about old format
@@ -330,11 +333,11 @@ When searching for feature data:
330
333
 
331
334
  ## Cross-Reference Resolution
332
335
 
333
- When encountering ID references, resolve them:
336
+ When encountering ID references, resolve them by reading appropriate thematic files:
334
337
 
335
- - **BR-XXX** → Look up in analysis.businessRules array, return full object with id, name, description
336
- - **UC-XXX** → Look up in specification.useCases array, return with actors, preconditions, postconditions
337
- - **FR-XXX** → Look up in specification.functionalRequirements array, return with description and priority
338
+ - **BR-XXX** → Look up in rules.json businessRules array, return full object with id, name, description
339
+ - **UC-XXX** → Look up in usecases.json useCases array, return with actors, preconditions, postconditions
340
+ - **FR-XXX** → Look up in usecases.json functionalRequirements array, return with description and priority
338
341
  - **Permission paths** → Show where used (in which use cases, functional requirements)
339
342
 
340
343
  **Format resolved references as inline citations:**
@@ -346,7 +349,7 @@ When encountering ID references, resolve them:
346
349
 
347
350
  - If featureId not found: suggest similar IDs or search for feature by keyword
348
351
  - If legacy format detected: show warning and offer to display legacy content
349
- - If section not found: list available sections in the feature
352
+ - If thematic file not found: list available thematic files in the feature version directory
350
353
  - If version not found: list available versions
351
354
  - Return helpful suggestions for refinement
352
355
 
@@ -355,10 +358,10 @@ When encountering ID references, resolve them:
355
358
  This agent provides context for:
356
359
  - **ralph-loop**: Entity and permission context during feature implementation
357
360
  - **feature-full**: Source for comprehensive feature documentation
358
- - **Code generation**: Permission paths and entity definitions
361
+ - **Code generation**: Permission paths and entity definitions from thematic files
359
362
  - **ba-writer**: Finding features for enrichment operations
360
- - **step-03a-specify**: Completed module summaries for cross-module references
361
- - **step-04-consolidation**: Application context and module summaries for cross-module validation
363
+ - **step-03-specify**: Completed module summaries from thematic files for cross-module references
364
+ - **step-04-consolidate**: Application context from index.json + thematic files for cross-module validation
362
365
  - Other skills needing business analysis context
363
366
 
364
367
  ## Example Usage
@@ -366,13 +369,16 @@ This agent provides context for:
366
369
  ```
367
370
  User: "What permissions does FEAT-042 need?"
368
371
  → Operation: answerQuestion(FEAT-042, "What permissions does this feature need?")
372
+ → Read: index.json + permissions.json
369
373
  → Output: List of crm.contacts.* permissions with use case mapping
370
374
 
371
375
  User: "Find all features that use the Contact entity"
372
376
  → Operation: searchAcrossFeatures("Contact")
377
+ → Read: all entities.json files
373
378
  → Output: Table of all features referencing Contact entity
374
379
 
375
380
  User: "Give me a summary of FEAT-042 for code generation"
376
381
  → Operation: getSummaryForSkill(FEAT-042, detailed=false)
382
+ → Read: index.json + entities.json + permissions.json + rules.json + usecases.json
377
383
  → Output: Compact markdown block with entities, permissions, rules, use cases
378
384
  ```