kibi-cli 2.29.0 → 2.30.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 (81) hide show
  1. package/dist/cli-operation-metadata.d.ts +8 -8
  2. package/dist/cli-operation-metadata.js +8 -8
  3. package/dist/cli-register-reporting.d.ts.map +1 -1
  4. package/dist/cli-register-reporting.js +12 -0
  5. package/dist/commands/check.d.ts.map +1 -1
  6. package/dist/commands/check.js +4 -0
  7. package/dist/commands/signoff.d.ts +37 -0
  8. package/dist/commands/signoff.d.ts.map +1 -0
  9. package/dist/commands/signoff.js +152 -0
  10. package/dist/operations/modeling/predicate-applicability.d.ts +5 -1
  11. package/dist/operations/modeling/predicate-applicability.d.ts.map +1 -1
  12. package/dist/operations/modeling/predicate-applicability.js +35 -2
  13. package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
  14. package/dist/operations/modeling/suggest-predicates.js +3 -1
  15. package/dist/operations/mutation/contradictions.d.ts +7 -5
  16. package/dist/operations/mutation/contradictions.d.ts.map +1 -1
  17. package/dist/operations/mutation/contradictions.js +8 -6
  18. package/dist/operations/mutation/source-authoring.d.ts +15 -0
  19. package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
  20. package/dist/operations/mutation/source-authoring.js +19 -7
  21. package/dist/operations/mutation/types.d.ts +5 -0
  22. package/dist/operations/mutation/types.d.ts.map +1 -1
  23. package/dist/operations/mutation/upsert.d.ts +14 -0
  24. package/dist/operations/mutation/upsert.d.ts.map +1 -1
  25. package/dist/operations/mutation/upsert.js +42 -36
  26. package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
  27. package/dist/operations/mutation/validate-upsert.js +61 -37
  28. package/dist/public/operations/catalog.d.ts +29 -8
  29. package/dist/public/operations/catalog.d.ts.map +1 -1
  30. package/dist/public/operations/contracts.d.ts.map +1 -1
  31. package/dist/public/operations/contracts.js +2 -0
  32. package/dist/public/operations/specs/bootstrap.d.ts +1 -1
  33. package/dist/public/operations/specs/bootstrap.js +1 -1
  34. package/dist/public/operations/specs/composite.d.ts +1 -1
  35. package/dist/public/operations/specs/composite.js +1 -1
  36. package/dist/public/operations/specs/discovery.d.ts +1 -1
  37. package/dist/public/operations/specs/discovery.js +1 -1
  38. package/dist/public/operations/specs/impact-review-preparation.d.ts +2 -1
  39. package/dist/public/operations/specs/impact-review-preparation.d.ts.map +1 -1
  40. package/dist/public/operations/specs/impact-review-preparation.js +2 -1
  41. package/dist/public/operations/specs/planning.d.ts +1 -1
  42. package/dist/public/operations/specs/planning.js +1 -1
  43. package/dist/public/operations/specs/reporting.d.ts +23 -3
  44. package/dist/public/operations/specs/reporting.d.ts.map +1 -1
  45. package/dist/public/operations/specs/reporting.js +97 -21
  46. package/dist/public/skills/kibi-commit-review/SKILL.md +125 -0
  47. package/dist/public/skills/kibi-commit-review/resources/staged-gate.md +98 -0
  48. package/dist/public/skills/kibi-decisions/SKILL.md +130 -0
  49. package/dist/public/skills/kibi-decisions/resources/decision-records.md +142 -0
  50. package/dist/public/skills/kibi-decisions/resources/signoff-views.md +66 -0
  51. package/dist/public/skills/kibi-freshness/SKILL.md +2 -0
  52. package/dist/public/skills/kibi-traceability/SKILL.md +4 -0
  53. package/dist/public/skills/kibi-usage/SKILL.md +20 -15
  54. package/dist/signoff/collect.d.ts +39 -0
  55. package/dist/signoff/collect.d.ts.map +1 -0
  56. package/dist/signoff/collect.js +398 -0
  57. package/dist/signoff/html.d.ts +4 -0
  58. package/dist/signoff/html.d.ts.map +1 -0
  59. package/dist/signoff/html.js +210 -0
  60. package/dist/signoff/markdown.d.ts +20 -0
  61. package/dist/signoff/markdown.d.ts.map +1 -0
  62. package/dist/signoff/markdown.js +203 -0
  63. package/dist/signoff/model.d.ts +134 -0
  64. package/dist/signoff/model.d.ts.map +1 -0
  65. package/dist/signoff/model.js +138 -0
  66. package/package.json +2 -2
  67. package/src/public/operations/contracts.ts +2 -0
  68. package/src/public/operations/specs/bootstrap.ts +1 -1
  69. package/src/public/operations/specs/composite.ts +1 -1
  70. package/src/public/operations/specs/discovery.ts +1 -1
  71. package/src/public/operations/specs/impact-review-preparation.ts +3 -1
  72. package/src/public/operations/specs/planning.ts +1 -1
  73. package/src/public/operations/specs/reporting.ts +109 -21
  74. package/src/public/skills/kibi-commit-review/SKILL.md +125 -0
  75. package/src/public/skills/kibi-commit-review/resources/staged-gate.md +98 -0
  76. package/src/public/skills/kibi-decisions/SKILL.md +130 -0
  77. package/src/public/skills/kibi-decisions/resources/decision-records.md +142 -0
  78. package/src/public/skills/kibi-decisions/resources/signoff-views.md +66 -0
  79. package/src/public/skills/kibi-freshness/SKILL.md +2 -0
  80. package/src/public/skills/kibi-traceability/SKILL.md +4 -0
  81. package/src/public/skills/kibi-usage/SKILL.md +20 -15
