specdx 0.4.0-alpha.2 → 0.4.0-alpha.21

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 (112) hide show
  1. package/.claude-plugin/plugin.json +7 -2
  2. package/LICENSE +21 -0
  3. package/README.md +477 -0
  4. package/dist/{check-PZFBVQIP.js → check-GGGHTDTH.js} +37 -11
  5. package/dist/check-GGGHTDTH.js.map +1 -0
  6. package/dist/{chunk-QEUZJWBY.js → chunk-3YXRWQGX.js} +373 -63
  7. package/dist/chunk-3YXRWQGX.js.map +1 -0
  8. package/dist/chunk-5WRI5ZAA.js +31 -0
  9. package/dist/chunk-6IVWJKMQ.js +103 -0
  10. package/dist/chunk-6IVWJKMQ.js.map +1 -0
  11. package/dist/{chunk-YDU26YTH.js → chunk-HCJDCS26.js} +121 -17
  12. package/dist/chunk-HCJDCS26.js.map +1 -0
  13. package/dist/chunk-IEW62WR2.js +185 -0
  14. package/dist/chunk-IEW62WR2.js.map +1 -0
  15. package/dist/chunk-PXQML7NE.js +2846 -0
  16. package/dist/chunk-PXQML7NE.js.map +1 -0
  17. package/dist/{chunk-PHWUK7TH.js → chunk-QOP2KHW3.js} +290 -52
  18. package/dist/chunk-QOP2KHW3.js.map +1 -0
  19. package/dist/{chunk-FZWT4HVX.js → chunk-SNQNQ2MP.js} +157 -3
  20. package/dist/chunk-SNQNQ2MP.js.map +1 -0
  21. package/dist/{chunk-YRDOYUKF.js → chunk-YRQPY5NF.js} +124 -19
  22. package/dist/chunk-YRQPY5NF.js.map +1 -0
  23. package/dist/diff-VHVSXLKU.js +188 -0
  24. package/dist/diff-VHVSXLKU.js.map +1 -0
  25. package/dist/{dist-2B2MR5AM.js → dist-QRCEQ5WI.js} +53 -14
  26. package/dist/dist-QRCEQ5WI.js.map +1 -0
  27. package/dist/dist-ROHCFKYT.js +16 -0
  28. package/dist/dist-ROHCFKYT.js.map +1 -0
  29. package/dist/generate-WMJ37LCN.js +21 -0
  30. package/dist/generate-WMJ37LCN.js.map +1 -0
  31. package/dist/{generate-story-AOALIKSD.js → generate-story-ORJX24P7.js} +48 -20
  32. package/dist/generate-story-ORJX24P7.js.map +1 -0
  33. package/dist/{generate-test-plan-34L6RGOB.js → generate-test-plan-Z46W3N3B.js} +63 -10
  34. package/dist/generate-test-plan-Z46W3N3B.js.map +1 -0
  35. package/dist/graph-TG2CONHV.js +103 -0
  36. package/dist/graph-TG2CONHV.js.map +1 -0
  37. package/dist/index.d.ts +171 -0
  38. package/dist/index.js +2648 -390
  39. package/dist/index.js.map +1 -1
  40. package/dist/{lint-XGVQ6LCP.js → lint-ZFG6ALIT.js} +23 -8
  41. package/dist/lint-ZFG6ALIT.js.map +1 -0
  42. package/dist/main.js +11 -146
  43. package/dist/main.js.map +1 -1
  44. package/dist/mcp-WBHZANS5.js +35 -0
  45. package/dist/mcp-WBHZANS5.js.map +1 -0
  46. package/dist/{migrate-KDJZQKP7.js → migrate-FKFC7UAO.js} +20 -8
  47. package/dist/migrate-FKFC7UAO.js.map +1 -0
  48. package/dist/{pack-OJ3CDZHD.js → pack-VDEO7GRF.js} +39 -11
  49. package/dist/pack-VDEO7GRF.js.map +1 -0
  50. package/dist/ready-VDOH3XCV.js +257 -0
  51. package/dist/ready-VDOH3XCV.js.map +1 -0
  52. package/dist/skills/{specdx-author-spec.md → core/specdx-author-spec/SKILL.md} +10 -6
  53. package/dist/skills/{specdx-author-spec → core/specdx-author-spec/references}/step-01-frontmatter.md +1 -1
  54. package/dist/skills/{specdx-author-spec → core/specdx-author-spec/references}/step-02-sections.md +41 -0
  55. package/dist/skills/{specdx-onboard.md → core/specdx-onboard/SKILL.md} +8 -3
  56. package/dist/skills/{specdx-plan-from-spec.md → core/specdx-plan-from-spec/SKILL.md} +5 -1
  57. package/dist/skills/{specdx-pre-commit.md → core/specdx-pre-commit/SKILL.md} +16 -2
  58. package/dist/skills/{specdx-review-spec.md → core/specdx-review-spec/SKILL.md} +5 -1
  59. package/dist/skills/core/specdx-router/SKILL.md +67 -0
  60. package/dist/skills/{specdx-sprint-review.md → core/specdx-sprint-review/SKILL.md} +5 -1
  61. package/dist/skills/{specdx-start-task.md → core/specdx-start-task/SKILL.md} +5 -1
  62. package/dist/skills/{specdx-check-drift.md → experimental/specdx-check-drift/SKILL.md} +10 -4
  63. package/dist/skills/{specdx-verify.md → experimental/specdx-verify/SKILL.md} +17 -2
  64. package/dist/skills-36SRUEMR.js +121 -0
  65. package/dist/skills-36SRUEMR.js.map +1 -0
  66. package/dist/{status-JVIXK73H.js → status-JIQUF6MX.js} +48 -34
  67. package/dist/status-JIQUF6MX.js.map +1 -0
  68. package/dist/{update-HFLDULNJ.js → update-DNXF5Q64.js} +10 -9
  69. package/dist/update-DNXF5Q64.js.map +1 -0
  70. package/dist/validate-TSAMI65E.js +87 -0
  71. package/dist/validate-TSAMI65E.js.map +1 -0
  72. package/hooks/hooks.json +12 -6
  73. package/hooks/session-start +35 -3
  74. package/package.json +68 -21
  75. package/dist/changelog-G6XDIAZP.js +0 -86
  76. package/dist/changelog-G6XDIAZP.js.map +0 -1
  77. package/dist/check-PZFBVQIP.js.map +0 -1
  78. package/dist/chunk-7C3BAVCP.js +0 -1147
  79. package/dist/chunk-7C3BAVCP.js.map +0 -1
  80. package/dist/chunk-FZWT4HVX.js.map +0 -1
  81. package/dist/chunk-PHWUK7TH.js.map +0 -1
  82. package/dist/chunk-QEUZJWBY.js.map +0 -1
  83. package/dist/chunk-YDU26YTH.js.map +0 -1
  84. package/dist/chunk-YRDOYUKF.js.map +0 -1
  85. package/dist/diff-BEZARP53.js +0 -100
  86. package/dist/diff-BEZARP53.js.map +0 -1
  87. package/dist/dist-2B2MR5AM.js.map +0 -1
  88. package/dist/dist-WIK7F2PJ.js +0 -11
  89. package/dist/explain-PCZKDEM4.js +0 -102
  90. package/dist/explain-PCZKDEM4.js.map +0 -1
  91. package/dist/generate-OMEBJQFQ.js +0 -13
  92. package/dist/generate-OMEBJQFQ.js.map +0 -1
  93. package/dist/generate-story-AOALIKSD.js.map +0 -1
  94. package/dist/generate-test-plan-34L6RGOB.js.map +0 -1
  95. package/dist/graph-RR5UTY3R.js +0 -54
  96. package/dist/graph-RR5UTY3R.js.map +0 -1
  97. package/dist/lint-XGVQ6LCP.js.map +0 -1
  98. package/dist/mcp-GUFW37BE.js +0 -17
  99. package/dist/mcp-GUFW37BE.js.map +0 -1
  100. package/dist/migrate-KDJZQKP7.js.map +0 -1
  101. package/dist/pack-OJ3CDZHD.js.map +0 -1
  102. package/dist/ready-WTNO5W7C.js +0 -165
  103. package/dist/ready-WTNO5W7C.js.map +0 -1
  104. package/dist/skills-3GBBWZW2.js +0 -93
  105. package/dist/skills-3GBBWZW2.js.map +0 -1
  106. package/dist/status-JVIXK73H.js.map +0 -1
  107. package/dist/update-HFLDULNJ.js.map +0 -1
  108. package/dist/validate-O7W5YLR6.js +0 -34
  109. package/dist/validate-O7W5YLR6.js.map +0 -1
  110. /package/dist/{dist-WIK7F2PJ.js.map → chunk-5WRI5ZAA.js.map} +0 -0
  111. /package/dist/skills/{spec-type-reference.md → core/specdx-author-spec/references/spec-type-reference.md} +0 -0
  112. /package/dist/skills/{specdx-author-spec → core/specdx-author-spec/references}/step-03-finalize.md +0 -0
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "specdx",
3
- "version": "0.4.0-alpha.1",
3
+ "version": "0.4.0-alpha.21",
4
4
  "description": "Spec-driven development skills for Claude Code",
