kibi-cli 2.1.0 → 2.3.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-loader.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +3 -0
- package/dist/cli-operation-metadata.d.ts +4 -0
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +5 -0
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +3 -2
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +4 -0
- package/dist/commands/aggregated-checks.d.ts +7 -0
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +25 -1
- package/dist/commands/check-diff.d.ts +5 -0
- package/dist/commands/check-diff.d.ts.map +1 -0
- package/dist/commands/check-diff.js +62 -0
- package/dist/commands/check-generated.d.ts.map +1 -1
- package/dist/commands/check-generated.js +41 -18
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +231 -86
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +168 -53
- package/dist/commands/github-init.d.ts +1 -1
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +10 -3
- package/dist/commands/init-helpers.d.ts +17 -2
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +123 -23
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +110 -15
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +10 -18
- package/dist/commands/sync/cache.d.ts +20 -1
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +51 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +1 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +3 -1
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +8 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +11 -3
- package/dist/engine.d.ts +41 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +377 -80
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +66 -28
- package/dist/extractors/markdown.d.ts +2 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +14 -3
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +1 -0
- package/dist/extractors/symbols-coordinator.d.ts +7 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +75 -39
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +68 -29
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +4 -3
- package/dist/operations/modeling/model-requirement.d.ts +1 -1
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +176 -10
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +14 -2
- package/dist/operations/modeling/predicate-inference-1.js +1 -1
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +24 -0
- package/dist/operations/modeling/predicate-types.d.ts +4 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-vocabulary.d.ts +54 -0
- package/dist/operations/modeling/predicate-vocabulary.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-vocabulary.js +169 -0
- package/dist/operations/modeling/requirement-types.d.ts +5 -0
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
- package/dist/operations/modeling/vocabulary-alignment.d.ts +60 -0
- package/dist/operations/modeling/vocabulary-alignment.d.ts.map +1 -0
- package/dist/operations/modeling/vocabulary-alignment.js +178 -0
- package/dist/operations/mutation/contradictions.d.ts +3 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +29 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +33 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +8 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.js +64 -0
- package/dist/operations/mutation/relationships.d.ts +1 -1
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +1 -0
- package/dist/operations/mutation/saga.d.ts +5 -0
- package/dist/operations/mutation/saga.d.ts.map +1 -1
- package/dist/operations/mutation/saga.js +10 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +2 -0
- package/dist/operations/mutation/source-authoring.d.ts +6 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +213 -52
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +5 -0
- package/dist/operations/mutation/types.d.ts +17 -0
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +6 -0
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +77 -11
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +24 -1
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +16 -3
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +66 -26
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +3 -1
- package/dist/operations/proof/code-scope.d.ts +17 -0
- package/dist/operations/proof/code-scope.d.ts.map +1 -0
- package/dist/operations/proof/code-scope.js +60 -0
- package/dist/operations/proof/ingest-proof.d.ts +4 -2
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +208 -74
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -1
- package/dist/operations/proof/migrate-legacy-receipts.js +7 -5
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
- package/dist/operations/proof/prune-receipts.js +7 -5
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +7 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +26 -4
- package/dist/operations/semantic-advisor/clauses.d.ts +1 -0
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +7 -1
- package/dist/performance-trace.d.ts +17 -0
- package/dist/performance-trace.d.ts.map +1 -0
- package/dist/performance-trace.js +134 -0
- package/dist/plugins/approved-source-analyzers.d.ts +13 -0
- package/dist/plugins/approved-source-analyzers.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts +71 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.js +77 -0
- package/dist/plugins/approved-source-analyzers.js +3 -0
- package/dist/plugins/compose-semantic-classifier.d.ts +6 -1
- package/dist/plugins/compose-semantic-classifier.d.ts.map +1 -1
- package/dist/plugins/compose-semantic-classifier.js +8 -3
- package/dist/plugins/compose-vocabulary-alignment.d.ts +23 -0
- package/dist/plugins/compose-vocabulary-alignment.d.ts.map +1 -0
- package/dist/plugins/compose-vocabulary-alignment.js +141 -0
- package/dist/plugins/external-allowlist.d.ts +7 -0
- package/dist/plugins/external-allowlist.d.ts.map +1 -1
- package/dist/plugins/external-allowlist.js +13 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/maintenance-source-analysis.d.ts +14 -0
- package/dist/plugins/maintenance-source-analysis.d.ts.map +1 -0
- package/dist/plugins/maintenance-source-analysis.js +191 -0
- package/dist/plugins/registry.d.ts +3 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +27 -1
- package/dist/plugins/source-analysis-service.d.ts +36 -1
- package/dist/plugins/source-analysis-service.d.ts.map +1 -1
- package/dist/plugins/source-analysis-service.js +184 -27
- package/dist/plugins/source-change-analysis.d.ts +15 -0
- package/dist/plugins/source-change-analysis.d.ts.map +1 -0
- package/dist/plugins/source-change-analysis.js +54 -0
- package/dist/plugins/source-classification.d.ts +41 -0
- package/dist/plugins/source-classification.d.ts.map +1 -0
- package/dist/plugins/source-classification.js +490 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -0
- package/dist/prolog/swipl-resolver.d.ts +88 -0
- package/dist/prolog/swipl-resolver.d.ts.map +1 -0
- package/dist/prolog/swipl-resolver.js +446 -0
- package/dist/prolog.d.ts +51 -1
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +145 -15
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +7 -25
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +56 -5
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +3 -1
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +4 -12
- package/dist/public/impact/manifest.d.ts.map +1 -1
- package/dist/public/impact/manifest.js +15 -1
- package/dist/public/impact/source-changes.d.ts.map +1 -1
- package/dist/public/impact/source-changes.js +35 -27
- package/dist/public/impact/types.d.ts +2 -0
- package/dist/public/impact/types.d.ts.map +1 -1
- package/dist/public/operations/catalog.d.ts +80 -7
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +2 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +10 -2
- package/dist/public/operations/check-helpers.d.ts +6 -0
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +21 -1
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +325 -8
- package/dist/public/operations/discovery-entities.d.ts +42 -2
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +195 -22
- package/dist/public/operations/discovery-executors.d.ts +1 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +75 -46
- package/dist/public/operations/impact-review-preparation.d.ts +14 -0
- package/dist/public/operations/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/impact-review-preparation.js +379 -0
- package/dist/public/operations/index.d.ts +2 -0
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +2 -0
- package/dist/public/operations/migration-plan.d.ts +2 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +50 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +1 -35
- package/dist/public/operations/predicate-schema-conformance.d.ts +41 -0
- package/dist/public/operations/predicate-schema-conformance.d.ts.map +1 -0
- package/dist/public/operations/predicate-schema-conformance.js +242 -0
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +9 -3
- package/dist/public/operations/proof-receipt-projection.d.ts +5 -0
- package/dist/public/operations/proof-receipt-projection.d.ts.map +1 -0
- package/dist/public/operations/proof-receipt-projection.js +36 -0
- package/dist/public/operations/result-envelope.d.ts +34 -1
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +78 -2
- package/dist/public/operations/runtime-types.d.ts +1 -1
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +8 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +7 -1
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +7 -1
- package/dist/public/operations/specs/impact-review-preparation.d.ts +47 -0
- package/dist/public/operations/specs/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/specs/impact-review-preparation.js +43 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts +27 -4
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +21 -3
- package/dist/public/operations/specs/reporting.d.ts +8 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +46 -15
- package/dist/public/operations/specs/upsert.d.ts +28 -5
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +1 -1
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +8 -3
- package/dist/public/operations/types.d.ts +1 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +22 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -0
- package/dist/public/skills/kibi-usage/SKILL.md +7 -3
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +1 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +21 -5
- package/dist/relationships/shards.d.ts +6 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +26 -19
- package/dist/schemas/entity.schema.json +32 -0
- package/dist/traceability/analysis-gate.d.ts +39 -0
- package/dist/traceability/analysis-gate.d.ts.map +1 -0
- package/dist/traceability/analysis-gate.js +51 -0
- package/dist/traceability/git-change-snapshot.d.ts +27 -0
- package/dist/traceability/git-change-snapshot.d.ts.map +1 -0
- package/dist/traceability/git-change-snapshot.js +411 -0
- package/dist/traceability/git-staged.d.ts +5 -1
- package/dist/traceability/git-staged.d.ts.map +1 -1
- package/dist/traceability/git-staged.js +16 -11
- package/dist/traceability/impact-evaluator.d.ts +54 -0
- package/dist/traceability/impact-evaluator.d.ts.map +1 -0
- package/dist/traceability/impact-evaluator.js +270 -0
- package/dist/traceability/impact-git-tree.d.ts +12 -0
- package/dist/traceability/impact-git-tree.d.ts.map +1 -0
- package/dist/traceability/impact-git-tree.js +46 -0
- package/dist/traceability/impact-knowledge.d.ts +16 -0
- package/dist/traceability/impact-knowledge.d.ts.map +1 -0
- package/dist/traceability/impact-knowledge.js +165 -0
- package/dist/traceability/impact-policy.d.ts +15 -0
- package/dist/traceability/impact-policy.d.ts.map +1 -0
- package/dist/traceability/impact-policy.js +48 -0
- package/dist/traceability/impact-policy.v1.schema.json +48 -0
- package/dist/traceability/impact-pr-diff.d.ts +5 -0
- package/dist/traceability/impact-pr-diff.d.ts.map +1 -0
- package/dist/traceability/impact-pr-diff.js +83 -0
- package/dist/traceability/impact-record-validation.d.ts +9 -0
- package/dist/traceability/impact-record-validation.d.ts.map +1 -0
- package/dist/traceability/impact-record-validation.js +113 -0
- package/dist/traceability/impact-review.d.ts +148 -0
- package/dist/traceability/impact-review.d.ts.map +1 -0
- package/dist/traceability/impact-review.js +494 -0
- package/dist/traceability/impact-review.schema.json +365 -0
- package/dist/traceability/impact-side-evidence.d.ts +13 -0
- package/dist/traceability/impact-side-evidence.d.ts.map +1 -0
- package/dist/traceability/impact-side-evidence.js +240 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts +10 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts.map +1 -0
- package/dist/traceability/reviewed-coordinate-refresh.js +49 -0
- package/dist/traceability/snapshot-knowledge.d.ts +4 -0
- package/dist/traceability/snapshot-knowledge.d.ts.map +1 -0
- package/dist/traceability/snapshot-knowledge.js +98 -0
- package/dist/traceability/staged-diagnostics.d.ts +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-entity-id-style.d.ts +12 -0
- package/dist/traceability/staged-entity-id-style.d.ts.map +1 -0
- package/dist/traceability/staged-entity-id-style.js +68 -0
- package/dist/traceability/staged-file-coverage.d.ts +23 -0
- package/dist/traceability/staged-file-coverage.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.js +2 -16
- package/dist/traceability/staged-symbols-manifest.d.ts +4 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +17 -6
- package/dist/traceability/symbol-extract.d.ts +3 -5
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +49 -34
- package/dist/traceability/temp-kb.d.ts +1 -1
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +57 -13
- package/dist/traceability/trusted-pr-event.d.ts +13 -0
- package/dist/traceability/trusted-pr-event.d.ts.map +1 -0
- package/dist/traceability/trusted-pr-event.js +105 -0
- package/dist/traceability/validate.js +1 -1
- package/dist/types/entities.d.ts +2 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/canonical-path.d.ts +3 -0
- package/dist/utils/canonical-path.d.ts.map +1 -0
- package/dist/utils/canonical-path.js +33 -0
- package/dist/utils/entity-id-style.d.ts +27 -0
- package/dist/utils/entity-id-style.d.ts.map +1 -0
- package/dist/utils/entity-id-style.js +81 -0
- package/dist/utils/git-repository-context.d.ts +50 -0
- package/dist/utils/git-repository-context.d.ts.map +1 -0
- package/dist/utils/git-repository-context.js +259 -0
- package/dist/utils/rule-registry.d.ts +5 -0
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.d.ts +37 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +44 -0
- package/dist/utils/strict-modeling.d.ts +7 -0
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +11 -0
- package/package.json +14 -5
- package/schema/entities.pl +60 -1
- package/schema/relationships.pl +17 -4
- package/schema/validation.pl +118 -20
- package/src/public/diagnostic-usage.ts +16 -24
- package/src/public/impact/analyzer.ts +88 -5
- package/src/public/impact/diagnostics.ts +7 -5
- package/src/public/impact/full-kb-quality.ts +4 -16
- package/src/public/impact/manifest.ts +14 -1
- package/src/public/impact/source-changes.ts +39 -34
- package/src/public/impact/types.ts +5 -0
- package/src/public/operations/catalog.ts +2 -0
- package/src/public/operations/check-executor.ts +12 -1
- package/src/public/operations/check-helpers.ts +27 -1
- package/src/public/operations/contracts.ts +404 -9
- package/src/public/operations/discovery-entities.ts +292 -23
- package/src/public/operations/discovery-executors.ts +91 -55
- package/src/public/operations/impact-review-preparation.ts +548 -0
- package/src/public/operations/index.ts +2 -0
- package/src/public/operations/migration-plan.ts +57 -0
- package/src/public/operations/node-ports.ts +1 -39
- package/src/public/operations/predicate-schema-conformance.ts +362 -0
- package/src/public/operations/prolog-json.ts +9 -3
- package/src/public/operations/proof-receipt-projection.ts +39 -0
- package/src/public/operations/result-envelope.ts +114 -2
- package/src/public/operations/runtime-types.ts +1 -1
- package/src/public/operations/specs/check-rules.generated.ts +8 -1
- package/src/public/operations/specs/discovery.ts +8 -1
- package/src/public/operations/specs/impact-review-preparation.ts +46 -0
- package/src/public/operations/specs/mutation-schemas.ts +23 -3
- package/src/public/operations/specs/reporting.ts +69 -22
- package/src/public/operations/specs/upsert.ts +1 -1
- package/src/public/operations/symbol-repair-plan.ts +13 -3
- package/src/public/operations/types.ts +1 -0
- package/src/public/schemas/entity.ts +22 -0
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skills/kibi-usage/SKILL.md +7 -3
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +1 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/src/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/src/public/telemetry-acceptance.ts +37 -6
- package/src/schemas/entity.schema.json +32 -0
- package/src/schemas/relationship.schema.json +1 -0
- package/src/traceability/impact-policy.v1.schema.json +48 -0
- package/src/traceability/impact-review.schema.json +365 -0
- package/templates/github/kibi-badge.yml +0 -4
- package/templates/github/kibi-report.yml +0 -4
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
partitionCheckFindings,
|
|
32
32
|
qualityDiagnosticsFromImpact,
|
|
33
33
|
resolveCheckRules,
|
|
34
|
+
stagedEntityIdStyleDiagnostics,
|
|
34
35
|
} from "./check-helpers.js";
|
|
35
36
|
import { executeStatus } from "./discovery-executors.js";
|
|
36
37
|
import {
|
|
@@ -38,6 +39,7 @@ import {
|
|
|
38
39
|
buildMigrationPlan,
|
|
39
40
|
mergeMigrationPlans,
|
|
40
41
|
} from "./migration-plan.js";
|
|
42
|
+
import { collectPredicateSchemaConformanceViolations } from "./predicate-schema-conformance.js";
|
|
41
43
|
import type { OperationContext, PrologPort } from "./runtime-types.js";
|
|
42
44
|
import { collectSourceRelationshipParityViolations } from "./source-relationship-parity.js";
|
|
43
45
|
import type { OperationResult } from "./types.js";
|
|
@@ -136,7 +138,10 @@ export async function executeCheck(
|
|
|
136
138
|
const rulesAllowlist = resolveCheckRules(args);
|
|
137
139
|
const hasExplicitRules = args.rules !== undefined;
|
|
138
140
|
const impactResult = await analyzeKbCheckImpact(workspaceRoot, args);
|
|
139
|
-
const impactQualityDiagnostics =
|
|
141
|
+
const impactQualityDiagnostics = [
|
|
142
|
+
...qualityDiagnosticsFromImpact(impactResult),
|
|
143
|
+
...stagedEntityIdStyleDiagnostics(workspaceRoot, args),
|
|
144
|
+
];
|
|
140
145
|
const maxDiagnosticsOption =
|
|
141
146
|
args.maxDiagnostics !== undefined
|
|
142
147
|
? { maxDiagnostics: args.maxDiagnostics }
|
|
@@ -201,10 +206,16 @@ export async function executeCheck(
|
|
|
201
206
|
)
|
|
202
207
|
? await collectSourceRelationshipParityViolations(workspaceRoot, prolog)
|
|
203
208
|
: [];
|
|
209
|
+
const predicateConformanceFindings = rulesAllowlist.has(
|
|
210
|
+
"predicate-schema-conformance",
|
|
211
|
+
)
|
|
212
|
+
? await collectPredicateSchemaConformanceViolations(prolog)
|
|
213
|
+
: [];
|
|
204
214
|
const partitioned = partitionCheckFindings([
|
|
205
215
|
...aggregatedFindings,
|
|
206
216
|
...queryPlanViolations,
|
|
207
217
|
...sourceRelationshipParityViolations,
|
|
218
|
+
...predicateConformanceFindings,
|
|
208
219
|
]);
|
|
209
220
|
const violations: Violation[] = partitioned.violations;
|
|
210
221
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
1
2
|
import { readFileSync } from "node:fs";
|
|
2
3
|
import { readFile } from "node:fs/promises";
|
|
3
4
|
import path from "node:path";
|
|
@@ -20,6 +21,8 @@ import path from "node:path";
|
|
|
20
21
|
*/
|
|
21
22
|
import { getKbPlPathOverride } from "../../env.js";
|
|
22
23
|
import { resolveKbPlPath } from "../../prolog.js";
|
|
24
|
+
import { getStagedFiles } from "../../traceability/git-staged.js";
|
|
25
|
+
import { createStagedEntityIdStyleDiagnostics } from "../../traceability/staged-entity-id-style.js";
|
|
23
26
|
import { analyzePrologQueryPlanSafety } from "../../utils/prolog-query-plan-safety.js";
|
|
24
27
|
import {
|
|
25
28
|
RULE_NAMES,
|
|
@@ -63,7 +66,7 @@ export function partitionCheckFindings(findings: readonly Violation[]): {
|
|
|
63
66
|
const definition = getRuleDefinition(finding.rule);
|
|
64
67
|
qualityDiagnostics.push({
|
|
65
68
|
id: `rule.${finding.rule}`,
|
|
66
|
-
severity: "warning",
|
|
69
|
+
severity: definition?.diagnosticSeverity ?? "warning",
|
|
67
70
|
blocking: false,
|
|
68
71
|
category: definition?.category ?? "integrity",
|
|
69
72
|
...(finding.entityId !== undefined ? { entityId: finding.entityId } : {}),
|
|
@@ -169,6 +172,29 @@ export async function analyzeKbCheckImpact(
|
|
|
169
172
|
});
|
|
170
173
|
}
|
|
171
174
|
|
|
175
|
+
/**
|
|
176
|
+
* Advisory naming-style review for entity Markdown staged as new. Runs only
|
|
177
|
+
* for `staged: true`, the creation boundary where a purely numeric ID can
|
|
178
|
+
* still be renamed cheaply; committed legacy entities are never evaluated.
|
|
179
|
+
*/
|
|
180
|
+
// implements REQ-kibi-entity-id-style
|
|
181
|
+
export function stagedEntityIdStyleDiagnostics(
|
|
182
|
+
workspaceRoot: string,
|
|
183
|
+
args: Pick<CheckInput, "staged">,
|
|
184
|
+
): readonly QualityDiagnostic[] {
|
|
185
|
+
if (args.staged !== true) return [];
|
|
186
|
+
try {
|
|
187
|
+
return createStagedEntityIdStyleDiagnostics(
|
|
188
|
+
getStagedFiles((command, options) =>
|
|
189
|
+
execSync(command, { ...options, cwd: workspaceRoot }),
|
|
190
|
+
),
|
|
191
|
+
);
|
|
192
|
+
} catch {
|
|
193
|
+
// Outside a Git work tree there is no staged creation boundary.
|
|
194
|
+
return [];
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
172
198
|
// implements REQ-mcp-tool-check
|
|
173
199
|
export function qualityDiagnosticsFromImpact(
|
|
174
200
|
impactResult: ChangedFileImpactResult | undefined,
|
|
@@ -20,6 +20,14 @@ const valueArray: OperationJsonSchema = {
|
|
|
20
20
|
type: "array",
|
|
21
21
|
items: anyValue,
|
|
22
22
|
};
|
|
23
|
+
const stringValue: OperationJsonSchema = { type: "string" };
|
|
24
|
+
const integerValue: OperationJsonSchema = { type: "integer" };
|
|
25
|
+
const numberValue: OperationJsonSchema = { type: "number" };
|
|
26
|
+
const booleanValue: OperationJsonSchema = { type: "boolean" };
|
|
27
|
+
const stringArray: OperationJsonSchema = {
|
|
28
|
+
type: "array",
|
|
29
|
+
items: stringValue,
|
|
30
|
+
};
|
|
23
31
|
|
|
24
32
|
function objectData(
|
|
25
33
|
properties: Readonly<Record<string, OperationJsonSchema>>,
|
|
@@ -33,6 +41,357 @@ function objectData(
|
|
|
33
41
|
};
|
|
34
42
|
}
|
|
35
43
|
|
|
44
|
+
const sha256Fingerprint: OperationJsonSchema = {
|
|
45
|
+
type: "string",
|
|
46
|
+
pattern: "^sha256:[0-9a-f]{64}$",
|
|
47
|
+
};
|
|
48
|
+
const gitObjectId: OperationJsonSchema = {
|
|
49
|
+
type: "string",
|
|
50
|
+
pattern: "^(?:[0-9a-f]{40}|[0-9a-f]{64})$",
|
|
51
|
+
};
|
|
52
|
+
const reviewRange = objectData({ start: integerValue, end: integerValue }, [
|
|
53
|
+
"start",
|
|
54
|
+
"end",
|
|
55
|
+
]);
|
|
56
|
+
const uncoveredReviewRange = objectData(
|
|
57
|
+
{
|
|
58
|
+
startLine: integerValue,
|
|
59
|
+
startColumn: integerValue,
|
|
60
|
+
endLine: integerValue,
|
|
61
|
+
endColumn: integerValue,
|
|
62
|
+
reason: stringValue,
|
|
63
|
+
},
|
|
64
|
+
["startLine", "startColumn", "endLine", "endColumn", "reason"],
|
|
65
|
+
);
|
|
66
|
+
const reviewAnalysis = objectData(
|
|
67
|
+
{
|
|
68
|
+
contractVersion: { const: "kibi.symbol-extractor.v2" },
|
|
69
|
+
status: { enum: ["ok", "partial", "unsupported", "failed"] },
|
|
70
|
+
language: stringValue,
|
|
71
|
+
sourceFile: stringValue,
|
|
72
|
+
providerId: { type: ["string", "null"] },
|
|
73
|
+
providerStamp: anyValue,
|
|
74
|
+
providerFingerprint: { oneOf: [sha256Fingerprint, { type: "null" }] },
|
|
75
|
+
inputFingerprint: sha256Fingerprint,
|
|
76
|
+
resultFingerprint: sha256Fingerprint,
|
|
77
|
+
diagnosticCodes: stringArray,
|
|
78
|
+
uncoveredRanges: {
|
|
79
|
+
type: "array",
|
|
80
|
+
items: uncoveredReviewRange,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
[
|
|
84
|
+
"contractVersion",
|
|
85
|
+
"status",
|
|
86
|
+
"language",
|
|
87
|
+
"sourceFile",
|
|
88
|
+
"providerId",
|
|
89
|
+
"providerStamp",
|
|
90
|
+
"providerFingerprint",
|
|
91
|
+
"inputFingerprint",
|
|
92
|
+
"resultFingerprint",
|
|
93
|
+
"diagnosticCodes",
|
|
94
|
+
"uncoveredRanges",
|
|
95
|
+
],
|
|
96
|
+
);
|
|
97
|
+
const reviewSideEvidence = objectData(
|
|
98
|
+
{
|
|
99
|
+
mode: { enum: ["100644", "100755", "120000", "160000"] },
|
|
100
|
+
objectId: { oneOf: [gitObjectId, { type: "null" }] },
|
|
101
|
+
byteFingerprint: sha256Fingerprint,
|
|
102
|
+
kind: { enum: ["regular", "symlink", "gitlink"] },
|
|
103
|
+
contentProjection: { const: "proof_receipts_stripped" },
|
|
104
|
+
analysis: { oneOf: [reviewAnalysis, { type: "null" }] },
|
|
105
|
+
},
|
|
106
|
+
["mode", "objectId", "byteFingerprint", "kind", "analysis"],
|
|
107
|
+
);
|
|
108
|
+
const reviewFileEvidence = {
|
|
109
|
+
...objectData(
|
|
110
|
+
{
|
|
111
|
+
path: stringValue,
|
|
112
|
+
status: { enum: ["A", "M", "R", "C", "T", "D"] },
|
|
113
|
+
oldPath: stringValue,
|
|
114
|
+
copyFromPath: stringValue,
|
|
115
|
+
analysisDepth: { enum: ["symbol", "metadata", "file", "none"] },
|
|
116
|
+
disposition: { enum: ["checked", "advisory", "skipped"] },
|
|
117
|
+
skipReason: {
|
|
118
|
+
enum: ["binary", "unsupported_encoding", "symlink", "submodule"],
|
|
119
|
+
},
|
|
120
|
+
gitMode: stringValue,
|
|
121
|
+
previousMode: stringValue,
|
|
122
|
+
oldHunkRanges: { type: "array", items: reviewRange },
|
|
123
|
+
newHunkRanges: { type: "array", items: reviewRange },
|
|
124
|
+
before: { oneOf: [reviewSideEvidence, { type: "null" }] },
|
|
125
|
+
after: { oneOf: [reviewSideEvidence, { type: "null" }] },
|
|
126
|
+
},
|
|
127
|
+
[
|
|
128
|
+
"path",
|
|
129
|
+
"status",
|
|
130
|
+
"analysisDepth",
|
|
131
|
+
"disposition",
|
|
132
|
+
"oldHunkRanges",
|
|
133
|
+
"newHunkRanges",
|
|
134
|
+
"before",
|
|
135
|
+
"after",
|
|
136
|
+
],
|
|
137
|
+
),
|
|
138
|
+
anyOf: [
|
|
139
|
+
{ properties: { before: reviewSideEvidence } },
|
|
140
|
+
{ properties: { after: reviewSideEvidence } },
|
|
141
|
+
],
|
|
142
|
+
};
|
|
143
|
+
const recordTemplateFile = {
|
|
144
|
+
...objectData(
|
|
145
|
+
{
|
|
146
|
+
...(((reviewFileEvidence as OperationJsonSchema).properties as Record<
|
|
147
|
+
string,
|
|
148
|
+
OperationJsonSchema
|
|
149
|
+
>) ?? {}),
|
|
150
|
+
analysisReviews: { type: "null" },
|
|
151
|
+
decision: { type: "null" },
|
|
152
|
+
},
|
|
153
|
+
[
|
|
154
|
+
"path",
|
|
155
|
+
"status",
|
|
156
|
+
"analysisDepth",
|
|
157
|
+
"disposition",
|
|
158
|
+
"oldHunkRanges",
|
|
159
|
+
"newHunkRanges",
|
|
160
|
+
"before",
|
|
161
|
+
"after",
|
|
162
|
+
"analysisReviews",
|
|
163
|
+
"decision",
|
|
164
|
+
],
|
|
165
|
+
),
|
|
166
|
+
anyOf: [
|
|
167
|
+
{ properties: { before: reviewSideEvidence } },
|
|
168
|
+
{ properties: { after: reviewSideEvidence } },
|
|
169
|
+
],
|
|
170
|
+
};
|
|
171
|
+
const impactRecordHeaders = objectData(
|
|
172
|
+
{
|
|
173
|
+
contractVersion: { const: "kibi.impact-review.v1" },
|
|
174
|
+
policy: objectData(
|
|
175
|
+
{
|
|
176
|
+
id: stringValue,
|
|
177
|
+
version: stringValue,
|
|
178
|
+
fingerprint: sha256Fingerprint,
|
|
179
|
+
},
|
|
180
|
+
["id", "version", "fingerprint"],
|
|
181
|
+
),
|
|
182
|
+
evaluator: objectData(
|
|
183
|
+
{
|
|
184
|
+
contractVersion: { const: "kibi.impact-evaluator.v1" },
|
|
185
|
+
fingerprint: sha256Fingerprint,
|
|
186
|
+
},
|
|
187
|
+
["contractVersion", "fingerprint"],
|
|
188
|
+
),
|
|
189
|
+
scope: objectData(
|
|
190
|
+
{
|
|
191
|
+
fingerprint: sha256Fingerprint,
|
|
192
|
+
knowledgeFingerprint: sha256Fingerprint,
|
|
193
|
+
providerSetFingerprint: sha256Fingerprint,
|
|
194
|
+
},
|
|
195
|
+
["fingerprint", "knowledgeFingerprint", "providerSetFingerprint"],
|
|
196
|
+
),
|
|
197
|
+
},
|
|
198
|
+
["contractVersion", "policy", "evaluator", "scope"],
|
|
199
|
+
);
|
|
200
|
+
const reviewSnapshotIdentity = objectData(
|
|
201
|
+
{
|
|
202
|
+
kind: { enum: ["staged", "diff"] },
|
|
203
|
+
baseCommit: { oneOf: [gitObjectId, { type: "null" }] },
|
|
204
|
+
baseTree: gitObjectId,
|
|
205
|
+
headCommit: { oneOf: [gitObjectId, { type: "null" }] },
|
|
206
|
+
headTree: gitObjectId,
|
|
207
|
+
headTreeSource: { enum: ["index", "commit"] },
|
|
208
|
+
},
|
|
209
|
+
[
|
|
210
|
+
"kind",
|
|
211
|
+
"baseCommit",
|
|
212
|
+
"baseTree",
|
|
213
|
+
"headCommit",
|
|
214
|
+
"headTree",
|
|
215
|
+
"headTreeSource",
|
|
216
|
+
],
|
|
217
|
+
);
|
|
218
|
+
const semanticEdge = objectData(
|
|
219
|
+
{ type: stringValue, from: stringValue, to: stringValue },
|
|
220
|
+
["type", "from", "to"],
|
|
221
|
+
);
|
|
222
|
+
const relatedRequirementEntity = objectData(
|
|
223
|
+
{
|
|
224
|
+
id: stringValue,
|
|
225
|
+
type: { oneOf: [stringValue, { type: "null" }] },
|
|
226
|
+
entityFingerprint: { oneOf: [sha256Fingerprint, { type: "null" }] },
|
|
227
|
+
artifactPath: { oneOf: [stringValue, { type: "null" }] },
|
|
228
|
+
sourcePath: { oneOf: [stringValue, { type: "null" }] },
|
|
229
|
+
entity: recordValue,
|
|
230
|
+
},
|
|
231
|
+
["id", "type", "entityFingerprint", "artifactPath", "sourcePath", "entity"],
|
|
232
|
+
);
|
|
233
|
+
const requirementContext = {
|
|
234
|
+
oneOf: [
|
|
235
|
+
objectData(
|
|
236
|
+
{
|
|
237
|
+
id: stringValue,
|
|
238
|
+
state: { const: "absent" },
|
|
239
|
+
entityFingerprint: { type: "null" },
|
|
240
|
+
artifactPath: { type: "null" },
|
|
241
|
+
sourcePath: { type: "null" },
|
|
242
|
+
relationships: { type: "array", items: semanticEdge },
|
|
243
|
+
relatedEntities: { type: "array", items: relatedRequirementEntity },
|
|
244
|
+
},
|
|
245
|
+
[
|
|
246
|
+
"id",
|
|
247
|
+
"state",
|
|
248
|
+
"entityFingerprint",
|
|
249
|
+
"artifactPath",
|
|
250
|
+
"sourcePath",
|
|
251
|
+
"relationships",
|
|
252
|
+
"relatedEntities",
|
|
253
|
+
],
|
|
254
|
+
),
|
|
255
|
+
objectData(
|
|
256
|
+
{
|
|
257
|
+
id: stringValue,
|
|
258
|
+
state: { const: "present" },
|
|
259
|
+
entityFingerprint: sha256Fingerprint,
|
|
260
|
+
artifactPath: stringValue,
|
|
261
|
+
sourcePath: { oneOf: [stringValue, { type: "null" }] },
|
|
262
|
+
entity: recordValue,
|
|
263
|
+
relationships: { type: "array", items: semanticEdge },
|
|
264
|
+
relatedEntities: { type: "array", items: relatedRequirementEntity },
|
|
265
|
+
},
|
|
266
|
+
[
|
|
267
|
+
"id",
|
|
268
|
+
"state",
|
|
269
|
+
"entityFingerprint",
|
|
270
|
+
"artifactPath",
|
|
271
|
+
"sourcePath",
|
|
272
|
+
"entity",
|
|
273
|
+
"relationships",
|
|
274
|
+
"relatedEntities",
|
|
275
|
+
],
|
|
276
|
+
),
|
|
277
|
+
],
|
|
278
|
+
};
|
|
279
|
+
const requirementScope = objectData(
|
|
280
|
+
{
|
|
281
|
+
path: stringValue,
|
|
282
|
+
requirementIds: stringArray,
|
|
283
|
+
before: { type: "array", items: requirementContext },
|
|
284
|
+
after: { type: "array", items: requirementContext },
|
|
285
|
+
},
|
|
286
|
+
["path", "requirementIds", "before", "after"],
|
|
287
|
+
);
|
|
288
|
+
const residualReviewObligation: OperationJsonSchema = {
|
|
289
|
+
oneOf: [
|
|
290
|
+
objectData(
|
|
291
|
+
{
|
|
292
|
+
path: stringValue,
|
|
293
|
+
side: { enum: ["before", "after"] },
|
|
294
|
+
status: { const: "unsupported" },
|
|
295
|
+
diagnosticCodes: stringArray,
|
|
296
|
+
kind: { const: "unsupported_review" },
|
|
297
|
+
wholeFile: { const: true },
|
|
298
|
+
pending: { const: true },
|
|
299
|
+
},
|
|
300
|
+
[
|
|
301
|
+
"path",
|
|
302
|
+
"side",
|
|
303
|
+
"status",
|
|
304
|
+
"diagnosticCodes",
|
|
305
|
+
"kind",
|
|
306
|
+
"wholeFile",
|
|
307
|
+
"pending",
|
|
308
|
+
],
|
|
309
|
+
),
|
|
310
|
+
objectData(
|
|
311
|
+
{
|
|
312
|
+
path: stringValue,
|
|
313
|
+
side: { enum: ["before", "after"] },
|
|
314
|
+
status: { const: "partial" },
|
|
315
|
+
diagnosticCodes: stringArray,
|
|
316
|
+
kind: { const: "partial_review" },
|
|
317
|
+
limitationClass: stringValue,
|
|
318
|
+
ranges: { type: "array", items: uncoveredReviewRange },
|
|
319
|
+
pending: { const: true },
|
|
320
|
+
},
|
|
321
|
+
[
|
|
322
|
+
"path",
|
|
323
|
+
"side",
|
|
324
|
+
"status",
|
|
325
|
+
"diagnosticCodes",
|
|
326
|
+
"kind",
|
|
327
|
+
"limitationClass",
|
|
328
|
+
"ranges",
|
|
329
|
+
"pending",
|
|
330
|
+
],
|
|
331
|
+
),
|
|
332
|
+
],
|
|
333
|
+
};
|
|
334
|
+
const unauthoredRecordTemplate = objectData(
|
|
335
|
+
{
|
|
336
|
+
contractVersion: { const: "kibi.impact-review.v1" },
|
|
337
|
+
policy: (
|
|
338
|
+
impactRecordHeaders.properties as Record<string, OperationJsonSchema>
|
|
339
|
+
).policy as OperationJsonSchema,
|
|
340
|
+
evaluator: (
|
|
341
|
+
impactRecordHeaders.properties as Record<string, OperationJsonSchema>
|
|
342
|
+
).evaluator as OperationJsonSchema,
|
|
343
|
+
scope: (
|
|
344
|
+
impactRecordHeaders.properties as Record<string, OperationJsonSchema>
|
|
345
|
+
).scope as OperationJsonSchema,
|
|
346
|
+
reviewer: objectData(
|
|
347
|
+
{ id: { type: "null" }, source: { const: "self-claimed-local" } },
|
|
348
|
+
["id", "source"],
|
|
349
|
+
),
|
|
350
|
+
reviewedAt: { type: "null" },
|
|
351
|
+
files: { type: "array", items: recordTemplateFile },
|
|
352
|
+
},
|
|
353
|
+
[
|
|
354
|
+
"contractVersion",
|
|
355
|
+
"policy",
|
|
356
|
+
"evaluator",
|
|
357
|
+
"scope",
|
|
358
|
+
"reviewer",
|
|
359
|
+
"reviewedAt",
|
|
360
|
+
"files",
|
|
361
|
+
],
|
|
362
|
+
);
|
|
363
|
+
const impactReviewAuthorship = objectData(
|
|
364
|
+
{
|
|
365
|
+
templateVersion: { const: "kibi.impact-review-authoring-template.v1" },
|
|
366
|
+
isValidImpactReviewRecord: { const: false },
|
|
367
|
+
instructions: stringValue,
|
|
368
|
+
authoredFields: stringArray,
|
|
369
|
+
recordSchema: recordValue,
|
|
370
|
+
decisionSchema: recordValue,
|
|
371
|
+
analysisReviewSchema: recordValue,
|
|
372
|
+
templateSchema: recordValue,
|
|
373
|
+
recordTemplate: objectData(
|
|
374
|
+
{
|
|
375
|
+
templateVersion: { const: "kibi.impact-review-authoring-template.v1" },
|
|
376
|
+
isValidImpactReviewRecord: { const: false },
|
|
377
|
+
record: unauthoredRecordTemplate,
|
|
378
|
+
},
|
|
379
|
+
["templateVersion", "isValidImpactReviewRecord", "record"],
|
|
380
|
+
),
|
|
381
|
+
},
|
|
382
|
+
[
|
|
383
|
+
"templateVersion",
|
|
384
|
+
"isValidImpactReviewRecord",
|
|
385
|
+
"instructions",
|
|
386
|
+
"authoredFields",
|
|
387
|
+
"recordSchema",
|
|
388
|
+
"decisionSchema",
|
|
389
|
+
"analysisReviewSchema",
|
|
390
|
+
"templateSchema",
|
|
391
|
+
"recordTemplate",
|
|
392
|
+
],
|
|
393
|
+
);
|
|
394
|
+
|
|
36
395
|
/**
|
|
37
396
|
* kibi.job.v1 receipt returned by async-mode operations (kb_check with
|
|
38
397
|
* `async: true`) instead of the synchronous payload. Agents poll
|
|
@@ -52,15 +411,6 @@ const jobReceiptData: OperationJsonSchema = objectData(
|
|
|
52
411
|
["kibiProtocol", "jobVersion", "jobId", "tool", "status", "pollWith"],
|
|
53
412
|
);
|
|
54
413
|
|
|
55
|
-
const stringValue: OperationJsonSchema = { type: "string" };
|
|
56
|
-
const integerValue: OperationJsonSchema = { type: "integer" };
|
|
57
|
-
const numberValue: OperationJsonSchema = { type: "number" };
|
|
58
|
-
const booleanValue: OperationJsonSchema = { type: "boolean" };
|
|
59
|
-
const stringArray: OperationJsonSchema = {
|
|
60
|
-
type: "array",
|
|
61
|
-
items: stringValue,
|
|
62
|
-
};
|
|
63
|
-
|
|
64
414
|
/** Preserve JSON Schema's nullable scalar/object representation in every
|
|
65
415
|
* generated consumer contract. Using a `type` union keeps the catalog
|
|
66
416
|
* readable and lets the MCP bridge round-trip the same wire schema. */
|
|
@@ -172,6 +522,24 @@ export const OPERATION_DATA_SCHEMAS: Readonly<
|
|
|
172
522
|
warnings: recordArray,
|
|
173
523
|
migrationWarning: { type: ["string", "null"] },
|
|
174
524
|
logic: recordValue,
|
|
525
|
+
vocabularyAlignment: objectData(
|
|
526
|
+
{
|
|
527
|
+
subject: recordValue,
|
|
528
|
+
redundancyCandidates: recordArray,
|
|
529
|
+
reviewPlan: recordArray,
|
|
530
|
+
stamps: recordArray,
|
|
531
|
+
fallbackUsed: booleanValue,
|
|
532
|
+
diagnostics: recordArray,
|
|
533
|
+
},
|
|
534
|
+
[
|
|
535
|
+
"subject",
|
|
536
|
+
"redundancyCandidates",
|
|
537
|
+
"reviewPlan",
|
|
538
|
+
"stamps",
|
|
539
|
+
"fallbackUsed",
|
|
540
|
+
"diagnostics",
|
|
541
|
+
],
|
|
542
|
+
),
|
|
175
543
|
}),
|
|
176
544
|
kb_suggest_predicates: objectData({
|
|
177
545
|
text: stringValue,
|
|
@@ -256,6 +624,7 @@ export const OPERATION_DATA_SCHEMAS: Readonly<
|
|
|
256
624
|
sourceWrites: recordArray,
|
|
257
625
|
deletionPlan: recordValue,
|
|
258
626
|
supersessionPlan: recordValue,
|
|
627
|
+
skippedEffects: stringArray,
|
|
259
628
|
status: stringValue,
|
|
260
629
|
effectFailures: recordArray,
|
|
261
630
|
nextActions: recordArray,
|
|
@@ -279,6 +648,31 @@ export const OPERATION_DATA_SCHEMAS: Readonly<
|
|
|
279
648
|
jobReceiptData,
|
|
280
649
|
],
|
|
281
650
|
},
|
|
651
|
+
kb_prepare_impact_review: objectData(
|
|
652
|
+
{
|
|
653
|
+
preparationVersion: { const: "kibi.impact-review-preparation.v1" },
|
|
654
|
+
status: { const: "ready_for_authoring" },
|
|
655
|
+
snapshot: reviewSnapshotIdentity,
|
|
656
|
+
recordHeaders: impactRecordHeaders,
|
|
657
|
+
files: { type: "array", items: reviewFileEvidence },
|
|
658
|
+
requirementScopes: { type: "array", items: requirementScope },
|
|
659
|
+
residualReviewObligations: {
|
|
660
|
+
type: "array",
|
|
661
|
+
items: residualReviewObligation,
|
|
662
|
+
},
|
|
663
|
+
authorship: impactReviewAuthorship,
|
|
664
|
+
},
|
|
665
|
+
[
|
|
666
|
+
"preparationVersion",
|
|
667
|
+
"status",
|
|
668
|
+
"snapshot",
|
|
669
|
+
"recordHeaders",
|
|
670
|
+
"files",
|
|
671
|
+
"requirementScopes",
|
|
672
|
+
"residualReviewObligations",
|
|
673
|
+
"authorship",
|
|
674
|
+
],
|
|
675
|
+
),
|
|
282
676
|
kb_compile_intent: objectData({
|
|
283
677
|
version: stringValue,
|
|
284
678
|
planHash: stringValue,
|
|
@@ -364,6 +758,7 @@ const EFFECT_OVERRIDES: Readonly<
|
|
|
364
758
|
"workspace-write": { destructive: true, retrySafety: "unsafe" },
|
|
365
759
|
},
|
|
366
760
|
kb_check: {},
|
|
761
|
+
kb_prepare_impact_review: {},
|
|
367
762
|
kb_compile_intent: {},
|
|
368
763
|
kb_apply_plan: {
|
|
369
764
|
"kb-write": { destructive: true, retrySafety: "unsafe" },
|