@specship/specship-win32-arm64 0.24.0 → 0.25.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/lib/dist/activation/steering.d.ts +4 -4
- package/lib/dist/activation/steering.d.ts.map +1 -1
- package/lib/dist/activation/steering.js +6 -6
- package/lib/dist/activation/steering.js.map +1 -1
- package/lib/dist/bin/specship.js +232 -40
- package/lib/dist/bin/specship.js.map +1 -1
- package/lib/dist/commands/specship/learn.md +5 -3
- package/lib/dist/commands/specship/spec.md +73 -15
- package/lib/dist/db/spec-queries.d.ts +73 -3
- package/lib/dist/db/spec-queries.d.ts.map +1 -1
- package/lib/dist/db/spec-queries.js +139 -5
- package/lib/dist/db/spec-queries.js.map +1 -1
- package/lib/dist/enforce/changed-files.d.ts +28 -0
- package/lib/dist/enforce/changed-files.d.ts.map +1 -0
- package/lib/dist/enforce/changed-files.js +72 -0
- package/lib/dist/enforce/changed-files.js.map +1 -0
- package/lib/dist/enforce/enforce.d.ts +28 -1
- package/lib/dist/enforce/enforce.d.ts.map +1 -1
- package/lib/dist/enforce/enforce.js +37 -5
- package/lib/dist/enforce/enforce.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +10 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +32 -3
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +7 -0
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/specs/markdown-spec-extractor.d.ts +7 -0
- package/lib/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/specs/markdown-spec-extractor.js +81 -8
- package/lib/dist/extraction/specs/markdown-spec-extractor.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-pascal.wasm.gz +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm.gz +0 -0
- package/lib/dist/graph/spec-coverage.d.ts +86 -0
- package/lib/dist/graph/spec-coverage.d.ts.map +1 -0
- package/lib/dist/graph/spec-coverage.js +152 -0
- package/lib/dist/graph/spec-coverage.js.map +1 -0
- package/lib/dist/index.d.ts +69 -6
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +133 -21
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts +33 -8
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +50 -50
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/init-offer.d.ts +14 -9
- package/lib/dist/installer/init-offer.d.ts.map +1 -1
- package/lib/dist/installer/init-offer.js +13 -9
- package/lib/dist/installer/init-offer.js.map +1 -1
- package/lib/dist/installer/install-defaults.d.ts +62 -0
- package/lib/dist/installer/install-defaults.d.ts.map +1 -0
- package/lib/dist/installer/install-defaults.js +67 -0
- package/lib/dist/installer/install-defaults.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts +14 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +64 -0
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/shared.js +4 -4
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/mcp/fitness-tool.d.ts +5 -6
- package/lib/dist/mcp/fitness-tool.d.ts.map +1 -1
- package/lib/dist/mcp/fitness-tool.js +0 -16
- package/lib/dist/mcp/fitness-tool.js.map +1 -1
- package/lib/dist/mcp/health-tool.d.ts +26 -0
- package/lib/dist/mcp/health-tool.d.ts.map +1 -0
- package/lib/dist/mcp/health-tool.js +50 -0
- package/lib/dist/mcp/health-tool.js.map +1 -0
- package/lib/dist/mcp/maintainability-tool.d.ts +5 -7
- package/lib/dist/mcp/maintainability-tool.d.ts.map +1 -1
- package/lib/dist/mcp/maintainability-tool.js +0 -16
- package/lib/dist/mcp/maintainability-tool.js.map +1 -1
- package/lib/dist/mcp/model-context.d.ts +13 -2
- package/lib/dist/mcp/model-context.d.ts.map +1 -1
- package/lib/dist/mcp/model-context.js +39 -12
- package/lib/dist/mcp/model-context.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +4 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +1 -1
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +5 -4
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/spec-tools.d.ts.map +1 -1
- package/lib/dist/mcp/spec-tools.js +213 -28
- package/lib/dist/mcp/spec-tools.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +12 -8
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +89 -48
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.d.ts +44 -2
- package/lib/dist/resolution/spec-link-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.js +132 -0
- package/lib/dist/resolution/spec-link-resolver.js.map +1 -1
- package/lib/dist/resolution/test-title-links.d.ts +62 -0
- package/lib/dist/resolution/test-title-links.d.ts.map +1 -0
- package/lib/dist/resolution/test-title-links.js +108 -0
- package/lib/dist/resolution/test-title-links.js.map +1 -0
- package/lib/dist/search/query-parser.d.ts.map +1 -1
- package/lib/dist/search/query-parser.js +6 -1
- package/lib/dist/search/query-parser.js.map +1 -1
- package/lib/dist/server/project-registry.js +1 -1
- package/lib/dist/server/routes/claude.js +9 -36
- package/lib/dist/server/routes/graph.js +53 -7
- package/lib/dist/server/routes/mcp.js +4 -3
- package/lib/dist/server/routes/projects.js +4 -4
- package/lib/dist/server/routes/spec.js +49 -7
- package/lib/dist/server/server.js +29 -17
- package/lib/dist/skills/spec-author/SKILL.md +164 -0
- package/lib/dist/skills/spec-author/references/format.md +210 -0
- package/lib/dist/skills/spec-author/references/gap-questions.md +152 -0
- package/lib/dist/skills/spec-author/references/quality-rubric.md +125 -0
- package/lib/dist/skills/spec-author/references/review-checklist.md +175 -0
- package/lib/dist/spec-lint/lint.d.ts +82 -0
- package/lib/dist/spec-lint/lint.d.ts.map +1 -0
- package/lib/dist/spec-lint/lint.js +430 -0
- package/lib/dist/spec-lint/lint.js.map +1 -0
- package/lib/dist/statusline/index.js.map +1 -1
- package/lib/dist/statusline/render.d.ts +1 -1
- package/lib/dist/statusline/render.d.ts.map +1 -1
- package/lib/dist/statusline/render.js +3 -1
- package/lib/dist/statusline/render.js.map +1 -1
- package/lib/dist/ui/assets/index-BzuUWUAE.js +50 -0
- package/lib/dist/ui/index.html +1 -1
- package/lib/dist/verify/report-ingest.d.ts +88 -0
- package/lib/dist/verify/report-ingest.d.ts.map +1 -0
- package/lib/dist/verify/report-ingest.js +269 -0
- package/lib/dist/verify/report-ingest.js.map +1 -0
- package/lib/dist/workflows/defaults/spec-fix.yaml +103 -12
- package/lib/dist/workflows/defaults/spec-implement-mixed.yaml +264 -21
- package/lib/dist/workflows/defaults/spec-implement.yaml +260 -19
- package/lib/dist/workflows/defaults/spec-verify.yaml +60 -9
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +7 -3
- package/package.json +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/lib/dist/server/ingest/impact-query.js +0 -343
- package/lib/dist/server/routes/events.js +0 -152
- package/lib/dist/ui/assets/index-CjjaftDw.js +0 -50
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Spec coverage rollup (REQ-VSTATE-006).
|
|
4
|
+
*
|
|
5
|
+
* Answers the one question nothing could answer before: which requirements and
|
|
6
|
+
* which individual acceptance criteria have PASSING TEST EVIDENCE.
|
|
7
|
+
*
|
|
8
|
+
* The rule that makes the number honest: a verdict derives ONLY from `tests`
|
|
9
|
+
* links. An `implements` link says code claims to satisfy the spec — it is not
|
|
10
|
+
* proof, so a criterion with implementation and no test reads `untested`
|
|
11
|
+
* (REQ-VSTATE-006.A3). This is the conflation the dashboard's
|
|
12
|
+
* implemented-counted-as-met display was built on.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.verdictFor = verdictFor;
|
|
16
|
+
exports.computeSpecCoverage = computeSpecCoverage;
|
|
17
|
+
exports.formatCoverageLine = formatCoverageLine;
|
|
18
|
+
const test_title_links_1 = require("../resolution/test-title-links");
|
|
19
|
+
function rollup(links) {
|
|
20
|
+
const states = {};
|
|
21
|
+
for (const l of links)
|
|
22
|
+
states[l.state] = (states[l.state] ?? 0) + 1;
|
|
23
|
+
return { count: links.length, states };
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Verdict from `tests` links alone (REQ-VSTATE-006.A1 / .A3). Links flagged as
|
|
27
|
+
* non-test evidence (a `verifies:` bullet aimed at a fixture — REQ-VSTATE-002.A4)
|
|
28
|
+
* are not counted: they cannot prove anything, so a criterion "covered" only by
|
|
29
|
+
* one stays `untested`.
|
|
30
|
+
*/
|
|
31
|
+
function verdictFor(testsLinks) {
|
|
32
|
+
const usable = testsLinks.filter((l) => !(0, test_title_links_1.isNonTestEvidence)(l));
|
|
33
|
+
if (usable.length === 0)
|
|
34
|
+
return 'untested';
|
|
35
|
+
if (usable.some((l) => l.state === 'broken'))
|
|
36
|
+
return 'broken';
|
|
37
|
+
if (usable.every((l) => l.state === 'verified'))
|
|
38
|
+
return 'verified';
|
|
39
|
+
return 'tested';
|
|
40
|
+
}
|
|
41
|
+
/** Worst-wins merge, so a rollup never reads better than its worst part. */
|
|
42
|
+
function mergeVerdicts(verdicts) {
|
|
43
|
+
if (verdicts.length === 0)
|
|
44
|
+
return 'untested';
|
|
45
|
+
if (verdicts.includes('broken'))
|
|
46
|
+
return 'broken';
|
|
47
|
+
if (verdicts.includes('untested'))
|
|
48
|
+
return 'untested';
|
|
49
|
+
if (verdicts.every((v) => v === 'verified'))
|
|
50
|
+
return 'verified';
|
|
51
|
+
return 'tested';
|
|
52
|
+
}
|
|
53
|
+
function coverageOf(sq, spec) {
|
|
54
|
+
const links = sq.getLinksBySpec(spec.id);
|
|
55
|
+
const testsLinks = links.filter((l) => l.kind === 'tests');
|
|
56
|
+
return {
|
|
57
|
+
specId: spec.id,
|
|
58
|
+
title: spec.title,
|
|
59
|
+
kind: spec.kind,
|
|
60
|
+
implementsLinks: rollup(links.filter((l) => l.kind === 'implements')),
|
|
61
|
+
testsLinks: rollup(testsLinks),
|
|
62
|
+
verdict: verdictFor(testsLinks),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Compute the coverage rollup for one spec, or for every requirement in the
|
|
67
|
+
* project when `specId` is omitted.
|
|
68
|
+
*
|
|
69
|
+
* Scoping: a `document` id expands to its requirement children; a `requirement`
|
|
70
|
+
* id is itself; anything else (an acceptance criterion, a domain fact, a brief)
|
|
71
|
+
* is reported as a single entry with no children. An unknown id — or a spec with
|
|
72
|
+
* no children and no links — returns an empty-but-valid report, never an error
|
|
73
|
+
* (REQ-VSTATE-006.A4).
|
|
74
|
+
*/
|
|
75
|
+
function computeSpecCoverage(sq, specId) {
|
|
76
|
+
let roots;
|
|
77
|
+
if (specId) {
|
|
78
|
+
const spec = sq.getSpecById(specId);
|
|
79
|
+
if (!spec) {
|
|
80
|
+
return {
|
|
81
|
+
specId,
|
|
82
|
+
requirements: [],
|
|
83
|
+
totals: { requirements: 0, criteria: 0, criteriaWithTests: 0, criteriaVerified: 0, criteriaBroken: 0 },
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
roots =
|
|
87
|
+
spec.kind === 'document'
|
|
88
|
+
? sq.getSpecsByParent(spec.id).filter((s) => s.kind === 'requirement')
|
|
89
|
+
: [spec];
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
roots = sq.getAllSpecs().filter((s) => s.kind === 'requirement');
|
|
93
|
+
}
|
|
94
|
+
const requirements = roots.map((req) => {
|
|
95
|
+
const own = coverageOf(sq, req);
|
|
96
|
+
const criteria = sq
|
|
97
|
+
.getSpecsByParent(req.id)
|
|
98
|
+
.filter((c) => c.kind === 'acceptance')
|
|
99
|
+
.map((c) => coverageOf(sq, c));
|
|
100
|
+
const criteriaTotals = {
|
|
101
|
+
untested: 0,
|
|
102
|
+
tested: 0,
|
|
103
|
+
verified: 0,
|
|
104
|
+
broken: 0,
|
|
105
|
+
};
|
|
106
|
+
for (const c of criteria)
|
|
107
|
+
criteriaTotals[c.verdict]++;
|
|
108
|
+
// A requirement with no acceptance children IS its own single criterion —
|
|
109
|
+
// the same convention the workflow coverage line has always used.
|
|
110
|
+
const criteriaCount = criteria.length > 0 ? criteria.length : 1;
|
|
111
|
+
// "has linked tests" means USABLE test evidence — `untested` is exactly the
|
|
112
|
+
// verdict for "no tests link that could ever prove this".
|
|
113
|
+
const criteriaWithTests = criteria.length > 0
|
|
114
|
+
? criteria.filter((c) => c.verdict !== 'untested').length
|
|
115
|
+
: own.verdict === 'untested'
|
|
116
|
+
? 0
|
|
117
|
+
: 1;
|
|
118
|
+
if (criteria.length === 0)
|
|
119
|
+
criteriaTotals[own.verdict]++;
|
|
120
|
+
return {
|
|
121
|
+
...own,
|
|
122
|
+
verdict: mergeVerdicts(criteria.length > 0 ? criteria.map((c) => c.verdict) : [own.verdict]),
|
|
123
|
+
criteria,
|
|
124
|
+
criteriaTotals,
|
|
125
|
+
criteriaWithTests,
|
|
126
|
+
criteriaCount,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
specId: specId ?? null,
|
|
131
|
+
requirements,
|
|
132
|
+
totals: {
|
|
133
|
+
requirements: requirements.length,
|
|
134
|
+
criteria: requirements.reduce((n, r) => n + r.criteriaCount, 0),
|
|
135
|
+
criteriaWithTests: requirements.reduce((n, r) => n + r.criteriaWithTests, 0),
|
|
136
|
+
criteriaVerified: requirements.reduce((n, r) => n + r.criteriaTotals.verified, 0),
|
|
137
|
+
criteriaBroken: requirements.reduce((n, r) => n + r.criteriaTotals.broken, 0),
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The single coverage line the implement workflow's human gate rests on
|
|
143
|
+
* (REQ-VSTATE-005.A2). Rendered here, from the same report `getSpecCoverage`
|
|
144
|
+
* returns, so the workflow's number and the API's number cannot disagree —
|
|
145
|
+
* previously an LLM counted it by eye.
|
|
146
|
+
*/
|
|
147
|
+
function formatCoverageLine(report) {
|
|
148
|
+
const subject = report.specId ?? 'the project';
|
|
149
|
+
const { criteriaWithTests, criteria } = report.totals;
|
|
150
|
+
return `${criteriaWithTests} of ${criteria} acceptance criteria for ${subject} have linked tests.`;
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=spec-coverage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-coverage.js","sourceRoot":"","sources":["../../src/graph/spec-coverage.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAqEH,gCAMC;AAkCD,kDAsEC;AAQD,gDAIC;AA3LD,qEAAmE;AAqDnE,SAAS,MAAM,CAAC,KAAiB;IAC/B,MAAM,MAAM,GAA2C,EAAE,CAAC;IAC1D,KAAK,MAAM,CAAC,IAAI,KAAK;QAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACpE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;AACzC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,UAAU,CAAC,UAAsB;IAC/C,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,C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CACrE;YACD,QAAQ;YACR,cAAc;YACd,iBAAiB;YACjB,aAAa;SACd,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,MAAM,EAAE,MAAM,IAAI,IAAI;QACtB,YAAY;QACZ,MAAM,EAAE;YACN,YAAY,EAAE,YAAY,CAAC,MAAM;YACjC,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC;YAC/D,iBAAiB,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC;YAC5E,gBAAgB,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;YACjF,cAAc,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;SAC9E;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,MAA0B;IAC3D,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,IAAI,aAAa,CAAC;IAC/C,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC;IACtD,OAAO,GAAG,iBAAiB,OAAO,QAAQ,4BAA4B,OAAO,qBAAqB,CAAC;AACrG,CAAC"}
|
package/lib/dist/index.d.ts
CHANGED
|
@@ -10,13 +10,15 @@ import { ResolutionResult } from './resolution';
|
|
|
10
10
|
import { SpecLinkResolver, SpecLinkResolverStats } from './resolution/spec-link-resolver';
|
|
11
11
|
import { SpecFunnel } from './resolution/brief-link-resolver';
|
|
12
12
|
import { DomainGapSeed } from './resolution/domain-gap-seed';
|
|
13
|
+
import { SpecCoverageReport } from './graph/spec-coverage';
|
|
14
|
+
import { VerifyReportResult } from './verify/report-ingest';
|
|
13
15
|
import { SpecQueries } from './db/spec-queries';
|
|
14
16
|
import { AnalyzeResult, SweepResult, Proposal, ProposalState, PreviewResult, ApplyOutcome, UndoOutcome } from './reflect';
|
|
15
17
|
import { RunEta } from './workflows/eta';
|
|
16
18
|
export type { RunEta, RunEtaAvailable, RunEtaUnavailable } from './workflows/eta';
|
|
17
19
|
import { MaintainabilityReport, MaintainabilityThresholds } from './graph/maintainability';
|
|
18
20
|
import { FitnessReport, FitnessRule } from './fitness/fitness';
|
|
19
|
-
import { EnforceConfig, EnforceReport } from './enforce/enforce';
|
|
21
|
+
import { EnforceConfig, EnforceReport, EnforceScope } from './enforce/enforce';
|
|
20
22
|
import { BehaviourSurface } from './behaviour/behaviour-surface';
|
|
21
23
|
import { FlowDiagramOptions, FlowDiagramResult } from './diagram/flow-diagram';
|
|
22
24
|
import { WatchOptions, PendingFile } from './sync';
|
|
@@ -30,6 +32,11 @@ export { ResolutionResult } from './resolution';
|
|
|
30
32
|
export { computeSpecFunnel, resolveBriefLink, summarizeBriefFunnel, findBriefsForSpec, } from './resolution/brief-link-resolver';
|
|
31
33
|
export type { SpecFunnel, SpecFunnelSummary, SpecFunnelDoc, BriefLink, BriefLinkState, BriefRollup, BriefFunnelEntry, } from './resolution/brief-link-resolver';
|
|
32
34
|
export { computeDomainGapSeed } from './resolution/domain-gap-seed';
|
|
35
|
+
export { computeSpecCoverage, formatCoverageLine, verdictFor } from './graph/spec-coverage';
|
|
36
|
+
export type { SpecCoverageReport, RequirementCoverage, CriterionCoverage, CoverageVerdict, LinkRollup, } from './graph/spec-coverage';
|
|
37
|
+
export { ingestTestReport, parseVitestJsonReport, caseMatchesLink, TestReportParseError, } from './verify/report-ingest';
|
|
38
|
+
export type { VerifyReportResult, ReportedTestCase, LinkOutcome } from './verify/report-ingest';
|
|
39
|
+
export { isRecognizedTestFile, isNonTestEvidence, scanTestTitleRefs } from './resolution/test-title-links';
|
|
33
40
|
export type { DomainGapSeed, GapSeedEntity, GapSeedSpec, DomainCoverage, } from './resolution/domain-gap-seed';
|
|
34
41
|
export { analyze as reflectAnalyze, sweep as reflectSweep, ReflectStore, previewProposal, applyProposal, undoProposal, } from './reflect';
|
|
35
42
|
export type { Proposal, ProposalType, ProposalSeverity, ProposalState, TargetKind, ProposalEvidence, ProposalPayload, PreviewResult, ApplyOutcome, UndoOutcome, ReflectContext, AnalyzeResult, SweepResult, } from './reflect';
|
|
@@ -37,10 +44,11 @@ export { computeMaintainability, resolveThresholds, resolveExclude, DEFAULT_THRE
|
|
|
37
44
|
export { collectFlows, renderMermaidFlowchart, writeFlowDiagramIfChanged, shouldAutoRefreshDiagram, resolveDiagramConfig, DEFAULT_DIAGRAM_OPTIONS } from './diagram/flow-diagram';
|
|
38
45
|
export type { FlowDiagramOptions, FlowDiagramConfig, FlowDiagramResult, FlowGraph } from './diagram/flow-diagram';
|
|
39
46
|
export { evaluateFitness, loadFitnessRules, FITNESS_CONFIG_FILE } from './fitness/fitness';
|
|
40
|
-
export { evaluateEnforcement, loadEnforceConfig, ENFORCE_CONFIG_FILE } from './enforce/enforce';
|
|
47
|
+
export { evaluateEnforcement, loadEnforceConfig, ENFORCE_CONFIG_FILE, normalizePath } from './enforce/enforce';
|
|
48
|
+
export { changedFilesSince, InvalidRefError } from './enforce/changed-files';
|
|
41
49
|
export { computeBehaviourSurface, renderBehaviourSurface, isUiNode } from './behaviour/behaviour-surface';
|
|
42
50
|
export type { BehaviourSurface, BehaviourFlowElement, BehaviourSurfaceDeps } from './behaviour/behaviour-surface';
|
|
43
|
-
export type { EnforceConfig, GateConfig, EnforceReport, EnforceDeps, CheckOutcome, CheckName, RequirementVerification, } from './enforce/enforce';
|
|
51
|
+
export type { EnforceConfig, GateConfig, EnforceReport, EnforceDeps, EnforceScope, CheckOutcome, CheckName, RequirementVerification, } from './enforce/enforce';
|
|
44
52
|
export type { FitnessRule, ForbiddenRule, LayersRule, IsolationRule, FitnessReport, FitnessViolation, FitnessConfigError, Selector, } from './fitness/fitness';
|
|
45
53
|
export type { MaintainabilityReport, MaintainabilityThresholds, CouplingFinding, OversizedFinding, GodFileFinding, CycleFinding, DeadCodeFinding, } from './graph/maintainability';
|
|
46
54
|
export { SpecShipError, FileError, ParseError, DatabaseError, SearchError, VectorError, ConfigError, Logger, setLogger, getLogger, silentLogger, defaultLogger, } from './errors';
|
|
@@ -107,6 +115,26 @@ export declare class SpecShip {
|
|
|
107
115
|
* package (it calls this on the dynamically-loaded SpecShip).
|
|
108
116
|
*/
|
|
109
117
|
getSpecFunnel(): SpecFunnel;
|
|
118
|
+
/**
|
|
119
|
+
* The spec coverage rollup (REQ-VSTATE-006): per requirement AND per
|
|
120
|
+
* acceptance criterion, the implements/tests link counts and states plus a
|
|
121
|
+
* verdict derived from `tests` links alone. Scoped to one spec id (a document
|
|
122
|
+
* expands to its requirements) or the whole project when omitted.
|
|
123
|
+
*
|
|
124
|
+
* Exposed on the instance so the MCP tool, the CLI and the desktop server all
|
|
125
|
+
* read the SAME numbers — the coverage line a human approves in the implement
|
|
126
|
+
* workflow is this function's output, not an LLM's count (REQ-VSTATE-005.A2).
|
|
127
|
+
*/
|
|
128
|
+
getSpecCoverage(specId?: string): SpecCoverageReport;
|
|
129
|
+
/**
|
|
130
|
+
* Ingest a test report (vitest JSON) and move `tests` links accordingly
|
|
131
|
+
* (REQ-VSTATE-004): a case that passed promotes its link to `verified` with
|
|
132
|
+
* the run recorded as evidence; a failure demotes it to `broken`. A malformed
|
|
133
|
+
* report throws {@link TestReportParseError} having changed nothing.
|
|
134
|
+
*/
|
|
135
|
+
verifyFromReport(reportPath: string, options?: {
|
|
136
|
+
runId?: string;
|
|
137
|
+
}): VerifyReportResult;
|
|
110
138
|
/**
|
|
111
139
|
* The domain gap-seed (REQ-DOMAIN-003): the structural code entities and
|
|
112
140
|
* non-domain specs that no domain fact yet covers, plus a coverage tally.
|
|
@@ -147,8 +175,12 @@ export declare class SpecShip {
|
|
|
147
175
|
* explicit override); with no config every check is advisory and the run
|
|
148
176
|
* passes. The behaviour chain reads `tests`-kind spec-links on each requirement
|
|
149
177
|
* and its acceptance criteria (verified = passing, broken = ran-and-failed).
|
|
178
|
+
*
|
|
179
|
+
* `scope` narrows the link-scoped checks to a set of changed files
|
|
180
|
+
* (REQ-AUTHG-006) — `specship check --since <ref>` supplies it. Omitted, the
|
|
181
|
+
* gate evaluates the whole repository exactly as before.
|
|
150
182
|
*/
|
|
151
|
-
getEnforce(config?: EnforceConfig): EnforceReport;
|
|
183
|
+
getEnforce(config?: EnforceConfig, scope?: EnforceScope): EnforceReport;
|
|
152
184
|
/**
|
|
153
185
|
* The behaviour surface for a requirement (REQ-BEHAVIOUR-001): its linked code
|
|
154
186
|
* plus the 1-hop route / component / handler neighbourhood, grouped UI vs
|
|
@@ -263,11 +295,40 @@ export declare class SpecShip {
|
|
|
263
295
|
* errors and this wrapper guards the data-gathering too.
|
|
264
296
|
*/
|
|
265
297
|
private refreshStatuslineCache;
|
|
298
|
+
/**
|
|
299
|
+
* Re-extract ONE spec file without ever deleting the specs it still declares
|
|
300
|
+
* (REQ-VSTATE-001).
|
|
301
|
+
*
|
|
302
|
+
* `spec_links.spec_id` is `ON DELETE CASCADE`, so the delete-then-reinsert
|
|
303
|
+
* shape that spec indexing used to have destroyed every link the file did not
|
|
304
|
+
* re-declare — every agent-asserted `tests` link, every verification record —
|
|
305
|
+
* on any edit to any part of the file. Which also meant the sticky-state and
|
|
306
|
+
* spec-axis-drift machinery never ran on the real edit path: there was
|
|
307
|
+
* nothing left to transition.
|
|
308
|
+
*
|
|
309
|
+
* The fix is to make the destructive window not exist rather than to repair
|
|
310
|
+
* it afterwards: `insertSpec` upserts, so a surviving spec's row (and every
|
|
311
|
+
* link hanging off it) is never deleted, and `sweepRemovedSpecs` deletes only
|
|
312
|
+
* the ids the author actually removed (A3). Nothing is snapshotted, so
|
|
313
|
+
* nothing can be lost in a round-trip.
|
|
314
|
+
*
|
|
315
|
+
* Surviving specs keep their links, which makes the file's OWN declarations
|
|
316
|
+
* the other half of the contract: a `verifies:` / `implementations:` bullet
|
|
317
|
+
* the author deleted must take its link with it, or removing a declaration
|
|
318
|
+
* would silently mean nothing. `reconcileDeclaredLinks` drops exactly those —
|
|
319
|
+
* `spec-declaration` provenance only, never a link the file cannot re-create.
|
|
320
|
+
*
|
|
321
|
+
* The caller then applies the file's own declarations and runs the spec-axis
|
|
322
|
+
* drift rule over the surviving rows.
|
|
323
|
+
*/
|
|
324
|
+
private replaceSpecsForFile;
|
|
266
325
|
/**
|
|
267
326
|
* Internal spec indexing — does NOT take the indexMutex (caller already holds it)
|
|
268
327
|
* and does NOT take the fileLock. Used by indexAll and sync, which manage locks
|
|
269
328
|
* themselves. Returns the links that transitioned into `drifted` during the
|
|
270
|
-
* pass (spec-side and code-side) so sync can push them (REQ-DRIFT-PUSH-001)
|
|
329
|
+
* pass (spec-side and code-side) so sync can push them (REQ-DRIFT-PUSH-001),
|
|
330
|
+
* plus the extraction error/warning counts over the files it reparsed so the
|
|
331
|
+
* caller can surface them the way `indexSpecs` does (REQ-REVINT-002.A2).
|
|
271
332
|
*
|
|
272
333
|
* The per-file content-hash guard makes re-runs cheap; the comment-link scan
|
|
273
334
|
* + full link re-resolution at the end runs only when a spec file actually
|
|
@@ -284,7 +345,9 @@ export declare class SpecShip {
|
|
|
284
345
|
*
|
|
285
346
|
* Pipeline per file:
|
|
286
347
|
* 1. Hash file content; skip if `spec_files.content_hash` matches.
|
|
287
|
-
* 2.
|
|
348
|
+
* 2. Replace prior specs for this file, restoring their links afterwards
|
|
349
|
+
* (REQ-VSTATE-001) — only links of spec ids the file no longer declares
|
|
350
|
+
* are swept.
|
|
288
351
|
* 3. Run MarkdownSpecExtractor → insert specs + virtual node projections.
|
|
289
352
|
* 4. Apply `spec-declaration` link candidates from `implementations:`.
|
|
290
353
|
* 5. Mark previously-linked specs as drifted (drift_axis='spec') when
|
package/lib/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,UAAU,EACV,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAWjB,OAAO,EAEL,aAAa,EACb,WAAW,EACX,UAAU,EAGX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAGL,gBAAgB,EACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAmB,MAAM,iCAAiC,CAAC;AAC3G,OAAO,EAAqB,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAwB,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EASL,aAAa,EACb,WAAW,EACX,QAAQ,EACR,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAwC,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC/E,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKlF,OAAO,EAIL,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,aAAa,EACb,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAGL,aAAa,EACb,aAAa,EAEd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA2B,gBAAgB,EAAE,MAAM,+BAA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,IAAI,EAAE;IAI5C;;;;;OAKG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG;QAC9B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf;IAQD;;;;;;;OAOG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIrD;;;;;;;;;OASG;IACG,mBAAmB,CACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,QAAQ,CAAC;IAIpB;;;;;;;;;;;;OAYG;IACG,YAAY,CAChB,KAAK,EAAE,SAAS,EAChB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC;IAQhC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAIhB;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;;OAGG;IACH,OAAO,IAAI,IAAI;IAIf;;;;;OAKG;IACH,YAAY,IAAI,IAAI;CAIrB;AAGD,eAAe,QAAQ,CAAC"}
|
package/lib/dist/index.js
CHANGED
|
@@ -42,8 +42,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
42
42
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.
|
|
46
|
-
exports.SpecShip = exports.MCPServer = exports.LockUnavailableError = exports.FileWatcher = exports.MemoryMonitor = exports.throttle = exports.debounce = exports.processInBatches = exports.FileLock = exports.Mutex = exports.defaultLogger = exports.silentLogger = exports.getLogger = exports.setLogger = exports.ConfigError = exports.VectorError = exports.SearchError = exports.DatabaseError = exports.ParseError = exports.FileError = void 0;
|
|
45
|
+
exports.DEFAULT_DIAGRAM_OPTIONS = exports.resolveDiagramConfig = exports.shouldAutoRefreshDiagram = exports.writeFlowDiagramIfChanged = exports.renderMermaidFlowchart = exports.collectFlows = exports.highPrecisionClean = exports.LOW_CONFIDENCE_CLASSES = exports.HIGH_PRECISION_CLASSES = exports.CONFIG_FILE_NAME = exports.DEFAULT_EXCLUDE = exports.DEFAULT_THRESHOLDS = exports.resolveExclude = exports.resolveThresholds = exports.computeMaintainability = exports.undoProposal = exports.applyProposal = exports.previewProposal = exports.ReflectStore = exports.reflectSweep = exports.reflectAnalyze = exports.scanTestTitleRefs = exports.isNonTestEvidence = exports.isRecognizedTestFile = exports.TestReportParseError = exports.caseMatchesLink = exports.parseVitestJsonReport = exports.ingestTestReport = exports.verdictFor = exports.formatCoverageLine = exports.computeSpecCoverage = exports.computeDomainGapSeed = exports.findBriefsForSpec = exports.summarizeBriefFunnel = exports.resolveBriefLink = exports.computeSpecFunnel = exports.loadAllGrammars = exports.loadGrammarsForLanguages = exports.initGrammars = exports.getSupportedLanguages = exports.isGrammarLoaded = exports.isLanguageSupported = exports.detectLanguage = exports.SPECSHIP_DIR = exports.findNearestSpecShipRoot = exports.isInitialized = exports.getSpecShipDir = exports.QueryBuilder = exports.DatabaseConnection = exports.getDatabasePath = void 0;
|
|
46
|
+
exports.SpecShip = exports.MCPServer = exports.LockUnavailableError = exports.FileWatcher = exports.MemoryMonitor = exports.throttle = exports.debounce = exports.processInBatches = exports.FileLock = exports.Mutex = exports.defaultLogger = exports.silentLogger = exports.getLogger = exports.setLogger = exports.ConfigError = exports.VectorError = exports.SearchError = exports.DatabaseError = exports.ParseError = exports.FileError = exports.SpecShipError = exports.isUiNode = exports.renderBehaviourSurface = exports.computeBehaviourSurface = exports.InvalidRefError = exports.changedFilesSince = exports.normalizePath = exports.ENFORCE_CONFIG_FILE = exports.loadEnforceConfig = exports.evaluateEnforcement = exports.FITNESS_CONFIG_FILE = exports.loadFitnessRules = exports.evaluateFitness = void 0;
|
|
47
47
|
const path = __importStar(require("path"));
|
|
48
48
|
const db_1 = require("./db");
|
|
49
49
|
const queries_1 = require("./db/queries");
|
|
@@ -55,6 +55,8 @@ const resolution_1 = require("./resolution");
|
|
|
55
55
|
const spec_link_resolver_1 = require("./resolution/spec-link-resolver");
|
|
56
56
|
const brief_link_resolver_1 = require("./resolution/brief-link-resolver");
|
|
57
57
|
const domain_gap_seed_1 = require("./resolution/domain-gap-seed");
|
|
58
|
+
const spec_coverage_1 = require("./graph/spec-coverage");
|
|
59
|
+
const report_ingest_1 = require("./verify/report-ingest");
|
|
58
60
|
const spec_queries_1 = require("./db/spec-queries");
|
|
59
61
|
const reflect_1 = require("./reflect");
|
|
60
62
|
const eta_1 = require("./workflows/eta");
|
|
@@ -101,6 +103,20 @@ Object.defineProperty(exports, "summarizeBriefFunnel", { enumerable: true, get:
|
|
|
101
103
|
Object.defineProperty(exports, "findBriefsForSpec", { enumerable: true, get: function () { return brief_link_resolver_2.findBriefsForSpec; } });
|
|
102
104
|
var domain_gap_seed_2 = require("./resolution/domain-gap-seed");
|
|
103
105
|
Object.defineProperty(exports, "computeDomainGapSeed", { enumerable: true, get: function () { return domain_gap_seed_2.computeDomainGapSeed; } });
|
|
106
|
+
// Spec coverage rollup + test-report ingestion (VSTATE-DOC).
|
|
107
|
+
var spec_coverage_2 = require("./graph/spec-coverage");
|
|
108
|
+
Object.defineProperty(exports, "computeSpecCoverage", { enumerable: true, get: function () { return spec_coverage_2.computeSpecCoverage; } });
|
|
109
|
+
Object.defineProperty(exports, "formatCoverageLine", { enumerable: true, get: function () { return spec_coverage_2.formatCoverageLine; } });
|
|
110
|
+
Object.defineProperty(exports, "verdictFor", { enumerable: true, get: function () { return spec_coverage_2.verdictFor; } });
|
|
111
|
+
var report_ingest_2 = require("./verify/report-ingest");
|
|
112
|
+
Object.defineProperty(exports, "ingestTestReport", { enumerable: true, get: function () { return report_ingest_2.ingestTestReport; } });
|
|
113
|
+
Object.defineProperty(exports, "parseVitestJsonReport", { enumerable: true, get: function () { return report_ingest_2.parseVitestJsonReport; } });
|
|
114
|
+
Object.defineProperty(exports, "caseMatchesLink", { enumerable: true, get: function () { return report_ingest_2.caseMatchesLink; } });
|
|
115
|
+
Object.defineProperty(exports, "TestReportParseError", { enumerable: true, get: function () { return report_ingest_2.TestReportParseError; } });
|
|
116
|
+
var test_title_links_1 = require("./resolution/test-title-links");
|
|
117
|
+
Object.defineProperty(exports, "isRecognizedTestFile", { enumerable: true, get: function () { return test_title_links_1.isRecognizedTestFile; } });
|
|
118
|
+
Object.defineProperty(exports, "isNonTestEvidence", { enumerable: true, get: function () { return test_title_links_1.isNonTestEvidence; } });
|
|
119
|
+
Object.defineProperty(exports, "scanTestTitleRefs", { enumerable: true, get: function () { return test_title_links_1.scanTestTitleRefs; } });
|
|
104
120
|
// Reflection engine (REFLECT-DOC) — proposals mined from transcripts.
|
|
105
121
|
var reflect_2 = require("./reflect");
|
|
106
122
|
Object.defineProperty(exports, "reflectAnalyze", { enumerable: true, get: function () { return reflect_2.analyze; } });
|
|
@@ -137,6 +153,11 @@ var enforce_2 = require("./enforce/enforce");
|
|
|
137
153
|
Object.defineProperty(exports, "evaluateEnforcement", { enumerable: true, get: function () { return enforce_2.evaluateEnforcement; } });
|
|
138
154
|
Object.defineProperty(exports, "loadEnforceConfig", { enumerable: true, get: function () { return enforce_2.loadEnforceConfig; } });
|
|
139
155
|
Object.defineProperty(exports, "ENFORCE_CONFIG_FILE", { enumerable: true, get: function () { return enforce_2.ENFORCE_CONFIG_FILE; } });
|
|
156
|
+
Object.defineProperty(exports, "normalizePath", { enumerable: true, get: function () { return enforce_2.normalizePath; } });
|
|
157
|
+
// Change-scoped gating (REQ-AUTHG-006) — `specship check --since <ref>`.
|
|
158
|
+
var changed_files_1 = require("./enforce/changed-files");
|
|
159
|
+
Object.defineProperty(exports, "changedFilesSince", { enumerable: true, get: function () { return changed_files_1.changedFilesSince; } });
|
|
160
|
+
Object.defineProperty(exports, "InvalidRefError", { enumerable: true, get: function () { return changed_files_1.InvalidRefError; } });
|
|
140
161
|
// Behaviour surface (BEHAVIOUR-DOC / REQ-BEHAVIOUR-001).
|
|
141
162
|
var behaviour_surface_2 = require("./behaviour/behaviour-surface");
|
|
142
163
|
Object.defineProperty(exports, "computeBehaviourSurface", { enumerable: true, get: function () { return behaviour_surface_2.computeBehaviourSurface; } });
|
|
@@ -196,7 +217,10 @@ class SpecShip {
|
|
|
196
217
|
this.fileLock = new utils_1.FileLock(path.join((0, directory_1.getSpecShipDir)(projectRoot), 'specship.lock'));
|
|
197
218
|
this.orchestrator = new extraction_1.ExtractionOrchestrator(projectRoot, queries);
|
|
198
219
|
this.resolver = (0, resolution_1.createResolver)(projectRoot, queries);
|
|
199
|
-
this.specLinkResolver = new spec_link_resolver_1.SpecLinkResolver(queries, this.specQueries
|
|
220
|
+
this.specLinkResolver = new spec_link_resolver_1.SpecLinkResolver(queries, this.specQueries, {
|
|
221
|
+
// The test-title evidence pass reads test files from disk (REQ-VSTATE-002).
|
|
222
|
+
projectRoot,
|
|
223
|
+
});
|
|
200
224
|
this.graphManager = new graph_1.GraphQueryManager(queries);
|
|
201
225
|
this.traverser = new graph_1.GraphTraverser(queries);
|
|
202
226
|
this.contextBuilder = (0, context_1.createContextBuilder)(projectRoot, queries, this.traverser);
|
|
@@ -218,6 +242,28 @@ class SpecShip {
|
|
|
218
242
|
getSpecFunnel() {
|
|
219
243
|
return (0, brief_link_resolver_1.computeSpecFunnel)(this.specQueries);
|
|
220
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* The spec coverage rollup (REQ-VSTATE-006): per requirement AND per
|
|
247
|
+
* acceptance criterion, the implements/tests link counts and states plus a
|
|
248
|
+
* verdict derived from `tests` links alone. Scoped to one spec id (a document
|
|
249
|
+
* expands to its requirements) or the whole project when omitted.
|
|
250
|
+
*
|
|
251
|
+
* Exposed on the instance so the MCP tool, the CLI and the desktop server all
|
|
252
|
+
* read the SAME numbers — the coverage line a human approves in the implement
|
|
253
|
+
* workflow is this function's output, not an LLM's count (REQ-VSTATE-005.A2).
|
|
254
|
+
*/
|
|
255
|
+
getSpecCoverage(specId) {
|
|
256
|
+
return (0, spec_coverage_1.computeSpecCoverage)(this.specQueries, specId);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Ingest a test report (vitest JSON) and move `tests` links accordingly
|
|
260
|
+
* (REQ-VSTATE-004): a case that passed promotes its link to `verified` with
|
|
261
|
+
* the run recorded as evidence; a failure demotes it to `broken`. A malformed
|
|
262
|
+
* report throws {@link TestReportParseError} having changed nothing.
|
|
263
|
+
*/
|
|
264
|
+
verifyFromReport(reportPath, options = {}) {
|
|
265
|
+
return (0, report_ingest_1.ingestTestReport)(this.specQueries, this.projectRoot, reportPath, options);
|
|
266
|
+
}
|
|
221
267
|
/**
|
|
222
268
|
* The domain gap-seed (REQ-DOMAIN-003): the structural code entities and
|
|
223
269
|
* non-domain specs that no domain fact yet covers, plus a coverage tally.
|
|
@@ -266,21 +312,31 @@ class SpecShip {
|
|
|
266
312
|
* explicit override); with no config every check is advisory and the run
|
|
267
313
|
* passes. The behaviour chain reads `tests`-kind spec-links on each requirement
|
|
268
314
|
* and its acceptance criteria (verified = passing, broken = ran-and-failed).
|
|
315
|
+
*
|
|
316
|
+
* `scope` narrows the link-scoped checks to a set of changed files
|
|
317
|
+
* (REQ-AUTHG-006) — `specship check --since <ref>` supplies it. Omitted, the
|
|
318
|
+
* gate evaluates the whole repository exactly as before.
|
|
269
319
|
*/
|
|
270
|
-
getEnforce(config) {
|
|
320
|
+
getEnforce(config, scope) {
|
|
271
321
|
const cfg = config ?? (0, enforce_1.loadEnforceConfig)(this.projectRoot);
|
|
272
322
|
const sq = this.specQueries;
|
|
273
323
|
const drift = sq.getLinksByState(['drifted', 'broken', 'orphaned']);
|
|
274
324
|
const requirements = sq.getSpecsByKind('requirement').map((req) => {
|
|
275
|
-
const
|
|
325
|
+
const ownLinks = sq.getLinksBySpec(req.id);
|
|
326
|
+
const testsLinks = ownLinks.filter((l) => l.kind === 'tests');
|
|
327
|
+
// Every link target, any kind — a change to implementation code brings
|
|
328
|
+
// its requirement into a scoped run, not just a change to its tests.
|
|
329
|
+
const linkedFiles = ownLinks.map((l) => l.targetFilePath);
|
|
276
330
|
for (const child of sq.getSpecsByParent(req.id)) {
|
|
277
331
|
if (child.kind === 'acceptance') {
|
|
278
|
-
|
|
332
|
+
const childLinks = sq.getLinksBySpec(child.id);
|
|
333
|
+
testsLinks.push(...childLinks.filter((l) => l.kind === 'tests'));
|
|
334
|
+
linkedFiles.push(...childLinks.map((l) => l.targetFilePath));
|
|
279
335
|
}
|
|
280
336
|
}
|
|
281
|
-
return { id: req.id, title: req.title, testsLinks };
|
|
337
|
+
return { id: req.id, title: req.title, testsLinks, sourcePath: req.sourcePath, linkedFiles };
|
|
282
338
|
});
|
|
283
|
-
return (0, enforce_1.evaluateEnforcement)({ drift, fitness: this.getFitness(), maintainability: this.getMaintainability(), requirements }, cfg);
|
|
339
|
+
return (0, enforce_1.evaluateEnforcement)({ drift, fitness: this.getFitness(), maintainability: this.getMaintainability(), requirements }, cfg, scope);
|
|
284
340
|
}
|
|
285
341
|
/**
|
|
286
342
|
* The behaviour surface for a requirement (REQ-BEHAVIOUR-001): its linked code
|
|
@@ -696,11 +752,57 @@ class SpecShip {
|
|
|
696
752
|
/* best-effort — never let a cache refresh affect indexing */
|
|
697
753
|
}
|
|
698
754
|
}
|
|
755
|
+
/**
|
|
756
|
+
* Re-extract ONE spec file without ever deleting the specs it still declares
|
|
757
|
+
* (REQ-VSTATE-001).
|
|
758
|
+
*
|
|
759
|
+
* `spec_links.spec_id` is `ON DELETE CASCADE`, so the delete-then-reinsert
|
|
760
|
+
* shape that spec indexing used to have destroyed every link the file did not
|
|
761
|
+
* re-declare — every agent-asserted `tests` link, every verification record —
|
|
762
|
+
* on any edit to any part of the file. Which also meant the sticky-state and
|
|
763
|
+
* spec-axis-drift machinery never ran on the real edit path: there was
|
|
764
|
+
* nothing left to transition.
|
|
765
|
+
*
|
|
766
|
+
* The fix is to make the destructive window not exist rather than to repair
|
|
767
|
+
* it afterwards: `insertSpec` upserts, so a surviving spec's row (and every
|
|
768
|
+
* link hanging off it) is never deleted, and `sweepRemovedSpecs` deletes only
|
|
769
|
+
* the ids the author actually removed (A3). Nothing is snapshotted, so
|
|
770
|
+
* nothing can be lost in a round-trip.
|
|
771
|
+
*
|
|
772
|
+
* Surviving specs keep their links, which makes the file's OWN declarations
|
|
773
|
+
* the other half of the contract: a `verifies:` / `implementations:` bullet
|
|
774
|
+
* the author deleted must take its link with it, or removing a declaration
|
|
775
|
+
* would silently mean nothing. `reconcileDeclaredLinks` drops exactly those —
|
|
776
|
+
* `spec-declaration` provenance only, never a link the file cannot re-create.
|
|
777
|
+
*
|
|
778
|
+
* The caller then applies the file's own declarations and runs the spec-axis
|
|
779
|
+
* drift rule over the surviving rows.
|
|
780
|
+
*/
|
|
781
|
+
replaceSpecsForFile(rel, source, stats) {
|
|
782
|
+
const result = new markdown_spec_extractor_1.MarkdownSpecExtractor(rel, source).extract();
|
|
783
|
+
this.specQueries.insertSpecsBatch(result.specs);
|
|
784
|
+
this.specQueries.sweepRemovedSpecs(rel, result.specs.map((s) => s.id));
|
|
785
|
+
// Canonicalized exactly as applyDeclarationCandidates canonicalizes before
|
|
786
|
+
// upserting, so a surviving declaration matches its own row instead of
|
|
787
|
+
// being dropped and re-created every pass.
|
|
788
|
+
const reconciled = this.specQueries.reconcileDeclaredLinks(rel, result.linkCandidates.map((c) => ({
|
|
789
|
+
specId: c.specId,
|
|
790
|
+
targetFilePath: c.targetFilePath,
|
|
791
|
+
targetQualifiedName: (0, spec_link_resolver_1.canonicalQualifiedName)(c.targetQualifiedName),
|
|
792
|
+
kind: c.kind,
|
|
793
|
+
})));
|
|
794
|
+
if (stats && reconciled > 0) {
|
|
795
|
+
stats.declarationsReconciled = (stats.declarationsReconciled ?? 0) + reconciled;
|
|
796
|
+
}
|
|
797
|
+
return result;
|
|
798
|
+
}
|
|
699
799
|
/**
|
|
700
800
|
* Internal spec indexing — does NOT take the indexMutex (caller already holds it)
|
|
701
801
|
* and does NOT take the fileLock. Used by indexAll and sync, which manage locks
|
|
702
802
|
* themselves. Returns the links that transitioned into `drifted` during the
|
|
703
|
-
* pass (spec-side and code-side) so sync can push them (REQ-DRIFT-PUSH-001)
|
|
803
|
+
* pass (spec-side and code-side) so sync can push them (REQ-DRIFT-PUSH-001),
|
|
804
|
+
* plus the extraction error/warning counts over the files it reparsed so the
|
|
805
|
+
* caller can surface them the way `indexSpecs` does (REQ-REVINT-002.A2).
|
|
704
806
|
*
|
|
705
807
|
* The per-file content-hash guard makes re-runs cheap; the comment-link scan
|
|
706
808
|
* + full link re-resolution at the end runs only when a spec file actually
|
|
@@ -710,6 +812,8 @@ class SpecShip {
|
|
|
710
812
|
*/
|
|
711
813
|
async indexSpecsInternal(forceResolve = true) {
|
|
712
814
|
const transitions = [];
|
|
815
|
+
let totalErrors = 0;
|
|
816
|
+
let totalWarnings = 0;
|
|
713
817
|
const specStats = {
|
|
714
818
|
scanned: 0, reresolved: 0, orphaned: 0, driftedCode: 0,
|
|
715
819
|
candidatesApplied: 0, commentLinksApplied: 0, reattached: 0, transitions,
|
|
@@ -717,7 +821,7 @@ class SpecShip {
|
|
|
717
821
|
let specFilesChanged = 0;
|
|
718
822
|
const specRoots = this.defaultSpecRoots();
|
|
719
823
|
if (specRoots.length === 0)
|
|
720
|
-
return transitions;
|
|
824
|
+
return { transitions, errors: totalErrors, warnings: totalWarnings };
|
|
721
825
|
const specFiles = [];
|
|
722
826
|
for (const root of specRoots) {
|
|
723
827
|
this.collectSpecFiles(root, specFiles);
|
|
@@ -738,9 +842,9 @@ class SpecShip {
|
|
|
738
842
|
if (existing && existing.contentHash === hashHex)
|
|
739
843
|
continue;
|
|
740
844
|
specFilesChanged++;
|
|
741
|
-
this.
|
|
742
|
-
|
|
743
|
-
|
|
845
|
+
const result = this.replaceSpecsForFile(rel, source, specStats);
|
|
846
|
+
totalErrors += result.errors.filter((e) => e.severity === 'error').length;
|
|
847
|
+
totalWarnings += result.errors.filter((e) => e.severity === 'warning').length;
|
|
744
848
|
this.specQueries.upsertSpecFile({
|
|
745
849
|
path: rel,
|
|
746
850
|
contentHash: hashHex,
|
|
@@ -760,10 +864,11 @@ class SpecShip {
|
|
|
760
864
|
if (specFilesChanged > 0 || forceResolve) {
|
|
761
865
|
const allFiles = this.queries.getAllFiles().map((f) => f.path);
|
|
762
866
|
this.specLinkResolver.applyCodeCommentLinks(allFiles);
|
|
867
|
+
this.specLinkResolver.applyTestTitleLinks(allFiles, specStats);
|
|
763
868
|
const resolveStats = this.specLinkResolver.resolveAll();
|
|
764
869
|
transitions.push(...resolveStats.transitions);
|
|
765
870
|
}
|
|
766
|
-
return transitions;
|
|
871
|
+
return { transitions, errors: totalErrors, warnings: totalWarnings };
|
|
767
872
|
}
|
|
768
873
|
/**
|
|
769
874
|
* Index spec files (Markdown only in v1).
|
|
@@ -773,7 +878,9 @@ class SpecShip {
|
|
|
773
878
|
*
|
|
774
879
|
* Pipeline per file:
|
|
775
880
|
* 1. Hash file content; skip if `spec_files.content_hash` matches.
|
|
776
|
-
* 2.
|
|
881
|
+
* 2. Replace prior specs for this file, restoring their links afterwards
|
|
882
|
+
* (REQ-VSTATE-001) — only links of spec ids the file no longer declares
|
|
883
|
+
* are swept.
|
|
777
884
|
* 3. Run MarkdownSpecExtractor → insert specs + virtual node projections.
|
|
778
885
|
* 4. Apply `spec-declaration` link candidates from `implementations:`.
|
|
779
886
|
* 5. Mark previously-linked specs as drifted (drift_axis='spec') when
|
|
@@ -845,11 +952,10 @@ class SpecShip {
|
|
|
845
952
|
skipped++;
|
|
846
953
|
continue;
|
|
847
954
|
}
|
|
848
|
-
// Replace prior specs for this file
|
|
849
|
-
//
|
|
850
|
-
|
|
851
|
-
const result =
|
|
852
|
-
this.specQueries.insertSpecsBatch(result.specs);
|
|
955
|
+
// Replace prior specs for this file, preserving their links
|
|
956
|
+
// (REQ-VSTATE-001) — the CASCADE would otherwise take every link the
|
|
957
|
+
// file doesn't re-declare with it.
|
|
958
|
+
const result = this.replaceSpecsForFile(rel, source, stats);
|
|
853
959
|
this.specQueries.upsertSpecFile({
|
|
854
960
|
path: rel,
|
|
855
961
|
contentHash: hashHex,
|
|
@@ -879,6 +985,9 @@ class SpecShip {
|
|
|
879
985
|
// node count is bounded and the scan is O(N) regex over docstrings).
|
|
880
986
|
const allFiles = this.queries.getAllFiles().map((f) => f.path);
|
|
881
987
|
this.specLinkResolver.applyCodeCommentLinks(allFiles, stats);
|
|
988
|
+
// Spec ids inside `it()` titles in test files → `tests` links
|
|
989
|
+
// (REQ-VSTATE-002).
|
|
990
|
+
this.specLinkResolver.applyTestTitleLinks(allFiles, stats);
|
|
882
991
|
// Re-resolve all links (post-extraction).
|
|
883
992
|
const resolveStats = this.specLinkResolver.resolveAll();
|
|
884
993
|
stats.scanned += resolveStats.scanned;
|
|
@@ -1037,7 +1146,10 @@ class SpecShip {
|
|
|
1037
1146
|
const codeChanged = result.filesAdded > 0 || result.filesModified > 0 || result.filesRemoved > 0;
|
|
1038
1147
|
this.fileLock.release();
|
|
1039
1148
|
try {
|
|
1040
|
-
|
|
1149
|
+
const specPass = await this.indexSpecsInternal(codeChanged);
|
|
1150
|
+
result.driftedTransitions = specPass.transitions;
|
|
1151
|
+
result.specErrors = specPass.errors;
|
|
1152
|
+
result.specWarnings = specPass.warnings;
|
|
1041
1153
|
}
|
|
1042
1154
|
catch {
|
|
1043
1155
|
// Non-fatal; the next full index catches up.
|