kibi-cli 2.38.0 → 2.39.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-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/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 +14 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +9 -3
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +6 -0
- 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/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/proof/explain.d.ts +63 -0
- package/dist/operations/proof/explain.d.ts.map +1 -1
- package/dist/operations/proof/explain.js +162 -0
- 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 +11 -8
- package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -1
- package/dist/plugins/approved-source-analyzers.generated.js +11 -8
- 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 +25 -1
- package/dist/public/operations/catalog.d.ts +31 -1
- package/dist/public/operations/catalog.d.ts.map +1 -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 +2 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/mutation-schemas.d.ts +30 -0
- 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/upsert.d.ts +30 -0
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- 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 +9 -1
- package/dist/schemas/entity.schema.json +92 -0
- 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/impact-knowledge.d.ts.map +1 -1
- package/dist/traceability/impact-knowledge.js +2 -0
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +11 -1
- 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/rule-registry.generated.d.ts +5 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +6 -0
- package/package.json +3 -3
- package/schema/entities.pl +12 -0
- 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 +2 -1
- package/src/public/operations/specs/mutation-schemas.ts +34 -0
- 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 +9 -1
- package/src/schemas/entity.schema.json +92 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CA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MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,MAAM,GACd,WAAW,GACX,QAAQ,GACR,UAAU,GACV,GAAG,GACH,IAAI,GACJ,KAAK,GACL,MAAM,GACN,IAAI,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Name why this command failed with a fixed identifier (an error code, a
|
|
4
|
+
* failing doctor check), for the event recorded at exit. The first note wins.
|
|
5
|
+
*/
|
|
6
|
+
export declare function noteCliErrorCategory(category: string | undefined): void;
|
|
7
|
+
/** The error code of a failed JSON result printed by a command, if any. */
|
|
8
|
+
export declare function noteCliResultError(stdout: string | undefined): void;
|
|
2
9
|
/** Remember which registered command ran, for the event recorded at exit. */
|
|
3
10
|
export declare function trackCommandPath(program: Command): () => string | undefined;
|
|
4
11
|
export declare function finishCliTelemetry(input: {
|
|
@@ -6,6 +13,8 @@ export declare function finishCliTelemetry(input: {
|
|
|
6
13
|
readonly packageVersion: string;
|
|
7
14
|
readonly startedAt: Date;
|
|
8
15
|
readonly exitCode: number;
|
|
16
|
+
/** The error the command threw, when it failed by throwing. */
|
|
17
|
+
readonly error?: unknown;
|
|
9
18
|
readonly env?: NodeJS.ProcessEnv;
|
|
10
19
|
}): Promise<void>;
|
|
11
20
|
//# sourceMappingURL=usage-telemetry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage-telemetry.d.ts","sourceRoot":"","sources":["../src/usage-telemetry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"usage-telemetry.d.ts","sourceRoot":"","sources":["../src/usage-telemetry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBzC;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAIvE;AAGD,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAanE;AAgBD,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,MAAM,GAAG,SAAS,CAc3E;AAGD,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAClC,GAAG,OAAO,CAAC,IAAI,CAAC,CAkChB"}
|
package/dist/usage-telemetry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { flushTelemetry, recordOperationTelemetry, takeTelemetryNotice, } from "kibi-agent-core/usage-telemetry";
|
|
1
|
+
import { detectTelemetryHost, flushTelemetry, recordOperationTelemetry, takeTelemetryNotice, } from "kibi-agent-core/usage-telemetry";
|
|
2
2
|
/**
|
|
3
3
|
* Anonymous usage telemetry for the CLI: one summary event per command,
|
|
4
4
|
* named by its registered command path (`sync`, `storage compact`, `search`)
|
|
@@ -7,6 +7,45 @@ import { flushTelemetry, recordOperationTelemetry, takeTelemetryNotice, } from "
|
|
|
7
7
|
*/
|
|
8
8
|
/** Commands that manage telemetry itself are not recorded. */
|
|
9
9
|
const UNRECORDED_COMMANDS = new Set(["telemetry"]);
|
|
10
|
+
let notedErrorCategory;
|
|
11
|
+
// implements REQ-kibi-anonymous-usage-telemetry
|
|
12
|
+
/**
|
|
13
|
+
* Name why this command failed with a fixed identifier (an error code, a
|
|
14
|
+
* failing doctor check), for the event recorded at exit. The first note wins.
|
|
15
|
+
*/
|
|
16
|
+
export function noteCliErrorCategory(category) {
|
|
17
|
+
if (category && notedErrorCategory === undefined) {
|
|
18
|
+
notedErrorCategory = category;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
// implements REQ-kibi-anonymous-usage-telemetry
|
|
22
|
+
/** The error code of a failed JSON result printed by a command, if any. */
|
|
23
|
+
export function noteCliResultError(stdout) {
|
|
24
|
+
if (!stdout)
|
|
25
|
+
return;
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(stdout);
|
|
28
|
+
if (parsed.status === "error" && typeof parsed.error?.code === "string") {
|
|
29
|
+
noteCliErrorCategory(parsed.error.code);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
// Not a JSON result.
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** A thrown error's code or class name; never its message. */
|
|
37
|
+
function thrownErrorCategory(error) {
|
|
38
|
+
if (error !== null && typeof error === "object") {
|
|
39
|
+
const code = error.code;
|
|
40
|
+
if (typeof code === "string" && code !== "")
|
|
41
|
+
return code;
|
|
42
|
+
const name = error.name;
|
|
43
|
+
if (typeof name === "string" && name !== "" && name !== "Error") {
|
|
44
|
+
return name;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return "uncaught_error";
|
|
48
|
+
}
|
|
10
49
|
// implements REQ-kibi-anonymous-usage-telemetry
|
|
11
50
|
/** Remember which registered command ran, for the event recorded at exit. */
|
|
12
51
|
export function trackCommandPath(program) {
|
|
@@ -24,6 +63,8 @@ export function trackCommandPath(program) {
|
|
|
24
63
|
export async function finishCliTelemetry(input) {
|
|
25
64
|
const env = input.env ?? process.env;
|
|
26
65
|
const command = input.commandPath;
|
|
66
|
+
const noted = notedErrorCategory;
|
|
67
|
+
notedErrorCategory = undefined;
|
|
27
68
|
if (!command || UNRECORDED_COMMANDS.has(command.split(" ")[0] ?? "")) {
|
|
28
69
|
return;
|
|
29
70
|
}
|
|
@@ -33,15 +74,20 @@ export async function finishCliTelemetry(input) {
|
|
|
33
74
|
recordOperationTelemetry({
|
|
34
75
|
packageName: "kibi-cli",
|
|
35
76
|
packageVersion: input.packageVersion,
|
|
36
|
-
host: env
|
|
37
|
-
|
|
38
|
-
(env.CLAUDECODE === "1" ? "claude-code" : undefined),
|
|
77
|
+
host: detectTelemetryHost(env),
|
|
78
|
+
workspaceRoot: process.cwd(),
|
|
39
79
|
}, {
|
|
40
80
|
interface: "cli",
|
|
41
81
|
operation: command,
|
|
42
82
|
status: input.exitCode === 0 ? "success" : "error",
|
|
43
83
|
durationMs: Date.now() - input.startedAt.getTime(),
|
|
44
84
|
exitCode: input.exitCode,
|
|
85
|
+
errorCategory: input.exitCode === 0
|
|
86
|
+
? undefined
|
|
87
|
+
: (noted ??
|
|
88
|
+
(input.error === undefined
|
|
89
|
+
? undefined
|
|
90
|
+
: thrownErrorCategory(input.error))),
|
|
45
91
|
}, env);
|
|
46
92
|
await flushTelemetry({}, env);
|
|
47
93
|
}
|
|
@@ -68,6 +68,11 @@ export declare const GENERATED_RULES: readonly [{
|
|
|
68
68
|
readonly description: "Advisory: a scenario that expects success assumes nothing, assumes values that contradict each other, assumes a property value no governing requirement constrains comparably (type, unit or operator mismatch, or conflicting requirements), leaves a governing rule's conditions undecided, or conflicts only with constraints whose validity window may not cover it, so its feasibility cannot be decided";
|
|
69
69
|
readonly enforcementClass: "advisory";
|
|
70
70
|
readonly category: "integrity";
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "scenario-outcome-mismatch";
|
|
73
|
+
readonly description: "A scenario that expects rejection or error must assume a value or situation a current requirement forbids: when every assumption is governed by current requirements and they permit all of them together, the knowledge base predicts success and the scenario exercises no failure side";
|
|
74
|
+
readonly enforcementClass: "canonical";
|
|
75
|
+
readonly category: "integrity";
|
|
71
76
|
}, {
|
|
72
77
|
readonly name: "exception-claim-keys";
|
|
73
78
|
readonly description: "An exception requirement's exempts_claims must name claim keys of a requirement it exempts, and requires an exempts link";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-registry.generated.d.ts","sourceRoot":"","sources":["../../src/utils/rule-registry.generated.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"rule-registry.generated.d.ts","sourceRoot":"","sources":["../../src/utils/rule-registry.generated.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0ZlB,CAAC"}
|
|
@@ -92,6 +92,12 @@ export const GENERATED_RULES = [
|
|
|
92
92
|
enforcementClass: "advisory",
|
|
93
93
|
category: "integrity",
|
|
94
94
|
},
|
|
95
|
+
{
|
|
96
|
+
name: "scenario-outcome-mismatch",
|
|
97
|
+
description: "A scenario that expects rejection or error must assume a value or situation a current requirement forbids: when every assumption is governed by current requirements and they permit all of them together, the knowledge base predicts success and the scenario exercises no failure side",
|
|
98
|
+
enforcementClass: "canonical",
|
|
99
|
+
category: "integrity",
|
|
100
|
+
},
|
|
95
101
|
{
|
|
96
102
|
name: "exception-claim-keys",
|
|
97
103
|
description: "An exception requirement's exempts_claims must name claim keys of a requirement it exempts, and requires an exempts link",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.39.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Kibi CLI for knowledge base management",
|
|
6
6
|
"engines": {
|
|
@@ -239,14 +239,14 @@
|
|
|
239
239
|
"fast-glob": "^3.2.12",
|
|
240
240
|
"gray-matter": "^4.0.3",
|
|
241
241
|
"js-yaml": "^4.1.0",
|
|
242
|
-
"kibi-core": "^0.
|
|
242
|
+
"kibi-core": "^0.28.0",
|
|
243
243
|
"kibi-plugin-builtin": "^0.5.3",
|
|
244
244
|
"kibi-plugin-sdk": "^0.5.1",
|
|
245
245
|
"kibi-swipl": "^1.0.1",
|
|
246
246
|
"saxes": "^6.0.0",
|
|
247
247
|
"ignore": "^5.3.0",
|
|
248
248
|
"yaml": "^2.9.1",
|
|
249
|
-
"kibi-agent-core": "^0.
|
|
249
|
+
"kibi-agent-core": "^0.11.0"
|
|
250
250
|
},
|
|
251
251
|
"devDependencies": {
|
|
252
252
|
"@types/node": "latest",
|
package/schema/entities.pl
CHANGED
|
@@ -47,6 +47,10 @@ entity_property(req, proof_exempt_reason, string).
|
|
|
47
47
|
% Only an approved exception makes a success scenario feasible.
|
|
48
48
|
entity_property(req, approved_by, string).
|
|
49
49
|
entity_property(req, approval_ref, string).
|
|
50
|
+
% Why a requirement has no failure side to test (its claims state a
|
|
51
|
+
% capability or output shape), and the human who accepted that.
|
|
52
|
+
entity_property(req, failure_side_waiver, string).
|
|
53
|
+
entity_property(req, failure_side_waiver_approved_by, string).
|
|
50
54
|
% Why the requirement exists, in the words of whoever stated the intent.
|
|
51
55
|
% Explanation only: it is never part of the checked meaning.
|
|
52
56
|
entity_property(req, rationale, string).
|
|
@@ -83,6 +87,12 @@ entity_property(fact, valid_to, datetime).
|
|
|
83
87
|
entity_property(fact, canonical_key, string).
|
|
84
88
|
entity_property(fact, claim_key, string).
|
|
85
89
|
entity_property(fact, claim_text, string).
|
|
90
|
+
% Why a quantifier word in claim_text ranges over nothing, so the claim
|
|
91
|
+
% needs no dimension, and the human who accepted that.
|
|
92
|
+
entity_property(fact, dimension_waiver, string).
|
|
93
|
+
entity_property(fact, dimension_waiver_approved_by, string).
|
|
94
|
+
entity_property(fact, case_waiver, string).
|
|
95
|
+
entity_property(fact, case_waiver_approved_by, string).
|
|
86
96
|
entity_property(fact, predicate_name, string).
|
|
87
97
|
entity_property(fact, predicate_namespace, string).
|
|
88
98
|
entity_property(fact, predicate_arity, integer).
|
|
@@ -149,6 +159,8 @@ optional_property(req, semantic_source_hash).
|
|
|
149
159
|
optional_property(req, semantic_inventory).
|
|
150
160
|
optional_property(req, proof_exempt).
|
|
151
161
|
optional_property(req, proof_exempt_reason).
|
|
162
|
+
optional_property(req, failure_side_waiver).
|
|
163
|
+
optional_property(req, failure_side_waiver_approved_by).
|
|
152
164
|
optional_property(req, approved_by).
|
|
153
165
|
optional_property(req, approval_ref).
|
|
154
166
|
optional_property(req, rationale).
|
|
@@ -110,6 +110,40 @@ const REPAIR_PHASES = {
|
|
|
110
110
|
validationRules: ["must-priority-coverage", "no-dangling-refs"],
|
|
111
111
|
writePolicy: "sequential_upsert",
|
|
112
112
|
},
|
|
113
|
+
dimension_grounding: {
|
|
114
|
+
order: 64,
|
|
115
|
+
objective:
|
|
116
|
+
"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.",
|
|
117
|
+
workflowSteps: [
|
|
118
|
+
"kb_model_requirement",
|
|
119
|
+
"kb_validate_upsert",
|
|
120
|
+
"kb_upsert",
|
|
121
|
+
"kb_check",
|
|
122
|
+
],
|
|
123
|
+
validationRules: ["no-dangling-refs"],
|
|
124
|
+
writePolicy: "sequential_upsert",
|
|
125
|
+
},
|
|
126
|
+
case_scenarios: {
|
|
127
|
+
order: 66,
|
|
128
|
+
objective:
|
|
129
|
+
"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.",
|
|
130
|
+
workflowSteps: [
|
|
131
|
+
"kb_coverage",
|
|
132
|
+
"kb_validate_upsert",
|
|
133
|
+
"kb_upsert",
|
|
134
|
+
"kb_check",
|
|
135
|
+
],
|
|
136
|
+
validationRules: ["scenario-outcome-mismatch", "no-dangling-refs"],
|
|
137
|
+
writePolicy: "sequential_upsert",
|
|
138
|
+
},
|
|
139
|
+
negative_scenarios: {
|
|
140
|
+
order: 65,
|
|
141
|
+
objective:
|
|
142
|
+
"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.",
|
|
143
|
+
workflowSteps: ["kb_query", "kb_validate_upsert", "kb_upsert", "kb_check"],
|
|
144
|
+
validationRules: ["scenario-outcome-mismatch", "no-dangling-refs"],
|
|
145
|
+
writePolicy: "sequential_upsert",
|
|
146
|
+
},
|
|
113
147
|
scenario_tests: {
|
|
114
148
|
order: 70,
|
|
115
149
|
objective:
|
|
@@ -206,6 +240,9 @@ const GAP_PHASE: Readonly<Record<string, RepairPhase>> = {
|
|
|
206
240
|
missing_scenario: "scenario_endpoints",
|
|
207
241
|
infeasible_scenario: "scenario_endpoints",
|
|
208
242
|
unknown_scenario_feasibility: "scenario_endpoints",
|
|
243
|
+
dimension_unrepresented: "dimension_grounding",
|
|
244
|
+
happy_path_only: "negative_scenarios",
|
|
245
|
+
uncovered_case: "case_scenarios",
|
|
209
246
|
missing_scenario_test: "scenario_tests",
|
|
210
247
|
proof_snapshot_unavailable: "snapshot_runtime",
|
|
211
248
|
missing_passing_e2e: "proof_evidence",
|
|
@@ -235,6 +272,9 @@ const GAP_STAGE: Readonly<Record<string, string>> = {
|
|
|
235
272
|
missing_scenario: "scenarios",
|
|
236
273
|
infeasible_scenario: "scenarios",
|
|
237
274
|
unknown_scenario_feasibility: "scenarios",
|
|
275
|
+
dimension_unrepresented: "dimension",
|
|
276
|
+
happy_path_only: "negative_path",
|
|
277
|
+
uncovered_case: "cases",
|
|
238
278
|
missing_scenario_test: "scenario_tests",
|
|
239
279
|
missing_passing_e2e: "passing_e2e",
|
|
240
280
|
missing_proof_receipt: "passing_e2e",
|
|
@@ -255,6 +295,9 @@ const PROOF_STAGE_KEY: Readonly<Record<string, string>> = {
|
|
|
255
295
|
contradictions: "contradictions",
|
|
256
296
|
scenarios: "scenarios",
|
|
257
297
|
scenario_tests: "scenarioTests",
|
|
298
|
+
negative_path: "negativePath",
|
|
299
|
+
dimension: "dimension",
|
|
300
|
+
cases: "cases",
|
|
258
301
|
passing_e2e: "passingE2e",
|
|
259
302
|
executable_symbols: "executableSymbols",
|
|
260
303
|
production_symbols: "productionSymbols",
|
|
@@ -268,6 +311,34 @@ export type RepairPlanRepair = {
|
|
|
268
311
|
readonly proofStage: string;
|
|
269
312
|
readonly action: string;
|
|
270
313
|
readonly evidence: Readonly<Record<string, unknown>>;
|
|
314
|
+
/** Draft scenarios for an uncovered_case repair, one per uncovered case. */
|
|
315
|
+
readonly caseSkeletons?: readonly CaseSkeleton[];
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
type SkeletonEntity = {
|
|
319
|
+
readonly type: "fact" | "scenario";
|
|
320
|
+
readonly id: string;
|
|
321
|
+
readonly properties: Readonly<Record<string, unknown>>;
|
|
322
|
+
readonly relationships: readonly {
|
|
323
|
+
readonly type: string;
|
|
324
|
+
readonly from: string;
|
|
325
|
+
readonly to: string;
|
|
326
|
+
}[];
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
// implements REQ-kibi-case-coverage
|
|
330
|
+
/**
|
|
331
|
+
* An upsert-ready draft scenario for one uncovered case: the fact it assumes
|
|
332
|
+
* (the case's value class) and the scenario that expects the predicted
|
|
333
|
+
* outcome. Drafts never count as coverage, so writing one changes no gap
|
|
334
|
+
* until it is verified and made active. placeholder is true when the value
|
|
335
|
+
* must be chosen by the author (a value outside a set).
|
|
336
|
+
*/
|
|
337
|
+
export type CaseSkeleton = {
|
|
338
|
+
readonly caseId: string;
|
|
339
|
+
readonly constraint: string;
|
|
340
|
+
readonly placeholder: boolean;
|
|
341
|
+
readonly entities: readonly [SkeletonEntity, SkeletonEntity];
|
|
271
342
|
};
|
|
272
343
|
|
|
273
344
|
export type RepairPlanBatch = {
|
|
@@ -379,6 +450,82 @@ function stageEvidence(
|
|
|
379
450
|
return isRecord(stable) ? stable : {};
|
|
380
451
|
}
|
|
381
452
|
|
|
453
|
+
const VALUE_FIELD: Readonly<Record<string, string>> = {
|
|
454
|
+
int: "value_int",
|
|
455
|
+
number: "value_number",
|
|
456
|
+
set: "value_set",
|
|
457
|
+
string: "value_string",
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
function caseSkeleton(
|
|
461
|
+
requirementId: string,
|
|
462
|
+
row: Readonly<Record<string, unknown>>,
|
|
463
|
+
): CaseSkeleton | undefined {
|
|
464
|
+
const caseId = typeof row.caseId === "string" ? row.caseId : undefined;
|
|
465
|
+
const assumption = isRecord(row.assumption) ? row.assumption : undefined;
|
|
466
|
+
const valueType =
|
|
467
|
+
typeof assumption?.value_type === "string" ? assumption.value_type : "";
|
|
468
|
+
const valueField = VALUE_FIELD[valueType];
|
|
469
|
+
if (caseId === undefined || assumption === undefined || !valueField)
|
|
470
|
+
return undefined;
|
|
471
|
+
const constraint = typeof row.constraint === "string" ? row.constraint : "";
|
|
472
|
+
const property =
|
|
473
|
+
typeof assumption.property_key === "string" ? assumption.property_key : "";
|
|
474
|
+
const expects = row.predicted === "rejection" ? "rejection" : "success";
|
|
475
|
+
const placeholder = JSON.stringify(assumption.value).includes("<");
|
|
476
|
+
const suffix = caseId.replace(/^CASE-/, "");
|
|
477
|
+
const factId = `FACT-CASE-${suffix}`;
|
|
478
|
+
const scenarioId = `SCEN-CASE-${suffix}`;
|
|
479
|
+
return {
|
|
480
|
+
caseId,
|
|
481
|
+
constraint,
|
|
482
|
+
placeholder,
|
|
483
|
+
entities: [
|
|
484
|
+
{
|
|
485
|
+
type: "fact",
|
|
486
|
+
id: factId,
|
|
487
|
+
properties: {
|
|
488
|
+
title: `${property} ${constraint}`,
|
|
489
|
+
status: "active",
|
|
490
|
+
fact_kind: "property_value",
|
|
491
|
+
subject_key: assumption.subject_key,
|
|
492
|
+
property_key: property,
|
|
493
|
+
operator: assumption.operator,
|
|
494
|
+
value_type: valueType,
|
|
495
|
+
[valueField]: assumption.value,
|
|
496
|
+
},
|
|
497
|
+
relationships: [],
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
type: "scenario",
|
|
501
|
+
id: scenarioId,
|
|
502
|
+
properties: {
|
|
503
|
+
title: `${property} ${constraint} is ${expects === "rejection" ? "refused" : "accepted"}`,
|
|
504
|
+
status: "draft",
|
|
505
|
+
expects,
|
|
506
|
+
},
|
|
507
|
+
relationships: [
|
|
508
|
+
{ type: "assumes", from: scenarioId, to: factId },
|
|
509
|
+
{ type: "specified_by", from: requirementId, to: scenarioId },
|
|
510
|
+
],
|
|
511
|
+
},
|
|
512
|
+
],
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
function caseSkeletons(
|
|
517
|
+
requirementId: string,
|
|
518
|
+
evidence: Readonly<Record<string, unknown>>,
|
|
519
|
+
): CaseSkeleton[] {
|
|
520
|
+
const rows = Array.isArray(evidence.uncoveredCases)
|
|
521
|
+
? evidence.uncoveredCases.filter(isRecord)
|
|
522
|
+
: [];
|
|
523
|
+
return rows.flatMap((row) => {
|
|
524
|
+
const skeleton = caseSkeleton(requirementId, row);
|
|
525
|
+
return skeleton === undefined ? [] : [skeleton];
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
|
|
382
529
|
function batchId(requirementId: string, phase: RepairPhase): string {
|
|
383
530
|
const order = String(REPAIR_PHASES[phase].order).padStart(3, "0");
|
|
384
531
|
const safeRequirementId = requirementId.replace(/[^A-Za-z0-9_-]/g, "-");
|
|
@@ -408,6 +555,7 @@ function buildRequirementBatches(
|
|
|
408
555
|
typeof sourceRepair?.stage === "string"
|
|
409
556
|
? sourceRepair.stage
|
|
410
557
|
: (GAP_STAGE[gap] ?? "manual_review");
|
|
558
|
+
const evidence = stageEvidence(row, proofStage);
|
|
411
559
|
const repair: RepairPlanRepair = {
|
|
412
560
|
requirementId,
|
|
413
561
|
gap,
|
|
@@ -417,7 +565,10 @@ function buildRequirementBatches(
|
|
|
417
565
|
),
|
|
418
566
|
proofStage,
|
|
419
567
|
action: actionForRepair(sourceRepair, phase),
|
|
420
|
-
evidence
|
|
568
|
+
evidence,
|
|
569
|
+
...(gap === "uncovered_case"
|
|
570
|
+
? { caseSkeletons: caseSkeletons(requirementId, evidence) }
|
|
571
|
+
: {}),
|
|
421
572
|
};
|
|
422
573
|
const phaseRepairs = byPhase.get(phase) ?? [];
|
|
423
574
|
phaseRepairs.push(repair);
|
|
@@ -728,7 +728,7 @@ export function schema6ReviewActionsFromCheck(
|
|
|
728
728
|
safety: "review",
|
|
729
729
|
invocation: {
|
|
730
730
|
kind: "review",
|
|
731
|
-
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.`,
|
|
731
|
+
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.`,
|
|
732
732
|
},
|
|
733
733
|
affectedEntityIds: listed,
|
|
734
734
|
affectedFiles: [...new Set(agentRequirementFiles)].sort(),
|
|
@@ -24,6 +24,7 @@ export const SELECTABLE_RULE_NAMES: readonly string[] = [
|
|
|
24
24
|
"superseded-requirement-open",
|
|
25
25
|
"scenario-feasibility",
|
|
26
26
|
"scenario-feasibility-unknown",
|
|
27
|
+
"scenario-outcome-mismatch",
|
|
27
28
|
"exception-claim-keys",
|
|
28
29
|
"numeric-string-value",
|
|
29
30
|
"rule-key-arguments-missing",
|
|
@@ -72,4 +73,4 @@ export const SELECTABLE_RULE_NAMES: readonly string[] = [
|
|
|
72
73
|
// implements REQ-006
|
|
73
74
|
/** Comma-separated "Allowed:" fragment for the kb_check rules description. */
|
|
74
75
|
export const SELECTABLE_RULES_ALLOWED =
|
|
75
|
-
"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";
|
|
76
|
+
"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, 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";
|
|
@@ -126,6 +126,18 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
126
126
|
description:
|
|
127
127
|
"Requirement-only. Optional reference to the exception's approval decision record.",
|
|
128
128
|
},
|
|
129
|
+
failure_side_waiver: {
|
|
130
|
+
type: "string",
|
|
131
|
+
minLength: 1,
|
|
132
|
+
description:
|
|
133
|
+
"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.",
|
|
134
|
+
},
|
|
135
|
+
failure_side_waiver_approved_by: {
|
|
136
|
+
type: "string",
|
|
137
|
+
minLength: 1,
|
|
138
|
+
description:
|
|
139
|
+
"Requirement-only. The person who accepted failure_side_waiver.",
|
|
140
|
+
},
|
|
129
141
|
firmness: {
|
|
130
142
|
type: "string",
|
|
131
143
|
enum: ["firm", "default", "exploratory"],
|
|
@@ -323,6 +335,28 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
323
335
|
description:
|
|
324
336
|
"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.",
|
|
325
337
|
},
|
|
338
|
+
dimension_waiver: {
|
|
339
|
+
type: "string",
|
|
340
|
+
minLength: 1,
|
|
341
|
+
description:
|
|
342
|
+
"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.",
|
|
343
|
+
},
|
|
344
|
+
dimension_waiver_approved_by: {
|
|
345
|
+
type: "string",
|
|
346
|
+
minLength: 1,
|
|
347
|
+
description: "Fact-only. The person who accepted dimension_waiver.",
|
|
348
|
+
},
|
|
349
|
+
case_waiver: {
|
|
350
|
+
type: "string",
|
|
351
|
+
minLength: 1,
|
|
352
|
+
description:
|
|
353
|
+
"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.",
|
|
354
|
+
},
|
|
355
|
+
case_waiver_approved_by: {
|
|
356
|
+
type: "string",
|
|
357
|
+
minLength: 1,
|
|
358
|
+
description: "Fact-only. The person who accepted case_waiver.",
|
|
359
|
+
},
|
|
326
360
|
predicate_name: {
|
|
327
361
|
type: "string",
|
|
328
362
|
description:
|
|
@@ -411,6 +411,20 @@ const entitySchema: Record<string, unknown> = {
|
|
|
411
411
|
description:
|
|
412
412
|
"Requirement-only. Optional reference to the approval decision record (ticket, ADR or review link) for an exception requirement.",
|
|
413
413
|
},
|
|
414
|
+
failure_side_waiver: {
|
|
415
|
+
type: "string",
|
|
416
|
+
minLength: 1,
|
|
417
|
+
pattern: "\\S",
|
|
418
|
+
description:
|
|
419
|
+
"Requirement-only. Why the requirement has no failure side to test: its claims state a capability or an output shape, so there is no input or attempt for Kibi to refuse. Waives the happy_path_only gap once failure_side_waiver_approved_by is set.",
|
|
420
|
+
},
|
|
421
|
+
failure_side_waiver_approved_by: {
|
|
422
|
+
type: "string",
|
|
423
|
+
minLength: 1,
|
|
424
|
+
pattern: "\\S",
|
|
425
|
+
description:
|
|
426
|
+
"Requirement-only. The person who accepted failure_side_waiver. Without it the waiver is reported as awaiting approval and the gap stays open.",
|
|
427
|
+
},
|
|
414
428
|
rationale: {
|
|
415
429
|
type: "string",
|
|
416
430
|
minLength: 1,
|
|
@@ -497,6 +511,23 @@ const entitySchema: Record<string, unknown> = {
|
|
|
497
511
|
semantic_key: { type: "string" },
|
|
498
512
|
payload_hash: { type: "string" },
|
|
499
513
|
reason: { type: "string" },
|
|
514
|
+
// The advisor's hint for a quantified clause, kept so its receipt
|
|
515
|
+
// propositions can be copied into the inventory unchanged.
|
|
516
|
+
dimension: {
|
|
517
|
+
type: "object",
|
|
518
|
+
required: ["quantifier", "rewrites"],
|
|
519
|
+
properties: {
|
|
520
|
+
quantifier: { type: "string", minLength: 1 },
|
|
521
|
+
rewrites: {
|
|
522
|
+
type: "array",
|
|
523
|
+
items: {
|
|
524
|
+
type: "string",
|
|
525
|
+
enum: ["bound", "rule", "count", "set"],
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
additionalProperties: false,
|
|
530
|
+
},
|
|
500
531
|
},
|
|
501
532
|
additionalProperties: false,
|
|
502
533
|
},
|
|
@@ -606,6 +637,34 @@ const entitySchema: Record<string, unknown> = {
|
|
|
606
637
|
canonical_key: { type: "string" },
|
|
607
638
|
claim_key: { type: "string", pattern: "^CLAIM-[A-F0-9]{16}$" },
|
|
608
639
|
claim_text: { type: "string" },
|
|
640
|
+
dimension_waiver: {
|
|
641
|
+
type: "string",
|
|
642
|
+
minLength: 1,
|
|
643
|
+
pattern: "\\S",
|
|
644
|
+
description:
|
|
645
|
+
"Fact-only. Why the quantifier word in claim_text (each, every, all, or a cardinality bound) ranges over nothing, so the claim needs no count, set or rule. Waives dimension_unrepresented for the claim once dimension_waiver_approved_by is set.",
|
|
646
|
+
},
|
|
647
|
+
dimension_waiver_approved_by: {
|
|
648
|
+
type: "string",
|
|
649
|
+
minLength: 1,
|
|
650
|
+
pattern: "\\S",
|
|
651
|
+
description:
|
|
652
|
+
"Fact-only. The person who accepted dimension_waiver. Without it the waiver is reported as awaiting approval and the gap stays open.",
|
|
653
|
+
},
|
|
654
|
+
case_waiver: {
|
|
655
|
+
type: "string",
|
|
656
|
+
minLength: 1,
|
|
657
|
+
pattern: "\\S",
|
|
658
|
+
description:
|
|
659
|
+
"Fact-only. Why the edge cases Kibi derives from this fact (the value past a bound, a value outside a set) are covered some other way or cannot occur. Waives uncovered_case for the fact once case_waiver_approved_by is set.",
|
|
660
|
+
},
|
|
661
|
+
case_waiver_approved_by: {
|
|
662
|
+
type: "string",
|
|
663
|
+
minLength: 1,
|
|
664
|
+
pattern: "\\S",
|
|
665
|
+
description:
|
|
666
|
+
"Fact-only. The person who accepted case_waiver. Without it the waiver is reported as awaiting approval and the gap stays open.",
|
|
667
|
+
},
|
|
609
668
|
predicate_name: { type: "string" },
|
|
610
669
|
predicate_namespace: { type: "string" },
|
|
611
670
|
predicate_arity: { type: "integer", minimum: 1 },
|
|
@@ -699,6 +758,10 @@ const entitySchema: Record<string, unknown> = {
|
|
|
699
758
|
{ required: ["canonical_key"] },
|
|
700
759
|
{ required: ["claim_key"] },
|
|
701
760
|
{ required: ["claim_text"] },
|
|
761
|
+
{ required: ["dimension_waiver"] },
|
|
762
|
+
{ required: ["dimension_waiver_approved_by"] },
|
|
763
|
+
{ required: ["case_waiver"] },
|
|
764
|
+
{ required: ["case_waiver_approved_by"] },
|
|
702
765
|
{ required: ["predicate_name"] },
|
|
703
766
|
{ required: ["predicate_namespace"] },
|
|
704
767
|
{ required: ["predicate_arity"] },
|
|
@@ -760,6 +823,8 @@ const entitySchema: Record<string, unknown> = {
|
|
|
760
823
|
{ required: ["proof_exempt_reason"] },
|
|
761
824
|
{ required: ["approved_by"] },
|
|
762
825
|
{ required: ["approval_ref"] },
|
|
826
|
+
{ required: ["failure_side_waiver"] },
|
|
827
|
+
{ required: ["failure_side_waiver_approved_by"] },
|
|
763
828
|
{ required: ["rationale"] },
|
|
764
829
|
{ required: ["exempts_claims"] },
|
|
765
830
|
{ required: ["required_evidence"] },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
id: kibi-commit-review
|
|
3
3
|
name: kibi-commit-review
|
|
4
4
|
description: "Use when kibi check --staged or the Kibi pre-commit hook blocks a commit (kibi_impact_evidence_missing, symbols_manifest_stale, symbol_granularity_violation, symbol-coverage, kibi check-generated drift, Staged impact review failed), or when preparing a commit or pull-request impact review. Covers reading the per-file Detail lines, authoring .kb/symbols.yaml symbol entries through kb_upsert, staging the tracked Kibi evidence with git add (symbol coordinates are derived and never staged), kb_prepare_impact_review for a staged or diff scope, the kibi signoff requirements summary to show before a commit, and how merge commits and migration renames are judged."
|
|
5
|
-
version: 1.
|
|
5
|
+
version: 1.4.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -91,7 +91,11 @@ apps); never attach the `.html` as a file, which chat apps show as raw source;
|
|
|
91
91
|
past 15 requirements the Markdown stops and only the page lists them all.
|
|
92
92
|
Host details: `kibi-decisions`, `resources/signoff-views.md`. `--no-proof` skips the proof lookup, which reads coverage and is slow
|
|
93
93
|
on a large knowledge base. The summary is not an approval: never set
|
|
94
|
-
`approved_by` or `origin.ref` from it.
|
|
94
|
+
`approved_by` or `origin.ref` from it. Show it before you open or merge the
|
|
95
|
+
pull request. When the person answers, record their answer in the same
|
|
96
|
+
change (their name in `approved_by`, their words in `origin.ref` or
|
|
97
|
+
`approval_ref`) and push it to the same pull request; never move a signoff,
|
|
98
|
+
firmness or waiver approval into a separate pull request.
|
|
95
99
|
|
|
96
100
|
## Impact reviews
|
|
97
101
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
id: kibi-decisions
|
|
3
3
|
name: kibi-decisions
|
|
4
4
|
description: "Use when the person states a rule or decision (must, never, always, from now on, we decided), when a Kibi hook asks to confirm or warns about an edit to code that implements a firm requirement, when the Stop hook says source files changed but nothing was recorded, when kb_check quotes requirement_statement_unverified, or when a request conflicts with a recorded requirement or ADR. Covers reading firmness and origin, recording a person's rule as firm with origin.ref, superseding with a Why this changed section, the kb_compile_intent unresolved/reviewCandidates/conflictReviews loop, asking before overriding a firm rule, and putting decisions to the person as one numbered kibi signoff --questions view."
|
|
5
|
-
version: 1.
|
|
5
|
+
version: 1.5.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -115,7 +115,12 @@ again until none is open, then record each rule with their words in
|
|
|
115
115
|
`origin.ref`. Fields and outputs: `resources/signoff-views.md`.
|
|
116
116
|
|
|
117
117
|
Never invent words for `origin.ref`, never set `approved_by` yourself, and
|
|
118
|
-
mark your own picks `default` and guesses `exploratory`.
|
|
118
|
+
mark your own picks `default` and guesses `exploratory`. Once the person has
|
|
119
|
+
answered, recording their answer (their name in `approved_by` or a
|
|
120
|
+
`*_waiver_approved_by` field, their words in `origin.ref` or `approval_ref`)
|
|
121
|
+
is yours to do: put it on the branch of the change it approves and push it to
|
|
122
|
+
that pull request, never to a separate one. Ask before you open or merge the
|
|
123
|
+
pull request, so the answer lands in it. Payload shapes,
|
|
119
124
|
refusal messages and the `kb_compile_intent` review loop are in
|
|
120
125
|
`resources/decision-records.md`.
|
|
121
126
|
|