@atlashub/smartstack-cli 4.25.0 → 4.27.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 (30) hide show
  1. package/dist/index.js +765 -517
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +33 -11
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/agents/ba-writer.md +46 -42
  7. package/templates/project/appsettings.json.template +4 -6
  8. package/templates/skills/apex/SKILL.md +1 -0
  9. package/templates/skills/apex/references/challenge-questions.md +17 -0
  10. package/templates/skills/apex/references/post-checks.md +48 -0
  11. package/templates/skills/apex/steps/step-03-execute.md +63 -2
  12. package/templates/skills/ba-generate-html/references/data-build.md +22 -13
  13. package/templates/skills/ba-generate-html/references/data-mapping.md +33 -24
  14. package/templates/skills/ba-generate-html/steps/step-01-collect.md +15 -6
  15. package/templates/skills/ba-generate-html/steps/step-02-build-data.md +37 -22
  16. package/templates/skills/business-analyse/steps/step-00-init.md +22 -14
  17. package/templates/skills/business-analyse/steps/step-04-consolidate.md +3 -0
  18. package/templates/skills/derive-prd/steps/step-01-transform.md +6 -2
  19. package/templates/skills/derive-prd/steps/step-02-export.md +12 -0
  20. package/templates/skills/ralph-loop/references/category-completeness.md +3 -3
  21. package/templates/skills/ralph-loop/references/compact-loop.md +81 -14
  22. package/templates/skills/ralph-loop/references/init-resume-recovery.md +1 -1
  23. package/templates/skills/ralph-loop/references/module-transition.md +30 -5
  24. package/templates/skills/ralph-loop/references/multi-module-queue.md +4 -4
  25. package/templates/skills/ralph-loop/references/section-splitting.md +6 -6
  26. package/templates/skills/ralph-loop/steps/step-01-task.md +14 -4
  27. package/templates/skills/ralph-loop/steps/step-02-execute.md +14 -6
  28. package/templates/skills/ralph-loop/steps/step-03-commit.md +15 -4
  29. package/templates/skills/ralph-loop/steps/step-04-check.md +19 -5
  30. package/templates/skills/ralph-loop/steps/step-05-report.md +35 -3
