@aisdlc/cli 3.4.0 → 3.4.1

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.
package/dist/index.js CHANGED
@@ -2170,6 +2170,7 @@ import pc10 from "picocolors";
2170
2170
  import {
2171
2171
  depositProductHandoffSidecar,
2172
2172
  detectActiveChangeForIntegration,
2173
+ integrateAllSddChanges,
2173
2174
  integrateSddChange,
2174
2175
  scaffoldSddChange,
2175
2176
  scanAllProductHandoffs,
@@ -2432,10 +2433,50 @@ function emitIntegrateJson(changeId, result) {
2432
2433
  };
2433
2434
  console.log(JSON.stringify(payload, null, 2));
2434
2435
  }
2436
+ function printBatchIntegrationResult(result) {
2437
+ console.log(` ${pc10.green("\u2714")} Processed changes: ${pc10.bold(String(result.processedChanges.length))} (${result.processedChanges.join(", ") || "None"})`);
2438
+ console.log(` ${pc10.yellow("\u2139")} Skipped changes: ${pc10.bold(String(result.skippedChanges.length))}`);
2439
+ console.log(` ${pc10.green("\u2714")} Updated product artifacts: ${pc10.green(result.updatedProductArtifacts.join(", ") || "None")}`);
2440
+ console.log(` ${pc10.green("\u2714")} Updated arc42 architecture: ${pc10.green(result.updatedArchitectureArtifacts.join(", ") || "None")}`);
2441
+ console.log(` ${pc10.green("\u2714")} Synced PDaC SHA-256 digests: ${pc10.cyan(String(result.syncedDigestsCount))}`);
2442
+ if (result.success) {
2443
+ console.log(pc10.green("\n\u2714 Batch canonical specification integration COMPLETED (EXIT 0)\n"));
2444
+ } else {
2445
+ for (const err of result.errors) console.log(` ${pc10.red("\u2716")} ${err}`);
2446
+ console.log(pc10.red("\n\u2716 Batch integration finished with errors (EXIT 1)\n"));
2447
+ }
2448
+ }
2449
+ function emitBatchIntegrateJson(result) {
2450
+ const payload = {
2451
+ command: "sdd:integrate:all",
2452
+ success: result.success,
2453
+ exitCode: result.success ? 0 : 1,
2454
+ processedChanges: result.processedChanges,
2455
+ skippedChanges: result.skippedChanges,
2456
+ updatedProductArtifacts: result.updatedProductArtifacts,
2457
+ updatedArchitectureArtifacts: result.updatedArchitectureArtifacts,
2458
+ createdCanonicalArtifacts: result.createdCanonicalArtifacts,
2459
+ syncedDigestsCount: result.syncedDigestsCount,
2460
+ errors: result.errors
2461
+ };
2462
+ console.log(JSON.stringify(payload, null, 2));
2463
+ }
2464
+ function runBatchSddIntegrate(options, rootDir, isSilent, useJson) {
2465
+ if (!isSilent) {
2466
+ console.log(pc10.bold(pc10.cyan("\n\u{1F504} [AI-SDLC SDD] Consolidating all completed SDD changes into canonical specifications...")));
2467
+ }
2468
+ const result = integrateAllSddChanges({ rootDir, author: options.author, autoArchive: options.autoArchive });
2469
+ if (!isSilent) printBatchIntegrationResult(result);
2470
+ if (useJson) emitBatchIntegrateJson(result);
2471
+ return result.success;
2472
+ }
2435
2473
  function runSddIntegrate(options) {
2436
2474
  const rootDir = options.root || process.cwd();
2437
2475
  const useJson = isJsonOutput(options);
2438
2476
  const isSilent = Boolean(options.silent || useJson);
2477
+ if (options.all) {
2478
+ return runBatchSddIntegrate(options, rootDir, isSilent, useJson);
2479
+ }
2439
2480
  const changeId = resolveIntegrationChangeId(options, rootDir, isSilent, useJson);
2440
2481
  if (!changeId) return false;
2441
2482
  if (!isSilent) {
@@ -2523,7 +2564,7 @@ function runChangeNew(options) {
2523
2564
 
2524
2565
  // src/index.ts
2525
2566
  var program = new Command();
2526
- program.name("aisdlc").description("AI-SDLC: Spec-Driven Development, Governance & Quality Gates for AI & Humans").version("3.4.0");
2567
+ program.name("aisdlc").description("AI-SDLC: Spec-Driven Development, Governance & Quality Gates for AI & Humans").version("3.4.1");
2527
2568
  program.command("check").description("Unified pre-flight command: validates Quality Gates with optional non-destructive auto-fix").option("--fix", "Automatically synchronize Gherkin scenarios (.feature) and cryptographic digests of PDaC citations").option("-r, --root <path>", "Project root directory").option("--vuln", "Scan for known vulnerabilities (CVE/GHSA) in dependencies").option("--json", "Emit verification results in structured JSON format").option("-F, --format <format>", "Output format: text or json").action((opts) => {
2528
2569
  const passed = runCheck({
2529
2570
  fix: opts.fix,
@@ -2795,10 +2836,11 @@ sddCommand.command("verify").description("Validate compliance of handoff.yaml si
2795
2836
  });
2796
2837
  process.exit(passed ? 0 : 1);
2797
2838
  });
2798
- sddCommand.command("integrate").description("Integrate and synchronize implemented SDD changes into canonical specification (product, requirements, and architecture)").option("-c, --change <id>", "Change identifier (e.g. chg-001-telemetry)").option("--auto", "Automatically detect active change to integrate based on branch, PR, or diff").option("--head-ref <ref>", "Source branch for automatic resolution").option("--pr-title <title>", "Pull Request title for automatic resolution").option("--pr-body <body>", "Pull Request body for automatic resolution").option("-r, --root <path>", "Project root directory").option("-a, --author <author>", "Name of author or agent performing integration").option("--no-archive", "Do not archive change to specs/changes/completed after integration").option("--json", "Structured JSON format output").option("-F, --format <format>", "Output format: text or json").action((opts) => {
2839
+ sddCommand.command("integrate").description("Integrate and synchronize implemented SDD changes into canonical specification (product, requirements, and architecture)").option("-c, --change <id>", "Change identifier (e.g. chg-001-telemetry)").option("--all", "Consolidate and integrate all completed SDD changes across active and completed workspaces").option("--auto", "Automatically detect active change to integrate based on branch, PR, or diff").option("--head-ref <ref>", "Source branch for automatic resolution").option("--pr-title <title>", "Pull Request title for automatic resolution").option("--pr-body <body>", "Pull Request body for automatic resolution").option("-r, --root <path>", "Project root directory").option("-a, --author <author>", "Name of author or agent performing integration").option("--no-archive", "Do not archive change to specs/changes/completed after integration").option("--json", "Structured JSON format output").option("-F, --format <format>", "Output format: text or json").action((opts) => {
2799
2840
  const passed = runSddIntegrate({
2800
2841
  root: opts.root,
2801
2842
  change: opts.change,
2843
+ all: opts.all,
2802
2844
  auto: opts.auto,
2803
2845
  headRef: opts.headRef,
2804
2846
  prTitle: opts.prTitle,