kibi-cli 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +3 -2
- package/dist/cli-register-proof.d.ts.map +1 -1
- package/dist/cli-register-proof.js +25 -1
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +6 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/commands/aggregated-checks.d.ts +7 -0
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +25 -1
- package/dist/commands/check-generated.d.ts +7 -0
- package/dist/commands/check-generated.d.ts.map +1 -0
- package/dist/commands/check-generated.js +192 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +24 -15
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +227 -25
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +3 -1
- package/dist/commands/github-init.d.ts +1 -1
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +1 -1
- package/dist/commands/init-helpers.d.ts +17 -2
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +136 -30
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +110 -15
- package/dist/commands/proof-explain.d.ts +10 -0
- package/dist/commands/proof-explain.d.ts.map +1 -0
- package/dist/commands/proof-explain.js +45 -0
- package/dist/commands/proof-impact.d.ts +7 -0
- package/dist/commands/proof-impact.d.ts.map +1 -0
- package/dist/commands/proof-impact.js +39 -0
- package/dist/commands/proof-migrate-legacy.js +1 -1
- package/dist/commands/proof-prune.js +1 -1
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +14 -22
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/report.js +17 -2
- package/dist/commands/sync/cache.d.ts +20 -1
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +51 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +1 -1
- package/dist/commands/sync/manifest.d.ts +1 -0
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +18 -16
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +14 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +11 -3
- package/dist/engine.d.ts +29 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +259 -89
- package/dist/env/bootstrap.d.ts +84 -0
- package/dist/env/bootstrap.d.ts.map +1 -0
- package/dist/env/bootstrap.js +310 -0
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +67 -29
- package/dist/extractors/markdown.d.ts +4 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +33 -3
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +1 -0
- package/dist/extractors/symbols-coordinator.d.ts +8 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +40 -0
- package/dist/extractors/symbols-ts.d.ts +8 -19
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +33 -503
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +68 -30
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +4 -3
- package/dist/operations/modeling/model-requirement.d.ts +1 -1
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +179 -9
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +14 -2
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +24 -0
- package/dist/operations/modeling/predicate-types.d.ts +4 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-vocabulary.d.ts +54 -0
- package/dist/operations/modeling/predicate-vocabulary.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-vocabulary.js +169 -0
- package/dist/operations/modeling/requirement-types.d.ts +5 -0
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.d.ts +1 -1
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +30 -3
- package/dist/operations/modeling/vocabulary-alignment.d.ts +60 -0
- package/dist/operations/modeling/vocabulary-alignment.d.ts.map +1 -0
- package/dist/operations/modeling/vocabulary-alignment.js +178 -0
- package/dist/operations/mutation/contradictions.d.ts +3 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +29 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +33 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +8 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.js +64 -0
- package/dist/operations/mutation/relationships.d.ts +1 -1
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +1 -0
- package/dist/operations/mutation/saga.d.ts +5 -0
- package/dist/operations/mutation/saga.d.ts.map +1 -1
- package/dist/operations/mutation/saga.js +10 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +2 -0
- package/dist/operations/mutation/source-authoring.d.ts +6 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +65 -26
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +5 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
- package/dist/operations/mutation/symbol-granularity.js +9 -87
- package/dist/operations/mutation/types.d.ts +17 -0
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +6 -0
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +72 -4
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +24 -1
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +16 -3
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +61 -17
- package/dist/operations/planning/compile-intent.d.ts +49 -0
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +66 -4
- package/dist/operations/proof/baseline-diff.d.ts +41 -0
- package/dist/operations/proof/baseline-diff.d.ts.map +1 -0
- package/dist/operations/proof/baseline-diff.js +153 -0
- package/dist/operations/proof/code-scope.d.ts +17 -0
- package/dist/operations/proof/code-scope.d.ts.map +1 -0
- package/dist/operations/proof/code-scope.js +60 -0
- package/dist/operations/proof/explain.d.ts +75 -0
- package/dist/operations/proof/explain.d.ts.map +1 -0
- package/dist/operations/proof/explain.js +294 -0
- package/dist/operations/proof/impact.d.ts +45 -0
- package/dist/operations/proof/impact.d.ts.map +1 -0
- package/dist/operations/proof/impact.js +118 -0
- package/dist/operations/proof/ingest-proof.d.ts +4 -2
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +251 -77
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -1
- package/dist/operations/proof/migrate-legacy-receipts.js +28 -22
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
- package/dist/operations/proof/prune-receipts.js +8 -6
- package/dist/operations/proof/receipt-document.js +2 -2
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +3 -9
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +18 -67
- package/dist/operations/semantic-advisor/plugin-orchestration.d.ts +63 -0
- package/dist/operations/semantic-advisor/plugin-orchestration.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/plugin-orchestration.js +489 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts +15 -2
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-core.js +7 -140
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts +11 -12
- package/dist/operations/semantic-advisor/predicate-rules-launcher.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-launcher.js +6 -94
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts +16 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-policy.js +7 -150
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts +9 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.js +7 -102
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts +13 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/predicate-rules-product.js +7 -133
- package/dist/operations/semantic-advisor/types.d.ts +1 -0
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
- package/dist/plugins/compose-ontology-packs.d.ts +51 -0
- package/dist/plugins/compose-ontology-packs.d.ts.map +1 -0
- package/dist/plugins/compose-ontology-packs.js +257 -0
- package/dist/plugins/compose-semantic-classifier.d.ts +47 -0
- package/dist/plugins/compose-semantic-classifier.d.ts.map +1 -0
- package/dist/plugins/compose-semantic-classifier.js +216 -0
- package/dist/plugins/compose-vocabulary-alignment.d.ts +23 -0
- package/dist/plugins/compose-vocabulary-alignment.d.ts.map +1 -0
- package/dist/plugins/compose-vocabulary-alignment.js +141 -0
- package/dist/plugins/external-allowlist.d.ts +17 -0
- package/dist/plugins/external-allowlist.d.ts.map +1 -0
- package/dist/plugins/external-allowlist.js +29 -0
- package/dist/plugins/index.d.ts +11 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +37 -0
- package/dist/plugins/load-plugin.d.ts +19 -0
- package/dist/plugins/load-plugin.d.ts.map +1 -0
- package/dist/plugins/load-plugin.js +59 -0
- package/dist/plugins/project-config.d.ts +28 -0
- package/dist/plugins/project-config.d.ts.map +1 -0
- package/dist/plugins/project-config.js +90 -0
- package/dist/plugins/registry.d.ts +94 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +359 -0
- package/dist/plugins/resolve-package.d.ts +47 -0
- package/dist/plugins/resolve-package.d.ts.map +1 -0
- package/dist/plugins/resolve-package.js +262 -0
- package/dist/plugins/source-analysis-service.d.ts +44 -0
- package/dist/plugins/source-analysis-service.d.ts.map +1 -0
- package/dist/plugins/source-analysis-service.js +232 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -0
- package/dist/prolog/janitor.d.ts.map +1 -1
- package/dist/prolog/janitor.js +1 -1
- package/dist/prolog/store-lock.d.ts +1 -1
- package/dist/prolog/store-lock.d.ts.map +1 -1
- package/dist/prolog.d.ts +36 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +78 -9
- package/dist/proof/inspect.js +1 -1
- package/dist/proof/producers/playwright-case-id.js +2 -2
- package/dist/proof/producers/playwright-reporter.js +4 -4
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +7 -25
- package/dist/public/extractors/symbols-coordinator.d.ts +1 -1
- package/dist/public/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/public/extractors/symbols-coordinator.js +1 -1
- package/dist/public/impact/analyzer.d.ts +1 -1
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +6 -4
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +4 -12
- package/dist/public/operations/catalog.d.ts +39 -7
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +11 -3
- package/dist/public/operations/check-helpers.d.ts +7 -1
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +22 -2
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +51 -12
- package/dist/public/operations/discovery-entities.d.ts +53 -1
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +219 -12
- package/dist/public/operations/discovery-executors.d.ts +1 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +93 -59
- package/dist/public/operations/migration-plan.d.ts +2 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +50 -0
- package/dist/public/operations/predicate-schema-conformance.d.ts +41 -0
- package/dist/public/operations/predicate-schema-conformance.d.ts.map +1 -0
- package/dist/public/operations/predicate-schema-conformance.js +242 -0
- package/dist/public/operations/prolog-json.d.ts +1 -1
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +16 -10
- package/dist/public/operations/result-envelope.d.ts +34 -1
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +78 -2
- package/dist/public/operations/runtime-types.d.ts +17 -2
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +9 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +10 -1
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +10 -1
- package/dist/public/operations/specs/mutation-schemas.d.ts +27 -4
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +21 -3
- package/dist/public/operations/specs/proof.js +1 -1
- package/dist/public/operations/specs/reporting.d.ts +9 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +48 -17
- package/dist/public/operations/specs/semantic.d.ts +1 -1
- package/dist/public/operations/specs/semantic.d.ts.map +1 -1
- package/dist/public/operations/specs/semantic.js +54 -4
- package/dist/public/operations/specs/upsert.d.ts +28 -5
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +1 -1
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +11 -4
- package/dist/public/operations/types.d.ts +5 -0
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/proof-protocol.js +4 -4
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +22 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -0
- package/dist/public/skills/kibi-usage/SKILL.md +10 -3
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/dist/public/skills/kibi-usage/resources/proof.md +45 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/dist/public/symbol-granularity.d.ts +1 -1
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.generated.d.ts.map +1 -1
- package/dist/public/symbol-granularity.generated.js +38 -5
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +21 -5
- package/dist/relationships/shards.d.ts +6 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +26 -19
- package/dist/report/html-report.css +1239 -281
- package/dist/runtime/cli-runtime.d.ts.map +1 -1
- package/dist/runtime/cli-runtime.js +18 -0
- package/dist/schemas/entity.schema.json +32 -0
- package/dist/traceability/staged-diagnostics.d.ts +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-entity-id-style.d.ts +12 -0
- package/dist/traceability/staged-entity-id-style.d.ts.map +1 -0
- package/dist/traceability/staged-entity-id-style.js +68 -0
- package/dist/traceability/symbol-extract.d.ts +24 -7
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +64 -208
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +8 -0
- package/dist/traceability/validate.js +1 -1
- package/dist/types/entities.d.ts +2 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/entity-id-style.d.ts +27 -0
- package/dist/utils/entity-id-style.d.ts.map +1 -0
- package/dist/utils/entity-id-style.js +81 -0
- package/dist/utils/git-repository-context.d.ts +50 -0
- package/dist/utils/git-repository-context.d.ts.map +1 -0
- package/dist/utils/git-repository-context.js +259 -0
- package/dist/utils/rule-registry.d.ts +5 -0
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.d.ts +42 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +50 -0
- package/dist/utils/strict-modeling.d.ts +7 -0
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +11 -0
- package/package.json +14 -11
- package/schema/entities.pl +60 -1
- package/schema/relationships.pl +17 -4
- package/schema/validation.pl +118 -20
- package/src/public/diagnostic-usage.ts +16 -24
- package/src/public/extractors/symbols-coordinator.ts +1 -0
- package/src/public/impact/analyzer.ts +15 -12
- package/src/public/impact/full-kb-quality.ts +4 -16
- package/src/public/operations/check-executor.ts +13 -2
- package/src/public/operations/check-helpers.ts +29 -3
- package/src/public/operations/contracts.ts +59 -12
- package/src/public/operations/discovery-entities.ts +327 -12
- package/src/public/operations/discovery-executors.ts +110 -61
- package/src/public/operations/migration-plan.ts +57 -0
- package/src/public/operations/predicate-schema-conformance.ts +362 -0
- package/src/public/operations/prolog-json.ts +22 -8
- package/src/public/operations/result-envelope.ts +114 -2
- package/src/public/operations/runtime-types.ts +22 -3
- package/src/public/operations/specs/check-rules.generated.ts +9 -1
- package/src/public/operations/specs/discovery.ts +11 -1
- package/src/public/operations/specs/mutation-schemas.ts +23 -3
- package/src/public/operations/specs/proof.ts +1 -1
- package/src/public/operations/specs/reporting.ts +71 -24
- package/src/public/operations/specs/semantic.ts +79 -17
- package/src/public/operations/specs/upsert.ts +1 -1
- package/src/public/operations/symbol-repair-plan.ts +16 -7
- package/src/public/operations/types.ts +5 -0
- package/src/public/proof-fingerprint.ts +1 -1
- package/src/public/proof-protocol-types.d.ts +1 -1
- package/src/public/proof-protocol.ts +4 -4
- package/src/public/schemas/entity.ts +22 -0
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skills/kibi-usage/SKILL.md +10 -3
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/src/public/skills/kibi-usage/resources/proof.md +45 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/src/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/src/public/symbol-granularity.generated.ts +45 -12
- package/src/public/symbol-granularity.ts +3 -3
- package/src/public/telemetry-acceptance.ts +37 -6
- package/src/schemas/entity.schema.json +32 -0
- package/src/schemas/relationship.schema.json +1 -0
|
@@ -14,7 +14,7 @@ export declare const upsertSpec: {
|
|
|
14
14
|
};
|
|
15
15
|
readonly id: {
|
|
16
16
|
readonly type: "string";
|
|
17
|
-
readonly description: "Unique entity ID (string). Example: 'REQ-
|
|
17
|
+
readonly description: "Unique entity ID (string). Example: 'REQ-cli-gc'. Name entities by the behavior they govern (<TYPE>-<area>-<behavior>), never by the next free number. Existing ID updates the entity; new ID creates it.";
|
|
18
18
|
};
|
|
19
19
|
readonly properties: {
|
|
20
20
|
readonly type: "object";
|
|
@@ -30,7 +30,7 @@ export declare const upsertSpec: {
|
|
|
30
30
|
};
|
|
31
31
|
readonly source: {
|
|
32
32
|
readonly type: "string";
|
|
33
|
-
readonly description: "Optional provenance string. Example: '
|
|
33
|
+
readonly description: "Optional provenance string. Example: '.kb/requirements/REQ-cli-gc.md'. Defaults to 'mcp://kibi/upsert'.";
|
|
34
34
|
};
|
|
35
35
|
readonly tags: {
|
|
36
36
|
readonly type: "array";
|
|
@@ -56,7 +56,7 @@ export declare const upsertSpec: {
|
|
|
56
56
|
readonly items: {
|
|
57
57
|
readonly type: "string";
|
|
58
58
|
};
|
|
59
|
-
readonly description: "Optional references. Example: ['REQ-
|
|
59
|
+
readonly description: "Optional references. Example: ['REQ-cli-gc','https://example.com/spec'].";
|
|
60
60
|
};
|
|
61
61
|
readonly text_ref: {
|
|
62
62
|
readonly type: "string";
|
|
@@ -531,6 +531,29 @@ export declare const upsertSpec: {
|
|
|
531
531
|
};
|
|
532
532
|
readonly description: "Optional ordered argument explanations.";
|
|
533
533
|
};
|
|
534
|
+
readonly argument_constants: {
|
|
535
|
+
readonly type: "object";
|
|
536
|
+
readonly additionalProperties: {
|
|
537
|
+
readonly type: "array";
|
|
538
|
+
readonly items: {
|
|
539
|
+
readonly type: "string";
|
|
540
|
+
readonly minLength: 1;
|
|
541
|
+
};
|
|
542
|
+
readonly minItems: 1;
|
|
543
|
+
};
|
|
544
|
+
readonly description: "predicate_schema only: allowed constants keyed by argument name, e.g. {\"severity\": [\"warning\", \"info\"]}. Predicate facts must use a listed constant for those arguments; unlisted arguments stay open.";
|
|
545
|
+
};
|
|
546
|
+
readonly argument_aliases: {
|
|
547
|
+
readonly type: "object";
|
|
548
|
+
readonly additionalProperties: {
|
|
549
|
+
readonly type: "object";
|
|
550
|
+
readonly additionalProperties: {
|
|
551
|
+
readonly type: "string";
|
|
552
|
+
readonly minLength: 1;
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
readonly description: "predicate_schema only: legacy spellings keyed by argument name, each mapped to a declared constant, e.g. {\"severity\": {\"warn\": \"warning\"}}. kibi migrate rewrites facts that still use an alias.";
|
|
556
|
+
};
|
|
534
557
|
readonly aliases: {
|
|
535
558
|
readonly type: "array";
|
|
536
559
|
readonly items: {
|
|
@@ -600,7 +623,7 @@ export declare const upsertSpec: {
|
|
|
600
623
|
readonly properties: {
|
|
601
624
|
readonly type: {
|
|
602
625
|
readonly type: "string";
|
|
603
|
-
readonly enum: readonly ["depends_on", "specified_by", "verified_by", "validates", "implements", "covered_by", "executable_for", "constrained_by", "constrains", "requires_property", "requires_predicate", "requires_rule", "guards", "publishes", "consumes", "supersedes", "relates_to"];
|
|
626
|
+
readonly enum: readonly ["depends_on", "specified_by", "verified_by", "validates", "implements", "covered_by", "executable_for", "constrained_by", "constrains", "requires_property", "requires_predicate", "requires_rule", "guards", "publishes", "consumes", "supersedes", "restates", "relates_to"];
|
|
604
627
|
readonly description: "Relationship type enum. Use only supported values. Direction semantics follow KB model (e.g., implements symbol->req, verified_by req/scenario->test, executable_for symbol->test).";
|
|
605
628
|
};
|
|
606
629
|
readonly from: {
|
|
@@ -609,7 +632,7 @@ export declare const upsertSpec: {
|
|
|
609
632
|
};
|
|
610
633
|
readonly to: {
|
|
611
634
|
readonly type: "string";
|
|
612
|
-
readonly description: "Target entity ID (must exist). Example: 'REQ-
|
|
635
|
+
readonly description: "Target entity ID (must exist). Example: 'REQ-cli-gc'.";
|
|
613
636
|
};
|
|
614
637
|
};
|
|
615
638
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/upsert.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAQvE,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"upsert.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/upsert.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAQvE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCuC,CAAC"}
|
|
@@ -15,7 +15,7 @@ export const upsertSpec = {
|
|
|
15
15
|
},
|
|
16
16
|
id: {
|
|
17
17
|
type: "string",
|
|
18
|
-
description: "Unique entity ID (string). Example: 'REQ-
|
|
18
|
+
description: "Unique entity ID (string). Example: 'REQ-cli-gc'. Name entities by the behavior they govern (<TYPE>-<area>-<behavior>), never by the next free number. Existing ID updates the entity; new ID creates it.",
|
|
19
19
|
},
|
|
20
20
|
properties: ENTITY_PROPERTIES_SCHEMA,
|
|
21
21
|
relationships: RELATIONSHIPS_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-repair-plan.d.ts","sourceRoot":"","sources":["../../../src/public/operations/symbol-repair-plan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"symbol-repair-plan.d.ts","sourceRoot":"","sources":["../../../src/public/operations/symbol-repair-plan.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,eAAO,MAAM,0BAA0B,EAAG,4BAAqC,CAAC;AAEhF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,OAAO,EAAE,OAAO,0BAA0B,CAAC;IAC3C,QAAQ,EAAE,IAAI,CAAC;IACf,cAAc,EAAE,KAAK,CAAC;IACtB,OAAO,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CACvD,CAAC,CAAC;AAoBH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EACF,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,oBAAoB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH,gFAAgF;AAChF,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,EACrD,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC,CA2DhD;AAED,kFAAkF;AAClF,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,EAClD,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CA+DvD;AAwCD,sEAAsE;AACtE,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,EAClD,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAmGvC"}
|
|
@@ -3,7 +3,12 @@ import path from "node:path";
|
|
|
3
3
|
import { coarseCoordinateSpan } from "../../extractors/symbol-coordinates.js";
|
|
4
4
|
import { analyzeSourceText, enrichSymbolCoordinates, } from "../../extractors/symbols-coordinator.js";
|
|
5
5
|
import { isCoarseGranularityReason } from "../symbol-granularity.js";
|
|
6
|
-
import {
|
|
6
|
+
import { loadEntitiesPaged } from "./discovery-entities.js";
|
|
7
|
+
/**
|
|
8
|
+
* Symbol pages for repair planning. The full symbol inventory is already half
|
|
9
|
+
* of the bounded engine output on large workspaces, so it is read in pages.
|
|
10
|
+
*/
|
|
11
|
+
const SYMBOL_PAGE_SIZE = 250;
|
|
7
12
|
export const SYMBOL_REPAIR_PLAN_VERSION = "kibi.symbol-repair-plan.v1";
|
|
8
13
|
function sourceFileOf(entity) {
|
|
9
14
|
const value = entity.sourceFile ?? entity.source;
|
|
@@ -83,7 +88,7 @@ export async function addCoordinateRepairEvidence(rows, context) {
|
|
|
83
88
|
const ids = new Set(missingByRow.flat());
|
|
84
89
|
if (ids.size === 0 || !context.prolog)
|
|
85
90
|
return rows;
|
|
86
|
-
const symbols = (await
|
|
91
|
+
const symbols = (await loadEntitiesPaged(context.prolog, "symbol", SYMBOL_PAGE_SIZE)).filter((symbol) => ids.has(String(symbol.id)));
|
|
87
92
|
const evidence = await inspectCoordinateRepairs(symbols, context.workspaceRoot);
|
|
88
93
|
return rows.map((row, index) => {
|
|
89
94
|
const missing = missingByRow[index] ?? [];
|
|
@@ -152,7 +157,7 @@ function currentCandidates(entity, symbols, extractedByPath) {
|
|
|
152
157
|
export async function buildSymbolRepairPlan(rows, context) {
|
|
153
158
|
if (!context.prolog || rows.length === 0)
|
|
154
159
|
return undefined;
|
|
155
|
-
const symbols = await
|
|
160
|
+
const symbols = await loadEntitiesPaged(context.prolog, "symbol", SYMBOL_PAGE_SIZE);
|
|
156
161
|
const extractedByPath = new Map();
|
|
157
162
|
for (const symbol of symbols) {
|
|
158
163
|
const source = sourceFileOf(symbol);
|
|
@@ -164,7 +169,9 @@ export async function buildSymbolRepairPlan(rows, context) {
|
|
|
164
169
|
if (!existsSync(absolute))
|
|
165
170
|
continue;
|
|
166
171
|
try {
|
|
167
|
-
const
|
|
172
|
+
const content = readFileSync(absolute, "utf8");
|
|
173
|
+
// Coverage/impact is a maintenance path: never import project plugins.
|
|
174
|
+
const analysis = analyzeSourceText(absolute, content);
|
|
168
175
|
if (analysis.providerId === null)
|
|
169
176
|
continue;
|
|
170
177
|
extractedByPath.set(source, analysis.symbols.map((candidate) => ({
|
|
@@ -56,6 +56,11 @@ export interface OperationSpec<I = Readonly<Record<string, unknown>>, O = unknow
|
|
|
56
56
|
readonly businessInputSchema: Readonly<Record<string, unknown>>;
|
|
57
57
|
readonly requiresProlog: boolean;
|
|
58
58
|
readonly effects: readonly OperationEffect[];
|
|
59
|
+
/**
|
|
60
|
+
* When true, MCP duplicates envelope `data` into tool `content` text so hosts
|
|
61
|
+
* that hide `structuredContent` still expose discovery/proof payloads.
|
|
62
|
+
*/
|
|
63
|
+
readonly agentVisibleStructuredData?: boolean;
|
|
59
64
|
/** Generated effect metadata used by MCP annotations and telemetry. */
|
|
60
65
|
readonly declaredEffects?: readonly OperationEffectDeclaration[];
|
|
61
66
|
/** Version of the machine-readable result data for this operation. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/public/operations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,CAAC;AACjC,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,WAAW,GACX,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,aAAa,GACb,UAAU,GACV,kBAAkB,GAClB,qBAAqB,GACrB,WAAW,GACX,oBAAoB,GACpB,WAAW,GACX,UAAU,GACV,sBAAsB,GACtB,uBAAuB,GACvB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,GACf,iBAAiB,CAAC;AAEtB,MAAM,MAAM,eAAe,GACvB,YAAY,GACZ,SAAS,GACT,gBAAgB,GAChB,cAAc,GACd,UAAU,GACV,iBAAiB,CAAC;AAEtB,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,OAAO;IAC1C,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC9C,QAAQ,CAAC,iBAAiB,CA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AgB,CAAC,CAAC;CACrB;AAED,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,CAC/B,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrC,CAAC,GAAG,OAAO,IACT,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IACxB,QAAQ,CAAC,eAAe,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAChE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC1D,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// implements REQ-kibi-
|
|
1
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
2
2
|
export const PROOF_RUN_VERSION = "kibi.proof-run.v1";
|
|
3
|
-
// implements REQ-kibi-
|
|
3
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
4
4
|
export const PROOF_CONTRACT_VERSION = "kibi.proof-contract.v1";
|
|
5
|
-
// implements REQ-kibi-
|
|
5
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
6
6
|
export const PROOF_RECEIPT_VERSION = "kibi.proof-receipt.v1";
|
|
7
|
-
// implements REQ-kibi-
|
|
7
|
+
// implements REQ-kibi-verification-evidence-contract
|
|
8
8
|
export const PROOF_INTEGRATION_VERSION = "kibi.proof-integration.v1";
|
|
9
9
|
export const PROOF_RUN_OUTCOMES = [
|
|
10
10
|
"passed",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/public/schemas/entity.ts"],"names":[],"mappings":"AA4TA,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/public/schemas/entity.ts"],"names":[],"mappings":"AA4TA,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAoWzC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -503,6 +503,26 @@ const entitySchema = {
|
|
|
503
503
|
aliases: { type: "array", items: { type: "string" } },
|
|
504
504
|
examples: { type: "array", items: { type: "string" } },
|
|
505
505
|
predicate_args: { type: "array", items: { type: "string" } },
|
|
506
|
+
// predicate_schema only: allowed constants per argument name. Arguments
|
|
507
|
+
// without an entry stay open; predicate facts must use a listed constant.
|
|
508
|
+
argument_constants: {
|
|
509
|
+
type: "object",
|
|
510
|
+
additionalProperties: {
|
|
511
|
+
type: "array",
|
|
512
|
+
minItems: 1,
|
|
513
|
+
uniqueItems: true,
|
|
514
|
+
items: { type: "string", minLength: 1 },
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
// predicate_schema only: legacy spellings per argument name, each mapped
|
|
518
|
+
// to one declared constant. kibi migrate rewrites facts that use them.
|
|
519
|
+
argument_aliases: {
|
|
520
|
+
type: "object",
|
|
521
|
+
additionalProperties: {
|
|
522
|
+
type: "object",
|
|
523
|
+
additionalProperties: { type: "string", minLength: 1 },
|
|
524
|
+
},
|
|
525
|
+
},
|
|
506
526
|
rule_ir: { $ref: "#/$defs/logicRule" },
|
|
507
527
|
rule_hash: { type: "string", pattern: "^[a-f0-9]{64}$" },
|
|
508
528
|
rule_schema_id: { type: "string", minLength: 1 },
|
|
@@ -566,6 +586,8 @@ const entitySchema = {
|
|
|
566
586
|
{ required: ["aliases"] },
|
|
567
587
|
{ required: ["examples"] },
|
|
568
588
|
{ required: ["predicate_args"] },
|
|
589
|
+
{ required: ["argument_constants"] },
|
|
590
|
+
{ required: ["argument_aliases"] },
|
|
569
591
|
{ required: ["rule_ir"] },
|
|
570
592
|
{ required: ["rule_hash"] },
|
|
571
593
|
{ required: ["rule_schema_id"] },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationship.d.ts","sourceRoot":"","sources":["../../../src/public/schemas/relationship.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"relationship.d.ts","sourceRoot":"","sources":["../../../src/public/schemas/relationship.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
id: kibi-usage
|
|
3
3
|
name: Kibi Usage
|
|
4
4
|
description: Use Kibi's source-first, exact-Git, migration-aware, proof-aware operations safely across MCP or the trusted local CLI, including partial completion repair.
|
|
5
|
-
version: 2.
|
|
5
|
+
version: 2.2.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -59,7 +59,11 @@ mutability, and Prolog requirements of each operation.
|
|
|
59
59
|
## Safe workflow
|
|
60
60
|
|
|
61
61
|
1. Always discover before you mutate: start with `kb_search`, then exact-filter with `kb_query`. Use
|
|
62
|
-
`kb_status` when branch or freshness confidence matters.
|
|
62
|
+
`kb_status` when branch or freshness confidence matters. `kb_search` ranks
|
|
63
|
+
lexically unless you pass `rankingMode: "intent-v1"`, `semanticFacets`, or
|
|
64
|
+
`sourceLocations`; use intent mode with grounded facets for conceptual
|
|
65
|
+
questions and before changing a source file, and keep lexical search for
|
|
66
|
+
literal identifiers. See `resources/workflows.md` for the mode recipe.
|
|
63
67
|
2. Resolve genuine ambiguity with the human; use semantic advisor/modeling
|
|
64
68
|
operations for deterministic interpretation and typed facts.
|
|
65
69
|
3. Create endpoints before relationships and upsert small batches sequentially.
|
|
@@ -133,6 +137,9 @@ safe normative claims; use `observation` or `meta` for bug/workaround notes and
|
|
|
133
137
|
tests, symbol ownership, and fresh proof-bearing receipts before claiming proof.
|
|
134
138
|
For an existing product KB that needs semantic backfill, read
|
|
135
139
|
`resources/kb-improvement.md`, and `resources/proof.md` for the proof workflow.
|
|
140
|
+
When a proof ratchet fails, follow Debugging proof regressions in
|
|
141
|
+
`resources/proof.md`: use `kibi proof explain` and compare current proof state
|
|
142
|
+
to committed `proof/baseline.json` with `kibi proof impact`.
|
|
136
143
|
|
|
137
144
|
## Predicate Ontology Decision Tree
|
|
138
145
|
|
|
@@ -157,7 +164,7 @@ Represent implementation ownership with a `symbol` entity that has
|
|
|
157
164
|
`sourceFile`, `implements` to the requirement, and `covered_by` to the test.
|
|
158
165
|
Prolog `symbol-coverage` also requires the test to `validates` the requirement
|
|
159
166
|
(or the requirement `verified_by` the test). `covered_by` alone is not
|
|
160
|
-
enough. Do not rely on legacy `// implements REQ
|
|
167
|
+
enough. Do not rely on legacy `// implements REQ-<area>-<behavior>` comments as the
|
|
161
168
|
traceability record.
|
|
162
169
|
|
|
163
170
|
## Complete Logical Coverage
|
|
@@ -55,6 +55,10 @@ relationship: { type: requires_predicate, from: REQ-EDITOR-DRAFT-AUTOSAVE, to: F
|
|
|
55
55
|
|
|
56
56
|
The project-local schema endpoint must exist before this fact is linked. When ontology extension is explicitly authorized, define it first with `fact_kind: predicate_schema`, `predicate_name`, `predicate_arity`, and equally sized `argument_names` and `argument_types`. Without an authorized stable signature, record `review:ontology-gap` instead of inventing a schema.
|
|
57
57
|
|
|
58
|
+
### Closed argument vocabularies
|
|
59
|
+
|
|
60
|
+
A schema can close an argument with `argument_constants` (allowed values keyed by argument name) and map older spellings with `argument_aliases`. Reuse a declared constant; `kb_upsert` rejects any other value and names the constant to use for an alias. When a genuinely new value is needed, extend `argument_constants` on the schema first. To converge existing facts, declare aliases for their spellings and let `kibi migrate` rewrite them (`predicate_schema_alignment` actions). Close only arguments with a natural shared vocabulary, such as the governed component or a severity; forcing distinct obligations into a few constants makes different requirements share one ground term.
|
|
61
|
+
|
|
58
62
|
### Deny predicate
|
|
59
63
|
|
|
60
64
|
Claim: “Suspended users must not publish articles.” When `permission_rule` fits, preserve its positive schema name and encode prohibition as polarity:
|
|
@@ -103,3 +103,48 @@ re-run `kibi prove` for the affected selection, then confirm `kb_status` and
|
|
|
103
103
|
`kb_coverage` before handoff.
|
|
104
104
|
|
|
105
105
|
Full reference: `docs/proving-requirements.md`.
|
|
106
|
+
|
|
107
|
+
## Debugging proof regressions
|
|
108
|
+
|
|
109
|
+
When a proof ratchet fails, diagnose first. Do not treat
|
|
110
|
+
`proof/baseline.json` as the thing to edit.
|
|
111
|
+
|
|
112
|
+
1. Do not refresh `proof/baseline.json` as the first fix.
|
|
113
|
+
2. Identify the exact requirement and symbol responsible for the regression.
|
|
114
|
+
3. Use Kibi proof diagnostics rather than reverse-engineering
|
|
115
|
+
`requirement_proof.pl`:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
kibi proof explain REQ-<id>
|
|
119
|
+
kibi proof explain SYM-<id>
|
|
120
|
+
kibi proof impact
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`kibi proof impact` compares the current Proof projection to
|
|
124
|
+
`HEAD:proof/baseline.json` (the committed ratchet snapshot, not the
|
|
125
|
+
working-tree file). It is diagnostic: fingerprint differences are reported
|
|
126
|
+
and the command exits 0 on successful evaluation. The strict ratchet remains
|
|
127
|
+
`scripts/check-proof-baseline.mjs`.
|
|
128
|
+
4. For `missing_production_symbol_coverage`, inspect symbol role, owning
|
|
129
|
+
requirement, `covered_by`, candidate test scope, the requirement scenario
|
|
130
|
+
chain, and the current proof receipt. `kibi proof explain` prints those as
|
|
131
|
+
three labeled blocks so they cannot be confused:
|
|
132
|
+
`required_proofs` (TEST contract obligations), `executable_for` (test-code
|
|
133
|
+
identity), and `covered_by` (production coverage candidates with primary
|
|
134
|
+
plus optional secondary reasons).
|
|
135
|
+
5. A behavioral production symbol requires qualifying behavioral/E2E evidence
|
|
136
|
+
under the current proof model.
|
|
137
|
+
6. Unit coverage can satisfy structural/type-shape requirements only when the
|
|
138
|
+
symbol genuinely represents structural shape and the proof model allows it.
|
|
139
|
+
7. `executable_for` identifies executable test code. Never use it on
|
|
140
|
+
production helpers merely to remove production coverage obligations.
|
|
141
|
+
8. Do not trust TEST names. Resolve
|
|
142
|
+
`TEST -> proof_contract.required_proofs -> SYM -> source` and inspect what
|
|
143
|
+
the executable test actually exercises. Kibi does not infer “this TEST name
|
|
144
|
+
does not match that source file.”
|
|
145
|
+
9. A passing proof producer does not automatically make every authored
|
|
146
|
+
`covered_by` relationship semantically correct.
|
|
147
|
+
10. Prefer one meaningful E2E scenario covering multiple internal functions
|
|
148
|
+
plus focused unit tests for edge cases, rather than an E2E test per helper.
|
|
149
|
+
11. Refresh the baseline only after a genuine intentional proof-state
|
|
150
|
+
improvement requires the ratchet snapshot to be updated.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
| `constrains` | req -> fact(subject) | Requirement constrains a strict-lane domain fact |
|
|
13
13
|
| `requires_property` | req -> fact(property_value) | Requirement requires a specific property value fact |
|
|
14
14
|
| `supersedes` | new-req -> old-req | New requirement formally replaces an old requirement |
|
|
15
|
+
| `restates` | req -> req | Requirement intentionally restates another current requirement (for example a product requirement echoed in a platform requirement); suppresses `domain-redundancy` for that pair without retiring either side |
|
|
15
16
|
| `covered_by` | symbol -> test | Production symbol has test coverage evidence |
|
|
16
17
|
|
|
17
18
|
## Valid Payload Examples
|
|
@@ -20,32 +21,32 @@
|
|
|
20
21
|
```yaml
|
|
21
22
|
relationships:
|
|
22
23
|
- type: implements
|
|
23
|
-
from: SYM-
|
|
24
|
-
to: REQ-
|
|
24
|
+
from: SYM-operation-execute-check
|
|
25
|
+
to: REQ-cli-check
|
|
25
26
|
```
|
|
26
27
|
|
|
27
28
|
### specified_by
|
|
28
29
|
```yaml
|
|
29
30
|
relationships:
|
|
30
31
|
- type: specified_by
|
|
31
|
-
from: REQ-
|
|
32
|
-
to: SCEN-
|
|
32
|
+
from: REQ-mcp-search-discovery
|
|
33
|
+
to: SCEN-mcp-search-discovery
|
|
33
34
|
```
|
|
34
35
|
|
|
35
36
|
### verified_by
|
|
36
37
|
```yaml
|
|
37
38
|
relationships:
|
|
38
39
|
- type: verified_by
|
|
39
|
-
from: REQ-
|
|
40
|
-
to: TEST-
|
|
40
|
+
from: REQ-mcp-search-discovery
|
|
41
|
+
to: TEST-mcp-search-discovery
|
|
41
42
|
```
|
|
42
43
|
|
|
43
44
|
### validates
|
|
44
45
|
```yaml
|
|
45
46
|
relationships:
|
|
46
47
|
- type: validates
|
|
47
|
-
from: TEST-
|
|
48
|
-
to: SCEN-
|
|
48
|
+
from: TEST-mcp-search-discovery
|
|
49
|
+
to: SCEN-mcp-search-discovery
|
|
49
50
|
```
|
|
50
51
|
|
|
51
52
|
### executable_for
|
|
@@ -53,39 +54,56 @@ relationships:
|
|
|
53
54
|
relationships:
|
|
54
55
|
- type: executable_for
|
|
55
56
|
from: SYM-test-login
|
|
56
|
-
to: TEST-
|
|
57
|
+
to: TEST-mcp-search-discovery
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
### constrains
|
|
60
61
|
```yaml
|
|
61
62
|
relationships:
|
|
62
63
|
- type: constrains
|
|
63
|
-
from: REQ-
|
|
64
|
-
to: FACT-
|
|
64
|
+
from: REQ-cli-check
|
|
65
|
+
to: FACT-SUBJECT-KIBI-CHECK
|
|
65
66
|
```
|
|
66
67
|
|
|
67
68
|
### requires_property
|
|
68
69
|
```yaml
|
|
69
70
|
relationships:
|
|
70
71
|
- type: requires_property
|
|
71
|
-
from: REQ-
|
|
72
|
-
to: FACT-
|
|
72
|
+
from: REQ-cli-check
|
|
73
|
+
to: FACT-PROP-CHECK-FAILURE-EXIT-CODE
|
|
73
74
|
```
|
|
74
75
|
|
|
75
76
|
### supersedes
|
|
76
77
|
```yaml
|
|
77
78
|
relationships:
|
|
78
79
|
- type: supersedes
|
|
79
|
-
from: REQ-
|
|
80
|
-
to: REQ-
|
|
80
|
+
from: REQ-opencode-kibi-briefing-v2
|
|
81
|
+
to: REQ-opencode-kibi-briefing-v1
|
|
81
82
|
```
|
|
82
83
|
|
|
84
|
+
A `-v2` suffix is acceptable only for a direct superseding replacement like
|
|
85
|
+
this one; otherwise name the new requirement by the behavior it governs.
|
|
86
|
+
|
|
87
|
+
### restates
|
|
88
|
+
```yaml
|
|
89
|
+
# Illustrative: a product requirement echoes a platform requirement verbatim.
|
|
90
|
+
relationships:
|
|
91
|
+
- type: restates
|
|
92
|
+
from: REQ-billing-invoice-retention
|
|
93
|
+
to: REQ-platform-record-retention
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Use `restates` only when two current requirements deliberately ground the same
|
|
97
|
+
logical term (same predicate, property tuple, or rule semantic key). It keeps
|
|
98
|
+
both requirements current and tells `domain-redundancy` the duplication is
|
|
99
|
+
intentional. If one requirement replaces the other, use `supersedes` instead.
|
|
100
|
+
|
|
83
101
|
### covered_by
|
|
84
102
|
```yaml
|
|
85
103
|
relationships:
|
|
86
104
|
- type: covered_by
|
|
87
|
-
from: SYM-
|
|
88
|
-
to: TEST-
|
|
105
|
+
from: SYM-operation-execute-check
|
|
106
|
+
to: TEST-mcp-search-discovery
|
|
89
107
|
```
|
|
90
108
|
|
|
91
109
|
## Invalid Test-Fact Shortcuts
|
|
@@ -29,3 +29,39 @@ Cancellation follows the same rule: wait for the terminal journal state. A
|
|
|
29
29
|
pre-commit rollback is retryable, a committed source with a failed derivative
|
|
30
30
|
is repairable, and an indeterminate outcome is non-retryable until its recovery
|
|
31
31
|
action resolves the journal.
|
|
32
|
+
|
|
33
|
+
## Naming entities
|
|
34
|
+
|
|
35
|
+
Name every entity by what it governs, the way you would name a source file.
|
|
36
|
+
Never choose "the next number": parallel branches pick the same next number and
|
|
37
|
+
collide even when they touch unrelated behavior.
|
|
38
|
+
|
|
39
|
+
- Use `<TYPE>-<area>-<behavior>` in kebab-case, with the type prefix kept
|
|
40
|
+
uppercase: `REQ-cli-gc`, `SCEN-mcp-search-discovery`,
|
|
41
|
+
`TEST-mcp-search-discovery`, `ADR-capability-plugins-v1`,
|
|
42
|
+
`EVT-exact-branch-store-ensure`, and a flag named after its gate such as
|
|
43
|
+
`FLAG-scip-symbol-extraction`.
|
|
44
|
+
- The filename stem equals the frontmatter `id`
|
|
45
|
+
(`.kb/requirements/REQ-cli-gc.md` has `id: REQ-cli-gc`). Always set `id`
|
|
46
|
+
explicitly; a missing `id` falls back to a path-and-title hash that changes
|
|
47
|
+
when the file is renamed.
|
|
48
|
+
- Before creating an entity, `kb_search` the area. If an existing entity already
|
|
49
|
+
covers the behavior, update it, or create a replacement and link it with
|
|
50
|
+
`supersedes`. A `-v2` suffix is acceptable only for that direct superseding
|
|
51
|
+
replacement.
|
|
52
|
+
- A name collision with another branch usually means the same work was done
|
|
53
|
+
twice. Reconcile the two entities; do not rename one of them to dodge the
|
|
54
|
+
collision.
|
|
55
|
+
- The area prefix is for humans. Whether two requirements are about the same
|
|
56
|
+
thing is decided by their facts: a shared `subject_key` and identical
|
|
57
|
+
predicate or property signatures, which `domain-redundancy` and
|
|
58
|
+
`domain-contradictions` compare deterministically. Reuse existing subject keys
|
|
59
|
+
(dotted `component.aspect[.sub]`, lowercase snake segments such as
|
|
60
|
+
`kibi.cli.check.staged`) instead of deriving a subject from the requirement
|
|
61
|
+
ID.
|
|
62
|
+
|
|
63
|
+
`entity-id-style` reports new purely numeric IDs (`REQ-123`) and IDs whose
|
|
64
|
+
filename stem differs from `id` as non-blocking quality diagnostics. Legacy
|
|
65
|
+
numbered entities created before the naming standard are grandfathered and are
|
|
66
|
+
not renamed, because code comments such as `// implements REQ-003` still
|
|
67
|
+
reference them.
|
|
@@ -33,11 +33,62 @@ surfaces are a release defect: require a new package version and label any
|
|
|
33
33
|
project override temporary. This skill never selects a package manager or
|
|
34
34
|
edits dependency configuration.
|
|
35
35
|
|
|
36
|
+
## Choosing a discovery mode
|
|
37
|
+
|
|
38
|
+
`kb_search` is not one behavior. It selects deterministic intent ranking when
|
|
39
|
+
you pass `rankingMode: "intent-v1"`, `semanticFacets`, or `sourceLocations`,
|
|
40
|
+
and legacy lexical ranking otherwise. Naming the tool is not enough; the inputs
|
|
41
|
+
decide the path.
|
|
42
|
+
|
|
43
|
+
- **Exact identity** — you already know the ID. Use `kb_query`, not search.
|
|
44
|
+
- **Literal token** — a symbol, file, or error string that appears verbatim.
|
|
45
|
+
Use lexical `kb_search` and keep the query close to the literal text.
|
|
46
|
+
- **Conceptual or behavioral** — "how does checkout handle a declined card".
|
|
47
|
+
Use intent mode and ground it in what you actually know:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"query": "declined card during checkout",
|
|
52
|
+
"rankingMode": "intent-v1",
|
|
53
|
+
"semanticFacets": {
|
|
54
|
+
"actors": ["shopper"],
|
|
55
|
+
"actions": ["pay"],
|
|
56
|
+
"objects": ["card"],
|
|
57
|
+
"constraints": ["declined"]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- **Before changing code** — pass the file you are about to edit as a source
|
|
63
|
+
location, so results are matched against source-linked symbols and return
|
|
64
|
+
source evidence:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"query": "checkout total rounding",
|
|
69
|
+
"rankingMode": "intent-v1",
|
|
70
|
+
"sourceLocations": [{ "path": "src/checkout.ts", "symbol": "computeTotal" }]
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Supply facets only from the request, the code, or prior results. Inventing
|
|
75
|
+
facets fabricates evidence and biases ranking. Intent mode abstains below
|
|
76
|
+
`minScore` instead of returning weak matches; an abstention is an explicit
|
|
77
|
+
no-answer, so widen the query or drop to lexical search rather than treating it
|
|
78
|
+
as "nothing exists". There is no target percentage of intent-mode calls — a
|
|
79
|
+
literal identifier lookup is still best served lexically.
|
|
80
|
+
|
|
81
|
+
Results are summaries by default: identifying metadata, score, reasons, and a
|
|
82
|
+
snippet. Read them to pick candidates, then `kb_query` those IDs for full
|
|
83
|
+
bodies, or pass `fields: "full"` when you genuinely need every body. Extract
|
|
84
|
+
the relevant existing constraints and decisions from the response before
|
|
85
|
+
planning a behavior change; a search receipt is not comprehension.
|
|
86
|
+
|
|
36
87
|
## Discovery to Validation Sequence
|
|
37
88
|
|
|
38
89
|
The canonical workflow for any KB operation follows this pattern:
|
|
39
90
|
|
|
40
|
-
1. **Discover**: `kb_search` with focused probes
|
|
91
|
+
1. **Discover**: `kb_search` with focused probes; pick the mode above
|
|
41
92
|
2. **Confirm**: `kb_query` for exact IDs and state
|
|
42
93
|
3. **Inspect**: `kb_status` when freshness matters
|
|
43
94
|
4. **Decompose**: `kb_semantic_advisor` on the complete normative prose; verify or supply every atomic clause
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ALLOWED_GRANULARITY_REASONS, ALLOWED_GRANULARITY_REASONS_PROSE, COARSE_GRANULARITY_REASONS, COARSE_GRANULARITY_REASONS_PARENTHESIZED, COARSE_GRANULARITY_REASONS_PROSE,
|
|
1
|
+
import { ALLOWED_GRANULARITY_REASONS, ALLOWED_GRANULARITY_REASONS_PROSE, COARSE_GRANULARITY_REASONS, COARSE_GRANULARITY_REASONS_PARENTHESIZED, COARSE_GRANULARITY_REASONS_PROSE, type CoarseGranularityReason, type GranularityReason, ROLE_INFERENCE, SYMBOL_ROLES, type SymbolRole, TRACEABILITY_RELATIONSHIP_TYPES, type TraceabilityRelationshipType } from "./symbol-granularity.generated.js";
|
|
2
2
|
export { ALLOWED_GRANULARITY_REASONS, ALLOWED_GRANULARITY_REASONS_PROSE, COARSE_GRANULARITY_REASONS, COARSE_GRANULARITY_REASONS_PARENTHESIZED, COARSE_GRANULARITY_REASONS_PROSE, ROLE_INFERENCE, SYMBOL_ROLES, TRACEABILITY_RELATIONSHIP_TYPES, };
|
|
3
3
|
export type { CoarseGranularityReason, GranularityReason, SymbolRole, TraceabilityRelationshipType, } from "./symbol-granularity.generated.js";
|
|
4
4
|
export type SymbolKind = "function" | "class" | "method" | "property" | "accessor" | "interface" | "type" | "variable" | "enum" | "unknown";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-granularity.d.ts","sourceRoot":"","sources":["../../src/public/symbol-granularity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,0BAA0B,EAC1B,wCAAwC,EACxC,gCAAgC,EAChC,
|
|
1
|
+
{"version":3,"file":"symbol-granularity.d.ts","sourceRoot":"","sources":["../../src/public/symbol-granularity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,0BAA0B,EAC1B,wCAAwC,EACxC,gCAAgC,EAChC,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,cAAc,EACd,YAAY,EACZ,KAAK,UAAU,EACf,+BAA+B,EAC/B,KAAK,4BAA4B,EAClC,MAAM,mCAAmC,CAAC;AAK3C,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,EACjC,0BAA0B,EAC1B,wCAAwC,EACxC,gCAAgC,EAChC,cAAc,EACd,YAAY,EACZ,+BAA+B,GAChC,CAAC;AACF,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,4BAA4B,GAC7B,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,WAAW,GACX,MAAM,GACN,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAYD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAE5D;AAED,eAAO,MAAM,uBAAuB,wBAAkB,CAAC;AAEvD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAIhE;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,4BAA4B,CAIvC;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,iBAAiB,CAE5B;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,uBAAuB,CAElC;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,uBAAuB,GAAG,UAAU,CAI5E;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,uBAAuB,GACjC,OAAO,CAET;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,uBAAuB,EAAE,GACpC,MAAM,EAAE,CAMV;AAED,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,uBAAuB,EAAE,GACpC,MAAM,EAAE,CAQV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-granularity.generated.d.ts","sourceRoot":"","sources":["../../src/public/symbol-granularity.generated.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"symbol-granularity.generated.d.ts","sourceRoot":"","sources":["../../src/public/symbol-granularity.generated.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,2BAA2B,sGAM9B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,eAAO,MAAM,0BAA0B,uFAK7B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9C,eAAO,MAAM,YAAY,oFAOf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAW/D,CAAC;AAEF,eAAO,MAAM,+BAA+B,yDAIlC,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,wEAAwE;AACxE,eAAO,MAAM,iCAAiC,uFACwC,CAAC;AAEvF,sEAAsE;AACtE,eAAO,MAAM,gCAAgC,0EAC4B,CAAC;AAE1E,yEAAyE;AACzE,eAAO,MAAM,wCAAwC,yEACmB,CAAC"}
|