specdx 0.4.0 → 0.6.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.
- package/.claude-plugin/plugin.json +2 -2
- package/README.md +43 -3
- package/dist/{check-PHXXA7VY.js → check-5EA2MTNN.js} +121 -27
- package/dist/check-5EA2MTNN.js.map +1 -0
- package/dist/{chunk-3YXRWQGX.js → chunk-2UUQJ2ER.js} +242 -53
- package/dist/chunk-2UUQJ2ER.js.map +1 -0
- package/dist/{chunk-NAWYG4VV.js → chunk-5XOWCPP2.js} +2 -2
- package/dist/{chunk-2BZIG7OE.js → chunk-BZL2XXMA.js} +14 -14
- package/dist/{chunk-SNQNQ2MP.js → chunk-JGD3BOPH.js} +16 -6
- package/dist/chunk-JGD3BOPH.js.map +1 -0
- package/dist/{chunk-YRQPY5NF.js → chunk-MOYYF7Q6.js} +2 -2
- package/dist/{chunk-OVIKIIR4.js → chunk-QAJZCJUJ.js} +4 -3
- package/dist/chunk-QAJZCJUJ.js.map +1 -0
- package/dist/{chunk-LJTLNXGV.js → chunk-VVZUJ6H4.js} +353 -4
- package/dist/chunk-VVZUJ6H4.js.map +1 -0
- package/dist/{chunk-HCJDCS26.js → chunk-XRWLPU24.js} +10 -1
- package/dist/chunk-XRWLPU24.js.map +1 -0
- package/dist/{diff-6C5LJ7SH.js → diff-ZT6HXHK5.js} +4 -4
- package/dist/dist-6WDWUOCV.js +26 -0
- package/dist/{dist-PK52GA7M.js → dist-A3CWALDC.js} +76 -16
- package/dist/dist-A3CWALDC.js.map +1 -0
- package/dist/{generate-K72WD455.js → generate-M6YKXUDE.js} +5 -5
- package/dist/{generate-story-NUCNYL3I.js → generate-story-BXGNKWC6.js} +4 -4
- package/dist/{generate-test-plan-Z46W3N3B.js → generate-test-plan-PZUNCNN3.js} +3 -3
- package/dist/{graph-4RNURBNP.js → graph-GKXD2IGW.js} +3 -3
- package/dist/index.d.ts +38 -0
- package/dist/index.js +463 -26
- package/dist/index.js.map +1 -1
- package/dist/{lint-2VZPNLE3.js → lint-GZX5C5EQ.js} +93 -14
- package/dist/lint-GZX5C5EQ.js.map +1 -0
- package/dist/main.js +3 -3
- package/dist/{mcp-E6PJWBDQ.js → mcp-VQAYNJQ7.js} +3 -3
- package/dist/{migrate-FKFC7UAO.js → migrate-VASWPA3L.js} +3 -3
- package/dist/{pack-DE4UBTCC.js → pack-DFUCNWVR.js} +4 -4
- package/dist/{ready-K74SLQ24.js → ready-5OFSV2OD.js} +5 -5
- package/dist/{status-IAE3BB77.js → status-5MDODW4N.js} +5 -5
- package/dist/{update-UFOHZEAK.js → update-NFXC45UT.js} +4 -4
- package/dist/{validate-EZHUB5TW.js → validate-LWRLZR3H.js} +3 -3
- package/package.json +5 -4
- package/skills/core/specdx-author-spec/SKILL.md +33 -0
- package/skills/core/specdx-author-spec/references/spec-type-reference.md +57 -0
- package/skills/core/specdx-author-spec/references/step-01-frontmatter.md +66 -0
- package/skills/core/specdx-author-spec/references/step-02-sections.md +111 -0
- package/skills/core/specdx-author-spec/references/step-03-finalize.md +48 -0
- package/skills/core/specdx-onboard/SKILL.md +54 -0
- package/skills/core/specdx-plan-from-spec/SKILL.md +76 -0
- package/skills/core/specdx-pre-commit/SKILL.md +70 -0
- package/skills/core/specdx-review-spec/SKILL.md +81 -0
- package/skills/core/specdx-router/SKILL.md +67 -0
- package/skills/core/specdx-sprint-review/SKILL.md +73 -0
- package/skills/core/specdx-start-task/SKILL.md +62 -0
- package/skills/experimental/specdx-check-drift/SKILL.md +77 -0
- package/skills/experimental/specdx-verify/SKILL.md +85 -0
- package/dist/check-PHXXA7VY.js.map +0 -1
- package/dist/chunk-3YXRWQGX.js.map +0 -1
- package/dist/chunk-HCJDCS26.js.map +0 -1
- package/dist/chunk-LJTLNXGV.js.map +0 -1
- package/dist/chunk-OVIKIIR4.js.map +0 -1
- package/dist/chunk-SNQNQ2MP.js.map +0 -1
- package/dist/dist-PK52GA7M.js.map +0 -1
- package/dist/dist-ROHCFKYT.js +0 -16
- package/dist/lint-2VZPNLE3.js.map +0 -1
- /package/dist/{chunk-NAWYG4VV.js.map → chunk-5XOWCPP2.js.map} +0 -0
- /package/dist/{chunk-2BZIG7OE.js.map → chunk-BZL2XXMA.js.map} +0 -0
- /package/dist/{chunk-YRQPY5NF.js.map → chunk-MOYYF7Q6.js.map} +0 -0
- /package/dist/{diff-6C5LJ7SH.js.map → diff-ZT6HXHK5.js.map} +0 -0
- /package/dist/{dist-ROHCFKYT.js.map → dist-6WDWUOCV.js.map} +0 -0
- /package/dist/{generate-K72WD455.js.map → generate-M6YKXUDE.js.map} +0 -0
- /package/dist/{generate-story-NUCNYL3I.js.map → generate-story-BXGNKWC6.js.map} +0 -0
- /package/dist/{generate-test-plan-Z46W3N3B.js.map → generate-test-plan-PZUNCNN3.js.map} +0 -0
- /package/dist/{graph-4RNURBNP.js.map → graph-GKXD2IGW.js.map} +0 -0
- /package/dist/{mcp-E6PJWBDQ.js.map → mcp-VQAYNJQ7.js.map} +0 -0
- /package/dist/{migrate-FKFC7UAO.js.map → migrate-VASWPA3L.js.map} +0 -0
- /package/dist/{pack-DE4UBTCC.js.map → pack-DFUCNWVR.js.map} +0 -0
- /package/dist/{ready-K74SLQ24.js.map → ready-5OFSV2OD.js.map} +0 -0
- /package/dist/{status-IAE3BB77.js.map → status-5MDODW4N.js.map} +0 -0
- /package/dist/{update-UFOHZEAK.js.map → update-NFXC45UT.js.map} +0 -0
- /package/dist/{validate-EZHUB5TW.js.map → validate-LWRLZR3H.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../schema/src/types.ts","../../schema/src/sections.ts","../../schema/src/validator.ts","../../schema/dist/schemas/base-spec.json","../../schema/dist/schemas/config.json","../../schema/dist/schemas/prd.json","../../schema/dist/schemas/technical-design.json","../../schema/dist/schemas/user-story.json","../../schema/dist/schemas/test-plan.json","../../schema/dist/schemas/adr.json","../../schema/dist/schemas/api-contract.json","../../schema/dist/schemas/epic.json","../../schema/dist/schemas/quick-spec.json","../../schema/dist/schemas/project-context.json"],"sourcesContent":["/**\n * The `version` a `spec.config.yaml` is expected to declare.\n *\n * The field was accepted with any value at all, so `migrate` printed whatever\n * it read and then said \"no migration needed\" regardless -- a config claiming\n * `0.9` passed as readily as a current one. A version field nothing checks is\n * a field that cannot do its job when a real migration arrives.\n */\nexport const SUPPORTED_CONFIG_VERSION = \"1.0\";\n\nexport const SPEC_TYPES = [\n \"prd\",\n \"technical-design\",\n \"user-story\",\n \"test-plan\",\n \"adr\",\n \"api-contract\",\n \"epic\",\n \"quick-spec\",\n \"project-context\",\n] as const;\nexport type SpecType = (typeof SPEC_TYPES)[number];\n\nexport const SPEC_STATUSES = [\"draft\", \"review\", \"approved\", \"superseded\"] as const;\nexport type SpecStatus = (typeof SPEC_STATUSES)[number];\n\n/**\n * Every relationship kind a spec may declare in frontmatter `references`.\n * Single source of truth — `base-spec.json`'s enum is drift-tested against it.\n */\nexport const SPEC_RELATIONSHIPS = [\n \"implemented-by\",\n \"decomposed-into\",\n \"depends-on\",\n \"supersedes\",\n \"related-to\",\n] as const;\nexport type SpecRelationship = (typeof SPEC_RELATIONSHIPS)[number];\n\n/**\n * Which relationship kinds imply a build dependency, and in which direction.\n *\n * Structural kinds are deliberately absent: `decomposed-into` describes a\n * parent/child split and `supersedes` describes lineage — neither means the\n * target depends on the source (issue #13). Declared here rather than in\n * `@specdx/core` so the taxonomy is versioned with the schema it belongs to\n * (ADR: references/requires unification).\n */\nexport const DEPENDENCY_RELATIONSHIPS: Partial<\n Record<SpecRelationship, \"self-requires-target\" | \"target-requires-self\">\n> = {\n \"depends-on\": \"self-requires-target\",\n \"implemented-by\": \"target-requires-self\",\n};\n\nexport interface SpecReference {\n id: string;\n relationship: SpecRelationship;\n}\n\n/** A checkable implementation artifact declared by a spec (issue #15). */\nexport interface SpecArtifact {\n /** Project-root-relative file path that must exist. */\n path: string;\n /** Names that must be exported from the file. */\n exports?: string[];\n}\n\nexport interface BaseSpec {\n id: string;\n type: SpecType;\n title: string;\n status: SpecStatus;\n version: string;\n created: string;\n updated?: string;\n authors: string[];\n tags?: string[];\n references?: SpecReference[];\n artifacts?: SpecArtifact[];\n}\n\nexport interface PrdSpec extends BaseSpec {\n type: \"prd\";\n}\nexport interface TechnicalDesignSpec extends BaseSpec {\n type: \"technical-design\";\n}\nexport interface UserStorySpec extends BaseSpec {\n type: \"user-story\";\n story_id: string;\n priority: \"critical\" | \"high\" | \"medium\" | \"low\";\n estimate: string;\n}\nexport interface TestPlanSpec extends BaseSpec {\n type: \"test-plan\";\n}\nexport interface AdrSpec extends BaseSpec {\n type: \"adr\";\n}\nexport interface ApiContractSpec extends BaseSpec {\n type: \"api-contract\";\n}\n\nexport interface EpicSpec extends BaseSpec {\n type: \"epic\";\n epic_id: string;\n priority: \"critical\" | \"high\" | \"medium\" | \"low\";\n}\n\nexport interface QuickSpecSpec extends BaseSpec {\n type: \"quick-spec\";\n}\n\nexport interface ProjectContextSpec extends BaseSpec {\n type: \"project-context\";\n}\n\nexport type Spec =\n | PrdSpec\n | TechnicalDesignSpec\n | UserStorySpec\n | TestPlanSpec\n | AdrSpec\n | ApiContractSpec\n | EpicSpec\n | QuickSpecSpec\n | ProjectContextSpec;\n\nexport interface SpecEntry {\n path: string;\n type: SpecType;\n required?: boolean;\n requires?: string[];\n owner?: string;\n}\n\nexport interface PackCompressionConfig {\n strip_boilerplate?: boolean;\n stable_days?: number;\n collapse_resolved_adrs?: boolean;\n}\n\nexport interface PackConfig {\n max_tokens?: number;\n format?: \"xml\" | \"markdown\" | \"json\";\n compression?: PackCompressionConfig;\n boilerplate_sections?: string[];\n}\n\nexport interface SdxConfig {\n version: string;\n project?: { name?: string; description?: string };\n specs: Record<string, SpecEntry>;\n lint?: {\n extends?: string;\n rules?: Record<string, unknown>;\n ignore?: string[];\n };\n pack?: PackConfig;\n diff?: {\n baseline_ref?: string;\n staleness_threshold_days?: number;\n ignore_paths?: string[];\n };\n ci?: {\n block_on?: (\"error\" | \"warn\" | \"info\")[];\n post_comment?: boolean;\n update_badge?: boolean;\n trigger_paths?: string[];\n };\n check?: {\n framework?: \"auto\" | \"express\" | \"hono\" | \"nextjs\";\n routes_dir?: string;\n app_dir?: string;\n types_dir?: string;\n tests_dir?: string;\n ignore?: string[];\n };\n /**\n * Linting for agent instruction files — AGENTS.md, CLAUDE.md and friends.\n *\n * These are not specs and never become `ParsedSpec`: they carry no\n * frontmatter, they are absent from `specs`, and they never enter the\n * dependency graph. See `specs/adr/2026-08-11-linting-formats-we-do-not-own.md`.\n *\n * Presence of this key is what turns the feature on. Auto-discovering\n * AGENTS.md would add diagnostics to every existing suite on upgrade, and\n * `strict` would promote them to errors and break pipelines that never asked\n * for this.\n */\n agents?: {\n /** Globs, relative to the config directory. Defaults to AGENTS.md and CLAUDE.md. */\n paths?: string[];\n /** Ceiling for a single agent file, counted with the same tokenizer `pack` uses. */\n max_tokens?: number;\n /** Per-rule severity overrides, keyed by full rule id (`agents/size-budget`). */\n rules?: Record<string, unknown>;\n };\n}\n","import type { SpecType } from \"./types.js\";\n\nexport const REQUIRED_SECTIONS: Record<SpecType, string[]> = {\n prd: [\"Problem Statement\", \"Goals\", \"Non-Goals\", \"Features\", \"Success Criteria\"],\n \"technical-design\": [\n \"Overview\",\n \"Architecture\",\n \"Data Model\",\n \"API Design\",\n \"Dependencies\",\n \"Risks\",\n \"Open Questions\",\n ],\n \"user-story\": [\"Description\", \"Acceptance Criteria\", \"Dependencies\", \"Notes\"],\n \"test-plan\": [\"Scope\", \"Test Cases\", \"Coverage Matrix\", \"Edge Cases\"],\n adr: [\"Context\", \"Decision\", \"Status\", \"Consequences\"],\n \"api-contract\": [\"Endpoints\", \"Request/Response Schemas\", \"Auth\", \"Error Codes\"],\n epic: [\"Overview\", \"Stories\", \"Acceptance Criteria\", \"Dependencies\"],\n \"quick-spec\": [\"Intent\", \"Boundaries\", \"Tasks\"],\n \"project-context\": [\"Technology Stack\", \"Critical Implementation Rules\", \"Coding Patterns\"],\n};\n","import { Ajv as AjvClass, type ErrorObject } from \"ajv\";\nimport { SPEC_TYPES, type SpecType } from \"./types.js\";\n\nimport baseSpecSchema from \"./schemas/base-spec.json\" with { type: \"json\" };\nimport configSchema from \"./schemas/config.json\" with { type: \"json\" };\nimport prdSchema from \"./schemas/prd.json\" with { type: \"json\" };\nimport technicalDesignSchema from \"./schemas/technical-design.json\" with { type: \"json\" };\nimport userStorySchema from \"./schemas/user-story.json\" with { type: \"json\" };\nimport testPlanSchema from \"./schemas/test-plan.json\" with { type: \"json\" };\nimport adrSchema from \"./schemas/adr.json\" with { type: \"json\" };\nimport apiContractSchema from \"./schemas/api-contract.json\" with { type: \"json\" };\nimport epicSchema from \"./schemas/epic.json\" with { type: \"json\" };\nimport quickSpecSchema from \"./schemas/quick-spec.json\" with { type: \"json\" };\nimport projectContextSchema from \"./schemas/project-context.json\" with { type: \"json\" };\n\n// addFormats is CJS-only; access via the namespace default at runtime\n// The type cast is needed because TypeScript's NodeNext resolution exposes\n// the CJS module as a namespace without a callable default signature.\nimport * as addFormatsNs from \"ajv-formats\";\ntype AddFormatsPlugin = (ajv: AjvClass, formats?: unknown) => AjvClass;\nconst addFormats = ((addFormatsNs as unknown as { default?: AddFormatsPlugin }).default ??\n (addFormatsNs as unknown as AddFormatsPlugin)) as AddFormatsPlugin;\n\nexport interface ValidationResult {\n valid: boolean;\n errors: ErrorObject[] | null;\n}\n\n// The JSON schemas duplicate the spec-type enum for editor and schema-store\n// consumers. At runtime SPEC_TYPES is the single source of truth: the enums are\n// overwritten before compilation so the JSON copies can never drift from the\n// TypeScript types (see issue #2 — a stale enum shipped in 0.4.0-alpha.2).\nconst runtimeBaseSpecSchema = structuredClone(baseSpecSchema);\nruntimeBaseSpecSchema.properties.type.enum = [...SPEC_TYPES];\nconst runtimeConfigSchema = structuredClone(configSchema);\nruntimeConfigSchema.properties.specs.additionalProperties.properties.type.enum = [...SPEC_TYPES];\n\nconst ajv = new AjvClass({ allErrors: true, strict: true });\naddFormats(ajv, [\"date\"]);\najv.addSchema(runtimeBaseSpecSchema);\n\nconst specValidators: Record<string, ReturnType<typeof ajv.compile>> = {\n prd: ajv.compile(prdSchema),\n \"technical-design\": ajv.compile(technicalDesignSchema),\n \"user-story\": ajv.compile(userStorySchema),\n \"test-plan\": ajv.compile(testPlanSchema),\n adr: ajv.compile(adrSchema),\n \"api-contract\": ajv.compile(apiContractSchema),\n epic: ajv.compile(epicSchema),\n \"quick-spec\": ajv.compile(quickSpecSchema),\n \"project-context\": ajv.compile(projectContextSchema),\n};\n\nconst configValidator = ajv.compile(runtimeConfigSchema);\n\nexport function validateSpec(type: SpecType, data: Record<string, unknown>): ValidationResult {\n const validate = specValidators[type];\n if (!validate) {\n return { valid: false, errors: [{ message: `Unknown spec type: \"${type}\"` } as ErrorObject] };\n }\n const valid = validate(data);\n return { valid: !!valid, errors: valid ? null : (validate.errors ?? null) };\n}\n\nexport function validateConfig(data: Record<string, unknown>): ValidationResult {\n const valid = configValidator(data);\n return { valid: !!valid, errors: valid ? null : (configValidator.errors ?? null) };\n}\n","{\n \"$id\": \"base-spec\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\n \"prd\",\n \"technical-design\",\n \"user-story\",\n \"test-plan\",\n \"adr\",\n \"api-contract\",\n \"epic\",\n \"quick-spec\",\n \"project-context\"\n ]\n },\n \"title\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"draft\",\n \"review\",\n \"approved\",\n \"superseded\"\n ]\n },\n \"version\": {\n \"type\": \"string\"\n },\n \"created\": {\n \"type\": \"string\",\n \"format\": \"date\"\n },\n \"updated\": {\n \"type\": \"string\",\n \"format\": \"date\"\n },\n \"authors\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"minItems\": 1\n },\n \"tags\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"default\": []\n },\n \"references\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"relationship\": {\n \"type\": \"string\",\n \"enum\": [\n \"implemented-by\",\n \"decomposed-into\",\n \"depends-on\",\n \"supersedes\",\n \"related-to\"\n ]\n }\n },\n \"required\": [\n \"id\",\n \"relationship\"\n ],\n \"additionalProperties\": false\n },\n \"default\": []\n },\n \"artifacts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"exports\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"required\": [\n \"path\"\n ],\n \"additionalProperties\": false\n },\n \"default\": []\n }\n },\n \"required\": [\n \"id\",\n \"type\",\n \"title\",\n \"status\",\n \"version\",\n \"created\",\n \"authors\"\n ],\n \"additionalProperties\": true\n}\n","{\n \"$id\": \"specdx-config\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"type\": \"object\",\n \"properties\": {\n \"version\": { \"type\": \"string\" },\n \"project\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" }\n },\n \"additionalProperties\": false\n },\n \"specs\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"object\",\n \"properties\": {\n \"path\": { \"type\": \"string\" },\n \"type\": { \"type\": \"string\", \"enum\": [\"prd\", \"technical-design\", \"user-story\", \"test-plan\", \"adr\", \"api-contract\", \"epic\", \"quick-spec\", \"project-context\"] },\n \"required\": { \"type\": \"boolean\", \"default\": false },\n \"requires\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n \"owner\": { \"type\": \"string\" }\n },\n \"required\": [\"path\", \"type\"],\n \"additionalProperties\": false\n }\n },\n \"lint\": {\n \"type\": \"object\",\n \"properties\": {\n \"extends\": { \"type\": \"string\" },\n \"rules\": { \"type\": \"object\" },\n \"ignore\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } }\n },\n \"additionalProperties\": false\n },\n \"pack\": {\n \"type\": \"object\",\n \"properties\": {\n \"max_tokens\": { \"type\": \"integer\", \"minimum\": 1 },\n \"format\": { \"type\": \"string\", \"enum\": [\"xml\", \"markdown\", \"json\"] },\n \"compression\": {\n \"type\": \"object\",\n \"properties\": {\n \"strip_boilerplate\": { \"type\": \"boolean\" },\n \"stable_days\": { \"type\": \"integer\", \"minimum\": 0 },\n \"collapse_resolved_adrs\": { \"type\": \"boolean\" }\n },\n \"additionalProperties\": false\n },\n \"boilerplate_sections\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n },\n \"additionalProperties\": false\n },\n \"diff\": {\n \"type\": \"object\",\n \"properties\": {\n \"baseline_ref\": { \"type\": \"string\", \"default\": \"main\" },\n \"staleness_threshold_days\": { \"type\": \"integer\", \"minimum\": 1, \"default\": 14 },\n \"ignore_paths\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } }\n },\n \"additionalProperties\": false\n },\n \"ci\": {\n \"type\": \"object\",\n \"properties\": {\n \"block_on\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\", \"enum\": [\"error\", \"warn\", \"info\"] }\n },\n \"post_comment\": { \"type\": \"boolean\", \"default\": true },\n \"update_badge\": { \"type\": \"boolean\", \"default\": true },\n \"trigger_paths\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n },\n \"additionalProperties\": false\n },\n \"check\": {\n \"type\": \"object\",\n \"properties\": {\n \"framework\": {\n \"type\": \"string\",\n \"enum\": [\"auto\", \"express\", \"hono\", \"nextjs\"]\n },\n \"routes_dir\": { \"type\": \"string\" },\n \"app_dir\": { \"type\": \"string\" },\n \"types_dir\": { \"type\": \"string\" },\n \"tests_dir\": { \"type\": \"string\" },\n \"ignore\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n },\n \"additionalProperties\": false\n },\n \"agents\": {\n \"type\": \"object\",\n \"properties\": {\n \"paths\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } },\n \"max_tokens\": { \"type\": \"integer\", \"minimum\": 1 },\n \"rules\": { \"type\": \"object\" }\n },\n \"additionalProperties\": false\n }\n },\n \"required\": [\"version\", \"specs\"],\n \"additionalProperties\": false\n}\n","{\n \"$id\": \"prd\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"allOf\": [\n { \"$ref\": \"base-spec\" },\n { \"type\": \"object\", \"properties\": { \"type\": { \"const\": \"prd\" } }, \"required\": [\"type\"] }\n ]\n}\n","{\n \"$id\": \"technical-design\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"allOf\": [\n { \"$ref\": \"base-spec\" },\n { \"type\": \"object\", \"properties\": { \"type\": { \"const\": \"technical-design\" } }, \"required\": [\"type\"] }\n ]\n}\n","{\n \"$id\": \"user-story\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"allOf\": [\n { \"$ref\": \"base-spec\" },\n {\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"user-story\" },\n \"story_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"priority\": { \"type\": \"string\", \"enum\": [\"critical\", \"high\", \"medium\", \"low\"] },\n \"estimate\": { \"type\": \"string\" }\n },\n \"required\": [\"type\", \"story_id\", \"priority\", \"estimate\"]\n }\n ]\n}\n","{\n \"$id\": \"test-plan\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"allOf\": [\n { \"$ref\": \"base-spec\" },\n { \"type\": \"object\", \"properties\": { \"type\": { \"const\": \"test-plan\" } }, \"required\": [\"type\"] }\n ]\n}\n","{\n \"$id\": \"adr\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"allOf\": [\n { \"$ref\": \"base-spec\" },\n { \"type\": \"object\", \"properties\": { \"type\": { \"const\": \"adr\" } }, \"required\": [\"type\"] }\n ]\n}\n","{\n \"$id\": \"api-contract\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"allOf\": [\n { \"$ref\": \"base-spec\" },\n { \"type\": \"object\", \"properties\": { \"type\": { \"const\": \"api-contract\" } }, \"required\": [\"type\"] }\n ]\n}\n","{\n \"$id\": \"epic\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"allOf\": [\n { \"$ref\": \"base-spec\" },\n {\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"epic\" },\n \"epic_id\": { \"type\": \"string\", \"minLength\": 1 },\n \"priority\": { \"type\": \"string\", \"enum\": [\"critical\", \"high\", \"medium\", \"low\"] }\n },\n \"required\": [\"type\", \"epic_id\", \"priority\"]\n }\n ]\n}\n","{\n \"$id\": \"quick-spec\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"allOf\": [\n { \"$ref\": \"base-spec\" },\n {\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"quick-spec\" }\n },\n \"required\": [\"type\"]\n }\n ]\n}\n","{\n \"$id\": \"project-context\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"allOf\": [\n { \"$ref\": \"base-spec\" },\n {\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"project-context\" }\n },\n \"required\": [\"type\"]\n }\n ]\n}\n"],"mappings":";AAQO,IAAM,2BAA2B;AAEjC,IAAM,aAAa;EACxB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA6BK,IAAM,2BAET;EACF,cAAc;EACd,kBAAkB;;;;AClDb,IAAM,oBAAgD;EAC3D,KAAK,CAAC,qBAAqB,SAAS,aAAa,YAAY,kBAAkB;EAC/E,oBAAoB;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;;EAEF,cAAc,CAAC,eAAe,uBAAuB,gBAAgB,OAAO;EAC5E,aAAa,CAAC,SAAS,cAAc,mBA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,gBAAgB,UAAU,KAAK;AAClF;","names":[]}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DEFAULT_DIFF_CONFIG,
|
|
3
3
|
DiffError,
|
|
4
4
|
diffBetweenRefs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5XOWCPP2.js";
|
|
6
6
|
import {
|
|
7
7
|
createOutput
|
|
8
8
|
} from "./chunk-NHD44ZYN.js";
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
} from "./chunk-DMGABJ6T.js";
|
|
13
13
|
import {
|
|
14
14
|
loadConfig
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-JGD3BOPH.js";
|
|
16
|
+
import "./chunk-XRWLPU24.js";
|
|
17
17
|
import "./chunk-5WRI5ZAA.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/core/diff.ts
|
|
@@ -197,4 +197,4 @@ export {
|
|
|
197
197
|
diff_default as default,
|
|
198
198
|
runDiff
|
|
199
199
|
};
|
|
200
|
-
//# sourceMappingURL=diff-
|
|
200
|
+
//# sourceMappingURL=diff-ZT6HXHK5.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
analyzeWithAi,
|
|
3
|
+
applyBaseline,
|
|
4
|
+
checkArtifacts,
|
|
5
|
+
createBaseline,
|
|
6
|
+
detectFramework,
|
|
7
|
+
fingerprint,
|
|
8
|
+
parseArtifacts,
|
|
9
|
+
parseBaseline,
|
|
10
|
+
runCheck,
|
|
11
|
+
serializeBaseline
|
|
12
|
+
} from "./chunk-2UUQJ2ER.js";
|
|
13
|
+
import "./chunk-5WRI5ZAA.js";
|
|
14
|
+
export {
|
|
15
|
+
analyzeWithAi,
|
|
16
|
+
applyBaseline,
|
|
17
|
+
checkArtifacts,
|
|
18
|
+
createBaseline,
|
|
19
|
+
detectFramework,
|
|
20
|
+
fingerprint,
|
|
21
|
+
parseArtifacts,
|
|
22
|
+
parseBaseline,
|
|
23
|
+
runCheck,
|
|
24
|
+
serializeBaseline
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=dist-6WDWUOCV.js.map
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runCheck
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2UUQJ2ER.js";
|
|
4
4
|
import {
|
|
5
5
|
pack
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MOYYF7Q6.js";
|
|
7
7
|
import {
|
|
8
8
|
createLintEngine,
|
|
9
|
+
lintAgentFiles,
|
|
10
|
+
lintAgentFilesWithoutConfig,
|
|
9
11
|
resolveLintConfig
|
|
10
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VVZUJ6H4.js";
|
|
11
13
|
import {
|
|
12
14
|
DEFAULT_DIFF_CONFIG,
|
|
13
15
|
DiffError,
|
|
14
16
|
diffBetweenRefs
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5XOWCPP2.js";
|
|
16
18
|
import {
|
|
17
19
|
ConfigError,
|
|
18
20
|
GraphError,
|
|
19
21
|
buildGraph,
|
|
20
22
|
collectReferenceEdges,
|
|
23
|
+
findConfig,
|
|
21
24
|
findUnreflectedReferences,
|
|
22
25
|
loadConfig,
|
|
23
26
|
parseSpec,
|
|
24
27
|
resolveGlob
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-JGD3BOPH.js";
|
|
29
|
+
import "./chunk-XRWLPU24.js";
|
|
27
30
|
import "./chunk-5WRI5ZAA.js";
|
|
28
31
|
|
|
29
32
|
// ../mcp/dist/server.js
|
|
@@ -60,7 +63,25 @@ async function handleValidate(params) {
|
|
|
60
63
|
// ../mcp/dist/tools/lint.js
|
|
61
64
|
async function handleLint(params) {
|
|
62
65
|
const configDir = process.cwd();
|
|
63
|
-
const
|
|
66
|
+
const configPath = await findConfig(configDir);
|
|
67
|
+
if (!configPath) {
|
|
68
|
+
if (params.specPath) {
|
|
69
|
+
throw new Error(`No spec.config.yaml at or above this directory, so "${params.specPath}" was not linted as a spec. Call sdx_lint with no specPath to lint AGENTS.md and CLAUDE.md, or run \`specdx init\` to add a spec suite.`);
|
|
70
|
+
}
|
|
71
|
+
const agentResults = await lintAgentFilesWithoutConfig(configDir);
|
|
72
|
+
if (agentResults) {
|
|
73
|
+
return JSON.stringify({
|
|
74
|
+
diagnostics: agentResults.diagnostics,
|
|
75
|
+
hasErrors: agentResults.diagnostics.some((d) => d.severity === "error"),
|
|
76
|
+
hasWarnings: agentResults.diagnostics.some((d) => d.severity === "warn"),
|
|
77
|
+
specsChecked: 0,
|
|
78
|
+
assessed: false,
|
|
79
|
+
specSuite: false,
|
|
80
|
+
agentFilesChecked: agentResults.filesLinted
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const config = await loadConfig(configPath, configDir);
|
|
64
85
|
const preset = params.preset ?? config.lint?.extends ?? "recommended";
|
|
65
86
|
const { rules, ignore } = await resolveLintConfig({
|
|
66
87
|
config,
|
|
@@ -71,8 +92,6 @@ async function handleLint(params) {
|
|
|
71
92
|
for (const [, entry] of Object.entries(config.specs)) {
|
|
72
93
|
const files = await resolveGlob(entry.path, configDir);
|
|
73
94
|
for (const file of files) {
|
|
74
|
-
if (params.specPath && !file.includes(params.specPath))
|
|
75
|
-
continue;
|
|
76
95
|
specs.push(await parseSpec(file));
|
|
77
96
|
}
|
|
78
97
|
}
|
|
@@ -83,11 +102,51 @@ async function handleLint(params) {
|
|
|
83
102
|
}
|
|
84
103
|
const engine = createLintEngine({ rules, config, graph, ignore });
|
|
85
104
|
const results = engine.lint(specs);
|
|
105
|
+
const { specPath } = params;
|
|
106
|
+
const selects = (filePath) => specPath === void 0 || filePath.includes(specPath);
|
|
107
|
+
let diagnostics = results.diagnostics;
|
|
108
|
+
let { hasErrors, hasWarnings } = results;
|
|
109
|
+
if (specPath !== void 0) {
|
|
110
|
+
diagnostics = diagnostics.filter((d) => selects(d.filePath));
|
|
111
|
+
hasErrors = diagnostics.some((d) => d.severity === "error");
|
|
112
|
+
hasWarnings = diagnostics.some((d) => d.severity === "warn");
|
|
113
|
+
}
|
|
114
|
+
let agentFiles = 0;
|
|
115
|
+
if (config.agents) {
|
|
116
|
+
const agentResults = await lintAgentFiles({ config, configDir });
|
|
117
|
+
agentFiles = agentResults.filesLinted;
|
|
118
|
+
diagnostics = [...diagnostics];
|
|
119
|
+
if (!agentResults.assessed) {
|
|
120
|
+
const patterns = config.agents.paths ?? ["AGENTS.md", "CLAUDE.md"];
|
|
121
|
+
diagnostics.push({
|
|
122
|
+
ruleId: "agents/paths-match-nothing",
|
|
123
|
+
severity: "error",
|
|
124
|
+
message: `agents.paths matched no files (${patterns.join(", ")}), so no agent instruction file was linted. Remove the \`agents\` key or fix the paths.`,
|
|
125
|
+
filePath: "spec.config.yaml"
|
|
126
|
+
});
|
|
127
|
+
hasErrors = true;
|
|
128
|
+
}
|
|
129
|
+
for (const diagnostic of agentResults.diagnostics) {
|
|
130
|
+
if (!selects(diagnostic.filePath))
|
|
131
|
+
continue;
|
|
132
|
+
diagnostics.push(diagnostic);
|
|
133
|
+
if (diagnostic.severity === "error")
|
|
134
|
+
hasErrors = true;
|
|
135
|
+
if (diagnostic.severity === "warn")
|
|
136
|
+
hasWarnings = true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const ignored = new Set(ignore);
|
|
140
|
+
const linted = specs.filter((spec) => !ignored.has(spec.filePath) && selects(spec.filePath));
|
|
86
141
|
return JSON.stringify({
|
|
87
|
-
diagnostics
|
|
88
|
-
hasErrors
|
|
89
|
-
hasWarnings
|
|
90
|
-
specsChecked:
|
|
142
|
+
diagnostics,
|
|
143
|
+
hasErrors,
|
|
144
|
+
hasWarnings,
|
|
145
|
+
specsChecked: linted.length,
|
|
146
|
+
// False when nothing was selected — "no diagnostics" is then not a pass.
|
|
147
|
+
assessed: linted.length > 0,
|
|
148
|
+
specSuite: true,
|
|
149
|
+
agentFilesChecked: agentFiles
|
|
91
150
|
});
|
|
92
151
|
}
|
|
93
152
|
|
|
@@ -286,9 +345,9 @@ function createMcpServer(version = "0.0.0-unknown") {
|
|
|
286
345
|
server.tool("sdx_validate", "Validate the spec.config.yaml configuration file", { configPath: z.string().optional().describe("Path to config directory") }, async (params) => ({
|
|
287
346
|
content: [{ type: "text", text: await handleValidate(params) }]
|
|
288
347
|
}));
|
|
289
|
-
server.tool("sdx_lint", "Run lint rules against the spec suite", {
|
|
348
|
+
server.tool("sdx_lint", "Run lint rules against the spec suite, or against AGENTS.md and CLAUDE.md alone when there is no spec.config.yaml. Check `specSuite` in the result to tell the two apart.", {
|
|
290
349
|
preset: z.string().optional().describe("Lint preset: minimal, recommended, strict"),
|
|
291
|
-
specPath: z.string().optional().describe("Lint a specific spec file")
|
|
350
|
+
specPath: z.string().optional().describe("Lint a specific spec file. Requires a spec suite; errors when there is none.")
|
|
292
351
|
}, async (params) => ({
|
|
293
352
|
content: [{ type: "text", text: await handleLint(params) }]
|
|
294
353
|
}));
|
|
@@ -324,6 +383,7 @@ function createMcpServer(version = "0.0.0-unknown") {
|
|
|
324
383
|
}
|
|
325
384
|
export {
|
|
326
385
|
createMcpServer,
|
|
386
|
+
handleLint,
|
|
327
387
|
handleStatus
|
|
328
388
|
};
|
|
329
|
-
//# sourceMappingURL=dist-
|
|
389
|
+
//# sourceMappingURL=dist-A3CWALDC.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, or against AGENTS.md and CLAUDE.md alone when there is no spec.config.yaml. Check `specSuite` in the result to tell the two apart.\",\n {\n preset: z.string().optional().describe(\"Lint preset: minimal, recommended, strict\"),\n specPath: z\n .string()\n .optional()\n .describe(\"Lint a specific spec file. Requires a spec suite; errors when there is none.\"),\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, findConfig, parseSpec, resolveGlob, buildGraph } from \"@specdx/core\";\nimport {\n createLintEngine,\n resolveLintConfig,\n lintAgentFiles,\n lintAgentFilesWithoutConfig,\n} from \"@specdx/lint\";\nimport type { ParsedSpec } from \"@specdx/core\";\nimport type { Diagnostic } from \"@specdx/lint\";\n\n/**\n * `sdx_lint` is a near-copy of `runLint`, not a caller of it — the CLI depends\n * on this package, so the dependency cannot run the other way. See\n * `packages/cli/src/lint-parity.test.ts`, which pins the two together.\n *\n * Two divergences were fixed here, both found while dogfooding on 2026-08-11:\n *\n * 1. `specPath` filtered the specs *before* linting, so a single-file lint had\n * no sight of the rest of the suite and cross-reference rules could not\n * fire. The CLI has always linted the whole suite and filtered the\n * resulting diagnostics; that is the correct behaviour and this now matches.\n * 2. A `specPath` matching no spec returned `hasErrors: false` with no signal\n * that nothing had been assessed, which reads to a caller as a clean pass.\n */\nexport async function handleLint(params: { preset?: string; specPath?: string }): Promise<string> {\n const configDir = process.cwd();\n\n // No spec suite: lint the agent instruction files alone, through the same\n // shared helper the CLI uses. Only genuine absence degrades — a malformed\n // config still throws, or a YAML typo would read as a narrower pass.\n const configPath = await findConfig(configDir);\n if (!configPath) {\n // Same refusal as the CLI. An agent that asked for one spec file must not\n // be handed `hasErrors: false` for agent files it never asked about — it\n // reads that as \"the file you named is clean\".\n if (params.specPath) {\n throw new Error(\n `No spec.config.yaml at or above this directory, so \"${params.specPath}\" was not linted as a spec. ` +\n `Call sdx_lint with no specPath to lint AGENTS.md and CLAUDE.md, or run \\`specdx init\\` to add a spec suite.`,\n );\n }\n const agentResults = await lintAgentFilesWithoutConfig(configDir);\n if (agentResults) {\n return JSON.stringify({\n diagnostics: agentResults.diagnostics,\n hasErrors: agentResults.diagnostics.some((d) => d.severity === \"error\"),\n hasWarnings: agentResults.diagnostics.some((d) => d.severity === \"warn\"),\n specsChecked: 0,\n assessed: false,\n specSuite: false,\n agentFilesChecked: agentResults.filesLinted,\n });\n }\n }\n\n // The path `findConfig` already resolved, so `loadConfig` does not walk the\n // tree again. Undefined only on the no-config-no-agent-file path, where\n // `loadConfig` throws the \"Run 'specdx init'\" error the CLI throws too.\n const config = await loadConfig(configPath, configDir);\n const preset = params.preset ?? config.lint?.extends ?? \"recommended\";\n const { rules, ignore } = await resolveLintConfig({\n config,\n preset: preset,\n configDir,\n });\n\n // Always parse the full suite so cross-reference rules have complete\n // context; a single-file lint filters the *diagnostics*, not the suite.\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 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, ignore });\n const results = engine.lint(specs);\n\n // One definition of \"does specPath select this file\", shared by the\n // diagnostic filter, the agent diagnostics below, and the assessed count, so\n // none of the three can disagree.\n const { specPath } = params;\n const selects = (filePath: string) => specPath === undefined || filePath.includes(specPath);\n\n let diagnostics: Diagnostic[] = results.diagnostics;\n let { hasErrors, hasWarnings } = results;\n if (specPath !== undefined) {\n diagnostics = diagnostics.filter((d) => selects(d.filePath));\n hasErrors = diagnostics.some((d) => d.severity === \"error\");\n hasWarnings = diagnostics.some((d) => d.severity === \"warn\");\n }\n\n // Agent instruction files, opt-in via the `agents` key. Kept in step with the\n // CLI deliberately: this tool duplicates `runLint` rather than calling it, and\n // that duplication has already shipped a divergence twice.\n //\n // Runs after the spec filter above, because it appends to the already-filtered\n // diagnostics — appending first and filtering after would drop agent findings\n // whenever `specPath` names a spec.\n let agentFiles = 0;\n if (config.agents) {\n const agentResults = await lintAgentFiles({ config, configDir });\n agentFiles = agentResults.filesLinted;\n diagnostics = [...diagnostics];\n\n if (!agentResults.assessed) {\n const patterns = config.agents.paths ?? [\"AGENTS.md\", \"CLAUDE.md\"];\n diagnostics.push({\n ruleId: \"agents/paths-match-nothing\",\n severity: \"error\",\n message: `agents.paths matched no files (${patterns.join(\", \")}), so no agent instruction file was linted. Remove the \\`agents\\` key or fix the paths.`,\n filePath: \"spec.config.yaml\",\n });\n hasErrors = true;\n }\n\n for (const diagnostic of agentResults.diagnostics) {\n if (!selects(diagnostic.filePath)) continue;\n diagnostics.push(diagnostic);\n if (diagnostic.severity === \"error\") hasErrors = true;\n if (diagnostic.severity === \"warn\") hasWarnings = true;\n }\n }\n\n const ignored = new Set(ignore);\n const linted = specs.filter((spec) => !ignored.has(spec.filePath) && selects(spec.filePath));\n\n return JSON.stringify({\n diagnostics,\n hasErrors,\n hasWarnings,\n specsChecked: linted.length,\n // False when nothing was selected — \"no diagnostics\" is then not a pass.\n assessed: linted.length > 0,\n specSuite: true,\n agentFilesChecked: agentFiles,\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, resolveLintConfig } 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, ignore } = await resolveLintConfig({\n config,\n preset: presetName,\n configDir,\n });\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, ignore });\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,iBAAiB;AAC1B,SAAS,SAAS;;;ACClB,eAAsB,eAAe,QAA+B;AAClE,MAAI;AACF,UAAM,YAAY,OAAO,cAAc,QAAQ,IAAG;AAClD,UAAM,SAAS,MAAM,WAAW,QAAW,SAAS;AAEpD,eAAW,MAAM;AAIjB,QAAI,YAAY;AAChB,eAAW,SAAS,OAAO,OAAO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S,CAAC,EAAE,MAAM,QAAiB,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,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
labelled
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-BZL2XXMA.js";
|
|
4
|
+
import "./chunk-XRWLPU24.js";
|
|
5
5
|
import "./chunk-5WRI5ZAA.js";
|
|
6
6
|
|
|
7
7
|
// src/commands/core/generate.ts
|
|
@@ -9,8 +9,8 @@ import { defineCommand } from "citty";
|
|
|
9
9
|
var generate_default = defineCommand({
|
|
10
10
|
meta: { name: "generate", description: "Generate spec stubs from existing specs" },
|
|
11
11
|
subCommands: {
|
|
12
|
-
story: () => import("./generate-story-
|
|
13
|
-
"test-plan": () => import("./generate-test-plan-
|
|
12
|
+
story: () => import("./generate-story-BXGNKWC6.js").then((m) => labelled("generate story", m.default)),
|
|
13
|
+
"test-plan": () => import("./generate-test-plan-PZUNCNN3.js").then(
|
|
14
14
|
(m) => labelled("generate test-plan", m.default)
|
|
15
15
|
)
|
|
16
16
|
}
|
|
@@ -18,4 +18,4 @@ var generate_default = defineCommand({
|
|
|
18
18
|
export {
|
|
19
19
|
generate_default as default
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=generate-
|
|
21
|
+
//# sourceMappingURL=generate-M6YKXUDE.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFeatureEntries,
|
|
3
3
|
uncoveredFeatures
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VVZUJ6H4.js";
|
|
5
5
|
import {
|
|
6
6
|
createLogger,
|
|
7
7
|
loadConfig,
|
|
8
8
|
parseSpec,
|
|
9
9
|
resolveGlob
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JGD3BOPH.js";
|
|
11
11
|
import {
|
|
12
12
|
REQUIRED_SECTIONS
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XRWLPU24.js";
|
|
14
14
|
import "./chunk-5WRI5ZAA.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/core/generate-story.ts
|
|
@@ -217,4 +217,4 @@ export {
|
|
|
217
217
|
defineCommandExport,
|
|
218
218
|
generateStories
|
|
219
219
|
};
|
|
220
|
-
//# sourceMappingURL=generate-story-
|
|
220
|
+
//# sourceMappingURL=generate-story-BXGNKWC6.js.map
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
loadConfig,
|
|
4
4
|
parseSpec,
|
|
5
5
|
resolveGlob
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-JGD3BOPH.js";
|
|
7
|
+
import "./chunk-XRWLPU24.js";
|
|
8
8
|
import "./chunk-5WRI5ZAA.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/experimental/generate-test-plan.ts
|
|
@@ -206,4 +206,4 @@ export {
|
|
|
206
206
|
generateTestPlan,
|
|
207
207
|
registeredKeyFor
|
|
208
208
|
};
|
|
209
|
-
//# sourceMappingURL=generate-test-plan-
|
|
209
|
+
//# sourceMappingURL=generate-test-plan-PZUNCNN3.js.map
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
loadConfig,
|
|
14
14
|
parseSpec,
|
|
15
15
|
resolveGlob
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-JGD3BOPH.js";
|
|
17
|
+
import "./chunk-XRWLPU24.js";
|
|
18
18
|
import "./chunk-5WRI5ZAA.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/core/graph.ts
|
|
@@ -137,4 +137,4 @@ var graph_default = defineCommand({
|
|
|
137
137
|
export {
|
|
138
138
|
graph_default as default
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=graph-
|
|
140
|
+
//# sourceMappingURL=graph-GKXD2IGW.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -58,6 +58,26 @@ interface SdxConfig {
|
|
|
58
58
|
tests_dir?: string;
|
|
59
59
|
ignore?: string[];
|
|
60
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* Linting for agent instruction files — AGENTS.md, CLAUDE.md and friends.
|
|
63
|
+
*
|
|
64
|
+
* These are not specs and never become `ParsedSpec`: they carry no
|
|
65
|
+
* frontmatter, they are absent from `specs`, and they never enter the
|
|
66
|
+
* dependency graph. See `specs/adr/2026-08-11-linting-formats-we-do-not-own.md`.
|
|
67
|
+
*
|
|
68
|
+
* Presence of this key is what turns the feature on. Auto-discovering
|
|
69
|
+
* AGENTS.md would add diagnostics to every existing suite on upgrade, and
|
|
70
|
+
* `strict` would promote them to errors and break pipelines that never asked
|
|
71
|
+
* for this.
|
|
72
|
+
*/
|
|
73
|
+
agents?: {
|
|
74
|
+
/** Globs, relative to the config directory. Defaults to AGENTS.md and CLAUDE.md. */
|
|
75
|
+
paths?: string[];
|
|
76
|
+
/** Ceiling for a single agent file, counted with the same tokenizer `pack` uses. */
|
|
77
|
+
max_tokens?: number;
|
|
78
|
+
/** Per-rule severity overrides, keyed by full rule id (`agents/size-budget`). */
|
|
79
|
+
rules?: Record<string, unknown>;
|
|
80
|
+
};
|
|
61
81
|
}
|
|
62
82
|
|
|
63
83
|
type Severity = "error" | "warn" | "info";
|
|
@@ -86,6 +106,24 @@ interface RunLintResults extends LintResults {
|
|
|
86
106
|
specFiles: number;
|
|
87
107
|
/** False when no specs resolved — "no diagnostics" is then not a pass. */
|
|
88
108
|
assessed: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Agent instruction files linted. Zero when `agents` is not configured, which
|
|
111
|
+
* is not a failure — the feature is opt-in. A configured `agents.paths` that
|
|
112
|
+
* matches nothing is reported as an error diagnostic instead, because that
|
|
113
|
+
* is a config promising a check that is not running.
|
|
114
|
+
*/
|
|
115
|
+
agentFiles: number;
|
|
116
|
+
/**
|
|
117
|
+
* False when there is no `spec.config.yaml` and only agent instruction files
|
|
118
|
+
* were linted. The zero-config on-ramp: a project with a CLAUDE.md and no
|
|
119
|
+
* spec suite gets a useful answer instead of "run specdx init".
|
|
120
|
+
*
|
|
121
|
+
* `assessed` keeps meaning "specs were assessed", so the vacuous-pass guard
|
|
122
|
+
* it exists for is unweakened; callers check this flag to know that a
|
|
123
|
+
* `specFiles: 0` is expected here rather than a suite that resolved to
|
|
124
|
+
* nothing.
|
|
125
|
+
*/
|
|
126
|
+
specSuite: boolean;
|
|
89
127
|
}
|
|
90
128
|
declare function runLint(options: RunLintOptions): Promise<RunLintResults>;
|
|
91
129
|
|