specdx 0.4.0-alpha.22 → 0.4.0-alpha.24

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specdx",
3
- "version": "0.4.0-alpha.22",
3
+ "version": "0.4.0-alpha.24",
4
4
  "description": "Spec-driven development skills for Claude Code",
5
5
  "author": {
6
6
  "name": "umxr",
@@ -169,17 +169,17 @@ var subCommands = {
169
169
  skills: bucketed("skills", () => import("./skills-36SRUEMR.js").then((m) => m.default)),
170
170
  pack: bucketed("pack", () => import("./pack-DE4UBTCC.js").then((m) => m.default)),
171
171
  diff: bucketed("diff", () => import("./diff-6C5LJ7SH.js").then((m) => m.default)),
172
- status: bucketed("status", () => import("./status-NWMX2KJZ.js").then((m) => m.default)),
172
+ status: bucketed("status", () => import("./status-W557JGZB.js").then((m) => m.default)),
173
173
  check: bucketed("check", () => import("./check-PHXXA7VY.js").then((m) => m.default)),
174
174
  ready: bucketed("ready", () => import("./ready-IKVESKEB.js").then((m) => m.default)),
175
175
  update: bucketed("update", () => import("./update-UFOHZEAK.js").then((m) => m.default)),
176
- generate: bucketed("generate", () => import("./generate-AVXZHH76.js").then((m) => m.default)),
176
+ generate: bucketed("generate", () => import("./generate-LX222NBV.js").then((m) => m.default)),
177
177
  migrate: bucketed("migrate", () => import("./migrate-FKFC7UAO.js").then((m) => m.default)),
178
- mcp: bucketed("mcp", () => import("./mcp-VMHFWM3O.js").then((m) => m.default))
178
+ mcp: bucketed("mcp", () => import("./mcp-YNCLSOHI.js").then((m) => m.default))
179
179
  };
180
180
 
181
181
  export {
182
182
  labelled,
183
183
  subCommands
184
184
  };
185
- //# sourceMappingURL=chunk-AQZQIURH.js.map
185
+ //# sourceMappingURL=chunk-BIN52R23.js.map
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "specdx",
4
- version: "0.4.0-alpha.22",
4
+ version: "0.4.0-alpha.24",
5
5
  description: "Spec-driven development toolchain. Validate, lint, pack, and ship specs for LLM-assisted workflows.",
6
6
  type: "module",
7
7
  license: "MIT",
@@ -100,4 +100,4 @@ var package_default = {
100
100
  export {
101
101
  package_default
102
102
  };
103
- //# sourceMappingURL=chunk-KVLFW5MI.js.map
103
+ //# sourceMappingURL=chunk-TMLHMZPC.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"specdx\",\n \"version\": \"0.4.0-alpha.22\",\n \"description\": \"Spec-driven development toolchain. Validate, lint, pack, and ship specs for LLM-assisted workflows.\",\n \"type\": \"module\",\n \"license\": \"MIT\",\n \"author\": \"Umar Gora (https://github.com/umxr)\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/umxr/specdx.git\",\n \"directory\": \"packages/cli\"\n },\n \"homepage\": \"https://github.com/umxr/specdx#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/umxr/specdx/issues\"\n },\n \"keywords\": [\n \"spec\",\n \"specification\",\n \"prd\",\n \"technical-design\",\n \"api-contract\",\n \"lint\",\n \"validation\",\n \"llm\",\n \"ai\",\n \"context-packing\",\n \"spec-driven-development\",\n \"claude-code\"\n ],\n \"engines\": {\n \"node\": \">=18.0.0\"\n },\n \"bin\": {\n \"specdx\": \"./dist/main.js\"\n },\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\"\n }\n },\n \"files\": [\n \"dist\",\n \".claude-plugin\",\n \"hooks\",\n \"README.md\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run\",\n \"clean\": \"rm -rf dist *.tsbuildinfo\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.27.0\",\n \"ajv\": \"^8.18.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"citty\": \"^0.2.1\",\n \"consola\": \"^3.4.0\",\n \"gray-matter\": \"^4.0.3\",\n \"js-tiktoken\": \"^1.0.18\",\n \"remark-parse\": \"^11.0.0\",\n \"tinyglobby\": \"^0.2.12\",\n \"unified\": \"^11.0.0\",\n \"unist-util-visit\": \"^5.0.0\",\n \"yaml\": \"^2.7.0\",\n \"zod\": \"^3.23.0\"\n },\n \"devDependencies\": {\n \"@specdx/check\": \"workspace:*\",\n \"@specdx/core\": \"workspace:*\",\n \"@specdx/diff\": \"workspace:*\",\n \"@specdx/lint\": \"workspace:*\",\n \"@specdx/mcp\": \"workspace:*\",\n \"@specdx/pack\": \"workspace:*\",\n \"@specdx/schema\": \"workspace:*\",\n \"@specdx/skills\": \"workspace:*\",\n \"tsup\": \"^8.5.1\",\n \"typescript\": \"^5.7.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"peerDependencies\": {\n \"ts-morph\": \">=20\",\n \"@anthropic-ai/sdk\": \">=0.30\"\n },\n \"peerDependenciesMeta\": {\n \"ts-morph\": {\n \"optional\": true\n },\n \"@anthropic-ai/sdk\": {\n \"optional\": true\n }\n }\n}\n"],"mappings":";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,QAAU;AAAA,EACV,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,KAAO;AAAA,IACL,QAAU;AAAA,EACZ;AAAA,EACA,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,EACF;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,OAAS;AAAA,IACT,WAAa;AAAA,IACb,MAAQ;AAAA,IACR,OAAS;AAAA,EACX;AAAA,EACA,cAAgB;AAAA,IACd,6BAA6B;AAAA,IAC7B,KAAO;AAAA,IACP,eAAe;AAAA,IACf,OAAS;AAAA,IACT,SAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,YAAc;AAAA,IACd,SAAW;AAAA,IACX,oBAAoB;AAAA,IACpB,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,iBAAmB;AAAA,IACjB,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,MAAQ;AAAA,IACR,YAAc;AAAA,EAChB;AAAA,EACA,eAAiB;AAAA,IACf,QAAU;AAAA,EACZ;AAAA,EACA,kBAAoB;AAAA,IAClB,YAAY;AAAA,IACZ,qBAAqB;AAAA,EACvB;AAAA,EACA,sBAAwB;AAAA,IACtB,YAAY;AAAA,MACV,UAAY;AAAA,IACd;AAAA,IACA,qBAAqB;AAAA,MACnB,UAAY;AAAA,IACd;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"specdx\",\n \"version\": \"0.4.0-alpha.24\",\n \"description\": \"Spec-driven development toolchain. Validate, lint, pack, and ship specs for LLM-assisted workflows.\",\n \"type\": \"module\",\n \"license\": \"MIT\",\n \"author\": \"Umar Gora (https://github.com/umxr)\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/umxr/specdx.git\",\n \"directory\": \"packages/cli\"\n },\n \"homepage\": \"https://github.com/umxr/specdx#readme\",\n \"bugs\": {\n \"url\": \"https://github.com/umxr/specdx/issues\"\n },\n \"keywords\": [\n \"spec\",\n \"specification\",\n \"prd\",\n \"technical-design\",\n \"api-contract\",\n \"lint\",\n \"validation\",\n \"llm\",\n \"ai\",\n \"context-packing\",\n \"spec-driven-development\",\n \"claude-code\"\n ],\n \"engines\": {\n \"node\": \">=18.0.0\"\n },\n \"bin\": {\n \"specdx\": \"./dist/main.js\"\n },\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\"\n }\n },\n \"files\": [\n \"dist\",\n \".claude-plugin\",\n \"hooks\",\n \"README.md\"\n ],\n \"scripts\": {\n \"build\": \"tsup\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run\",\n \"clean\": \"rm -rf dist *.tsbuildinfo\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.27.0\",\n \"ajv\": \"^8.18.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"citty\": \"^0.2.1\",\n \"consola\": \"^3.4.0\",\n \"gray-matter\": \"^4.0.3\",\n \"js-tiktoken\": \"^1.0.18\",\n \"remark-parse\": \"^11.0.0\",\n \"tinyglobby\": \"^0.2.12\",\n \"unified\": \"^11.0.0\",\n \"unist-util-visit\": \"^5.0.0\",\n \"yaml\": \"^2.7.0\",\n \"zod\": \"^3.23.0\"\n },\n \"devDependencies\": {\n \"@specdx/check\": \"workspace:*\",\n \"@specdx/core\": \"workspace:*\",\n \"@specdx/diff\": \"workspace:*\",\n \"@specdx/lint\": \"workspace:*\",\n \"@specdx/mcp\": \"workspace:*\",\n \"@specdx/pack\": \"workspace:*\",\n \"@specdx/schema\": \"workspace:*\",\n \"@specdx/skills\": \"workspace:*\",\n \"tsup\": \"^8.5.1\",\n \"typescript\": \"^5.7.0\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"peerDependencies\": {\n \"ts-morph\": \">=20\",\n \"@anthropic-ai/sdk\": \">=0.30\"\n },\n \"peerDependenciesMeta\": {\n \"ts-morph\": {\n \"optional\": true\n },\n \"@anthropic-ai/sdk\": {\n \"optional\": true\n }\n }\n}\n"],"mappings":";AAAA;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,QAAU;AAAA,EACV,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,IACN,KAAO;AAAA,EACT;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,KAAO;AAAA,IACL,QAAU;AAAA,EACZ;AAAA,EACA,SAAW;AAAA,IACT,KAAK;AAAA,MACH,OAAS;AAAA,MACT,QAAU;AAAA,IACZ;AAAA,EACF;AAAA,EACA,OAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,OAAS;AAAA,IACT,WAAa;AAAA,IACb,MAAQ;AAAA,IACR,OAAS;AAAA,EACX;AAAA,EACA,cAAgB;AAAA,IACd,6BAA6B;AAAA,IAC7B,KAAO;AAAA,IACP,eAAe;AAAA,IACf,OAAS;AAAA,IACT,SAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,YAAc;AAAA,IACd,SAAW;AAAA,IACX,oBAAoB;AAAA,IACpB,MAAQ;AAAA,IACR,KAAO;AAAA,EACT;AAAA,EACA,iBAAmB;AAAA,IACjB,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,MAAQ;AAAA,IACR,YAAc;AAAA,EAChB;AAAA,EACA,eAAiB;AAAA,IACf,QAAU;AAAA,EACZ;AAAA,EACA,kBAAoB;AAAA,IAClB,YAAY;AAAA,IACZ,qBAAqB;AAAA,EACvB;AAAA,EACA,sBAAwB;AAAA,IACtB,YAAY;AAAA,MACV,UAAY;AAAA,IACd;AAAA,IACA,qBAAqB;AAAA,MACnB,UAAY;AAAA,IACd;AAAA,EACF;AACF;","names":[]}
@@ -141,6 +141,8 @@ async function handleStatus() {
141
141
  const lintResults = engine.lint(specs.map((s) => s.spec));
142
142
  const errors = lintResults.diagnostics.filter((d) => d.severity === "error").length;
143
143
  const warnings = lintResults.diagnostics.filter((d) => d.severity === "warn").length;
144
+ const specsWithErrors = new Set(lintResults.diagnostics.filter((d) => d.severity === "error").map((d) => d.filePath));
145
+ const passing = specs.filter(({ spec }) => !specsWithErrors.has(spec.filePath)).length;
144
146
  const thresholdDays = config.diff?.staleness_threshold_days ?? DEFAULT_DIFF_CONFIG.staleness_threshold_days;
145
147
  const now = Date.now();
146
148
  const staleSpecs = [];
@@ -171,7 +173,7 @@ async function handleStatus() {
171
173
  // ambiguity `sdx_validate` was already cleaned up to avoid.
172
174
  specFiles: specs.length,
173
175
  byStatus,
174
- lintHealth: { errors, warnings, passing: specs.length - errors },
176
+ lintHealth: { errors, warnings, passing },
175
177
  staleSpecs,
176
178
  integrityIssues: graphError ? [graphError] : [],
177
179
  verdict
@@ -313,6 +315,7 @@ function createMcpServer(version = "0.0.0-unknown") {
313
315
  return server;
314
316
  }
315
317
  export {
316
- createMcpServer
318
+ createMcpServer,
319
+ handleStatus
317
320
  };
318
- //# sourceMappingURL=dist-SOZ3I4RP.js.map
321
+ //# sourceMappingURL=dist-DN6NGCS6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../mcp/src/server.ts","../../mcp/src/tools/validate.ts","../../mcp/src/tools/lint.ts","../../mcp/src/tools/pack.ts","../../mcp/src/tools/status.ts","../../mcp/src/tools/check.ts","../../mcp/src/tools/diff.ts","../../mcp/src/tools/graph.ts"],"sourcesContent":["import { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { z } from \"zod\";\nimport { handleValidate } from \"./tools/validate.js\";\nimport { handleLint } from \"./tools/lint.js\";\nimport { handlePack } from \"./tools/pack.js\";\nimport { handleStatus } from \"./tools/status.js\";\nimport { handleCheck } from \"./tools/check.js\";\nimport { handleDiff } from \"./tools/diff.js\";\nimport { handleGraph } from \"./tools/graph.js\";\n\n/**\n * Build the MCP server.\n *\n * `version` is passed in rather than hardcoded: a literal here advertised\n * `0.4.0` from every prerelease build, so every MCP client logged a version\n * that was never published. The CLI owns the real number and hands it over.\n */\nexport function createMcpServer(version = \"0.0.0-unknown\"): McpServer {\n const server = new McpServer({\n name: \"specdx\",\n version,\n });\n\n server.tool(\n \"sdx_validate\",\n \"Validate the spec.config.yaml configuration file\",\n { configPath: z.string().optional().describe(\"Path to config directory\") },\n async (params) => ({\n content: [{ type: \"text\" as const, text: await handleValidate(params) }],\n }),\n );\n\n server.tool(\n \"sdx_lint\",\n \"Run lint rules against the spec suite\",\n {\n preset: z.string().optional().describe(\"Lint preset: minimal, recommended, strict\"),\n specPath: z.string().optional().describe(\"Lint a specific spec file\"),\n },\n async (params) => ({\n content: [{ type: \"text\" as const, text: await handleLint(params) }],\n }),\n );\n\n server.tool(\n \"sdx_pack\",\n \"Pack spec context for LLM consumption within a token budget\",\n {\n task: z.string().optional().describe(\"Task description for relevance scoring\"),\n format: z.string().optional().describe(\"Output format: xml, markdown, json\"),\n budget: z.number().optional().describe(\"Token budget (default: 12000)\"),\n },\n async (params) => ({\n content: [{ type: \"text\" as const, text: await handlePack(params) }],\n }),\n );\n\n server.tool(\n \"sdx_status\",\n \"Get spec suite health overview (lint health, staleness, integrity)\",\n {},\n async () => ({\n content: [{ type: \"text\" as const, text: await handleStatus() }],\n }),\n );\n\n server.tool(\n \"sdx_check\",\n \"Run spec-to-implementation drift analysis\",\n {\n framework: z.string().optional().describe(\"Framework: express, hono, nextjs\"),\n specId: z.string().optional().describe(\"Check a specific spec by ID\"),\n },\n async (params) => ({\n content: [{ type: \"text\" as const, text: await handleCheck(params) }],\n }),\n );\n\n server.tool(\n \"sdx_diff\",\n \"Show spec changes and downstream impact between git refs\",\n {\n base: z.string().optional().describe(\"Base git ref (default: main)\"),\n head: z.string().optional().describe(\"Head git ref (default: HEAD)\"),\n working: z\n .boolean()\n .optional()\n .describe(\n \"Compare the base ref against the working tree, including uncommitted and untracked specs (default: false)\",\n ),\n },\n async (params) => ({\n content: [{ type: \"text\" as const, text: await handleDiff(params) }],\n }),\n );\n\n server.tool(\n \"sdx_graph\",\n \"Get the spec dependency graph\",\n {\n format: z.string().optional().describe(\"Output format: json (default) or dot\"),\n },\n async (params) => ({\n content: [{ type: \"text\" as const, text: await handleGraph(params) }],\n }),\n );\n\n return server;\n}\n","import { loadConfig, buildGraph, resolveGlob, ConfigError, GraphError } from \"@specdx/core\";\n\nexport async function handleValidate(params: { configPath?: string }): Promise<string> {\n try {\n const configDir = params.configPath ?? process.cwd();\n const config = await loadConfig(undefined, configDir);\n // A cyclic or dangling requires chain is an invalid config (issue #13).\n buildGraph(config);\n // `specEntries` and `specFiles` are distinct: one glob entry can resolve to\n // many files. Reporting either as a bare `specCount` put this tool and\n // sdx_status in direct contradiction for the same project.\n let specFiles = 0;\n for (const entry of Object.values(config.specs)) {\n specFiles += (await resolveGlob(entry.path, configDir)).length;\n }\n\n return JSON.stringify({\n valid: true,\n specEntries: Object.keys(config.specs).length,\n specFiles,\n project: config.project?.name ?? \"unknown\",\n });\n } catch (err) {\n if (err instanceof ConfigError) {\n return JSON.stringify({ valid: false, error: err.message, details: err.errors });\n }\n if (err instanceof GraphError) {\n return JSON.stringify({ valid: false, error: err.message });\n }\n throw err;\n }\n}\n","import { loadConfig, parseSpec, resolveGlob, buildGraph } from \"@specdx/core\";\nimport { createLintEngine, getPreset } from \"@specdx/lint\";\nimport type { ParsedSpec } from \"@specdx/core\";\n\nexport async function handleLint(params: { preset?: string; specPath?: string }): Promise<string> {\n const configDir = process.cwd();\n const config = await loadConfig(undefined, configDir);\n const preset = params.preset ?? config.lint?.extends ?? \"recommended\";\n const rules = getPreset(preset);\n\n const specs: ParsedSpec[] = [];\n for (const [, entry] of Object.entries(config.specs)) {\n const files = await resolveGlob(entry.path, configDir);\n for (const file of files) {\n if (params.specPath && !file.includes(params.specPath)) continue;\n specs.push(await parseSpec(file));\n }\n }\n\n let graph;\n try {\n graph = buildGraph(config);\n } catch {\n // non-fatal\n }\n\n const engine = createLintEngine({ rules, config, graph });\n const results = engine.lint(specs);\n\n return JSON.stringify({\n diagnostics: results.diagnostics,\n hasErrors: results.hasErrors,\n hasWarnings: results.hasWarnings,\n specsChecked: specs.length,\n });\n}\n","import { loadConfig, parseSpec, resolveGlob, buildGraph } from \"@specdx/core\";\nimport { pack } from \"@specdx/pack\";\nimport type { ParsedSpec } from \"@specdx/core\";\n\nexport async function handlePack(params: {\n task?: string;\n format?: string;\n budget?: number;\n}): Promise<string> {\n const configDir = process.cwd();\n const config = await loadConfig(undefined, configDir);\n\n const allSpecs: ParsedSpec[] = [];\n for (const [, entry] of Object.entries(config.specs)) {\n const files = await resolveGlob(entry.path, configDir);\n for (const file of files) {\n allSpecs.push(await parseSpec(file));\n }\n }\n\n let graph;\n try {\n graph = buildGraph(config);\n } catch {\n // non-fatal\n }\n\n const result = pack(\n allSpecs,\n {\n task: params.task,\n budget: params.budget,\n format: (params.format as \"xml\" | \"markdown\" | \"json\") ?? undefined,\n },\n config.pack,\n graph,\n );\n\n return result.output;\n}\n","import { loadConfig, parseSpec, resolveGlob, buildGraph } from \"@specdx/core\";\nimport { createLintEngine, getPreset } from \"@specdx/lint\";\nimport { DEFAULT_DIFF_CONFIG } from \"@specdx/diff\";\nimport type { ParsedSpec } from \"@specdx/core\";\n\nexport async function handleStatus(): Promise<string> {\n const configDir = process.cwd();\n const config = await loadConfig(undefined, configDir);\n\n const specs: { spec: ParsedSpec; entry: { path: string; owner?: string } }[] = [];\n for (const [, entry] of Object.entries(config.specs)) {\n const paths = await resolveGlob(entry.path, configDir);\n for (const p of paths) {\n const spec = await parseSpec(p);\n specs.push({ spec, entry: entry as { path: string; owner?: string } });\n }\n }\n\n const byStatus: Record<string, number> = {};\n for (const { spec } of specs) {\n const status = (spec.frontmatter.status as string) || \"unknown\";\n byStatus[status] = (byStatus[status] ?? 0) + 1;\n }\n\n const presetName = config.lint?.extends ?? \"recommended\";\n const rules = getPreset(presetName);\n\n let graph;\n let graphError: string | undefined;\n try {\n graph = buildGraph(config);\n } catch (err) {\n graphError = (err as Error).message;\n }\n\n const engine = createLintEngine({ rules, config, graph });\n const lintResults = engine.lint(specs.map((s) => s.spec));\n\n const errors = lintResults.diagnostics.filter((d) => d.severity === \"error\").length;\n const warnings = lintResults.diagnostics.filter((d) => d.severity === \"warn\").length;\n\n // Specs carrying no error-severity diagnostic.\n //\n // This was `specs.length - errors` here too, and the CLI-side fix did not\n // reach it: this handler is a near-copy of `runStatus`, so a repair to one\n // leaves the other reporting a negative number of passing specs. Kept in step\n // by the parity test in the CLI package (audit run 6, G2).\n const specsWithErrors = new Set(\n lintResults.diagnostics.filter((d) => d.severity === \"error\").map((d) => d.filePath),\n );\n const passing = specs.filter(({ spec }) => !specsWithErrors.has(spec.filePath)).length;\n\n const thresholdDays =\n config.diff?.staleness_threshold_days ?? DEFAULT_DIFF_CONFIG.staleness_threshold_days;\n const now = Date.now();\n const staleSpecs: { specId: string; daysSinceUpdate: number; owner?: string }[] = [];\n for (const { spec, entry } of specs) {\n const dateStr =\n (spec.frontmatter.updated as string | undefined) ||\n (spec.frontmatter.created as string | undefined);\n if (dateStr) {\n const days = Math.floor((now - new Date(dateStr).getTime()) / (1000 * 60 * 60 * 24));\n if (days > thresholdDays) {\n staleSpecs.push({\n specId: spec.frontmatter.id as string,\n daysSinceUpdate: days,\n owner: entry.owner,\n });\n }\n }\n }\n\n // An empty suite is unassessed, never a vacuous \"healthy\" (vacuous-pass audit)\n let verdict: \"healthy\" | \"warnings\" | \"errors\" | \"unassessed\" = \"healthy\";\n if (errors > 0 || graphError) verdict = \"errors\";\n else if (warnings > 0 || staleSpecs.length > 0) verdict = \"warnings\";\n else if (specs.length === 0) verdict = \"unassessed\";\n\n return JSON.stringify({\n project: config.project?.name ?? \"unknown\",\n // `specFiles` only. A second field named `specCount` gives a consumer no\n // way to know whether it counts config entries or resolved files -- the\n // ambiguity `sdx_validate` was already cleaned up to avoid.\n specFiles: specs.length,\n byStatus,\n lintHealth: { errors, warnings, passing },\n staleSpecs,\n integrityIssues: graphError ? [graphError] : [],\n verdict,\n });\n}\n","import { loadConfig, parseSpec, resolveGlob } from \"@specdx/core\";\nimport { runCheck } from \"@specdx/check\";\nimport type { ParsedSpec } from \"@specdx/core\";\n\nexport async function handleCheck(params: {\n framework?: string;\n specId?: string;\n}): Promise<string> {\n const configDir = process.cwd();\n const config = await loadConfig(undefined, configDir);\n\n const specs: ParsedSpec[] = [];\n for (const [, entry] of Object.entries(config.specs)) {\n const paths = await resolveGlob(entry.path, configDir);\n for (const p of paths) {\n const spec = await parseSpec(p);\n if (params.specId && spec.frontmatter.id !== params.specId) continue;\n specs.push(spec);\n }\n }\n\n const checkConfig = {\n ...config.check,\n ...(params.framework ? { framework: params.framework as \"express\" | \"hono\" | \"nextjs\" } : {}),\n };\n\n const result = await runCheck(specs, configDir, checkConfig);\n return JSON.stringify(result);\n}\n","import { join } from \"node:path\";\nimport { loadConfig } from \"@specdx/core\";\nimport { diffBetweenRefs, DEFAULT_DIFF_CONFIG, DiffError } from \"@specdx/diff\";\n\nexport async function handleDiff(params: {\n base?: string;\n head?: string;\n working?: boolean;\n}): Promise<string> {\n const configDir = process.cwd();\n const config = await loadConfig(undefined, configDir);\n const baseRef = params.base ?? config.diff?.baseline_ref ?? DEFAULT_DIFF_CONFIG.baseline_ref;\n const headRef = params.head ?? \"HEAD\";\n const configPath = join(configDir, \"spec.config.yaml\");\n\n try {\n const result = await diffBetweenRefs(configPath, baseRef, headRef, {\n working: params.working ?? false,\n });\n return JSON.stringify(result);\n } catch (err) {\n if (err instanceof DiffError) {\n return JSON.stringify({ error: err.message });\n }\n throw err;\n }\n}\n","import {\n loadConfig,\n buildGraph,\n GraphError,\n parseSpec,\n resolveGlob,\n collectReferenceEdges,\n findUnreflectedReferences,\n} from \"@specdx/core\";\nimport type { ParsedSpec } from \"@specdx/core\";\n\nexport async function handleGraph(params: { format?: string }): Promise<string> {\n const configDir = process.cwd();\n const config = await loadConfig(undefined, configDir);\n\n try {\n const graph = buildGraph(config);\n const sorted = graph.topologicalSort();\n\n const idToEntry = new Map<string, string>();\n const specs: ParsedSpec[] = [];\n for (const [key, entry] of Object.entries(config.specs)) {\n const paths = await resolveGlob(entry.path, configDir);\n for (const p of paths) {\n const spec = await parseSpec(p);\n specs.push(spec);\n if (typeof spec.frontmatter.id === \"string\") {\n idToEntry.set(spec.frontmatter.id, key);\n }\n }\n }\n const referenceEdges = collectReferenceEdges(specs);\n const unreflectedReferences = findUnreflectedReferences(referenceEdges, idToEntry, graph);\n\n if (params.format === \"dot\") {\n const lines = [\"digraph specs {\"];\n for (const edge of graph.edges) lines.push(` \"${edge.from}\" -> \"${edge.to}\";`);\n for (const ref of referenceEdges) {\n lines.push(\n ` \"${ref.fromId}\" -> \"${ref.toId}\" [style=dashed, label=\"${ref.relationship}\"];`,\n );\n }\n lines.push(\"}\");\n return lines.join(\"\\n\");\n }\n\n return JSON.stringify({\n nodes: sorted,\n edges: graph.edges,\n downstream: Object.fromEntries(sorted.map((n) => [n, graph.getDownstream(n)])),\n referenceEdges,\n unreflectedReferences,\n });\n } catch (err) {\n if (err instanceof GraphError) {\n return JSON.stringify({ error: err.message });\n }\n throw err;\n }\n}\n"],"mapp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B,MAAM,MAAM,YAAY,MAAM,EAAC,CAAE;IACpE;AAGJ,SAAO,KACL,YACA,4DACA;IACE,MAAM,EAAE,OAAM,EAAG,SAAQ,EAAG,SAAS,8BAA8B;IACnE,MAAM,EAAE,OAAM,EAAG,SAAQ,EAAG,SAAS,8BAA8B;IACnE,SAAS,EACN,QAAO,EACP,SAAQ,EACR,SACC,2GAA2G;KAGjH,OAAO,YAAY;IACjB,SAAS,CAAC,EAAE,MAAM,QAAiB,MAAM,MAAM,WAAW,MAAM,EAAC,CAAE;IACnE;AAGJ,SAAO,KACL,aACA,iCACA;IACE,QAAQ,EAAE,OAAM,EAAG,SAAQ,EAAG,SAAS,sCAAsC;KAE/E,OAAO,YAAY;IACjB,SAAS,CAAC,EAAE,MAAM,QAAiB,MAAM,MAAM,YAAY,MAAM,EAAC,CAAE;IACpE;AAGJ,SAAO;AACT;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  labelled
3
- } from "./chunk-AQZQIURH.js";
3
+ } from "./chunk-BIN52R23.js";
4
4
  import "./chunk-HCJDCS26.js";
5
5
  import "./chunk-5WRI5ZAA.js";
6
6
 
@@ -18,4 +18,4 @@ var generate_default = defineCommand({
18
18
  export {
19
19
  generate_default as default
20
20
  };
21
- //# sourceMappingURL=generate-AVXZHH76.js.map
21
+ //# sourceMappingURL=generate-LX222NBV.js.map
package/dist/index.js CHANGED
@@ -5777,6 +5777,10 @@ async function runStatus(options = {}) {
5777
5777
  }
5778
5778
  const errors = lintResults.diagnostics.filter((d) => d.severity === "error").length;
5779
5779
  const warnings = lintResults.diagnostics.filter((d) => d.severity === "warn").length;
5780
+ const specsWithErrors = new Set(
5781
+ lintResults.diagnostics.filter((d) => d.severity === "error").map((d) => d.filePath)
5782
+ );
5783
+ const passing = specs.filter(({ spec }) => !specsWithErrors.has(spec.filePath)).length;
5780
5784
  const thresholdDays = config.diff?.staleness_threshold_days ?? DEFAULT_DIFF_CONFIG.staleness_threshold_days;
5781
5785
  const now = Date.now();
5782
5786
  const staleSpecs = [];
@@ -5813,7 +5817,7 @@ async function runStatus(options = {}) {
5813
5817
  project: config.project?.name ?? "unknown",
5814
5818
  specFiles: specs.length,
5815
5819
  byStatus,
5816
- lintHealth: { errors, warnings, passing: specs.length - errors },
5820
+ lintHealth: { errors, warnings, passing },
5817
5821
  staleSpecs,
5818
5822
  integrityIssues,
5819
5823
  verdict
@@ -5838,6 +5842,15 @@ var status_default = defineCommand5({
5838
5842
  return;
5839
5843
  }
5840
5844
  if (format.format === "github") {
5845
+ const level = result.verdict === "errors" ? "error" : result.verdict === "healthy" ? "notice" : "warning";
5846
+ console.log(
5847
+ `::${level}::specdx status \u2014 ${result.project} \u2014 ${result.verdict}: ${result.specFiles} spec file(s), ${result.lintHealth.errors} error(s), ${result.lintHealth.warnings} warning(s)`
5848
+ );
5849
+ if (result.verdict === "unassessed") {
5850
+ console.log(
5851
+ "::warning::No specs resolved \u2014 nothing was assessed. Check the spec paths in spec.config.yaml."
5852
+ );
5853
+ }
5841
5854
  for (const s of result.staleSpecs) {
5842
5855
  console.log(
5843
5856
  `::warning::Spec "${s.specId}" is stale (${s.daysSinceUpdate} days since update)`