kibi-cli 0.18.1 → 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-json-command.d.ts +1 -2
- package/dist/cli-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +2 -34
- package/dist/cli-operation-loader.d.ts +3 -0
- package/dist/cli-operation-loader.d.ts.map +1 -0
- package/dist/cli-operation-loader.js +91 -0
- package/dist/cli-operation-metadata.d.ts +94 -0
- package/dist/cli-operation-metadata.d.ts.map +1 -0
- package/dist/cli-operation-metadata.js +121 -0
- package/dist/cli-protocol.d.ts +1 -1
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +42 -11
- package/dist/cli-register-foundation.d.ts.map +1 -1
- package/dist/cli-register-foundation.js +28 -19
- package/dist/cli-register-json.d.ts +3 -0
- package/dist/cli-register-json.d.ts.map +1 -0
- package/dist/cli-register-json.js +35 -0
- package/dist/cli-register-maintenance.d.ts.map +1 -1
- package/dist/cli-register-maintenance.js +60 -13
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +23 -14
- package/dist/cli-register-skills.d.ts.map +1 -1
- package/dist/cli-register-skills.js +8 -6
- 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 +3 -1
- 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 +48 -77
- package/dist/commands/coverage.js +1 -1
- package/dist/commands/discovery-shared.d.ts +2 -1
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +38 -25
- 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 +8 -0
- package/dist/commands/engine.d.ts.map +1 -0
- package/dist/commands/engine.js +103 -0
- package/dist/commands/gaps.js +1 -1
- 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/graph.js +1 -1
- 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/query.d.ts.map +1 -1
- package/dist/commands/query.js +3 -1
- 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/search.d.ts.map +1 -1
- package/dist/commands/search.js +3 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +2 -1
- package/dist/commands/sync/cache.d.ts +26 -3
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +141 -5
- 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 +10 -1
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +223 -44
- package/dist/commands/sync/staging.d.ts +10 -1
- package/dist/commands/sync/staging.d.ts.map +1 -1
- package/dist/commands/sync/staging.js +84 -1
- package/dist/commands/sync.d.ts +6 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +710 -48
- 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-daemon.d.ts +3 -0
- package/dist/engine-daemon.d.ts.map +1 -0
- package/dist/engine-daemon.js +34 -0
- package/dist/engine.d.ts +156 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +1625 -0
- 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 +2 -0
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +16 -17
- 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 +8 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +66 -16
- 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-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +3 -2
- 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 +246 -9
- 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 +55 -6
- 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 +126 -5
- 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 +40 -10
- 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 +98 -42
- 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 +51 -8
- 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-entities.ts +3 -2
- package/src/public/operations/discovery-executors.ts +343 -15
- 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 +73 -6
- 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 +130 -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 +40 -10
- 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,177 @@
|
|
|
1
|
+
import { buildGuidance } from "./guidance.js";
|
|
2
|
+
import { bootstrapPlanHash } from "./types.js";
|
|
3
|
+
function strings(values) {
|
|
4
|
+
return [
|
|
5
|
+
...new Set((values ?? []).map((value) => value.trim()).filter(Boolean)),
|
|
6
|
+
];
|
|
7
|
+
}
|
|
8
|
+
export function normalizeBootstrapContext(input) {
|
|
9
|
+
const projectSummary = input?.projectSummary?.trim();
|
|
10
|
+
return {
|
|
11
|
+
...(projectSummary ? { projectSummary } : {}),
|
|
12
|
+
sourceOfTruthPaths: strings(input?.sourceOfTruthPaths),
|
|
13
|
+
sourceOfTruthNotes: strings(input?.sourceOfTruthNotes),
|
|
14
|
+
priorityRoots: strings(input?.priorityRoots),
|
|
15
|
+
verificationAnchors: strings(input?.verificationAnchors),
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function payoff(candidates) {
|
|
19
|
+
const projectedIfAllApplied = {};
|
|
20
|
+
for (const candidate of candidates)
|
|
21
|
+
projectedIfAllApplied[candidate.entityType] =
|
|
22
|
+
(projectedIfAllApplied[candidate.entityType] ?? 0) + 1;
|
|
23
|
+
return {
|
|
24
|
+
current: {},
|
|
25
|
+
projectedIfAllApplied,
|
|
26
|
+
delta: { ...projectedIfAllApplied },
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
// implements REQ-KIBI-BOOTSTRAP-PLAN
|
|
30
|
+
export function presentBootstrap(input) {
|
|
31
|
+
const declaredContext = normalizeBootstrapContext(input.bootstrapContext);
|
|
32
|
+
const guidance = buildGuidance({
|
|
33
|
+
root: input.root,
|
|
34
|
+
activation: input.activation,
|
|
35
|
+
declared: declaredContext,
|
|
36
|
+
candidates: input.candidates,
|
|
37
|
+
signals: input.sourceOnlySignals,
|
|
38
|
+
warnings: input.discoverySummary.scanWarnings,
|
|
39
|
+
});
|
|
40
|
+
const confidenceLevel = String(guidance.confidence.level);
|
|
41
|
+
const bindingDiagnostics = strings(input.bindingDiagnostics);
|
|
42
|
+
const applyBlocked = input.activation.applyBlocked || bindingDiagnostics.length > 0;
|
|
43
|
+
const blockedFallback = input.activation.activationMode === "vendored_blocked" ||
|
|
44
|
+
bindingDiagnostics.length > 0
|
|
45
|
+
? `Bootstrap blocked: ${input.activation.reason}${bindingDiagnostics.length > 0 ? ` ${bindingDiagnostics[0]}` : ""}`
|
|
46
|
+
: input.activation.activationMode === "attached_thin_handoff" ||
|
|
47
|
+
input.activation.activationMode === "attached_seeded_handoff"
|
|
48
|
+
? `Bootstrap handoff: ${input.activation.reason}`
|
|
49
|
+
: "Bootstrap output found no safe candidates; follow the recommended actions to continue.";
|
|
50
|
+
const baseTldr = !applyBlocked &&
|
|
51
|
+
input.candidates.length + input.sourceOnlySignals.length > 0
|
|
52
|
+
? `Bootstrap plan is ready for review with ${input.candidates.length} safe candidate(s) and ${input.sourceOnlySignals.length} source-only authoring follow-up(s).`
|
|
53
|
+
: (input.activation.handoffMessage ?? blockedFallback);
|
|
54
|
+
const tldr = confidenceLevel === "low" && !input.activation.applyBlocked
|
|
55
|
+
? `Low-confidence bootstrap (${String(guidance.confidence.score)}): review diagnostics before proceeding. ${baseTldr}`
|
|
56
|
+
: baseTldr;
|
|
57
|
+
const rawActions = input.candidates.flatMap((candidate) => candidate.applyPlan.map((payload) => ({ candidate, payload })));
|
|
58
|
+
const actionIds = new Map();
|
|
59
|
+
rawActions.forEach(({ payload }, index) => {
|
|
60
|
+
const id = typeof payload.id === "string"
|
|
61
|
+
? payload.id
|
|
62
|
+
: typeof payload.properties === "object" &&
|
|
63
|
+
payload.properties !== null &&
|
|
64
|
+
"id" in payload.properties &&
|
|
65
|
+
typeof payload.properties.id === "string"
|
|
66
|
+
? payload.properties.id
|
|
67
|
+
: `candidate-${index + 1}`;
|
|
68
|
+
actionIds.set(id, `bootstrap-upsert-${String(index + 1).padStart(4, "0")}`);
|
|
69
|
+
});
|
|
70
|
+
const actions = rawActions.map(({ candidate, payload }, index) => {
|
|
71
|
+
const id = `bootstrap-upsert-${String(index + 1).padStart(4, "0")}`;
|
|
72
|
+
const relationships = Array.isArray(payload.relationships)
|
|
73
|
+
? payload.relationships
|
|
74
|
+
: [];
|
|
75
|
+
const dependsOn = relationships
|
|
76
|
+
.map((relationship) => relationship &&
|
|
77
|
+
typeof relationship === "object" &&
|
|
78
|
+
"to" in relationship
|
|
79
|
+
? actionIds.get(String(relationship.to))
|
|
80
|
+
: undefined)
|
|
81
|
+
.filter((value) => value !== undefined && value !== id)
|
|
82
|
+
.sort();
|
|
83
|
+
return {
|
|
84
|
+
id,
|
|
85
|
+
kind: "upsert",
|
|
86
|
+
dependsOn: [...new Set(dependsOn)],
|
|
87
|
+
payload,
|
|
88
|
+
candidateId: candidate.candidateId,
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
const status = input.activation.activationState === "root_active_seeded"
|
|
92
|
+
? "handoff"
|
|
93
|
+
: applyBlocked
|
|
94
|
+
? "blocked"
|
|
95
|
+
: confidenceLevel === "high" && actions.length > 0
|
|
96
|
+
? "ready"
|
|
97
|
+
: "needs_context";
|
|
98
|
+
const contextQuestions = [];
|
|
99
|
+
if (status === "needs_context") {
|
|
100
|
+
if (!declaredContext.projectSummary)
|
|
101
|
+
contextQuestions.push("What is the one-sentence purpose of this repository?");
|
|
102
|
+
if (declaredContext.sourceOfTruthPaths.length === 0)
|
|
103
|
+
contextQuestions.push("Which repository paths are authoritative for product intent?");
|
|
104
|
+
if (input.sourceOnlySignals.length > 0)
|
|
105
|
+
contextQuestions.push("Which detected product behaviors should be prioritized for bootstrap?");
|
|
106
|
+
if (declaredContext.verificationAnchors.length === 0)
|
|
107
|
+
contextQuestions.push("Which command or test should verify the initial bootstrap?");
|
|
108
|
+
if (contextQuestions.length === 0)
|
|
109
|
+
contextQuestions.push("Which specific product behavior should this bootstrap plan prioritize before authoring knowledge?");
|
|
110
|
+
}
|
|
111
|
+
const diagnostics = [
|
|
112
|
+
...(input.migrationWarning ? [input.migrationWarning] : []),
|
|
113
|
+
...input.discoverySummary.scanWarnings,
|
|
114
|
+
...bindingDiagnostics,
|
|
115
|
+
];
|
|
116
|
+
const planBody = {
|
|
117
|
+
version: "kibi.bootstrap-plan.v1",
|
|
118
|
+
status,
|
|
119
|
+
expected: input.expected,
|
|
120
|
+
activation: {
|
|
121
|
+
activationState: input.activation.activationState,
|
|
122
|
+
activationMode: input.activation.activationMode,
|
|
123
|
+
applyBlocked,
|
|
124
|
+
reason: input.activation.reason,
|
|
125
|
+
},
|
|
126
|
+
declaredContext,
|
|
127
|
+
contextQuestions: contextQuestions.slice(0, 4),
|
|
128
|
+
confidence: guidance.confidence,
|
|
129
|
+
discoverySummary: input.discoverySummary,
|
|
130
|
+
candidates: input.candidates,
|
|
131
|
+
actions,
|
|
132
|
+
sourceWrites: [],
|
|
133
|
+
suppressedCandidates: input.suppressedCandidates,
|
|
134
|
+
payoffSummary: payoff(input.candidates),
|
|
135
|
+
diagnostics,
|
|
136
|
+
};
|
|
137
|
+
const hash = bootstrapPlanHash(planBody);
|
|
138
|
+
const plan = { ...planBody, planHash: hash };
|
|
139
|
+
const payoffSummary = payoff(input.candidates);
|
|
140
|
+
const structuredContent = {
|
|
141
|
+
plan,
|
|
142
|
+
version: plan.version,
|
|
143
|
+
planHash: hash,
|
|
144
|
+
status,
|
|
145
|
+
expected: input.expected,
|
|
146
|
+
activation: plan.activation,
|
|
147
|
+
contextQuestions: plan.contextQuestions,
|
|
148
|
+
activationState: input.activation.activationState,
|
|
149
|
+
activationMode: input.activation.activationMode,
|
|
150
|
+
bootstrapMode: input.activation.activationMode,
|
|
151
|
+
activationReason: input.activation.reason,
|
|
152
|
+
applyBlocked,
|
|
153
|
+
migrationWarning: input.migrationWarning,
|
|
154
|
+
...(input.activation.handoffMessage
|
|
155
|
+
? { handoffMessage: input.activation.handoffMessage }
|
|
156
|
+
: {}),
|
|
157
|
+
confidence: guidance.confidence,
|
|
158
|
+
tldr,
|
|
159
|
+
promptBlock: guidance.promptBlock,
|
|
160
|
+
recommendedActions: guidance.actions,
|
|
161
|
+
declaredContext,
|
|
162
|
+
discoverySummary: input.discoverySummary,
|
|
163
|
+
candidates: input.candidates,
|
|
164
|
+
actions,
|
|
165
|
+
sourceWrites: [],
|
|
166
|
+
suppressedCandidates: input.suppressedCandidates,
|
|
167
|
+
payoffSummary,
|
|
168
|
+
diagnostics,
|
|
169
|
+
};
|
|
170
|
+
const text = status === "ready"
|
|
171
|
+
? `${tldr} Review plan ${hash.slice(0, 12)} and request explicit approval before calling kb_apply_plan.`
|
|
172
|
+
: tldr;
|
|
173
|
+
return {
|
|
174
|
+
content: [{ type: "text", text }],
|
|
175
|
+
structuredContent,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirement-claims.d.ts","sourceRoot":"","sources":["../../../src/operations/
|
|
1
|
+
{"version":3,"file":"requirement-claims.d.ts","sourceRoot":"","sources":["../../../src/operations/bootstrap/requirement-claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,wBAAgB,QAAQ,CACtB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,aAAa,GAAG,IAAI,CAsDtB"}
|
|
@@ -1,31 +1,38 @@
|
|
|
1
1
|
import type { OperationResult } from "../../public/operations/types.js";
|
|
2
|
-
export
|
|
2
|
+
export declare function bootstrapPlanHash(plan: Readonly<Record<string, unknown>>): string;
|
|
3
|
+
/** Bind a freshly initialized, not-yet-synced branch to its exact source state. */
|
|
4
|
+
export declare function bootstrapEmptyKbSnapshotId(input: {
|
|
5
|
+
readonly branch: string;
|
|
6
|
+
readonly workspaceSnapshot: string;
|
|
7
|
+
readonly sourceHashes: Readonly<Record<string, string | null>>;
|
|
8
|
+
}): string;
|
|
9
|
+
export type BootstrapContext = {
|
|
3
10
|
readonly projectSummary?: string;
|
|
4
11
|
readonly sourceOfTruthPaths?: readonly string[];
|
|
5
12
|
readonly sourceOfTruthNotes?: readonly string[];
|
|
6
13
|
readonly priorityRoots?: readonly string[];
|
|
7
14
|
readonly verificationAnchors?: readonly string[];
|
|
8
15
|
};
|
|
9
|
-
export type
|
|
16
|
+
export type PlanBootstrapArgs = {
|
|
10
17
|
readonly includeGenericMarkdown?: boolean;
|
|
11
18
|
readonly minConfidence?: number;
|
|
12
19
|
readonly maxCandidates?: number;
|
|
13
20
|
readonly entityTypes?: readonly ("req" | "scenario" | "test" | "adr" | "fact" | "symbol")[];
|
|
14
|
-
readonly bootstrapContext?:
|
|
21
|
+
readonly bootstrapContext?: BootstrapContext;
|
|
15
22
|
};
|
|
16
|
-
export type
|
|
23
|
+
export type BootstrapConfidence = {
|
|
17
24
|
readonly score: number;
|
|
18
25
|
readonly level: "high" | "medium" | "low";
|
|
19
26
|
readonly reasons: readonly string[];
|
|
20
27
|
readonly policy: "full_actions" | "review_required" | "handoff_only";
|
|
21
28
|
};
|
|
22
|
-
export type
|
|
29
|
+
export type BootstrapRecommendedAction = {
|
|
23
30
|
readonly order: number;
|
|
24
|
-
readonly kind: "query" | "upsert" | "check" | "handoff";
|
|
31
|
+
readonly kind: "query" | "plan" | "upsert" | "check" | "handoff";
|
|
25
32
|
readonly description: string;
|
|
26
33
|
readonly candidateIds?: readonly string[];
|
|
27
34
|
};
|
|
28
|
-
export type
|
|
35
|
+
export type BootstrapDeclaredContext = {
|
|
29
36
|
readonly projectSummary?: string;
|
|
30
37
|
readonly sourceOfTruthPaths: readonly string[];
|
|
31
38
|
readonly sourceOfTruthNotes: readonly string[];
|
|
@@ -33,9 +40,9 @@ export type AutopilotDeclaredContext = {
|
|
|
33
40
|
readonly verificationAnchors: readonly string[];
|
|
34
41
|
};
|
|
35
42
|
export type ActivationState = "root_uninitialized" | "root_partial" | "vendored_only" | "root_active_thin" | "root_active_seeded";
|
|
36
|
-
export type ActivationMode = "cold_start_bootstrap" | "repair_bootstrap" | "attached_thin_handoff" | "attached_seeded_handoff" | "vendored_blocked";
|
|
37
|
-
export declare const
|
|
38
|
-
export type EvidenceProviderName = (typeof
|
|
43
|
+
export type ActivationMode = "cold_start_bootstrap" | "repair_bootstrap" | "attached_thin_bootstrap" | "attached_thin_handoff" | "attached_seeded_handoff" | "vendored_blocked";
|
|
44
|
+
export declare const BOOTSTRAP_PROVIDER_ORDER: readonly ["typed_kibi_docs", "generic_repo_docs", "repo_metadata", "repo_layout", "test_topology", "source_symbols"];
|
|
45
|
+
export type EvidenceProviderName = (typeof BOOTSTRAP_PROVIDER_ORDER)[number];
|
|
39
46
|
export type EvidenceKind = "typed_markdown" | "symbol_manifest" | "generic_markdown" | "repo_metadata" | "repo_layout" | "test_topology" | "source_symbols";
|
|
40
47
|
export type ActivationPolicy = {
|
|
41
48
|
readonly activationState: ActivationState;
|
|
@@ -45,7 +52,7 @@ export type ActivationPolicy = {
|
|
|
45
52
|
readonly reason: string;
|
|
46
53
|
readonly handoffMessage?: string;
|
|
47
54
|
};
|
|
48
|
-
export type
|
|
55
|
+
export type BootstrapEvidence = {
|
|
49
56
|
readonly provider: EvidenceProviderName;
|
|
50
57
|
readonly kind: EvidenceKind;
|
|
51
58
|
readonly label: string;
|
|
@@ -71,7 +78,7 @@ export type DiscoverySummary = {
|
|
|
71
78
|
};
|
|
72
79
|
export type DiscoveryResult = {
|
|
73
80
|
readonly activation: ActivationPolicy;
|
|
74
|
-
readonly evidence: readonly
|
|
81
|
+
readonly evidence: readonly BootstrapEvidence[];
|
|
75
82
|
readonly ignoredSources: readonly string[];
|
|
76
83
|
readonly summary: DiscoverySummary;
|
|
77
84
|
readonly migrationWarning: string | null;
|
|
@@ -92,6 +99,40 @@ export type Candidate = {
|
|
|
92
99
|
}[];
|
|
93
100
|
readonly applyPlan: readonly Readonly<Record<string, unknown>>[];
|
|
94
101
|
};
|
|
102
|
+
export type BootstrapAction = Readonly<{
|
|
103
|
+
readonly id: string;
|
|
104
|
+
readonly kind: "upsert";
|
|
105
|
+
readonly dependsOn: readonly string[];
|
|
106
|
+
readonly payload: Readonly<Record<string, unknown>>;
|
|
107
|
+
readonly candidateId?: string;
|
|
108
|
+
}>;
|
|
109
|
+
export type BootstrapPlanV1 = Readonly<{
|
|
110
|
+
readonly version: "kibi.bootstrap-plan.v1";
|
|
111
|
+
readonly planHash: string;
|
|
112
|
+
readonly status: "ready" | "needs_context" | "blocked" | "handoff";
|
|
113
|
+
readonly expected: Readonly<{
|
|
114
|
+
readonly branch: string;
|
|
115
|
+
readonly kbSnapshotId: string;
|
|
116
|
+
readonly workspaceSnapshot: string;
|
|
117
|
+
readonly sourceHashes: Readonly<Record<string, string | null>>;
|
|
118
|
+
}>;
|
|
119
|
+
readonly activation: Readonly<{
|
|
120
|
+
readonly activationState: ActivationState;
|
|
121
|
+
readonly activationMode: ActivationMode;
|
|
122
|
+
readonly applyBlocked: boolean;
|
|
123
|
+
readonly reason: string;
|
|
124
|
+
}>;
|
|
125
|
+
readonly declaredContext: BootstrapDeclaredContext;
|
|
126
|
+
readonly contextQuestions: readonly string[];
|
|
127
|
+
readonly confidence: Readonly<Record<string, unknown>>;
|
|
128
|
+
readonly discoverySummary: DiscoverySummary;
|
|
129
|
+
readonly candidates: readonly Readonly<Record<string, unknown>>[];
|
|
130
|
+
readonly actions: readonly BootstrapAction[];
|
|
131
|
+
readonly sourceWrites: readonly Readonly<Record<string, unknown>>[];
|
|
132
|
+
readonly suppressedCandidates: readonly Readonly<Record<string, unknown>>[];
|
|
133
|
+
readonly payoffSummary: Readonly<Record<string, unknown>>;
|
|
134
|
+
readonly diagnostics: readonly string[];
|
|
135
|
+
}>;
|
|
95
136
|
export type SourceOnlySignal = {
|
|
96
137
|
readonly kind: "req" | "scenario" | "test";
|
|
97
138
|
readonly title: string;
|
|
@@ -99,19 +140,20 @@ export type SourceOnlySignal = {
|
|
|
99
140
|
readonly confidence: number;
|
|
100
141
|
readonly evidence: readonly string[];
|
|
101
142
|
};
|
|
102
|
-
export type
|
|
143
|
+
export type BootstrapStructuredContent = Readonly<Record<string, unknown>> & {
|
|
144
|
+
/** The exact hash-bound plan returned by this read-only operation. */
|
|
145
|
+
readonly plan: BootstrapPlanV1;
|
|
146
|
+
readonly version: "kibi.bootstrap-plan.v1";
|
|
147
|
+
readonly planHash: string;
|
|
148
|
+
readonly status: BootstrapPlanV1["status"];
|
|
103
149
|
readonly tldr: string;
|
|
104
150
|
readonly activationReason: string;
|
|
105
151
|
readonly candidates: readonly Readonly<Record<string, unknown>>[];
|
|
106
|
-
readonly
|
|
152
|
+
readonly actions: readonly BootstrapAction[];
|
|
107
153
|
readonly suppressedCandidates: readonly Readonly<Record<string, unknown>>[];
|
|
154
|
+
readonly diagnostics: readonly string[];
|
|
108
155
|
};
|
|
109
|
-
export type
|
|
110
|
-
readonly structuredContent:
|
|
111
|
-
readonly migrationWarning: string | null;
|
|
112
|
-
readonly candidates: readonly Readonly<Record<string, unknown>>[];
|
|
113
|
-
readonly applyPlan: readonly Readonly<Record<string, unknown>>[];
|
|
114
|
-
readonly suppressedCandidates: readonly Readonly<Record<string, unknown>>[];
|
|
115
|
-
readonly payoffSummary: Readonly<Record<string, unknown>>;
|
|
156
|
+
export type PlanBootstrapResult = OperationResult<BootstrapStructuredContent> & {
|
|
157
|
+
readonly structuredContent: BootstrapStructuredContent;
|
|
116
158
|
};
|
|
117
159
|
//# sourceMappingURL=types.d.ts.map
|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,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG;IAC3E,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,wBAAwB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAClE,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,QAAQ,CAAC,oBAAoB,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IAC5E,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC7B,eAAe,CAAC,0BAA0B,CAAC,GAAG;IAC5C,QAAQ,CAAC,iBAAiB,EAAE,0BAA0B,CAAC;CACxD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { canonicalize } from "../semantic-advisor/shared.js";
|
|
3
|
+
export function bootstrapPlanHash(plan) {
|
|
4
|
+
const { planHash: _ignored, ...body } = plan;
|
|
5
|
+
return createHash("sha256").update(canonicalize(body)).digest("hex");
|
|
6
|
+
}
|
|
7
|
+
/** Bind a freshly initialized, not-yet-synced branch to its exact source state. */
|
|
8
|
+
export function bootstrapEmptyKbSnapshotId(input) {
|
|
9
|
+
return `empty-source-state-${createHash("sha256")
|
|
10
|
+
.update(canonicalize({
|
|
11
|
+
version: "kibi.empty-source-state.v1",
|
|
12
|
+
branch: input.branch,
|
|
13
|
+
workspaceSnapshot: input.workspaceSnapshot,
|
|
14
|
+
sourceHashes: input.sourceHashes,
|
|
15
|
+
}))
|
|
16
|
+
.digest("hex")}`;
|
|
17
|
+
}
|
|
18
|
+
export const BOOTSTRAP_PROVIDER_ORDER = [
|
|
19
|
+
"typed_kibi_docs",
|
|
20
|
+
"generic_repo_docs",
|
|
21
|
+
"repo_metadata",
|
|
22
|
+
"repo_layout",
|
|
23
|
+
"test_topology",
|
|
24
|
+
"source_symbols",
|
|
25
|
+
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-requirement.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/model-requirement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-requirement.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/model-requirement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAQjF,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,iCAAiC,EACjC,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAMhC,YAAY,EACV,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iCAAiC,EACjC,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,GACxB,CAAC;AAEF,wBAAsB,4BAA4B,CAChD,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIxB;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,oBAAoB,EAC1B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,sBAAsB,CAAC,CAsKjC;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,oBAAoB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,sBAAsB,CAAC,CAEjC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
1
|
import { buildStrictWriteSet } from "../../public/check-types.js";
|
|
4
|
-
import {
|
|
2
|
+
import { readKbManifestStatus } from "../../utils/kb-manifest.js";
|
|
5
3
|
import { normalizeSemanticClause, semanticClaimKey, } from "../semantic-advisor/clauses.js";
|
|
6
4
|
import { semanticSourceHash } from "../semantic-advisor/shared.js";
|
|
7
5
|
import { buildLogicApplyPlan } from "./logic-modeling.js";
|
|
@@ -10,21 +8,10 @@ import { estimateNormativeSignalConfidence, extractRequirementClaim, } from "./r
|
|
|
10
8
|
import { normalizeOptionalString, normalizeSourceFiles, } from "./requirement-utils.js";
|
|
11
9
|
export { estimateNormativeSignalConfidence, extractRequirementClaim, strictWriteSetToApplyPlan, writeSetPrimaryEntityId, };
|
|
12
10
|
export async function getWorkspaceMigrationWarning(workspaceRoot) {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
rawConfig = await readFile(configPath, "utf8");
|
|
17
|
-
}
|
|
18
|
-
catch {
|
|
11
|
+
const status = readKbManifestStatus(workspaceRoot);
|
|
12
|
+
if (status.state === "ok")
|
|
19
13
|
return null;
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
const parsed = JSON.parse(rawConfig);
|
|
23
|
-
return getSchemaVersionStatus(parsed ?? undefined).warning;
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
return "KB config schemaVersion could not be read and should be checked before applying automated modeling.";
|
|
27
|
-
}
|
|
14
|
+
return status.warning;
|
|
28
15
|
}
|
|
29
16
|
export async function handleKbModelRequirement(_prolog, args, workspaceRoot) {
|
|
30
17
|
const extracted = extractRequirementClaim({
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type RankedPredicateSchema } from "./predicate-ranker.js";
|
|
2
|
+
export declare const MIN_APPLICABILITY_SCORE = 0.62;
|
|
3
|
+
export declare const STRONG_APPLICABILITY_SCORE = 0.8;
|
|
4
|
+
export declare const WEAK_CANDIDATE_MARGIN = 0.06;
|
|
5
|
+
export interface SemanticApplicability {
|
|
6
|
+
readonly eligible: boolean;
|
|
7
|
+
readonly reasons: readonly string[];
|
|
8
|
+
readonly applicabilityScore: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Evaluate semantic fit after retrieval and before argument binding. The
|
|
12
|
+
* function deliberately does not inspect argument values: complete-looking
|
|
13
|
+
* terms cannot make a semantically unrelated schema eligible.
|
|
14
|
+
*/
|
|
15
|
+
export declare function evaluateSemanticApplicability(ranked: RankedPredicateSchema, text: string): SemanticApplicability;
|
|
16
|
+
//# sourceMappingURL=predicate-applicability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-applicability.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-applicability.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAC5C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAwO1C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,MAAM,GACX,qBAAqB,CA2EvB"}
|