@atlashub/smartstack-cli 2.8.0 → 3.0.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 (74) hide show
  1. package/.documentation/business-analyse.html +81 -17
  2. package/dist/index.js +94 -21
  3. package/dist/index.js.map +1 -1
  4. package/dist/mcp-entry.mjs +1302 -223
  5. package/dist/mcp-entry.mjs.map +1 -1
  6. package/package.json +1 -1
  7. package/templates/agents/efcore/db-deploy.md +1 -1
  8. package/templates/agents/efcore/migration.md +26 -10
  9. package/templates/agents/efcore/rebase-snapshot.md +24 -7
  10. package/templates/agents/efcore/squash.md +73 -57
  11. package/templates/agents/gitflow/commit.md +138 -18
  12. package/templates/agents/gitflow/exec.md +1 -1
  13. package/templates/agents/gitflow/finish.md +79 -62
  14. package/templates/agents/gitflow/init-clone.md +186 -0
  15. package/templates/agents/gitflow/init-detect.md +137 -0
  16. package/templates/agents/gitflow/init-validate.md +210 -0
  17. package/templates/agents/gitflow/init.md +231 -74
  18. package/templates/agents/gitflow/merge.md +65 -33
  19. package/templates/agents/gitflow/pr.md +93 -49
  20. package/templates/agents/gitflow/start.md +76 -33
  21. package/templates/agents/gitflow/status.md +41 -71
  22. package/templates/hooks/appsettings-guard.sh +76 -0
  23. package/templates/hooks/ef-migration-check.md +1 -1
  24. package/templates/hooks/hooks.json +9 -0
  25. package/templates/project/test-frontend/msw/handlers.ts +58 -0
  26. package/templates/project/test-frontend/msw/server.ts +25 -0
  27. package/templates/project/test-frontend/setup.ts +16 -0
  28. package/templates/project/test-frontend/test-utils.tsx +59 -0
  29. package/templates/project/test-frontend/vitest.config.ts +31 -0
  30. package/templates/skills/_resources/config-safety.md +61 -0
  31. package/templates/skills/_resources/formatting-guide.md +2 -2
  32. package/templates/skills/_shared.md +21 -0
  33. package/templates/skills/application/SKILL.md +32 -3
  34. package/templates/skills/application/steps/step-04-backend.md +21 -0
  35. package/templates/skills/application/steps/step-05-frontend.md +20 -36
  36. package/templates/skills/application/steps/step-07-tests.md +259 -120
  37. package/templates/skills/business-analyse/SKILL.md +57 -28
  38. package/templates/skills/business-analyse/_shared.md +70 -39
  39. package/templates/skills/business-analyse/html/ba-interactive.html +2622 -0
  40. package/templates/skills/business-analyse/questionnaire/00-application.md +123 -131
  41. package/templates/skills/business-analyse/questionnaire/01-context.md +173 -24
  42. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +170 -50
  43. package/templates/skills/business-analyse/questionnaire/03-scope.md +154 -48
  44. package/templates/skills/business-analyse/questionnaire/10-documentation.md +1 -1
  45. package/templates/skills/business-analyse/questionnaire/14-risk-assumptions.md +135 -0
  46. package/templates/skills/business-analyse/questionnaire/15-success-metrics.md +136 -0
  47. package/templates/skills/business-analyse/questionnaire.md +55 -46
  48. package/templates/skills/business-analyse/steps/step-00-init.md +24 -2
  49. package/templates/skills/business-analyse/steps/step-01-cadrage.md +31 -20
  50. package/templates/skills/business-analyse/steps/step-03-specify.md +1 -0
  51. package/templates/skills/business-analyse/steps/step-05-handoff.md +103 -1
  52. package/templates/skills/business-analyse/steps/step-06-extract.md +518 -0
  53. package/templates/skills/check-version/SKILL.md +1 -1
  54. package/templates/skills/efcore/steps/db/step-deploy.md +22 -3
  55. package/templates/skills/efcore/steps/db/step-reset.md +27 -4
  56. package/templates/skills/efcore/steps/db/step-seed.md +46 -2
  57. package/templates/skills/efcore/steps/db/step-status.md +14 -0
  58. package/templates/skills/efcore/steps/migration/step-01-check.md +31 -5
  59. package/templates/skills/efcore/steps/migration/step-02-create.md +20 -4
  60. package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +60 -0
  61. package/templates/skills/efcore/steps/shared/step-00-init.md +47 -8
  62. package/templates/skills/efcore/steps/squash/step-03-create.md +27 -5
  63. package/templates/skills/gitflow/SKILL.md +91 -29
  64. package/templates/skills/gitflow/_shared.md +144 -2
  65. package/templates/skills/gitflow/phases/status.md +11 -1
  66. package/templates/skills/gitflow/steps/step-commit.md +1 -1
  67. package/templates/skills/gitflow/steps/step-init.md +202 -39
  68. package/templates/skills/gitflow/templates/config.json +10 -1
  69. package/templates/skills/ralph-loop/steps/step-03-commit.md +2 -2
  70. package/templates/skills/validate-feature/SKILL.md +83 -0
  71. package/templates/skills/validate-feature/steps/step-01-compile.md +38 -0
  72. package/templates/skills/validate-feature/steps/step-02-unit-tests.md +45 -0
  73. package/templates/skills/validate-feature/steps/step-03-integration-tests.md +53 -0
  74. package/templates/skills/validate-feature/steps/step-04-api-smoke.md +157 -0