5
- "commands": "./dist/skills"
5
+ "author": {
6
+ "name": "umxr",
7
+ "url": "https://github.com/umxr"
8
+ },
9
+ "skills": "./dist/skills/core",
10
+ "hooks": "./hooks/hooks.json"
6
11
  }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present Umar Gora
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,477 @@
1
+ # specdx
2
+
3
+ > The context engine for spec-driven development — keeps AI coding sessions grounded in validated, token-budgeted spec context.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/specdx)](https://www.npmjs.com/package/specdx)
6
+ [![license](https://img.shields.io/npm/l/specdx)](LICENSE)
7
+ [![CI](https://github.com/umxr/specdx/actions/workflows/ci.yml/badge.svg)](https://github.com/umxr/specdx/actions/workflows/ci.yml)
8
+
9
+ ---
10
+
11
+ ## What is specdx?
12
+
13
+ specdx does a few things really well: it gives your project specs (PRDs, technical designs, user stories, test plans, ADRs, API contracts) a formal schema, **validates and lints** them, **packs** them into token-optimised context for LLM sessions, and **tracks freshness** so drift between specs gets caught before it compounds.
14
+
15
+ No LLM calls in the core pipeline. No API keys required. Deterministic validation you can run in CI.
16
+
17
+ ```bash
18
+ npm install -g specdx
19
+ ```
20
+
21
+ ---
22
+
23
+ ## The Real-World Workflow
24
+
25
+ specdx fits into how developers actually work with AI coding tools. Here's what day-to-day usage looks like.
26
+
27
+ ### Setting Up a New Project
28
+
29
+ ```bash
30
+ cd your-project
31
+ specdx init --name "my-app" --template lightweight
32
+ ```
33
+
34
+ This creates `spec.config.yaml` and starter specs in `specs/`. Five templates available:
35
+
36
+ | Template | What you get | Best for |
37
+ |----------|-------------|----------|
38
+ | `lightweight` | PRD + Technical Design | Small projects, solo devs |
39
+ | `bmad` | PRD + Technical Design + Test Plan + stories/ + adr/ | Full methodology |
40
+ | `api-first` | Technical Design + API Contract + Test Plan | Backend/API projects |
41
+ | `quick` | Single Quick Spec | Rapid prototyping |
42
+ | `context` | Project Context only | Adding to existing projects |
43
+
44
+ ### Adding specdx to an Existing Project
45
+
46
+ If you already have a codebase and want to introduce specs:
47
+
48
+ ```bash
49
+ cd existing-project
50
+ specdx init --name "my-app" --template context
51
+ ```
52
+
53
+ Start with `context` to create a project-context spec describing your stack, conventions, and constraints. Then add specs incrementally as you plan new work:
54
+
55
+ ```bash
56
+ # Add a PRD when you're planning a feature
57
+ # Add a technical design when you're making architecture decisions
58
+ # Add user stories when you're breaking work into tasks
59
+ ```
60
+
61
+ Edit `spec.config.yaml` to register each new spec with its type and dependencies.
62
+
63
+ ### Daily Development Loop
64
+
65
+ This is the core loop. Every coding session follows the same pattern:
66
+
67
+ **1. Load context before you code**
68
+
69
+ ```bash
70
+ specdx pack --task "implement user authentication" --copy
71
+ ```
72
+
73
+ This scores every spec in your suite for relevance to your task, allocates a token budget, compresses boilerplate, and copies the result to your clipboard. Paste it into your LLM session or let the Claude Code skill handle it automatically.
74
+
75
+ **2. Write code informed by specs**
76
+
77
+ Your LLM session now has the right context — the PRD features you're implementing, the technical constraints, the acceptance criteria, the API contract. No manual copy-pasting, no guessing which specs matter.
78
+
79
+ **3. Lint before committing**
80
+
81
+ ```bash
82
+ specdx lint
83
+ ```
84
+
85
+ Validates frontmatter, checks required sections, verifies cross-references, detects circular dependencies, flags vague language, and catches hardcoded secrets in specs. Three presets: `minimal`, `recommended`, `strict`.
86
+
87
+ **4. Keep specs fresh**
88
+
89
+ ```bash
90
+ specdx diff # what changed, and which downstream specs it affects
91
+ specdx ready # is the suite fit to implement from?
92
+ ```
93
+
94
+ If you updated the PRD but not the test plan that depends on it, `diff` flags it before the staleness compounds.
95
+
96
+ ### Planning New Work
97
+
98
+ When you're starting a new feature or project phase:
99
+
100
+ ```bash
101
+ # Check what state the spec suite is in
102
+ specdx status
103
+
104
+ # See the dependency graph
105
+ specdx graph
106
+
107
+ # Check if specs are ready for implementation
108
+ specdx ready
109
+ ```
110
+
111
+ `ready` validates that all required specs exist, lint is clean, no references are broken, no specs are stale, and PRD features have corresponding user stories. It's the gate between "planning" and "building."
112
+
113
+ ### Reviewing Changes
114
+
115
+ When specs change (or should have changed):
116
+
117
+ ```bash
118
+ # What specs changed since main?
119
+ specdx diff
120
+
121
+ # What's the downstream impact?
122
+ specdx diff --base main --head HEAD
123
+
124
+ # Generate a changelog for sprint review
125
+ specdx diff --base v1.0 --head HEAD --format changelog
126
+
127
+ # Include specs you haven't committed yet
128
+ specdx diff --working
129
+ ```
130
+
131
+ `diff` walks the dependency graph to find downstream specs affected by upstream changes. If you updated the PRD but forgot to update the test plan that depends on it, `diff` flags it.
132
+
133
+ ### Onboarding New Team Members
134
+
135
+ ```bash
136
+ specdx status
137
+ specdx graph
138
+ specdx pack --full
139
+ ```
140
+
141
+ `status` reports what specs exist and how healthy they are, `graph` shows how they relate, and `pack --full` loads the content itself. A new developer can understand the project's intent without opening a spec file. The `specdx-onboard` skill drives this sequence as a guided tour.
142
+
143
+ ### CI Integration
144
+
145
+ Add spec health checks to your CI pipeline with the GitHub Action:
146
+
147
+ ```yaml
148
+ # .github/workflows/specs.yml
149
+ - uses: umxr/specdx/packages/github-action@v0.4.0
150
+ with:
151
+ working-directory: .
152
+ preset: recommended
153
+ ```
154
+
155
+ The action runs lint + diff on every PR, posts a formatted comment with results, and can block merges on spec health failures. Configure severity thresholds in `spec.config.yaml`:
156
+
157
+ ```yaml
158
+ ci:
159
+ block_on: ["error"]
160
+ post_comment: true
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Experimental Features
166
+
167
+ These ship with specdx but are **not part of the stable surface** — they lean on static code analysis, which is inherently fuzzy, and their output and interfaces may change or produce noise. They are flagged `[experimental]` in CLI help.
168
+
169
+ | Command | What it does |
170
+ |---------|-------------|
171
+ | `specdx check` | Spec-to-implementation drift analysis: extracts routes (Express, Hono, Next.js), types (TS, Zod, Prisma), and tests from your code and compares them against specs |
172
+ | Declared artifacts | Framework-agnostic checkable surfaces for `check`: a spec's optional `artifacts:` frontmatter lists files that must exist and names they must export, so any project — static sites, CLIs, libraries — gets drift checking. See below. |
173
+ | `specdx check --ai` | Sends check findings to Claude for assessment (requires `ANTHROPIC_API_KEY`) |
174
+ | `specdx update --from-code` | Suggests spec updates from check findings |
175
+ | `specdx generate test-plan` | Generates test-plan stubs from story acceptance criteria |
176
+ | `specdx migrate` | Schema-version migration for spec suites |
177
+
178
+ Feedback on these is especially welcome — accuracy improvements (confidence scoring, better matching) are what graduates them to stable.
179
+
180
+ ### Declared artifacts
181
+
182
+ When no framework extractor applies (Astro, static sites, CLIs, libraries), declare what "implemented" means directly in a spec's frontmatter:
183
+
184
+ ```yaml
185
+ artifacts:
186
+ - path: "middleware.ts"
187
+ - path: "scripts/export-crawler-log.mjs"
188
+ - path: "src/lib/bots.ts"
189
+ exports: ["BOT_SIGNATURES"]
190
+ ```
191
+
192
+ `specdx check` verifies each `path` exists and each name in `exports` is exported from it (export checks use ts-morph and are skipped with a note — never silently passed — when it isn't installed). Declared artifacts count toward the implementation score as their own category and make a spec checkable on any stack.
193
+
194
+ **Enforcement follows the spec's `status`**, so you can declare artifacts in a spec written before the code exists:
195
+
196
+ | Spec status | Declared file or export missing | Exit code |
197
+ |---|---|---|
198
+ | `draft`, `review`, `superseded` | reported as **pending** — planned, not yet built. Excluded from the score. | 0 |
199
+ | `approved` | reported as a **missing** error — the spec says this should exist | 1 |
200
+
201
+ The rule applies identically to a planned `path` and a planned entry in `exports`, so a spec can declare that an existing file will gain a new export. Files and exports that *do* exist are always verified, whatever the status. Flipping a spec to `approved` is what makes its contract enforceable, so `check` can tell "this is a plan for unbuilt work" apart from "this was approved but three of its five artifacts are missing".
202
+
203
+ ---
204
+
205
+ ## Claude Code Integration
206
+
207
+ specdx ships as a Claude Code plugin with 9 skills that automate the workflow above.
208
+
209
+ ### Automatic Setup
210
+
211
+ Install specdx as a dev dependency and the plugin is discovered automatically:
212
+
213
+ ```bash
214
+ npm install -D specdx
215
+ ```
216
+
217
+ Or install skills manually:
218
+
219
+ ```bash
220
+ specdx skills install
221
+ ```
222
+
223
+ Skills install to `.claude/skills/<name>/SKILL.md` and follow the
224
+ [Agent Skills specification](https://agentskills.io/specification).
225
+
226
+ ### Skills
227
+
228
+ | Skill | What it does |
229
+ |-------|-------------|
230
+ | `specdx-start-task` | Loads spec context before coding — runs `pack --task` and injects the result |
231
+ | `specdx-author-spec` | Guides spec creation with iterative linting gates between sections |
232
+ | `specdx-plan-from-spec` | Generates implementation plans grounded in the spec suite |
233
+ | `specdx-verify` | *(experimental)* Verifies implementation against specs using `check` |
234
+ | `specdx-check-drift` | *(experimental)* Cross-references code changes vs spec definitions |
235
+ | `specdx-pre-commit` | Runs lint + diff before commits to catch drift early |
236
+ | `specdx-review-spec` | Multi-layer quality review (completeness, consistency, adversarial) |
237
+ | `specdx-onboard` | Guided overview for new developers |
238
+ | `specdx-sprint-review` | Generates shareable spec health summary for standups |
239
+
240
+ ### MCP Server
241
+
242
+ specdx also exposes all tools over MCP (Model Context Protocol) for programmatic access:
243
+
244
+ ```bash
245
+ specdx mcp
246
+ ```
247
+
248
+ 7 tools available: `sdx_validate`, `sdx_lint`, `sdx_pack`, `sdx_status`, `sdx_check`, `sdx_diff`, `sdx_graph`.
249
+
250
+ ---
251
+
252
+ ## Spec File Format
253
+
254
+ Every spec is a Markdown file with YAML frontmatter:
255
+
256
+ ```markdown
257
+ ---
258
+ id: "prd-001"
259
+ type: "prd"
260
+ title: "User Authentication System"
261
+ status: "approved"
262
+ version: "1.0"
263
+ created: "2026-03-01"
264
+ authors: ["alice"]
265
+ ---
266
+
267
+ ## Problem Statement
268
+
269
+ Our application has no authentication...
270
+
271
+ ## Goals
272
+
273
+ 1. Support email/password login
274
+ 2. ...
275
+
276
+ ## Non-Goals
277
+
278
+ - Social login (Phase 2)
279
+ - ...
280
+
281
+ ## Features
282
+
283
+ - **F1 Login Flow**: Email and password with rate limiting...
284
+ - **F2 Session Management**: JWT tokens with refresh...
285
+
286
+ ## Success Criteria
287
+
288
+ - 99.9% auth uptime
289
+ - < 200ms login response time
290
+ ```
291
+
292
+ ### Spec Types
293
+
294
+ | Type | Required Sections | Extra Fields |
295
+ |------|------------------|--------------|
296
+ | `prd` | Problem Statement, Goals, Non-Goals, Features, Success Criteria | — |
297
+ | `technical-design` | Overview, Architecture, Data Model, API Design, Dependencies, Risks, Open Questions | — |
298
+ | `user-story` | Description, Acceptance Criteria, Dependencies, Notes | `story_id`, `priority`, `estimate` |
299
+ | `test-plan` | Scope, Test Cases, Coverage Matrix, Edge Cases | — |
300
+ | `adr` | Context, Decision, Status, Consequences | — |
301
+ | `api-contract` | Endpoints, Request/Response Schemas, Auth, Error Codes | — |
302
+ | `epic` | Overview, Stories, Acceptance Criteria, Dependencies | `epic_id`, `priority` |
303
+ | `quick-spec` | Intent, Boundaries, Tasks | — |
304
+ | `project-context` | Technology Stack, Critical Implementation Rules, Coding Patterns | — |
305
+
306
+ ### Required Frontmatter
307
+
308
+ | Field | Type | Description |
309
+ |-------|------|-------------|
310
+ | `id` | string | Unique identifier within the spec suite |
311
+ | `type` | enum | One of the 9 spec types above |
312
+ | `title` | string | Human-readable title |
313
+ | `status` | enum | `draft`, `review`, `approved`, `superseded` |
314
+ | `version` | string | Version string (e.g. `"1.0"`) |
315
+ | `created` | string | ISO 8601 date — must be quoted in YAML |
316
+ | `authors` | string[] | At least one author |
317
+
318
+ ### Cross-References
319
+
320
+ Specs can reference each other in frontmatter:
321
+
322
+ ```yaml
323
+ references:
324
+ - id: "tech-001"
325
+ relationship: "depends-on"
326
+ - id: "story-auth-001"
327
+ relationship: "decomposed-into"
328
+ ```
329
+
330
+ Relationships: `implemented-by`, `decomposed-into`, `depends-on`, `supersedes`, `related-to`.
331
+
332
+ ### Sections `specdx check` reads
333
+
334
+ Most sections are prose that only a human reads. Three are parsed, so `check`
335
+ can compare them against code. Write them in one of the shapes below — anything
336
+ else is treated as prose, and `check` reports the section as not assessed rather
337
+ than counting it as covered.
338
+
339
+ **`## Endpoints`** (api-contract) — either shape, or a mix:
340
+
341
+ ```markdown
342
+ - `GET /invoices` — list invoices
343
+ - POST /invoices — create an invoice
344
+ - `DELETE /invoices/:id` — void an invoice
345
+
346
+ ### GET /invoices/:id
347
+
348
+ Read a single invoice.
349
+ ```
350
+
351
+ **`## Data Model`** (technical-design) — a `###` heading per type, one field per
352
+ line. The heading must be a single identifier; `### Notes on the model` is read
353
+ as prose, not as a type called `Notes`. Backticks around field names are
354
+ optional:
355
+
356
+ ```markdown
357
+ ### Invoice
358
+
359
+ - id: string
360
+ - `amountCents`: number
361
+ - paidAt?: Date
362
+ ```
363
+
364
+ **`## Test Cases`** (test-plan) — one bullet per case, optionally grouped under
365
+ `###` headings. Each is matched against your test descriptions:
366
+
367
+ ```markdown
368
+ ### Invoices
369
+
370
+ - creates an invoice with a valid payload
371
+ - rejects an invoice with a negative amount
372
+ ```
373
+
374
+ ---
375
+
376
+ ## Configuration
377
+
378
+ `spec.config.yaml` at the project root:
379
+
380
+ ```yaml
381
+ version: "1.0"
382
+
383
+ project:
384
+ name: "my-project"
385
+
386
+ specs:
387
+ prd:
388
+ path: specs/prd.md
389
+ type: prd
390
+ required: true
391
+
392
+ technical:
393
+ path: specs/technical-design.md
394
+ type: technical-design
395
+ requires: ["prd"]
396
+
397
+ stories:
398
+ path: "specs/stories/*.md"
399
+ type: user-story
400
+ requires: ["prd"]
401
+
402
+ test-plan:
403
+ path: specs/test-plan.md
404
+ type: test-plan
405
+ requires: ["technical"]
406
+
407
+ lint:
408
+ extends: "recommended"
409
+ rules:
410
+ consistency/naming-conventions: off
411
+
412
+ pack:
413
+ max_tokens: 12000
414
+ format: xml
415
+ compression:
416
+ strip_boilerplate: true
417
+ stable_days: 30
418
+
419
+ diff:
420
+ baseline_ref: main
421
+ staleness_threshold_days: 14
422
+
423
+ check:
424
+ framework: auto # auto | express | hono | nextjs
425
+
426
+ ci:
427
+ block_on: ["error"]
428
+ post_comment: true
429
+ ```
430
+
431
+ ---
432
+
433
+ ## CLI Reference
434
+
435
+ | Command | Description |
436
+ |---------|-------------|
437
+ | `specdx init --name <name>` | Scaffold a new spec suite |
438
+ | `specdx lint` | Lint all specs against configured rules |
439
+ | `specdx validate` | Validate `spec.config.yaml` |
440
+ | `specdx pack --task <task>` | Pack specs into token-optimised context |
441
+ | `specdx status` | Show spec suite health overview |
442
+ | `specdx check` | *(experimental)* Analyse spec-to-implementation drift |
443
+ | `specdx diff` | Show spec changes and downstream impact (`--working`, `--format changelog`) |
444
+ | `specdx graph` | Print the dependency graph |
445
+ | `specdx ready` | Check if specs are ready for implementation |
446
+ | `specdx generate story --from <id>` | Generate user story stubs from a PRD |
447
+ | `specdx generate test-plan` | *(experimental)* Generate test plan stub from stories |
448
+ | `specdx update` | *(experimental)* Suggest spec updates based on code drift |
449
+ | `specdx migrate` | *(experimental)* Check and validate spec schema version |
450
+ | `specdx skills install` | Install Claude Code skills (`--experimental` also installs the unpromoted ones) |
451
+ | `specdx mcp` | Start the MCP server |
452
+
453
+ Global flags: `--format pretty|json|github`, `--quiet`, `--verbose`.
454
+
455
+ ---
456
+
457
+ ## Why specdx?
458
+
459
+ **vs. Markdown linters** (markdownlint, remark-lint) — They check formatting. specdx checks semantics: required sections by spec type, cross-reference validity, dependency chain cycles, downstream staleness.
460
+
461
+ **vs. YAML validators** (JSON Schema + AJV) — They check structure. specdx combines schema validation with document-level semantic rules that understand spec relationships.
462
+
463
+ **What makes it different:**
464
+
465
+ 1. **Dependency chains.** `requires` declarations build a DAG. Rules catch staleness and broken references across the entire suite.
466
+ 2. **Context packing.** `specdx pack` assembles token-optimised payloads with relevance filtering, budget allocation, and boilerplate stripping.
467
+ 3. **Drift detection.** `specdx diff` walks the dependency graph to find specs affected by upstream changes, and `specdx ready` gates implementation on suite health. (Experimental: `specdx check` compares specs against your actual implementation.)
468
+
469
+ ---
470
+
471
+ ## Contributing
472
+
473
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, how to write custom lint rules, and the PR process.
474
+
475
+ ## License
476
+
477
+ MIT — see [LICENSE](LICENSE).
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runCheck
3
- } from "./chunk-QEUZJWBY.js";
3
+ } from "./chunk-3YXRWQGX.js";
4
4
  import {
5
5
  sharedArgs
6
6
  } from "./chunk-GAM4MXPC.js";
@@ -9,18 +9,25 @@ import {
9
9
  loadConfig,
10
10
  parseSpec,
11
11
  resolveGlob
12
- } from "./chunk-FZWT4HVX.js";
13
- import "./chunk-YDU26YTH.js";
12
+ } from "./chunk-SNQNQ2MP.js";
13
+ import "./chunk-HCJDCS26.js";
14
+ import "./chunk-5WRI5ZAA.js";
14
15
 
15
- // src/commands/check.ts
16
+ // src/commands/experimental/check.ts
16
17
  import { defineCommand } from "citty";
17
18
  var check_default = defineCommand({
18
- meta: { name: "check", description: "Check spec-to-implementation drift" },
19
+ meta: {
20
+ name: "check",
21
+ description: "Check spec-to-implementation drift. Exit codes: 0 ok, 1 errors found, 3 nothing checkable (coverage not assessed)"
22
+ },
19
23
  args: {
20
24
  ...sharedArgs,
21
25
  spec: { type: "string", description: "Check a specific spec by ID" },
22
26
  framework: { type: "string", description: "Framework override: express, hono, nextjs" },
23
- ai: { type: "boolean", description: "Use AI to assess findings (requires ANTHROPIC_API_KEY)" }
27
+ ai: {
28
+ type: "boolean",
29
+ description: "Use AI to assess findings (requires ANTHROPIC_API_KEY)"
30
+ }
24
31
  },
25
32
  async run({ args }) {
26
33
  const logger = createLogger({ quiet: args.quiet, verbose: args.verbose });
@@ -43,13 +50,13 @@ var check_default = defineCommand({
43
50
  logger.debug(`Checking ${specs.length} specs...`);
44
51
  const result = await runCheck(specs, configDir, checkConfig);
45
52
  if (args.ai) {
46
- const { analyzeWithAi } = await import("./dist-WIK7F2PJ.js");
53
+ const { analyzeWithAi } = await import("./dist-ROHCFKYT.js");
47
54
  const aiResult = await analyzeWithAi(result.findings, args.spec ?? "full suite check");
48
55
  if (args.format === "json") {
49
56
  console.log(JSON.stringify({ ...result, ai: aiResult }, null, 2));
50
57
  } else {
51
58
  console.log(`
52
- sdx check --ai \u2014 ${result.score.overall}% coverage
59
+ specdx check --ai \u2014 ${result.score.overall}% coverage
53
60
  `);
54
61
  console.log(` AI Assessment: ${aiResult.summary}
55
62
  `);
@@ -74,9 +81,25 @@ var check_default = defineCommand({
74
81
  if (args.format === "json") {
75
82
  console.log(JSON.stringify(result, null, 2));
76
83
  } else {
84
+ const headline = result.score.assessed ? `${result.score.overall}% implementation coverage` : "coverage not assessed \u2014 no checkable surfaces found";
77
85
  console.log(`
78
- sdx check \u2014 ${result.score.overall}% implementation coverage
86
+ specdx check \u2014 ${headline}
87
+ `);
88
+ for (const note of result.notes) {
89
+ console.log(` \u26A0 ${note}`);
90
+ }
91
+ if (result.notes.length > 0) console.log();
92
+ if (args.verbose) {
93
+ const fmt = (n) => n === null ? "not scanned" : `${n} found`;
94
+ console.log(` Scanned: framework=${result.scanned.framework ?? "none detected"}`);
95
+ console.log(` routes: ${fmt(result.scanned.codeRoutes)}`);
96
+ console.log(` types: ${fmt(result.scanned.codeTypes)}`);
97
+ console.log(` tests: ${fmt(result.scanned.codeTests)}`);
98
+ const artifacts = result.scanned.artifacts === null ? "none declared" : `${result.scanned.artifacts} verified`;
99
+ const pending = result.scanned.artifactsPending > 0 ? `, ${result.scanned.artifactsPending} pending` : "";
100
+ console.log(` artifacts: ${artifacts}${pending}
79
101
  `);
102
+ }
80
103
  for (const [category, stats] of Object.entries(result.score.byCategory)) {
81
104
  if (stats.total === 0) continue;
82
105
  console.log(` ${category} (${stats.matched}/${stats.total}):`);
@@ -84,7 +107,7 @@ var check_default = defineCommand({
84
107
  (f) => f.category === category.replace(/s$/, "")
85
108
  );
86
109
  for (const f of categoryFindings) {
87
- const icon = f.type === "extra" ? "\u2139" : f.severity === "error" ? "\u2717" : "\u26A0";
110
+ const icon = f.severity === "error" ? "\u2717" : f.severity === "warn" ? "\u26A0" : "\u2139";
88
111
  const detail = f.actual ? ` \u2014 ${f.actual}` : "";
89
112
  const suggestion = f.suggestion ? ` (${f.suggestion})` : "";
90
113
  console.log(` ${icon} ${f.expected}${detail}${suggestion}`);
@@ -103,9 +126,12 @@ var check_default = defineCommand({
103
126
  if (result.findings.some((f) => f.severity === "error")) {
104
127
  process.exit(1);
105
128
  }
129
+ if (!result.score.assessed) {
130
+ process.exit(3);
131
+ }
106
132
  }
107
133
  });
108
134
  export {
109
135
  check_default as default
110
136
  };
111
- //# sourceMappingURL=check-PZFBVQIP.js.map
137
+ //# sourceMappingURL=check-GGGHTDTH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/experimental/check.ts"],"sourcesContent":["import { defineCommand } from \"citty\";\nimport { loadConfig, parseSpec, resolveGlob, createLogger } from \"@specdx/core\";\nimport { runCheck } from \"@specdx/check\";\nimport type { ParsedSpec } from \"@specdx/core\";\nimport type { CheckConfig } from \"@specdx/check\";\nimport { sharedArgs } from \"../../shared-args.js\";\n\nexport default defineCommand({\n meta: {\n name: \"check\",\n description:\n \"Check spec-to-implementation drift. Exit codes: 0 ok, 1 errors found, 3 nothing checkable (coverage not assessed)\",\n },\n args: {\n ...sharedArgs,\n spec: { type: \"string\", description: \"Check a specific spec by ID\" },\n framework: { type: \"string\", description: \"Framework override: express, hono, nextjs\" },\n ai: {\n type: \"boolean\",\n description: \"Use AI to assess findings (requires ANTHROPIC_API_KEY)\",\n },\n },\n async run({ args }) {\n const logger = createLogger({ quiet: args.quiet, verbose: args.verbose });\n const configDir = process.cwd();\n const config = await loadConfig(undefined, configDir);\n\n logger.debug(\"Loading specs...\");\n\n // Resolve and parse all specs\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 (args.spec && spec.frontmatter.id !== args.spec) continue;\n specs.push(spec);\n }\n }\n\n const checkConfig: CheckConfig = {\n ...config.check,\n ...(args.framework ? { framework: args.framework as CheckConfig[\"framework\"] } : {}),\n };\n\n logger.debug(`Checking ${specs.length} specs...`);\n const result = await runCheck(specs, configDir, checkConfig);\n\n // AI analysis (opt-in)\n if (args.ai) {\n const { analyzeWithAi } = await import(\"@specdx/check\");\n const aiResult = await analyzeWithAi(result.findings, args.spec ?? \"full suite check\");\n\n if (args.format === \"json\") {\n console.log(JSON.stringify({ ...result, ai: aiResult }, null, 2));\n } else {\n console.log(`\\n specdx check --ai — ${result.score.overall}% coverage\\n`);\n console.log(` AI Assessment: ${aiResult.summary}\\n`);\n\n for (const assessment of aiResult.assessments) {\n const finding = result.findings[assessment.findingIndex];\n if (!finding) continue;\n const icon = assessment.isRealIssue ? \"✗\" : \"✓\";\n const label = assessment.isRealIssue ? \"REAL\" : \"FALSE POSITIVE\";\n console.log(` ${icon} [${label}] ${finding.expected}`);\n console.log(` ${assessment.reasoning}`);\n if (assessment.suggestedFix) {\n console.log(` Fix: ${assessment.suggestedFix}`);\n }\n }\n console.log();\n }\n\n if (aiResult.assessments.some((a) => a.isRealIssue)) {\n process.exit(1);\n }\n return;\n }\n\n if (args.format === \"json\") {\n console.log(JSON.stringify(result, null, 2));\n } else {\n // Pretty format\n const headline = result.score.assessed\n ? `${result.score.overall}% implementation coverage`\n : \"coverage not assessed — no checkable surfaces found\";\n console.log(`\\n specdx check — ${headline}\\n`);\n\n for (const note of result.notes) {\n console.log(` ⚠ ${note}`);\n }\n if (result.notes.length > 0) console.log();\n\n if (args.verbose) {\n const fmt = (n: number | null) => (n === null ? \"not scanned\" : `${n} found`);\n console.log(` Scanned: framework=${result.scanned.framework ?? \"none detected\"}`);\n console.log(` routes: ${fmt(result.scanned.codeRoutes)}`);\n console.log(` types: ${fmt(result.scanned.codeTypes)}`);\n console.log(` tests: ${fmt(result.scanned.codeTests)}`);\n const artifacts =\n result.scanned.artifacts === null\n ? \"none declared\"\n : `${result.scanned.artifacts} verified`;\n const pending =\n result.scanned.artifactsPending > 0 ? `, ${result.scanned.artifactsPending} pending` : \"\";\n console.log(` artifacts: ${artifacts}${pending}\\n`);\n }\n\n for (const [category, stats] of Object.entries(result.score.byCategory)) {\n if (stats.total === 0) continue;\n console.log(` ${category} (${stats.matched}/${stats.total}):`);\n const categoryFindings = result.findings.filter(\n (f) => f.category === category.replace(/s$/, \"\"),\n );\n for (const f of categoryFindings) {\n const icon = f.severity === \"error\" ? \"✗\" : f.severity === \"warn\" ? \"⚠\" : \"ℹ\";\n const detail = f.actual ? ` — ${f.actual}` : \"\";\n const suggestion = f.suggestion ? ` (${f.suggestion})` : \"\";\n console.log(` ${icon} ${f.expected}${detail}${suggestion}`);\n }\n if (categoryFindings.length === 0) {\n console.log(\" ✓ all matched\");\n }\n }\n\n const errors = result.findings.filter((f) => f.severity === \"error\").length;\n const warnings = result.findings.filter((f) => f.severity === \"warn\").length;\n const info = result.findings.filter((f) => f.severity === \"info\").length;\n console.log(`\\n ${errors} errors, ${warnings} warnings, ${info} info\\n`);\n }\n\n if (result.findings.some((f) => f.severity === \"error\")) {\n process.exit(1);\n }\n // Distinct exit code so CI cannot mistake \"nothing was checkable\" for a pass\n if (!result.score.assessed) {\n process.exit(3);\n }\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,qBAAqB;AAO9B,IAAO,gBAAQ,cAAc;AAAA,EAC3B,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,aACE;AAAA,EACJ;AAAA,EACA,MAAM;AAAA,IACJ,GAAG;AAAA,IACH,MAAM,EAAE,MAAM,UAAU,aAAa,8BAA8B;AAAA,IACnE,WAAW,EAAE,M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