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
package/dist/public/skills.d.ts
CHANGED
|
@@ -1,42 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
version: string;
|
|
8
|
-
kibiCompatibility: string;
|
|
9
|
-
tags?: string[];
|
|
10
|
-
resources?: string[];
|
|
11
|
-
}
|
|
12
|
-
export interface SkillBundle {
|
|
13
|
-
manifest: SkillManifest;
|
|
14
|
-
body: string;
|
|
15
|
-
rootDir: string;
|
|
16
|
-
}
|
|
17
|
-
export declare class SkillNotFoundError extends Error {
|
|
18
|
-
constructor(id: string);
|
|
19
|
-
}
|
|
20
|
-
export declare class SkillResourceNotFoundError extends Error {
|
|
21
|
-
constructor(id: string, resourcePath: string);
|
|
22
|
-
}
|
|
23
|
-
export declare class SkillResourceOutOfBoundsError extends Error {
|
|
24
|
-
constructor(id: string, resourcePath: string);
|
|
25
|
-
}
|
|
26
|
-
export declare class SkillValidationError extends Error {
|
|
27
|
-
readonly field: string;
|
|
28
|
-
constructor(field: string, message: string);
|
|
29
|
-
}
|
|
30
|
-
export declare class SkillOversizeError extends Error {
|
|
31
|
-
readonly maxBytes: number;
|
|
32
|
-
readonly actualBytes: number;
|
|
33
|
-
constructor(pathLike: string, maxBytes: number, actualBytes: number);
|
|
34
|
-
}
|
|
35
|
-
export declare function listBundledSkills(): SkillManifest[];
|
|
36
|
-
export declare function loadBundledSkill(id: string): SkillBundle;
|
|
37
|
-
export declare function readBundledSkillResource(id: string, resourcePath: string): string;
|
|
38
|
-
export declare function validateSkillBundle(pathLike: string): {
|
|
39
|
-
valid: boolean;
|
|
40
|
-
errors: SkillValidationError[];
|
|
41
|
-
};
|
|
1
|
+
export { SkillNotFoundError, SkillOversizeError, SkillResourceNotFoundError, SkillResourceOutOfBoundsError, SkillValidationError, } from "./skill-system/errors.js";
|
|
2
|
+
export { listBundledSkills, loadBundledSkill, loadBundledSkillFrom, readBundledSkillResource, readBundledSkillResourceFrom, resetBundledSkillsDir, setBundledSkillsDir, } from "./skill-system/loader.js";
|
|
3
|
+
export type { SkillBundle, SkillManifest } from "./skill-system/types.js";
|
|
4
|
+
export { validateSkillBundle } from "./skill-system/validation.js";
|
|
42
5
|
//# sourceMappingURL=skills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/public/skills.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/public/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,0BAA0B,EAC1B,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/public/skills.js
CHANGED
|
@@ -1,270 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import matter from "gray-matter";
|
|
5
|
-
const SKILL_MARKDOWN_MAX_BYTES = 256 * 1024;
|
|
6
|
-
const RESOURCE_MAX_BYTES = 128 * 1024;
|
|
7
|
-
const SKILL_FILE_NAME = "SKILL.md";
|
|
8
|
-
const moduleDir = dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
let bundledSkillsDir = resolve(moduleDir, "skills");
|
|
10
|
-
const defaultBundledSkillsDir = bundledSkillsDir;
|
|
11
|
-
export function setBundledSkillsDir(dir) {
|
|
12
|
-
bundledSkillsDir = dir;
|
|
13
|
-
}
|
|
14
|
-
export function resetBundledSkillsDir() {
|
|
15
|
-
bundledSkillsDir = defaultBundledSkillsDir;
|
|
16
|
-
}
|
|
17
|
-
export class SkillNotFoundError extends Error {
|
|
18
|
-
constructor(id) {
|
|
19
|
-
super(`Skill not found: ${id}`);
|
|
20
|
-
this.name = "SkillNotFoundError";
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export class SkillResourceNotFoundError extends Error {
|
|
24
|
-
constructor(id, resourcePath) {
|
|
25
|
-
super(`Skill resource not found: ${id}/${resourcePath}`);
|
|
26
|
-
this.name = "SkillResourceNotFoundError";
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export class SkillResourceOutOfBoundsError extends Error {
|
|
30
|
-
constructor(id, resourcePath) {
|
|
31
|
-
super(`Skill resource escapes bundle root: ${id}/${resourcePath}`);
|
|
32
|
-
this.name = "SkillResourceOutOfBoundsError";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export class SkillValidationError extends Error {
|
|
36
|
-
field;
|
|
37
|
-
constructor(field, message) {
|
|
38
|
-
super(message);
|
|
39
|
-
this.name = "SkillValidationError";
|
|
40
|
-
this.field = field;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
export class SkillOversizeError extends Error {
|
|
44
|
-
maxBytes;
|
|
45
|
-
actualBytes;
|
|
46
|
-
constructor(pathLike, maxBytes, actualBytes) {
|
|
47
|
-
super(`Skill file exceeds ${maxBytes} bytes: ${pathLike} (${actualBytes} bytes)`);
|
|
48
|
-
this.name = "SkillOversizeError";
|
|
49
|
-
this.maxBytes = maxBytes;
|
|
50
|
-
this.actualBytes = actualBytes;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
export function listBundledSkills() {
|
|
54
|
-
// implements REQ-001
|
|
55
|
-
if (!existsSync(bundledSkillsDir)) {
|
|
56
|
-
return [];
|
|
57
|
-
}
|
|
58
|
-
return readdirSync(bundledSkillsDir, { withFileTypes: true })
|
|
59
|
-
.filter((entry) => entry.isDirectory())
|
|
60
|
-
.map((entry) => join(bundledSkillsDir, entry.name))
|
|
61
|
-
.filter((rootDir) => existsSync(join(rootDir, SKILL_FILE_NAME)))
|
|
62
|
-
.map((rootDir) => parseSkillBundle(rootDir).manifest)
|
|
63
|
-
.sort((left, right) => left.id.localeCompare(right.id));
|
|
64
|
-
}
|
|
65
|
-
export function loadBundledSkill(id) {
|
|
66
|
-
// implements REQ-001
|
|
67
|
-
const rootDir = findBundledSkillRoot(id);
|
|
68
|
-
if (!rootDir) {
|
|
69
|
-
throw new SkillNotFoundError(id);
|
|
70
|
-
}
|
|
71
|
-
return parseSkillBundle(rootDir);
|
|
72
|
-
}
|
|
73
|
-
export function readBundledSkillResource(id, resourcePath) {
|
|
74
|
-
// implements REQ-001
|
|
75
|
-
const bundle = loadBundledSkill(id);
|
|
76
|
-
const declaredResource = normalizeResourcePath(resourcePath);
|
|
77
|
-
if (!declaredResource || isPathOutOfBounds(resourcePath)) {
|
|
78
|
-
throw new SkillResourceOutOfBoundsError(id, resourcePath);
|
|
79
|
-
}
|
|
80
|
-
if (!isDeclaredResource(bundle.manifest, declaredResource)) {
|
|
81
|
-
throw new SkillResourceNotFoundError(id, resourcePath);
|
|
82
|
-
}
|
|
83
|
-
const candidatePath = resolve(bundle.rootDir, declaredResource);
|
|
84
|
-
let realResourcePath;
|
|
85
|
-
let realRootDir;
|
|
86
|
-
try {
|
|
87
|
-
realResourcePath = realpathSync(candidatePath);
|
|
88
|
-
realRootDir = realpathSync(bundle.rootDir);
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
throw new SkillResourceNotFoundError(id, resourcePath);
|
|
92
|
-
}
|
|
93
|
-
if (!isWithinRoot(realRootDir, realResourcePath)) {
|
|
94
|
-
throw new SkillResourceOutOfBoundsError(id, resourcePath);
|
|
95
|
-
}
|
|
96
|
-
assertMaxBytes(candidatePath, RESOURCE_MAX_BYTES);
|
|
97
|
-
return readFileSync(candidatePath, "utf8");
|
|
98
|
-
}
|
|
99
|
-
export function validateSkillBundle(pathLike) {
|
|
100
|
-
// implements REQ-001
|
|
101
|
-
const skillFilePath = resolveSkillFilePath(pathLike);
|
|
102
|
-
const errors = [];
|
|
103
|
-
if (!existsSync(skillFilePath)) {
|
|
104
|
-
errors.push(new SkillValidationError("SKILL.md", `Missing ${SKILL_FILE_NAME}`));
|
|
105
|
-
return { valid: false, errors };
|
|
106
|
-
}
|
|
107
|
-
const parsed = matter(readFileSync(skillFilePath, "utf8"));
|
|
108
|
-
errors.push(...validateManifestData(parsed.data));
|
|
109
|
-
if (errors.length === 0) {
|
|
110
|
-
validateBundleContents(skillFilePath, coerceManifest(parsed.data), errors);
|
|
111
|
-
}
|
|
112
|
-
return { valid: errors.length === 0, errors };
|
|
113
|
-
}
|
|
114
|
-
function validateBundleContents(skillFilePath, manifest, errors) {
|
|
115
|
-
try {
|
|
116
|
-
assertMaxBytes(skillFilePath, SKILL_MARKDOWN_MAX_BYTES);
|
|
117
|
-
}
|
|
118
|
-
catch (error) {
|
|
119
|
-
errors.push(new SkillValidationError("SKILL.md", error instanceof Error ? error.message : String(error)));
|
|
120
|
-
}
|
|
121
|
-
const rootDir = dirname(skillFilePath);
|
|
122
|
-
let realRootDir;
|
|
123
|
-
try {
|
|
124
|
-
realRootDir = realpathSync(rootDir);
|
|
125
|
-
}
|
|
126
|
-
catch (error) {
|
|
127
|
-
errors.push(new SkillValidationError("SKILL.md", error instanceof Error ? error.message : String(error)));
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
for (const resource of manifest.resources ?? []) {
|
|
131
|
-
const resourcePath = resolve(rootDir, resource);
|
|
132
|
-
try {
|
|
133
|
-
if (!existsSync(resourcePath)) {
|
|
134
|
-
errors.push(new SkillValidationError("resources", `Missing skill resource: ${resource}`));
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
const realResourcePath = realpathSync(resourcePath);
|
|
138
|
-
if (!isWithinRoot(realRootDir, realResourcePath)) {
|
|
139
|
-
errors.push(new SkillValidationError("resources", `Skill resource escapes bundle root: ${resource}`));
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
assertMaxBytes(resourcePath, RESOURCE_MAX_BYTES);
|
|
143
|
-
}
|
|
144
|
-
catch (error) {
|
|
145
|
-
errors.push(new SkillValidationError("resources", error instanceof Error ? error.message : String(error)));
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
function findBundledSkillRoot(id) {
|
|
150
|
-
if (!existsSync(bundledSkillsDir)) {
|
|
151
|
-
return undefined;
|
|
152
|
-
}
|
|
153
|
-
for (const entry of readdirSync(bundledSkillsDir, { withFileTypes: true })) {
|
|
154
|
-
if (!entry.isDirectory()) {
|
|
155
|
-
continue;
|
|
156
|
-
}
|
|
157
|
-
const rootDir = join(bundledSkillsDir, entry.name);
|
|
158
|
-
const skillFilePath = join(rootDir, SKILL_FILE_NAME);
|
|
159
|
-
if (!existsSync(skillFilePath)) {
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
const manifest = parseSkillBundle(rootDir).manifest;
|
|
163
|
-
if (manifest.id === id) {
|
|
164
|
-
return rootDir;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return undefined;
|
|
168
|
-
}
|
|
169
|
-
function parseSkillBundle(rootDir) {
|
|
170
|
-
const skillFilePath = join(rootDir, SKILL_FILE_NAME);
|
|
171
|
-
assertMaxBytes(skillFilePath, SKILL_MARKDOWN_MAX_BYTES);
|
|
172
|
-
const parsed = matter(readFileSync(skillFilePath, "utf8"));
|
|
173
|
-
const errors = validateManifestData(parsed.data);
|
|
174
|
-
if (errors.length > 0) {
|
|
175
|
-
throw errors[0];
|
|
176
|
-
}
|
|
177
|
-
return {
|
|
178
|
-
manifest: coerceManifest(parsed.data),
|
|
179
|
-
body: parsed.content,
|
|
180
|
-
rootDir: resolve(rootDir),
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
function validateManifestData(data) {
|
|
184
|
-
const errors = [];
|
|
185
|
-
const requiredFields = [
|
|
186
|
-
"id",
|
|
187
|
-
"name",
|
|
188
|
-
"description",
|
|
189
|
-
"version",
|
|
190
|
-
"kibiCompatibility",
|
|
191
|
-
];
|
|
192
|
-
for (const field of requiredFields) {
|
|
193
|
-
if (typeof data[field] !== "string" || data[field].trim() === "") {
|
|
194
|
-
errors.push(new SkillValidationError(field, `Missing required skill field: ${field}`));
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
if (typeof data.version === "string" &&
|
|
198
|
-
!/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(data.version)) {
|
|
199
|
-
errors.push(new SkillValidationError("version", `Invalid skill version: ${data.version}`));
|
|
200
|
-
}
|
|
201
|
-
if (data.tags !== undefined && !isStringArray(data.tags)) {
|
|
202
|
-
errors.push(new SkillValidationError("tags", "Skill tags must be strings"));
|
|
203
|
-
}
|
|
204
|
-
if (data.resources !== undefined) {
|
|
205
|
-
if (!isStringArray(data.resources)) {
|
|
206
|
-
errors.push(new SkillValidationError("resources", "Skill resources must be strings"));
|
|
207
|
-
}
|
|
208
|
-
else {
|
|
209
|
-
for (const resource of data.resources) {
|
|
210
|
-
const normalized = normalizeResourcePath(resource);
|
|
211
|
-
if (!normalized || isPathOutOfBounds(resource)) {
|
|
212
|
-
errors.push(new SkillValidationError("resources", `Invalid skill resource: ${resource}`));
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
return errors;
|
|
218
|
-
}
|
|
219
|
-
function coerceManifest(data) {
|
|
220
|
-
const manifest = {
|
|
221
|
-
id: String(data.id),
|
|
222
|
-
name: String(data.name),
|
|
223
|
-
description: String(data.description),
|
|
224
|
-
version: String(data.version),
|
|
225
|
-
kibiCompatibility: String(data.kibiCompatibility),
|
|
226
|
-
};
|
|
227
|
-
if (isStringArray(data.tags)) {
|
|
228
|
-
manifest.tags = data.tags;
|
|
229
|
-
}
|
|
230
|
-
if (isStringArray(data.resources)) {
|
|
231
|
-
manifest.resources = data.resources.map((resource) => normalizeResourcePath(resource));
|
|
232
|
-
}
|
|
233
|
-
return manifest;
|
|
234
|
-
}
|
|
235
|
-
function isStringArray(value) {
|
|
236
|
-
return (Array.isArray(value) && value.every((item) => typeof item === "string"));
|
|
237
|
-
}
|
|
238
|
-
function normalizeResourcePath(pathLike) {
|
|
239
|
-
return normalize(pathLike).replaceAll("\\", "/");
|
|
240
|
-
}
|
|
241
|
-
function isPathOutOfBounds(pathLike) {
|
|
242
|
-
const normalized = normalizeResourcePath(pathLike);
|
|
243
|
-
return (isAbsolute(pathLike) ||
|
|
244
|
-
normalized === ".." ||
|
|
245
|
-
normalized.startsWith("../") ||
|
|
246
|
-
normalized.includes("/../"));
|
|
247
|
-
}
|
|
248
|
-
function isDeclaredResource(manifest, resourcePath) {
|
|
249
|
-
return (manifest.resources ?? []).some((declared) => normalizeResourcePath(declared) === resourcePath);
|
|
250
|
-
}
|
|
251
|
-
function isWithinRoot(rootDir, candidatePath) {
|
|
252
|
-
const relativePath = relative(rootDir, candidatePath);
|
|
253
|
-
return (relativePath === "" ||
|
|
254
|
-
(!relativePath.startsWith("..") && !isAbsolute(relativePath)));
|
|
255
|
-
}
|
|
256
|
-
function assertMaxBytes(pathLike, maxBytes) {
|
|
257
|
-
const size = statSync(pathLike).size;
|
|
258
|
-
if (size > maxBytes) {
|
|
259
|
-
throw new SkillOversizeError(pathLike, maxBytes, size);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
function resolveSkillFilePath(pathLike) {
|
|
263
|
-
const resolved = resolve(pathLike);
|
|
264
|
-
if (existsSync(resolved) && statSync(resolved).isDirectory()) {
|
|
265
|
-
return join(resolved, SKILL_FILE_NAME);
|
|
266
|
-
}
|
|
267
|
-
return resolved.endsWith(SKILL_FILE_NAME)
|
|
268
|
-
? resolved
|
|
269
|
-
: join(resolved, SKILL_FILE_NAME);
|
|
270
|
-
}
|
|
1
|
+
export { SkillNotFoundError, SkillOversizeError, SkillResourceNotFoundError, SkillResourceOutOfBoundsError, SkillValidationError, } from "./skill-system/errors.js";
|
|
2
|
+
export { listBundledSkills, loadBundledSkill, loadBundledSkillFrom, readBundledSkillResource, readBundledSkillResourceFrom, resetBundledSkillsDir, setBundledSkillsDir, } from "./skill-system/loader.js";
|
|
3
|
+
export { validateSkillBundle } from "./skill-system/validation.js";
|
|
@@ -4,7 +4,7 @@ export declare const TRACEABILITY_RELATIONSHIP_TYPES: readonly ["implements", "c
|
|
|
4
4
|
export type TraceabilityRelationshipType = (typeof TRACEABILITY_RELATIONSHIP_TYPES)[number];
|
|
5
5
|
export declare const ALLOWED_GRANULARITY_REASONS: readonly ["config-artifact", "module-level-behavior", "extractor-miss", "legacy-link"];
|
|
6
6
|
export type GranularityReason = (typeof ALLOWED_GRANULARITY_REASONS)[number];
|
|
7
|
-
export type SymbolKind = "function" | "class" | "method" | "interface" | "type" | "variable" | "enum" | "unknown";
|
|
7
|
+
export type SymbolKind = "function" | "class" | "method" | "property" | "accessor" | "interface" | "type" | "variable" | "enum" | "unknown";
|
|
8
8
|
export type SourceSymbolKind = SymbolKind;
|
|
9
9
|
export interface GranularSymbolCandidate {
|
|
10
10
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol-granularity.d.ts","sourceRoot":"","sources":["../../src/public/symbol-granularity.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,oFAOf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,+BAA+B,yDAIlC,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,2BAA2B,wFAK9B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,OAAO,GACP,QAAQ,GACR,WAAW,GACX,MAAM,GACN,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AASD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"symbol-granularity.d.ts","sourceRoot":"","sources":["../../src/public/symbol-granularity.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,oFAOf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,+BAA+B,yDAIlC,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,eAAO,MAAM,2BAA2B,wFAK9B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,WAAW,GACX,MAAM,GACN,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AASD,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAgB5D;AAED,eAAO,MAAM,uBAAuB,wBAAkB,CAAC;AAEvD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAIhE;AAED,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,4BAA4B,CAIvC;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,iBAAiB,CAE5B;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,uBAAuB,GAAG,UAAU,CAI5E;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,uBAAuB,GACjC,OAAO,CAET;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,uBAAuB,EAAE,GACpC,MAAM,EAAE,CAMV;AAED,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,uBAAuB,EAAE,GACpC,MAAM,EAAE,CAQV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/cli-runtime.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAEV,gBAAgB,EAGhB,cAAc,EACf,MAAM,uCAAuC,CAAC;AAwC/C,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,cAAmB,GAC3B,gBAAgB,CAoElB"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { PrologProcess } from "../prolog.js";
|
|
3
|
+
import { nodeFilesystem, nodeGit, nodeNetwork, } from "../public/operations/node-ports.js";
|
|
4
|
+
import { resolveActiveBranch } from "../utils/branch-resolver.js";
|
|
5
|
+
function createDefaultProlog() {
|
|
6
|
+
const process = new PrologProcess({ timeout: 120_000 });
|
|
7
|
+
let lastResult = null;
|
|
8
|
+
return {
|
|
9
|
+
start: () => process.start(),
|
|
10
|
+
query: async (goal) => {
|
|
11
|
+
lastResult = await process.query(goal);
|
|
12
|
+
return lastResult;
|
|
13
|
+
},
|
|
14
|
+
nextSolution: async () => {
|
|
15
|
+
const result = lastResult;
|
|
16
|
+
lastResult = null;
|
|
17
|
+
return result;
|
|
18
|
+
},
|
|
19
|
+
save: () => process.query("kb_save"),
|
|
20
|
+
terminate: () => process.terminate(),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function workspaceRoot(options) {
|
|
24
|
+
const envRoot = process.env.KIBI_WORKSPACE ??
|
|
25
|
+
process.env.KIBI_PROJECT_ROOT ??
|
|
26
|
+
process.env.KIBI_ROOT;
|
|
27
|
+
return path.resolve(options.workspaceRoot ?? envRoot ?? process.cwd());
|
|
28
|
+
}
|
|
29
|
+
function quoteProlog(value) {
|
|
30
|
+
return value.replaceAll("'", "''");
|
|
31
|
+
}
|
|
32
|
+
// implements REQ-kibi-operation-interface-parity
|
|
33
|
+
export function createCliRuntime(options = {}) {
|
|
34
|
+
const ownedPrologs = new WeakMap();
|
|
35
|
+
return {
|
|
36
|
+
open: async (spec, invocationOptions = {}) => {
|
|
37
|
+
const merged = {
|
|
38
|
+
...options,
|
|
39
|
+
...invocationOptions,
|
|
40
|
+
};
|
|
41
|
+
const root = workspaceRoot(merged);
|
|
42
|
+
const signal = merged.signal ?? new AbortController().signal;
|
|
43
|
+
const clock = merged.clock ?? (() => new Date());
|
|
44
|
+
const git = merged.git ?? nodeGit;
|
|
45
|
+
const contextBase = {
|
|
46
|
+
workspaceRoot: root,
|
|
47
|
+
signal,
|
|
48
|
+
clock,
|
|
49
|
+
fs: merged.fs ?? nodeFilesystem,
|
|
50
|
+
git,
|
|
51
|
+
net: merged.net ?? nodeNetwork,
|
|
52
|
+
};
|
|
53
|
+
if (!spec.requiresProlog) {
|
|
54
|
+
return contextBase;
|
|
55
|
+
}
|
|
56
|
+
const prolog = merged.prolog ?? createDefaultProlog();
|
|
57
|
+
try {
|
|
58
|
+
await prolog.start?.();
|
|
59
|
+
let branch = process.env.KIBI_BRANCH?.trim();
|
|
60
|
+
if (!branch) {
|
|
61
|
+
const resolved = resolveActiveBranch(root);
|
|
62
|
+
if ("error" in resolved) {
|
|
63
|
+
const isNonGitContext = resolved.code === "NOT_A_GIT_REPO" ||
|
|
64
|
+
resolved.code === "GIT_NOT_AVAILABLE";
|
|
65
|
+
if (isNonGitContext) {
|
|
66
|
+
branch = "main";
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
throw new Error(`Failed to resolve active branch: ${resolved.error}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
branch = resolved.branch;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const kbPath = path.join(root, ".kb", "branches", branch);
|
|
77
|
+
const attached = await prolog.query(`kb_attach('${quoteProlog(kbPath)}')`);
|
|
78
|
+
if (!attached.success) {
|
|
79
|
+
throw new Error(attached.error ?? "Failed to attach branch KB");
|
|
80
|
+
}
|
|
81
|
+
const context = { ...contextBase, prolog };
|
|
82
|
+
ownedPrologs.set(context, prolog);
|
|
83
|
+
return context;
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
await prolog.terminate?.();
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
afterSuccess: async () => undefined,
|
|
91
|
+
close: async (context) => {
|
|
92
|
+
await ownedPrologs.get(context)?.terminate?.();
|
|
93
|
+
ownedPrologs.delete(context);
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
@@ -38,6 +38,12 @@
|
|
|
38
38
|
"severity": { "type": "string" },
|
|
39
39
|
"links": { "type": "array", "items": { "type": "string" } },
|
|
40
40
|
"text_ref": { "type": "string" },
|
|
41
|
+
"logic_claims": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"minItems": 1,
|
|
44
|
+
"uniqueItems": true,
|
|
45
|
+
"items": { "type": "string", "pattern": "^CLAIM-[A-F0-9]{16}$" }
|
|
46
|
+
},
|
|
41
47
|
"sourceFile": { "type": "string" },
|
|
42
48
|
"granularity_reason": {
|
|
43
49
|
"type": "string",
|
|
@@ -115,6 +121,8 @@
|
|
|
115
121
|
"valid_from": { "type": "string" },
|
|
116
122
|
"valid_to": { "type": "string" },
|
|
117
123
|
"canonical_key": { "type": "string" },
|
|
124
|
+
"claim_key": { "type": "string", "pattern": "^CLAIM-[A-F0-9]{16}$" },
|
|
125
|
+
"claim_text": { "type": "string" },
|
|
118
126
|
"predicate_name": { "type": "string" },
|
|
119
127
|
"predicate_namespace": { "type": "string" },
|
|
120
128
|
"predicate_arity": { "type": "integer", "minimum": 1 },
|
|
@@ -138,6 +146,19 @@
|
|
|
138
146
|
"type"
|
|
139
147
|
],
|
|
140
148
|
"allOf": [
|
|
149
|
+
{
|
|
150
|
+
"if": {
|
|
151
|
+
"properties": { "type": { "const": "req" } }
|
|
152
|
+
},
|
|
153
|
+
"then": {},
|
|
154
|
+
"else": { "not": { "required": ["logic_claims"] } }
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"if": {
|
|
158
|
+
"anyOf": [{ "required": ["claim_key"] }, { "required": ["claim_text"] }]
|
|
159
|
+
},
|
|
160
|
+
"then": { "required": ["claim_key", "claim_text"] }
|
|
161
|
+
},
|
|
141
162
|
{
|
|
142
163
|
"if": {
|
|
143
164
|
"properties": { "type": { "const": "test" } }
|
|
@@ -176,6 +197,8 @@
|
|
|
176
197
|
{ "required": ["valid_from"] },
|
|
177
198
|
{ "required": ["valid_to"] },
|
|
178
199
|
{ "required": ["canonical_key"] },
|
|
200
|
+
{ "required": ["claim_key"] },
|
|
201
|
+
{ "required": ["claim_text"] },
|
|
179
202
|
{ "required": ["predicate_name"] },
|
|
180
203
|
{ "required": ["predicate_namespace"] },
|
|
181
204
|
{ "required": ["predicate_arity"] },
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* analysis decides whether a source edit is behavior-changing; this contract only
|
|
6
6
|
* records that decision and the staged KB artifacts that cover it.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
export declare const KIBI_STAGED_IMPACT_EVIDENCE_DOC = "docs/cli-reference.md#staged-impact-evidence";
|
|
9
9
|
export declare const KIBI_ENTITY_SCHEMA_DOC = "docs/entity-schema.md";
|
|
10
10
|
/** Canonical symbols manifest path used by staged traceability enforcement. */
|
|
11
11
|
export declare const KIBI_SYMBOLS_MANIFEST_PATH = "documentation/symbols.yaml";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence-model.d.ts","sourceRoot":"","sources":["../../src/traceability/evidence-model.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,
|
|
1
|
+
{"version":3,"file":"evidence-model.d.ts","sourceRoot":"","sources":["../../src/traceability/evidence-model.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,+BAA+B,iDACI,CAAC;AAEjD,eAAO,MAAM,sBAAsB,0BAA0B,CAAC;AAE9D,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,qFAAqF;AACrF,eAAO,MAAM,4BAA4B,0CACA,CAAC;AAE1C,mEAAmE;AACnE,eAAO,MAAM,0BAA0B,sBAAsB,CAAC;AAE9D,oEAAoE;AACpE,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,UAAU,GACV,MAAM,GACN,KAAK,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,MAAM,CAAC;AAEX;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GACxB,sBAAsB,GACtB,0BAA0B,CAAC;AAE/B,sEAAsE;AACtE,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,wEAAwE;IACxE,IAAI,EAAE,iBAAiB,GAAG,kBAAkB,CAAC;IAC7C,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,2DAA2D;IAC3D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,sEAAsE;IACtE,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,yBAAyB;IACxC,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,KAAK,EAAE,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IACtD,kFAAkF;IAClF,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,0DAA0D;AAC1D,MAAM,MAAM,kBAAkB,GAC1B,gBAAgB,GAChB,4BAA4B,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,WAAW,EAAE,OAAO,0BAA0B,CAAC;IAC/C,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,gDAAgD;IAChD,MAAM,EAAE,kBAAkB,CAAC;IAC3B,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,gEAAgE;AAChE,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,YAAY,CAAC;IACnB,oEAAoE;IACpE,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACrC;AAED,0EAA0E;AAC1E,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,oBAAoB,CAAC;IAC3B,0EAA0E;IAC1E,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GACtB,uBAAuB,GACvB,8BAA8B,GAC9B,qBAAqB,CAAC;AAE1B;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,oEAAoE;IACpE,aAAa,EAAE,sBAAsB,EAAE,CAAC;IACxC,2EAA2E;IAC3E,eAAe,EAAE,yBAAyB,CAAC;IAC3C,wDAAwD;IACxD,IAAI,EAAE,cAAc,CAAC;CACtB;AAMD,0DAA0D;AAC1D,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAK7E;AAED,oEAAoE;AACpE,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,kBAAkB,GAC3B,MAAM,EAAE,CAQV;AAED,gFAAgF;AAChF,wBAAgB,kCAAkC,CAChD,QAAQ,EAAE,kBAAkB,GAC3B,MAAM,EAAE,CAMV;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAYzE;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAK1E;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,kBAAkB,GAC3B,MAAM,EAAE,CAQV"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* analysis decides whether a source edit is behavior-changing; this contract only
|
|
6
6
|
* records that decision and the staged KB artifacts that cover it.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
export const KIBI_STAGED_IMPACT_EVIDENCE_DOC = "docs/cli-reference.md#staged-impact-evidence";
|
|
9
9
|
export const KIBI_ENTITY_SCHEMA_DOC = "docs/entity-schema.md";
|
|
10
10
|
/** Canonical symbols manifest path used by staged traceability enforcement. */
|
|
11
11
|
export const KIBI_SYMBOLS_MANIFEST_PATH = "documentation/symbols.yaml";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import type { QualityDiagnostic } from "../public/impact/types.js";
|
|
1
2
|
import { type KibiImpactEvidence } from "./evidence-model.js";
|
|
2
|
-
export type KibiImpactDiagnosticId = "kibi_impact_evidence_missing" | "symbols_manifest_stale" | "symbol_granularity_violation" | "kibi_impact_override_missing_rationale";
|
|
3
|
-
export interface KibiImpactDiagnostic {
|
|
3
|
+
export type KibiImpactDiagnosticId = "kibi_impact_evidence_missing" | "symbols_manifest_stale" | "symbol_granularity_violation" | "symbol_semantic_review_needed" | "multi_requirement_symbol_review" | "duplicate_symbol_coordinate_review" | "component_mixed_purpose_review" | "broad_requirement_review" | "requirement_status_review" | "strict_fact_modeling_review" | "logical_coverage_review" | "kibi_impact_override_missing_rationale";
|
|
4
|
+
export interface KibiImpactDiagnostic extends QualityDiagnostic {
|
|
4
5
|
/** Stable staged-enforcement diagnostic identifier. */
|
|
5
6
|
id: KibiImpactDiagnosticId;
|
|
6
|
-
|
|
7
|
-
severity: "error";
|
|
7
|
+
category: QualityDiagnostic["category"];
|
|
8
8
|
/** Repo-relative files that explain why the diagnostic fired. */
|
|
9
|
-
files: string[];
|
|
9
|
+
files: readonly string[];
|
|
10
10
|
/** User-facing docs that explain the policy. */
|
|
11
|
-
docs: string[];
|
|
11
|
+
docs: readonly string[];
|
|
12
12
|
/** Exact CLI-facing diagnostic message. */
|
|
13
13
|
message: string;
|
|
14
14
|
/** Deterministic remediation guidance. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staged-diagnostics.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,kBAAkB,EAIxB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,sBAAsB,GAC9B,8BAA8B,GAC9B,wBAAwB,GACxB,8BAA8B,GAC9B,wCAAwC,CAAC;AAE7C,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"staged-diagnostics.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAIL,KAAK,kBAAkB,EAIxB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,sBAAsB,GAC9B,8BAA8B,GAC9B,wBAAwB,GACxB,8BAA8B,GAC9B,+BAA+B,GAC/B,iCAAiC,GACjC,oCAAoC,GACpC,gCAAgC,GAChC,0BAA0B,GAC1B,2BAA2B,GAC3B,6BAA6B,GAC7B,yBAAyB,GACzB,wCAAwC,CAAC;AAE7C,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,uDAAuD;IACvD,EAAE,EAAE,sBAAsB,CAAC;IAC3B,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACxC,iEAAiE;IACjE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,gDAAgD;IAChD,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;CACpB;AA4DD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,kBAAkB,GAC3B,oBAAoB,EAAE,CAoCxB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KIBI_STAGED_IMPACT_EVIDENCE_DOC, KIBI_SYMBOLS_MANIFEST_PATH, KIBI_SYMBOL_COORDINATES_PATH, getBehaviorSourcePaths, getMissingBehaviorSourcePaths, hasOverrideRationale, } from "./evidence-model.js";
|
|
2
2
|
function formatFileList(paths) {
|
|
3
3
|
return paths.join(", ");
|
|
4
4
|
}
|
|
@@ -6,18 +6,22 @@ function createMissingEvidenceDiagnostic(paths) {
|
|
|
6
6
|
return {
|
|
7
7
|
id: "kibi_impact_evidence_missing",
|
|
8
8
|
severity: "error",
|
|
9
|
+
blocking: true,
|
|
10
|
+
category: "fact",
|
|
9
11
|
files: [...paths],
|
|
10
|
-
docs: [
|
|
11
|
-
message: `Behavior-changing staged files are missing Kibi impact evidence (see ${
|
|
12
|
-
suggestion: `Query Kibi via MCP before deciding
|
|
12
|
+
docs: [KIBI_STAGED_IMPACT_EVIDENCE_DOC],
|
|
13
|
+
message: `Behavior-changing staged files are missing staged Kibi impact evidence (see ${KIBI_STAGED_IMPACT_EVIDENCE_DOC}): ${formatFileList(paths)}`,
|
|
14
|
+
suggestion: `Query Kibi via MCP before deciding. MCP writes update KB state but do not stage tracked evidence; also stage requirement/scenario/test/fact/symbol markdown, authored ${KIBI_SYMBOLS_MANIFEST_PATH} metadata, or refreshed ${KIBI_SYMBOL_COORDINATES_PATH}. Re-run kibi check --staged after staging tracked evidence.`,
|
|
13
15
|
};
|
|
14
16
|
}
|
|
15
17
|
function createSymbolsManifestStaleDiagnostic(paths) {
|
|
16
18
|
return {
|
|
17
19
|
id: "symbols_manifest_stale",
|
|
18
20
|
severity: "error",
|
|
21
|
+
blocking: true,
|
|
22
|
+
category: "symbol",
|
|
19
23
|
files: [KIBI_SYMBOL_COORDINATES_PATH, ...paths],
|
|
20
|
-
docs: [
|
|
24
|
+
docs: [KIBI_STAGED_IMPACT_EVIDENCE_DOC],
|
|
21
25
|
message: `${KIBI_SYMBOL_COORDINATES_PATH} is stale or missing for staged source files: ${formatFileList(paths)}`,
|
|
22
26
|
suggestion: `Run kibi sync --refresh-symbol-coordinates && git add ${KIBI_SYMBOL_COORDINATES_PATH} ${KIBI_SYMBOLS_MANIFEST_PATH}, then re-run kibi check --staged.`,
|
|
23
27
|
};
|
|
@@ -30,8 +34,10 @@ function createMissingOverrideRationaleDiagnostic(evidence) {
|
|
|
30
34
|
return {
|
|
31
35
|
id: "kibi_impact_override_missing_rationale",
|
|
32
36
|
severity: "error",
|
|
37
|
+
blocking: true,
|
|
38
|
+
category: "fact",
|
|
33
39
|
files: [evidence.mode.override.path, ...paths],
|
|
34
|
-
docs: [
|
|
40
|
+
docs: [KIBI_STAGED_IMPACT_EVIDENCE_DOC],
|
|
35
41
|
message: `Kibi-Impact: none override is missing rationale for staged source files: ${formatFileList(paths)}`,
|
|
36
42
|
suggestion: "Add a non-empty rationale in the same staged override record, keep overrides limited to false positives or non-behavioral source edits, and re-run kibi check --staged.",
|
|
37
43
|
};
|
|
@@ -49,7 +49,7 @@ export const KIBI_IMPACT_DIAGNOSTICS = {
|
|
|
49
49
|
title: "Behavior edit requires staged Kibi impact evidence",
|
|
50
50
|
resolution: [
|
|
51
51
|
"Query Kibi via MCP first: use kb_search for discovery, then kb_query for exact follow-up.",
|
|
52
|
-
"
|
|
52
|
+
"MCP writes update KB state but do not stage tracked evidence; also stage related KB entity markdown, authored documentation/symbols.yaml metadata, or refreshed documentation/symbol-coordinates.yaml.",
|
|
53
53
|
"Re-run or let the hook run kibi check --staged.",
|
|
54
54
|
],
|
|
55
55
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staged-symbols-manifest.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-symbols-manifest.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"staged-symbols-manifest.d.ts","sourceRoot":"","sources":["../../src/traceability/staged-symbols-manifest.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA+BlD,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC;IACtD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IAC5D,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AA2TD,wBAAgB,2BAA2B,CAAC,OAAO,EAAE;IACnD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B,GAAG,+BAA+B,CAmFlC;AAED,wBAAgB,4CAA4C,CAAC,OAAO,EAAE;IACpE,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B,GAAG,qCAAqC,CAmExC"}
|