@@ -25962,6 +25962,7 @@ var init_types3 = __esm({
25962
25962
  ScaffoldExtensionInputSchema = external_exports.object({
25963
25963
  type: external_exports.enum(["feature", "service", "entity", "controller", "component", "test", "dto", "validator", "repository"]).describe('Type of extension to scaffold. Use "feature" for full-stack generation.'),
25964
25964
  name: external_exports.string().describe('Name of the extension (e.g., "UserProfile", "Order")'),
25965
+ path: external_exports.string().optional().describe("Path to SmartStack project root (defaults to configured project path)"),
25965
25966
  options: external_exports.object({
25966
25967
  namespace: external_exports.string().optional().describe("Custom namespace"),
25967
25968
  baseEntity: external_exports.string().optional().describe("Base entity to extend (for entity type)"),
@@ -26789,6 +26790,15 @@ function extractNavRoutes(content) {
26789
26790
  const fullNavRoute = suffix ? `${navRoute}.${suffix}` : navRoute;
26790
26791
  results.push({ navRoute, suffix, fullNavRoute });
26791
26792
  }
26793
+ if (results.length === 0) {
26794
+ const routeRegex = /\[Route\s*\(\s*"api\/([^"]+)"\s*\)\]/g;
26795
+ for (const match2 of content.matchAll(routeRegex)) {
26796
+ const routePath = match2[1];
26797
+ if (routePath.includes("[")) continue;
26798
+ const navRoute = routePath.replace(/\//g, ".");
26799
+ results.push({ navRoute, fullNavRoute: navRoute, inferred: true });
26800
+ }
26801
+ }
26792
26802
  return results;
26793
26803
  }
26794
26804
  var init_navroute_parser = __esm({
@@ -34701,8 +34711,10 @@ function resolveHierarchy(navRoute) {
34701
34711
  async function handleScaffoldExtension(args, config2) {
34702
34712
  const input = ScaffoldExtensionInputSchema.parse(args);
34703
34713
  const dryRun = input.options?.dryRun || false;
34704
- logger.info("Scaffolding extension", { type: input.type, name: input.name, dryRun });
34705
- const structure = await findSmartStackStructure(config2.smartstack.projectPath);
34714
+ const projectRoot = input.path || config2.smartstack.projectPath;
34715
+ logger.info("Scaffolding extension", { type: input.type, name: input.name, dryRun, projectRoot });
34716
+ const structure = await findSmartStackStructure(projectRoot);
34717
+ const resolvedConfig = input.path ? { ...config2, smartstack: { ...config2.smartstack, projectPath: projectRoot } } : config2;
34706
34718
  const result = {
34707
34719
  success: true,
34708
34720
  files: [],
@@ -34714,31 +34726,31 @@ async function handleScaffoldExtension(args, config2) {
34714
34726
  try {
34715
34727
  switch (input.type) {
34716
34728
  case "feature":
34717
- await scaffoldFeature(input.name, input.options, structure, config2, result, dryRun);
34729
+ await scaffoldFeature(input.name, input.options, structure, resolvedConfig, result, dryRun);
34718
34730
  break;
34719
34731
  case "service":
34720
- await scaffoldService(input.name, input.options, structure, config2, result, dryRun);
34732
+ await scaffoldService(input.name, input.options, structure, resolvedConfig, result, dryRun);
34721
34733
  break;
34722
34734
  case "entity":
34723
- await scaffoldEntity(input.name, input.options, structure, config2, result, dryRun);
34735
+ await scaffoldEntity(input.name, input.options, structure, resolvedConfig, result, dryRun);
34724
34736
  break;
34725
34737
  case "controller":
34726
- await scaffoldController(input.name, input.options, structure, config2, result, dryRun);
34738
+ await scaffoldController(input.name, input.options, structure, resolvedConfig, result, dryRun);
34727
34739
  break;
34728
34740
  case "component":
34729
- await scaffoldComponent(input.name, input.options, structure, config2, result, dryRun);
34741
+ await scaffoldComponent(input.name, input.options, structure, resolvedConfig, result, dryRun);
34730
34742
  break;
34731
34743
  case "test":
34732
- await scaffoldTest(input.name, input.options, structure, config2, result, dryRun);
34744
+ await scaffoldTest(input.name, input.options, structure, resolvedConfig, result, dryRun);
34733
34745
  break;
34734
34746
  case "dto":
34735
- await scaffoldDtos(input.name, input.options, structure, config2, result, dryRun);
34747
+ await scaffoldDtos(input.name, input.options, structure, resolvedConfig, result, dryRun);
34736
34748
  break;
34737
34749
  case "validator":
34738
- await scaffoldValidator(input.name, input.options, structure, config2, result, dryRun);
34750
+ await scaffoldValidator(input.name, input.options, structure, resolvedConfig, result, dryRun);
34739
34751
  break;
34740
34752
  case "repository":
34741
- await scaffoldRepository(input.name, input.options, structure, config2, result, dryRun);
34753
+ await scaffoldRepository(input.name, input.options, structure, resolvedConfig, result, dryRun);
34742
34754
  break;
34743
34755
  }
34744
34756
  } catch (error2) {
@@ -36841,6 +36853,10 @@ var init_scaffold_extension = __esm({
36841
36853
  }
36842
36854
  }
36843
36855
  }
36856
+ },
36857
+ path: {
36858
+ type: "string",
36859
+ description: "Path to SmartStack project root (defaults to configured project path)"
36844
36860
  }
36845
36861
  },
36846
36862
  required: ["type", "name"]
@@ -58074,6 +58090,12 @@ async function discoverNavRoutes(structure, scope, warnings) {
58074
58090
  const parsedNavRoutes = extractNavRoutes(content);
58075
58091
  for (const parsed of parsedNavRoutes) {
58076
58092
  const { navRoute, suffix, fullNavRoute } = parsed;
58093
+ if (parsed.inferred && warnings) {
58094
+ const controllerBaseName = path19.basename(file);
58095
+ warnings.push(
58096
+ `\u26A0 No [NavRoute] found in ${controllerBaseName}, inferred from [Route] attribute. Consider adding [NavRoute("${navRoute}")] for full permission integration.`
58097
+ );
58098
+ }
58077
58099
  const application = navRoute.split(".")[0];
58078
58100
  if (scope !== "all" && scope !== "core" && scope !== "extensions" && application !== scope) {
58079
58101
  continue;