kibi-cli 2.4.0 → 2.5.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-json-command.d.ts +6 -0
- package/dist/cli-json-command.d.ts.map +1 -1
- package/dist/cli-json-command.js +37 -9
- package/dist/cli-operation-loader.d.ts.map +1 -1
- package/dist/cli-operation-loader.js +7 -0
- package/dist/cli-operation-metadata.d.ts +12 -4
- package/dist/cli-operation-metadata.d.ts.map +1 -1
- package/dist/cli-operation-metadata.js +14 -4
- package/dist/cli-protocol.d.ts +14 -0
- package/dist/cli-protocol.d.ts.map +1 -1
- package/dist/cli-protocol.js +31 -2
- package/dist/cli-register-proof.d.ts.map +1 -1
- package/dist/cli-register-proof.js +13 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +11 -2
- package/dist/commands/discovery-shared.d.ts.map +1 -1
- package/dist/commands/discovery-shared.js +8 -2
- package/dist/commands/engine.d.ts.map +1 -1
- package/dist/commands/engine.js +4 -2
- package/dist/commands/gc.d.ts.map +1 -1
- package/dist/commands/gc.js +7 -0
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +0 -1
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +281 -14
- package/dist/commands/proof-compact.d.ts +9 -0
- package/dist/commands/proof-compact.d.ts.map +1 -0
- package/dist/commands/proof-compact.js +58 -0
- package/dist/commands/prove.d.ts +38 -0
- package/dist/commands/prove.d.ts.map +1 -1
- package/dist/commands/prove.js +222 -47
- package/dist/commands/sync/persistence.d.ts.map +1 -1
- package/dist/commands/sync/persistence.js +61 -16
- package/dist/commands/sync.d.ts +8 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +42 -16
- package/dist/diagnostics.js +1 -1
- package/dist/engine-limits.d.ts +74 -0
- package/dist/engine-limits.d.ts.map +1 -0
- package/dist/engine-limits.js +201 -0
- package/dist/engine.d.ts +10 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +57 -9
- package/dist/extractors/manifest.d.ts +8 -0
- package/dist/extractors/manifest.d.ts.map +1 -1
- package/dist/extractors/manifest.js +34 -5
- package/dist/extractors/markdown.d.ts +8 -0
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +57 -0
- package/dist/extractors/relationships.d.ts.map +1 -1
- package/dist/extractors/relationships.js +2 -0
- package/dist/intent-search.d.ts +4 -1
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +186 -33
- package/dist/operations/bootstrap/candidate-helpers.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidate-helpers.js +8 -1
- package/dist/operations/bootstrap/candidates.d.ts.map +1 -1
- package/dist/operations/bootstrap/candidates.js +54 -38
- package/dist/operations/bootstrap/generate.d.ts +2 -0
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +87 -33
- package/dist/operations/bootstrap/intent-claims.d.ts.map +1 -1
- package/dist/operations/bootstrap/intent-claims.js +12 -4
- package/dist/operations/bootstrap/markdown-candidates.d.ts +2 -0
- package/dist/operations/bootstrap/markdown-candidates.d.ts.map +1 -1
- package/dist/operations/bootstrap/markdown-candidates.js +32 -10
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
- package/dist/operations/bootstrap/presentation.js +6 -2
- package/dist/operations/bootstrap/requirement-claims.d.ts +1 -0
- package/dist/operations/bootstrap/requirement-claims.d.ts.map +1 -1
- package/dist/operations/bootstrap/requirement-claims.js +13 -1
- package/dist/operations/bootstrap/validation.d.ts +4 -0
- package/dist/operations/bootstrap/validation.d.ts.map +1 -0
- package/dist/operations/bootstrap/validation.js +20 -0
- package/dist/operations/migration/inventory-rederive.d.ts +81 -0
- package/dist/operations/migration/inventory-rederive.d.ts.map +1 -0
- package/dist/operations/migration/inventory-rederive.js +484 -0
- package/dist/operations/migration/kb-sources.d.ts +53 -0
- package/dist/operations/migration/kb-sources.d.ts.map +1 -0
- package/dist/operations/migration/kb-sources.js +233 -0
- package/dist/operations/migration/origin-backfill.d.ts +39 -0
- package/dist/operations/migration/origin-backfill.d.ts.map +1 -0
- package/dist/operations/migration/origin-backfill.js +164 -0
- package/dist/operations/migration/polarity-values.d.ts +10 -0
- package/dist/operations/migration/polarity-values.d.ts.map +1 -0
- package/dist/operations/migration/polarity-values.js +60 -0
- package/dist/operations/migration/schema6.d.ts +59 -0
- package/dist/operations/migration/schema6.d.ts.map +1 -0
- package/dist/operations/migration/schema6.js +379 -0
- package/dist/operations/migration/source-paths.d.ts +131 -0
- package/dist/operations/migration/source-paths.d.ts.map +1 -0
- package/dist/operations/migration/source-paths.js +308 -0
- package/dist/operations/migration/superseded-closure.d.ts +54 -0
- package/dist/operations/migration/superseded-closure.d.ts.map +1 -0
- package/dist/operations/migration/superseded-closure.js +187 -0
- package/dist/operations/modeling/logic-modeling.d.ts.map +1 -1
- package/dist/operations/modeling/logic-modeling.js +3 -5
- package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
- package/dist/operations/modeling/model-requirement.js +225 -67
- package/dist/operations/mutation/contradictions.d.ts +16 -0
- package/dist/operations/mutation/contradictions.d.ts.map +1 -1
- package/dist/operations/mutation/contradictions.js +32 -0
- package/dist/operations/mutation/delete.d.ts.map +1 -1
- package/dist/operations/mutation/delete.js +15 -7
- package/dist/operations/mutation/origin.d.ts +21 -0
- package/dist/operations/mutation/origin.d.ts.map +1 -0
- package/dist/operations/mutation/origin.js +78 -0
- package/dist/operations/mutation/plan-apply-journal.d.ts +182 -0
- package/dist/operations/mutation/plan-apply-journal.d.ts.map +1 -0
- package/dist/operations/mutation/plan-apply-journal.js +613 -0
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +3 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -1
- package/dist/operations/mutation/predicate-vocabulary-guard.js +13 -2
- package/dist/operations/mutation/relationships.d.ts +5 -5
- package/dist/operations/mutation/relationships.d.ts.map +1 -1
- package/dist/operations/mutation/relationships.js +31 -11
- package/dist/operations/mutation/serialization.d.ts.map +1 -1
- package/dist/operations/mutation/serialization.js +3 -1
- 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 +7 -1
- package/dist/operations/mutation/types.d.ts +14 -0
- package/dist/operations/mutation/types.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.d.ts +30 -3
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +105 -35
- package/dist/operations/mutation/validate-upsert.d.ts +6 -0
- package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
- package/dist/operations/mutation/validate-upsert.js +34 -30
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +751 -144
- package/dist/operations/planning/compile-intent.d.ts +34 -1
- package/dist/operations/planning/compile-intent.d.ts.map +1 -1
- package/dist/operations/planning/compile-intent.js +314 -98
- package/dist/operations/proof/code-scope.d.ts +28 -0
- package/dist/operations/proof/code-scope.d.ts.map +1 -1
- package/dist/operations/proof/code-scope.js +72 -0
- package/dist/operations/proof/compact-receipts.d.ts +49 -0
- package/dist/operations/proof/compact-receipts.d.ts.map +1 -0
- package/dist/operations/proof/compact-receipts.js +160 -0
- package/dist/operations/proof/ingest-proof.d.ts +2 -0
- package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
- package/dist/operations/proof/ingest-proof.js +44 -23
- package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
- package/dist/operations/proof/prune-receipts.js +5 -9
- package/dist/operations/proof/receipt-compaction.d.ts +48 -0
- package/dist/operations/proof/receipt-compaction.d.ts.map +1 -0
- package/dist/operations/proof/receipt-compaction.js +121 -0
- package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analysis-receipt.js +12 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts +2 -1
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +51 -5
- 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 +11 -1
- package/dist/operations/semantic-advisor/conditional-rules.d.ts +33 -0
- package/dist/operations/semantic-advisor/conditional-rules.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/conditional-rules.js +262 -0
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts +3 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.js +14 -6
- package/dist/operations/semantic-advisor/plugin-orchestration.js +1 -1
- package/dist/prolog/codec.d.ts.map +1 -1
- package/dist/prolog/codec.js +2 -1
- package/dist/prolog.d.ts +9 -0
- package/dist/prolog.d.ts.map +1 -1
- package/dist/prolog.js +56 -10
- package/dist/proof/command-test-report.d.ts +74 -0
- package/dist/proof/command-test-report.d.ts.map +1 -0
- package/dist/proof/command-test-report.js +206 -0
- package/dist/public/branch-resolver.d.ts +1 -0
- package/dist/public/branch-resolver.d.ts.map +1 -1
- package/dist/public/branch-resolver.js +1 -0
- package/dist/public/entity-origin.d.ts +69 -0
- package/dist/public/entity-origin.d.ts.map +1 -0
- package/dist/public/entity-origin.js +142 -0
- package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
- package/dist/public/impact/full-kb-quality.js +1 -0
- package/dist/public/impact/requirement-quality.js +1 -1
- package/dist/public/operations/catalog.d.ts +130 -19
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/catalog.js +3 -0
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +8 -0
- package/dist/public/operations/contracts.d.ts +0 -5
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +63 -14
- package/dist/public/operations/discovery-entities.d.ts +15 -0
- package/dist/public/operations/discovery-entities.d.ts.map +1 -1
- package/dist/public/operations/discovery-entities.js +59 -0
- package/dist/public/operations/discovery-executors.d.ts +6 -1
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +65 -6
- package/dist/public/operations/index.d.ts +1 -0
- package/dist/public/operations/index.d.ts.map +1 -1
- package/dist/public/operations/index.js +1 -0
- package/dist/public/operations/migration-plan.d.ts +5 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +26 -1
- package/dist/public/operations/node-ports.d.ts.map +1 -1
- package/dist/public/operations/node-ports.js +24 -3
- package/dist/public/operations/origin-review.d.ts +51 -0
- package/dist/public/operations/origin-review.d.ts.map +1 -0
- package/dist/public/operations/origin-review.js +307 -0
- package/dist/public/operations/predicate-schema-conformance.js +1 -1
- package/dist/public/operations/repair-plan.d.ts.map +1 -1
- package/dist/public/operations/repair-plan.js +4 -0
- package/dist/public/operations/result-envelope.d.ts.map +1 -1
- package/dist/public/operations/result-envelope.js +17 -5
- package/dist/public/operations/runtime-types.d.ts +9 -0
- package/dist/public/operations/runtime-types.d.ts.map +1 -1
- package/dist/public/operations/schema6-check-actions.d.ts +127 -0
- package/dist/public/operations/schema6-check-actions.d.ts.map +1 -0
- package/dist/public/operations/schema6-check-actions.js +575 -0
- package/dist/public/operations/source-path-dangling.d.ts +17 -0
- package/dist/public/operations/source-path-dangling.d.ts.map +1 -0
- package/dist/public/operations/source-path-dangling.js +66 -0
- 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 +15 -1
- package/dist/public/operations/specs/check.d.ts +2 -2
- package/dist/public/operations/specs/check.js +1 -1
- package/dist/public/operations/specs/composite.d.ts +351 -0
- package/dist/public/operations/specs/composite.d.ts.map +1 -0
- package/dist/public/operations/specs/composite.js +96 -0
- package/dist/public/operations/specs/discovery.d.ts +8 -3
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +8 -3
- package/dist/public/operations/specs/modeling.d.ts +2 -2
- package/dist/public/operations/specs/modeling.js +2 -2
- package/dist/public/operations/specs/mutation-schemas.d.ts +73 -8
- package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
- package/dist/public/operations/specs/mutation-schemas.js +43 -7
- package/dist/public/operations/specs/mutation.d.ts +1 -1
- package/dist/public/operations/specs/mutation.js +1 -1
- package/dist/public/operations/specs/planning.d.ts +2 -2
- package/dist/public/operations/specs/planning.js +4 -4
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +13 -26
- package/dist/public/operations/specs/upsert.d.ts +79 -9
- package/dist/public/operations/specs/upsert.d.ts.map +1 -1
- package/dist/public/operations/specs/upsert.js +6 -1
- package/dist/public/operations/types.d.ts +1 -1
- package/dist/public/operations/types.d.ts.map +1 -1
- package/dist/public/proof-receipt.d.ts +1 -0
- package/dist/public/proof-receipt.d.ts.map +1 -1
- package/dist/public/schemas/entity.d.ts.map +1 -1
- package/dist/public/schemas/entity.js +52 -0
- package/dist/public/schemas/relationship.d.ts.map +1 -1
- package/dist/public/schemas/relationship.js +2 -0
- package/dist/public/skills/kibi-bootstrap/SKILL.md +6 -1
- package/dist/public/skills/kibi-bootstrap/resources/bootstrap.md +6 -0
- package/dist/public/skills/kibi-usage/SKILL.md +68 -18
- package/dist/public/skills/kibi-usage/resources/fact-lanes.md +5 -5
- package/dist/public/skills/kibi-usage/resources/kb-improvement.md +1 -1
- package/dist/public/skills/kibi-usage/resources/logic-ir.md +2 -2
- package/dist/public/skills/kibi-usage/resources/operation-access.md +25 -1
- package/dist/public/skills/kibi-usage/resources/ui-requirements.md +4 -4
- package/dist/public/skills/kibi-usage/resources/workflows.md +42 -25
- package/dist/public/telemetry-acceptance.d.ts +58 -2
- package/dist/public/telemetry-acceptance.d.ts.map +1 -1
- package/dist/public/telemetry-acceptance.js +136 -10
- package/dist/public/telemetry-remediation.d.ts.map +1 -1
- package/dist/public/telemetry-remediation.js +26 -10
- package/dist/relationships/shards.d.ts +13 -0
- package/dist/relationships/shards.d.ts.map +1 -1
- package/dist/relationships/shards.js +54 -28
- package/dist/runtime/cli-runtime.d.ts.map +1 -1
- package/dist/runtime/cli-runtime.js +44 -3
- package/dist/runtime/detached-snapshot.d.ts +38 -0
- package/dist/runtime/detached-snapshot.d.ts.map +1 -0
- package/dist/runtime/detached-snapshot.js +92 -0
- package/dist/schemas/entity.schema.json +122 -0
- package/dist/search-answer.d.ts +157 -0
- package/dist/search-answer.d.ts.map +1 -0
- package/dist/search-answer.js +846 -0
- package/dist/traceability/impact-knowledge.d.ts.map +1 -1
- package/dist/traceability/impact-knowledge.js +7 -0
- package/dist/traceability/symbol-extract.js +3 -3
- package/dist/traceability/temp-kb.d.ts.map +1 -1
- package/dist/traceability/temp-kb.js +12 -0
- package/dist/types/entities.d.ts +13 -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/branch-resolver.d.ts +37 -1
- package/dist/utils/branch-resolver.d.ts.map +1 -1
- package/dist/utils/branch-resolver.js +130 -3
- package/dist/utils/repo-relative-path.d.ts +18 -0
- package/dist/utils/repo-relative-path.d.ts.map +1 -0
- package/dist/utils/repo-relative-path.js +58 -0
- package/dist/utils/rule-registry.generated.d.ts +75 -3
- package/dist/utils/rule-registry.generated.d.ts.map +1 -1
- package/dist/utils/rule-registry.generated.js +89 -3
- package/dist/utils/schema-version.d.ts +1 -1
- package/dist/utils/schema-version.d.ts.map +1 -1
- package/dist/utils/schema-version.js +4 -3
- package/dist/utils/strict-modeling.d.ts +1 -1
- package/dist/utils/strict-modeling.d.ts.map +1 -1
- package/dist/utils/strict-modeling.js +23 -3
- package/package.json +3 -3
- package/schema/entities.pl +22 -0
- package/schema/relationships.pl +14 -0
- package/schema/validation.pl +45 -1
- package/src/public/branch-resolver.ts +1 -0
- package/src/public/entity-origin.ts +175 -0
- package/src/public/impact/full-kb-quality.ts +1 -0
- package/src/public/impact/requirement-quality.ts +1 -1
- package/src/public/operations/catalog.ts +3 -0
- package/src/public/operations/check-executor.ts +15 -0
- package/src/public/operations/contracts.ts +75 -15
- package/src/public/operations/discovery-entities.ts +74 -0
- package/src/public/operations/discovery-executors.ts +88 -10
- package/src/public/operations/index.ts +1 -0
- package/src/public/operations/migration-plan.ts +30 -1
- package/src/public/operations/node-ports.ts +24 -3
- package/src/public/operations/origin-review.ts +375 -0
- package/src/public/operations/predicate-schema-conformance.ts +1 -1
- package/src/public/operations/repair-plan.ts +4 -0
- package/src/public/operations/result-envelope.ts +18 -6
- package/src/public/operations/runtime-types.ts +9 -0
- package/src/public/operations/schema6-check-actions.ts +699 -0
- package/src/public/operations/source-path-dangling.ts +81 -0
- package/src/public/operations/specs/check-rules.generated.ts +15 -1
- package/src/public/operations/specs/check.ts +1 -1
- package/src/public/operations/specs/composite.ts +141 -0
- package/src/public/operations/specs/discovery.ts +9 -3
- package/src/public/operations/specs/modeling.ts +2 -2
- package/src/public/operations/specs/mutation-schemas.ts +49 -7
- package/src/public/operations/specs/mutation.ts +1 -1
- package/src/public/operations/specs/planning.ts +4 -4
- package/src/public/operations/specs/reporting.ts +13 -38
- package/src/public/operations/specs/upsert.ts +7 -1
- package/src/public/operations/types.ts +2 -0
- package/src/public/proof-receipt.ts +1 -0
- package/src/public/schemas/entity.ts +57 -0
- package/src/public/schemas/relationship.ts +2 -0
- package/src/public/skills/kibi-bootstrap/SKILL.md +6 -1
- package/src/public/skills/kibi-bootstrap/resources/bootstrap.md +6 -0
- package/src/public/skills/kibi-usage/SKILL.md +68 -18
- package/src/public/skills/kibi-usage/resources/fact-lanes.md +5 -5
- package/src/public/skills/kibi-usage/resources/kb-improvement.md +1 -1
- package/src/public/skills/kibi-usage/resources/logic-ir.md +2 -2
- package/src/public/skills/kibi-usage/resources/operation-access.md +25 -1
- package/src/public/skills/kibi-usage/resources/ui-requirements.md +4 -4
- package/src/public/skills/kibi-usage/resources/workflows.md +42 -25
- package/src/public/telemetry-acceptance-types.d.ts +4 -1
- package/src/public/telemetry-acceptance.ts +204 -10
- package/src/public/telemetry-remediation.ts +39 -10
- package/src/schemas/entity.schema.json +122 -0
- package/src/schemas/relationship.schema.json +2 -0
|
@@ -35,21 +35,22 @@ edits dependency configuration.
|
|
|
35
35
|
|
|
36
36
|
## Choosing a discovery mode
|
|
37
37
|
|
|
38
|
-
`kb_search`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
decide
|
|
38
|
+
`kb_search` defaults to deterministic intent ranking (`rankingMode:
|
|
39
|
+
"intent-v1"`), so a natural-language question is a valid query. Pass
|
|
40
|
+
`rankingMode: "legacy"` for the older lexical ranking. The inputs, not the tool
|
|
41
|
+
name, decide how results are ranked.
|
|
42
42
|
|
|
43
43
|
- **Exact identity** — you already know the ID. Use `kb_query`, not search.
|
|
44
44
|
- **Literal token** — a symbol, file, or error string that appears verbatim.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
Keep the query close to the literal text; `rankingMode: "legacy"` ranks it
|
|
46
|
+
lexically.
|
|
47
|
+
- **Question or behavior** — "what governs how checkout handles a declined
|
|
48
|
+
card?". Ask it directly, and ground it with facets from what you actually
|
|
49
|
+
know:
|
|
48
50
|
|
|
49
51
|
```json
|
|
50
52
|
{
|
|
51
|
-
"query": "declined card during checkout",
|
|
52
|
-
"rankingMode": "intent-v1",
|
|
53
|
+
"query": "what governs a declined card during checkout?",
|
|
53
54
|
"semanticFacets": {
|
|
54
55
|
"actors": ["shopper"],
|
|
55
56
|
"actions": ["pay"],
|
|
@@ -66,7 +67,6 @@ decide the path.
|
|
|
66
67
|
```json
|
|
67
68
|
{
|
|
68
69
|
"query": "checkout total rounding",
|
|
69
|
-
"rankingMode": "intent-v1",
|
|
70
70
|
"sourceLocations": [{ "path": "src/checkout.ts", "symbol": "computeTotal" }]
|
|
71
71
|
}
|
|
72
72
|
```
|
|
@@ -75,8 +75,25 @@ Supply facets only from the request, the code, or prior results. Inventing
|
|
|
75
75
|
facets fabricates evidence and biases ranking. Intent mode abstains below
|
|
76
76
|
`minScore` instead of returning weak matches; an abstention is an explicit
|
|
77
77
|
no-answer, so widen the query or drop to lexical search rather than treating it
|
|
78
|
-
as "nothing exists".
|
|
79
|
-
|
|
78
|
+
as "nothing exists". A literal identifier lookup is still best served
|
|
79
|
+
lexically.
|
|
80
|
+
|
|
81
|
+
On the first page, intent mode also returns an answer layer in `data.answer`
|
|
82
|
+
(`kibi.search-answer.v1`; turn it off with `answer: false`):
|
|
83
|
+
|
|
84
|
+
- `governing` — current requirements matched by the query or linked to a
|
|
85
|
+
matched entity, each with `via` (how it was reached) and its linked `facts`,
|
|
86
|
+
`scenarios`, `tests`, and `adrs`.
|
|
87
|
+
- `rationale` — ADRs that explain the decisions.
|
|
88
|
+
- `notGoverning` — superseded or deprecated requirements, with `supersededBy`
|
|
89
|
+
when known. Never read these as current policy; superseded entities are also
|
|
90
|
+
demoted in the ranked results.
|
|
91
|
+
- `observations` — observation/meta facts, which are notes, not rules.
|
|
92
|
+
- `truncated` and `note` — the layer is size-bounded; an empty `governing`
|
|
93
|
+
list is not evidence that nothing governs the change.
|
|
94
|
+
|
|
95
|
+
The answer layer is graph traversal: discovery, not proof. Use `kb_check` and
|
|
96
|
+
`kb_coverage` for consistency and proof status.
|
|
80
97
|
|
|
81
98
|
Results are summaries by default: identifying metadata, score, reasons, and a
|
|
82
99
|
snippet. Read them to pick candidates, then `kb_query` those IDs for full
|
|
@@ -88,12 +105,12 @@ planning a behavior change; a search receipt is not comprehension.
|
|
|
88
105
|
|
|
89
106
|
The canonical workflow for any KB operation follows this pattern:
|
|
90
107
|
|
|
91
|
-
1. **Discover**: `kb_search` with focused probes; pick the mode above
|
|
108
|
+
1. **Discover**: `kb_search` with focused probes or a direct question; read `data.answer`, and pick the mode above
|
|
92
109
|
2. **Confirm**: `kb_query` for exact IDs and state
|
|
93
110
|
3. **Inspect**: `kb_status` when freshness matters
|
|
94
|
-
4. **Decompose**: `
|
|
95
|
-
5. **Choose per-clause lanes**: strict facts for scalar claims; `
|
|
96
|
-
6. **Preflight**: `
|
|
111
|
+
4. **Decompose**: `kb_model` (`mode: "analyze"`) on the complete normative prose; verify or supply every atomic clause
|
|
112
|
+
5. **Choose per-clause lanes**: strict facts for scalar claims; `kb_model` `mode: "predicates"` for approved ground ontology relations; `kb_model` `mode: "requirement"` with `kibi.logic.v1` for conditions, exceptions, modalities, quantifiers, cardinality, and bounded temporal rules; observation review for ambiguity, nonlogical prose, and ontology gaps
|
|
113
|
+
6. **Preflight**: `kb_upsert` with `dryRun: true` for every intended entity or relationship payload
|
|
97
114
|
7. **Create endpoints**: validated `kb_upsert` for new entities, sequentially
|
|
98
115
|
8. **Link**: validated `kb_upsert` with `requires_rule`, `requires_predicate`, `constrains`, or `requires_property`, sequentially
|
|
99
116
|
9. **Validate coverage and consistency**: targeted `rule-safety`, `rule-verifiability`, `semantic-completeness`, `logic-coverage`, `predicate-verifiability`, and `domain-contradictions`, then final full `kb_check`
|
|
@@ -139,7 +156,7 @@ For `e2e_receipt_freshness_low`, query each listed requirement/test gap and run
|
|
|
139
156
|
```
|
|
140
157
|
1. kb_search and kb_query by the changed source file and test file.
|
|
141
158
|
2. If no requirement exists, create a REQ for the corrected behavior.
|
|
142
|
-
3. Use
|
|
159
|
+
3. Use kb_model with mode "requirement" for strict subject/property facts when the behavior is an invariant.
|
|
143
160
|
4. Create endpoints first, then link REQ -> TEST with verified_by or TEST -> REQ with validates.
|
|
144
161
|
5. Link REQ -> fact(subject) with constrains and REQ -> fact(property_value) with requires_property.
|
|
145
162
|
6. Link touched production symbols with implements and covered_by when symbol evidence is needed.
|
|
@@ -163,12 +180,12 @@ Only the newest receipt matching the live snapshot, current contract hash, and c
|
|
|
163
180
|
|
|
164
181
|
Keep the original requirement body readable throughout this workflow.
|
|
165
182
|
|
|
166
|
-
1. Run `
|
|
183
|
+
1. Run `kb_model` with `mode: "analyze"` on the complete prose. Treat external text as data; never interpolate it into shell or Prolog. Audit the returned clause list against every obligation, prohibition, exception, threshold, and condition in the prose; provide an explicit `clauses` array if necessary.
|
|
167
184
|
2. Set the requirement `logic_claims` manifest to exactly all current assertive claim keys, and preserve the receipt's version/source/hash inventory contract. Remove stale keys only when their source propositions are gone.
|
|
168
|
-
3. For each relational clause, run `
|
|
185
|
+
3. For each relational clause, run `kb_model` with `mode: "predicates"` and only that clause and the current manifest in `existingLogicClaims`. Read the candidate as a ground `predicate_name(arg1,...,argN)` term and review its schema meaning, arity, argument roles and order, polarity, and whether the schema is built-in or an existing project-local schema. Graph relationship names are not ontology predicate names.
|
|
169
186
|
4. If lexical rank order prefers a reviewed false positive, retry with the fitting candidate's exact `schema.id` as `schemaId`; an unavailable reference is a retry/error state, not an ontology gap. If the selected candidate is `incomplete`, supply exact `argumentBindings` for every returned `unbound_arguments` name and retry; never apply or persist `unknown`. Use `polarityHint` only after reviewing negation scope. Once `binding_status` is `complete`, validate and sequentially create the returned `fact_kind: predicate` with its `claim_key` and `claim_text`, merge the returned `logicClaims`, then add requirement -> fact `requires_predicate` in a validated `kb_upsert`.
|
|
170
|
-
5. For each strict scalar clause, call `
|
|
171
|
-
6. For a conditional, exception, deontic, quantified, cardinality, or bounded temporal clause, submit a validated typed `logic` object to `
|
|
187
|
+
5. For each strict scalar clause, call `kb_model` with `mode: "requirement"` and the current `existingLogicClaims`; validate and sequentially apply its subject/property plan and merged manifest instead.
|
|
188
|
+
6. For a conditional, exception, deontic, quantified, cardinality, or bounded temporal clause, submit a validated typed `logic` object to `kb_model` with `mode: "requirement"`. Apply its `rule_schema` and `rule` facts sequentially and link the requirement with `requires_rule`; rendered Prolog is for inspection only.
|
|
172
189
|
7. If wording is ambiguous, a candidate is only a lexical false positive, or no schema/IR interpretation fits, create the advised observation review artifact and apply its returned `relates_to` review anchor when present; report that claim key as unresolved. Use `review:ambiguity` for unresolved interpretation, `review:keyword-false-positive` for a vocabulary match that is not a domain assertion, and `review:ontology-gap` only for a true catalog gap. Define a new `predicate_schema` only when the task explicitly authorizes ontology extension and provides a stable signature.
|
|
173
190
|
8. Read back the requirement, proposition ledger, and all facts. Confirm every manifest key occurs on exactly one intended ground fact/rule, no punctuation variant minted a second claim, and no two claim keys encode the same logical term. Exact query output may represent repeated relationship types as arrays, so inspect every target. Then run `kb_check` with `rule-safety`, `rule-verifiability`, `semantic-completeness`, `logic-coverage`, `predicate-verifiability`, and `domain-contradictions`. Finish with an unfiltered `kb_check`.
|
|
174
191
|
|
|
@@ -183,12 +200,12 @@ On resume after interruption, repeat `kb_query` for exact endpoints and apply on
|
|
|
183
200
|
Optional per-project workflow for recording what the screen should look like. Non-UI projects skip this lane entirely.
|
|
184
201
|
|
|
185
202
|
1. Create a prose `req` holding the full visual description; it is the searchable anchor agents discover before touching a UI file.
|
|
186
|
-
2. Run `
|
|
187
|
-
3. For relational layout clauses ("X must remain visually aligned with Y"), call `
|
|
188
|
-
4. For scalar placement, alignment, and ordering clauses, call `
|
|
203
|
+
2. Run `kb_model` with `mode: "analyze"` on the description; audit or supply `clauses`.
|
|
204
|
+
3. For relational layout clauses ("X must remain visually aligned with Y"), call `kb_model` with `mode: "predicates"`, apply the returned `fact_kind: predicate` plan with `predicate_name: visual_layout_rule` and `requires_predicate`.
|
|
205
|
+
4. For scalar placement, alignment, and ordering clauses, call `kb_model` with `mode: "requirement"` and apply strict `fact_kind: subject` / `fact_kind: property_value` facts linked with `constrains` / `requires_property`. Model header order as indexed property keys (`nav_order_1`, `nav_order_2`, ...) against one subject region.
|
|
189
206
|
5. Preserve `claim_key` / `claim_text` on every ground fact and merge every key into the requirement `logic_claims` manifest.
|
|
190
207
|
6. Model UI components as `symbol` entities with `sourceFile` and `symbol_role: behavioral`, linked `implements` to the requirement.
|
|
191
|
-
7. `
|
|
208
|
+
7. `kb_upsert` with `dryRun: true`, create endpoints first, then sequential `kb_upsert`. Run `kb_check` with `logic-coverage`, `predicate-verifiability`, and `domain-contradictions`, then a final unfiltered `kb_check`.
|
|
192
209
|
|
|
193
210
|
Incompatible values on the same subject/property from two current requirements are rejected on write; change an intentional value via a replacement requirement linked with `supersedes`. Full payloads are in `resources/ui-requirements.md`.
|
|
194
211
|
|
|
@@ -10,21 +10,77 @@ export declare const DEFAULT_TELEMETRY_ACCEPTANCE_POLICY: {
|
|
|
10
10
|
readonly telemetryCompletenessMinimum: 0.95;
|
|
11
11
|
readonly validationBeforeUpsertMinimum: 1;
|
|
12
12
|
readonly advisorBeforeRequirementWriteMinimum: 1;
|
|
13
|
+
readonly lookupBeforeFirstEditMinimum: 1;
|
|
13
14
|
readonly sourceLookupZeroResultMaximum: 0.2;
|
|
14
15
|
readonly preflightMaxAgeSeconds: number;
|
|
15
16
|
readonly advisorMaxAgeSeconds: number;
|
|
16
17
|
readonly repeatedMutationFailureThreshold: 3;
|
|
17
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* A row written by a host plugin hook (`interface: "hook"`). Hooks record
|
|
21
|
+
* agent activity around Kibi calls: which Kibi operation a tool call ran
|
|
22
|
+
* (`hook_action: "kb_usage"`) and which files an edit tool changed, with the
|
|
23
|
+
* requirements those files' symbols implement (`hook_action: "edited"`).
|
|
24
|
+
*/
|
|
25
|
+
export interface TelemetryHookEvent extends TelemetryUsageEvent {
|
|
26
|
+
readonly interface?: string;
|
|
27
|
+
readonly host?: string;
|
|
28
|
+
readonly hook_action?: string;
|
|
29
|
+
readonly path?: string | null;
|
|
30
|
+
readonly requirement_ids?: readonly string[];
|
|
31
|
+
readonly kb_operation?: string | null;
|
|
32
|
+
}
|
|
33
|
+
/** A host hook row and where it sits relative to the operation events. */
|
|
34
|
+
export interface TelemetryHookRow {
|
|
35
|
+
readonly event: TelemetryHookEvent;
|
|
36
|
+
/** 1-based `.kb/usage.log` line (array position for in-memory events). */
|
|
37
|
+
readonly logLine: number;
|
|
38
|
+
/** Operation events that precede this row in the log. */
|
|
39
|
+
readonly operationsBefore: number;
|
|
40
|
+
}
|
|
41
|
+
/** Operation events and host hook rows of one usage log, kept apart. */
|
|
42
|
+
export interface TelemetryUsagePartition {
|
|
43
|
+
readonly operations: readonly TelemetryUsageEvent[];
|
|
44
|
+
/** 1-based `.kb/usage.log` line of each operation event. */
|
|
45
|
+
readonly operationLines: readonly number[];
|
|
46
|
+
readonly hookRows: readonly TelemetryHookRow[];
|
|
47
|
+
}
|
|
18
48
|
/**
|
|
19
49
|
* Parse Kibi operation events from `.kb/usage.log`.
|
|
20
50
|
*
|
|
21
51
|
* Host plugin hooks share the log and tag their rows `interface: "hook"`.
|
|
22
52
|
* Those rows describe agent activity around Kibi calls, not Kibi operations,
|
|
23
|
-
* so they are
|
|
24
|
-
* operation out of the bounded acceptance window.
|
|
53
|
+
* so they are left out of the returned array: otherwise a busy editing
|
|
54
|
+
* session would push every operation out of the bounded acceptance window.
|
|
55
|
+
* They stay attached to the array for `partitionTelemetryUsage`, which is how
|
|
56
|
+
* the `lookup_before_first_edit` metric reads them.
|
|
25
57
|
*/
|
|
26
58
|
export declare function parseTelemetryUsageLog(contents: string): TelemetryUsageEvent[];
|
|
59
|
+
/**
|
|
60
|
+
* Split events into Kibi operations and host hook rows. Arrays from
|
|
61
|
+
* `parseTelemetryUsageLog` carry their hook rows and log lines; any other
|
|
62
|
+
* array is split on `interface: "hook"`, with positions as line numbers.
|
|
63
|
+
*/
|
|
64
|
+
export declare function partitionTelemetryUsage(events: readonly TelemetryUsageEvent[]): TelemetryUsagePartition;
|
|
27
65
|
export declare function thresholdStatus(actual: number | undefined, operator: ">=" | "<=" | "<", expected: number): TelemetryMetricStatus;
|
|
66
|
+
/** Kibi operations that count as looking up requirements before an edit. */
|
|
67
|
+
export declare const LOOKUP_BEFORE_EDIT_OPERATIONS: readonly ["kb_query", "kb_search"];
|
|
68
|
+
/** The first requirement-linked edit of one host session. */
|
|
69
|
+
export interface FirstLinkedEdit {
|
|
70
|
+
/** `<host>:<session_id>` of the session. */
|
|
71
|
+
readonly session: string;
|
|
72
|
+
readonly edit: TelemetryHookRow;
|
|
73
|
+
/** True when kb_search or kb_query ran earlier in the same session. */
|
|
74
|
+
readonly lookedUp: boolean;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* For each host session, its first edit of a file whose symbols implement a
|
|
78
|
+
* requirement and whether a Kibi lookup (MCP or CLI) preceded it. Rows
|
|
79
|
+
* without a session id cannot be ordered within a session and are skipped;
|
|
80
|
+
* sessions whose first linked edit predates the evaluated window are left
|
|
81
|
+
* out.
|
|
82
|
+
*/
|
|
83
|
+
export declare function firstLinkedEdits(hookRows: readonly TelemetryHookRow[], recentStart: number): FirstLinkedEdit[];
|
|
28
84
|
export declare function analyzeTelemetryAcceptance(events: readonly TelemetryUsageEvent[], now?: Date, policy?: TelemetryAcceptancePolicy): TelemetryAcceptanceReport;
|
|
29
85
|
export declare function createTelemetryAcceptanceDiagnostics(report: TelemetryAcceptanceReport): readonly QualityDiagnostic[];
|
|
30
86
|
//# sourceMappingURL=telemetry-acceptance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry-acceptance.d.ts","sourceRoot":"","sources":["../../src/public/telemetry-acceptance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAEV,yBAAyB,EACzB,yBAAyB,EAGzB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,4BAA4B,EACvC,8BAAuC,CAAC;AAE1C,eAAO,MAAM,mCAAmC
|
|
1
|
+
{"version":3,"file":"telemetry-acceptance.d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: 1,
|
|
10
|
+
lookupBeforeFirstEditMinimum: 1,
|
|
10
11
|
sourceLookupZeroResultMaximum: 0.2,
|
|
11
12
|
preflightMaxAgeSeconds: 60 * 60,
|
|
12
13
|
advisorMaxAgeSeconds: 24 * 60 * 60,
|
|
@@ -15,16 +16,26 @@ export const DEFAULT_TELEMETRY_ACCEPTANCE_POLICY = {
|
|
|
15
16
|
function isRecord(value) {
|
|
16
17
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Hook rows and line numbers of every array `parseTelemetryUsageLog`
|
|
21
|
+
* returned. The array itself keeps its operation-only shape, so callers that
|
|
22
|
+
* pass it straight to the analyzers need no change.
|
|
23
|
+
*/
|
|
24
|
+
const parsedUsageLogs = new WeakMap();
|
|
18
25
|
/**
|
|
19
26
|
* Parse Kibi operation events from `.kb/usage.log`.
|
|
20
27
|
*
|
|
21
28
|
* Host plugin hooks share the log and tag their rows `interface: "hook"`.
|
|
22
29
|
* Those rows describe agent activity around Kibi calls, not Kibi operations,
|
|
23
|
-
* so they are
|
|
24
|
-
* operation out of the bounded acceptance window.
|
|
30
|
+
* so they are left out of the returned array: otherwise a busy editing
|
|
31
|
+
* session would push every operation out of the bounded acceptance window.
|
|
32
|
+
* They stay attached to the array for `partitionTelemetryUsage`, which is how
|
|
33
|
+
* the `lookup_before_first_edit` metric reads them.
|
|
25
34
|
*/
|
|
26
35
|
export function parseTelemetryUsageLog(contents) {
|
|
27
36
|
const events = [];
|
|
37
|
+
const operationLines = [];
|
|
38
|
+
const hookRows = [];
|
|
28
39
|
for (const [index, line] of contents.split(/\r?\n/).entries()) {
|
|
29
40
|
const trimmed = line.trim();
|
|
30
41
|
if (!trimmed)
|
|
@@ -40,12 +51,48 @@ export function parseTelemetryUsageLog(contents) {
|
|
|
40
51
|
if (!isRecord(parsed)) {
|
|
41
52
|
throw new Error(`Failed to parse .kb/usage.log line ${index + 1}: expected object`);
|
|
42
53
|
}
|
|
43
|
-
if (parsed.interface === "hook")
|
|
54
|
+
if (parsed.interface === "hook") {
|
|
55
|
+
hookRows.push({
|
|
56
|
+
event: parsed,
|
|
57
|
+
logLine: index + 1,
|
|
58
|
+
operationsBefore: events.length,
|
|
59
|
+
});
|
|
44
60
|
continue;
|
|
61
|
+
}
|
|
45
62
|
events.push(parsed);
|
|
63
|
+
operationLines.push(index + 1);
|
|
46
64
|
}
|
|
65
|
+
parsedUsageLogs.set(events, { operationLines, hookRows });
|
|
47
66
|
return events;
|
|
48
67
|
}
|
|
68
|
+
// implements REQ-kibi-telemetry-acceptance-gate-v2, REQ-claude-hook-usage-telemetry-v2
|
|
69
|
+
/**
|
|
70
|
+
* Split events into Kibi operations and host hook rows. Arrays from
|
|
71
|
+
* `parseTelemetryUsageLog` carry their hook rows and log lines; any other
|
|
72
|
+
* array is split on `interface: "hook"`, with positions as line numbers.
|
|
73
|
+
*/
|
|
74
|
+
export function partitionTelemetryUsage(events) {
|
|
75
|
+
const parsed = parsedUsageLogs.get(events);
|
|
76
|
+
if (parsed !== undefined)
|
|
77
|
+
return { operations: events, ...parsed };
|
|
78
|
+
const operations = [];
|
|
79
|
+
const operationLines = [];
|
|
80
|
+
const hookRows = [];
|
|
81
|
+
for (const [index, event] of events.entries()) {
|
|
82
|
+
if (event.interface === "hook") {
|
|
83
|
+
hookRows.push({
|
|
84
|
+
event: event,
|
|
85
|
+
logLine: index + 1,
|
|
86
|
+
operationsBefore: operations.length,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
operations.push(event);
|
|
91
|
+
operationLines.push(index + 1);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return { operations, operationLines, hookRows };
|
|
95
|
+
}
|
|
49
96
|
function eventArgs(event) {
|
|
50
97
|
return event.business_args ?? event.args ?? {};
|
|
51
98
|
}
|
|
@@ -261,6 +308,77 @@ function advisorBeforeRequirementWriteMetric(all, recentStart, policy) {
|
|
|
261
308
|
},
|
|
262
309
|
};
|
|
263
310
|
}
|
|
311
|
+
// implements REQ-kibi-telemetry-acceptance-gate-v2
|
|
312
|
+
/** Kibi operations that count as looking up requirements before an edit. */
|
|
313
|
+
export const LOOKUP_BEFORE_EDIT_OPERATIONS = ["kb_query", "kb_search"];
|
|
314
|
+
function hookSession(event) {
|
|
315
|
+
const sessionId = event.session_id;
|
|
316
|
+
if (typeof sessionId !== "string" || sessionId.length === 0)
|
|
317
|
+
return undefined;
|
|
318
|
+
return `${event.host ?? "unknown"}:${sessionId}`;
|
|
319
|
+
}
|
|
320
|
+
// implements REQ-kibi-telemetry-acceptance-gate-v2, REQ-claude-hook-usage-telemetry-v2
|
|
321
|
+
/**
|
|
322
|
+
* For each host session, its first edit of a file whose symbols implement a
|
|
323
|
+
* requirement and whether a Kibi lookup (MCP or CLI) preceded it. Rows
|
|
324
|
+
* without a session id cannot be ordered within a session and are skipped;
|
|
325
|
+
* sessions whose first linked edit predates the evaluated window are left
|
|
326
|
+
* out.
|
|
327
|
+
*/
|
|
328
|
+
export function firstLinkedEdits(hookRows, recentStart) {
|
|
329
|
+
const lookedUp = new Set();
|
|
330
|
+
const edited = new Set();
|
|
331
|
+
const firstEdits = [];
|
|
332
|
+
for (const row of hookRows) {
|
|
333
|
+
const session = hookSession(row.event);
|
|
334
|
+
if (session === undefined)
|
|
335
|
+
continue;
|
|
336
|
+
const { hook_action: action, kb_operation: operation } = row.event;
|
|
337
|
+
if (action === "kb_usage" &&
|
|
338
|
+
LOOKUP_BEFORE_EDIT_OPERATIONS.some((candidate) => candidate === operation)) {
|
|
339
|
+
lookedUp.add(session);
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
if (action !== "edited" ||
|
|
343
|
+
edited.has(session) ||
|
|
344
|
+
!Array.isArray(row.event.requirement_ids) ||
|
|
345
|
+
row.event.requirement_ids.length === 0) {
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
edited.add(session);
|
|
349
|
+
if (row.operationsBefore < recentStart)
|
|
350
|
+
continue;
|
|
351
|
+
firstEdits.push({ session, edit: row, lookedUp: lookedUp.has(session) });
|
|
352
|
+
}
|
|
353
|
+
return firstEdits;
|
|
354
|
+
}
|
|
355
|
+
function lookupBeforeFirstEditMetric(hookRows, recentStart, policy) {
|
|
356
|
+
const firstEdits = firstLinkedEdits(hookRows, recentStart);
|
|
357
|
+
const attempts = firstEdits.length;
|
|
358
|
+
const guided = firstEdits.filter((entry) => entry.lookedUp).length;
|
|
359
|
+
const unguidedEditPaths = new Set(firstEdits
|
|
360
|
+
.filter((entry) => !entry.lookedUp)
|
|
361
|
+
.map((entry) => entry.edit.event.path ?? "unknown path"));
|
|
362
|
+
const actual = rate(guided, attempts);
|
|
363
|
+
return {
|
|
364
|
+
id: "lookup_before_first_edit",
|
|
365
|
+
status: thresholdStatus(actual, ">=", policy.lookupBeforeFirstEditMinimum),
|
|
366
|
+
numerator: guided,
|
|
367
|
+
denominator: attempts,
|
|
368
|
+
...(actual !== undefined ? { rate: actual } : {}),
|
|
369
|
+
threshold: {
|
|
370
|
+
operator: ">=",
|
|
371
|
+
value: policy.lookupBeforeFirstEditMinimum,
|
|
372
|
+
},
|
|
373
|
+
message: attempts === 0
|
|
374
|
+
? "No host hook recorded an edit of a requirement-linked file in the evaluated window."
|
|
375
|
+
: `${guided}/${attempts} sessions ran kb_search or kb_query before their first edit of a requirement-linked file.`,
|
|
376
|
+
evidence: {
|
|
377
|
+
unguidedEditPaths: [...unguidedEditPaths].sort().slice(0, 20),
|
|
378
|
+
lookupOperations: [...LOOKUP_BEFORE_EDIT_OPERATIONS],
|
|
379
|
+
},
|
|
380
|
+
};
|
|
381
|
+
}
|
|
264
382
|
function sourceLookupMessage(zeroResults, lookups, unobservable) {
|
|
265
383
|
const unreadable = unobservable > 0
|
|
266
384
|
? `${unobservable} source-linked lookups recorded no readable result count.`
|
|
@@ -462,7 +580,8 @@ function reportStatus(metrics, fresh) {
|
|
|
462
580
|
return "passed";
|
|
463
581
|
}
|
|
464
582
|
export function analyzeTelemetryAcceptance(events, now = new Date(), policy = DEFAULT_TELEMETRY_ACCEPTANCE_POLICY) {
|
|
465
|
-
const
|
|
583
|
+
const { operations, hookRows } = partitionTelemetryUsage(events);
|
|
584
|
+
const all = operations.map((event, index) => ({
|
|
466
585
|
event,
|
|
467
586
|
index,
|
|
468
587
|
time: timestampMillis(event.timestamp),
|
|
@@ -483,15 +602,16 @@ export function analyzeTelemetryAcceptance(events, now = new Date(), policy = DE
|
|
|
483
602
|
telemetryCompletenessMetric(recent, policy),
|
|
484
603
|
advisorBeforeRequirementWriteMetric(all, recentStart, policy),
|
|
485
604
|
validationBeforeUpsertMetric(all, recentStart, policy),
|
|
605
|
+
lookupBeforeFirstEditMetric(hookRows, recentStart, policy),
|
|
486
606
|
sourceLookupMetric(recent, policy),
|
|
487
607
|
proofGapRecoveryMetric(recent),
|
|
488
608
|
receiptFreshnessMetric(recent),
|
|
489
609
|
repeatedMutationFailuresMetric(recent, policy),
|
|
490
610
|
];
|
|
491
611
|
const diagnostics = [];
|
|
492
|
-
if (
|
|
612
|
+
if (operations.length === 0)
|
|
493
613
|
diagnostics.push("usage_log_empty");
|
|
494
|
-
if (lastTime === null &&
|
|
614
|
+
if (lastTime === null && operations.length > 0) {
|
|
495
615
|
diagnostics.push("usage_log_timestamps_unavailable");
|
|
496
616
|
}
|
|
497
617
|
else if (!fresh) {
|
|
@@ -505,9 +625,9 @@ export function analyzeTelemetryAcceptance(events, now = new Date(), policy = DE
|
|
|
505
625
|
evaluatedAt: now.toISOString(),
|
|
506
626
|
policy,
|
|
507
627
|
scope: {
|
|
508
|
-
totalEvents:
|
|
628
|
+
totalEvents: operations.length,
|
|
509
629
|
evaluatedEvents: recent.length,
|
|
510
|
-
truncated:
|
|
630
|
+
truncated: operations.length > recent.length,
|
|
511
631
|
firstTimestamp: firstTime === null ? null : new Date(firstTime).toISOString(),
|
|
512
632
|
lastTimestamp: lastTime === null ? null : new Date(lastTime).toISOString(),
|
|
513
633
|
evidenceAgeSeconds: ageSeconds,
|
|
@@ -528,13 +648,19 @@ const METRIC_DIAGNOSTICS = {
|
|
|
528
648
|
id: "semantic_advisor_bypassed",
|
|
529
649
|
severity: "warning",
|
|
530
650
|
rank: 30,
|
|
531
|
-
suggestion: "Run
|
|
651
|
+
suggestion: "Run kb_model with mode analyze (CLI: semantic-advisor) on the complete current requirement prose before its next upsert, preserve the returned source hash, and recheck telemetry.",
|
|
532
652
|
},
|
|
533
653
|
validation_before_upsert: {
|
|
534
654
|
id: "mutation_validation_bypassed",
|
|
535
655
|
severity: "warning",
|
|
536
656
|
rank: 20,
|
|
537
|
-
suggestion: "Run
|
|
657
|
+
suggestion: "Run kb_upsert with dryRun true (CLI: validate-upsert) for the exact payload no more than one hour before each sequential kb_upsert attempt.",
|
|
658
|
+
},
|
|
659
|
+
lookup_before_first_edit: {
|
|
660
|
+
id: "lookup_before_first_edit_bypassed",
|
|
661
|
+
severity: "warning",
|
|
662
|
+
rank: 35,
|
|
663
|
+
suggestion: "Before a session's first edit of a requirement-linked file, run kb_search for the change (or kb_query with sourceFile for the file) and read the requirements it names; host hook rows in diagnostic mode record the order.",
|
|
538
664
|
},
|
|
539
665
|
source_lookup_zero_result_rate: {
|
|
540
666
|
id: "source_lookup_zero_result_rate_high",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry-remediation.d.ts","sourceRoot":"","sources":["../../src/public/telemetry-remediation.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"telemetry-remediation.d.ts","sourceRoot":"","sources":["../../src/public/telemetry-remediation.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAIzB,MAAM,2BAA2B,CAAC;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wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,SAAS,mBAAmB,EAAE,EACtC,GAAG,GAAE,IAAiB,EACtB,MAAM,GAAE,yBAA+D,GACtE,0BAA0B,CA6R5B"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { diagnosticMutationFingerprint } from "./diagnostic-usage.js";
|
|
2
|
-
import { DEFAULT_TELEMETRY_ACCEPTANCE_POLICY, analyzeTelemetryAcceptance, } from "./telemetry-acceptance.js";
|
|
2
|
+
import { DEFAULT_TELEMETRY_ACCEPTANCE_POLICY, analyzeTelemetryAcceptance, firstLinkedEdits, partitionTelemetryUsage, } from "./telemetry-acceptance.js";
|
|
3
3
|
export const TELEMETRY_REMEDIATION_VERSION = "kibi.telemetry-remediation.v1";
|
|
4
4
|
const RANKS = {
|
|
5
5
|
repeated_mutation_failures: 10,
|
|
6
6
|
validation_before_upsert: 20,
|
|
7
7
|
advisor_before_requirement_write: 30,
|
|
8
|
+
lookup_before_first_edit: 35,
|
|
8
9
|
e2e_receipt_freshness: 40,
|
|
9
10
|
proof_gap_recovery: 50,
|
|
10
11
|
source_lookup_zero_result_rate: 60,
|
|
@@ -66,7 +67,7 @@ function target(event) {
|
|
|
66
67
|
}
|
|
67
68
|
function reference(entry) {
|
|
68
69
|
return {
|
|
69
|
-
logLine: entry.
|
|
70
|
+
logLine: entry.logLine,
|
|
70
71
|
requestId: entry.event.request_id ?? null,
|
|
71
72
|
timestamp: entry.event.timestamp ?? null,
|
|
72
73
|
tool: entry.event.tool ?? null,
|
|
@@ -76,7 +77,7 @@ function reference(entry) {
|
|
|
76
77
|
}
|
|
77
78
|
function eventItem(metric, entry, itemTarget, reason, action) {
|
|
78
79
|
return {
|
|
79
|
-
id: `${metric}:line-${entry.
|
|
80
|
+
id: `${metric}:line-${entry.logLine}:${itemTarget}`,
|
|
80
81
|
rank: RANKS[metric],
|
|
81
82
|
metric,
|
|
82
83
|
scope: "event",
|
|
@@ -104,13 +105,16 @@ function isActionable(acceptance, metric) {
|
|
|
104
105
|
}
|
|
105
106
|
export function buildTelemetryRemediationReport(events, now = new Date(), policy = DEFAULT_TELEMETRY_ACCEPTANCE_POLICY) {
|
|
106
107
|
const acceptance = analyzeTelemetryAcceptance(events, now, policy);
|
|
107
|
-
const
|
|
108
|
+
const { operations, operationLines, hookRows } = partitionTelemetryUsage(events);
|
|
109
|
+
const timeOf = (event) => event.timestamp === undefined ||
|
|
110
|
+
!Number.isFinite(Date.parse(event.timestamp))
|
|
111
|
+
? null
|
|
112
|
+
: Date.parse(event.timestamp);
|
|
113
|
+
const all = operations.map((event, index) => ({
|
|
108
114
|
event,
|
|
109
115
|
index,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
? null
|
|
113
|
-
: Date.parse(event.timestamp),
|
|
116
|
+
logLine: operationLines[index] ?? index + 1,
|
|
117
|
+
time: timeOf(event),
|
|
114
118
|
}));
|
|
115
119
|
const recentStart = Math.max(0, all.length - policy.eventLimit);
|
|
116
120
|
const recent = all.slice(recentStart);
|
|
@@ -142,7 +146,7 @@ export function buildTelemetryRemediationReport(events, now = new Date(), policy
|
|
|
142
146
|
const match = (preflights.get(fingerprint(entry.event)) ?? []).findLast((candidate) => compatible(candidate.event, entry.event) &&
|
|
143
147
|
withinAge(candidate.time, entry.time, policy.preflightMaxAgeSeconds));
|
|
144
148
|
if (match === undefined) {
|
|
145
|
-
items.push(eventItem("validation_before_upsert", entry, target(entry.event), "No recent successful preflight matches this exact payload and correlation context.", "Run
|
|
149
|
+
items.push(eventItem("validation_before_upsert", entry, target(entry.event), "No recent successful preflight matches this exact payload and correlation context.", "Run kb_upsert with dryRun true (CLI: validate-upsert) for this exact payload in the same session/actor context before retrying once."));
|
|
146
150
|
}
|
|
147
151
|
}
|
|
148
152
|
}
|
|
@@ -176,10 +180,22 @@ export function buildTelemetryRemediationReport(events, now = new Date(), policy
|
|
|
176
180
|
entry.event.semantic_source_hash) &&
|
|
177
181
|
withinAge(candidate.time, entry.time, policy.advisorMaxAgeSeconds));
|
|
178
182
|
if (match === undefined) {
|
|
179
|
-
items.push(eventItem("advisor_before_requirement_write", entry, requirementId, "No recent semantic-advisor event matches this requirement, source hash, and correlation context.", "Run
|
|
183
|
+
items.push(eventItem("advisor_before_requirement_write", entry, requirementId, "No recent semantic-advisor event matches this requirement, source hash, and correlation context.", "Run kb_model with mode analyze (CLI: semantic-advisor) on the complete prose in the same session/actor context before the next upsert."));
|
|
180
184
|
}
|
|
181
185
|
}
|
|
182
186
|
}
|
|
187
|
+
if (isActionable(acceptance, "lookup_before_first_edit")) {
|
|
188
|
+
for (const { edit, lookedUp } of firstLinkedEdits(hookRows, recentStart)) {
|
|
189
|
+
if (lookedUp)
|
|
190
|
+
continue;
|
|
191
|
+
items.push(eventItem("lookup_before_first_edit", {
|
|
192
|
+
event: edit.event,
|
|
193
|
+
index: edit.operationsBefore,
|
|
194
|
+
logLine: edit.logLine,
|
|
195
|
+
time: timeOf(edit.event),
|
|
196
|
+
}, edit.event.path ?? "unknown path", "This session edited a requirement-linked file before any kb_search or kb_query.", "Before the next edit of this file, run kb_search for the change or kb_query with this sourceFile, and read the requirements it names."));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
183
199
|
if (isActionable(acceptance, "source_lookup_zero_result_rate")) {
|
|
184
200
|
for (const entry of recent) {
|
|
185
201
|
const sourceFile = args(entry.event).sourceFile;
|
|
@@ -30,6 +30,11 @@ export declare function computeShardPath(kbRoot: string, entityId: string): stri
|
|
|
30
30
|
* Throws on parse errors.
|
|
31
31
|
*/
|
|
32
32
|
export declare function readShard(shardPath: string): RelationshipRecord[];
|
|
33
|
+
/**
|
|
34
|
+
* Parses relationship shard text read from `shardPath`.
|
|
35
|
+
* Returns an empty array for blank text. Throws on parse errors.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseShardText(content: string, shardPath: string): RelationshipRecord[];
|
|
33
38
|
/**
|
|
34
39
|
* Writes a relationship shard file.
|
|
35
40
|
* Creates parent directories if needed.
|
|
@@ -65,6 +70,14 @@ export declare function appendRelationship(kbRoot: string, relationship: Omit<Re
|
|
|
65
70
|
shardPath: string;
|
|
66
71
|
recordId: string;
|
|
67
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* The shard text appendRelationship would publish for `relationship`, without
|
|
75
|
+
* writing it: `existing` is the current shard text, or null when the shard
|
|
76
|
+
* file does not exist. Returns null when the shard already records the
|
|
77
|
+
* relationship. Callers that must journal exact after-bytes before any write
|
|
78
|
+
* (atomic plan application) render a shard through this function.
|
|
79
|
+
*/
|
|
80
|
+
export declare function renderShardWithRelationship(shardPath: string, existing: string | null, relationship: Omit<RelationshipRecord, "id">): string | null;
|
|
68
81
|
/**
|
|
69
82
|
* Lists all shard files in the relationships directory.
|
|
70
83
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shards.d.ts","sourceRoot":"","sources":["../../src/relationships/shards.ts"],"names":[],"mappings":"AAwBA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"shards.d.ts","sourceRoot":"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