kibi-cli 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli-operation-loader.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +3 -0
- package/dist/cli-operation-metadata.d.ts +4 -0
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +5 -0
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +3 -2
- package/dist/cli-register-reporting.d.ts.map +1 -1
- package/dist/cli-register-reporting.js +4 -0
- package/dist/commands/aggregated-checks.d.ts +7 -0
- package/dist/commands/aggregated-checks.d.ts.map +1 -1
- package/dist/commands/aggregated-checks.js +25 -1
- package/dist/commands/check-diff.d.ts +5 -0
- package/dist/commands/check-diff.d.ts.map +1 -0
- package/dist/commands/check-diff.js +62 -0
- package/dist/commands/check-generated.d.ts.map +1 -1
- package/dist/commands/check-generated.js +41 -18
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +231 -86
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +168 -53
- package/dist/commands/github-init.d.ts +1 -1
- package/dist/commands/github-init.d.ts.map +1 -1
- package/dist/commands/github-init.js +10 -3
- package/dist/commands/init-helpers.d.ts +17 -2
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +123 -23
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +110 -15
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +10 -18
- package/dist/commands/sync/cache.d.ts +20 -1
- package/dist/commands/sync/cache.d.ts.map +1 -1
- package/dist/commands/sync/cache.js +51 -2
- package/dist/commands/sync/discovery.d.ts.map +1 -1
- package/dist/commands/sync/discovery.js +1 -1
- package/dist/commands/sync/manifest.d.ts.map +1 -1
- package/dist/commands/sync/manifest.js +3 -1
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +8 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +11 -3
- package/dist/engine.d.ts +41 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +377 -80
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +66 -28
- package/dist/extractors/markdown.d.ts +2 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +14 -3
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +1 -0
- package/dist/extractors/symbols-coordinator.d.ts +7 -0
- package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
- package/dist/extractors/symbols-coordinator.js +75 -39
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +68 -29
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +4 -3
- package/dist/operations/modeling/model-requirement.d.ts +1 -1
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +176 -10
- package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-applyplan.js +14 -2
- package/dist/operations/modeling/predicate-inference-1.js +1 -1
- package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-loader.js +24 -0
- package/dist/operations/modeling/predicate-types.d.ts +4 -0
- package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
- package/dist/operations/modeling/predicate-vocabulary.d.ts +54 -0
- package/dist/operations/modeling/predicate-vocabulary.d.ts.map +1 -0
- package/dist/operations/modeling/predicate-vocabulary.js +169 -0
- package/dist/operations/modeling/requirement-types.d.ts +5 -0
- package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
- package/dist/operations/modeling/vocabulary-alignment.d.ts +60 -0
- package/dist/operations/modeling/vocabulary-alignment.d.ts.map +1 -0
- package/dist/operations/modeling/vocabulary-alignment.js +178 -0
- package/dist/operations/mutation/contradictions.d.ts +3 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +29 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +33 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +8 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.js +64 -0
- package/dist/operations/mutation/relationships.d.ts +1 -1
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +1 -0
- package/dist/operations/mutation/saga.d.ts +5 -0
- package/dist/operations/mutation/saga.d.ts.map +1 -1
- package/dist/operations/mutation/saga.js +10 -0
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +2 -0
- package/dist/operations/mutation/source-authoring.d.ts +6 -0
- package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
- package/dist/operations/mutation/source-authoring.js +213 -52
- package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
- package/dist/operations/mutation/strict-fact.js +5 -0
- package/dist/operations/mutation/types.d.ts +17 -0
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +6 -0
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +77 -11
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +24 -1
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +16 -3
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +66 -26
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +3 -1
- package/dist/operations/proof/code-scope.d.ts +17 -0
- package/dist/operations/proof/code-scope.d.ts.map +1 -0
- package/dist/operations/proof/code-scope.js +60 -0
- package/dist/operations/proof/ingest-proof.d.ts +4 -2
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +208 -74
- package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -1
- package/dist/operations/proof/migrate-legacy-receipts.js +7 -5
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
- package/dist/operations/proof/prune-receipts.js +7 -5
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +7 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +26 -4
- package/dist/operations/semantic-advisor/clauses.d.ts +1 -0
- package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/clauses.js +7 -1
- package/dist/performance-trace.d.ts +17 -0
- package/dist/performance-trace.d.ts.map +1 -0
- package/dist/performance-trace.js +134 -0
- package/dist/plugins/approved-source-analyzers.d.ts +13 -0
- package/dist/plugins/approved-source-analyzers.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts +71 -0
- package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -0
- package/dist/plugins/approved-source-analyzers.generated.js +77 -0
- package/dist/plugins/approved-source-analyzers.js +3 -0
- package/dist/plugins/compose-semantic-classifier.d.ts +6 -1
- package/dist/plugins/compose-semantic-classifier.d.ts.map +1 -1
- package/dist/plugins/compose-semantic-classifier.js +8 -3
- package/dist/plugins/compose-vocabulary-alignment.d.ts +23 -0
- package/dist/plugins/compose-vocabulary-alignment.d.ts.map +1 -0
- package/dist/plugins/compose-vocabulary-alignment.js +141 -0
- package/dist/plugins/external-allowlist.d.ts +7 -0
- package/dist/plugins/external-allowlist.d.ts.map +1 -1
- package/dist/plugins/external-allowlist.js +13 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/maintenance-source-analysis.d.ts +14 -0
- package/dist/plugins/maintenance-source-analysis.d.ts.map +1 -0
- package/dist/plugins/maintenance-source-analysis.js +191 -0
- package/dist/plugins/registry.d.ts +3 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +27 -1
- package/dist/plugins/source-analysis-service.d.ts +36 -1
- package/dist/plugins/source-analysis-service.d.ts.map +1 -1
- package/dist/plugins/source-analysis-service.js +184 -27
- package/dist/plugins/source-change-analysis.d.ts +15 -0
- package/dist/plugins/source-change-analysis.d.ts.map +1 -0
- package/dist/plugins/source-change-analysis.js +54 -0
- package/dist/plugins/source-classification.d.ts +41 -0
- package/dist/plugins/source-classification.d.ts.map +1 -0
- package/dist/plugins/source-classification.js +490 -0
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -0
- package/dist/prolog/swipl-resolver.d.ts +88 -0
- package/dist/prolog/swipl-resolver.d.ts.map +1 -0
- package/dist/prolog/swipl-resolver.js +446 -0
- package/dist/prolog.d.ts +51 -1
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +145 -15
- package/dist/public/diagnostic-usage.d.ts.map +1 -1
- package/dist/public/diagnostic-usage.js +7 -25
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +56 -5
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +3 -1
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +4 -12
- package/dist/public/impact/manifest.d.ts.map +1 -1
- package/dist/public/impact/manifest.js +15 -1
- package/dist/public/impact/source-changes.d.ts.map +1 -1
- package/dist/public/impact/source-changes.js +35 -27
- package/dist/public/impact/types.d.ts +2 -0
- package/dist/public/impact/types.d.ts.map +1 -1
- package/dist/public/operations/catalog.d.ts +80 -7
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +2 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +10 -2
- package/dist/public/operations/check-helpers.d.ts +6 -0
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +21 -1
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +325 -8
- package/dist/public/operations/discovery-entities.d.ts +42 -2
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +195 -22
- package/dist/public/operations/discovery-executors.d.ts +1 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +75 -46
- package/dist/public/operations/impact-review-preparation.d.ts +14 -0
- package/dist/public/operations/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/impact-review-preparation.js +379 -0
- package/dist/public/operations/index.d.ts +2 -0
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +2 -0
- package/dist/public/operations/migration-plan.d.ts +2 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +50 -0
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +1 -35
- package/dist/public/operations/predicate-schema-conformance.d.ts +41 -0
- package/dist/public/operations/predicate-schema-conformance.d.ts.map +1 -0
- package/dist/public/operations/predicate-schema-conformance.js +242 -0
- package/dist/public/operations/prolog-json.d.ts.map +1 -1
- package/dist/public/operations/prolog-json.js +9 -3
- package/dist/public/operations/proof-receipt-projection.d.ts +5 -0
- package/dist/public/operations/proof-receipt-projection.d.ts.map +1 -0
- package/dist/public/operations/proof-receipt-projection.js +36 -0
- package/dist/public/operations/result-envelope.d.ts +34 -1
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +78 -2
- package/dist/public/operations/runtime-types.d.ts +1 -1
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
- package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
- package/dist/public/operations/specs/check-rules.generated.js +8 -1
- package/dist/public/operations/specs/check.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +7 -1
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +7 -1
- package/dist/public/operations/specs/impact-review-preparation.d.ts +47 -0
- package/dist/public/operations/specs/impact-review-preparation.d.ts.map +1 -0
- package/dist/public/operations/specs/impact-review-preparation.js +43 -0
- package/dist/public/operations/specs/mutation-schemas.d.ts +27 -4
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +21 -3
- package/dist/public/operations/specs/reporting.d.ts +8 -0
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +46 -15
- package/dist/public/operations/specs/upsert.d.ts +28 -5
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +1 -1
- package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
- package/dist/public/operations/symbol-repair-plan.js +8 -3
- package/dist/public/operations/types.d.ts +1 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +22 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +1 -0
- package/dist/public/skills/kibi-usage/SKILL.md +7 -3
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/dist/public/skills/kibi-usage/resources/operation-access.md +1 -0
- package/dist/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/dist/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/dist/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +21 -5
- package/dist/relationships/shards.d.ts +6 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +26 -19
- package/dist/schemas/entity.schema.json +32 -0
- package/dist/traceability/analysis-gate.d.ts +39 -0
- package/dist/traceability/analysis-gate.d.ts.map +1 -0
- package/dist/traceability/analysis-gate.js +51 -0
- package/dist/traceability/git-change-snapshot.d.ts +27 -0
- package/dist/traceability/git-change-snapshot.d.ts.map +1 -0
- package/dist/traceability/git-change-snapshot.js +411 -0
- package/dist/traceability/git-staged.d.ts +5 -1
- package/dist/traceability/git-staged.d.ts.map +1 -1
- package/dist/traceability/git-staged.js +16 -11
- package/dist/traceability/impact-evaluator.d.ts +54 -0
- package/dist/traceability/impact-evaluator.d.ts.map +1 -0
- package/dist/traceability/impact-evaluator.js +270 -0
- package/dist/traceability/impact-git-tree.d.ts +12 -0
- package/dist/traceability/impact-git-tree.d.ts.map +1 -0
- package/dist/traceability/impact-git-tree.js +46 -0
- package/dist/traceability/impact-knowledge.d.ts +16 -0
- package/dist/traceability/impact-knowledge.d.ts.map +1 -0
- package/dist/traceability/impact-knowledge.js +165 -0
- package/dist/traceability/impact-policy.d.ts +15 -0
- package/dist/traceability/impact-policy.d.ts.map +1 -0
- package/dist/traceability/impact-policy.js +48 -0
- package/dist/traceability/impact-policy.v1.schema.json +48 -0
- package/dist/traceability/impact-pr-diff.d.ts +5 -0
- package/dist/traceability/impact-pr-diff.d.ts.map +1 -0
- package/dist/traceability/impact-pr-diff.js +83 -0
- package/dist/traceability/impact-record-validation.d.ts +9 -0
- package/dist/traceability/impact-record-validation.d.ts.map +1 -0
- package/dist/traceability/impact-record-validation.js +113 -0
- package/dist/traceability/impact-review.d.ts +148 -0
- package/dist/traceability/impact-review.d.ts.map +1 -0
- package/dist/traceability/impact-review.js +494 -0
- package/dist/traceability/impact-review.schema.json +365 -0
- package/dist/traceability/impact-side-evidence.d.ts +13 -0
- package/dist/traceability/impact-side-evidence.d.ts.map +1 -0
- package/dist/traceability/impact-side-evidence.js +240 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts +10 -0
- package/dist/traceability/reviewed-coordinate-refresh.d.ts.map +1 -0
- package/dist/traceability/reviewed-coordinate-refresh.js +49 -0
- package/dist/traceability/snapshot-knowledge.d.ts +4 -0
- package/dist/traceability/snapshot-knowledge.d.ts.map +1 -0
- package/dist/traceability/snapshot-knowledge.js +98 -0
- package/dist/traceability/staged-diagnostics.d.ts +1 -1
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-entity-id-style.d.ts +12 -0
- package/dist/traceability/staged-entity-id-style.d.ts.map +1 -0
- package/dist/traceability/staged-entity-id-style.js +68 -0
- package/dist/traceability/staged-file-coverage.d.ts +23 -0
- package/dist/traceability/staged-file-coverage.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.d.ts.map +1 -1
- package/dist/traceability/staged-impact-contract.js +2 -16
- package/dist/traceability/staged-symbols-manifest.d.ts +4 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +17 -6
- package/dist/traceability/symbol-extract.d.ts +3 -5
- package/dist/traceability/symbol-extract.d.ts.map +1 -1
- package/dist/traceability/symbol-extract.js +49 -34
- package/dist/traceability/temp-kb.d.ts +1 -1
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +57 -13
- package/dist/traceability/trusted-pr-event.d.ts +13 -0
- package/dist/traceability/trusted-pr-event.d.ts.map +1 -0
- package/dist/traceability/trusted-pr-event.js +105 -0
- package/dist/traceability/validate.js +1 -1
- package/dist/types/entities.d.ts +2 -0
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/relationships.d.ts +1 -1
- package/dist/types/relationships.d.ts.map +1 -1
- package/dist/utils/canonical-path.d.ts +3 -0
- package/dist/utils/canonical-path.d.ts.map +1 -0
- package/dist/utils/canonical-path.js +33 -0
- package/dist/utils/entity-id-style.d.ts +27 -0
- package/dist/utils/entity-id-style.d.ts.map +1 -0
- package/dist/utils/entity-id-style.js +81 -0
- package/dist/utils/git-repository-context.d.ts +50 -0
- package/dist/utils/git-repository-context.d.ts.map +1 -0
- package/dist/utils/git-repository-context.js +259 -0
- package/dist/utils/rule-registry.d.ts +5 -0
- package/dist/utils/rule-registry.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.d.ts +37 -0
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +44 -0
- package/dist/utils/strict-modeling.d.ts +7 -0
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +11 -0
- package/package.json +14 -5
- package/schema/entities.pl +60 -1
- package/schema/relationships.pl +17 -4
- package/schema/validation.pl +118 -20
- package/src/public/diagnostic-usage.ts +16 -24
- package/src/public/impact/analyzer.ts +88 -5
- package/src/public/impact/diagnostics.ts +7 -5
- package/src/public/impact/full-kb-quality.ts +4 -16
- package/src/public/impact/manifest.ts +14 -1
- package/src/public/impact/source-changes.ts +39 -34
- package/src/public/impact/types.ts +5 -0
- package/src/public/operations/catalog.ts +2 -0
- package/src/public/operations/check-executor.ts +12 -1
- package/src/public/operations/check-helpers.ts +27 -1
- package/src/public/operations/contracts.ts +404 -9
- package/src/public/operations/discovery-entities.ts +292 -23
- package/src/public/operations/discovery-executors.ts +91 -55
- package/src/public/operations/impact-review-preparation.ts +548 -0
- package/src/public/operations/index.ts +2 -0
- package/src/public/operations/migration-plan.ts +57 -0
- package/src/public/operations/node-ports.ts +1 -39
- package/src/public/operations/predicate-schema-conformance.ts +362 -0
- package/src/public/operations/prolog-json.ts +9 -3
- package/src/public/operations/proof-receipt-projection.ts +39 -0
- package/src/public/operations/result-envelope.ts +114 -2
- package/src/public/operations/runtime-types.ts +1 -1
- package/src/public/operations/specs/check-rules.generated.ts +8 -1
- package/src/public/operations/specs/discovery.ts +8 -1
- package/src/public/operations/specs/impact-review-preparation.ts +46 -0
- package/src/public/operations/specs/mutation-schemas.ts +23 -3
- package/src/public/operations/specs/reporting.ts +69 -22
- package/src/public/operations/specs/upsert.ts +1 -1
- package/src/public/operations/symbol-repair-plan.ts +13 -3
- package/src/public/operations/types.ts +1 -0
- package/src/public/schemas/entity.ts +22 -0
- package/src/public/schemas/relationship.ts +1 -0
- package/src/public/skills/kibi-usage/SKILL.md +7 -3
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
- package/src/public/skills/kibi-usage/resources/operation-access.md +1 -0
- package/src/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
- package/src/public/skills/kibi-usage/resources/source-authoring.md +36 -0
- package/src/public/skills/kibi-usage/resources/workflows.md +52 -1
- package/src/public/telemetry-acceptance.ts +37 -6
- package/src/schemas/entity.schema.json +32 -0
- package/src/schemas/relationship.schema.json +1 -0
- package/src/traceability/impact-policy.v1.schema.json +48 -0
- package/src/traceability/impact-review.schema.json +365 -0
- package/templates/github/kibi-badge.yml +0 -4
- package/templates/github/kibi-report.yml +0 -4
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Kibi — repo-local, per-branch, queryable long-term memory for software projects
|
|
3
|
+
Copyright (C) 2026 Piotr Franczyk
|
|
4
|
+
|
|
5
|
+
This program is free software: you can redistribute it and/or modify
|
|
6
|
+
it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
(at your option) any later version.
|
|
9
|
+
|
|
10
|
+
This program is distributed in the hope that it will be useful,
|
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
GNU Affero General Public License for more details.
|
|
14
|
+
|
|
15
|
+
You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { execFileSync } from "node:child_process";
|
|
19
|
+
import { lstatSync } from "node:fs";
|
|
20
|
+
import * as path from "node:path";
|
|
21
|
+
// `git rev-parse --path-format=absolute` requires git 2.31 (2021-03). Older
|
|
22
|
+
// git returns cwd-relative paths for --git-dir/--git-common-dir/--git-path,
|
|
23
|
+
// which are resolved against the caller's cwd below.
|
|
24
|
+
const PATH_FORMAT_MINIMUM = { major: 2, minor: 31 };
|
|
25
|
+
// Git's generic absence answer also covers directories it cannot read (an
|
|
26
|
+
// unreadable `.git` yields the same "not a git repository" fatal). Only an
|
|
27
|
+
// explicit absence diagnostic may classify a directory as standalone.
|
|
28
|
+
const NOT_A_REPOSITORY_RE = /not a (git )?repository/i;
|
|
29
|
+
/**
|
|
30
|
+
* Environment for diagnostic-parsing Git subprocesses: failure classification
|
|
31
|
+
* matches English diagnostics, so the child locale is pinned to C while every
|
|
32
|
+
* other environment value (and Git configuration) is preserved. The parent
|
|
33
|
+
* process's locale is never mutated.
|
|
34
|
+
*/
|
|
35
|
+
function gitEnv() {
|
|
36
|
+
return { ...process.env, LC_ALL: "C", LANG: "C" };
|
|
37
|
+
}
|
|
38
|
+
function runGitChecked(cwd, args) {
|
|
39
|
+
try {
|
|
40
|
+
return {
|
|
41
|
+
output: execFileSync("git", args, {
|
|
42
|
+
cwd,
|
|
43
|
+
encoding: "utf8",
|
|
44
|
+
env: gitEnv(),
|
|
45
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
46
|
+
timeout: 10_000,
|
|
47
|
+
maxBuffer: 1024 * 1024,
|
|
48
|
+
}).trim(),
|
|
49
|
+
failure: null,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
const stderr = error.stderr;
|
|
54
|
+
const text = typeof stderr === "string" ? stderr : stderr?.toString("utf8");
|
|
55
|
+
const firstLine = text
|
|
56
|
+
?.split("\n")
|
|
57
|
+
.map((line) => line.trim())
|
|
58
|
+
.find(Boolean) ?? null;
|
|
59
|
+
return { output: null, failure: firstLine };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function runGit(cwd, args) {
|
|
63
|
+
return runGitChecked(cwd, args).output;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Decide whether a failed repository probe means the directory genuinely has
|
|
67
|
+
* no repository (standalone fallback is allowed) or Git refused for an
|
|
68
|
+
* operational reason (dubious ownership, access, timeouts, anything
|
|
69
|
+
* unrecognized) where callers must refuse before writing.
|
|
70
|
+
*/
|
|
71
|
+
function classifyGitFailure(failure) {
|
|
72
|
+
if (failure !== null && NOT_A_REPOSITORY_RE.test(failure)) {
|
|
73
|
+
return "not-a-repository";
|
|
74
|
+
}
|
|
75
|
+
return "refused";
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* On Git's absence answer, find the nearest `.git` entry (file, directory, or
|
|
79
|
+
* symlink) at or above `start`. Git reports the same generic "not a git
|
|
80
|
+
* repository" fatal for entries it cannot fully read (restricted permissions
|
|
81
|
+
* on objects/refs/HEAD, ownership checks) as for true absence, so a present
|
|
82
|
+
* marker means the context is unresolved: callers must conservatively refuse
|
|
83
|
+
* with the marker instead of treating the directory as standalone. Null means
|
|
84
|
+
* no marker exists up to the filesystem root: the directory genuinely has no
|
|
85
|
+
* repository and standalone handling is legitimate.
|
|
86
|
+
*/
|
|
87
|
+
function findRepositoryMarker(start) {
|
|
88
|
+
let current = path.resolve(start);
|
|
89
|
+
for (;;) {
|
|
90
|
+
const entry = path.join(current, ".git");
|
|
91
|
+
try {
|
|
92
|
+
lstatSync(entry);
|
|
93
|
+
return entry;
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
const code = error.code;
|
|
97
|
+
if (code === "EACCES" || code === "EPERM") {
|
|
98
|
+
// The entry cannot even be inspected: treat it as present.
|
|
99
|
+
return entry;
|
|
100
|
+
}
|
|
101
|
+
// ENOENT and friends: no entry at this level; keep walking.
|
|
102
|
+
}
|
|
103
|
+
const parent = path.dirname(current);
|
|
104
|
+
if (parent === current)
|
|
105
|
+
return null;
|
|
106
|
+
current = parent;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function parseGitVersion(versionOutput) {
|
|
110
|
+
const match = /^git version (\d+)\.(\d+)(\.\d+)?/.exec(versionOutput);
|
|
111
|
+
if (!match)
|
|
112
|
+
return null;
|
|
113
|
+
return { major: Number(match[1]), minor: Number(match[2]) };
|
|
114
|
+
}
|
|
115
|
+
function resolveAgainstCwd(candidate, cwd) {
|
|
116
|
+
return path.isAbsolute(candidate) ? candidate : path.resolve(cwd, candidate);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Resolve the effective Git repository context for `cwd` by asking Git
|
|
120
|
+
* instead of assuming `<cwd>/.git`. The result distinguishes "no repository"
|
|
121
|
+
* (callers may fall back to standalone-workspace behavior) from repositories
|
|
122
|
+
* Kibi must not touch (bare repositories) and directories where Git refused
|
|
123
|
+
* operationally (dubious ownership, unreadable `.git`, access failures) — the
|
|
124
|
+
* last must never be mistaken for "no repository", because that would send
|
|
125
|
+
* callers into standalone workspace writes.
|
|
126
|
+
*
|
|
127
|
+
* implements REQ-git-hook-effective-install
|
|
128
|
+
*/
|
|
129
|
+
export function resolveGitRepository(cwd = process.cwd()) {
|
|
130
|
+
const versionProbe = runGitChecked(cwd, ["--version"]);
|
|
131
|
+
if (versionProbe.output === null) {
|
|
132
|
+
const marker = findRepositoryMarker(cwd);
|
|
133
|
+
if (marker !== null) {
|
|
134
|
+
return {
|
|
135
|
+
status: "git-refused",
|
|
136
|
+
reason: `Git is unavailable, but a .git entry exists at ${marker}; refusing to guess.`,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
return { status: "git-unavailable" };
|
|
140
|
+
}
|
|
141
|
+
const toplevel = runGitChecked(cwd, ["rev-parse", "--show-toplevel"]);
|
|
142
|
+
if (toplevel.output === null) {
|
|
143
|
+
// A bare repository has no working tree (--show-toplevel fails) but is
|
|
144
|
+
// still a repository; treat it as unsupported instead of "no repository"
|
|
145
|
+
// so callers refuse to write workspace state into it.
|
|
146
|
+
const gitDirProbe = runGitChecked(cwd, ["rev-parse", "--git-dir"]);
|
|
147
|
+
if (gitDirProbe.output !== null) {
|
|
148
|
+
return {
|
|
149
|
+
status: "unsupported",
|
|
150
|
+
reason: "Bare repository: no working tree to attach Kibi to.",
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
if (classifyGitFailure(toplevel.failure) === "not-a-repository") {
|
|
154
|
+
// Git's absence answer also fires when a `.git` entry exists but some
|
|
155
|
+
// of its internals (objects, refs, HEAD) are unreadable; conservatively
|
|
156
|
+
// refuse with the marker instead of a standalone-directory verdict.
|
|
157
|
+
const marker = findRepositoryMarker(cwd);
|
|
158
|
+
if (marker !== null) {
|
|
159
|
+
return {
|
|
160
|
+
status: "git-refused",
|
|
161
|
+
reason: `Git reported no repository, but a .git entry exists at ${marker} (${toplevel.failure ?? "git produced no diagnostic output"}); refusing to guess.`,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return { status: "not-a-repository" };
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
status: "git-refused",
|
|
168
|
+
reason: `Git refused to inspect this directory: ${toplevel.failure ??
|
|
169
|
+
gitDirProbe.failure ??
|
|
170
|
+
"git produced no diagnostic output"}`,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
const version = parseGitVersion(versionProbe.output);
|
|
174
|
+
const absolute = version !== null &&
|
|
175
|
+
(version.major > PATH_FORMAT_MINIMUM.major ||
|
|
176
|
+
(version.major === PATH_FORMAT_MINIMUM.major &&
|
|
177
|
+
version.minor >= PATH_FORMAT_MINIMUM.minor));
|
|
178
|
+
const formatArgs = absolute ? ["--path-format=absolute"] : [];
|
|
179
|
+
const gitDirRaw = runGitChecked(cwd, [
|
|
180
|
+
"rev-parse",
|
|
181
|
+
...formatArgs,
|
|
182
|
+
"--git-dir",
|
|
183
|
+
]);
|
|
184
|
+
const commonGitDirRaw = runGitChecked(cwd, [
|
|
185
|
+
"rev-parse",
|
|
186
|
+
...formatArgs,
|
|
187
|
+
"--git-common-dir",
|
|
188
|
+
]);
|
|
189
|
+
const hooksDirRaw = runGitChecked(cwd, [
|
|
190
|
+
"rev-parse",
|
|
191
|
+
...formatArgs,
|
|
192
|
+
"--git-path",
|
|
193
|
+
"hooks",
|
|
194
|
+
]);
|
|
195
|
+
if (gitDirRaw.output === null ||
|
|
196
|
+
commonGitDirRaw.output === null ||
|
|
197
|
+
hooksDirRaw.output === null) {
|
|
198
|
+
const detail = gitDirRaw.failure ??
|
|
199
|
+
commonGitDirRaw.failure ??
|
|
200
|
+
hooksDirRaw.failure ??
|
|
201
|
+
"git produced no diagnostic output";
|
|
202
|
+
return {
|
|
203
|
+
status: "git-refused",
|
|
204
|
+
reason: `Git refused to report its directory layout for this repository: ${detail}`,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
// Without --path-format the outputs above are relative to cwd (or absolute
|
|
208
|
+
// for linked-worktree git dirs); normalize everything against cwd.
|
|
209
|
+
const worktreeRoot = toplevel.output;
|
|
210
|
+
const gitDir = resolveAgainstCwd(gitDirRaw.output, cwd);
|
|
211
|
+
const commonGitDir = resolveAgainstCwd(commonGitDirRaw.output, cwd);
|
|
212
|
+
const effectiveHooksDir = resolveAgainstCwd(hooksDirRaw.output, cwd);
|
|
213
|
+
const originLine = runGit(cwd, [
|
|
214
|
+
"config",
|
|
215
|
+
"--show-origin",
|
|
216
|
+
"--get",
|
|
217
|
+
"core.hooksPath",
|
|
218
|
+
]);
|
|
219
|
+
let hooksPathConfig = null;
|
|
220
|
+
let hooksPathOrigin = null;
|
|
221
|
+
if (originLine) {
|
|
222
|
+
const separator = originLine.lastIndexOf("\t");
|
|
223
|
+
if (separator >= 0) {
|
|
224
|
+
hooksPathOrigin = originLine.slice(0, separator).trim();
|
|
225
|
+
hooksPathConfig = originLine.slice(separator + 1).trim();
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
hooksPathConfig = originLine.trim();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
const isLinkedWorktree = gitDir !== commonGitDir;
|
|
232
|
+
let primaryWorktreeRoot = null;
|
|
233
|
+
if (path.basename(commonGitDir) === ".git") {
|
|
234
|
+
const candidate = path.dirname(commonGitDir);
|
|
235
|
+
// Validate the candidate as a real checkout: a linked worktree of a bare
|
|
236
|
+
// repository also has commonDir `<bare>/.git`, and dirname of that is the
|
|
237
|
+
// bare holder directory, not a checkout.
|
|
238
|
+
const candidateToplevel = runGit(candidate, [
|
|
239
|
+
"rev-parse",
|
|
240
|
+
"--show-toplevel",
|
|
241
|
+
]);
|
|
242
|
+
if (candidateToplevel === candidate) {
|
|
243
|
+
primaryWorktreeRoot = candidate;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return {
|
|
247
|
+
status: "ok",
|
|
248
|
+
context: {
|
|
249
|
+
worktreeRoot,
|
|
250
|
+
gitDir,
|
|
251
|
+
commonGitDir,
|
|
252
|
+
effectiveHooksDir,
|
|
253
|
+
isLinkedWorktree,
|
|
254
|
+
primaryWorktreeRoot,
|
|
255
|
+
hooksPathConfig,
|
|
256
|
+
hooksPathOrigin,
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
}
|
|
@@ -21,6 +21,11 @@ export interface RuleDefinition {
|
|
|
21
21
|
/** Kibi-owned role of this rule in the enforcement contract. */
|
|
22
22
|
enforcementClass: RuleEnforcementClass;
|
|
23
23
|
category: "coverage" | "integrity" | "lifecycle" | "traceability";
|
|
24
|
+
/**
|
|
25
|
+
* Severity for non-canonical findings rendered as quality diagnostics.
|
|
26
|
+
* Omitted means "warning"; "info" marks purely informational signals.
|
|
27
|
+
*/
|
|
28
|
+
diagnosticSeverity?: "warning" | "info";
|
|
24
29
|
}
|
|
25
30
|
/** A single KB check violation. */
|
|
26
31
|
export interface Violation {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-registry.d.ts","sourceRoot":"","sources":["../../src/utils/rule-registry.ts"],"names":[],"mappings":"AAgCA,MAAM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I,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAE1E;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,GACX,oBAAoB,GAAG,SAAS,CAElC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,gBAAgB,EAAE,oBAAoB,GACrC,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,GAAG,CAAC,MAAM,CAAC,CAM7C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAAC,MAAM,CAAC,CAM/C;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;;;;GAQG;AAEH,wBAAgB,iBAAiB,CAC/B,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GACjC,GAAG,CAAC,MAAM,CAAC,CAOb;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK5D"}
|
|
@@ -98,5 +98,42 @@ export declare const GENERATED_RULES: readonly [{
|
|
|
98
98
|
readonly description: "Detect unresolved required_proofs.symbol_id values, type-shape required proofs, and proof_bindings.source_file disagreement with the named symbol sourceFile";
|
|
99
99
|
readonly enforcementClass: "advisory";
|
|
100
100
|
readonly category: "integrity";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "entity-id-style";
|
|
103
|
+
readonly description: "Entity IDs name the governed behavior and match their filename stem; new purely numeric IDs are reported at creation boundaries";
|
|
104
|
+
readonly enforcementClass: "advisory";
|
|
105
|
+
readonly category: "lifecycle";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "domain-redundancy";
|
|
108
|
+
readonly description: "Two current requirements must not ground the identical logical term or share a ground fact unless linked by supersedes or restates";
|
|
109
|
+
readonly enforcementClass: "advisory";
|
|
110
|
+
readonly category: "integrity";
|
|
111
|
+
}, {
|
|
112
|
+
readonly name: "domain-implication";
|
|
113
|
+
readonly description: "Informational: one requirement's numeric bound strictly implies another requirement's bound on the same subject and property";
|
|
114
|
+
readonly enforcementClass: "advisory";
|
|
115
|
+
readonly category: "integrity";
|
|
116
|
+
readonly diagnosticSeverity: "info";
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "subject-key-identity";
|
|
119
|
+
readonly description: "Subject keys must name a shared component, not be derived from a requirement ID";
|
|
120
|
+
readonly enforcementClass: "advisory";
|
|
121
|
+
readonly category: "integrity";
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "subject-key-shape";
|
|
124
|
+
readonly description: "Subject keys follow dotted component.aspect[.sub] with lowercase snake segments";
|
|
125
|
+
readonly enforcementClass: "advisory";
|
|
126
|
+
readonly category: "integrity";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "ontology-quality";
|
|
129
|
+
readonly description: "Informational: predicate schemas whose argument values mostly occur in only one fact are carrying prose instead of a shared vocabulary";
|
|
130
|
+
readonly enforcementClass: "advisory";
|
|
131
|
+
readonly category: "integrity";
|
|
132
|
+
readonly diagnosticSeverity: "info";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "predicate-schema-conformance";
|
|
135
|
+
readonly description: "Predicate facts match a predicate_schema (project-local, or the built-in catalog in the default namespace) and use its declared argument constants";
|
|
136
|
+
readonly enforcementClass: "advisory";
|
|
137
|
+
readonly category: "integrity";
|
|
101
138
|
}];
|
|
102
139
|
//# sourceMappingURL=rule-registry.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-registry.generated.d.ts","sourceRoot":"","sources":["../../src/utils/rule-registry.generated.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"rule-registry.generated.d.ts","sourceRoot":"","sources":["../../src/utils/rule-registry.generated.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6LlB,CAAC"}
|
|
@@ -128,4 +128,48 @@ export const GENERATED_RULES = [
|
|
|
128
128
|
enforcementClass: "advisory",
|
|
129
129
|
category: "integrity",
|
|
130
130
|
},
|
|
131
|
+
{
|
|
132
|
+
name: "entity-id-style",
|
|
133
|
+
description: "Entity IDs name the governed behavior and match their filename stem; new purely numeric IDs are reported at creation boundaries",
|
|
134
|
+
enforcementClass: "advisory",
|
|
135
|
+
category: "lifecycle",
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "domain-redundancy",
|
|
139
|
+
description: "Two current requirements must not ground the identical logical term or share a ground fact unless linked by supersedes or restates",
|
|
140
|
+
enforcementClass: "advisory",
|
|
141
|
+
category: "integrity",
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "domain-implication",
|
|
145
|
+
description: "Informational: one requirement's numeric bound strictly implies another requirement's bound on the same subject and property",
|
|
146
|
+
enforcementClass: "advisory",
|
|
147
|
+
category: "integrity",
|
|
148
|
+
diagnosticSeverity: "info",
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: "subject-key-identity",
|
|
152
|
+
description: "Subject keys must name a shared component, not be derived from a requirement ID",
|
|
153
|
+
enforcementClass: "advisory",
|
|
154
|
+
category: "integrity",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: "subject-key-shape",
|
|
158
|
+
description: "Subject keys follow dotted component.aspect[.sub] with lowercase snake segments",
|
|
159
|
+
enforcementClass: "advisory",
|
|
160
|
+
category: "integrity",
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: "ontology-quality",
|
|
164
|
+
description: "Informational: predicate schemas whose argument values mostly occur in only one fact are carrying prose instead of a shared vocabulary",
|
|
165
|
+
enforcementClass: "advisory",
|
|
166
|
+
category: "integrity",
|
|
167
|
+
diagnosticSeverity: "info",
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: "predicate-schema-conformance",
|
|
171
|
+
description: "Predicate facts match a predicate_schema (project-local, or the built-in catalog in the default namespace) and use its declared argument constants",
|
|
172
|
+
enforcementClass: "advisory",
|
|
173
|
+
category: "integrity",
|
|
174
|
+
},
|
|
131
175
|
];
|
|
@@ -52,6 +52,13 @@ interface ObservationWriteSet {
|
|
|
52
52
|
}
|
|
53
53
|
export type StrictWriteSet = StrictRequirementWriteSet | ObservationWriteSet;
|
|
54
54
|
export declare function normalizeSubjectKey(value: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* Subject-key convention checked by `subject-key-shape`: dotted
|
|
57
|
+
* component.aspect[.sub] with lowercase snake segments. Mirrors
|
|
58
|
+
* valid_subject_key/1 in packages/core/src/semantic_quality.pl.
|
|
59
|
+
*/
|
|
60
|
+
export declare const SUBJECT_KEY_CONVENTION: RegExp;
|
|
61
|
+
export declare function isConventionalSubjectKey(value: string): boolean;
|
|
55
62
|
export declare function normalizePropertyKey(value: string): string;
|
|
56
63
|
export declare function buildStableRequirementIds(claim: SemanticClaim): StableRequirementIds;
|
|
57
64
|
export declare function buildStrictWriteSet(input: StrictModelInput): StrictWriteSet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict-modeling.d.ts","sourceRoot":"","sources":["../../src/utils/strict-modeling.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAKlE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC;IAC7D,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,O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M,CAAC,CAAC;IAChC,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,QAAQ,EAAE,IAAI,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,mBAAmB;IAC3B,eAAe,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,yBAAyB,GAAG,mBAAmB,CAAC;AAE7E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAiBzD;AAED;;;;GAIG;AAEH,eAAO,MAAM,sBAAsB,QACoC,CAAC;AAGxE,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAe1D;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,aAAa,GACnB,oBAAoB,CAwBtB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,cAAc,CAsH3E;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,GACtC,cAAc,EAAE,CAkBlB;AAiDD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,MAAM,EAAE,MAAM,GACb,MAAM,CAMR"}
|
|
@@ -33,6 +33,17 @@ export function normalizeSubjectKey(value) {
|
|
|
33
33
|
}
|
|
34
34
|
return normalized;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Subject-key convention checked by `subject-key-shape`: dotted
|
|
38
|
+
* component.aspect[.sub] with lowercase snake segments. Mirrors
|
|
39
|
+
* valid_subject_key/1 in packages/core/src/semantic_quality.pl.
|
|
40
|
+
*/
|
|
41
|
+
// implements REQ-kibi-subject-vocabulary
|
|
42
|
+
export const SUBJECT_KEY_CONVENTION = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*(?:\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*)+$/;
|
|
43
|
+
// implements REQ-kibi-subject-vocabulary
|
|
44
|
+
export function isConventionalSubjectKey(value) {
|
|
45
|
+
return SUBJECT_KEY_CONVENTION.test(value);
|
|
46
|
+
}
|
|
36
47
|
export function normalizePropertyKey(value) {
|
|
37
48
|
const normalized = value
|
|
38
49
|
.trim()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Kibi CLI for knowledge base management",
|
|
6
6
|
"engines": {
|
|
@@ -10,7 +10,15 @@
|
|
|
10
10
|
"bin": {
|
|
11
11
|
"kibi": "bin/kibi"
|
|
12
12
|
},
|
|
13
|
-
"files": [
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"bin",
|
|
16
|
+
"schema",
|
|
17
|
+
"src/schemas",
|
|
18
|
+
"src/public",
|
|
19
|
+
"src/traceability/*.schema.json",
|
|
20
|
+
"templates"
|
|
21
|
+
],
|
|
14
22
|
"scripts": {
|
|
15
23
|
"build": "tsc -p tsconfig.json && rm -rf dist/public/skills && mkdir -p dist/public/skills dist/report && cp -r src/public/skills/. dist/public/skills/ && cp src/report/html-report.css dist/report/html-report.css && node ../../scripts/generate-entity-schema.mjs --check",
|
|
16
24
|
"test": "node ../../scripts/run-owned-engine-tests.mjs -- bun test --timeout 15000 .",
|
|
@@ -227,9 +235,10 @@
|
|
|
227
235
|
"fast-glob": "^3.2.12",
|
|
228
236
|
"gray-matter": "^4.0.3",
|
|
229
237
|
"js-yaml": "^4.1.0",
|
|
230
|
-
"kibi-core": "^0.
|
|
231
|
-
"kibi-plugin-builtin": "^0.
|
|
232
|
-
"kibi-plugin-sdk": "^0.
|
|
238
|
+
"kibi-core": "^0.14.1",
|
|
239
|
+
"kibi-plugin-builtin": "^0.4.0",
|
|
240
|
+
"kibi-plugin-sdk": "^0.4.0",
|
|
241
|
+
"kibi-swipl": "^1.0.0",
|
|
233
242
|
"saxes": "^6.0.0",
|
|
234
243
|
"ignore": "^5.3.0",
|
|
235
244
|
"yaml": "^2.9.0"
|
package/schema/entities.pl
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
:- module(kibi_entities, [entity_type/1, entity_property/3, required_property/2, optional_property/2]).
|
|
4
4
|
|
|
5
5
|
% Entity types
|
|
6
|
+
% implements REQ-004
|
|
6
7
|
entity_type(req).
|
|
7
8
|
entity_type(scenario).
|
|
8
9
|
entity_type(test).
|
|
@@ -20,7 +21,6 @@ entity_property(_, status, atom).
|
|
|
20
21
|
entity_property(_, created_at, datetime).
|
|
21
22
|
entity_property(_, updated_at, datetime).
|
|
22
23
|
entity_property(_, source, uri).
|
|
23
|
-
entity_property(_, sourceFile, uri).
|
|
24
24
|
|
|
25
25
|
% Optional properties
|
|
26
26
|
entity_property(_, tags, list).
|
|
@@ -29,6 +29,16 @@ entity_property(_, priority, atom).
|
|
|
29
29
|
entity_property(_, severity, atom).
|
|
30
30
|
entity_property(_, links, list).
|
|
31
31
|
entity_property(_, text_ref, uri).
|
|
32
|
+
entity_property(_, sourceFile, uri).
|
|
33
|
+
entity_property(req, semantic_text, string).
|
|
34
|
+
entity_property(req, logic_claims, list).
|
|
35
|
+
entity_property(req, semantic_clauses, list).
|
|
36
|
+
entity_property(req, semantic_inventory_version, string).
|
|
37
|
+
entity_property(req, semantic_source_field, string).
|
|
38
|
+
entity_property(req, semantic_source_hash, string).
|
|
39
|
+
entity_property(req, semantic_inventory, list_or_json).
|
|
40
|
+
entity_property(req, proof_exempt, boolean).
|
|
41
|
+
entity_property(req, proof_exempt_reason, string).
|
|
32
42
|
|
|
33
43
|
% Typed fact fields - only valid for fact entities
|
|
34
44
|
entity_property(fact, fact_kind, atom).
|
|
@@ -47,10 +57,45 @@ entity_property(fact, closed_world, boolean).
|
|
|
47
57
|
entity_property(fact, valid_from, datetime).
|
|
48
58
|
entity_property(fact, valid_to, datetime).
|
|
49
59
|
entity_property(fact, canonical_key, string).
|
|
60
|
+
entity_property(fact, claim_key, string).
|
|
61
|
+
entity_property(fact, claim_text, string).
|
|
62
|
+
entity_property(fact, predicate_name, string).
|
|
63
|
+
entity_property(fact, predicate_namespace, string).
|
|
64
|
+
entity_property(fact, predicate_arity, integer).
|
|
65
|
+
entity_property(fact, argument_names, list).
|
|
66
|
+
entity_property(fact, argument_types, list).
|
|
67
|
+
entity_property(fact, argument_descriptions, list).
|
|
68
|
+
% Predicate-schema vocabularies are JSON objects serialized as strings.
|
|
69
|
+
entity_property(fact, argument_constants, string).
|
|
70
|
+
entity_property(fact, argument_aliases, string).
|
|
71
|
+
entity_property(fact, aliases, list).
|
|
72
|
+
entity_property(fact, examples, list).
|
|
73
|
+
entity_property(fact, predicate_args, list).
|
|
74
|
+
entity_property(fact, rule_ir, string).
|
|
75
|
+
entity_property(fact, rule_hash, string).
|
|
76
|
+
% Rule schema references are JSON strings at the public boundary, but the
|
|
77
|
+
% Prolog peer represents entity identifiers as atoms. Accept both forms so
|
|
78
|
+
% decoded rule facts validate without losing the typed reference.
|
|
79
|
+
entity_property(fact, rule_schema_id, atom_or_string).
|
|
80
|
+
entity_property(fact, rule_name, string).
|
|
81
|
+
entity_property(fact, semantic_key, string).
|
|
82
|
+
entity_property(fact, claim_span_start, integer).
|
|
83
|
+
entity_property(fact, claim_span_end, integer).
|
|
50
84
|
|
|
51
85
|
% Typed symbol metadata fields - only valid for symbol entities
|
|
52
86
|
entity_property(symbol, symbol_role, atom).
|
|
53
87
|
entity_property(symbol, granularity_reason, atom).
|
|
88
|
+
entity_property(symbol, sourceLine, integer).
|
|
89
|
+
entity_property(symbol, sourceColumn, integer).
|
|
90
|
+
entity_property(symbol, sourceEndLine, integer).
|
|
91
|
+
entity_property(symbol, sourceEndColumn, integer).
|
|
92
|
+
|
|
93
|
+
% Typed test verification fields - only valid for test entities
|
|
94
|
+
entity_property(test, verification_scope, atom).
|
|
95
|
+
entity_property(test, verification_perspective, atom).
|
|
96
|
+
entity_property(test, proof_contract, list_or_json).
|
|
97
|
+
entity_property(test, proof_bindings, string).
|
|
98
|
+
entity_property(test, proof_receipts, string).
|
|
54
99
|
|
|
55
100
|
% Required properties for all entity types
|
|
56
101
|
required_property(Type, id) :- entity_type(Type).
|
|
@@ -67,6 +112,20 @@ optional_property(Type, priority) :- entity_type(Type).
|
|
|
67
112
|
optional_property(Type, severity) :- entity_type(Type).
|
|
68
113
|
optional_property(Type, links) :- entity_type(Type).
|
|
69
114
|
optional_property(Type, text_ref) :- entity_type(Type).
|
|
115
|
+
optional_property(req, semantic_text).
|
|
116
|
+
optional_property(req, logic_claims).
|
|
117
|
+
optional_property(req, semantic_clauses).
|
|
118
|
+
optional_property(req, semantic_inventory_version).
|
|
119
|
+
optional_property(req, semantic_source_field).
|
|
120
|
+
optional_property(req, semantic_source_hash).
|
|
121
|
+
optional_property(req, semantic_inventory).
|
|
122
|
+
optional_property(req, proof_exempt).
|
|
123
|
+
optional_property(req, proof_exempt_reason).
|
|
124
|
+
optional_property(test, verification_scope).
|
|
125
|
+
optional_property(test, verification_perspective).
|
|
126
|
+
optional_property(test, proof_contract).
|
|
127
|
+
optional_property(test, proof_bindings).
|
|
128
|
+
optional_property(test, proof_receipts).
|
|
70
129
|
|
|
71
130
|
% Documentation helpers
|
|
72
131
|
% list all entity types
|
package/schema/relationships.pl
CHANGED
|
@@ -3,32 +3,36 @@
|
|
|
3
3
|
:- module(kibi_relationships, [relationship_type/1, valid_relationship/3, relationship_metadata/1]).
|
|
4
4
|
|
|
5
5
|
% Relationship types
|
|
6
|
+
% implements REQ-005
|
|
6
7
|
relationship_type(depends_on).
|
|
8
|
+
relationship_type(executable_for).
|
|
7
9
|
relationship_type(specified_by).
|
|
8
10
|
relationship_type(verified_by).
|
|
9
11
|
relationship_type(validates).
|
|
10
12
|
relationship_type(implements).
|
|
11
13
|
relationship_type(covered_by).
|
|
12
|
-
relationship_type(executable_for).
|
|
13
14
|
relationship_type(constrained_by).
|
|
14
15
|
relationship_type(guards).
|
|
15
16
|
relationship_type(publishes).
|
|
16
17
|
relationship_type(consumes).
|
|
17
18
|
relationship_type(relates_to).
|
|
18
19
|
relationship_type(supersedes).
|
|
20
|
+
relationship_type(restates).
|
|
19
21
|
relationship_type(constrains).
|
|
20
22
|
relationship_type(requires_property).
|
|
23
|
+
relationship_type(requires_predicate).
|
|
24
|
+
relationship_type(requires_rule).
|
|
21
25
|
|
|
22
26
|
% valid_relationship(RelType, FromType, ToType).
|
|
23
27
|
valid_relationship(depends_on, req, req).
|
|
28
|
+
valid_relationship(executable_for, symbol, test).
|
|
24
29
|
valid_relationship(specified_by, req, scenario).
|
|
25
30
|
valid_relationship(verified_by, req, test).
|
|
31
|
+
valid_relationship(verified_by, scenario, test).
|
|
26
32
|
valid_relationship(validates, test, req).
|
|
33
|
+
valid_relationship(validates, test, scenario).
|
|
27
34
|
valid_relationship(implements, symbol, req).
|
|
28
35
|
valid_relationship(covered_by, symbol, test).
|
|
29
|
-
valid_relationship(executable_for, symbol, test).
|
|
30
|
-
valid_relationship(verified_by, scenario, test).
|
|
31
|
-
valid_relationship(validates, test, scenario).
|
|
32
36
|
valid_relationship(constrained_by, symbol, adr).
|
|
33
37
|
% guards can target symbol, event, or req
|
|
34
38
|
valid_relationship(guards, flag, symbol).
|
|
@@ -38,12 +42,21 @@ valid_relationship(publishes, symbol, event).
|
|
|
38
42
|
valid_relationship(consumes, symbol, event).
|
|
39
43
|
valid_relationship(constrains, req, fact).
|
|
40
44
|
valid_relationship(requires_property, req, fact).
|
|
45
|
+
valid_relationship(requires_predicate, req, fact).
|
|
46
|
+
valid_relationship(requires_rule, req, fact).
|
|
41
47
|
|
|
42
48
|
%% supersedes(+NewAdrId, +OldAdrId)
|
|
43
49
|
%% NewAdrId is the decision that replaces OldAdrId.
|
|
44
50
|
%% OldAdrId's status should be archived or deprecated as a consequence.
|
|
45
51
|
valid_relationship(supersedes, adr, adr).
|
|
46
52
|
valid_relationship(supersedes, req, req).
|
|
53
|
+
|
|
54
|
+
%% restates(+ReqId, +OtherReqId)
|
|
55
|
+
%% ReqId intentionally restates OtherReqId (for example a product requirement
|
|
56
|
+
%% echoed in a platform requirement). Both stay current; the pair is exempt
|
|
57
|
+
%% from domain-redundancy. Use supersedes when one replaces the other.
|
|
58
|
+
% implements REQ-kibi-restates-relationship
|
|
59
|
+
valid_relationship(restates, req, req).
|
|
47
60
|
% escape hatch - allow any to any
|
|
48
61
|
valid_relationship(relates_to, _, _).
|
|
49
62
|
|