kibi-cli 0.12.8 → 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 -210
- 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 +2 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +145 -152
- package/dist/commands/coverage.d.ts.map +1 -1
- package/dist/commands/coverage.js +12 -17
- package/dist/commands/discovery-shared.d.ts +3 -1
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +8 -209
- package/dist/commands/discovery-table.d.ts +3 -0
- package/dist/commands/discovery-table.d.ts.map +1 -0
- package/dist/commands/discovery-table.js +204 -0
- 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/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +8 -1
- package/dist/commands/sync/extraction.d.ts +6 -1
- package/dist/commands/sync/extraction.d.ts.map +1 -1
- package/dist/commands/sync/extraction.js +7 -3
- 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 +51 -2
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +18 -0
- package/dist/extractors/markdown.d.ts +20 -2
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +38 -1
- package/dist/extractors/symbols-coordinator.d.ts +1 -1
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.d.ts.map +1 -1
- package/dist/extractors/symbols-ts.js +73 -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/analyzer.d.ts +3 -0
- package/dist/public/impact/analyzer.d.ts.map +1 -0
- package/dist/public/impact/analyzer.js +54 -0
- package/dist/public/impact/coverage-depth-quality.d.ts +4 -0
- package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -0
- package/dist/public/impact/coverage-depth-quality.js +179 -0
- package/dist/public/impact/diagnostics.d.ts +7 -0
- package/dist/public/impact/diagnostics.d.ts.map +1 -0
- package/dist/public/impact/diagnostics.js +126 -0
- package/dist/public/impact/diff-meaning.d.ts +2 -0
- package/dist/public/impact/diff-meaning.d.ts.map +1 -0
- package/dist/public/impact/diff-meaning.js +101 -0
- package/dist/public/impact/full-kb-quality.d.ts +10 -0
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -0
- package/dist/public/impact/full-kb-quality.js +191 -0
- package/dist/public/impact/manifest.d.ts +5 -0
- package/dist/public/impact/manifest.d.ts.map +1 -0
- package/dist/public/impact/manifest.js +43 -0
- package/dist/public/impact/requirement-quality.d.ts +4 -0
- package/dist/public/impact/requirement-quality.d.ts.map +1 -0
- package/dist/public/impact/requirement-quality.js +199 -0
- package/dist/public/impact/source-changes.d.ts +5 -0
- package/dist/public/impact/source-changes.d.ts.map +1 -0
- package/dist/public/impact/source-changes.js +129 -0
- package/dist/public/impact/summaries.d.ts +6 -0
- package/dist/public/impact/summaries.d.ts.map +1 -0
- package/dist/public/impact/summaries.js +68 -0
- package/dist/public/impact/symbol-quality-model.d.ts +21 -0
- package/dist/public/impact/symbol-quality-model.d.ts.map +1 -0
- package/dist/public/impact/symbol-quality-model.js +116 -0
- package/dist/public/impact/symbol-quality.d.ts +4 -0
- package/dist/public/impact/symbol-quality.d.ts.map +1 -0
- package/dist/public/impact/symbol-quality.js +159 -0
- package/dist/public/impact/types.d.ts +79 -0
- package/dist/public/impact/types.d.ts.map +1 -0
- package/dist/public/impact/types.js +1 -0
- package/dist/public/impact-diagnostics.d.ts +7 -0
- package/dist/public/impact-diagnostics.d.ts.map +1 -0
- package/dist/public/impact-diagnostics.js +5 -0
- 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 +48 -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 +123 -95
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +107 -5
- package/dist/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +30 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +40 -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 +1 -1
- package/dist/public/symbol-granularity.d.ts.map +1 -1
- package/dist/public/symbol-granularity.js +2 -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 +23 -0
- package/dist/traceability/evidence-model.d.ts +1 -1
- package/dist/traceability/evidence-model.d.ts.map +1 -1
- package/dist/traceability/evidence-model.js +1 -1
- package/dist/traceability/staged-diagnostics.d.ts +6 -6
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +12 -6
- 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 +60 -27
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +58 -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 +8 -1
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/utils/prolog-query-plan-safety.d.ts +8 -0
- package/dist/utils/prolog-query-plan-safety.d.ts.map +1 -0
- package/dist/utils/prolog-query-plan-safety.js +47 -0
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.js +18 -0
- package/package.json +60 -2
- package/schema/entities.pl +4 -0
- package/src/public/impact/analyzer.ts +90 -0
- package/src/public/impact/coverage-depth-quality.ts +268 -0
- package/src/public/impact/diagnostics.ts +199 -0
- package/src/public/impact/diff-meaning.ts +121 -0
- package/src/public/impact/full-kb-quality.ts +230 -0
- package/src/public/impact/manifest.ts +57 -0
- package/src/public/impact/requirement-quality.ts +262 -0
- package/src/public/impact/source-changes.ts +180 -0
- package/src/public/impact/summaries.ts +100 -0
- package/src/public/impact/symbol-quality-model.ts +171 -0
- package/src/public/impact/symbol-quality.ts +207 -0
- package/src/public/impact/types.ts +99 -0
- package/src/public/impact-diagnostics.ts +22 -0
- 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 +50 -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 +123 -95
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +107 -5
- package/src/public/skills/kibi-usage/resources/operation-access.md +44 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +30 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +40 -3
- package/src/public/skills.ts +18 -427
- package/src/public/symbol-granularity.ts +4 -0
- package/src/schemas/entity.schema.json +23 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { executeCheck } from "../check-executor.js";
|
|
2
|
+
import type { OperationSpec } from "../types.js";
|
|
3
|
+
|
|
4
|
+
export const checkSpec = {
|
|
5
|
+
name: "kb_check",
|
|
6
|
+
cliName: "check",
|
|
7
|
+
description:
|
|
8
|
+
"Run KB validation rules and return violations. Use before or after mutations, and after meaningful source edits with impact options to surface symbol granularity and semantic-review diagnostics. Do not use for point lookups. No write side effects. Prefer explicit rules for faster iteration; omit rules for final full validation plus full-KB qualityDiagnostics review.",
|
|
9
|
+
businessInputSchema: {
|
|
10
|
+
type: "object",
|
|
11
|
+
properties: {
|
|
12
|
+
rules: {
|
|
13
|
+
type: "array",
|
|
14
|
+
items: {
|
|
15
|
+
type: "string",
|
|
16
|
+
enum: [
|
|
17
|
+
"must-priority-coverage",
|
|
18
|
+
"symbol-coverage",
|
|
19
|
+
"symbol-traceability",
|
|
20
|
+
"no-dangling-refs",
|
|
21
|
+
"no-cycles",
|
|
22
|
+
"required-fields",
|
|
23
|
+
"deprecated-adr-no-successor",
|
|
24
|
+
"domain-contradictions",
|
|
25
|
+
"strict-fact-shape",
|
|
26
|
+
"strict-req-fact-pairing",
|
|
27
|
+
"predicate-verifiability",
|
|
28
|
+
"logic-coverage",
|
|
29
|
+
"query-plan-safety",
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
description:
|
|
33
|
+
"Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, logic-coverage, query-plan-safety. If omitted, server runs all rules plus the full-KB qualityDiagnostics audit scan; if supplied, server preserves scoped validation and skips the full-KB advisory scan.",
|
|
34
|
+
},
|
|
35
|
+
sourceFiles: {
|
|
36
|
+
type: "array",
|
|
37
|
+
items: { type: "string" },
|
|
38
|
+
description:
|
|
39
|
+
"Optional repo-relative source files to inspect for early impact diagnostics. Use with includeImpactDiagnostics after meaningful source edits.",
|
|
40
|
+
},
|
|
41
|
+
staged: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
description:
|
|
44
|
+
"When true, inspect staged source changes for impact diagnostics using the shared CLI impact analyzer without shelling out to kibi check.",
|
|
45
|
+
},
|
|
46
|
+
includeWorkingTreeDiff: {
|
|
47
|
+
type: "boolean",
|
|
48
|
+
description:
|
|
49
|
+
"When true, inspect current unstaged working-tree diffs for impact diagnostics. Pair with sourceFiles to scope the analysis.",
|
|
50
|
+
},
|
|
51
|
+
includeImpactDiagnostics: {
|
|
52
|
+
type: "boolean",
|
|
53
|
+
description:
|
|
54
|
+
"When true, include changed-file impact diagnostics such as symbol_granularity_violation and symbol_semantic_review_needed in structured output.",
|
|
55
|
+
},
|
|
56
|
+
maxDiagnostics: {
|
|
57
|
+
type: "integer",
|
|
58
|
+
minimum: 0,
|
|
59
|
+
description:
|
|
60
|
+
"Optional maximum number of impact diagnostics to return. Graph validation violations are not capped by this value.",
|
|
61
|
+
},
|
|
62
|
+
workspaceRoot: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description:
|
|
65
|
+
"Optional workspace root for impact diagnostics and .kb/config.json lookup. Defaults to the MCP server workspace.",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
requiresProlog: true,
|
|
70
|
+
effects: ["kb-read", "workspace-read"],
|
|
71
|
+
execute: executeCheck,
|
|
72
|
+
} as const satisfies OperationSpec;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import {
|
|
2
|
+
executeQuery,
|
|
3
|
+
executeSearch,
|
|
4
|
+
executeStatus,
|
|
5
|
+
} from "../discovery-executors.js";
|
|
6
|
+
import type {
|
|
7
|
+
QueryInput,
|
|
8
|
+
QueryPayload,
|
|
9
|
+
SearchInput,
|
|
10
|
+
SearchPayload,
|
|
11
|
+
StatusInput,
|
|
12
|
+
StatusPayload,
|
|
13
|
+
} from "../discovery-executors.js";
|
|
14
|
+
import type { OperationSpec } from "../types.js";
|
|
15
|
+
|
|
16
|
+
const ENTITY_TYPES = [
|
|
17
|
+
"req",
|
|
18
|
+
"scenario",
|
|
19
|
+
"test",
|
|
20
|
+
"adr",
|
|
21
|
+
"flag",
|
|
22
|
+
"event",
|
|
23
|
+
"symbol",
|
|
24
|
+
"fact",
|
|
25
|
+
] as const;
|
|
26
|
+
|
|
27
|
+
export const querySpec = {
|
|
28
|
+
name: "kb_query",
|
|
29
|
+
cliName: "query",
|
|
30
|
+
description:
|
|
31
|
+
"Read entities from the KB with filters. Use for discovery and lookup before edits. Do not use for writes. No mutation side effects. Tags filter by metadata tags only, not entity IDs.",
|
|
32
|
+
businessInputSchema: {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
type: {
|
|
36
|
+
type: "string",
|
|
37
|
+
enum: ENTITY_TYPES,
|
|
38
|
+
description:
|
|
39
|
+
"Optional entity type filter. Allowed: req, scenario, test, adr, flag, event, symbol, fact. Example: 'req'.",
|
|
40
|
+
},
|
|
41
|
+
id: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description:
|
|
44
|
+
"Optional exact entity ID. Example: 'REQ-001'. If omitted, returns matching entities by other filters.",
|
|
45
|
+
},
|
|
46
|
+
tags: {
|
|
47
|
+
type: "array",
|
|
48
|
+
items: { type: "string" },
|
|
49
|
+
description:
|
|
50
|
+
"Optional tag filter. Matches entities that contain any provided tag. Example: ['security','billing'].",
|
|
51
|
+
},
|
|
52
|
+
sourceFile: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description:
|
|
55
|
+
"Optional source-file substring filter. Example: 'src/auth/login.ts'. Uses KB source linkage, not file-system scanning.",
|
|
56
|
+
},
|
|
57
|
+
limit: {
|
|
58
|
+
type: "number",
|
|
59
|
+
default: 100,
|
|
60
|
+
description:
|
|
61
|
+
"Optional max rows to return after filtering. Default: 100 when omitted. Example: 25.",
|
|
62
|
+
},
|
|
63
|
+
offset: {
|
|
64
|
+
type: "number",
|
|
65
|
+
default: 0,
|
|
66
|
+
description:
|
|
67
|
+
"Optional zero-based pagination offset. Default: 0. Example: 50 to skip first 50 rows.",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
requiresProlog: true,
|
|
72
|
+
effects: ["kb-read"],
|
|
73
|
+
execute: executeQuery,
|
|
74
|
+
} as const satisfies OperationSpec<QueryInput, QueryPayload>;
|
|
75
|
+
|
|
76
|
+
export const searchSpec = {
|
|
77
|
+
name: "kb_search",
|
|
78
|
+
cliName: "search",
|
|
79
|
+
description:
|
|
80
|
+
"Search KB entities for discovery using metadata and markdown body text. Use for exploratory lookup before exact follow-up with kb_query. No mutation side effects.",
|
|
81
|
+
businessInputSchema: {
|
|
82
|
+
type: "object",
|
|
83
|
+
required: ["query"],
|
|
84
|
+
properties: {
|
|
85
|
+
query: {
|
|
86
|
+
type: "string",
|
|
87
|
+
minLength: 1,
|
|
88
|
+
maxLength: 4096,
|
|
89
|
+
description:
|
|
90
|
+
"Free-text query for metadata and markdown body discovery. Example: 'OAuth login flow'.",
|
|
91
|
+
},
|
|
92
|
+
type: {
|
|
93
|
+
type: "string",
|
|
94
|
+
enum: ENTITY_TYPES,
|
|
95
|
+
description:
|
|
96
|
+
"Optional entity type filter to narrow discovery. Example: 'req'.",
|
|
97
|
+
},
|
|
98
|
+
limit: {
|
|
99
|
+
type: "integer",
|
|
100
|
+
minimum: 0,
|
|
101
|
+
default: 20,
|
|
102
|
+
description: "Optional max rows to return after ranking. Default: 20.",
|
|
103
|
+
},
|
|
104
|
+
offset: {
|
|
105
|
+
type: "integer",
|
|
106
|
+
minimum: 0,
|
|
107
|
+
default: 0,
|
|
108
|
+
description: "Optional zero-based pagination offset. Default: 0.",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
requiresProlog: true,
|
|
113
|
+
effects: ["kb-read"],
|
|
114
|
+
execute: executeSearch,
|
|
115
|
+
} as const satisfies OperationSpec<SearchInput, SearchPayload>;
|
|
116
|
+
|
|
117
|
+
export const statusSpec = {
|
|
118
|
+
name: "kb_status",
|
|
119
|
+
cliName: "status",
|
|
120
|
+
description:
|
|
121
|
+
"Report current branch, snapshot, and freshness metadata for the attached KB. Read-only status inspection with no mutation side effects.",
|
|
122
|
+
businessInputSchema: { type: "object", properties: {} },
|
|
123
|
+
requiresProlog: true,
|
|
124
|
+
effects: ["kb-read", "workspace-read"],
|
|
125
|
+
execute: executeStatus,
|
|
126
|
+
} as const satisfies OperationSpec<StatusInput, StatusPayload>;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ModelRequirementArgs,
|
|
3
|
+
type ModelRequirementResult,
|
|
4
|
+
executeModelRequirement,
|
|
5
|
+
} from "../../../operations/modeling/model-requirement.js";
|
|
6
|
+
import {
|
|
7
|
+
type SuggestPredicatesArgs,
|
|
8
|
+
type SuggestPredicatesResult,
|
|
9
|
+
executeSuggestPredicates,
|
|
10
|
+
} from "../../../operations/modeling/suggest-predicates.js";
|
|
11
|
+
import type { OperationSpec } from "../types.js";
|
|
12
|
+
|
|
13
|
+
export const modelRequirementSpec = {
|
|
14
|
+
name: "kb_model_requirement",
|
|
15
|
+
cliName: "model-requirement",
|
|
16
|
+
description:
|
|
17
|
+
"Convert a prose requirement plus optional extracted claim fields into a deterministic strict-lane write set. Read-only modeling returns a sequential applyPlan for later kb_upsert calls. High-confidence claims emit req+fact strict output; lower-confidence claims emit an observation review artifact. Includes migration warnings when legacy schemaVersion metadata is detected.",
|
|
18
|
+
businessInputSchema: {
|
|
19
|
+
type: "object",
|
|
20
|
+
required: ["text"],
|
|
21
|
+
properties: {
|
|
22
|
+
text: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description:
|
|
25
|
+
"Required prose requirement text to model. Example: 'Customer data must be retained for 7 years.'",
|
|
26
|
+
},
|
|
27
|
+
source: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description:
|
|
30
|
+
"Optional primary source path or provenance root used for stable IDs and text refs. Example: 'documentation/requirements/customer-retention.md'.",
|
|
31
|
+
},
|
|
32
|
+
sourceFiles: {
|
|
33
|
+
type: "array",
|
|
34
|
+
items: { type: "string" },
|
|
35
|
+
description:
|
|
36
|
+
"Optional related source files. The first value is used as the source fallback when source is omitted.",
|
|
37
|
+
},
|
|
38
|
+
confidence: {
|
|
39
|
+
type: "number",
|
|
40
|
+
default: 0.8,
|
|
41
|
+
minimum: 0,
|
|
42
|
+
maximum: 1,
|
|
43
|
+
description:
|
|
44
|
+
"Confidence score for the extracted claim. >= 0.70 yields strict-lane output; lower confidence yields observation-only review output.",
|
|
45
|
+
},
|
|
46
|
+
subjectKey: {
|
|
47
|
+
type: "string",
|
|
48
|
+
description:
|
|
49
|
+
"Optional extracted semantic claim subjectKey. Example: 'Customer.Data'.",
|
|
50
|
+
},
|
|
51
|
+
propertyKey: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description:
|
|
54
|
+
"Optional extracted semantic claim propertyKey. Example: 'Retention Years'.",
|
|
55
|
+
},
|
|
56
|
+
operator: {
|
|
57
|
+
type: "string",
|
|
58
|
+
enum: ["eq", "gte", "lte", "neq", "bool", "polarity"],
|
|
59
|
+
description:
|
|
60
|
+
"Optional extracted semantic claim operator. Example: 'eq'.",
|
|
61
|
+
},
|
|
62
|
+
value: {
|
|
63
|
+
description:
|
|
64
|
+
"Optional extracted semantic claim value. Accepts string, number, or boolean.",
|
|
65
|
+
},
|
|
66
|
+
provenance: {
|
|
67
|
+
type: "string",
|
|
68
|
+
description:
|
|
69
|
+
"Optional extracted text reference. Falls back to source when omitted. Example: 'documentation/requirements/customer-retention.md#L1'.",
|
|
70
|
+
},
|
|
71
|
+
existingLogicClaims: {
|
|
72
|
+
type: "array",
|
|
73
|
+
items: { type: "string", pattern: "^CLAIM-[A-F0-9]{16}$" },
|
|
74
|
+
uniqueItems: true,
|
|
75
|
+
description:
|
|
76
|
+
"Existing requirement logic_claims values. The returned requirement update merges the new atomic claim key into this manifest instead of replacing prior claims.",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
requiresProlog: true,
|
|
81
|
+
effects: ["kb-read"],
|
|
82
|
+
execute: executeModelRequirement,
|
|
83
|
+
} as const satisfies OperationSpec<
|
|
84
|
+
ModelRequirementArgs,
|
|
85
|
+
ModelRequirementResult["structuredContent"]
|
|
86
|
+
>;
|
|
87
|
+
|
|
88
|
+
export const suggestPredicatesSpec = {
|
|
89
|
+
name: "kb_suggest_predicates",
|
|
90
|
+
cliName: "suggest-predicates",
|
|
91
|
+
description:
|
|
92
|
+
"Suggest ontology predicate schemas for prose requirements before agents write facts. Read-only guidance returns ranked candidates, a safe predicate-fact applyPlan, a separate requires_predicate relationshipPlan when a requirement ID is supplied, or an explicit ontology-gap observation when no predicate fits.",
|
|
93
|
+
businessInputSchema: {
|
|
94
|
+
type: "object",
|
|
95
|
+
required: ["text"],
|
|
96
|
+
properties: {
|
|
97
|
+
text: {
|
|
98
|
+
type: "string",
|
|
99
|
+
description:
|
|
100
|
+
"Required prose requirement or claim to classify into ontology predicates. Example: 'When users navigate away, draft edits must auto-save.'.",
|
|
101
|
+
},
|
|
102
|
+
requirementId: {
|
|
103
|
+
type: "string",
|
|
104
|
+
description:
|
|
105
|
+
"Optional existing requirement ID. When provided, the response includes a relationshipPlan describing the req -> fact requires_predicate link to attach after preserving existing requirement metadata.",
|
|
106
|
+
},
|
|
107
|
+
source: {
|
|
108
|
+
type: "string",
|
|
109
|
+
description:
|
|
110
|
+
"Optional provenance or text reference for generated predicate facts or ontology-gap observations.",
|
|
111
|
+
},
|
|
112
|
+
subjectHint: {
|
|
113
|
+
type: "string",
|
|
114
|
+
description:
|
|
115
|
+
"Optional canonical subject key to use as the first predicate argument. Example: 'editor.annotation'.",
|
|
116
|
+
},
|
|
117
|
+
maxCandidates: {
|
|
118
|
+
type: "integer",
|
|
119
|
+
default: 5,
|
|
120
|
+
minimum: 1,
|
|
121
|
+
maximum: 20,
|
|
122
|
+
description:
|
|
123
|
+
"Maximum ranked predicate candidates to return. Default: 5.",
|
|
124
|
+
},
|
|
125
|
+
minScore: {
|
|
126
|
+
type: "number",
|
|
127
|
+
default: 0.35,
|
|
128
|
+
minimum: 0,
|
|
129
|
+
maximum: 1,
|
|
130
|
+
description:
|
|
131
|
+
"Minimum candidate score. Higher values make ontology-gap fallback more likely. Default: 0.35.",
|
|
132
|
+
},
|
|
133
|
+
includeExistingSchemas: {
|
|
134
|
+
type: "boolean",
|
|
135
|
+
default: true,
|
|
136
|
+
description:
|
|
137
|
+
"Whether to include existing KB fact_kind=predicate_schema facts alongside Kibi's built-in predicate catalog. Default: true.",
|
|
138
|
+
},
|
|
139
|
+
existingLogicClaims: {
|
|
140
|
+
type: "array",
|
|
141
|
+
items: { type: "string", pattern: "^CLAIM-[A-F0-9]{16}$" },
|
|
142
|
+
uniqueItems: true,
|
|
143
|
+
description:
|
|
144
|
+
"Existing requirement logic_claims values. Returned relationship guidance includes a merged manifest so repeated clause modeling does not discard earlier claims.",
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
requiresProlog: true,
|
|
149
|
+
effects: ["kb-read"],
|
|
150
|
+
execute: executeSuggestPredicates,
|
|
151
|
+
} as const satisfies OperationSpec<
|
|
152
|
+
SuggestPredicatesArgs,
|
|
153
|
+
SuggestPredicatesResult["structuredContent"]
|
|
154
|
+
>;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
export const ENTITY_TYPES = [
|
|
2
|
+
"req",
|
|
3
|
+
"scenario",
|
|
4
|
+
"test",
|
|
5
|
+
"adr",
|
|
6
|
+
"flag",
|
|
7
|
+
"event",
|
|
8
|
+
"symbol",
|
|
9
|
+
"fact",
|
|
10
|
+
] as const;
|
|
11
|
+
|
|
12
|
+
const CLAIM_PROVENANCE_CONDITIONAL = JSON.parse(`{
|
|
13
|
+
"if": {
|
|
14
|
+
"anyOf": [
|
|
15
|
+
{ "required": ["claim_key"] },
|
|
16
|
+
{ "required": ["claim_text"] }
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"then": { "required": ["claim_key", "claim_text"] }
|
|
20
|
+
}`) as Record<string, unknown>;
|
|
21
|
+
|
|
22
|
+
export const ENTITY_PROPERTIES_SCHEMA = {
|
|
23
|
+
type: "object",
|
|
24
|
+
description:
|
|
25
|
+
"Entity fields to persist. Must include title and status. If created_at, updated_at, or source are omitted, server fills defaults.",
|
|
26
|
+
properties: {
|
|
27
|
+
title: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description:
|
|
30
|
+
"Required short title. Example: 'Protect account settings endpoint'.",
|
|
31
|
+
},
|
|
32
|
+
status: {
|
|
33
|
+
type: "string",
|
|
34
|
+
description:
|
|
35
|
+
"Required lifecycle state. Allowed values depend on entity type; backward-compatible legacy statuses are also accepted. Examples: 'open', 'passing', 'accepted', 'active'.",
|
|
36
|
+
},
|
|
37
|
+
source: {
|
|
38
|
+
type: "string",
|
|
39
|
+
description:
|
|
40
|
+
"Optional provenance string. Example: 'docs/requirements/REQ-123.md'. Defaults to 'mcp://kibi/upsert'.",
|
|
41
|
+
},
|
|
42
|
+
tags: {
|
|
43
|
+
type: "array",
|
|
44
|
+
items: { type: "string" },
|
|
45
|
+
description: "Optional categorization tags. Example: ['security','api'].",
|
|
46
|
+
},
|
|
47
|
+
owner: {
|
|
48
|
+
type: "string",
|
|
49
|
+
description: "Optional owner name/team. Example: 'platform-team'.",
|
|
50
|
+
},
|
|
51
|
+
priority: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Optional priority label. Example: 'high'.",
|
|
54
|
+
},
|
|
55
|
+
severity: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Optional severity label. Example: 'critical'.",
|
|
58
|
+
},
|
|
59
|
+
links: {
|
|
60
|
+
type: "array",
|
|
61
|
+
items: { type: "string" },
|
|
62
|
+
description:
|
|
63
|
+
"Optional references. Example: ['REQ-010','https://example.com/spec'].",
|
|
64
|
+
},
|
|
65
|
+
text_ref: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description:
|
|
68
|
+
"Optional text anchor/reference. Example: 'requirements.md#L40'.",
|
|
69
|
+
},
|
|
70
|
+
logic_claims: {
|
|
71
|
+
type: "array",
|
|
72
|
+
minItems: 1,
|
|
73
|
+
uniqueItems: true,
|
|
74
|
+
items: { type: "string", pattern: "^CLAIM-[A-F0-9]{16}$" },
|
|
75
|
+
description:
|
|
76
|
+
"Requirement-only manifest of every atomic normative claim key returned by kb_semantic_advisor. A requirement is logic-complete only when every key is grounded by a linked property_value or predicate fact with the same claim_key.",
|
|
77
|
+
},
|
|
78
|
+
sourceFile: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description:
|
|
81
|
+
"Optional code source file for symbol entities. Example: 'src/auth/login.ts'.",
|
|
82
|
+
},
|
|
83
|
+
granularity_reason: {
|
|
84
|
+
type: "string",
|
|
85
|
+
enum: [
|
|
86
|
+
"config-artifact",
|
|
87
|
+
"module-level-behavior",
|
|
88
|
+
"extractor-miss",
|
|
89
|
+
"legacy-link",
|
|
90
|
+
],
|
|
91
|
+
description:
|
|
92
|
+
"Optional justification for a coarse file/module-level symbol traceability relationship when narrower function/class/type symbols exist.",
|
|
93
|
+
},
|
|
94
|
+
symbol_role: {
|
|
95
|
+
type: "string",
|
|
96
|
+
enum: [
|
|
97
|
+
"behavioral",
|
|
98
|
+
"structural",
|
|
99
|
+
"type-shape",
|
|
100
|
+
"config",
|
|
101
|
+
"module",
|
|
102
|
+
"unknown",
|
|
103
|
+
],
|
|
104
|
+
description:
|
|
105
|
+
"Optional role classification for symbol entities. Example: 'behavioral'.",
|
|
106
|
+
},
|
|
107
|
+
verification_scope: {
|
|
108
|
+
type: "string",
|
|
109
|
+
enum: ["unit", "integration", "end_to_end"],
|
|
110
|
+
description:
|
|
111
|
+
"Optional typed verification scope for test entities. Example: 'end_to_end'.",
|
|
112
|
+
},
|
|
113
|
+
verification_perspective: {
|
|
114
|
+
type: "string",
|
|
115
|
+
enum: ["internal", "consumer"],
|
|
116
|
+
description:
|
|
117
|
+
"Optional typed verification perspective for test entities. Example: 'consumer'.",
|
|
118
|
+
},
|
|
119
|
+
fact_kind: {
|
|
120
|
+
type: "string",
|
|
121
|
+
enum: [
|
|
122
|
+
"subject",
|
|
123
|
+
"property_value",
|
|
124
|
+
"observation",
|
|
125
|
+
"meta",
|
|
126
|
+
"predicate_schema",
|
|
127
|
+
"predicate",
|
|
128
|
+
],
|
|
129
|
+
description:
|
|
130
|
+
"Optional fact lane kind for fact entities. Strict lane uses 'subject' and 'property_value'; context lane uses 'observation' or 'meta'; ontology lane uses 'predicate_schema' or 'predicate'. Use kb_model_requirement or kb_suggest_predicates when starting from prose.",
|
|
131
|
+
},
|
|
132
|
+
subject_key: {
|
|
133
|
+
type: "string",
|
|
134
|
+
description:
|
|
135
|
+
"Snake_case only. Optional canonical subject key for strict fact entities. Example: 'user.session'. Do not use subjectKey in kb_upsert.properties.",
|
|
136
|
+
},
|
|
137
|
+
property_key: {
|
|
138
|
+
type: "string",
|
|
139
|
+
description:
|
|
140
|
+
"Snake_case only. Optional canonical property key for property_value facts. Example: 'session.timeout_minutes'. Do not use propertyKey in kb_upsert.properties.",
|
|
141
|
+
},
|
|
142
|
+
operator: {
|
|
143
|
+
type: "string",
|
|
144
|
+
enum: ["eq", "neq", "lt", "lte", "gt", "gte"],
|
|
145
|
+
description:
|
|
146
|
+
"Optional comparison operator for property_value facts. Example: 'eq'.",
|
|
147
|
+
},
|
|
148
|
+
value_type: {
|
|
149
|
+
type: "string",
|
|
150
|
+
enum: ["string", "int", "number", "bool"],
|
|
151
|
+
description:
|
|
152
|
+
"Optional typed value discriminator for property_value facts. Pair with exactly one value_string, value_int, value_number, or value_bool; do not use generic value.",
|
|
153
|
+
},
|
|
154
|
+
value_string: {
|
|
155
|
+
type: "string",
|
|
156
|
+
description: "Optional string value for property_value facts.",
|
|
157
|
+
},
|
|
158
|
+
value_int: {
|
|
159
|
+
type: "integer",
|
|
160
|
+
description: "Optional integer value for property_value facts.",
|
|
161
|
+
},
|
|
162
|
+
value_number: {
|
|
163
|
+
type: "number",
|
|
164
|
+
description: "Optional number value for property_value facts.",
|
|
165
|
+
},
|
|
166
|
+
value_bool: {
|
|
167
|
+
type: "boolean",
|
|
168
|
+
description: "Optional boolean value for property_value facts.",
|
|
169
|
+
},
|
|
170
|
+
unit: {
|
|
171
|
+
type: "string",
|
|
172
|
+
description: "Optional unit for numeric property_value facts.",
|
|
173
|
+
},
|
|
174
|
+
scope: {
|
|
175
|
+
type: "string",
|
|
176
|
+
description: "Optional scope qualifier for fact entities.",
|
|
177
|
+
},
|
|
178
|
+
polarity: {
|
|
179
|
+
type: "string",
|
|
180
|
+
enum: ["require", "forbid", "assert", "deny"],
|
|
181
|
+
description: "Optional polarity for property_value or predicate facts.",
|
|
182
|
+
},
|
|
183
|
+
closed_world: {
|
|
184
|
+
type: "boolean",
|
|
185
|
+
description:
|
|
186
|
+
"Optional closed-world marker for strict fact interpretation.",
|
|
187
|
+
},
|
|
188
|
+
canonical_key: {
|
|
189
|
+
type: "string",
|
|
190
|
+
description:
|
|
191
|
+
"Optional canonical identity key for predicate or strict fact claims.",
|
|
192
|
+
},
|
|
193
|
+
claim_key: {
|
|
194
|
+
type: "string",
|
|
195
|
+
pattern: "^CLAIM-[A-F0-9]{16}$",
|
|
196
|
+
description:
|
|
197
|
+
"Stable semantic-advisor key for the atomic prose clause grounded by this fact.",
|
|
198
|
+
},
|
|
199
|
+
claim_text: {
|
|
200
|
+
type: "string",
|
|
201
|
+
description:
|
|
202
|
+
"Exact atomic requirement clause represented by this fact, retained for human audit.",
|
|
203
|
+
},
|
|
204
|
+
predicate_name: {
|
|
205
|
+
type: "string",
|
|
206
|
+
description:
|
|
207
|
+
"Optional predicate name for ontology predicate facts. Prefer kb_suggest_predicates before hand-writing predicate_name.",
|
|
208
|
+
},
|
|
209
|
+
predicate_args: {
|
|
210
|
+
type: "array",
|
|
211
|
+
items: { type: "string" },
|
|
212
|
+
description:
|
|
213
|
+
"Optional ordered predicate arguments for ontology predicate facts. Prefer kb_suggest_predicates before hand-writing predicate_args.",
|
|
214
|
+
},
|
|
215
|
+
predicate_namespace: {
|
|
216
|
+
type: "string",
|
|
217
|
+
description: "Optional namespace for a project-local predicate schema.",
|
|
218
|
+
},
|
|
219
|
+
predicate_arity: {
|
|
220
|
+
type: "integer",
|
|
221
|
+
minimum: 1,
|
|
222
|
+
description: "Required arity for predicate_schema facts.",
|
|
223
|
+
},
|
|
224
|
+
argument_names: {
|
|
225
|
+
type: "array",
|
|
226
|
+
items: { type: "string" },
|
|
227
|
+
description: "Ordered argument role names for predicate_schema facts.",
|
|
228
|
+
},
|
|
229
|
+
argument_types: {
|
|
230
|
+
type: "array",
|
|
231
|
+
items: { type: "string" },
|
|
232
|
+
description: "Ordered argument types for predicate_schema facts.",
|
|
233
|
+
},
|
|
234
|
+
argument_descriptions: {
|
|
235
|
+
type: "array",
|
|
236
|
+
items: { type: "string" },
|
|
237
|
+
description: "Optional ordered argument explanations.",
|
|
238
|
+
},
|
|
239
|
+
aliases: {
|
|
240
|
+
type: "array",
|
|
241
|
+
items: { type: "string" },
|
|
242
|
+
description: "Optional vocabulary aliases for predicate discovery.",
|
|
243
|
+
},
|
|
244
|
+
examples: {
|
|
245
|
+
type: "array",
|
|
246
|
+
items: { type: "string" },
|
|
247
|
+
description: "Optional ground-term examples for a predicate schema.",
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
allOf: [CLAIM_PROVENANCE_CONDITIONAL],
|
|
251
|
+
required: ["title", "status"],
|
|
252
|
+
} as const;
|
|
253
|
+
|
|
254
|
+
export const RELATIONSHIPS_SCHEMA = {
|
|
255
|
+
type: "array",
|
|
256
|
+
description:
|
|
257
|
+
"Optional relationship rows to create in the same call. For requirement encoding, prefer `constrains` + `requires_property` for strict property facts or `requires_predicate` for ontology predicate facts. Side effect: asserts edges in KB.",
|
|
258
|
+
items: {
|
|
259
|
+
type: "object",
|
|
260
|
+
required: ["type", "from", "to"],
|
|
261
|
+
properties: {
|
|
262
|
+
type: {
|
|
263
|
+
type: "string",
|
|
264
|
+
enum: [
|
|
265
|
+
"depends_on",
|
|
266
|
+
"specified_by",
|
|
267
|
+
"verified_by",
|
|
268
|
+
"validates",
|
|
269
|
+
"implements",
|
|
270
|
+
"covered_by",
|
|
271
|
+
"executable_for",
|
|
272
|
+
"constrained_by",
|
|
273
|
+
"constrains",
|
|
274
|
+
"requires_property",
|
|
275
|
+
"requires_predicate",
|
|
276
|
+
"guards",
|
|
277
|
+
"publishes",
|
|
278
|
+
"consumes",
|
|
279
|
+
"supersedes",
|
|
280
|
+
"relates_to",
|
|
281
|
+
],
|
|
282
|
+
description:
|
|
283
|
+
"Relationship type enum. Use only supported values. Direction semantics follow KB model (e.g., implements symbol->req, verified_by req/scenario->test, executable_for symbol->test).",
|
|
284
|
+
},
|
|
285
|
+
from: {
|
|
286
|
+
type: "string",
|
|
287
|
+
description:
|
|
288
|
+
"Source entity ID (must exist). Example: 'SYM-login-handler'.",
|
|
289
|
+
},
|
|
290
|
+
to: {
|
|
291
|
+
type: "string",
|
|
292
|
+
description: "Target entity ID (must exist). Example: 'REQ-001'.",
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
} as const;
|