kibi-cli 0.14.0 → 0.17.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/bin/kibi +3 -1
- package/dist/cli-command.d.ts +5 -0
- package/dist/cli-command.d.ts.map +1 -0
- package/dist/cli-command.js +9 -0
- package/dist/cli-errors.d.ts +13 -0
- package/dist/cli-errors.d.ts.map +1 -0
- package/dist/cli-errors.js +26 -0
- package/dist/cli-input.d.ts +6 -0
- package/dist/cli-input.d.ts.map +1 -0
- package/dist/cli-input.js +54 -0
- package/dist/cli-json-command.d.ts +14 -0
- package/dist/cli-json-command.d.ts.map +1 -0
- package/dist/cli-json-command.js +96 -0
- package/dist/cli-protocol.d.ts +12 -0
- package/dist/cli-protocol.d.ts.map +1 -0
- package/dist/cli-protocol.js +37 -0
- package/dist/cli-register-foundation.d.ts +3 -0
- package/dist/cli-register-foundation.d.ts.map +1 -0
- package/dist/cli-register-foundation.js +90 -0
- package/dist/cli-register-maintenance.d.ts +3 -0
- package/dist/cli-register-maintenance.d.ts.map +1 -0
- package/dist/cli-register-maintenance.js +36 -0
- package/dist/cli-register-reporting.d.ts +3 -0
- package/dist/cli-register-reporting.d.ts.map +1 -0
- package/dist/cli-register-reporting.js +101 -0
- package/dist/cli-register-skills.d.ts +3 -0
- package/dist/cli-register-skills.d.ts.map +1 -0
- package/dist/cli-register-skills.js +71 -0
- package/dist/cli-validate.d.ts +18 -0
- package/dist/cli-validate.d.ts.map +1 -0
- package/dist/cli-validate.js +45 -0
- package/dist/cli.d.ts +4 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +48 -211
- package/dist/commands/aggregated-checks.d.ts +1 -1
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +28 -34
- package/dist/commands/check.d.ts +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +53 -95
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +12 -17
- package/dist/commands/discovery-shared.d.ts +2 -1
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +6 -18
- package/dist/commands/gaps.d.ts.map +1 -1
- package/dist/commands/gaps.js +15 -19
- package/dist/commands/graph.d.ts.map +1 -1
- package/dist/commands/graph.js +15 -21
- package/dist/commands/query.d.ts +7 -7
- package/dist/commands/query.d.ts.map +1 -1
- package/dist/commands/query.js +98 -204
- package/dist/commands/search.d.ts +4 -4
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +14 -27
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +6 -7
- package/dist/commands/sync/manifest.d.ts +13 -2
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +31 -22
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +39 -1
- package/dist/extractors/markdown.d.ts +22 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +50 -1
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +11 -1
- package/dist/logic/ir.d.ts +112 -0
- package/dist/logic/ir.d.ts.map +1 -0
- package/dist/logic/ir.js +729 -0
- package/dist/operations/autopilot/activation.d.ts +4 -0
- package/dist/operations/autopilot/activation.d.ts.map +1 -0
- package/dist/operations/autopilot/activation.js +130 -0
- package/dist/operations/autopilot/candidate-helpers.d.ts +13 -0
- package/dist/operations/autopilot/candidate-helpers.d.ts.map +1 -0
- package/dist/operations/autopilot/candidate-helpers.js +55 -0
- package/dist/operations/autopilot/candidates.d.ts +4 -0
- package/dist/operations/autopilot/candidates.d.ts.map +1 -0
- package/dist/operations/autopilot/candidates.js +114 -0
- package/dist/operations/autopilot/discovery-evidence.d.ts +10 -0
- package/dist/operations/autopilot/discovery-evidence.d.ts.map +1 -0
- package/dist/operations/autopilot/discovery-evidence.js +158 -0
- package/dist/operations/autopilot/discovery.d.ts +4 -0
- package/dist/operations/autopilot/discovery.d.ts.map +1 -0
- package/dist/operations/autopilot/discovery.js +100 -0
- package/dist/operations/autopilot/generate.d.ts +8 -0
- package/dist/operations/autopilot/generate.d.ts.map +1 -0
- package/dist/operations/autopilot/generate.js +112 -0
- package/dist/operations/autopilot/guidance-actions.d.ts +3 -0
- package/dist/operations/autopilot/guidance-actions.d.ts.map +1 -0
- package/dist/operations/autopilot/guidance-actions.js +79 -0
- package/dist/operations/autopilot/guidance.d.ts +14 -0
- package/dist/operations/autopilot/guidance.d.ts.map +1 -0
- package/dist/operations/autopilot/guidance.js +124 -0
- package/dist/operations/autopilot/markdown-candidates.d.ts +7 -0
- package/dist/operations/autopilot/markdown-candidates.d.ts.map +1 -0
- package/dist/operations/autopilot/markdown-candidates.js +134 -0
- package/dist/operations/autopilot/presentation.d.ts +13 -0
- package/dist/operations/autopilot/presentation.d.ts.map +1 -0
- package/dist/operations/autopilot/presentation.js +91 -0
- package/dist/operations/autopilot/requirement-claims.d.ts +3 -0
- package/dist/operations/autopilot/requirement-claims.d.ts.map +1 -0
- package/dist/operations/autopilot/requirement-claims.js +48 -0
- package/dist/operations/autopilot/types.d.ts +117 -0
- package/dist/operations/autopilot/types.d.ts.map +1 -0
- package/dist/operations/autopilot/types.js +8 -0
- package/dist/operations/modeling/logic-modeling.d.ts +22 -0
- package/dist/operations/modeling/logic-modeling.d.ts.map +1 -0
- package/dist/operations/modeling/logic-modeling.js +111 -0
- package/dist/operations/modeling/model-requirement.d.ts +10 -0
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -0
- package/dist/operations/modeling/model-requirement.js +164 -0
- package/dist/operations/modeling/predicate-applyplan.d.ts +6 -0
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-applyplan.js +117 -0
- package/dist/operations/modeling/predicate-catalog-1.d.ts +3 -0
- package/dist/operations/modeling/predicate-catalog-1.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-1.js +200 -0
- package/dist/operations/modeling/predicate-catalog-2.d.ts +3 -0
- package/dist/operations/modeling/predicate-catalog-2.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-2.js +197 -0
- package/dist/operations/modeling/predicate-catalog-3.d.ts +3 -0
- package/dist/operations/modeling/predicate-catalog-3.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-3.js +193 -0
- package/dist/operations/modeling/predicate-catalog-4.d.ts +3 -0
- package/dist/operations/modeling/predicate-catalog-4.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog-4.js +149 -0
- package/dist/operations/modeling/predicate-catalog.d.ts +5 -0
- package/dist/operations/modeling/predicate-catalog.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-catalog.js +29 -0
- package/dist/operations/modeling/predicate-inference-1.d.ts +16 -0
- package/dist/operations/modeling/predicate-inference-1.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference-1.js +161 -0
- package/dist/operations/modeling/predicate-inference-2.d.ts +19 -0
- package/dist/operations/modeling/predicate-inference-2.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference-2.js +169 -0
- package/dist/operations/modeling/predicate-inference-3.d.ts +15 -0
- package/dist/operations/modeling/predicate-inference-3.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference-3.js +163 -0
- package/dist/operations/modeling/predicate-inference.d.ts +5 -0
- package/dist/operations/modeling/predicate-inference.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-inference.js +163 -0
- package/dist/operations/modeling/predicate-loader.d.ts +10 -0
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-loader.js +94 -0
- package/dist/operations/modeling/predicate-ranker.d.ts +3 -0
- package/dist/operations/modeling/predicate-ranker.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-ranker.js +62 -0
- package/dist/operations/modeling/predicate-score-1.d.ts +3 -0
- package/dist/operations/modeling/predicate-score-1.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-score-1.js +121 -0
- package/dist/operations/modeling/predicate-score-2.d.ts +3 -0
- package/dist/operations/modeling/predicate-score-2.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-score-2.js +122 -0
- package/dist/operations/modeling/predicate-score-3.d.ts +3 -0
- package/dist/operations/modeling/predicate-score-3.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-score-3.js +54 -0
- package/dist/operations/modeling/predicate-types.d.ts +64 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-types.js +1 -0
- package/dist/operations/modeling/predicate-usage-hints-1.d.ts +3 -0
- package/dist/operations/modeling/predicate-usage-hints-1.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-usage-hints-1.js +211 -0
- package/dist/operations/modeling/predicate-usage-hints-2.d.ts +3 -0
- package/dist/operations/modeling/predicate-usage-hints-2.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-usage-hints-2.js +209 -0
- package/dist/operations/modeling/predicate-usage-hints-3.d.ts +3 -0
- package/dist/operations/modeling/predicate-usage-hints-3.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-usage-hints-3.js +45 -0
- package/dist/operations/modeling/predicate-utils.d.ts +23 -0
- package/dist/operations/modeling/predicate-utils.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-utils.js +187 -0
- package/dist/operations/modeling/requirement-applyplan.d.ts +4 -0
- package/dist/operations/modeling/requirement-applyplan.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-applyplan.js +44 -0
- package/dist/operations/modeling/requirement-heuristics.d.ts +4 -0
- package/dist/operations/modeling/requirement-heuristics.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-heuristics.js +114 -0
- package/dist/operations/modeling/requirement-modeler.d.ts +8 -0
- package/dist/operations/modeling/requirement-modeler.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-modeler.js +70 -0
- package/dist/operations/modeling/requirement-types.d.ts +61 -0
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-types.js +1 -0
- package/dist/operations/modeling/requirement-utils.d.ts +10 -0
- package/dist/operations/modeling/requirement-utils.d.ts.map +1 -0
- package/dist/operations/modeling/requirement-utils.js +65 -0
- package/dist/operations/modeling/suggest-predicates.d.ts +6 -0
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -0
- package/dist/operations/modeling/suggest-predicates.js +64 -0
- package/dist/operations/mutation/audit.d.ts +6 -0
- package/dist/operations/mutation/audit.d.ts.map +1 -0
- package/dist/operations/mutation/audit.js +22 -0
- package/dist/operations/mutation/contradictions.d.ts +10 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -0
- package/dist/operations/mutation/contradictions.js +40 -0
- package/dist/operations/mutation/delete.d.ts +5 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -0
- package/dist/operations/mutation/delete.js +67 -0
- package/dist/operations/mutation/relationships.d.ts +17 -0
- package/dist/operations/mutation/relationships.d.ts.map +1 -0
- package/dist/operations/mutation/relationships.js +142 -0
- package/dist/operations/mutation/save.d.ts +4 -0
- package/dist/operations/mutation/save.d.ts.map +1 -0
- package/dist/operations/mutation/save.js +14 -0
- package/dist/operations/mutation/serialization.d.ts +5 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -0
- package/dist/operations/mutation/serialization.js +88 -0
- package/dist/operations/mutation/strict-fact.d.ts +4 -0
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -0
- package/dist/operations/mutation/strict-fact.js +132 -0
- package/dist/operations/mutation/symbol-granularity.d.ts +4 -0
- package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -0
- package/dist/operations/mutation/symbol-granularity.js +109 -0
- package/dist/operations/mutation/symbol-refresh.d.ts +10 -0
- package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -0
- package/dist/operations/mutation/symbol-refresh.js +105 -0
- package/dist/operations/mutation/types.d.ts +43 -0
- package/dist/operations/mutation/types.d.ts.map +1 -0
- package/dist/operations/mutation/types.js +1 -0
- package/dist/operations/mutation/upsert.d.ts +5 -0
- package/dist/operations/mutation/upsert.d.ts.map +1 -0
- package/dist/operations/mutation/upsert.js +103 -0
- package/dist/operations/mutation/validate-upsert.d.ts +5 -0
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -0
- package/dist/operations/mutation/validate-upsert.js +50 -0
- package/dist/operations/mutation/validation.d.ts +5 -0
- package/dist/operations/mutation/validation.d.ts.map +1 -0
- package/dist/operations/mutation/validation.js +107 -0
- package/dist/operations/mutation/warnings.d.ts +4 -0
- package/dist/operations/mutation/warnings.d.ts.map +1 -0
- package/dist/operations/mutation/warnings.js +17 -0
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts +5 -0
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/analysis-receipt.js +120 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +5 -0
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/analyze-prose.js +693 -0
- package/dist/operations/semantic-advisor/clauses.d.ts +10 -0
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/clauses.js +43 -0
- package/dist/operations/semantic-advisor/observation-plan.d.ts +3 -0
- package/dist/operations/semantic-advisor/observation-plan.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/observation-plan.js +31 -0
- package/dist/operations/semantic-advisor/predicate-rule.d.ts +14 -0
- package/dist/operations/semantic-advisor/predicate-rule.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rule.js +22 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts +79 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-core.js +140 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts +83 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-policy.js +150 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts +48 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-product-tail.js +102 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts +71 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/predicate-rules-product.js +133 -0
- package/dist/operations/semantic-advisor/prose-coverage-evaluator.d.ts +29 -0
- package/dist/operations/semantic-advisor/prose-coverage-evaluator.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/prose-coverage-evaluator.js +54 -0
- package/dist/operations/semantic-advisor/shared.d.ts +19 -0
- package/dist/operations/semantic-advisor/shared.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/shared.js +209 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts +4 -0
- package/dist/operations/semantic-advisor/strict-count-rules.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/strict-count-rules.js +62 -0
- package/dist/operations/semantic-advisor/strict-rules.d.ts +4 -0
- package/dist/operations/semantic-advisor/strict-rules.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/strict-rules.js +106 -0
- package/dist/operations/semantic-advisor/types.d.ts +195 -0
- package/dist/operations/semantic-advisor/types.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/types.js +1 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +20 -3
- package/dist/prolog.d.ts +5 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +89 -32
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +8 -4
- package/dist/public/impact/full-kb-quality.d.ts +1 -1
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +34 -1
- package/dist/public/impact/requirement-quality.d.ts.map +1 -1
- package/dist/public/impact/requirement-quality.js +6 -23
- package/dist/public/operations/catalog.d.ts +986 -0
- package/dist/public/operations/catalog.d.ts.map +1 -0
- package/dist/public/operations/catalog.js +42 -0
- package/dist/public/operations/check-executor.d.ts +21 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -0
- package/dist/public/operations/check-executor.js +111 -0
- package/dist/public/operations/check-format-shared.d.ts +36 -0
- package/dist/public/operations/check-format-shared.d.ts.map +1 -0
- package/dist/public/operations/check-format-shared.js +107 -0
- package/dist/public/operations/check-helpers.d.ts +10 -0
- package/dist/public/operations/check-helpers.d.ts.map +1 -0
- package/dist/public/operations/check-helpers.js +107 -0
- package/dist/public/operations/discovery-entities.d.ts +14 -0
- package/dist/public/operations/discovery-entities.d.ts.map +1 -0
- package/dist/public/operations/discovery-entities.js +91 -0
- package/dist/public/operations/discovery-executors.d.ts +39 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -0
- package/dist/public/operations/discovery-executors.js +101 -0
- package/dist/public/operations/index.d.ts +21 -0
- package/dist/public/operations/index.d.ts.map +1 -0
- package/dist/public/operations/index.js +19 -0
- package/dist/public/operations/node-ports.d.ts +15 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -0
- package/dist/public/operations/node-ports.js +57 -0
- package/dist/public/operations/prolog-json.d.ts +5 -0
- package/dist/public/operations/prolog-json.d.ts.map +1 -0
- package/dist/public/operations/prolog-json.js +44 -0
- package/dist/public/operations/runtime-types.d.ts +69 -0
- package/dist/public/operations/runtime-types.d.ts.map +1 -0
- package/dist/public/operations/runtime-types.js +17 -0
- package/dist/public/operations/specs/autopilot.d.ts +82 -0
- package/dist/public/operations/specs/autopilot.d.ts.map +1 -0
- package/dist/public/operations/specs/autopilot.js +72 -0
- package/dist/public/operations/specs/check.d.ts +51 -0
- package/dist/public/operations/specs/check.d.ts.map +1 -0
- package/dist/public/operations/specs/check.js +65 -0
- package/dist/public/operations/specs/discovery.d.ts +94 -0
- package/dist/public/operations/specs/discovery.d.ts.map +1 -0
- package/dist/public/operations/specs/discovery.js +98 -0
- package/dist/public/operations/specs/modeling.d.ts +142 -0
- package/dist/public/operations/specs/modeling.d.ts.map +1 -0
- package/dist/public/operations/specs/modeling.js +133 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts +268 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -0
- package/dist/public/operations/specs/mutation-schemas.js +294 -0
- package/dist/public/operations/specs/mutation.d.ts +56 -0
- package/dist/public/operations/specs/mutation.d.ts.map +1 -0
- package/dist/public/operations/specs/mutation.js +44 -0
- package/dist/public/operations/specs/reporting.d.ts +185 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -0
- package/dist/public/operations/specs/reporting.js +158 -0
- package/dist/public/operations/specs/semantic.d.ts +81 -0
- package/dist/public/operations/specs/semantic.d.ts.map +1 -0
- package/dist/public/operations/specs/semantic.js +137 -0
- package/dist/public/operations/specs/skills.d.ts +70 -0
- package/dist/public/operations/specs/skills.d.ts.map +1 -0
- package/dist/public/operations/specs/skills.js +107 -0
- package/dist/public/operations/specs/sparql.d.ts +39 -0
- package/dist/public/operations/specs/sparql.d.ts.map +1 -0
- package/dist/public/operations/specs/sparql.js +121 -0
- package/dist/public/operations/specs/upsert.d.ts +291 -0
- package/dist/public/operations/specs/upsert.d.ts.map +1 -0
- package/dist/public/operations/specs/upsert.js +27 -0
- package/dist/public/operations/types.d.ts +24 -0
- package/dist/public/operations/types.d.ts.map +1 -0
- package/dist/public/operations/types.js +1 -0
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +317 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -0
- package/dist/public/skill-system/errors.d.ts +19 -0
- package/dist/public/skill-system/errors.d.ts.map +1 -0
- package/dist/public/skill-system/errors.js +36 -0
- package/dist/public/skill-system/loader.d.ts +9 -0
- package/dist/public/skill-system/loader.d.ts.map +1 -0
- package/dist/public/skill-system/loader.js +76 -0
- package/dist/public/skill-system/paths.d.ts +6 -0
- package/dist/public/skill-system/paths.d.ts.map +1 -0
- package/dist/public/skill-system/paths.js +25 -0
- package/dist/public/skill-system/types.d.ts +15 -0
- package/dist/public/skill-system/types.d.ts.map +1 -0
- package/dist/public/skill-system/types.js +1 -0
- package/dist/public/skill-system/validation.d.ts +10 -0
- package/dist/public/skill-system/validation.d.ts.map +1 -0
- package/dist/public/skill-system/validation.js +119 -0
- package/dist/public/skills/init-kibi/SKILL.md +62 -0
- package/dist/public/skills/kibi-freshness/SKILL.md +44 -0
- package/dist/public/skills/kibi-traceability/SKILL.md +54 -0
- package/dist/public/skills/kibi-usage/SKILL.md +145 -99
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +112 -0
- package/dist/public/skills/kibi-usage/resources/logic-ir.md +43 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/dist/public/skills/kibi-usage/resources/ui-requirements.md +96 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +41 -3
- package/dist/public/skills.d.ts +4 -41
- package/dist/public/skills.d.ts.map +1 -1
- package/dist/public/skills.js +3 -270
- package/dist/public/symbol-granularity.d.ts +9 -0
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.js +16 -0
- package/dist/runtime/cli-runtime.d.ts +3 -0
- package/dist/runtime/cli-runtime.d.ts.map +1 -0
- package/dist/runtime/cli-runtime.js +96 -0
- package/dist/schemas/entity.schema.json +329 -3
- package/dist/traceability/staged-diagnostics.d.ts +2 -2
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +17 -10
- package/dist/traceability/staged-impact-contract.js +1 -1
- package/dist/traceability/staged-symbols-manifest.d.ts +1 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +53 -24
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +17 -1
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +47 -1
- package/dist/types/entities.d.ts +3 -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/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.js +24 -0
- package/dist/utils/schema-version.d.ts +1 -1
- package/dist/utils/schema-version.js +1 -1
- package/package.json +60 -2
- package/src/public/impact/diagnostics.ts +18 -11
- package/src/public/impact/full-kb-quality.ts +30 -3
- package/src/public/impact/requirement-quality.ts +6 -26
- package/src/public/operations/catalog.ts +60 -0
- package/src/public/operations/check-executor.ts +185 -0
- package/src/public/operations/check-format-shared.ts +178 -0
- package/src/public/operations/check-helpers.ts +141 -0
- package/src/public/operations/discovery-entities.ts +122 -0
- package/src/public/operations/discovery-executors.ts +176 -0
- package/src/public/operations/index.ts +20 -0
- package/src/public/operations/node-ports.ts +78 -0
- package/src/public/operations/prolog-json.ts +71 -0
- package/src/public/operations/runtime-types.ts +106 -0
- package/src/public/operations/specs/autopilot.ts +98 -0
- package/src/public/operations/specs/check.ts +75 -0
- package/src/public/operations/specs/discovery.ts +126 -0
- package/src/public/operations/specs/modeling.ts +174 -0
- package/src/public/operations/specs/mutation-schemas.ts +326 -0
- package/src/public/operations/specs/mutation.ts +58 -0
- package/src/public/operations/specs/reporting.ts +249 -0
- package/src/public/operations/specs/semantic.ts +174 -0
- package/src/public/operations/specs/skills.ts +142 -0
- package/src/public/operations/specs/sparql.ts +149 -0
- package/src/public/operations/specs/upsert.ts +40 -0
- package/src/public/operations/types.ts +57 -0
- package/src/public/schemas/entity.ts +324 -1
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skill-system/errors.ts +38 -0
- package/src/public/skill-system/loader.ts +108 -0
- package/src/public/skill-system/paths.ts +27 -0
- package/src/public/skill-system/types.ts +14 -0
- package/src/public/skill-system/validation.ts +175 -0
- package/src/public/skills/init-kibi/SKILL.md +62 -0
- package/src/public/skills/kibi-freshness/SKILL.md +44 -0
- package/src/public/skills/kibi-traceability/SKILL.md +54 -0
- package/src/public/skills/kibi-usage/SKILL.md +145 -99
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +112 -0
- package/src/public/skills/kibi-usage/resources/logic-ir.md +43 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/src/public/skills/kibi-usage/resources/ui-requirements.md +96 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +41 -3
- package/src/public/skills.ts +18 -427
- package/src/public/symbol-granularity.ts +25 -0
- package/src/schemas/entity.schema.json +329 -3
- package/src/schemas/relationship.schema.json +1 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const PRODUCT_TAIL_PREDICATE_RULES: readonly [{
|
|
2
|
+
readonly pattern: RegExp;
|
|
3
|
+
readonly name: "throttle_policy_rule";
|
|
4
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
5
|
+
readonly rationale: "Throttle-policy prose defines throttling behavior under high-frequency conditions and should be queryable as a predicate.";
|
|
6
|
+
}, {
|
|
7
|
+
readonly pattern: RegExp;
|
|
8
|
+
readonly name: "temporal_order";
|
|
9
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
10
|
+
readonly rationale: "Initializes-after prose defines temporal readiness ordering and should be queryable as a predicate.";
|
|
11
|
+
}, {
|
|
12
|
+
readonly pattern: RegExp;
|
|
13
|
+
readonly name: "state_transition";
|
|
14
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
15
|
+
readonly rationale: "State transitions have source state, target state, and trigger; model them as predicate facts.";
|
|
16
|
+
}, {
|
|
17
|
+
readonly pattern: RegExp;
|
|
18
|
+
readonly name: "permission_rule";
|
|
19
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
20
|
+
readonly rationale: "Prohibitions are negative permission rules and should preserve deny polarity.";
|
|
21
|
+
readonly polarity: "deny";
|
|
22
|
+
}, {
|
|
23
|
+
readonly pattern: RegExp;
|
|
24
|
+
readonly name: "uniqueness_constraint";
|
|
25
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
26
|
+
readonly rationale: "Per-scope uniqueness is relational and should be modeled as a predicate rather than a generic count.";
|
|
27
|
+
}, {
|
|
28
|
+
readonly pattern: RegExp;
|
|
29
|
+
readonly name: "default_value";
|
|
30
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
31
|
+
readonly rationale: "Defaults are relational product behavior and should be explicit ontology predicates.";
|
|
32
|
+
}, {
|
|
33
|
+
readonly pattern: RegExp;
|
|
34
|
+
readonly name: "state_membership";
|
|
35
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
36
|
+
readonly rationale: "State sets are relational workflow constraints and should be queryable as predicate facts.";
|
|
37
|
+
}, {
|
|
38
|
+
readonly pattern: RegExp;
|
|
39
|
+
readonly name: "rate_limit";
|
|
40
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
41
|
+
readonly rationale: "Rate limits are bounded action-window constraints and now map to the production rate_limit predicate.";
|
|
42
|
+
}, {
|
|
43
|
+
readonly pattern: RegExp;
|
|
44
|
+
readonly name: "permission_rule";
|
|
45
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
46
|
+
readonly rationale: "Actor/action/resource permission prose is better represented as an ontology predicate than a scalar property.";
|
|
47
|
+
}];
|
|
48
|
+
//# sourceMappingURL=predicate-rules-product-tail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-rules-product-tail.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-product-tail.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsHI,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { normalizeKey, normalizePredicateToken, normalizeSubjectKey, singularize, } from "./predicate-rule.js";
|
|
2
|
+
export const PRODUCT_TAIL_PREDICATE_RULES = [
|
|
3
|
+
{
|
|
4
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+throttled\s+for\s+(?<condition>.+?)\.?$/i,
|
|
5
|
+
name: "throttle_policy_rule",
|
|
6
|
+
args: (g) => [
|
|
7
|
+
normalizeKey(g.subject ?? ""),
|
|
8
|
+
normalizePredicateToken(g.condition ?? ""),
|
|
9
|
+
],
|
|
10
|
+
rationale: "Throttle-policy prose defines throttling behavior under high-frequency conditions and should be queryable as a predicate.",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
pattern: /^(?:the\s+)?(?<subject>.+?)\s+initializes\s+after\s+(?:the\s+)?(?<ready>.+?)\s+is\s+ready\.?$/i,
|
|
14
|
+
name: "temporal_order",
|
|
15
|
+
args: (g) => [
|
|
16
|
+
normalizeKey(g.subject ?? ""),
|
|
17
|
+
`${normalizeKey(g.ready ?? "")}_ready`,
|
|
18
|
+
"initializes",
|
|
19
|
+
],
|
|
20
|
+
rationale: "Initializes-after prose defines temporal readiness ordering and should be queryable as a predicate.",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
pattern: /^when\s+(?<trigger>.+?),\s*(?:the\s+)?(?<subject>[a-z][a-z\s_-]*?)\s+transitions?\s+from\s+(?<from>[a-z][a-z0-9_-]*)\s+to\s+(?<to>[a-z][a-z0-9_-]*)\.?$/i,
|
|
24
|
+
name: "state_transition",
|
|
25
|
+
args: (g) => [
|
|
26
|
+
normalizeSubjectKey(g.subject ?? ""),
|
|
27
|
+
normalizePredicateToken(g.from ?? ""),
|
|
28
|
+
normalizePredicateToken(g.to ?? ""),
|
|
29
|
+
normalizePredicateToken(g.trigger ?? ""),
|
|
30
|
+
],
|
|
31
|
+
rationale: "State transitions have source state, target state, and trigger; model them as predicate facts.",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
pattern: /^(?<actor>[a-z][a-z\s_-]*?)\s+(?:must\s+not|cannot|can't|is\s+forbidden\s+to)\s+(?<action>[a-z][a-z_-]*)\s+(?<resource>.+?)\.?$/i,
|
|
35
|
+
name: "permission_rule",
|
|
36
|
+
args: (g) => [
|
|
37
|
+
singularize(normalizeKey(g.actor ?? "")),
|
|
38
|
+
normalizePredicateToken(g.action ?? ""),
|
|
39
|
+
normalizePredicateToken(g.resource ?? ""),
|
|
40
|
+
"deny",
|
|
41
|
+
],
|
|
42
|
+
rationale: "Prohibitions are negative permission rules and should preserve deny polarity.",
|
|
43
|
+
polarity: "deny",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
pattern: /^(?:there\s+)?(?:must|shall|should)\s+be\s+at\s+most\s+one\s+(?<subject>[a-z][a-z\s_-]*?)\s+per\s+(?<scope>.+?)\.?$/i,
|
|
47
|
+
name: "uniqueness_constraint",
|
|
48
|
+
args: (g) => [
|
|
49
|
+
normalizeKey(g.subject ?? ""),
|
|
50
|
+
(g.scope ?? "")
|
|
51
|
+
.split(/\s+per\s+/i)
|
|
52
|
+
.map(normalizePredicateToken)
|
|
53
|
+
.join(","),
|
|
54
|
+
],
|
|
55
|
+
rationale: "Per-scope uniqueness is relational and should be modeled as a predicate rather than a generic count.",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
pattern: /^(?:the\s+)?(?<subject>[a-z][a-z\s_-]*?)\s+defaults?\s+to\s+(?<value>[a-z][a-z0-9\s_-]*?)(?:\s+(?<property>mode|state|status))?\.?$/i,
|
|
59
|
+
name: "default_value",
|
|
60
|
+
args: (g) => [
|
|
61
|
+
normalizeSubjectKey(g.subject ?? ""),
|
|
62
|
+
normalizeKey(g.property ?? "value"),
|
|
63
|
+
normalizeKey(g.value ?? ""),
|
|
64
|
+
],
|
|
65
|
+
rationale: "Defaults are relational product behavior and should be explicit ontology predicates.",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
pattern: /^(?<subject>.+?)\s+(?:terminal\s+)?states\s+are\s+(?<states>.+?)\.?$/i,
|
|
69
|
+
name: "state_membership",
|
|
70
|
+
args: (g) => [
|
|
71
|
+
normalizeSubjectKey(g.subject ?? ""),
|
|
72
|
+
(g.states ?? "")
|
|
73
|
+
.split(/,|\band\b|\bor\b/i)
|
|
74
|
+
.map((value) => normalizePredicateToken(value.trim()))
|
|
75
|
+
.filter(Boolean)
|
|
76
|
+
.join(","),
|
|
77
|
+
],
|
|
78
|
+
rationale: "State sets are relational workflow constraints and should be queryable as predicate facts.",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+rate\s+limited\s+to\s+(?<count>\d+)\s+(?<action>[a-z][a-z\s_-]*?)\s+per\s+(?<window>[a-z]+)\.?$/i,
|
|
82
|
+
name: "rate_limit",
|
|
83
|
+
args: (g) => [
|
|
84
|
+
`${normalizeKey(g.subject ?? "").replace(/_requests?$/, "")}.request`,
|
|
85
|
+
normalizePredicateToken(g.action ?? ""),
|
|
86
|
+
normalizePredicateToken(g.window ?? ""),
|
|
87
|
+
g.count ?? "",
|
|
88
|
+
],
|
|
89
|
+
rationale: "Rate limits are bounded action-window constraints and now map to the production rate_limit predicate.",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
pattern: /^only\s+(?<actor>[a-z][a-z\s_-]*?)\s+can\s+(?<action>[a-z][a-z_-]*)\s+(?<resource>.+?)(?:\s+when\s+.+)?\.?$/i,
|
|
93
|
+
name: "permission_rule",
|
|
94
|
+
args: (g) => [
|
|
95
|
+
singularize(normalizeKey(g.actor ?? "")),
|
|
96
|
+
normalizeKey(g.action ?? ""),
|
|
97
|
+
normalizeKey(g.resource ?? ""),
|
|
98
|
+
"assert",
|
|
99
|
+
],
|
|
100
|
+
rationale: "Actor/action/resource permission prose is better represented as an ontology predicate than a scalar property.",
|
|
101
|
+
},
|
|
102
|
+
];
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export declare const PRODUCT_PREDICATE_RULES: readonly [{
|
|
2
|
+
readonly pattern: RegExp;
|
|
3
|
+
readonly name: "release_gate_rule";
|
|
4
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
5
|
+
readonly rationale: "Release-gate prose defines required gates before distribution or deployment and should be queryable as a predicate.";
|
|
6
|
+
readonly accepts: (statement: string) => boolean;
|
|
7
|
+
}, {
|
|
8
|
+
readonly pattern: RegExp;
|
|
9
|
+
readonly name: "platform_consistency_rule";
|
|
10
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
11
|
+
readonly rationale: "Platform consistency prose defines synchronization across platforms and should be queryable as a predicate.";
|
|
12
|
+
}, {
|
|
13
|
+
readonly pattern: RegExp;
|
|
14
|
+
readonly name: "preservation_rule";
|
|
15
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
16
|
+
readonly rationale: "Preservation prose defines data preserved across deletion/removal boundaries and should be queryable as a predicate.";
|
|
17
|
+
}, {
|
|
18
|
+
readonly pattern: RegExp;
|
|
19
|
+
readonly name: "abstraction_boundary_rule";
|
|
20
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
21
|
+
readonly rationale: "Abstraction-boundary prose defines renderer/vendor-neutral persistence or contract constraints and should be queryable as a predicate.";
|
|
22
|
+
readonly accepts: (statement: string) => boolean;
|
|
23
|
+
}, {
|
|
24
|
+
readonly pattern: RegExp;
|
|
25
|
+
readonly name: "security_configuration_rule";
|
|
26
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
27
|
+
readonly rationale: "Security-configuration prose defines explicit infrastructure or database settings and should be queryable as a predicate.";
|
|
28
|
+
readonly accepts: (statement: string) => boolean;
|
|
29
|
+
}, {
|
|
30
|
+
readonly pattern: RegExp;
|
|
31
|
+
readonly name: "ordered_strategy_rule";
|
|
32
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
33
|
+
readonly rationale: "Ordered-strategy prose defines a required priority order and should be queryable as a predicate.";
|
|
34
|
+
}, {
|
|
35
|
+
readonly pattern: RegExp;
|
|
36
|
+
readonly name: "refresh_policy_rule";
|
|
37
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
38
|
+
readonly rationale: "Refresh-policy prose defines automatic refresh behavior and should be queryable as a predicate.";
|
|
39
|
+
}, {
|
|
40
|
+
readonly pattern: RegExp;
|
|
41
|
+
readonly name: "scoped_authorization_rule";
|
|
42
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
43
|
+
readonly rationale: "Scoped-authorization prose defines assignment/ownership-qualified authorization and should be queryable as a predicate.";
|
|
44
|
+
readonly accepts: (statement: string) => boolean;
|
|
45
|
+
}, {
|
|
46
|
+
readonly pattern: RegExp;
|
|
47
|
+
readonly name: "documentation_standard_rule";
|
|
48
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
49
|
+
readonly rationale: "Documentation-standard prose defines required documentation artifacts and should be queryable as a predicate.";
|
|
50
|
+
}, {
|
|
51
|
+
readonly pattern: RegExp;
|
|
52
|
+
readonly name: "warmup_policy_rule";
|
|
53
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
54
|
+
readonly rationale: "Warmup-policy prose defines a required warmup trigger and should be queryable as a predicate.";
|
|
55
|
+
}, {
|
|
56
|
+
readonly pattern: RegExp;
|
|
57
|
+
readonly name: "visual_layout_rule";
|
|
58
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
59
|
+
readonly rationale: "Visual-layout prose defines UI alignment requirements and should be queryable as a predicate.";
|
|
60
|
+
}, {
|
|
61
|
+
readonly pattern: RegExp;
|
|
62
|
+
readonly name: "enforcement_location_rule";
|
|
63
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
64
|
+
readonly rationale: "Enforcement-location prose defines the layer where a constraint is enforced and should be queryable as a predicate.";
|
|
65
|
+
}, {
|
|
66
|
+
readonly pattern: RegExp;
|
|
67
|
+
readonly name: "reconciliation_rule";
|
|
68
|
+
readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
|
|
69
|
+
readonly rationale: "Reconciliation prose defines trigger-based cleanup of stale records and should be queryable as a predicate.";
|
|
70
|
+
}];
|
|
71
|
+
//# sourceMappingURL=predicate-rules-product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-rules-product.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-product.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqKS,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { commaList, normalizeKey, normalizePredicateToken, } from "./predicate-rule.js";
|
|
2
|
+
export const PRODUCT_PREDICATE_RULES = [
|
|
3
|
+
{
|
|
4
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+pass\s+(?<gate>.+?)\s+before\s+(?<target>.+?)\.?$/i,
|
|
5
|
+
name: "release_gate_rule",
|
|
6
|
+
args: (g) => [
|
|
7
|
+
normalizeKey(g.subject ?? ""),
|
|
8
|
+
normalizePredicateToken(g.gate ?? "gate"),
|
|
9
|
+
normalizeKey(g.target ?? ""),
|
|
10
|
+
],
|
|
11
|
+
rationale: "Release-gate prose defines required gates before distribution or deployment and should be queryable as a predicate.",
|
|
12
|
+
accepts: (statement) => /\b(?:app store|build|deployment|distribution|release|testflight)\b/i.test(statement),
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+synchronize\s+across\s+(?<platforms>.+?)\.?$/i,
|
|
16
|
+
name: "platform_consistency_rule",
|
|
17
|
+
args: (g) => [normalizeKey(g.subject ?? ""), commaList(g.platforms ?? "")],
|
|
18
|
+
rationale: "Platform consistency prose defines synchronization across platforms and should be queryable as a predicate.",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+preserve\s+(?<preserved>.+?)\s+when\s+(?:the\s+)?(?<condition>.+?)\.?$/i,
|
|
22
|
+
name: "preservation_rule",
|
|
23
|
+
args: (g) => [
|
|
24
|
+
normalizeKey(g.subject ?? ""),
|
|
25
|
+
normalizeKey(g.preserved ?? "preserved"),
|
|
26
|
+
normalizePredicateToken(g.condition ?? ""),
|
|
27
|
+
],
|
|
28
|
+
rationale: "Preservation prose defines data preserved across deletion/removal boundaries and should be queryable as a predicate.",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+persisted\s+as\s+(?<contract>.+?)\.?$/i,
|
|
32
|
+
name: "abstraction_boundary_rule",
|
|
33
|
+
args: (g) => [
|
|
34
|
+
normalizeKey(g.subject ?? ""),
|
|
35
|
+
"persisted_as",
|
|
36
|
+
normalizePredicateToken(g.contract ?? ""),
|
|
37
|
+
],
|
|
38
|
+
rationale: "Abstraction-boundary prose defines renderer/vendor-neutral persistence or contract constraints and should be queryable as a predicate.",
|
|
39
|
+
accepts: (statement) => /\b(?:neutral|contract|renderer|runtime|vendor)\b/i.test(statement),
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+have\s+explicit\s+(?<setting>[A-Za-z0-9_.-]+)\s+(?<value>[A-Za-z0-9_.-]+)\.?$/i,
|
|
43
|
+
name: "security_configuration_rule",
|
|
44
|
+
args: (g) => [
|
|
45
|
+
normalizeKey(g.subject ?? ""),
|
|
46
|
+
normalizeKey(g.setting ?? ""),
|
|
47
|
+
normalizeKey(g.value ?? ""),
|
|
48
|
+
],
|
|
49
|
+
rationale: "Security-configuration prose defines explicit infrastructure or database settings and should be queryable as a predicate.",
|
|
50
|
+
accepts: (statement) => /\b(?:database|deployment|function|rpc|search_path|security|trigger)\b/i.test(statement),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+use\s+(?<kind>.+?)\s+in\s+priority\s+order\s+(?<values>.+?)\.?$/i,
|
|
54
|
+
name: "ordered_strategy_rule",
|
|
55
|
+
args: (g) => [
|
|
56
|
+
normalizeKey(g.subject ?? ""),
|
|
57
|
+
normalizeKey(g.kind ?? "strategy"),
|
|
58
|
+
(g.values ?? "")
|
|
59
|
+
.split(/,|>/)
|
|
60
|
+
.map(normalizePredicateToken)
|
|
61
|
+
.filter(Boolean)
|
|
62
|
+
.join(","),
|
|
63
|
+
],
|
|
64
|
+
rationale: "Ordered-strategy prose defines a required priority order and should be queryable as a predicate.",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+automatically\s+refresh\s+(?<target>.+?)\s+without\s+requiring\s+manual\s+page\s+reload\.?$/i,
|
|
68
|
+
name: "refresh_policy_rule",
|
|
69
|
+
args: (g) => [
|
|
70
|
+
normalizeKey(g.subject ?? ""),
|
|
71
|
+
normalizeKey(g.target ?? ""),
|
|
72
|
+
"automatic",
|
|
73
|
+
],
|
|
74
|
+
rationale: "Refresh-policy prose defines automatic refresh behavior and should be queryable as a predicate.",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
pattern: /^(?<actor>.+?)\s+(?:must|shall|should)\s+be\s+denied\s+(?<action>.+?)\.?$/i,
|
|
78
|
+
name: "scoped_authorization_rule",
|
|
79
|
+
args: (g) => [
|
|
80
|
+
normalizeKey(g.actor ?? ""),
|
|
81
|
+
normalizeKey(g.action ?? ""),
|
|
82
|
+
"deny",
|
|
83
|
+
],
|
|
84
|
+
rationale: "Scoped-authorization prose defines assignment/ownership-qualified authorization and should be queryable as a predicate.",
|
|
85
|
+
accepts: (statement) => /\b(?:assigned|unassigned|owner|member|scoped)\b/i.test(statement),
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+documented\s+in\s+(?<artifact>.+?)\.?$/i,
|
|
89
|
+
name: "documentation_standard_rule",
|
|
90
|
+
args: (g) => [
|
|
91
|
+
normalizeKey(g.subject ?? ""),
|
|
92
|
+
"documented_in",
|
|
93
|
+
normalizeKey(g.artifact ?? ""),
|
|
94
|
+
],
|
|
95
|
+
rationale: "Documentation-standard prose defines required documentation artifacts and should be queryable as a predicate.",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
pattern: /^(?:the\s+)?(?<subject>.+?)\s+(?:must|shall|should)\s+warm\s+up\s+on\s+(?<trigger>.+?)\.?$/i,
|
|
99
|
+
name: "warmup_policy_rule",
|
|
100
|
+
args: (g) => [normalizeKey(g.subject ?? ""), normalizeKey(g.trigger ?? "")],
|
|
101
|
+
rationale: "Warmup-policy prose defines a required warmup trigger and should be queryable as a predicate.",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+remain\s+visually\s+aligned\s+with\s+(?<target>.+?)\.?$/i,
|
|
105
|
+
name: "visual_layout_rule",
|
|
106
|
+
args: (g) => [
|
|
107
|
+
normalizeKey(g.subject ?? ""),
|
|
108
|
+
"aligned_with",
|
|
109
|
+
normalizeKey(g.target ?? ""),
|
|
110
|
+
],
|
|
111
|
+
rationale: "Visual-layout prose defines UI alignment requirements and should be queryable as a predicate.",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+enforced\s+at\s+(?<location>.+?)\.?$/i,
|
|
115
|
+
name: "enforcement_location_rule",
|
|
116
|
+
args: (g) => [
|
|
117
|
+
normalizeKey(g.subject ?? ""),
|
|
118
|
+
normalizeKey(g.location ?? ""),
|
|
119
|
+
],
|
|
120
|
+
rationale: "Enforcement-location prose defines the layer where a constraint is enforced and should be queryable as a predicate.",
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
pattern: /^on\s+(?<trigger>.+?),\s*(?<subject>.+?)\s+(?:must|shall|should)\s+reconcile\s+(?<target>.+?)\s+and\s+(?<action>clear\s+stale\s+.+?)\.?$/i,
|
|
124
|
+
name: "reconciliation_rule",
|
|
125
|
+
args: (g) => [
|
|
126
|
+
normalizeKey(g.subject ?? ""),
|
|
127
|
+
normalizeKey(g.trigger ?? "trigger"),
|
|
128
|
+
normalizeKey(g.target ?? ""),
|
|
129
|
+
normalizeKey(g.action ?? "action"),
|
|
130
|
+
],
|
|
131
|
+
rationale: "Reconciliation prose defines trigger-based cleanup of stale records and should be queryable as a predicate.",
|
|
132
|
+
},
|
|
133
|
+
];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SemanticModelingSuggestion } from "./types.js";
|
|
2
|
+
export interface ProseCoverageExpectation {
|
|
3
|
+
readonly kind: SemanticModelingSuggestion["kind"];
|
|
4
|
+
readonly predicate_name?: string;
|
|
5
|
+
readonly property_key?: string;
|
|
6
|
+
readonly operator?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ProseCoverageCase {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly source?: string;
|
|
11
|
+
readonly text: string;
|
|
12
|
+
readonly expected: ProseCoverageExpectation;
|
|
13
|
+
}
|
|
14
|
+
export interface ProseCoverageFailure {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly text: string;
|
|
17
|
+
readonly reason: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ProseCoverageResult {
|
|
20
|
+
readonly coverage: number;
|
|
21
|
+
readonly summary: {
|
|
22
|
+
readonly total: number;
|
|
23
|
+
readonly passed: number;
|
|
24
|
+
readonly failed: number;
|
|
25
|
+
};
|
|
26
|
+
readonly failures: readonly ProseCoverageFailure[];
|
|
27
|
+
}
|
|
28
|
+
export declare function evaluateProseCoverageCorpus(cases: readonly ProseCoverageCase[]): ProseCoverageResult;
|
|
29
|
+
//# sourceMappingURL=prose-coverage-evaluator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose-coverage-evaluator.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/prose-coverage-evaluator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAE7D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAClD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;CAC7C;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACpD;AAuED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,SAAS,iBAAiB,EAAE,GAClC,mBAAmB,CAQrB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { analyzeSemanticAdvisorInput } from "./analyze-prose.js";
|
|
2
|
+
function failure(testCase, reason) {
|
|
3
|
+
return { id: testCase.id, text: testCase.text, reason };
|
|
4
|
+
}
|
|
5
|
+
function evaluateCase(testCase) {
|
|
6
|
+
const result = analyzeSemanticAdvisorInput({
|
|
7
|
+
payload: {
|
|
8
|
+
type: "req",
|
|
9
|
+
id: `REQ-CORPUS-${testCase.id}`,
|
|
10
|
+
properties: {
|
|
11
|
+
title: testCase.id,
|
|
12
|
+
status: "open",
|
|
13
|
+
source: "mcp://kibi/prose-coverage-corpus",
|
|
14
|
+
text_ref: testCase.text,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
const suggestion = result.receipt.suggestions[0];
|
|
19
|
+
if (!suggestion)
|
|
20
|
+
return [failure(testCase, "No semantic advisor suggestion was produced")];
|
|
21
|
+
if (suggestion.kind !== testCase.expected.kind)
|
|
22
|
+
return [
|
|
23
|
+
failure(testCase, `Expected ${testCase.expected.kind} but received ${suggestion.kind}`),
|
|
24
|
+
];
|
|
25
|
+
if (suggestion.kind === "predicate" &&
|
|
26
|
+
testCase.expected.predicate_name &&
|
|
27
|
+
suggestion.predicate.predicate_name !== testCase.expected.predicate_name) {
|
|
28
|
+
return [
|
|
29
|
+
failure(testCase, `Expected predicate ${testCase.expected.predicate_name} but received ${suggestion.predicate.predicate_name}`),
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
if (suggestion.kind === "strict_property") {
|
|
33
|
+
if (testCase.expected.property_key &&
|
|
34
|
+
suggestion.claim.property_key !== testCase.expected.property_key)
|
|
35
|
+
return [
|
|
36
|
+
failure(testCase, `Expected property ${testCase.expected.property_key} but received ${suggestion.claim.property_key}`),
|
|
37
|
+
];
|
|
38
|
+
if (testCase.expected.operator &&
|
|
39
|
+
suggestion.claim.operator !== testCase.expected.operator)
|
|
40
|
+
return [
|
|
41
|
+
failure(testCase, `Expected operator ${testCase.expected.operator} but received ${suggestion.claim.operator}`),
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
export function evaluateProseCoverageCorpus(cases) {
|
|
47
|
+
const failures = cases.flatMap(evaluateCase);
|
|
48
|
+
const passed = cases.length - failures.length;
|
|
49
|
+
return {
|
|
50
|
+
coverage: cases.length === 0 ? 1 : passed / cases.length,
|
|
51
|
+
summary: { total: cases.length, passed, failed: failures.length },
|
|
52
|
+
failures,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SemanticModelingSuggestion, SemanticStrictPropertyClaim } from "./types.js";
|
|
2
|
+
export type Payload = Readonly<Record<string, unknown>>;
|
|
3
|
+
export type MatchGroups = Readonly<Record<string, string | undefined>>;
|
|
4
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
5
|
+
export declare function stringValue(value: unknown): string;
|
|
6
|
+
export declare function canonicalize(value: unknown): string;
|
|
7
|
+
export declare function payloadHash(payload: Payload): string;
|
|
8
|
+
export declare function shortHash(value: string): string;
|
|
9
|
+
export declare function propertiesOf(payload: Payload): Record<string, unknown>;
|
|
10
|
+
export declare function statementOf(payload: Payload): string;
|
|
11
|
+
export declare function sourceOf(payload: Payload): string;
|
|
12
|
+
export declare function normalizeKey(value: string): string;
|
|
13
|
+
export declare function normalizePredicateToken(value: string): string;
|
|
14
|
+
export declare function singularize(value: string): string;
|
|
15
|
+
export declare function normalizeSubjectKey(value: string): string;
|
|
16
|
+
export declare function relationship(from: string, to: string, type: string): Record<string, unknown>;
|
|
17
|
+
export declare function strictSuggestion(payload: Payload, evidence: string, claim: SemanticStrictPropertyClaim, rationale: string, confidence?: number): SemanticModelingSuggestion;
|
|
18
|
+
export declare function predicateSuggestion(payload: Payload, evidence: string, name: string, args: readonly string[], rationale: string, polarity?: "assert" | "deny"): SemanticModelingSuggestion;
|
|
19
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/shared.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,0BAA0B,EAE1B,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AAGvE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAElD;AAGD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CASnD;AAGD,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAKpD;AAGD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAGD,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEtE;AAGD,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAGpD;AAGD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAIjD;AAGD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOlD;AAGD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ7D;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAGD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzB;AAGD,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,2BAA2B,EAClC,SAAS,EAAE,MAAM,EACjB,UAAU,SAAM,GACf,0BAA0B,CAqF5B;AAGD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,SAAS,EAAE,MAAM,EACjB,QAAQ,GAAE,QAAQ,GAAG,MAAiB,GACrC,0BAA0B,CA+C5B"}
|