kibi-cli 0.19.0 → 2.0.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-errors.d.ts +3 -1
- package/dist/cli-errors.d.ts.map +1 -1
- package/dist/cli-errors.js +4 -1
- package/dist/cli-json-command.d.ts +1 -0
- package/dist/cli-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +13 -4
- package/dist/cli-operation-loader.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +53 -20
- package/dist/cli-operation-metadata.d.ts +21 -8
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +27 -10
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +38 -8
- package/dist/cli-register-foundation.d.ts.map +1 -1
- package/dist/cli-register-foundation.js +14 -2
- package/dist/cli-register-maintenance.d.ts.map +1 -1
- package/dist/cli-register-maintenance.js +33 -4
- package/dist/cli-register-proof.d.ts +3 -0
- package/dist/cli-register-proof.d.ts.map +1 -0
- package/dist/cli-register-proof.js +103 -0
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +11 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +17 -8
- package/dist/commands/aggregated-checks.d.ts +1 -2
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +14 -9
- package/dist/commands/branch.d.ts +37 -0
- package/dist/commands/branch.d.ts.map +1 -1
- package/dist/commands/branch.js +375 -40
- package/dist/commands/check.d.ts +14 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +209 -110
- package/dist/commands/coverage.d.ts +1 -0
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +6 -0
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +10 -19
- package/dist/commands/doctor.d.ts +26 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +291 -30
- package/dist/commands/engine.d.ts +12 -0
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +50 -7
- package/dist/commands/gc.d.ts +5 -2
- package/dist/commands/gc.d.ts.map +1 -1
- package/dist/commands/gc.js +140 -71
- package/dist/commands/github-init.d.ts +57 -0
- package/dist/commands/github-init.d.ts.map +1 -0
- package/dist/commands/github-init.js +314 -0
- package/dist/commands/init-helpers.d.ts +1 -1
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +109 -28
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +79 -24
- package/dist/commands/legacy-storage-migration.d.ts +54 -0
- package/dist/commands/legacy-storage-migration.d.ts.map +1 -0
- package/dist/commands/legacy-storage-migration.js +277 -0
- package/dist/commands/migrate.d.ts +11 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +249 -96
- package/dist/commands/proof-migrate-legacy.d.ts +7 -0
- package/dist/commands/proof-migrate-legacy.d.ts.map +1 -0
- package/dist/commands/proof-migrate-legacy.js +45 -0
- package/dist/commands/proof-prune.d.ts +8 -0
- package/dist/commands/proof-prune.d.ts.map +1 -0
- package/dist/commands/proof-prune.js +53 -0
- package/dist/commands/prove.d.ts +37 -0
- package/dist/commands/prove.d.ts.map +1 -0
- package/dist/commands/prove.js +470 -0
- package/dist/commands/report.d.ts +24 -0
- package/dist/commands/report.d.ts.map +1 -0
- package/dist/commands/report.js +191 -0
- package/dist/commands/sync/cache.d.ts +16 -3
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +111 -4
- package/dist/commands/sync/discovery.d.ts +26 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +204 -15
- package/dist/commands/sync/extraction.d.ts +8 -1
- package/dist/commands/sync/extraction.d.ts.map +1 -1
- package/dist/commands/sync/extraction.js +38 -4
- package/dist/commands/sync/manifest.d.ts +9 -6
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +195 -60
- package/dist/commands/sync/persistence.d.ts +4 -1
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +26 -12
- package/dist/commands/sync/staging.d.ts +1 -0
- package/dist/commands/sync/staging.d.ts.map +1 -1
- package/dist/commands/sync/staging.js +5 -2
- package/dist/commands/sync/untracked-targets.d.ts +24 -0
- package/dist/commands/sync/untracked-targets.d.ts.map +1 -0
- package/dist/commands/sync/untracked-targets.js +108 -0
- package/dist/commands/sync.d.ts +17 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +375 -106
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/engine-daemon.d.ts +3 -1
- package/dist/engine-daemon.d.ts.map +1 -1
- package/dist/engine-daemon.js +49 -20
- package/dist/engine.d.ts +34 -3
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +578 -42
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +5 -6
- package/dist/extractors/manifest.d.ts +13 -1
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +97 -10
- package/dist/extractors/markdown.d.ts +5 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +47 -12
- package/dist/extractors/playwright-cases.d.ts +24 -0
- package/dist/extractors/playwright-cases.d.ts.map +1 -0
- package/dist/extractors/playwright-cases.js +126 -0
- package/dist/extractors/relationships.d.ts +6 -0
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +2 -1
- package/dist/extractors/symbol-coordinates.d.ts +81 -3
- package/dist/extractors/symbol-coordinates.d.ts.map +1 -1
- package/dist/extractors/symbol-coordinates.js +389 -51
- package/dist/extractors/symbols-coordinator.js +11 -1
- package/dist/extractors/symbols-ts.d.ts +1 -0
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +142 -67
- package/dist/intent-search.d.ts +61 -0
- package/dist/intent-search.d.ts.map +1 -0
- package/dist/intent-search.js +437 -0
- package/dist/logic/ir.d.ts +1 -0
- package/dist/logic/ir.d.ts.map +1 -1
- package/dist/logic/ir.js +1 -1
- package/dist/operations/bootstrap/activation.d.ts +5 -0
- package/dist/operations/bootstrap/activation.d.ts.map +1 -0
- package/dist/operations/{autopilot → bootstrap}/activation.js +58 -33
- package/dist/operations/{autopilot → bootstrap}/candidate-helpers.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidates.d.ts +4 -0
- package/dist/operations/{autopilot → bootstrap}/candidates.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/candidates.js +22 -8
- package/dist/operations/{autopilot → bootstrap}/discovery-evidence.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/discovery-evidence.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/discovery-evidence.js +46 -6
- package/dist/operations/{autopilot → bootstrap}/discovery.d.ts +1 -1
- package/dist/operations/bootstrap/discovery.d.ts.map +1 -0
- package/dist/operations/{autopilot → bootstrap}/discovery.js +21 -14
- package/dist/operations/bootstrap/generate.d.ts +9 -0
- package/dist/operations/bootstrap/generate.d.ts.map +1 -0
- package/dist/operations/bootstrap/generate.js +207 -0
- package/dist/operations/{autopilot → bootstrap}/guidance-actions.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/guidance-actions.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/guidance-actions.js +4 -4
- package/dist/operations/{autopilot → bootstrap}/guidance.d.ts +3 -2
- package/dist/operations/bootstrap/guidance.d.ts.map +1 -0
- package/dist/operations/{autopilot → bootstrap}/guidance.js +3 -1
- package/dist/operations/{autopilot → bootstrap}/markdown-candidates.d.ts +2 -2
- package/dist/operations/{autopilot → bootstrap}/markdown-candidates.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/markdown-candidates.js +4 -3
- package/dist/operations/bootstrap/presentation.d.ts +15 -0
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -0
- package/dist/operations/bootstrap/presentation.js +177 -0
- package/dist/operations/{autopilot → bootstrap}/requirement-claims.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/types.d.ts +63 -21
- package/dist/operations/bootstrap/types.d.ts.map +1 -0
- package/dist/operations/bootstrap/types.js +25 -0
- package/dist/operations/modeling/model-requirement.d.ts +5 -0
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +57 -63
- package/dist/operations/modeling/predicate-applicability.d.ts +16 -0
- package/dist/operations/modeling/predicate-applicability.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-applicability.js +375 -0
- package/dist/operations/modeling/predicate-applyplan.d.ts +13 -2
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +100 -3
- package/dist/operations/modeling/predicate-bindings.d.ts +6 -0
- package/dist/operations/modeling/predicate-bindings.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-bindings.js +122 -0
- package/dist/operations/modeling/predicate-catalog-2.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-2.js +18 -2
- package/dist/operations/modeling/predicate-catalog-3.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-3.js +17 -1
- package/dist/operations/modeling/predicate-catalog-4.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-4.js +155 -0
- package/dist/operations/modeling/predicate-catalog-5.d.ts +10 -0
- package/dist/operations/modeling/predicate-catalog-5.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-5.js +291 -0
- package/dist/operations/modeling/predicate-catalog.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog.js +4 -0
- package/dist/operations/modeling/predicate-inference-1.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-inference-1.js +8 -0
- package/dist/operations/modeling/predicate-inference-launcher.d.ts +10 -0
- package/dist/operations/modeling/predicate-inference-launcher.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference-launcher.js +13 -0
- package/dist/operations/modeling/predicate-inference.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-inference.js +4 -0
- package/dist/operations/modeling/predicate-loader.d.ts +1 -0
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +11 -3
- package/dist/operations/modeling/predicate-ranker.d.ts +8 -1
- package/dist/operations/modeling/predicate-ranker.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-ranker.js +159 -24
- package/dist/operations/modeling/predicate-score-3.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-score-3.js +6 -0
- package/dist/operations/modeling/predicate-types.d.ts +35 -1
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-usage-hints-3.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-usage-hints-3.js +40 -0
- package/dist/operations/modeling/predicate-usage-hints-4.d.ts +3 -0
- package/dist/operations/modeling/predicate-usage-hints-4.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-usage-hints-4.js +84 -0
- package/dist/operations/modeling/predicate-utils.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-utils.js +2 -0
- package/dist/operations/modeling/suggest-predicates.d.ts +4 -2
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +203 -32
- package/dist/operations/mutation/contradictions.d.ts +2 -1
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +26 -5
- package/dist/operations/mutation/delete.d.ts +3 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +483 -19
- package/dist/operations/mutation/entity-projection.d.ts +11 -0
- package/dist/operations/mutation/entity-projection.d.ts.map +1 -0
- package/dist/operations/mutation/entity-projection.js +14 -0
- package/dist/operations/mutation/relationships.d.ts +11 -0
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +77 -5
- package/dist/operations/mutation/saga.d.ts +51 -0
- package/dist/operations/mutation/saga.d.ts.map +1 -0
- package/dist/operations/mutation/saga.js +67 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +3 -1
- package/dist/operations/mutation/source-authoring.d.ts +65 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -0
- package/dist/operations/mutation/source-authoring.js +576 -0
- package/dist/operations/mutation/strict-fact.d.ts +1 -0
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +8 -5
- package/dist/operations/mutation/symbol-compiler-lock.d.ts +54 -0
- package/dist/operations/mutation/symbol-compiler-lock.d.ts.map +1 -0
- package/dist/operations/mutation/symbol-compiler-lock.js +337 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +35 -4
- package/dist/operations/mutation/symbol-refresh.d.ts +19 -1
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-refresh.js +227 -63
- package/dist/operations/mutation/types.d.ts +57 -1
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +18 -2
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +403 -32
- package/dist/operations/mutation/validate-upsert.js +2 -2
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +47 -4
- package/dist/operations/mutation/warnings.d.ts +1 -0
- package/dist/operations/mutation/warnings.d.ts.map +1 -1
- package/dist/operations/mutation/warnings.js +7 -5
- package/dist/operations/mutation/workspace-mutation-lock.d.ts +60 -0
- package/dist/operations/mutation/workspace-mutation-lock.d.ts.map +1 -0
- package/dist/operations/mutation/workspace-mutation-lock.js +362 -0
- package/dist/operations/planning/apply-plan.d.ts +19 -0
- package/dist/operations/planning/apply-plan.d.ts.map +1 -0
- package/dist/operations/planning/apply-plan.js +1514 -0
- package/dist/operations/planning/compile-intent.d.ts +108 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -0
- package/dist/operations/planning/compile-intent.js +618 -0
- package/dist/operations/proof/ingest-proof.d.ts +34 -0
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -0
- package/dist/operations/proof/ingest-proof.js +307 -0
- package/dist/operations/proof/migrate-legacy-receipts.d.ts +30 -0
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -0
- package/dist/operations/proof/migrate-legacy-receipts.js +88 -0
- package/dist/operations/proof/prune-receipts.d.ts +35 -0
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -0
- package/dist/operations/proof/prune-receipts.js +91 -0
- package/dist/operations/proof/receipt-document.d.ts +29 -0
- package/dist/operations/proof/receipt-document.d.ts.map +1 -0
- package/dist/operations/proof/receipt-document.js +117 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +1 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +52 -28
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +35 -9
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.js +7 -3
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts +51 -0
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-launcher.js +96 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts +2 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/strict-count-rules.js +40 -25
- package/dist/operations/semantic-advisor/types.d.ts +13 -5
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/prolog/codec.d.ts +13 -1
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +269 -153
- package/dist/prolog/error-terms.d.ts +47 -0
- package/dist/prolog/error-terms.d.ts.map +1 -0
- package/dist/prolog/error-terms.js +334 -0
- package/dist/prolog/janitor.d.ts +50 -0
- package/dist/prolog/janitor.d.ts.map +1 -0
- package/dist/prolog/janitor.js +154 -0
- package/dist/prolog/store-lock.d.ts +45 -0
- package/dist/prolog/store-lock.d.ts.map +1 -0
- package/dist/prolog/store-lock.js +195 -0
- package/dist/prolog.d.ts +7 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +82 -25
- package/dist/proof/evaluate.d.ts +27 -0
- package/dist/proof/evaluate.d.ts.map +1 -0
- package/dist/proof/evaluate.js +151 -0
- package/dist/proof/inspect.d.ts +12 -0
- package/dist/proof/inspect.d.ts.map +1 -0
- package/dist/proof/inspect.js +236 -0
- package/dist/proof/integrations.d.ts +35 -0
- package/dist/proof/integrations.d.ts.map +1 -0
- package/dist/proof/integrations.js +123 -0
- package/dist/proof/producers/junit-adapter.d.ts +26 -0
- package/dist/proof/producers/junit-adapter.d.ts.map +1 -0
- package/dist/proof/producers/junit-adapter.js +186 -0
- package/dist/proof/producers/playwright-case-id.d.ts +8 -0
- package/dist/proof/producers/playwright-case-id.d.ts.map +1 -0
- package/dist/proof/producers/playwright-case-id.js +25 -0
- package/dist/proof/producers/playwright-reporter.d.ts +27 -0
- package/dist/proof/producers/playwright-reporter.d.ts.map +1 -0
- package/dist/proof/producers/playwright-reporter.js +138 -0
- package/dist/proof/producers/tap-adapter.d.ts +10 -0
- package/dist/proof/producers/tap-adapter.d.ts.map +1 -0
- package/dist/proof/producers/tap-adapter.js +200 -0
- package/dist/proof/receipt-outcome.d.ts +2 -0
- package/dist/proof/receipt-outcome.d.ts.map +1 -0
- package/dist/proof/receipt-outcome.js +1 -0
- package/dist/public/branch-resolver.d.ts +1 -0
- package/dist/public/branch-resolver.d.ts.map +1 -1
- package/dist/public/branch-resolver.js +1 -0
- package/dist/public/check-types.d.ts +2 -2
- package/dist/public/check-types.d.ts.map +1 -1
- package/dist/public/check-types.js +16 -16
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +74 -6
- package/dist/public/distribution-parity.d.ts +7 -1
- package/dist/public/distribution-parity.d.ts.map +1 -1
- package/dist/public/distribution-parity.js +15 -9
- package/dist/public/ignore-policy.d.ts.map +1 -1
- package/dist/public/ignore-policy.js +16 -4
- package/dist/public/impact/coverage-depth-quality.d.ts +7 -1
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
- package/dist/public/impact/coverage-depth-quality.js +22 -4
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +2 -2
- package/dist/public/impact/diff-meaning.d.ts +1 -0
- package/dist/public/impact/diff-meaning.d.ts.map +1 -1
- package/dist/public/impact/diff-meaning.js +5 -2
- package/dist/public/impact/full-kb-quality.d.ts +7 -2
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +364 -39
- package/dist/public/impact/manifest.d.ts.map +1 -1
- package/dist/public/impact/manifest.js +2 -5
- package/dist/public/operational-artifacts.d.ts.map +1 -1
- package/dist/public/operational-artifacts.js +7 -1
- package/dist/public/operations/catalog.d.ts +900 -34
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +130 -6
- package/dist/public/operations/check-executor.d.ts +2 -2
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +68 -13
- package/dist/public/operations/check-format-shared.d.ts +3 -0
- package/dist/public/operations/check-format-shared.d.ts.map +1 -1
- package/dist/public/operations/check-format-shared.js +3 -0
- package/dist/public/operations/check-helpers.d.ts +27 -2
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +62 -26
- package/dist/public/operations/contracts.d.ts +18 -0
- package/dist/public/operations/contracts.d.ts.map +1 -0
- package/dist/public/operations/contracts.js +334 -0
- package/dist/public/operations/discovery-entities.d.ts +3 -0
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +4 -0
- package/dist/public/operations/discovery-executors.d.ts +43 -7
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +216 -13
- package/dist/public/operations/index.d.ts +9 -4
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +8 -3
- package/dist/public/operations/migration-plan.d.ts +102 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -0
- package/dist/public/operations/migration-plan.js +539 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +71 -11
- package/dist/public/operations/prolog-json.d.ts +14 -0
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +44 -5
- package/dist/public/operations/repair-plan.d.ts +3 -3
- package/dist/public/operations/repair-plan.d.ts.map +1 -1
- package/dist/public/operations/repair-plan.js +49 -18
- package/dist/public/operations/result-envelope.d.ts +14 -0
- package/dist/public/operations/result-envelope.d.ts.map +1 -0
- package/dist/public/operations/result-envelope.js +106 -0
- package/dist/public/operations/runtime-types.d.ts +102 -7
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/source-relationship-parity.d.ts +13 -0
- package/dist/public/operations/source-relationship-parity.d.ts.map +1 -0
- package/dist/public/operations/source-relationship-parity.js +162 -0
- package/dist/public/operations/specs/{autopilot.d.ts → bootstrap.d.ts} +9 -9
- package/dist/public/operations/specs/bootstrap.d.ts.map +1 -0
- package/dist/public/operations/specs/{autopilot.js → bootstrap.js} +8 -7
- package/dist/public/operations/specs/check-rules.generated.d.ts +5 -0
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -0
- package/dist/public/operations/specs/check-rules.generated.js +34 -0
- package/dist/public/operations/specs/check.d.ts +9 -4
- package/dist/public/operations/specs/check.d.ts.map +1 -1
- package/dist/public/operations/specs/check.js +10 -21
- package/dist/public/operations/specs/discovery.d.ts +87 -3
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +53 -3
- package/dist/public/operations/specs/modeling.d.ts +3 -3
- package/dist/public/operations/specs/modeling.js +3 -3
- package/dist/public/operations/specs/mutation-schemas.d.ts +251 -14
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +16 -6
- package/dist/public/operations/specs/mutation.d.ts +42 -2
- package/dist/public/operations/specs/mutation.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation.js +26 -2
- package/dist/public/operations/specs/planning.d.ts +279 -0
- package/dist/public/operations/specs/planning.d.ts.map +1 -0
- package/dist/public/operations/specs/planning.js +197 -0
- package/dist/public/operations/specs/proof.d.ts +212 -0
- package/dist/public/operations/specs/proof.d.ts.map +1 -0
- package/dist/public/operations/specs/proof.js +30 -0
- package/dist/public/operations/specs/reporting.d.ts +23 -1
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +156 -11
- package/dist/public/operations/specs/upsert.d.ts +265 -14
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +9 -0
- package/dist/public/operations/symbol-repair-plan.d.ts +22 -0
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -0
- package/dist/public/operations/symbol-repair-plan.js +238 -0
- package/dist/public/operations/types.d.ts +52 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/proof-fingerprint.d.ts +54 -0
- package/dist/public/proof-fingerprint.d.ts.map +1 -0
- package/dist/public/proof-fingerprint.js +141 -0
- package/dist/public/proof-protocol.d.ts +354 -0
- package/dist/public/proof-protocol.d.ts.map +1 -0
- package/dist/public/proof-protocol.js +454 -0
- package/dist/public/proof-receipt.d.ts +279 -0
- package/dist/public/proof-receipt.d.ts.map +1 -0
- package/dist/public/proof-receipt.js +377 -0
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +22 -6
- package/dist/public/skills/kibi-bootstrap/SKILL.md +58 -0
- package/dist/public/skills/kibi-bootstrap/resources/bootstrap.md +11 -0
- package/dist/public/skills/kibi-bootstrap/resources/branch-lifecycle.md +7 -0
- package/dist/public/skills/kibi-bootstrap/resources/operation-access.md +5 -0
- package/dist/public/skills/kibi-bootstrap/resources/source-authoring.md +8 -0
- package/dist/public/skills/kibi-freshness/SKILL.md +39 -9
- package/dist/public/skills/kibi-freshness/resources/branch-lifecycle.md +7 -0
- package/dist/public/skills/kibi-freshness/resources/operation-access.md +6 -0
- package/dist/public/skills/kibi-freshness/resources/source-authoring.md +7 -0
- package/dist/public/skills/kibi-traceability/SKILL.md +47 -47
- package/dist/public/skills/kibi-traceability/resources/branch-lifecycle.md +7 -0
- package/dist/public/skills/kibi-traceability/resources/operation-access.md +5 -0
- package/dist/public/skills/kibi-traceability/resources/source-authoring.md +6 -0
- package/dist/public/skills/kibi-traceability/resources/traceability.md +8 -0
- package/dist/public/skills/kibi-usage/SKILL.md +136 -231
- package/dist/public/skills/kibi-usage/resources/branch-lifecycle.md +31 -0
- package/dist/public/skills/kibi-usage/resources/kb-improvement.md +38 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +36 -38
- package/dist/public/skills/kibi-usage/resources/proof.md +105 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +3 -3
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +31 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +57 -4
- package/dist/public/symbol-granularity.d.ts +3 -14
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.generated.d.ts +16 -0
- package/dist/public/symbol-granularity.generated.d.ts.map +1 -0
- package/dist/public/symbol-granularity.generated.js +20 -0
- package/dist/public/symbol-granularity.js +6 -46
- package/dist/public/telemetry-acceptance.d.ts +3 -70
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +11 -2
- package/dist/public/telemetry-remediation.js +1 -1
- package/dist/relationships/shards.d.ts +16 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +87 -2
- package/dist/report/brand.d.ts +19 -0
- package/dist/report/brand.d.ts.map +1 -0
- package/dist/report/brand.js +112 -0
- package/dist/report/html-report.css +282 -0
- package/dist/report/html-report.d.ts +21 -0
- package/dist/report/html-report.d.ts.map +1 -0
- package/dist/report/html-report.js +700 -0
- package/dist/report/relative-time.d.ts +4 -0
- package/dist/report/relative-time.d.ts.map +1 -0
- package/dist/report/relative-time.js +46 -0
- package/dist/report/report-view.d.ts +17 -0
- package/dist/report/report-view.d.ts.map +1 -0
- package/dist/report/report-view.js +33 -0
- package/dist/report/repository.d.ts +35 -0
- package/dist/report/repository.d.ts.map +1 -0
- package/dist/report/repository.js +151 -0
- package/dist/runtime/cli-runtime.d.ts +2 -0
- package/dist/runtime/cli-runtime.d.ts.map +1 -1
- package/dist/runtime/cli-runtime.js +90 -23
- package/dist/schemas/entity.schema.json +1254 -239
- package/dist/search-ranking.d.ts +1 -0
- package/dist/search-ranking.d.ts.map +1 -1
- package/dist/search-ranking.js +3 -0
- package/dist/traceability/evidence-model.d.ts +30 -2
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/evidence-model.js +2 -2
- package/dist/traceability/git-staged.d.ts +20 -0
- package/dist/traceability/git-staged.d.ts.map +1 -1
- package/dist/traceability/git-staged.js +156 -37
- package/dist/traceability/markdown-validate.d.ts.map +1 -1
- package/dist/traceability/markdown-validate.js +12 -7
- package/dist/traceability/staged-diagnostics.d.ts +7 -0
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +78 -7
- package/dist/traceability/staged-file-coverage.d.ts +33 -0
- package/dist/traceability/staged-file-coverage.d.ts.map +1 -0
- package/dist/traceability/staged-file-coverage.js +284 -0
- package/dist/traceability/staged-impact-contract.d.ts +3 -3
- package/dist/traceability/staged-impact-contract.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.js +12 -40
- package/dist/traceability/staged-symbols-manifest.d.ts +13 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +142 -26
- package/dist/traceability/symbol-extract.d.ts +5 -0
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +1 -1
- package/dist/traceability/temp-kb.d.ts +2 -0
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +14 -2
- package/dist/types/entities.d.ts +5 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/branch-resolver.d.ts +25 -10
- package/dist/utils/branch-resolver.d.ts.map +1 -1
- package/dist/utils/branch-resolver.js +124 -38
- package/dist/utils/branch-store-locator.d.ts +23 -0
- package/dist/utils/branch-store-locator.d.ts.map +1 -0
- package/dist/utils/branch-store-locator.js +90 -0
- package/dist/utils/branch-store.d.ts +21 -0
- package/dist/utils/branch-store.d.ts.map +1 -0
- package/dist/utils/branch-store.js +157 -0
- package/dist/utils/config.d.ts +39 -37
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +107 -119
- package/dist/utils/kb-manifest.d.ts +35 -0
- package/dist/utils/kb-manifest.d.ts.map +1 -0
- package/dist/utils/kb-manifest.js +154 -0
- package/dist/utils/kb-paths.d.ts +54 -0
- package/dist/utils/kb-paths.d.ts.map +1 -0
- package/dist/utils/kb-paths.js +125 -0
- package/dist/utils/manifest-paths.d.ts +4 -4
- package/dist/utils/manifest-paths.d.ts.map +1 -1
- package/dist/utils/manifest-paths.js +8 -56
- package/dist/utils/rule-registry.d.ts +42 -24
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.d.ts +97 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -0
- package/dist/utils/rule-registry.generated.js +125 -0
- package/dist/utils/rule-registry.js +52 -148
- package/dist/utils/schema-version.d.ts +5 -5
- package/dist/utils/schema-version.d.ts.map +1 -1
- package/dist/utils/schema-version.js +26 -6
- package/dist/utils/strict-modeling.d.ts +1 -4
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +8 -9
- package/package.json +47 -11
- package/schema/config.json +2 -2
- package/schema/manifest.json +26 -0
- package/src/public/branch-resolver.ts +1 -0
- package/src/public/check-types.ts +22 -19
- package/src/public/diagnostic-usage.ts +84 -6
- package/src/public/distribution-parity.ts +17 -9
- package/src/public/ignore-policy.ts +16 -10
- package/src/public/impact/coverage-depth-quality.ts +37 -1
- package/src/public/impact/diagnostics.ts +2 -1
- package/src/public/impact/diff-meaning.ts +11 -4
- package/src/public/impact/full-kb-quality.ts +545 -41
- package/src/public/impact/manifest.ts +2 -4
- package/src/public/operational-artifacts.ts +9 -1
- package/src/public/operations/catalog.ts +153 -10
- package/src/public/operations/check-executor.ts +98 -15
- package/src/public/operations/check-format-shared.ts +6 -0
- package/src/public/operations/check-helpers.ts +74 -35
- package/src/public/operations/contracts.ts +382 -0
- package/src/public/operations/discovery-entities.ts +7 -0
- package/src/public/operations/discovery-executors.ts +315 -25
- package/src/public/operations/index.ts +9 -4
- package/src/public/operations/migration-plan.ts +747 -0
- package/src/public/operations/node-ports.ts +87 -13
- package/src/public/operations/prolog-json.ts +60 -5
- package/src/public/operations/repair-plan.ts +60 -22
- package/src/public/operations/result-envelope.ts +141 -0
- package/src/public/operations/runtime-types.ts +96 -5
- package/src/public/operations/source-relationship-parity.ts +226 -0
- package/src/public/operations/specs/{autopilot.ts → bootstrap.ts} +17 -16
- package/src/public/operations/specs/check-rules.generated.ts +37 -0
- package/src/public/operations/specs/check.ts +14 -22
- package/src/public/operations/specs/discovery.ts +57 -3
- package/src/public/operations/specs/modeling.ts +3 -3
- package/src/public/operations/specs/mutation-schemas.ts +24 -6
- package/src/public/operations/specs/mutation.ts +27 -2
- package/src/public/operations/specs/planning.ts +241 -0
- package/src/public/operations/specs/proof.ts +43 -0
- package/src/public/operations/specs/reporting.ts +193 -12
- package/src/public/operations/specs/upsert.ts +10 -0
- package/src/public/operations/symbol-repair-plan.ts +324 -0
- package/src/public/operations/types.ts +62 -1
- package/src/public/proof-fingerprint.ts +216 -0
- package/src/public/proof-protocol-types.d.ts +96 -0
- package/src/public/proof-protocol.ts +589 -0
- package/src/public/proof-receipt.ts +499 -0
- package/src/public/schemas/entity.ts +27 -6
- package/src/public/skills/kibi-bootstrap/SKILL.md +58 -0
- package/src/public/skills/kibi-bootstrap/resources/bootstrap.md +11 -0
- package/src/public/skills/kibi-bootstrap/resources/branch-lifecycle.md +7 -0
- package/src/public/skills/kibi-bootstrap/resources/operation-access.md +5 -0
- package/src/public/skills/kibi-bootstrap/resources/source-authoring.md +8 -0
- package/src/public/skills/kibi-freshness/SKILL.md +39 -9
- package/src/public/skills/kibi-freshness/resources/branch-lifecycle.md +7 -0
- package/src/public/skills/kibi-freshness/resources/operation-access.md +6 -0
- package/src/public/skills/kibi-freshness/resources/source-authoring.md +7 -0
- package/src/public/skills/kibi-traceability/SKILL.md +47 -47
- package/src/public/skills/kibi-traceability/resources/branch-lifecycle.md +7 -0
- package/src/public/skills/kibi-traceability/resources/operation-access.md +5 -0
- package/src/public/skills/kibi-traceability/resources/source-authoring.md +6 -0
- package/src/public/skills/kibi-traceability/resources/traceability.md +8 -0
- package/src/public/skills/kibi-usage/SKILL.md +136 -231
- package/src/public/skills/kibi-usage/resources/branch-lifecycle.md +31 -0
- package/src/public/skills/kibi-usage/resources/kb-improvement.md +38 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +36 -38
- package/src/public/skills/kibi-usage/resources/proof.md +105 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +3 -3
- package/src/public/skills/kibi-usage/resources/source-authoring.md +31 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +57 -4
- package/src/public/symbol-granularity.generated.ts +41 -0
- package/src/public/symbol-granularity.ts +35 -59
- package/src/public/telemetry-acceptance-types.d.ts +98 -0
- package/src/public/telemetry-acceptance.ts +30 -93
- package/src/public/telemetry-remediation.ts +1 -1
- package/src/schemas/entity.schema.json +1254 -239
- package/templates/github/kibi-badge.yml +86 -0
- package/templates/github/kibi-report.yml +84 -0
- package/dist/operations/autopilot/activation.d.ts +0 -4
- package/dist/operations/autopilot/activation.d.ts.map +0 -1
- package/dist/operations/autopilot/candidates.d.ts +0 -4
- package/dist/operations/autopilot/discovery.d.ts.map +0 -1
- package/dist/operations/autopilot/generate.d.ts +0 -8
- package/dist/operations/autopilot/generate.d.ts.map +0 -1
- package/dist/operations/autopilot/generate.js +0 -112
- package/dist/operations/autopilot/guidance.d.ts.map +0 -1
- package/dist/operations/autopilot/presentation.d.ts +0 -13
- package/dist/operations/autopilot/presentation.d.ts.map +0 -1
- package/dist/operations/autopilot/presentation.js +0 -91
- package/dist/operations/autopilot/types.d.ts.map +0 -1
- package/dist/operations/autopilot/types.js +0 -8
- package/dist/public/operations/specs/autopilot.d.ts.map +0 -1
- package/dist/public/skills/init-kibi/SKILL.md +0 -62
- package/dist/public/verification-receipt.d.ts +0 -75
- package/dist/public/verification-receipt.d.ts.map +0 -1
- package/dist/public/verification-receipt.js +0 -129
- package/src/public/skills/init-kibi/SKILL.md +0 -62
- package/src/public/verification-receipt.ts +0 -170
- /package/dist/operations/{autopilot → bootstrap}/candidate-helpers.d.ts +0 -0
- /package/dist/operations/{autopilot → bootstrap}/candidate-helpers.js +0 -0
- /package/dist/operations/{autopilot → bootstrap}/requirement-claims.d.ts +0 -0
- /package/dist/operations/{autopilot → bootstrap}/requirement-claims.js +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { discoverSourceFiles } from "../../commands/sync/discovery.js";
|
|
4
|
+
import { processExtractions } from "../../commands/sync/extraction.js";
|
|
5
|
+
import { RELATIONSHIP_TYPES } from "../../operations/mutation/relationships.js";
|
|
6
|
+
import { parseListOfLists, parsePrologValue } from "../../prolog/codec.js";
|
|
7
|
+
import { readAllShards } from "../../relationships/shards.js";
|
|
8
|
+
function relationshipKey(relationship) {
|
|
9
|
+
return `${relationship.type}\u0000${relationship.from}\u0000${relationship.to}`;
|
|
10
|
+
}
|
|
11
|
+
function relationshipLabel(relationship) {
|
|
12
|
+
return `${relationship.type} ${relationship.from}->${relationship.to}`;
|
|
13
|
+
}
|
|
14
|
+
// implements REQ-kibi-source-relationship-parity
|
|
15
|
+
export function compareRelationshipParity(authored, compiled) {
|
|
16
|
+
const authoredByKey = new Map();
|
|
17
|
+
const compiledByKey = new Map();
|
|
18
|
+
for (const relationship of authored) {
|
|
19
|
+
authoredByKey.set(relationshipKey(relationship), relationship);
|
|
20
|
+
}
|
|
21
|
+
for (const relationship of compiled) {
|
|
22
|
+
compiledByKey.set(relationshipKey(relationship), relationship);
|
|
23
|
+
}
|
|
24
|
+
const violations = [];
|
|
25
|
+
for (const [key, relationship] of authoredByKey) {
|
|
26
|
+
if (compiledByKey.has(key))
|
|
27
|
+
continue;
|
|
28
|
+
violations.push({
|
|
29
|
+
rule: "source-relationship-parity",
|
|
30
|
+
entityId: relationship.from,
|
|
31
|
+
description: `Authored relationship is missing from the compiled KB: ${relationshipLabel(relationship)}`,
|
|
32
|
+
suggestion: "Run kibi sync after resolving semantic/source errors; do not delete authored links merely to make the compiled snapshot pass.",
|
|
33
|
+
...(relationship.source !== undefined
|
|
34
|
+
? { source: relationship.source }
|
|
35
|
+
: {}),
|
|
36
|
+
evidence: {
|
|
37
|
+
direction: "authored_to_compiled",
|
|
38
|
+
relationship: {
|
|
39
|
+
type: relationship.type,
|
|
40
|
+
from: relationship.from,
|
|
41
|
+
to: relationship.to,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
for (const [key, relationship] of compiledByKey) {
|
|
47
|
+
if (authoredByKey.has(key))
|
|
48
|
+
continue;
|
|
49
|
+
if (relationship.ownership === "runtime")
|
|
50
|
+
continue;
|
|
51
|
+
violations.push({
|
|
52
|
+
rule: "source-relationship-parity",
|
|
53
|
+
entityId: relationship.from,
|
|
54
|
+
description: `Compiled relationship has no authored Markdown or relationship-shard source: ${relationshipLabel(relationship)}`,
|
|
55
|
+
suggestion: "Restore the canonical authored relationship through kb_upsert, or remove the stale compiled edge through kb_delete after dependency review.",
|
|
56
|
+
evidence: {
|
|
57
|
+
direction: "compiled_to_authored",
|
|
58
|
+
relationship: {
|
|
59
|
+
type: relationship.type,
|
|
60
|
+
from: relationship.from,
|
|
61
|
+
to: relationship.to,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return violations.sort((left, right) => `${left.entityId}\u0000${left.description}`.localeCompare(`${right.entityId}\u0000${right.description}`));
|
|
67
|
+
}
|
|
68
|
+
function isGitWorkspace(workspaceRoot) {
|
|
69
|
+
try {
|
|
70
|
+
return (execFileSync("git", ["-C", workspaceRoot, "rev-parse", "--is-inside-work-tree"], {
|
|
71
|
+
encoding: "utf8",
|
|
72
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
73
|
+
}).trim() === "true");
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async function compiledRelationships(prolog) {
|
|
80
|
+
const relationships = [];
|
|
81
|
+
for (const type of RELATIONSHIP_TYPES) {
|
|
82
|
+
const result = await prolog.query(`findall([From,To,Source], (kb_relationship(${type}, From, To), (kb_entity(From, _, Props), memberchk(source=RawSource, Props) -> normalize_term_atom(RawSource, Source) ; Source='')), Rows)`);
|
|
83
|
+
if (!result.success) {
|
|
84
|
+
throw new Error(`Unable to inspect compiled ${type} relationships: ${result.error ?? "query failed"}`);
|
|
85
|
+
}
|
|
86
|
+
relationships.push(...parseCompiledRelationshipRows(type, result.bindings.Rows ?? "[]"));
|
|
87
|
+
}
|
|
88
|
+
return relationships;
|
|
89
|
+
}
|
|
90
|
+
export function parseCompiledRelationshipRows(type, rows) {
|
|
91
|
+
return parseListOfLists(rows).flatMap(([rawFrom, rawTo, rawSource]) => {
|
|
92
|
+
const from = String(parsePrologValue(rawFrom ?? ""));
|
|
93
|
+
const to = String(parsePrologValue(rawTo ?? ""));
|
|
94
|
+
const source = String(parsePrologValue(rawSource ?? ""));
|
|
95
|
+
if (!from || !to)
|
|
96
|
+
return [];
|
|
97
|
+
return [
|
|
98
|
+
{
|
|
99
|
+
type,
|
|
100
|
+
from,
|
|
101
|
+
to,
|
|
102
|
+
...(source ? { source } : {}),
|
|
103
|
+
ownership: source && /^[a-z][a-z0-9+.-]*:\/\//i.test(source)
|
|
104
|
+
? "runtime"
|
|
105
|
+
: "authored",
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function authoredRelationship(relationship, source) {
|
|
111
|
+
return {
|
|
112
|
+
...relationship,
|
|
113
|
+
source: source.replaceAll("\\", "/"),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
// implements REQ-kibi-source-relationship-parity
|
|
117
|
+
export async function collectSourceRelationshipParityViolations(workspaceRoot, prolog) {
|
|
118
|
+
if (!isGitWorkspace(workspaceRoot))
|
|
119
|
+
return [];
|
|
120
|
+
let discovery;
|
|
121
|
+
try {
|
|
122
|
+
discovery = await discoverSourceFiles(workspaceRoot, {
|
|
123
|
+
trackedOnly: true,
|
|
124
|
+
consumeTrackedPendingReceipts: false,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
129
|
+
return [
|
|
130
|
+
{
|
|
131
|
+
rule: "source-relationship-parity",
|
|
132
|
+
entityId: "source-discovery",
|
|
133
|
+
description: `Authored relationship parity could not establish a complete source view: ${message}`,
|
|
134
|
+
suggestion: "Repair the pending-source receipt through Kibi recovery, then rerun kb_check; do not ignore missing authored inputs.",
|
|
135
|
+
evidence: {
|
|
136
|
+
direction: "source_discovery",
|
|
137
|
+
message,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
];
|
|
141
|
+
}
|
|
142
|
+
const extraction = await processExtractions(discovery.markdownFiles, discovery.manifestFiles, true, workspaceRoot);
|
|
143
|
+
if (extraction.errors.length > 0) {
|
|
144
|
+
return extraction.errors.map(({ file, message }) => ({
|
|
145
|
+
rule: "source-relationship-parity",
|
|
146
|
+
entityId: path.relative(workspaceRoot, file).replaceAll(path.sep, "/"),
|
|
147
|
+
source: path.relative(workspaceRoot, file).replaceAll(path.sep, "/"),
|
|
148
|
+
description: `Authored relationship parity could not inspect source: ${message}`,
|
|
149
|
+
suggestion: "Repair the authored source, then rerun kb_check.",
|
|
150
|
+
}));
|
|
151
|
+
}
|
|
152
|
+
const authored = extraction.results.flatMap(({ entity, relationships }) => relationships.map((relationship) => authoredRelationship(relationship, entity.source)));
|
|
153
|
+
for (const relationship of readAllShards(path.join(workspaceRoot, ".kb"))) {
|
|
154
|
+
authored.push({
|
|
155
|
+
type: relationship.type,
|
|
156
|
+
from: relationship.from,
|
|
157
|
+
to: relationship.to,
|
|
158
|
+
source: ".kb/relationships",
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
return compareRelationshipParity(authored, await compiledRelationships(prolog));
|
|
162
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
4
|
-
export declare const
|
|
5
|
-
readonly name: "
|
|
6
|
-
readonly cliName: "
|
|
7
|
-
readonly description: "Generate
|
|
1
|
+
import { executePlanBootstrap } from "../../../operations/bootstrap/generate.js";
|
|
2
|
+
export type { BootstrapContext, PlanBootstrapArgs, PlanBootstrapResult, } from "../../../operations/bootstrap/types.js";
|
|
3
|
+
export { executePlanBootstrap } from "../../../operations/bootstrap/generate.js";
|
|
4
|
+
export declare const planBootstrapSpec: {
|
|
5
|
+
readonly name: "kb_plan_bootstrap";
|
|
6
|
+
readonly cliName: "plan-bootstrap";
|
|
7
|
+
readonly description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Read-only analysis 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: {
|
|
@@ -77,6 +77,6 @@ export declare const autopilotGenerateSpec: {
|
|
|
77
77
|
};
|
|
78
78
|
readonly requiresProlog: false;
|
|
79
79
|
readonly effects: readonly ["workspace-read"];
|
|
80
|
-
readonly execute: typeof
|
|
80
|
+
readonly execute: typeof executePlanBootstrap;
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=
|
|
82
|
+
//# sourceMappingURL=bootstrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAOjF,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAGjF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmF7B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { executePlanBootstrap } from "../../../operations/bootstrap/generate.js";
|
|
2
|
+
export { executePlanBootstrap } from "../../../operations/bootstrap/generate.js";
|
|
3
|
+
// implements REQ-KIBI-BOOTSTRAP-PLAN
|
|
4
|
+
export const planBootstrapSpec = {
|
|
5
|
+
name: "kb_plan_bootstrap",
|
|
6
|
+
cliName: "plan-bootstrap",
|
|
7
|
+
description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Read-only analysis returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.",
|
|
7
8
|
businessInputSchema: {
|
|
8
9
|
type: "object",
|
|
9
10
|
properties: {
|
|
@@ -68,5 +69,5 @@ export const autopilotGenerateSpec = {
|
|
|
68
69
|
},
|
|
69
70
|
requiresProlog: false,
|
|
70
71
|
effects: ["workspace-read"],
|
|
71
|
-
execute:
|
|
72
|
+
execute: executePlanBootstrap,
|
|
72
73
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Every selectable kb_check rule name, registry order. */
|
|
2
|
+
export declare const SELECTABLE_RULE_NAMES: readonly string[];
|
|
3
|
+
/** Comma-separated "Allowed:" fragment for the kb_check rules description. */
|
|
4
|
+
export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness";
|
|
5
|
+
//# sourceMappingURL=check-rules.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAoBlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,wYACkW,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
* Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
*
|
|
5
|
+
* This file is generated by scripts/generate-rule-registry.mjs from
|
|
6
|
+
* packages/core/schema/rule-registry.json. Do not edit it directly; edit the
|
|
7
|
+
* JSON source and regenerate.
|
|
8
|
+
*/
|
|
9
|
+
// implements REQ-006
|
|
10
|
+
/** Every selectable kb_check rule name, registry order. */
|
|
11
|
+
export const SELECTABLE_RULE_NAMES = [
|
|
12
|
+
"must-priority-coverage",
|
|
13
|
+
"symbol-coverage",
|
|
14
|
+
"symbol-traceability",
|
|
15
|
+
"no-dangling-refs",
|
|
16
|
+
"source-relationship-parity",
|
|
17
|
+
"no-cycles",
|
|
18
|
+
"required-fields",
|
|
19
|
+
"deprecated-adr-no-successor",
|
|
20
|
+
"domain-contradictions",
|
|
21
|
+
"logic-coverage",
|
|
22
|
+
"rule-safety",
|
|
23
|
+
"rule-verifiability",
|
|
24
|
+
"query-plan-safety",
|
|
25
|
+
"req-status-vocabulary",
|
|
26
|
+
"strict-fact-shape",
|
|
27
|
+
"strict-req-fact-pairing",
|
|
28
|
+
"predicate-verifiability",
|
|
29
|
+
"strict-readiness",
|
|
30
|
+
"semantic-completeness",
|
|
31
|
+
];
|
|
32
|
+
// implements REQ-006
|
|
33
|
+
/** Comma-separated "Allowed:" fragment for the kb_check rules description. */
|
|
34
|
+
export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness";
|
|
@@ -2,7 +2,7 @@ import { executeCheck } from "../check-executor.js";
|
|
|
2
2
|
export declare const checkSpec: {
|
|
3
3
|
readonly name: "kb_check";
|
|
4
4
|
readonly cliName: "check";
|
|
5
|
-
readonly description: "Run KB validation rules and return violations
|
|
5
|
+
readonly description: "Run KB validation rules and return violations, quality diagnostics, and typed kibi.migration-plan.v2 actions. Use before or after mutations and after source edits; checks remain read-only and never infer or apply actions from prose suggestions.";
|
|
6
6
|
readonly businessInputSchema: {
|
|
7
7
|
readonly type: "object";
|
|
8
8
|
readonly properties: {
|
|
@@ -10,9 +10,9 @@ export declare const checkSpec: {
|
|
|
10
10
|
readonly type: "array";
|
|
11
11
|
readonly items: {
|
|
12
12
|
readonly type: "string";
|
|
13
|
-
readonly enum: readonly [
|
|
13
|
+
readonly enum: readonly string[];
|
|
14
14
|
};
|
|
15
|
-
readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability,
|
|
15
|
+
readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
|
|
16
16
|
};
|
|
17
17
|
readonly sourceFiles: {
|
|
18
18
|
readonly type: "array";
|
|
@@ -40,7 +40,12 @@ export declare const checkSpec: {
|
|
|
40
40
|
};
|
|
41
41
|
readonly workspaceRoot: {
|
|
42
42
|
readonly type: "string";
|
|
43
|
-
readonly description: "Optional workspace root for impact diagnostics
|
|
43
|
+
readonly description: "Optional workspace root for impact diagnostics. Defaults to the MCP server workspace.";
|
|
44
|
+
};
|
|
45
|
+
readonly async: {
|
|
46
|
+
readonly type: "boolean";
|
|
47
|
+
readonly default: false;
|
|
48
|
+
readonly description: "When true, start the check as a background job and return a kibi.job.v1 receipt immediately instead of holding the request until the tool timeout. Poll kb_job_status with the returned jobId. Use for full checks on large KBs that exceed the configured tool timeout.";
|
|
44
49
|
};
|
|
45
50
|
};
|
|
46
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAOpD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DY,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { executeCheck } from "../check-executor.js";
|
|
2
|
+
import { SELECTABLE_RULES_ALLOWED, SELECTABLE_RULE_NAMES, } from "./check-rules.generated.js";
|
|
2
3
|
export const checkSpec = {
|
|
3
4
|
name: "kb_check",
|
|
4
5
|
cliName: "check",
|
|
5
|
-
description: "Run KB validation rules and return violations
|
|
6
|
+
description: "Run KB validation rules and return violations, quality diagnostics, and typed kibi.migration-plan.v2 actions. Use before or after mutations and after source edits; checks remain read-only and never infer or apply actions from prose suggestions.",
|
|
6
7
|
businessInputSchema: {
|
|
7
8
|
type: "object",
|
|
8
9
|
properties: {
|
|
@@ -10,26 +11,9 @@ export const checkSpec = {
|
|
|
10
11
|
type: "array",
|
|
11
12
|
items: {
|
|
12
13
|
type: "string",
|
|
13
|
-
enum: [
|
|
14
|
-
"must-priority-coverage",
|
|
15
|
-
"symbol-coverage",
|
|
16
|
-
"symbol-traceability",
|
|
17
|
-
"no-dangling-refs",
|
|
18
|
-
"no-cycles",
|
|
19
|
-
"required-fields",
|
|
20
|
-
"deprecated-adr-no-successor",
|
|
21
|
-
"domain-contradictions",
|
|
22
|
-
"strict-fact-shape",
|
|
23
|
-
"strict-req-fact-pairing",
|
|
24
|
-
"predicate-verifiability",
|
|
25
|
-
"logic-coverage",
|
|
26
|
-
"rule-safety",
|
|
27
|
-
"rule-verifiability",
|
|
28
|
-
"semantic-completeness",
|
|
29
|
-
"query-plan-safety",
|
|
30
|
-
],
|
|
14
|
+
enum: [...SELECTABLE_RULE_NAMES],
|
|
31
15
|
},
|
|
32
|
-
description:
|
|
16
|
+
description: `Optional rule subset. Allowed: ${SELECTABLE_RULES_ALLOWED}. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.`,
|
|
33
17
|
},
|
|
34
18
|
sourceFiles: {
|
|
35
19
|
type: "array",
|
|
@@ -55,7 +39,12 @@ export const checkSpec = {
|
|
|
55
39
|
},
|
|
56
40
|
workspaceRoot: {
|
|
57
41
|
type: "string",
|
|
58
|
-
description: "Optional workspace root for impact diagnostics
|
|
42
|
+
description: "Optional workspace root for impact diagnostics. Defaults to the MCP server workspace.",
|
|
43
|
+
},
|
|
44
|
+
async: {
|
|
45
|
+
type: "boolean",
|
|
46
|
+
default: false,
|
|
47
|
+
description: "When true, start the check as a background job and return a kibi.job.v1 receipt immediately instead of holding the request until the tool timeout. Poll kb_job_status with the returned jobId. Use for full checks on large KBs that exceed the configured tool timeout.",
|
|
59
48
|
},
|
|
60
49
|
},
|
|
61
50
|
},
|
|
@@ -45,7 +45,7 @@ export declare const querySpec: {
|
|
|
45
45
|
export declare const searchSpec: {
|
|
46
46
|
readonly name: "kb_search";
|
|
47
47
|
readonly cliName: "search";
|
|
48
|
-
readonly description: "Search KB entities for discovery using
|
|
48
|
+
readonly description: "Search KB entities for discovery using legacy lexical ranking or deterministic intent-v1 ranking. Intent mode accepts host-agent semantic facets and source locations, returns evidence and abstains below its confidence threshold. Use for exploratory lookup before exact follow-up with kb_query. No mutation side effects.";
|
|
49
49
|
readonly businessInputSchema: {
|
|
50
50
|
readonly type: "object";
|
|
51
51
|
readonly required: readonly ["query"];
|
|
@@ -73,6 +73,90 @@ export declare const searchSpec: {
|
|
|
73
73
|
readonly default: 0;
|
|
74
74
|
readonly description: "Optional zero-based pagination offset. Default: 0.";
|
|
75
75
|
};
|
|
76
|
+
readonly rankingMode: {
|
|
77
|
+
readonly type: "string";
|
|
78
|
+
readonly enum: readonly ["legacy", "intent-v1"];
|
|
79
|
+
readonly default: "legacy";
|
|
80
|
+
readonly description: "Optional deterministic ranking mode. Omit for backward-compatible lexical search; use intent-v1 for semantic facets, source-aware evidence, graph boosts, and abstention.";
|
|
81
|
+
};
|
|
82
|
+
readonly semanticFacets: {
|
|
83
|
+
readonly type: "object";
|
|
84
|
+
readonly additionalProperties: false;
|
|
85
|
+
readonly properties: {
|
|
86
|
+
readonly actors: {
|
|
87
|
+
readonly type: "array";
|
|
88
|
+
readonly items: {
|
|
89
|
+
readonly type: "string";
|
|
90
|
+
};
|
|
91
|
+
readonly maxItems: 20;
|
|
92
|
+
};
|
|
93
|
+
readonly actions: {
|
|
94
|
+
readonly type: "array";
|
|
95
|
+
readonly items: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
};
|
|
98
|
+
readonly maxItems: 20;
|
|
99
|
+
};
|
|
100
|
+
readonly objects: {
|
|
101
|
+
readonly type: "array";
|
|
102
|
+
readonly items: {
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
};
|
|
105
|
+
readonly maxItems: 20;
|
|
106
|
+
};
|
|
107
|
+
readonly constraints: {
|
|
108
|
+
readonly type: "array";
|
|
109
|
+
readonly items: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
};
|
|
112
|
+
readonly maxItems: 20;
|
|
113
|
+
};
|
|
114
|
+
readonly aliases: {
|
|
115
|
+
readonly type: "array";
|
|
116
|
+
readonly items: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
};
|
|
119
|
+
readonly maxItems: 20;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
readonly description: "Optional host-agent semantic interpretation. Kibi uses these strings as deterministic aliases/facets; it does not call a model itself.";
|
|
123
|
+
};
|
|
124
|
+
readonly sourceLocations: {
|
|
125
|
+
readonly type: "array";
|
|
126
|
+
readonly maxItems: 20;
|
|
127
|
+
readonly items: {
|
|
128
|
+
readonly type: "object";
|
|
129
|
+
readonly required: readonly ["path"];
|
|
130
|
+
readonly additionalProperties: false;
|
|
131
|
+
readonly properties: {
|
|
132
|
+
readonly path: {
|
|
133
|
+
readonly type: "string";
|
|
134
|
+
readonly minLength: 1;
|
|
135
|
+
readonly description: "Workspace-relative source path.";
|
|
136
|
+
};
|
|
137
|
+
readonly line: {
|
|
138
|
+
readonly type: "integer";
|
|
139
|
+
readonly minimum: 1;
|
|
140
|
+
};
|
|
141
|
+
readonly column: {
|
|
142
|
+
readonly type: "integer";
|
|
143
|
+
readonly minimum: 1;
|
|
144
|
+
};
|
|
145
|
+
readonly symbol: {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly minLength: 1;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly description: "Optional changed-code locations. Results are matched to source-linked symbols/entities and include source evidence.";
|
|
152
|
+
};
|
|
153
|
+
readonly minScore: {
|
|
154
|
+
readonly type: "number";
|
|
155
|
+
readonly minimum: 0;
|
|
156
|
+
readonly maximum: 1;
|
|
157
|
+
readonly default: 0.18;
|
|
158
|
+
readonly description: "Intent-v1 acceptance threshold between 0 and 1. Low-confidence queries abstain instead of returning misleading matches.";
|
|
159
|
+
};
|
|
76
160
|
};
|
|
77
161
|
};
|
|
78
162
|
readonly requiresProlog: true;
|
|
@@ -82,12 +166,12 @@ export declare const searchSpec: {
|
|
|
82
166
|
export declare const statusSpec: {
|
|
83
167
|
readonly name: "kb_status";
|
|
84
168
|
readonly cliName: "status";
|
|
85
|
-
readonly description: "Report current branch, KB snapshot
|
|
169
|
+
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.";
|
|
86
170
|
readonly businessInputSchema: {
|
|
87
171
|
readonly type: "object";
|
|
88
172
|
readonly properties: {};
|
|
89
173
|
};
|
|
90
|
-
readonly requiresProlog:
|
|
174
|
+
readonly requiresProlog: false;
|
|
91
175
|
readonly effects: readonly ["kb-read", "workspace-read"];
|
|
92
176
|
readonly execute: typeof executeStatus;
|
|
93
177
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAsBnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CsC,CAAC;AAE7D,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAsBnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CsC,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4FuC,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;;;;;;;;CAUuC,CAAC"}
|
|
@@ -53,7 +53,7 @@ export const querySpec = {
|
|
|
53
53
|
export const searchSpec = {
|
|
54
54
|
name: "kb_search",
|
|
55
55
|
cliName: "search",
|
|
56
|
-
description: "Search KB entities for discovery using
|
|
56
|
+
description: "Search KB entities for discovery using legacy lexical ranking or deterministic intent-v1 ranking. Intent mode accepts host-agent semantic facets and source locations, returns evidence and abstains below its confidence threshold. Use for exploratory lookup before exact follow-up with kb_query. No mutation side effects.",
|
|
57
57
|
businessInputSchema: {
|
|
58
58
|
type: "object",
|
|
59
59
|
required: ["query"],
|
|
@@ -81,6 +81,55 @@ export const searchSpec = {
|
|
|
81
81
|
default: 0,
|
|
82
82
|
description: "Optional zero-based pagination offset. Default: 0.",
|
|
83
83
|
},
|
|
84
|
+
rankingMode: {
|
|
85
|
+
type: "string",
|
|
86
|
+
enum: ["legacy", "intent-v1"],
|
|
87
|
+
default: "legacy",
|
|
88
|
+
description: "Optional deterministic ranking mode. Omit for backward-compatible lexical search; use intent-v1 for semantic facets, source-aware evidence, graph boosts, and abstention.",
|
|
89
|
+
},
|
|
90
|
+
semanticFacets: {
|
|
91
|
+
type: "object",
|
|
92
|
+
additionalProperties: false,
|
|
93
|
+
properties: {
|
|
94
|
+
actors: { type: "array", items: { type: "string" }, maxItems: 20 },
|
|
95
|
+
actions: { type: "array", items: { type: "string" }, maxItems: 20 },
|
|
96
|
+
objects: { type: "array", items: { type: "string" }, maxItems: 20 },
|
|
97
|
+
constraints: {
|
|
98
|
+
type: "array",
|
|
99
|
+
items: { type: "string" },
|
|
100
|
+
maxItems: 20,
|
|
101
|
+
},
|
|
102
|
+
aliases: { type: "array", items: { type: "string" }, maxItems: 20 },
|
|
103
|
+
},
|
|
104
|
+
description: "Optional host-agent semantic interpretation. Kibi uses these strings as deterministic aliases/facets; it does not call a model itself.",
|
|
105
|
+
},
|
|
106
|
+
sourceLocations: {
|
|
107
|
+
type: "array",
|
|
108
|
+
maxItems: 20,
|
|
109
|
+
items: {
|
|
110
|
+
type: "object",
|
|
111
|
+
required: ["path"],
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
properties: {
|
|
114
|
+
path: {
|
|
115
|
+
type: "string",
|
|
116
|
+
minLength: 1,
|
|
117
|
+
description: "Workspace-relative source path.",
|
|
118
|
+
},
|
|
119
|
+
line: { type: "integer", minimum: 1 },
|
|
120
|
+
column: { type: "integer", minimum: 1 },
|
|
121
|
+
symbol: { type: "string", minLength: 1 },
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
description: "Optional changed-code locations. Results are matched to source-linked symbols/entities and include source evidence.",
|
|
125
|
+
},
|
|
126
|
+
minScore: {
|
|
127
|
+
type: "number",
|
|
128
|
+
minimum: 0,
|
|
129
|
+
maximum: 1,
|
|
130
|
+
default: 0.18,
|
|
131
|
+
description: "Intent-v1 acceptance threshold between 0 and 1. Low-confidence queries abstain instead of returning misleading matches.",
|
|
132
|
+
},
|
|
84
133
|
},
|
|
85
134
|
},
|
|
86
135
|
requiresProlog: true,
|
|
@@ -90,9 +139,10 @@ export const searchSpec = {
|
|
|
90
139
|
export const statusSpec = {
|
|
91
140
|
name: "kb_status",
|
|
92
141
|
cliName: "status",
|
|
93
|
-
description: "Report current branch, KB snapshot
|
|
142
|
+
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.",
|
|
94
143
|
businessInputSchema: { type: "object", properties: {} },
|
|
95
|
-
|
|
144
|
+
// Status must remain available when the branch store cannot be attached.
|
|
145
|
+
requiresProlog: false,
|
|
96
146
|
effects: ["kb-read", "workspace-read"],
|
|
97
147
|
execute: executeStatus,
|
|
98
148
|
};
|
|
@@ -14,7 +14,7 @@ export declare const modelRequirementSpec: {
|
|
|
14
14
|
};
|
|
15
15
|
readonly source: {
|
|
16
16
|
readonly type: "string";
|
|
17
|
-
readonly description: "Optional primary source path or provenance root used for stable IDs and text refs. Example: '
|
|
17
|
+
readonly description: "Optional primary source path or provenance root used for stable IDs and text refs. Example: '.kb/requirements/customer-retention.md'.";
|
|
18
18
|
};
|
|
19
19
|
readonly sourceFiles: {
|
|
20
20
|
readonly type: "array";
|
|
@@ -48,7 +48,7 @@ export declare const modelRequirementSpec: {
|
|
|
48
48
|
};
|
|
49
49
|
readonly provenance: {
|
|
50
50
|
readonly type: "string";
|
|
51
|
-
readonly description: "Optional extracted text reference. Falls back to source when omitted. Example: '
|
|
51
|
+
readonly description: "Optional extracted text reference. Falls back to source when omitted. Example: '.kb/requirements/customer-retention.md#L1'.";
|
|
52
52
|
};
|
|
53
53
|
readonly existingLogicClaims: {
|
|
54
54
|
readonly type: "array";
|
|
@@ -84,7 +84,7 @@ export declare const modelRequirementSpec: {
|
|
|
84
84
|
export declare const suggestPredicatesSpec: {
|
|
85
85
|
readonly name: "kb_suggest_predicates";
|
|
86
86
|
readonly cliName: "suggest-predicates";
|
|
87
|
-
readonly description: "Suggest ontology predicate schemas for prose requirements before agents write facts. Read-only guidance returns
|
|
87
|
+
readonly description: "Suggest ontology predicate schemas for prose requirements before agents write facts. Retrieval/ranking is followed by a semantic applicability gate and conservative binding review; complete-looking generic placeholders never trigger application. Read-only guidance returns additive candidate diagnostics, an applicable predicate-fact plan only for a semantically eligible candidate with reviewed bindings, or an explicit ontology-gap observation plus a deterministic review-only predicate schema draft when no schema fits.";
|
|
88
88
|
readonly businessInputSchema: {
|
|
89
89
|
readonly type: "object";
|
|
90
90
|
readonly required: readonly ["text"];
|
|
@@ -14,7 +14,7 @@ export const modelRequirementSpec = {
|
|
|
14
14
|
},
|
|
15
15
|
source: {
|
|
16
16
|
type: "string",
|
|
17
|
-
description: "Optional primary source path or provenance root used for stable IDs and text refs. Example: '
|
|
17
|
+
description: "Optional primary source path or provenance root used for stable IDs and text refs. Example: '.kb/requirements/customer-retention.md'.",
|
|
18
18
|
},
|
|
19
19
|
sourceFiles: {
|
|
20
20
|
type: "array",
|
|
@@ -46,7 +46,7 @@ export const modelRequirementSpec = {
|
|
|
46
46
|
},
|
|
47
47
|
provenance: {
|
|
48
48
|
type: "string",
|
|
49
|
-
description: "Optional extracted text reference. Falls back to source when omitted. Example: '
|
|
49
|
+
description: "Optional extracted text reference. Falls back to source when omitted. Example: '.kb/requirements/customer-retention.md#L1'.",
|
|
50
50
|
},
|
|
51
51
|
existingLogicClaims: {
|
|
52
52
|
type: "array",
|
|
@@ -79,7 +79,7 @@ export const modelRequirementSpec = {
|
|
|
79
79
|
export const suggestPredicatesSpec = {
|
|
80
80
|
name: "kb_suggest_predicates",
|
|
81
81
|
cliName: "suggest-predicates",
|
|
82
|
-
description: "Suggest ontology predicate schemas for prose requirements before agents write facts. Read-only guidance returns
|
|
82
|
+
description: "Suggest ontology predicate schemas for prose requirements before agents write facts. Retrieval/ranking is followed by a semantic applicability gate and conservative binding review; complete-looking generic placeholders never trigger application. Read-only guidance returns additive candidate diagnostics, an applicable predicate-fact plan only for a semantically eligible candidate with reviewed bindings, or an explicit ontology-gap observation plus a deterministic review-only predicate schema draft when no schema fits.",
|
|
83
83
|
businessInputSchema: {
|
|
84
84
|
type: "object",
|
|
85
85
|
required: ["text"],
|