@atlashub/smartstack-cli 2.1.0 → 2.2.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 (35) hide show
  1. package/dist/index.js +18 -10
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/templates/agents/ba-reader.md +250 -0
  5. package/templates/agents/ba-writer.md +210 -0
  6. package/templates/agents/docs-context-reader.md +51 -33
  7. package/templates/skills/_shared.md +2 -0
  8. package/templates/skills/business-analyse/SKILL.md +120 -108
  9. package/templates/skills/business-analyse/_shared.md +136 -146
  10. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +478 -0
  11. package/templates/skills/business-analyse/questionnaire/01-context.md +3 -15
  12. package/templates/skills/business-analyse/questionnaire/08-performance.md +7 -21
  13. package/templates/skills/business-analyse/questionnaire/09-constraints.md +0 -13
  14. package/templates/skills/business-analyse/questionnaire/10-documentation.md +0 -13
  15. package/templates/skills/business-analyse/questionnaire.md +72 -76
  16. package/templates/skills/business-analyse/react/components.md +317 -154
  17. package/templates/skills/business-analyse/react/i18n-template.md +167 -106
  18. package/templates/skills/business-analyse/react/schema.md +325 -106
  19. package/templates/skills/business-analyse/schemas/feature-schema.json +690 -0
  20. package/templates/skills/business-analyse/steps/step-00-init.md +395 -285
  21. package/templates/skills/business-analyse/steps/step-01-analyse.md +505 -0
  22. package/templates/skills/business-analyse/steps/step-02-specify.md +833 -0
  23. package/templates/skills/business-analyse/steps/step-03-validate.md +862 -0
  24. package/templates/skills/business-analyse/steps/step-04-handoff.md +1593 -0
  25. package/templates/skills/business-analyse/templates/tpl-handoff.md +39 -63
  26. package/templates/skills/business-analyse/steps/step-01-discover.md +0 -737
  27. package/templates/skills/business-analyse/steps/step-02-analyse.md +0 -299
  28. package/templates/skills/business-analyse/steps/step-03-specify.md +0 -472
  29. package/templates/skills/business-analyse/steps/step-04-validate.md +0 -335
  30. package/templates/skills/business-analyse/steps/step-05-handoff.md +0 -741
  31. package/templates/skills/business-analyse/steps/step-06-doc-html.md +0 -320
  32. package/templates/skills/business-analyse/templates/00-context.md +0 -105
  33. package/templates/skills/business-analyse/templates/tpl-brd.md +0 -97
  34. package/templates/skills/business-analyse/templates/tpl-discovery.md +0 -78
  35. package/templates/skills/business-analyse/tracking/change-template.md +0 -30
package/dist/index.js CHANGED
@@ -112215,6 +112215,10 @@ function getPackageVersion() {
112215
112215
  return "0.0.0";
112216
112216
  }
112217
112217
  }
112218
+ function processTemplateVariables(content, version2) {
112219
+ const sanitized = version2.replace(/[^0-9a-zA-Z.\-+]/g, "");
112220
+ return content.replace(/\{\{SMARTSTACK_VERSION\}\}/g, sanitized);
112221
+ }
112218
112222
  var DEFAULT_PLUGINS = [];
112219
112223
  function getClaudeDir(global3) {
112220
112224
  if (global3) {
@@ -112250,6 +112254,7 @@ async function installCommands(options = {}) {
112250
112254
  };
112251
112255
  logger.info(`Installing to: ${claudeDir}`);
112252
112256
  const dirsToInstall = installAll ? INSTALL_DIRS : INSTALL_DIRS.filter((d) => components.includes(d));
112257
+ const version2 = getPackageVersion();
112253
112258
  for (const dir of dirsToInstall) {
112254
112259
  const sourceDir = (0, import_path.join)(TEMPLATES_DIR, dir);
112255
112260
  const targetDir = (0, import_path.join)(claudeDir, dir);
@@ -112270,7 +112275,13 @@ async function installCommands(options = {}) {
112270
112275
  continue;
112271
112276
  }
112272
112277
  await import_fs_extra.default.ensureDir((0, import_path.dirname)(dest));
112273
- await import_fs_extra.default.copy(src, dest, { overwrite: options.force });
112278
+ if (file.endsWith(".md")) {
112279
+ const content = await import_fs_extra.default.readFile(src, "utf-8");
112280
+ const processed = processTemplateVariables(content, version2);
112281
+ await import_fs_extra.default.writeFile(dest, processed, "utf-8");
112282
+ } else {
112283
+ await import_fs_extra.default.copy(src, dest, { overwrite: options.force });
112284
+ }
112274
112285
  result.installed++;
112275
112286
  result.installedFiles.push(relativePath);
112276
112287
  if (file.endsWith(".md") && !file.includes("/")) {
@@ -125428,15 +125439,12 @@ async function promptSqlCredentials() {
125428
125439
  }
125429
125440
  function detectSmartStackApp() {
125430
125441
  const cwd = process.cwd();
125431
- const configPath = (0, import_path9.join)(cwd, ".smartstack", "config.json");
125432
- if ((0, import_fs4.existsSync)(configPath)) {
125433
- const srcDir = (0, import_path9.join)(cwd, "src");
125434
- if ((0, import_fs4.existsSync)(srcDir)) {
125435
- const folders = (0, import_fs4.readdirSync)(srcDir);
125436
- const apiFolder = folders.find((f) => f.endsWith(".Api"));
125437
- if (apiFolder) {
125438
- return (0, import_path9.join)(srcDir, apiFolder);
125439
- }
125442
+ const srcDir = (0, import_path9.join)(cwd, "src");
125443
+ if ((0, import_fs4.existsSync)(srcDir)) {
125444
+ const folders = (0, import_fs4.readdirSync)(srcDir);
125445
+ const apiFolder = folders.find((f) => f.endsWith(".Api"));
125446
+ if (apiFolder) {
125447
+ return (0, import_path9.join)(srcDir, apiFolder);
125440
125448
  }
125441
125449
  }
125442
125450
  const possiblePaths = [