kibi-cli 2.38.0 → 2.40.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-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +4 -0
- package/dist/cli-register-foundation.js +2 -2
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +33 -9
- package/dist/commands/coverage.d.ts +1 -0
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +40 -0
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +29 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +4 -0
- package/dist/commands/migrate-plan-record.d.ts +18 -0
- package/dist/commands/migrate-plan-record.d.ts.map +1 -0
- package/dist/commands/migrate-plan-record.js +112 -0
- package/dist/commands/migrate.d.ts +11 -2
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +60 -8
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +18 -3
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +17 -4
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +6 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +8 -0
- package/dist/commands/telemetry.d.ts.map +1 -1
- package/dist/commands/telemetry.js +12 -2
- package/dist/extractors/markdown.d.ts +6 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +21 -0
- package/dist/extractors/symbol-title-match.d.ts +31 -0
- package/dist/extractors/symbol-title-match.d.ts.map +1 -0
- package/dist/extractors/symbol-title-match.js +133 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +81 -12
- package/dist/operations/bootstrap/discovery-evidence.d.ts.map +1 -1
- package/dist/operations/bootstrap/discovery-evidence.js +44 -2
- package/dist/operations/bootstrap/discovery.d.ts.map +1 -1
- package/dist/operations/bootstrap/discovery.js +1 -0
- package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance-actions.js +12 -1
- package/dist/operations/bootstrap/plugin-offers.d.ts +7 -1
- package/dist/operations/bootstrap/plugin-offers.d.ts.map +1 -1
- package/dist/operations/bootstrap/plugin-offers.js +73 -3
- package/dist/operations/modeling/logic-modeling.d.ts.map +1 -1
- package/dist/operations/modeling/logic-modeling.js +2 -1
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +2 -1
- package/dist/operations/mutation/symbol-refresh.d.ts +2 -0
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-refresh.js +6 -1
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +7 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +2 -1
- package/dist/operations/proof/claim-bindings.d.ts +11 -0
- package/dist/operations/proof/claim-bindings.d.ts.map +1 -1
- package/dist/operations/proof/claim-bindings.js +144 -1
- package/dist/operations/proof/code-certificates.d.ts +10 -3
- package/dist/operations/proof/code-certificates.d.ts.map +1 -1
- package/dist/operations/proof/code-certificates.js +65 -13
- package/dist/operations/proof/code-languages.d.ts +104 -0
- package/dist/operations/proof/code-languages.d.ts.map +1 -0
- package/dist/operations/proof/code-languages.js +119 -0
- package/dist/operations/proof/code-models.d.ts +2 -0
- package/dist/operations/proof/code-models.d.ts.map +1 -1
- package/dist/operations/proof/code-models.js +11 -5
- package/dist/operations/proof/code-runner.d.ts +12 -9
- package/dist/operations/proof/code-runner.d.ts.map +1 -1
- package/dist/operations/proof/code-runner.js +81 -38
- package/dist/operations/proof/code-scope.d.ts +8 -0
- package/dist/operations/proof/code-scope.d.ts.map +1 -1
- package/dist/operations/proof/code-scope.js +30 -1
- package/dist/operations/proof/explain.d.ts +76 -0
- package/dist/operations/proof/explain.d.ts.map +1 -1
- package/dist/operations/proof/explain.js +228 -0
- package/dist/operations/proof/ingest-proof.d.ts +2 -0
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +1 -0
- package/dist/operations/proof/java-package-shadow.d.ts +14 -0
- package/dist/operations/proof/java-package-shadow.d.ts.map +1 -0
- package/dist/operations/proof/java-package-shadow.js +389 -0
- package/dist/operations/proof/prolog-evaluator.d.ts +14 -0
- package/dist/operations/proof/prolog-evaluator.d.ts.map +1 -0
- package/dist/operations/proof/prolog-evaluator.js +247 -0
- package/dist/operations/proof/prolog-source-reader.d.ts +20 -0
- package/dist/operations/proof/prolog-source-reader.d.ts.map +1 -0
- package/dist/operations/proof/prolog-source-reader.js +1123 -0
- package/dist/operations/proof/source-code-readers.d.ts +6 -0
- package/dist/operations/proof/source-code-readers.d.ts.map +1 -1
- package/dist/operations/proof/source-code-readers.js +879 -75
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +9 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +21 -0
- package/dist/operations/semantic-advisor/case-preview.d.ts +24 -0
- package/dist/operations/semantic-advisor/case-preview.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/case-preview.js +216 -0
- package/dist/operations/semantic-advisor/shared.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/shared.js +3 -0
- package/dist/operations/semantic-advisor/types.d.ts +23 -0
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/plugins/approved-source-analyzers.generated.d.ts +15 -34
- package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -1
- package/dist/plugins/approved-source-analyzers.generated.js +15 -34
- package/dist/plugins/plugin-install-check.d.ts +21 -0
- package/dist/plugins/plugin-install-check.d.ts.map +1 -0
- package/dist/plugins/plugin-install-check.js +62 -0
- package/dist/plugins/proof-reference-extractors.d.ts +20 -0
- package/dist/plugins/proof-reference-extractors.d.ts.map +1 -0
- package/dist/plugins/proof-reference-extractors.js +104 -0
- package/dist/plugins/reference-language-suggestion.d.ts +51 -0
- package/dist/plugins/reference-language-suggestion.d.ts.map +1 -0
- package/dist/plugins/reference-language-suggestion.js +277 -0
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +3 -1
- package/dist/plugins/source-analysis-service.d.ts.map +1 -1
- package/dist/plugins/source-analysis-service.js +4 -0
- package/dist/plugins/source-change-analysis.d.ts +26 -1
- package/dist/plugins/source-change-analysis.d.ts.map +1 -1
- package/dist/plugins/source-change-analysis.js +77 -5
- package/dist/plugins/source-classification.d.ts +2 -2
- package/dist/plugins/source-classification.d.ts.map +1 -1
- package/dist/plugins/source-classification.js +45 -1
- package/dist/public/operations/catalog.d.ts +62 -7
- 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/evidence-floor.d.ts +8 -0
- package/dist/public/operations/evidence-floor.d.ts.map +1 -1
- package/dist/public/operations/evidence-floor.js +19 -1
- package/dist/public/operations/repair-plan.d.ts +46 -0
- package/dist/public/operations/repair-plan.d.ts.map +1 -1
- package/dist/public/operations/repair-plan.js +110 -1
- package/dist/public/operations/schema6-check-actions.js +1 -1
- 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 +61 -6
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +30 -0
- package/dist/public/operations/specs/reporting.d.ts +8 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +26 -3
- package/dist/public/operations/specs/semantic.d.ts.map +1 -1
- package/dist/public/operations/specs/semantic.js +2 -1
- package/dist/public/operations/specs/upsert.d.ts +61 -6
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/symbol-coordinates-check.d.ts +11 -0
- package/dist/public/operations/symbol-coordinates-check.d.ts.map +1 -0
- package/dist/public/operations/symbol-coordinates-check.js +66 -0
- package/dist/public/proof-protocol.d.ts +31 -6
- package/dist/public/proof-protocol.d.ts.map +1 -1
- package/dist/public/proof-protocol.js +45 -15
- package/dist/public/proof-sources.d.ts +4 -2
- package/dist/public/proof-sources.d.ts.map +1 -1
- package/dist/public/proof-sources.js +43 -4
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +59 -0
- package/dist/public/skills/kibi-commit-review/SKILL.md +6 -2
- package/dist/public/skills/kibi-decisions/SKILL.md +7 -2
- package/dist/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
- package/dist/public/skills/kibi-usage/SKILL.md +14 -3
- package/dist/public/skills/kibi-usage/resources/prolog-proofs.md +207 -0
- package/dist/public/skills/kibi-usage/resources/proof.md +44 -3
- package/dist/schemas/entity.schema.json +126 -6
- package/dist/search-answer.d.ts +3 -2
- package/dist/search-answer.d.ts.map +1 -1
- package/dist/search-answer.js +56 -3
- package/dist/traceability/analysis-gate.d.ts +3 -1
- package/dist/traceability/analysis-gate.d.ts.map +1 -1
- package/dist/traceability/analysis-gate.js +9 -1
- package/dist/traceability/impact-knowledge.d.ts.map +1 -1
- package/dist/traceability/impact-knowledge.js +2 -0
- package/dist/traceability/staged-file-coverage.d.ts.map +1 -1
- package/dist/traceability/staged-file-coverage.js +7 -2
- package/dist/traceability/symbol-extract.d.ts +17 -0
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +69 -15
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +11 -1
- package/dist/traceability/validate.d.ts.map +1 -1
- package/dist/traceability/validate.js +5 -7
- package/dist/types/entities.d.ts +12 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/usage-telemetry.d.ts +9 -0
- package/dist/usage-telemetry.d.ts.map +1 -1
- package/dist/usage-telemetry.js +50 -4
- package/dist/utils/first-sentence.d.ts +9 -0
- package/dist/utils/first-sentence.d.ts.map +1 -0
- package/dist/utils/first-sentence.js +52 -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/package.json +5 -5
- package/schema/entities.pl +12 -0
- package/src/public/operations/check-executor.ts +8 -0
- package/src/public/operations/evidence-floor.ts +29 -1
- package/src/public/operations/repair-plan.ts +152 -1
- package/src/public/operations/schema6-check-actions.ts +1 -1
- package/src/public/operations/specs/check-rules.generated.ts +3 -1
- package/src/public/operations/specs/mutation-schemas.ts +34 -0
- package/src/public/operations/specs/reporting.ts +38 -3
- package/src/public/operations/specs/semantic.ts +2 -1
- package/src/public/operations/symbol-coordinates-check.ts +79 -0
- package/src/public/proof-protocol-types.d.ts +22 -5
- package/src/public/proof-protocol.ts +78 -19
- package/src/public/proof-sources.ts +51 -3
- package/src/public/schemas/entity.ts +65 -0
- package/src/public/skills/kibi-commit-review/SKILL.md +6 -2
- package/src/public/skills/kibi-decisions/SKILL.md +7 -2
- package/src/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
- package/src/public/skills/kibi-usage/SKILL.md +14 -3
- package/src/public/skills/kibi-usage/resources/prolog-proofs.md +207 -0
- package/src/public/skills/kibi-usage/resources/proof.md +44 -3
- package/src/schemas/entity.schema.json +126 -6
|
@@ -87,6 +87,37 @@ const REPAIR_PHASES = {
|
|
|
87
87
|
validationRules: ["must-priority-coverage", "no-dangling-refs"],
|
|
88
88
|
writePolicy: "sequential_upsert",
|
|
89
89
|
},
|
|
90
|
+
dimension_grounding: {
|
|
91
|
+
order: 64,
|
|
92
|
+
objective: "Ground each quantified claim (each, every, all, or a cardinality bound) on what varies: an integer count or bound, a set of members, a rule over a variable, or a state machine. If the quantifier ranges over nothing, record a dimension_waiver on the grounding fact for a person to approve, and record their approval in the same pull request.",
|
|
93
|
+
workflowSteps: [
|
|
94
|
+
"kb_model_requirement",
|
|
95
|
+
"kb_validate_upsert",
|
|
96
|
+
"kb_upsert",
|
|
97
|
+
"kb_check",
|
|
98
|
+
],
|
|
99
|
+
validationRules: ["no-dangling-refs"],
|
|
100
|
+
writePolicy: "sequential_upsert",
|
|
101
|
+
},
|
|
102
|
+
case_scenarios: {
|
|
103
|
+
order: 66,
|
|
104
|
+
objective: "Cover each uncovered rejection case: add a scenario whose assumes fact states the case's assumption (a value past the bound, a value outside the set), expects rejection or error, is linked with specified_by and is verified by a passing end-to-end test. Each repair lists caseSkeletons, upsert-ready draft scenarios and their assumed facts: fill in the placeholders, verify the scenario by a test, then set its status to active (a draft never covers a case). If a person accepts the cases as covered another way, record a case_waiver on the grounding fact for them to approve, and record their approval in the same pull request.",
|
|
105
|
+
workflowSteps: [
|
|
106
|
+
"kb_coverage",
|
|
107
|
+
"kb_validate_upsert",
|
|
108
|
+
"kb_upsert",
|
|
109
|
+
"kb_check",
|
|
110
|
+
],
|
|
111
|
+
validationRules: ["scenario-outcome-mismatch", "no-dangling-refs"],
|
|
112
|
+
writePolicy: "sequential_upsert",
|
|
113
|
+
},
|
|
114
|
+
negative_scenarios: {
|
|
115
|
+
order: 65,
|
|
116
|
+
objective: "Add a scenario that expects rejection or error and assumes a value the requirement forbids (see suggestedNegatives), link it with specified_by and verify it with a passing end-to-end test.",
|
|
117
|
+
workflowSteps: ["kb_query", "kb_validate_upsert", "kb_upsert", "kb_check"],
|
|
118
|
+
validationRules: ["scenario-outcome-mismatch", "no-dangling-refs"],
|
|
119
|
+
writePolicy: "sequential_upsert",
|
|
120
|
+
},
|
|
90
121
|
scenario_tests: {
|
|
91
122
|
order: 70,
|
|
92
123
|
objective: "Create or select a test endpoint and link it through the requirement scenario.",
|
|
@@ -173,6 +204,9 @@ const GAP_PHASE = {
|
|
|
173
204
|
missing_scenario: "scenario_endpoints",
|
|
174
205
|
infeasible_scenario: "scenario_endpoints",
|
|
175
206
|
unknown_scenario_feasibility: "scenario_endpoints",
|
|
207
|
+
dimension_unrepresented: "dimension_grounding",
|
|
208
|
+
happy_path_only: "negative_scenarios",
|
|
209
|
+
uncovered_case: "case_scenarios",
|
|
176
210
|
missing_scenario_test: "scenario_tests",
|
|
177
211
|
proof_snapshot_unavailable: "snapshot_runtime",
|
|
178
212
|
missing_passing_e2e: "proof_evidence",
|
|
@@ -201,6 +235,9 @@ const GAP_STAGE = {
|
|
|
201
235
|
missing_scenario: "scenarios",
|
|
202
236
|
infeasible_scenario: "scenarios",
|
|
203
237
|
unknown_scenario_feasibility: "scenarios",
|
|
238
|
+
dimension_unrepresented: "dimension",
|
|
239
|
+
happy_path_only: "negative_path",
|
|
240
|
+
uncovered_case: "cases",
|
|
204
241
|
missing_scenario_test: "scenario_tests",
|
|
205
242
|
missing_passing_e2e: "passing_e2e",
|
|
206
243
|
missing_proof_receipt: "passing_e2e",
|
|
@@ -220,6 +257,9 @@ const PROOF_STAGE_KEY = {
|
|
|
220
257
|
contradictions: "contradictions",
|
|
221
258
|
scenarios: "scenarios",
|
|
222
259
|
scenario_tests: "scenarioTests",
|
|
260
|
+
negative_path: "negativePath",
|
|
261
|
+
dimension: "dimension",
|
|
262
|
+
cases: "cases",
|
|
223
263
|
passing_e2e: "passingE2e",
|
|
224
264
|
executable_symbols: "executableSymbols",
|
|
225
265
|
production_symbols: "productionSymbols",
|
|
@@ -261,6 +301,71 @@ function stageEvidence(row, proofStage) {
|
|
|
261
301
|
const stable = stableValue(evidence);
|
|
262
302
|
return isRecord(stable) ? stable : {};
|
|
263
303
|
}
|
|
304
|
+
const VALUE_FIELD = {
|
|
305
|
+
int: "value_int",
|
|
306
|
+
number: "value_number",
|
|
307
|
+
set: "value_set",
|
|
308
|
+
string: "value_string",
|
|
309
|
+
};
|
|
310
|
+
function caseSkeleton(requirementId, row) {
|
|
311
|
+
const caseId = typeof row.caseId === "string" ? row.caseId : undefined;
|
|
312
|
+
const assumption = isRecord(row.assumption) ? row.assumption : undefined;
|
|
313
|
+
const valueType = typeof assumption?.value_type === "string" ? assumption.value_type : "";
|
|
314
|
+
const valueField = VALUE_FIELD[valueType];
|
|
315
|
+
if (caseId === undefined || assumption === undefined || !valueField)
|
|
316
|
+
return undefined;
|
|
317
|
+
const constraint = typeof row.constraint === "string" ? row.constraint : "";
|
|
318
|
+
const property = typeof assumption.property_key === "string" ? assumption.property_key : "";
|
|
319
|
+
const expects = row.predicted === "rejection" ? "rejection" : "success";
|
|
320
|
+
const placeholder = JSON.stringify(assumption.value).includes("<");
|
|
321
|
+
const suffix = caseId.replace(/^CASE-/, "");
|
|
322
|
+
const factId = `FACT-CASE-${suffix}`;
|
|
323
|
+
const scenarioId = `SCEN-CASE-${suffix}`;
|
|
324
|
+
return {
|
|
325
|
+
caseId,
|
|
326
|
+
constraint,
|
|
327
|
+
placeholder,
|
|
328
|
+
entities: [
|
|
329
|
+
{
|
|
330
|
+
type: "fact",
|
|
331
|
+
id: factId,
|
|
332
|
+
properties: {
|
|
333
|
+
title: `${property} ${constraint}`,
|
|
334
|
+
status: "active",
|
|
335
|
+
fact_kind: "property_value",
|
|
336
|
+
subject_key: assumption.subject_key,
|
|
337
|
+
property_key: property,
|
|
338
|
+
operator: assumption.operator,
|
|
339
|
+
value_type: valueType,
|
|
340
|
+
[valueField]: assumption.value,
|
|
341
|
+
},
|
|
342
|
+
relationships: [],
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
type: "scenario",
|
|
346
|
+
id: scenarioId,
|
|
347
|
+
properties: {
|
|
348
|
+
title: `${property} ${constraint} is ${expects === "rejection" ? "refused" : "accepted"}`,
|
|
349
|
+
status: "draft",
|
|
350
|
+
expects,
|
|
351
|
+
},
|
|
352
|
+
relationships: [
|
|
353
|
+
{ type: "assumes", from: scenarioId, to: factId },
|
|
354
|
+
{ type: "specified_by", from: requirementId, to: scenarioId },
|
|
355
|
+
],
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
function caseSkeletons(requirementId, evidence) {
|
|
361
|
+
const rows = Array.isArray(evidence.uncoveredCases)
|
|
362
|
+
? evidence.uncoveredCases.filter(isRecord)
|
|
363
|
+
: [];
|
|
364
|
+
return rows.flatMap((row) => {
|
|
365
|
+
const skeleton = caseSkeleton(requirementId, row);
|
|
366
|
+
return skeleton === undefined ? [] : [skeleton];
|
|
367
|
+
});
|
|
368
|
+
}
|
|
264
369
|
function batchId(requirementId, phase) {
|
|
265
370
|
const order = String(REPAIR_PHASES[phase].order).padStart(3, "0");
|
|
266
371
|
const safeRequirementId = requirementId.replace(/[^A-Za-z0-9_-]/g, "-");
|
|
@@ -280,13 +385,17 @@ function buildRequirementBatches(row) {
|
|
|
280
385
|
const proofStage = typeof sourceRepair?.stage === "string"
|
|
281
386
|
? sourceRepair.stage
|
|
282
387
|
: (GAP_STAGE[gap] ?? "manual_review");
|
|
388
|
+
const evidence = stageEvidence(row, proofStage);
|
|
283
389
|
const repair = {
|
|
284
390
|
requirementId,
|
|
285
391
|
gap,
|
|
286
392
|
proofPriority: numberField(sourceRepair?.priority, REPAIR_PHASES[phase].order),
|
|
287
393
|
proofStage,
|
|
288
394
|
action: actionForRepair(sourceRepair, phase),
|
|
289
|
-
evidence
|
|
395
|
+
evidence,
|
|
396
|
+
...(gap === "uncovered_case"
|
|
397
|
+
? { caseSkeletons: caseSkeletons(requirementId, evidence) }
|
|
398
|
+
: {}),
|
|
290
399
|
};
|
|
291
400
|
const phaseRepairs = byPhase.get(phase) ?? [];
|
|
292
401
|
phaseRepairs.push(repair);
|
|
@@ -600,7 +600,7 @@ export function schema6ReviewActionsFromCheck(diagnostics) {
|
|
|
600
600
|
safety: "review",
|
|
601
601
|
invocation: {
|
|
602
602
|
kind: "review",
|
|
603
|
-
instruction: `${total} agent-authored requirement(s) have no human approval${total > listed.length ? `; these ${listed.length} come first` : ""}: ${listed.join(", ")}. Have a person read each one; when it states the intended behavior, kb_upsert it with origin.approved_by set to the reviewer (keep kind: agent and the rest of origin). Rerun kb_check for the next page.`,
|
|
603
|
+
instruction: `${total} agent-authored requirement(s) have no human approval${total > listed.length ? `; these ${listed.length} come first` : ""}: ${listed.join(", ")}. Have a person read each one; when it states the intended behavior, kb_upsert it with origin.approved_by set to the reviewer (keep kind: agent and the rest of origin), in the same change and pull request as the requirement, not a separate one. Rerun kb_check for the next page.`,
|
|
604
604
|
},
|
|
605
605
|
affectedEntityIds: listed,
|
|
606
606
|
affectedFiles: [...new Set(agentRequirementFiles)].sort(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Every selectable kb_check rule name, registry order. */
|
|
2
2
|
export declare const SELECTABLE_RULE_NAMES: readonly string[];
|
|
3
3
|
/** Comma-separated "Allowed:" fragment for the kb_check rules description. */
|
|
4
|
-
export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
|
|
4
|
+
export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, symbol-coordinates-missing, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
|
|
5
5
|
//# sourceMappingURL=check-rules.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EA4DlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,+zCACyxC,CAAC"}
|
|
@@ -13,6 +13,7 @@ export const SELECTABLE_RULE_NAMES = [
|
|
|
13
13
|
"symbol-coverage",
|
|
14
14
|
"symbol-traceability",
|
|
15
15
|
"symbol-granularity",
|
|
16
|
+
"symbol-coordinates-missing",
|
|
16
17
|
"no-dangling-refs",
|
|
17
18
|
"source-relationship-parity",
|
|
18
19
|
"branch-store-not-compiled",
|
|
@@ -23,6 +24,7 @@ export const SELECTABLE_RULE_NAMES = [
|
|
|
23
24
|
"superseded-requirement-open",
|
|
24
25
|
"scenario-feasibility",
|
|
25
26
|
"scenario-feasibility-unknown",
|
|
27
|
+
"scenario-outcome-mismatch",
|
|
26
28
|
"exception-claim-keys",
|
|
27
29
|
"numeric-string-value",
|
|
28
30
|
"rule-key-arguments-missing",
|
|
@@ -69,4 +71,4 @@ export const SELECTABLE_RULE_NAMES = [
|
|
|
69
71
|
];
|
|
70
72
|
// implements REQ-006
|
|
71
73
|
/** Comma-separated "Allowed:" fragment for the kb_check rules description. */
|
|
72
|
-
export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
|
|
74
|
+
export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, symbol-coordinates-missing, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
|
|
@@ -12,7 +12,7 @@ export declare const checkSpec: {
|
|
|
12
12
|
readonly type: "string";
|
|
13
13
|
readonly enum: readonly string[];
|
|
14
14
|
};
|
|
15
|
-
readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
|
|
15
|
+
readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, symbol-coordinates-missing, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
|
|
16
16
|
};
|
|
17
17
|
readonly sourceFiles: {
|
|
18
18
|
readonly type: "array";
|
|
@@ -118,6 +118,16 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
|
|
|
118
118
|
readonly minLength: 1;
|
|
119
119
|
readonly description: "Requirement-only. Optional reference to the exception's approval decision record.";
|
|
120
120
|
};
|
|
121
|
+
readonly failure_side_waiver: {
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly minLength: 1;
|
|
124
|
+
readonly description: "Requirement-only. Why the requirement has no failure side to test (its claims state a capability or output shape). Waives happy_path_only once failure_side_waiver_approved_by is set.";
|
|
125
|
+
};
|
|
126
|
+
readonly failure_side_waiver_approved_by: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
readonly minLength: 1;
|
|
129
|
+
readonly description: "Requirement-only. The person who accepted failure_side_waiver.";
|
|
130
|
+
};
|
|
121
131
|
readonly firmness: {
|
|
122
132
|
readonly type: "string";
|
|
123
133
|
readonly enum: readonly ["firm", "default", "exploratory"];
|
|
@@ -215,13 +225,13 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
|
|
|
215
225
|
readonly description: "What the checker establishes; absent means e2e. exhaustive, typecheck, arithmetic, smt, rule, state_machine and regex must leave a kibi.code-certificate.v1 that Kibi re-checks before the receipt counts as proved. source reads the contract's source itself: the run may leave {version, kind: source, test_id, source} or nothing, and Kibi stores its own read as the certificate.";
|
|
216
226
|
};
|
|
217
227
|
readonly source: {
|
|
218
|
-
readonly description: "source: the project source a source proof reads. A project source Kibi reads by itself. reader json or yaml: {file, path?, select?: keys|values|items}. glob: {pattern, capture?, ignore?} (capture true reads what each * matched). openapi: {file, select?: operations|unsecured_operations|security_schemes|responses}. references: {files, extract: env|imports|calls|string_args|thrown|property, callee?, key?, ignore?}. schema: {format: drizzle|prisma|sql, file (drizzle, prisma) or files (sql migrations), exports?, table?, select?: tables|columns|required_columns|nullable_columns|foreign_keys}. routes: {file, export, framework?: hono|express, path_prefix?, names_from?, select?: routes|middleware}. validator: {file, export, select?: fields|required_fields|optional_fields}. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
|
|
228
|
+
readonly description: "source: the project source a source proof reads. A project source Kibi reads by itself. reader json or yaml: {file, path?, select?: keys|values|items}. glob: {pattern, capture?, ignore?} (capture true reads what each * matched). openapi: {file, select?: operations|unsecured_operations|security_schemes|responses}. references: {files, extract: env|imports|calls|string_args|thrown|property, callee?, key?, ignore?} over TypeScript, JavaScript, Python and SWI-Prolog files. schema: {format: drizzle|prisma|sql, file (drizzle, prisma) or files (sql migrations), exports?, table?, select?: tables|columns|required_columns|nullable_columns|foreign_keys}. routes: {file, export, framework?: hono|express, path_prefix?, names_from?, select?: routes|middleware}. validator: {file, export, select?: fields|required_fields|optional_fields}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
|
|
219
229
|
readonly type: "object";
|
|
220
230
|
readonly required: readonly ["reader"];
|
|
221
231
|
readonly properties: {
|
|
222
232
|
readonly reader: {
|
|
223
233
|
readonly type: "string";
|
|
224
|
-
readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
|
|
234
|
+
readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
|
|
225
235
|
};
|
|
226
236
|
};
|
|
227
237
|
readonly additionalProperties: true;
|
|
@@ -245,6 +255,11 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
|
|
|
245
255
|
readonly minLength: 1;
|
|
246
256
|
readonly description: "exhaustive: when the export is a list of records, the field of each record that names a domain member (a catalog's name).";
|
|
247
257
|
};
|
|
258
|
+
readonly arg: {
|
|
259
|
+
readonly type: "integer";
|
|
260
|
+
readonly minimum: 1;
|
|
261
|
+
readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
|
|
262
|
+
};
|
|
248
263
|
};
|
|
249
264
|
readonly additionalProperties: false;
|
|
250
265
|
};
|
|
@@ -285,14 +300,19 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
|
|
|
285
300
|
readonly type: "string";
|
|
286
301
|
readonly minLength: 1;
|
|
287
302
|
};
|
|
303
|
+
readonly arg: {
|
|
304
|
+
readonly type: "integer";
|
|
305
|
+
readonly minimum: 1;
|
|
306
|
+
readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
|
|
307
|
+
};
|
|
288
308
|
readonly source: {
|
|
289
309
|
readonly type: "object";
|
|
290
|
-
readonly description: "A project source Kibi reads by itself. reader json or yaml: {file, path?, select?: keys|values|items}. glob: {pattern, capture?, ignore?} (capture true reads what each * matched). openapi: {file, select?: operations|unsecured_operations|security_schemes|responses}. references: {files, extract: env|imports|calls|string_args|thrown|property, callee?, key?, ignore?}. schema: {format: drizzle|prisma|sql, file (drizzle, prisma) or files (sql migrations), exports?, table?, select?: tables|columns|required_columns|nullable_columns|foreign_keys}. routes: {file, export, framework?: hono|express, path_prefix?, names_from?, select?: routes|middleware}. validator: {file, export, select?: fields|required_fields|optional_fields}. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
|
|
310
|
+
readonly description: "A project source Kibi reads by itself. reader json or yaml: {file, path?, select?: keys|values|items}. glob: {pattern, capture?, ignore?} (capture true reads what each * matched). openapi: {file, select?: operations|unsecured_operations|security_schemes|responses}. references: {files, extract: env|imports|calls|string_args|thrown|property, callee?, key?, ignore?} over TypeScript, JavaScript, Python and SWI-Prolog files. schema: {format: drizzle|prisma|sql, file (drizzle, prisma) or files (sql migrations), exports?, table?, select?: tables|columns|required_columns|nullable_columns|foreign_keys}. routes: {file, export, framework?: hono|express, path_prefix?, names_from?, select?: routes|middleware}. validator: {file, export, select?: fields|required_fields|optional_fields}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
|
|
291
311
|
readonly required: readonly ["reader"];
|
|
292
312
|
readonly properties: {
|
|
293
313
|
readonly reader: {
|
|
294
314
|
readonly type: "string";
|
|
295
|
-
readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
|
|
315
|
+
readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
|
|
296
316
|
};
|
|
297
317
|
};
|
|
298
318
|
readonly additionalProperties: true;
|
|
@@ -353,6 +373,11 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
|
|
|
353
373
|
readonly type: "string";
|
|
354
374
|
readonly minLength: 1;
|
|
355
375
|
};
|
|
376
|
+
readonly arg: {
|
|
377
|
+
readonly type: "integer";
|
|
378
|
+
readonly minimum: 1;
|
|
379
|
+
readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
|
|
380
|
+
};
|
|
356
381
|
};
|
|
357
382
|
readonly additionalProperties: false;
|
|
358
383
|
}, {
|
|
@@ -361,12 +386,12 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
|
|
|
361
386
|
readonly properties: {
|
|
362
387
|
readonly source: {
|
|
363
388
|
readonly type: "object";
|
|
364
|
-
readonly description: "A project source Kibi reads by itself. reader json or yaml: {file, path?, select?: keys|values|items}. glob: {pattern, capture?, ignore?} (capture true reads what each * matched). openapi: {file, select?: operations|unsecured_operations|security_schemes|responses}. references: {files, extract: env|imports|calls|string_args|thrown|property, callee?, key?, ignore?}. schema: {format: drizzle|prisma|sql, file (drizzle, prisma) or files (sql migrations), exports?, table?, select?: tables|columns|required_columns|nullable_columns|foreign_keys}. routes: {file, export, framework?: hono|express, path_prefix?, names_from?, select?: routes|middleware}. validator: {file, export, select?: fields|required_fields|optional_fields}. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
|
|
389
|
+
readonly description: "A project source Kibi reads by itself. reader json or yaml: {file, path?, select?: keys|values|items}. glob: {pattern, capture?, ignore?} (capture true reads what each * matched). openapi: {file, select?: operations|unsecured_operations|security_schemes|responses}. references: {files, extract: env|imports|calls|string_args|thrown|property, callee?, key?, ignore?} over TypeScript, JavaScript, Python and SWI-Prolog files. schema: {format: drizzle|prisma|sql, file (drizzle, prisma) or files (sql migrations), exports?, table?, select?: tables|columns|required_columns|nullable_columns|foreign_keys}. routes: {file, export, framework?: hono|express, path_prefix?, names_from?, select?: routes|middleware}. validator: {file, export, select?: fields|required_fields|optional_fields}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
|
|
365
390
|
readonly required: readonly ["reader"];
|
|
366
391
|
readonly properties: {
|
|
367
392
|
readonly reader: {
|
|
368
393
|
readonly type: "string";
|
|
369
|
-
readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
|
|
394
|
+
readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
|
|
370
395
|
};
|
|
371
396
|
};
|
|
372
397
|
readonly additionalProperties: true;
|
|
@@ -389,6 +414,11 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
|
|
|
389
414
|
readonly type: "string";
|
|
390
415
|
readonly minLength: 1;
|
|
391
416
|
};
|
|
417
|
+
readonly arg: {
|
|
418
|
+
readonly type: "integer";
|
|
419
|
+
readonly minimum: 1;
|
|
420
|
+
readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
|
|
421
|
+
};
|
|
392
422
|
};
|
|
393
423
|
readonly additionalProperties: false;
|
|
394
424
|
};
|
|
@@ -405,6 +435,11 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
|
|
|
405
435
|
readonly type: "string";
|
|
406
436
|
readonly minLength: 1;
|
|
407
437
|
};
|
|
438
|
+
readonly arg: {
|
|
439
|
+
readonly type: "integer";
|
|
440
|
+
readonly minimum: 1;
|
|
441
|
+
readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
|
|
442
|
+
};
|
|
408
443
|
};
|
|
409
444
|
readonly additionalProperties: false;
|
|
410
445
|
};
|
|
@@ -820,6 +855,26 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
|
|
|
820
855
|
readonly type: "string";
|
|
821
856
|
readonly description: "Exact atomic requirement clause represented by this fact, retained for human audit. On a grounding fact Kibi derives claim_key from it; an observation or meta fact quotes the clause it is about without a key.";
|
|
822
857
|
};
|
|
858
|
+
readonly dimension_waiver: {
|
|
859
|
+
readonly type: "string";
|
|
860
|
+
readonly minLength: 1;
|
|
861
|
+
readonly description: "Fact-only. Why the quantifier word in claim_text ranges over nothing, so the claim needs no count, set or rule. Waives dimension_unrepresented once dimension_waiver_approved_by is set.";
|
|
862
|
+
};
|
|
863
|
+
readonly dimension_waiver_approved_by: {
|
|
864
|
+
readonly type: "string";
|
|
865
|
+
readonly minLength: 1;
|
|
866
|
+
readonly description: "Fact-only. The person who accepted dimension_waiver.";
|
|
867
|
+
};
|
|
868
|
+
readonly case_waiver: {
|
|
869
|
+
readonly type: "string";
|
|
870
|
+
readonly minLength: 1;
|
|
871
|
+
readonly description: "Fact-only. Why the edge cases derived from this fact are covered some other way or cannot occur. Waives uncovered_case once case_waiver_approved_by is set.";
|
|
872
|
+
};
|
|
873
|
+
readonly case_waiver_approved_by: {
|
|
874
|
+
readonly type: "string";
|
|
875
|
+
readonly minLength: 1;
|
|
876
|
+
readonly description: "Fact-only. The person who accepted case_waiver.";
|
|
877
|
+
};
|
|
823
878
|
readonly predicate_name: {
|
|
824
879
|
readonly type: "string";
|
|
825
880
|
readonly description: "Optional predicate name for ontology predicate facts. Prefer kb_model mode predicates before hand-writing predicate_name.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-schemas.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/mutation-schemas.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY,gFASf,CAAC;AAWX,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"mutation-schemas.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/mutation-schemas.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY,gFASf,CAAC;AAWX,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqb3B,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;CA8CvB,CAAC"}
|
|
@@ -103,6 +103,16 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
103
103
|
minLength: 1,
|
|
104
104
|
description: "Requirement-only. Optional reference to the exception's approval decision record.",
|
|
105
105
|
},
|
|
106
|
+
failure_side_waiver: {
|
|
107
|
+
type: "string",
|
|
108
|
+
minLength: 1,
|
|
109
|
+
description: "Requirement-only. Why the requirement has no failure side to test (its claims state a capability or output shape). Waives happy_path_only once failure_side_waiver_approved_by is set.",
|
|
110
|
+
},
|
|
111
|
+
failure_side_waiver_approved_by: {
|
|
112
|
+
type: "string",
|
|
113
|
+
minLength: 1,
|
|
114
|
+
description: "Requirement-only. The person who accepted failure_side_waiver.",
|
|
115
|
+
},
|
|
106
116
|
firmness: {
|
|
107
117
|
type: "string",
|
|
108
118
|
enum: ["firm", "default", "exploratory"],
|
|
@@ -277,6 +287,26 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
277
287
|
type: "string",
|
|
278
288
|
description: "Exact atomic requirement clause represented by this fact, retained for human audit. On a grounding fact Kibi derives claim_key from it; an observation or meta fact quotes the clause it is about without a key.",
|
|
279
289
|
},
|
|
290
|
+
dimension_waiver: {
|
|
291
|
+
type: "string",
|
|
292
|
+
minLength: 1,
|
|
293
|
+
description: "Fact-only. Why the quantifier word in claim_text ranges over nothing, so the claim needs no count, set or rule. Waives dimension_unrepresented once dimension_waiver_approved_by is set.",
|
|
294
|
+
},
|
|
295
|
+
dimension_waiver_approved_by: {
|
|
296
|
+
type: "string",
|
|
297
|
+
minLength: 1,
|
|
298
|
+
description: "Fact-only. The person who accepted dimension_waiver.",
|
|
299
|
+
},
|
|
300
|
+
case_waiver: {
|
|
301
|
+
type: "string",
|
|
302
|
+
minLength: 1,
|
|
303
|
+
description: "Fact-only. Why the edge cases derived from this fact are covered some other way or cannot occur. Waives uncovered_case once case_waiver_approved_by is set.",
|
|
304
|
+
},
|
|
305
|
+
case_waiver_approved_by: {
|
|
306
|
+
type: "string",
|
|
307
|
+
minLength: 1,
|
|
308
|
+
description: "Fact-only. The person who accepted case_waiver.",
|
|
309
|
+
},
|
|
280
310
|
predicate_name: {
|
|
281
311
|
type: "string",
|
|
282
312
|
description: "Optional predicate name for ontology predicate facts. Prefer kb_model mode predicates before hand-writing predicate_name.",
|
|
@@ -3,6 +3,14 @@ import { type MigrationPlan } from "../migration-plan.js";
|
|
|
3
3
|
import { type RepairPlan } from "../repair-plan.js";
|
|
4
4
|
import type { OperationContext } from "../runtime-types.js";
|
|
5
5
|
import type { OperationResult } from "../types.js";
|
|
6
|
+
/**
|
|
7
|
+
* The engine names the attached store by its directory key (a SHA-256 of the
|
|
8
|
+
* branch name); meta.branch carries the branch name, as kb_status does, and
|
|
9
|
+
* the key moves to meta.branchStoreKey.
|
|
10
|
+
*/
|
|
11
|
+
export declare function withBranchName<T extends {
|
|
12
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
13
|
+
}>(payload: T, context: Pick<OperationContext, "branchAttachment">): T;
|
|
6
14
|
export type FindGapsInput = {
|
|
7
15
|
readonly type?: string;
|
|
8
16
|
readonly missingRelationships?: readonly string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{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,CAAC;AAEnE;;;;;;;GAOG;AAEH,wBAAgB,uBAAuB,IAAI,cAAc,GAAG,iBAAiB,CAI5E;AAGD,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA+CxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAGzC,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EAC/C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,EAClD,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,eAAe,CAAC,CAoB1B;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAoI3C;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FyC,CAAC;AAEnE,wBAAsB,YAAY,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAiCxC;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDsC,CAAC"}
|
|
@@ -18,6 +18,29 @@ const ENTITY_TYPES = [
|
|
|
18
18
|
"fact",
|
|
19
19
|
];
|
|
20
20
|
const ENTITY_TYPE_SET = new Set(ENTITY_TYPES);
|
|
21
|
+
/**
|
|
22
|
+
* The engine names the attached store by its directory key (a SHA-256 of the
|
|
23
|
+
* branch name); meta.branch carries the branch name, as kb_status does, and
|
|
24
|
+
* the key moves to meta.branchStoreKey.
|
|
25
|
+
*/
|
|
26
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
27
|
+
export function withBranchName(payload, context) {
|
|
28
|
+
const meta = payload.meta;
|
|
29
|
+
const name = context.branchAttachment?.kbBranch;
|
|
30
|
+
if (meta === undefined || name === undefined || meta.branch === name)
|
|
31
|
+
return payload;
|
|
32
|
+
const key = typeof meta.branch === "string" ? meta.branch : undefined;
|
|
33
|
+
return {
|
|
34
|
+
...payload,
|
|
35
|
+
meta: {
|
|
36
|
+
...meta,
|
|
37
|
+
branch: name,
|
|
38
|
+
...(key !== undefined && key !== "unknown"
|
|
39
|
+
? { branchStoreKey: key }
|
|
40
|
+
: {}),
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
21
44
|
function requireProlog(context) {
|
|
22
45
|
if (context.prolog === undefined) {
|
|
23
46
|
throw new Error("Reporting operation requires a Prolog runtime");
|
|
@@ -59,7 +82,7 @@ export async function executeFindGaps(input, context) {
|
|
|
59
82
|
: `Found ${payload.count ?? rows.length} gap rows. Showing ${rows.length}: ${rows.map((row) => row.id).join(", ")}.${stubNote}`,
|
|
60
83
|
},
|
|
61
84
|
],
|
|
62
|
-
structuredContent: confirmMetaFreshness(payload, context.workspaceRoot),
|
|
85
|
+
structuredContent: withBranchName(confirmMetaFreshness(payload, context.workspaceRoot), context),
|
|
63
86
|
};
|
|
64
87
|
}
|
|
65
88
|
catch (error) {
|
|
@@ -272,7 +295,7 @@ export async function executeCoverage(input, context) {
|
|
|
272
295
|
const migrationPlan = statusPlan
|
|
273
296
|
? mergeMigrationPlans([statusPlan, coveragePlan])
|
|
274
297
|
: coveragePlan;
|
|
275
|
-
const confirmed = confirmMetaFreshness(payload, context.workspaceRoot);
|
|
298
|
+
const confirmed = withBranchName(confirmMetaFreshness(payload, context.workspaceRoot), context);
|
|
276
299
|
const enrichedPayload = {
|
|
277
300
|
...confirmed,
|
|
278
301
|
rows,
|
|
@@ -414,7 +437,7 @@ export async function executeGraph(input, context) {
|
|
|
414
437
|
: `Graph traversal returned ${nodes.length} nodes and ${edges.length} edges from ${input.seedIds.join(", ")}.`,
|
|
415
438
|
},
|
|
416
439
|
],
|
|
417
|
-
structuredContent: confirmMetaFreshness(payload, context.workspaceRoot),
|
|
440
|
+
structuredContent: withBranchName(confirmMetaFreshness(payload, context.workspaceRoot), context),
|
|
418
441
|
};
|
|
419
442
|
}
|
|
420
443
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/semantic.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,mBAAmB,EACnB,8BAA8B,EAE/B,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/semantic.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,mBAAmB,EACnB,8BAA8B,EAE/B,MAAM,+CAA+C,CAAC;AAGvD,OAAO,KAAK,EAAE,gBAAgB,EAAc,MAAM,qBAAqB,CAAC;AA8CxE,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,mBAAmB,EACzB,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,8BAA8B,CAAC,CAmGzC;AAED,iBAAe,2BAA2B,CACxC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACxC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,8BAA8B,CAAC,CAiCzC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2EE,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { InputError } from "../../../cli-errors.js";
|
|
|
2
2
|
import { analyzeSemanticAdvisorInputWithPlugins } from "../../../operations/semantic-advisor/plugin-orchestration.js";
|
|
3
3
|
import { storedLedgerDriftWarning } from "../../../operations/semantic-advisor/stored-ledger-drift.js";
|
|
4
4
|
import { publicCapabilityStamp } from "../../../plugins/compose-semantic-classifier.js";
|
|
5
|
+
import { firstSentence } from "../../../utils/first-sentence.js";
|
|
5
6
|
function requiredText(value) {
|
|
6
7
|
const text = typeof value === "string" ? value.trim() : "";
|
|
7
8
|
if (!text) {
|
|
@@ -39,7 +40,7 @@ async function storedLedgerWarnings(args, text, receipt, context) {
|
|
|
39
40
|
export async function executeSemanticAdvisor(args, context) {
|
|
40
41
|
const text = requiredText(args.text);
|
|
41
42
|
const id = optionalString(args.id) ?? "REQ-SEMANTIC-ADVISOR-PREVIEW";
|
|
42
|
-
const title = optionalString(args.title) ?? text
|
|
43
|
+
const title = optionalString(args.title) ?? (firstSentence(text) || text);
|
|
43
44
|
const source = optionalString(args.source) ?? "mcp://kibi/semantic-advisor";
|
|
44
45
|
const orchestrated = await analyzeSemanticAdvisorInputWithPlugins({
|
|
45
46
|
payload: {
|