kibi-cli 2.22.1 → 2.24.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 (159) hide show
  1. package/dist/cli-operation-metadata.d.ts +1 -1
  2. package/dist/cli-operation-metadata.js +1 -1
  3. package/dist/cli-register-foundation.d.ts.map +1 -1
  4. package/dist/cli-register-foundation.js +1 -0
  5. package/dist/commands/check.d.ts.map +1 -1
  6. package/dist/commands/check.js +51 -3
  7. package/dist/commands/doctor.d.ts.map +1 -1
  8. package/dist/commands/doctor.js +28 -0
  9. package/dist/commands/migrate.d.ts +10 -0
  10. package/dist/commands/migrate.d.ts.map +1 -1
  11. package/dist/commands/migrate.js +81 -9
  12. package/dist/commands/sync.d.ts.map +1 -1
  13. package/dist/commands/sync.js +15 -1
  14. package/dist/decision-firmness.d.ts +16 -4
  15. package/dist/decision-firmness.d.ts.map +1 -1
  16. package/dist/decision-firmness.js +29 -6
  17. package/dist/extractors/markdown.d.ts.map +1 -1
  18. package/dist/extractors/markdown.js +39 -36
  19. package/dist/intent-search.d.ts +2 -0
  20. package/dist/intent-search.d.ts.map +1 -1
  21. package/dist/intent-search.js +43 -4
  22. package/dist/operations/bootstrap/activation.d.ts +7 -1
  23. package/dist/operations/bootstrap/activation.d.ts.map +1 -1
  24. package/dist/operations/bootstrap/activation.js +27 -2
  25. package/dist/operations/bootstrap/candidate-helpers.d.ts +6 -0
  26. package/dist/operations/bootstrap/candidate-helpers.d.ts.map +1 -1
  27. package/dist/operations/bootstrap/candidate-helpers.js +19 -0
  28. package/dist/operations/bootstrap/generate.d.ts.map +1 -1
  29. package/dist/operations/bootstrap/generate.js +56 -16
  30. package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
  31. package/dist/operations/bootstrap/guidance-actions.js +14 -2
  32. package/dist/operations/bootstrap/guidance.d.ts.map +1 -1
  33. package/dist/operations/bootstrap/guidance.js +6 -2
  34. package/dist/operations/bootstrap/intent-claims.d.ts.map +1 -1
  35. package/dist/operations/bootstrap/intent-claims.js +2 -2
  36. package/dist/operations/bootstrap/markdown-candidates.d.ts.map +1 -1
  37. package/dist/operations/bootstrap/markdown-candidates.js +2 -2
  38. package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
  39. package/dist/operations/bootstrap/presentation.js +75 -9
  40. package/dist/operations/bootstrap/types.d.ts +6 -0
  41. package/dist/operations/bootstrap/types.d.ts.map +1 -1
  42. package/dist/operations/migration/firm-supersede.d.ts +19 -0
  43. package/dist/operations/migration/firm-supersede.d.ts.map +1 -0
  44. package/dist/operations/migration/firm-supersede.js +60 -0
  45. package/dist/operations/migration/kb-sources.d.ts +8 -5
  46. package/dist/operations/migration/kb-sources.d.ts.map +1 -1
  47. package/dist/operations/migration/kb-sources.js +50 -14
  48. package/dist/operations/migration/schema6.d.ts.map +1 -1
  49. package/dist/operations/migration/schema6.js +52 -2
  50. package/dist/operations/migration/source-paths.d.ts +18 -1
  51. package/dist/operations/migration/source-paths.d.ts.map +1 -1
  52. package/dist/operations/migration/source-paths.js +111 -16
  53. package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
  54. package/dist/operations/modeling/suggest-predicates.js +22 -7
  55. package/dist/operations/mutation/requirement-semantics.d.ts +19 -1
  56. package/dist/operations/mutation/requirement-semantics.d.ts.map +1 -1
  57. package/dist/operations/mutation/requirement-semantics.js +63 -2
  58. package/dist/operations/mutation/strict-fact.js +1 -1
  59. package/dist/operations/mutation/upsert.d.ts.map +1 -1
  60. package/dist/operations/mutation/upsert.js +2 -1
  61. package/dist/operations/planning/apply-plan.d.ts.map +1 -1
  62. package/dist/operations/planning/apply-plan.js +22 -2
  63. package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
  64. package/dist/operations/semantic-advisor/analyze-prose.js +49 -17
  65. package/dist/public/impact/analyzer.d.ts.map +1 -1
  66. package/dist/public/impact/analyzer.js +7 -1
  67. package/dist/public/impact/diagnostics.d.ts.map +1 -1
  68. package/dist/public/impact/diagnostics.js +16 -3
  69. package/dist/public/impact/types.d.ts +2 -0
  70. package/dist/public/impact/types.d.ts.map +1 -1
  71. package/dist/public/operations/catalog.d.ts +8 -3
  72. package/dist/public/operations/catalog.d.ts.map +1 -1
  73. package/dist/public/operations/check-executor.d.ts.map +1 -1
  74. package/dist/public/operations/check-executor.js +10 -3
  75. package/dist/public/operations/check-helpers.d.ts +10 -0
  76. package/dist/public/operations/check-helpers.d.ts.map +1 -1
  77. package/dist/public/operations/check-helpers.js +54 -0
  78. package/dist/public/operations/contracts.d.ts.map +1 -1
  79. package/dist/public/operations/contracts.js +1 -0
  80. package/dist/public/operations/decision-firmness.d.ts +14 -0
  81. package/dist/public/operations/decision-firmness.d.ts.map +1 -1
  82. package/dist/public/operations/decision-firmness.js +60 -7
  83. package/dist/public/operations/discovery-executors.d.ts +18 -0
  84. package/dist/public/operations/discovery-executors.d.ts.map +1 -1
  85. package/dist/public/operations/discovery-executors.js +80 -8
  86. package/dist/public/operations/schema6-check-actions.d.ts +4 -0
  87. package/dist/public/operations/schema6-check-actions.d.ts.map +1 -1
  88. package/dist/public/operations/schema6-check-actions.js +39 -2
  89. package/dist/public/operations/source-path-dangling.d.ts +1 -1
  90. package/dist/public/operations/source-path-dangling.d.ts.map +1 -1
  91. package/dist/public/operations/source-path-dangling.js +11 -2
  92. package/dist/public/operations/specs/composite.d.ts +1 -1
  93. package/dist/public/operations/specs/discovery.d.ts +5 -0
  94. package/dist/public/operations/specs/discovery.d.ts.map +1 -1
  95. package/dist/public/operations/specs/discovery.js +5 -0
  96. package/dist/public/operations/specs/planning.d.ts +1 -1
  97. package/dist/public/operations/specs/planning.js +1 -1
  98. package/dist/public/operations/specs/reporting.d.ts.map +1 -1
  99. package/dist/public/operations/specs/reporting.js +6 -4
  100. package/dist/public/operations/specs/semantic.d.ts +1 -1
  101. package/dist/public/operations/specs/semantic.d.ts.map +1 -1
  102. package/dist/public/operations/specs/semantic.js +4 -2
  103. package/dist/public/operations/specs/upsert.d.ts +1 -1
  104. package/dist/public/operations/specs/upsert.js +1 -1
  105. package/dist/public/schemas/entity.js +1 -1
  106. package/dist/public/skills/kibi-bootstrap/SKILL.md +5 -4
  107. package/dist/public/skills/kibi-usage/SKILL.md +36 -16
  108. package/dist/public/skills/kibi-usage/resources/workflows.md +3 -1
  109. package/dist/schemas/entity.schema.json +1 -1
  110. package/dist/search-answer.d.ts +14 -0
  111. package/dist/search-answer.d.ts.map +1 -1
  112. package/dist/search-answer.js +51 -5
  113. package/dist/traceability/git-change-snapshot.d.ts +46 -0
  114. package/dist/traceability/git-change-snapshot.d.ts.map +1 -1
  115. package/dist/traceability/git-change-snapshot.js +187 -3
  116. package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
  117. package/dist/traceability/staged-diagnostics.js +5 -6
  118. package/dist/traceability/staged-inventory-drift.d.ts +24 -0
  119. package/dist/traceability/staged-inventory-drift.d.ts.map +1 -0
  120. package/dist/traceability/staged-inventory-drift.js +84 -0
  121. package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
  122. package/dist/traceability/staged-symbols-manifest.js +1 -2
  123. package/dist/types/entities.d.ts +2 -2
  124. package/dist/types/entities.d.ts.map +1 -1
  125. package/dist/utils/content-freshness.d.ts +9 -0
  126. package/dist/utils/content-freshness.d.ts.map +1 -1
  127. package/dist/utils/content-freshness.js +33 -0
  128. package/dist/utils/kb-manifest.d.ts +7 -0
  129. package/dist/utils/kb-manifest.d.ts.map +1 -1
  130. package/dist/utils/kb-manifest.js +6 -0
  131. package/dist/utils/merge-driver-setup.d.ts +10 -0
  132. package/dist/utils/merge-driver-setup.d.ts.map +1 -0
  133. package/dist/utils/merge-driver-setup.js +69 -0
  134. package/dist/utils/rule-registry.generated.d.ts +1 -1
  135. package/dist/utils/rule-registry.generated.js +1 -1
  136. package/dist/utils/schema-version.d.ts +1 -1
  137. package/dist/utils/schema-version.d.ts.map +1 -1
  138. package/dist/utils/schema-version.js +3 -1
  139. package/package.json +2 -2
  140. package/src/public/impact/analyzer.ts +13 -1
  141. package/src/public/impact/diagnostics.ts +20 -3
  142. package/src/public/impact/types.ts +2 -0
  143. package/src/public/operations/check-executor.ts +16 -4
  144. package/src/public/operations/check-helpers.ts +65 -0
  145. package/src/public/operations/contracts.ts +1 -0
  146. package/src/public/operations/decision-firmness.ts +83 -10
  147. package/src/public/operations/discovery-executors.ts +124 -7
  148. package/src/public/operations/schema6-check-actions.ts +43 -2
  149. package/src/public/operations/source-path-dangling.ts +12 -2
  150. package/src/public/operations/specs/discovery.ts +6 -0
  151. package/src/public/operations/specs/planning.ts +1 -1
  152. package/src/public/operations/specs/reporting.ts +6 -4
  153. package/src/public/operations/specs/semantic.ts +4 -2
  154. package/src/public/operations/specs/upsert.ts +1 -1
  155. package/src/public/schemas/entity.ts +1 -1
  156. package/src/public/skills/kibi-bootstrap/SKILL.md +5 -4
  157. package/src/public/skills/kibi-usage/SKILL.md +36 -16
  158. package/src/public/skills/kibi-usage/resources/workflows.md +3 -1
  159. package/src/schemas/entity.schema.json +1 -1