@@ -12,7 +12,7 @@
12
12
  <header class="global-header">
13
13
  <div class="logo">SS</div>
14
14
  <span class="site-title">SmartStack CLI</span>
15
- <span class="version-badge">v5.0.0</span>
15
+ <span class="version-badge">v6.0.0</span>
16
16
  <div class="header-divider"></div>
17
17
  <span class="page-title">Business Analyse</span>
18
18
  <nav class="breadcrumb">
@@ -24,7 +24,7 @@
24
24
  <span data-lang="fr">Workflows</span>
25
25
  <span data-lang="en">Workflows</span>
26
26
  <span class="breadcrumb-separator">&#8250;</span>
27
- <span class="breadcrumb-current">Business Analyse v5.0</span>
27
+ <span class="breadcrumb-current">Business Analyse v6.0</span>
28
28
  </nav>
29
29
  <!-- Language Select -->
30
30
  <select class="lang-select" id="lang-select" onchange="setLanguage(this.value); localStorage.setItem('doc-language', this.value);">
@@ -99,8 +99,8 @@
99
99
  </a>
100
100
  <a href="#quick-start" class="sidebar-toc-link">Quick Start</a>
101
101
  <a href="#use-cases" class="sidebar-toc-link">
102
- <span data-lang="fr">4 Cas d'usage</span>
103
- <span data-lang="en">4 Use Cases</span>
102
+ <span data-lang="fr">5 Cas d'usage</span>
103
+ <span data-lang="en">5 Use Cases</span>
104
104
  </a>
105
105
  <a href="#flags" class="sidebar-toc-link">
106
106
  <span data-lang="fr">Flags &amp; Modes</span>
@@ -169,14 +169,14 @@
169
169
  <section id="introduction">
170
170
  <h2>Introduction</h2>
171
171
  <p data-lang="fr">
172
- Le skill <strong>Business Analyse v5.0</strong> est un workflow en <strong>6 etapes</strong> qui transforme un besoin utilisateur en specification fonctionnelle complete avec support iteratif multi-module. Chaque application est composee de modules interdependants, analyzes et specifies dans un ordre logique.
172
+ Le skill <strong>Business Analyse v6.0</strong> est un workflow en <strong>7 etapes</strong> qui transforme un besoin utilisateur en specification fonctionnelle complete avec support iteratif multi-module. La v6.0 ajoute un document HTML interactif pour la revue client et un pipeline d'extraction (<code>-x</code>) pour re-importer les modifications.
173
173
  </p>
174
174
  <p data-lang="en">
