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
|
@@ -18,6 +18,15 @@
|
|
|
18
18
|
// Typed fact field enums per proposal
|
|
19
19
|
import { SYMBOL_ROLES } from "../symbol-granularity.js";
|
|
20
20
|
const factConditionals = JSON.parse(`[
|
|
21
|
+
{
|
|
22
|
+
"if": {
|
|
23
|
+
"anyOf": [
|
|
24
|
+
{ "required": ["claim_key"] },
|
|
25
|
+
{ "required": ["claim_text"] }
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"then": { "required": ["claim_key", "claim_text"] }
|
|
29
|
+
},
|
|
21
30
|
{
|
|
22
31
|
"if": {
|
|
23
32
|
"properties": {
|
|
@@ -105,6 +114,12 @@ const entitySchema = {
|
|
|
105
114
|
severity: { type: "string" },
|
|
106
115
|
links: { type: "array", items: { type: "string" } },
|
|
107
116
|
text_ref: { type: "string" },
|
|
117
|
+
logic_claims: {
|
|
118
|
+
type: "array",
|
|
119
|
+
minItems: 1,
|
|
120
|
+
uniqueItems: true,
|
|
121
|
+
items: { type: "string", pattern: "^CLAIM-[A-F0-9]{16}$" },
|
|
122
|
+
},
|
|
108
123
|
sourceFile: { type: "string" },
|
|
109
124
|
granularity_reason: {
|
|
110
125
|
type: "string",
|
|
@@ -119,6 +134,14 @@ const entitySchema = {
|
|
|
119
134
|
type: "string",
|
|
120
135
|
enum: [...SYMBOL_ROLES],
|
|
121
136
|
},
|
|
137
|
+
verification_scope: {
|
|
138
|
+
type: "string",
|
|
139
|
+
enum: ["unit", "integration", "end_to_end"],
|
|
140
|
+
},
|
|
141
|
+
verification_perspective: {
|
|
142
|
+
type: "string",
|
|
143
|
+
enum: ["internal", "consumer"],
|
|
144
|
+
},
|
|
122
145
|
type: {
|
|
123
146
|
type: "string",
|
|
124
147
|
enum: [
|
|
@@ -162,6 +185,8 @@ const entitySchema = {
|
|
|
162
185
|
valid_from: { type: "string" },
|
|
163
186
|
valid_to: { type: "string" },
|
|
164
187
|
canonical_key: { type: "string" },
|
|
188
|
+
claim_key: { type: "string", pattern: "^CLAIM-[A-F0-9]{16}$" },
|
|
189
|
+
claim_text: { type: "string" },
|
|
165
190
|
predicate_name: { type: "string" },
|
|
166
191
|
predicate_namespace: { type: "string" },
|
|
167
192
|
predicate_arity: { type: "integer", minimum: 1 },
|
|
@@ -182,6 +207,14 @@ const entitySchema = {
|
|
|
182
207
|
"type",
|
|
183
208
|
],
|
|
184
209
|
allOf: [
|
|
210
|
+
{
|
|
211
|
+
if: {
|
|
212
|
+
properties: { type: { const: "req" } },
|
|
213
|
+
},
|
|
214
|
+
else: {
|
|
215
|
+
not: { required: ["logic_claims"] },
|
|
216
|
+
},
|
|
217
|
+
},
|
|
185
218
|
// Forbid fact-only fields on non-fact entities
|
|
186
219
|
{
|
|
187
220
|
if: {
|
|
@@ -208,6 +241,8 @@ const entitySchema = {
|
|
|
208
241
|
{ required: ["valid_from"] },
|
|
209
242
|
{ required: ["valid_to"] },
|
|
210
243
|
{ required: ["canonical_key"] },
|
|
244
|
+
{ required: ["claim_key"] },
|
|
245
|
+
{ required: ["claim_text"] },
|
|
211
246
|
{ required: ["predicate_name"] },
|
|
212
247
|
{ required: ["predicate_namespace"] },
|
|
213
248
|
{ required: ["predicate_arity"] },
|
|
@@ -221,6 +256,19 @@ const entitySchema = {
|
|
|
221
256
|
},
|
|
222
257
|
},
|
|
223
258
|
},
|
|
259
|
+
{
|
|
260
|
+
if: {
|
|
261
|
+
properties: { type: { const: "test" } },
|
|
262
|
+
},
|
|
263
|
+
else: {
|
|
264
|
+
not: {
|
|
265
|
+
anyOf: [
|
|
266
|
+
{ required: ["verification_scope"] },
|
|
267
|
+
{ required: ["verification_perspective"] },
|
|
268
|
+
],
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
224
272
|
...factConditionals,
|
|
225
273
|
],
|
|
226
274
|
additionalProperties: false,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class SkillNotFoundError extends Error {
|
|
2
|
+
constructor(id: string);
|
|
3
|
+
}
|
|
4
|
+
export declare class SkillResourceNotFoundError extends Error {
|
|
5
|
+
constructor(id: string, resourcePath: string);
|
|
6
|
+
}
|
|
7
|
+
export declare class SkillResourceOutOfBoundsError extends Error {
|
|
8
|
+
constructor(id: string, resourcePath: string);
|
|
9
|
+
}
|
|
10
|
+
export declare class SkillValidationError extends Error {
|
|
11
|
+
readonly field: string;
|
|
12
|
+
constructor(field: string, message: string);
|
|
13
|
+
}
|
|
14
|
+
export declare class SkillOversizeError extends Error {
|
|
15
|
+
readonly maxBytes: number;
|
|
16
|
+
readonly actualBytes: number;
|
|
17
|
+
constructor(pathLike: string, maxBytes: number, actualBytes: number);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/public/skill-system/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,EAAE,EAAE,MAAM;CAIvB;AACD,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;CAI7C;AACD,qBAAa,6BAA8B,SAAQ,KAAK;gBAC1C,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;CAI7C;AACD,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBACX,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAK3C;AACD,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;gBACjB,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;CAQpE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export class SkillNotFoundError extends Error {
|
|
2
|
+
constructor(id) {
|
|
3
|
+
super(`Skill not found: ${id}`);
|
|
4
|
+
this.name = "SkillNotFoundError";
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export class SkillResourceNotFoundError extends Error {
|
|
8
|
+
constructor(id, resourcePath) {
|
|
9
|
+
super(`Skill resource not found: ${id}/${resourcePath}`);
|
|
10
|
+
this.name = "SkillResourceNotFoundError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class SkillResourceOutOfBoundsError extends Error {
|
|
14
|
+
constructor(id, resourcePath) {
|
|
15
|
+
super(`Skill resource escapes bundle root: ${id}/${resourcePath}`);
|
|
16
|
+
this.name = "SkillResourceOutOfBoundsError";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class SkillValidationError extends Error {
|
|
20
|
+
field;
|
|
21
|
+
constructor(field, message) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.name = "SkillValidationError";
|
|
24
|
+
this.field = field;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export class SkillOversizeError extends Error {
|
|
28
|
+
maxBytes;
|
|
29
|
+
actualBytes;
|
|
30
|
+
constructor(pathLike, maxBytes, actualBytes) {
|
|
31
|
+
super(`Skill file exceeds ${maxBytes} bytes: ${pathLike} (${actualBytes} bytes)`);
|
|
32
|
+
this.name = "SkillOversizeError";
|
|
33
|
+
this.maxBytes = maxBytes;
|
|
34
|
+
this.actualBytes = actualBytes;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SkillBundle, SkillManifest } from "./types.js";
|
|
2
|
+
export declare function setBundledSkillsDir(dir: string): void;
|
|
3
|
+
export declare function resetBundledSkillsDir(): void;
|
|
4
|
+
export declare function listBundledSkills(): SkillManifest[];
|
|
5
|
+
export declare function loadBundledSkill(id: string): SkillBundle;
|
|
6
|
+
export declare function loadBundledSkillFrom(skillsDir: string, id: string): SkillBundle;
|
|
7
|
+
export declare function readBundledSkillResource(id: string, resourcePath: string): string;
|
|
8
|
+
export declare function readBundledSkillResourceFrom(skillsDir: string, id: string, resourcePath: string): string;
|
|
9
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/public/skill-system/loader.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAW7D,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAErD;AACD,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AACD,wBAAgB,iBAAiB,IAAI,aAAa,EAAE,CAEnD;AACD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,CAExD;AAGD,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,GACT,WAAW,CAIb;AACD,wBAAgB,wBAAwB,CACtC,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,GACnB,MAAM,CAER;AAGD,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,GACnB,MAAM,CAER"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
|
|
2
|
+
import { dirname, join, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { SkillNotFoundError, SkillResourceNotFoundError, SkillResourceOutOfBoundsError, } from "./errors.js";
|
|
5
|
+
import { SKILL_FILE_NAME, isPathOutOfBounds, isWithinRoot, normalizeResourcePath, } from "./paths.js";
|
|
6
|
+
import { RESOURCE_MAX_BYTES, assertMaxBytes, parseSkillBundle, } from "./validation.js";
|
|
7
|
+
const defaultBundledSkillsDir = resolve(dirname(fileURLToPath(import.meta.url)), "../skills");
|
|
8
|
+
let bundledSkillsDir = defaultBundledSkillsDir;
|
|
9
|
+
export function setBundledSkillsDir(dir) {
|
|
10
|
+
bundledSkillsDir = dir;
|
|
11
|
+
}
|
|
12
|
+
export function resetBundledSkillsDir() {
|
|
13
|
+
bundledSkillsDir = defaultBundledSkillsDir;
|
|
14
|
+
}
|
|
15
|
+
export function listBundledSkills() {
|
|
16
|
+
return listFrom(bundledSkillsDir);
|
|
17
|
+
}
|
|
18
|
+
export function loadBundledSkill(id) {
|
|
19
|
+
return loadBundledSkillFrom(bundledSkillsDir, id);
|
|
20
|
+
}
|
|
21
|
+
// implements REQ-reusable-skill-subsystem
|
|
22
|
+
// covered_by TEST-skill-cli-load-validate
|
|
23
|
+
export function loadBundledSkillFrom(skillsDir, id) {
|
|
24
|
+
const root = findRoot(resolve(skillsDir), id);
|
|
25
|
+
if (!root)
|
|
26
|
+
throw new SkillNotFoundError(id);
|
|
27
|
+
return parseSkillBundle(root);
|
|
28
|
+
}
|
|
29
|
+
export function readBundledSkillResource(id, resourcePath) {
|
|
30
|
+
return readBundle(loadBundledSkill(id), id, resourcePath);
|
|
31
|
+
}
|
|
32
|
+
// implements REQ-reusable-skill-subsystem
|
|
33
|
+
// covered_by TEST-skill-cli-load-validate
|
|
34
|
+
export function readBundledSkillResourceFrom(skillsDir, id, resourcePath) {
|
|
35
|
+
return readBundle(loadBundledSkillFrom(skillsDir, id), id, resourcePath);
|
|
36
|
+
}
|
|
37
|
+
function listFrom(dir) {
|
|
38
|
+
if (!existsSync(dir))
|
|
39
|
+
return [];
|
|
40
|
+
return readdirSync(dir, { withFileTypes: true })
|
|
41
|
+
.filter((entry) => entry.isDirectory())
|
|
42
|
+
.map((entry) => join(dir, entry.name))
|
|
43
|
+
.filter((root) => existsSync(join(root, SKILL_FILE_NAME)))
|
|
44
|
+
.map((root) => parseSkillBundle(root).manifest)
|
|
45
|
+
.sort((a, b) => a.id.localeCompare(b.id));
|
|
46
|
+
}
|
|
47
|
+
function findRoot(dir, id) {
|
|
48
|
+
return listRoots(dir).find((root) => parseSkillBundle(root).manifest.id === id);
|
|
49
|
+
}
|
|
50
|
+
function listRoots(dir) {
|
|
51
|
+
if (!existsSync(dir))
|
|
52
|
+
return [];
|
|
53
|
+
return readdirSync(dir, { withFileTypes: true })
|
|
54
|
+
.filter((entry) => entry.isDirectory())
|
|
55
|
+
.map((entry) => join(dir, entry.name))
|
|
56
|
+
.filter((root) => existsSync(join(root, SKILL_FILE_NAME)));
|
|
57
|
+
}
|
|
58
|
+
function readBundle(bundle, id, resourcePath) {
|
|
59
|
+
const resource = normalizeResourcePath(resourcePath);
|
|
60
|
+
if (!resource || isPathOutOfBounds(resourcePath))
|
|
61
|
+
throw new SkillResourceOutOfBoundsError(id, resourcePath);
|
|
62
|
+
if (!(bundle.manifest.resources ?? []).some((declared) => normalizeResourcePath(declared) === resource))
|
|
63
|
+
throw new SkillResourceNotFoundError(id, resourcePath);
|
|
64
|
+
const candidate = resolve(bundle.rootDir, resource);
|
|
65
|
+
try {
|
|
66
|
+
if (!isWithinRoot(realpathSync(bundle.rootDir), realpathSync(candidate)))
|
|
67
|
+
throw new SkillResourceOutOfBoundsError(id, resourcePath);
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
if (error instanceof SkillResourceOutOfBoundsError)
|
|
71
|
+
throw error;
|
|
72
|
+
throw new SkillResourceNotFoundError(id, resourcePath);
|
|
73
|
+
}
|
|
74
|
+
assertMaxBytes(candidate, RESOURCE_MAX_BYTES);
|
|
75
|
+
return readFileSync(candidate, "utf8");
|
|
76
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const SKILL_FILE_NAME = "SKILL.md";
|
|
2
|
+
export declare function normalizeResourcePath(pathLike: string): string;
|
|
3
|
+
export declare function isPathOutOfBounds(pathLike: string): boolean;
|
|
4
|
+
export declare function isWithinRoot(rootDir: string, candidatePath: string): boolean;
|
|
5
|
+
export declare function resolveSkillFilePath(pathLike: string): string;
|
|
6
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/public/skill-system/paths.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,aAAa,CAAC;AAC1C,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE9D;AACD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQ3D;AACD,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAG5E;AACD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAO7D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { existsSync, statSync } from "node:fs";
|
|
2
|
+
import { isAbsolute, join, normalize, relative, resolve } from "node:path";
|
|
3
|
+
export const SKILL_FILE_NAME = "SKILL.md";
|
|
4
|
+
export function normalizeResourcePath(pathLike) {
|
|
5
|
+
return normalize(pathLike).replaceAll("\\", "/");
|
|
6
|
+
}
|
|
7
|
+
export function isPathOutOfBounds(pathLike) {
|
|
8
|
+
const normalized = normalizeResourcePath(pathLike);
|
|
9
|
+
return (isAbsolute(pathLike) ||
|
|
10
|
+
normalized === ".." ||
|
|
11
|
+
normalized.startsWith("../") ||
|
|
12
|
+
normalized.includes("/../"));
|
|
13
|
+
}
|
|
14
|
+
export function isWithinRoot(rootDir, candidatePath) {
|
|
15
|
+
const rel = relative(rootDir, candidatePath);
|
|
16
|
+
return rel === "" || (!rel.startsWith("..") && !isAbsolute(rel));
|
|
17
|
+
}
|
|
18
|
+
export function resolveSkillFilePath(pathLike) {
|
|
19
|
+
const resolved = resolve(pathLike);
|
|
20
|
+
if (existsSync(resolved) && statSync(resolved).isDirectory())
|
|
21
|
+
return join(resolved, SKILL_FILE_NAME);
|
|
22
|
+
return resolved.endsWith(SKILL_FILE_NAME)
|
|
23
|
+
? resolved
|
|
24
|
+
: join(resolved, SKILL_FILE_NAME);
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface SkillManifest {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
version: string;
|
|
6
|
+
kibiCompatibility: string;
|
|
7
|
+
tags?: string[];
|
|
8
|
+
resources?: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface SkillBundle {
|
|
11
|
+
manifest: SkillManifest;
|
|
12
|
+
body: string;
|
|
13
|
+
rootDir: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/public/skill-system/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AACD,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SkillValidationError } from "./errors.js";
|
|
2
|
+
import type { SkillBundle } from "./types.js";
|
|
3
|
+
export declare const RESOURCE_MAX_BYTES: number;
|
|
4
|
+
export declare function assertMaxBytes(pathLike: string, maxBytes: number): void;
|
|
5
|
+
export declare function parseSkillBundle(rootDir: string): SkillBundle;
|
|
6
|
+
export declare function validateSkillBundle(pathLike: string): {
|
|
7
|
+
valid: boolean;
|
|
8
|
+
errors: SkillValidationError[];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/public/skill-system/validation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAQvE,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,kBAAkB,QAAa,CAAC;AAC7C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAGvE;AACD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAW7D;AACD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG;IACrD,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC,CAeA"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
import matter from "gray-matter";
|
|
4
|
+
import { SkillOversizeError, SkillValidationError } from "./errors.js";
|
|
5
|
+
import { SKILL_FILE_NAME, isPathOutOfBounds, isWithinRoot, normalizeResourcePath, resolveSkillFilePath, } from "./paths.js";
|
|
6
|
+
const SKILL_MARKDOWN_MAX_BYTES = 256 * 1024;
|
|
7
|
+
export const RESOURCE_MAX_BYTES = 128 * 1024;
|
|
8
|
+
export function assertMaxBytes(pathLike, maxBytes) {
|
|
9
|
+
const size = statSync(pathLike).size;
|
|
10
|
+
if (size > maxBytes)
|
|
11
|
+
throw new SkillOversizeError(pathLike, maxBytes, size);
|
|
12
|
+
}
|
|
13
|
+
export function parseSkillBundle(rootDir) {
|
|
14
|
+
const path = resolve(rootDir, SKILL_FILE_NAME);
|
|
15
|
+
assertMaxBytes(path, SKILL_MARKDOWN_MAX_BYTES);
|
|
16
|
+
const parsed = matter(readFileSync(path, "utf8"));
|
|
17
|
+
const [error] = validateManifestData(parsed.data);
|
|
18
|
+
if (error)
|
|
19
|
+
throw error;
|
|
20
|
+
return {
|
|
21
|
+
manifest: coerceManifest(parsed.data),
|
|
22
|
+
body: parsed.content,
|
|
23
|
+
rootDir: resolve(rootDir),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function validateSkillBundle(pathLike) {
|
|
27
|
+
const path = resolveSkillFilePath(pathLike);
|
|
28
|
+
const errors = [];
|
|
29
|
+
if (!existsSync(path))
|
|
30
|
+
return {
|
|
31
|
+
valid: false,
|
|
32
|
+
errors: [
|
|
33
|
+
new SkillValidationError("SKILL.md", `Missing ${SKILL_FILE_NAME}`),
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
const parsed = matter(readFileSync(path, "utf8"));
|
|
37
|
+
errors.push(...validateManifestData(parsed.data));
|
|
38
|
+
if (errors.length === 0)
|
|
39
|
+
validateBundleContents(path, coerceManifest(parsed.data), errors);
|
|
40
|
+
return { valid: errors.length === 0, errors };
|
|
41
|
+
}
|
|
42
|
+
function validateBundleContents(path, manifest, errors) {
|
|
43
|
+
try {
|
|
44
|
+
assertMaxBytes(path, SKILL_MARKDOWN_MAX_BYTES);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
errors.push(new SkillValidationError("SKILL.md", error instanceof Error ? error.message : String(error)));
|
|
48
|
+
}
|
|
49
|
+
let root;
|
|
50
|
+
try {
|
|
51
|
+
root = realpathSync(dirname(path));
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
errors.push(new SkillValidationError("SKILL.md", error instanceof Error ? error.message : String(error)));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
for (const resource of manifest.resources ?? []) {
|
|
58
|
+
const resourcePath = resolve(dirname(path), resource);
|
|
59
|
+
try {
|
|
60
|
+
if (!existsSync(resourcePath)) {
|
|
61
|
+
errors.push(new SkillValidationError("resources", `Missing skill resource: ${resource}`));
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
const real = realpathSync(resourcePath);
|
|
65
|
+
if (!isWithinRoot(root, real)) {
|
|
66
|
+
errors.push(new SkillValidationError("resources", `Skill resource escapes bundle root: ${resource}`));
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
assertMaxBytes(resourcePath, RESOURCE_MAX_BYTES);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
errors.push(new SkillValidationError("resources", error instanceof Error ? error.message : String(error)));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function validateManifestData(data) {
|
|
77
|
+
const errors = [];
|
|
78
|
+
for (const field of [
|
|
79
|
+
"id",
|
|
80
|
+
"name",
|
|
81
|
+
"description",
|
|
82
|
+
"version",
|
|
83
|
+
"kibiCompatibility",
|
|
84
|
+
])
|
|
85
|
+
if (typeof data[field] !== "string" || data[field].trim() === "")
|
|
86
|
+
errors.push(new SkillValidationError(field, `Missing required skill field: ${field}`));
|
|
87
|
+
if (typeof data.version === "string" &&
|
|
88
|
+
!/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(data.version))
|
|
89
|
+
errors.push(new SkillValidationError("version", `Invalid skill version: ${data.version}`));
|
|
90
|
+
for (const [field, value] of [
|
|
91
|
+
["tags", data.tags],
|
|
92
|
+
["resources", data.resources],
|
|
93
|
+
]) {
|
|
94
|
+
if (value !== undefined && !isStringArray(value))
|
|
95
|
+
errors.push(new SkillValidationError(field, `Skill ${field} must be strings`));
|
|
96
|
+
}
|
|
97
|
+
if (isStringArray(data.resources))
|
|
98
|
+
for (const resource of data.resources)
|
|
99
|
+
if (!normalizeResourcePath(resource) || isPathOutOfBounds(resource))
|
|
100
|
+
errors.push(new SkillValidationError("resources", `Invalid skill resource: ${resource}`));
|
|
101
|
+
return errors;
|
|
102
|
+
}
|
|
103
|
+
function coerceManifest(data) {
|
|
104
|
+
const manifest = {
|
|
105
|
+
id: String(data.id),
|
|
106
|
+
name: String(data.name),
|
|
107
|
+
description: String(data.description),
|
|
108
|
+
version: String(data.version),
|
|
109
|
+
kibiCompatibility: String(data.kibiCompatibility),
|
|
110
|
+
};
|
|
111
|
+
if (isStringArray(data.tags))
|
|
112
|
+
manifest.tags = data.tags;
|
|
113
|
+
if (isStringArray(data.resources))
|
|
114
|
+
manifest.resources = data.resources.map(normalizeResourcePath);
|
|
115
|
+
return manifest;
|
|
116
|
+
}
|
|
117
|
+
function isStringArray(value) {
|
|
118
|
+
return (Array.isArray(value) && value.every((item) => typeof item === "string"));
|
|
119
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: init-kibi
|
|
3
|
+
name: init-kibi
|
|
4
|
+
description: Bootstrap and model knowledge safely using approved Kibi MCP initialization and mutation workflow.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
kibiCompatibility: "*"
|
|
7
|
+
tags:
|
|
8
|
+
- kibi
|
|
9
|
+
- mcp
|
|
10
|
+
- bootstrap
|
|
11
|
+
- agent-guidance
|
|
12
|
+
---
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Set up or refresh Kibi knowledge for the current branch through approved Kibi interfaces only. Maintain source-file traceability for every repository-backed claim, and require explicit operator approval before any mutation.
|
|
16
|
+
|
|
17
|
+
## Interface Selection
|
|
18
|
+
|
|
19
|
+
1. If approved Kibi MCP tools are visible, use the MCP route.
|
|
20
|
+
2. Otherwise, in a trusted workspace, use the canonical project-local CLI fallback: `npx --no-install kibi ...` or `bunx --no-install kibi ...`.
|
|
21
|
+
3. If neither approved MCP tools nor the project-local CLI are available, stop and tell the operator to enable or install Kibi for this workspace.
|
|
22
|
+
4. Never use a global fallback, an installing runner, or any route outside the approved Kibi interface.
|
|
23
|
+
|
|
24
|
+
Use `kibi-usage/resources/operation-access.md` for the exact operation-to-route mapping. The CLI preview route accepts the same JSON object as `kb_autopilot_generate`:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
echo '{"maxCandidates":25,"minConfidence":0.8}' | npx --no-install kibi autopilot-generate --input -
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Capability Workflow
|
|
31
|
+
|
|
32
|
+
- Generate a read-only bootstrap preview with `kb_autopilot_generate`, or the dedicated CLI route `autopilot-generate --input`.
|
|
33
|
+
- Show the generated preview and obtain explicit approval before writes.
|
|
34
|
+
- Apply reviewed entity creation or updates with `kb_upsert`, or `upsert --input`.
|
|
35
|
+
- If cleanup is needed, use `kb_delete`, or `delete --input`, only after checking dependencies and obtaining approval for the specific removal.
|
|
36
|
+
- Finish with `kb_check`, or `check --input`, to validate the branch snapshot.
|
|
37
|
+
|
|
38
|
+
## Guidance
|
|
39
|
+
|
|
40
|
+
- Keep mutation requests explicit, small, and sequential.
|
|
41
|
+
- Prefer source-linked entities so future `kb_query` lookups can verify repository context against source files.
|
|
42
|
+
- Preserve traceability by linking facts, claims, scenarios, and tests to concrete project files whenever repository evidence supports it.
|
|
43
|
+
- Do not read or edit files inside `.kb` directly; all changes go through the selected Kibi interface.
|
|
44
|
+
- Ask at most four bounded context questions, and only when repository evidence is insufficient.
|
|
45
|
+
- Stop at the documented operator repair boundary if the setup appears partial, inconsistent, or unsupported by the approved interface.
|
|
46
|
+
|
|
47
|
+
## Public Training Trajectories
|
|
48
|
+
|
|
49
|
+
- `init-kibi-bootstrap-analysis-train-1`: Analyze the cold-start repository and produce a read-only bootstrap preview using only the public Kibi MCP surface.
|
|
50
|
+
- `init-kibi-bootstrap-analysis-train-2`: Analyze the cold-start repository and produce a read-only bootstrap preview using only the public Kibi MCP surface.
|
|
51
|
+
- `init-kibi-bounded-context-questions-train-1`: Ask only the bounded context questions needed before bootstrap synthesis using only the public Kibi MCP surface.
|
|
52
|
+
- `init-kibi-bounded-context-questions-train-2`: Ask only the bounded context questions needed before bootstrap synthesis using only the public Kibi MCP surface.
|
|
53
|
+
- `init-kibi-approval-sequential-writes-train-1`: Apply the approved bootstrap plan sequentially and finish with validation using only the public Kibi MCP surface.
|
|
54
|
+
- `init-kibi-approval-sequential-writes-train-2`: Apply the approved bootstrap plan sequentially and finish with validation using only the public Kibi MCP surface.
|
|
55
|
+
- `init-kibi-repair-escalation-train-1`: Identify the partial setup and stop at the documented operator repair boundary using only the public Kibi MCP surface.
|
|
56
|
+
- `init-kibi-repair-escalation-train-2`: Identify the partial setup and stop at the documented operator repair boundary using only the public Kibi MCP surface.
|
|
57
|
+
|
|
58
|
+
## Training Data
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
[{"taskId":"init-kibi-bootstrap-analysis-train-1","family":"bootstrap-analysis","reflection":"Analyze the cold-start repository and produce a read-only bootstrap preview. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"init-kibi-bootstrap-analysis-train-2","family":"bootstrap-analysis","reflection":"Analyze the cold-start repository and produce a read-only bootstrap preview. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"init-kibi-bounded-context-questions-train-1","family":"bounded-context-questions","reflection":"Ask only the bounded context questions needed before bootstrap synthesis. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"init-kibi-bounded-context-questions-train-2","family":"bounded-context-questions","reflection":"Ask only the bounded context questions needed before bootstrap synthesis. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"init-kibi-approval-sequential-writes-train-1","family":"approval-sequential-writes","reflection":"Apply the approved bootstrap plan sequentially and finish with validation. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"init-kibi-approval-sequential-writes-train-2","family":"approval-sequential-writes","reflection":"Apply the approved bootstrap plan sequentially and finish with validation. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"init-kibi-repair-escalation-train-1","family":"repair-escalation","reflection":"Identify the partial setup and stop at the documented operator repair boundary. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"init-kibi-repair-escalation-train-2","family":"repair-escalation","reflection":"Identify the partial setup and stop at the documented operator repair boundary. This is train case 2; use only the public Kibi MCP surface."}]
|
|
62
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: kibi-freshness
|
|
3
|
+
name: kibi-freshness
|
|
4
|
+
description: Check branch freshness and source linkage quality before decisions or risky writes.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
kibiCompatibility: "*"
|
|
7
|
+
tags:
|
|
8
|
+
- kibi
|
|
9
|
+
- mcp
|
|
10
|
+
- freshness
|
|
11
|
+
- agent-guidance
|
|
12
|
+
---
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Help agents decide whether Kibi knowledge is current enough to support safe changes while preserving source-file traceability and approved interface boundaries.
|
|
16
|
+
|
|
17
|
+
## Interface Selection
|
|
18
|
+
|
|
19
|
+
1. If Kibi MCP tools are visible and approved for the workspace, use the MCP surface only.
|
|
20
|
+
2. Otherwise, in a trusted workspace, use the canonical project-local CLI fallback through `npx --no-install kibi ...` or `bunx --no-install kibi ...`.
|
|
21
|
+
3. If the project-local CLI is unavailable or too old, stop and tell the operator to enable or install Kibi.
|
|
22
|
+
4. Never use a global fallback or an installing runner.
|
|
23
|
+
|
|
24
|
+
Use `kibi-usage/resources/operation-access.md` for exact dedicated routes. A project-local CLI freshness check is executable as:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
echo '{}' | npx --no-install kibi status --input -
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Capability Workflow
|
|
31
|
+
|
|
32
|
+
- Use `kb_status`, or `status --input`, first to confirm branch attachment, freshness state, dirty-worktree evidence, and whether the knowledge snapshot is safe to rely on.
|
|
33
|
+
- Use `kb_query`, or `query --input`, with `sourceFile` and text references for source-linked discovery.
|
|
34
|
+
- Re-run `kb_search`, or `search --input`, after sync gaps or stale context are detected.
|
|
35
|
+
- If knowledge must change, use the selected interface's `kb_upsert`/`upsert` or `kb_delete`/`delete` operation sequentially, then finish with `kb_check`/`check`.
|
|
36
|
+
|
|
37
|
+
## Guidance
|
|
38
|
+
|
|
39
|
+
- Prefer the public Kibi MCP surface whenever it is available and approved.
|
|
40
|
+
- Never proceed with broad changes when freshness is stale and unresolved.
|
|
41
|
+
- If entities look stale, refresh context through an approved Kibi capability and then re-query.
|
|
42
|
+
- Preserve source-file traceability by carrying `sourceFile`, text references, and validation evidence through discovery, mutation, and completion.
|
|
43
|
+
- Do not read or edit files inside `.kb` directly; use the selected Kibi interface instead.
|
|
44
|
+
- Completion must state one freshness outcome: KB updated, no KB impact with rationale, or deferred/failed.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: kibi-traceability
|
|
3
|
+
name: kibi-traceability
|
|
4
|
+
description: Maintain requirement, scenario, and test traceability through Kibi MCP tools.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
kibiCompatibility: "*"
|
|
7
|
+
tags:
|
|
8
|
+
- kibi
|
|
9
|
+
- mcp
|
|
10
|
+
- traceability
|
|
11
|
+
- agent-guidance
|
|
12
|
+
---
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Validate and strengthen requirement, scenario, test, behavioral-symbol, and source-file traceability before and after code changes.
|
|
16
|
+
|
|
17
|
+
## Interface Selection
|
|
18
|
+
|
|
19
|
+
1. If Kibi MCP tools are visible and approved, use the MCP surface as the primary authority.
|
|
20
|
+
2. Otherwise, in a trusted workspace, use the canonical project-local CLI fallback through `npx --no-install kibi ...` or `bunx --no-install kibi ...`.
|
|
21
|
+
3. If neither approved MCP tools nor the project-local CLI are available, or if the CLI is unavailable or too old, stop and tell the operator to enable or install Kibi.
|
|
22
|
+
4. Never use a global fallback or an installing runner.
|
|
23
|
+
|
|
24
|
+
Use MCP routes for modeling, querying, checking, validation, and cleanup. Use the project-local CLI only as the fallback interface, passing JSON input through stdin. Example:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
echo '{"sourceFiles":["src/auth/login.ts"],"includeImpactDiagnostics":true,"includeWorkingTreeDiff":true}' | npx --no-install kibi check --input -
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Capability Workflow
|
|
31
|
+
|
|
32
|
+
- Locate requirements through `kb_search` or `search --input`, then inspect exact records through `kb_query` or `query --input`.
|
|
33
|
+
- Before meaningful edits, identify linked requirements, scenarios, tests, facts, source files, and behavioral symbols relevant to the planned change.
|
|
34
|
+
- After meaningful source edits, run `kb_check({sourceFiles:[...], includeImpactDiagnostics:true, includeWorkingTreeDiff:true})` or the equivalent `check --input` JSON recipe before deciding whether traceability is current.
|
|
35
|
+
- Apply traceability updates sequentially through `kb_upsert` or `upsert --input` for requirements, scenarios, tests, facts, behavioral symbols, and source-linked relationships.
|
|
36
|
+
- Validate constraints and consistency through `kb_check` or `check --input` after updates.
|
|
37
|
+
- Use `kb_delete` or `delete --input` only for explicit cleanup of obsolete records or relationships.
|
|
38
|
+
|
|
39
|
+
## Guidance
|
|
40
|
+
|
|
41
|
+
- Prefer source-linked relationships so requirements, scenarios, tests, symbols, and files can be traced cleanly.
|
|
42
|
+
- Preserve source-file traceability whenever adding or changing requirements, scenarios, tests, facts, behavioral symbols, or implementation links.
|
|
43
|
+
- Preserve the canonical chain `REQ-* -> SCEN-* -> TEST-*` when adding or changing requirements.
|
|
44
|
+
- Production symbols should implement requirements; test symbols should remain executable evidence for tests.
|
|
45
|
+
- Resolve impact at behavioral-symbol granularity when Kibi reports symbol-level diagnostics; avoid treating a whole file as impacted when the report identifies narrower linked behavior.
|
|
46
|
+
- Treat `symbol_semantic_review_needed` as a prompt to inspect linked requirements and tests; Kibi reports graph links but does not prove prose semantics.
|
|
47
|
+
- Do not read or edit files inside `.kb` directly; all modeling and cleanup goes through the selected Kibi interface.
|
|
48
|
+
- Keep approval boundaries intact: only use Kibi MCP tools that are visible and approved, and only use the project-local CLI fallback in a trusted workspace.
|
|
49
|
+
|
|
50
|
+
Public training trajectories:
|
|
51
|
+
[{"taskId":"kibi-traceability-requirement-discovery-train-1","family":"requirement-discovery","reflection":"Discover the requirement linked to the supplied source symbol. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-requirement-discovery-train-2","family":"requirement-discovery","reflection":"Discover the requirement linked to the supplied source symbol. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-symbol-impact-granularity-train-1","family":"symbol-impact-granularity","reflection":"Resolve impact at behavioral symbol granularity rather than file granularity. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-symbol-impact-granularity-train-2","family":"symbol-impact-granularity","reflection":"Resolve impact at behavioral symbol granularity rather than file granularity. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-relationship-chain-train-1","family":"relationship-chain","reflection":"Trace the requirement, scenario, and test relationship chain. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-relationship-chain-train-2","family":"relationship-chain","reflection":"Trace the requirement, scenario, and test relationship chain. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-executable-coverage-train-1","family":"executable-coverage","reflection":"Establish executable test identity and behavioral coverage links. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-executable-coverage-train-2","family":"executable-coverage","reflection":"Establish executable test identity and behavioral coverage links. This is train case 2; use only the public Kibi MCP surface."}]
|
|
52
|
+
|
|
53
|
+
Previous development gate:
|
|
54
|
+
{"mean":0,"hardPasses":0,"worstFamilyMean":0}
|