kibi-cli 0.14.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +52 -94
- 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 +1 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +9 -17
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +22 -1
- package/dist/extractors/markdown.d.ts +14 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +38 -1
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +11 -1
- 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/model-requirement.d.ts +10 -0
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -0
- package/dist/operations/modeling/model-requirement.js +108 -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 +104 -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 +148 -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 +88 -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 +24 -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 +61 -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 +49 -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 +134 -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 +85 -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 +67 -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 +112 -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 +271 -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 +19 -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 +18 -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 +135 -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 +9 -2
- package/dist/prolog.d.ts +5 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +82 -30
- 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 +907 -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 +20 -0
- package/dist/public/operations/index.d.ts.map +1 -0
- package/dist/public/operations/index.js +18 -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 +62 -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 +126 -0
- package/dist/public/operations/specs/modeling.d.ts.map +1 -0
- package/dist/public/operations/specs/modeling.js +117 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts +233 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -0
- package/dist/public/operations/specs/mutation-schemas.js +267 -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 +53 -0
- package/dist/public/operations/specs/semantic.d.ts.map +1 -0
- package/dist/public/operations/specs/semantic.js +105 -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 +256 -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 +27 -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 +119 -99
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +102 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +26 -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/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 +23 -0
- package/dist/traceability/staged-diagnostics.d.ts +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +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 +38 -27
- 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 +34 -1
- package/dist/types/entities.d.ts +3 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.js +6 -0
- package/package.json +56 -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 +19 -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 +72 -0
- package/src/public/operations/specs/discovery.ts +126 -0
- package/src/public/operations/specs/modeling.ts +154 -0
- package/src/public/operations/specs/mutation-schemas.ts +296 -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 +135 -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 +27 -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 +119 -99
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +102 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +26 -3
- package/src/public/skills.ts +18 -427
- package/src/schemas/entity.schema.json +23 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// implements REQ-mcp-suggest-predicates
|
|
2
|
+
export const PREDICATE_USAGE_HINTS_2 = {
|
|
3
|
+
offline_behavior_rule: {
|
|
4
|
+
use_when: [
|
|
5
|
+
"Use when synchronization or gameplay behavior must remain non-blocking or resilient during offline conditions.",
|
|
6
|
+
],
|
|
7
|
+
do_not_use_when: [
|
|
8
|
+
"Do not use for generic fallback behavior without an offline/resilient synchronization condition.",
|
|
9
|
+
],
|
|
10
|
+
},
|
|
11
|
+
release_gate_rule: {
|
|
12
|
+
use_when: [
|
|
13
|
+
"Use when builds or releases must pass named gates before distribution, review, or deployment.",
|
|
14
|
+
],
|
|
15
|
+
do_not_use_when: [
|
|
16
|
+
"Do not use for runtime dependency prerequisites; use dependency_rule for product workflow dependencies.",
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
platform_consistency_rule: {
|
|
20
|
+
use_when: [
|
|
21
|
+
"Use when a state or entitlement must synchronize across named platforms.",
|
|
22
|
+
],
|
|
23
|
+
do_not_use_when: [
|
|
24
|
+
"Do not use for referential integrity within one data model; use consistency_rule instead.",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
preservation_rule: {
|
|
28
|
+
use_when: [
|
|
29
|
+
"Use when child data or feedback must be preserved across deletion/removal of a parent resource.",
|
|
30
|
+
],
|
|
31
|
+
do_not_use_when: [
|
|
32
|
+
"Do not use for simple archive/delete timing rules without a preservation target.",
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
abstraction_boundary_rule: {
|
|
36
|
+
use_when: [
|
|
37
|
+
"Use when persisted data, APIs, or contracts must remain neutral to a renderer, vendor, runtime, or implementation detail.",
|
|
38
|
+
],
|
|
39
|
+
do_not_use_when: [
|
|
40
|
+
"Do not use for generic coding standards without a boundary/contract target; use coding_standard_rule instead.",
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
security_configuration_rule: {
|
|
44
|
+
use_when: [
|
|
45
|
+
"Use when infrastructure, database, trigger, RPC, or deployment components must carry an explicit security configuration value.",
|
|
46
|
+
],
|
|
47
|
+
do_not_use_when: [
|
|
48
|
+
"Do not use for actor authorization decisions; use permission_rule or scoped_authorization_rule instead.",
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
ordered_strategy_rule: {
|
|
52
|
+
use_when: [
|
|
53
|
+
"Use when a subject must apply named strategies in a required priority or fallback order.",
|
|
54
|
+
],
|
|
55
|
+
do_not_use_when: [
|
|
56
|
+
"Do not use for unordered enum membership; use strict allowed_values or state_membership instead.",
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
refresh_policy_rule: {
|
|
60
|
+
use_when: [
|
|
61
|
+
"Use when a UI, dashboard, cache, or list must refresh a target automatically or on a named cadence/trigger.",
|
|
62
|
+
],
|
|
63
|
+
do_not_use_when: [
|
|
64
|
+
"Do not use for save/commit actions or notification routing; use commit_action or notification_route instead.",
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
scoped_authorization_rule: {
|
|
68
|
+
use_when: [
|
|
69
|
+
"Use when an actor is allowed or denied an action because they are assigned, unassigned, owner, member, or otherwise scoped to a resource.",
|
|
70
|
+
],
|
|
71
|
+
do_not_use_when: [
|
|
72
|
+
"Do not use for simple actor/action/resource permissions without a scope qualifier; use permission_rule instead.",
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
documentation_standard_rule: {
|
|
76
|
+
use_when: [
|
|
77
|
+
"Use when code symbols, APIs, tests, or project artifacts must be documented in a named documentation source.",
|
|
78
|
+
],
|
|
79
|
+
do_not_use_when: [
|
|
80
|
+
"Do not use for runtime persistence or user-facing display labels.",
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
warmup_policy_rule: {
|
|
84
|
+
use_when: [
|
|
85
|
+
"Use when a component, media element, cache, or service must warm up on a named entry or trigger.",
|
|
86
|
+
],
|
|
87
|
+
do_not_use_when: [
|
|
88
|
+
"Do not use for generic state transitions without warmup behavior.",
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
visual_layout_rule: {
|
|
92
|
+
use_when: [
|
|
93
|
+
"Use when UI elements must remain visually aligned, consistent, or layout-compatible with another element.",
|
|
94
|
+
],
|
|
95
|
+
do_not_use_when: [
|
|
96
|
+
"Do not use for generic acceptance outcomes without a visual/layout relationship.",
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
enforcement_location_rule: {
|
|
100
|
+
use_when: [
|
|
101
|
+
"Use when a constraint or policy must be enforced at a named layer such as database, application, edge, or client level.",
|
|
102
|
+
],
|
|
103
|
+
do_not_use_when: [
|
|
104
|
+
"Do not use for the constraint itself when the enforcement location is not stated.",
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
reconciliation_rule: {
|
|
108
|
+
use_when: [
|
|
109
|
+
"Use when a trigger requires reconciling a target and clearing stale or inconsistent records.",
|
|
110
|
+
],
|
|
111
|
+
do_not_use_when: [
|
|
112
|
+
"Do not use for ordinary archive/delete timing without reconciliation.",
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
throttle_policy_rule: {
|
|
116
|
+
use_when: [
|
|
117
|
+
"Use when handlers, operations, or streams must be throttled for high-frequency activity.",
|
|
118
|
+
],
|
|
119
|
+
do_not_use_when: [
|
|
120
|
+
"Do not use for numeric API request quotas; use rate_limit instead.",
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
has_unsaved_changes: {
|
|
124
|
+
use_when: [
|
|
125
|
+
"Use for dirty, draft, or unsaved local-edit state on a subject.",
|
|
126
|
+
],
|
|
127
|
+
do_not_use_when: [
|
|
128
|
+
"Do not use for the action that saves or discards those changes.",
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
commit_action: {
|
|
132
|
+
use_when: [
|
|
133
|
+
"Use when a trigger saves, commits, persists, or auto-saves a subject in a scope.",
|
|
134
|
+
],
|
|
135
|
+
do_not_use_when: [
|
|
136
|
+
"Do not use for cancel, discard, revert, or abandon behavior.",
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
discard_action: {
|
|
140
|
+
use_when: [
|
|
141
|
+
"Use when a trigger discards, cancels, reverts, or abandons changes in a scope.",
|
|
142
|
+
],
|
|
143
|
+
do_not_use_when: ["Do not use for persistence or save behavior."],
|
|
144
|
+
},
|
|
145
|
+
accessibility_requirement: {
|
|
146
|
+
use_when: [
|
|
147
|
+
"Use for WCAG, keyboard, screen-reader, or accessibility target requirements.",
|
|
148
|
+
],
|
|
149
|
+
do_not_use_when: [
|
|
150
|
+
"Do not use for generic acceptance outcomes or performance constraints.",
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
retention_policy: {
|
|
154
|
+
use_when: [
|
|
155
|
+
"Use when records or data must be retained for a bounded duration.",
|
|
156
|
+
],
|
|
157
|
+
do_not_use_when: [
|
|
158
|
+
"Do not use for request rate windows, session expiry, or latency thresholds.",
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
resource_constraint: {
|
|
162
|
+
use_when: [
|
|
163
|
+
"Use for resource, latency, timeout, size, quota, or numeric threshold constraints.",
|
|
164
|
+
],
|
|
165
|
+
do_not_use_when: [
|
|
166
|
+
"Do not use for uniqueness, rate limits, feature gates, or actor permissions.",
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
feature_gate: {
|
|
170
|
+
use_when: [
|
|
171
|
+
"Use when behavior is controlled by a runtime/config flag, kill switch, or feature gate.",
|
|
172
|
+
],
|
|
173
|
+
do_not_use_when: [
|
|
174
|
+
"Do not use for actor authorization or ordinary scalar enabled/disabled properties.",
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
publishes_event: {
|
|
178
|
+
use_when: [
|
|
179
|
+
"Use when a subject publishes, emits, or raises a domain/system event.",
|
|
180
|
+
],
|
|
181
|
+
do_not_use_when: [
|
|
182
|
+
"Do not use for consuming events or observable UI acceptance outcomes.",
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
acceptance_rule: {
|
|
186
|
+
use_when: [
|
|
187
|
+
"Use for observable acceptance outcomes such as visible empty states or displayed results.",
|
|
188
|
+
],
|
|
189
|
+
do_not_use_when: [
|
|
190
|
+
"Do not use for internal state machines, event publication, or accessibility standards.",
|
|
191
|
+
],
|
|
192
|
+
},
|
|
193
|
+
permission_rule: {
|
|
194
|
+
use_when: [
|
|
195
|
+
"Use for allow/deny permission statements with an actor, action, and resource.",
|
|
196
|
+
],
|
|
197
|
+
do_not_use_when: [
|
|
198
|
+
"Do not use for scalar quotas, feature flags, or state transitions; choose a more specific predicate or strict property instead.",
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
default_value: {
|
|
202
|
+
use_when: [
|
|
203
|
+
"Use when behavior defines a default mode, state, status, option, or value.",
|
|
204
|
+
],
|
|
205
|
+
do_not_use_when: [
|
|
206
|
+
"Do not use for current-state assertions or allowed value sets.",
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-usage-hints-3.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-usage-hints-3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CA2CvE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// implements REQ-mcp-suggest-predicates
|
|
2
|
+
export const PREDICATE_USAGE_HINTS_3 = {
|
|
3
|
+
uniqueness_constraint: {
|
|
4
|
+
use_when: ["Use for at-most-one or unique-per-scope constraints."],
|
|
5
|
+
do_not_use_when: [
|
|
6
|
+
"Do not use for numeric caps where more than one instance may be valid.",
|
|
7
|
+
],
|
|
8
|
+
},
|
|
9
|
+
state_membership: {
|
|
10
|
+
use_when: ["Use for terminal, allowed, or enumerated state sets."],
|
|
11
|
+
do_not_use_when: [
|
|
12
|
+
"Do not use for one current state or a transition between states.",
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
temporal_order: {
|
|
16
|
+
use_when: [
|
|
17
|
+
"Use for before/after ordering requirements between events, states, or actions.",
|
|
18
|
+
],
|
|
19
|
+
do_not_use_when: [
|
|
20
|
+
"Do not use when source state, target state, and trigger are all explicit; use state_transition instead.",
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
conditional_behavior: {
|
|
24
|
+
use_when: [
|
|
25
|
+
"Use for if/when conditional prose where a condition leads to a behavior.",
|
|
26
|
+
],
|
|
27
|
+
do_not_use_when: [
|
|
28
|
+
"Do not use for simple boolean guards or actor permission rules.",
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
state_transition: {
|
|
32
|
+
use_when: [
|
|
33
|
+
"Use for explicit transitions from one named state to another with a trigger.",
|
|
34
|
+
],
|
|
35
|
+
do_not_use_when: [
|
|
36
|
+
"Do not use for a single state assertion or an allowed terminal-state set.",
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
rate_limit: {
|
|
40
|
+
use_when: ["Use for per-window request, attempt, or action limits."],
|
|
41
|
+
do_not_use_when: [
|
|
42
|
+
"Do not use for resource thresholds that lack a repeated action and time window.",
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare function normalizeText(text: string): string;
|
|
2
|
+
export declare function normalizeOptionalString(value: string | undefined): string | undefined;
|
|
3
|
+
export declare function clampInteger(value: number | undefined, fallback: number, min: number, max: number): number;
|
|
4
|
+
export declare function clampScore(value: number | undefined): number;
|
|
5
|
+
export declare function slug(value: string): string;
|
|
6
|
+
export declare function hashId(prefix: string, parts: string[]): string;
|
|
7
|
+
export declare function inferSubject(text: string, subjectHint: string | undefined): string;
|
|
8
|
+
export declare function inferTrigger(text: string): string;
|
|
9
|
+
export declare function inferScope(text: string): string;
|
|
10
|
+
export declare function normalizePredicateToken(value: string): string;
|
|
11
|
+
export declare function singularize(value: string): string;
|
|
12
|
+
export declare function normalizeSubjectKey(value: string): string;
|
|
13
|
+
export declare function escapeRegExp(value: string): string;
|
|
14
|
+
export declare function matchesKeyword(text: string, lowerText: string, keyword: string): boolean;
|
|
15
|
+
export declare function inferDuration(text: string): string;
|
|
16
|
+
export declare function inferDurationUnit(text: string): string;
|
|
17
|
+
export declare function inferResource(text: string): string;
|
|
18
|
+
export declare function inferOperator(text: string): string;
|
|
19
|
+
export declare function inferNumber(text: string): string;
|
|
20
|
+
export declare function inferUnit(text: string): string;
|
|
21
|
+
export declare function inferGate(text: string): string;
|
|
22
|
+
export declare function inferEvent(text: string): string;
|
|
23
|
+
//# sourceMappingURL=predicate-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate-utils.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-utils.ts"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD;AAGD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,GAAG,SAAS,CAGpB;AAGD,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,MAAM,CAIR;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAM5D;AAGD,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAM1C;AAGD,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAO9D;AAGD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,MAAM,CAWR;AAGD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD;AAGD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM/C;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;AAGD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAGD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,OAAO,CAOT;AAGD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAGD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMtD;AAGD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD;AAGD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAclD;AAGD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAGD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM9C;AAGD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI9C;AAGD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/C"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
const DEFAULT_MIN_SCORE = 0.35;
|
|
3
|
+
// implements REQ-mcp-suggest-predicates
|
|
4
|
+
export function normalizeText(text) {
|
|
5
|
+
const normalized = String(text ?? "").trim();
|
|
6
|
+
if (!normalized) {
|
|
7
|
+
throw new Error("Predicate suggestion failed: text must be a non-empty string");
|
|
8
|
+
}
|
|
9
|
+
return normalized;
|
|
10
|
+
}
|
|
11
|
+
// implements REQ-mcp-suggest-predicates
|
|
12
|
+
export function normalizeOptionalString(value) {
|
|
13
|
+
const normalized = String(value ?? "").trim();
|
|
14
|
+
return normalized.length > 0 ? normalized : undefined;
|
|
15
|
+
}
|
|
16
|
+
// implements REQ-mcp-suggest-predicates
|
|
17
|
+
export function clampInteger(value, fallback, min, max) {
|
|
18
|
+
const numeric = typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
19
|
+
return Math.min(max, Math.max(min, Math.trunc(numeric)));
|
|
20
|
+
}
|
|
21
|
+
// implements REQ-mcp-suggest-predicates
|
|
22
|
+
export function clampScore(value) {
|
|
23
|
+
const numeric = typeof value === "number" && Number.isFinite(value)
|
|
24
|
+
? value
|
|
25
|
+
: DEFAULT_MIN_SCORE;
|
|
26
|
+
return Math.min(1, Math.max(0, numeric));
|
|
27
|
+
}
|
|
28
|
+
// implements REQ-mcp-suggest-predicates
|
|
29
|
+
export function slug(value) {
|
|
30
|
+
return value
|
|
31
|
+
.trim()
|
|
32
|
+
.toLowerCase()
|
|
33
|
+
.replace(/[^a-z0-9]+/g, "_")
|
|
34
|
+
.replace(/^_+|_+$/g, "");
|
|
35
|
+
}
|
|
36
|
+
// implements REQ-mcp-suggest-predicates
|
|
37
|
+
export function hashId(prefix, parts) {
|
|
38
|
+
const digest = createHash("sha256")
|
|
39
|
+
.update(parts.join("\u0000"))
|
|
40
|
+
.digest("hex")
|
|
41
|
+
.slice(0, 12)
|
|
42
|
+
.toUpperCase();
|
|
43
|
+
return `${prefix}-${digest}`;
|
|
44
|
+
}
|
|
45
|
+
// implements REQ-mcp-suggest-predicates
|
|
46
|
+
export function inferSubject(text, subjectHint) {
|
|
47
|
+
const explicit = normalizeOptionalString(subjectHint);
|
|
48
|
+
if (explicit)
|
|
49
|
+
return explicit;
|
|
50
|
+
const lower = text.toLowerCase();
|
|
51
|
+
if (lower.includes("annotation"))
|
|
52
|
+
return "editor.annotation";
|
|
53
|
+
if (lower.includes("editor"))
|
|
54
|
+
return "editor";
|
|
55
|
+
if (lower.includes("session"))
|
|
56
|
+
return "session";
|
|
57
|
+
if (lower.includes("customer data"))
|
|
58
|
+
return "customer.data";
|
|
59
|
+
if (lower.includes("user"))
|
|
60
|
+
return "user";
|
|
61
|
+
return "requirement.subject";
|
|
62
|
+
}
|
|
63
|
+
// implements REQ-mcp-suggest-predicates
|
|
64
|
+
export function inferTrigger(text) {
|
|
65
|
+
const lower = text.toLowerCase();
|
|
66
|
+
if (lower.includes("navigate"))
|
|
67
|
+
return "navigation";
|
|
68
|
+
if (lower.includes("escape"))
|
|
69
|
+
return "escape";
|
|
70
|
+
if (lower.includes("cancel"))
|
|
71
|
+
return "cancel";
|
|
72
|
+
if (lower.includes("submit"))
|
|
73
|
+
return "submit";
|
|
74
|
+
return "unspecified_trigger";
|
|
75
|
+
}
|
|
76
|
+
// implements REQ-mcp-suggest-predicates
|
|
77
|
+
export function inferScope(text) {
|
|
78
|
+
const lower = text.toLowerCase();
|
|
79
|
+
if (lower.includes("draft"))
|
|
80
|
+
return "draft";
|
|
81
|
+
if (lower.includes("annotation"))
|
|
82
|
+
return "active_annotation";
|
|
83
|
+
if (lower.includes("session"))
|
|
84
|
+
return "session";
|
|
85
|
+
return "subject";
|
|
86
|
+
}
|
|
87
|
+
// implements REQ-mcp-suggest-predicates
|
|
88
|
+
export function normalizePredicateToken(value) {
|
|
89
|
+
return value
|
|
90
|
+
.trim()
|
|
91
|
+
.replace(/\b(?:a|an|the)\b\s*/gi, "")
|
|
92
|
+
.replace(/['’]/g, "")
|
|
93
|
+
.replace(/\s+/g, "_")
|
|
94
|
+
.replace(/[^A-Za-z0-9_-]+/g, "_")
|
|
95
|
+
.replace(/^_+|_+$/g, "");
|
|
96
|
+
}
|
|
97
|
+
// implements REQ-mcp-suggest-predicates
|
|
98
|
+
export function singularize(value) {
|
|
99
|
+
if (["changes", "status", "results"].includes(value))
|
|
100
|
+
return value;
|
|
101
|
+
return value.endsWith("s") && value.length > 3 ? value.slice(0, -1) : value;
|
|
102
|
+
}
|
|
103
|
+
// implements REQ-mcp-suggest-predicates
|
|
104
|
+
export function normalizeSubjectKey(value) {
|
|
105
|
+
return slug(value).split("_").map(singularize).join(".");
|
|
106
|
+
}
|
|
107
|
+
// implements REQ-mcp-suggest-predicates
|
|
108
|
+
export function escapeRegExp(value) {
|
|
109
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
110
|
+
}
|
|
111
|
+
// implements REQ-mcp-suggest-predicates
|
|
112
|
+
export function matchesKeyword(text, lowerText, keyword) {
|
|
113
|
+
const normalized = keyword.toLowerCase();
|
|
114
|
+
if (/^[a-z0-9\s-]+$/.test(normalized)) {
|
|
115
|
+
const pattern = escapeRegExp(normalized).replace(/\s+/g, "\\s+");
|
|
116
|
+
return new RegExp(`\\b${pattern}\\b`, "i").test(text);
|
|
117
|
+
}
|
|
118
|
+
return lowerText.includes(normalized);
|
|
119
|
+
}
|
|
120
|
+
// implements REQ-mcp-suggest-predicates
|
|
121
|
+
export function inferDuration(text) {
|
|
122
|
+
return text.match(/\b\d+\b/)?.[0] ?? "1";
|
|
123
|
+
}
|
|
124
|
+
// implements REQ-mcp-suggest-predicates
|
|
125
|
+
export function inferDurationUnit(text) {
|
|
126
|
+
const lower = text.toLowerCase();
|
|
127
|
+
if (lower.includes("year"))
|
|
128
|
+
return "years";
|
|
129
|
+
if (lower.includes("month"))
|
|
130
|
+
return "months";
|
|
131
|
+
if (lower.includes("day"))
|
|
132
|
+
return "days";
|
|
133
|
+
return "unit";
|
|
134
|
+
}
|
|
135
|
+
// implements REQ-mcp-suggest-predicates
|
|
136
|
+
export function inferResource(text) {
|
|
137
|
+
const lower = text.toLowerCase();
|
|
138
|
+
if (lower.includes("latency"))
|
|
139
|
+
return "latency";
|
|
140
|
+
if (lower.includes("timeout"))
|
|
141
|
+
return "timeout";
|
|
142
|
+
if (lower.includes("size"))
|
|
143
|
+
return "size";
|
|
144
|
+
return "resource";
|
|
145
|
+
}
|
|
146
|
+
// implements REQ-mcp-suggest-predicates
|
|
147
|
+
export function inferOperator(text) {
|
|
148
|
+
const lower = text.toLowerCase();
|
|
149
|
+
if (lower.includes("minimum") || lower.includes("at least"))
|
|
150
|
+
return "gte";
|
|
151
|
+
if (lower.includes("not exceed") ||
|
|
152
|
+
lower.includes("not be more than") ||
|
|
153
|
+
lower.includes("no more than") ||
|
|
154
|
+
lower.includes("at most") ||
|
|
155
|
+
lower.includes("maximum")) {
|
|
156
|
+
return "lte";
|
|
157
|
+
}
|
|
158
|
+
if (lower.includes("not"))
|
|
159
|
+
return "neq";
|
|
160
|
+
return "lte";
|
|
161
|
+
}
|
|
162
|
+
// implements REQ-mcp-suggest-predicates
|
|
163
|
+
export function inferNumber(text) {
|
|
164
|
+
return text.match(/\b\d+(?:\.\d+)?\b/)?.[0] ?? "0";
|
|
165
|
+
}
|
|
166
|
+
// implements REQ-mcp-suggest-predicates
|
|
167
|
+
export function inferUnit(text) {
|
|
168
|
+
const lower = text.toLowerCase();
|
|
169
|
+
if (lower.includes("ms"))
|
|
170
|
+
return "ms";
|
|
171
|
+
if (lower.includes("seconds"))
|
|
172
|
+
return "seconds";
|
|
173
|
+
if (lower.includes("mb"))
|
|
174
|
+
return "mb";
|
|
175
|
+
return "unit";
|
|
176
|
+
}
|
|
177
|
+
// implements REQ-mcp-suggest-predicates
|
|
178
|
+
export function inferGate(text) {
|
|
179
|
+
const quoted = text.match(/[`'"](?<gate>[A-Za-z0-9_.:-]+)[`'"]/)?.groups
|
|
180
|
+
?.gate;
|
|
181
|
+
return quoted ?? "feature_gate";
|
|
182
|
+
}
|
|
183
|
+
// implements REQ-mcp-suggest-predicates
|
|
184
|
+
export function inferEvent(text) {
|
|
185
|
+
const eventName = text.match(/\b[A-Z][A-Za-z0-9]+Event\b/)?.[0];
|
|
186
|
+
return eventName ?? "domain_event";
|
|
187
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StrictWriteSet } from "../../public/check-types.js";
|
|
2
|
+
export declare function strictWriteSetToApplyPlan(writeSet: StrictWriteSet): Array<Record<string, unknown>>;
|
|
3
|
+
export declare function writeSetPrimaryEntityId(writeSet: StrictWriteSet): string;
|
|
4
|
+
//# sourceMappingURL=requirement-applyplan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requirement-applyplan.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/requirement-applyplan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAalE,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,cAAc,GACvB,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA+BhC;AAGD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAExE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
function toRelationshipPlanRows(relationships) {
|
|
2
|
+
return relationships.map((relationship) => ({
|
|
3
|
+
type: relationship.type,
|
|
4
|
+
from: relationship.from,
|
|
5
|
+
to: relationship.to,
|
|
6
|
+
}));
|
|
7
|
+
}
|
|
8
|
+
// implements REQ-002
|
|
9
|
+
export function strictWriteSetToApplyPlan(writeSet) {
|
|
10
|
+
if (!writeSet.isStrict) {
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
type: writeSet.observationFact.type,
|
|
14
|
+
id: writeSet.observationFact.id,
|
|
15
|
+
properties: writeSet.observationFact.properties,
|
|
16
|
+
relationships: [],
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
type: writeSet.subjectFact.type,
|
|
23
|
+
id: writeSet.subjectFact.id,
|
|
24
|
+
properties: writeSet.subjectFact.properties,
|
|
25
|
+
relationships: [],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: writeSet.propertyFact.type,
|
|
29
|
+
id: writeSet.propertyFact.id,
|
|
30
|
+
properties: writeSet.propertyFact.properties,
|
|
31
|
+
relationships: [],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: writeSet.req.type,
|
|
35
|
+
id: writeSet.req.id,
|
|
36
|
+
properties: writeSet.req.properties,
|
|
37
|
+
relationships: toRelationshipPlanRows(writeSet.relationships),
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
// implements REQ-002
|
|
42
|
+
export function writeSetPrimaryEntityId(writeSet) {
|
|
43
|
+
return writeSet.isStrict ? writeSet.req.id : writeSet.observationFact.id;
|
|
44
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ExtractedRequirementClaim } from "./requirement-types.js";
|
|
2
|
+
export declare function buildFallbackClaim(statement: string, source: string, confidence: number, provenance: string | undefined): ExtractedRequirementClaim;
|
|
3
|
+
export declare function extractHeuristicClaim(statement: string, source: string, confidence: number, provenance: string | undefined): ExtractedRequirementClaim | null;
|
|
4
|
+
//# sourceMappingURL=requirement-heuristics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requirement-heuristics.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/requirement-heuristics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAkBxE,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,yBAAyB,CAgB3B;AAGD,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,yBAAyB,GAAG,IAAI,CA2FlC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { cleanPredicate, cleanSubject, stripListPrefix, } from "./requirement-utils.js";
|
|
3
|
+
const STRICT_FALLBACK_CONFIDENCE = 0.69;
|
|
4
|
+
function fallbackSubjectFromSource(source) {
|
|
5
|
+
const basename = path
|
|
6
|
+
.basename(source, path.extname(source))
|
|
7
|
+
.replace(/[-_]+/g, " ")
|
|
8
|
+
.trim();
|
|
9
|
+
return basename || "Requirement";
|
|
10
|
+
}
|
|
11
|
+
// implements REQ-002
|
|
12
|
+
export function buildFallbackClaim(statement, source, confidence, provenance) {
|
|
13
|
+
return {
|
|
14
|
+
claim: {
|
|
15
|
+
source,
|
|
16
|
+
subjectKey: fallbackSubjectFromSource(source),
|
|
17
|
+
propertyKey: "statement",
|
|
18
|
+
operator: "eq",
|
|
19
|
+
value: statement,
|
|
20
|
+
confidence: Math.min(confidence, STRICT_FALLBACK_CONFIDENCE),
|
|
21
|
+
...(provenance ? { provenance } : {}),
|
|
22
|
+
},
|
|
23
|
+
extractionMode: "fallback",
|
|
24
|
+
extractionWarnings: [
|
|
25
|
+
"Deterministic claim extraction could not infer a strict semantic claim; emitted a review artifact instead.",
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
// implements REQ-002
|
|
30
|
+
export function extractHeuristicClaim(statement, source, confidence, provenance) {
|
|
31
|
+
const normalized = stripListPrefix(statement);
|
|
32
|
+
const retentionMatch = normalized.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+retained\s+for\s+(?<value>\d+)\s+(?<unit>day|days|month|months|year|years)\.?$/i);
|
|
33
|
+
if (retentionMatch?.groups) {
|
|
34
|
+
const { unit, subject, value } = retentionMatch.groups;
|
|
35
|
+
if (!unit || !subject || !value)
|
|
36
|
+
return null;
|
|
37
|
+
const normalizedUnit = unit.toLowerCase().startsWith("day")
|
|
38
|
+
? "Days"
|
|
39
|
+
: unit.toLowerCase().startsWith("month")
|
|
40
|
+
? "Months"
|
|
41
|
+
: "Years";
|
|
42
|
+
return {
|
|
43
|
+
claim: {
|
|
44
|
+
source,
|
|
45
|
+
subjectKey: cleanSubject(subject),
|
|
46
|
+
propertyKey: `Retention ${normalizedUnit}`,
|
|
47
|
+
operator: "eq",
|
|
48
|
+
value: Number(value),
|
|
49
|
+
confidence,
|
|
50
|
+
...(provenance ? { provenance } : {}),
|
|
51
|
+
},
|
|
52
|
+
extractionMode: "heuristic",
|
|
53
|
+
extractionWarnings: [],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const enabledMatch = normalized.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<state>enabled|disabled)\.?$/i);
|
|
57
|
+
if (enabledMatch?.groups) {
|
|
58
|
+
const { subject, state } = enabledMatch.groups;
|
|
59
|
+
if (!subject || !state)
|
|
60
|
+
return null;
|
|
61
|
+
return {
|
|
62
|
+
claim: {
|
|
63
|
+
source,
|
|
64
|
+
subjectKey: cleanSubject(subject),
|
|
65
|
+
propertyKey: "enabled",
|
|
66
|
+
operator: "bool",
|
|
67
|
+
value: state.toLowerCase() === "enabled",
|
|
68
|
+
confidence,
|
|
69
|
+
...(provenance ? { provenance } : {}),
|
|
70
|
+
},
|
|
71
|
+
extractionMode: "heuristic",
|
|
72
|
+
extractionWarnings: [],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const forbiddenMatch = normalized.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+not\s+(?<predicate>.+?)\.?$/i);
|
|
76
|
+
if (forbiddenMatch?.groups) {
|
|
77
|
+
const { subject, predicate } = forbiddenMatch.groups;
|
|
78
|
+
if (!subject || !predicate)
|
|
79
|
+
return null;
|
|
80
|
+
return {
|
|
81
|
+
claim: {
|
|
82
|
+
source,
|
|
83
|
+
subjectKey: cleanSubject(subject),
|
|
84
|
+
propertyKey: cleanPredicate(predicate),
|
|
85
|
+
operator: "polarity",
|
|
86
|
+
value: "forbid",
|
|
87
|
+
confidence,
|
|
88
|
+
...(provenance ? { provenance } : {}),
|
|
89
|
+
},
|
|
90
|
+
extractionMode: "heuristic",
|
|
91
|
+
extractionWarnings: [],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
const requiredMatch = normalized.match(/^(?<subject>.+?)\s+(?:must|shall|should)\s+(?<predicate>.+?)\.?$/i);
|
|
95
|
+
if (requiredMatch?.groups) {
|
|
96
|
+
const { subject, predicate } = requiredMatch.groups;
|
|
97
|
+
if (!subject || !predicate)
|
|
98
|
+
return null;
|
|
99
|
+
return {
|
|
100
|
+
claim: {
|
|
101
|
+
source,
|
|
102
|
+
subjectKey: cleanSubject(subject),
|
|
103
|
+
propertyKey: cleanPredicate(predicate),
|
|
104
|
+
operator: "polarity",
|
|
105
|
+
value: "require",
|
|
106
|
+
confidence,
|
|
107
|
+
...(provenance ? { provenance } : {}),
|
|
108
|
+
},
|
|
109
|
+
extractionMode: "heuristic",
|
|
110
|
+
extractionWarnings: [],
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExtractedRequirementClaim, ModelRequirementArgs } from "./requirement-types.js";
|
|
2
|
+
export declare function estimateNormativeSignalConfidence(statement: string, heading?: string): number;
|
|
3
|
+
export declare function extractRequirementClaim(args: ModelRequirementArgs): ExtractedRequirementClaim & {
|
|
4
|
+
statement: string;
|
|
5
|
+
source: string;
|
|
6
|
+
sourceFiles: string[];
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=requirement-modeler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requirement-modeler.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/requirement-modeler.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,yBAAyB,EACzB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAsBhC,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAUR;AAGD,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,oBAAoB,GACzB,yBAAyB,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAyDA"}
|