specdx 0.4.0-alpha.3 → 0.4.0-alpha.4

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 (39) hide show
  1. package/LICENSE +21 -0
  2. package/dist/{changelog-B2BDIW2P.js → changelog-HL6HA7HG.js} +15 -8
  3. package/dist/{changelog-B2BDIW2P.js.map → changelog-HL6HA7HG.js.map} +1 -1
  4. package/dist/{check-RWF2UOZB.js → check-XTL2VATS.js} +6 -3
  5. package/dist/check-XTL2VATS.js.map +1 -0
  6. package/dist/diff-GJYKGIG6.js +107 -0
  7. package/dist/diff-GJYKGIG6.js.map +1 -0
  8. package/dist/{dist-DISODEN3.js → dist-7GA3NJ3Y.js} +2 -2
  9. package/dist/{dist-DISODEN3.js.map → dist-7GA3NJ3Y.js.map} +1 -1
  10. package/dist/{explain-GGWBNDX2.js → explain-2I3M7ICY.js} +33 -26
  11. package/dist/explain-2I3M7ICY.js.map +1 -0
  12. package/dist/{generate-RAUVLJKF.js → generate-NRBZMTHL.js} +2 -2
  13. package/dist/{generate-test-plan-4VEYZDMU.js → generate-test-plan-Q5C52KPL.js} +5 -2
  14. package/dist/{generate-test-plan-4VEYZDMU.js.map → generate-test-plan-Q5C52KPL.js.map} +1 -1
  15. package/dist/index.js +132 -104
  16. package/dist/index.js.map +1 -1
  17. package/dist/main.js +10 -10
  18. package/dist/{mcp-RFGBEGM3.js → mcp-DKM3YAHJ.js} +2 -2
  19. package/dist/{migrate-F3JBCVDR.js → migrate-677E4C5U.js} +2 -2
  20. package/dist/migrate-677E4C5U.js.map +1 -0
  21. package/dist/{ready-VFVDQS3A.js → ready-CYFUHCV3.js} +31 -24
  22. package/dist/{ready-VFVDQS3A.js.map → ready-CYFUHCV3.js.map} +1 -1
  23. package/dist/skills/specdx-check-drift.md +1 -1
  24. package/dist/skills/specdx-verify.md +1 -1
  25. package/dist/{status-GUYBEGOX.js → status-ZWDR2EZN.js} +36 -29
  26. package/dist/status-ZWDR2EZN.js.map +1 -0
  27. package/dist/{update-CTVV2TIE.js → update-P52U4ROV.js} +2 -2
  28. package/dist/update-P52U4ROV.js.map +1 -0
  29. package/hooks/session-start +0 -0
  30. package/package.json +18 -19
  31. package/dist/check-RWF2UOZB.js.map +0 -1
  32. package/dist/diff-7LJ4VVNG.js +0 -100
  33. package/dist/diff-7LJ4VVNG.js.map +0 -1
  34. package/dist/explain-GGWBNDX2.js.map +0 -1
  35. package/dist/migrate-F3JBCVDR.js.map +0 -1
  36. package/dist/status-GUYBEGOX.js.map +0 -1
  37. package/dist/update-CTVV2TIE.js.map +0 -1
  38. /package/dist/{generate-RAUVLJKF.js.map → generate-NRBZMTHL.js.map} +0 -0
  39. /package/dist/{mcp-RFGBEGM3.js.map → mcp-DKM3YAHJ.js.map} +0 -0
