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,114 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { normalizePlaywrightSourceFile, playwrightCaseId, } from "../public/playwright-case-id.js";
|
|
5
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
6
|
+
export const PLAYWRIGHT_RUN_VERSION = "kibi.playwright-run.v1";
|
|
7
|
+
function envHash() {
|
|
8
|
+
const lockfile = process.env.KIBI_LOCKFILE_DIGEST ?? "unknown";
|
|
9
|
+
return createHash("sha256")
|
|
10
|
+
.update(JSON.stringify({
|
|
11
|
+
platform: process.platform,
|
|
12
|
+
arch: process.arch,
|
|
13
|
+
node: process.version,
|
|
14
|
+
lockfile,
|
|
15
|
+
projects: process.env.KIBI_VERIFICATION_PROJECTS ?? "",
|
|
16
|
+
}))
|
|
17
|
+
.digest("hex");
|
|
18
|
+
}
|
|
19
|
+
function outputPath(options) {
|
|
20
|
+
const configured = options.outputPath ?? process.env.KIBI_VERIFICATION_OUTPUT;
|
|
21
|
+
if (!configured)
|
|
22
|
+
throw new Error("KIBI_VERIFICATION_OUTPUT is required");
|
|
23
|
+
return path.resolve(configured);
|
|
24
|
+
}
|
|
25
|
+
function titlePath(test) {
|
|
26
|
+
const candidate = test;
|
|
27
|
+
const value = candidate.titlePath?.();
|
|
28
|
+
return Array.isArray(value) ? value.map(String).filter(Boolean) : [];
|
|
29
|
+
}
|
|
30
|
+
function sourceLocation(test) {
|
|
31
|
+
const location = test
|
|
32
|
+
.location;
|
|
33
|
+
return {
|
|
34
|
+
file: typeof location?.file === "string" ? location.file : "unknown",
|
|
35
|
+
line: Number.isInteger(location?.line) ? Number(location?.line) : 1,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function projectName(test, result) {
|
|
39
|
+
const project = test.project?.();
|
|
40
|
+
if (typeof project?.name === "string" && project.name)
|
|
41
|
+
return project.name;
|
|
42
|
+
const resultProject = result.projectName;
|
|
43
|
+
return typeof resultProject === "string" && resultProject
|
|
44
|
+
? resultProject
|
|
45
|
+
: "default";
|
|
46
|
+
}
|
|
47
|
+
/** Reporter callback surface intentionally uses structural types, no Playwright dependency. */
|
|
48
|
+
export class KibiPlaywrightReporter {
|
|
49
|
+
options;
|
|
50
|
+
cases = [];
|
|
51
|
+
startedAt;
|
|
52
|
+
constructor(options = {}) {
|
|
53
|
+
this.options = options;
|
|
54
|
+
this.startedAt = (options.now ?? (() => new Date()))().toISOString();
|
|
55
|
+
}
|
|
56
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
57
|
+
onBegin() {
|
|
58
|
+
this.startedAt = (this.options.now ?? (() => new Date()))().toISOString();
|
|
59
|
+
}
|
|
60
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
61
|
+
onTestEnd(test, result) {
|
|
62
|
+
const resultValue = result;
|
|
63
|
+
const location = sourceLocation(test);
|
|
64
|
+
const titles = titlePath(test);
|
|
65
|
+
const title = titles.join(" > ");
|
|
66
|
+
const status = resultValue.status;
|
|
67
|
+
const outcome = status === "passed"
|
|
68
|
+
? "passed"
|
|
69
|
+
: status === "timedOut"
|
|
70
|
+
? "timed_out"
|
|
71
|
+
: status === "skipped"
|
|
72
|
+
? "skipped"
|
|
73
|
+
: "failed";
|
|
74
|
+
const sourceFile = normalizePlaywrightSourceFile(location.file, this.options.workspaceRoot ?? process.cwd());
|
|
75
|
+
this.cases.push({
|
|
76
|
+
symbol_id: playwrightCaseId(sourceFile, title),
|
|
77
|
+
project: projectName(test, result),
|
|
78
|
+
outcome,
|
|
79
|
+
retries: Number.isInteger(resultValue.retry)
|
|
80
|
+
? Number(resultValue.retry)
|
|
81
|
+
: 0,
|
|
82
|
+
duration_ms: Number.isInteger(resultValue.duration)
|
|
83
|
+
? Number(resultValue.duration)
|
|
84
|
+
: 0,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
88
|
+
async onEnd(result) {
|
|
89
|
+
const now = this.options.now ?? (() => new Date());
|
|
90
|
+
const status = result?.status;
|
|
91
|
+
const artifact = {
|
|
92
|
+
version: PLAYWRIGHT_RUN_VERSION,
|
|
93
|
+
runner: "playwright",
|
|
94
|
+
command_argv: [
|
|
95
|
+
...(this.options.commandArgv ??
|
|
96
|
+
(process.env.KIBI_VERIFICATION_COMMAND_ARGV
|
|
97
|
+
? JSON.parse(process.env.KIBI_VERIFICATION_COMMAND_ARGV)
|
|
98
|
+
: [])),
|
|
99
|
+
],
|
|
100
|
+
code_snapshot: this.options.codeSnapshot ??
|
|
101
|
+
process.env.KIBI_VERIFICATION_SNAPSHOT ??
|
|
102
|
+
"",
|
|
103
|
+
environment_hash: this.options.environmentHash ?? envHash(),
|
|
104
|
+
started_at: this.startedAt,
|
|
105
|
+
finished_at: now().toISOString(),
|
|
106
|
+
process_exit_code: status === "passed" ? 0 : 1,
|
|
107
|
+
cases: this.cases,
|
|
108
|
+
};
|
|
109
|
+
const target = outputPath(this.options);
|
|
110
|
+
await mkdir(path.dirname(target), { recursive: true });
|
|
111
|
+
await writeFile(target, `${JSON.stringify(artifact, null, 2)}\n`, "utf8");
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export default KibiPlaywrightReporter;
|
package/package.json
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Kibi CLI for knowledge base management",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": ">=22"
|
|
8
8
|
},
|
|
9
9
|
"main": "./dist/cli.js",
|
|
10
10
|
"bin": {
|
|
11
11
|
"kibi": "bin/kibi"
|
|
12
12
|
},
|
|
13
|
-
"files": [
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"bin",
|
|
16
|
+
"schema",
|
|
17
|
+
"src/schemas",
|
|
18
|
+
"src/public",
|
|
19
|
+
"templates"
|
|
20
|
+
],
|
|
14
21
|
"scripts": {
|
|
15
|
-
"build": "tsc -p tsconfig.json && mkdir -p dist/public/skills && cp -r src/public/skills/. dist/public/skills/",
|
|
22
|
+
"build": "tsc -p tsconfig.json && rm -rf dist/public/skills && mkdir -p dist/public/skills && cp -r src/public/skills/. dist/public/skills/ && node ../../scripts/generate-entity-schema.mjs --check",
|
|
16
23
|
"test": "node ../../scripts/run-owned-engine-tests.mjs -- bun test --timeout 15000 .",
|
|
17
24
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
18
|
-
"
|
|
25
|
+
"schema:generate": "tsc -p tsconfig.json && node ../../scripts/generate-entity-schema.mjs",
|
|
26
|
+
"schema:check": "tsc -p tsconfig.json && node ../../scripts/generate-entity-schema.mjs --check",
|
|
27
|
+
"prepack": "npm run build && node ../../scripts/verify-package-contract.mjs kibi-cli"
|
|
19
28
|
},
|
|
20
29
|
"exports": {
|
|
21
30
|
".": {
|
|
@@ -38,6 +47,14 @@
|
|
|
38
47
|
"types": "./dist/public/operations/runtime-types.d.ts",
|
|
39
48
|
"default": "./dist/public/operations/runtime-types.js"
|
|
40
49
|
},
|
|
50
|
+
"./operations/result-envelope": {
|
|
51
|
+
"types": "./dist/public/operations/result-envelope.d.ts",
|
|
52
|
+
"default": "./dist/public/operations/result-envelope.js"
|
|
53
|
+
},
|
|
54
|
+
"./runtime/cli-runtime": {
|
|
55
|
+
"types": "./dist/runtime/cli-runtime.d.ts",
|
|
56
|
+
"default": "./dist/runtime/cli-runtime.js"
|
|
57
|
+
},
|
|
41
58
|
"./operations/node-ports": {
|
|
42
59
|
"types": "./dist/public/operations/node-ports.d.ts",
|
|
43
60
|
"default": "./dist/public/operations/node-ports.js"
|
|
@@ -62,6 +79,10 @@
|
|
|
62
79
|
"types": "./dist/public/extractors/symbols-coordinator.d.ts",
|
|
63
80
|
"default": "./dist/public/extractors/symbols-coordinator.js"
|
|
64
81
|
},
|
|
82
|
+
"./extractors/symbol-coordinates": {
|
|
83
|
+
"types": "./dist/extractors/symbol-coordinates.d.ts",
|
|
84
|
+
"default": "./dist/extractors/symbol-coordinates.js"
|
|
85
|
+
},
|
|
65
86
|
"./extractors/manifest": {
|
|
66
87
|
"types": "./dist/public/extractors/manifest.d.ts",
|
|
67
88
|
"default": "./dist/public/extractors/manifest.js"
|
|
@@ -94,6 +115,18 @@
|
|
|
94
115
|
"types": "./dist/search-ranking.d.ts",
|
|
95
116
|
"default": "./dist/search-ranking.js"
|
|
96
117
|
},
|
|
118
|
+
"./intent-search": {
|
|
119
|
+
"types": "./dist/intent-search.d.ts",
|
|
120
|
+
"default": "./dist/intent-search.js"
|
|
121
|
+
},
|
|
122
|
+
"./playwright-reporter": {
|
|
123
|
+
"types": "./dist/verification/playwright-reporter.d.ts",
|
|
124
|
+
"default": "./dist/verification/playwright-reporter.js"
|
|
125
|
+
},
|
|
126
|
+
"./playwright-case-id": {
|
|
127
|
+
"types": "./dist/public/playwright-case-id.d.ts",
|
|
128
|
+
"default": "./dist/public/playwright-case-id.js"
|
|
129
|
+
},
|
|
97
130
|
"./public/check-types": {
|
|
98
131
|
"types": "./dist/public/check-types.d.ts",
|
|
99
132
|
"default": "./dist/public/check-types.js"
|
|
@@ -151,6 +184,10 @@
|
|
|
151
184
|
"types": "./dist/operations/mutation/symbol-refresh.d.ts",
|
|
152
185
|
"default": "./dist/operations/mutation/symbol-refresh.js"
|
|
153
186
|
},
|
|
187
|
+
"./operations/mutation/symbol-compiler-lock": {
|
|
188
|
+
"types": "./dist/operations/mutation/symbol-compiler-lock.d.ts",
|
|
189
|
+
"default": "./dist/operations/mutation/symbol-compiler-lock.js"
|
|
190
|
+
},
|
|
154
191
|
"./operations/mutation/types": {
|
|
155
192
|
"types": "./dist/operations/mutation/types.d.ts",
|
|
156
193
|
"default": "./dist/operations/mutation/types.js"
|
|
@@ -193,12 +230,14 @@
|
|
|
193
230
|
"fast-glob": "^3.2.12",
|
|
194
231
|
"gray-matter": "^4.0.3",
|
|
195
232
|
"js-yaml": "^4.1.0",
|
|
196
|
-
"kibi-core": "^0.
|
|
233
|
+
"kibi-core": "^0.11.0",
|
|
197
234
|
"ts-morph": "^23.0.0",
|
|
198
|
-
"ignore": "^5.3.0"
|
|
235
|
+
"ignore": "^5.3.0",
|
|
236
|
+
"yaml": "^2.9.0"
|
|
199
237
|
},
|
|
200
238
|
"devDependencies": {
|
|
201
239
|
"@types/node": "latest",
|
|
240
|
+
"semver": "^7.7.4",
|
|
202
241
|
"typescript": "^5.7.0"
|
|
203
242
|
},
|
|
204
243
|
"license": "AGPL-3.0-or-later",
|
package/schema/config.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://raw.githubusercontent.com/Looted/kibi/master/packages/cli/schema/config.json",
|
|
4
|
-
"title": "Kibi Configuration",
|
|
5
|
-
"description": "
|
|
4
|
+
"title": "Kibi Legacy Configuration (deprecated)",
|
|
5
|
+
"description": "Deprecated leftover .kb/config.json schema kept only so migration tooling can recognize old files. Entity paths and check policy in this document are ignored at runtime. Canonical lifecycle metadata lives in .kb/manifest.json.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"$schema": {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Looted/kibi/master/packages/cli/schema/manifest.json",
|
|
4
|
+
"title": "Kibi Lifecycle Manifest",
|
|
5
|
+
"description": "Kibi-owned lifecycle metadata written to .kb/manifest.json. This is not a user configuration file: entity paths and check enforcement are canonical and cannot be overridden here.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": ["manifestVersion", "schemaVersion"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"manifestVersion": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 1,
|
|
13
|
+
"description": "Payload schema for this lifecycle manifest"
|
|
14
|
+
},
|
|
15
|
+
"schemaVersion": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"minimum": 1,
|
|
18
|
+
"description": "KB entity/relationship schema generation"
|
|
19
|
+
},
|
|
20
|
+
"semanticAdvisorBackfill": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["pending", "completed", "not_applicable"],
|
|
23
|
+
"description": "Retroactive semantic-advisor backfill review state"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
-
Copyright (C) 2026 Piotr Franczyk
|
|
4
|
-
|
|
5
|
-
This program is free software: you can redistribute it and/or modify
|
|
6
|
-
it under the terms of the GNU Affero General Public License as published by
|
|
7
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
8
|
-
(at your option) any later version.
|
|
9
|
-
|
|
10
|
-
This program is distributed in the hope that it will be useful,
|
|
11
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
-
GNU Affero General Public License for more details.
|
|
14
|
-
|
|
15
|
-
You should have received a copy of the GNU Affero General Public License
|
|
16
|
-
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
2
|
+
* Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
* Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -21,9 +21,8 @@
|
|
|
21
21
|
* Import from "kibi-cli/public/check-types" in MCP or external consumers.
|
|
22
22
|
*/
|
|
23
23
|
export type {
|
|
24
|
-
ChecksConfig,
|
|
25
24
|
RuleDefinition,
|
|
26
|
-
|
|
25
|
+
RuleEnforcementClass,
|
|
27
26
|
Violation,
|
|
28
27
|
} from "../utils/rule-registry.js";
|
|
29
28
|
export type {
|
|
@@ -34,11 +33,15 @@ export type {
|
|
|
34
33
|
} from "../utils/strict-modeling.js";
|
|
35
34
|
|
|
36
35
|
export {
|
|
37
|
-
DEFAULT_CHECKS_CONFIG,
|
|
38
36
|
RULE_NAMES,
|
|
39
37
|
RULES,
|
|
38
|
+
getCanonicalRules,
|
|
39
|
+
getDefaultRules,
|
|
40
40
|
getEffectiveRules,
|
|
41
|
-
|
|
41
|
+
getRuleDefinition,
|
|
42
|
+
getRuleEnforcementClass,
|
|
43
|
+
isCanonicalRule,
|
|
44
|
+
ruleRunsByDefault,
|
|
42
45
|
validateRuleName,
|
|
43
46
|
} from "../utils/rule-registry.js";
|
|
44
47
|
|
|
@@ -22,7 +22,12 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|
|
22
22
|
|
|
23
23
|
function resultRecord(result: unknown): Record<string, unknown> | undefined {
|
|
24
24
|
if (!isRecord(result)) return undefined;
|
|
25
|
-
|
|
25
|
+
if (isRecord(result.structuredContent)) return result.structuredContent;
|
|
26
|
+
// CLI JSON operations return the same versioned KibiResult envelope as MCP
|
|
27
|
+
// structuredContent. Unwrap its data before deriving operation-specific
|
|
28
|
+
// telemetry fields (coverage/proof fields in particular).
|
|
29
|
+
if (result.kibiProtocol === 1 && isRecord(result.data)) return result.data;
|
|
30
|
+
return result;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
function stringArray(value: unknown): string[] {
|
|
@@ -84,9 +89,54 @@ const RECEIPT_GAP_CODES = new Set([
|
|
|
84
89
|
"stale_verification_receipt",
|
|
85
90
|
"failed_verification_receipt",
|
|
86
91
|
"invalid_verification_receipt",
|
|
92
|
+
"verification_contract_mismatch",
|
|
87
93
|
"verification_snapshot_unavailable",
|
|
88
94
|
]);
|
|
89
95
|
|
|
96
|
+
const MAX_COVERAGE_RECEIPT_GAPS = 50;
|
|
97
|
+
|
|
98
|
+
function coverageReceiptGapDetails(rows: readonly Record<string, unknown>[]): {
|
|
99
|
+
readonly details: readonly Record<string, unknown>[];
|
|
100
|
+
readonly total: number;
|
|
101
|
+
readonly truncated: boolean;
|
|
102
|
+
} {
|
|
103
|
+
const details = rows
|
|
104
|
+
.flatMap((row) => {
|
|
105
|
+
const codes = [...new Set(stringArray(row.proofGaps))]
|
|
106
|
+
.filter((code) => RECEIPT_GAP_CODES.has(code))
|
|
107
|
+
.sort();
|
|
108
|
+
if (codes.length === 0) return [];
|
|
109
|
+
const stages = isRecord(row.proofStages) ? row.proofStages : undefined;
|
|
110
|
+
const passingE2e = isRecord(stages?.passingE2e)
|
|
111
|
+
? stages.passingE2e
|
|
112
|
+
: undefined;
|
|
113
|
+
const testIds = [
|
|
114
|
+
"missingReceiptTests",
|
|
115
|
+
"staleReceiptTests",
|
|
116
|
+
"failedReceiptTests",
|
|
117
|
+
"invalidReceiptTests",
|
|
118
|
+
"contractMismatchReceiptTests",
|
|
119
|
+
"snapshotUnavailableTests",
|
|
120
|
+
].flatMap((key) => stringArray(passingE2e?.[key]));
|
|
121
|
+
const requirementId = typeof row.id === "string" ? row.id : "unknown";
|
|
122
|
+
return [
|
|
123
|
+
{
|
|
124
|
+
requirementId,
|
|
125
|
+
testIds: [...new Set(testIds)].sort(),
|
|
126
|
+
codes,
|
|
127
|
+
},
|
|
128
|
+
];
|
|
129
|
+
})
|
|
130
|
+
.sort((left, right) =>
|
|
131
|
+
left.requirementId.localeCompare(right.requirementId),
|
|
132
|
+
);
|
|
133
|
+
return {
|
|
134
|
+
details: details.slice(0, MAX_COVERAGE_RECEIPT_GAPS),
|
|
135
|
+
total: details.length,
|
|
136
|
+
truncated: details.length > MAX_COVERAGE_RECEIPT_GAPS,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
90
140
|
function appendCoverageFields(
|
|
91
141
|
fields: Record<string, unknown>,
|
|
92
142
|
args: Readonly<Record<string, unknown>>,
|
|
@@ -108,6 +158,10 @@ function appendCoverageFields(
|
|
|
108
158
|
fields.coverage_receipt_gap_count = gapCodes.filter((code) =>
|
|
109
159
|
RECEIPT_GAP_CODES.has(code),
|
|
110
160
|
).length;
|
|
161
|
+
const receiptGaps = coverageReceiptGapDetails(rows);
|
|
162
|
+
fields.coverage_receipt_gaps = receiptGaps.details;
|
|
163
|
+
fields.coverage_receipt_gap_total = receiptGaps.total;
|
|
164
|
+
fields.coverage_receipt_gaps_truncated = receiptGaps.truncated;
|
|
111
165
|
if (typeof scope?.complete === "boolean") {
|
|
112
166
|
fields.coverage_scope_complete = scope.complete;
|
|
113
167
|
}
|
|
@@ -135,6 +189,30 @@ export function deriveDiagnosticUsageFields(
|
|
|
135
189
|
}
|
|
136
190
|
|
|
137
191
|
const structured = resultRecord(result);
|
|
192
|
+
const envelope =
|
|
193
|
+
isRecord(structured) && structured.kibiProtocol === 1
|
|
194
|
+
? structured
|
|
195
|
+
: undefined;
|
|
196
|
+
if (envelope) {
|
|
197
|
+
fields.protocol_version = envelope.kibiProtocol;
|
|
198
|
+
fields.result_version =
|
|
199
|
+
typeof envelope.resultVersion === "string"
|
|
200
|
+
? envelope.resultVersion
|
|
201
|
+
: null;
|
|
202
|
+
fields.result_status =
|
|
203
|
+
typeof envelope.status === "string" ? envelope.status : null;
|
|
204
|
+
fields.effect_failures = Array.isArray(envelope.effects)
|
|
205
|
+
? envelope.effects.filter(
|
|
206
|
+
(effect) => isRecord(effect) && effect.status === "failed",
|
|
207
|
+
)
|
|
208
|
+
: [];
|
|
209
|
+
fields.followed_next_actions = Array.isArray(
|
|
210
|
+
telemetry?.followed_next_actions,
|
|
211
|
+
)
|
|
212
|
+
? telemetry.followed_next_actions
|
|
213
|
+
: [];
|
|
214
|
+
fields.unsafe_original_retry = telemetry?.unsafe_original_retry === true;
|
|
215
|
+
}
|
|
138
216
|
if (tool === "kb_query" || tool === "kb_search") {
|
|
139
217
|
const resultCount = Number(structured?.count ?? 0);
|
|
140
218
|
fields.result_count = resultCount;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type Dirent,
|
|
3
|
-
existsSync,
|
|
4
|
-
readFileSync,
|
|
5
|
-
readdirSync,
|
|
6
|
-
statSync,
|
|
7
|
-
} from "node:fs";
|
|
1
|
+
import { type Dirent, existsSync, readFileSync, readdirSync } from "node:fs";
|
|
8
2
|
import * as path from "node:path";
|
|
9
3
|
import ignore from "ignore";
|
|
4
|
+
import { DERIVED_KB_PREFIXES } from "../utils/kb-paths.js";
|
|
10
5
|
|
|
11
6
|
const HARD_DENYLIST = [
|
|
12
|
-
".kb",
|
|
13
7
|
".git",
|
|
14
8
|
"node_modules",
|
|
15
9
|
"vendor",
|
|
@@ -18,6 +12,9 @@ const HARD_DENYLIST = [
|
|
|
18
12
|
".opencode",
|
|
19
13
|
];
|
|
20
14
|
|
|
15
|
+
/** Derived .kb/ runtime trees. Authored knowledge lanes stay visible. */
|
|
16
|
+
const HARD_DENY_KB_PREFIXES = DERIVED_KB_PREFIXES;
|
|
17
|
+
|
|
21
18
|
export interface IgnorePolicy {
|
|
22
19
|
isIgnored(inputPath: string): boolean;
|
|
23
20
|
getFastGlobIgnoreGlobs(): string[];
|
|
@@ -41,7 +38,7 @@ function toPosix(p: string): string {
|
|
|
41
38
|
return p.split(path.sep).join("/");
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
// implements REQ-
|
|
41
|
+
// implements REQ-cli-canonical-runtime
|
|
45
42
|
export function createRepoIgnorePolicy(workspaceRoot: string): IgnorePolicy {
|
|
46
43
|
const root = path.resolve(workspaceRoot);
|
|
47
44
|
|
|
@@ -69,7 +66,7 @@ export function createRepoIgnorePolicy(workspaceRoot: string): IgnorePolicy {
|
|
|
69
66
|
if (ent.isDirectory()) {
|
|
70
67
|
// avoid descending into common heavy or control directories
|
|
71
68
|
if (HARD_DENYLIST.includes(name)) continue;
|
|
72
|
-
|
|
69
|
+
if (name === ".kb") continue;
|
|
73
70
|
if (name === ".git") continue;
|
|
74
71
|
walk(abs);
|
|
75
72
|
} else if (ent.isFile()) {
|
|
@@ -113,6 +110,11 @@ export function createRepoIgnorePolicy(workspaceRoot: string): IgnorePolicy {
|
|
|
113
110
|
|
|
114
111
|
function matchesHardDeny(relPosix: string): boolean {
|
|
115
112
|
const segments = relPosix.split("/").filter(Boolean);
|
|
113
|
+
for (const prefix of HARD_DENY_KB_PREFIXES) {
|
|
114
|
+
if (relPosix === prefix || relPosix.startsWith(`${prefix}/`)) {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
116
118
|
for (const deny of HARD_DENYLIST) {
|
|
117
119
|
if (segments.includes(deny)) return true;
|
|
118
120
|
}
|
|
@@ -186,6 +188,10 @@ export function createRepoIgnorePolicy(workspaceRoot: string): IgnorePolicy {
|
|
|
186
188
|
globs.push(`**/${d}/**`);
|
|
187
189
|
globs.push(`**/${d}`);
|
|
188
190
|
}
|
|
191
|
+
for (const prefix of HARD_DENY_KB_PREFIXES) {
|
|
192
|
+
globs.push(`**/${prefix}/**`);
|
|
193
|
+
globs.push(`**/${prefix}`);
|
|
194
|
+
}
|
|
189
195
|
|
|
190
196
|
// Root .gitignore patterns (convert to simple globs)
|
|
191
197
|
for (const p of rootGitPatterns) {
|
|
@@ -153,10 +153,24 @@ function coverageDepthSuggestion(
|
|
|
153
153
|
|
|
154
154
|
function createDiagnostic(
|
|
155
155
|
coverage: RequirementCoverage,
|
|
156
|
+
proofEvidence:
|
|
157
|
+
| Readonly<{
|
|
158
|
+
readonly proofStatus?: string;
|
|
159
|
+
readonly passingE2eStatus?: string;
|
|
160
|
+
readonly passingE2eTests?: readonly string[];
|
|
161
|
+
readonly receiptGapCodes?: readonly string[];
|
|
162
|
+
}>
|
|
163
|
+
| undefined,
|
|
156
164
|
): QualityDiagnostic | undefined {
|
|
157
165
|
const coverageDepth = classifyCoverageDepth(coverage);
|
|
158
166
|
if (!isReviewableCoverageDepth(coverageDepth)) return undefined;
|
|
159
167
|
|
|
168
|
+
// Structural coverage and conservative proof are separate lanes. A current
|
|
169
|
+
// scenario-backed E2E receipt is strong execution evidence even when the
|
|
170
|
+
// requirement remains unresolved for ontology, symbol, or coordinate gaps.
|
|
171
|
+
// Do not emit a contradictory weak-depth review in that case.
|
|
172
|
+
if (proofEvidence?.passingE2eStatus === "passed") return undefined;
|
|
173
|
+
|
|
160
174
|
const allTests = uniqueEntities([
|
|
161
175
|
...coverage.directTests,
|
|
162
176
|
...coverage.scenarioTests,
|
|
@@ -180,6 +194,18 @@ function createDiagnostic(
|
|
|
180
194
|
scenarioTests: coverage.scenarioTests.map((test) => test.id),
|
|
181
195
|
testStatuses: uniqueStrings(allTests.map((test) => test.status)),
|
|
182
196
|
verificationScopes: uniqueStrings(allTests.map(testScope)),
|
|
197
|
+
...(proofEvidence?.proofStatus !== undefined
|
|
198
|
+
? { proofStatus: proofEvidence.proofStatus }
|
|
199
|
+
: {}),
|
|
200
|
+
...(proofEvidence?.passingE2eStatus !== undefined
|
|
201
|
+
? { passingE2eStatus: proofEvidence.passingE2eStatus }
|
|
202
|
+
: {}),
|
|
203
|
+
...(proofEvidence?.passingE2eTests !== undefined
|
|
204
|
+
? { passingE2eTests: [...proofEvidence.passingE2eTests] }
|
|
205
|
+
: {}),
|
|
206
|
+
...(proofEvidence?.receiptGapCodes !== undefined
|
|
207
|
+
? { receiptGapCodes: [...proofEvidence.receiptGapCodes] }
|
|
208
|
+
: {}),
|
|
183
209
|
},
|
|
184
210
|
};
|
|
185
211
|
}
|
|
@@ -252,6 +278,15 @@ function coverageForRequirement(
|
|
|
252
278
|
|
|
253
279
|
export function createCoverageDepthQualityDiagnostics(
|
|
254
280
|
manifestResults: readonly ExtractionResult[],
|
|
281
|
+
proofByRequirement: ReadonlyMap<
|
|
282
|
+
string,
|
|
283
|
+
Readonly<{
|
|
284
|
+
readonly proofStatus?: string;
|
|
285
|
+
readonly passingE2eStatus?: string;
|
|
286
|
+
readonly passingE2eTests?: readonly string[];
|
|
287
|
+
readonly receiptGapCodes?: readonly string[];
|
|
288
|
+
}>
|
|
289
|
+
> = new Map(),
|
|
255
290
|
): readonly QualityDiagnostic[] {
|
|
256
291
|
const entities = entitiesById(manifestResults);
|
|
257
292
|
return manifestResults
|
|
@@ -259,6 +294,7 @@ export function createCoverageDepthQualityDiagnostics(
|
|
|
259
294
|
.flatMap((result) => {
|
|
260
295
|
const diagnostic = createDiagnostic(
|
|
261
296
|
coverageForRequirement(result, manifestResults, entities),
|
|
297
|
+
proofByRequirement.get(result.entity.id),
|
|
262
298
|
);
|
|
263
299
|
return diagnostic === undefined ? [] : [diagnostic];
|
|
264
300
|
})
|