kibi-cli 2.38.0 → 2.39.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.
Files changed (91) hide show
  1. package/dist/cli-json-command.d.ts.map +1 -1
  2. package/dist/cli-json-command.js +4 -0
  3. package/dist/cli-register-reporting.d.ts.map +1 -1
  4. package/dist/cli-register-reporting.js +1 -0
  5. package/dist/cli.d.ts.map +1 -1
  6. package/dist/cli.js +3 -0
  7. package/dist/commands/coverage.d.ts +1 -0
  8. package/dist/commands/coverage.d.ts.map +1 -1
  9. package/dist/commands/coverage.js +40 -0
  10. package/dist/commands/doctor.d.ts +5 -0
  11. package/dist/commands/doctor.d.ts.map +1 -1
  12. package/dist/commands/doctor.js +14 -0
  13. package/dist/commands/migrate.d.ts.map +1 -1
  14. package/dist/commands/migrate.js +9 -3
  15. package/dist/commands/sync/persistence.d.ts.map +1 -1
  16. package/dist/commands/sync/persistence.js +6 -0
  17. package/dist/extractors/markdown.d.ts +6 -0
  18. package/dist/extractors/markdown.d.ts.map +1 -1
  19. package/dist/extractors/markdown.js +21 -0
  20. package/dist/operations/bootstrap/discovery-evidence.d.ts.map +1 -1
  21. package/dist/operations/bootstrap/discovery-evidence.js +44 -2
  22. package/dist/operations/bootstrap/discovery.d.ts.map +1 -1
  23. package/dist/operations/bootstrap/discovery.js +1 -0
  24. package/dist/operations/proof/explain.d.ts +63 -0
  25. package/dist/operations/proof/explain.d.ts.map +1 -1
  26. package/dist/operations/proof/explain.js +162 -0
  27. package/dist/operations/semantic-advisor/analyze-prose.d.ts +9 -1
  28. package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
  29. package/dist/operations/semantic-advisor/analyze-prose.js +21 -0
  30. package/dist/operations/semantic-advisor/case-preview.d.ts +24 -0
  31. package/dist/operations/semantic-advisor/case-preview.d.ts.map +1 -0
  32. package/dist/operations/semantic-advisor/case-preview.js +216 -0
  33. package/dist/operations/semantic-advisor/shared.d.ts.map +1 -1
  34. package/dist/operations/semantic-advisor/shared.js +3 -0
  35. package/dist/operations/semantic-advisor/types.d.ts +23 -0
  36. package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
  37. package/dist/plugins/approved-source-analyzers.generated.d.ts +11 -8
  38. package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -1
  39. package/dist/plugins/approved-source-analyzers.generated.js +11 -8
  40. package/dist/plugins/source-classification.d.ts +2 -2
  41. package/dist/plugins/source-classification.d.ts.map +1 -1
  42. package/dist/plugins/source-classification.js +25 -1
  43. package/dist/public/operations/catalog.d.ts +31 -1
  44. package/dist/public/operations/catalog.d.ts.map +1 -1
  45. package/dist/public/operations/repair-plan.d.ts +46 -0
  46. package/dist/public/operations/repair-plan.d.ts.map +1 -1
  47. package/dist/public/operations/repair-plan.js +110 -1
  48. package/dist/public/operations/schema6-check-actions.js +1 -1
  49. package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
  50. package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
  51. package/dist/public/operations/specs/check-rules.generated.js +2 -1
  52. package/dist/public/operations/specs/check.d.ts +1 -1
  53. package/dist/public/operations/specs/mutation-schemas.d.ts +30 -0
  54. package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
  55. package/dist/public/operations/specs/mutation-schemas.js +30 -0
  56. package/dist/public/operations/specs/upsert.d.ts +30 -0
  57. package/dist/public/operations/specs/upsert.d.ts.map +1 -1
  58. package/dist/public/schemas/entity.d.ts.map +1 -1
  59. package/dist/public/schemas/entity.js +59 -0
  60. package/dist/public/skills/kibi-commit-review/SKILL.md +6 -2
  61. package/dist/public/skills/kibi-decisions/SKILL.md +7 -2
  62. package/dist/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
  63. package/dist/public/skills/kibi-usage/SKILL.md +9 -1
  64. package/dist/schemas/entity.schema.json +92 -0
  65. package/dist/search-answer.d.ts +3 -2
  66. package/dist/search-answer.d.ts.map +1 -1
  67. package/dist/search-answer.js +56 -3
  68. package/dist/traceability/impact-knowledge.d.ts.map +1 -1
  69. package/dist/traceability/impact-knowledge.js +2 -0
  70. package/dist/traceability/temp-kb.d.ts.map +1 -1
  71. package/dist/traceability/temp-kb.js +11 -1
  72. package/dist/types/entities.d.ts +12 -0
  73. package/dist/types/entities.d.ts.map +1 -1
  74. package/dist/usage-telemetry.d.ts +9 -0
  75. package/dist/usage-telemetry.d.ts.map +1 -1
  76. package/dist/usage-telemetry.js +50 -4
  77. package/dist/utils/rule-registry.generated.d.ts +5 -0
  78. package/dist/utils/rule-registry.generated.d.ts.map +1 -1
  79. package/dist/utils/rule-registry.generated.js +6 -0
  80. package/package.json +3 -3
  81. package/schema/entities.pl +12 -0
  82. package/src/public/operations/repair-plan.ts +152 -1
  83. package/src/public/operations/schema6-check-actions.ts +1 -1
  84. package/src/public/operations/specs/check-rules.generated.ts +2 -1
  85. package/src/public/operations/specs/mutation-schemas.ts +34 -0
  86. package/src/public/schemas/entity.ts +65 -0
  87. package/src/public/skills/kibi-commit-review/SKILL.md +6 -2
  88. package/src/public/skills/kibi-decisions/SKILL.md +7 -2
  89. package/src/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
  90. package/src/public/skills/kibi-usage/SKILL.md +9 -1
  91. package/src/schemas/entity.schema.json +92 -0
