@atlashub/smartstack-cli 4.29.0 → 4.31.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 (58) hide show
  1. package/.documentation/business-analyse.html +217 -0
  2. package/dist/index.js +17 -4
  3. package/dist/index.js.map +1 -1
  4. package/package.json +1 -1
  5. package/templates/skills/apex/references/code-generation.md +1 -1
  6. package/templates/skills/apex/references/person-extension-pattern.md +23 -2
  7. package/templates/skills/apex/references/post-checks.md +52 -0
  8. package/templates/skills/apex/references/smartstack-api.md +111 -0
  9. package/templates/skills/apex/references/smartstack-frontend.md +25 -2
  10. package/templates/skills/apex/references/smartstack-layers.md +1 -0
  11. package/templates/skills/apex/steps/step-03-execute.md +110 -7
  12. package/templates/skills/application/templates-frontend.md +1 -1
  13. package/templates/skills/ba-generate-html/SKILL.md +1 -1
  14. package/templates/skills/ba-generate-html/html/ba-interactive.html +234 -262
  15. package/templates/skills/ba-generate-html/html/src/partials/cadrage-context.html +9 -9
  16. package/templates/skills/ba-generate-html/html/src/partials/cadrage-scope.html +17 -39
  17. package/templates/skills/ba-generate-html/html/src/partials/cadrage-stakeholders.html +7 -7
  18. package/templates/skills/ba-generate-html/html/src/partials/cadrage-success.html +13 -13
  19. package/templates/skills/ba-generate-html/html/src/partials/consol-datamodel.html +4 -4
  20. package/templates/skills/ba-generate-html/html/src/partials/consol-flows.html +5 -5
  21. package/templates/skills/ba-generate-html/html/src/partials/consol-interactions.html +2 -2
  22. package/templates/skills/ba-generate-html/html/src/partials/consol-permissions.html +4 -4
  23. package/templates/skills/ba-generate-html/html/src/partials/decomp-dependencies.html +11 -11
  24. package/templates/skills/ba-generate-html/html/src/partials/decomp-modules.html +8 -16
  25. package/templates/skills/ba-generate-html/html/src/partials/handoff-summary.html +5 -5
  26. package/templates/skills/ba-generate-html/html/src/scripts/01-data-init.js +29 -21
  27. package/templates/skills/ba-generate-html/html/src/scripts/02-navigation.js +10 -10
  28. package/templates/skills/ba-generate-html/html/src/scripts/03-render-cadrage.js +5 -4
  29. package/templates/skills/ba-generate-html/html/src/scripts/04-render-modules.js +4 -6
  30. package/templates/skills/ba-generate-html/html/src/scripts/05-render-specs.js +57 -57
  31. package/templates/skills/ba-generate-html/html/src/scripts/06-render-consolidation.js +4 -4
  32. package/templates/skills/ba-generate-html/html/src/scripts/06-render-mockups.js +5 -5
  33. package/templates/skills/ba-generate-html/html/src/scripts/07-render-handoff.js +9 -12
  34. package/templates/skills/ba-generate-html/html/src/scripts/08-editing.js +3 -3
  35. package/templates/skills/ba-generate-html/html/src/scripts/09-export.js +2 -2
  36. package/templates/skills/ba-generate-html/html/src/scripts/10-comments.js +3 -3
  37. package/templates/skills/ba-generate-html/html/src/scripts/11-review-panel.js +8 -8
  38. package/templates/skills/ba-generate-html/html/src/styles/03-navigation.css +1 -1
  39. package/templates/skills/ba-generate-html/html/src/styles/04-cards.css +2 -4
  40. package/templates/skills/ba-generate-html/html/src/template.html +93 -123
  41. package/templates/skills/ba-generate-html/references/data-build.md +4 -9
  42. package/templates/skills/ba-generate-html/references/data-mapping.md +2 -7
  43. package/templates/skills/ba-generate-html/references/output-modes.md +1 -1
  44. package/templates/skills/ba-generate-html/steps/step-02-build-data.md +8 -7
  45. package/templates/skills/ba-generate-html/steps/step-04-verify.md +2 -2
  46. package/templates/skills/ba-review/references/review-data-mapping.md +4 -6
  47. package/templates/skills/ba-review/steps/step-01-apply.md +2 -4
  48. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +4 -4
  49. package/templates/skills/business-analyse/questionnaire.md +1 -1
  50. package/templates/skills/business-analyse/react/schema.md +2 -7
  51. package/templates/skills/business-analyse/schemas/application-schema.json +2 -9
  52. package/templates/skills/business-analyse/schemas/project-schema.json +4 -8
  53. package/templates/skills/business-analyse/schemas/sections/discovery-schema.json +1 -3
  54. package/templates/skills/business-analyse/steps/step-01-cadrage.md +5 -12
  55. package/templates/skills/business-analyse/steps/step-02-structure.md +3 -5
  56. package/templates/skills/dev-start/SKILL.md +242 -0
  57. package/templates/skills/ui-components/SKILL.md +1 -1
  58. package/templates/skills/ui-components/patterns/data-table.md +1 -1