package/dist/index.js CHANGED
@@ -3214,58 +3214,65 @@ var diff_default = defineCommand4({
3214
3214
  },
3215
3215
  async run({ args }) {
3216
3216
  try {
3217
- const result = await runDiff({
3218
- base: args.base,
3219
- head: args.head,
3220
- spec: args.spec,
3221
- format: args.format
3222
- });
3223
- if (args.format === "json") {
3224
- console.log(JSON.stringify(result, null, 2));
3225
- return;
3226
- }
3227
- if (result.diffs.length === 0 && result.added.length === 0 && result.removed.length === 0) {
3228
- console.log(" \u2713 No spec changes detected.");
3229
- return;
3230
- }
3231
- console.log(result.summary);
3232
- console.log();
3233
- for (const diff2 of result.diffs) {
3234
- console.log(` ${diff2.specId}:`);
3235
- for (const fc of diff2.frontmatter) {
3236
- const detail = fc.before !== void 0 || fc.after !== void 0 ? ` (${String(fc.before)} \u2192 ${String(fc.after)})` : "";
3237
- console.log(` ${fc.type}: ${fc.field}${detail}`);
3217
+ try {
3218
+ const result = await runDiff({
3219
+ base: args.base,
3220
+ head: args.head,
3221
+ spec: args.spec,
3222
+ format: args.format
3223
+ });
3224
+ if (args.format === "json") {
3225
+ console.log(JSON.stringify(result, null, 2));
3226
+ return;
3238
3227
  }
3239
- for (const sc of diff2.sections) {
3240
- console.log(` ${sc.type}: ${sc.heading}`);
3228
+ if (result.diffs.length === 0 && result.added.length === 0 && result.removed.length === 0) {
3229
+ console.log(" \u2713 No spec changes detected.");
3230
+ return;
3241
3231
  }
3242
- }
3243
- if (result.added.length > 0) {
3244
- console.log(`
3232
+ console.log(result.summary);
3233
+ console.log();
3234
+ for (const diff2 of result.diffs) {
3235
+ console.log(` ${diff2.specId}:`);
3236
+ for (const fc of diff2.frontmatter) {
3237
+ const detail = fc.before !== void 0 || fc.after !== void 0 ? ` (${String(fc.before)} \u2192 ${String(fc.after)})` : "";
3238
+ console.log(` ${fc.type}: ${fc.field}${detail}`);
3239
+ }
3240
+ for (const sc of diff2.sections) {
3241
+ console.log(` ${sc.type}: ${sc.heading}`);
3242
+ }
3243
+ }
3244
+ if (result.added.length > 0) {
3245
+ console.log(`
3245
3246
  Added: ${result.added.join(", ")}`);
3246
- }
3247
- if (result.removed.length > 0) {
3248
- console.log(`
3247
+ }
3248
+ if (result.removed.length > 0) {
3249
+ console.log(`
3249
3250
  Removed: ${result.removed.join(", ")}`);
3250
- }
3251
- if (result.impact.length > 0) {
3252
- console.log("\n Downstream Impact:");
3253
- for (const impact of result.impact) {
3254
- for (const d of impact.downstream) {
3255
- console.log(
3256
- ` ${d.specId} \u2014 staleness: ${d.staleness.toFixed(2)} \u2014 ${d.reason}`
3257
- );
3251
+ }
3252
+ if (result.impact.length > 0) {
3253
+ console.log("\n Downstream Impact:");
3254
+ for (const impact of result.impact) {
3255
+ for (const d of impact.downstream) {
3256
+ console.log(
3257
+ ` ${d.specId} \u2014 staleness: ${d.staleness.toFixed(2)} \u2014 ${d.reason}`
3258
+ );
3259
+ }
3258
3260
  }
3259
3261
  }
3262
+ } catch (err) {
3263
+ if (err instanceof DiffError) {
3264
+ console.error(`
3265
+ \u2717 ${err.message}
3266
+ `);
3267
+ process.exit(1);
3268
+ }
3269
+ throw err;
3260
3270
  }
3261
3271
  } catch (err) {
3262
- if (err instanceof DiffError) {
3263
- console.error(`
3272
+ console.error(`
3264
3273
  \u2717 ${err.message}
3265
3274
  `);
3266
- process.exit(1);
3267
- }
3268
- throw err;
3275
+ process.exit(1);
3269
3276
  }
3270
3277
  }
3271
3278
  });
@@ -3361,40 +3368,47 @@ var status_default = defineCommand5({
3361
3368
  }
3362
3369
  },
3363
3370
  async run({ args }) {
3364
- const result = await runStatus({ format: args.format });
3365
- if (args.format === "json") {
3366
- console.log(JSON.stringify(result, null, 2));
3367
- return;
3368
- }
3369
- if (args.format === "github") {
3370
- for (const s of result.staleSpecs) {
3371
- console.log(
3372
- `::warning::Spec "${s.specId}" is stale (${s.daysSinceUpdate} days since update)`
3373
- );
3371
+ try {
3372
+ const result = await runStatus({ format: args.format });
3373
+ if (args.format === "json") {
3374
+ console.log(JSON.stringify(result, null, 2));
3375
+ return;
3374
3376
  }
3375
- for (const issue of result.integrityIssues) {
3376
- console.log(`::error::${issue}`);
3377
+ if (args.format === "github") {
3378
+ for (const s of result.staleSpecs) {
3379
+ console.log(
3380
+ `::warning::Spec "${s.specId}" is stale (${s.daysSinceUpdate} days since update)`
3381
+ );
3382
+ }
3383
+ for (const issue of result.integrityIssues) {
3384
+ console.log(`::error::${issue}`);
3385
+ }
3386
+ return;
3377
3387
  }
3378
- return;
3379
- }
3380
- const icon = result.verdict === "healthy" ? "\u2713" : result.verdict === "warnings" ? "\u26A0" : "\u2717";
3381
- console.log(`
3388
+ const icon = result.verdict === "healthy" ? "\u2713" : result.verdict === "warnings" ? "\u26A0" : "\u2717";
3389
+ console.log(`
3382
3390
  ${icon} ${result.project} \u2014 ${result.verdict}`);
3383
- console.log(
3384
- ` ${result.specCount} specs: ${Object.entries(result.byStatus).map(([k, v]) => `${v} ${k}`).join(", ")}`
3385
- );
3386
- console.log(
3387
- ` Lint: ${result.lintHealth.errors} errors, ${result.lintHealth.warnings} warnings`
3388
- );
3389
- if (result.staleSpecs.length > 0) {
3390
3391
  console.log(
3391
- ` Stale: ${result.staleSpecs.map((s) => `${s.specId} (${s.daysSinceUpdate}d)`).join(", ")}`
3392
+ ` ${result.specCount} specs: ${Object.entries(result.byStatus).map(([k, v]) => `${v} ${k}`).join(", ")}`
3392
3393
  );
3394
+ console.log(
3395
+ ` Lint: ${result.lintHealth.errors} errors, ${result.lintHealth.warnings} warnings`
3396
+ );
3397
+ if (result.staleSpecs.length > 0) {
3398
+ console.log(
3399
+ ` Stale: ${result.staleSpecs.map((s) => `${s.specId} (${s.daysSinceUpdate}d)`).join(", ")}`
3400
+ );
3401
+ }
3402
+ if (result.integrityIssues.length > 0) {
3403
+ console.log(` Issues: ${result.integrityIssues.join("; ")}`);
3404
+ }
3405
+ console.log();
3406
+ } catch (err) {
3407
+ console.error(`
3408
+ \u2717 ${err.message}
3409
+ `);
3410
+ process.exit(1);
3393
3411
  }
3394
- if (result.integrityIssues.length > 0) {
3395
- console.log(` Issues: ${result.integrityIssues.join("; ")}`);
3396
- }
3397
- console.log();
3398
3412
  }
3399
3413
  });
3400
3414
 
@@ -3456,16 +3470,23 @@ var changelog_default = defineCommand6({
3456
3470
  },
3457
3471
  async run({ args }) {
3458
3472
  try {
3459
- const output = await runChangelog(args);
3460
- console.log(output);
3461
- } catch (err) {
3462
- if (err instanceof DiffError) {
3463
- console.error(`
3473
+ try {
3474
+ const output = await runChangelog(args);
3475
+ console.log(output);
3476
+ } catch (err) {
3477
+ if (err instanceof DiffError) {
3478
+ console.error(`
3464
3479
  \u2717 ${err.message}
3465
3480
  `);
3466
- process.exit(1);
3481
+ process.exit(1);
3482
+ }
3483
+ throw err;
3467
3484
  }
3468
- throw err;
3485
+ } catch (err) {
3486
+ console.error(`
3487
+ \u2717 ${err.message}
3488
+ `);
3489
+ process.exit(1);
3469
3490
  }
3470
3491
  }
3471
3492
  });
@@ -3528,35 +3549,42 @@ var explain_default = defineCommand7({
3528
3549
  format: { type: "string", description: "Output format: pretty, json", default: "pretty" }
3529
3550
  },
3530
3551
  async run({ args }) {
3531
- const result = await runExplain({ format: args.format });
3532
- if (args.format === "json") {
3533
- console.log(JSON.stringify(result, null, 2));
3534
- return;
3535
- }
3536
- console.log(`
3552
+ try {
3553
+ const result = await runExplain({ format: args.format });
3554
+ if (args.format === "json") {
3555
+ console.log(JSON.stringify(result, null, 2));
3556
+ return;
3557
+ }
3558
+ console.log(`
3537
3559
  ${result.project}`);
3538
- if (result.description) {
3539
- console.log(` ${result.description}`);
3540
- }
3541
- console.log(
3542
- `
3560
+ if (result.description) {
3561
+ console.log(` ${result.description}`);
3562
+ }
3563
+ console.log(
3564
+ `
3543
3565
  ${result.specCount} specs: ${Object.entries(result.byType).map(([k, v]) => `${v} ${k}`).join(", ")}`
3544
- );
3545
- console.log(
3546
- ` Status: ${Object.entries(result.byStatus).map(([k, v]) => `${v} ${k}`).join(", ")}`
3547
- );
3548
- console.log("\n Specs:");
3549
- for (const spec of result.specs) {
3550
- console.log(` ${spec.id} (${spec.type}, ${spec.status}) \u2014 ${spec.title}`);
3551
- if (spec.firstLine) {
3552
- console.log(` ${spec.firstLine}`);
3553
- }
3554
- }
3555
- console.log("\n Dependencies:");
3556
- for (const line of result.graph) {
3557
- console.log(` ${line}`);
3558
- }
3559
- console.log();
3566
+ );
3567
+ console.log(
3568
+ ` Status: ${Object.entries(result.byStatus).map(([k, v]) => `${v} ${k}`).join(", ")}`
3569
+ );
3570
+ console.log("\n Specs:");
3571
+ for (const spec of result.specs) {
3572
+ console.log(` ${spec.id} (${spec.type}, ${spec.status}) \u2014 ${spec.title}`);
3573
+ if (spec.firstLine) {
3574
+ console.log(` ${spec.firstLine}`);
3575
+ }
3576
+ }
3577
+ console.log("\n Dependencies:");
3578
+ for (const line of result.graph) {
3579
+ console.log(` ${line}`);
3580
+ }
3581
+ console.log();
3582
+ } catch (err) {
3583
+ console.error(`
3584
+ \u2717 ${err.message}
3585
+ `);
3586
+ process.exit(1);
3587
+ }
3560
3588
  }
3561
3589
  });
3562
3590
  export {