kibi-cli 2.5.2 → 2.6.1
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/cli-operation-metadata.d.ts +1 -1
- package/dist/cli-operation-metadata.js +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +15 -0
- package/dist/commands/init-helpers.js +1 -1
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +43 -0
- package/dist/entity-body-context.d.ts +132 -0
- package/dist/entity-body-context.d.ts.map +1 -0
- package/dist/entity-body-context.js +382 -0
- package/dist/extractors/markdown.d.ts +13 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +19 -2
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +4 -4
- package/dist/operations/bootstrap/candidate-helpers.d.ts +18 -0
- package/dist/operations/bootstrap/candidate-helpers.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidate-helpers.js +35 -0
- package/dist/operations/bootstrap/candidates.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidates.js +4 -2
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +24 -15
- package/dist/operations/bootstrap/intent-claims.d.ts.map +1 -1
- package/dist/operations/bootstrap/intent-claims.js +210 -5
- package/dist/operations/bootstrap/markdown-candidates.d.ts.map +1 -1
- package/dist/operations/bootstrap/markdown-candidates.js +7 -3
- package/dist/operations/bootstrap/presentation.d.ts +8 -0
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
- package/dist/operations/bootstrap/presentation.js +66 -8
- package/dist/operations/bootstrap/types.d.ts +21 -0
- package/dist/operations/bootstrap/types.d.ts.map +1 -1
- package/dist/operations/bootstrap/types.js +10 -0
- package/dist/operations/migration/entity-body-context.d.ts +57 -0
- package/dist/operations/migration/entity-body-context.d.ts.map +1 -0
- package/dist/operations/migration/entity-body-context.js +261 -0
- package/dist/operations/migration/polarity-values.d.ts.map +1 -1
- package/dist/operations/migration/polarity-values.js +5 -2
- package/dist/operations/migration/schema6.d.ts +2 -0
- package/dist/operations/migration/schema6.d.ts.map +1 -1
- package/dist/operations/migration/schema6.js +69 -0
- package/dist/operations/modeling/logic-modeling.d.ts.map +1 -1
- package/dist/operations/modeling/logic-modeling.js +3 -1
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +7 -9
- package/dist/operations/mutation/context-warning.d.ts +13 -0
- package/dist/operations/mutation/context-warning.d.ts.map +1 -0
- package/dist/operations/mutation/context-warning.js +59 -0
- package/dist/operations/mutation/origin.d.ts +2 -1
- package/dist/operations/mutation/origin.d.ts.map +1 -1
- package/dist/operations/mutation/origin.js +7 -18
- package/dist/operations/mutation/requirement-semantics.d.ts +16 -0
- package/dist/operations/mutation/requirement-semantics.d.ts.map +1 -0
- package/dist/operations/mutation/requirement-semantics.js +64 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +10 -0
- package/dist/operations/mutation/stored-entity.d.ts +20 -0
- package/dist/operations/mutation/stored-entity.d.ts.map +1 -0
- package/dist/operations/mutation/stored-entity.js +51 -0
- package/dist/operations/mutation/upsert.d.ts +3 -2
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +19 -10
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +6 -1
- package/dist/operations/planning/compile-intent.d.ts +9 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +49 -2
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +3 -2
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +3 -41
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.js +10 -1
- package/dist/operations/semantic-advisor/proposition-role.d.ts +6 -0
- package/dist/operations/semantic-advisor/proposition-role.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/proposition-role.js +76 -0
- package/dist/public/operations/catalog.d.ts +78 -9
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +3 -0
- package/dist/public/operations/entity-context.d.ts +51 -0
- package/dist/public/operations/entity-context.d.ts.map +1 -0
- package/dist/public/operations/entity-context.js +235 -0
- package/dist/public/operations/origin-review.d.ts +1 -1
- package/dist/public/operations/origin-review.js +2 -2
- package/dist/public/operations/specs/bootstrap.d.ts +59 -5
- package/dist/public/operations/specs/bootstrap.d.ts.map +1 -1
- package/dist/public/operations/specs/bootstrap.js +48 -6
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +3 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/mutation-schemas.d.ts +1 -1
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +10 -2
- package/dist/public/operations/specs/planning.d.ts +15 -0
- package/dist/public/operations/specs/planning.d.ts.map +1 -1
- package/dist/public/operations/specs/planning.js +15 -0
- package/dist/public/operations/specs/upsert.d.ts +3 -3
- package/dist/public/operations/specs/upsert.js +2 -2
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +7 -1
- package/dist/public/skills/kibi-bootstrap/SKILL.md +13 -7
- package/dist/public/skills/kibi-bootstrap/resources/bootstrap.md +9 -2
- package/dist/public/skills/kibi-usage/SKILL.md +56 -3
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +5 -1
- package/dist/schemas/entity.schema.json +14 -1
- package/dist/search-ranking.d.ts.map +1 -1
- package/dist/search-ranking.js +7 -4
- package/dist/traceability/staged-consistency.d.ts +25 -0
- package/dist/traceability/staged-consistency.d.ts.map +1 -0
- package/dist/traceability/staged-consistency.js +92 -0
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +5 -0
- package/dist/utils/kb-manifest.d.ts +5 -0
- package/dist/utils/kb-manifest.d.ts.map +1 -1
- package/dist/utils/kb-manifest.js +6 -0
- package/dist/utils/rule-registry.generated.d.ts +11 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +13 -0
- package/dist/utils/schema-version.d.ts +1 -1
- package/dist/utils/schema-version.d.ts.map +1 -1
- package/dist/utils/schema-version.js +3 -2
- package/package.json +2 -2
- package/schema/manifest.json +5 -0
- package/schema/validation.pl +14 -2
- package/src/public/operations/check-executor.ts +6 -0
- package/src/public/operations/entity-context.ts +304 -0
- package/src/public/operations/origin-review.ts +2 -2
- package/src/public/operations/specs/bootstrap.ts +52 -5
- package/src/public/operations/specs/check-rules.generated.ts +3 -1
- package/src/public/operations/specs/mutation-schemas.ts +10 -2
- package/src/public/operations/specs/planning.ts +18 -0
- package/src/public/operations/specs/upsert.ts +2 -2
- package/src/public/schemas/entity.ts +7 -1
- package/src/public/skills/kibi-bootstrap/SKILL.md +13 -7
- package/src/public/skills/kibi-bootstrap/resources/bootstrap.md +9 -2
- package/src/public/skills/kibi-usage/SKILL.md +56 -3
- package/src/public/skills/kibi-usage/resources/source-authoring.md +5 -1
- package/src/schemas/entity.schema.json +14 -1
|
@@ -36,7 +36,7 @@ function firstUpsertId(candidate) {
|
|
|
36
36
|
function sha256(value) {
|
|
37
37
|
return createHash("sha256").update(value).digest("hex");
|
|
38
38
|
}
|
|
39
|
-
// implements REQ-bootstrap-write-safety, REQ-bootstrap-intent-claim-accounting
|
|
39
|
+
// implements REQ-bootstrap-write-safety, REQ-bootstrap-intent-claim-accounting, REQ-bootstrap-discovered-candidate-budget
|
|
40
40
|
export function selectBootstrapCandidates(input, existingIds, entityTypes, maximum) {
|
|
41
41
|
const allowed = entityTypes?.length ? new Set(entityTypes) : null;
|
|
42
42
|
const lane = (candidate) => {
|
|
@@ -111,20 +111,21 @@ export function selectBootstrapCandidates(input, existingIds, entityTypes, maxim
|
|
|
111
111
|
else
|
|
112
112
|
selected.set(key, candidate);
|
|
113
113
|
}
|
|
114
|
-
// Declared intent claims are never capped
|
|
115
|
-
// at, and the schema already bounds them.
|
|
116
|
-
// candidates Kibi discovers itself,
|
|
114
|
+
// Declared intent claims are never capped and sit outside the arithmetic:
|
|
115
|
+
// they are what the human pointed at, and the schema already bounds them.
|
|
116
|
+
// maxCandidates is the budget for candidates Kibi discovers itself, so a
|
|
117
|
+
// long list of declared intent never starves the code, test and document
|
|
118
|
+
// evidence that bootstrap is meant to link it to.
|
|
117
119
|
const written = new Map();
|
|
118
120
|
const staged = new Map();
|
|
119
121
|
const candidates = [];
|
|
120
|
-
let claimCount = 0;
|
|
121
122
|
let discoveredCount = 0;
|
|
122
|
-
|
|
123
|
-
// candidate asks for one of the slots the accepted claims leave free.
|
|
123
|
+
let overLimit = 0;
|
|
124
124
|
for (const candidate of selected.values()) {
|
|
125
125
|
const discovered = candidate.sourceKind !== "intent_claim";
|
|
126
|
-
if (discovered && discoveredCount >=
|
|
126
|
+
if (discovered && discoveredCount >= maximum) {
|
|
127
127
|
suppress(candidate, "over_limit");
|
|
128
|
+
overLimit += 1;
|
|
128
129
|
continue;
|
|
129
130
|
}
|
|
130
131
|
// Two candidates that write one entity ID with different content would
|
|
@@ -153,12 +154,10 @@ export function selectBootstrapCandidates(input, existingIds, entityTypes, maxim
|
|
|
153
154
|
}
|
|
154
155
|
if (discovered)
|
|
155
156
|
discoveredCount += 1;
|
|
156
|
-
else
|
|
157
|
-
claimCount += 1;
|
|
158
157
|
candidates.push(candidate);
|
|
159
158
|
}
|
|
160
|
-
if (
|
|
161
|
-
diagnostics.push(`${
|
|
159
|
+
if (overLimit > 0)
|
|
160
|
+
diagnostics.push(`${overLimit} discovered candidate(s) exceeded maxCandidates ${maximum} and are suppressed as over_limit; declared intent claims do not count against it.`);
|
|
162
161
|
return {
|
|
163
162
|
candidates,
|
|
164
163
|
suppressed,
|
|
@@ -293,10 +292,15 @@ async function expectedSnapshots(context, evidencePaths) {
|
|
|
293
292
|
};
|
|
294
293
|
}
|
|
295
294
|
}
|
|
296
|
-
// implements REQ-KIBI-BOOTSTRAP-PLAN, REQ-kibi-operation-interface-parity
|
|
295
|
+
// implements REQ-KIBI-BOOTSTRAP-PLAN, REQ-kibi-operation-interface-parity, REQ-bootstrap-discovered-candidate-budget
|
|
297
296
|
// implements REQ-KIBI-BOOTSTRAP-PLAN
|
|
298
297
|
export async function executePlanBootstrap(args, context) {
|
|
299
|
-
const
|
|
298
|
+
const declared = normalizeBootstrapContext(args.bootstrapContext);
|
|
299
|
+
// Declared intent claims already carry the human's sources of truth, so
|
|
300
|
+
// generic Markdown would mostly restate them as duplicate_title noise.
|
|
301
|
+
const genericMarkdownDefaultOff = args.includeGenericMarkdown === undefined &&
|
|
302
|
+
(declared.intentClaims?.length ?? 0) > 0;
|
|
303
|
+
const includeGenericMarkdown = args.includeGenericMarkdown ?? !genericMarkdownDefaultOff;
|
|
300
304
|
const minConfidence = clamp(args.minConfidence ?? 0.8, 0.6, 0.95);
|
|
301
305
|
const maxCandidates = clamp(Math.trunc(args.maxCandidates ?? 50), 1, 200);
|
|
302
306
|
const entityBindingDiagnostics = [];
|
|
@@ -323,7 +327,7 @@ export async function executePlanBootstrap(args, context) {
|
|
|
323
327
|
// Intent harvested from declared knowledge sources joins the repository
|
|
324
328
|
// evidence under the same activation policy, filters, and selection.
|
|
325
329
|
const claimed = discovery.activation.allowCandidateGeneration
|
|
326
|
-
? buildIntentClaimCandidates(
|
|
330
|
+
? buildIntentClaimCandidates(declared, existingIds, minConfidence)
|
|
327
331
|
: {
|
|
328
332
|
candidates: [],
|
|
329
333
|
sourceOnlySignals: [],
|
|
@@ -361,6 +365,11 @@ export async function executePlanBootstrap(args, context) {
|
|
|
361
365
|
expected,
|
|
362
366
|
bindingDiagnostics: [...bindingDiagnostics, ...entityBindingDiagnostics],
|
|
363
367
|
contextDiagnostics: [
|
|
368
|
+
...(genericMarkdownDefaultOff
|
|
369
|
+
? [
|
|
370
|
+
"Generic Markdown candidates are off by default because intent claims were declared; pass includeGenericMarkdown: true to include them.",
|
|
371
|
+
]
|
|
372
|
+
: []),
|
|
364
373
|
...claimed.diagnostics,
|
|
365
374
|
...built.diagnostics,
|
|
366
375
|
...selected.diagnostics,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-claims.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/intent-claims.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"intent-claims.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/intent-claims.ts"],"names":[],"mappings":"AAKA,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;AA0NF;;;;;;;GAOG;AAEH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,wBAAwB,EAClC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,aAAa,EAAE,MAAM,GACpB,sBAAsB,CAmJxB"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { renderRequirementBody } from "../../entity-body-context.js";
|
|
1
3
|
import { buildStrictWriteSet } from "../../utils/strict-modeling.js";
|
|
2
|
-
import { confidenceBand, strictPlan } from "./candidate-helpers.js";
|
|
4
|
+
import { confidenceBand, strictPlan, upsert } from "./candidate-helpers.js";
|
|
3
5
|
import { claimFor } from "./requirement-claims.js";
|
|
4
6
|
/** How much a claim is trusted follows the authority the human assigned. */
|
|
5
7
|
const AUTHORITY_CONFIDENCE = {
|
|
@@ -14,6 +16,169 @@ function citation(source, claim) {
|
|
|
14
16
|
...(source.connector ? [`connector:${source.connector}`] : []),
|
|
15
17
|
];
|
|
16
18
|
}
|
|
19
|
+
function digest(...parts) {
|
|
20
|
+
return createHash("sha256")
|
|
21
|
+
.update(parts.join("\u0000"))
|
|
22
|
+
.digest("hex")
|
|
23
|
+
.slice(0, 16)
|
|
24
|
+
.toUpperCase();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The entity body a claim persists: the statement, then a `## Source`
|
|
28
|
+
* section with the verbatim excerpt, the knowledge source title and the
|
|
29
|
+
* claim's reference. The external source (a ticket, a page) may be gone by the
|
|
30
|
+
* next migration; the body is what remains.
|
|
31
|
+
*/
|
|
32
|
+
// implements REQ-kb-entity-body-context
|
|
33
|
+
function claimBody(source, claim) {
|
|
34
|
+
return renderRequirementBody({
|
|
35
|
+
statement: claim.statement,
|
|
36
|
+
source: {
|
|
37
|
+
excerpt: claim.excerpt,
|
|
38
|
+
title: source.title,
|
|
39
|
+
reference: claim.reference,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Attach the claim body to an upsert step. The body is the statement plus the
|
|
45
|
+
* cited source; no context tag is added, so a claim whose source states no
|
|
46
|
+
* reason is reported by entity-context-missing instead of being acknowledged.
|
|
47
|
+
*/
|
|
48
|
+
// implements REQ-kb-entity-body-context
|
|
49
|
+
function withClaimBody(step, body) {
|
|
50
|
+
return { ...step, document: { body } };
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* An observation or open question from a declared source is evidence for the
|
|
54
|
+
* human, not a requirement: it becomes a cited, non-blocking observation fact
|
|
55
|
+
* so the plan keeps it without entering the contradiction lane.
|
|
56
|
+
*/
|
|
57
|
+
// implements REQ-bootstrap-claim-kinds-and-conflicts
|
|
58
|
+
function reviewClaimCandidate(source, claim, kind, confidence) {
|
|
59
|
+
const id = `FACT-BOOTSTRAP-${kind === "open_question" ? "QUESTION" : "OBSERVATION"}-${digest(source.id, claim.reference, claim.statement)}`;
|
|
60
|
+
const entity = {
|
|
61
|
+
type: "fact",
|
|
62
|
+
id,
|
|
63
|
+
title: claim.statement,
|
|
64
|
+
status: "active",
|
|
65
|
+
fact_kind: "observation",
|
|
66
|
+
source: `knowledge-source:${source.id}`,
|
|
67
|
+
text_ref: `${source.id}:${claim.reference}`,
|
|
68
|
+
tags: [
|
|
69
|
+
"bootstrap",
|
|
70
|
+
`knowledge-source:${source.id}`,
|
|
71
|
+
kind === "open_question" ? "review:open-question" : "claim:observation",
|
|
72
|
+
],
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
candidateId: `claim:${source.id}:${id.toLowerCase()}`,
|
|
76
|
+
entityType: "fact",
|
|
77
|
+
title: claim.statement,
|
|
78
|
+
sourceKind: "intent_claim",
|
|
79
|
+
sourcePath: claim.reference,
|
|
80
|
+
confidence,
|
|
81
|
+
confidenceBand: confidenceBand(confidence),
|
|
82
|
+
evidence: [
|
|
83
|
+
...citation(source, claim),
|
|
84
|
+
`claim_kind:${kind}`,
|
|
85
|
+
...(claim.excerpt ? [`excerpt:${claim.excerpt}`] : []),
|
|
86
|
+
],
|
|
87
|
+
relationships: [],
|
|
88
|
+
applyPlan: [withClaimBody(upsert(entity), claimBody(source, claim))],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A conflict the agent declared between claims becomes an observation fact
|
|
93
|
+
* tagged review:conflict that cites every conflicting claim, so the
|
|
94
|
+
* disagreement stays explicit in the KB instead of an external report.
|
|
95
|
+
*/
|
|
96
|
+
// implements REQ-bootstrap-claim-kinds-and-conflicts
|
|
97
|
+
function conflictCandidates(declared, sources, existingIds, minConfidence) {
|
|
98
|
+
const claims = new Set((declared.intentClaims ?? []).map((claim) => `${claim.sourceId}\u0000${claim.reference}`));
|
|
99
|
+
const candidates = [];
|
|
100
|
+
const suppressed = [];
|
|
101
|
+
const diagnostics = [];
|
|
102
|
+
const confidence = AUTHORITY_CONFIDENCE.authoritative;
|
|
103
|
+
for (const conflict of declared.conflicts ?? []) {
|
|
104
|
+
const refs = conflict.claimReferences.map((ref) => `${ref.sourceId}:${ref.reference}`);
|
|
105
|
+
const undeclared = conflict.claimReferences.filter((ref) => !claims.has(`${ref.sourceId}\u0000${ref.reference}`));
|
|
106
|
+
if (undeclared.length > 0) {
|
|
107
|
+
diagnostics.push(`Conflict "${conflict.note}" cites claim(s) not declared in intentClaims: ${undeclared.map((ref) => `${ref.sourceId}:${ref.reference}`).join(", ")}; declare them or correct the reference.`);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const id = `FACT-BOOTSTRAP-CONFLICT-${digest(...[...refs].sort(), conflict.note)}`;
|
|
111
|
+
const candidateId = `conflict:${id.toLowerCase()}`;
|
|
112
|
+
if (confidence < minConfidence) {
|
|
113
|
+
suppressed.push({
|
|
114
|
+
candidateId,
|
|
115
|
+
reason: "below_min_confidence",
|
|
116
|
+
sourcePath: refs.join(", "),
|
|
117
|
+
entityType: "fact",
|
|
118
|
+
});
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
if (existingIds.has(id)) {
|
|
122
|
+
suppressed.push({
|
|
123
|
+
candidateId,
|
|
124
|
+
reason: "entity_exists",
|
|
125
|
+
sourcePath: refs.join(", "),
|
|
126
|
+
entityType: "fact",
|
|
127
|
+
});
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
const title = `Conflict between ${refs.join(" and ")}: ${conflict.note}`;
|
|
131
|
+
const evidenceLines = conflict.claimReferences.map((ref) => {
|
|
132
|
+
const source = sources.get(ref.sourceId);
|
|
133
|
+
const claim = (declared.intentClaims ?? []).find((row) => row.sourceId === ref.sourceId && row.reference === ref.reference);
|
|
134
|
+
return [
|
|
135
|
+
`- ${[source?.title, ref.reference].filter(Boolean).join(" - ")}${claim ? `: ${claim.statement}` : ""}`,
|
|
136
|
+
...(claim?.excerpt
|
|
137
|
+
? [` > ${claim.excerpt.replace(/\s*\n\s*/g, " ")}`]
|
|
138
|
+
: []),
|
|
139
|
+
].join("\n");
|
|
140
|
+
});
|
|
141
|
+
const conflictBody = `${conflict.note}\n\n## Evidence\n\n${evidenceLines.join("\n")}\n`;
|
|
142
|
+
candidates.push({
|
|
143
|
+
candidateId,
|
|
144
|
+
entityType: "fact",
|
|
145
|
+
title,
|
|
146
|
+
sourceKind: "intent_claim",
|
|
147
|
+
sourcePath: refs.join(", "),
|
|
148
|
+
confidence,
|
|
149
|
+
confidenceBand: confidenceBand(confidence),
|
|
150
|
+
evidence: conflict.claimReferences.flatMap((ref) => {
|
|
151
|
+
const source = sources.get(ref.sourceId);
|
|
152
|
+
return [
|
|
153
|
+
`intent_claim:${ref.sourceId}:${ref.reference}`,
|
|
154
|
+
...(source
|
|
155
|
+
? [`knowledge_source:${source.kind}:${source.locator}`]
|
|
156
|
+
: []),
|
|
157
|
+
];
|
|
158
|
+
}),
|
|
159
|
+
relationships: [],
|
|
160
|
+
applyPlan: [
|
|
161
|
+
withClaimBody(upsert({
|
|
162
|
+
type: "fact",
|
|
163
|
+
id,
|
|
164
|
+
title,
|
|
165
|
+
status: "active",
|
|
166
|
+
fact_kind: "observation",
|
|
167
|
+
source: "bootstrap:declared-conflict",
|
|
168
|
+
text_ref: refs.join("; "),
|
|
169
|
+
tags: [
|
|
170
|
+
"bootstrap",
|
|
171
|
+
"review:conflict",
|
|
172
|
+
...[
|
|
173
|
+
...new Set(conflict.claimReferences.map((ref) => `knowledge-source:${ref.sourceId}`)),
|
|
174
|
+
],
|
|
175
|
+
],
|
|
176
|
+
}), conflictBody),
|
|
177
|
+
],
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
return { candidates, sourceOnlySignals: [], suppressed, diagnostics };
|
|
181
|
+
}
|
|
17
182
|
/**
|
|
18
183
|
* Turn intent the agent harvested from declared knowledge sources into cited
|
|
19
184
|
* bootstrap candidates. Kibi never contacts those sources: it only records
|
|
@@ -22,7 +187,7 @@ function citation(source, claim) {
|
|
|
22
187
|
* strict modeler cannot ground stays an explicit authoring follow-up instead
|
|
23
188
|
* of becoming unverifiable knowledge.
|
|
24
189
|
*/
|
|
25
|
-
// implements REQ-kibi-bootstrap-knowledge-sources
|
|
190
|
+
// implements REQ-kibi-bootstrap-knowledge-sources, REQ-bootstrap-claim-kinds-and-conflicts
|
|
26
191
|
export function buildIntentClaimCandidates(declared, existingIds, minConfidence) {
|
|
27
192
|
const sources = new Map((declared.knowledgeSources ?? []).map((source) => [source.id, source]));
|
|
28
193
|
const candidates = [];
|
|
@@ -35,18 +200,50 @@ export function buildIntentClaimCandidates(declared, existingIds, minConfidence)
|
|
|
35
200
|
diagnostics.push(`Intent claim cites an undeclared knowledge source "${claim.sourceId}" (${claim.reference}); declare it in knowledgeSources or drop the claim.`);
|
|
36
201
|
continue;
|
|
37
202
|
}
|
|
203
|
+
const kind = claim.kind ?? "intent";
|
|
38
204
|
if (source.authority === "stale") {
|
|
39
205
|
suppressed.push({
|
|
40
206
|
candidateId: "",
|
|
41
207
|
reason: "stale_knowledge_source",
|
|
42
208
|
sourcePath: claim.reference,
|
|
43
|
-
entityType: "req",
|
|
209
|
+
entityType: kind === "intent" ? "req" : "fact",
|
|
44
210
|
statement: claim.statement,
|
|
45
211
|
sourceId: source.id,
|
|
46
212
|
});
|
|
47
213
|
continue;
|
|
48
214
|
}
|
|
215
|
+
// The excerpt is the only verbatim quote from the source; without it an
|
|
216
|
+
// intent or observation would persist as a bare sentence. Only an open
|
|
217
|
+
// question may omit it.
|
|
218
|
+
if (kind !== "open_question" && !claim.excerpt) {
|
|
219
|
+
suppressed.push({
|
|
220
|
+
candidateId: "",
|
|
221
|
+
reason: "missing_excerpt",
|
|
222
|
+
sourcePath: claim.reference,
|
|
223
|
+
entityType: kind === "intent" ? "req" : "fact",
|
|
224
|
+
statement: claim.statement,
|
|
225
|
+
sourceId: source.id,
|
|
226
|
+
});
|
|
227
|
+
diagnostics.push(`Claim at ${source.id}:${claim.reference} is an ${kind === "intent" ? "intent" : "observation"} claim without an excerpt; quote the passage it came from in excerpt so the entity keeps it, then re-plan.`);
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
49
230
|
const confidence = AUTHORITY_CONFIDENCE[source.authority];
|
|
231
|
+
if (kind !== "intent") {
|
|
232
|
+
const review = reviewClaimCandidate(source, claim, kind, confidence);
|
|
233
|
+
const id = String(review.applyPlan[0]?.id ?? "");
|
|
234
|
+
if (confidence < minConfidence || existingIds.has(id))
|
|
235
|
+
suppressed.push({
|
|
236
|
+
candidateId: review.candidateId,
|
|
237
|
+
reason: confidence < minConfidence
|
|
238
|
+
? "below_min_confidence"
|
|
239
|
+
: "entity_exists",
|
|
240
|
+
sourcePath: claim.reference,
|
|
241
|
+
entityType: "fact",
|
|
242
|
+
});
|
|
243
|
+
else
|
|
244
|
+
candidates.push(review);
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
50
247
|
const evidence = citation(source, claim);
|
|
51
248
|
const provenance = `${source.id}:${claim.reference}`;
|
|
52
249
|
let writeSet = null;
|
|
@@ -78,7 +275,9 @@ export function buildIntentClaimCandidates(declared, existingIds, minConfidence)
|
|
|
78
275
|
from,
|
|
79
276
|
to,
|
|
80
277
|
})),
|
|
81
|
-
applyPlan: strictPlan(writeSet)
|
|
278
|
+
applyPlan: strictPlan(writeSet).map((step) => step.type === "req"
|
|
279
|
+
? withClaimBody(step, claimBody(source, claim))
|
|
280
|
+
: step),
|
|
82
281
|
});
|
|
83
282
|
continue;
|
|
84
283
|
}
|
|
@@ -106,5 +305,11 @@ export function buildIntentClaimCandidates(declared, existingIds, minConfidence)
|
|
|
106
305
|
evidence,
|
|
107
306
|
});
|
|
108
307
|
}
|
|
109
|
-
|
|
308
|
+
const declaredConflicts = conflictCandidates(declared, sources, existingIds, minConfidence);
|
|
309
|
+
return {
|
|
310
|
+
candidates: [...candidates, ...declaredConflicts.candidates],
|
|
311
|
+
sourceOnlySignals,
|
|
312
|
+
suppressed: [...suppressed, ...declaredConflicts.suppressed],
|
|
313
|
+
diagnostics: [...diagnostics, ...declaredConflicts.diagnostics],
|
|
314
|
+
};
|
|
110
315
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-candidates.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/markdown-candidates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown-candidates.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/markdown-candidates.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACxD,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CACnE,CAAC;AAuJF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,iBAAiB,EACvB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,aAAa,EAAE,MAAM,GACpB,oBAAoB,CAkFtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { buildStrictWriteSet } from "../../utils/strict-modeling.js";
|
|
3
|
-
import { confidenceBand, slug, strictPlan, upsert, } from "./candidate-helpers.js";
|
|
3
|
+
import { bootstrapProvenance, confidenceBand, provenanceBody, provenanceRequirementBody, slug, strictPlan, upsert, withDocumentBody, } from "./candidate-helpers.js";
|
|
4
4
|
import { claimFor, normalizeClaimStatement } from "./requirement-claims.js";
|
|
5
5
|
function headingSignals(heading, sourcePath, textRef, minConfidence) {
|
|
6
6
|
const result = [];
|
|
@@ -53,7 +53,9 @@ function genericHeadingCandidate(item, heading, line, existingIds, minConfidence
|
|
|
53
53
|
confidenceBand: confidence >= 0.95 ? "high" : confidence >= 0.8 ? "medium" : "low",
|
|
54
54
|
evidence: [`generic_heading:${relativePath}#L${line}`],
|
|
55
55
|
relationships: [],
|
|
56
|
-
applyPlan: [
|
|
56
|
+
applyPlan: [
|
|
57
|
+
withDocumentBody(upsert(entity), provenanceBody(heading, bootstrapProvenance("generic markdown", `${relativePath} line ${line}`, confidence))),
|
|
58
|
+
],
|
|
57
59
|
};
|
|
58
60
|
}
|
|
59
61
|
function requirementCandidate(item, statement, line, heading, headingLine, existingIds, minConfidence) {
|
|
@@ -93,7 +95,9 @@ function requirementCandidate(item, statement, line, heading, headingLine, exist
|
|
|
93
95
|
from,
|
|
94
96
|
to,
|
|
95
97
|
})),
|
|
96
|
-
applyPlan: strictPlan(writeSet)
|
|
98
|
+
applyPlan: strictPlan(writeSet).map((step) => step.type === "req"
|
|
99
|
+
? withDocumentBody(step, provenanceRequirementBody(statement, bootstrapProvenance("generic markdown", `${relativePath} line ${line}${heading ? ` under the heading "${heading}"` : ""}`, confidence), `${relativePath}#L${line}`))
|
|
100
|
+
: step),
|
|
97
101
|
};
|
|
98
102
|
}
|
|
99
103
|
// implements REQ-KIBI-BOOTSTRAP-PLAN
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { ActivationPolicy, BootstrapContext, BootstrapDeclaredContext, BootstrapPlanV1, Candidate, DiscoverySummary, PlanBootstrapResult, SourceOnlySignal } from "./types.js";
|
|
2
2
|
export declare function normalizeBootstrapContext(input?: BootstrapContext): BootstrapDeclaredContext;
|
|
3
|
+
/**
|
|
4
|
+
* Suppressions per reason, most frequent first, so a plan with hundreds of
|
|
5
|
+
* suppressed rows still reads as a handful of lines.
|
|
6
|
+
*/
|
|
7
|
+
export declare function suppressionCounts(rows: readonly Readonly<Record<string, unknown>>[]): readonly {
|
|
8
|
+
readonly reason: string;
|
|
9
|
+
readonly count: number;
|
|
10
|
+
}[];
|
|
3
11
|
export declare function presentBootstrap(input: {
|
|
4
12
|
readonly root: string;
|
|
5
13
|
readonly activation: ActivationPolicy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/presentation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/presentation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAGhB,gBAAgB,EAChB,wBAAwB,EAGxB,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAuGpB,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;AA0CD,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,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,CAmNtB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildGuidance } from "./guidance.js";
|
|
2
|
-
import { KNOWLEDGE_SOURCE_AUTHORITIES, KNOWLEDGE_SOURCE_KINDS, bootstrapPlanHash, } from "./types.js";
|
|
2
|
+
import { INTENT_CLAIM_KINDS, KNOWLEDGE_SOURCE_AUTHORITIES, KNOWLEDGE_SOURCE_KINDS, bootstrapPlanHash, } from "./types.js";
|
|
3
3
|
function strings(values) {
|
|
4
4
|
return [
|
|
5
5
|
...new Set((values ?? []).map((value) => value.trim()).filter(Boolean)),
|
|
@@ -41,9 +41,12 @@ function intentClaims(values) {
|
|
|
41
41
|
const statement = value.statement?.trim().replace(/\s+/g, " ");
|
|
42
42
|
const sourceId = value.sourceId?.trim();
|
|
43
43
|
const reference = value.reference?.trim();
|
|
44
|
+
const kind = value.kind ?? "intent";
|
|
44
45
|
if (!statement || !sourceId || !reference)
|
|
45
46
|
continue;
|
|
46
|
-
|
|
47
|
+
if (!INTENT_CLAIM_KINDS.includes(kind))
|
|
48
|
+
continue;
|
|
49
|
+
const key = `${sourceId}\u0000${reference}\u0000${statement}\u0000${kind}`;
|
|
47
50
|
if (seen.has(key))
|
|
48
51
|
continue;
|
|
49
52
|
seen.add(key);
|
|
@@ -53,14 +56,42 @@ function intentClaims(values) {
|
|
|
53
56
|
sourceId,
|
|
54
57
|
reference,
|
|
55
58
|
...(excerpt ? { excerpt } : {}),
|
|
59
|
+
// The default stays implicit so plans that declare no kinds keep
|
|
60
|
+
// their established shape and hash.
|
|
61
|
+
...(kind !== "intent" ? { kind } : {}),
|
|
56
62
|
});
|
|
57
63
|
}
|
|
58
64
|
return result;
|
|
59
65
|
}
|
|
66
|
+
function conflicts(values) {
|
|
67
|
+
const seen = new Set();
|
|
68
|
+
const result = [];
|
|
69
|
+
for (const value of values ?? []) {
|
|
70
|
+
const note = value.note?.trim().replace(/\s+/g, " ");
|
|
71
|
+
const refs = new Map();
|
|
72
|
+
for (const ref of value.claimReferences ?? []) {
|
|
73
|
+
const sourceId = ref.sourceId?.trim();
|
|
74
|
+
const reference = ref.reference?.trim();
|
|
75
|
+
if (sourceId && reference)
|
|
76
|
+
refs.set(`${sourceId}\u0000${reference}`, { sourceId, reference });
|
|
77
|
+
}
|
|
78
|
+
if (!note || refs.size < 2)
|
|
79
|
+
continue;
|
|
80
|
+
const claimReferences = [...refs.values()];
|
|
81
|
+
const key = `${[...refs.keys()].sort().join("\u0001")}\u0002${note}`;
|
|
82
|
+
if (seen.has(key))
|
|
83
|
+
continue;
|
|
84
|
+
seen.add(key);
|
|
85
|
+
result.push({ claimReferences, note });
|
|
86
|
+
}
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
// implements REQ-bootstrap-claim-kinds-and-conflicts
|
|
60
90
|
export function normalizeBootstrapContext(input) {
|
|
61
91
|
const projectSummary = input?.projectSummary?.trim();
|
|
62
92
|
const sources = knowledgeSources(input?.knowledgeSources);
|
|
63
93
|
const claims = intentClaims(input?.intentClaims);
|
|
94
|
+
const declaredConflicts = conflicts(input?.conflicts);
|
|
64
95
|
return {
|
|
65
96
|
...(projectSummary ? { projectSummary } : {}),
|
|
66
97
|
sourceOfTruthPaths: strings(input?.sourceOfTruthPaths),
|
|
@@ -69,6 +100,7 @@ export function normalizeBootstrapContext(input) {
|
|
|
69
100
|
verificationAnchors: strings(input?.verificationAnchors),
|
|
70
101
|
...(sources.length > 0 ? { knowledgeSources: sources } : {}),
|
|
71
102
|
...(claims.length > 0 ? { intentClaims: claims } : {}),
|
|
103
|
+
...(declaredConflicts.length > 0 ? { conflicts: declaredConflicts } : {}),
|
|
72
104
|
};
|
|
73
105
|
}
|
|
74
106
|
function payoff(candidates) {
|
|
@@ -82,6 +114,21 @@ function payoff(candidates) {
|
|
|
82
114
|
delta: { ...projectedIfAllApplied },
|
|
83
115
|
};
|
|
84
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Suppressions per reason, most frequent first, so a plan with hundreds of
|
|
119
|
+
* suppressed rows still reads as a handful of lines.
|
|
120
|
+
*/
|
|
121
|
+
// implements REQ-bootstrap-discovered-candidate-budget
|
|
122
|
+
export function suppressionCounts(rows) {
|
|
123
|
+
const counts = new Map();
|
|
124
|
+
for (const row of rows) {
|
|
125
|
+
const reason = String(row.reason ?? "unspecified");
|
|
126
|
+
counts.set(reason, (counts.get(reason) ?? 0) + 1);
|
|
127
|
+
}
|
|
128
|
+
return [...counts]
|
|
129
|
+
.map(([reason, count]) => ({ reason, count }))
|
|
130
|
+
.sort((left, right) => right.count - left.count || left.reason.localeCompare(right.reason));
|
|
131
|
+
}
|
|
85
132
|
/** Declared claims per knowledge source against what the plan writes. */
|
|
86
133
|
// implements REQ-bootstrap-intent-claim-accounting
|
|
87
134
|
function claimAccounting(declared, candidates, suppressed) {
|
|
@@ -100,7 +147,7 @@ function claimAccounting(declared, candidates, suppressed) {
|
|
|
100
147
|
return [{ source, declared: count, planned, existing, filtered }];
|
|
101
148
|
});
|
|
102
149
|
}
|
|
103
|
-
// implements REQ-KIBI-BOOTSTRAP-PLAN
|
|
150
|
+
// implements REQ-KIBI-BOOTSTRAP-PLAN, REQ-bootstrap-discovered-candidate-budget
|
|
104
151
|
export function presentBootstrap(input) {
|
|
105
152
|
const declaredContext = normalizeBootstrapContext(input.bootstrapContext);
|
|
106
153
|
const guidance = buildGuidance({
|
|
@@ -125,13 +172,19 @@ export function presentBootstrap(input) {
|
|
|
125
172
|
input.candidates.length + input.sourceOnlySignals.length > 0
|
|
126
173
|
? `Bootstrap plan is ready for review with ${input.candidates.length} safe candidate(s) and ${input.sourceOnlySignals.length} source-only authoring follow-up(s).`
|
|
127
174
|
: (input.activation.handoffMessage ?? blockedFallback);
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
|
|
175
|
+
const suppression = suppressionCounts(input.suppressedCandidates);
|
|
176
|
+
const suppressedTotal = suppression.reduce((sum, row) => sum + row.count, 0);
|
|
177
|
+
const suppressionSummary = suppressedTotal > 0
|
|
178
|
+
? ` Suppressed ${suppressedTotal} candidate(s) by reason: ${suppression.map((row) => `${row.reason} ${row.count}`).join(", ")}.`
|
|
179
|
+
: "";
|
|
180
|
+
const limitSummary = suppression.some((row) => row.reason === "over_limit")
|
|
181
|
+
? " Discovered candidates over maxCandidates are over_limit; raise the limit or narrow entityTypes. Declared intent claims do not count against it."
|
|
131
182
|
: "";
|
|
132
183
|
const tldr = (confidenceLevel === "low" && !input.activation.applyBlocked
|
|
133
184
|
? `Low-confidence bootstrap (${String(guidance.confidence.score)}): review diagnostics before proceeding. ${baseTldr}`
|
|
134
|
-
: baseTldr) +
|
|
185
|
+
: baseTldr) +
|
|
186
|
+
suppressionSummary +
|
|
187
|
+
limitSummary;
|
|
135
188
|
const rawActions = input.candidates.flatMap((candidate) => candidate.applyPlan.map((payload) => ({ candidate, payload })));
|
|
136
189
|
const actionIds = new Map();
|
|
137
190
|
rawActions.forEach(({ payload }, index) => {
|
|
@@ -181,7 +234,7 @@ export function presentBootstrap(input) {
|
|
|
181
234
|
const contextQuestions = [];
|
|
182
235
|
if (status === "needs_context") {
|
|
183
236
|
if (droppedAuthoritative.length > 0)
|
|
184
|
-
contextQuestions.push(`No declared claim from authoritative source(s) ${droppedAuthoritative.map((row) => `"${row.source.title}"`).join(", ")} could be planned; how should those claims be restated or authored before bootstrap applies
|
|
237
|
+
contextQuestions.push(`No declared claim from authoritative source(s) ${droppedAuthoritative.map((row) => `"${row.source.title}"`).join(", ")} could be planned; how should those claims be restated or authored before bootstrap applies? Intent and observation claims also need an excerpt (the verbatim source passage), which Kibi keeps in the entity's Source section.`);
|
|
185
238
|
if (!declaredContext.projectSummary)
|
|
186
239
|
contextQuestions.push("What is the one-sentence purpose of this repository?");
|
|
187
240
|
if (!declaredContext.knowledgeSources)
|
|
@@ -200,6 +253,11 @@ export function presentBootstrap(input) {
|
|
|
200
253
|
...input.discoverySummary.scanWarnings,
|
|
201
254
|
...bindingDiagnostics,
|
|
202
255
|
...strings(input.contextDiagnostics),
|
|
256
|
+
...(suppressedTotal > 0
|
|
257
|
+
? [
|
|
258
|
+
`Suppressed candidates by reason: ${suppression.map((row) => `${row.reason} ${row.count}`).join(", ")} (rows in suppressedCandidates).`,
|
|
259
|
+
]
|
|
260
|
+
: []),
|
|
203
261
|
...accounting.map((row) => `Knowledge source ${row.source.id} (${row.source.authority}): ${row.declared} declared claim(s), ${row.planned} planned, ${row.existing} already in the KB, ${row.filtered} filtered out, ${row.declared - row.planned - row.existing - row.filtered} not planned (see suppressedCandidates and source-only follow-ups).`),
|
|
204
262
|
];
|
|
205
263
|
const planBody = {
|
|
@@ -23,12 +23,31 @@ export type BootstrapKnowledgeSource = {
|
|
|
23
23
|
readonly connector?: string;
|
|
24
24
|
readonly notes?: string;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* What a harvested claim is: intended behavior, an observation about how
|
|
28
|
+
* things are today, or a question the sources leave open. Only intent can
|
|
29
|
+
* become a requirement; the others stay explicit review facts.
|
|
30
|
+
*/
|
|
31
|
+
export declare const INTENT_CLAIM_KINDS: readonly ["intent", "observation", "open_question"];
|
|
32
|
+
export type BootstrapIntentClaimKind = (typeof INTENT_CLAIM_KINDS)[number];
|
|
26
33
|
/** One statement of intent the agent harvested from a declared source. */
|
|
27
34
|
export type BootstrapIntentClaim = {
|
|
28
35
|
readonly statement: string;
|
|
29
36
|
readonly sourceId: string;
|
|
30
37
|
readonly reference: string;
|
|
31
38
|
readonly excerpt?: string;
|
|
39
|
+
/** Defaults to intent; normalization omits the default. */
|
|
40
|
+
readonly kind?: BootstrapIntentClaimKind;
|
|
41
|
+
};
|
|
42
|
+
/** Identifies one declared claim by its source and exact citation. */
|
|
43
|
+
export type BootstrapClaimReference = {
|
|
44
|
+
readonly sourceId: string;
|
|
45
|
+
readonly reference: string;
|
|
46
|
+
};
|
|
47
|
+
/** Claims the agent found contradicting each other, left for the human. */
|
|
48
|
+
export type BootstrapClaimConflict = {
|
|
49
|
+
readonly claimReferences: readonly BootstrapClaimReference[];
|
|
50
|
+
readonly note: string;
|
|
32
51
|
};
|
|
33
52
|
export type BootstrapContext = {
|
|
34
53
|
readonly projectSummary?: string;
|
|
@@ -38,6 +57,7 @@ export type BootstrapContext = {
|
|
|
38
57
|
readonly verificationAnchors?: readonly string[];
|
|
39
58
|
readonly knowledgeSources?: readonly BootstrapKnowledgeSource[];
|
|
40
59
|
readonly intentClaims?: readonly BootstrapIntentClaim[];
|
|
60
|
+
readonly conflicts?: readonly BootstrapClaimConflict[];
|
|
41
61
|
};
|
|
42
62
|
export type PlanBootstrapArgs = {
|
|
43
63
|
readonly includeGenericMarkdown?: boolean;
|
|
@@ -66,6 +86,7 @@ export type BootstrapDeclaredContext = {
|
|
|
66
86
|
readonly verificationAnchors: readonly string[];
|
|
67
87
|
readonly knowledgeSources?: readonly BootstrapKnowledgeSource[];
|
|
68
88
|
readonly intentClaims?: readonly BootstrapIntentClaim[];
|
|
89
|
+
readonly conflicts?: readonly BootstrapClaimConflict[];
|
|
69
90
|
};
|
|
70
91
|
export type ActivationState = "root_uninitialized" | "root_partial" | "vendored_only" | "root_active_thin" | "root_active_seeded";
|
|
71
92
|
export type ActivationMode = "cold_start_bootstrap" | "repair_bootstrap" | "attached_thin_bootstrap" | "attached_thin_handoff" | "attached_seeded_handoff" | "vendored_blocked";
|
|
@@ -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;AAGxE,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,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;CAChE,GAAG,MAAM,CAWT;AAED,eAAO,MAAM,sBAAsB,8HAUzB,CAAC;AACX,eAAO,MAAM,4BAA4B,mDAI/B,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;IACvD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;IAClE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,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