kibi-cli 0.19.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-operation-loader.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +53 -20
- package/dist/cli-operation-metadata.d.ts +20 -8
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +23 -8
- 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 +26 -4
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +10 -0
- package/dist/cli-register-verification.d.ts +3 -0
- package/dist/cli-register-verification.d.ts.map +1 -0
- package/dist/cli-register-verification.js +16 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -0
- 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 +36 -0
- package/dist/commands/branch.d.ts.map +1 -1
- package/dist/commands/branch.js +371 -40
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +20 -67
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +10 -19
- package/dist/commands/doctor.d.ts +4 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +259 -24
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +10 -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 +56 -0
- package/dist/commands/github-init.d.ts.map +1 -0
- package/dist/commands/github-init.js +310 -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 +73 -25
- 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 +7 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +244 -91
- 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 +23 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +196 -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 +8 -5
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +142 -39
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +3 -0
- package/dist/commands/sync.d.ts +6 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +304 -79
- package/dist/commands/verify.d.ts +10 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +126 -0
- package/dist/diagnostics.d.ts +1 -1
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/engine.d.ts +96 -3
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +392 -23
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +5 -6
- package/dist/extractors/manifest.d.ts +8 -1
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +51 -9
- package/dist/extractors/markdown.d.ts +2 -1
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +21 -3
- 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.map +1 -1
- package/dist/extractors/relationships.js +1 -0
- 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/intent-search.d.ts +60 -0
- package/dist/intent-search.d.ts.map +1 -0
- package/dist/intent-search.js +433 -0
- package/dist/operations/bootstrap/activation.d.ts.map +1 -0
- package/dist/operations/{autopilot → bootstrap}/activation.js +48 -31
- 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 +8 -0
- package/dist/operations/bootstrap/generate.d.ts.map +1 -0
- package/dist/operations/bootstrap/generate.js +204 -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 +2 -2
- package/dist/operations/{autopilot → bootstrap}/guidance.d.ts.map +1 -1
- package/dist/operations/{autopilot → bootstrap}/guidance.js +2 -0
- 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.map +1 -1
- package/dist/operations/modeling/model-requirement.js +4 -17
- 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 +276 -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-4.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-catalog-4.js +155 -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.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +7 -0
- 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 +156 -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 +34 -0
- 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-utils.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-utils.js +2 -0
- package/dist/operations/modeling/suggest-predicates.d.ts +1 -1
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +170 -32
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +415 -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 +10 -0
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +71 -1
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +1 -0
- package/dist/operations/mutation/source-authoring.d.ts +61 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -0
- package/dist/operations/mutation/source-authoring.js +543 -0
- package/dist/operations/mutation/symbol-compiler-lock.d.ts +51 -0
- package/dist/operations/mutation/symbol-compiler-lock.d.ts.map +1 -0
- package/dist/operations/mutation/symbol-compiler-lock.js +274 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +34 -3
- package/dist/operations/mutation/symbol-refresh.d.ts +18 -1
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-refresh.js +225 -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.map +1 -1
- package/dist/operations/mutation/upsert.js +363 -24
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +1 -0
- package/dist/operations/planning/apply-plan.d.ts +117 -0
- package/dist/operations/planning/apply-plan.d.ts.map +1 -0
- package/dist/operations/planning/apply-plan.js +1437 -0
- package/dist/operations/planning/compile-intent.d.ts +106 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -0
- package/dist/operations/planning/compile-intent.js +562 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +6 -2
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +15 -2
- 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/types.d.ts +13 -5
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/operations/verification/ingest-verification.d.ts +29 -0
- package/dist/operations/verification/ingest-verification.d.ts.map +1 -0
- package/dist/operations/verification/ingest-verification.js +192 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -1
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +27 -8
- 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 +69 -1
- package/dist/public/distribution-parity.d.ts +1 -1
- package/dist/public/distribution-parity.d.ts.map +1 -1
- package/dist/public/distribution-parity.js +1 -0
- 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 +6 -1
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
- package/dist/public/impact/coverage-depth-quality.js +21 -3
- package/dist/public/impact/full-kb-quality.d.ts +4 -2
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +61 -1
- 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 +682 -67
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +126 -4
- 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 +72 -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 +11 -0
- package/dist/public/operations/contracts.d.ts.map +1 -0
- package/dist/public/operations/contracts.js +325 -0
- package/dist/public/operations/discovery-executors.d.ts +37 -1
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +206 -6
- 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 +101 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -0
- package/dist/public/operations/migration-plan.js +537 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +68 -8
- 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.map +1 -1
- package/dist/public/operations/repair-plan.js +1 -0
- package/dist/public/operations/result-envelope.d.ts +13 -0
- package/dist/public/operations/result-envelope.d.ts.map +1 -0
- package/dist/public/operations/result-envelope.js +104 -0
- package/dist/public/operations/runtime-types.d.ts +97 -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.d.ts +4 -4
- package/dist/public/operations/specs/check.d.ts.map +1 -1
- package/dist/public/operations/specs/check.js +4 -3
- 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 +190 -47
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +3 -1
- 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 +270 -0
- package/dist/public/operations/specs/planning.d.ts.map +1 -0
- package/dist/public/operations/specs/planning.js +191 -0
- package/dist/public/operations/specs/reporting.d.ts +4 -1
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +46 -1
- package/dist/public/operations/specs/upsert.d.ts +204 -47
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +9 -0
- package/dist/public/operations/specs/verification.d.ts +78 -0
- package/dist/public/operations/specs/verification.d.ts.map +1 -0
- package/dist/public/operations/specs/verification.js +62 -0
- package/dist/public/operations/symbol-repair-plan.d.ts +11 -0
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -0
- package/dist/public/operations/symbol-repair-plan.js +123 -0
- package/dist/public/operations/types.d.ts +52 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/playwright-case-id.d.ts +8 -0
- package/dist/public/playwright-case-id.d.ts.map +1 -0
- package/dist/public/playwright-case-id.js +25 -0
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +4 -2
- 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 +115 -239
- 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/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 +56 -3
- package/dist/public/symbol-granularity.d.ts +1 -1
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.js +1 -0
- package/dist/public/telemetry-acceptance.d.ts +7 -0
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +8 -1
- package/dist/public/telemetry-remediation.js +1 -1
- package/dist/public/verification-receipt.d.ts +206 -39
- package/dist/public/verification-receipt.d.ts.map +1 -1
- package/dist/public/verification-receipt.js +171 -4
- 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.d.ts +19 -0
- package/dist/report/html-report.d.ts.map +1 -0
- package/dist/report/html-report.js +963 -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.map +1 -1
- package/dist/runtime/cli-runtime.js +82 -22
- package/dist/schemas/entity.schema.json +1148 -273
- package/dist/traceability/evidence-model.d.ts +2 -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.map +1 -1
- package/dist/traceability/git-staged.js +15 -40
- package/dist/traceability/markdown-validate.d.ts.map +1 -1
- package/dist/traceability/markdown-validate.js +12 -7
- 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 +10 -38
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +8 -3
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +3 -0
- package/dist/types/entities.d.ts +3 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/branch-resolver.d.ts +24 -10
- package/dist/utils/branch-resolver.d.ts.map +1 -1
- package/dist/utils/branch-resolver.js +121 -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 +15 -0
- package/dist/utils/branch-store.d.ts.map +1 -0
- package/dist/utils/branch-store.js +130 -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 +48 -20
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.js +82 -77
- 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 +0 -4
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +7 -8
- package/dist/verification/playwright-reporter.d.ts +21 -0
- package/dist/verification/playwright-reporter.d.ts.map +1 -0
- package/dist/verification/playwright-reporter.js +114 -0
- package/package.json +46 -7
- 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 +79 -1
- package/src/public/distribution-parity.ts +1 -0
- package/src/public/ignore-policy.ts +16 -10
- package/src/public/impact/coverage-depth-quality.ts +36 -0
- package/src/public/impact/full-kb-quality.ts +118 -5
- package/src/public/impact/manifest.ts +2 -4
- package/src/public/operational-artifacts.ts +9 -1
- package/src/public/operations/catalog.ts +146 -9
- package/src/public/operations/check-executor.ts +102 -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 +366 -0
- package/src/public/operations/discovery-executors.ts +299 -12
- package/src/public/operations/index.ts +9 -4
- package/src/public/operations/migration-plan.ts +740 -0
- package/src/public/operations/node-ports.ts +84 -10
- package/src/public/operations/prolog-json.ts +60 -5
- package/src/public/operations/repair-plan.ts +1 -0
- package/src/public/operations/result-envelope.ts +136 -0
- package/src/public/operations/runtime-types.ts +91 -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.ts +4 -3
- 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 +6 -1
- package/src/public/operations/specs/mutation.ts +27 -2
- package/src/public/operations/specs/planning.ts +234 -0
- package/src/public/operations/specs/reporting.ts +55 -1
- package/src/public/operations/specs/upsert.ts +10 -0
- package/src/public/operations/specs/verification.ts +78 -0
- package/src/public/operations/symbol-repair-plan.ts +164 -0
- package/src/public/operations/types.ts +62 -1
- package/src/public/playwright-case-id.ts +35 -0
- package/src/public/schemas/entity.ts +7 -2
- 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 +115 -239
- 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/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 +56 -3
- package/src/public/symbol-granularity.ts +1 -0
- package/src/public/telemetry-acceptance.ts +16 -1
- package/src/public/telemetry-remediation.ts +1 -1
- package/src/public/verification-receipt.ts +248 -6
- package/src/schemas/entity.schema.json +1148 -273
- package/templates/github/kibi-badge.yml +86 -0
- package/templates/github/kibi-report.yml +84 -0
- 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/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/src/public/skills/init-kibi/SKILL.md +0 -62
- /package/dist/operations/{autopilot → bootstrap}/activation.d.ts +0 -0
- /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,226 @@
|
|
|
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 type { ExtractedRelationship } from "../../extractors/markdown.js";
|
|
6
|
+
import { RELATIONSHIP_TYPES } from "../../operations/mutation/relationships.js";
|
|
7
|
+
import { parseListOfLists, parsePrologValue } from "../../prolog/codec.js";
|
|
8
|
+
import { readAllShards } from "../../relationships/shards.js";
|
|
9
|
+
import type { Violation } from "../check-types.js";
|
|
10
|
+
import type { PrologPort } from "./runtime-types.js";
|
|
11
|
+
|
|
12
|
+
export type RelationshipParityRecord = Readonly<{
|
|
13
|
+
type: string;
|
|
14
|
+
from: string;
|
|
15
|
+
to: string;
|
|
16
|
+
source?: string;
|
|
17
|
+
ownership?: "authored" | "runtime";
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
function relationshipKey(
|
|
21
|
+
relationship: Pick<RelationshipParityRecord, "type" | "from" | "to">,
|
|
22
|
+
): string {
|
|
23
|
+
return `${relationship.type}\u0000${relationship.from}\u0000${relationship.to}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function relationshipLabel(relationship: RelationshipParityRecord): string {
|
|
27
|
+
return `${relationship.type} ${relationship.from}->${relationship.to}`;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// implements REQ-kibi-source-relationship-parity
|
|
31
|
+
export function compareRelationshipParity(
|
|
32
|
+
authored: readonly RelationshipParityRecord[],
|
|
33
|
+
compiled: readonly RelationshipParityRecord[],
|
|
34
|
+
): Violation[] {
|
|
35
|
+
const authoredByKey = new Map<string, RelationshipParityRecord>();
|
|
36
|
+
const compiledByKey = new Map<string, RelationshipParityRecord>();
|
|
37
|
+
for (const relationship of authored) {
|
|
38
|
+
authoredByKey.set(relationshipKey(relationship), relationship);
|
|
39
|
+
}
|
|
40
|
+
for (const relationship of compiled) {
|
|
41
|
+
compiledByKey.set(relationshipKey(relationship), relationship);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const violations: Violation[] = [];
|
|
45
|
+
for (const [key, relationship] of authoredByKey) {
|
|
46
|
+
if (compiledByKey.has(key)) continue;
|
|
47
|
+
violations.push({
|
|
48
|
+
rule: "source-relationship-parity",
|
|
49
|
+
entityId: relationship.from,
|
|
50
|
+
description: `Authored relationship is missing from the compiled KB: ${relationshipLabel(relationship)}`,
|
|
51
|
+
suggestion:
|
|
52
|
+
"Run kibi sync after resolving semantic/source errors; do not delete authored links merely to make the compiled snapshot pass.",
|
|
53
|
+
...(relationship.source !== undefined
|
|
54
|
+
? { source: relationship.source }
|
|
55
|
+
: {}),
|
|
56
|
+
evidence: {
|
|
57
|
+
direction: "authored_to_compiled",
|
|
58
|
+
relationship: {
|
|
59
|
+
type: relationship.type,
|
|
60
|
+
from: relationship.from,
|
|
61
|
+
to: relationship.to,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
for (const [key, relationship] of compiledByKey) {
|
|
67
|
+
if (authoredByKey.has(key)) continue;
|
|
68
|
+
if (relationship.ownership === "runtime") continue;
|
|
69
|
+
violations.push({
|
|
70
|
+
rule: "source-relationship-parity",
|
|
71
|
+
entityId: relationship.from,
|
|
72
|
+
description: `Compiled relationship has no authored Markdown or relationship-shard source: ${relationshipLabel(relationship)}`,
|
|
73
|
+
suggestion:
|
|
74
|
+
"Restore the canonical authored relationship through kb_upsert, or remove the stale compiled edge through kb_delete after dependency review.",
|
|
75
|
+
evidence: {
|
|
76
|
+
direction: "compiled_to_authored",
|
|
77
|
+
relationship: {
|
|
78
|
+
type: relationship.type,
|
|
79
|
+
from: relationship.from,
|
|
80
|
+
to: relationship.to,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return violations.sort((left, right) =>
|
|
86
|
+
`${left.entityId}\u0000${left.description}`.localeCompare(
|
|
87
|
+
`${right.entityId}\u0000${right.description}`,
|
|
88
|
+
),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function isGitWorkspace(workspaceRoot: string): boolean {
|
|
93
|
+
try {
|
|
94
|
+
return (
|
|
95
|
+
execFileSync(
|
|
96
|
+
"git",
|
|
97
|
+
["-C", workspaceRoot, "rev-parse", "--is-inside-work-tree"],
|
|
98
|
+
{
|
|
99
|
+
encoding: "utf8",
|
|
100
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
101
|
+
},
|
|
102
|
+
).trim() === "true"
|
|
103
|
+
);
|
|
104
|
+
} catch {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async function compiledRelationships(
|
|
110
|
+
prolog: PrologPort,
|
|
111
|
+
): Promise<RelationshipParityRecord[]> {
|
|
112
|
+
const relationships: RelationshipParityRecord[] = [];
|
|
113
|
+
for (const type of RELATIONSHIP_TYPES) {
|
|
114
|
+
const result = await prolog.query(
|
|
115
|
+
`findall([From,To,Source], (kb_relationship(${type}, From, To), (kb_entity(From, _, Props), memberchk(source=RawSource, Props) -> normalize_term_atom(RawSource, Source) ; Source='')), Rows)`,
|
|
116
|
+
);
|
|
117
|
+
if (!result.success) {
|
|
118
|
+
throw new Error(
|
|
119
|
+
`Unable to inspect compiled ${type} relationships: ${result.error ?? "query failed"}`,
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
relationships.push(
|
|
123
|
+
...parseCompiledRelationshipRows(type, result.bindings.Rows ?? "[]"),
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
return relationships;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function parseCompiledRelationshipRows(
|
|
130
|
+
type: string,
|
|
131
|
+
rows: string,
|
|
132
|
+
): RelationshipParityRecord[] {
|
|
133
|
+
return parseListOfLists(rows).flatMap(([rawFrom, rawTo, rawSource]) => {
|
|
134
|
+
const from = String(parsePrologValue(rawFrom ?? ""));
|
|
135
|
+
const to = String(parsePrologValue(rawTo ?? ""));
|
|
136
|
+
const source = String(parsePrologValue(rawSource ?? ""));
|
|
137
|
+
if (!from || !to) return [];
|
|
138
|
+
return [
|
|
139
|
+
{
|
|
140
|
+
type,
|
|
141
|
+
from,
|
|
142
|
+
to,
|
|
143
|
+
...(source ? { source } : {}),
|
|
144
|
+
ownership:
|
|
145
|
+
source && /^[a-z][a-z0-9+.-]*:\/\//i.test(source)
|
|
146
|
+
? "runtime"
|
|
147
|
+
: "authored",
|
|
148
|
+
},
|
|
149
|
+
];
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function authoredRelationship(
|
|
154
|
+
relationship: ExtractedRelationship,
|
|
155
|
+
source: string,
|
|
156
|
+
): RelationshipParityRecord {
|
|
157
|
+
return {
|
|
158
|
+
...relationship,
|
|
159
|
+
source: source.replaceAll("\\", "/"),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// implements REQ-kibi-source-relationship-parity
|
|
164
|
+
export async function collectSourceRelationshipParityViolations(
|
|
165
|
+
workspaceRoot: string,
|
|
166
|
+
prolog: PrologPort,
|
|
167
|
+
): Promise<Violation[]> {
|
|
168
|
+
if (!isGitWorkspace(workspaceRoot)) return [];
|
|
169
|
+
let discovery: Awaited<ReturnType<typeof discoverSourceFiles>>;
|
|
170
|
+
try {
|
|
171
|
+
discovery = await discoverSourceFiles(workspaceRoot, {
|
|
172
|
+
trackedOnly: true,
|
|
173
|
+
consumeTrackedPendingReceipts: false,
|
|
174
|
+
});
|
|
175
|
+
} catch (error) {
|
|
176
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
177
|
+
return [
|
|
178
|
+
{
|
|
179
|
+
rule: "source-relationship-parity",
|
|
180
|
+
entityId: "source-discovery",
|
|
181
|
+
description: `Authored relationship parity could not establish a complete source view: ${message}`,
|
|
182
|
+
suggestion:
|
|
183
|
+
"Repair the pending-source receipt through Kibi recovery, then rerun kb_check; do not ignore missing authored inputs.",
|
|
184
|
+
evidence: {
|
|
185
|
+
direction: "source_discovery",
|
|
186
|
+
message,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
];
|
|
190
|
+
}
|
|
191
|
+
const extraction = await processExtractions(
|
|
192
|
+
discovery.markdownFiles,
|
|
193
|
+
discovery.manifestFiles,
|
|
194
|
+
true,
|
|
195
|
+
workspaceRoot,
|
|
196
|
+
);
|
|
197
|
+
if (extraction.errors.length > 0) {
|
|
198
|
+
return extraction.errors.map(({ file, message }) => ({
|
|
199
|
+
rule: "source-relationship-parity",
|
|
200
|
+
entityId: path.relative(workspaceRoot, file).replaceAll(path.sep, "/"),
|
|
201
|
+
source: path.relative(workspaceRoot, file).replaceAll(path.sep, "/"),
|
|
202
|
+
description: `Authored relationship parity could not inspect source: ${message}`,
|
|
203
|
+
suggestion: "Repair the authored source, then rerun kb_check.",
|
|
204
|
+
}));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const authored: RelationshipParityRecord[] = extraction.results.flatMap(
|
|
208
|
+
({ entity, relationships }) =>
|
|
209
|
+
relationships.map((relationship) =>
|
|
210
|
+
authoredRelationship(relationship, entity.source),
|
|
211
|
+
),
|
|
212
|
+
);
|
|
213
|
+
for (const relationship of readAllShards(path.join(workspaceRoot, ".kb"))) {
|
|
214
|
+
authored.push({
|
|
215
|
+
type: relationship.type,
|
|
216
|
+
from: relationship.from,
|
|
217
|
+
to: relationship.to,
|
|
218
|
+
source: ".kb/relationships",
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return compareRelationshipParity(
|
|
223
|
+
authored,
|
|
224
|
+
await compiledRelationships(prolog),
|
|
225
|
+
);
|
|
226
|
+
}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { executePlanBootstrap } from "../../../operations/bootstrap/generate.js";
|
|
2
2
|
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "../../../operations/
|
|
3
|
+
PlanBootstrapArgs,
|
|
4
|
+
PlanBootstrapResult,
|
|
5
|
+
} from "../../../operations/bootstrap/types.js";
|
|
6
6
|
import type { OperationSpec } from "../types.js";
|
|
7
7
|
|
|
8
8
|
export type {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "../../../operations/
|
|
13
|
-
export {
|
|
9
|
+
BootstrapContext,
|
|
10
|
+
PlanBootstrapArgs,
|
|
11
|
+
PlanBootstrapResult,
|
|
12
|
+
} from "../../../operations/bootstrap/types.js";
|
|
13
|
+
export { executePlanBootstrap } from "../../../operations/bootstrap/generate.js";
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
// implements REQ-KIBI-BOOTSTRAP-PLAN
|
|
16
|
+
export const planBootstrapSpec = {
|
|
17
|
+
name: "kb_plan_bootstrap",
|
|
18
|
+
cliName: "plan-bootstrap",
|
|
18
19
|
description:
|
|
19
|
-
"Generate
|
|
20
|
+
"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.",
|
|
20
21
|
businessInputSchema: {
|
|
21
22
|
type: "object",
|
|
22
23
|
properties: {
|
|
@@ -91,8 +92,8 @@ export const autopilotGenerateSpec = {
|
|
|
91
92
|
},
|
|
92
93
|
requiresProlog: false,
|
|
93
94
|
effects: ["workspace-read"],
|
|
94
|
-
execute:
|
|
95
|
+
execute: executePlanBootstrap,
|
|
95
96
|
} as const satisfies OperationSpec<
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
PlanBootstrapArgs,
|
|
98
|
+
PlanBootstrapResult["structuredContent"]
|
|
98
99
|
>;
|
|
@@ -5,7 +5,7 @@ export const checkSpec = {
|
|
|
5
5
|
name: "kb_check",
|
|
6
6
|
cliName: "check",
|
|
7
7
|
description:
|
|
8
|
-
"Run KB validation rules and return violations
|
|
8
|
+
"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.",
|
|
9
9
|
businessInputSchema: {
|
|
10
10
|
type: "object",
|
|
11
11
|
properties: {
|
|
@@ -18,6 +18,7 @@ export const checkSpec = {
|
|
|
18
18
|
"symbol-coverage",
|
|
19
19
|
"symbol-traceability",
|
|
20
20
|
"no-dangling-refs",
|
|
21
|
+
"source-relationship-parity",
|
|
21
22
|
"no-cycles",
|
|
22
23
|
"required-fields",
|
|
23
24
|
"deprecated-adr-no-successor",
|
|
@@ -33,7 +34,7 @@ export const checkSpec = {
|
|
|
33
34
|
],
|
|
34
35
|
},
|
|
35
36
|
description:
|
|
36
|
-
"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, logic-coverage, rule-safety, rule-verifiability, semantic-completeness, query-plan-safety. If omitted, server runs
|
|
37
|
+
"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, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, logic-coverage, rule-safety, rule-verifiability, semantic-completeness, query-plan-safety. 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.",
|
|
37
38
|
},
|
|
38
39
|
sourceFiles: {
|
|
39
40
|
type: "array",
|
|
@@ -65,7 +66,7 @@ export const checkSpec = {
|
|
|
65
66
|
workspaceRoot: {
|
|
66
67
|
type: "string",
|
|
67
68
|
description:
|
|
68
|
-
"Optional workspace root for impact diagnostics
|
|
69
|
+
"Optional workspace root for impact diagnostics. Defaults to the MCP server workspace.",
|
|
69
70
|
},
|
|
70
71
|
},
|
|
71
72
|
},
|
|
@@ -77,7 +77,7 @@ export const searchSpec = {
|
|
|
77
77
|
name: "kb_search",
|
|
78
78
|
cliName: "search",
|
|
79
79
|
description:
|
|
80
|
-
"Search KB entities for discovery using
|
|
80
|
+
"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.",
|
|
81
81
|
businessInputSchema: {
|
|
82
82
|
type: "object",
|
|
83
83
|
required: ["query"],
|
|
@@ -107,6 +107,59 @@ export const searchSpec = {
|
|
|
107
107
|
default: 0,
|
|
108
108
|
description: "Optional zero-based pagination offset. Default: 0.",
|
|
109
109
|
},
|
|
110
|
+
rankingMode: {
|
|
111
|
+
type: "string",
|
|
112
|
+
enum: ["legacy", "intent-v1"],
|
|
113
|
+
default: "legacy",
|
|
114
|
+
description:
|
|
115
|
+
"Optional deterministic ranking mode. Omit for backward-compatible lexical search; use intent-v1 for semantic facets, source-aware evidence, graph boosts, and abstention.",
|
|
116
|
+
},
|
|
117
|
+
semanticFacets: {
|
|
118
|
+
type: "object",
|
|
119
|
+
additionalProperties: false,
|
|
120
|
+
properties: {
|
|
121
|
+
actors: { type: "array", items: { type: "string" }, maxItems: 20 },
|
|
122
|
+
actions: { type: "array", items: { type: "string" }, maxItems: 20 },
|
|
123
|
+
objects: { type: "array", items: { type: "string" }, maxItems: 20 },
|
|
124
|
+
constraints: {
|
|
125
|
+
type: "array",
|
|
126
|
+
items: { type: "string" },
|
|
127
|
+
maxItems: 20,
|
|
128
|
+
},
|
|
129
|
+
aliases: { type: "array", items: { type: "string" }, maxItems: 20 },
|
|
130
|
+
},
|
|
131
|
+
description:
|
|
132
|
+
"Optional host-agent semantic interpretation. Kibi uses these strings as deterministic aliases/facets; it does not call a model itself.",
|
|
133
|
+
},
|
|
134
|
+
sourceLocations: {
|
|
135
|
+
type: "array",
|
|
136
|
+
maxItems: 20,
|
|
137
|
+
items: {
|
|
138
|
+
type: "object",
|
|
139
|
+
required: ["path"],
|
|
140
|
+
additionalProperties: false,
|
|
141
|
+
properties: {
|
|
142
|
+
path: {
|
|
143
|
+
type: "string",
|
|
144
|
+
minLength: 1,
|
|
145
|
+
description: "Workspace-relative source path.",
|
|
146
|
+
},
|
|
147
|
+
line: { type: "integer", minimum: 1 },
|
|
148
|
+
column: { type: "integer", minimum: 1 },
|
|
149
|
+
symbol: { type: "string", minLength: 1 },
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
description:
|
|
153
|
+
"Optional changed-code locations. Results are matched to source-linked symbols/entities and include source evidence.",
|
|
154
|
+
},
|
|
155
|
+
minScore: {
|
|
156
|
+
type: "number",
|
|
157
|
+
minimum: 0,
|
|
158
|
+
maximum: 1,
|
|
159
|
+
default: 0.18,
|
|
160
|
+
description:
|
|
161
|
+
"Intent-v1 acceptance threshold between 0 and 1. Low-confidence queries abstain instead of returning misleading matches.",
|
|
162
|
+
},
|
|
110
163
|
},
|
|
111
164
|
},
|
|
112
165
|
requiresProlog: true,
|
|
@@ -118,9 +171,10 @@ export const statusSpec = {
|
|
|
118
171
|
name: "kb_status",
|
|
119
172
|
cliName: "status",
|
|
120
173
|
description:
|
|
121
|
-
"Report current branch, KB snapshot
|
|
174
|
+
"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.",
|
|
122
175
|
businessInputSchema: { type: "object", properties: {} },
|
|
123
|
-
|
|
176
|
+
// Status must remain available when the branch store cannot be attached.
|
|
177
|
+
requiresProlog: false,
|
|
124
178
|
effects: ["kb-read", "workspace-read"],
|
|
125
179
|
execute: executeStatus,
|
|
126
180
|
} as const satisfies OperationSpec<StatusInput, StatusPayload>;
|
|
@@ -27,7 +27,7 @@ export const modelRequirementSpec = {
|
|
|
27
27
|
source: {
|
|
28
28
|
type: "string",
|
|
29
29
|
description:
|
|
30
|
-
"Optional primary source path or provenance root used for stable IDs and text refs. Example: '
|
|
30
|
+
"Optional primary source path or provenance root used for stable IDs and text refs. Example: '.kb/requirements/customer-retention.md'.",
|
|
31
31
|
},
|
|
32
32
|
sourceFiles: {
|
|
33
33
|
type: "array",
|
|
@@ -66,7 +66,7 @@ export const modelRequirementSpec = {
|
|
|
66
66
|
provenance: {
|
|
67
67
|
type: "string",
|
|
68
68
|
description:
|
|
69
|
-
"Optional extracted text reference. Falls back to source when omitted. Example: '
|
|
69
|
+
"Optional extracted text reference. Falls back to source when omitted. Example: '.kb/requirements/customer-retention.md#L1'.",
|
|
70
70
|
},
|
|
71
71
|
existingLogicClaims: {
|
|
72
72
|
type: "array",
|
|
@@ -109,7 +109,7 @@ export const suggestPredicatesSpec = {
|
|
|
109
109
|
name: "kb_suggest_predicates",
|
|
110
110
|
cliName: "suggest-predicates",
|
|
111
111
|
description:
|
|
112
|
-
"Suggest ontology predicate schemas for prose requirements before agents write facts. Read-only guidance returns
|
|
112
|
+
"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.",
|
|
113
113
|
businessInputSchema: {
|
|
114
114
|
type: "object",
|
|
115
115
|
required: ["text"],
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
VERIFICATION_CONTRACT_SCHEMA,
|
|
3
|
+
VERIFICATION_RECEIPT_SCHEMA,
|
|
4
|
+
} from "../../verification-receipt.js";
|
|
2
5
|
|
|
3
6
|
export const ENTITY_TYPES = [
|
|
4
7
|
"req",
|
|
@@ -119,6 +122,7 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
119
122
|
"module-level-behavior",
|
|
120
123
|
"extractor-miss",
|
|
121
124
|
"legacy-link",
|
|
125
|
+
"test-suite",
|
|
122
126
|
],
|
|
123
127
|
description:
|
|
124
128
|
"Optional justification for a coarse file/module-level symbol traceability relationship when narrower function/class/type symbols exist.",
|
|
@@ -148,6 +152,7 @@ export const ENTITY_PROPERTIES_SCHEMA = {
|
|
|
148
152
|
description:
|
|
149
153
|
"Optional typed verification perspective for test entities. Example: 'consumer'.",
|
|
150
154
|
},
|
|
155
|
+
verification_contract: VERIFICATION_CONTRACT_SCHEMA,
|
|
151
156
|
verification_receipts: {
|
|
152
157
|
type: "array",
|
|
153
158
|
maxItems: 50,
|
|
@@ -42,13 +42,38 @@ export const deleteSpec = {
|
|
|
42
42
|
"Delete entities by ID. Use only for intentional removals after dependency checks. Do not use as a bulk cleanup shortcut. Side effects: mutates and saves KB; skips entities with dependents.",
|
|
43
43
|
businessInputSchema: {
|
|
44
44
|
type: "object",
|
|
45
|
-
|
|
45
|
+
oneOf: [
|
|
46
|
+
{ required: ["ids"], not: { required: ["relationships"] } },
|
|
47
|
+
{ required: ["relationships"], not: { required: ["ids"] } },
|
|
48
|
+
],
|
|
46
49
|
properties: {
|
|
47
50
|
ids: {
|
|
48
51
|
type: "array",
|
|
49
52
|
items: { type: "string" },
|
|
53
|
+
minItems: 1,
|
|
54
|
+
description: "Entity IDs to delete after dependency checks.",
|
|
55
|
+
},
|
|
56
|
+
relationships: {
|
|
57
|
+
type: "array",
|
|
58
|
+
minItems: 1,
|
|
59
|
+
items: {
|
|
60
|
+
type: "object",
|
|
61
|
+
required: ["type", "from", "to"],
|
|
62
|
+
additionalProperties: false,
|
|
63
|
+
properties: {
|
|
64
|
+
type: { type: "string", minLength: 1 },
|
|
65
|
+
from: { type: "string", minLength: 1 },
|
|
66
|
+
to: { type: "string", minLength: 1 },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
description:
|
|
70
|
+
"Exact relationship triples to retract, including legacy shard records.",
|
|
71
|
+
},
|
|
72
|
+
approvedPlanHash: {
|
|
73
|
+
type: "string",
|
|
74
|
+
pattern: "^[a-fA-F0-9]{64}$",
|
|
50
75
|
description:
|
|
51
|
-
"
|
|
76
|
+
"Exact hash returned by a prior authored-entity deletion plan.",
|
|
52
77
|
},
|
|
53
78
|
},
|
|
54
79
|
},
|