175
- The <strong>Business Analyse v5.0</strong> skill is a <strong>6-step</strong> workflow that transforms a user need into a complete functional specification with iterative multi-module support. Each application consists of interdependent modules, analyzed and specified in logical order.
175
+ The <strong>Business Analyse v6.0</strong> skill is a <strong>7-step</strong> workflow that transforms a user need into a complete functional specification with iterative multi-module support. v6.0 adds an interactive HTML document for client review and an extraction pipeline (<code>-x</code>) to re-import modifications.
176
176
  </p>
177
177
 
178
- <h4 data-lang="fr">6 Etapes du workflow</h4>
179
- <h4 data-lang="en">6 Workflow Steps</h4>
178
+ <h4 data-lang="fr">7 Etapes du workflow</h4>
179
+ <h4 data-lang="en">7 Workflow Steps</h4>
180
180
  <ol class="steps-list">
181
181
  <li>
182
182
  <strong>Init</strong> - Detecte le mode (application vs module), cree feature.json initial
@@ -194,7 +194,10 @@
194
194
  <strong>Consolidation</strong> - Validation cross-module, coherence des permissions et entites partagees
195
195
  </li>
196
196
  <li>
197
- <strong>Handoff</strong> - Mapping des fichiers par module, extraction programmatique prd.json via <code>ss derive-prd</code>
197
+ <strong>Handoff</strong> - Mapping des fichiers par module, extraction programmatique prd.json via <code>ss derive-prd</code>, deploiement HTML interactif
198
+ </li>
199
+ <li>
200
+ <strong>Extract</strong> - Import depuis l'export JSON du HTML interactif (<code>-x</code>), mapping vers feature.json
198
201
  </li>
199
202
  </ol>
200
203
 
@@ -267,10 +270,10 @@ Exemple:
267
270
  </h2>
268
271
 
269
272
  <p data-lang="fr">
270
- La v5.0 utilise une hierarchie 5 niveaux pour naviguer les applications multi-modules. Deux fichiers JSON (master application + per-module) garantissent la tracabilite et la coherence cross-module.
273
+ La v6.0 utilise une hierarchie 5 niveaux pour naviguer les applications multi-modules. Deux fichiers JSON (master application + per-module) garantissent la tracabilite et la coherence cross-module.
271
274
  </p>
272
275
  <p data-lang="en">
273
- v5.0 uses a 5-level hierarchy to navigate multi-module applications. Two JSON files (master application + per-module) ensure traceability and cross-module coherence.
276
+ v6.0 uses a 5-level hierarchy to navigate multi-module applications. Two JSON files (master application + per-module) ensure traceability and cross-module coherence.
274
277
  </p>
275
278
 
276
279
  <h4 data-lang="fr">Structure de repertoires</h4>
@@ -411,7 +414,10 @@ Exemple:
411
414
  /business-analyse -r FEAT-001 "Add return management module"
412
415
 
413
416
  # Micro-feature (analyse minimale)
414
- /business-analyse -m Add a status field to orders</code></pre>
417
+ /business-analyse -m Add a status field to orders
418
+
419
+ # Extract depuis HTML interactif
420
+ /business-analyse -x ./docs/business/MyApp/ba-export.json</code></pre>
415
421
  </div>
416
422
  </div>
417
423
  </div>
@@ -422,8 +428,8 @@ Exemple:
422
428
  <!-- ============================================ -->
423
429
  <section id="use-cases">
424
430
  <h2>
425
- <span data-lang="fr">4 Cas d'usage</span>
426
- <span data-lang="en">4 Use Cases</span>
431
+ <span data-lang="fr">5 Cas d'usage</span>
432
+ <span data-lang="en">5 Use Cases</span>
427
433
  </h2>
428
434
 
429
435
  <div class="table-container">
@@ -470,6 +476,12 @@ Exemple:
470
476
  <td><span data-lang="fr">module simple</span><span data-lang="en">simple module</span></td>
471
477
  <td>00 (micro) → 01 (lite) → 02 (skip) → 03 (minimal) → 04 (auto) → 05</td>
472
478
  </tr>