@@ -31,19 +31,19 @@ export declare const CLI_OPERATION_METADATA: readonly [{
31
31
  }, {
32
32
  readonly name: "kb_status";
33
33
  readonly cliName: "status";
34
- readonly description: "Report current branch, KB snapshot, freshness metadata, schema status, and a typed kibi.migration-plan.v2 action graph. Read-only status inspection with no mutation side effects; damaged stores are diagnosed without starting the engine.";
34
+ readonly description: "Report current branch, KB snapshot, freshness metadata, schema status, and a typed kibi.migration-plan.v2 action graph. Call it first to orient on a branch or after a failed call; use kb_check for validation findings and kb_coverage for proof status. Read-only status inspection with no mutation side effects; damaged stores are diagnosed without starting the engine.";
35
35
  }, {
36
36
  readonly name: "kb_find_gaps";
37
37
  readonly cliName: "find-gaps";
38
- readonly description: "Run bulk missing/present relationship analysis over KB entities. Use for questions like which requirements lack scenarios or tests. No mutation side effects.";
38
+ readonly description: "List KB entities by the relationships they lack or have. Use for questions like which requirements lack scenarios or tests; all filters must match, and a relationship counts in either direction. Use kb_coverage instead for proof status and repair plans, and kb_check for rule violations. No mutation side effects.";
39
39
  }, {
40
40
  readonly name: "kb_coverage";
41
41
  readonly cliName: "coverage";
42
- readonly description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.";
42
+ readonly description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Use it to ask which requirements are proven and what blocks the rest; use kb_find_gaps for a plain list of missing links and kb_check for rule violations. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.";
43
43
  }, {
44
44
  readonly name: "kb_graph";
45
45
  readonly cliName: "graph";
46
- readonly description: "Run bounded graph traversal from one or more seed IDs across curated relationship types. No mutation side effects.";
46
+ readonly description: "Run bounded graph traversal from one or more seed IDs across curated relationship types and return the nodes and edges reached. Use it to follow links from IDs you already have, such as a requirement to its scenarios and tests or a symbol to the requirements it implements; use kb_query to find entities by filter and kb_search to ask a question. Traversal stops at depth, maxNodes or maxEdges and then sets truncated. No mutation side effects.";
47
47
  }, {
48
48
  readonly name: "kb_semantic_advisor";
49
49
  readonly cliName: "semantic-advisor";
@@ -59,11 +59,11 @@ export declare const CLI_OPERATION_METADATA: readonly [{
59
59
  }, {
60
60
  readonly name: "kb_model";
61
61
  readonly cliName: "model";
62
- readonly description: "Turn requirement prose into checkable structure without writing the KB. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.";
62
+ readonly description: "Turn requirement prose into checkable structure without writing the KB. Use it for one requirement's prose; to plan a whole change request use kb_compile_intent. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.";
63
63
  }, {
64
64
  readonly name: "kb_plan_bootstrap";
65
65
  readonly cliName: "plan-bootstrap";
66
- readonly description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Read-only analysis of the repository plus any declared knowledge sources and cited intent claims returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.";
66
+ readonly description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Use it only to onboard a repository whose KB is empty or incomplete (the kibi-bootstrap skill drives it); for a change in an onboarded project use kb_compile_intent. Read-only analysis of the repository plus any declared knowledge sources and cited intent claims returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.";
67
67
  }, {
68
68
  readonly name: "kb_validate_upsert";
69
69
  readonly cliName: "validate-upsert";
@@ -83,7 +83,7 @@ export declare const CLI_OPERATION_METADATA: readonly [{
83
83
  }, {
84
84
  readonly name: "kb_prepare_impact_review";
85
85
  readonly cliName: "prepare-impact-review";
86
- readonly description: "Prepare complete content-bound impact-review authoring inputs from the current staged snapshot or explicitly selected immutable Git commits. Returns strict reviewer schemas and an unauthored template; it does not decide, approve, sign, stage, or prove the review.";
86
+ readonly description: "Prepare complete content-bound impact-review authoring inputs from the current staged snapshot or explicitly selected immutable Git commits. Use it when kb_check reports that changed files need an impact review; it does not plan KB changes. Returns strict reviewer schemas and an unauthored template; it does not decide, approve, sign, stage, or prove the review.";
87
87
  }, {
88
88
  readonly name: "kb_sparql_remote";
89
89
  readonly cliName: "sparql-remote";
@@ -91,7 +91,7 @@ export declare const CLI_OPERATION_METADATA: readonly [{
91
91
  }, {
92
92
  readonly name: "kb_compile_intent";
93
93
  readonly cliName: "compile-intent";
94
- readonly description: "Compile complete change intent into a deterministic, snapshot-bound read-only plan. Reuses intent-aware discovery and semantic modeling, accounts for every proposition, reports contradiction witnesses, proposes traceability links, and emits dependency-ordered kb_upsert-style steps only for resolved typed claims. contradictionAnalysis.outcome is no_conflict only when the check could decide: an unmodeled proposition or a related current requirement without logic leaves it unresolved with reasons and reviewCandidates to compare and judge through conflictReviews. No mutation side effects.";
94
+ readonly description: "Compile complete change intent into a deterministic, snapshot-bound read-only plan. Use it before editing code for a change request that may touch several requirements; use kb_model for one requirement's prose and kb_plan_bootstrap for first-time onboarding. Reuses intent-aware discovery and semantic modeling, accounts for every proposition, reports contradiction witnesses, proposes traceability links, and emits dependency-ordered kb_upsert-style steps only for resolved typed claims. contradictionAnalysis.outcome is no_conflict only when the check could decide: an unmodeled proposition or a related current requirement without logic leaves it unresolved with reasons and reviewCandidates to compare and judge through conflictReviews. No mutation side effects.";
95
95
  }, {
96
96
  readonly name: "kb_apply_plan";
97
97
  readonly cliName: "apply-plan";
@@ -35,22 +35,22 @@ export const CLI_OPERATION_METADATA = [
35
35
  {
36
36
  name: "kb_status",
37
37
  cliName: "status",
38
- description: "Report current branch, KB snapshot, freshness metadata, schema status, and a typed kibi.migration-plan.v2 action graph. Read-only status inspection with no mutation side effects; damaged stores are diagnosed without starting the engine.",
38
+ description: "Report current branch, KB snapshot, freshness metadata, schema status, and a typed kibi.migration-plan.v2 action graph. Call it first to orient on a branch or after a failed call; use kb_check for validation findings and kb_coverage for proof status. Read-only status inspection with no mutation side effects; damaged stores are diagnosed without starting the engine.",
39
39
  },
40
40
  {
41
41
  name: "kb_find_gaps",
42
42
  cliName: "find-gaps",
43
- description: "Run bulk missing/present relationship analysis over KB entities. Use for questions like which requirements lack scenarios or tests. No mutation side effects.",
43
+ description: "List KB entities by the relationships they lack or have. Use for questions like which requirements lack scenarios or tests; all filters must match, and a relationship counts in either direction. Use kb_coverage instead for proof status and repair plans, and kb_check for rule violations. No mutation side effects.",
44
44
  },
45
45
  {
46
46
  name: "kb_coverage",
47
47
  cliName: "coverage",
48
- description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.",
48
+ description: "Generate curated structural coverage and conservative end-to-end requirement proof reports for requirements, symbols, or grouped types. Use it to ask which requirements are proven and what blocks the rest; use kb_find_gaps for a plain list of missing links and kb_check for rule violations. Reports include the compatible repair plan plus typed kibi.migration-plan.v2 actions; semantic and E2E actions remain review/execution work. Paginated plans identify incomplete scope and no mutation occurs.",
49
49
  },
50
50
  {
51
51
  name: "kb_graph",
52
52
  cliName: "graph",
53
- description: "Run bounded graph traversal from one or more seed IDs across curated relationship types. No mutation side effects.",
53
+ description: "Run bounded graph traversal from one or more seed IDs across curated relationship types and return the nodes and edges reached. Use it to follow links from IDs you already have, such as a requirement to its scenarios and tests or a symbol to the requirements it implements; use kb_query to find entities by filter and kb_search to ask a question. Traversal stops at depth, maxNodes or maxEdges and then sets truncated. No mutation side effects.",
54
54
  },
55
55
  {
56
56
  name: "kb_semantic_advisor",
@@ -70,12 +70,12 @@ export const CLI_OPERATION_METADATA = [
70
70
  {
71
71
  name: "kb_model",
72
72
  cliName: "model",
73
- description: "Turn requirement prose into checkable structure without writing the KB. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.",
73
+ description: "Turn requirement prose into checkable structure without writing the KB. Use it for one requirement's prose; to plan a whole change request use kb_compile_intent. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. With requirementId, mode:predicates also returns a hash-bound plan (fact write plus requires_predicate link) for kb_apply_plan, whose contradictionAnalysis is the what-if over the current KB; other returned plans apply with kb_upsert, and kb_upsert dryRun with plannedFacts previews a requirement before its facts exist.",
74
74
  },
75
75
  {
76
76
  name: "kb_plan_bootstrap",
77
77
  cliName: "plan-bootstrap",
78
- description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Read-only analysis of the repository plus any declared knowledge sources and cited intent claims returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.",
78
+ description: "Generate a deterministic, snapshot-bound kibi.bootstrap-plan.v1 for repository onboarding. Use it only to onboard a repository whose KB is empty or incomplete (the kibi-bootstrap skill drives it); for a change in an onboarded project use kb_compile_intent. Read-only analysis of the repository plus any declared knowledge sources and cited intent claims returns evidence, bounded context questions, exact dependency-ordered actions, a canonical plan hash, and no mutation side effects.",
79
79
  },
80
80
  {
81
81
  name: "kb_validate_upsert",
@@ -100,7 +100,7 @@ export const CLI_OPERATION_METADATA = [
100
100
  {
101
101
  name: "kb_prepare_impact_review",
102
102
  cliName: "prepare-impact-review",
103
- description: "Prepare complete content-bound impact-review authoring inputs from the current staged snapshot or explicitly selected immutable Git commits. Returns strict reviewer schemas and an unauthored template; it does not decide, approve, sign, stage, or prove the review.",
103
+ description: "Prepare complete content-bound impact-review authoring inputs from the current staged snapshot or explicitly selected immutable Git commits. Use it when kb_check reports that changed files need an impact review; it does not plan KB changes. Returns strict reviewer schemas and an unauthored template; it does not decide, approve, sign, stage, or prove the review.",
104
104
  },
105
105
  {
106
106
  name: "kb_sparql_remote",
@@ -110,7 +110,7 @@ export const CLI_OPERATION_METADATA = [
110
110
  {
111
111
  name: "kb_compile_intent",
112
112
  cliName: "compile-intent",
113
- description: "Compile complete change intent into a deterministic, snapshot-bound read-only plan. Reuses intent-aware discovery and semantic modeling, accounts for every proposition, reports contradiction witnesses, proposes traceability links, and emits dependency-ordered kb_upsert-style steps only for resolved typed claims. contradictionAnalysis.outcome is no_conflict only when the check could decide: an unmodeled proposition or a related current requirement without logic leaves it unresolved with reasons and reviewCandidates to compare and judge through conflictReviews. No mutation side effects.",
113
+ description: "Compile complete change intent into a deterministic, snapshot-bound read-only plan. Use it before editing code for a change request that may touch several requirements; use kb_model for one requirement's prose and kb_plan_bootstrap for first-time onboarding. Reuses intent-aware discovery and semantic modeling, accounts for every proposition, reports contradiction witnesses, proposes traceability links, and emits dependency-ordered kb_upsert-style steps only for resolved typed claims. contradictionAnalysis.outcome is no_conflict only when the check could decide: an unmodeled proposition or a related current requirement without logic leaves it unresolved with reasons and reviewCandidates to compare and judge through conflictReviews. No mutation side effects.",
114
114
  },
115
115
  {
116
116
  name: "kb_apply_plan",
@@ -1 +1 @@
1
- {"version":3,"file":"cli-register-reporting.d.ts","sourceRoot":"","sources":["../src/cli-register-reporting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsMhE"}
1
+ {"version":3,"file":"cli-register-reporting.d.ts","sourceRoot":"","sources":["../src/cli-register-reporting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYzC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkOhE"}
@@ -46,6 +46,18 @@ export function registerReportingCommands(program) {
46
46
  .action(async (options) => {
47
47
  await (await import("./commands/report.js")).reportCommand(options);
48
48
  });
49
+ program
50
+ .command("signoff")
51
+ .description("Show the requirements a change adds, rewrites or affects (or, with --questions, the decisions waiting for the person) as chat Markdown, a fenced block for host renderers, an HTML page or JSON for signoff")
52
+ .option("--staged", "Summarize staged changes instead of the working tree", false)
53
+ .option("--questions <path>", 'Render decision questions from a JSON file (use - for stdin): {"questions":[{"statement":"...","quote":"...","firmness":"firm"}]}')
54
+ .option("--format <format>", "Output format: chat (plain Markdown for a reply) | md (fenced block for host renderers) | html | json; default chat, or KIBI_SIGNOFF_FORMAT")
55
+ .option("--output <path>", "HTML file to write (default .kb/briefs/signoff/latest.html)")
56
+ .option("--open", "Open the HTML page in the default browser", false)
57
+ .option("--no-proof", "Skip the proof-state lookup (faster; no Prolog)")
58
+ .action(async (options) => {
59
+ await (await import("./commands/signoff.js")).signoffCommand(options);
60
+ });
49
61
  program
50
62
  .command("coverage")
51
63
  .description(getCliOperationMetadata("kb_coverage").description)
@@ -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;AAoF7C,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,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,OA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,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"}
@@ -25,6 +25,7 @@ import { PrologProcess } from "../prolog.js";
25
25
  import { escapeAtom, normalizeEntityId, parseTriples, parseViolationRows, } from "../prolog/codec.js";
26
26
  import { createSemanticReviewDiagnostics, createSymbolGranularityDiagnostics, createSymbolQualityDiagnostics, hasBlockingImpactDiagnostics, } from "../public/impact-diagnostics.js";
27
27
  import { executeCheck } from "../public/operations/check-executor.js";
28
+ import { nodeGit } from "../public/operations/node-ports.js";
28
29
  import { refreshDetachedSnapshot } from "../runtime/detached-snapshot.js";
29
30
  import { amendsRootCommit } from "../traceability/commit-amend.js";
30
31
  import { KIBI_NO_IMPACT_DECLARATION, KIBI_SYMBOLS_MANIFEST_PATH, KIBI_SYMBOL_COORDINATES_PATH, } from "../traceability/evidence-model.js";
@@ -930,6 +931,9 @@ export async function checkCommand(options) {
930
931
  workspaceRoot: process.cwd(),
931
932
  signal: new AbortController().signal,
932
933
  clock: () => new Date(),
934
+ // The workspace snapshot lets quality diagnostics read the same
935
+ // proof receipt evidence as kibi coverage.
936
+ git: nodeGit,
933
937
  prolog: {
934
938
  query: (goal) => activeProlog.query(goal),
935
939
  ...(activeProlog instanceof EngineClient
@@ -0,0 +1,37 @@
1
+ import { type SignoffCollectDeps } from "../signoff/collect.js";
2
+ import { type SignoffView } from "../signoff/model.js";
3
+ export type SignoffOptions = Readonly<{
4
+ staged?: boolean;
5
+ questions?: string;
6
+ format?: string;
7
+ output?: string;
8
+ open?: boolean;
9
+ proof?: boolean;
10
+ }>;
11
+ export type SignoffCommandDeps = SignoffCollectDeps & Readonly<{
12
+ cwd?: () => string;
13
+ readStdin?: () => string;
14
+ write?: (text: string) => void;
15
+ writeNote?: (text: string) => void;
16
+ env?: NodeJS.ProcessEnv;
17
+ openReport?: (filePath: string) => Promise<void>;
18
+ }>;
19
+ /** Sets the default signoff format for a host (`chat`, `md`, `html`, `json`). */
20
+ export declare const SIGNOFF_FORMAT_ENV = "KIBI_SIGNOFF_FORMAT";
21
+ /**
22
+ * The format `kibi signoff` prints when `--format` is not given. A fenced
23
+ * block only helps where a host renderer draws it (the OpenCode TUI, which
24
+ * sets KIBI_SIGNOFF_FORMAT=md for its shell); every other host renders
25
+ * assistant or message Markdown directly and shows a fence as code, so the
26
+ * default is the unfenced `chat` Markdown.
27
+ */
28
+ export declare function defaultSignoffFormat(env: NodeJS.ProcessEnv): string;
29
+ /**
30
+ * `kibi signoff`: print the requirements signoff view for the current change
31
+ * (or, with `--questions`, the decisions the agent asks the person to
32
+ * confirm) as chat Markdown, a fenced Markdown block, HTML or JSON, and keep the latest view
33
+ * in `.kb/briefs/signoff/` (latest.json, latest.md, latest.html) for editor
34
+ * plugins.
35
+ */
36
+ export declare function signoffCommand(options: SignoffOptions, deps?: SignoffCommandDeps): Promise<SignoffView>;
37
+ //# sourceMappingURL=signoff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signoff.d.ts","sourceRoot":"","sources":["../../src/commands/signoff.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC,CAAC;AAGH,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GACjD,QAAQ,CAAC;IACP,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD,CAAC,CAAC;AAKL,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AAGxD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAGnE;AAoFD;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,WAAW,CAAC,CA4EtB"}
@@ -0,0 +1,152 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { readFileSync } from "node:fs";
3
+ import { mkdir, rename, rm, writeFile } from "node:fs/promises";
4
+ import path from "node:path";
5
+ import { coverageSpec } from "../public/operations/specs/reporting.js";
6
+ import { earliestUnmetGate } from "../report/html-report.js";
7
+ import { collectSignoffQuestions, collectSignoffSummary, parseSignoffQuestionsInput, } from "../signoff/collect.js";
8
+ import { renderSignoffHtml } from "../signoff/html.js";
9
+ import { renderQuestionsMarkdownBody, renderSignoffChatMarkdown, renderSignoffMarkdown, renderSummaryMarkdownBody, } from "../signoff/markdown.js";
10
+ import { SIGNOFF_LATEST_HTML, SIGNOFF_LATEST_JSON, SIGNOFF_LATEST_MARKDOWN, } from "../signoff/model.js";
11
+ import { openReport } from "./report.js";
12
+ const FORMATS = new Set(["chat", "md", "html", "json"]);
13
+ // implements REQ-kibi-signoff-views
14
+ /** Sets the default signoff format for a host (`chat`, `md`, `html`, `json`). */
15
+ export const SIGNOFF_FORMAT_ENV = "KIBI_SIGNOFF_FORMAT";
16
+ // implements REQ-kibi-signoff-views
17
+ /**
18
+ * The format `kibi signoff` prints when `--format` is not given. A fenced
19
+ * block only helps where a host renderer draws it (the OpenCode TUI, which
20
+ * sets KIBI_SIGNOFF_FORMAT=md for its shell); every other host renders
21
+ * assistant or message Markdown directly and shows a fence as code, so the
22
+ * default is the unfenced `chat` Markdown.
23
+ */
24
+ export function defaultSignoffFormat(env) {
25
+ const configured = env[SIGNOFF_FORMAT_ENV]?.trim().toLowerCase();
26
+ return configured && FORMATS.has(configured) ? configured : "chat";
27
+ }
28
+ async function writeAtomically(filePath, contents) {
29
+ await mkdir(path.dirname(filePath), { recursive: true });
30
+ const temporary = path.join(path.dirname(filePath), `.${path.basename(filePath)}.${randomUUID()}.tmp`);
31
+ try {
32
+ await writeFile(temporary, contents, "utf8");
33
+ await rename(temporary, filePath);
34
+ }
35
+ catch (error) {
36
+ await rm(temporary, { force: true });
37
+ throw error;
38
+ }
39
+ }
40
+ function record(value) {
41
+ return value !== null && typeof value === "object"
42
+ ? value
43
+ : {};
44
+ }
45
+ /** Proof state per requirement from the requirement coverage report. */
46
+ async function loadProof() {
47
+ const { createCliRuntime } = await import("../runtime/cli-runtime.js");
48
+ const runtime = createCliRuntime();
49
+ const spec = coverageSpec;
50
+ const context = await runtime.open(spec);
51
+ let rows = [];
52
+ try {
53
+ const result = await coverageSpec.execute({
54
+ by: "req",
55
+ tags: [],
56
+ includePassing: true,
57
+ includeTransitive: true,
58
+ limit: 100_000,
59
+ offset: 0,
60
+ }, context);
61
+ rows = (result.structuredContent?.rows ?? []);
62
+ }
63
+ catch (error) {
64
+ await runtime.close(context, { status: "error", error });
65
+ throw error;
66
+ }
67
+ await runtime.close(context, { status: "success", result: rows.length });
68
+ const proof = new Map();
69
+ for (const row of rows) {
70
+ if (typeof row.id !== "string")
71
+ continue;
72
+ const conflicts = (record(record(row.proofStages).contradictions)
73
+ .conflicts ?? []);
74
+ proof.set(row.id, {
75
+ status: typeof row.proofStatus === "string" ? row.proofStatus : "missing",
76
+ gate: earliestUnmetGate(row),
77
+ testCount: typeof row.testCount === "number" ? row.testCount : 0,
78
+ contradictions: conflicts
79
+ .map(record)
80
+ .filter((conflict) => conflict.status === "contradiction")
81
+ .map((conflict) => typeof conflict.reason === "string"
82
+ ? conflict.reason
83
+ : "Two current requirements encode incompatible claims."),
84
+ });
85
+ }
86
+ return proof;
87
+ }
88
+ function readQuestionsSource(source, cwd, readStdin) {
89
+ return source === "-"
90
+ ? readStdin()
91
+ : readFileSync(path.resolve(cwd, source), "utf8");
92
+ }
93
+ // implements REQ-kibi-signoff-views
94
+ /**
95
+ * `kibi signoff`: print the requirements signoff view for the current change
96
+ * (or, with `--questions`, the decisions the agent asks the person to
97
+ * confirm) as chat Markdown, a fenced Markdown block, HTML or JSON, and keep the latest view
98
+ * in `.kb/briefs/signoff/` (latest.json, latest.md, latest.html) for editor
99
+ * plugins.
100
+ */
101
+ export async function signoffCommand(options, deps = {}) {
102
+ const format = (options.format ?? defaultSignoffFormat(deps.env ?? process.env))
103
+ .trim()
104
+ .toLowerCase();
105
+ if (!FORMATS.has(format)) {
106
+ throw new Error(`Unknown signoff format "${options.format}": use chat, md, html or json`);
107
+ }
108
+ const cwd = (deps.cwd ?? (() => process.cwd()))();
109
+ const write = deps.write ?? ((text) => process.stdout.write(text));
110
+ const scope = options.staged ? "staged" : "working";
111
+ const view = options.questions !== undefined
112
+ ? collectSignoffQuestions(cwd, parseSignoffQuestionsInput(readQuestionsSource(options.questions, cwd, deps.readStdin ?? (() => readFileSync(0, "utf8")))), deps.now)
113
+ : await collectSignoffSummary(cwd, scope, {
114
+ ...(deps.git ? { git: deps.git } : {}),
115
+ ...(deps.loadAffected ? { loadAffected: deps.loadAffected } : {}),
116
+ ...(deps.now ? { now: deps.now } : {}),
117
+ ...(options.proof === false
118
+ ? {}
119
+ : { loadProof: deps.loadProof ?? loadProof }),
120
+ });
121
+ const html = renderSignoffHtml(view);
122
+ await writeAtomically(path.join(cwd, SIGNOFF_LATEST_JSON), `${JSON.stringify(view, null, 2)}\n`);
123
+ await writeAtomically(path.join(cwd, SIGNOFF_LATEST_MARKDOWN), `${view.kind === "summary"
124
+ ? renderSummaryMarkdownBody(view, Number.POSITIVE_INFINITY)
125
+ : renderQuestionsMarkdownBody(view)}\n`);
126
+ await writeAtomically(path.join(cwd, SIGNOFF_LATEST_HTML), html);
127
+ if (format === "json") {
128
+ write(`${JSON.stringify(view, null, 2)}\n`);
129
+ }
130
+ else if (format === "md") {
131
+ write(renderSignoffMarkdown(view));
132
+ }
133
+ else if (format === "chat") {
134
+ write(`${renderSignoffChatMarkdown(view)}\n`);
135
+ // The page path goes to stderr so stdout stays pasteable as the reply.
136
+ (deps.writeNote ?? ((text) => process.stderr.write(text)))(`Kibi signoff page: ${path.join(cwd, SIGNOFF_LATEST_HTML)} (attach or publish it next to the reply when the host can show a page)\n`);
137
+ }
138
+ else {
139
+ const target = options.output?.trim()
140
+ ? path.resolve(cwd, options.output.trim())
141
+ : path.join(cwd, SIGNOFF_LATEST_HTML);
142
+ if (target !== path.join(cwd, SIGNOFF_LATEST_HTML)) {
143
+ await writeAtomically(target, html);
144
+ }
145
+ write(`Kibi signoff page written to ${target}\n`);
146
+ if (options.open === true) {
147
+ await (deps.openReport ?? openReport)(target);
148
+ write("Opened the signoff page in the default browser\n");
149
+ }
150
+ }
151
+ return view;
152
+ }
@@ -2,6 +2,10 @@ import { type RankedPredicateSchema } from "./predicate-ranker.js";
2
2
  export declare const MIN_APPLICABILITY_SCORE = 0.62;
3
3
  export declare const STRONG_APPLICABILITY_SCORE = 0.8;
4
4
  export declare const WEAK_CANDIDATE_MARGIN = 0.06;
5
+ export interface SemanticApplicabilityOptions {
6
+ /** The caller selected this schema by its exact ID (schemaId). */
7
+ readonly explicitSchema?: boolean;
8
+ }
5
9
  export interface SemanticApplicability {
6
10
  readonly eligible: boolean;
7
11
  readonly reasons: readonly string[];
@@ -12,5 +16,5 @@ export interface SemanticApplicability {
12
16
  * function deliberately does not inspect argument values: complete-looking
13
17
  * terms cannot make a semantically unrelated schema eligible.
14
18
  */
15
- export declare function evaluateSemanticApplicability(ranked: RankedPredicateSchema, text: string): SemanticApplicability;
19
+ export declare function evaluateSemanticApplicability(ranked: RankedPredicateSchema, text: string, options?: SemanticApplicabilityOptions): SemanticApplicability;
16
20
  //# sourceMappingURL=predicate-applicability.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"predicate-applicability.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-applicability.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAC5C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAoX1C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,MAAM,GACX,qBAAqB,CA2EvB"}
1
+ {"version":3,"file":"predicate-applicability.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/predicate-applicability.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAC5C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAiZ1C,MAAM,WAAW,4BAA4B;IAC3C,kEAAkE;IAClE,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,qBAAqB,EAC7B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,4BAAiC,GACzC,qBAAqB,CA2FvB"}
@@ -348,12 +348,31 @@ function specificityEvidence(schema, text) {
348
348
  }, 0);
349
349
  return Math.min(1, hits / Math.max(3, values.length / 2));
350
350
  }
351
+ function nameTokens(name) {
352
+ return (name.toLowerCase().match(/[a-z0-9]+/g) ?? []).filter((token) => token.length > 2);
353
+ }
354
+ function claimMentions(text, token) {
355
+ return new RegExp(`\\b${token}`, "i").test(text);
356
+ }
357
+ /**
358
+ * Names of an explicitly selected schema that the claim does not state: an
359
+ * argument name counts as stated when every word of it appears in the claim,
360
+ * the predicate name when any of its words does.
361
+ */
362
+ function unstatedSchemaNames(schema, text) {
363
+ const predicateTokens = nameTokens(schema.predicate_name);
364
+ const missing = schema.argument_names.filter((name) => !nameTokens(name).every((token) => claimMentions(text, token)));
365
+ return predicateTokens.length > 0 &&
366
+ !predicateTokens.some((token) => claimMentions(text, token))
367
+ ? [schema.predicate_name, ...missing]
368
+ : missing;
369
+ }
351
370
  /**
352
371
  * Evaluate semantic fit after retrieval and before argument binding. The
353
372
  * function deliberately does not inspect argument values: complete-looking
354
373
  * terms cannot make a semantically unrelated schema eligible.
355
374
  */
356
- export function evaluateSemanticApplicability(ranked, text) {
375
+ export function evaluateSemanticApplicability(ranked, text, options = {}) {
357
376
  const schema = ranked.schema;
358
377
  const rule = INTENT_RULES[schema.predicate_name];
359
378
  const usageHints = usageHintsForSchema(schema);
@@ -402,11 +421,25 @@ export function evaluateSemanticApplicability(ranked, text) {
402
421
  if (negativeHints > 0) {
403
422
  reasons.push("usage guidance says this schema is not for the supplied intent");
404
423
  }
405
- const score = round(ranked.score * 0.42 +
424
+ const computed = round(ranked.score * 0.42 +
406
425
  Math.min(1, positive) * 0.58 -
407
426
  Math.min(1, negative) * 0.46);
427
+ // A schema the caller chose by ID whose predicate and every argument the
428
+ // claim names is reviewed evidence the lexical score cannot see, for example
429
+ // a project-local schema with no keywords. Contradictory cues above still
430
+ // reject it.
431
+ const unstated = options.explicitSchema
432
+ ? unstatedSchemaNames(schema, text)
433
+ : [];
434
+ const namedByClaim = options.explicitSchema === true && unstated.length === 0;
435
+ const score = namedByClaim
436
+ ? Math.max(computed, MIN_APPLICABILITY_SCORE)
437
+ : computed;
408
438
  if (score < MIN_APPLICABILITY_SCORE) {
409
439
  reasons.push(`applicability score ${score.toFixed(2)} is below conservative threshold ${MIN_APPLICABILITY_SCORE.toFixed(2)}`);
440
+ if (unstated.length > 0) {
441
+ reasons.push(`the claim does not name ${unstated.join(", ")} from the selected schema ${schema.predicate_name}`);
442
+ }
410
443
  }
411
444
  return {
412
445
  eligible: reasons.length === 0 && score >= MIN_APPLICABILITY_SCORE,
@@ -1 +1 @@
1
- {"version":3,"file":"suggest-predicates.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/suggest-predicates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,0CAA0C,CAAC;AA2BlD,OAAO,KAAK,EAIV,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AA+H9B,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,EACzE,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,GACzE,MAAM,CAIR;AAED,wBAAgB,2CAA2C,CACzD,IAAI,EAAE,IAAI,CACR,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,EACD,KAAK,EAAE,IAAI,CACT,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,GACA,MAAM,CAKR;AA+ID,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,uBAAuB,CAAC,CA8ZlC;AA+WD,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC"}
1
+ {"version":3,"file":"suggest-predicates.d.ts","sourceRoot":"","sources":["../../../src/operations/modeling/suggest-predicates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,0CAA0C,CAAC;AA2BlD,OAAO,KAAK,EAIV,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AA+H9B,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,EACzE,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,gBAAgB,CAAC,GACzE,MAAM,CAIR;AAED,wBAAgB,2CAA2C,CACzD,IAAI,EAAE,IAAI,CACR,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,EACD,KAAK,EAAE,IAAI,CACT,mBAAmB,EACnB,qBAAqB,GAAG,OAAO,GAAG,gBAAgB,CACnD,GACA,MAAM,CAKR;AA+ID,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,uBAAuB,CAAC,CAgalC;AA+WD,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,uBAAuB,CAAC,CAElC"}
@@ -298,7 +298,9 @@ export async function handleKbSuggestPredicates(prolog, args, context) {
298
298
  // Stage 2: semantic eligibility. A complete binding list cannot bypass this
299
299
  // gate, and every rejected candidate remains inspectable when retrieved.
300
300
  const initialCandidates = retrieved.map((ranked) => {
301
- const applicability = evaluateSemanticApplicability(ranked, text);
301
+ const applicability = evaluateSemanticApplicability(ranked, text, {
302
+ explicitSchema: Boolean(args.schemaId),
303
+ });
302
304
  return buildSuggestion(ranked.schema, text, subject, ranked.score, args.argumentBindings, args.polarityHint, {
303
305
  eligibility: applicability.eligible ? "eligible" : "rejected",
304
306
  rejectionReasons: applicability.reasons,
@@ -7,11 +7,13 @@ type TransactionInput = {
7
7
  };
8
8
  export declare function buildUpsertCommitGoal(input: TransactionInput): string;
9
9
  /**
10
- * Goal that stages the same entity and relationships the commit goal would
11
- * and runs the commit-time contradiction check inside a transaction that is
12
- * always rolled back (kb_preview_upsert_contradiction/3). It succeeds when
13
- * the commit would pass the check and fails with the commit's error when it
14
- * would not; it never writes.
10
+ * Goal that stages the same entity and relationships the commit goal would,
11
+ * inside a transaction that is always rolled back
12
+ * (kb_preview_upsert_contradiction/4), and runs the commit's own refusal
13
+ * rules: missing relationship endpoints, invalid directions, mixed symbol
14
+ * roles and, unless skipped, the requirement contradiction check. It
15
+ * succeeds when the commit would accept the write and fails with the
16
+ * commit's error when it would not; it never writes.
15
17
  */
16
18
  export declare function buildUpsertContradictionPreviewGoal(input: TransactionInput): string;
17
19
  type WhatIfInput = TransactionInput & {
@@ -1 +1 @@
1
- {"version":3,"file":"contradictions.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/contradictions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AASrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,aAAa,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACrD,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;CAC1C,CAAC;AAGF,wBAAgB,qBAAqB,CAAC,KAA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AC1C,CAAC;AAGF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAOrE;AAGD;;;;;;;;GAQG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,gBAAgB,GACtB,MAAM,CAOR;AAiBD,KAAK,WAAW,GAAG,gBAAgB,GAAG;IAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAgB/E;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,WAAW,EAAE,GAC7B,MAAM,CAER;AAGD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,WAAW,EAAE,GAC7B,MAAM,CAER;AAED,oEAAoE;AAEpE,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,SAAS,gBAAgB,EAAE,GAClC,MAAM,CAKR;AAGD,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC1C,KAAK,EAAE,MAAM,GACZ,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC,CAe9B;AAGD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,iBAAiB,GACzB,MAAM,CAOR"}
@@ -9,16 +9,18 @@ export function buildUpsertCommitGoal(input) {
9
9
  }
10
10
  // implements REQ-kibi-operation-interface-parity
11
11
  /**
12
- * Goal that stages the same entity and relationships the commit goal would
13
- * and runs the commit-time contradiction check inside a transaction that is
14
- * always rolled back (kb_preview_upsert_contradiction/3). It succeeds when
15
- * the commit would pass the check and fails with the commit's error when it
16
- * would not; it never writes.
12
+ * Goal that stages the same entity and relationships the commit goal would,
13
+ * inside a transaction that is always rolled back
14
+ * (kb_preview_upsert_contradiction/4), and runs the commit's own refusal
15
+ * rules: missing relationship endpoints, invalid directions, mixed symbol
16
+ * roles and, unless skipped, the requirement contradiction check. It
17
+ * succeeds when the commit would accept the write and fails with the
18
+ * commit's error when it would not; it never writes.
17
19
  */
18
20
  export function buildUpsertContradictionPreviewGoal(input) {
19
21
  const type = String(input.entity.type);
20
22
  const relationships = input.relationships.map((relationship) => `rel(${String(relationship.type)}, '${escapeAtom(String(relationship.from))}', '${escapeAtom(String(relationship.to))}', ${buildRelationshipMetadata(relationship)})`);
21
- return `kb_preview_upsert_contradiction(${type}, ${buildPropertyList(input.entity)}, [${relationships.join(", ")}])`;
23
+ return `kb_preview_upsert_contradiction(${type}, ${buildPropertyList(input.entity)}, [${relationships.join(", ")}], ${input.skipContradictionCheck ? "true" : "false"})`;
22
24
  }
23
25
  function upsertBatchEntry(input) {
24
26
  const type = String(input.entity.type);
@@ -106,6 +106,21 @@ export declare function renderSourceDocument(input: UpsertInput, entity: Readonl
106
106
  * "unknown" and keeps the previous behaviour.
107
107
  */
108
108
  export declare function isUntrackedByGit(workspaceRoot: string, relative: string): boolean;
109
+ /**
110
+ * The authored document an upsert publishes, resolved and rendered without
111
+ * writing: the target path (with its containment checks), the current bytes
112
+ * and the bytes the write would publish. writeSourceForUpsert publishes
113
+ * exactly this, and a kb_upsert dry run renders it so a path or format the
114
+ * write would refuse is refused by the dry run too.
115
+ */
116
+ export declare function renderSourceWrite(input: UpsertInput, entity: Readonly<Record<string, unknown>>, existing: Readonly<Record<string, unknown>> | undefined, context: OperationContext & {
117
+ readonly fs: NonNullable<OperationContext["fs"]>;
118
+ }, sourceDocumentOverride?: string): Promise<{
119
+ absolute: string;
120
+ relative: string;
121
+ before: string | undefined;
122
+ after: string;
123
+ }>;
109
124
  export declare function writeSourceForUpsert(input: UpsertInput, entity: Readonly<Record<string, unknown>>, existing?: Readonly<Record<string, unknown>>, context?: OperationContext, sourceDocumentOverride?: string): Promise<{
110
125
  receipt: SourceWriteReceipt;
111
126
  rollback: () => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"source-authoring.d.ts","sour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AAO,CAAC,CAAC,GAC3C,MAAM,CAOR"}
1
+ {"version":3,"file":"source-authoring.d.ts","sourceRoot":"","sources":["../../../src/operations/mutation/source-authoring.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAOjF,OAAO,KAAK,EAAqB,WAAW,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAmBH,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,IAAI,CAiBN;AAED,KAAK,SAAS,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AAExD,8EAA8E;AAE9E,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAOpE;AAED;;;;GAIG;AAEH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,SAAS,GAAG,IAAI,GACtB,IAAI,CAON;AAeD;;;;GAIG;AAEH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,GACnB,IAAI,CAMN;AAED;;;;;;GAMG;AAEH,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,OAAO,CA8BT;AAgBD,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAA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