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
|
@@ -1,140 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
normalizePredicateToken(g.condition ?? ""),
|
|
9
|
-
"disabled",
|
|
10
|
-
],
|
|
11
|
-
rationale: "Disabled-until prose defines a condition that guards behavior availability and should be queryable as a predicate.",
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<before>[a-z][a-z\s_-]*?)\s+before\s+(?<after>.+?)\.?$/i,
|
|
15
|
-
name: "temporal_order",
|
|
16
|
-
args: (g) => [
|
|
17
|
-
normalizeKey(g.subject ?? "").replace(/_/g, "."),
|
|
18
|
-
normalizePredicateToken(g.before ?? ""),
|
|
19
|
-
normalizePredicateToken(g.after ?? ""),
|
|
20
|
-
],
|
|
21
|
-
rationale: "Before/after ordering is relational temporal logic and should be modeled as a predicate.",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
pattern: /^if\s+(?:(?:a|an|the)\s+)?(?<conditionSubject>[a-z][a-z_-]*)\s+(?<condition>.+?),\s*(?:it|they|the\s+[a-z][a-z\s_-]*?)\s+(?<behavior>.+?)\.?$/i,
|
|
25
|
-
name: "conditional_behavior",
|
|
26
|
-
args: (g) => [
|
|
27
|
-
singularize(normalizeKey(g.conditionSubject ?? "")),
|
|
28
|
-
normalizePredicateToken(g.condition ?? ""),
|
|
29
|
-
normalizePredicateToken(g.behavior ?? ""),
|
|
30
|
-
],
|
|
31
|
-
rationale: "If/then requirement prose is conditional behavior and should be queryable as a predicate.",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
pattern: /^when\s+(?<condition>.+?),\s*(?:the\s+)?(?<subject>.+?)\s+(?:must|shall|should)\s+(?<behavior>.+?)\.?$/i,
|
|
35
|
-
name: "conditional_behavior",
|
|
36
|
-
args: (g) => [
|
|
37
|
-
normalizeKey(g.subject ?? ""),
|
|
38
|
-
normalizePredicateToken(g.condition ?? ""),
|
|
39
|
-
normalizePredicateToken(g.behavior ?? "behavior"),
|
|
40
|
-
],
|
|
41
|
-
rationale: "When/must prose is conditional behavior and should be queryable as a predicate.",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
pattern: /^(?:the\s+)?(?<subject>[a-z][a-z\s_-]*?)\s+(?:must|shall|should)\s+(?<behavior>.+?)\s+unless\s+(?:the\s+)?(?<exception>.+?)\.?$/i,
|
|
45
|
-
name: "exception_rule",
|
|
46
|
-
args: (g) => [
|
|
47
|
-
normalizeSubjectKey(g.subject ?? ""),
|
|
48
|
-
normalizePredicateToken(g.behavior ?? ""),
|
|
49
|
-
normalizePredicateToken(g.exception ?? ""),
|
|
50
|
-
],
|
|
51
|
-
rationale: "Unless/except prose defines an explicit exception to required behavior and should be queryable as a predicate.",
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
pattern: /^(?<left>.+?)\s+and\s+(?<right>.+?)\s+(?:must|shall|should)\s+be\s+mutually\s+exclusive\.?$/i,
|
|
55
|
-
name: "mutual_exclusion",
|
|
56
|
-
args: (g) => [normalizeKey(g.left ?? ""), normalizeKey(g.right ?? "")],
|
|
57
|
-
rationale: "Mutual-exclusion prose is a relational constraint and should be queryable as a predicate.",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
pattern: /^(?<subject>.+?)\s+requires\s+(?<prerequisite>.+?)\s+before\s+(?<dependent>.+?)\.?$/i,
|
|
61
|
-
name: "dependency_rule",
|
|
62
|
-
args: (g) => [
|
|
63
|
-
normalizeKey(g.subject ?? ""),
|
|
64
|
-
normalizePredicateToken(g.prerequisite ?? ""),
|
|
65
|
-
normalizePredicateToken(g.dependent ?? ""),
|
|
66
|
-
],
|
|
67
|
-
rationale: "Requires-before prose defines a prerequisite relationship and should be queryable as a predicate.",
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
pattern: /^(?<resource>.+?)\s+(?:is|are)\s+owned\s+by\s+(?:the\s+)?(?<owner>.+?)\.?$/i,
|
|
71
|
-
name: "ownership_rule",
|
|
72
|
-
args: (g) => [normalizeKey(g.resource ?? ""), normalizeKey(g.owner ?? "")],
|
|
73
|
-
rationale: "Ownership prose assigns responsibility for a resource or behavior and should be queryable as a predicate.",
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
pattern: /^(?<inputs>.+?)\s+saved\s+in\s+the\s+same\s+(?<slot>.+?)\s+must\s+merge\s+into\s+(?<target>.+?)\s+instead\s+of\s+creating\s+.+?\.?$/i,
|
|
77
|
-
name: "merge_policy",
|
|
78
|
-
args: (g) => [
|
|
79
|
-
normalizePredicateToken(g.inputs ?? ""),
|
|
80
|
-
normalizePredicateToken(g.slot ?? ""),
|
|
81
|
-
normalizePredicateToken(g.target ?? ""),
|
|
82
|
-
],
|
|
83
|
-
rationale: "Same-slot merge prose defines ontology-lite merge behavior and should be queryable as a predicate.",
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+retry\s+up\s+to\s+(?<count>\d+)\s+(?<unit>times|attempts?)\.?$/i,
|
|
87
|
-
name: "retry_policy",
|
|
88
|
-
args: (g) => [
|
|
89
|
-
normalizeKey(g.subject ?? ""),
|
|
90
|
-
g.count ?? "",
|
|
91
|
-
normalizeKey(g.unit ?? ""),
|
|
92
|
-
],
|
|
93
|
-
rationale: "Retry prose defines bounded recovery behavior and should be queryable as a predicate.",
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+escalate\s+to\s+(?<target>.+?)\s+after\s+(?<delay>\d+)\s+(?<unit>[a-z]+)\.?$/i,
|
|
97
|
-
name: "escalation_rule",
|
|
98
|
-
args: (g) => [
|
|
99
|
-
normalizeKey(g.subject ?? ""),
|
|
100
|
-
normalizeKey(g.target ?? ""),
|
|
101
|
-
g.delay ?? "",
|
|
102
|
-
normalizeKey(g.unit ?? ""),
|
|
103
|
-
],
|
|
104
|
-
rationale: "Escalation prose defines delayed handoff behavior and should be queryable as a predicate.",
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
pattern: /^(?<subject>.+?)\s+availability\s+(?:must|shall|should)\s+be\s+at\s+least\s+(?<threshold>\d+(?:\.\d+)?)\s+(?<unit>percent|%)\s+(?<window>[a-z]+)\.?$/i,
|
|
108
|
-
name: "availability_sla",
|
|
109
|
-
args: (g) => [
|
|
110
|
-
normalizeKey(g.subject ?? ""),
|
|
111
|
-
g.threshold ?? "",
|
|
112
|
-
g.unit === "%" ? "percent" : normalizeKey(g.unit ?? ""),
|
|
113
|
-
normalizeKey(g.window ?? ""),
|
|
114
|
-
],
|
|
115
|
-
rationale: "Availability SLA prose defines a service target over a window and should be queryable as a predicate.",
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+notify\s+(?<recipient>.+?)\s+by\s+(?<channel>[a-z]+)\.?$/i,
|
|
119
|
-
name: "notification_route",
|
|
120
|
-
args: (g) => [
|
|
121
|
-
normalizeKey(g.subject ?? ""),
|
|
122
|
-
normalizeKey(g.recipient ?? ""),
|
|
123
|
-
normalizeKey(g.channel ?? ""),
|
|
124
|
-
],
|
|
125
|
-
rationale: "Notification routing prose defines a recipient and channel and should be queryable as a predicate.",
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+idempotent\s+by\s+(?<key>.+?)\.?$/i,
|
|
129
|
-
name: "idempotency_rule",
|
|
130
|
-
args: (g) => [normalizeKey(g.subject ?? ""), normalizeKey(g.key ?? "")],
|
|
131
|
-
rationale: "Idempotency prose defines deduplication behavior and should be queryable as a predicate.",
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+deduplicated\s+to\s+prevent\s+redundant\s+requests\s+during\s+(?<key>.+?)\.?$/i,
|
|
135
|
-
name: "idempotency_rule",
|
|
136
|
-
args: (g) => [normalizeKey(g.subject ?? ""), normalizeKey(g.key ?? "")],
|
|
137
|
-
rationale: "Deduplication prose defines idempotent handling of repeated or concurrent operations and should be queryable as a predicate.",
|
|
138
|
-
},
|
|
139
|
-
];
|
|
140
|
-
export { commaList };
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth: re-export builtin ontology rule tables so CLI
|
|
3
|
+
* coverage/tests cannot drift from kibi-plugin-builtin.
|
|
4
|
+
*/
|
|
5
|
+
// implements REQ-capability-plugin-builtin-parity-v1
|
|
6
|
+
import { CORE_PREDICATE_RULES as BUILTIN_CORE_PREDICATE_RULES } from "kibi-plugin-builtin";
|
|
7
|
+
export const CORE_PREDICATE_RULES = BUILTIN_CORE_PREDICATE_RULES;
|
|
@@ -1,51 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* to route a requirement into this family.
|
|
2
|
+
* Single source of truth: re-export builtin ontology rule tables so CLI
|
|
3
|
+
* coverage/tests cannot drift from kibi-plugin-builtin.
|
|
5
4
|
*/
|
|
5
|
+
import { exactLauncherPredicateArgs as builtinExactLauncherPredicateArgs } from "kibi-plugin-builtin";
|
|
6
6
|
export declare const LAUNCHER_PREDICATE_RULES: readonly [{
|
|
7
7
|
readonly pattern: RegExp;
|
|
8
8
|
readonly name: "dependency_resolution_policy";
|
|
9
|
+
readonly arity: 4;
|
|
9
10
|
readonly args: (groups: Readonly<Record<string, string | undefined>>) => string[];
|
|
10
11
|
readonly rationale: "Consumer-local dependency resolution and acquisition restrictions are a reusable launcher policy predicate.";
|
|
11
12
|
}, {
|
|
12
13
|
readonly pattern: RegExp;
|
|
13
14
|
readonly name: "ordered_resolution_strategy";
|
|
15
|
+
readonly arity: 3;
|
|
14
16
|
readonly args: (groups: Readonly<Record<string, string | undefined>>) => string[];
|
|
15
17
|
readonly rationale: "An ordered workspace candidate list with a validated cwd fallback is a deterministic resolution strategy.";
|
|
16
18
|
}, {
|
|
17
19
|
readonly pattern: RegExp;
|
|
18
20
|
readonly name: "resolution_failure_policy";
|
|
21
|
+
readonly arity: 3;
|
|
19
22
|
readonly args: (groups: Readonly<Record<string, string | undefined>>) => string[];
|
|
20
23
|
readonly rationale: "Invalid unresolved placeholders are an explicit resolution failure condition.";
|
|
21
24
|
}, {
|
|
22
25
|
readonly pattern: RegExp;
|
|
23
26
|
readonly name: "resolution_failure_policy";
|
|
27
|
+
readonly arity: 3;
|
|
24
28
|
readonly args: (groups: Readonly<Record<string, string | undefined>>) => string[];
|
|
25
29
|
readonly rationale: "Ambiguous usable roots require a deterministic, clearly reported resolution failure.";
|
|
26
30
|
}, {
|
|
27
31
|
readonly pattern: RegExp;
|
|
28
32
|
readonly name: "exception_rule";
|
|
33
|
+
readonly arity: 3;
|
|
29
34
|
readonly args: () => string[];
|
|
30
35
|
readonly rationale: "Consumer-scoped package resolution with an explicitly authorized package-manager exception is an exception policy.";
|
|
31
36
|
}, {
|
|
32
37
|
readonly pattern: RegExp;
|
|
33
38
|
readonly name: "process_delegation_contract";
|
|
39
|
+
readonly arity: 6;
|
|
34
40
|
readonly args: () => string[];
|
|
35
41
|
readonly rationale: "Executable, cwd, environment, stdio, and termination propagation form a reusable process delegation contract.";
|
|
36
42
|
}, {
|
|
37
43
|
readonly pattern: RegExp;
|
|
38
44
|
readonly name: "failure_behavior";
|
|
45
|
+
readonly arity: 3;
|
|
39
46
|
readonly args: () => string[];
|
|
40
47
|
readonly rationale: "A missing project-local dependency with an actionable error is a reusable launcher failure behavior.";
|
|
41
48
|
}];
|
|
42
|
-
|
|
43
|
-
* Return the reviewed argument tuple for an exact launcher proposition.
|
|
44
|
-
*
|
|
45
|
-
* The modeling route uses this same rule table as the semantic advisor so an
|
|
46
|
-
* inferred apply plan cannot silently drift from the canonical ontology
|
|
47
|
-
* interpretation. Non-exact prose deliberately returns null and must remain
|
|
48
|
-
* reviewable through explicit argument bindings.
|
|
49
|
-
*/
|
|
50
|
-
export declare function exactLauncherPredicateArgs(predicateName: string, text: string): readonly string[] | null;
|
|
49
|
+
export declare const exactLauncherPredicateArgs: typeof builtinExactLauncherPredicateArgs;
|
|
51
50
|
//# sourceMappingURL=predicate-rules-launcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate-rules-launcher.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-launcher.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"predicate-rules-launcher.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-launcher.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,0BAA0B,IAAI,iCAAiC,EAChE,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmC,CAAC;AACzE,eAAO,MAAM,0BAA0B,0CAAoC,CAAC"}
|
|
@@ -1,96 +1,8 @@
|
|
|
1
|
-
import { normalizeKey, normalizePredicateToken, } from "./predicate-rule.js";
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* to route a requirement into this family.
|
|
2
|
+
* Single source of truth: re-export builtin ontology rule tables so CLI
|
|
3
|
+
* coverage/tests cannot drift from kibi-plugin-builtin.
|
|
6
4
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
args: (groups) => [
|
|
12
|
-
normalizeKey(groups.subject ?? ""),
|
|
13
|
-
normalizePredicateToken(groups.dependency ?? "dependency"),
|
|
14
|
-
"consumer_local",
|
|
15
|
-
"no_download",
|
|
16
|
-
],
|
|
17
|
-
rationale: "Consumer-local dependency resolution and acquisition restrictions are a reusable launcher policy predicate.",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
pattern: /^it\s+must\s+resolve\s+the\s+consumer\s+workspace\s+in\s+deterministic\s+order:\s*(?<sources>.+?)\s+then\s+cwd\s+only\s+when\s+(?<condition>.+?)\.?$/i,
|
|
21
|
-
name: "ordered_resolution_strategy",
|
|
22
|
-
args: (groups) => [
|
|
23
|
-
"launcher",
|
|
24
|
-
normalizePredicateToken(groups.sources ?? "ordered_sources"),
|
|
25
|
-
normalizePredicateToken(groups.condition ?? "cwd_requires_validation"),
|
|
26
|
-
],
|
|
27
|
-
rationale: "An ordered workspace candidate list with a validated cwd fallback is a deterministic resolution strategy.",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
pattern: /^(?<condition>unresolved\s+placeholders?)\s+are\s+invalid\.?$/i,
|
|
31
|
-
name: "resolution_failure_policy",
|
|
32
|
-
args: (groups) => [
|
|
33
|
-
"launcher",
|
|
34
|
-
normalizePredicateToken(groups.condition ?? "invalid_placeholder"),
|
|
35
|
-
"reject_input",
|
|
36
|
-
],
|
|
37
|
-
rationale: "Invalid unresolved placeholders are an explicit resolution failure condition.",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
pattern: /^(?<condition>ambiguous\s+(?:multiple\s+)?usable\s+roots?)\s+fail\s+clearly\.?$/i,
|
|
41
|
-
name: "resolution_failure_policy",
|
|
42
|
-
args: (groups) => [
|
|
43
|
-
"launcher",
|
|
44
|
-
normalizePredicateToken(groups.condition ?? "ambiguous_root"),
|
|
45
|
-
"clear_error",
|
|
46
|
-
],
|
|
47
|
-
rationale: "Ambiguous usable roots require a deterministic, clearly reported resolution failure.",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
pattern: /^(?<subject>the\s+launcher)\s+must\s+resolve\s+kibi-mcp\s+through\s+consumer-scoped\s+node\s+package\s+semantics\s+including\s+exports-restricted\s+and\s+pnpm-style\s+layouts,\s+and\s+reject\s+packages\s+outside\s+consumer\s+scope\s+unless\s+active\s+package-manager\s+semantics\s+authorize\s+it\.?$/i,
|
|
51
|
-
name: "exception_rule",
|
|
52
|
-
args: () => [
|
|
53
|
-
"launcher",
|
|
54
|
-
"consumer_scoped_node_package_semantics",
|
|
55
|
-
"active_package_manager_semantics",
|
|
56
|
-
],
|
|
57
|
-
rationale: "Consumer-scoped package resolution with an explicitly authorized package-manager exception is an exception policy.",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
pattern: /^(?<subject>it)\s+must\s+spawn\s+the\s+declared\s+kibi-mcp\s+bin\s+with\s+cwd\s+and\s+kibi_workspace\s+set\s+to\s+the\s+consumer\s+workspace,\s+preserve\s+stdio,\s+and\s+propagate\s+child\s+exit\s+codes\s+and\s+termination\s+signals\.?$/i,
|
|
61
|
-
name: "process_delegation_contract",
|
|
62
|
-
args: () => [
|
|
63
|
-
"launcher",
|
|
64
|
-
"resolved_executable",
|
|
65
|
-
"consumer_cwd",
|
|
66
|
-
"consumer_workspace_environment",
|
|
67
|
-
"inherited_stdio",
|
|
68
|
-
"propagate_exit_and_termination",
|
|
69
|
-
],
|
|
70
|
-
rationale: "Executable, cwd, environment, stdio, and termination propagation form a reusable process delegation contract.",
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
pattern: /^(?<subject>missing)\s+project-local\s+kibi-mcp\s+must\s+produce\s+a\s+concise\s+actionable\s+error\.?$/i,
|
|
74
|
-
name: "failure_behavior",
|
|
75
|
-
args: () => ["launcher", "missing_dependency", "actionable_error"],
|
|
76
|
-
rationale: "A missing project-local dependency with an actionable error is a reusable launcher failure behavior.",
|
|
77
|
-
},
|
|
78
|
-
];
|
|
79
|
-
/**
|
|
80
|
-
* Return the reviewed argument tuple for an exact launcher proposition.
|
|
81
|
-
*
|
|
82
|
-
* The modeling route uses this same rule table as the semantic advisor so an
|
|
83
|
-
* inferred apply plan cannot silently drift from the canonical ontology
|
|
84
|
-
* interpretation. Non-exact prose deliberately returns null and must remain
|
|
85
|
-
* reviewable through explicit argument bindings.
|
|
86
|
-
*/
|
|
87
|
-
export function exactLauncherPredicateArgs(predicateName, text) {
|
|
88
|
-
for (const rule of LAUNCHER_PREDICATE_RULES) {
|
|
89
|
-
if (rule.name !== predicateName)
|
|
90
|
-
continue;
|
|
91
|
-
const match = text.match(rule.pattern);
|
|
92
|
-
if (match)
|
|
93
|
-
return [...rule.args(match.groups ?? {})];
|
|
94
|
-
}
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
5
|
+
// implements REQ-capability-plugin-builtin-parity-v1
|
|
6
|
+
import { LAUNCHER_PREDICATE_RULES as BUILTIN_LAUNCHER_PREDICATE_RULES, exactLauncherPredicateArgs as builtinExactLauncherPredicateArgs, } from "kibi-plugin-builtin";
|
|
7
|
+
export const LAUNCHER_PREDICATE_RULES = BUILTIN_LAUNCHER_PREDICATE_RULES;
|
|
8
|
+
export const exactLauncherPredicateArgs = builtinExactLauncherPredicateArgs;
|
|
@@ -1,82 +1,98 @@
|
|
|
1
1
|
export declare const POLICY_PREDICATE_RULES: readonly [{
|
|
2
2
|
readonly pattern: RegExp;
|
|
3
3
|
readonly name: "data_residency_rule";
|
|
4
|
+
readonly arity: 2;
|
|
4
5
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
5
6
|
readonly rationale: "Data residency prose defines regional storage or processing constraints and should be queryable as a predicate.";
|
|
6
7
|
}, {
|
|
7
8
|
readonly pattern: RegExp;
|
|
8
9
|
readonly name: "audit_event_rule";
|
|
10
|
+
readonly arity: 2;
|
|
9
11
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
10
12
|
readonly rationale: "Audit logging prose defines durable audit evidence and should be queryable as a predicate.";
|
|
11
13
|
}, {
|
|
12
14
|
readonly pattern: RegExp;
|
|
13
15
|
readonly name: "consent_rule";
|
|
16
|
+
readonly arity: 3;
|
|
14
17
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
15
18
|
readonly rationale: "Consent prose defines a privacy prerequisite and should be queryable as a predicate.";
|
|
16
19
|
}, {
|
|
17
20
|
readonly pattern: RegExp;
|
|
18
21
|
readonly name: "lifecycle_rule";
|
|
22
|
+
readonly arity: 4;
|
|
19
23
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
20
24
|
readonly rationale: "Lifecycle prose defines archive/delete/expiry behavior over time and should be queryable as a predicate.";
|
|
21
25
|
}, {
|
|
22
26
|
readonly pattern: RegExp;
|
|
23
27
|
readonly name: "conflict_resolution_rule";
|
|
28
|
+
readonly arity: 2;
|
|
24
29
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
25
30
|
readonly rationale: "Conflict-resolution prose defines synchronization merge behavior and should be queryable as a predicate.";
|
|
26
31
|
}, {
|
|
27
32
|
readonly pattern: RegExp;
|
|
28
33
|
readonly name: "fallback_rule";
|
|
34
|
+
readonly arity: 3;
|
|
29
35
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
30
36
|
readonly rationale: "Fallback prose defines degraded behavior under a condition and should be queryable as a predicate.";
|
|
31
37
|
}, {
|
|
32
38
|
readonly pattern: RegExp;
|
|
33
39
|
readonly name: "batch_operation_rule";
|
|
40
|
+
readonly arity: 3;
|
|
34
41
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
35
42
|
readonly rationale: "Batching prose defines bounded bulk-processing behavior and should be queryable as a predicate.";
|
|
36
43
|
}, {
|
|
37
44
|
readonly pattern: RegExp;
|
|
38
45
|
readonly name: "consistency_rule";
|
|
46
|
+
readonly arity: 2;
|
|
39
47
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
40
48
|
readonly rationale: "Consistency prose defines reference integrity and should be queryable as a predicate.";
|
|
41
49
|
}, {
|
|
42
50
|
readonly pattern: RegExp;
|
|
43
51
|
readonly name: "build_constraint";
|
|
52
|
+
readonly arity: 3;
|
|
44
53
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
45
54
|
readonly rationale: "Build-time prose defines deterministic generation or deployment constraints and should be queryable as a predicate.";
|
|
46
55
|
}, {
|
|
47
56
|
readonly pattern: RegExp;
|
|
48
57
|
readonly name: "environment_safety_rule";
|
|
58
|
+
readonly arity: 3;
|
|
49
59
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
50
60
|
readonly rationale: "Environment safety prose defines action permissions by deployment environment and should be queryable as a predicate.";
|
|
51
61
|
}, {
|
|
52
62
|
readonly pattern: RegExp;
|
|
53
63
|
readonly name: "schema_invariant_rule";
|
|
64
|
+
readonly arity: 3;
|
|
54
65
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
55
66
|
readonly rationale: "Schema invariant prose defines a field-level invariant and should be queryable as a predicate.";
|
|
56
67
|
}, {
|
|
57
68
|
readonly pattern: RegExp;
|
|
58
69
|
readonly name: "coding_standard_rule";
|
|
70
|
+
readonly arity: 3;
|
|
59
71
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
60
72
|
readonly rationale: "Coding-standard prose defines developer-facing API or pattern requirements and should be queryable as a predicate.";
|
|
61
73
|
readonly accepts: (statement: string) => boolean;
|
|
62
74
|
}, {
|
|
63
75
|
readonly pattern: RegExp;
|
|
64
76
|
readonly name: "migration_boundary_rule";
|
|
77
|
+
readonly arity: 3;
|
|
65
78
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
66
79
|
readonly rationale: "Migration-boundary prose defines legacy input usage limits and should be queryable as a predicate.";
|
|
67
80
|
}, {
|
|
68
81
|
readonly pattern: RegExp;
|
|
69
82
|
readonly name: "absence_requirement";
|
|
83
|
+
readonly arity: 2;
|
|
70
84
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
71
85
|
readonly rationale: "Absence prose defines negative existence requirements and should be queryable as a predicate.";
|
|
72
86
|
}, {
|
|
73
87
|
readonly pattern: RegExp;
|
|
74
88
|
readonly name: "absence_requirement";
|
|
89
|
+
readonly arity: 2;
|
|
75
90
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
76
91
|
readonly rationale: "Declarative no-X prose defines a negative existence requirement and should be queryable as a predicate.";
|
|
77
92
|
}, {
|
|
78
93
|
readonly pattern: RegExp;
|
|
79
94
|
readonly name: "offline_behavior_rule";
|
|
95
|
+
readonly arity: 3;
|
|
80
96
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
81
97
|
readonly rationale: "Offline behavior prose defines resilient/non-blocking behavior under offline conditions and should be queryable as a predicate.";
|
|
82
98
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate-rules-policy.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-policy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"predicate-rules-policy.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-policy.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiC,CAAC"}
|
|
@@ -1,150 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?:recorded|logged|audited)\s+in\s+(?:the\s+)?(?<log>audit\s+(?:log|trail))\.?$/i,
|
|
11
|
-
name: "audit_event_rule",
|
|
12
|
-
args: (g) => [normalizeKey(g.subject ?? ""), normalizeKey(g.log ?? "")],
|
|
13
|
-
rationale: "Audit logging prose defines durable audit evidence and should be queryable as a predicate.",
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+require\s+(?<consent>.+?consent)\s+before\s+(?<purpose>.+?)\.?$/i,
|
|
17
|
-
name: "consent_rule",
|
|
18
|
-
args: (g) => [
|
|
19
|
-
normalizeKey(g.subject ?? ""),
|
|
20
|
-
normalizeKey(g.consent ?? ""),
|
|
21
|
-
normalizePredicateToken(g.purpose ?? ""),
|
|
22
|
-
],
|
|
23
|
-
rationale: "Consent prose defines a privacy prerequisite and should be queryable as a predicate.",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<action>archived|deleted|expired)\s+after\s+(?<duration>\d+)\s+(?<unit>[a-z]+)\.?$/i,
|
|
27
|
-
name: "lifecycle_rule",
|
|
28
|
-
args: (g) => [
|
|
29
|
-
normalizeKey(g.subject ?? ""),
|
|
30
|
-
normalizeKey(g.action ?? ""),
|
|
31
|
-
g.duration ?? "",
|
|
32
|
-
normalizeKey(g.unit ?? ""),
|
|
33
|
-
],
|
|
34
|
-
rationale: "Lifecycle prose defines archive/delete/expiry behavior over time and should be queryable as a predicate.",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
pattern: /^when\s+(?<subject>.+?)\s+conflicts?,\s+(?:the\s+)?(?<strategy>.+?)\.?$/i,
|
|
38
|
-
name: "conflict_resolution_rule",
|
|
39
|
-
args: (g) => [
|
|
40
|
-
normalizeKey(g.subject ?? ""),
|
|
41
|
-
normalizePredicateToken(g.strategy ?? ""),
|
|
42
|
-
],
|
|
43
|
-
rationale: "Conflict-resolution prose defines synchronization merge behavior and should be queryable as a predicate.",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
pattern: /^if\s+(?<condition>.+?),\s+(?<subject>.+?)\s+(?:must|shall|should)\s+fall\s+back\s+to\s+(?<target>.+?)\.?$/i,
|
|
47
|
-
name: "fallback_rule",
|
|
48
|
-
args: (g) => [
|
|
49
|
-
normalizePredicateToken(g.condition ?? ""),
|
|
50
|
-
normalizeKey(g.subject ?? ""),
|
|
51
|
-
normalizePredicateToken(g.target ?? ""),
|
|
52
|
-
],
|
|
53
|
-
rationale: "Fallback prose defines degraded behavior under a condition and should be queryable as a predicate.",
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+process\s+(?<resource>.+?)\s+in\s+batches\s+of\s+(?<size>\d+)\.?$/i,
|
|
57
|
-
name: "batch_operation_rule",
|
|
58
|
-
args: (g) => [
|
|
59
|
-
normalizeKey(g.subject ?? ""),
|
|
60
|
-
normalizeKey(g.resource ?? ""),
|
|
61
|
-
g.size ?? "",
|
|
62
|
-
],
|
|
63
|
-
rationale: "Batching prose defines bounded bulk-processing behavior and should be queryable as a predicate.",
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+reference\s+(?<target>an?\s+existing\s+.+?)\.?$/i,
|
|
67
|
-
name: "consistency_rule",
|
|
68
|
-
args: (g) => [
|
|
69
|
-
normalizeKey(g.subject ?? ""),
|
|
70
|
-
normalizePredicateToken(g.target ?? ""),
|
|
71
|
-
],
|
|
72
|
-
rationale: "Consistency prose defines reference integrity and should be queryable as a predicate.",
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<property>deterministic)\s+at\s+(?<scope>build\s+time)\.?$/i,
|
|
76
|
-
name: "build_constraint",
|
|
77
|
-
args: (g) => [
|
|
78
|
-
normalizeKey(g.subject ?? ""),
|
|
79
|
-
normalizePredicateToken(g.property ?? "property"),
|
|
80
|
-
normalizePredicateToken(g.scope ?? "scope"),
|
|
81
|
-
],
|
|
82
|
-
rationale: "Build-time prose defines deterministic generation or deployment constraints and should be queryable as a predicate.",
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
pattern: /^(?<action>.+?)\s+(?:must|shall|should)\s+be\s+(?<decision>forbidden|read-only|allowed)\s+in\s+(?<environment>production|staging|development)\.?$/i,
|
|
86
|
-
name: "environment_safety_rule",
|
|
87
|
-
args: (g) => [
|
|
88
|
-
normalizeKey(g.action ?? ""),
|
|
89
|
-
normalizePredicateToken(g.decision ?? "decision"),
|
|
90
|
-
normalizeKey(g.environment ?? ""),
|
|
91
|
-
],
|
|
92
|
-
rationale: "Environment safety prose defines action permissions by deployment environment and should be queryable as a predicate.",
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
pattern: /^(?<field>.+?)\s+(?:must|shall|should)\s+be\s+(?<kind>immutable)\s+after\s+(?<scope>.+?)\.?$/i,
|
|
96
|
-
name: "schema_invariant_rule",
|
|
97
|
-
args: (g) => [
|
|
98
|
-
normalizeKey(g.field ?? ""),
|
|
99
|
-
normalizePredicateToken(g.kind ?? "invariant"),
|
|
100
|
-
normalizePredicateToken(`after ${g.scope ?? ""}`),
|
|
101
|
-
],
|
|
102
|
-
rationale: "Schema invariant prose defines a field-level invariant and should be queryable as a predicate.",
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+(?<action>use|avoid)\s+(?<target>.+?)\.?$/i,
|
|
106
|
-
name: "coding_standard_rule",
|
|
107
|
-
args: (g) => [
|
|
108
|
-
normalizeKey(g.subject ?? ""),
|
|
109
|
-
normalizePredicateToken(g.action ?? "action"),
|
|
110
|
-
normalizePredicateToken(g.target ?? ""),
|
|
111
|
-
],
|
|
112
|
-
rationale: "Coding-standard prose defines developer-facing API or pattern requirements and should be queryable as a predicate.",
|
|
113
|
-
accepts: (statement) => /\b(?:api|apis|code|component|computed|framework|hook|pattern|signal|schema|type)\b/i.test(statement),
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
pattern: /^(?<subject>.+?)\s+may\s+only\s+be\s+(?<action>read)\s+as\s+(?<scope>migration\s+input)(?:\s+by\s+.+?)?\.?$/i,
|
|
117
|
-
name: "migration_boundary_rule",
|
|
118
|
-
args: (g) => [
|
|
119
|
-
normalizeKey(g.subject ?? ""),
|
|
120
|
-
normalizePredicateToken(g.action ?? "action"),
|
|
121
|
-
normalizePredicateToken(g.scope ?? ""),
|
|
122
|
-
],
|
|
123
|
-
rationale: "Migration-boundary prose defines legacy input usage limits and should be queryable as a predicate.",
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<state>absent|removed)\.?$/i,
|
|
127
|
-
name: "absence_requirement",
|
|
128
|
-
args: (g) => [
|
|
129
|
-
normalizePredicateToken(g.subject ?? ""),
|
|
130
|
-
normalizePredicateToken(g.state ?? ""),
|
|
131
|
-
],
|
|
132
|
-
rationale: "Absence prose defines negative existence requirements and should be queryable as a predicate.",
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
pattern: /^no\s+(?<subject>.+?)\.?$/i,
|
|
136
|
-
name: "absence_requirement",
|
|
137
|
-
args: (g) => [normalizePredicateToken(g.subject ?? ""), "absent"],
|
|
138
|
-
rationale: "Declarative no-X prose defines a negative existence requirement and should be queryable as a predicate.",
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<behavior>non-blocking|resilient)\s+during\s+(?<condition>offline\s+conditions)\.?$/i,
|
|
142
|
-
name: "offline_behavior_rule",
|
|
143
|
-
args: (g) => [
|
|
144
|
-
normalizeKey(g.subject ?? ""),
|
|
145
|
-
normalizePredicateToken(g.behavior ?? "behavior"),
|
|
146
|
-
normalizePredicateToken(g.condition ?? ""),
|
|
147
|
-
],
|
|
148
|
-
rationale: "Offline behavior prose defines resilient/non-blocking behavior under offline conditions and should be queryable as a predicate.",
|
|
149
|
-
},
|
|
150
|
-
];
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth: re-export builtin ontology rule tables so CLI
|
|
3
|
+
* coverage/tests cannot drift from kibi-plugin-builtin.
|
|
4
|
+
*/
|
|
5
|
+
// implements REQ-capability-plugin-builtin-parity-v1
|
|
6
|
+
import { POLICY_PREDICATE_RULES as BUILTIN_POLICY_PREDICATE_RULES } from "kibi-plugin-builtin";
|
|
7
|
+
export const POLICY_PREDICATE_RULES = BUILTIN_POLICY_PREDICATE_RULES;
|
|
@@ -1,47 +1,56 @@
|
|
|
1
1
|
export declare const PRODUCT_TAIL_PREDICATE_RULES: readonly [{
|
|
2
2
|
readonly pattern: RegExp;
|
|
3
3
|
readonly name: "throttle_policy_rule";
|
|
4
|
+
readonly arity: 2;
|
|
4
5
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
5
6
|
readonly rationale: "Throttle-policy prose defines throttling behavior under high-frequency conditions and should be queryable as a predicate.";
|
|
6
7
|
}, {
|
|
7
8
|
readonly pattern: RegExp;
|
|
8
9
|
readonly name: "temporal_order";
|
|
10
|
+
readonly arity: 3;
|
|
9
11
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
10
12
|
readonly rationale: "Initializes-after prose defines temporal readiness ordering and should be queryable as a predicate.";
|
|
11
13
|
}, {
|
|
12
14
|
readonly pattern: RegExp;
|
|
13
15
|
readonly name: "state_transition";
|
|
16
|
+
readonly arity: 4;
|
|
14
17
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
15
18
|
readonly rationale: "State transitions have source state, target state, and trigger; model them as predicate facts.";
|
|
16
19
|
}, {
|
|
17
20
|
readonly pattern: RegExp;
|
|
18
21
|
readonly name: "permission_rule";
|
|
22
|
+
readonly arity: 4;
|
|
19
23
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
20
24
|
readonly rationale: "Prohibitions are negative permission rules and should preserve deny polarity.";
|
|
21
25
|
readonly polarity: "deny";
|
|
22
26
|
}, {
|
|
23
27
|
readonly pattern: RegExp;
|
|
24
28
|
readonly name: "uniqueness_constraint";
|
|
29
|
+
readonly arity: 2;
|
|
25
30
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
26
31
|
readonly rationale: "Per-scope uniqueness is relational and should be modeled as a predicate rather than a generic count.";
|
|
27
32
|
}, {
|
|
28
33
|
readonly pattern: RegExp;
|
|
29
34
|
readonly name: "default_value";
|
|
35
|
+
readonly arity: 3;
|
|
30
36
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
31
37
|
readonly rationale: "Defaults are relational product behavior and should be explicit ontology predicates.";
|
|
32
38
|
}, {
|
|
33
39
|
readonly pattern: RegExp;
|
|
34
40
|
readonly name: "state_membership";
|
|
41
|
+
readonly arity: 2;
|
|
35
42
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
36
43
|
readonly rationale: "State sets are relational workflow constraints and should be queryable as predicate facts.";
|
|
37
44
|
}, {
|
|
38
45
|
readonly pattern: RegExp;
|
|
39
46
|
readonly name: "rate_limit";
|
|
47
|
+
readonly arity: 4;
|
|
40
48
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
41
49
|
readonly rationale: "Rate limits are bounded action-window constraints and now map to the production rate_limit predicate.";
|
|
42
50
|
}, {
|
|
43
51
|
readonly pattern: RegExp;
|
|
44
52
|
readonly name: "permission_rule";
|
|
53
|
+
readonly arity: 4;
|
|
45
54
|
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
46
55
|
readonly rationale: "Actor/action/resource permission prose is better represented as an ontology predicate than a scalar property.";
|
|
47
56
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate-rules-product-tail.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-product-tail.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"predicate-rules-product-tail.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-product-tail.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EACH,CAAC"}
|