479
+ <tr>
480
+ <td><strong>Extract</strong></td>
481
+ <td><code>-x</code></td>
482
+ <td><span data-lang="fr">import HTML interactif</span><span data-lang="en">interactive HTML import</span></td>
483
+ <td>00 → 06 (extract) → <span data-lang="fr">choix</span><span data-lang="en">choice</span> (01 | 05 | EXIT)</td>
484
+ </tr>
473
485
  </tbody>
474
486
  </table>
475
487
  </div>
@@ -521,6 +533,14 @@ Exemple:
521
533
  </td>
522
534
  <td>false</td>
523
535
  </tr>
536
+ <tr>
537
+ <td><code>-x, --extract</code></td>
538
+ <td>
539
+ <span data-lang="fr">Importer depuis l'export JSON du HTML interactif</span>
540
+ <span data-lang="en">Import from interactive HTML JSON export</span>
541
+ </td>
542
+ <td>false</td>
543
+ </tr>
524
544
  <tr>
525
545
  <td><code>--economy-mode</code></td>
526
546
  <td>
@@ -546,13 +566,13 @@ Exemple:
546
566
  <!-- WORKFLOW (6 STEPS) -->
547
567
  <!-- ============================================ -->
548
568
  <section id="workflow">
549
- <h2>Workflow (6 Etapes)</h2>
569
+ <h2>Workflow (7 Etapes)</h2>
550
570
 
551
571
  <p data-lang="fr">
552
- Le workflow v5.0 combine decouverte, decomposition, specification iterative et consolidation cross-module. Chaque etape enrichit progressivement le feature.json.
572
+ Le workflow v6.0 combine decouverte, decomposition, specification iterative et consolidation cross-module. Chaque etape enrichit progressivement le feature.json.
553
573
  </p>
554
574
  <p data-lang="en">
555
- The v5.0 workflow combines discovery, decomposition, iterative specification and cross-module consolidation. Each step progressively enriches the feature.json.
575
+ The v6.0 workflow combines discovery, decomposition, iterative specification and cross-module consolidation. Each step progressively enriches the feature.json.
556
576
  </p>
557
577
  </section>
558
578
 
@@ -849,6 +869,16 @@ Exemple:
849
869
  }</code></pre>
850
870
  </div>
851
871
 
872
+ <h4 data-lang="fr">Document HTML interactif</h4>
873
+ <h4 data-lang="en">Interactive HTML Document</h4>
874
+
875
+ <p data-lang="fr">
876
+ A l'etape de handoff, un document HTML interactif (<code>ba-interactive.html</code>) est deploye dans le repertoire du projet. Ce document permet au client de consulter, modifier et enrichir l'analyse metier directement dans son navigateur, sans serveur. Les modifications peuvent etre re-importees via <code>/business-analyse -x &lt;json-path&gt;</code>.
877
+ </p>
878
+ <p data-lang="en">
879
+ 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>.
880
+ </p>
881
+
852
882
  <h4 data-lang="fr">Verification post-handoff</h4>
853
883
  <h4 data-lang="en">Post-Handoff Verification</h4>
854
884
 
@@ -861,9 +891,42 @@ Exemple:
861
891
  <li data-lang="en">Extract prd.json via <code>ss derive-prd</code></li>
862
892
  <li data-lang="fr">Generer progress.txt tracker</li>
863
893
  <li data-lang="en">Generate progress.txt tracker</li>
894
+ <li data-lang="fr">Deployer ba-interactive.html avec placeholders remplaces</li>
895
+ <li data-lang="en">Deploy ba-interactive.html with placeholders replaced</li>
864
896
  </ul>
865
897
  </section>
866
898
 
