kibi-cli 2.31.1 → 2.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-register-proof.d.ts.map +1 -1
- package/dist/cli-register-proof.js +19 -7
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +2 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -1
- package/dist/commands/check-generated.d.ts +5 -1
- package/dist/commands/check-generated.d.ts.map +1 -1
- package/dist/commands/check-generated.js +24 -35
- package/dist/commands/check.d.ts +1 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +14 -5
- package/dist/commands/discovery-table.d.ts.map +1 -1
- package/dist/commands/discovery-table.js +51 -4
- package/dist/commands/doctor.js +19 -4
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +8 -5
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +109 -5
- package/dist/commands/prove.d.ts +48 -1
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +293 -8
- package/dist/commands/report.d.ts +1 -0
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/report.js +70 -5
- package/dist/commands/signoff.d.ts.map +1 -1
- package/dist/commands/signoff.js +20 -1
- package/dist/commands/sync/manifest.d.ts +10 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +106 -17
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +16 -5
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +19 -0
- package/dist/diagnostics.js +1 -1
- package/dist/engine.js +1 -1
- package/dist/extractors/markdown.d.ts +4 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +17 -0
- package/dist/extractors/symbol-coordinates.js +2 -2
- package/dist/extractors/symbols-coordinator.d.ts +2 -4
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +1 -2
- package/dist/operations/bootstrap/candidate-helpers.d.ts +3 -0
- package/dist/operations/bootstrap/candidate-helpers.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidate-helpers.js +4 -0
- package/dist/operations/migration/evidence-floor.d.ts +41 -0
- package/dist/operations/migration/evidence-floor.d.ts.map +1 -0
- package/dist/operations/migration/evidence-floor.js +230 -0
- package/dist/operations/migration/proof-contract-claims.d.ts +72 -0
- package/dist/operations/migration/proof-contract-claims.d.ts.map +1 -0
- package/dist/operations/migration/proof-contract-claims.js +215 -0
- package/dist/operations/migration/schema6.d.ts +6 -0
- package/dist/operations/migration/schema6.d.ts.map +1 -1
- package/dist/operations/migration/schema6.js +92 -0
- package/dist/operations/migration/symbol-coordinates-refresh.d.ts +3 -2
- package/dist/operations/migration/symbol-coordinates-refresh.d.ts.map +1 -1
- package/dist/operations/migration/symbol-coordinates-refresh.js +4 -3
- package/dist/operations/migration/untrack-symbol-coordinates.d.ts +23 -0
- package/dist/operations/migration/untrack-symbol-coordinates.d.ts.map +1 -0
- package/dist/operations/migration/untrack-symbol-coordinates.js +67 -0
- package/dist/operations/modeling/requirement-modeler.d.ts.map +1 -1
- package/dist/operations/modeling/requirement-modeler.js +48 -1
- package/dist/operations/modeling/requirement-types.d.ts +2 -1
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
- package/dist/operations/modeling/requirement-utils.d.ts +1 -1
- package/dist/operations/modeling/requirement-utils.d.ts.map +1 -1
- package/dist/operations/modeling/requirement-utils.js +8 -1
- package/dist/operations/mutation/omitted-properties.d.ts +11 -0
- package/dist/operations/mutation/omitted-properties.d.ts.map +1 -0
- package/dist/operations/mutation/omitted-properties.js +76 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +1 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +39 -20
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +6 -2
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +5 -3
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +7 -1
- package/dist/operations/mutation/validation.d.ts +2 -0
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +4 -0
- package/dist/operations/proof/claim-bindings.d.ts +41 -0
- package/dist/operations/proof/claim-bindings.d.ts.map +1 -0
- package/dist/operations/proof/claim-bindings.js +364 -0
- package/dist/operations/proof/code-certificates.d.ts +155 -0
- package/dist/operations/proof/code-certificates.d.ts.map +1 -0
- package/dist/operations/proof/code-certificates.js +894 -0
- package/dist/operations/proof/code-models.d.ts +96 -0
- package/dist/operations/proof/code-models.d.ts.map +1 -0
- package/dist/operations/proof/code-models.js +601 -0
- package/dist/operations/proof/code-runner.d.ts +40 -0
- package/dist/operations/proof/code-runner.d.ts.map +1 -0
- package/dist/operations/proof/code-runner.js +164 -0
- package/dist/operations/proof/code-scope.d.ts +14 -1
- package/dist/operations/proof/code-scope.d.ts.map +1 -1
- package/dist/operations/proof/code-scope.js +44 -2
- package/dist/operations/proof/compact-receipts.d.ts.map +1 -1
- package/dist/operations/proof/compact-receipts.js +4 -3
- package/dist/operations/proof/explain.d.ts +32 -0
- package/dist/operations/proof/explain.d.ts.map +1 -1
- package/dist/operations/proof/explain.js +91 -0
- package/dist/operations/proof/ingest-proof.d.ts +9 -1
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +42 -2
- package/dist/operations/proof/receipt-compaction.d.ts +2 -0
- package/dist/operations/proof/receipt-compaction.d.ts.map +1 -1
- package/dist/operations/proof/receipt-compaction.js +6 -2
- package/dist/operations/proof/regular-language.d.ts +89 -0
- package/dist/operations/proof/regular-language.d.ts.map +1 -0
- package/dist/operations/proof/regular-language.js +943 -0
- package/dist/operations/proof/source-code-readers.d.ts +12 -0
- package/dist/operations/proof/source-code-readers.d.ts.map +1 -0
- package/dist/operations/proof/source-code-readers.js +699 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +2 -1
- package/dist/operations/semantic-advisor/shared.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/shared.js +4 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/strict-count-rules.js +8 -2
- package/dist/operations/semantic-advisor/strict-rules.d.ts +8 -0
- package/dist/operations/semantic-advisor/strict-rules.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/strict-rules.js +234 -4
- package/dist/operations/semantic-advisor/types.d.ts +3 -2
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/plugins/approved-source-analyzers.generated.d.ts +6 -6
- package/dist/plugins/approved-source-analyzers.generated.js +6 -6
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +13 -3
- package/dist/proof/command-test-report.d.ts +4 -3
- package/dist/proof/command-test-report.d.ts.map +1 -1
- package/dist/proof/command-test-report.js +4 -10
- package/dist/proof/evaluate.d.ts.map +1 -1
- package/dist/proof/evaluate.js +18 -2
- package/dist/proof/inspect.d.ts.map +1 -1
- package/dist/proof/inspect.js +58 -0
- package/dist/proof/producers/playwright-reporter.d.ts +3 -0
- package/dist/proof/producers/playwright-reporter.d.ts.map +1 -1
- package/dist/proof/producers/playwright-reporter.js +25 -2
- package/dist/proof/step-runner.d.ts +36 -0
- package/dist/proof/step-runner.d.ts.map +1 -0
- package/dist/proof/step-runner.js +234 -0
- package/dist/public/evidence-levels.d.ts +12 -0
- package/dist/public/evidence-levels.d.ts.map +1 -0
- package/dist/public/evidence-levels.js +19 -0
- package/dist/public/impact/coverage-depth-quality.d.ts +7 -0
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
- package/dist/public/impact/coverage-depth-quality.js +59 -0
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +3 -1
- package/dist/public/operations/catalog.d.ts +315 -11
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/check-executor.d.ts +2 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +6 -0
- package/dist/public/operations/evidence-floor.d.ts +48 -0
- package/dist/public/operations/evidence-floor.d.ts.map +1 -0
- package/dist/public/operations/evidence-floor.js +143 -0
- package/dist/public/operations/migration-plan.d.ts +19 -5
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +22 -5
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +4 -1
- package/dist/public/operations/proof-contract-claims.d.ts +26 -0
- package/dist/public/operations/proof-contract-claims.d.ts.map +1 -0
- package/dist/public/operations/proof-contract-claims.js +71 -0
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +3 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/composite.d.ts +16 -3
- package/dist/public/operations/specs/composite.d.ts.map +1 -1
- package/dist/public/operations/specs/modeling.d.ts +16 -3
- package/dist/public/operations/specs/modeling.d.ts.map +1 -1
- package/dist/public/operations/specs/modeling.js +22 -3
- package/dist/public/operations/specs/mutation-schemas.d.ts +289 -7
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +28 -4
- package/dist/public/operations/specs/proof.d.ts +9 -0
- package/dist/public/operations/specs/proof.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +19 -10
- package/dist/public/operations/specs/upsert.d.ts +289 -7
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/proof-certificates.d.ts +163 -0
- package/dist/public/proof-certificates.d.ts.map +1 -0
- package/dist/public/proof-certificates.js +419 -0
- package/dist/public/proof-protocol.d.ts +259 -3
- package/dist/public/proof-protocol.d.ts.map +1 -1
- package/dist/public/proof-protocol.js +524 -3
- package/dist/public/proof-receipt.d.ts +90 -6
- package/dist/public/proof-receipt.d.ts.map +1 -1
- package/dist/public/proof-receipt.js +88 -7
- package/dist/public/proof-sources.d.ts +102 -0
- package/dist/public/proof-sources.d.ts.map +1 -0
- package/dist/public/proof-sources.js +1292 -0
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +39 -2
- package/dist/public/skills/kibi-bootstrap/SKILL.md +2 -2
- package/dist/public/skills/kibi-commit-review/SKILL.md +8 -8
- package/dist/public/skills/kibi-commit-review/resources/staged-gate.md +12 -7
- package/dist/public/skills/kibi-decisions/SKILL.md +13 -2
- package/dist/public/skills/kibi-decisions/resources/decision-records.md +9 -1
- package/dist/public/skills/kibi-freshness/SKILL.md +5 -1
- package/dist/public/skills/kibi-traceability/SKILL.md +12 -1
- package/dist/public/skills/kibi-usage/SKILL.md +8 -4
- package/dist/public/skills/kibi-usage/resources/proof.md +221 -20
- package/dist/public/skills/kibi-usage/resources/workflows.md +4 -4
- package/dist/report/html-report.css +83 -11
- package/dist/report/html-report.d.ts +8 -0
- package/dist/report/html-report.d.ts.map +1 -1
- package/dist/report/html-report.js +214 -22
- package/dist/report/report-view.d.ts +2 -2
- package/dist/report/report-view.d.ts.map +1 -1
- package/dist/report/report-view.js +8 -0
- package/dist/schemas/entity.schema.json +404 -5
- package/dist/search-answer.d.ts.map +1 -1
- package/dist/search-answer.js +1 -0
- package/dist/signoff/html.d.ts.map +1 -1
- package/dist/signoff/html.js +3 -0
- package/dist/signoff/markdown.d.ts.map +1 -1
- package/dist/signoff/markdown.js +3 -0
- package/dist/signoff/model.d.ts +20 -0
- package/dist/signoff/model.d.ts.map +1 -1
- package/dist/signoff/model.js +20 -1
- package/dist/traceability/evidence-model.d.ts +13 -12
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/evidence-model.js +1 -1
- package/dist/traceability/impact-knowledge.d.ts.map +1 -1
- package/dist/traceability/impact-knowledge.js +1 -0
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +24 -20
- package/dist/traceability/staged-impact-contract.d.ts +4 -4
- package/dist/traceability/staged-impact-contract.js +9 -9
- package/dist/traceability/staged-symbols-manifest.d.ts +11 -3
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +47 -140
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +1 -0
- package/dist/types/entities.d.ts +5 -2
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/merge-driver-setup.d.ts +8 -1
- package/dist/utils/merge-driver-setup.d.ts.map +1 -1
- package/dist/utils/merge-driver-setup.js +23 -2
- package/dist/utils/rule-registry.generated.d.ts +10 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +12 -0
- package/dist/utils/schema-version.d.ts +1 -1
- package/dist/utils/schema-version.d.ts.map +1 -1
- package/dist/utils/schema-version.js +7 -1
- package/dist/utils/strict-modeling.d.ts +3 -2
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +37 -4
- package/dist/workspace-cwd.d.ts +15 -0
- package/dist/workspace-cwd.d.ts.map +1 -0
- package/dist/workspace-cwd.js +86 -0
- package/package.json +6 -2
- package/schema/entities.pl +6 -0
- package/schema/validation.pl +7 -2
- package/src/public/evidence-levels.ts +23 -0
- package/src/public/impact/coverage-depth-quality.ts +73 -0
- package/src/public/impact/full-kb-quality.ts +6 -1
- package/src/public/operations/check-executor.ts +13 -0
- package/src/public/operations/evidence-floor.ts +203 -0
- package/src/public/operations/migration-plan.ts +39 -6
- package/src/public/operations/node-ports.ts +3 -1
- package/src/public/operations/proof-contract-claims.ts +103 -0
- package/src/public/operations/specs/check-rules.generated.ts +3 -1
- package/src/public/operations/specs/modeling.ts +24 -5
- package/src/public/operations/specs/mutation-schemas.ts +30 -4
- package/src/public/operations/specs/reporting.ts +20 -10
- package/src/public/proof-certificates.ts +566 -0
- package/src/public/proof-protocol-types.d.ts +69 -1
- package/src/public/proof-protocol.ts +694 -3
- package/src/public/proof-receipt.ts +133 -7
- package/src/public/proof-sources.ts +1656 -0
- package/src/public/schemas/entity.ts +51 -3
- package/src/public/skills/kibi-bootstrap/SKILL.md +2 -2
- package/src/public/skills/kibi-commit-review/SKILL.md +8 -8
- package/src/public/skills/kibi-commit-review/resources/staged-gate.md +12 -7
- package/src/public/skills/kibi-decisions/SKILL.md +13 -2
- package/src/public/skills/kibi-decisions/resources/decision-records.md +9 -1
- package/src/public/skills/kibi-freshness/SKILL.md +5 -1
- package/src/public/skills/kibi-traceability/SKILL.md +12 -1
- package/src/public/skills/kibi-usage/SKILL.md +8 -4
- package/src/public/skills/kibi-usage/resources/proof.md +221 -20
- package/src/public/skills/kibi-usage/resources/workflows.md +4 -4
- package/src/schemas/entity.schema.json +404 -5
- package/dist/commands/proof-impact.d.ts +0 -7
- package/dist/commands/proof-impact.d.ts.map +0 -1
- package/dist/commands/proof-impact.js +0 -39
- package/dist/operations/proof/baseline-diff.d.ts +0 -41
- package/dist/operations/proof/baseline-diff.d.ts.map +0 -1
- package/dist/operations/proof/baseline-diff.js +0 -153
- package/dist/operations/proof/impact.d.ts +0 -51
- package/dist/operations/proof/impact.d.ts.map +0 -1
- package/dist/operations/proof/impact.js +0 -138
- package/dist/traceability/reviewed-coordinate-refresh.d.ts +0 -10
- package/dist/traceability/reviewed-coordinate-refresh.d.ts.map +0 -1
- package/dist/traceability/reviewed-coordinate-refresh.js +0 -49
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-register-proof.d.ts","sourceRoot":"","sources":["../src/cli-register-proof.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"cli-register-proof.d.ts","sourceRoot":"","sources":["../src/cli-register-proof.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsO3D;AAED;;;;GAIG;AAEH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAwBnE"}
|
|
@@ -9,6 +9,8 @@ export function registerProofCommand(program) {
|
|
|
9
9
|
.option("--integration <ids>", "Prove only tests bound to these integrations (comma-separated)")
|
|
10
10
|
.option("--integration-except <ids>", "With --all (or another selector), skip tests bound to these integrations (comma-separated)")
|
|
11
11
|
.option("--all", "Prove every proof-bearing test in the knowledge base")
|
|
12
|
+
.option("--stale", "Prove only the selected tests (all by default) without a current passing receipt")
|
|
13
|
+
.option("--resume", "Skip integrations an interrupted run with the same selector already ingested at this snapshot")
|
|
12
14
|
.action(withExitCode(async (options) => {
|
|
13
15
|
const mode = [
|
|
14
16
|
options.test ? "test" : undefined,
|
|
@@ -32,6 +34,8 @@ export function registerProofCommand(program) {
|
|
|
32
34
|
? {}
|
|
33
35
|
: { integrationExcept: options.integrationExcept }),
|
|
34
36
|
all: mode === 0,
|
|
37
|
+
...(options.stale ? { stale: true } : {}),
|
|
38
|
+
...(options.resume ? { resume: true } : {}),
|
|
35
39
|
});
|
|
36
40
|
}));
|
|
37
41
|
const proof = program
|
|
@@ -58,6 +62,21 @@ export function registerProofCommand(program) {
|
|
|
58
62
|
process.stdout.write(renderInspection(result));
|
|
59
63
|
return undefined;
|
|
60
64
|
}));
|
|
65
|
+
proof
|
|
66
|
+
.command("run-steps")
|
|
67
|
+
.description("Run the declared steps of the proof-bearing tests kibi prove selected and write a per-test report, so a command integration fails only the tests whose own steps failed (use as the integration's command)")
|
|
68
|
+
.argument("[steps-file]", "JSON array of {test_id, steps: [[argv...]]}", "proof/steps.json")
|
|
69
|
+
.option("--test <id...>", "Run these tests' steps (default: KIBI_PROOF_TEST_IDS, else every test in the file)")
|
|
70
|
+
.action(withExitCode(async (stepsFile, options) => {
|
|
71
|
+
const { runProofSteps } = await import("./proof/step-runner.js");
|
|
72
|
+
return {
|
|
73
|
+
exitCode: await runProofSteps({
|
|
74
|
+
workspaceRoot: process.env.KIBI_PROOF_WORKSPACE ?? process.cwd(),
|
|
75
|
+
stepsPath: stepsFile,
|
|
76
|
+
...(options.test === undefined ? {} : { testIds: options.test }),
|
|
77
|
+
}),
|
|
78
|
+
};
|
|
79
|
+
}));
|
|
61
80
|
proof
|
|
62
81
|
.command("explain")
|
|
63
82
|
.description("Project one requirement or symbol proof, labeling required_proofs, executable_for, and covered_by separately")
|
|
@@ -75,13 +94,6 @@ export function registerProofCommand(program) {
|
|
|
75
94
|
json: options.json === true,
|
|
76
95
|
});
|
|
77
96
|
}));
|
|
78
|
-
proof
|
|
79
|
-
.command("impact")
|
|
80
|
-
.description("Compare current proof state to HEAD:proof/baseline.json")
|
|
81
|
-
.option("--json", "Emit structured JSON", false)
|
|
82
|
-
.action(withExitCode(async (options) => {
|
|
83
|
-
return await (await import("./commands/proof-impact.js")).proofImpactCommand({ json: options.json === true });
|
|
84
|
-
}));
|
|
85
97
|
proof
|
|
86
98
|
.command("prune")
|
|
87
99
|
.description("Shrink each test's proof_receipts history to its newest entries (re-proving the same snapshot appends duplicates; prune removes the superseded ones)")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-register-reporting.d.ts","sourceRoot":"","sources":["../src/cli-register-reporting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"cli-register-reporting.d.ts","sourceRoot":"","sources":["../src/cli-register-reporting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuRhE"}
|
|
@@ -43,6 +43,7 @@ export function registerReportingCommands(program) {
|
|
|
43
43
|
.option("--open", "Open the generated report in the default browser", false)
|
|
44
44
|
.option("--tag <tags>", "Comma-separated tag filter")
|
|
45
45
|
.option("--limit <n>", "Maximum complete requirement rows (1-100000)", "10000")
|
|
46
|
+
.option("--certificates <file>", "Publish a kibi check --write-certificates bundle next to the report and link it")
|
|
46
47
|
.action(async (options) => {
|
|
47
48
|
await (await import("./commands/report.js")).reportCommand(options);
|
|
48
49
|
});
|
|
@@ -120,6 +121,7 @@ export function registerReportingCommands(program) {
|
|
|
120
121
|
.option("--min-links <n>", "Minimum number of links required for symbol coverage", "1")
|
|
121
122
|
.option("--dry-run", "Do not modify files; only print what would happen")
|
|
122
123
|
.option("--format <format>", "Output format: text|json", "text")
|
|
124
|
+
.option("--fresh-evidence", "evidence-floor judges receipts as they are (stale receipts fail) and needs a clean proof snapshot; run it after kibi prove")
|
|
123
125
|
.option("--write-certificates <file>", "Also save the kibi.certificates.v1 bundle the kb-consistency rule re-checked")
|
|
124
126
|
.option("--certificates <file>", "Only re-check a saved kibi.certificates.v1 bundle against the current KB with the independent checker")
|
|
125
127
|
.action(withExitCode(async (options, command) => {
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAUrD;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,SAAS,EAAE,MAAM,GAChB,OAAO,CAIT;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAM7D;AAGD,wBAAgB,YAAY,IAAI,OAAO,CAiBtC;AAGD,wBAAsB,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAqB3C;AAED,wBAAsB,kBAAkB,CACtC,YAAY,UAAoD,EAChE,KAAK,cAAO,GACX,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
package/dist/cli.js
CHANGED
|
@@ -28,6 +28,7 @@ import { registerProofCommand } from "./cli-register-proof.js";
|
|
|
28
28
|
import { registerReportingCommands } from "./cli-register-reporting.js";
|
|
29
29
|
import { registerSkillsCommands } from "./cli-register-skills.js";
|
|
30
30
|
import { bootstrapKibiEnvironment } from "./env/bootstrap.js";
|
|
31
|
+
import { resolveWorkspaceCwd } from "./workspace-cwd.js";
|
|
31
32
|
const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
32
33
|
export function packageVersion(value) {
|
|
33
34
|
if (value !== null &&
|
|
@@ -65,10 +66,13 @@ export function buildProgram() {
|
|
|
65
66
|
}
|
|
66
67
|
// implements REQ-kibi-operation-interface-parity
|
|
67
68
|
export async function main() {
|
|
69
|
+
const workspace = resolveWorkspaceCwd(process.argv, process.cwd(), process.env);
|
|
70
|
+
if (workspace.cwd !== process.cwd())
|
|
71
|
+
process.chdir(workspace.cwd);
|
|
68
72
|
bootstrapKibiEnvironment();
|
|
69
73
|
let exitCode = process.exitCode ?? 0;
|
|
70
74
|
try {
|
|
71
|
-
await buildProgram().parseAsync(
|
|
75
|
+
await buildProgram().parseAsync(workspace.argv);
|
|
72
76
|
exitCode = process.exitCode ?? 0;
|
|
73
77
|
}
|
|
74
78
|
catch (error) {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Check the staged symbols manifest for exactly one captured Git index tree:
|
|
3
|
+
* it is in the canonical layout sync writes, and the derived coordinate
|
|
4
|
+
* artifact is not tracked.
|
|
5
|
+
*/
|
|
2
6
|
export declare function checkGeneratedManifests(options?: {
|
|
3
7
|
changedOnly?: boolean;
|
|
4
8
|
}): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-generated.d.ts","sourceRoot":"","sources":["../../src/commands/check-generated.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-generated.d.ts","sourceRoot":"","sources":["../../src/commands/check-generated.ts"],"names":[],"mappings":"AAyHA;;;;GAIG;AAGH,wBAAsB,uBAAuB,CAC3C,OAAO,GAAE;IACP,WAAW,CAAC,EAAE,OAAO,CAAC;CAClB,GACL,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA8H/B"}
|
|
@@ -3,13 +3,10 @@ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
import { load as parseYAML } from "js-yaml";
|
|
6
|
-
import { enrichSymbolCoordinates } from "../extractors/symbols-coordinator.js";
|
|
7
|
-
import { createMaintenanceSourceAnalysisService, fingerprintMaintenanceSourceSet, readSnapshotSourceConfig, } from "../plugins/maintenance-source-analysis.js";
|
|
8
6
|
import { captureStagedSnapshot } from "../traceability/git-change-snapshot.js";
|
|
9
|
-
import {
|
|
10
|
-
import { createReviewedDecoratorCoordinateVerifier } from "../traceability/reviewed-coordinate-refresh.js";
|
|
7
|
+
import { KB_PATHS } from "../utils/kb-paths.js";
|
|
11
8
|
import { refreshManifestCoordinates } from "./sync/manifest.js";
|
|
12
|
-
const MANIFESTS = [
|
|
9
|
+
const MANIFESTS = [KB_PATHS.symbolsManifest];
|
|
13
10
|
const MAX_GIT_OUTPUT = 256 * 1024 * 1024;
|
|
14
11
|
function git(args, input) {
|
|
15
12
|
const result = spawnSync("git", args, {
|
|
@@ -97,8 +94,13 @@ function sourcePaths(symbols) {
|
|
|
97
94
|
}
|
|
98
95
|
return { paths: [...sources], symbolCount: parsed.symbols.length };
|
|
99
96
|
}
|
|
100
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Check the staged symbols manifest for exactly one captured Git index tree:
|
|
99
|
+
* it is in the canonical layout sync writes, and the derived coordinate
|
|
100
|
+
* artifact is not tracked.
|
|
101
|
+
*/
|
|
101
102
|
// implements REQ-cli-check
|
|
103
|
+
// implements REQ-symbol-coordinates-derived-locally
|
|
102
104
|
export async function checkGeneratedManifests(options = {}) {
|
|
103
105
|
let snapshotDir;
|
|
104
106
|
try {
|
|
@@ -116,16 +118,21 @@ export async function checkGeneratedManifests(options = {}) {
|
|
|
116
118
|
const symbolsOid = blobs.get(MANIFESTS[0]);
|
|
117
119
|
if (!symbolsOid)
|
|
118
120
|
throw new Error("Staged .kb/symbols.yaml is missing or is not a regular file");
|
|
121
|
+
if (blobs.has(KB_PATHS.symbolCoordinates)) {
|
|
122
|
+
assertUnchanged();
|
|
123
|
+
console.error(`kibi: ${KB_PATHS.symbolCoordinates} is staged, but symbol coordinates are derived locally and never committed.`);
|
|
124
|
+
console.error(`Run kibi migrate (or git rm --cached ${KB_PATHS.symbolCoordinates} and add it to .gitignore), then commit again.`);
|
|
125
|
+
return { exitCode: 1 };
|
|
126
|
+
}
|
|
119
127
|
const initial = readBlobs([symbolsOid]);
|
|
120
128
|
const symbols = initial.get(symbolsOid);
|
|
121
129
|
if (!symbols)
|
|
122
130
|
throw new Error("Could not read staged .kb/symbols.yaml");
|
|
123
131
|
const { paths: sources, symbolCount } = sourcePaths(symbols);
|
|
124
|
-
//
|
|
125
|
-
// initialized, empty symbols manifest. The first commit must remain usable.
|
|
132
|
+
// A freshly initialized, empty symbols manifest has nothing to normalize.
|
|
126
133
|
if (symbolCount === 0) {
|
|
127
134
|
assertUnchanged();
|
|
128
|
-
console.log("kibi: staged symbols manifest is empty;
|
|
135
|
+
console.log("kibi: staged symbols manifest is empty; nothing to check.");
|
|
129
136
|
return { exitCode: 0 };
|
|
130
137
|
}
|
|
131
138
|
const nonRegularEntries = [...nonRegularPaths];
|
|
@@ -134,13 +141,13 @@ export async function checkGeneratedManifests(options = {}) {
|
|
|
134
141
|
throw new Error(`Staged symbol source is not a regular file: ${nonRegular}`);
|
|
135
142
|
if (options.changedOnly) {
|
|
136
143
|
const changed = new Set(snapshot.inventory.map((file) => file.path));
|
|
137
|
-
if (![...MANIFESTS,
|
|
144
|
+
if (![...MANIFESTS, KB_PATHS.symbolCoordinates].some((file) => changed.has(file))) {
|
|
138
145
|
assertUnchanged();
|
|
139
|
-
console.log("kibi:
|
|
146
|
+
console.log("kibi: staged symbols manifest unchanged.");
|
|
140
147
|
return { exitCode: 0 };
|
|
141
148
|
}
|
|
142
149
|
}
|
|
143
|
-
const files = [...MANIFESTS
|
|
150
|
+
const files = [...MANIFESTS];
|
|
144
151
|
const objectIds = [
|
|
145
152
|
...new Set(files
|
|
146
153
|
.map((file) => blobs.get(file))
|
|
@@ -159,28 +166,10 @@ export async function checkGeneratedManifests(options = {}) {
|
|
|
159
166
|
throw new Error(`Could not read staged blob for ${file}`);
|
|
160
167
|
writeFileSync(target, bytes);
|
|
161
168
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const trustedSourceConfig = readSnapshotSourceConfig(snapshot, snapshot.baseTree);
|
|
167
|
-
const trustedService = createMaintenanceSourceAnalysisService(process.cwd(), trustedSourceConfig);
|
|
168
|
-
verifyReviewedCoordinates = createReviewedDecoratorCoordinateVerifier(snapshot, trustedService, {
|
|
169
|
-
providerSetFingerprint: fingerprintMaintenanceSourceSet(process.cwd(), trustedSourceConfig),
|
|
170
|
-
evaluatorFingerprint: fingerprintImpactEvaluator(),
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
await verifyReviewedCoordinates(sourcePath, analysis);
|
|
174
|
-
};
|
|
175
|
-
await refreshManifestCoordinates(path.join(snapshotDir, MANIFESTS[0]), snapshotDir, {
|
|
176
|
-
refreshSymbolCoordinates: true,
|
|
177
|
-
quiet: true,
|
|
178
|
-
enrichSymbolCoordinates: (entries, root) => enrichSymbolCoordinates(entries, root, {
|
|
179
|
-
sourceAnalysisService,
|
|
180
|
-
allowPythonDecoratorCoordinates: true,
|
|
181
|
-
verifyPythonDecoratorCoordinates,
|
|
182
|
-
}),
|
|
183
|
-
});
|
|
169
|
+
// Normalize the staged manifest the way `kibi sync
|
|
170
|
+
// --refresh-symbol-coordinates` writes it. Coordinates are not compared:
|
|
171
|
+
// they are derived locally and never committed, so no extraction runs.
|
|
172
|
+
await refreshManifestCoordinates(path.join(snapshotDir, MANIFESTS[0]), snapshotDir, { quiet: true, enrichSymbolCoordinates: async (entries) => entries });
|
|
184
173
|
const materializedRoot = snapshotDir;
|
|
185
174
|
const drift = MANIFESTS.filter((file) => {
|
|
186
175
|
const generatedPath = path.join(materializedRoot, file);
|
|
@@ -198,7 +187,7 @@ export async function checkGeneratedManifests(options = {}) {
|
|
|
198
187
|
assertUnchanged();
|
|
199
188
|
if (drift.length > 0) {
|
|
200
189
|
console.error(`kibi: generated manifest drift in staged snapshot: ${drift.join(", ")}`);
|
|
201
|
-
console.error("Run kibi sync --refresh-symbol-coordinates, review the diff, then stage only the intended hunks with git add -p (or git add <path> when the whole file is intended).");
|
|
190
|
+
console.error("Run kibi sync --refresh-symbol-coordinates to rewrite the manifest in its canonical layout, review the diff, then stage only the intended hunks with git add -p (or git add <path> when the whole file is intended).");
|
|
202
191
|
return { exitCode: 1 };
|
|
203
192
|
}
|
|
204
193
|
console.log("kibi: staged generated manifests are current.");
|
package/dist/commands/check.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface CheckOptions {
|
|
|
9
9
|
minLinks?: string | number;
|
|
10
10
|
dryRun?: boolean;
|
|
11
11
|
format?: "text" | "json";
|
|
12
|
+
freshEvidence?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare function requireActiveProlog<E, P>(engine: E | null | undefined, prolog: P | null | undefined): NonNullable<E | P>;
|
|
14
15
|
export declare function checkCommand(options: CheckOptions): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAsF7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA6hBD,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC5B,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAC3B,WAAW,CAAC,CAAC,GAA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 @@ import { PrologProcess } from "../prolog.js";
|
|
|
25
25
|
import { escapeAtom, normalizeEntityId, parseTriples, parseViolationRows, } from "../prolog/codec.js";
|
|
26
26
|
import { createSemanticReviewDiagnostics, createSymbolGranularityDiagnostics, createSymbolQualityDiagnostics, hasBlockingImpactDiagnostics, } from "../public/impact-diagnostics.js";
|
|
27
27
|
import { executeCheck } from "../public/operations/check-executor.js";
|
|
28
|
-
import {
|
|
28
|
+
import { EVIDENCE_FLOOR_RULE } from "../public/operations/evidence-floor.js";
|
|
29
|
+
import { nodeFilesystem, nodeGit } from "../public/operations/node-ports.js";
|
|
29
30
|
import { refreshDetachedSnapshot } from "../runtime/detached-snapshot.js";
|
|
30
31
|
import { amendsRootCommit } from "../traceability/commit-amend.js";
|
|
31
32
|
import { KIBI_NO_IMPACT_DECLARATION, KIBI_SYMBOLS_MANIFEST_PATH, KIBI_SYMBOL_COORDINATES_PATH, } from "../traceability/evidence-model.js";
|
|
@@ -927,13 +928,18 @@ export async function checkCommand(options) {
|
|
|
927
928
|
?.split(",")
|
|
928
929
|
.map((rule) => rule.trim())
|
|
929
930
|
.filter((rule) => rule.length > 0);
|
|
930
|
-
const result = await executeCheck(
|
|
931
|
+
const result = await executeCheck({
|
|
932
|
+
...(rules === undefined ? {} : { rules }),
|
|
933
|
+
...(options.freshEvidence === true ? { freshEvidence: true } : {}),
|
|
934
|
+
}, {
|
|
931
935
|
workspaceRoot: process.cwd(),
|
|
932
936
|
signal: new AbortController().signal,
|
|
933
937
|
clock: () => new Date(),
|
|
934
|
-
// The workspace snapshot lets quality diagnostics
|
|
935
|
-
// proof receipt evidence as kibi coverage
|
|
938
|
+
// The workspace snapshot lets quality diagnostics and evidence-floor
|
|
939
|
+
// read the same proof receipt evidence as kibi coverage, with the
|
|
940
|
+
// same per-contract receipt binding.
|
|
936
941
|
git: nodeGit,
|
|
942
|
+
fs: nodeFilesystem,
|
|
937
943
|
prolog: {
|
|
938
944
|
query: (goal) => activeProlog.query(goal),
|
|
939
945
|
...(activeProlog instanceof EngineClient
|
|
@@ -975,7 +981,10 @@ export async function checkCommand(options) {
|
|
|
975
981
|
console.log(` Source: ${v.source}`);
|
|
976
982
|
}
|
|
977
983
|
console.log(` ${v.description}`);
|
|
978
|
-
|
|
984
|
+
// An evidence-floor finding names no fix in its description; its
|
|
985
|
+
// suggestion carries the proof gaps and the tests and symbols behind
|
|
986
|
+
// them, so it is always shown.
|
|
987
|
+
if (v.suggestion && (options.fix || v.rule === EVIDENCE_FLOOR_RULE)) {
|
|
979
988
|
console.log(` Suggestion: ${v.suggestion}`);
|
|
980
989
|
}
|
|
981
990
|
console.log();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery-table.d.ts","sourceRoot":"","sources":["../../src/commands/discovery-table.ts"],"names":[],"mappings":"AAIA,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAmCvE;AA4ED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACzC,MAAM,
|
|
1
|
+
{"version":3,"file":"discovery-table.d.ts","sourceRoot":"","sources":["../../src/commands/discovery-table.ts"],"names":[],"mappings":"AAIA,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAmCvE;AA4ED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACzC,MAAM,CAyGR"}
|
|
@@ -89,8 +89,30 @@ export function renderCoverageTable(payload) {
|
|
|
89
89
|
colWidths: [24, 16],
|
|
90
90
|
wordWrap: true,
|
|
91
91
|
});
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
// Traceability counts (scenario/test links) and proof counts (receipt
|
|
93
|
+
// evidence) use similar names, e.g. notApplicable vs proofNotApplicable:
|
|
94
|
+
// group them so the two families read apart.
|
|
95
|
+
// Link coverage judges only priority: must requirements; say so in the
|
|
96
|
+
// heading rather than as a row.
|
|
97
|
+
const mustOnly = summary.linkCoverageScope === "priority_must";
|
|
98
|
+
const entries = Object.entries(summary).filter(([key]) => key !== "linkCoverageScope");
|
|
99
|
+
const isProofKey = (key) => key.startsWith("proof") ||
|
|
100
|
+
key === "evidenceLevels" ||
|
|
101
|
+
key === "evidenceFloors";
|
|
102
|
+
const groups = [
|
|
103
|
+
[
|
|
104
|
+
mustOnly ? "Links (priority: must)" : "Traceability (links)",
|
|
105
|
+
entries.filter(([key]) => !isProofKey(key)),
|
|
106
|
+
],
|
|
107
|
+
["Proof (evidence)", entries.filter(([key]) => isProofKey(key))],
|
|
108
|
+
];
|
|
109
|
+
const grouped = groups.every(([, members]) => members.length > 0);
|
|
110
|
+
for (const [label, members] of groups) {
|
|
111
|
+
if (grouped)
|
|
112
|
+
summaryTable.push([label, ""]);
|
|
113
|
+
for (const [key, value] of members) {
|
|
114
|
+
summaryTable.push([grouped ? ` ${key}` : key, summaryCell(value)]);
|
|
115
|
+
}
|
|
94
116
|
}
|
|
95
117
|
const firstRow = firstFields(rows);
|
|
96
118
|
const isRequirementCoverage = firstRow !== undefined && Object.hasOwn(firstRow, "scenarioCount");
|
|
@@ -104,13 +126,14 @@ export function renderCoverageTable(payload) {
|
|
|
104
126
|
"Depth",
|
|
105
127
|
"Proof",
|
|
106
128
|
"Evidence",
|
|
129
|
+
"Floor",
|
|
107
130
|
"Scen",
|
|
108
131
|
"Tests",
|
|
109
132
|
"Symbols",
|
|
110
133
|
"Structural gaps",
|
|
111
134
|
"Proof gaps",
|
|
112
135
|
],
|
|
113
|
-
colWidths: [20, 12, 12, 18, 36, 12, 12, 8, 8, 10, 24, 36],
|
|
136
|
+
colWidths: [20, 12, 12, 18, 36, 12, 12, 12, 8, 8, 10, 24, 36],
|
|
114
137
|
wordWrap: true,
|
|
115
138
|
})
|
|
116
139
|
: new Table({
|
|
@@ -128,7 +151,8 @@ export function renderCoverageTable(payload) {
|
|
|
128
151
|
stringifyCell(item.coverageStatus),
|
|
129
152
|
stringifyCell(item.coverageDepth),
|
|
130
153
|
stringifyCell(item.proofStatus),
|
|
131
|
-
|
|
154
|
+
evidenceCell(item),
|
|
155
|
+
floorCell(item),
|
|
132
156
|
stringifyCell(item.scenarioCount),
|
|
133
157
|
stringifyCell(item.testCount),
|
|
134
158
|
stringifyCell(item.transitiveSymbolCount),
|
|
@@ -290,6 +314,29 @@ function stringifyCell(value) {
|
|
|
290
314
|
}
|
|
291
315
|
return String(value);
|
|
292
316
|
}
|
|
317
|
+
// implements REQ-kibi-claim-bound-proofs
|
|
318
|
+
// The evidence level, with how many applicable claims a certificate proves.
|
|
319
|
+
function evidenceCell(item) {
|
|
320
|
+
const level = stringifyCell(item.evidenceLevel);
|
|
321
|
+
const summary = item.claimSummary;
|
|
322
|
+
if (summary === null || typeof summary !== "object")
|
|
323
|
+
return level;
|
|
324
|
+
const { applicable, proved } = summary;
|
|
325
|
+
if (typeof applicable !== "number" || applicable === 0)
|
|
326
|
+
return level;
|
|
327
|
+
return `${level}\n${typeof proved === "number" ? proved : 0}/${applicable} claims proved`;
|
|
328
|
+
}
|
|
329
|
+
// implements REQ-kibi-evidence-floors
|
|
330
|
+
// The evidence floor and whether the level reaches it; empty without a floor.
|
|
331
|
+
function floorCell(item) {
|
|
332
|
+
const floor = item.evidenceFloor;
|
|
333
|
+
if (floor === null || typeof floor !== "object")
|
|
334
|
+
return "";
|
|
335
|
+
const { required, status } = floor;
|
|
336
|
+
if (typeof required !== "string" || required === "unverified")
|
|
337
|
+
return "";
|
|
338
|
+
return `${required} ${typeof status === "string" ? status.replaceAll("_", " ") : ""}`.trim();
|
|
339
|
+
}
|
|
293
340
|
// A nested summary count, such as evidenceLevels, reads as key=value pairs.
|
|
294
341
|
function summaryCell(value) {
|
|
295
342
|
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
package/dist/commands/doctor.js
CHANGED
|
@@ -30,7 +30,7 @@ import { branchStoreCompilation, inspectBranchStore, storeLockTakeoverReason, un
|
|
|
30
30
|
import { LEGACY_KB_MIGRATION_COMMAND, LEGACY_KB_MIGRATION_NOTE, } from "../utils/config.js";
|
|
31
31
|
import { resolveGitRepository, } from "../utils/git-repository-context.js";
|
|
32
32
|
import { readKbManifestStatus } from "../utils/kb-manifest.js";
|
|
33
|
-
import {
|
|
33
|
+
import { manifestMergeDriverGaps, mergeDriverSetup, } from "../utils/merge-driver-setup.js";
|
|
34
34
|
import { LATEST_KB_SCHEMA_VERSION } from "../utils/schema-version.js";
|
|
35
35
|
import { KIBI_HOOK_BEGIN, hasManagedHooks, outdatedManagedHooks, } from "./init-helpers.js";
|
|
36
36
|
import { planLegacyStorageMigration } from "./legacy-storage-migration.js";
|
|
@@ -447,14 +447,21 @@ function checkCapabilityPlugins() {
|
|
|
447
447
|
...new Set((config.plugins ?? []).map((plugin) => plugin.package)),
|
|
448
448
|
];
|
|
449
449
|
const missingSecrets = [];
|
|
450
|
+
// Secrets whose plugin only augments a builtin provider: without them the
|
|
451
|
+
// plugin is skipped and the builtin keeps working, so doctor warns.
|
|
452
|
+
const optionalMissingSecrets = [];
|
|
450
453
|
const legacySecrets = [];
|
|
451
454
|
for (const packageName of packages) {
|
|
452
455
|
const secrets = FIRST_PARTY_PLUGIN_SECRETS[packageName] ?? [];
|
|
453
456
|
for (const secret of secrets) {
|
|
454
457
|
const source = formatSecretSourcePart(secret, bootstrap);
|
|
455
458
|
parts.push(`${secret}=${source}`);
|
|
456
|
-
if (source === "missing")
|
|
457
|
-
|
|
459
|
+
if (source === "missing") {
|
|
460
|
+
const augmentOnly = rows
|
|
461
|
+
.filter((row) => row.package === packageName)
|
|
462
|
+
.every((row) => row.mode === "augment");
|
|
463
|
+
(augmentOnly ? optionalMissingSecrets : missingSecrets).push(secret);
|
|
464
|
+
}
|
|
458
465
|
if (source === "legacy_env")
|
|
459
466
|
legacySecrets.push(secret);
|
|
460
467
|
}
|
|
@@ -473,6 +480,14 @@ function checkCapabilityPlugins() {
|
|
|
473
480
|
: `Set missing plugin secret(s) (${missingSecrets.join(", ")}) in ~/.config/kibi/env or <workspace>/.env.kibi, then restart long-running Kibi MCP/host processes.`,
|
|
474
481
|
};
|
|
475
482
|
}
|
|
483
|
+
if (optionalMissingSecrets.length > 0) {
|
|
484
|
+
return {
|
|
485
|
+
passed: true,
|
|
486
|
+
warning: true,
|
|
487
|
+
message,
|
|
488
|
+
remediation: `${optionalMissingSecrets.join(", ")} is not set, so the augment-mode plugin is skipped and builtin providers answer alone. Set it in ~/.config/kibi/env or <workspace>/.env.kibi to enable the plugin, then restart long-running Kibi MCP/host processes.`,
|
|
489
|
+
};
|
|
490
|
+
}
|
|
476
491
|
if (legacySecrets.length > 0) {
|
|
477
492
|
return {
|
|
478
493
|
passed: true,
|
|
@@ -709,7 +724,7 @@ function checkManifestMergeDriver() {
|
|
|
709
724
|
passed: true,
|
|
710
725
|
warning: true,
|
|
711
726
|
message: `Not configured: ${gaps.join("; ")}. Merges of .kb/symbols.yaml fall back to line conflicts.`,
|
|
712
|
-
remediation:
|
|
727
|
+
remediation: mergeDriverSetup(process.cwd()),
|
|
713
728
|
};
|
|
714
729
|
}
|
|
715
730
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/init-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/init-helpers.ts"],"names":[],"mappings":"AA8IA,wBAAsB,gBAAgB,CACpC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,IAAI,CA0BN;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAGtD;AAED,uFAAuF;AACvF,wBAAgB,eAAe,CAA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ement boundary: commits are blocked only here via kibi check.
|
|
105
105
|
# The OpenCode plugin remains advisory and must not replace this gate.
|
|
106
106
|
# Behavior-changing source edits require staged Kibi impact evidence
|
|
107
|
-
# (KB entity docs under .kb/, authored symbols metadata
|
|
108
|
-
#
|
|
109
|
-
#
|
|
110
|
-
# traceability validation
|
|
107
|
+
# (KB entity docs under .kb/, or authored symbols metadata covering every
|
|
108
|
+
# staged declaration). Test-only and docs-only edits are exempt.
|
|
109
|
+
# The symbols manifest is checked against the exact staged snapshot before
|
|
110
|
+
# traceability validation; symbol coordinates are derived locally and never
|
|
111
|
+
# committed. The check never stages files on the user's behalf.
|
|
111
112
|
|
|
112
113
|
set -e
|
|
113
114
|
|
|
@@ -172,7 +173,8 @@ export function updateGitIgnore(cwd) {
|
|
|
172
173
|
// Derived runtime state stays ignored. Authored knowledge lanes, the
|
|
173
174
|
// symbols manifest, relationship shards, schema, and the lifecycle
|
|
174
175
|
// manifest stay committable. `.kb/migrations/` is derived runtime
|
|
175
|
-
// audit state
|
|
176
|
+
// audit state and `.kb/symbol-coordinates.yaml` is derived from source
|
|
177
|
+
// by every sync; neither is tracked project knowledge.
|
|
176
178
|
let updatedContent = stripLegacyKibiGitIgnoreStanza(gitignoreContent);
|
|
177
179
|
for (const entry of CANONICAL_DERIVED_GITIGNORE_ENTRIES) {
|
|
178
180
|
updatedContent = ensureEntry(updatedContent, entry);
|
|
@@ -191,6 +193,7 @@ const CANONICAL_DERIVED_GITIGNORE_ENTRIES = [
|
|
|
191
193
|
".kb/proof/runs/",
|
|
192
194
|
".kb/briefs/",
|
|
193
195
|
".kb/migrations/",
|
|
196
|
+
".kb/symbol-coordinates.yaml",
|
|
194
197
|
".kb/usage.log",
|
|
195
198
|
".env.kibi",
|
|
196
199
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrate.d.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