@atlashub/smartstack-cli 3.20.0 → 3.22.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 (41) hide show
  1. package/dist/index.js +70 -6
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +69 -3
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/project/api.ts.template +8 -29
  7. package/templates/project/appsettings.json.template +1 -0
  8. package/templates/skills/application/references/application-roles-template.md +2 -2
  9. package/templates/skills/application/steps/step-05-frontend.md +40 -35
  10. package/templates/skills/application/templates-frontend.md +64 -36
  11. package/templates/skills/business-analyse/html/ba-interactive.html +642 -156
  12. package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +11 -6
  13. package/templates/skills/business-analyse/html/src/scripts/02-navigation.js +209 -4
  14. package/templates/skills/business-analyse/html/src/scripts/04-render-modules.js +2 -8
  15. package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +95 -8
  16. package/templates/skills/business-analyse/html/src/scripts/07-render-handoff.js +3 -1
  17. package/templates/skills/business-analyse/html/src/scripts/08-editing.js +112 -22
  18. package/templates/skills/business-analyse/html/src/scripts/11-review-panel.js +7 -0
  19. package/templates/skills/business-analyse/html/src/styles/02-layout.css +1 -1
  20. package/templates/skills/business-analyse/html/src/styles/03-navigation.css +89 -31
  21. package/templates/skills/business-analyse/html/src/styles/05-modules.css +64 -0
  22. package/templates/skills/business-analyse/html/src/styles/06-wireframes.css +42 -0
  23. package/templates/skills/business-analyse/html/src/template.html +8 -76
  24. package/templates/skills/business-analyse/references/acceptance-criteria.md +169 -0
  25. package/templates/skills/business-analyse/references/deploy-data-build.md +13 -9
  26. package/templates/skills/business-analyse/references/handoff-file-templates.md +2 -1
  27. package/templates/skills/business-analyse/references/html-data-mapping.md +20 -28
  28. package/templates/skills/business-analyse/references/naming-conventions.md +245 -0
  29. package/templates/skills/business-analyse/references/validate-incremental-html.md +28 -5
  30. package/templates/skills/business-analyse/references/validation-checklist.md +31 -11
  31. package/templates/skills/business-analyse/references/wireframe-svg-style-guide.md +335 -0
  32. package/templates/skills/business-analyse/steps/step-03b-ui.md +59 -0
  33. package/templates/skills/business-analyse/steps/step-03c-compile.md +169 -2
  34. package/templates/skills/business-analyse/steps/step-03d-validate.md +217 -28
  35. package/templates/skills/business-analyse/steps/step-05a-handoff.md +189 -3
  36. package/templates/skills/business-analyse/steps/step-05b-deploy.md +55 -0
  37. package/templates/skills/ralph-loop/references/category-rules.md +5 -2
  38. package/templates/skills/ralph-loop/references/compact-loop.md +52 -1
  39. package/templates/skills/ralph-loop/references/core-seed-data.md +232 -21
  40. package/templates/skills/ralph-loop/steps/step-01-task.md +36 -4
  41. package/templates/skills/ralph-loop/steps/step-02-execute.md +81 -0
package/dist/index.js CHANGED
@@ -112477,6 +112477,30 @@ async function unregisterMcpFromClaudeSettings(serverNames) {
112477
112477
  };
112478
112478
  }
112479
112479
  }
112480
+ async function configureClaudeEnvironment() {
112481
+ const settingsPath = getClaudeSettingsPath();
112482
+ try {
112483
+ const settings = await readClaudeSettings() || {};
112484
+ const env2 = settings["env"] || {};
112485
+ let changed = false;
112486
+ if (env2["CLAUDE_CODE_MAX_OUTPUT_TOKENS"] !== "64000") {
112487
+ env2["CLAUDE_CODE_MAX_OUTPUT_TOKENS"] = "64000";
112488
+ changed = true;
112489
+ }
112490
+ if (!changed) {
112491
+ return { success: true, path: settingsPath };
112492
+ }
112493
+ settings["env"] = env2;
112494
+ await writeClaudeSettings(settings);
112495
+ return { success: true, path: settingsPath };
112496
+ } catch (error) {
112497
+ return {
112498
+ success: false,
112499
+ path: settingsPath,
112500
+ error: error instanceof Error ? error.message : "Unknown error"
112501
+ };
112502
+ }
112503
+ }
112480
112504
  async function getClaudeMcpServers() {
112481
112505
  const settingsPath = getClaudeSettingsPath();
112482
112506
  const settings = await readClaudeSettings();
@@ -112748,6 +112772,16 @@ async function installCommands(options = {}) {
112748
112772
  }
112749
112773
  }
112750
112774
  await registerMcpServer();