@@ -71,7 +71,7 @@ export declare const CLI_OPERATION_METADATA: readonly [{
71
71
  }, {
72
72
  readonly name: "kb_upsert";
73
73
  readonly cliName: "upsert";
74
- readonly description: "Create or update one entity and optional relationships. Use for KB mutations after validating intent; prefer a dryRun:true call first because it validates without writing and returns semantic advisor receipts for prose-heavy requirements. Use kb_model (mode requirement) before hand-writing strict property facts from prose, and kb_model (mode predicates) before hand-writing ontology predicate facts. Use the `relationships` array for batch creation of multiple links in a single call (e.g., linking a requirement to multiple tests or facts). Prefer modeling requirements as reusable fact links (`constrains`, `requires_property`, or `requires_predicate`) so consistency and contradiction checks remain queryable. Relationship endpoints must already exist in KB. For requirements, the write will be rejected if it contradicts existing current requirements that constrain the same subject with incompatible properties. To replace a conflicting requirement, include a `supersedes` relationship from the new requirement to the old one in the same request, then upsert the old requirement with status closed (kb_check blocks a superseded requirement that is not closed). Successful writes may return non-blocking semantic advisor warnings; inspect and repair those warnings before treating prose as contradiction-checkable. Pass a sectioned `document.body` when creating a requirement (the statement, then `## Context` stating why it exists, who asked and the source, then `## Source` with the verbatim excerpt) and a prose body for scenarios, tests, ADRs and observation facts; a result warning reports an entity whose body lacks context, and kb_check blocks it under entity-context-missing. Never invent a reason the requester did not give: write 'Reason not stated'. Do not use for read-only inspection. Side effects: writes KB, may refresh symbol coordinates; dryRun:true writes nothing.";
74
+ readonly description: "Create or update one entity and optional relationships. Use for KB mutations after validating intent; prefer a dryRun:true call first because it validates without writing and returns semantic advisor receipts for prose-heavy requirements. Use kb_model (mode requirement) before hand-writing strict property facts from prose, and kb_model (mode predicates) before hand-writing ontology predicate facts. Use the `relationships` array for batch creation of multiple links in a single call (e.g., linking a requirement to multiple tests or facts). An update keeps the properties and relationships it leaves out: send the fields that change (with title and status) and only the links to add. Prefer modeling requirements as reusable fact links (`constrains`, `requires_property`, or `requires_predicate`) so consistency and contradiction checks remain queryable. Relationship endpoints must already exist in KB. For requirements, the write will be rejected if it contradicts existing current requirements that constrain the same subject with incompatible properties. To replace a conflicting requirement, include a `supersedes` relationship from the new requirement to the old one in the same request, then upsert the old requirement with status closed (kb_check blocks a superseded requirement that is not closed). Successful writes may return non-blocking semantic advisor warnings; inspect and repair those warnings before treating prose as contradiction-checkable. Pass a sectioned `document.body` when creating a requirement (the statement, then `## Context` stating why it exists, who asked and the source, then `## Source` with the verbatim excerpt) and a prose body for scenarios, tests, ADRs and observation facts; a result warning reports an entity whose body lacks context, and kb_check blocks it under entity-context-missing. Never invent a reason the requester did not give: write 'Reason not stated'. Do not use for read-only inspection. Side effects: writes KB, may refresh symbol coordinates; dryRun:true writes nothing.";
75
75
  }, {
76
76
  readonly name: "kb_delete";
77
77
  readonly cliName: "delete";
@@ -85,7 +85,7 @@ export const CLI_OPERATION_METADATA = [
85
85
  {
86
86
  name: "kb_upsert",
87
87
  cliName: "upsert",
88
- description: "Create or update one entity and optional relationships. Use for KB mutations after validating intent; prefer a dryRun:true call first because it validates without writing and returns semantic advisor receipts for prose-heavy requirements. Use kb_model (mode requirement) before hand-writing strict property facts from prose, and kb_model (mode predicates) before hand-writing ontology predicate facts. Use the `relationships` array for batch creation of multiple links in a single call (e.g., linking a requirement to multiple tests or facts). Prefer modeling requirements as reusable fact links (`constrains`, `requires_property`, or `requires_predicate`) so consistency and contradiction checks remain queryable. Relationship endpoints must already exist in KB. For requirements, the write will be rejected if it contradicts existing current requirements that constrain the same subject with incompatible properties. To replace a conflicting requirement, include a `supersedes` relationship from the new requirement to the old one in the same request, then upsert the old requirement with status closed (kb_check blocks a superseded requirement that is not closed). Successful writes may return non-blocking semantic advisor warnings; inspect and repair those warnings before treating prose as contradiction-checkable. Pass a sectioned `document.body` when creating a requirement (the statement, then `## Context` stating why it exists, who asked and the source, then `## Source` with the verbatim excerpt) and a prose body for scenarios, tests, ADRs and observation facts; a result warning reports an entity whose body lacks context, and kb_check blocks it under entity-context-missing. Never invent a reason the requester did not give: write 'Reason not stated'. Do not use for read-only inspection. Side effects: writes KB, may refresh symbol coordinates; dryRun:true writes nothing.",
88
+ description: "Create or update one entity and optional relationships. Use for KB mutations after validating intent; prefer a dryRun:true call first because it validates without writing and returns semantic advisor receipts for prose-heavy requirements. Use kb_model (mode requirement) before hand-writing strict property facts from prose, and kb_model (mode predicates) before hand-writing ontology predicate facts. Use the `relationships` array for batch creation of multiple links in a single call (e.g., linking a requirement to multiple tests or facts). An update keeps the properties and relationships it leaves out: send the fields that change (with title and status) and only the links to add. Prefer modeling requirements as reusable fact links (`constrains`, `requires_property`, or `requires_predicate`) so consistency and contradiction checks remain queryable. Relationship endpoints must already exist in KB. For requirements, the write will be rejected if it contradicts existing current requirements that constrain the same subject with incompatible properties. To replace a conflicting requirement, include a `supersedes` relationship from the new requirement to the old one in the same request, then upsert the old requirement with status closed (kb_check blocks a superseded requirement that is not closed). Successful writes may return non-blocking semantic advisor warnings; inspect and repair those warnings before treating prose as contradiction-checkable. Pass a sectioned `document.body` when creating a requirement (the statement, then `## Context` stating why it exists, who asked and the source, then `## Source` with the verbatim excerpt) and a prose body for scenarios, tests, ADRs and observation facts; a result warning reports an entity whose body lacks context, and kb_check blocks it under entity-context-missing. Never invent a reason the requester did not give: write 'Reason not stated'. Do not use for read-only inspection. Side effects: writes KB, may refresh symbol coordinates; dryRun:true writes nothing.",
89
89
  },
90
90
  {
91
91
  name: "kb_delete",
@@ -1 +1 @@
1
- {"version":3,"file":"cli-register-foundation.d.ts","sourceRoot":"","sources":["../src/cli-register-foundation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAezC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyJjE"}
1
+ {"version":3,"file":"cli-register-foundation.d.ts","sourceRoot":"","sources":["../src/cli-register-foundation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAezC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6JjE"}
@@ -22,6 +22,7 @@ export function registerFoundationCommands(program) {
22
22
  .option("--format <format>", "Output format: json|table", "table")
23
23
  .option("--apply-safe", "Apply only explicitly approved deterministic migration actions")
24
24
  .option("--approved-plan-hash <sha256>", "Exact migration plan hash approved for --apply-safe")
25
+ .option("--backlog", "List every quality and coverage backlog action instead of counts per code")
25
26
  .option("--approved-action <id>", "Approve one migration action (repeatable through comma-separated IDs)", (value, previous = []) => [
26
27
  ...previous,
27
28
  ...value
@@ -1 +1 @@
1
- {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAgF7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,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AAyB,CAC7C,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAoDtB;AAID,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,MAAM,EAAE,CAAC,CAgBnB;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,aAAa,EACrB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBnB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAkEtB;AAID,wBAAsB,aAAa,CACjC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAmGtB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,MAAM,EAAE,GACrB,OAAO,CAAC,SAAS,EAAE,CAAC,CAyCtB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAgDtB;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CA0BtB;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqBtB;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqBtB;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqBtB"}
@@ -38,6 +38,7 @@ import { collectStagedKibiDiagnostics, } from "../traceability/staged-diagnostic
38
38
  import { createStagedEntityIdStyleDiagnostics } from "../traceability/staged-entity-id-style.js";
39
39
  import { analyzeStagedFileCoverage, } from "../traceability/staged-file-coverage.js";
40
40
  import { classifyKibiImpactEvidence, isBehaviorSourceEdit, parseKibiImpactOverride, } from "../traceability/staged-impact-contract.js";
41
+ import { stagedInventoryDriftViolations } from "../traceability/staged-inventory-drift.js";
41
42
  import { assessStagedSymbolsManifest, collectStagedAuthoredSymbolsManifestEvidence, } from "../traceability/staged-symbols-manifest.js";
42
43
  import { createManifestLookupSentinelKey, extractSymbolsFromStagedFileAsync, } from "../traceability/symbol-extract.js";
43
44
  import { cleanupTempKb, consultOverlay, createOverlayFacts, createTempKb, projectStagedEntities, } from "../traceability/temp-kb.js";
@@ -471,9 +472,26 @@ export async function checkCommand(options) {
471
472
  file.disposition = "checked";
472
473
  }
473
474
  }
475
+ const mergeInherited = snapshot.mergeInherited ?? [];
476
+ const mergeNote = mergeInherited.length > 0
477
+ ? `Merge commit: ${mergeInherited.length} staged file(s) are taken unchanged from the merged branch and are not judged here; only what the merge itself changed is checked. Any debt in those files was inherited from that branch.`
478
+ : undefined;
479
+ const renameResolved = snapshot.renameResolved ?? [];
480
+ const renameNote = renameResolved.length > 0
481
+ ? `Baseline: HEAD with ${renameResolved.length} staged knowledge rename(s) into .kb/ resolved; renamed files are judged only on what this commit changed in them. Run kibi check for the full report.`
482
+ : undefined;
483
+ const baselineNotes = [mergeNote, renameNote].filter((note) => note !== undefined);
484
+ const printNotedResult = (input) => {
485
+ printStagedResult(baselineNotes.length === 0
486
+ ? input
487
+ : {
488
+ ...input,
489
+ messages: [...baselineNotes, ...(input.messages ?? [])],
490
+ });
491
+ };
474
492
  const printSnapshotResult = (input) => {
475
493
  snapshot.assertUnchanged();
476
- printStagedResult(input);
494
+ printNotedResult(input);
477
495
  };
478
496
  stagedCoverage = analyzeStagedFileCoverage(stagedInventory, snapshot.readGit);
479
497
  stagedCoverage.snapshot = {
@@ -526,7 +544,11 @@ export async function checkCommand(options) {
526
544
  printSnapshotResult({
527
545
  format: options.format,
528
546
  coverage: stagedCoverage,
529
- messages: ["No staged files found."],
547
+ messages: [
548
+ renameResolved.length > 0
549
+ ? "No staged changes beyond the resolved renames."
550
+ : "No staged files found.",
551
+ ],
530
552
  });
531
553
  return { exitCode: 0 };
532
554
  }
@@ -575,6 +597,32 @@ export async function checkCommand(options) {
575
597
  return { exitCode: options.dryRun ? 0 : 1 };
576
598
  }
577
599
  }
600
+ const inventoryDrift = stagedInventoryDriftViolations({
601
+ stagedPaths: new Set(markdownFiles.map((file) => file.path)),
602
+ snapshotEntities,
603
+ readBase: (filePath) => {
604
+ try {
605
+ return snapshot
606
+ .readGit(["show", `${snapshot.baseTree}:${filePath}`])
607
+ .toString("utf8");
608
+ }
609
+ catch {
610
+ return null;
611
+ }
612
+ },
613
+ });
614
+ if (inventoryDrift.length > 0) {
615
+ printSnapshotResult({
616
+ format: options.format,
617
+ coverage: stagedCoverage,
618
+ violations: inventoryDrift,
619
+ messages: [
620
+ `${inventoryDrift.length} staged requirement(s) have a semantic inventory that no longer matches their prose:`,
621
+ ...inventoryDrift.map((violation) => ` ${violation.message}`),
622
+ ],
623
+ });
624
+ return { exitCode: options.dryRun ? 0 : 1 };
625
+ }
578
626
  const snapshotRequirementIds = new Set(snapshotEntities
579
627
  .filter((row) => row.entity.type === "req")
580
628
  .map((row) => row.entity.id));
@@ -734,7 +782,7 @@ export async function checkCommand(options) {
734
782
  }
735
783
  // Without changed source symbols the result was historically printed
736
784
  // without re-asserting the snapshot; keep that behavior.
737
- const print = allSymbols.length === 0 ? printStagedResult : printSnapshotResult;
785
+ const print = allSymbols.length === 0 ? printNotedResult : printSnapshotResult;
738
786
  const passMessage = allSymbols.length === 0
739
787
  ? "✓ No violations found in staged files."
740
788
  : "✓ No violations found in staged symbols.";
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAiGA,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAGD,wBAAsB,aAAa,CACjC,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC;IA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,7 @@ import { resolveBranchAttachment, resolveReadBranchAttachment, } from "../utils/
29
29
  import { branchStoreCompilation, inspectBranchStore, storeLockTakeoverReason, uncompiledBranchStoreReason, } from "../utils/branch-store.js";
30
30
  import { resolveGitRepository, } from "../utils/git-repository-context.js";
31
31
  import { readKbManifestStatus } from "../utils/kb-manifest.js";
32
+ import { MERGE_DRIVER_SETUP, manifestMergeDriverGaps, } from "../utils/merge-driver-setup.js";
32
33
  import { LATEST_KB_SCHEMA_VERSION } from "../utils/schema-version.js";
33
34
  import { KIBI_HOOK_BEGIN, hasManagedHooks, outdatedManagedHooks, } from "./init-helpers.js";
34
35
  import { planLegacyStorageMigration } from "./legacy-storage-migration.js";
@@ -90,6 +91,10 @@ export async function doctorCommand(options = {}) {
90
91
  name: "Kibi-managed hook sections",
91
92
  check: checkManagedHookSections,
92
93
  },
94
+ {
95
+ name: "Manifest merge driver",
96
+ check: checkManifestMergeDriver,
97
+ },
93
98
  {
94
99
  name: "Capability plugins",
95
100
  check: checkCapabilityPlugins,
@@ -683,6 +688,29 @@ function checkGitRepository() {
683
688
  };
684
689
  }
685
690
  }
691
+ /**
692
+ * `.kb/symbols.yaml` conflicts on nearly every parallel branch; `kibi
693
+ * merge-driver` resolves them by record id, but only when Git routes the
694
+ * file to it. A warning, not a failure: merges still work without it.
695
+ */
696
+ // implements REQ-cli-doctor
697
+ function checkManifestMergeDriver() {
698
+ const gaps = manifestMergeDriverGaps(process.cwd());
699
+ if (gaps === null) {
700
+ return {
701
+ passed: true,
702
+ message: "Not needed yet (no git repository or no symbols)",
703
+ };
704
+ }
705
+ if (gaps.length === 0)
706
+ return { passed: true, message: "Configured" };
707
+ return {
708
+ passed: true,
709
+ warning: true,
710
+ message: `Not configured: ${gaps.join("; ")}. Merges of .kb/symbols.yaml fall back to line conflicts.`,
711
+ remediation: MERGE_DRIVER_SETUP,
712
+ };
713
+ }
686
714
  /**
687
715
  * The current branch's KB store: it must exist and hold a compilation
688
716
  * (journal sequence above 0) when .kb/ has authored sources. Kibi stores are
@@ -1,3 +1,4 @@
1
+ import type { MigrationAction } from "../public/operations/migration-plan.js";
1
2
  interface MigrateOptions {
2
3
  dryRun?: boolean;
3
4
  yes?: boolean;
@@ -7,6 +8,8 @@ interface MigrateOptions {
7
8
  approvedActionIds?: string[];
8
9
  /** `--approved-action <id>` as the CLI parser spells it; same as approvedActionIds. */
9
10
  approvedAction?: string[];
11
+ /** List every quality and coverage backlog action, not only their counts. */
12
+ backlog?: boolean;
10
13
  workspaceRoot?: string;
11
14
  /** Internal migration-plan executor: create only the canonical baseline manifest. */
12
15
  initializeMissingConfig?: boolean;
@@ -55,5 +58,12 @@ export declare function migrateCommand(options?: MigrateOptions): Promise<{
55
58
  * (for example legacy links an earlier plan action already marked).
56
59
  */
57
60
  export declare function describeMigrationRun(summary: MigrationRunSummary): string;
61
+ /**
62
+ * Review findings `kibi check` and `kb_status` report at any schema version:
63
+ * quality and coverage work, not steps of the migration. A plan lists them
64
+ * so one approval flow covers both, but they never make a migration
65
+ * incomplete.
66
+ */
67
+ export declare function isBacklogAction(action: Pick<MigrationAction, "code">): boolean;
58
68
  export {};
59
69
  //# sourceMappingURL=migrate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AAmEA,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,uFAAuF;IACvF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,uBAAuB,CAAC,EAAE,OAAO,CAAC;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C,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,oBAAoB,CAAC;IAC5B,0EAA0E;IAC1E,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAgJD,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,OAAO,EACzB,UAAU,EAAE,MAAM,GAAG,IAAI,GACxB,MAAM,CAUR;AAsOD,wBAAgB,+BAA+B,IAAI;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAKtE;AAGD,wBAAsB,cAAc,CAClC,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAmb9D;AAED;;;;GAIG;AAEH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAGzE;AA+WD;;;;;GAKG;AAEH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,GACpC,OAAO,CAOT"}
@@ -25,6 +25,7 @@ import { applySymbolLegacyLinks, planSymbolLegacyLinks, } from "../operations/mi
25
25
  import { resolveBranchAttachment } from "../utils/branch-resolver.js";
26
26
  import { defaultKbManifest, readKbManifest, readKbManifestStatus, writeKbManifest, } from "../utils/kb-manifest.js";
27
27
  import { CANONICAL_ENTITY_PATHS } from "../utils/kb-paths.js";
28
+ import { MERGE_DRIVER_SETUP, manifestMergeDriverGaps, } from "../utils/merge-driver-setup.js";
28
29
  import { LATEST_KB_SCHEMA_VERSION, getSchemaVersionStatus, normalizeSchemaVersion, } from "../utils/schema-version.js";
29
30
  import { updateGitIgnore } from "./init-helpers.js";
30
31
  import { applyLegacyStorageMigration, planLegacyStorageMigration, } from "./legacy-storage-migration.js";
@@ -84,6 +85,12 @@ const SCHEMA_MIGRATION_STEPS = [
84
85
  to: 9,
85
86
  description: "Accept firmness on requirements and ADRs, and acknowledge in the manifest the current supersedes recorded without a 'Why this changed' section; no source file is rewritten and no reason is invented.",
86
87
  },
88
+ {
89
+ id: "firmness-from-origin-v10",
90
+ from: 9,
91
+ to: 10,
92
+ description: "Read a requirement or ADR without firmness as firm unless an agent wrote it, and acknowledge in the manifest the supersedes of such decisions recorded before; no source file is rewritten and no firmness is written.",
93
+ },
87
94
  ];
88
95
  function migrationStepsFor(fromVersion) {
89
96
  const start = Math.max(0, fromVersion ?? 0);
@@ -254,7 +261,7 @@ function repairLifecycleFindings(cwd, dryRun) {
254
261
  console.log(`dry run: would close ${closed} superseded requirement(s): ${supersession.closures.map((closure) => closure.id).join(", ")}.`);
255
262
  }
256
263
  if (rewritten > 0) {
257
- console.log(`dry run: would point ${rewritten} pre-canonical source path(s) at their .kb/ files.`);
264
+ console.log(`dry run: would point ${rewritten} pre-canonical source or text_ref path(s) at their .kb/ files.`);
258
265
  }
259
266
  if (removed > 0) {
260
267
  console.log(`dry run: would remove ${removed} redundant or dead source field(s); ${REMOVED_SOURCES_NOTE}.`);
@@ -274,7 +281,7 @@ function repairLifecycleFindings(cwd, dryRun) {
274
281
  removed = repairs.removed.length;
275
282
  unrepaired = [...repairs.skipped];
276
283
  if (rewritten > 0) {
277
- console.log(`Pointed ${rewritten} pre-canonical source path(s) at their .kb/ files.`);
284
+ console.log(`Pointed ${rewritten} pre-canonical source or text_ref path(s) at their .kb/ files.`);
278
285
  }
279
286
  if (removed > 0) {
280
287
  console.log(`Removed ${removed} redundant or dead source field(s); ${REMOVED_SOURCES_NOTE}.`);
@@ -284,7 +291,7 @@ function repairLifecycleFindings(cwd, dryRun) {
284
291
  printWarning(`Requirements ${cycle.members.join(", ")} supersede each other; decide which one is current, remove the supersedes link that points at it, and close the others.`);
285
292
  }
286
293
  for (const skip of unrepaired) {
287
- printWarning(`Source field of ${skip.file} not repaired: ${skip.reason}; a person edits it by hand (kibi migrate --format json lists it as review_source_path_dangling).`);
294
+ printWarning(`Path field of ${skip.file} not repaired: ${skip.reason}; a person edits it by hand (kibi migrate --format json lists it as review_source_path_dangling).`);
288
295
  }
289
296
  return {
290
297
  closed,
@@ -409,7 +416,9 @@ export async function migrateCommand(options = {}) {
409
416
  const polarityBackfill = planPolarityValueBackfill(cwd);
410
417
  const bodyContextStep = migrationSteps.some((step) => step.id === "entity-body-context-v8");
411
418
  const decisionFirmnessStep = migrationSteps.some((step) => step.id === "decision-firmness-v9");
419
+ const firmnessFromOriginStep = migrationSteps.some((step) => step.id === "firmness-from-origin-v10");
412
420
  const { mergeSupersedesAcknowledgements, planSupersedesReasonAcknowledgement, } = await import("../operations/migration/supersedes-reason.js");
421
+ const { mergeFirmSupersedeAcknowledgements, planFirmSupersedeAcknowledgement, } = await import("../operations/migration/firm-supersede.js");
413
422
  const { acknowledgedContextIds, applyContextMissingTags, applySemanticTextPins, countByType, planContextMissingTags, planSemanticTextPins, } = await import("../operations/migration/entity-body-context.js");
414
423
  if (options.dryRun) {
415
424
  if (polarityBackfill.length > 0)
@@ -431,6 +440,11 @@ export async function migrateCommand(options = {}) {
431
440
  if (unexplained.length > 0)
432
441
  console.log(`dry run: would acknowledge ${unexplained.length} supersede(s) recorded without a 'Why this changed' section (manifest only; no reason is written).`);
433
442
  }
443
+ if (firmnessFromOriginStep) {
444
+ const firmEdges = planFirmSupersedeAcknowledgement(cwd);
445
+ if (firmEdges.length > 0)
446
+ console.log(`dry run: would acknowledge ${firmEdges.length} supersede(s) of decisions that read as firm from schema 10 (manifest only; no firmness is written).`);
447
+ }
434
448
  if (storagePlan.moves.length > 0) {
435
449
  console.log(`dry run: would move ${storagePlan.moves.length} legacy knowledge file(s) into .kb/:`);
436
450
  for (const move of storagePlan.moves) {
@@ -511,6 +525,9 @@ export async function migrateCommand(options = {}) {
511
525
  const supersedesUnexplained = decisionFirmnessStep
512
526
  ? planSupersedesReasonAcknowledgement(cwd)
513
527
  : [];
528
+ const firmSupersedes = firmnessFromOriginStep
529
+ ? planFirmSupersedeAcknowledgement(cwd)
530
+ : [];
514
531
  const existingManifest = readKbManifest(cwd) ?? defaultKbManifest();
515
532
  writeKbManifest(cwd, {
516
533
  ...existingManifest,
@@ -531,9 +548,16 @@ export async function migrateCommand(options = {}) {
531
548
  supersedesReasonAcknowledged: mergeSupersedesAcknowledgements(existingManifest.supersedesReasonAcknowledged, supersedesUnexplained),
532
549
  }
533
550
  : {}),
551
+ ...(firmSupersedes.length > 0
552
+ ? {
553
+ firmSupersedeAcknowledged: mergeFirmSupersedeAcknowledgements(existingManifest.firmSupersedeAcknowledged, firmSupersedes),
554
+ }
555
+ : {}),
534
556
  });
535
557
  if (supersedesUnexplained.length > 0)
536
558
  console.log(`Acknowledged ${supersedesUnexplained.length} supersede(s) recorded without a 'Why this changed' section; new supersedes must explain themselves.`);
559
+ if (firmSupersedes.length > 0)
560
+ console.log(`Acknowledged ${firmSupersedes.length} supersede(s) of decisions without firmness that read as firm from schema 10; a new replacement of such a decision must be firm.`);
537
561
  const auditRecord = buildMigrationAuditRecord({
538
562
  branch,
539
563
  manifestPath: KB_MANIFEST_RELATIVE,
@@ -561,6 +585,10 @@ export async function migrateCommand(options = {}) {
561
585
  }
562
586
  console.log(`Wrote migration audit metadata to ${toRelativePath(cwd, auditPath)}.`);
563
587
  console.log("Migration complete. Future 'kibi migrate' runs will be a no-op.");
588
+ const mergeDriverGaps = manifestMergeDriverGaps(cwd);
589
+ if (mergeDriverGaps !== null && mergeDriverGaps.length > 0) {
590
+ console.log(`Tip: kibi merge-driver resolves .kb/symbols.yaml merges by record id, but it is not wired up (${mergeDriverGaps.join("; ")}). ${MERGE_DRIVER_SETUP}`);
591
+ }
564
592
  const gitignoreUpdated = updateGitIgnore(cwd);
565
593
  return {
566
594
  exitCode: 0,
@@ -842,12 +870,56 @@ async function migratePlanCommand(options) {
842
870
  console.log(JSON.stringify(plan, null, 2));
843
871
  }
844
872
  else {
845
- console.log(`Migration plan ${plan.planHash}`);
846
- console.log(`Status: ${plan.status}; actions: ${plan.summary.actionCount}; automatic-ready: ${plan.actions.filter((action) => action.state === "ready" && action.autoApplicable).length}`);
847
- for (const action of plan.actions) {
848
- console.log(`- ${action.state} ${action.safety} ${action.code}: ${action.id}`);
849
- }
850
- console.log("Use --format json for structured actions, or --apply-safe with the approved plan hash.");
873
+ printPlanText(plan, options.backlog === true);
851
874
  }
852
875
  return { exitCode: 0 };
853
876
  }
877
+ /**
878
+ * Review findings `kibi check` and `kb_status` report at any schema version:
879
+ * quality and coverage work, not steps of the migration. A plan lists them
880
+ * so one approval flow covers both, but they never make a migration
881
+ * incomplete.
882
+ */
883
+ // implements REQ-cli-schema-migration
884
+ export function isBacklogAction(action) {
885
+ return (action.code.startsWith("quality_") ||
886
+ action.code.startsWith("coverage_") ||
887
+ (action.code.startsWith("review_") &&
888
+ !MIGRATION_REVIEW_CODES.has(action.code)));
889
+ }
890
+ /** Review actions that belong to the schema or storage migration itself. */
891
+ const MIGRATION_REVIEW_CODES = new Set([
892
+ "review_source_path_dangling",
893
+ "review_supersession_cycle",
894
+ ]);
895
+ function printPlanText(plan, listBacklog) {
896
+ const migration = plan.actions.filter((action) => !isBacklogAction(action));
897
+ const backlog = plan.actions.filter(isBacklogAction);
898
+ const automaticReady = migration.filter((action) => action.state === "ready" && action.autoApplicable).length;
899
+ console.log(`Migration plan ${plan.planHash}`);
900
+ console.log(migration.length === 0
901
+ ? "Migration: complete; no migration actions remain."
902
+ : `Migration: ${migration.length} action(s); automatic-ready: ${automaticReady}`);
903
+ for (const action of migration) {
904
+ console.log(`- ${action.state} ${action.safety} ${action.code}: ${action.id}`);
905
+ }
906
+ if (backlog.length > 0) {
907
+ console.log(`Quality backlog (not part of the migration): ${backlog.length} review item(s) that kibi check and kb_status also report.`);
908
+ if (listBacklog) {
909
+ for (const action of backlog) {
910
+ console.log(`- ${action.state} ${action.safety} ${action.code}: ${action.id}`);
911
+ }
912
+ }
913
+ else {
914
+ const counts = new Map();
915
+ for (const action of backlog) {
916
+ counts.set(action.code, (counts.get(action.code) ?? 0) + 1);
917
+ }
918
+ for (const [code, count] of [...counts].sort(([leftCode, left], [rightCode, right]) => right - left || leftCode.localeCompare(rightCode))) {
919
+ console.log(` ${count} ${code}`);
920
+ }
921
+ console.log(" List each item with --backlog.");
922
+ }
923
+ }
924
+ console.log(`Plan status: ${plan.status} (covers both sections). Use --format json for structured actions, or --apply-safe with the approved plan hash.`);
925
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA6BjE,OAAO,EAEL,yBAAyB,EAE1B,MAAM,gDAAgD,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,KAAK,gBAAgB,EAGtB,MAAM,6BAA6B,CAAC;AAyBrC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAkCxE,qBAAa,SAAU,SAAQ,KAAK;gBACtB,OAAO,EAAE,MAAM;CAI5B;AAmCD,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,EACxB,4BAA4B,UAAQ,EACpC,4BAA4B,GAAE,4BAA4B,EAAO,GAChE,MAAM,EAAE,CAuGV;AAiFD,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,yBAAyB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,kBAAkB;IAC1B,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,yBAA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AAK,CAAC,EAAE,OAAO,CAAC;CACZ,EACN,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,UAAU,CAAC,CA4rCrB;AAED,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -719,6 +719,9 @@ export async function syncCommand(options = {}, runtime = {}) {
719
719
  // implements REQ-kibi-proposition-complete-ingestion, REQ-cli-schema-migration
720
720
  // Every drifted inventory is reported in one run, not one per sync attempt.
721
721
  const inventoryFailures = [];
722
+ // Requirements with no inventory at all: kibi migrate re-derives only an
723
+ // inventory a requirement already states, so they need the advisor.
724
+ const uninventoried = [];
722
725
  for (const result of extractedResults) {
723
726
  if (result.entity.type !== "req")
724
727
  continue;
@@ -743,6 +746,8 @@ export async function syncCommand(options = {}, runtime = {}) {
743
746
  advertisedContract;
744
747
  if (enforceBoundary && boundary.errors.length > 0) {
745
748
  inventoryFailures.push(`${key}: proposition-complete ingestion failed: ${boundary.errors.join("; ")}.`);
749
+ if (!advertisedContract)
750
+ uninventoried.push(result.entity.id);
746
751
  continue;
747
752
  }
748
753
  nextSemanticHashes[key] = boundary.sourceHash;
@@ -752,7 +757,16 @@ export async function syncCommand(options = {}, runtime = {}) {
752
757
  throw new SyncError([
753
758
  `${inventoryFailures.length} requirement(s) failed proposition-complete ingestion:`,
754
759
  ...inventoryFailures.map((failure) => ` ${failure}`),
755
- "Run 'kibi migrate' to re-derive inventories that drifted with the semantic advisor (it lists any that need a manual fix), or run kb_model mode analyze (CLI: semantic-advisor) with the complete requirement prose and preserve its inventory contract.",
760
+ ...(uninventoried.length > 0
761
+ ? [
762
+ `${uninventoried.join(", ")} state(s) no inventory, which 'kibi migrate' does not derive: for each, run kb_model mode analyze (CLI: semantic-advisor) with the requirement's id and its complete semantic_text, then write the returned inventory contract into the requirement (kb_upsert with semantic_inventory, semantic_inventory_version, semantic_source_field, semantic_source_hash and logic_claims), or retire it through a superseding requirement.`,
763
+ ]
764
+ : []),
765
+ ...(uninventoried.length < inventoryFailures.length
766
+ ? [
767
+ "Run 'kibi migrate' to re-derive inventories that drifted with the semantic advisor (it lists any that need a manual fix), or run kb_model mode analyze with the requirement's id and complete prose and preserve its inventory contract.",
768
+ ]
769
+ : []),
756
770
  ].join("\n"));
757
771
  }
758
772
  // Collect INVALID_AUTHORING diagnostics
@@ -1,7 +1,7 @@
1
1
  /** Firmness values, firmest first. */
2
2
  export declare const FIRMNESS_VALUES: readonly ["firm", "default", "exploratory"];
3
3
  export type Firmness = (typeof FIRMNESS_VALUES)[number];
4
- /** The firmness of a decision that does not state one. */
4
+ /** The firmness of an agent-written decision that does not state one. */
5
5
  export declare const DEFAULT_FIRMNESS: Firmness;
6
6
  /** Entity types that carry firmness. */
7
7
  export declare const FIRMNESS_TYPES: readonly ["req", "adr"];
@@ -18,10 +18,22 @@ export declare function supersedeAcknowledgement(from: string, to: string): stri
18
18
  export declare function isFirmness(value: unknown): value is Firmness;
19
19
  export declare function carriesFirmness(type: unknown): boolean;
20
20
  /**
21
- * The firmness a decision is read with: the authored value, else `default`.
22
- * Undefined for types that carry no firmness.
21
+ * The firmness a decision is read with: the authored value, else what its
22
+ * origin implies. A decision an agent wrote (`origin.kind: agent`) without a
23
+ * firmness is a delegated choice, `default`. Any other decision without one
24
+ * (written by a person, imported from their documents, or carried over from
25
+ * before origins were recorded) is theirs, so it reads as `firm`: an agent
26
+ * asks before changing it. Undefined for types that carry no firmness.
23
27
  */
24
- export declare function effectiveFirmness(type: unknown, value: unknown): Firmness | undefined;
28
+ export declare function effectiveFirmness(type: unknown, value: unknown, origin?: unknown): Firmness | undefined;
29
+ /**
30
+ * Whether a decision's firmness comes from its origin rather than an authored
31
+ * `firmness` value. Rules that judge the author's own marking (a firm decision
32
+ * must cite the person's words) apply only to explicit values.
33
+ */
34
+ export declare function firmnessIsImplicit(type: unknown, value: unknown): boolean;
35
+ /** The `kind` of an origin record, or undefined when there is none. */
36
+ export declare function originKind(origin: unknown): string | undefined;
25
37
  /**
26
38
  * The reference that makes a firm decision traceable to a human's words:
27
39
  * `origin.ref`, or `approval_ref` on a requirement.
@@ -1 +1 @@
1
- {"version":3,"file":"decision-firmness.d.ts","sourceRoot":"","sources":["../src/decision-firmness.ts"],"names":[],"mappings":"AA4BA,sCAAsC;AAEtC,eAAO,MAAM,eAAe,6CAA8C,CAAC;AAG3E,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAExD,0DAA0D;AAE1D,eAAO,MAAM,gBAAgB,EAAE,QAAoB,CAAC;AAEpD,wCAAwC;AAExC,eAAO,MAAM,cAAc,yBAA0B,CAAC;AAEtD,0EAA0E;AAE1E,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAE3D,+DAA+D;AAE/D,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAIxC;;;;GAIG;AAEH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAEzE;AAGD,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAK5D;AAGD,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAKtD;AAED;;;GAGG;AAEH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,OAAO,GACb,QAAQ,GAAG,SAAS,CAGtB;AAED;;;GAGG;AAEH,wBAAgB,WAAW,CAAC,MAAM,EAAE;IAClC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,MAAM,GAAG,SAAS,CAcrB;AAMD;;;GAGG;AAEH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkBxD"}
1
+ {"version":3,"file":"decision-firmness.d.ts","sourceRoot":"","sources":["../src/decision-firmness.ts"],"names":[],"mappings":"AA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
@@ -26,7 +26,7 @@ import { parseBodySections } from "./entity-body-context.js";
26
26
  /** Firmness values, firmest first. */
27
27
  // implements REQ-kb-decision-firmness
28
28
  export const FIRMNESS_VALUES = ["firm", "default", "exploratory"];
29
- /** The firmness of a decision that does not state one. */
29
+ /** The firmness of an agent-written decision that does not state one. */
30
30
  // implements REQ-kb-decision-firmness
31
31
  export const DEFAULT_FIRMNESS = "default";
32
32
  /** Entity types that carry firmness. */
@@ -59,14 +59,37 @@ export function carriesFirmness(type) {
59
59
  FIRMNESS_TYPES.includes(type));
60
60
  }
61
61
  /**
62
- * The firmness a decision is read with: the authored value, else `default`.
63
- * Undefined for types that carry no firmness.
62
+ * The firmness a decision is read with: the authored value, else what its
63
+ * origin implies. A decision an agent wrote (`origin.kind: agent`) without a
64
+ * firmness is a delegated choice, `default`. Any other decision without one
65
+ * (written by a person, imported from their documents, or carried over from
66
+ * before origins were recorded) is theirs, so it reads as `firm`: an agent
67
+ * asks before changing it. Undefined for types that carry no firmness.
64
68
  */
65
- // implements REQ-kb-decision-firmness
66
- export function effectiveFirmness(type, value) {
69
+ // implements REQ-kb-decision-firmness, REQ-kb-decision-firmness-from-origin
70
+ export function effectiveFirmness(type, value, origin) {
67
71
  if (!carriesFirmness(type))
68
72
  return undefined;
69
- return isFirmness(value) ? value : DEFAULT_FIRMNESS;
73
+ if (isFirmness(value))
74
+ return value;
75
+ return originKind(origin) === "agent" ? DEFAULT_FIRMNESS : "firm";
76
+ }
77
+ /**
78
+ * Whether a decision's firmness comes from its origin rather than an authored
79
+ * `firmness` value. Rules that judge the author's own marking (a firm decision
80
+ * must cite the person's words) apply only to explicit values.
81
+ */
82
+ // implements REQ-kb-decision-firmness-from-origin
83
+ export function firmnessIsImplicit(type, value) {
84
+ return carriesFirmness(type) && !isFirmness(value);
85
+ }
86
+ /** The `kind` of an origin record, or undefined when there is none. */
87
+ // implements REQ-kb-decision-firmness-from-origin
88
+ export function originKind(origin) {
89
+ if (origin === null || typeof origin !== "object")
90
+ return undefined;
91
+ const kind = origin.kind;
92
+ return typeof kind === "string" ? kind : undefined;
70
93
  }
71
94
  /**
72
95
  * The reference that makes a firm decision traceable to a human's words:
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/extractors/markdown.ts"],"names":[],"mappings":"AAsBA,OAAO,EAEL,KAAK,QAAQ,EAGd,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,YAAY,EAElB,MAAM,4BAA4B,CAAC;AAuEpC,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,0BAA0B,CAAC,EAAE,4BAA4B,CAAC;IAC1D,qBAAqB,CAAC,EAAE,eAAe,GAAG,UAAU,GAAG,OAAO,CAAC;IAC/D,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EA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