@@ -122,6 +122,11 @@
122
122
  <a href="#step-03" class="sidebar-toc-link">03. Specify (Per-Module)</a>
123
123
  <a href="#step-04" class="sidebar-toc-link">04. Consolidation</a>
124
124
  <a href="#step-05" class="sidebar-toc-link">05. Handoff</a>
125
+ <a href="#step-06" class="sidebar-toc-link">06. Extract</a>
126
+ <a href="#companion-skills" class="sidebar-toc-link">
127
+ <span data-lang="fr">Skills complementaires</span>
128
+ <span data-lang="en">Companion Skills</span>
129
+ </a>
125
130
  <a href="#schemas" class="sidebar-toc-link">Schemas</a>
126
131
  <a href="#agents" class="sidebar-toc-link">Agents</a>
127
132
  <a href="#ids-refs" class="sidebar-toc-link">
@@ -904,6 +909,31 @@ Exemple:
904
909
  At the handoff step, an interactive HTML document (<code>ba-interactive.html</code>) is deployed to the project directory. This document allows the client to review, edit and enrich the business analysis directly in their browser, without a server. Modifications can be re-imported via <code>/business-analyse -x &lt;json-path&gt;</code>.
905
910
  </p>
906
911
 
912
+ <div class="warning-block" style="background:rgba(255,170,0,0.1);border-left:4px solid #ffaa00;padding:1rem 1.2rem;border-radius:6px;margin:1rem 0;">
913
+ <strong style="color:#ffaa00;">&#9888;
914
+ <span data-lang="fr">Important : Source de verite</span>
915
+ <span data-lang="en">Important: Source of Truth</span>
916
+ </strong>
917
+ <p data-lang="fr" style="margin:0.5rem 0 0;">
918
+ Le HTML interactif est un <strong>livrable genere</strong>, pas une source de donnees. La source de verite est constituee par les fichiers JSON (<code>index.json</code>, <code>cadrage.json</code>, <code>entities.json</code>, etc.). Toute modification faite directement dans le HTML sera <strong>ecrasee</strong> a la prochaine regeneration via <code>/ba-generate-html</code>.
919
+ </p>
920
+ <p data-lang="en" style="margin:0.5rem 0 0;">
921
+ The interactive HTML is a <strong>generated deliverable</strong>, not a data source. The source of truth is the JSON files (<code>index.json</code>, <code>cadrage.json</code>, <code>entities.json</code>, etc.). Any modification made directly in the HTML will be <strong>overwritten</strong> on the next regeneration via <code>/ba-generate-html</code>.
922
+ </p>
923
+ <p data-lang="fr" style="margin:0.5rem 0 0;">
924
+ <strong>Pour conserver vos modifications :</strong><br>
925
+ 1. Exporter le JSON depuis le HTML (bouton d'export)<br>
926
+ 2. Re-importer avec <code>/business-analyse -x &lt;json-path&gt;</code> (met a jour les fichiers JSON sources)<br>
927
+ 3. Regenerer le HTML avec <code>/ba-generate-html</code>
928
+ </p>
929
+ <p data-lang="en" style="margin:0.5rem 0 0;">
930
+ <strong>To preserve your modifications:</strong><br>
931
+ 1. Export JSON from the HTML (export button)<br>
932
+ 2. Re-import with <code>/business-analyse -x &lt;json-path&gt;</code> (updates source JSON files)<br>
933
+ 3. Regenerate the HTML with <code>/ba-generate-html</code>
934
+ </p>
935
+ </div>
936
+
907
937
  <h4 data-lang="fr">Verification post-handoff</h4>
908
938
  <h4 data-lang="en">Post-Handoff Verification</h4>
909
939
 
@@ -952,6 +982,193 @@ Exemple:
952
982
  </div>
953
983
  </section>
954
984
 
985
+ <!-- ============================================ -->
986
+ <!-- COMPANION SKILLS -->
987
+ <!-- ============================================ -->
988
+ <section id="companion-skills">
989
+ <h2>
990
+ <span data-lang="fr">Skills complementaires</span>
991
+ <span data-lang="en">Companion Skills</span>
992
+ </h2>
993
+
994
+ <p data-lang="fr">
995
+ Deux skills independants completent le workflow de business analyse pour la gestion du document HTML interactif.
996
+ </p>
997
+ <p data-lang="en">
998
+ Two independent skills complement the business analysis workflow for managing the interactive HTML document.
999
+ </p>
1000
+
1001
+ <!-- /ba-generate-html -->
1002
+ <h3><code>/ba-generate-html</code></h3>
1003
+
1004
+ <p data-lang="fr">
1005
+ Genere (ou regenere) le document HTML interactif a partir des fichiers JSON d'analyse. Ce skill lit les sources JSON (<code>index.json</code>, <code>cadrage.json</code>, fichiers modules) et produit un fichier <code>ba-interactive.html</code> autonome.
1006
+ </p>
1007
+ <p data-lang="en">
1008
+ Generates (or regenerates) the interactive HTML document from the analysis JSON files. This skill reads the JSON sources (<code>index.json</code>, <code>cadrage.json</code>, module files) and produces a standalone <code>ba-interactive.html</code> file.
1009
+ </p>
1010
+
1011
+ <div class="code-block">
1012
+ <button class="copy-btn">Copy</button>
1013
+ <pre><code>/ba-generate-html FEAT-001
1014
+ /ba-generate-html FEAT-001 --force</code></pre>
1015
+ </div>
1016
+
1017
+ <div class="table-container">
1018
+ <table class="reference-table">
1019
+ <thead>
1020
+ <tr>
1021
+ <th>Flag</th>
1022
+ <th><span data-lang="fr">Effet</span><span data-lang="en">Effect</span></th>
1023
+ </tr>
1024
+ </thead>
1025
+ <tbody>
1026
+ <tr>
1027
+ <td><code>--force</code></td>
1028
+ <td><span data-lang="fr">Regenerer meme si le HTML existe deja</span><span data-lang="en">Regenerate even if HTML already exists</span></td>
1029
+ </tr>
1030
+ </tbody>
1031
+ </table>
1032
+ </div>
1033
+
1034
+ <h4><span data-lang="fr">Etapes internes</span><span data-lang="en">Internal Steps</span></h4>
1035
+ <div class="table-container">
1036
+ <table class="reference-table">
1037
+ <thead>
1038
+ <tr>
1039
+ <th>Step</th>
1040
+ <th><span data-lang="fr">Role</span><span data-lang="en">Role</span></th>
1041
+ </tr>
1042
+ </thead>
1043
+ <tbody>
1044
+ <tr>
1045
+ <td>01</td>
1046
+ <td><span data-lang="fr">Lire les sources JSON (index, cadrage, modules, consolidation)</span><span data-lang="en">Read JSON sources (index, cadrage, modules, consolidation)</span></td>
1047
+ </tr>
1048
+ <tr>
1049
+ <td>02</td>
1050
+ <td><span data-lang="fr">Construire FEATURE_DATA + EMBEDDED_ARTIFACTS</span><span data-lang="en">Build FEATURE_DATA + EMBEDDED_ARTIFACTS</span></td>
1051
+ </tr>
1052
+ <tr>
1053
+ <td>03</td>
1054
+ <td><span data-lang="fr">Injecter dans le template ba-interactive.html</span><span data-lang="en">Inject into ba-interactive.html template</span></td>
1055
+ </tr>
1056
+ <tr>
1057
+ <td>04</td>
1058
+ <td><span data-lang="fr">Verification (taille &gt; 100KB, sections, coherence)</span><span data-lang="en">Verification (size &gt; 100KB, sections, coherence)</span></td>
1059
+ </tr>
1060
+ </tbody>
1061
+ </table>
1062
+ </div>
1063
+
1064
+ <div class="warning-block" style="background:rgba(255,170,0,0.1);border-left:4px solid #ffaa00;padding:1rem 1.2rem;border-radius:6px;margin:1rem 0;">
1065
+ <strong style="color:#ffaa00;">&#9888;
1066
+ <span data-lang="fr">Regeneration = ecrasement</span>
1067
+ <span data-lang="en">Regeneration = overwrite</span>
1068
+ </strong>
1069
+ <p data-lang="fr" style="margin:0.5rem 0 0;">
1070
+ <code>/ba-generate-html</code> ecrase le HTML existant. Si vous avez fait des modifications dans le HTML interactif, exportez d'abord le JSON puis re-importez avec <code>/business-analyse -x</code> avant de regenerer.
1071
+ </p>
1072
+ <p data-lang="en" style="margin:0.5rem 0 0;">
1073
+ <code>/ba-generate-html</code> overwrites the existing HTML. If you made modifications in the interactive HTML, first export the JSON then re-import with <code>/business-analyse -x</code> before regenerating.
1074
+ </p>
1075
+ </div>
1076
+
1077
+ <!-- /ba-review -->
1078
+ <h3><code>/ba-review</code></h3>
1079
+
1080
+ <p data-lang="fr">
1081
+ Applique les corrections client exportees depuis le HTML interactif et regenere le document. Ce skill attend un fichier <code>ba-review.json</code> contenant les modifications structurees.
1082
+ </p>
1083
+ <p data-lang="en">
1084
+ Applies client corrections exported from the interactive HTML and regenerates the document. This skill expects a <code>ba-review.json</code> file containing structured modifications.
1085
+ </p>
1086
+
1087
+ <div class="code-block">
1088
+ <button class="copy-btn">Copy</button>
1089
+ <pre><code>/ba-review</code></pre>
1090
+ </div>
1091
+
1092
+ <h4><span data-lang="fr">Workflow</span><span data-lang="en">Workflow</span></h4>
1093
+ <ol>
1094
+ <li data-lang="fr">Lire <code>ba-review.json</code> (exporte depuis le HTML interactif)</li>
1095
+ <li data-lang="en">Read <code>ba-review.json</code> (exported from interactive HTML)</li>
1096
+ <li data-lang="fr">Lire le master <code>index.json</code> existant</li>
1097
+ <li data-lang="en">Read the existing master <code>index.json</code></li>
1098
+ <li data-lang="fr">Creer une nouvelle version</li>
1099
+ <li data-lang="en">Create a new version</li>
1100
+ <li data-lang="fr">Appliquer les corrections (cadrage, modules, consolidation)</li>
1101
+ <li data-lang="en">Apply corrections (cadrage, modules, consolidation)</li>
1102
+ <li data-lang="fr">Regenerer le HTML via <code>/ba-generate-html</code></li>
1103
+ <li data-lang="en">Regenerate HTML via <code>/ba-generate-html</code></li>
1104
+ </ol>
1105
+
1106
+ <h4><span data-lang="fr">Routage des corrections</span><span data-lang="en">Correction Routing</span></h4>
1107
+ <div class="table-container">
1108
+ <table class="reference-table">
1109
+ <thead>
1110
+ <tr>
1111
+ <th><span data-lang="fr">Type de modification</span><span data-lang="en">Modification Type</span></th>
1112
+ <th><span data-lang="fr">Action declenchee</span><span data-lang="en">Triggered Action</span></th>
1113
+ </tr>
1114
+ </thead>
1115
+ <tbody>
1116
+ <tr>
1117
+ <td><span data-lang="fr">Entites / regles / UC / permissions</span><span data-lang="en">Entities / rules / UC / permissions</span></td>
1118
+ <td><span data-lang="fr">Re-execution <code>/business-analyse</code> step-03</span><span data-lang="en">Re-run <code>/business-analyse</code> step-03</span></td>
1119
+ </tr>
1120
+ <tr>
1121
+ <td><span data-lang="fr">Ecrans / wireframes / navigation</span><span data-lang="en">Screens / wireframes / navigation</span></td>
1122
+ <td><span data-lang="fr">Re-execution <code>/ba-design-ui</code></span><span data-lang="en">Re-run <code>/ba-design-ui</code></span></td>
1123
+ </tr>
1124
+ <tr>
1125
+ <td><span data-lang="fr">Les deux</span><span data-lang="en">Both</span></td>
1126
+ <td><span data-lang="fr">Re-specification complete</span><span data-lang="en">Full re-specification</span></td>
1127
+ </tr>
1128
+ <tr>
1129
+ <td><span data-lang="fr">Cadrage uniquement</span><span data-lang="en">Cadrage only</span></td>
1130
+ <td><span data-lang="fr">Regeneration HTML uniquement</span><span data-lang="en">HTML regeneration only</span></td>
1131
+ </tr>
1132
+ <tr>
1133
+ <td><span data-lang="fr">Client approuve</span><span data-lang="en">Client approves</span></td>
1134
+ <td><code>/derive-prd</code></td>
1135
+ </tr>
1136
+ </tbody>
1137
+ </table>
1138
+ </div>
1139
+
1140
+ <!-- Workflow recap -->
1141
+ <h3><span data-lang="fr">Cycle de vie complet</span><span data-lang="en">Complete Lifecycle</span></h3>
1142
+
1143
+ <div class="code-block">
1144
+ <pre><code><span data-lang="fr"># 1. Analyse initiale (genere les JSON + HTML)
1145
+ /business-analyse My Application Description
1146
+
1147
+ # 2. Client consulte le HTML, fait des modifications, exporte le JSON
1148
+
1149
+ # 3a. Re-import des modifications client dans les JSON sources
1150
+ /business-analyse -x ./docs/business/MyApp/ba-export.json
1151
+
1152
+ # 3b. OU appliquer des corrections structurees
1153
+ /ba-review
1154
+
1155
+ # 4. Regenerer le HTML apres modifications des JSON
1156
+ /ba-generate-html FEAT-001</span><span data-lang="en"># 1. Initial analysis (generates JSON + HTML)
1157
+ /business-analyse My Application Description
1158
+
1159
+ # 2. Client reviews the HTML, makes modifications, exports JSON
1160
+
1161
+ # 3a. Re-import client modifications into source JSONs
1162
+ /business-analyse -x ./docs/business/MyApp/ba-export.json
1163
+
1164
+ # 3b. OR apply structured corrections
1165
+ /ba-review
1166
+
1167
+ # 4. Regenerate HTML after JSON modifications
1168
+ /ba-generate-html FEAT-001</span></code></pre>
1169
+ </div>
1170
+ </section>
1171
+
955
1172
  <!-- ============================================ -->
956
1173
  <!-- SCHEMAS -->
957
1174
  <!-- ============================================ -->
package/dist/index.js CHANGED
@@ -127501,8 +127501,10 @@ function detectSmartStackApp() {
127501
127501
  return null;
127502
127502
  }
127503
127503
  var adminCommand = new Command("admin").description("Admin account utilities");
127504
- adminCommand.command("reset").description("Reset the localAdmin account password").option("-c, --connection <string>", "SQL Server connection string").option("-p, --path <path>", "Path to SmartStack.Api folder containing appsettings.json").option("-e, --email <email>", "Admin email address", DEFAULT_CONFIG.adminEmail).option("-f, --force", "Skip confirmation prompt").action(async (options) => {
127505
- logger.header("SmartStack Admin Reset");
127504
+ adminCommand.command("reset").description("Reset the localAdmin account password").option("-c, --connection <string>", "SQL Server connection string").option("-p, --path <path>", "Path to SmartStack.Api folder containing appsettings.json").option("-e, --email <email>", "Admin email address", DEFAULT_CONFIG.adminEmail).option("-f, --force", "Skip confirmation prompt").option("--json", "Output as JSON (machine-readable)").action(async (options) => {
127505
+ if (!options.json) {
127506
+ logger.header("SmartStack Admin Reset");
127507
+ }
127506
127508
  let connectionString = options.connection || null;
127507
127509
  if (!connectionString) {
127508
127510
  const apiPath = options.path || detectSmartStackApp();
@@ -127548,8 +127550,10 @@ adminCommand.command("reset").description("Reset the localAdmin account password
127548
127550
  }
127549
127551
  const adminEmail = options.email;
127550
127552
  const connInfo = parseConnectionString(connectionString);
127551
- logger.info(`Server: ${source_default.cyan(connInfo.server)}`);
127552
- logger.info(`Database: ${source_default.cyan(connInfo.database)}`);
127553
+ if (!options.json) {
127554
+ logger.info(`Server: ${source_default.cyan(connInfo.server)}`);
127555
+ logger.info(`Database: ${source_default.cyan(connInfo.database)}`);
127556
+ }
127553
127557
  if (!options.force) {
127554
127558
  const { confirm } = await lib_default.prompt([
127555
127559
  {
@@ -127587,6 +127591,15 @@ adminCommand.command("reset").description("Reset the localAdmin account password
127587
127591
  displayPasswordResult(adminEmail, newPassword);
127588
127592
  };
127589
127593
  const displayPasswordResult = (email, password) => {
127594
+ if (options.json) {
127595
+ console.log(JSON.stringify({
127596
+ email,
127597
+ password,
127598
+ server: connInfo.server,
127599
+ database: connInfo.database
127600
+ }));
127601
+ return;
127602
+ }
127590
127603
  console.log();
127591
127604
  console.log(source_default.green("\u2550".repeat(60)));
127592
127605
  console.log(source_default.green.bold(" LOCAL ADMINISTRATOR PASSWORD RESET"));