kibi-cli 2.27.0 → 2.28.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/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +17 -2
- package/dist/operations/bootstrap/conflict-review.d.ts +17 -9
- package/dist/operations/bootstrap/conflict-review.d.ts.map +1 -1
- package/dist/operations/bootstrap/conflict-review.js +59 -26
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +4 -4
- package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance-actions.js +4 -1
- package/dist/operations/bootstrap/intent-claims.d.ts.map +1 -1
- package/dist/operations/bootstrap/intent-claims.js +1 -0
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
- package/dist/operations/bootstrap/presentation.js +6 -2
- package/dist/operations/bootstrap/types.d.ts +2 -0
- package/dist/operations/bootstrap/types.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.d.ts +6 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +9 -1
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +3 -2
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +7 -2
- package/dist/public/skills/kibi-bootstrap/SKILL.md +2 -2
- package/dist/public/symbol-granularity.d.ts +5 -0
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.js +12 -3
- package/dist/traceability/staged-consistency.d.ts +1 -1
- package/dist/traceability/staged-consistency.d.ts.map +1 -1
- package/dist/traceability/staged-consistency.js +2 -2
- package/dist/traceability/staged-entity-context.d.ts +18 -0
- package/dist/traceability/staged-entity-context.d.ts.map +1 -0
- package/dist/traceability/staged-entity-context.js +66 -0
- package/package.json +1 -1
- package/src/public/operations/migration-plan.ts +12 -2
- package/src/public/skills/kibi-bootstrap/SKILL.md +2 -2
- package/src/public/symbol-granularity.ts +13 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAmF7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AA6hBD,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC5B,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAC3B,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAMpB;AAGD,wBAAsB,YAAY,CAChC,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAurB/B;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAoDtB;AAID,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,MAAM,EAAE,CAAC,CAgBnB;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,aAAa,EACrB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBnB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAkEtB;AAID,wBAAsB,aAAa,CACjC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAmGtB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,SAAS,EAAE,CAAC,CAyCtB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAgDtB;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CA0BtB;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqBtB;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqBtB;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqBtB"}
|
package/dist/commands/check.js
CHANGED
|
@@ -35,6 +35,7 @@ import { validateStagedMarkdown } from "../traceability/markdown-validate.js";
|
|
|
35
35
|
import { readSnapshotKnowledge } from "../traceability/snapshot-knowledge.js";
|
|
36
36
|
import { collectIntroducedConsistencyViolations, formatConsistencyViolations, stagesKnowledge, } from "../traceability/staged-consistency.js";
|
|
37
37
|
import { collectStagedKibiDiagnostics, } from "../traceability/staged-diagnostics.js";
|
|
38
|
+
import { collectIntroducedEntityContextViolations } from "../traceability/staged-entity-context.js";
|
|
38
39
|
import { createStagedEntityIdStyleDiagnostics } from "../traceability/staged-entity-id-style.js";
|
|
39
40
|
import { analyzeStagedFileCoverage, } from "../traceability/staged-file-coverage.js";
|
|
40
41
|
import { classifyKibiImpactEvidence, isBehaviorSourceEdit, parseKibiImpactOverride, } from "../traceability/staged-impact-contract.js";
|
|
@@ -608,6 +609,11 @@ export async function checkCommand(options) {
|
|
|
608
609
|
return { exitCode: options.dryRun ? 0 : 1 };
|
|
609
610
|
}
|
|
610
611
|
}
|
|
612
|
+
// implements REQ-cli-staged-entity-context
|
|
613
|
+
// An entity document the commit adds or edits must carry the body
|
|
614
|
+
// context full `kibi check` requires; debt already at the base, or
|
|
615
|
+
// acknowledged by the migration, does not block.
|
|
616
|
+
const contextViolations = collectIntroducedEntityContextViolations(snapshot, markdownFiles.map((file) => file.path), snapshotEntities);
|
|
611
617
|
const inventoryDrift = stagedInventoryDriftViolations({
|
|
612
618
|
stagedPaths: new Set(markdownFiles.map((file) => file.path)),
|
|
613
619
|
snapshotEntities,
|
|
@@ -814,16 +820,25 @@ export async function checkCommand(options) {
|
|
|
814
820
|
const passMessage = allSymbols.length === 0
|
|
815
821
|
? "✓ No violations found in staged files."
|
|
816
822
|
: "✓ No violations found in staged symbols.";
|
|
817
|
-
if (violationsRaw.length > 0 ||
|
|
823
|
+
if (violationsRaw.length > 0 ||
|
|
824
|
+
coverageViolations.length > 0 ||
|
|
825
|
+
contextViolations.length > 0) {
|
|
818
826
|
print({
|
|
819
827
|
format: options.format,
|
|
820
828
|
coverage: stagedCoverage,
|
|
821
|
-
violations: [
|
|
829
|
+
violations: [
|
|
830
|
+
...violationsRaw,
|
|
831
|
+
...coverageViolations,
|
|
832
|
+
...contextViolations,
|
|
833
|
+
],
|
|
822
834
|
qualityDiagnostics: stagedKibiDiagnostics,
|
|
823
835
|
messages: [
|
|
824
836
|
...(stagedKibiDiagnostics.length > 0
|
|
825
837
|
? [formatStagedKibiDiagnostics(stagedKibiDiagnostics)]
|
|
826
838
|
: []),
|
|
839
|
+
...(contextViolations.length > 0
|
|
840
|
+
? formatConsistencyViolations(contextViolations, "entity context")
|
|
841
|
+
: []),
|
|
827
842
|
...(coverageViolations.length > 0
|
|
828
843
|
? [formatCoverageViolations(coverageViolations)]
|
|
829
844
|
: []),
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import type { ExistingRequirement } from "./claim-restatement.js";
|
|
2
|
-
import type { Candidate } from "./types.js";
|
|
2
|
+
import type { Candidate, SourceOnlySignal } from "./types.js";
|
|
3
|
+
/** Whether a candidate or signal names requirements to compare it with. */
|
|
4
|
+
export declare function needsConflictReview(row: {
|
|
5
|
+
readonly evidence: readonly string[];
|
|
6
|
+
}): boolean;
|
|
3
7
|
/**
|
|
4
|
-
*
|
|
5
|
-
* requirements that have a logical representation. For each
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Intent claims are checked for contradictions only against current
|
|
9
|
+
* requirements that have a logical representation. For each claim, name the
|
|
10
|
+
* current requirements on the same topic that have none, so the reviewer
|
|
11
|
+
* compares them instead of reading the plan as consistent: the diagnostic
|
|
12
|
+
* names both, and the claim's evidence gains `review_against:<id>` for each.
|
|
13
|
+
* A planned claim is compared before approval; a claim left for authoring
|
|
14
|
+
* (a source-only signal) is compared when it is compiled with
|
|
15
|
+
* kb_compile_intent, which takes the verdicts through conflictReviews.
|
|
16
|
+
* Ranking is the intent search kb_search uses, over the unmodeled
|
|
17
|
+
* requirements only.
|
|
11
18
|
*/
|
|
12
|
-
export declare function withConflictReviewSignals(candidates: readonly Candidate[], requirements: readonly ExistingRequirement[], workspaceRoot: string): Promise<{
|
|
19
|
+
export declare function withConflictReviewSignals(candidates: readonly Candidate[], requirements: readonly ExistingRequirement[], workspaceRoot: string, signals?: readonly SourceOnlySignal[]): Promise<{
|
|
13
20
|
candidates: Candidate[];
|
|
21
|
+
signals: SourceOnlySignal[];
|
|
14
22
|
diagnostics: string[];
|
|
15
23
|
}>;
|
|
16
24
|
//# sourceMappingURL=conflict-review.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-review.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/conflict-review.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"conflict-review.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/conflict-review.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAK9D,2EAA2E;AAE3E,wBAAgB,mBAAmB,CAAC,GAAG,EAAE;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC,GAAG,OAAO,CAEV;AAUD;;;;;;;;;;;GAWG;AAEH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,SAAS,SAAS,EAAE,EAChC,YAAY,EAAE,SAAS,mBAAmB,EAAE,EAC5C,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,SAAS,gBAAgB,EAAO,GACxC,OAAO,CAAC;IACT,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC,CA6ED"}
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
import { rankIntentEntities } from "../../intent-search.js";
|
|
2
2
|
import { MAX_REVIEW_CANDIDATES, REVIEW_CANDIDATE_MIN_SCORE, } from "../planning/conflict-review.js";
|
|
3
|
+
/** Evidence a claim gains for each requirement it must be compared with. */
|
|
4
|
+
const REVIEW_AGAINST = "review_against:";
|
|
5
|
+
/** Whether a candidate or signal names requirements to compare it with. */
|
|
6
|
+
// implements REQ-kibi-contradiction-review-candidates, REQ-bootstrap-authoring-claim-review
|
|
7
|
+
export function needsConflictReview(row) {
|
|
8
|
+
return row.evidence.some((entry) => entry.startsWith(REVIEW_AGAINST));
|
|
9
|
+
}
|
|
10
|
+
function claimCitation(evidence, fallback) {
|
|
11
|
+
return (evidence
|
|
12
|
+
.find((entry) => entry.startsWith("intent_claim:"))
|
|
13
|
+
?.slice("intent_claim:".length) ?? fallback);
|
|
14
|
+
}
|
|
3
15
|
/**
|
|
4
|
-
*
|
|
5
|
-
* requirements that have a logical representation. For each
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
16
|
+
* Intent claims are checked for contradictions only against current
|
|
17
|
+
* requirements that have a logical representation. For each claim, name the
|
|
18
|
+
* current requirements on the same topic that have none, so the reviewer
|
|
19
|
+
* compares them instead of reading the plan as consistent: the diagnostic
|
|
20
|
+
* names both, and the claim's evidence gains `review_against:<id>` for each.
|
|
21
|
+
* A planned claim is compared before approval; a claim left for authoring
|
|
22
|
+
* (a source-only signal) is compared when it is compiled with
|
|
23
|
+
* kb_compile_intent, which takes the verdicts through conflictReviews.
|
|
24
|
+
* Ranking is the intent search kb_search uses, over the unmodeled
|
|
25
|
+
* requirements only.
|
|
11
26
|
*/
|
|
12
|
-
// implements REQ-kibi-contradiction-review-candidates
|
|
13
|
-
export async function withConflictReviewSignals(candidates, requirements, workspaceRoot) {
|
|
27
|
+
// implements REQ-kibi-contradiction-review-candidates, REQ-bootstrap-authoring-claim-review
|
|
28
|
+
export async function withConflictReviewSignals(candidates, requirements, workspaceRoot, signals = []) {
|
|
14
29
|
const unmodeled = requirements
|
|
15
30
|
.filter((requirement) => requirement.modeled === false)
|
|
16
31
|
.map((requirement) => ({
|
|
@@ -20,8 +35,20 @@ export async function withConflictReviewSignals(candidates, requirements, worksp
|
|
|
20
35
|
semantic_text: requirement.semanticText,
|
|
21
36
|
}));
|
|
22
37
|
if (unmodeled.length === 0)
|
|
23
|
-
return {
|
|
38
|
+
return {
|
|
39
|
+
candidates: [...candidates],
|
|
40
|
+
signals: [...signals],
|
|
41
|
+
diagnostics: [],
|
|
42
|
+
};
|
|
24
43
|
const titles = new Map(requirements.map((requirement) => [requirement.id, requirement.title]));
|
|
44
|
+
const related = async (query) => {
|
|
45
|
+
const ranked = await rankIntentEntities(unmodeled, { query, type: "req", minScore: REVIEW_CANDIDATE_MIN_SCORE }, workspaceRoot);
|
|
46
|
+
return ranked.matches
|
|
47
|
+
.slice(0, MAX_REVIEW_CANDIDATES)
|
|
48
|
+
.map((match) => String(match.entity.id ?? ""))
|
|
49
|
+
.filter(Boolean);
|
|
50
|
+
};
|
|
51
|
+
const named = (ids) => ids.map((id) => `${id} ("${titles.get(id) ?? ""}")`).join(", ");
|
|
25
52
|
const diagnostics = [];
|
|
26
53
|
const reviewed = [];
|
|
27
54
|
for (const candidate of candidates) {
|
|
@@ -30,30 +57,36 @@ export async function withConflictReviewSignals(candidates, requirements, worksp
|
|
|
30
57
|
reviewed.push(candidate);
|
|
31
58
|
continue;
|
|
32
59
|
}
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
type: "req",
|
|
36
|
-
minScore: REVIEW_CANDIDATE_MIN_SCORE,
|
|
37
|
-
}, workspaceRoot);
|
|
38
|
-
const related = ranked.matches
|
|
39
|
-
.slice(0, MAX_REVIEW_CANDIDATES)
|
|
40
|
-
.map((match) => String(match.entity.id ?? ""))
|
|
41
|
-
.filter(Boolean);
|
|
42
|
-
if (related.length === 0) {
|
|
60
|
+
const ids = await related(candidate.title);
|
|
61
|
+
if (ids.length === 0) {
|
|
43
62
|
reviewed.push(candidate);
|
|
44
63
|
continue;
|
|
45
64
|
}
|
|
46
|
-
|
|
47
|
-
.find((entry) => entry.startsWith("intent_claim:"))
|
|
48
|
-
?.slice("intent_claim:".length) ?? candidate.sourcePath;
|
|
49
|
-
diagnostics.push(`conflict-review: Intent claim at ${citation} ("${candidate.title}") was not checked for contradictions against current requirement ${related.map((id) => `${id} ("${titles.get(id) ?? ""}")`).join(", ")}, which has no logical representation. Compare them before approval: on a contradiction show both to the human, then drop the claim or keep it and supersede the requirement after apply; record a conflict the human has not decided as a review:conflict observation fact.`);
|
|
65
|
+
diagnostics.push(`conflict-review: Intent claim at ${claimCitation(candidate.evidence, candidate.sourcePath)} ("${candidate.title}") was not checked for contradictions against current requirement ${named(ids)}, which has no logical representation. Compare them before approval: on a contradiction show both to the human, then drop the claim or keep it and supersede the requirement after apply; record a conflict the human has not decided as a review:conflict observation fact.`);
|
|
50
66
|
reviewed.push({
|
|
51
67
|
...candidate,
|
|
52
68
|
evidence: [
|
|
53
69
|
...candidate.evidence,
|
|
54
|
-
...
|
|
70
|
+
...ids.map((id) => REVIEW_AGAINST + id),
|
|
55
71
|
],
|
|
56
72
|
});
|
|
57
73
|
}
|
|
58
|
-
|
|
74
|
+
const reviewedSignals = [];
|
|
75
|
+
for (const signal of signals) {
|
|
76
|
+
if (signal.kind !== "req" || signal.claimStatement === undefined) {
|
|
77
|
+
reviewedSignals.push(signal);
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const ids = await related(signal.claimStatement);
|
|
81
|
+
if (ids.length === 0) {
|
|
82
|
+
reviewedSignals.push(signal);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
diagnostics.push(`conflict-review: Intent claim at ${claimCitation(signal.evidence, signal.sourcePath)} ("${signal.claimStatement}") needs authoring and was not checked for contradictions against current requirement ${named(ids)}, which has no logical representation. When you compile the claim with kb_compile_intent, compare it with them and report each verdict through conflictReviews; on a contradiction show both to the human before writing.`);
|
|
86
|
+
reviewedSignals.push({
|
|
87
|
+
...signal,
|
|
88
|
+
evidence: [...signal.evidence, ...ids.map((id) => REVIEW_AGAINST + id)],
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return { candidates: reviewed, signals: reviewedSignals, diagnostics };
|
|
59
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/generate.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAkBjF,OAAO,KAAK,EAGV,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAGpB,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACzC,SAAS,gBAAgB,EAAE,CAI7B;AA+BD,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAC1C,OAAO,EAAE,MAAM,GACd;IACD,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAClE,QAAQ,CAAC,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACxD,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAwJA;AA6ND,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/generate.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAkBjF,OAAO,KAAK,EAGV,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAGpB,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACzC,SAAS,gBAAgB,EAAE,CAI7B;AA+BD,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAC1C,OAAO,EAAE,MAAM,GACd;IACD,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAClE,QAAQ,CAAC,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACxD,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAwJA;AA6ND,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CAiJ9B"}
|
|
@@ -401,10 +401,10 @@ export async function executePlanBootstrap(args, context) {
|
|
|
401
401
|
suppressed: activationSuppressedClaims(declared, discovery.activation),
|
|
402
402
|
diagnostics: [],
|
|
403
403
|
};
|
|
404
|
-
//
|
|
405
|
-
//
|
|
406
|
-
const reviewSignals = await withConflictReviewSignals(claimed.candidates, existing.requirements, context.workspaceRoot);
|
|
407
|
-
const filteredSignals = filterSourceOnlySignals([...built.sourceOnlySignals, ...
|
|
404
|
+
// Claims next to prose-only current requirements name them for review,
|
|
405
|
+
// planned or left for authoring: the plan cannot show they are consistent.
|
|
406
|
+
const reviewSignals = await withConflictReviewSignals(claimed.candidates, existing.requirements, context.workspaceRoot, claimed.sourceOnlySignals);
|
|
407
|
+
const filteredSignals = filterSourceOnlySignals([...built.sourceOnlySignals, ...reviewSignals.signals], args.entityTypes);
|
|
408
408
|
const selected = selectBootstrapCandidates([...built.candidates, ...reviewSignals.candidates].filter((candidate) => candidate.confidence >= minConfidence), existingIds, args.entityTypes, maxCandidates);
|
|
409
409
|
// Claims about the same subject share one subject fact.
|
|
410
410
|
const shared = shareSubjectFacts(selected.candidates);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guidance-actions.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/guidance-actions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guidance-actions.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/guidance-actions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAkBpB,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,gBAAgB,EAC5B,QAAQ,EAAE,wBAAwB,EAClC,UAAU,EAAE,SAAS,SAAS,EAAE,EAChC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,MAAM,GAAE,SAAS,WAAW,EAAO,GAClC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CA+F9C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
+
import { needsConflictReview } from "./conflict-review.js";
|
|
2
3
|
function relative(root, target) {
|
|
3
4
|
// Intent claims cite tickets and URLs, which are not workspace paths.
|
|
4
5
|
if (!path.isAbsolute(target))
|
|
@@ -77,11 +78,13 @@ export function buildActions(root, activation, declared, candidates, signals, of
|
|
|
77
78
|
kind: "handoff",
|
|
78
79
|
description: "No declared intent claim could be planned. Claims already in the KB need nothing; compile each remaining claim with kb_compile_intent, citing its source and reference (see the Knowledge source diagnostics).",
|
|
79
80
|
});
|
|
81
|
+
// implements REQ-bootstrap-authoring-claim-review
|
|
82
|
+
const toReview = signals.filter(needsConflictReview).length;
|
|
80
83
|
if (signals.length > 0)
|
|
81
84
|
result.push({
|
|
82
85
|
order: order++,
|
|
83
86
|
kind: "handoff",
|
|
84
|
-
description: `Author ${[...new Set(signals.map((signal) => signal.kind.toUpperCase()))].join("/")} entities manually from source-only evidence${seeded ? "; compile declared claims left there with kb_compile_intent" : ""}
|
|
87
|
+
description: `Author ${[...new Set(signals.map((signal) => signal.kind.toUpperCase()))].join("/")} entities manually from source-only evidence${seeded ? "; compile declared claims left there with kb_compile_intent" : ""}.${toReview > 0 ? ` ${toReview} intent claim(s) left for authoring need a conflict review: when you compile each with kb_compile_intent, compare it with the current requirements its conflict-review diagnostic names and report the verdicts through conflictReviews.` : ""}`,
|
|
85
88
|
});
|
|
86
89
|
for (const offer of offers)
|
|
87
90
|
result.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-claims.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/intent-claims.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,wBAAwB,EAGxB,SAAS,EACT,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAQpB,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACxD,QAAQ,CAAC,UAAU,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAClE,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAAC;AAuPF;;;;;;;;;GASG;AAEH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,wBAAwB,EAClC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,kBAAkB,EAChC,oBAAoB,GAAE,SAAS,mBAAmB,EAAO,GACxD,sBAAsB,
|
|
1
|
+
{"version":3,"file":"intent-claims.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/intent-claims.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,wBAAwB,EAGxB,SAAS,EACT,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAQpB,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACxD,QAAQ,CAAC,UAAU,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAClE,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAAC;AAuPF;;;;;;;;;GASG;AAEH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,wBAAwB,EAClC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,kBAAkB,EAChC,oBAAoB,GAAE,SAAS,mBAAmB,EAAO,GACxD,sBAAsB,CAgNxB"}
|
|
@@ -363,6 +363,7 @@ export function buildIntentClaimCandidates(declared, existingIds, minConfidence,
|
|
|
363
363
|
sourcePath: claim.reference,
|
|
364
364
|
confidence,
|
|
365
365
|
evidence,
|
|
366
|
+
claimStatement: claim.statement,
|
|
366
367
|
});
|
|
367
368
|
if (nearRestatement)
|
|
368
369
|
diagnostics.push(nearRestatementDiagnostic(source, claim, nearRestatement));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/presentation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/presentation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,gBAAgB,EAGhB,gBAAgB,EAChB,wBAAwB,EAGxB,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AA6GpB,wBAAgB,yBAAyB,CACvC,KAAK,CAAC,EAAE,gBAAgB,GACvB,wBAAwB,CAe1B;AAgBD;;;GAGG;AAEH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,GACjD,SAAS;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAYhE;AAwID,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IAC/C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACxD,QAAQ,CAAC,oBAAoB,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC5E,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IAC/C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,wEAAwE;IACxE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjD,GAAG,mBAAmB,CAqOtB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isProvenanceStubCandidate } from "./candidates.js";
|
|
2
|
+
import { needsConflictReview } from "./conflict-review.js";
|
|
2
3
|
import { buildGuidance } from "./guidance.js";
|
|
3
4
|
import { INTENT_CLAIM_KINDS, KNOWLEDGE_SOURCE_AUTHORITIES, KNOWLEDGE_SOURCE_KINDS, bootstrapPlanHash, } from "./types.js";
|
|
4
5
|
function strings(values) {
|
|
@@ -175,7 +176,9 @@ function claimAccounting(declared, candidates, suppressed, signals) {
|
|
|
175
176
|
// A claim below minConfidence or invalid at write time also leaves a
|
|
176
177
|
// follow-up; it is already counted by its row.
|
|
177
178
|
const counted = new Set([...filteredRows, ...otherRows].map((row) => String(row.sourcePath)));
|
|
178
|
-
const
|
|
179
|
+
const sourceSignals = signals.filter((signal) => signal.evidence.some((line) => line.startsWith(`intent_claim:${source.id}:`)));
|
|
180
|
+
const sourceOnly = take(sourceSignals.filter((signal) => !counted.has(signal.sourcePath)).length);
|
|
181
|
+
const toReview = sourceSignals.filter(needsConflictReview).length;
|
|
179
182
|
return [
|
|
180
183
|
{
|
|
181
184
|
source,
|
|
@@ -186,6 +189,7 @@ function claimAccounting(declared, candidates, suppressed, signals) {
|
|
|
186
189
|
byActivation,
|
|
187
190
|
suppressed: suppressedCount,
|
|
188
191
|
sourceOnly,
|
|
192
|
+
toReview,
|
|
189
193
|
unattributed: rest,
|
|
190
194
|
},
|
|
191
195
|
];
|
|
@@ -206,7 +210,7 @@ function accountingLine(row, activation) {
|
|
|
206
210
|
: []),
|
|
207
211
|
...(row.sourceOnly > 0
|
|
208
212
|
? [
|
|
209
|
-
`${row.sourceOnly} need authoring (sourceOnlySignals; compile them with kb_compile_intent)`,
|
|
213
|
+
`${row.sourceOnly} need authoring (sourceOnlySignals; compile them with kb_compile_intent${row.toReview > 0 ? `; ${row.toReview} of them need a conflict review against the current requirements their conflict-review diagnostics name` : ""})`,
|
|
210
214
|
]
|
|
211
215
|
: []),
|
|
212
216
|
...(row.unattributed > 0
|
|
@@ -213,6 +213,8 @@ export type SourceOnlySignal = {
|
|
|
213
213
|
readonly sourcePath: string;
|
|
214
214
|
readonly confidence: number;
|
|
215
215
|
readonly evidence: readonly string[];
|
|
216
|
+
/** The declared intent claim's statement, when the signal is one. */
|
|
217
|
+
readonly claimStatement?: string;
|
|
216
218
|
};
|
|
217
219
|
export type BootstrapStructuredContent = Readonly<Record<string, unknown>> & {
|
|
218
220
|
/** The exact hash-bound plan returned by this read-only operation. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACtC,MAAM,CAGR;AAED,mFAAmF;AACnF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAA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 @@
|
|
|
1
1
|
import type { OperationContext } from "../../public/operations/runtime-types.js";
|
|
2
2
|
import type { RelationshipInput } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* The error code of an upsert refused for a coarse symbol link, so the MCP
|
|
5
|
+
* error envelope and the CLI JSON route carry the same code as the staged
|
|
6
|
+
* gate's symbol_granularity_violation.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SYMBOL_GRANULARITY_VIOLATION = "SYMBOL_GRANULARITY_VIOLATION";
|
|
3
9
|
export declare function validateSymbolGranularity(payload: Readonly<Record<string, unknown>>, relationships: readonly RelationshipInput[], context: OperationContext, stored?: () => Promise<Readonly<Record<string, unknown>> | null | undefined>): Promise<void>;
|
|
4
10
|
//# sourceMappingURL=symbol-granularity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-granularity.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/symbol-granularity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"symbol-granularity.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/symbol-granularity.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAYjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA0BpD;;;;GAIG;AAEH,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AA+B3E,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC1C,aAAa,EAAE,SAAS,iBAAiB,EAAE,EAC3C,OAAO,EAAE,gBAAgB,EACzB,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GAC3E,OAAO,CAAC,IAAI,CAAC,CAiDf"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { collectGranularityCandidates } from "kibi-plugin-builtin";
|
|
3
|
+
import { InputError } from "../../cli-errors.js";
|
|
3
4
|
import { ALLOWED_GRANULARITY_REASONS_PROSE, coarseLinkBehavioralNames, getBehavioralSymbolNames, getNonBehavioralSymbolNames, inferSymbolRole, isAllowedGranularityReason, isTraceabilityRelationshipType, } from "../../public/symbol-granularity.js";
|
|
4
5
|
function candidate(name, kind) {
|
|
5
6
|
return { name, kind, role: inferSymbolRole(kind) };
|
|
@@ -19,6 +20,13 @@ function summarized(names) {
|
|
|
19
20
|
const hidden = names.length - shown.length;
|
|
20
21
|
return `${shown.join(", ")}${hidden > 0 ? `, and ${hidden} more` : ""}`;
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* The error code of an upsert refused for a coarse symbol link, so the MCP
|
|
25
|
+
* error envelope and the CLI JSON route carry the same code as the staged
|
|
26
|
+
* gate's symbol_granularity_violation.
|
|
27
|
+
*/
|
|
28
|
+
// implements REQ-kibi-symbol-link-guidance
|
|
29
|
+
export const SYMBOL_GRANULARITY_VIOLATION = "SYMBOL_GRANULARITY_VIOLATION";
|
|
22
30
|
const STORED_LOCATION_FIELDS = [
|
|
23
31
|
"title",
|
|
24
32
|
"sourceFile",
|
|
@@ -88,5 +96,5 @@ export async function validateSymbolGranularity(payload, relationships, context,
|
|
|
88
96
|
const ignored = nonBehavioral.length > 0
|
|
89
97
|
? ` Non-behavioral symbols in the file were ignored for this decision: ${summarized(nonBehavioral)}.`
|
|
90
98
|
: "";
|
|
91
|
-
throw new
|
|
99
|
+
throw new InputError(SYMBOL_GRANULARITY_VIOLATION, `Symbol ${String(entity.id)} links ${entity.sourceFile} coarsely while granular symbols are available (behavioral only): ${summarized(behavioral)}. Move relationships to a behavioral symbol, add a manifest behavioral anchor, or set granularity_reason to ${ALLOWED_GRANULARITY_REASONS_PROSE}.${ignored}`);
|
|
92
100
|
}
|
|
@@ -1 +1 @@
|
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ACtC;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACxC,CAAC,CAAC;AAyBH,wBAAsB,aAAa,CACjC,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,gBAAgB,EACzB,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CAkiBzC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { existsSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { OperationError } from "../../cli-errors.js";
|
|
4
|
+
import { InputError, OperationError } from "../../cli-errors.js";
|
|
5
5
|
import { DEFAULT_FIRMNESS, carriesFirmness, firmnessRef, isFirmness, } from "../../decision-firmness.js";
|
|
6
6
|
import { readManifestWithCoordinateOverlay } from "../../extractors/manifest.js";
|
|
7
7
|
import { extractManifestSymbolRecords } from "../../extractors/manifest.js";
|
|
@@ -784,7 +784,8 @@ export async function executeUpsert(input, context, options = {}) {
|
|
|
784
784
|
operationFailure = { error: failure };
|
|
785
785
|
throw failure;
|
|
786
786
|
}
|
|
787
|
-
|
|
787
|
+
// A coded refusal keeps its code and message for the error envelope.
|
|
788
|
+
if (error instanceof OperationError || error instanceof InputError) {
|
|
788
789
|
const failure = withPlanRecoveryNotes(error, planRecoveryWarnings);
|
|
789
790
|
operationFailure = { error: failure };
|
|
790
791
|
throw failure;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-plan.d.ts","sourceRoot":"","sources":["../../../src/public/operations/migration-plan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migration-plan.d.ts","sourceRoot":"","sources":["../../../src/public/operations/migration-plan.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,sBAAsB,EAAG,wBAAiC,CAAC;AAExE,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,SAAS,CA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|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { planLegacyStorageMigration } from "../../commands/legacy-storage-migration.js";
|
|
5
5
|
import { BRANCH_STORE_NOT_COMPILED } from "../../utils/branch-store.js";
|
|
6
|
-
import { legacyConfigExists } from "../../utils/config.js";
|
|
6
|
+
import { LEGACY_KB_MIGRATION_COMMAND, LEGACY_KB_MIGRATION_NOTE, legacyConfigExists, } from "../../utils/config.js";
|
|
7
7
|
import { MTIME_SOURCE_REASON_CODES } from "../../utils/content-freshness.js";
|
|
8
8
|
import { readKbManifestStatus } from "../../utils/kb-manifest.js";
|
|
9
9
|
import { getSchemaVersionStatus, normalizeSchemaVersion, } from "../../utils/schema-version.js";
|
|
@@ -529,7 +529,12 @@ export function readMigrationConfigStatus(workspaceRoot) {
|
|
|
529
529
|
...schemaStatus,
|
|
530
530
|
currentVersion: normalizeSchemaVersion(legacySchemaVersion),
|
|
531
531
|
configHash: null,
|
|
532
|
-
|
|
532
|
+
// implements REQ-legacy-kb-first-step-migrate
|
|
533
|
+
// A legacy KB is migrated, never initialized: name the step kb_status's
|
|
534
|
+
// bootstrap.nextAction and kibi doctor name.
|
|
535
|
+
warning: status.state === "missing" && legacyConfigExists(workspaceRoot)
|
|
536
|
+
? `Kibi lifecycle manifest is missing because this KB was written by an older Kibi; run '${LEGACY_KB_MIGRATION_COMMAND}' (${LEGACY_KB_MIGRATION_NOTE}).`
|
|
537
|
+
: status.warning,
|
|
533
538
|
};
|
|
534
539
|
}
|
|
535
540
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
id: kibi-bootstrap
|
|
3
3
|
name: kibi-bootstrap
|
|
4
4
|
description: "Use for any Kibi bootstrap or onboarding task: seeding a new or thin knowledge base; reviewing a bootstrap or onboarding plan, preview, or evidence; judging approval readiness or coverage; diagnosing a blocked, partial, or failed bootstrap or its repair; applying an approved bootstrap plan; or asking the human which knowledge sources hold intent. Covers kb_status first, source interview, cited intent claims, read-only kb_plan_bootstrap preview, explicit approval, exact-plan kb_apply_plan, and repair-safe close-out."
|
|
5
|
-
version: 3.
|
|
5
|
+
version: 3.16.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -37,7 +37,7 @@ Seed branch-local Kibi knowledge from cited product intent, without creating a p
|
|
|
37
37
|
3. **Declare** `bootstrapContext`: `projectSummary`; `knowledgeSources` (id, kind, title, locator, authority, optional connector, optional `component`); `intentClaims` (statement, sourceId, reference, `excerpt` required for `intent` and `observation` claims and optional for `open_question`, optional `kind`, default `intent`, optional `component` overriding the source's, optional `rationale` with the reason the source or the human gave, never invented); `conflicts` (`claimReferences` naming two or more declared claims by sourceId and reference, plus a one-sentence `note`). Only intent claims can become requirements, and they are recorded as the people's rules: `origin.kind: import` with `sourceId:reference` as `origin.ref`, and `firmness: firm`, so a later agent asks before changing one (normative lines from repository Markdown get the same, citing `path#Lline`). Observations, open questions (tagged `review:open-question`) and conflicts (tagged `review:conflict`) become cited observation facts. Generated subject keys take the shape `component.aspect`: name the component each source or claim is about (for example `recorder`; set `component` on the knowledge source, or on a claim to override it; repository Markdown takes its file or directory name), because an intent claim whose subject is neither one word nor already dotted, with no component, is reported in the plan diagnostics and left as an authoring follow-up instead of a malformed key. The aspect is the claim's subject, or its constrained property when the subject is the component itself. An aspect over four words or 40 characters is shortened to a noun phrase (words before `when`, `while`, `for`, `and`, ...; `support_inbox.update_in_real_time_when_a_new_ticket_is_assigned...` becomes `support_inbox.update_in_real_time`) and reported as `subject-key-shortened:` with both keys; two different subjects that shorten alike get a third segment (`editor.discard_a_draft.leaving`) and a `subject-key-disambiguated:` diagnostic; claims about one subject share one subject fact, and a `subject-key-shared:` diagnostic names the key and its sources. Show these diagnostics to the human with the plan so they can rename a key before approval. Kibi never contacts these sources. It binds your declaration into the plan hash.
|
|
38
38
|
4. **Preview** with `kb_plan_bootstrap` (or `plan-bootstrap --input`), read-only. On `needs_context`, ask only its bounded questions (four at most), then preview again. When `pluginOffers` is non-empty (for example `kibi-plugin-ui` because UI component files exist), ask the human once whether to enable each offered plugin, naming its evidence files. On yes, install it as a dev dependency and add it to `package.json` `kibi.plugins` with the offered capability in `augment` mode; on no, add its name to `kibi.declinedPlugins` so it is not offered again. Either way the human decides; never enable a plugin unasked. For `kibi-plugin-ui`, step 11 also captures the UI pattern inventory (see `kibi-usage` `resources/ui-requirements.md`).
|
|
39
39
|
5. **Narrow with filters, not caps.** Read the `tldr` and the `Suppressed candidates by reason` diagnostic before individual rows. If the output is too large or mostly tooling or metadata, re-preview with `entityTypes` or declared `sourceOfTruthPaths`. Generic Markdown is off by default once you declare intent claims; set `includeGenericMarkdown: true` only for repository docs the human named. Keep confirmed intent claims: they are never capped and never use `maxCandidates`, which is the separate budget for candidates Kibi discovers (symbols, tests, repository docs). Raise it only when discovered candidates you need are `over_limit`, and never for provenance stubs: a provider entry with no claim (`Source module: …`, repository metadata, layout roots) is planned last as a `meta` fact tagged `bootstrap:provenance-stub`, `discoverySummary.provenanceStubs` counts them apart from `candidatesWithClaims`, and the `over_limit` diagnostic says how many suppressed candidates are stubs; they add no knowledge, so a plan that is mostly stubs needs `entityTypes` or declared sources, not a higher cap. Read the per-source `Knowledge source …` diagnostics: each splits the claims not planned by reason (suppressed by the activation mode, a `suppressedCandidates` row, a `sourceOnlySignals` follow-up). Report them per source and restate them before approval, or carry them to step 11 with their citation.
|
|
40
|
-
6. **Request approval.** Show the complete `structuredContent.plan`, the full hash (never abbreviated), which candidates cite which sources, what was omitted, the open questions and declared conflicts it records for the human to decide, and any claim that contradicts code. If you find an undeclared contradiction now, add it to `conflicts` and preview again rather than resolving it. A `conflict-review:` diagnostic (and `review_against:<id>` evidence on the candidate) names current requirements Kibi could not check a planned claim against because they have no logic: compare each pair yourself and show any contradiction to the human with the plan; they decide whether to drop the claim or keep it and supersede the requirement after apply. With no answer, stop as "awaiting approval." If declined, replan and ask again with the new hash.
|
|
40
|
+
6. **Request approval.** Show the complete `structuredContent.plan`, the full hash (never abbreviated), which candidates cite which sources, what was omitted, the open questions and declared conflicts it records for the human to decide, and any claim that contradicts code. If you find an undeclared contradiction now, add it to `conflicts` and preview again rather than resolving it. A `conflict-review:` diagnostic (and `review_against:<id>` evidence on the candidate) names current requirements Kibi could not check a planned claim against because they have no logic: compare each pair yourself and show any contradiction to the human with the plan; they decide whether to drop the claim or keep it and supersede the requirement after apply. A claim left for authoring gets the same diagnostic (and `review_against:<id>` evidence on its follow-up): when you compile it with `kb_compile_intent` in step 11, compare it with the named requirements and send your verdicts in `conflictReviews`. With no answer, stop as "awaiting approval." If declined, replan and ask again with the new hash.
|
|
41
41
|
7. **Pre-apply check.** The plan you send must equal the returned plan: every top-level field, including `suppressedCandidates`, `diagnostics`, `candidates`, `actions`, and `expected`, with every array the same length and order. Never rebuild it from preview fields. If the host cannot pass the exact object, stop and say so.
|
|
42
42
|
8. **Apply once** with `kb_apply_plan`, the exact plan, and `approvedPlanHash`. The operation owns dependency ordering, source-first writes, sequential mutation, and recovery journaling. A plan with hundreds of actions can run for minutes: pass a `progressToken` (Kibi sends progress after each action) with a client that resets its timeout on progress, or pass `async: true` and poll `kb_job_status` when the host has it. If the apply is cut off, call `kb_apply_plan` with only the `recoveryJournalId` from `kb_status` or the error; it resumes an action interrupted mid-write and reclaims a lock left by a dead process. Never edit or delete `.kb/recovery` files; if recovery is refused, stop and report it.
|
|
43
43
|
9. **Read back** with `kb_query` and `kb_search` to confirm writes and citations.
|
|
@@ -16,6 +16,11 @@ export declare function isAllowedGranularityReason(value: unknown): value is Gra
|
|
|
16
16
|
export declare function isCoarseGranularityReason(value: unknown): value is CoarseGranularityReason;
|
|
17
17
|
export declare function getSymbolRole(candidate: GranularSymbolCandidate): SymbolRole;
|
|
18
18
|
export declare function isBehavioralSymbol(candidate: GranularSymbolCandidate): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The behavioral candidates' names, the place a coarse link should move to:
|
|
21
|
+
* functions, methods and accessors first, then properties (behavioral in the
|
|
22
|
+
* schema, but usually plain fields), each group sorted by name.
|
|
23
|
+
*/
|
|
19
24
|
export declare function getBehavioralSymbolNames(candidates: GranularSymbolCandidate[]): string[];
|
|
20
25
|
/**
|
|
21
26
|
* The candidates that are narrower than a manifest symbol: members of it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-granularity.d.ts","sourceRoot":"","sources":["../../src/public/symbol-granularity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,0BAA0B,EAC1B,wCAAwC,EACxC,gCAAgC,EAChC,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,cAAc,EACd,YAAY,EACZ,KAAK,UAAU,EACf,+BAA+B,EAC/B,KAAK,4BAA4B,EAClC,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,0BAA0B,EAC1B,wCAAwC,EACxC,gCAAgC,EAChC,cAAc,EACd,YAAY,EACZ,+BAA+B,GAChC,CAAC;AACF,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,4BAA4B,GAC7B,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,WAAW,GACX,MAAM,GACN,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAYD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAE5D;AAED,eAAO,MAAM,uBAAuB,wBAAkB,CAAC;AAEvD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAIhE;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,4BAA4B,CAIvC;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,iBAAiB,CAE5B;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,uBAAuB,CAElC;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,uBAAuB,GAAG,UAAU,CAI5E;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,uBAAuB,GACjC,OAAO,CAET;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,uBAAuB,EAAE,GACpC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"symbol-granularity.d.ts","sourceRoot":"","sources":["../../src/public/symbol-granularity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,0BAA0B,EAC1B,wCAAwC,EACxC,gCAAgC,EAChC,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,cAAc,EACd,YAAY,EACZ,KAAK,UAAU,EACf,+BAA+B,EAC/B,KAAK,4BAA4B,EAClC,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,0BAA0B,EAC1B,wCAAwC,EACxC,gCAAgC,EAChC,cAAc,EACd,YAAY,EACZ,+BAA+B,GAChC,CAAC;AACF,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,4BAA4B,GAC7B,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,WAAW,GACX,MAAM,GACN,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IAC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Symbol(candidate) {
|
|
33
33
|
return getSymbolRole(candidate) === "behavioral";
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* The behavioral candidates' names, the place a coarse link should move to:
|
|
37
|
+
* functions, methods and accessors first, then properties (behavioral in the
|
|
38
|
+
* schema, but usually plain fields), each group sorted by name.
|
|
39
|
+
*/
|
|
40
|
+
// implements REQ-kibi-symbol-link-guidance
|
|
35
41
|
export function getBehavioralSymbolNames(candidates) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
const behavioral = candidates.filter(isBehavioralSymbol);
|
|
43
|
+
const names = (properties) => behavioral
|
|
44
|
+
.filter((candidate) => (candidate.kind === "property") === properties)
|
|
45
|
+
.map((candidate) => candidate.name)
|
|
46
|
+
.sort();
|
|
47
|
+
return [...new Set([...names(false), ...names(true)])];
|
|
39
48
|
}
|
|
40
49
|
/**
|
|
41
50
|
* The candidates that are narrower than a manifest symbol: members of it
|
|
@@ -20,6 +20,6 @@ export declare function stagesKnowledge(paths: readonly string[]): boolean;
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function collectIntroducedConsistencyViolations(snapshot: SnapshotReader, headKnowledge: ExtractionResult[]): Promise<Violation[]>;
|
|
22
22
|
/** Text lines for introduced consistency violations, in `kibi check` form. */
|
|
23
|
-
export declare function formatConsistencyViolations(violations: readonly Violation[]): string[];
|
|
23
|
+
export declare function formatConsistencyViolations(violations: readonly Violation[], kind?: string): string[];
|
|
24
24
|
export {};
|
|
25
25
|
//# sourceMappingURL=staged-consistency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staged-consistency.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-consistency.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAsB1D,KAAK,cAAc,GAAG,QAAQ,CAAC;IAC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ChC,OAAO,CAAC,SAAS,EAAE,CAAC,CAYtB;AAED,8EAA8E;AAE9E,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,SAAS,SAAS,EAAE,EAChC,IAAI,SAAgB,GACnB,MAAM,EAAE,CAWV"}
|
|
@@ -77,9 +77,9 @@ export async function collectIntroducedConsistencyViolations(snapshot, headKnowl
|
|
|
77
77
|
}
|
|
78
78
|
/** Text lines for introduced consistency violations, in `kibi check` form. */
|
|
79
79
|
// implements REQ-cli-staged-consistency
|
|
80
|
-
export function formatConsistencyViolations(violations) {
|
|
80
|
+
export function formatConsistencyViolations(violations, kind = "consistency") {
|
|
81
81
|
const lines = [
|
|
82
|
-
`Found ${violations.length}
|
|
82
|
+
`Found ${violations.length} ${kind} violation(s) introduced by the staged changes:`,
|
|
83
83
|
"",
|
|
84
84
|
];
|
|
85
85
|
for (const violation of violations) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ExtractionResult } from "../extractors/markdown.js";
|
|
2
|
+
import type { Violation } from "../public/check-types.js";
|
|
3
|
+
type TreeReader = Readonly<{
|
|
4
|
+
baseTree: string;
|
|
5
|
+
headTree: string;
|
|
6
|
+
readGit(args: readonly string[]): Buffer;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* entity-context-missing findings on the entity documents a commit stages,
|
|
10
|
+
* that the same documents did not have at the base tree. The rule reads only
|
|
11
|
+
* the entity file, so no projection is needed. A document whose entity
|
|
12
|
+
* already lacked context at the base (legacy debt, or one the migration
|
|
13
|
+
* acknowledged) does not block the commit; full `kibi check` still reports
|
|
14
|
+
* it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function collectIntroducedEntityContextViolations(snapshot: TreeReader, stagedPaths: readonly string[], headKnowledge: readonly ExtractionResult[]): Violation[];
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=staged-entity-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"staged-entity-context.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-entity-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAO1D,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAC;CAC1C,CAAC,CAAC;AA8CH;;;;;;;GAOG;AAEH,wBAAgB,wCAAwC,CACtD,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,aAAa,EAAE,SAAS,gBAAgB,EAAE,GACzC,SAAS,EAAE,CA8Bb"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { CONTEXT_REQUIRED_TYPES } from "../entity-body-context.js";
|
|
2
|
+
import { ENTITY_CONTEXT_MISSING_RULE, evaluateEntityContext, readAuthoredEntity, } from "../public/operations/entity-context.js";
|
|
3
|
+
function readTreeFile(snapshot, tree, file) {
|
|
4
|
+
try {
|
|
5
|
+
return snapshot.readGit(["show", `${tree}:${file}`]).toString("utf8");
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The ids the schema 8 body-context migration acknowledged, from the KB
|
|
13
|
+
* manifest of one tree: they stay exempt, so a migration commit passes.
|
|
14
|
+
*/
|
|
15
|
+
// implements REQ-cli-staged-entity-context
|
|
16
|
+
function acknowledgedIds(snapshot, tree) {
|
|
17
|
+
const text = readTreeFile(snapshot, tree, ".kb/manifest.json");
|
|
18
|
+
if (text === null)
|
|
19
|
+
return new Set();
|
|
20
|
+
try {
|
|
21
|
+
const parsed = JSON.parse(text);
|
|
22
|
+
return new Set(Array.isArray(parsed.contextAcknowledged)
|
|
23
|
+
? parsed.contextAcknowledged.filter((id) => typeof id === "string")
|
|
24
|
+
: []);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return new Set();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** Ids another entity supersedes in the given compiled knowledge. */
|
|
31
|
+
// implements REQ-cli-staged-entity-context
|
|
32
|
+
function supersededIds(knowledge) {
|
|
33
|
+
const superseded = new Set();
|
|
34
|
+
for (const result of knowledge)
|
|
35
|
+
for (const relationship of result.relationships)
|
|
36
|
+
if (relationship.type === "supersedes")
|
|
37
|
+
superseded.add(relationship.to);
|
|
38
|
+
return superseded;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* entity-context-missing findings on the entity documents a commit stages,
|
|
42
|
+
* that the same documents did not have at the base tree. The rule reads only
|
|
43
|
+
* the entity file, so no projection is needed. A document whose entity
|
|
44
|
+
* already lacked context at the base (legacy debt, or one the migration
|
|
45
|
+
* acknowledged) does not block the commit; full `kibi check` still reports
|
|
46
|
+
* it.
|
|
47
|
+
*/
|
|
48
|
+
// implements REQ-cli-staged-entity-context
|
|
49
|
+
export function collectIntroducedEntityContextViolations(snapshot, stagedPaths, headKnowledge) {
|
|
50
|
+
const rules = new Set([ENTITY_CONTEXT_MISSING_RULE]);
|
|
51
|
+
const read = (tree) => stagedPaths.flatMap((file) => {
|
|
52
|
+
const content = readTreeFile(snapshot, tree, file);
|
|
53
|
+
const entity = content === null ? null : readAuthoredEntity(content, file);
|
|
54
|
+
return entity !== null &&
|
|
55
|
+
CONTEXT_REQUIRED_TYPES.includes(entity.type)
|
|
56
|
+
? [entity]
|
|
57
|
+
: [];
|
|
58
|
+
});
|
|
59
|
+
const head = evaluateEntityContext(read(snapshot.headTree), supersededIds(headKnowledge), rules, acknowledgedIds(snapshot, snapshot.headTree));
|
|
60
|
+
if (head.length === 0)
|
|
61
|
+
return [];
|
|
62
|
+
// Without the base tree's supersessions the base reports at least what it
|
|
63
|
+
// had, so a finding the base already carried never blocks.
|
|
64
|
+
const base = new Set(evaluateEntityContext(read(snapshot.baseTree), new Set(), rules, acknowledgedIds(snapshot, snapshot.baseTree)).map((violation) => violation.entityId));
|
|
65
|
+
return head.filter((violation) => !base.has(violation.entityId));
|
|
66
|
+
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,11 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { planLegacyStorageMigration } from "../../commands/legacy-storage-migration.js";
|
|
5
5
|
import { BRANCH_STORE_NOT_COMPILED } from "../../utils/branch-store.js";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
LEGACY_KB_MIGRATION_COMMAND,
|
|
8
|
+
LEGACY_KB_MIGRATION_NOTE,
|
|
9
|
+
legacyConfigExists,
|
|
10
|
+
} from "../../utils/config.js";
|
|
7
11
|
import { MTIME_SOURCE_REASON_CODES } from "../../utils/content-freshness.js";
|
|
8
12
|
import { readKbManifestStatus } from "../../utils/kb-manifest.js";
|
|
9
13
|
import {
|
|
@@ -743,7 +747,13 @@ export function readMigrationConfigStatus(
|
|
|
743
747
|
...schemaStatus,
|
|
744
748
|
currentVersion: normalizeSchemaVersion(legacySchemaVersion),
|
|
745
749
|
configHash: null,
|
|
746
|
-
|
|
750
|
+
// implements REQ-legacy-kb-first-step-migrate
|
|
751
|
+
// A legacy KB is migrated, never initialized: name the step kb_status's
|
|
752
|
+
// bootstrap.nextAction and kibi doctor name.
|
|
753
|
+
warning:
|
|
754
|
+
status.state === "missing" && legacyConfigExists(workspaceRoot)
|
|
755
|
+
? `Kibi lifecycle manifest is missing because this KB was written by an older Kibi; run '${LEGACY_KB_MIGRATION_COMMAND}' (${LEGACY_KB_MIGRATION_NOTE}).`
|
|
756
|
+
: status.warning,
|
|
747
757
|
};
|
|
748
758
|
}
|
|
749
759
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
id: kibi-bootstrap
|
|
3
3
|
name: kibi-bootstrap
|
|
4
4
|
description: "Use for any Kibi bootstrap or onboarding task: seeding a new or thin knowledge base; reviewing a bootstrap or onboarding plan, preview, or evidence; judging approval readiness or coverage; diagnosing a blocked, partial, or failed bootstrap or its repair; applying an approved bootstrap plan; or asking the human which knowledge sources hold intent. Covers kb_status first, source interview, cited intent claims, read-only kb_plan_bootstrap preview, explicit approval, exact-plan kb_apply_plan, and repair-safe close-out."
|
|
5
|
-
version: 3.
|
|
5
|
+
version: 3.16.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -37,7 +37,7 @@ Seed branch-local Kibi knowledge from cited product intent, without creating a p
|
|
|
37
37
|
3. **Declare** `bootstrapContext`: `projectSummary`; `knowledgeSources` (id, kind, title, locator, authority, optional connector, optional `component`); `intentClaims` (statement, sourceId, reference, `excerpt` required for `intent` and `observation` claims and optional for `open_question`, optional `kind`, default `intent`, optional `component` overriding the source's, optional `rationale` with the reason the source or the human gave, never invented); `conflicts` (`claimReferences` naming two or more declared claims by sourceId and reference, plus a one-sentence `note`). Only intent claims can become requirements, and they are recorded as the people's rules: `origin.kind: import` with `sourceId:reference` as `origin.ref`, and `firmness: firm`, so a later agent asks before changing one (normative lines from repository Markdown get the same, citing `path#Lline`). Observations, open questions (tagged `review:open-question`) and conflicts (tagged `review:conflict`) become cited observation facts. Generated subject keys take the shape `component.aspect`: name the component each source or claim is about (for example `recorder`; set `component` on the knowledge source, or on a claim to override it; repository Markdown takes its file or directory name), because an intent claim whose subject is neither one word nor already dotted, with no component, is reported in the plan diagnostics and left as an authoring follow-up instead of a malformed key. The aspect is the claim's subject, or its constrained property when the subject is the component itself. An aspect over four words or 40 characters is shortened to a noun phrase (words before `when`, `while`, `for`, `and`, ...; `support_inbox.update_in_real_time_when_a_new_ticket_is_assigned...` becomes `support_inbox.update_in_real_time`) and reported as `subject-key-shortened:` with both keys; two different subjects that shorten alike get a third segment (`editor.discard_a_draft.leaving`) and a `subject-key-disambiguated:` diagnostic; claims about one subject share one subject fact, and a `subject-key-shared:` diagnostic names the key and its sources. Show these diagnostics to the human with the plan so they can rename a key before approval. Kibi never contacts these sources. It binds your declaration into the plan hash.
|
|
38
38
|
4. **Preview** with `kb_plan_bootstrap` (or `plan-bootstrap --input`), read-only. On `needs_context`, ask only its bounded questions (four at most), then preview again. When `pluginOffers` is non-empty (for example `kibi-plugin-ui` because UI component files exist), ask the human once whether to enable each offered plugin, naming its evidence files. On yes, install it as a dev dependency and add it to `package.json` `kibi.plugins` with the offered capability in `augment` mode; on no, add its name to `kibi.declinedPlugins` so it is not offered again. Either way the human decides; never enable a plugin unasked. For `kibi-plugin-ui`, step 11 also captures the UI pattern inventory (see `kibi-usage` `resources/ui-requirements.md`).
|
|
39
39
|
5. **Narrow with filters, not caps.** Read the `tldr` and the `Suppressed candidates by reason` diagnostic before individual rows. If the output is too large or mostly tooling or metadata, re-preview with `entityTypes` or declared `sourceOfTruthPaths`. Generic Markdown is off by default once you declare intent claims; set `includeGenericMarkdown: true` only for repository docs the human named. Keep confirmed intent claims: they are never capped and never use `maxCandidates`, which is the separate budget for candidates Kibi discovers (symbols, tests, repository docs). Raise it only when discovered candidates you need are `over_limit`, and never for provenance stubs: a provider entry with no claim (`Source module: …`, repository metadata, layout roots) is planned last as a `meta` fact tagged `bootstrap:provenance-stub`, `discoverySummary.provenanceStubs` counts them apart from `candidatesWithClaims`, and the `over_limit` diagnostic says how many suppressed candidates are stubs; they add no knowledge, so a plan that is mostly stubs needs `entityTypes` or declared sources, not a higher cap. Read the per-source `Knowledge source …` diagnostics: each splits the claims not planned by reason (suppressed by the activation mode, a `suppressedCandidates` row, a `sourceOnlySignals` follow-up). Report them per source and restate them before approval, or carry them to step 11 with their citation.
|
|
40
|
-
6. **Request approval.** Show the complete `structuredContent.plan`, the full hash (never abbreviated), which candidates cite which sources, what was omitted, the open questions and declared conflicts it records for the human to decide, and any claim that contradicts code. If you find an undeclared contradiction now, add it to `conflicts` and preview again rather than resolving it. A `conflict-review:` diagnostic (and `review_against:<id>` evidence on the candidate) names current requirements Kibi could not check a planned claim against because they have no logic: compare each pair yourself and show any contradiction to the human with the plan; they decide whether to drop the claim or keep it and supersede the requirement after apply. With no answer, stop as "awaiting approval." If declined, replan and ask again with the new hash.
|
|
40
|
+
6. **Request approval.** Show the complete `structuredContent.plan`, the full hash (never abbreviated), which candidates cite which sources, what was omitted, the open questions and declared conflicts it records for the human to decide, and any claim that contradicts code. If you find an undeclared contradiction now, add it to `conflicts` and preview again rather than resolving it. A `conflict-review:` diagnostic (and `review_against:<id>` evidence on the candidate) names current requirements Kibi could not check a planned claim against because they have no logic: compare each pair yourself and show any contradiction to the human with the plan; they decide whether to drop the claim or keep it and supersede the requirement after apply. A claim left for authoring gets the same diagnostic (and `review_against:<id>` evidence on its follow-up): when you compile it with `kb_compile_intent` in step 11, compare it with the named requirements and send your verdicts in `conflictReviews`. With no answer, stop as "awaiting approval." If declined, replan and ask again with the new hash.
|
|
41
41
|
7. **Pre-apply check.** The plan you send must equal the returned plan: every top-level field, including `suppressedCandidates`, `diagnostics`, `candidates`, `actions`, and `expected`, with every array the same length and order. Never rebuild it from preview fields. If the host cannot pass the exact object, stop and say so.
|
|
42
42
|
8. **Apply once** with `kb_apply_plan`, the exact plan, and `approvedPlanHash`. The operation owns dependency ordering, source-first writes, sequential mutation, and recovery journaling. A plan with hundreds of actions can run for minutes: pass a `progressToken` (Kibi sends progress after each action) with a client that resets its timeout on progress, or pass `async: true` and poll `kb_job_status` when the host has it. If the apply is cut off, call `kb_apply_plan` with only the `recoveryJournalId` from `kb_status` or the error; it resumes an action interrupted mid-write and reclaims a lock left by a dead process. Never edit or delete `.kb/recovery` files; if recovery is refused, stop and report it.
|
|
43
43
|
9. **Read back** with `kb_query` and `kb_search` to confirm writes and citations.
|
|
@@ -107,14 +107,22 @@ export function isBehavioralSymbol(
|
|
|
107
107
|
return getSymbolRole(candidate) === "behavioral";
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* The behavioral candidates' names, the place a coarse link should move to:
|
|
112
|
+
* functions, methods and accessors first, then properties (behavioral in the
|
|
113
|
+
* schema, but usually plain fields), each group sorted by name.
|
|
114
|
+
*/
|
|
115
|
+
// implements REQ-kibi-symbol-link-guidance
|
|
110
116
|
export function getBehavioralSymbolNames(
|
|
111
117
|
candidates: GranularSymbolCandidate[],
|
|
112
118
|
): string[] {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
const behavioral = candidates.filter(isBehavioralSymbol);
|
|
120
|
+
const names = (properties: boolean) =>
|
|
121
|
+
behavioral
|
|
122
|
+
.filter((candidate) => (candidate.kind === "property") === properties)
|
|
123
|
+
.map((candidate) => candidate.name)
|
|
124
|
+
.sort();
|
|
125
|
+
return [...new Set([...names(false), ...names(true)])];
|
|
118
126
|
}
|
|
119
127
|
|
|
120
128
|
/**
|