112775
+ try {
112776
+ const envResult = await configureClaudeEnvironment();
112777
+ if (envResult.success) {
112778
+ logger.success("Configured Claude Code environment (MAX_OUTPUT_TOKENS=64000)");
112779
+ } else {
112780
+ logger.warning(`Failed to configure Claude environment: ${envResult.error}`);
112781
+ }
112782
+ } catch {
112783
+ logger.warning("Claude environment configuration skipped");
112784
+ }
112751
112785
  const now = (/* @__PURE__ */ new Date()).toISOString();
112752
112786
  const manifest = {
112753
112787
  version: getPackageVersion(),
@@ -116898,6 +116932,8 @@ appsettings.*.Local.json
116898
116932
  projectType: "client",
116899
116933
  dbContext: "extensions",
116900
116934
  baseNamespace: projectName,
116935
+ tablePrefix: "",
116936
+ // Set during /business-analyse cadrage (e.g., "rh_", "fi_", "crm_")
116901
116937
  smartStackVersion: config.smartStackVersion || "1.0.0",
116902
116938
  initialized: (/* @__PURE__ */ new Date()).toISOString()
116903
116939
  };
@@ -117138,7 +117174,7 @@ async function createFrontendStructure(config, state, dryRun) {
117138
117174
  preview: "vite preview"
117139
117175
  },
117140
117176
  dependencies: {
117141
- "@atlashub/smartstack": smartstackNpmTag,
117177
+ "@atlashub/smartstack": `^${config.smartStackVersion || "3.0.0"}`,
117142
117178
  "@microsoft/signalr": "^10.0.0",
117143
117179
  "@tailwindcss/vite": "^4.1.0",
117144
117180
  axios: "^1.13.0",
@@ -117261,6 +117297,12 @@ export default defineConfig(({ mode }) => {
117261
117297
  },
117262
117298
  },
117263
117299
  },
117300
+ // Path alias for @/ imports (matches tsconfig.json paths)
117301
+ resolve: {
117302
+ alias: {
117303
+ '@': '/src',
117304
+ },
117305
+ },
117264
117306
  // Make env variables available to the app
117265
117307
  define: {
117266
117308
  __APP_NAME__: JSON.stringify(env.VITE_APP_NAME || '${projectName}'),
@@ -117348,11 +117390,11 @@ createRoot(document.getElementById('root')!).render(
117348
117390
  logSafeWriteResult(main_relPath, main_result);
117349
117391
  recordFile(state, "frontend", main_relPath, main_result.hash);
117350
117392
  const appTsx = `import { useRoutes, Navigate } from 'react-router-dom';
117351
- import { smartstackRoutes, mergeRoutes } from '@atlashub/smartstack';
117352
- import type { RouteConfig } from '@atlashub/smartstack';
117393
+ import { mergeRoutes } from '@atlashub/smartstack';
117394
+ import type { RouteConfig, ContextRouteExtensions } from '@atlashub/smartstack';
117353
117395
 
117354
117396
  /**
117355
- * Client-specific routes
117397
+ * Client-specific routes (outside SmartStack locked contexts)
117356
117398
  * Add your custom routes here. Locked SmartStack paths cannot be overridden.
117357
117399
  */
117358
117400
  const clientRoutes: RouteConfig[] = [
@@ -117363,9 +117405,21 @@ const clientRoutes: RouteConfig[] = [
117363
117405
  ];
117364
117406
 
117365
117407
  /**
117366
- * Merged routes combining client and SmartStack routes
117408
+ * Context-scoped route extensions
117409
+ * Add your business/platform/personal routes here.
117410
+ * Paths are RELATIVE to the context root.
117411
+ * Example: 'rh/timemanagement/list' (NOT '/business/rh/timemanagement/list')
117412
+ */
117413
+ const contextRoutes: ContextRouteExtensions = {
117414
+ // business: [],
117415
+ // platform: [],
117416
+ // personal: [],
117417
+ };
117418
+
117419
+ /**
117420
+ * Merged routes combining client, context extensions, and SmartStack core routes
117367
117421
  */
117368
- const routes = mergeRoutes(clientRoutes, smartstackRoutes);
117422
+ const routes = mergeRoutes(clientRoutes, contextRoutes);
117369
117423
 
117370
117424
  /**
117371
117425
  * App - Main application component
@@ -125321,6 +125375,16 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
125321
125375
  logger.info(`.claude/settings.json ${source_default.green("\u2713")} up to date`);
125322
125376
  console.log();
125323
125377
  }
125378
+ try {
125379
+ const envResult = await configureClaudeEnvironment();
125380
+ if (envResult.success) {
125381
+ logger.info(`Claude Code environment ${source_default.green("\u2713")} MAX_OUTPUT_TOKENS=64000`);
125382
+ } else {
125383
+ logger.warning(`Failed to configure Claude environment: ${envResult.error}`);
125384
+ }
125385
+ } catch {
125386
+ }
125387
+ console.log();
125324
125388
  logger.info("Checking Ralph configuration...");
125325
125389
  const ralphStatus = await checkRalphInstallation(projectDir);
125326
125390
  if (ralphStatus.configExists) {