kibi-cli 2.22.0 → 2.23.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/cli-register-foundation.d.ts.map +1 -1
- package/dist/cli-register-foundation.js +1 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +51 -3
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +40 -0
- package/dist/commands/init-helpers.d.ts +2 -1
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +3 -0
- package/dist/commands/migrate.d.ts +47 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +82 -15
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +15 -1
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +37 -35
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +32 -4
- package/dist/operations/bootstrap/activation.d.ts +7 -1
- package/dist/operations/bootstrap/activation.d.ts.map +1 -1
- package/dist/operations/bootstrap/activation.js +27 -2
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +56 -16
- package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance-actions.js +14 -2
- package/dist/operations/bootstrap/guidance.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance.js +6 -2
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
- package/dist/operations/bootstrap/presentation.js +75 -9
- package/dist/operations/bootstrap/types.d.ts +6 -0
- package/dist/operations/bootstrap/types.d.ts.map +1 -1
- package/dist/operations/migration/kb-sources.d.ts +8 -5
- package/dist/operations/migration/kb-sources.d.ts.map +1 -1
- package/dist/operations/migration/kb-sources.js +50 -14
- package/dist/operations/migration/schema6.d.ts.map +1 -1
- package/dist/operations/migration/schema6.js +11 -2
- package/dist/operations/migration/source-paths.d.ts +18 -1
- package/dist/operations/migration/source-paths.d.ts.map +1 -1
- package/dist/operations/migration/source-paths.js +111 -16
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +22 -7
- package/dist/operations/mutation/requirement-semantics.d.ts +16 -0
- package/dist/operations/mutation/requirement-semantics.d.ts.map +1 -1
- package/dist/operations/mutation/requirement-semantics.js +50 -0
- package/dist/operations/mutation/strict-fact.js +1 -1
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +2 -1
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +43 -1
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +38 -9
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +49 -17
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.js +25 -1
- package/dist/operations/semantic-advisor/stored-ledger-drift.d.ts +19 -0
- package/dist/operations/semantic-advisor/stored-ledger-drift.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/stored-ledger-drift.js +78 -0
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +7 -1
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +16 -3
- package/dist/public/impact/types.d.ts +2 -0
- package/dist/public/impact/types.d.ts.map +1 -1
- package/dist/public/operations/catalog.d.ts +7 -2
- 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 +10 -3
- package/dist/public/operations/check-helpers.d.ts +10 -0
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +54 -0
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +1 -0
- package/dist/public/operations/decision-firmness.d.ts +3 -1
- package/dist/public/operations/decision-firmness.d.ts.map +1 -1
- package/dist/public/operations/decision-firmness.js +13 -3
- package/dist/public/operations/discovery-executors.d.ts +18 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +77 -3
- package/dist/public/operations/migration-plan.d.ts +13 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +29 -1
- package/dist/public/operations/schema6-check-actions.d.ts +4 -0
- package/dist/public/operations/schema6-check-actions.d.ts.map +1 -1
- package/dist/public/operations/schema6-check-actions.js +39 -2
- package/dist/public/operations/source-path-dangling.d.ts +1 -1
- package/dist/public/operations/source-path-dangling.d.ts.map +1 -1
- package/dist/public/operations/source-path-dangling.js +11 -2
- package/dist/public/operations/specs/composite.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +5 -0
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +5 -0
- package/dist/public/operations/specs/planning.d.ts +1 -1
- package/dist/public/operations/specs/planning.js +1 -1
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +6 -4
- package/dist/public/operations/specs/semantic.d.ts +1 -1
- package/dist/public/operations/specs/semantic.d.ts.map +1 -1
- package/dist/public/operations/specs/semantic.js +30 -3
- package/dist/public/skills/kibi-bootstrap/SKILL.md +3 -2
- package/dist/public/skills/kibi-usage/SKILL.md +13 -5
- package/dist/public/skills/kibi-usage/resources/workflows.md +3 -1
- package/dist/search-answer.d.ts +14 -0
- package/dist/search-answer.d.ts.map +1 -1
- package/dist/search-answer.js +42 -4
- package/dist/traceability/git-change-snapshot.d.ts +46 -0
- package/dist/traceability/git-change-snapshot.d.ts.map +1 -1
- package/dist/traceability/git-change-snapshot.js +187 -3
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +5 -6
- package/dist/traceability/staged-inventory-drift.d.ts +24 -0
- package/dist/traceability/staged-inventory-drift.d.ts.map +1 -0
- package/dist/traceability/staged-inventory-drift.js +84 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +1 -2
- package/dist/utils/content-freshness.d.ts +9 -0
- package/dist/utils/content-freshness.d.ts.map +1 -1
- package/dist/utils/content-freshness.js +33 -0
- package/dist/utils/merge-driver-setup.d.ts +10 -0
- package/dist/utils/merge-driver-setup.d.ts.map +1 -0
- package/dist/utils/merge-driver-setup.js +69 -0
- package/dist/utils/rule-registry.generated.d.ts +1 -1
- package/dist/utils/rule-registry.generated.js +1 -1
- package/package.json +2 -2
- package/src/public/impact/analyzer.ts +13 -1
- package/src/public/impact/diagnostics.ts +20 -3
- package/src/public/impact/types.ts +2 -0
- package/src/public/operations/check-executor.ts +16 -4
- package/src/public/operations/check-helpers.ts +65 -0
- package/src/public/operations/contracts.ts +1 -0
- package/src/public/operations/decision-firmness.ts +18 -2
- package/src/public/operations/discovery-executors.ts +113 -3
- package/src/public/operations/migration-plan.ts +47 -1
- package/src/public/operations/schema6-check-actions.ts +43 -2
- package/src/public/operations/source-path-dangling.ts +12 -2
- package/src/public/operations/specs/discovery.ts +6 -0
- package/src/public/operations/specs/planning.ts +1 -1
- package/src/public/operations/specs/reporting.ts +6 -4
- package/src/public/operations/specs/semantic.ts +41 -4
- package/src/public/skills/kibi-bootstrap/SKILL.md +3 -2
- package/src/public/skills/kibi-usage/SKILL.md +13 -5
- package/src/public/skills/kibi-usage/resources/workflows.md +3 -1
|
@@ -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,iBAA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EAAE,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG;IAC3E,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAClE,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,QAAQ,CAAC,oBAAoB,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC5E,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC7B,eAAe,CAAC,0BAA0B,CAAC,GAAG;IAC5C,QAAQ,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;CACxD,CAAC"}
|
|
@@ -19,10 +19,11 @@ export type FrontmatterSlice = Readonly<{
|
|
|
19
19
|
eol: "\n" | "\r\n";
|
|
20
20
|
}>;
|
|
21
21
|
/**
|
|
22
|
-
* Split a document
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* Split a document around its YAML frontmatter: the opening and the closing
|
|
23
|
+
* delimiter are each a whole line holding only `---` (trailing whitespace
|
|
24
|
+
* allowed). A `---` inside a line, such as a Markdown table separator row
|
|
25
|
+
* in a quoted scalar, never ends the frontmatter. Returns null when there is
|
|
26
|
+
* no such opening and closing pair.
|
|
26
27
|
*/
|
|
27
28
|
export declare function sliceFrontmatter(content: string): FrontmatterSlice | null;
|
|
28
29
|
/**
|
|
@@ -36,7 +37,9 @@ export declare function readTopLevelField(frontmatter: string, key: string): unk
|
|
|
36
37
|
* Set one top-level scalar frontmatter key, leaving every other byte of the
|
|
37
38
|
* document unchanged: the key's line is replaced in place, or appended as the
|
|
38
39
|
* last frontmatter key when absent. Returns null when the key spans several
|
|
39
|
-
* lines or the edit would not read back as exactly that change
|
|
40
|
+
* lines or the edit would not read back as exactly that change: the written
|
|
41
|
+
* document is split and parsed again and must yield the same frontmatter and
|
|
42
|
+
* the same body.
|
|
40
43
|
*/
|
|
41
44
|
export declare function withTopLevelField(content: string, key: string, value: string): string | null;
|
|
42
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kb-sources.d.ts","sourceRoot":"","sources":["../../../src/operations/migration/kb-sources.ts"],"names":[],"mappings":"AA+BA,OAAO,EAEL,KAAK,UAAU,EAEhB,MAAM,yBAAyB,CAAC;AAGjC,yEAAyE;AAEzE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAuBH,0EAA0E;AAE1E,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,KAAK,GAAE,SAAS,UAAU,EAAiB,GAC1C,gBAAgB,EAAE,CAkBpB;AAED,6DAA6D;AAE7D,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,IAAI,GAAG,MAAM,CAAC;CACpB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AgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAY3E;AAqBD,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMxD"}
|
|
@@ -65,22 +65,23 @@ export function listLaneMarkdownFiles(workspaceRoot, lanes = ENTITY_LANES) {
|
|
|
65
65
|
return result;
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Split a document
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
68
|
+
* Split a document around its YAML frontmatter: the opening and the closing
|
|
69
|
+
* delimiter are each a whole line holding only `---` (trailing whitespace
|
|
70
|
+
* allowed). A `---` inside a line, such as a Markdown table separator row
|
|
71
|
+
* in a quoted scalar, never ends the frontmatter. Returns null when there is
|
|
72
|
+
* no such opening and closing pair.
|
|
72
73
|
*/
|
|
73
74
|
// implements REQ-cli-schema-migration
|
|
74
75
|
export function sliceFrontmatter(content) {
|
|
75
76
|
const leading = content.length - content.trimStart().length;
|
|
76
|
-
|
|
77
|
+
const open = /^---[ \t]*\r?\n/.exec(content.slice(leading));
|
|
78
|
+
if (open === null)
|
|
77
79
|
return null;
|
|
78
|
-
const openEnd =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const close = content.indexOf("---", leading + 3);
|
|
82
|
-
if (close <= openEnd || content[close - 1] !== "\n")
|
|
80
|
+
const openEnd = leading + open[0].length - 1;
|
|
81
|
+
const match = /^---[ \t]*\r?$/m.exec(content.slice(openEnd + 1));
|
|
82
|
+
if (match === null)
|
|
83
83
|
return null;
|
|
84
|
+
const close = openEnd + 1 + match.index;
|
|
84
85
|
const text = content.slice(openEnd + 1, close);
|
|
85
86
|
return {
|
|
86
87
|
prefix: content.slice(0, openEnd + 1),
|
|
@@ -121,10 +122,22 @@ export function readTopLevelField(frontmatter, key) {
|
|
|
121
122
|
return undefined;
|
|
122
123
|
}
|
|
123
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* A YAML double-quoted scalar for `value` with no run of three dashes, so a
|
|
127
|
+
* reader that splits the document on any `---` still finds the frontmatter
|
|
128
|
+
* intact. Every second dash of a run is written as the `\x2D` escape, which
|
|
129
|
+
* YAML reads back as the same dash.
|
|
130
|
+
*/
|
|
131
|
+
function doubleQuotedScalar(value) {
|
|
132
|
+
return JSON.stringify(value).replace(/-{3,}/g, (run) => [...run].map((dash, index) => (index % 2 === 1 ? "\\x2D" : dash)).join(""));
|
|
133
|
+
}
|
|
124
134
|
function scalarLine(key, value, previous) {
|
|
135
|
+
const quoted = `${key}: ${doubleQuotedScalar(value)}`;
|
|
136
|
+
if (value.includes("---"))
|
|
137
|
+
return quoted;
|
|
125
138
|
const raw = previous.slice(previous.indexOf(":") + 1).trim();
|
|
126
139
|
if (raw.startsWith('"'))
|
|
127
|
-
return
|
|
140
|
+
return quoted;
|
|
128
141
|
if (raw.startsWith("'"))
|
|
129
142
|
return `${key}: '${value.replaceAll("'", "''")}'`;
|
|
130
143
|
try {
|
|
@@ -135,13 +148,35 @@ function scalarLine(key, value, previous) {
|
|
|
135
148
|
catch {
|
|
136
149
|
// Fall through to a quoted scalar.
|
|
137
150
|
}
|
|
138
|
-
return
|
|
151
|
+
return quoted;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Whether `document` reads back, through the same frontmatter split, as
|
|
155
|
+
* exactly `expected` with the closing delimiter and body of `original`
|
|
156
|
+
* unchanged, and without a new `---` in its frontmatter that a reader
|
|
157
|
+
* splitting on any `---` would cut on.
|
|
158
|
+
*/
|
|
159
|
+
function readsBackAs(document, expected, original) {
|
|
160
|
+
const slice = sliceFrontmatter(document);
|
|
161
|
+
if (slice === null || slice.suffix !== original.suffix)
|
|
162
|
+
return false;
|
|
163
|
+
if (slice.text.includes("---") && !original.text.includes("---")) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
try {
|
|
167
|
+
return isDeepStrictEqual(loadYaml(slice.text), expected);
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return false;
|
|
171
|
+
}
|
|
139
172
|
}
|
|
140
173
|
/**
|
|
141
174
|
* Set one top-level scalar frontmatter key, leaving every other byte of the
|
|
142
175
|
* document unchanged: the key's line is replaced in place, or appended as the
|
|
143
176
|
* last frontmatter key when absent. Returns null when the key spans several
|
|
144
|
-
* lines or the edit would not read back as exactly that change
|
|
177
|
+
* lines or the edit would not read back as exactly that change: the written
|
|
178
|
+
* document is split and parsed again and must yield the same frontmatter and
|
|
179
|
+
* the same body.
|
|
145
180
|
*/
|
|
146
181
|
// implements REQ-cli-schema-migration
|
|
147
182
|
export function withTopLevelField(content, key, value) {
|
|
@@ -169,11 +204,12 @@ export function withTopLevelField(content, key, value) {
|
|
|
169
204
|
const { [key]: _nextValue, ...nextRest } = next;
|
|
170
205
|
if (!isDeepStrictEqual(beforeRest, nextRest))
|
|
171
206
|
return null;
|
|
207
|
+
const document = `${slice.prefix}${text}${slice.suffix}`;
|
|
208
|
+
return readsBackAs(document, next, slice) ? document : null;
|
|
172
209
|
}
|
|
173
210
|
catch {
|
|
174
211
|
return null;
|
|
175
212
|
}
|
|
176
|
-
return `${slice.prefix}${text}${slice.suffix}`;
|
|
177
213
|
}
|
|
178
214
|
function frontmatterRecord(text) {
|
|
179
215
|
const parsed = loadYaml(text);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema6.d.ts","sourceRoot":"","sources":["../../../src/operations/migration/schema6.ts"],"names":[],"mappings":"AAuBA,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAEL,kCAAkC,EAClC,wBAAwB,EACxB,mBAAmB,EAEnB,wBAAwB,EAOzB,MAAM,kDAAkD,CAAC;AAoD1D,gEAAgE;AAEhE,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,+EAA+E;AAE/E,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,4DAA4D;AAE5D,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;IACvD,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC,CAAC,CAAC;AAEH;;;;;;GAMG;AAEH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE;IACnD,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC,GAAG,wBAAwB,CAgN3B;AAED;;;;;;GAMG;AAEH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG;IAClE,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,sBAAsB,EAAE,MAAM,EAAE,CAAC;CAClC,CAuCA;AAED;;;GAGG;AAEH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,GACpB,eAAe,GAAG,IAAI,CAqBxB;AAED,qEAAqE;AAErE,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,eAAe,CAEjB;AAgDD,KAAK,YAAY,GAAG,QAAQ,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC,CAAC;AAEH,4DAA4D;AAE5D,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CAgHf;AAED;;;GAGG;AAEH,eAAO,MAAM,+BAA+B,EAAE,WAAW,CAAC,MAAM,CAK9D,CAAC;AAGH,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAWtD,CAAC"}
|
|
@@ -568,6 +568,9 @@ export function buildLifecycleRepairActions(workspaceRoot) {
|
|
|
568
568
|
continue;
|
|
569
569
|
actions.push(migrationAction(sourcePathReviewActionInput({
|
|
570
570
|
entityId: repair.entityId,
|
|
571
|
+
...(repair.field === "text_ref"
|
|
572
|
+
? { field: "text_ref" }
|
|
573
|
+
: {}),
|
|
571
574
|
value: repair.value,
|
|
572
575
|
file: repair.file,
|
|
573
576
|
reason: repair.refused,
|
|
@@ -622,12 +625,18 @@ function plannedRecords(value) {
|
|
|
622
625
|
// implements REQ-kibi-schema6-migration
|
|
623
626
|
function plannedRepairs(action) {
|
|
624
627
|
const rewrites = [];
|
|
625
|
-
for (const { entityId, file, from, to } of plannedRecords(action.evidence.rewrites)) {
|
|
628
|
+
for (const { entityId, file, field, from, to } of plannedRecords(action.evidence.rewrites)) {
|
|
626
629
|
if (typeof entityId === "string" &&
|
|
627
630
|
typeof file === "string" &&
|
|
628
631
|
typeof from === "string" &&
|
|
629
632
|
typeof to === "string") {
|
|
630
|
-
rewrites.push({
|
|
633
|
+
rewrites.push({
|
|
634
|
+
entityId,
|
|
635
|
+
file,
|
|
636
|
+
...(field === "text_ref" ? { field } : {}),
|
|
637
|
+
from,
|
|
638
|
+
to,
|
|
639
|
+
});
|
|
631
640
|
}
|
|
632
641
|
}
|
|
633
642
|
const removals = [];
|
|
@@ -10,10 +10,23 @@
|
|
|
10
10
|
* names the entity's own file or nothing Kibi can map is removed. A value
|
|
11
11
|
* naming another existing workspace path, an entity id or an http(s) URL is
|
|
12
12
|
* provenance and stays.
|
|
13
|
+
*
|
|
14
|
+
* `text_ref` points at independent evidence, so it is never dead data, but
|
|
15
|
+
* the same pre-canonical paths survive in it. A `text_ref` value shaped
|
|
16
|
+
* like one workspace file path (no spaces, a directory and an extension)
|
|
17
|
+
* that names nothing is dangling too: a moved knowledge file is rewritten
|
|
18
|
+
* to its `.kb/` path, and anything else needs a person, because Kibi cannot
|
|
19
|
+
* tell what evidence it meant. Prose, entity ids, URLs and lists in
|
|
20
|
+
* `text_ref` are not paths and are never judged.
|
|
13
21
|
*/
|
|
14
|
-
/**
|
|
22
|
+
/** The authored frontmatter fields that name workspace files. */
|
|
23
|
+
export type SourceField = "source" | "text_ref";
|
|
24
|
+
/** One authored `source` or `text_ref` value and the entity file that carries it. */
|
|
15
25
|
export type AuthoredSourceRef = Readonly<{
|
|
16
26
|
entityId: string;
|
|
27
|
+
field: SourceField;
|
|
28
|
+
/** A `text_ref` that is its requirement's semantic source: rewriting it changes the inventory hash. */
|
|
29
|
+
semanticSource?: boolean;
|
|
17
30
|
/** Workspace-relative, `/`-separated path of the entity's own file. */
|
|
18
31
|
file: string;
|
|
19
32
|
value: unknown;
|
|
@@ -52,6 +65,8 @@ export type SourceRepair = AuthoredSourceRef & Readonly<{
|
|
|
52
65
|
/** Why the value cannot be edited safely; a person must edit it. */
|
|
53
66
|
refused?: string;
|
|
54
67
|
}>;
|
|
68
|
+
/** Whether a `text_ref` value reads as one workspace file path. */
|
|
69
|
+
export declare function isPathShapedTextRef(value: unknown): boolean;
|
|
55
70
|
/** An authored value as plain text, the form plans record and compare. */
|
|
56
71
|
export declare function shownSourceValue(value: unknown): string;
|
|
57
72
|
/**
|
|
@@ -93,6 +108,8 @@ export declare function findSourceRepairs(workspaceRoot: string): SourceRepair[]
|
|
|
93
108
|
export type SourcePathRewrite = Readonly<{
|
|
94
109
|
entityId: string;
|
|
95
110
|
file: string;
|
|
111
|
+
/** The field rewritten; absent means `source`. */
|
|
112
|
+
field?: "text_ref";
|
|
96
113
|
from: string;
|
|
97
114
|
to: string;
|
|
98
115
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-paths.d.ts","sourceRoot":"","sources":["../../../src/operations/migration/source-paths.ts"],"names":[],"mappings":"AA+BA
|
|
1
|
+
{"version":3,"file":"source-paths.d.ts","sourceRoot":"","sources":["../../../src/operations/migration/source-paths.ts"],"names":[],"mappings":"AA+BA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,iEAAiE;AAEjE,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD,qFAAqF;AAErF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;IACnB,uGAAuG;IACv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AQ,CAAC;IAC9C,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACvC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACxC,CAAC,CAAC;AAGH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,SAAS,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACxC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACtC,OAAO,EAAE,SAAS,QAAQ,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;CAChE,CAAC,CAAC;AAgBH;;;GAGG;AAEH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,SAAS,YAAY,EAAE,GAC/B,wBAAwB,CAU1B;AAwBD;;;;;;;GAOG;AAEH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,wBAAwB,GACjC,sBAAsB,CAsDxB"}
|
|
@@ -23,6 +23,21 @@ const URL_PATTERN = /^https?:\/\/\S+$/i;
|
|
|
23
23
|
const LEGACY_ROOT = "documentation/";
|
|
24
24
|
const SYMBOL_ID_LINE = /^[ \t]*-?[ \t]*id[ \t]*:[ \t]*(.+?)[ \t]*$/gm;
|
|
25
25
|
const SOURCE_EDIT_REFUSED = "the source field spans several lines, or editing it would change other frontmatter fields";
|
|
26
|
+
const TEXT_REF_EDIT_REFUSED = "the text_ref field spans several lines, or editing it would change other frontmatter fields";
|
|
27
|
+
const TEXT_REF_UNMAPPED = "no file under .kb/ matches it, so Kibi cannot tell what evidence it meant";
|
|
28
|
+
const TEXT_REF_SEMANTIC_SOURCE = "text_ref is this requirement's semantic source, so changing it changes its semantic inventory hash; re-derive the inventory after editing it";
|
|
29
|
+
/** One workspace file path: a directory, a file name with an extension, no spaces. */
|
|
30
|
+
const FILE_PATH_SHAPE = /^(?:\.\/)?[^\s;,:]+\/[^\s;,:/]+\.[A-Za-z0-9]+(?:#\S*)?$/;
|
|
31
|
+
function editRefusedReason(field) {
|
|
32
|
+
return field === "text_ref" ? TEXT_REF_EDIT_REFUSED : SOURCE_EDIT_REFUSED;
|
|
33
|
+
}
|
|
34
|
+
/** Whether a `text_ref` value reads as one workspace file path. */
|
|
35
|
+
// implements REQ-core-validation-rules, REQ-kibi-kb-lifecycle-integrity
|
|
36
|
+
export function isPathShapedTextRef(value) {
|
|
37
|
+
return (typeof value === "string" &&
|
|
38
|
+
!URL_PATTERN.test(value.trim()) &&
|
|
39
|
+
FILE_PATH_SHAPE.test(value.trim()));
|
|
40
|
+
}
|
|
26
41
|
function scalarText(value) {
|
|
27
42
|
if (typeof value === "string")
|
|
28
43
|
return value.trim();
|
|
@@ -58,11 +73,33 @@ export function scanAuthoredSources(workspaceRoot) {
|
|
|
58
73
|
path.basename(file.relativePath, ".md");
|
|
59
74
|
entityIds.add(id);
|
|
60
75
|
const value = readTopLevelField(slice.text, "source");
|
|
61
|
-
if (value
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
76
|
+
if (value !== undefined &&
|
|
77
|
+
value !== null &&
|
|
78
|
+
!(typeof value === "string" && value.trim() === "")) {
|
|
79
|
+
refs.push({
|
|
80
|
+
entityId: id,
|
|
81
|
+
field: "source",
|
|
82
|
+
file: file.relativePath,
|
|
83
|
+
value,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
const textRef = readTopLevelField(slice.text, "text_ref");
|
|
87
|
+
if (isPathShapedTextRef(textRef)) {
|
|
88
|
+
const declared = readTopLevelField(slice.text, "semantic_source_field");
|
|
89
|
+
const requirement = readTopLevelField(slice.text, "type") === "req" ||
|
|
90
|
+
file.relativePath.startsWith(`${KB_PATHS.lanes.requirements}/`);
|
|
91
|
+
const semanticSource = declared === "text_ref" ||
|
|
92
|
+
(requirement &&
|
|
93
|
+
declared === undefined &&
|
|
94
|
+
readTopLevelField(slice.text, "semantic_text") === undefined);
|
|
95
|
+
refs.push({
|
|
96
|
+
entityId: id,
|
|
97
|
+
field: "text_ref",
|
|
98
|
+
...(semanticSource ? { semanticSource } : {}),
|
|
99
|
+
file: file.relativePath,
|
|
100
|
+
value: textRef,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
66
103
|
}
|
|
67
104
|
const symbols = readText(path.join(workspaceRoot, KB_PATHS.symbolsManifest));
|
|
68
105
|
if (symbols !== null) {
|
|
@@ -148,6 +185,34 @@ export function workspacePathExists(workspaceRoot) {
|
|
|
148
185
|
};
|
|
149
186
|
}
|
|
150
187
|
function repairFor(ref, resolution) {
|
|
188
|
+
if (ref.field === "text_ref") {
|
|
189
|
+
// A text_ref naming its own existing file is evidence, not redundancy.
|
|
190
|
+
if (resolution.kind === "self" && resolution.resolves)
|
|
191
|
+
return undefined;
|
|
192
|
+
if (resolution.kind !== "dangling" && resolution.kind !== "self") {
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
// A pre-canonical spelling of the entity's own file moved with it.
|
|
196
|
+
const rewrite = resolution.kind === "dangling" ? resolution.rewrite : ref.file;
|
|
197
|
+
if (ref.semanticSource === true) {
|
|
198
|
+
return {
|
|
199
|
+
...ref,
|
|
200
|
+
dangling: true,
|
|
201
|
+
fix: rewrite !== undefined
|
|
202
|
+
? { kind: "rewrite", to: rewrite }
|
|
203
|
+
: { kind: "remove", reason: "dangling" },
|
|
204
|
+
refused: TEXT_REF_SEMANTIC_SOURCE,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
return rewrite !== undefined
|
|
208
|
+
? { ...ref, dangling: true, fix: { kind: "rewrite", to: rewrite } }
|
|
209
|
+
: {
|
|
210
|
+
...ref,
|
|
211
|
+
dangling: true,
|
|
212
|
+
fix: { kind: "remove", reason: "dangling" },
|
|
213
|
+
refused: TEXT_REF_UNMAPPED,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
151
216
|
if (resolution.kind === "self") {
|
|
152
217
|
return {
|
|
153
218
|
...ref,
|
|
@@ -165,10 +230,10 @@ function repairFor(ref, resolution) {
|
|
|
165
230
|
: { kind: "remove", reason: "dangling" },
|
|
166
231
|
};
|
|
167
232
|
}
|
|
168
|
-
function editedContent(content, fix) {
|
|
233
|
+
function editedContent(content, field, fix) {
|
|
169
234
|
return fix.kind === "rewrite"
|
|
170
|
-
? withTopLevelField(content,
|
|
171
|
-
: withoutTopLevelField(content,
|
|
235
|
+
? withTopLevelField(content, field, fix.to)
|
|
236
|
+
: withoutTopLevelField(content, field);
|
|
172
237
|
}
|
|
173
238
|
/** Every repairable source value, sorted by entity id. Read-only. */
|
|
174
239
|
function classifySources(workspaceRoot) {
|
|
@@ -186,20 +251,24 @@ function classifySources(workspaceRoot) {
|
|
|
186
251
|
repairs.push(repair);
|
|
187
252
|
}
|
|
188
253
|
return repairs.sort((left, right) => left.entityId.localeCompare(right.entityId) ||
|
|
189
|
-
left.file.localeCompare(right.file)
|
|
254
|
+
left.file.localeCompare(right.file) ||
|
|
255
|
+
left.field.localeCompare(right.field));
|
|
190
256
|
}
|
|
191
257
|
/** Mark the repairs whose edit would not read back as exactly that change. */
|
|
192
258
|
function withEditability(workspaceRoot, repairs) {
|
|
193
259
|
return repairs.map((repair) => {
|
|
260
|
+
if (repair.refused !== undefined)
|
|
261
|
+
return repair;
|
|
194
262
|
const content = readText(path.join(workspaceRoot, repair.file));
|
|
195
|
-
if (content !== null &&
|
|
263
|
+
if (content !== null &&
|
|
264
|
+
editedContent(content, repair.field, repair.fix) !== null) {
|
|
196
265
|
return repair;
|
|
197
266
|
}
|
|
198
267
|
return {
|
|
199
268
|
...repair,
|
|
200
269
|
refused: content === null
|
|
201
270
|
? "the entity file cannot be read"
|
|
202
|
-
:
|
|
271
|
+
: editRefusedReason(repair.field),
|
|
203
272
|
};
|
|
204
273
|
});
|
|
205
274
|
}
|
|
@@ -225,6 +294,7 @@ function plannedRepair(repair) {
|
|
|
225
294
|
const base = {
|
|
226
295
|
entityId: repair.entityId,
|
|
227
296
|
file: repair.file,
|
|
297
|
+
...(repair.field === "text_ref" ? { field: "text_ref" } : {}),
|
|
228
298
|
from: shownSourceValue(repair.value),
|
|
229
299
|
};
|
|
230
300
|
return repair.fix.kind === "rewrite"
|
|
@@ -250,8 +320,18 @@ export function plannedSourcePathRepairs(repairs) {
|
|
|
250
320
|
}
|
|
251
321
|
return { rewrites, removals };
|
|
252
322
|
}
|
|
323
|
+
function plannedField(repair) {
|
|
324
|
+
return "field" in repair && repair.field === "text_ref"
|
|
325
|
+
? "text_ref"
|
|
326
|
+
: "source";
|
|
327
|
+
}
|
|
328
|
+
function plannedKey(file, field) {
|
|
329
|
+
return `${field}\0${file}`;
|
|
330
|
+
}
|
|
253
331
|
function samePlannedRepair(left, right) {
|
|
254
|
-
if (left.entityId !== right.entityId ||
|
|
332
|
+
if (left.entityId !== right.entityId ||
|
|
333
|
+
left.from !== right.from ||
|
|
334
|
+
plannedField(left) !== plannedField(right)) {
|
|
255
335
|
return false;
|
|
256
336
|
}
|
|
257
337
|
if ("to" in left)
|
|
@@ -271,16 +351,26 @@ export function applySourcePathRepairs(workspaceRoot, planned) {
|
|
|
271
351
|
const wanted = planned === undefined
|
|
272
352
|
? undefined
|
|
273
353
|
: new Map([...planned.rewrites, ...planned.removals].map((repair) => [
|
|
274
|
-
repair.file,
|
|
354
|
+
plannedKey(repair.file, plannedField(repair)),
|
|
275
355
|
repair,
|
|
276
356
|
]));
|
|
277
357
|
const rewritten = [];
|
|
278
358
|
const removed = [];
|
|
279
359
|
const skipped = [];
|
|
280
360
|
for (const repair of classifySources(workspaceRoot)) {
|
|
361
|
+
// A text_ref Kibi cannot map needs a person; never remove it.
|
|
362
|
+
if (repair.refused !== undefined) {
|
|
363
|
+
if (wanted === undefined) {
|
|
364
|
+
skipped.push({
|
|
365
|
+
file: repair.file,
|
|
366
|
+
reason: `text_ref '${shownSourceValue(repair.value)}': ${repair.refused}`,
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
281
371
|
const current = plannedRepair(repair);
|
|
282
372
|
if (wanted !== undefined) {
|
|
283
|
-
const plan = wanted.get(repair.file);
|
|
373
|
+
const plan = wanted.get(plannedKey(repair.file, repair.field));
|
|
284
374
|
if (plan === undefined)
|
|
285
375
|
continue;
|
|
286
376
|
if (!samePlannedRepair(plan, current)) {
|
|
@@ -293,9 +383,14 @@ export function applySourcePathRepairs(workspaceRoot, planned) {
|
|
|
293
383
|
}
|
|
294
384
|
const absolute = path.join(workspaceRoot, repair.file);
|
|
295
385
|
const content = readText(absolute);
|
|
296
|
-
const next = content === null
|
|
386
|
+
const next = content === null
|
|
387
|
+
? null
|
|
388
|
+
: editedContent(content, repair.field, repair.fix);
|
|
297
389
|
if (next === null) {
|
|
298
|
-
skipped.push({
|
|
390
|
+
skipped.push({
|
|
391
|
+
file: repair.file,
|
|
392
|
+
reason: editRefusedReason(repair.field),
|
|
393
|
+
});
|
|
299
394
|
continue;
|
|
300
395
|
}
|
|
301
396
|
writeFileAtomically(absolute, next);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggest-predicates.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/suggest-predicates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,0CAA0C,CAAC;AA2BlD,OAAO,KAAK,EAIV,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AA+H9B,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,EACzE,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,GACzE,MAAM,CAIR;AAED,wBAAgB,2CAA2C,CACzD,IAAI,EAAE,IAAI,CACR,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,EACD,KAAK,EAAE,IAAI,CACT,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,GACA,MAAM,CAKR;AA+ID,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"suggest-predicates.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/suggest-predicates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,0CAA0C,CAAC;AA2BlD,OAAO,KAAK,EAIV,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AA+H9B,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,EACzE,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,GACzE,MAAM,CAIR;AAED,wBAAgB,2CAA2C,CACzD,IAAI,EAAE,IAAI,CACR,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,EACD,KAAK,EAAE,IAAI,CACT,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,GACA,MAAM,CAKR;AA+ID,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,uBAAuB,CAAC,CA8ZlC;AA+WD,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC"}
|
|
@@ -409,8 +409,19 @@ export async function handleKbSuggestPredicates(prolog, args, context) {
|
|
|
409
409
|
? buildGapApplyPlan(text, args)
|
|
410
410
|
: [];
|
|
411
411
|
const plannedFactId = typeof predicatePlan[0]?.id === "string" ? predicatePlan[0].id : null;
|
|
412
|
+
// The manifest the relationship plan calls "merged" starts from what the
|
|
413
|
+
// stored requirement already declares, so an agent that passes no
|
|
414
|
+
// existingLogicClaims is not handed a manifest that drops its other
|
|
415
|
+
// clauses.
|
|
416
|
+
const existingLogicClaims = Array.from(new Set([
|
|
417
|
+
...(storedRequirement !== null &&
|
|
418
|
+
Array.isArray(storedRequirement.logic_claims)
|
|
419
|
+
? storedRequirement.logic_claims.filter((claim) => typeof claim === "string")
|
|
420
|
+
: []),
|
|
421
|
+
...(args.existingLogicClaims ?? []),
|
|
422
|
+
]));
|
|
412
423
|
const relationshipPlan = completeCandidate && !alreadyGrounded && !ledgerMissing
|
|
413
|
-
? buildRelationshipPlan(plannedFactId ?? "", args.requirementId, text,
|
|
424
|
+
? buildRelationshipPlan(plannedFactId ?? "", args.requirementId, text, existingLogicClaims)
|
|
414
425
|
: null;
|
|
415
426
|
const replacementPlan = alreadyGrounded &&
|
|
416
427
|
!keepExistingGrounding &&
|
|
@@ -471,7 +482,7 @@ export async function handleKbSuggestPredicates(prolog, args, context) {
|
|
|
471
482
|
: alreadyGrounded
|
|
472
483
|
? "No predicate candidate passed the semantic applicability gate; keep the existing grounding and record the ontology-gap observation in applyPlan so the missing schema stays visible."
|
|
473
484
|
: "No predicate candidate passed the semantic applicability gate; record an ontology gap and review the generated schema draft instead of silently writing prose.");
|
|
474
|
-
const logicClaims = Array.from(new Set([...
|
|
485
|
+
const logicClaims = Array.from(new Set([...existingLogicClaims, claimKey]));
|
|
475
486
|
const plan = relationshipPlan !== null && plannedFactId !== null && args.requirementId
|
|
476
487
|
? await groundingPlan(prolog, context, {
|
|
477
488
|
requirementId: args.requirementId,
|
|
@@ -486,17 +497,21 @@ export async function handleKbSuggestPredicates(prolog, args, context) {
|
|
|
486
497
|
: null;
|
|
487
498
|
// Without a plan nothing ran the contradiction analysis, so the decision
|
|
488
499
|
// conflicts a complete candidate would introduce are looked up directly.
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
args.requirementId
|
|
500
|
+
// A claim analyzed without a requirement asks the same question ("what
|
|
501
|
+
// would this decision conflict with?"), so it gets the same lookup.
|
|
502
|
+
const decisionConflicts = plan === null && completeCandidate !== undefined && !keepExistingGrounding
|
|
493
503
|
? await candidateDecisionConflicts(prolog, completeCandidate, warnings)
|
|
494
504
|
: [];
|
|
495
505
|
for (const conflict of decisionConflicts) {
|
|
496
506
|
warnings.push(`The proposed ${conflict.canonicalKey} (${conflict.proposedEffect}) contradicts ${conflict.factId} (${conflict.effect}) under ${conflict.requirementId}${conflict.requirementId === args.requirementId ? ", the requirement this claim would ground" : ""}: both decide ${completeCandidate?.predicate_name} on the same key arguments. kb_upsert refuses a grounding link that introduces this conflict; supersede or close the conflicting requirement, or correct the decision, before applying.`);
|
|
497
507
|
}
|
|
508
|
+
const conflictSummary = decisionConflicts.length > 0
|
|
509
|
+
? ` It would contradict ${decisionConflicts
|
|
510
|
+
.map((conflict) => `${conflict.factId} (${conflict.effect}) under ${conflict.requirementId}`)
|
|
511
|
+
.join(", ")}: see decisionConflicts before applying anything.`
|
|
512
|
+
: "";
|
|
498
513
|
return {
|
|
499
|
-
content: [{ type: "text", text: textSummary }],
|
|
514
|
+
content: [{ type: "text", text: textSummary + conflictSummary }],
|
|
500
515
|
structuredContent: {
|
|
501
516
|
text,
|
|
502
517
|
claimKey,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PrologPort } from "../../public/operations/runtime-types.js";
|
|
2
|
+
import { type SemanticRelationship } from "../semantic-advisor/ingestion-boundary.js";
|
|
2
3
|
import { type StoredEntityLookup } from "./stored-entity.js";
|
|
3
4
|
import type { StagedUpsertState, UpsertInput } from "./types.js";
|
|
4
5
|
/**
|
|
@@ -13,4 +14,19 @@ import type { StagedUpsertState, UpsertInput } from "./types.js";
|
|
|
13
14
|
* changes the prose is validated exactly as given.
|
|
14
15
|
*/
|
|
15
16
|
export declare function withStoredRequirementSemantics(input: UpsertInput, prolog: Pick<PrologPort, "query">, staged?: StagedUpsertState, lookup?: StoredEntityLookup): Promise<UpsertInput>;
|
|
17
|
+
/**
|
|
18
|
+
* An update to a stored requirement is judged as its authored file will read
|
|
19
|
+
* afterwards: the stored status, prose and proposition ledger with the
|
|
20
|
+
* payload's fields on top (the source writer keeps every front matter key the
|
|
21
|
+
* payload leaves out and states the stored `semantic_text`). A payload such
|
|
22
|
+
* as `{status: "closed"}` passes the check on its own fields, yet the file it
|
|
23
|
+
* leaves is a current requirement whose prose has no inventory, which sync
|
|
24
|
+
* then refuses. Such a write is refused here with the error sync would give.
|
|
25
|
+
*
|
|
26
|
+
* A requirement that was already current with the same prose and no complete
|
|
27
|
+
* inventory is legacy content sync keeps accepting, so a write that changes
|
|
28
|
+
* neither keeps working. A write that makes the requirement current, or
|
|
29
|
+
* changes the prose sync checks, must carry the complete inventory.
|
|
30
|
+
*/
|
|
31
|
+
export declare function assertStoredRequirementBoundary(input: UpsertInput, relationships: readonly SemanticRelationship[], prolog: Pick<PrologPort, "query">, staged?: StagedUpsertState, lookup?: StoredEntityLookup): Promise<void>;
|
|
16
32
|
//# sourceMappingURL=requirement-semantics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirement-semantics.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/requirement-semantics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"requirement-semantics.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/requirement-semantics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAE3E,OAAO,EAEL,KAAK,oBAAoB,EAE1B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAwCjE;;;;;;;;;;GAUG;AACH,wBAAsB,8BAA8B,CAClD,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EACjC,MAAM,CAAC,EAAE,iBAAiB,EAC1B,MAAM,GAAE,kBAAqE,GAC5E,OAAO,CAAC,WAAW,CAAC,CA6BtB;AAuBD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,+BAA+B,CACnD,KAAK,EAAE,WAAW,EAClB,aAAa,EAAE,SAAS,oBAAoB,EAAE,EAC9C,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EACjC,MAAM,CAAC,EAAE,iBAAiB,EAC1B,MAAM,GAAE,kBAAqE,GAC5E,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|