@holmes-lab/holmes-kit 0.35.24 → 0.36.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/CHANGELOG.md +363 -0
- package/README.md +4 -2
- package/dist/.build-id +1 -1
- package/dist/holmes/cli/approve-status.js +4 -1
- package/dist/holmes/cli/approve-watch.js +3 -1
- package/dist/holmes/cli/approve.d.ts +10 -0
- package/dist/holmes/cli/approve.js +34 -4
- package/dist/holmes/cli/claude-switches.d.ts +7 -1
- package/dist/holmes/cli/claude-switches.js +11 -7
- package/dist/holmes/cli/codex-toml.d.ts +3 -0
- package/dist/holmes/cli/codex-toml.js +2 -1
- package/dist/holmes/cli/doctor.d.ts +31 -1
- package/dist/holmes/cli/doctor.js +204 -7
- package/dist/holmes/cli/index.js +115 -4
- package/dist/holmes/cli/init.js +4 -3
- package/dist/holmes/cli/os-notify.d.ts +3 -1
- package/dist/holmes/cli/os-notify.js +10 -4
- package/dist/holmes/cli/review.d.ts +25 -0
- package/dist/holmes/cli/review.js +111 -0
- package/dist/holmes/cli/roles-readme.d.ts +11 -0
- package/dist/holmes/cli/roles-readme.js +38 -16
- package/dist/holmes/cli/roles.d.ts +12 -0
- package/dist/holmes/cli/roles.js +86 -0
- package/dist/holmes/cli/run.d.ts +65 -0
- package/dist/holmes/cli/run.js +308 -0
- package/dist/holmes/cli/runtime-binding-approval.js +3 -2
- package/dist/holmes/cli/runtime-binding.d.ts +30 -0
- package/dist/holmes/cli/runtime-binding.js +116 -11
- package/dist/holmes/cli/scratch.d.ts +12 -0
- package/dist/holmes/cli/scratch.js +20 -0
- package/dist/holmes/cli/test-platform.d.ts +16 -0
- package/dist/holmes/cli/test-platform.js +31 -1
- package/dist/holmes/config/config.d.ts +49 -0
- package/dist/holmes/config/config.js +146 -3
- package/dist/holmes/config/project-caps.d.ts +21 -0
- package/dist/holmes/config/project-caps.js +114 -0
- package/dist/holmes/governance/approval-queue.d.ts +17 -3
- package/dist/holmes/governance/approval-queue.js +51 -8
- package/dist/holmes/governance/autonomy.d.ts +6 -0
- package/dist/holmes/governance/autonomy.js +21 -0
- package/dist/holmes/governance/push-gate-runner.d.ts +8 -0
- package/dist/holmes/governance/push-gate-runner.js +49 -1
- package/dist/holmes/governance/replica-id.d.ts +9 -0
- package/dist/holmes/governance/replica-id.js +44 -7
- package/dist/holmes/governance/role-policy.d.ts +41 -1
- package/dist/holmes/governance/role-policy.js +137 -20
- package/dist/holmes/governance/run-mode.d.ts +14 -0
- package/dist/holmes/governance/run-mode.js +120 -0
- package/dist/holmes/governance/tool-actions.d.ts +30 -0
- package/dist/holmes/governance/tool-actions.js +121 -0
- package/dist/holmes/guardrail/agent-launch-policy.d.ts +15 -0
- package/dist/holmes/guardrail/agent-launch-policy.js +177 -0
- package/dist/holmes/guardrail/classification-mode.d.ts +17 -0
- package/dist/holmes/guardrail/classification-mode.js +135 -0
- package/dist/holmes/guardrail/dynamic-write.d.ts +43 -0
- package/dist/holmes/guardrail/dynamic-write.js +304 -0
- package/dist/holmes/guardrail/impact-gate.d.ts +2 -0
- package/dist/holmes/guardrail/impact-gate.js +34 -11
- package/dist/holmes/guardrail/phase.d.ts +2 -1
- package/dist/holmes/guardrail/phase.js +22 -8
- package/dist/holmes/guardrail/powershell-shell.d.ts +21 -0
- package/dist/holmes/guardrail/powershell-shell.js +801 -0
- package/dist/holmes/guardrail/refusal-codes.d.ts +24 -0
- package/dist/holmes/guardrail/refusal-codes.js +140 -0
- package/dist/holmes/guardrail/risk-classifier.d.ts +17 -0
- package/dist/holmes/guardrail/risk-classifier.js +255 -27
- package/dist/holmes/guardrail/risk-types.d.ts +16 -0
- package/dist/holmes/guardrail/run-plan-scope.d.ts +23 -0
- package/dist/holmes/guardrail/run-plan-scope.js +155 -0
- package/dist/holmes/guardrail/run-refusals.d.ts +116 -0
- package/dist/holmes/guardrail/run-refusals.js +348 -0
- package/dist/holmes/guardrail/run-stages.d.ts +67 -0
- package/dist/holmes/guardrail/run-stages.js +188 -0
- package/dist/holmes/guardrail/scope-judgment.d.ts +5 -1
- package/dist/holmes/guardrail/scope-judgment.js +8 -10
- package/dist/holmes/guardrail/scope-refusal-memory.d.ts +3 -0
- package/dist/holmes/guardrail/scope-refusal-memory.js +85 -0
- package/dist/holmes/guardrail/shell-words.js +7 -7
- package/dist/holmes/guardrail/write-target.d.ts +31 -2
- package/dist/holmes/guardrail/write-target.js +118 -16
- package/dist/holmes/hooks/pre-tool-use.d.ts +36 -2
- package/dist/holmes/hooks/pre-tool-use.js +740 -81
- package/dist/holmes/hooks/session-start.js +5 -3
- package/dist/holmes/hooks/stop.d.ts +35 -1
- package/dist/holmes/hooks/stop.js +142 -7
- package/dist/holmes/mcp/elicit-approval.js +4 -4
- package/dist/holmes/mcp/handlers/graph-operations.js +5 -5
- package/dist/holmes/mcp/handlers/maintenance-analysis.js +2 -2
- package/dist/holmes/mcp/handlers/operator-inspection.d.ts +2 -1
- package/dist/holmes/mcp/handlers/operator-inspection.js +3 -1
- package/dist/holmes/mcp/handlers/phase-queries.js +16 -1
- package/dist/holmes/mcp/handlers/requirement-triage.js +2 -2
- package/dist/holmes/mcp/handlers/spec-approval.d.ts +3 -3
- package/dist/holmes/mcp/handlers/spec-approval.js +56 -9
- package/dist/holmes/mcp/handlers/spec-lifecycle.d.ts +1 -0
- package/dist/holmes/mcp/handlers/spec-lifecycle.js +3 -3
- package/dist/holmes/mcp/handlers/spec-queries.d.ts +7 -0
- package/dist/holmes/mcp/handlers/spec-queries.js +5 -0
- package/dist/holmes/mcp/handlers/workspace-queries.js +2 -2
- package/dist/holmes/mcp/handlers.d.ts +2 -3
- package/dist/holmes/mcp/handlers.js +22 -2
- package/dist/holmes/mcp/harness-attestation.d.ts +2 -0
- package/dist/holmes/mcp/harness-attestation.js +3 -1
- package/dist/holmes/mcp/operator-recovery.d.ts +2 -0
- package/dist/holmes/mcp/operator-recovery.js +4 -3
- package/dist/holmes/mcp/server.js +9 -0
- package/dist/holmes/mcp/tool-schemas.js +6 -3
- package/dist/holmes/project/npx-bin.d.ts +26 -0
- package/dist/holmes/project/npx-bin.js +272 -2
- package/dist/holmes/project/root.js +6 -1
- package/dist/holmes/project/run-records.d.ts +17 -0
- package/dist/holmes/project/run-records.js +126 -0
- package/dist/holmes/project/scratch-root.d.ts +12 -0
- package/dist/holmes/project/scratch-root.js +132 -0
- package/dist/holmes/review/mrp.d.ts +35 -0
- package/dist/holmes/review/mrp.js +119 -0
- package/dist/holmes/review/verdicts.d.ts +117 -0
- package/dist/holmes/review/verdicts.js +345 -0
- package/dist/holmes/runtime/dispatch.js +6 -3
- package/dist/holmes/semantic/cloud-usage.d.ts +20 -0
- package/dist/holmes/semantic/cloud-usage.js +106 -0
- package/dist/holmes/semantic/embedder.d.ts +15 -6
- package/dist/holmes/semantic/embedder.js +84 -3
- package/dist/holmes/semantic/local-model.d.ts +21 -2
- package/dist/holmes/semantic/local-model.js +14 -3
- package/dist/holmes/semantic/tier.d.ts +25 -0
- package/dist/holmes/semantic/tier.js +86 -1
- package/dist/holmes/semantic/vector-cache.d.ts +1 -0
- package/dist/holmes/semantic/vector-cache.js +4 -1
- package/dist/holmes/spec/approval-blockers.d.ts +11 -1
- package/dist/holmes/spec/approval-blockers.js +70 -2
- package/dist/holmes/spec/renumber.d.ts +1 -1
- package/dist/holmes/spec/renumber.js +5 -2
- package/dist/holmes/spec/transition-policy.d.ts +5 -7
- package/dist/holmes/spec/transition-policy.js +17 -2
- package/package.json +1 -1
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.blockerClause = exports.BLOCKER_SEP = exports.unsealedParentMessage = exports.placeholderMessage = exports.SUPPLIED_BY_APPROVAL = void 0;
|
|
4
4
|
exports.placeholderSections = placeholderSections;
|
|
5
|
+
exports.scaffoldSections = scaffoldSections;
|
|
5
6
|
exports.parentBlockers = parentBlockers;
|
|
7
|
+
exports.ancestorBlockers = ancestorBlockers;
|
|
6
8
|
exports.approvalBlockers = approvalBlockers;
|
|
7
9
|
exports.blockerSummary = blockerSummary;
|
|
8
10
|
exports.unactionableCriteriaBlocker = unactionableCriteriaBlocker;
|
|
9
|
-
// @implements A-SPEC-182
|
|
11
|
+
// @implements A-SPEC-182, A-SPEC-182.3, A-SPEC-182.4
|
|
10
12
|
const acceptance_quality_1 = require("./acceptance-quality");
|
|
11
13
|
const validator_1 = require("./validator");
|
|
12
14
|
const breaking_change_1 = require("./breaking-change");
|
|
@@ -150,6 +152,31 @@ function placeholderSections(spec) {
|
|
|
150
152
|
}
|
|
151
153
|
return out;
|
|
152
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* @implements A-SPEC-182.1 — the bodies `spec_slice_init` writes. They are prose, not `TODO`, so `placeholderSections`
|
|
157
|
+
* never saw them: measured 2026-10-18, 421 approved specs here and 303 in a jarvis copy still carried one. A section
|
|
158
|
+
* counts only when its WHOLE body (whitespace normalised) is the scaffold; Open Questions, Assumptions, Non-Functional
|
|
159
|
+
* and Scope are left out because their scaffold ("None.") can be a real answer.
|
|
160
|
+
*/
|
|
161
|
+
const SCAFFOLD_BODIES = {
|
|
162
|
+
'Intent': /^Implement .+\.$/,
|
|
163
|
+
'Design Overview': /^High level design for .+\.$/,
|
|
164
|
+
'Acceptance Criteria': /^- Code written and tests passing\.$/,
|
|
165
|
+
'Component Design': /^1\. Target Component: - Modifies .+\.$/,
|
|
166
|
+
'Inputs / Outputs': /^- Inputs: Tool calls \/ developer modifications\. - Outputs: Working implementation\.$/,
|
|
167
|
+
'Behavior': /^- Implements desired behavior cleanly\.$/,
|
|
168
|
+
'Test Points': /^- Unit tests in test suite\.$/,
|
|
169
|
+
'Done When': /^- All tests pass 100%\.$/,
|
|
170
|
+
'Normal Cases': /^- Given valid inputs When operation is performed Then correct behavior is observed$/,
|
|
171
|
+
'Corner Cases': /^- Given edge cases When operation is performed Then system handles gracefully$/,
|
|
172
|
+
'Negative Cases': /^- Given invalid inputs When operation is performed Then appropriate error is returned$/,
|
|
173
|
+
'Boundary Cases': /^- Given boundary conditions When operation is performed Then boundary limits are respected$/,
|
|
174
|
+
};
|
|
175
|
+
function scaffoldSections(spec) {
|
|
176
|
+
return Object.entries(spec.sections ?? {})
|
|
177
|
+
.filter(([name, body]) => SCAFFOLD_BODIES[name]?.test(String(body ?? '').replace(/\s+/g, ' ').trim()))
|
|
178
|
+
.map(([name]) => name);
|
|
179
|
+
}
|
|
153
180
|
/**
|
|
154
181
|
* Codes that `validateSpec` reports but approval itself supplies, so they are not blockers.
|
|
155
182
|
* Exported because `spec_approve` filters by the same set — two hand-maintained lists were how the
|
|
@@ -185,6 +212,38 @@ function parentBlockers(spec, resolve) {
|
|
|
185
212
|
}
|
|
186
213
|
return out;
|
|
187
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* @implements A-SPEC-182.3 — the chain above the direct parents (which `parentBlockers` judges): one message per
|
|
217
|
+
* ancestor that is not approved. A-SPEC-102.2–102.6 were sealed under the approved H-SPEC-102 while REQ-102 was draft.
|
|
218
|
+
* Cycles end; depth is bounded. A missing direct parent is validateSpec's finding; a missing ancestor above it is one
|
|
219
|
+
* here (@implements A-SPEC-182.4 — skipping it sealed a chain whose top no spec carries).
|
|
220
|
+
*/
|
|
221
|
+
function ancestorBlockers(spec, resolve) {
|
|
222
|
+
const out = [];
|
|
223
|
+
const seen = new Set([spec.id]);
|
|
224
|
+
const walk = (id, via, namedBy, depth) => {
|
|
225
|
+
if (depth > 16 || seen.has(id))
|
|
226
|
+
return;
|
|
227
|
+
seen.add(id);
|
|
228
|
+
const s = resolve(id);
|
|
229
|
+
if (!s) {
|
|
230
|
+
out.push(`ancestor ${id} (named by ${namedBy}) cannot be found — the chain is justified only up to ${namedBy}; restore ${id} or re-parent ${namedBy}`);
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
if (s.status !== 'approved') {
|
|
234
|
+
out.push(`ancestor ${s.id} is ${s.status} (via ${via}) — the chain is justified only up to it; seal ${s.id} first`);
|
|
235
|
+
}
|
|
236
|
+
for (const up of s.dependsOn ?? [])
|
|
237
|
+
walk(up, via, s.id, depth + 1);
|
|
238
|
+
};
|
|
239
|
+
for (const pid of spec.dependsOn ?? []) {
|
|
240
|
+
seen.add(pid);
|
|
241
|
+
const parent = resolve(pid);
|
|
242
|
+
for (const up of parent?.dependsOn ?? [])
|
|
243
|
+
walk(up, pid, pid, 1);
|
|
244
|
+
}
|
|
245
|
+
return out;
|
|
246
|
+
}
|
|
188
247
|
/**
|
|
189
248
|
* Every reason `spec` cannot be approved right now. Empty means nothing is in the way.
|
|
190
249
|
*
|
|
@@ -192,7 +251,7 @@ function parentBlockers(spec, resolve) {
|
|
|
192
251
|
* placeholders. Pure — it reads the spec objects it is handed and touches no filesystem, because
|
|
193
252
|
* the gate calls it from a PreToolUse hook on every tool call.
|
|
194
253
|
*/
|
|
195
|
-
function approvalBlockers(spec, resolve) {
|
|
254
|
+
function approvalBlockers(spec, resolve, opts) {
|
|
196
255
|
const out = parentBlockers(spec, resolve);
|
|
197
256
|
// Validate AS IT WILL BE — approved. Approving is what supplies the status and the seals, so the
|
|
198
257
|
// question is what would still block THIS document once approved.
|
|
@@ -216,6 +275,15 @@ function approvalBlockers(spec, resolve) {
|
|
|
216
275
|
if (stubs.length > 0) {
|
|
217
276
|
out.push((0, exports.placeholderMessage)(stubs));
|
|
218
277
|
}
|
|
278
|
+
// @implements A-SPEC-182.1 — the act refuses scaffold bodies; the gate pre-announces it (A-SPEC-182's parity). A sealed
|
|
279
|
+
// spec whose content is unchanged is exempt here as at the act: renumber and integration judge this list (A-SPEC-641),
|
|
280
|
+
// and the 421 legacy seals must still re-seal.
|
|
281
|
+
const seal = (0, spec_digest_1.sealOf)(spec).approvedDigest;
|
|
282
|
+
const unchangedSeal = typeof seal === 'string' && (0, spec_digest_1.specDigest)(spec) === seal;
|
|
283
|
+
// @implements A-SPEC-182.2 — only when the caller judges in a run or under classification.strict.
|
|
284
|
+
const scaffold = !opts?.scaffold || unchangedSeal ? [] : scaffoldSections(spec).filter((s) => !stubs.includes(s));
|
|
285
|
+
if (scaffold.length > 0)
|
|
286
|
+
out.push((0, exports.placeholderMessage)(scaffold));
|
|
219
287
|
return out;
|
|
220
288
|
}
|
|
221
289
|
/** The separator between one spec's blockers. Shared so nothing re-splits on a guessed delimiter. */
|
|
@@ -81,7 +81,7 @@ export interface RenumberPlan {
|
|
|
81
81
|
}[];
|
|
82
82
|
/** Child-first: T -> A -> H -> REQ. Only what a move actually unseals. */
|
|
83
83
|
unsealOrder: string[];
|
|
84
|
-
/** Parent-first: REQ -> H -> A -> T.
|
|
84
|
+
/** Parent-first: REQ -> H -> A -> T. What a move breaks, plus each moved seal the ledger knows only by its old id. */
|
|
85
85
|
approveOrder: string[];
|
|
86
86
|
/** Reported, never rewritten. */
|
|
87
87
|
proseCandidates: {
|
|
@@ -42,7 +42,7 @@ exports.planRenumber = planRenumber;
|
|
|
42
42
|
exports.applyRenumber = applyRenumber;
|
|
43
43
|
exports.readSourcesForRenumber = readSourcesForRenumber;
|
|
44
44
|
exports.readSpecsForRenumber = readSpecsForRenumber;
|
|
45
|
-
// @implements A-SPEC-629.1, A-SPEC-628, A-SPEC-255
|
|
45
|
+
// @implements A-SPEC-629.1, A-SPEC-628, A-SPEC-255, A-SPEC-255.1
|
|
46
46
|
// @implements A-SPEC-640
|
|
47
47
|
/**
|
|
48
48
|
* Renumbering a spec, as a contract instead of a memory exercise.
|
|
@@ -333,7 +333,10 @@ function planRenumber(input) {
|
|
|
333
333
|
const affected = specs.filter((s) => reseal.has(s.file) && (s.status ?? '') === 'approved');
|
|
334
334
|
const byKind = (a, b) => CHILD_FIRST.indexOf(a.type) - CHILD_FIRST.indexOf(b.type);
|
|
335
335
|
plan.unsealOrder = [...affected].sort(byKind).map((s) => s.id);
|
|
336
|
-
|
|
336
|
+
// @implements A-SPEC-255.1 — a surviving seal is not a recorded approval: the ledger holds the approving act under the
|
|
337
|
+
// OLD id, and ART-5 refused REQ-790 after REQ-774 → 790 (measured 2026-10-18). Re-approve it, never unseal it.
|
|
338
|
+
const surviving = family.filter((s) => !reseal.has(s.file) && (s.status ?? '') === 'approved');
|
|
339
|
+
plan.approveOrder = [...affected, ...surviving].sort(byKind).reverse().map((s) => renamed(s.id, oldBase, newBase));
|
|
337
340
|
const idInText = new RegExp(String.raw `(?:REQ|A-SPEC|H-SPEC|C-SPEC|T-SPEC)-${oldBase}(?:\.\d+)?\b`);
|
|
338
341
|
/** A line the tool will NOT rewrite but a human must look at. Anchors are excluded — those move. */
|
|
339
342
|
const scanProse = (file, text, skipFrontmatter) => {
|
|
@@ -12,21 +12,19 @@ export declare function prepareLifecycleSpec(spec: Spec, all: Spec[], operation:
|
|
|
12
12
|
reason?: undefined;
|
|
13
13
|
};
|
|
14
14
|
/** Act-time policy only: callers own authority, version checks, persistence and audit. */
|
|
15
|
-
export declare function prepareApprovedSpec(spec: Spec, specs: Spec[], resolver: (specs: Spec[]) => (id: string) => Spec | null, readFile: (relative: string) => string | null
|
|
15
|
+
export declare function prepareApprovedSpec(spec: Spec, specs: Spec[], resolver: (specs: Spec[]) => (id: string) => Spec | null, readFile: (relative: string) => string | null, opts?: {
|
|
16
|
+
scaffold?: 'refuse' | 'allow';
|
|
17
|
+
ancestors?: 'refuse' | 'allow';
|
|
18
|
+
}): {
|
|
16
19
|
ok: false;
|
|
17
20
|
reason: string;
|
|
18
21
|
findings?: undefined;
|
|
19
|
-
candidate?: undefined;
|
|
20
|
-
digest?: undefined;
|
|
21
|
-
parentDigests?: undefined;
|
|
22
22
|
} | {
|
|
23
23
|
ok: false;
|
|
24
24
|
reason: string;
|
|
25
25
|
findings: import("./validator").Finding[];
|
|
26
|
-
candidate?: undefined;
|
|
27
|
-
digest?: undefined;
|
|
28
|
-
parentDigests?: undefined;
|
|
29
26
|
} | {
|
|
27
|
+
ancestorWarnings?: string[] | undefined;
|
|
30
28
|
ok: true;
|
|
31
29
|
candidate: Spec;
|
|
32
30
|
digest: string;
|
|
@@ -30,7 +30,7 @@ function prepareLifecycleSpec(spec, all, operation, reason) {
|
|
|
30
30
|
return { ok: true, candidate, dependents };
|
|
31
31
|
}
|
|
32
32
|
/** Act-time policy only: callers own authority, version checks, persistence and audit. */
|
|
33
|
-
function prepareApprovedSpec(spec, specs, resolver, readFile) {
|
|
33
|
+
function prepareApprovedSpec(spec, specs, resolver, readFile, opts) {
|
|
34
34
|
// @implements A-SPEC-188 — duplicates make the id ambiguous, for the SPEC and for its
|
|
35
35
|
// PARENTS alike. Round-3 probed the parent half: with a stray duplicate of the parent
|
|
36
36
|
// walking first, the child's parent_digests sealed the stray's (forged) digest — the very
|
|
@@ -57,6 +57,11 @@ function prepareApprovedSpec(spec, specs, resolver, readFile) {
|
|
|
57
57
|
const parentIssues = (0, approval_blockers_1.parentBlockers)(spec, resolver(specs));
|
|
58
58
|
if (parentIssues.length > 0)
|
|
59
59
|
return { ok: false, reason: parentIssues[0] };
|
|
60
|
+
// @implements A-SPEC-182.3 — the chain above the parents: refused when the caller judges in a run or under strict;
|
|
61
|
+
// otherwise (and for renumber and integration, which pass no option) carried back as a warning, as in 0.35.25.
|
|
62
|
+
const ancestorIssues = (0, approval_blockers_1.ancestorBlockers)(spec, resolver(specs));
|
|
63
|
+
if (ancestorIssues.length > 0 && opts?.ancestors === 'refuse')
|
|
64
|
+
return { ok: false, reason: ancestorIssues[0] };
|
|
60
65
|
// Validate AS IT WILL BE — approved. Approval-gated checks (placeholder citations, 4-quadrant
|
|
61
66
|
// GWT) must fire NOW, not one turn after the seal exists.
|
|
62
67
|
const candidate = { ...spec, status: 'approved', frontmatter: { ...spec.frontmatter } };
|
|
@@ -101,6 +106,16 @@ function prepareApprovedSpec(spec, specs, resolver, readFile) {
|
|
|
101
106
|
if (stubs.length > 0) {
|
|
102
107
|
return { ok: false, reason: (0, approval_blockers_1.placeholderMessage)(stubs) };
|
|
103
108
|
}
|
|
109
|
+
// @implements A-SPEC-182.1 — a spec_slice_init scaffold body is a placeholder too. An already-sealed spec whose
|
|
110
|
+
// content is unchanged re-seals as before (renumber, integration): 421 approved specs here still carry one.
|
|
111
|
+
const storedSeal = spec.frontmatter?.approved_digest;
|
|
112
|
+
const unchangedSeal = typeof storedSeal === 'string' && (0, spec_digest_1.specDigest)(spec) === storedSeal;
|
|
113
|
+
// @implements A-SPEC-182.2 — refused only when the caller judges in a run or under strict; renumber and integration
|
|
114
|
+
// pass no option and keep their 0.35.25 verdicts.
|
|
115
|
+
const scaffold = opts?.scaffold !== 'refuse' || unchangedSeal ? [] : (0, approval_blockers_1.scaffoldSections)(candidate);
|
|
116
|
+
if (scaffold.length > 0) {
|
|
117
|
+
return { ok: false, reason: (0, approval_blockers_1.placeholderMessage)(scaffold) };
|
|
118
|
+
}
|
|
104
119
|
// @implements A-SPEC-505.1 — acceptance substance, judged at the ACT on the same candidate
|
|
105
120
|
// the seal would freeze, like the placeholder gate above (154/428 approved REQs here are
|
|
106
121
|
// non-stated legacy; a validateSpec predicate would brick them all). Judged HERE and not
|
|
@@ -131,5 +146,5 @@ function prepareApprovedSpec(spec, specs, resolver, readFile) {
|
|
|
131
146
|
const digest = (0, spec_digest_1.specDigest)(candidate);
|
|
132
147
|
candidate.frontmatter.approved_digest = digest;
|
|
133
148
|
candidate.frontmatter.parent_digests = parentDigests;
|
|
134
|
-
return { ok: true, candidate, digest, parentDigests };
|
|
149
|
+
return { ok: true, candidate, digest, parentDigests, ...(ancestorIssues.length > 0 ? { ancestorWarnings: ancestorIssues } : {}) };
|
|
135
150
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"//": "@implements A-SPEC-209",
|
|
3
3
|
"name": "@holmes-lab/holmes-kit",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.36.0",
|
|
5
5
|
"description": "Holmes-Kit — deterministic Agentic Software Engineering (ASE) harness with causal traceability (spec chain + D-CPG + RTM + phase guardrail)",
|
|
6
6
|
"main": "dist/holmes/mcp/server.js",
|
|
7
7
|
"types": "dist/holmes/mcp/server.d.ts",
|