899
+ <!-- ============================================ -->
900
+ <!-- STEP 06 - EXTRACT -->
901
+ <!-- ============================================ -->
902
+ <section id="step-06">
903
+ <h3>06. Extract</h3>
904
+
905
+ <p data-lang="fr">
906
+ Importe les donnees depuis l'export JSON du document HTML interactif (<code>ba-interactive.html</code>) et les transforme en feature.json. Cette etape est declenchee par le flag <code>-x</code>.
907
+ </p>
908
+ <p data-lang="en">
909
+ Imports data from the interactive HTML document's JSON export (<code>ba-interactive.html</code>) and transforms it into feature.json. This step is triggered by the <code>-x</code> flag.
910
+ </p>
911
+
912
+ <h4 data-lang="fr">Principe</h4>
913
+ <h4 data-lang="en">Principle</h4>
914
+
915
+ <ul>
916
+ <li data-lang="fr">Zero perte d'information : chaque champ du JSON exporte est mappe vers feature.json</li>
917
+ <li data-lang="en">Zero information loss: every field from the exported JSON is mapped to feature.json</li>
918
+ <li data-lang="fr">Mapping deterministe : cadrage, modules, specifications, consolidation</li>
919
+ <li data-lang="en">Deterministic mapping: cadrage, modules, specifications, consolidation</li>
920
+ <li data-lang="fr">Post-extraction : choix entre enrichir (step-01), handoff (step-05), ou terminer</li>
921
+ <li data-lang="en">Post-extraction: choice between enrichment (step-01), handoff (step-05), or terminate</li>
922
+ </ul>
923
+
924
+ <div class="code-block">
925
+ <button class="copy-btn">Copy</button>
926
+ <pre><code>/business-analyse -x ./docs/business/MyApp/ba-export.json</code></pre>
927
+ </div>
928
+ </section>
929
+
867
930
  <!-- ============================================ -->
868
931
  <!-- SCHEMAS -->
869
932
  <!-- ============================================ -->
@@ -1065,6 +1128,7 @@ Module: "Checkout"
1065
1128
  <pre><code>docs/business/{app}/business-analyse/
1066
1129
  ├── v1.0/
1067
1130
  │ ├── feature.json ← Master application spec
1131
+ │ ├── ba-interactive.html ← Interactive client review document
1068
1132
  │ └── README.md ← Overview
1069
1133
  ├── checkout/v1.0/
1070
1134
  │ ├── feature.json ← Module spec
package/dist/index.js CHANGED
@@ -116538,6 +116538,30 @@ EndGlobal
116538
116538
  if (!dryRun) {
116539
116539
  await import_fs_extra5.default.ensureDir((0, import_path6.join)(apiDir, "wwwroot"));
116540
116540
  }
116541
+ if (!dryRun) {
116542
+ for (const { proj, type } of projects) {
116543
+ if (type === "classlib") {
116544
+ const class1Path = (0, import_path6.join)(srcDir, proj, "Class1.cs");
116545
+ if (await import_fs_extra5.default.pathExists(class1Path)) {
116546
+ await import_fs_extra5.default.remove(class1Path);
116547
+ logger.info(`Removed placeholder: ${proj}/Class1.cs`);
116548
+ }
116549
+ }
116550
+ }
116551
+ const apiPlaceholders = [
116552
+ "Program.cs",
116553
+ "appsettings.json",
116554
+ "appsettings.Development.json",
116555
+ (0, import_path6.join)("Properties", "launchSettings.json")
116556
+ ];
116557
+ for (const placeholder of apiPlaceholders) {
116558
+ const placeholderPath = (0, import_path6.join)(apiDir, placeholder);
116559
+ if (await import_fs_extra5.default.pathExists(placeholderPath)) {
116560
+ await import_fs_extra5.default.remove(placeholderPath);
116561
+ logger.info(`Removed placeholder: ${projectName}.Api/${placeholder}`);
116562
+ }
116563
+ }
116564
+ }
116541
116565
  const launchSettings = {
116542
116566
  $schema: "https://json.schemastore.org/launchsettings.json",
116543
116567
  profiles: {
@@ -116558,6 +116582,15 @@ EndGlobal
116558
116582
  environmentVariables: {
116559
116583
  ASPNETCORE_ENVIRONMENT: "Development"
116560
116584
  }
116585
+ },
116586
+ Local: {
116587
+ commandName: "Project",
116588
+ dotnetRunMessages: true,
116589
+ launchBrowser: false,
116590
+ applicationUrl: "https://localhost:7142;http://localhost:5142",
116591
+ environmentVariables: {
116592
+ ASPNETCORE_ENVIRONMENT: "Development"
116593
+ }
116561
116594
  }
116562
116595
  }
116563
116596
  };