@@ -1,9 +1,9 @@
1
1
  export declare const qualifiedSourceAnalyzers: readonly [{
2
2
  readonly packageName: "kibi-plugin-treesitter";
3
- readonly version: "2.0.2";
3
+ readonly version: "2.1.0";
4
4
  readonly files: {
5
- readonly "SBOM.spdx.json": "8027fb0c6b5a9f6f325d6aa836b87c1cddf580df4cfd4c25310bc83c2173de50";
6
- readonly "THIRD_PARTY_NOTICES.md": "0b1ede96cb261dab73fd1ec8c51d7bb5b2492eed0502f6c10ed071736daa263c";
5
+ readonly "SBOM.spdx.json": "ffab8e28376a815906c901348cdc9c31ba566c903e832e1f9808c890a0cab3c2";
6
+ readonly "THIRD_PARTY_NOTICES.md": "fff747633b08a90bf949e998892211702b021c63e3a074ded102700fc447fed3";
7
7
  readonly "assets/queries/bash.scm": "6ca535e8fe652b51203ac272831881dab001f7ac508e50551bc2cdc4a15d7b6c";
8
8
  readonly "assets/queries/c.scm": "774ca67cfe23b0e0d1d3a4f01788049a822beb1311feee72b20a595a37be1e28";
9
9
  readonly "assets/queries/cpp-extra.scm": "7cf486901eaf7e9196bc2c5dfe83785eed70d367136f8008af37eb4f1c12a68a";
@@ -15,6 +15,7 @@ export declare const qualifiedSourceAnalyzers: readonly [{
15
15
  readonly "assets/queries/java-extra.scm": "5ce7857f2b52c10b3672bc09f39f287cff2eaa7caa0b75dafccbaa5fec58431d";
16
16
  readonly "assets/queries/java.scm": "bcb22147b8582d92743fc973864cefb894a4c12b3957f16f3d472b2ec7cd4c49";
17
17
  readonly "assets/queries/php.scm": "4ac5e30f99f3abe5417dcb42219e0790c66f9b4bb3be071bc60160dd012f3cd8";
18
+ readonly "assets/queries/prolog.scm": "df6af374b121bc85ff5b471763b542894ba9602b37f3ec7c17ab70944a7486b1";
18
19
  readonly "assets/queries/python.scm": "d0f3e577878167bfabc30e526e497bce58d1699b9bcabf8ab3a50698efb5ca3e";
19
20
  readonly "assets/queries/ruby.scm": "ed1e7dc07a95b87aef267e7f9715c6717a70f09efbd7b6f48bbd51c7b7510cf3";
20
21
  readonly "assets/queries/rust-extra.scm": "511a492200e813f15b7ebec324eae69a245986a9d6813ddabe776075fd65976c";
@@ -31,14 +32,15 @@ export declare const qualifiedSourceAnalyzers: readonly [{
31
32
  readonly "assets/tree-sitter-python.wasm": "16108b50df4ee9a30168794252ab55e7c93bfc5765d7fa0aa3e335752c515f47";
32
33
  readonly "assets/tree-sitter-ruby.wasm": "09a96427d7c72f0613ed470cd9812223fc4a91d6a9c025c0235cc6bd59ff96f4";
33
34
  readonly "assets/tree-sitter-rust.wasm": "f65f354215611fd94ad34134b3427eb3d58cbb745df7b6509ba722184db73d57";
35
+ readonly "assets/tree-sitter-swi_prolog.wasm": "a9872f0369b51c1eed2ef04267382c34aeaeba7c97b6f55b829fbf625bdb22dd";
34
36
  readonly "assets/tree-sitter-terraform.release.wasm": "59dbcbb0f08eb78b78f37510834559a48ce5c9d4866c978d62c6390796461cb5";
35
- readonly "catalog.json": "585a67f97fbc352f45ebfc628db71ad9f9bd504f1c0b63dfa0f1859a98e9ec02";
36
- readonly "dist/analysis-worker.js": "e62a7aac822837c584b7071d86b04defdbf6e6c40db981beac863672b0f5bb6f";
37
- readonly "dist/catalog.js": "460243c48cb6a03b8c7971273729d8a1134955186978b6c0d04182c71960ebff";
37
+ readonly "catalog.json": "c10f0cd5d1989abb9543c4e385ba44fa226cad4186613791061b56dbda2497a7";
38
+ readonly "dist/analysis-worker.js": "9ef76ad467f6b4e2a117a3b5656838eb5f096890931ec0480566b76b73fd64db";
39
+ readonly "dist/catalog.js": "c485cd1bf81098c3e2e86d37f78bf9f55af122f5d6b9587c0c57b494d68e4968";
38
40
  readonly "dist/extractor.js": "1d8cd819e7ec8fcc291a44e5ffe4ccfe77099301677913fcfe0d92e7ce971f33";
39
41
  readonly "dist/index.js": "adc03d77d94c0133b3188950b35f79db19e447cf7bfa1f7e1cf1f5c97a582a44";
40
42
  readonly "dist/performance-timing.js": "56cce530f627c8fd079e8ec070322f84378ae50c40a6765d88b418850692940b";
41
- readonly "integrity.json": "34b40e997aad777c888ab12a616c2d55423b29c7c54203678edaad055506a347";
43
+ readonly "integrity.json": "fabfc50ba1392b4b0f7b9bf39e714de05d093ebfccdcc2225eb9d1fd84ad9a4e";
42
44
  readonly "licenses/tree-sitter-bash-MIT.txt": "49bf33cf78ef5897e4e161ce1517df7de1ae5042a65b6bcfd44401e0fc606559";
43
45
  readonly "licenses/tree-sitter-c-MIT.txt": "2e0110e07abef7c2548b26ec9d6969775617ca539a0dc8dbeeb14d6452c711d1";
44
46
  readonly "licenses/tree-sitter-c-sharp-MIT.txt": "778fb7d63b8c1844da315648c02f325c4713a6f4a5d19644fd413421422776d3";
@@ -50,8 +52,9 @@ export declare const qualifiedSourceAnalyzers: readonly [{
50
52
  readonly "licenses/tree-sitter-python-MIT.txt": "d724405ce238a22c0d35769c5a36b386ad5958192efe8bbb304fb2896254575f";
51
53
  readonly "licenses/tree-sitter-ruby-MIT.txt": "9c99b99e93d3c6461bef9f6bac45d17b8bf014172625c24f76319bbd235a7b80";
52
54
  readonly "licenses/tree-sitter-rust-MIT.txt": "31d5b6f4243d5c7c6e1c4ebbbb9f6407bd1457a08bcc4f706521710341acba36";
55
+ readonly "licenses/tree-sitter-swi-prolog-MIT.txt": "c51ac4800457c57ddabdee5486605df9452705491f806cb87241b7a8acc7ab2d";
53
56
  readonly "licenses/web-tree-sitter-MIT.txt": "c5cfb43042b6b72045f4ba997834d0a7786d2793d91680868b5815b39f14fc78";
54
- readonly "package.json": "74a2fbbbde092f1c01eebcf5f8e98789e4b6a55b8464a1fc6bbc9767c6a80042";
57
+ readonly "package.json": "5e81c6ce4712add506e576b30d05a80d07a9ad65ba863c2765483b4150687370";
55
58
  };
56
59
  readonly dependencies: readonly [{
57
60
  readonly packageName: "web-tree-sitter";
@@ -1 +1 @@
1
- {"version":3,"file":"approved-source-analyzers.generated.d.ts","sourceRoot":"","sources":["../../src/plugins/approved-source-analyzers.generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmI3B,CAAC"}
1
+ {"version":3,"file":"approved-source-analyzers.generated.d.ts","sourceRoot":"","sources":["../../src/plugins/approved-source-analyzers.generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyI3B,CAAC"}
@@ -4,10 +4,10 @@
4
4
  export const qualifiedSourceAnalyzers = [
5
5
  {
6
6
  packageName: "kibi-plugin-treesitter",
7
- version: "2.0.2",
7
+ version: "2.1.0",
8
8
  files: {
9
- "SBOM.spdx.json": "8027fb0c6b5a9f6f325d6aa836b87c1cddf580df4cfd4c25310bc83c2173de50",
10
- "THIRD_PARTY_NOTICES.md": "0b1ede96cb261dab73fd1ec8c51d7bb5b2492eed0502f6c10ed071736daa263c",
9
+ "SBOM.spdx.json": "ffab8e28376a815906c901348cdc9c31ba566c903e832e1f9808c890a0cab3c2",
10
+ "THIRD_PARTY_NOTICES.md": "fff747633b08a90bf949e998892211702b021c63e3a074ded102700fc447fed3",
11
11
  "assets/queries/bash.scm": "6ca535e8fe652b51203ac272831881dab001f7ac508e50551bc2cdc4a15d7b6c",
12
12
  "assets/queries/c.scm": "774ca67cfe23b0e0d1d3a4f01788049a822beb1311feee72b20a595a37be1e28",
13
13
  "assets/queries/cpp-extra.scm": "7cf486901eaf7e9196bc2c5dfe83785eed70d367136f8008af37eb4f1c12a68a",
@@ -19,6 +19,7 @@ export const qualifiedSourceAnalyzers = [
19
19
  "assets/queries/java-extra.scm": "5ce7857f2b52c10b3672bc09f39f287cff2eaa7caa0b75dafccbaa5fec58431d",
20
20
  "assets/queries/java.scm": "bcb22147b8582d92743fc973864cefb894a4c12b3957f16f3d472b2ec7cd4c49",
21
21
  "assets/queries/php.scm": "4ac5e30f99f3abe5417dcb42219e0790c66f9b4bb3be071bc60160dd012f3cd8",
22
+ "assets/queries/prolog.scm": "df6af374b121bc85ff5b471763b542894ba9602b37f3ec7c17ab70944a7486b1",
22
23
  "assets/queries/python.scm": "d0f3e577878167bfabc30e526e497bce58d1699b9bcabf8ab3a50698efb5ca3e",
23
24
  "assets/queries/ruby.scm": "ed1e7dc07a95b87aef267e7f9715c6717a70f09efbd7b6f48bbd51c7b7510cf3",
24
25
  "assets/queries/rust-extra.scm": "511a492200e813f15b7ebec324eae69a245986a9d6813ddabe776075fd65976c",
@@ -35,14 +36,15 @@ export const qualifiedSourceAnalyzers = [
35
36
  "assets/tree-sitter-python.wasm": "16108b50df4ee9a30168794252ab55e7c93bfc5765d7fa0aa3e335752c515f47",
36
37
  "assets/tree-sitter-ruby.wasm": "09a96427d7c72f0613ed470cd9812223fc4a91d6a9c025c0235cc6bd59ff96f4",
37
38
  "assets/tree-sitter-rust.wasm": "f65f354215611fd94ad34134b3427eb3d58cbb745df7b6509ba722184db73d57",
39
+ "assets/tree-sitter-swi_prolog.wasm": "a9872f0369b51c1eed2ef04267382c34aeaeba7c97b6f55b829fbf625bdb22dd",
38
40
  "assets/tree-sitter-terraform.release.wasm": "59dbcbb0f08eb78b78f37510834559a48ce5c9d4866c978d62c6390796461cb5",
39
- "catalog.json": "585a67f97fbc352f45ebfc628db71ad9f9bd504f1c0b63dfa0f1859a98e9ec02",
40
- "dist/analysis-worker.js": "e62a7aac822837c584b7071d86b04defdbf6e6c40db981beac863672b0f5bb6f",
41
- "dist/catalog.js": "460243c48cb6a03b8c7971273729d8a1134955186978b6c0d04182c71960ebff",
41
+ "catalog.json": "c10f0cd5d1989abb9543c4e385ba44fa226cad4186613791061b56dbda2497a7",
42
+ "dist/analysis-worker.js": "9ef76ad467f6b4e2a117a3b5656838eb5f096890931ec0480566b76b73fd64db",
43
+ "dist/catalog.js": "c485cd1bf81098c3e2e86d37f78bf9f55af122f5d6b9587c0c57b494d68e4968",
42
44
  "dist/extractor.js": "1d8cd819e7ec8fcc291a44e5ffe4ccfe77099301677913fcfe0d92e7ce971f33",
43
45
  "dist/index.js": "adc03d77d94c0133b3188950b35f79db19e447cf7bfa1f7e1cf1f5c97a582a44",
44
46
  "dist/performance-timing.js": "56cce530f627c8fd079e8ec070322f84378ae50c40a6765d88b418850692940b",
45
- "integrity.json": "34b40e997aad777c888ab12a616c2d55423b29c7c54203678edaad055506a347",
47
+ "integrity.json": "fabfc50ba1392b4b0f7b9bf39e714de05d093ebfccdcc2225eb9d1fd84ad9a4e",
46
48
  "licenses/tree-sitter-bash-MIT.txt": "49bf33cf78ef5897e4e161ce1517df7de1ae5042a65b6bcfd44401e0fc606559",
47
49
  "licenses/tree-sitter-c-MIT.txt": "2e0110e07abef7c2548b26ec9d6969775617ca539a0dc8dbeeb14d6452c711d1",
48
50
  "licenses/tree-sitter-c-sharp-MIT.txt": "778fb7d63b8c1844da315648c02f325c4713a6f4a5d19644fd413421422776d3",
@@ -54,8 +56,9 @@ export const qualifiedSourceAnalyzers = [
54
56
  "licenses/tree-sitter-python-MIT.txt": "d724405ce238a22c0d35769c5a36b386ad5958192efe8bbb304fb2896254575f",
55
57
  "licenses/tree-sitter-ruby-MIT.txt": "9c99b99e93d3c6461bef9f6bac45d17b8bf014172625c24f76319bbd235a7b80",
56
58
  "licenses/tree-sitter-rust-MIT.txt": "31d5b6f4243d5c7c6e1c4ebbbb9f6407bd1457a08bcc4f706521710341acba36",
59
+ "licenses/tree-sitter-swi-prolog-MIT.txt": "c51ac4800457c57ddabdee5486605df9452705491f806cb87241b7a8acc7ab2d",
57
60
  "licenses/web-tree-sitter-MIT.txt": "c5cfb43042b6b72045f4ba997834d0a7786d2793d91680868b5815b39f14fc78",
58
- "package.json": "74a2fbbbde092f1c01eebcf5f8e98789e4b6a55b8464a1fc6bbc9767c6a80042",
61
+ "package.json": "5e81c6ce4712add506e576b30d05a80d07a9ad65ba863c2765483b4150687370",
59
62
  },
60
63
  dependencies: [
61
64
  {
@@ -1,11 +1,11 @@
1
1
  export type SourceClassification = Readonly<{
2
2
  kind: "language";
3
3
  language: string;
4
- source: "extension" | "shebang" | "explicit";
4
+ source: "extension" | "shebang" | "explicit" | "content";
5
5
  }> | Readonly<{
6
6
  kind: "file-level";
7
7
  language: string;
8
- source: "extension" | "shebang" | "explicit";
8
+ source: "extension" | "shebang" | "explicit" | "content";
9
9
  reason: string;
10
10
  }> | Readonly<{
11
11
  kind: "ambiguous";
@@ -1 +1 @@
1
- {"version":3,"file":"source-classification.d.ts","sourceRoot":"","sources":["../../src/plugins/source-classification.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,CAAC;IACP,IAAI,EAAE,UAAU,C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AM,GAAG,OAAO,CAM/D;AAED,+EAA+E;AAE/E,wBAAgB,oBAAoB,IAAI,SAAS,MAAM,EAAE,CAExD;AA2RD,qGAAqG;AACrG,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,oBAAoB,CAAC,EAAE,MAAM,GAC5B,oBAAoB,CAiKtB"}
@@ -1,4 +1,5 @@
1
1
  const MAX_SHEBANG_LENGTH = 512;
2
+ const MAX_CONTENT_SNIFF_LENGTH = 65_536;
2
3
  const MAX_SHEBANG_TOKENS = 16;
3
4
  const MAX_TOKEN_LENGTH = 128;
4
5
  const EXTENSIONS = {
@@ -33,6 +34,7 @@ const EXTENSIONS = {
33
34
  ".mjs": { kind: "language", language: "javascript" },
34
35
  ".mts": { kind: "language", language: "typescript" },
35
36
  ".php": { kind: "language", language: "php" },
37
+ ".plt": { kind: "language", language: "prolog" },
36
38
  ".pl": {
37
39
  kind: "ambiguous",
38
40
  language: "perl-or-prolog",
@@ -112,7 +114,6 @@ const FILE_LEVEL_LANGUAGES = new Set([
112
114
  "html",
113
115
  "json",
114
116
  "perl",
115
- "prolog",
116
117
  "shell",
117
118
  "sql",
118
119
  "yaml",
@@ -341,6 +342,24 @@ function shebangFor(content) {
341
342
  }
342
343
  return interpreterFor(words[0]);
343
344
  }
345
+ // Lines only Prolog source starts with: a directive, a clause or DCG rule
346
+ // whose head is an atom or compound term, or a one-line fact.
347
+ const PROLOG_LINE = /^(?::-\s|[a-z][A-Za-z0-9_]*(?:\([^\n]*\))?\s*(?::-|-->)(?:\s|$)|[a-z][A-Za-z0-9_]*\([^\n;]*\)\.[ \t]*(?:%[^\n]*)?$)/m;
348
+ // Lines only Perl source starts with.
349
+ const PERL_LINE = /^(?:\s*use\s+(?:strict|warnings|utf8|[A-Z][\w:]*)\b[^\n]*;|\s*package\s+[A-Za-z_][\w:]*\s*;|\s*sub\s+[A-Za-z_]\w*\s*\{|\s*my\s+[$@%]|=(?:pod|head1)\b|__(?:END|DATA)__$)/m;
350
+ /**
351
+ * Resolves a `.pl` file without a shebang to Prolog or Perl when only one of
352
+ * them matches its leading content. Both or neither leaves it ambiguous.
353
+ */
354
+ // implements REQ-multilingual-language-catalog
355
+ function perlOrPrologByContent(content) {
356
+ const prefix = content.slice(0, MAX_CONTENT_SNIFF_LENGTH);
357
+ const prolog = PROLOG_LINE.test(prefix);
358
+ const perl = PERL_LINE.test(prefix);
359
+ if (prolog === perl)
360
+ return undefined;
361
+ return prolog ? "prolog" : "perl";
362
+ }
344
363
  function classificationForLanguage(language, source) {
345
364
  if (FILE_LEVEL_LANGUAGES.has(language)) {
346
365
  return {
@@ -398,6 +417,11 @@ export function classifySource(filePath, content, explicitLanguageHint) {
398
417
  return classificationForLanguage(explicit, "explicit");
399
418
  }
400
419
  if (extension?.kind === "ambiguous") {
420
+ const contentLanguage = shebang === undefined && extension.language === "perl-or-prolog"
421
+ ? perlOrPrologByContent(content)
422
+ : undefined;
423
+ if (contentLanguage !== undefined)
424
+ return classificationForLanguage(contentLanguage, "content");
401
425
  if (shebang === undefined) {
402
426
  return {
403
427
  kind: "ambiguous",
@@ -1160,6 +1160,16 @@ export declare const OPERATION_CATALOG: readonly [{
1160
1160
  readonly minLength: 1;
1161
1161
  readonly description: "Requirement-only. Optional reference to the exception's approval decision record.";
1162
1162
  };
1163
+ readonly failure_side_waiver: {
1164
+ readonly type: "string";
1165
+ readonly minLength: 1;
1166
+ readonly description: "Requirement-only. Why the requirement has no failure side to test (its claims state a capability or output shape). Waives happy_path_only once failure_side_waiver_approved_by is set.";
1167
+ };
1168
+ readonly failure_side_waiver_approved_by: {
1169
+ readonly type: "string";
1170
+ readonly minLength: 1;
1171
+ readonly description: "Requirement-only. The person who accepted failure_side_waiver.";
1172
+ };
1163
1173
  readonly firmness: {
1164
1174
  readonly type: "string";
1165
1175
  readonly enum: readonly ["firm", "default", "exploratory"];
@@ -1862,6 +1872,26 @@ export declare const OPERATION_CATALOG: readonly [{
1862
1872
  readonly type: "string";
1863
1873
  readonly description: "Exact atomic requirement clause represented by this fact, retained for human audit. On a grounding fact Kibi derives claim_key from it; an observation or meta fact quotes the clause it is about without a key.";
1864
1874
  };
1875
+ readonly dimension_waiver: {
1876
+ readonly type: "string";
1877
+ readonly minLength: 1;
1878
+ readonly description: "Fact-only. Why the quantifier word in claim_text ranges over nothing, so the claim needs no count, set or rule. Waives dimension_unrepresented once dimension_waiver_approved_by is set.";
1879
+ };
1880
+ readonly dimension_waiver_approved_by: {
1881
+ readonly type: "string";
1882
+ readonly minLength: 1;
1883
+ readonly description: "Fact-only. The person who accepted dimension_waiver.";
1884
+ };
1885
+ readonly case_waiver: {
1886
+ readonly type: "string";
1887
+ readonly minLength: 1;
1888
+ readonly description: "Fact-only. Why the edge cases derived from this fact are covered some other way or cannot occur. Waives uncovered_case once case_waiver_approved_by is set.";
1889
+ };
1890
+ readonly case_waiver_approved_by: {
1891
+ readonly type: "string";
1892
+ readonly minLength: 1;
1893
+ readonly description: "Fact-only. The person who accepted case_waiver.";
1894
+ };
1865
1895
  readonly predicate_name: {
1866
1896
  readonly type: "string";
1867
1897
  readonly description: "Optional predicate name for ontology predicate facts. Prefer kb_model mode predicates before hand-writing predicate_name.";
@@ -2164,7 +2194,7 @@ export declare const OPERATION_CATALOG: readonly [{
2164
2194
  readonly type: "string";
2165
2195
  readonly enum: readonly string[];
2166
2196
  };
2167
- readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
2197
+ readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
2168
2198
  };
2169
2199
  readonly sourceFiles: {
2170
2200
  readonly type: "array";
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/public/operations/catalog.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBe,CAAC;AAyF9C,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,aAAa,GAClB,qBAAqB,CA+BvB;AAQD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,qBAAqB,GAAG,SAAS,EACvC,IAAI,EAAE,aAAa,GAClB,qBAAqB,CAKvB;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,qBAAqB,CAElE;AAGD,wBAAgB,SAAS,IAAI,SAAS,qBAAqB,EAAE,CAE5D"}
@@ -56,6 +56,27 @@ declare const REPAIR_PHASES: {
56
56
  readonly validationRules: readonly ["must-priority-coverage", "no-dangling-refs"];
57
57
  readonly writePolicy: "sequential_upsert";
58
58
  };
59
+ readonly dimension_grounding: {
60
+ readonly order: 64;
61
+ readonly objective: "Ground each quantified claim (each, every, all, or a cardinality bound) on what varies: an integer count or bound, a set of members, a rule over a variable, or a state machine. If the quantifier ranges over nothing, record a dimension_waiver on the grounding fact for a person to approve, and record their approval in the same pull request.";
62
+ readonly workflowSteps: readonly ["kb_model_requirement", "kb_validate_upsert", "kb_upsert", "kb_check"];
63
+ readonly validationRules: readonly ["no-dangling-refs"];
64
+ readonly writePolicy: "sequential_upsert";
65
+ };
66
+ readonly case_scenarios: {
67
+ readonly order: 66;
68
+ readonly objective: "Cover each uncovered rejection case: add a scenario whose assumes fact states the case's assumption (a value past the bound, a value outside the set), expects rejection or error, is linked with specified_by and is verified by a passing end-to-end test. Each repair lists caseSkeletons, upsert-ready draft scenarios and their assumed facts: fill in the placeholders, verify the scenario by a test, then set its status to active (a draft never covers a case). If a person accepts the cases as covered another way, record a case_waiver on the grounding fact for them to approve, and record their approval in the same pull request.";
69
+ readonly workflowSteps: readonly ["kb_coverage", "kb_validate_upsert", "kb_upsert", "kb_check"];
70
+ readonly validationRules: readonly ["scenario-outcome-mismatch", "no-dangling-refs"];
71
+ readonly writePolicy: "sequential_upsert";
72
+ };
73
+ readonly negative_scenarios: {
74
+ readonly order: 65;
75
+ readonly objective: "Add a scenario that expects rejection or error and assumes a value the requirement forbids (see suggestedNegatives), link it with specified_by and verify it with a passing end-to-end test.";
76
+ readonly workflowSteps: readonly ["kb_query", "kb_validate_upsert", "kb_upsert", "kb_check"];
77
+ readonly validationRules: readonly ["scenario-outcome-mismatch", "no-dangling-refs"];
78
+ readonly writePolicy: "sequential_upsert";
79
+ };
59
80
  readonly scenario_tests: {
60
81
  readonly order: 70;
61
82
  readonly objective: "Create or select a test endpoint and link it through the requirement scenario.";
@@ -121,6 +142,31 @@ export type RepairPlanRepair = {
121
142
  readonly proofStage: string;
122
143
  readonly action: string;
123
144
  readonly evidence: Readonly<Record<string, unknown>>;
145
+ /** Draft scenarios for an uncovered_case repair, one per uncovered case. */
146
+ readonly caseSkeletons?: readonly CaseSkeleton[];
147
+ };
148
+ type SkeletonEntity = {
149
+ readonly type: "fact" | "scenario";
150
+ readonly id: string;
151
+ readonly properties: Readonly<Record<string, unknown>>;
152
+ readonly relationships: readonly {
153
+ readonly type: string;
154
+ readonly from: string;
155
+ readonly to: string;
156
+ }[];
157
+ };
158
+ /**
159
+ * An upsert-ready draft scenario for one uncovered case: the fact it assumes
160
+ * (the case's value class) and the scenario that expects the predicted
161
+ * outcome. Drafts never count as coverage, so writing one changes no gap
162
+ * until it is verified and made active. placeholder is true when the value
163
+ * must be chosen by the author (a value outside a set).
164
+ */
165
+ export type CaseSkeleton = {
166
+ readonly caseId: string;
167
+ readonly constraint: string;
168
+ readonly placeholder: boolean;
169
+ readonly entities: readonly [SkeletonEntity, SkeletonEntity];
124
170
  };
125
171
  export type RepairPlanBatch = {
126
172
  readonly id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"repair-plan.d.ts","sourceRoot":"","sources":["../../../src/public/operations/repair-plan.ts"],"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AAC;KACpC,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACxC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC9D,CAAC;AAgQF,wBAAgB,eAAe,CAC7B,OAAO,EAAE,qBAAqB,EAC9B,KAAK,EAAE,eAAe,EACtB,YAAY,EAAE,MAAM,GACnB,UAAU,GAAG,SAAS,CA4FxB"}
@@ -87,6 +87,37 @@ const REPAIR_PHASES = {
87
87
  validationRules: ["must-priority-coverage", "no-dangling-refs"],
88
88
  writePolicy: "sequential_upsert",
89
89
  },
90
+ dimension_grounding: {
91
+ order: 64,
92
+ objective: "Ground each quantified claim (each, every, all, or a cardinality bound) on what varies: an integer count or bound, a set of members, a rule over a variable, or a state machine. If the quantifier ranges over nothing, record a dimension_waiver on the grounding fact for a person to approve, and record their approval in the same pull request.",
93
+ workflowSteps: [
94
+ "kb_model_requirement",
95
+ "kb_validate_upsert",
96
+ "kb_upsert",
97
+ "kb_check",
98
+ ],
99
+ validationRules: ["no-dangling-refs"],
100
+ writePolicy: "sequential_upsert",
101
+ },
102
+ case_scenarios: {
103
+ order: 66,
104
+ objective: "Cover each uncovered rejection case: add a scenario whose assumes fact states the case's assumption (a value past the bound, a value outside the set), expects rejection or error, is linked with specified_by and is verified by a passing end-to-end test. Each repair lists caseSkeletons, upsert-ready draft scenarios and their assumed facts: fill in the placeholders, verify the scenario by a test, then set its status to active (a draft never covers a case). If a person accepts the cases as covered another way, record a case_waiver on the grounding fact for them to approve, and record their approval in the same pull request.",
105
+ workflowSteps: [
106
+ "kb_coverage",
107
+ "kb_validate_upsert",
108
+ "kb_upsert",
109
+ "kb_check",
110
+ ],
111
+ validationRules: ["scenario-outcome-mismatch", "no-dangling-refs"],
112
+ writePolicy: "sequential_upsert",
113
+ },
114
+ negative_scenarios: {
115
+ order: 65,
116
+ objective: "Add a scenario that expects rejection or error and assumes a value the requirement forbids (see suggestedNegatives), link it with specified_by and verify it with a passing end-to-end test.",
117
+ workflowSteps: ["kb_query", "kb_validate_upsert", "kb_upsert", "kb_check"],
118
+ validationRules: ["scenario-outcome-mismatch", "no-dangling-refs"],
119
+ writePolicy: "sequential_upsert",
120
+ },
90
121
  scenario_tests: {
91
122
  order: 70,
92
123
  objective: "Create or select a test endpoint and link it through the requirement scenario.",
@@ -173,6 +204,9 @@ const GAP_PHASE = {
173
204
  missing_scenario: "scenario_endpoints",
174
205
  infeasible_scenario: "scenario_endpoints",
175
206
  unknown_scenario_feasibility: "scenario_endpoints",
207
+ dimension_unrepresented: "dimension_grounding",
208
+ happy_path_only: "negative_scenarios",
209
+ uncovered_case: "case_scenarios",
176
210
  missing_scenario_test: "scenario_tests",
177
211
  proof_snapshot_unavailable: "snapshot_runtime",
178
212
  missing_passing_e2e: "proof_evidence",
@@ -201,6 +235,9 @@ const GAP_STAGE = {
201
235
  missing_scenario: "scenarios",
202
236
  infeasible_scenario: "scenarios",
203
237
  unknown_scenario_feasibility: "scenarios",
238
+ dimension_unrepresented: "dimension",
239
+ happy_path_only: "negative_path",
240
+ uncovered_case: "cases",
204
241
  missing_scenario_test: "scenario_tests",
205
242
  missing_passing_e2e: "passing_e2e",
206
243
  missing_proof_receipt: "passing_e2e",
@@ -220,6 +257,9 @@ const PROOF_STAGE_KEY = {
220
257
  contradictions: "contradictions",
221
258
  scenarios: "scenarios",
222
259
  scenario_tests: "scenarioTests",
260
+ negative_path: "negativePath",
261
+ dimension: "dimension",
262
+ cases: "cases",
223
263
  passing_e2e: "passingE2e",
224
264
  executable_symbols: "executableSymbols",
225
265
  production_symbols: "productionSymbols",
@@ -261,6 +301,71 @@ function stageEvidence(row, proofStage) {
261
301
  const stable = stableValue(evidence);
262
302
  return isRecord(stable) ? stable : {};
263
303
  }
304
+ const VALUE_FIELD = {
305
+ int: "value_int",
306
+ number: "value_number",
307
+ set: "value_set",
308
+ string: "value_string",
309
+ };
310
+ function caseSkeleton(requirementId, row) {
311
+ const caseId = typeof row.caseId === "string" ? row.caseId : undefined;
312
+ const assumption = isRecord(row.assumption) ? row.assumption : undefined;
313
+ const valueType = typeof assumption?.value_type === "string" ? assumption.value_type : "";
314
+ const valueField = VALUE_FIELD[valueType];
315
+ if (caseId === undefined || assumption === undefined || !valueField)
316
+ return undefined;
317
+ const constraint = typeof row.constraint === "string" ? row.constraint : "";
318
+ const property = typeof assumption.property_key === "string" ? assumption.property_key : "";
319
+ const expects = row.predicted === "rejection" ? "rejection" : "success";
320
+ const placeholder = JSON.stringify(assumption.value).includes("<");
321
+ const suffix = caseId.replace(/^CASE-/, "");
322
+ const factId = `FACT-CASE-${suffix}`;
323
+ const scenarioId = `SCEN-CASE-${suffix}`;
324
+ return {
325
+ caseId,
326
+ constraint,
327
+ placeholder,
328
+ entities: [
329
+ {
330
+ type: "fact",
331
+ id: factId,
332
+ properties: {
333
+ title: `${property} ${constraint}`,
334
+ status: "active",
335
+ fact_kind: "property_value",
336
+ subject_key: assumption.subject_key,
337
+ property_key: property,
338
+ operator: assumption.operator,
339
+ value_type: valueType,
340
+ [valueField]: assumption.value,
341
+ },
342
+ relationships: [],
343
+ },
344
+ {
345
+ type: "scenario",
346
+ id: scenarioId,
347
+ properties: {
348
+ title: `${property} ${constraint} is ${expects === "rejection" ? "refused" : "accepted"}`,
349
+ status: "draft",
350
+ expects,
351
+ },
352
+ relationships: [
353
+ { type: "assumes", from: scenarioId, to: factId },
354
+ { type: "specified_by", from: requirementId, to: scenarioId },
355
+ ],
356
+ },
357
+ ],
358
+ };
359
+ }
360
+ function caseSkeletons(requirementId, evidence) {
361
+ const rows = Array.isArray(evidence.uncoveredCases)
362
+ ? evidence.uncoveredCases.filter(isRecord)
363
+ : [];
364
+ return rows.flatMap((row) => {
365
+ const skeleton = caseSkeleton(requirementId, row);
366
+ return skeleton === undefined ? [] : [skeleton];
367
+ });
368
+ }
264
369
  function batchId(requirementId, phase) {
265
370
  const order = String(REPAIR_PHASES[phase].order).padStart(3, "0");
266
371
  const safeRequirementId = requirementId.replace(/[^A-Za-z0-9_-]/g, "-");
@@ -280,13 +385,17 @@ function buildRequirementBatches(row) {
280
385
  const proofStage = typeof sourceRepair?.stage === "string"
281
386
  ? sourceRepair.stage
282
387
  : (GAP_STAGE[gap] ?? "manual_review");
388
+ const evidence = stageEvidence(row, proofStage);
283
389
  const repair = {
284
390
  requirementId,
285
391
  gap,
286
392
  proofPriority: numberField(sourceRepair?.priority, REPAIR_PHASES[phase].order),
287
393
  proofStage,
288
394
  action: actionForRepair(sourceRepair, phase),
289
- evidence: stageEvidence(row, proofStage),
395
+ evidence,
396
+ ...(gap === "uncovered_case"
397
+ ? { caseSkeletons: caseSkeletons(requirementId, evidence) }
398
+ : {}),
290
399
  };
291
400
  const phaseRepairs = byPhase.get(phase) ?? [];
292
401
  phaseRepairs.push(repair);
@@ -600,7 +600,7 @@ export function schema6ReviewActionsFromCheck(diagnostics) {
600
600
  safety: "review",
601
601
  invocation: {
602
602
  kind: "review",
603
- instruction: `${total} agent-authored requirement(s) have no human approval${total > listed.length ? `; these ${listed.length} come first` : ""}: ${listed.join(", ")}. Have a person read each one; when it states the intended behavior, kb_upsert it with origin.approved_by set to the reviewer (keep kind: agent and the rest of origin). Rerun kb_check for the next page.`,
603
+ instruction: `${total} agent-authored requirement(s) have no human approval${total > listed.length ? `; these ${listed.length} come first` : ""}: ${listed.join(", ")}. Have a person read each one; when it states the intended behavior, kb_upsert it with origin.approved_by set to the reviewer (keep kind: agent and the rest of origin), in the same change and pull request as the requirement, not a separate one. Rerun kb_check for the next page.`,
604
604
  },
605
605
  affectedEntityIds: listed,
606
606
  affectedFiles: [...new Set(agentRequirementFiles)].sort(),
@@ -1,5 +1,5 @@
1
1
  /** Every selectable kb_check rule name, registry order. */
2
2
  export declare const SELECTABLE_RULE_NAMES: readonly string[];
3
3
  /** Comma-separated "Allowed:" fragment for the kb_check rules description. */
4
- export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
4
+ export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
5
5
  //# sourceMappingURL=check-rules.generated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EA0DlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,wwCACkuC,CAAC"}
1
+ {"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EA2DlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,myCAC6vC,CAAC"}
@@ -23,6 +23,7 @@ export const SELECTABLE_RULE_NAMES = [
23
23
  "superseded-requirement-open",
24
24
  "scenario-feasibility",
25
25
  "scenario-feasibility-unknown",
26
+ "scenario-outcome-mismatch",
26
27
  "exception-claim-keys",
27
28
  "numeric-string-value",
28
29
  "rule-key-arguments-missing",
@@ -69,4 +70,4 @@ export const SELECTABLE_RULE_NAMES = [
69
70
  ];
70
71
  // implements REQ-006
71
72
  /** Comma-separated "Allowed:" fragment for the kb_check rules description. */
72
- export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
73
+ export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
@@ -12,7 +12,7 @@ export declare const checkSpec: {
12
12
  readonly type: "string";
13
13
  readonly enum: readonly string[];
14
14
  };
15
- readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
15
+ readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
16
16
  };
17
17
  readonly sourceFiles: {
18
18
  readonly type: "array";
@@ -118,6 +118,16 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
118
118
  readonly minLength: 1;
119
119
  readonly description: "Requirement-only. Optional reference to the exception's approval decision record.";
120
120
  };
121
+ readonly failure_side_waiver: {
122
+ readonly type: "string";
123
+ readonly minLength: 1;
124
+ readonly description: "Requirement-only. Why the requirement has no failure side to test (its claims state a capability or output shape). Waives happy_path_only once failure_side_waiver_approved_by is set.";
125
+ };
126
+ readonly failure_side_waiver_approved_by: {
127
+ readonly type: "string";
128
+ readonly minLength: 1;
129
+ readonly description: "Requirement-only. The person who accepted failure_side_waiver.";
130
+ };
121
131
  readonly firmness: {
122
132
  readonly type: "string";
123
133
  readonly enum: readonly ["firm", "default", "exploratory"];
@@ -820,6 +830,26 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
820
830
  readonly type: "string";
821
831
  readonly description: "Exact atomic requirement clause represented by this fact, retained for human audit. On a grounding fact Kibi derives claim_key from it; an observation or meta fact quotes the clause it is about without a key.";
822
832
  };
833
+ readonly dimension_waiver: {
834
+ readonly type: "string";
835
+ readonly minLength: 1;
836
+ readonly description: "Fact-only. Why the quantifier word in claim_text ranges over nothing, so the claim needs no count, set or rule. Waives dimension_unrepresented once dimension_waiver_approved_by is set.";
837
+ };
838
+ readonly dimension_waiver_approved_by: {
839
+ readonly type: "string";
840
+ readonly minLength: 1;
841
+ readonly description: "Fact-only. The person who accepted dimension_waiver.";
842
+ };
843
+ readonly case_waiver: {
844
+ readonly type: "string";
845
+ readonly minLength: 1;
846
+ readonly description: "Fact-only. Why the edge cases derived from this fact are covered some other way or cannot occur. Waives uncovered_case once case_waiver_approved_by is set.";
847
+ };
848
+ readonly case_waiver_approved_by: {
849
+ readonly type: "string";
850
+ readonly minLength: 1;
851
+ readonly description: "Fact-only. The person who accepted case_waiver.";
852
+ };
823
853
  readonly predicate_name: {
824
854
  readonly type: "string";
825
855
  readonly description: "Optional predicate name for ontology predicate facts. Prefer kb_model mode predicates before hand-writing predicate_name.";