@specship/specship-win32-arm64 0.25.0 → 0.29.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/bin/specship.cmd +31 -1
- package/lib/dist/activation/cheatsheet.d.ts +17 -1
- package/lib/dist/activation/cheatsheet.d.ts.map +1 -1
- package/lib/dist/activation/cheatsheet.js +47 -3
- package/lib/dist/activation/cheatsheet.js.map +1 -1
- package/lib/dist/activation/hook-output.d.ts +80 -0
- package/lib/dist/activation/hook-output.d.ts.map +1 -0
- package/lib/dist/activation/hook-output.js +103 -0
- package/lib/dist/activation/hook-output.js.map +1 -0
- package/lib/dist/activation/search-intercept.d.ts +60 -29
- package/lib/dist/activation/search-intercept.d.ts.map +1 -1
- package/lib/dist/activation/search-intercept.js +159 -55
- package/lib/dist/activation/search-intercept.js.map +1 -1
- package/lib/dist/activation/steering.d.ts +8 -10
- package/lib/dist/activation/steering.d.ts.map +1 -1
- package/lib/dist/activation/steering.js +21 -6
- package/lib/dist/activation/steering.js.map +1 -1
- package/lib/dist/behaviour/behaviour-surface.d.ts +47 -0
- package/lib/dist/behaviour/behaviour-surface.d.ts.map +1 -1
- package/lib/dist/behaviour/behaviour-surface.js +108 -2
- package/lib/dist/behaviour/behaviour-surface.js.map +1 -1
- package/lib/dist/bin/node-version-check.d.ts +22 -7
- package/lib/dist/bin/node-version-check.d.ts.map +1 -1
- package/lib/dist/bin/node-version-check.js +39 -9
- package/lib/dist/bin/node-version-check.js.map +1 -1
- package/lib/dist/bin/specship.js +799 -81
- package/lib/dist/bin/specship.js.map +1 -1
- package/lib/dist/commands/specship/learn.md +22 -0
- package/lib/dist/commands/specship/spec.md +19 -1
- package/lib/dist/db/sqlite-adapter.d.ts +7 -5
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +11 -9
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/design-md/check.d.ts +51 -0
- package/lib/dist/design-md/check.d.ts.map +1 -0
- package/lib/dist/design-md/check.js +335 -0
- package/lib/dist/design-md/check.js.map +1 -0
- package/lib/dist/design-md/css.d.ts +40 -0
- package/lib/dist/design-md/css.d.ts.map +1 -0
- package/lib/dist/design-md/css.js +224 -0
- package/lib/dist/design-md/css.js.map +1 -0
- package/lib/dist/design-md/extract.d.ts +84 -0
- package/lib/dist/design-md/extract.d.ts.map +1 -0
- package/lib/dist/design-md/extract.js +595 -0
- package/lib/dist/design-md/extract.js.map +1 -0
- package/lib/dist/design-md/maintain.d.ts +45 -0
- package/lib/dist/design-md/maintain.d.ts.map +1 -0
- package/lib/dist/design-md/maintain.js +127 -0
- package/lib/dist/design-md/maintain.js.map +1 -0
- package/lib/dist/design-md/render.d.ts +28 -0
- package/lib/dist/design-md/render.d.ts.map +1 -0
- package/lib/dist/design-md/render.js +178 -0
- package/lib/dist/design-md/render.js.map +1 -0
- package/lib/dist/design-md/upkeep.d.ts +48 -0
- package/lib/dist/design-md/upkeep.d.ts.map +1 -0
- package/lib/dist/design-md/upkeep.js +169 -0
- package/lib/dist/design-md/upkeep.js.map +1 -0
- package/lib/dist/design-md/verify.d.ts +65 -0
- package/lib/dist/design-md/verify.d.ts.map +1 -0
- package/lib/dist/design-md/verify.js +311 -0
- package/lib/dist/design-md/verify.js.map +1 -0
- package/lib/dist/enforce/changed-files.d.ts +11 -0
- package/lib/dist/enforce/changed-files.d.ts.map +1 -1
- package/lib/dist/enforce/changed-files.js +42 -0
- package/lib/dist/enforce/changed-files.js.map +1 -1
- package/lib/dist/enforce/enforce.d.ts +25 -1
- package/lib/dist/enforce/enforce.d.ts.map +1 -1
- package/lib/dist/enforce/enforce.js +58 -3
- package/lib/dist/enforce/enforce.js.map +1 -1
- package/lib/dist/enforce/mutation.d.ts +46 -0
- package/lib/dist/enforce/mutation.d.ts.map +1 -0
- package/lib/dist/enforce/mutation.js +104 -0
- package/lib/dist/enforce/mutation.js.map +1 -0
- package/lib/dist/enforce/suppressions.d.ts +33 -0
- package/lib/dist/enforce/suppressions.d.ts.map +1 -0
- package/lib/dist/enforce/suppressions.js +159 -0
- package/lib/dist/enforce/suppressions.js.map +1 -0
- package/lib/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/specs/markdown-spec-extractor.js +16 -2
- package/lib/dist/extraction/specs/markdown-spec-extractor.js.map +1 -1
- package/lib/dist/graph/spec-coverage.d.ts +57 -1
- package/lib/dist/graph/spec-coverage.d.ts.map +1 -1
- package/lib/dist/graph/spec-coverage.js +129 -5
- package/lib/dist/graph/spec-coverage.js.map +1 -1
- package/lib/dist/health/smoke-check.js +2 -2
- package/lib/dist/health/smoke-check.js.map +1 -1
- package/lib/dist/index.d.ts +8 -3
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +65 -9
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/gemini-commands.d.ts +107 -0
- package/lib/dist/installer/gemini-commands.d.ts.map +1 -0
- package/lib/dist/installer/gemini-commands.js +271 -0
- package/lib/dist/installer/gemini-commands.js.map +1 -0
- package/lib/dist/installer/index.d.ts +23 -1
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +22 -3
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/install-defaults.d.ts +19 -0
- package/lib/dist/installer/install-defaults.d.ts.map +1 -1
- package/lib/dist/installer/install-defaults.js +28 -0
- package/lib/dist/installer/install-defaults.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +22 -0
- package/lib/dist/installer/instructions-template.d.ts.map +1 -1
- package/lib/dist/installer/instructions-template.js +37 -1
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts +5 -1
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +15 -27
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/gemini.d.ts +85 -12
- package/lib/dist/installer/targets/gemini.d.ts.map +1 -1
- package/lib/dist/installer/targets/gemini.js +527 -30
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +13 -0
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +18 -0
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +12 -0
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/jira/auto-publish.d.ts +71 -4
- package/lib/dist/jira/auto-publish.d.ts.map +1 -1
- package/lib/dist/jira/auto-publish.js +186 -17
- package/lib/dist/jira/auto-publish.js.map +1 -1
- package/lib/dist/jira/reconcile.d.ts +24 -1
- package/lib/dist/jira/reconcile.d.ts.map +1 -1
- package/lib/dist/jira/reconcile.js +46 -2
- package/lib/dist/jira/reconcile.js.map +1 -1
- package/lib/dist/jira/repo-config.d.ts +9 -0
- package/lib/dist/jira/repo-config.d.ts.map +1 -1
- package/lib/dist/jira/repo-config.js +11 -0
- package/lib/dist/jira/repo-config.js.map +1 -1
- package/lib/dist/jira/types.d.ts +7 -0
- package/lib/dist/jira/types.d.ts.map +1 -1
- package/lib/dist/jira/types.js.map +1 -1
- package/lib/dist/knowledge/enforce.d.ts +75 -0
- package/lib/dist/knowledge/enforce.d.ts.map +1 -0
- package/lib/dist/knowledge/enforce.js +250 -0
- package/lib/dist/knowledge/enforce.js.map +1 -0
- package/lib/dist/knowledge/facts.d.ts +33 -0
- package/lib/dist/knowledge/facts.d.ts.map +1 -0
- package/lib/dist/knowledge/facts.js +117 -0
- package/lib/dist/knowledge/facts.js.map +1 -0
- package/lib/dist/knowledge/proposals.d.ts +88 -0
- package/lib/dist/knowledge/proposals.d.ts.map +1 -0
- package/lib/dist/knowledge/proposals.js +360 -0
- package/lib/dist/knowledge/proposals.js.map +1 -0
- package/lib/dist/knowledge/stale.d.ts +64 -0
- package/lib/dist/knowledge/stale.d.ts.map +1 -0
- package/lib/dist/knowledge/stale.js +174 -0
- package/lib/dist/knowledge/stale.js.map +1 -0
- package/lib/dist/mcp/gemini-session.d.ts +50 -0
- package/lib/dist/mcp/gemini-session.d.ts.map +1 -0
- package/lib/dist/mcp/gemini-session.js +159 -0
- package/lib/dist/mcp/gemini-session.js.map +1 -0
- package/lib/dist/mcp/jira-tools.d.ts.map +1 -1
- package/lib/dist/mcp/jira-tools.js +25 -0
- package/lib/dist/mcp/jira-tools.js.map +1 -1
- package/lib/dist/mcp/model-context.d.ts +22 -9
- package/lib/dist/mcp/model-context.d.ts.map +1 -1
- package/lib/dist/mcp/model-context.js +35 -13
- package/lib/dist/mcp/model-context.js.map +1 -1
- package/lib/dist/mcp/proxy.js +1 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +16 -15
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +67 -1
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.js +1 -1
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/spec-tools.d.ts +9 -1
- package/lib/dist/mcp/spec-tools.d.ts.map +1 -1
- package/lib/dist/mcp/spec-tools.js +69 -21
- package/lib/dist/mcp/spec-tools.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +37 -1
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +120 -9
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/pulse/pulse.d.ts +93 -0
- package/lib/dist/pulse/pulse.d.ts.map +1 -0
- package/lib/dist/pulse/pulse.js +401 -0
- package/lib/dist/pulse/pulse.js.map +1 -0
- package/lib/dist/reflect/apply.d.ts.map +1 -1
- package/lib/dist/reflect/apply.js +38 -3
- package/lib/dist/reflect/apply.js.map +1 -1
- package/lib/dist/reflect/auto-sweep.d.ts +26 -0
- package/lib/dist/reflect/auto-sweep.d.ts.map +1 -0
- package/lib/dist/reflect/auto-sweep.js +90 -0
- package/lib/dist/reflect/auto-sweep.js.map +1 -0
- package/lib/dist/reflect/cli.d.ts +62 -0
- package/lib/dist/reflect/cli.d.ts.map +1 -0
- package/lib/dist/reflect/cli.js +163 -0
- package/lib/dist/reflect/cli.js.map +1 -0
- package/lib/dist/reflect/miner.d.ts.map +1 -1
- package/lib/dist/reflect/miner.js +119 -0
- package/lib/dist/reflect/miner.js.map +1 -1
- package/lib/dist/reflect/sweep.d.ts +1 -0
- package/lib/dist/reflect/sweep.d.ts.map +1 -1
- package/lib/dist/reflect/sweep.js +62 -13
- package/lib/dist/reflect/sweep.js.map +1 -1
- package/lib/dist/reflect/targets.d.ts +2 -0
- package/lib/dist/reflect/targets.d.ts.map +1 -1
- package/lib/dist/reflect/targets.js +33 -0
- package/lib/dist/reflect/targets.js.map +1 -1
- package/lib/dist/reflect/types.d.ts +19 -2
- package/lib/dist/reflect/types.d.ts.map +1 -1
- package/lib/dist/resolution/test-title-links.d.ts.map +1 -1
- package/lib/dist/resolution/test-title-links.js +3 -14
- package/lib/dist/resolution/test-title-links.js.map +1 -1
- package/lib/dist/server/routes/claude.js +15 -7
- package/lib/dist/server/routes/knowledge.js +118 -0
- package/lib/dist/server/server.js +2 -0
- package/lib/dist/skills/design-md/SKILL.md +172 -0
- package/lib/dist/skills/design-md/references/authored-sections.md +90 -0
- package/lib/dist/skills/design-md/references/sources.md +71 -0
- package/lib/dist/spec-lint/lint.d.ts +1 -1
- package/lib/dist/spec-lint/lint.d.ts.map +1 -1
- package/lib/dist/spec-lint/lint.js +63 -2
- package/lib/dist/spec-lint/lint.js.map +1 -1
- package/lib/dist/spec-quality/criterion-ids.d.ts +13 -0
- package/lib/dist/spec-quality/criterion-ids.d.ts.map +1 -0
- package/lib/dist/spec-quality/criterion-ids.js +38 -0
- package/lib/dist/spec-quality/criterion-ids.js.map +1 -0
- package/lib/dist/spec-quality/evidence-kind.d.ts +54 -0
- package/lib/dist/spec-quality/evidence-kind.d.ts.map +1 -0
- package/lib/dist/spec-quality/evidence-kind.js +183 -0
- package/lib/dist/spec-quality/evidence-kind.js.map +1 -0
- package/lib/dist/spec-quality/link-persist.d.ts +65 -0
- package/lib/dist/spec-quality/link-persist.d.ts.map +1 -0
- package/lib/dist/spec-quality/link-persist.js +249 -0
- package/lib/dist/spec-quality/link-persist.js.map +1 -0
- package/lib/dist/spec-quality/plan-scope.d.ts +38 -0
- package/lib/dist/spec-quality/plan-scope.d.ts.map +1 -0
- package/lib/dist/spec-quality/plan-scope.js +129 -0
- package/lib/dist/spec-quality/plan-scope.js.map +1 -0
- package/lib/dist/spec-quality/postcheck.d.ts +91 -0
- package/lib/dist/spec-quality/postcheck.d.ts.map +1 -0
- package/lib/dist/spec-quality/postcheck.js +421 -0
- package/lib/dist/spec-quality/postcheck.js.map +1 -0
- package/lib/dist/spec-quality/readiness.d.ts +72 -0
- package/lib/dist/spec-quality/readiness.d.ts.map +1 -0
- package/lib/dist/spec-quality/readiness.js +226 -0
- package/lib/dist/spec-quality/readiness.js.map +1 -0
- package/lib/dist/workflows/agents/claude.d.ts +16 -0
- package/lib/dist/workflows/agents/claude.d.ts.map +1 -0
- package/lib/dist/workflows/agents/claude.js +82 -0
- package/lib/dist/workflows/agents/claude.js.map +1 -0
- package/lib/dist/workflows/agents/gemini.d.ts +21 -0
- package/lib/dist/workflows/agents/gemini.d.ts.map +1 -0
- package/lib/dist/workflows/agents/gemini.js +124 -0
- package/lib/dist/workflows/agents/gemini.js.map +1 -0
- package/lib/dist/workflows/agents/index.d.ts +28 -0
- package/lib/dist/workflows/agents/index.d.ts.map +1 -0
- package/lib/dist/workflows/agents/index.js +104 -0
- package/lib/dist/workflows/agents/index.js.map +1 -0
- package/lib/dist/workflows/agents/types.d.ts +55 -0
- package/lib/dist/workflows/agents/types.d.ts.map +1 -0
- package/lib/dist/workflows/agents/types.js +46 -0
- package/lib/dist/workflows/agents/types.js.map +1 -0
- package/lib/dist/workflows/batch.d.ts +63 -0
- package/lib/dist/workflows/batch.d.ts.map +1 -0
- package/lib/dist/workflows/batch.js +151 -0
- package/lib/dist/workflows/batch.js.map +1 -0
- package/lib/dist/workflows/defaults/claude-design-implement.yaml +37 -9
- package/lib/dist/workflows/defaults/spec-author.yaml +11 -9
- package/lib/dist/workflows/defaults/spec-implement-mixed.yaml +21 -436
- package/lib/dist/workflows/defaults/spec-implement.yaml +481 -46
- package/lib/dist/workflows/discovery.d.ts +13 -0
- package/lib/dist/workflows/discovery.d.ts.map +1 -1
- package/lib/dist/workflows/discovery.js +79 -17
- package/lib/dist/workflows/discovery.js.map +1 -1
- package/lib/dist/workflows/executor.d.ts +18 -0
- package/lib/dist/workflows/executor.d.ts.map +1 -1
- package/lib/dist/workflows/executor.js +130 -33
- package/lib/dist/workflows/executor.js.map +1 -1
- package/lib/dist/workflows/gc.d.ts +50 -0
- package/lib/dist/workflows/gc.d.ts.map +1 -0
- package/lib/dist/workflows/gc.js +120 -0
- package/lib/dist/workflows/gc.js.map +1 -0
- package/lib/dist/workflows/merge-queue.d.ts +64 -0
- package/lib/dist/workflows/merge-queue.d.ts.map +1 -0
- package/lib/dist/workflows/merge-queue.js +162 -0
- package/lib/dist/workflows/merge-queue.js.map +1 -0
- package/lib/dist/workflows/runners/approval.d.ts +1 -1
- package/lib/dist/workflows/runners/approval.d.ts.map +1 -1
- package/lib/dist/workflows/runners/approval.js +11 -2
- package/lib/dist/workflows/runners/approval.js.map +1 -1
- package/lib/dist/workflows/runners/bash.d.ts +15 -0
- package/lib/dist/workflows/runners/bash.d.ts.map +1 -1
- package/lib/dist/workflows/runners/bash.js +50 -1
- package/lib/dist/workflows/runners/bash.js.map +1 -1
- package/lib/dist/workflows/runners/prompt.d.ts +16 -41
- package/lib/dist/workflows/runners/prompt.d.ts.map +1 -1
- package/lib/dist/workflows/runners/prompt.js +55 -120
- package/lib/dist/workflows/runners/prompt.js.map +1 -1
- package/lib/dist/workflows/runners/types.d.ts +12 -0
- package/lib/dist/workflows/runners/types.d.ts.map +1 -1
- package/lib/dist/workflows/schemas/workflow.d.ts +17 -0
- package/lib/dist/workflows/schemas/workflow.d.ts.map +1 -1
- package/lib/dist/workflows/schemas/workflow.js +27 -0
- package/lib/dist/workflows/schemas/workflow.js.map +1 -1
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +2 -2
- package/package.json +5 -3
- package/node.exe +0 -4
|
@@ -30,6 +30,7 @@ import { registerProjectsRoutes } from './routes/projects.js';
|
|
|
30
30
|
import { registerReflectRoutes } from './routes/reflect.js';
|
|
31
31
|
import { registerMaintainabilityRoutes } from './routes/maintainability.js';
|
|
32
32
|
import { registerDomainRoutes } from './routes/domain.js';
|
|
33
|
+
import { registerKnowledgeRoutes } from './routes/knowledge.js';
|
|
33
34
|
import { registerMcpRoutes } from './routes/mcp.js';
|
|
34
35
|
import { registerConfigRoutes } from './routes/config.js';
|
|
35
36
|
import { readServerConfig } from './server-config.js';
|
|
@@ -275,6 +276,7 @@ export async function createServer(options) {
|
|
|
275
276
|
await registerReflectRoutes(app);
|
|
276
277
|
await registerMaintainabilityRoutes(app);
|
|
277
278
|
await registerDomainRoutes(app);
|
|
279
|
+
await registerKnowledgeRoutes(app);
|
|
278
280
|
// Chat routes removed (CHAT-REMOVE-DOC) — /api/chat and /api/chat/stream
|
|
279
281
|
// intentionally 404; the reviewer loop lives on Workflows + Runs.
|
|
280
282
|
await registerMcpRoutes(app);
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-md
|
|
3
|
+
description: Turn a Claude Design project (claude.ai/design link or handoff bundle) or a Figma file (figma.com link) into specs/<slug>/design.md, a pixel-exact design reference that even a small model (Haiku, Gemini Flash) can build the UI from without guessing. Use this when someone shares a design to build or update, asks to "capture", "document" or "import" a design, or the design changed and design.md must catch up. Also use it to implement UI from an existing design.md.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# design.md: a pixel-exact design reference
|
|
7
|
+
|
|
8
|
+
design.md is one Markdown file per design, at `specs/<slug>/design.md`. It
|
|
9
|
+
states every visual value **verbatim** in a fixed layout, so whoever builds the
|
|
10
|
+
UI looks a value up instead of inferring it. A small model given the raw design
|
|
11
|
+
rounds `13.5px` to `14px`, swaps `#5B93F2` for "blue-500", and forgets the
|
|
12
|
+
hover state. Given design.md, it doesn't have to decide anything.
|
|
13
|
+
|
|
14
|
+
There are two halves, and the split is the point:
|
|
15
|
+
|
|
16
|
+
- **Values come from code, not from you.** `specship design extract` reads the
|
|
17
|
+
source and writes the *Generated reference*: every custom property, color,
|
|
18
|
+
font, size, spacing, radius, shadow, transition, breakpoint and style rule,
|
|
19
|
+
verbatim, with usage counts. **Never type a value into design.md yourself.**
|
|
20
|
+
Copy it from the generated block, which copied it from the source.
|
|
21
|
+
- **Structure comes from you.** You write the *authored* sections (screens,
|
|
22
|
+
components and states, motion, responsive, assets). They explain how the
|
|
23
|
+
values assemble, and they cite selectors and values from the generated block.
|
|
24
|
+
|
|
25
|
+
`specship design check` decides when you're done. It fails on a missing
|
|
26
|
+
section, an empty authored section, approximate wording, a stale source, or a
|
|
27
|
+
source value missing from the reference.
|
|
28
|
+
|
|
29
|
+
## The loop
|
|
30
|
+
|
|
31
|
+
### 1. Capture the source verbatim
|
|
32
|
+
|
|
33
|
+
Pick a slug from the design's name (kebab-case). Save everything under
|
|
34
|
+
`specs/<slug>/`. Read `references/sources.md` for each source's exact steps:
|
|
35
|
+
|
|
36
|
+
| The user gave you | Capture with | Save as |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `claude.ai/design/...` link | designer tools: `designer_session` → `designer_snapshot` | `snapshot.html` + every local stylesheet it links |
|
|
39
|
+
| a designer handoff bundle (`handoff-<ts>/`) | copy from `project/` (no fetch) | `snapshot.html` + linked CSS, decision record into `source.md` |
|
|
40
|
+
| `figma.com/design/...` link | Figma MCP: `get_metadata`, `get_design_context`, `get_variable_defs`, `get_screenshot` | `figma/<frame>.tsx`, `figma/variables.json`, `figma/<frame>.png`, `figma/metadata.xml` |
|
|
41
|
+
| exported HTML/CSS files | copy as-is | keep the file names |
|
|
42
|
+
|
|
43
|
+
Hard rules:
|
|
44
|
+
- **Never plain-fetch a design link.** A `claude.ai/design` URL returns a
|
|
45
|
+
1 KB loader shell, and a Figma URL returns a login page. If the tools
|
|
46
|
+
are missing, stop and give the setup step:
|
|
47
|
+
- designer tools: run `designer setup` once.
|
|
48
|
+
- Figma MCP: `claude mcp add --transport http figma https://mcp.figma.com/mcp`.
|
|
49
|
+
- Save tool output **byte for byte**. Don't reformat, summarise or "clean up"
|
|
50
|
+
a snapshot.
|
|
51
|
+
|
|
52
|
+
### 2. Extract
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
specship design extract specs/<slug>/snapshot.html \
|
|
56
|
+
--out specs/<slug>/design.md --title "<Design name>" --origin "<the link>"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
For Figma, pass the captured files instead:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
specship design extract specs/<slug>/figma/<frame>.tsx specs/<slug>/figma/variables.json --out ...
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If the generated block says **Missing linked stylesheet**, capture that file
|
|
66
|
+
next to the snapshot and run extract again with `--update`. The reference is
|
|
67
|
+
incomplete until then.
|
|
68
|
+
|
|
69
|
+
### 3. Write the authored sections
|
|
70
|
+
|
|
71
|
+
Fill **Screens & layout**, **Components & states**, **Interactions & motion**,
|
|
72
|
+
**Responsive behaviour** and **Assets**. `references/authored-sections.md`
|
|
73
|
+
gives the exact shape of each, with an example. The rules:
|
|
74
|
+
|
|
75
|
+
- Every number, color and font you write must appear in the Generated
|
|
76
|
+
reference (or Figma `metadata.xml` for frame sizes). Cite the selector:
|
|
77
|
+
"Card padding `16px 20px` (`.card`)".
|
|
78
|
+
- Name every state the source styles: `:hover`, `:focus-visible`, `:active`,
|
|
79
|
+
`:disabled`, `[aria-*]`, `.is-*` classes. For each one, list the values
|
|
80
|
+
that change.
|
|
81
|
+
- Look at the screenshot or rendered snapshot for order, alignment and
|
|
82
|
+
grouping. Only the generated block gives you the numbers.
|
|
83
|
+
- No approximate words: approximately, roughly, about 12, ~12, similar to,
|
|
84
|
+
etc., TBD. `check` rejects them. If the source doesn't say, write
|
|
85
|
+
"Not specified in the design; ask the designer" rather than inventing a value.
|
|
86
|
+
- Delete each `<!-- design-md: … -->` hint once its section is written.
|
|
87
|
+
|
|
88
|
+
### 4. Check until clean
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
specship design check specs/<slug>/design.md
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Fix every error and run it again. **You are finished only when it passes.**
|
|
95
|
+
|
|
96
|
+
### 5. Connect it to the spec
|
|
97
|
+
|
|
98
|
+
Add `design: specs/<slug>/design.md` to the frontmatter of the spec that
|
|
99
|
+
covers this UI. `/specship:spec implement` then has the implementer read
|
|
100
|
+
design.md before any UI edit. The spec keeps the contract (behaviour,
|
|
101
|
+
accessibility, data). design.md keeps the pixels. Never copy values into the
|
|
102
|
+
spec.
|
|
103
|
+
|
|
104
|
+
## When the design changes
|
|
105
|
+
|
|
106
|
+
Capture the new source over the old files (step 1), then:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
specship design extract <same sources> --update specs/<slug>/design.md
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Only the generated block is replaced. Your authored sections are kept, and a
|
|
113
|
+
dated **Change log** entry lists every token and value that was added, removed
|
|
114
|
+
or changed (`old → new`). Go through that entry and update each authored
|
|
115
|
+
sentence that cites a changed value. Then run `check` again.
|
|
116
|
+
|
|
117
|
+
## When code changes the UI
|
|
118
|
+
|
|
119
|
+
design.md describes the UI that ships, so it changes in the same commit as
|
|
120
|
+
the UI code. That applies to a new component, a changed state, layout or
|
|
121
|
+
token, and a copy change.
|
|
122
|
+
|
|
123
|
+
1. Update the authored sections that describe what moved.
|
|
124
|
+
2. Add a dated line under **Change log**: what changed and the requirement
|
|
125
|
+
id. For example, `- 2026-10-27: Sign In button gains a loading state
|
|
126
|
+
(REQ-AUTH-004).`
|
|
127
|
+
3. If the design source changed too (a new snapshot or Figma export), run
|
|
128
|
+
`specship design extract <sources> --update <design.md>` first. Only the
|
|
129
|
+
generated block is replaced, and the value changes are logged for you.
|
|
130
|
+
4. Run `specship design check <design.md>`.
|
|
131
|
+
|
|
132
|
+
`specship postcheck` enforces this, and `/specship:spec implement` runs it.
|
|
133
|
+
The check fails if a change touches UI files that a design-backed spec
|
|
134
|
+
governs, but that spec's design.md gets no new Change log entry, or no
|
|
135
|
+
longer passes `check`. A spec is design-backed when its frontmatter has
|
|
136
|
+
`design:`. The UI files it governs are the `.tsx`/`.jsx`/`.vue`/`.svelte`/
|
|
137
|
+
`.css`/`.html` files in its `implementations:` blocks. While you implement
|
|
138
|
+
that spec, every UI file you change counts.
|
|
139
|
+
|
|
140
|
+
## Building UI from design.md
|
|
141
|
+
|
|
142
|
+
This applies to you, or to any implementer you brief:
|
|
143
|
+
|
|
144
|
+
1. Read design.md top to bottom once: Fidelity rules first.
|
|
145
|
+
2. Rebuild the **Element outline** element by element: same nesting, each
|
|
146
|
+
element's inline style exactly, text exactly, and each `svg … = <svg …>`
|
|
147
|
+
pasted as is. For class selectors, use the declarations in **Style rules
|
|
148
|
+
(verbatim)** exactly. Use the **Design tokens** table to keep
|
|
149
|
+
`var(--…)` names when the project's stack supports CSS variables.
|
|
150
|
+
3. Reuse a project token only when its value is exactly equal. Otherwise add
|
|
151
|
+
the value as written.
|
|
152
|
+
4. Build every state in **Components & states**, and every breakpoint in
|
|
153
|
+
**Responsive behaviour**.
|
|
154
|
+
5. Add no CSS the design doesn't have. No resets, no normalizers, no
|
|
155
|
+
`button { font: inherit }` "fixes". Leave an element design.md doesn't
|
|
156
|
+
style on the browser default: the design was rendered with that default,
|
|
157
|
+
and one invented reset moves every pixel after it.
|
|
158
|
+
6. Anything design.md doesn't state is a question, not a guess.
|
|
159
|
+
7. **Verify, then fix, until it matches.** Render your UI to static HTML. A
|
|
160
|
+
plain `.html` build already is; for a framework, save the rendered page.
|
|
161
|
+
Then run:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
specship design verify <build.html> --against specs/<slug>/design.md
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
It compares your build's element outline with design.md's, line by line
|
|
168
|
+
(nesting, tags, classes, attributes, text and SVG), and checks that your
|
|
169
|
+
stylesheet rules keep design.md's order wherever a later rule would
|
|
170
|
+
override an earlier one. Fix each reported line or rule pair and run it
|
|
171
|
+
again. **You are done when it matches.** A small model that
|
|
172
|
+
misnests one container gets caught here and fixes it in one pass.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Writing the authored sections
|
|
2
|
+
|
|
3
|
+
The Generated reference has the values. The authored sections say how they
|
|
4
|
+
assemble into screens and components. Write them so a small model can build the
|
|
5
|
+
UI by following them in order.
|
|
6
|
+
|
|
7
|
+
Shared rules:
|
|
8
|
+
- Follow the **Element outline**'s nesting exactly. When you write
|
|
9
|
+
"Anatomy", list only the direct children of that element, in outline
|
|
10
|
+
order, and say which parent each part sits in. A part that is a sibling of
|
|
11
|
+
a row is never "in" that row. The outline is authoritative: if your prose
|
|
12
|
+
and the outline disagree, a builder follows the outline, and your prose
|
|
13
|
+
was wrong.
|
|
14
|
+
- Every value you write appears in the Generated reference, or in
|
|
15
|
+
`figma/metadata.xml` for frame sizes. Copy it exactly: `13.5px` stays
|
|
16
|
+
`13.5px`, and `#5B93F2` keeps its case.
|
|
17
|
+
- Cite the selector (or Figma layer name) behind every value, in backticks.
|
|
18
|
+
- One bullet per fact. Short, declarative, no adjectives that carry no value
|
|
19
|
+
("nice", "subtle", "slightly").
|
|
20
|
+
- When the source doesn't specify something, write: "Not specified in the
|
|
21
|
+
design; ask the designer."
|
|
22
|
+
- `specship design check` rejects these words: approximately, roughly,
|
|
23
|
+
about <n>, ~<n>, similar to, etc., TBD, something like.
|
|
24
|
+
|
|
25
|
+
## Screens & layout
|
|
26
|
+
|
|
27
|
+
One `###` per screen or frame. Cover:
|
|
28
|
+
- the frame size and the background,
|
|
29
|
+
- the layout model: grid or flex, direction, columns, gaps, max-width,
|
|
30
|
+
alignment,
|
|
31
|
+
- the regions top to bottom, or left to right, each with its size and the
|
|
32
|
+
selector that styles it.
|
|
33
|
+
|
|
34
|
+
```markdown
|
|
35
|
+
### Spec detail (1440 × 900)
|
|
36
|
+
|
|
37
|
+
- Background `#0B0D11` (`#boot-splash`); text `#E8EBF0`.
|
|
38
|
+
- Two columns: sidebar `280px` fixed (`div.col`) + content `1fr`; no gap.
|
|
39
|
+
- Content padding `28px 32px 56px` (`div.scroll-y`), scrolls vertically.
|
|
40
|
+
- Top to bottom: header row (`div.row.gap-8`, padding `15px 16px`), metadata line
|
|
41
|
+
(`div.sp-metaline`, margin-top `32px`), criteria list.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Components & states
|
|
45
|
+
|
|
46
|
+
One `###` per component. Cover:
|
|
47
|
+
- its selector or selectors,
|
|
48
|
+
- its anatomy: the child parts in order,
|
|
49
|
+
- its exact box: size, padding, radius, border, shadow,
|
|
50
|
+
- its typography: family, size, weight, line height, letter spacing, color,
|
|
51
|
+
- then **one bullet per state**, naming the values that change. Cover every
|
|
52
|
+
state the source styles: default, `:hover`, `:focus-visible`, `:active`,
|
|
53
|
+
`:disabled`, `[aria-selected]` / `[aria-expanded]`, `.is-*`, loading, empty,
|
|
54
|
+
error.
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
### Nav item (`a` in the sidebar)
|
|
58
|
+
|
|
59
|
+
- Height `32px`; padding `0px 10px`; gap `10px`; radius `6px`.
|
|
60
|
+
- Label `13px` / weight `450`, color `#8A93A3`.
|
|
61
|
+
- States:
|
|
62
|
+
- default: background transparent.
|
|
63
|
+
- `:hover`: background `rgba(255,255,255,0.06)`, label `#E8EBF0`.
|
|
64
|
+
- `[aria-current=page]`: background `rgba(91,147,242,0.12)`, label weight `600`.
|
|
65
|
+
- `:focus-visible`: outline `2px solid #5B93F2`, offset `2px`.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Interactions & motion
|
|
69
|
+
|
|
70
|
+
For each transition or animation, give:
|
|
71
|
+
- the trigger,
|
|
72
|
+
- the animated properties,
|
|
73
|
+
- the duration, easing and delay,
|
|
74
|
+
- the keyframes name.
|
|
75
|
+
|
|
76
|
+
If there are none, write "None in this design."
|
|
77
|
+
|
|
78
|
+
## Responsive behaviour
|
|
79
|
+
|
|
80
|
+
For each breakpoint in the Generated reference's **Breakpoints** inventory,
|
|
81
|
+
say exactly what changes. If there are none, write "Single fixed layout."
|
|
82
|
+
|
|
83
|
+
## Assets
|
|
84
|
+
|
|
85
|
+
For each image, icon and font, give:
|
|
86
|
+
- the file or link,
|
|
87
|
+
- the rendered size,
|
|
88
|
+
- where it's used.
|
|
89
|
+
|
|
90
|
+
Include icon sets with the icon names used. If there are none, write "None."
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Capturing a design source
|
|
2
|
+
|
|
3
|
+
Every path ends with the source saved **byte for byte** under `specs/<slug>/`,
|
|
4
|
+
so `specship design extract` can read it and `specship design check` can tell
|
|
5
|
+
when it changes. Never plain-fetch a design URL.
|
|
6
|
+
|
|
7
|
+
## Claude Design: a `claude.ai/design` link
|
|
8
|
+
|
|
9
|
+
The link looks like `https://claude.ai/design/p/<project-id>/?file=<File+Name>.html`.
|
|
10
|
+
The file name comes from the `file=` parameter (`Data+Flow.html` is
|
|
11
|
+
`Data Flow.html`).
|
|
12
|
+
|
|
13
|
+
1. `designer_session({ action: "status" })`. If it reports that CDP is not up
|
|
14
|
+
or Chrome is not signed in, tell the user to run `designer setup` once and
|
|
15
|
+
**stop**.
|
|
16
|
+
2. If the session isn't on this project yet, `designer_session({ action: "adopt" })`
|
|
17
|
+
on an open tab, or `resume` the stored URL.
|
|
18
|
+
3. `designer_snapshot({ filename: "<File Name>.html" })`. It returns
|
|
19
|
+
`htmlPath`, the real rendered HTML read from inside the preview frame.
|
|
20
|
+
4. Copy it byte for byte: `cp "<htmlPath>" specs/<slug>/snapshot.html`.
|
|
21
|
+
5. Copy every **local** stylesheet the snapshot links
|
|
22
|
+
(`<link rel="stylesheet" href="styles.css">`) next to it, keeping the
|
|
23
|
+
relative path. Remote font links (Google Fonts) stay as links.
|
|
24
|
+
6. Write `specs/<slug>/source.md` with the link, the file name and today's
|
|
25
|
+
date.
|
|
26
|
+
|
|
27
|
+
## Claude Design: a handoff bundle
|
|
28
|
+
|
|
29
|
+
A bundle is `handoff-<ts>/` holding `project/` and `decision-record.md`. It is
|
|
30
|
+
already on disk, so nothing is fetched.
|
|
31
|
+
|
|
32
|
+
1. Choose the file: `project/<chosen>.html`. If there are several and the user
|
|
33
|
+
hasn't said which, ask.
|
|
34
|
+
2. `cp` it to `specs/<slug>/snapshot.html`, along with the CSS, JS and assets it
|
|
35
|
+
references from `project/`.
|
|
36
|
+
3. Write `specs/<slug>/source.md` with the bundle path, then append
|
|
37
|
+
`decision-record.md` verbatim. It records why the design looks the way it
|
|
38
|
+
does.
|
|
39
|
+
|
|
40
|
+
## Figma: a `figma.com` link
|
|
41
|
+
|
|
42
|
+
The link looks like `https://www.figma.com/design/<fileKey>/<name>?node-id=<a>-<b>`.
|
|
43
|
+
The node id is `<a>:<b>`. Use the Figma MCP server's tools. If they aren't in
|
|
44
|
+
the session, tell the user to run
|
|
45
|
+
`claude mcp add --transport http figma https://mcp.figma.com/mcp`, sign in,
|
|
46
|
+
and restart. Then **stop**.
|
|
47
|
+
|
|
48
|
+
For each frame (screen) in scope:
|
|
49
|
+
|
|
50
|
+
| Tool | Gives you | Save as |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| `get_metadata` | the layer tree with every frame's x, y, width, height | `specs/<slug>/figma/metadata.xml` |
|
|
53
|
+
| `get_design_context` | code for the frame, including every color, size and spacing as a literal | `specs/<slug>/figma/<frame>.tsx` |
|
|
54
|
+
| `get_variable_defs` | the variables (tokens) the frame uses, as name → value | `specs/<slug>/figma/variables.json` |
|
|
55
|
+
| `get_screenshot` | a rendered image of the frame | `specs/<slug>/figma/<frame>.png` |
|
|
56
|
+
|
|
57
|
+
- Save each response verbatim. When `get_design_context` returns code, write
|
|
58
|
+
the code exactly. Don't convert it to the project's framework yet; that
|
|
59
|
+
is implementation.
|
|
60
|
+
- If a frame is too large for one `get_design_context` call, call it on each
|
|
61
|
+
child frame named in `metadata.xml`. Save each one as its own `.tsx`.
|
|
62
|
+
- Then extract:
|
|
63
|
+
`specship design extract specs/<slug>/figma/*.tsx specs/<slug>/figma/variables.json --out specs/<slug>/design.md --origin "<link>"`.
|
|
64
|
+
- Frame sizes for **Screens & layout** come from `metadata.xml`. Look at the
|
|
65
|
+
`.png` to see order and grouping.
|
|
66
|
+
|
|
67
|
+
## Exported HTML / CSS
|
|
68
|
+
|
|
69
|
+
Copy the files into `specs/<slug>/` with their names unchanged, and pass the
|
|
70
|
+
HTML entry file to `extract`. Local stylesheets it links are read
|
|
71
|
+
automatically.
|
|
@@ -20,7 +20,7 @@ export type LintSeverity = 'error' | 'warning';
|
|
|
20
20
|
* code (`spec_missing_id`, `spec_stranded_id`, `spec_bare_path_ref`,
|
|
21
21
|
* `spec_acceptance_parent_mismatch`) so one vocabulary spans both layers.
|
|
22
22
|
*/
|
|
23
|
-
export type LintCode = 'spec_duplicate_id' | 'spec_orphan_acceptance_parent' | 'spec_requirement_without_acceptance' | 'spec_needs_review_marker' | 'spec_no_negative_case' | 'spec_missing_non_goals' | 'spec_missing_test_plan' | 'spec_requirement_without_rfc2119' | string;
|
|
23
|
+
export type LintCode = 'spec_duplicate_id' | 'spec_orphan_acceptance_parent' | 'spec_requirement_without_acceptance' | 'spec_needs_review_marker' | 'spec_unknown_evidence_kind' | 'spec_external_fact_missing_provenance' | 'spec_malformed_enforced_rule' | 'spec_no_negative_case' | 'spec_missing_non_goals' | 'spec_missing_test_plan' | 'spec_requirement_without_rfc2119' | string;
|
|
24
24
|
export interface LintFinding {
|
|
25
25
|
code: LintCode;
|
|
26
26
|
severity: LintSeverity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/spec-lint/lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../src/spec-lint/lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAEhB,mBAAmB,GACnB,+BAA+B,GAC/B,qCAAqC,GACrC,0BAA0B,GAC1B,4BAA4B,GAC5B,uCAAuC,GACvC,8BAA8B,GAE9B,uBAAuB,GACvB,wBAAwB,GACxB,wBAAwB,GACxB,kCAAkC,GAElC,MAAM,CAAC;AAEX,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,YAAY,CAAC;IACvB,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,4EAA4E;IAC5E,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,SAAS,EAAE,OAAO,CAAC;CACpB;AAkHD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,CA2K9E;AA+DD,MAAM,WAAW,WAAW;IAC1B,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,WAAgB,GAAG,UAAU,CAmEhF;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAc3D;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,IAAI,GAAE,MAAM,EAAO,EACnB,OAAO,GAAE,WAAgB,GACxB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAQtC"}
|
|
@@ -56,6 +56,8 @@ exports.runLintCli = runLintCli;
|
|
|
56
56
|
const fs = __importStar(require("fs"));
|
|
57
57
|
const path = __importStar(require("path"));
|
|
58
58
|
const markdown_spec_extractor_1 = require("../extraction/specs/markdown-spec-extractor");
|
|
59
|
+
const evidence_kind_1 = require("../spec-quality/evidence-kind");
|
|
60
|
+
const enforce_1 = require("../knowledge/enforce");
|
|
59
61
|
/**
|
|
60
62
|
* Mirrors the extractor's private `ID_COMMENT`. Duplicated rather than
|
|
61
63
|
* imported because the extractor does not export it and its module is off
|
|
@@ -109,6 +111,47 @@ function isNonSpecArtifact(filePath) {
|
|
|
109
111
|
function isDomainFile(filePath) {
|
|
110
112
|
return filePath.replace(/\\/g, '/').includes('specs/domain/');
|
|
111
113
|
}
|
|
114
|
+
/** The provenance an external fact must carry (REQ-KNOW-001). */
|
|
115
|
+
const EXTERNAL_PROVENANCE = ['dependency', 'version', 'source'];
|
|
116
|
+
/**
|
|
117
|
+
* Domain-fact checks (KNOWLEDGE-DOC):
|
|
118
|
+
* - an `external` fact missing `dependency` / `version` / `source` is an
|
|
119
|
+
* error naming the missing field(s) (REQ-KNOW-001.A2) — it still indexes;
|
|
120
|
+
* - an `## Enforced` bullet not of the form `` `<glob>` must not match
|
|
121
|
+
* `/<regex>/` `` is an error (REQ-KNOW-003.A3).
|
|
122
|
+
*/
|
|
123
|
+
function lintDomainFact(specs, source, add) {
|
|
124
|
+
const fact = specs.find((s) => s.kind === 'domain');
|
|
125
|
+
if (fact) {
|
|
126
|
+
const meta = (fact.metadata ?? {});
|
|
127
|
+
if (meta.type === 'external') {
|
|
128
|
+
const missing = EXTERNAL_PROVENANCE.filter((k) => {
|
|
129
|
+
const v = meta[k];
|
|
130
|
+
return !(typeof v === 'number' || (typeof v === 'string' && v.trim().length > 0));
|
|
131
|
+
});
|
|
132
|
+
if (missing.length > 0) {
|
|
133
|
+
add({
|
|
134
|
+
code: 'spec_external_fact_missing_provenance',
|
|
135
|
+
severity: 'error',
|
|
136
|
+
line: 1,
|
|
137
|
+
specId: fact.id,
|
|
138
|
+
message: `External fact ${fact.id} is missing ${missing.join(', ')} — an external fact must record the dependency, the version it was verified against, and its source.`,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// Parsed over the whole source so the line numbers are file lines; the
|
|
144
|
+
// frontmatter can't contain a `## Enforced` heading.
|
|
145
|
+
for (const m of (0, enforce_1.parseEnforcedRules)(source).malformed) {
|
|
146
|
+
add({
|
|
147
|
+
code: 'spec_malformed_enforced_rule',
|
|
148
|
+
severity: 'error',
|
|
149
|
+
line: m.line,
|
|
150
|
+
specId: fact?.id,
|
|
151
|
+
message: `Malformed enforced rule "${m.text}": ${m.reason}.`,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
112
155
|
/**
|
|
113
156
|
* Lint one spec file's source. `filePath` is used verbatim in findings, so
|
|
114
157
|
* callers should pass a project-relative path.
|
|
@@ -157,9 +200,12 @@ function lintSpecSource(filePath, source) {
|
|
|
157
200
|
}
|
|
158
201
|
}
|
|
159
202
|
// A domain fact keeps the extractor's verdict (its frontmatter can genuinely
|
|
160
|
-
// be malformed) but has no requirement/acceptance structure to check.
|
|
161
|
-
|
|
203
|
+
// be malformed) but has no requirement/acceptance structure to check. It has
|
|
204
|
+
// its own two checks instead (KNOWLEDGE-DOC).
|
|
205
|
+
if (isDomainFile(filePath)) {
|
|
206
|
+
lintDomainFact(result.specs, source, add);
|
|
162
207
|
return sortFindings(findings);
|
|
208
|
+
}
|
|
163
209
|
const declared = new Set([...seen.keys(), ...result.specs.map((s) => s.id)]);
|
|
164
210
|
const acceptance = result.specs.filter((s) => s.kind === 'acceptance');
|
|
165
211
|
const requirements = result.specs.filter((s) => s.kind === 'requirement');
|
|
@@ -204,6 +250,21 @@ function lintSpecSource(filePath, source) {
|
|
|
204
250
|
});
|
|
205
251
|
}
|
|
206
252
|
}
|
|
253
|
+
// 5b. An `(evidence: <kind>)` tag naming a kind outside the four
|
|
254
|
+
// (REQ-PIPETRUST-001.A3). Resolution would silently fall back to the
|
|
255
|
+
// derived kind, so the author's intent would be lost — an error.
|
|
256
|
+
for (const a of acceptance) {
|
|
257
|
+
const { invalid } = (0, evidence_kind_1.parseDeclaredEvidenceKind)(a.body);
|
|
258
|
+
if (invalid !== undefined) {
|
|
259
|
+
add({
|
|
260
|
+
code: 'spec_unknown_evidence_kind',
|
|
261
|
+
severity: 'error',
|
|
262
|
+
line: a.startLine,
|
|
263
|
+
specId: a.id,
|
|
264
|
+
message: `${a.id} declares unknown evidence kind "${invalid}" — use one of ${evidence_kind_1.EVIDENCE_KINDS.join(', ')}.`,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
}
|
|
207
268
|
// 6. Happy-path-only requirements (A2, warning).
|
|
208
269
|
for (const req of requirements) {
|
|
209
270
|
const children = acceptance.filter((a) => a.parentId === req.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.js","sourceRoot":"","sources":["../../src/spec-lint/lint.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GA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
|
+
* Test titles cite several criteria of one requirement in shorthand —
|
|
6
|
+
* `REQ-X-004.A1/A3`, `REQ-X-028.A2/.A3`, `REQ-X-001.A1 / A3`. Reading only the
|
|
7
|
+
* first id left the rest silently unlinked, so the title scanner and postcheck
|
|
8
|
+
* share this one parser. A bare `A2` with no preceding full id names nothing,
|
|
9
|
+
* and ids match whole: `REQ-X.A10` never yields `REQ-X.A1`.
|
|
10
|
+
*/
|
|
11
|
+
/** Every spec id `text` names, shorthand expanded, in order of appearance (duplicates kept). */
|
|
12
|
+
export declare function criterionIdsInText(text: string): string[];
|
|
13
|
+
//# sourceMappingURL=criterion-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"criterion-ids.d.ts","sourceRoot":"","sources":["../../src/spec-quality/criterion-ids.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,gGAAgG;AAChG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBzD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Spec ids named in free text, with criterion shorthand expanded
|
|
4
|
+
* (PIPETRUST-DOC, REQ-PIPETRUST-008).
|
|
5
|
+
*
|
|
6
|
+
* Test titles cite several criteria of one requirement in shorthand —
|
|
7
|
+
* `REQ-X-004.A1/A3`, `REQ-X-028.A2/.A3`, `REQ-X-001.A1 / A3`. Reading only the
|
|
8
|
+
* first id left the rest silently unlinked, so the title scanner and postcheck
|
|
9
|
+
* share this one parser. A bare `A2` with no preceding full id names nothing,
|
|
10
|
+
* and ids match whole: `REQ-X.A10` never yields `REQ-X.A1`.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.criterionIdsInText = criterionIdsInText;
|
|
14
|
+
/** A full spec id, an optional `.A<N>` suffix, then any `/A<N>`, `, .A<N>`, `& A<N>` continuations. */
|
|
15
|
+
const SPEC_ID_CHAIN = /\b([A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+)(\.A\d+)?((?:\s*[/,&]\s*\.?A\d+\b)*)(?![\w-])/g;
|
|
16
|
+
const CONTINUATION = /\.?A(\d+)/g;
|
|
17
|
+
/** Every spec id `text` names, shorthand expanded, in order of appearance (duplicates kept). */
|
|
18
|
+
function criterionIdsInText(text) {
|
|
19
|
+
const out = [];
|
|
20
|
+
SPEC_ID_CHAIN.lastIndex = 0;
|
|
21
|
+
let m;
|
|
22
|
+
while ((m = SPEC_ID_CHAIN.exec(text)) !== null) {
|
|
23
|
+
const base = m[1];
|
|
24
|
+
const first = m[2];
|
|
25
|
+
if (!first) {
|
|
26
|
+
out.push(base);
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
out.push(base + first);
|
|
30
|
+
const chain = m[3] ?? '';
|
|
31
|
+
CONTINUATION.lastIndex = 0;
|
|
32
|
+
let c;
|
|
33
|
+
while ((c = CONTINUATION.exec(chain)) !== null)
|
|
34
|
+
out.push(`${base}.A${c[1]}`);
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=criterion-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"criterion-ids.js","sourceRoot":"","sources":["../../src/spec-quality/criterion-ids.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAQH,gDAkBC;AAxBD,uGAAuG;AACvG,MAAM,aAAa,GACjB,iFAAiF,CAAC;AACpF,MAAM,YAAY,GAAG,YAAY,CAAC;AAElC,gGAAgG;AAChG,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,aAAa,CAAC,SAAS,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAyB,CAAC;IAC9B,OAAO,CAAC,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/C,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;QACnB,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACnB,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACf,SAAS;QACX,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;QACvB,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACzB,YAAY,CAAC,SAAS,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAyB,CAAC;QAC9B,OAAO,CAAC,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI;YAAE,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/E,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Evidence kinds (PIPETRUST-DOC, REQ-PIPETRUST-001 / REQ-PIPETRUST-002).
|
|
3
|
+
*
|
|
4
|
+
* Coverage used to count "a test" without asking what kind. Every acceptance
|
|
5
|
+
* criterion now resolves to exactly one REQUIRED kind of evidence, and every
|
|
6
|
+
* test file classifies to the kind it actually PROVIDES — both
|
|
7
|
+
* deterministically, so coverage can compare the two.
|
|
8
|
+
*
|
|
9
|
+
* - required: an inline `(evidence: <kind>)` tag wins; otherwise derived from
|
|
10
|
+
* the criterion's shape (invariant phrasing → property) and the
|
|
11
|
+
* requirement's direct links (UI → e2e, route → contract), else unit.
|
|
12
|
+
* - present: read from the test file alone — library imports and path
|
|
13
|
+
* segments. Never throws; anything unreadable is `unit`.
|
|
14
|
+
*/
|
|
15
|
+
export type EvidenceKind = 'unit' | 'property' | 'e2e' | 'contract';
|
|
16
|
+
/** The four kinds, in the order reports list them. */
|
|
17
|
+
export declare const EVIDENCE_KINDS: readonly EvidenceKind[];
|
|
18
|
+
/**
|
|
19
|
+
* Read an inline `(evidence: <kind>)` tag from an acceptance bullet
|
|
20
|
+
* (REQ-PIPETRUST-001.A1). No tag → `{}`; a known kind → `{ kind }`; an
|
|
21
|
+
* unknown kind → `{ invalid: <what was written> }` (a lint error, A3).
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseDeclaredEvidenceKind(text: string): {
|
|
24
|
+
kind?: EvidenceKind;
|
|
25
|
+
invalid?: string;
|
|
26
|
+
};
|
|
27
|
+
export interface EvidenceKindContext {
|
|
28
|
+
/** The requirement is directly linked (implements) to UI code. */
|
|
29
|
+
linksUi?: boolean;
|
|
30
|
+
/** The requirement is directly linked (implements) to a `route` node. */
|
|
31
|
+
linksRoute?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The single evidence kind a criterion requires (REQ-PIPETRUST-001.A1/.A2).
|
|
35
|
+
* Precedence: declared tag → invariant phrasing (property) → UI link (e2e) →
|
|
36
|
+
* route link (contract) → unit. An invalid declared kind falls through to the
|
|
37
|
+
* derived kind — the lint reports it; resolution never fails.
|
|
38
|
+
*/
|
|
39
|
+
export declare function requiredEvidenceKind(criterionText: string, ctx?: EvidenceKindContext): EvidenceKind;
|
|
40
|
+
/**
|
|
41
|
+
* Remove block comments, `//` line comments and `#` line comments (Python /
|
|
42
|
+
* shell test files). Deliberately simple: a `//` inside a string literal also
|
|
43
|
+
* ends the line's code, which can only make classification more conservative.
|
|
44
|
+
*/
|
|
45
|
+
export declare function stripComments(source: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Classify a test file by the kind of evidence it provides
|
|
48
|
+
* (REQ-PIPETRUST-002.A1). Source signals are checked before path signals, and
|
|
49
|
+
* property before e2e before contract. `source` is read from `filePath` when
|
|
50
|
+
* omitted; a missing or unreadable file classifies as `unit` (A2) — this
|
|
51
|
+
* function never throws.
|
|
52
|
+
*/
|
|
53
|
+
export declare function classifyTestEvidence(filePath: string, source?: string): EvidenceKind;
|
|
54
|
+
//# sourceMappingURL=evidence-kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-kind.d.ts","sourceRoot":"","sources":["../../src/spec-quality/evidence-kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,GAAG,UAAU,CAAC;AAEpE,sDAAsD;AACtD,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAA4C,CAAC;AAkB/F;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,CAAC,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAMjG;AAED,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,GAAE,mBAAwB,GAAG,YAAY,CAOvG;AA2BD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMpD;AASD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,CAyBpF"}
|