@@ -116572,24 +116605,6 @@ EndGlobal
116572
116605
  logSafeWriteResult(launchRelPath, launchResult);
116573
116606
  recordFile(state, "backend", launchRelPath, launchResult.hash);
116574
116607
  }
116575
- if (!dryRun) {
116576
- for (const { proj, type } of projects) {
116577
- if (type === "classlib") {
116578
- const class1Path = (0, import_path6.join)(srcDir, proj, "Class1.cs");
116579
- if (await import_fs_extra5.default.pathExists(class1Path)) {
116580
- await import_fs_extra5.default.remove(class1Path);
116581
- logger.info(`Removed placeholder: ${proj}/Class1.cs`);
116582
- }
116583
- }
116584
- }
116585
- for (const placeholder of ["appsettings.json", "appsettings.Development.json"]) {
116586
- const placeholderPath = (0, import_path6.join)(apiDir, placeholder);
116587
- if (await import_fs_extra5.default.pathExists(placeholderPath)) {
116588
- await import_fs_extra5.default.remove(placeholderPath);
116589
- logger.info(`Removed placeholder: ${projectName}.Api/${placeholder}`);
116590
- }
116591
- }
116592
- }
116593
116608
  if (!dryRun) {
116594
116609
  for (const { proj } of projects) {
116595
116610
  const csprojPath = (0, import_path6.join)(srcDir, proj, `${proj}.csproj`);
@@ -124821,6 +124836,26 @@ async function executeMigrations(projectDir, fromVersion, toVersion, dryRun) {
124821
124836
  hasErrors
124822
124837
  };
124823
124838
  }
124839
+ async function validateProgramCs(projectDir, baseNamespace) {
124840
+ const programPath = (0, import_path7.join)(projectDir, "src", `${baseNamespace}.Api`, "Program.cs");
124841
+ if (!await import_fs_extra6.default.pathExists(programPath)) {
124842
+ return ["Program.cs not found"];
124843
+ }
124844
+ const content = await import_fs_extra6.default.readFile(programPath, "utf-8");
124845
+ const requiredCalls = [
124846
+ { pattern: /\.AddSmartStack\s*\(/, label: "AddSmartStack()" },
124847
+ { pattern: /\.InitializeSmartStackAsync\s*\(/, label: "InitializeSmartStackAsync()" },
124848
+ { pattern: /\.UseSmartStack\s*\(/, label: "UseSmartStack()" },
124849
+ { pattern: /\.MapSmartStack\s*\(/, label: "MapSmartStack()" }
124850
+ ];
124851
+ const missing = [];
124852
+ for (const { pattern, label } of requiredCalls) {
124853
+ if (!pattern.test(content)) {
124854
+ missing.push(label);
124855
+ }
124856
+ }
124857
+ return missing;
124858
+ }
124824
124859
  async function syncAppSettings(projectDir, baseNamespace, dryRun) {
124825
124860
  const appSettingsPath = (0, import_path7.join)(projectDir, "src", `${baseNamespace}.Api`, "appsettings.json");
124826
124861
  if (!await import_fs_extra6.default.pathExists(appSettingsPath)) {
@@ -124858,7 +124893,8 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
124858
124893
  otherPkgFailed: 0,
124859
124894
  npmUpgraded: false,
124860
124895
  npmSkipped: false,
124861
- configSynced: 0
124896
+ configSynced: 0,
124897
+ programCsIssues: []
124862
124898
  };
124863
124899
  if (dryRun) {
124864
124900
  logger.warning("DRY RUN MODE - No packages will be upgraded");
@@ -125049,6 +125085,26 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
125049
125085
  logger.info(`appsettings.json ${source_default.green("\u2713")} up to date`);
125050
125086
  console.log();
125051
125087
  }
125088
+ logger.info("Validating Program.cs...");
125089
+ result.programCsIssues = await validateProgramCs(projectDir, config.baseNamespace);
125090
+ if (result.programCsIssues.length > 0) {
125091
+ logger.error("Program.cs is missing required SmartStack calls:");
125092
+ for (const issue of result.programCsIssues) {
125093
+ logger.warning(` ${source_default.red("\u2717")} ${issue}`);
125094
+ }
125095
+ console.log();
125096
+ logger.warning("Your Program.cs must contain these 4 calls in order:");
125097
+ logger.info(` 1. builder.Services.${source_default.cyan("AddSmartStack")}(builder.Configuration);`);
125098
+ logger.info(` 2. await app.${source_default.cyan("InitializeSmartStackAsync")}();`);
125099
+ logger.info(` 3. app.${source_default.cyan("UseSmartStack")}();`);
125100
+ logger.info(` 4. app.${source_default.cyan("MapSmartStack")}();`);
125101
+ console.log();
125102
+ logger.info(`Reference template: ${source_default.cyan("ss init --dry-run")} or check SmartStack docs`);
125103
+ console.log();
125104
+ } else {
125105
+ logger.info(`Program.cs ${source_default.green("\u2713")} all SmartStack calls present`);
125106
+ console.log();
125107
+ }
125052
125108
  if (!dryRun && nugetVersion) {
125053
125109
  config.smartStackVersion = nugetVersion;
125054
125110
  const configPath = (0, import_path7.join)(projectDir, ".smartstack", "config.json");
@@ -125058,7 +125114,8 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
125058
125114
  }
125059
125115
  const totalChanged = result.nugetUpgraded + result.otherPkgUpdated + (result.npmUpgraded ? 1 : 0) + migrationSummary.totalApplied + result.configSynced;
125060
125116
  const allUpToDate = totalChanged === 0 && result.nugetFailed === 0 && result.otherPkgFailed === 0;
125061
- if (allUpToDate) {
125117
+ const hasProgramIssues = result.programCsIssues.length > 0;
125118
+ if (allUpToDate && !hasProgramIssues) {
125062
125119
  const summary = [
125063
125120
  source_default.green.bold("Already up to date!"),
125064
125121
  "",
@@ -125068,6 +125125,16 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
125068
125125
  "All packages at latest versions."
125069
125126
  ].filter(Boolean);
125070
125127
  logger.box(summary, "success");
125128
+ } else if (allUpToDate && hasProgramIssues) {
125129
+ const summary = [
125130
+ source_default.yellow.bold("Packages up to date, but Program.cs needs attention!"),
125131
+ "",
125132
+ ` ${source_default.red("\u26A0")} Missing: ${result.programCsIssues.join(", ")}`,
125133
+ "",
125134
+ ` Fix: Ensure Program.cs contains all 4 SmartStack bootstrap calls`,
125135
+ ` Ref: ${source_default.cyan("ss init --dry-run")} to see the correct template`
125136
+ ];
125137
+ logger.box(summary, "warning");
125071
125138
  } else {
125072
125139
  const lines = [
125073
125140
  source_default.green.bold("Upgrade completed!"),
@@ -125100,12 +125167,18 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
125100
125167
  if (result.configSynced > 0) {
125101
125168
  lines.push(` ${source_default.green("\u2713")} Config: ${result.configSynced} new setting(s) added`);
125102
125169
  }
125170
+ if (result.programCsIssues.length > 0) {
125171
+ lines.push(` ${source_default.red("\u26A0")} Program.cs: ${result.programCsIssues.length} missing call(s) - manual fix required`);
125172
+ }
125103
125173
  lines.push("");
125104
125174
  lines.push(source_default.yellow("Next steps:"));
125175
+ if (result.programCsIssues.length > 0) {
125176
+ lines.push(` ${source_default.red("!")} Fix Program.cs first (see warnings above)`);
125177
+ }
125105
125178
  lines.push(` 1. Review changes: ${source_default.cyan("git diff")}`);
125106
125179
  lines.push(` 2. Test your application`);
125107
125180
  lines.push(` 3. Commit changes: ${source_default.cyan('git add . && git commit -m "chore: upgrade SmartStack to ' + nugetVersion + '"')}`);
125108
- logger.box(lines, "success");
125181
+ logger.box(lines, result.programCsIssues.length > 0 ? "warning" : "success");
125109
125182
  }
125110
125183
  });
125111
125184