kibi-cli 2.29.0 → 2.30.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-operation-metadata.d.ts +8 -8
- package/dist/cli-operation-metadata.js +8 -8
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +12 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +4 -0
- package/dist/commands/signoff.d.ts +37 -0
- package/dist/commands/signoff.d.ts.map +1 -0
- package/dist/commands/signoff.js +152 -0
- package/dist/operations/modeling/predicate-applicability.d.ts +5 -1
- package/dist/operations/modeling/predicate-applicability.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applicability.js +35 -2
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +3 -1
- package/dist/operations/mutation/contradictions.d.ts +7 -5
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +8 -6
- package/dist/operations/mutation/source-authoring.d.ts +15 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +19 -7
- package/dist/operations/mutation/types.d.ts +5 -0
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +14 -0
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +42 -36
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +61 -37
- package/dist/public/operations/catalog.d.ts +29 -8
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +2 -0
- package/dist/public/operations/specs/bootstrap.d.ts +1 -1
- package/dist/public/operations/specs/bootstrap.js +1 -1
- package/dist/public/operations/specs/composite.d.ts +1 -1
- package/dist/public/operations/specs/composite.js +1 -1
- package/dist/public/operations/specs/discovery.d.ts +1 -1
- package/dist/public/operations/specs/discovery.js +1 -1
- package/dist/public/operations/specs/impact-review-preparation.d.ts +2 -1
- package/dist/public/operations/specs/impact-review-preparation.d.ts.map +1 -1
- package/dist/public/operations/specs/impact-review-preparation.js +2 -1
- package/dist/public/operations/specs/planning.d.ts +1 -1
- package/dist/public/operations/specs/planning.js +1 -1
- package/dist/public/operations/specs/reporting.d.ts +23 -3
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +97 -21
- package/dist/public/skills/kibi-commit-review/SKILL.md +125 -0
- package/dist/public/skills/kibi-commit-review/resources/staged-gate.md +98 -0
- package/dist/public/skills/kibi-decisions/SKILL.md +130 -0
- package/dist/public/skills/kibi-decisions/resources/decision-records.md +142 -0
- package/dist/public/skills/kibi-decisions/resources/signoff-views.md +66 -0
- package/dist/public/skills/kibi-freshness/SKILL.md +2 -0
- package/dist/public/skills/kibi-traceability/SKILL.md +4 -0
- package/dist/public/skills/kibi-usage/SKILL.md +20 -15
- package/dist/signoff/collect.d.ts +39 -0
- package/dist/signoff/collect.d.ts.map +1 -0
- package/dist/signoff/collect.js +398 -0
- package/dist/signoff/html.d.ts +4 -0
- package/dist/signoff/html.d.ts.map +1 -0
- package/dist/signoff/html.js +210 -0
- package/dist/signoff/markdown.d.ts +20 -0
- package/dist/signoff/markdown.d.ts.map +1 -0
- package/dist/signoff/markdown.js +203 -0
- package/dist/signoff/model.d.ts +134 -0
- package/dist/signoff/model.d.ts.map +1 -0
- package/dist/signoff/model.js +138 -0
- package/package.json +2 -2
- package/src/public/operations/contracts.ts +2 -0
- package/src/public/operations/specs/bootstrap.ts +1 -1
- package/src/public/operations/specs/composite.ts +1 -1
- package/src/public/operations/specs/discovery.ts +1 -1
- package/src/public/operations/specs/impact-review-preparation.ts +3 -1
- package/src/public/operations/specs/planning.ts +1 -1
- package/src/public/operations/specs/reporting.ts +109 -21
- package/src/public/skills/kibi-commit-review/SKILL.md +125 -0
- package/src/public/skills/kibi-commit-review/resources/staged-gate.md +98 -0
- package/src/public/skills/kibi-decisions/SKILL.md +130 -0
- package/src/public/skills/kibi-decisions/resources/decision-records.md +142 -0
- package/src/public/skills/kibi-decisions/resources/signoff-views.md +66 -0
- package/src/public/skills/kibi-freshness/SKILL.md +2 -0
- package/src/public/skills/kibi-traceability/SKILL.md +4 -0
- package/src/public/skills/kibi-usage/SKILL.md +20 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/public/operations/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,oEAAoE;AACpE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAsZpE;;uEAEuE;AACvE,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,mBAAmB,GAC1B,mBAAmB,CAMrB;
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../src/public/operations/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,oEAAoE;AACpE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAsZpE;;uEAEuE;AACvE,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,mBAAmB,GAC1B,mBAAmB,CAMrB;AAuaD,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAa3C,CAAC;AAmDF,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EAClD,YAAY,EAAE,MAAM,GACnB,IAAI,CAIN;AAED,wBAAgB,eAAe,CAC7B,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,SAAS,eAAe,EAAE,GAClC,SAAS,0BAA0B,EAAE,CAoBvC"}
|
|
@@ -538,6 +538,7 @@ const BASE_DATA_SCHEMAS = {
|
|
|
538
538
|
warnings: valueArray,
|
|
539
539
|
semanticAdvisor: nullableJsonSchema(recordValue),
|
|
540
540
|
normalizedPreview: nullableJsonSchema(recordValue),
|
|
541
|
+
errorCode: stringValue,
|
|
541
542
|
stagedFacts: stringArray,
|
|
542
543
|
whatIf: recordValue,
|
|
543
544
|
}),
|
|
@@ -566,6 +567,7 @@ const BASE_DATA_SCHEMAS = {
|
|
|
566
567
|
warnings: valueArray,
|
|
567
568
|
semanticAdvisor: nullableJsonSchema(recordValue),
|
|
568
569
|
normalizedPreview: nullableJsonSchema(recordValue),
|
|
570
|
+
errorCode: stringValue,
|
|
569
571
|
stagedFacts: stringArray,
|
|
570
572
|
whatIf: recordValue,
|
|
571
573
|
dryRun: { const: true },
|
|
@@ -4,7 +4,7 @@ export { executePlanBootstrap } from "../../../operations/bootstrap/generate.js"
|
|
|
4
4
|
export declare const planBootstrapSpec: {
|
|
5
5
|
readonly name: "kb_plan_bootstrap";
|
|
6
6
|
readonly cliName: "plan-bootstrap";
|
|
7
|
-
readonly description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Read-only analysis of the repository plus any declared knowledge sources and cited intent claims returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.";
|
|
7
|
+
readonly description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Use it only to onboard a repository whose KB is empty or incomplete (the kibi-bootstrap skill drives it); for a change in an onboarded project use kb_compile_intent. Read-only analysis of the repository plus any declared knowledge sources and cited intent claims returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.";
|
|
8
8
|
readonly businessInputSchema: {
|
|
9
9
|
readonly type: "object";
|
|
10
10
|
readonly properties: {
|
|
@@ -5,7 +5,7 @@ export { executePlanBootstrap } from "../../../operations/bootstrap/generate.js"
|
|
|
5
5
|
export const planBootstrapSpec = {
|
|
6
6
|
name: "kb_plan_bootstrap",
|
|
7
7
|
cliName: "plan-bootstrap",
|
|
8
|
-
description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Read-only analysis of the repository plus any declared knowledge sources and cited intent claims returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.",
|
|
8
|
+
description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Use it only to onboard a repository whose KB is empty or incomplete (the kibi-bootstrap skill drives it); for a change in an onboarded project use kb_compile_intent. Read-only analysis of the repository plus any declared knowledge sources and cited intent claims returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.",
|
|
9
9
|
businessInputSchema: {
|
|
10
10
|
type: "object",
|
|
11
11
|
properties: {
|
|
@@ -344,7 +344,7 @@ export declare const skillsSpec: {
|
|
|
344
344
|
export declare const modelSpec: {
|
|
345
345
|
readonly name: "kb_model";
|
|
346
346
|
readonly cliName: "model";
|
|
347
|
-
readonly description: "Turn requirement prose into checkable structure without writing the KB. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.";
|
|
347
|
+
readonly description: "Turn requirement prose into checkable structure without writing the KB. Use it for one requirement's prose; to plan a whole change request use kb_compile_intent. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.";
|
|
348
348
|
readonly businessInputSchema: {
|
|
349
349
|
readonly type: "object";
|
|
350
350
|
readonly required: readonly ["mode", "text"];
|
|
@@ -152,7 +152,7 @@ export const skillsSpec = {
|
|
|
152
152
|
export const modelSpec = {
|
|
153
153
|
name: "kb_model",
|
|
154
154
|
cliName: "model",
|
|
155
|
-
description: "Turn requirement prose into checkable structure without writing the KB. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.",
|
|
155
|
+
description: "Turn requirement prose into checkable structure without writing the KB. Use it for one requirement's prose; to plan a whole change request use kb_compile_intent. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.",
|
|
156
156
|
businessInputSchema: {
|
|
157
157
|
type: "object",
|
|
158
158
|
required: ["mode", "text"],
|
|
@@ -233,7 +233,7 @@ export declare const searchSpec: {
|
|
|
233
233
|
export declare const statusSpec: {
|
|
234
234
|
readonly name: "kb_status";
|
|
235
235
|
readonly cliName: "status";
|
|
236
|
-
readonly description: "Report current branch, KB snapshot, freshness metadata, schema status, and a typed kibi.migration-plan.v2 action graph. Read-only status inspection with no mutation side effects; damaged stores are diagnosed without starting the engine.";
|
|
236
|
+
readonly description: "Report current branch, KB snapshot, freshness metadata, schema status, and a typed kibi.migration-plan.v2 action graph. Call it first to orient on a branch or after a failed call; use kb_check for validation findings and kb_coverage for proof status. Read-only status inspection with no mutation side effects; damaged stores are diagnosed without starting the engine.";
|
|
237
237
|
readonly businessInputSchema: {
|
|
238
238
|
readonly type: "object";
|
|
239
239
|
readonly properties: {};
|
|
@@ -212,7 +212,7 @@ export const searchSpec = {
|
|
|
212
212
|
export const statusSpec = {
|
|
213
213
|
name: "kb_status",
|
|
214
214
|
cliName: "status",
|
|
215
|
-
description: "Report current branch, KB snapshot, freshness metadata, schema status, and a typed kibi.migration-plan.v2 action graph. Read-only status inspection with no mutation side effects; damaged stores are diagnosed without starting the engine.",
|
|
215
|
+
description: "Report current branch, KB snapshot, freshness metadata, schema status, and a typed kibi.migration-plan.v2 action graph. Call it first to orient on a branch or after a failed call; use kb_check for validation findings and kb_coverage for proof status. Read-only status inspection with no mutation side effects; damaged stores are diagnosed without starting the engine.",
|
|
216
216
|
businessInputSchema: { type: "object", properties: {} },
|
|
217
217
|
// Status must remain available when the branch store cannot be attached.
|
|
218
218
|
requiresProlog: false,
|
|
@@ -2,13 +2,14 @@ import { executePrepareImpactReview } from "../impact-review-preparation.js";
|
|
|
2
2
|
export declare const prepareImpactReviewSpec: {
|
|
3
3
|
readonly name: "kb_prepare_impact_review";
|
|
4
4
|
readonly cliName: "prepare-impact-review";
|
|
5
|
-
readonly description: "Prepare complete content-bound impact-review authoring inputs from the current staged snapshot or explicitly selected immutable Git commits. Returns strict reviewer schemas and an unauthored template; it does not decide, approve, sign, stage, or prove the review.";
|
|
5
|
+
readonly description: "Prepare complete content-bound impact-review authoring inputs from the current staged snapshot or explicitly selected immutable Git commits. Use it when kb_check reports that changed files need an impact review; it does not plan KB changes. Returns strict reviewer schemas and an unauthored template; it does not decide, approve, sign, stage, or prove the review.";
|
|
6
6
|
readonly businessInputSchema: {
|
|
7
7
|
readonly type: "object";
|
|
8
8
|
readonly additionalProperties: false;
|
|
9
9
|
readonly required: readonly ["scope"];
|
|
10
10
|
readonly properties: {
|
|
11
11
|
readonly scope: {
|
|
12
|
+
readonly description: "What to review: {\"kind\":\"staged\"} for the staged snapshot, or {\"kind\":\"diff\",\"baseCommit\":\"<sha>\",\"headCommit\":\"<sha>\"} with full commit hashes.";
|
|
12
13
|
readonly oneOf: readonly [{
|
|
13
14
|
readonly type: "object";
|
|
14
15
|
readonly additionalProperties: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impact-review-preparation.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/impact-review-preparation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAG7E,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"impact-review-preparation.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/impact-review-preparation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAG7E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CF,CAAC"}
|
|
@@ -2,13 +2,14 @@ import { executePrepareImpactReview } from "../impact-review-preparation.js";
|
|
|
2
2
|
export const prepareImpactReviewSpec = {
|
|
3
3
|
name: "kb_prepare_impact_review",
|
|
4
4
|
cliName: "prepare-impact-review",
|
|
5
|
-
description: "Prepare complete content-bound impact-review authoring inputs from the current staged snapshot or explicitly selected immutable Git commits. Returns strict reviewer schemas and an unauthored template; it does not decide, approve, sign, stage, or prove the review.",
|
|
5
|
+
description: "Prepare complete content-bound impact-review authoring inputs from the current staged snapshot or explicitly selected immutable Git commits. Use it when kb_check reports that changed files need an impact review; it does not plan KB changes. Returns strict reviewer schemas and an unauthored template; it does not decide, approve, sign, stage, or prove the review.",
|
|
6
6
|
businessInputSchema: {
|
|
7
7
|
type: "object",
|
|
8
8
|
additionalProperties: false,
|
|
9
9
|
required: ["scope"],
|
|
10
10
|
properties: {
|
|
11
11
|
scope: {
|
|
12
|
+
description: 'What to review: {"kind":"staged"} for the staged snapshot, or {"kind":"diff","baseCommit":"<sha>","headCommit":"<sha>"} with full commit hashes.',
|
|
12
13
|
oneOf: [
|
|
13
14
|
{
|
|
14
15
|
type: "object",
|
|
@@ -8,7 +8,7 @@ export { executeCompileIntent } from "../../../operations/planning/compile-inten
|
|
|
8
8
|
export declare const compileIntentSpec: {
|
|
9
9
|
readonly name: "kb_compile_intent";
|
|
10
10
|
readonly cliName: "compile-intent";
|
|
11
|
-
readonly description: "Compile complete change intent into a deterministic, snapshot-bound read-only plan. Reuses intent-aware discovery and semantic modeling, accounts for every proposition, reports contradiction witnesses, proposes traceability links, and emits dependency-ordered kb_upsert-style steps only for resolved typed claims. contradictionAnalysis.outcome is no_conflict only when the check could decide: an unmodeled proposition or a related current requirement without logic leaves it unresolved with reasons and reviewCandidates to compare and judge through conflictReviews. No mutation side effects.";
|
|
11
|
+
readonly description: "Compile complete change intent into a deterministic, snapshot-bound read-only plan. Use it before editing code for a change request that may touch several requirements; use kb_model for one requirement's prose and kb_plan_bootstrap for first-time onboarding. Reuses intent-aware discovery and semantic modeling, accounts for every proposition, reports contradiction witnesses, proposes traceability links, and emits dependency-ordered kb_upsert-style steps only for resolved typed claims. contradictionAnalysis.outcome is no_conflict only when the check could decide: an unmodeled proposition or a related current requirement without logic leaves it unresolved with reasons and reviewCandidates to compare and judge through conflictReviews. No mutation side effects.";
|
|
12
12
|
readonly businessInputSchema: {
|
|
13
13
|
readonly type: "object";
|
|
14
14
|
readonly required: readonly ["intent", "mode"];
|
|
@@ -6,7 +6,7 @@ export { executeCompileIntent } from "../../../operations/planning/compile-inten
|
|
|
6
6
|
export const compileIntentSpec = {
|
|
7
7
|
name: "kb_compile_intent",
|
|
8
8
|
cliName: "compile-intent",
|
|
9
|
-
description: "Compile complete change intent into a deterministic, snapshot-bound read-only plan. Reuses intent-aware discovery and semantic modeling, accounts for every proposition, reports contradiction witnesses, proposes traceability links, and emits dependency-ordered kb_upsert-style steps only for resolved typed claims. contradictionAnalysis.outcome is no_conflict only when the check could decide: an unmodeled proposition or a related current requirement without logic leaves it unresolved with reasons and reviewCandidates to compare and judge through conflictReviews. No mutation side effects.",
|
|
9
|
+
description: "Compile complete change intent into a deterministic, snapshot-bound read-only plan. Use it before editing code for a change request that may touch several requirements; use kb_model for one requirement's prose and kb_plan_bootstrap for first-time onboarding. Reuses intent-aware discovery and semantic modeling, accounts for every proposition, reports contradiction witnesses, proposes traceability links, and emits dependency-ordered kb_upsert-style steps only for resolved typed claims. contradictionAnalysis.outcome is no_conflict only when the check could decide: an unmodeled proposition or a related current requirement without logic leaves it unresolved with reasons and reviewCandidates to compare and judge through conflictReviews. No mutation side effects.",
|
|
10
10
|
businessInputSchema: {
|
|
11
11
|
type: "object",
|
|
12
12
|
required: ["intent", "mode"],
|
|
@@ -69,42 +69,49 @@ export declare function executeFindGaps(input: FindGapsInput, context: Operation
|
|
|
69
69
|
export declare const findGapsSpec: {
|
|
70
70
|
readonly name: "kb_find_gaps";
|
|
71
71
|
readonly cliName: "find-gaps";
|
|
72
|
-
readonly description: "
|
|
72
|
+
readonly description: "List KB entities by the relationships they lack or have. Use for questions like which requirements lack scenarios or tests; all filters must match, and a relationship counts in either direction. Use kb_coverage instead for proof status and repair plans, and kb_check for rule violations. No mutation side effects.";
|
|
73
73
|
readonly businessInputSchema: {
|
|
74
74
|
readonly type: "object";
|
|
75
75
|
readonly properties: {
|
|
76
76
|
readonly type: {
|
|
77
77
|
readonly type: "string";
|
|
78
78
|
readonly enum: readonly ["req", "scenario", "test", "adr", "flag", "event", "symbol", "fact"];
|
|
79
|
+
readonly description: "Only report entities of this type. Omit for all types.";
|
|
79
80
|
};
|
|
80
81
|
readonly missingRelationships: {
|
|
81
82
|
readonly type: "array";
|
|
82
83
|
readonly items: {
|
|
83
84
|
readonly type: "string";
|
|
84
85
|
};
|
|
86
|
+
readonly description: "Relationship types the entity must have none of, in either direction, for example specified_by or verified_by. verified_by and validates satisfy each other.";
|
|
85
87
|
};
|
|
86
88
|
readonly presentRelationships: {
|
|
87
89
|
readonly type: "array";
|
|
88
90
|
readonly items: {
|
|
89
91
|
readonly type: "string";
|
|
90
92
|
};
|
|
93
|
+
readonly description: "Relationship types the entity must have at least one of each, in either direction.";
|
|
91
94
|
};
|
|
92
95
|
readonly tags: {
|
|
93
96
|
readonly type: "array";
|
|
94
97
|
readonly items: {
|
|
95
98
|
readonly type: "string";
|
|
96
99
|
};
|
|
100
|
+
readonly description: "Keep entities carrying any of these metadata tags. Bootstrap provenance stubs appear in rows only when this names bootstrap:provenance-stub.";
|
|
97
101
|
};
|
|
98
102
|
readonly sourceFile: {
|
|
99
103
|
readonly type: "string";
|
|
104
|
+
readonly description: "Keep entities whose source path contains this substring.";
|
|
100
105
|
};
|
|
101
106
|
readonly limit: {
|
|
102
107
|
readonly type: "integer";
|
|
103
108
|
readonly default: 100;
|
|
109
|
+
readonly description: "Maximum rows to return; count reports the full total.";
|
|
104
110
|
};
|
|
105
111
|
readonly offset: {
|
|
106
112
|
readonly type: "integer";
|
|
107
113
|
readonly default: 0;
|
|
114
|
+
readonly description: "Zero-based row offset for pagination.";
|
|
108
115
|
};
|
|
109
116
|
};
|
|
110
117
|
};
|
|
@@ -134,7 +141,7 @@ export declare function executeCoverage(input: CoverageInput, context: Operation
|
|
|
134
141
|
export declare const coverageSpec: {
|
|
135
142
|
readonly name: "kb_coverage";
|
|
136
143
|
readonly cliName: "coverage";
|
|
137
|
-
readonly description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.";
|
|
144
|
+
readonly description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Use it to ask which requirements are proven and what blocks the rest; use kb_find_gaps for a plain list of missing links and kb_check for rule violations. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.";
|
|
138
145
|
readonly businessInputSchema: {
|
|
139
146
|
readonly type: "object";
|
|
140
147
|
readonly properties: {
|
|
@@ -142,16 +149,19 @@ export declare const coverageSpec: {
|
|
|
142
149
|
readonly type: "string";
|
|
143
150
|
readonly enum: readonly ["req", "symbol", "type"];
|
|
144
151
|
readonly default: "req";
|
|
152
|
+
readonly description: "Report shape: req gives per-requirement proof status and a repair plan, symbol gives per-symbol ownership coverage, type gives counts per entity type.";
|
|
145
153
|
};
|
|
146
154
|
readonly tags: {
|
|
147
155
|
readonly type: "array";
|
|
148
156
|
readonly items: {
|
|
149
157
|
readonly type: "string";
|
|
150
158
|
};
|
|
159
|
+
readonly description: "Keep rows for entities carrying any of these metadata tags.";
|
|
151
160
|
};
|
|
152
161
|
readonly includePassing: {
|
|
153
162
|
readonly type: "boolean";
|
|
154
163
|
readonly default: false;
|
|
164
|
+
readonly description: "Also return rows that are already proven or not applicable. By default only rows that still need repair are returned.";
|
|
155
165
|
};
|
|
156
166
|
readonly statuses: {
|
|
157
167
|
readonly type: "array";
|
|
@@ -164,14 +174,17 @@ export declare const coverageSpec: {
|
|
|
164
174
|
readonly includeTransitive: {
|
|
165
175
|
readonly type: "boolean";
|
|
166
176
|
readonly default: true;
|
|
177
|
+
readonly description: "Count symbol coverage reached transitively through linked entities, not only direct links.";
|
|
167
178
|
};
|
|
168
179
|
readonly limit: {
|
|
169
180
|
readonly type: "integer";
|
|
170
181
|
readonly default: 100;
|
|
182
|
+
readonly description: "Maximum rows to return. When the repair plan reports scope.complete false, rerun with offset 0 and a larger limit.";
|
|
171
183
|
};
|
|
172
184
|
readonly offset: {
|
|
173
185
|
readonly type: "integer";
|
|
174
186
|
readonly default: 0;
|
|
187
|
+
readonly description: "Zero-based row offset for pagination.";
|
|
175
188
|
};
|
|
176
189
|
readonly includeMigrationPreview: {
|
|
177
190
|
readonly type: "boolean";
|
|
@@ -215,7 +228,7 @@ export declare function executeGraph(input: GraphInput, context: OperationContex
|
|
|
215
228
|
export declare const graphSpec: {
|
|
216
229
|
readonly name: "kb_graph";
|
|
217
230
|
readonly cliName: "graph";
|
|
218
|
-
readonly description: "Run bounded graph traversal from one or more seed IDs across curated relationship types. No mutation side effects.";
|
|
231
|
+
readonly description: "Run bounded graph traversal from one or more seed IDs across curated relationship types and return the nodes and edges reached. Use it to follow links from IDs you already have, such as a requirement to its scenarios and tests or a symbol to the requirements it implements; use kb_query to find entities by filter and kb_search to ask a question. Traversal stops at depth, maxNodes or maxEdges and then sets truncated. No mutation side effects.";
|
|
219
232
|
readonly businessInputSchema: {
|
|
220
233
|
readonly type: "object";
|
|
221
234
|
readonly required: readonly ["seedIds"];
|
|
@@ -225,37 +238,44 @@ export declare const graphSpec: {
|
|
|
225
238
|
readonly items: {
|
|
226
239
|
readonly type: "string";
|
|
227
240
|
};
|
|
241
|
+
readonly description: "Entity IDs to start from, for example REQ-... or SCEN-.... Seeds are always returned as nodes.";
|
|
228
242
|
};
|
|
229
243
|
readonly relationships: {
|
|
230
244
|
readonly type: "array";
|
|
231
245
|
readonly items: {
|
|
232
246
|
readonly type: "string";
|
|
233
247
|
};
|
|
248
|
+
readonly description: "Relationship types to follow, for example specified_by, verified_by or implements. Omit to follow every relationship type.";
|
|
234
249
|
};
|
|
235
250
|
readonly direction: {
|
|
236
251
|
readonly type: "string";
|
|
237
252
|
readonly enum: readonly ["outgoing", "incoming", "both"];
|
|
238
253
|
readonly default: "outgoing";
|
|
254
|
+
readonly description: "outgoing follows links from each node, incoming follows links pointing at it, both does either.";
|
|
239
255
|
};
|
|
240
256
|
readonly depth: {
|
|
241
257
|
readonly type: "integer";
|
|
242
258
|
readonly default: 1;
|
|
243
259
|
readonly minimum: 1;
|
|
244
260
|
readonly maximum: 5;
|
|
261
|
+
readonly description: "Number of hops from the seeds.";
|
|
245
262
|
};
|
|
246
263
|
readonly entityTypes: {
|
|
247
264
|
readonly type: "array";
|
|
248
265
|
readonly items: {
|
|
249
266
|
readonly type: "string";
|
|
250
267
|
};
|
|
268
|
+
readonly description: "Keep only nodes of these types (req, scenario, test, adr, flag, event, symbol, fact) in the result, and the edges between them. Traversal still passes through other types.";
|
|
251
269
|
};
|
|
252
270
|
readonly maxNodes: {
|
|
253
271
|
readonly type: "integer";
|
|
254
272
|
readonly default: 200;
|
|
273
|
+
readonly description: "Stop and set truncated once this many nodes are reached.";
|
|
255
274
|
};
|
|
256
275
|
readonly maxEdges: {
|
|
257
276
|
readonly type: "integer";
|
|
258
277
|
readonly default: 500;
|
|
278
|
+
readonly description: "Stop and set truncated once this many edges are reached.";
|
|
259
279
|
};
|
|
260
280
|
};
|
|
261
281
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporting.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/reporting.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,aAAa,EAInB,MAAM,s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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,CA4H3C;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,CA8BxC;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDsC,CAAC"}
|
|
@@ -70,20 +70,44 @@ export async function executeFindGaps(input, context) {
|
|
|
70
70
|
export const findGapsSpec = {
|
|
71
71
|
name: "kb_find_gaps",
|
|
72
72
|
cliName: "find-gaps",
|
|
73
|
-
description: "
|
|
73
|
+
description: "List KB entities by the relationships they lack or have. Use for questions like which requirements lack scenarios or tests; all filters must match, and a relationship counts in either direction. Use kb_coverage instead for proof status and repair plans, and kb_check for rule violations. No mutation side effects.",
|
|
74
74
|
businessInputSchema: {
|
|
75
75
|
type: "object",
|
|
76
76
|
properties: {
|
|
77
77
|
type: {
|
|
78
78
|
type: "string",
|
|
79
79
|
enum: ENTITY_TYPES,
|
|
80
|
+
description: "Only report entities of this type. Omit for all types.",
|
|
81
|
+
},
|
|
82
|
+
missingRelationships: {
|
|
83
|
+
type: "array",
|
|
84
|
+
items: { type: "string" },
|
|
85
|
+
description: "Relationship types the entity must have none of, in either direction, for example specified_by or verified_by. verified_by and validates satisfy each other.",
|
|
86
|
+
},
|
|
87
|
+
presentRelationships: {
|
|
88
|
+
type: "array",
|
|
89
|
+
items: { type: "string" },
|
|
90
|
+
description: "Relationship types the entity must have at least one of each, in either direction.",
|
|
91
|
+
},
|
|
92
|
+
tags: {
|
|
93
|
+
type: "array",
|
|
94
|
+
items: { type: "string" },
|
|
95
|
+
description: "Keep entities carrying any of these metadata tags. Bootstrap provenance stubs appear in rows only when this names bootstrap:provenance-stub.",
|
|
96
|
+
},
|
|
97
|
+
sourceFile: {
|
|
98
|
+
type: "string",
|
|
99
|
+
description: "Keep entities whose source path contains this substring.",
|
|
100
|
+
},
|
|
101
|
+
limit: {
|
|
102
|
+
type: "integer",
|
|
103
|
+
default: 100,
|
|
104
|
+
description: "Maximum rows to return; count reports the full total.",
|
|
105
|
+
},
|
|
106
|
+
offset: {
|
|
107
|
+
type: "integer",
|
|
108
|
+
default: 0,
|
|
109
|
+
description: "Zero-based row offset for pagination.",
|
|
80
110
|
},
|
|
81
|
-
missingRelationships: { type: "array", items: { type: "string" } },
|
|
82
|
-
presentRelationships: { type: "array", items: { type: "string" } },
|
|
83
|
-
tags: { type: "array", items: { type: "string" } },
|
|
84
|
-
sourceFile: { type: "string" },
|
|
85
|
-
limit: { type: "integer", default: 100 },
|
|
86
|
-
offset: { type: "integer", default: 0 },
|
|
87
111
|
},
|
|
88
112
|
},
|
|
89
113
|
requiresProlog: true,
|
|
@@ -282,13 +306,26 @@ export async function executeCoverage(input, context) {
|
|
|
282
306
|
export const coverageSpec = {
|
|
283
307
|
name: "kb_coverage",
|
|
284
308
|
cliName: "coverage",
|
|
285
|
-
description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.",
|
|
309
|
+
description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Use it to ask which requirements are proven and what blocks the rest; use kb_find_gaps for a plain list of missing links and kb_check for rule violations. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.",
|
|
286
310
|
businessInputSchema: {
|
|
287
311
|
type: "object",
|
|
288
312
|
properties: {
|
|
289
|
-
by: {
|
|
290
|
-
|
|
291
|
-
|
|
313
|
+
by: {
|
|
314
|
+
type: "string",
|
|
315
|
+
enum: ["req", "symbol", "type"],
|
|
316
|
+
default: "req",
|
|
317
|
+
description: "Report shape: req gives per-requirement proof status and a repair plan, symbol gives per-symbol ownership coverage, type gives counts per entity type.",
|
|
318
|
+
},
|
|
319
|
+
tags: {
|
|
320
|
+
type: "array",
|
|
321
|
+
items: { type: "string" },
|
|
322
|
+
description: "Keep rows for entities carrying any of these metadata tags.",
|
|
323
|
+
},
|
|
324
|
+
includePassing: {
|
|
325
|
+
type: "boolean",
|
|
326
|
+
default: false,
|
|
327
|
+
description: "Also return rows that are already proven or not applicable. By default only rows that still need repair are returned.",
|
|
328
|
+
},
|
|
292
329
|
statuses: {
|
|
293
330
|
type: "array",
|
|
294
331
|
items: {
|
|
@@ -297,9 +334,21 @@ export const coverageSpec = {
|
|
|
297
334
|
},
|
|
298
335
|
description: "Requirement proof-status filter (req mode): include only rows whose proofStatus is listed. Selecting statuses implies include-passing; not_applicable rows carry their typed applicability reason in proofStages.applicability.reason. The summary always reflects the whole KB.",
|
|
299
336
|
},
|
|
300
|
-
includeTransitive: {
|
|
301
|
-
|
|
302
|
-
|
|
337
|
+
includeTransitive: {
|
|
338
|
+
type: "boolean",
|
|
339
|
+
default: true,
|
|
340
|
+
description: "Count symbol coverage reached transitively through linked entities, not only direct links.",
|
|
341
|
+
},
|
|
342
|
+
limit: {
|
|
343
|
+
type: "integer",
|
|
344
|
+
default: 100,
|
|
345
|
+
description: "Maximum rows to return. When the repair plan reports scope.complete false, rerun with offset 0 and a larger limit.",
|
|
346
|
+
},
|
|
347
|
+
offset: {
|
|
348
|
+
type: "integer",
|
|
349
|
+
default: 0,
|
|
350
|
+
description: "Zero-based row offset for pagination.",
|
|
351
|
+
},
|
|
303
352
|
includeMigrationPreview: {
|
|
304
353
|
type: "boolean",
|
|
305
354
|
default: false,
|
|
@@ -367,22 +416,49 @@ export async function executeGraph(input, context) {
|
|
|
367
416
|
export const graphSpec = {
|
|
368
417
|
name: "kb_graph",
|
|
369
418
|
cliName: "graph",
|
|
370
|
-
description: "Run bounded graph traversal from one or more seed IDs across curated relationship types. No mutation side effects.",
|
|
419
|
+
description: "Run bounded graph traversal from one or more seed IDs across curated relationship types and return the nodes and edges reached. Use it to follow links from IDs you already have, such as a requirement to its scenarios and tests or a symbol to the requirements it implements; use kb_query to find entities by filter and kb_search to ask a question. Traversal stops at depth, maxNodes or maxEdges and then sets truncated. No mutation side effects.",
|
|
371
420
|
businessInputSchema: {
|
|
372
421
|
type: "object",
|
|
373
422
|
required: ["seedIds"],
|
|
374
423
|
properties: {
|
|
375
|
-
seedIds: {
|
|
376
|
-
|
|
424
|
+
seedIds: {
|
|
425
|
+
type: "array",
|
|
426
|
+
items: { type: "string" },
|
|
427
|
+
description: "Entity IDs to start from, for example REQ-... or SCEN-.... Seeds are always returned as nodes.",
|
|
428
|
+
},
|
|
429
|
+
relationships: {
|
|
430
|
+
type: "array",
|
|
431
|
+
items: { type: "string" },
|
|
432
|
+
description: "Relationship types to follow, for example specified_by, verified_by or implements. Omit to follow every relationship type.",
|
|
433
|
+
},
|
|
377
434
|
direction: {
|
|
378
435
|
type: "string",
|
|
379
436
|
enum: ["outgoing", "incoming", "both"],
|
|
380
437
|
default: "outgoing",
|
|
438
|
+
description: "outgoing follows links from each node, incoming follows links pointing at it, both does either.",
|
|
439
|
+
},
|
|
440
|
+
depth: {
|
|
441
|
+
type: "integer",
|
|
442
|
+
default: 1,
|
|
443
|
+
minimum: 1,
|
|
444
|
+
maximum: 5,
|
|
445
|
+
description: "Number of hops from the seeds.",
|
|
446
|
+
},
|
|
447
|
+
entityTypes: {
|
|
448
|
+
type: "array",
|
|
449
|
+
items: { type: "string" },
|
|
450
|
+
description: "Keep only nodes of these types (req, scenario, test, adr, flag, event, symbol, fact) in the result, and the edges between them. Traversal still passes through other types.",
|
|
451
|
+
},
|
|
452
|
+
maxNodes: {
|
|
453
|
+
type: "integer",
|
|
454
|
+
default: 200,
|
|
455
|
+
description: "Stop and set truncated once this many nodes are reached.",
|
|
456
|
+
},
|
|
457
|
+
maxEdges: {
|
|
458
|
+
type: "integer",
|
|
459
|
+
default: 500,
|
|
460
|
+
description: "Stop and set truncated once this many edges are reached.",
|
|
381
461
|
},
|
|
382
|
-
depth: { type: "integer", default: 1, minimum: 1, maximum: 5 },
|
|
383
|
-
entityTypes: { type: "array", items: { type: "string" } },
|
|
384
|
-
maxNodes: { type: "integer", default: 200 },
|
|
385
|
-
maxEdges: { type: "integer", default: 500 },
|
|
386
462
|
},
|
|
387
463
|
},
|
|
388
464
|
requiresProlog: true,
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: kibi-commit-review
|
|
3
|
+
name: kibi-commit-review
|
|
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, kibi sync --refresh-symbol-coordinates, staging the tracked Kibi evidence with git add, 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.2.0
|
|
6
|
+
kibiCompatibility: ">=1.0.0"
|
|
7
|
+
tags:
|
|
8
|
+
- kibi
|
|
9
|
+
- commit
|
|
10
|
+
- staged-check
|
|
11
|
+
- traceability
|
|
12
|
+
- agent-guidance
|
|
13
|
+
resources:
|
|
14
|
+
- resources/staged-gate.md
|
|
15
|
+
---
|
|
16
|
+
## Goal
|
|
17
|
+
|
|
18
|
+
Get a commit through Kibi's staged gate by fixing the cause: the commit
|
|
19
|
+
carries the knowledge its behavior change needs, with current symbol
|
|
20
|
+
coordinates, so the gate passes for the same reason a reviewer would accept it.
|
|
21
|
+
|
|
22
|
+
## Interface Selection
|
|
23
|
+
|
|
24
|
+
Use the visible approved MCP tools or the trusted project-local CLI as equal
|
|
25
|
+
peer interfaces (CLI JSON: `printf '%s\n' '{}' | npx --no-install kibi status
|
|
26
|
+
--input -`). The gate itself is CLI: `npx --no-install kibi check --staged`
|
|
27
|
+
(add `--format json` for the full evidence). If neither surface is available,
|
|
28
|
+
stop and name the missing capability. Never read or edit `.kb/` files directly.
|
|
29
|
+
|
|
30
|
+
## When this applies
|
|
31
|
+
|
|
32
|
+
- `kibi check --staged` fails, or the pre-commit hook (`kibi check-generated
|
|
33
|
+
--staged --changed-only`, then `kibi check --staged`) blocks a commit.
|
|
34
|
+
- You are about to commit or open a pull request and want the impact review
|
|
35
|
+
ready first.
|
|
36
|
+
|
|
37
|
+
Never read or open any file under `.kb`, not even read-only with a file tool to look at symbols or coordinates; doing so fails the session even when nothing is written. What you need is already shown elsewhere: the gate's `Detail:` lines, `kb_query` by `sourceFile` or `id`, and `kb_check` with `staged: true` show which symbols and coordinates are covered and which are missing. Before deciding what the change is, always run `kb_search` with `sourceLocations` for each named file and `kb_query` the requirement that governs it, even when the edit looks coordinate-only or seems to contradict a firm rule. When a write is authorized, keep the supplied target and its intended edges, query those targets first, validate the exact payload with `kb_upsert` and `dryRun: true`, then send that same payload with `kb_upsert` and exact-read the result back with `kb_query` before the final checks. Distinct authorized payloads may need several sequential writes, but never resend a write that is already committed, and let typed `nextActions` drive recovery. A passing dry run is validation only, not completion.
|
|
38
|
+
|
|
39
|
+
## Steps
|
|
40
|
+
|
|
41
|
+
1. **Read the whole failure.** Each finding names an id, the files, `Detail:`
|
|
42
|
+
lines and a `Suggestion:`. Detail lines are complete per file: how many
|
|
43
|
+
symbols extraction finds in the staged content, how many the staged
|
|
44
|
+
evidence covers, and every symbol missing from `.kb/symbols.yaml` with its
|
|
45
|
+
line. The common ids and their fixes are in `resources/staged-gate.md`.
|
|
46
|
+
2. **Find the owning knowledge.** `kb_search` with `sourceLocations` for each
|
|
47
|
+
named file (or `kb_query({sourceFile})`), then `kb_query` the requirements,
|
|
48
|
+
scenarios and tests it returns. Run `kb_check` with `sourceFiles`,
|
|
49
|
+
`includeImpactDiagnostics: true` and `staged: true` to see the impact
|
|
50
|
+
findings, including `requirement_statement_unverified` quotes.
|
|
51
|
+
3. **Decide what the change is.**
|
|
52
|
+
- Behavior changed: update or record the knowledge (a requirement with a
|
|
53
|
+
scenario, or a new clause) through `kb_upsert`. If the change contradicts
|
|
54
|
+
a recorded rule, stop and ask; load `kibi-decisions`.
|
|
55
|
+
- New or uncovered symbols: author a `symbol` entity per listed symbol
|
|
56
|
+
through `kb_upsert` (`title` = the member the extractor names,
|
|
57
|
+
`sourceFile`, `status: active`, `symbol_role: behavioral`, `implements`
|
|
58
|
+
to the requirement, `covered_by` to the test). Then run
|
|
59
|
+
`kibi sync --refresh-symbol-coordinates`.
|
|
60
|
+
- Only coordinates moved: `kibi sync --refresh-symbol-coordinates`.
|
|
61
|
+
- No behavior change (a genuine false positive): see the audited
|
|
62
|
+
no-impact note in `resources/staged-gate.md`; it never covers a real
|
|
63
|
+
behavior change.
|
|
64
|
+
4. **Stage the evidence.** Kibi authors tracked files but never Git-stages or
|
|
65
|
+
commits them. `git status --short .kb` lists what it wrote; `git add` the
|
|
66
|
+
entity Markdown, `.kb/relationships/` shards, `.kb/symbols.yaml` and
|
|
67
|
+
`.kb/symbol-coordinates.yaml` that belong to this change (use `git add -p`
|
|
68
|
+
when the files hold unrelated edits).
|
|
69
|
+
5. **Re-run** `kibi check --staged` (and `kibi check-generated --staged` when it
|
|
70
|
+
failed) until it passes. Never bypass the hook (`--no-verify`) unless the
|
|
71
|
+
person says so.
|
|
72
|
+
|
|
73
|
+
## Requirements signoff
|
|
74
|
+
|
|
75
|
+
Before you ask the person to approve a commit that adds, rewrites or retires
|
|
76
|
+
requirements, or changes code that implements them, show them what they are
|
|
77
|
+
signing off:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
npx --no-install kibi signoff # working tree; --staged for the index
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
It prints Markdown listing each new, changed, affected and retired
|
|
84
|
+
requirement with its statement (before and after for a rewrite), firmness,
|
|
85
|
+
origin, scenarios and proof state. Put it in your reply unchanged (in the
|
|
86
|
+
messaging tool's message when replies go through one), then add one or two
|
|
87
|
+
sentences on why the requirements changed. Offer the full page with
|
|
88
|
+
`kibi signoff --format html --open`, or attach or publish
|
|
89
|
+
`.kb/briefs/signoff/latest.html` when your host can carry a file or a page;
|
|
90
|
+
past 15 requirements the Markdown stops and only the page lists them all.
|
|
91
|
+
Host details: `kibi-decisions`, `resources/signoff-views.md`. `--no-proof` skips the proof lookup, which reads coverage and is slow
|
|
92
|
+
on a large knowledge base. The summary is not an approval: never set
|
|
93
|
+
`approved_by` or `origin.ref` from it.
|
|
94
|
+
|
|
95
|
+
## Impact reviews
|
|
96
|
+
|
|
97
|
+
When the repository's base commit carries `.kibi/impact-policy.json`, the gate
|
|
98
|
+
also demands a content-bound review record at `.kibi/impact-review.json`
|
|
99
|
+
(`Staged impact review failed: impact_review_invalid ...`). Prepare it with
|
|
100
|
+
`kb_prepare_impact_review` (`scope: {"kind":"staged"}`, or `{"kind":"diff",
|
|
101
|
+
"baseCommit":"<40-hex sha>","headCommit":"<40-hex sha>"}` for a pull
|
|
102
|
+
request). It is read-only: it returns per-file evidence, requirement scopes,
|
|
103
|
+
residual review obligations and an unauthored record template. Draft each
|
|
104
|
+
file's `decision` from what you verified, leave `reviewer.id` for the person
|
|
105
|
+
who reviews, and never present the record as their approval. Field details are
|
|
106
|
+
in `resources/staged-gate.md`.
|
|
107
|
+
|
|
108
|
+
## Merge commits and migrations
|
|
109
|
+
|
|
110
|
+
During a merge (`MERGE_HEAD` exists), files staged unchanged from a merged
|
|
111
|
+
parent are skipped (`Merge commit: N staged file(s) are taken unchanged ...`);
|
|
112
|
+
only what the merge resolved or edited is judged. A commit that moves
|
|
113
|
+
knowledge into `.kb/` after `kibi migrate` is compared with the old paths
|
|
114
|
+
(`Baseline: HEAD with N staged knowledge rename(s) ...`), and symbol records
|
|
115
|
+
changed only by the migration are not judged as changed. Debt reported there
|
|
116
|
+
came from the branch or the old layout; the full `kibi check` still shows it.
|
|
117
|
+
|
|
118
|
+
## Typed results and report
|
|
119
|
+
|
|
120
|
+
Parse `kibiProtocol`, `status`, diagnostics and typed `nextActions` on every
|
|
121
|
+
Kibi write. On `committed_with_repairs`, run the repair actions and never
|
|
122
|
+
resend the original write. Report the findings you fixed (id, file, what
|
|
123
|
+
changed), the knowledge you recorded or confirmed still current, the files
|
|
124
|
+
you staged, the final `kibi check --staged` result, and anything left for the
|
|
125
|
+
person (an open rule conflict, an unauthored review decision).
|