@lucern/contracts 0.3.0-alpha.0 → 0.3.0-alpha.10

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 (237) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/component-boundary.contract.d.ts +14 -0
  3. package/dist/component-boundary.contract.js +155 -0
  4. package/dist/component-boundary.contract.js.map +1 -0
  5. package/dist/component-host-boundary.contract.d.ts +41 -0
  6. package/dist/component-host-boundary.contract.js +54 -0
  7. package/dist/component-host-boundary.contract.js.map +1 -0
  8. package/dist/context-pack.contract.d.ts +5 -3
  9. package/dist/context-pack.contract.js.map +1 -1
  10. package/dist/{dsl-BgpoVOVQ.d.ts → dsl-djCRfuWC.d.ts} +1 -1
  11. package/dist/dsl.d.ts +1 -1
  12. package/dist/dsl.js +4 -4
  13. package/dist/dsl.js.map +1 -1
  14. package/dist/edge-policy-manifest-Dw5IhT1L.d.ts +133 -0
  15. package/dist/function-registry/beliefs.d.ts +42 -82
  16. package/dist/function-registry/beliefs.js +1154 -125
  17. package/dist/function-registry/beliefs.js.map +1 -1
  18. package/dist/function-registry/coding.d.ts +7 -31
  19. package/dist/function-registry/coding.js +958 -112
  20. package/dist/function-registry/coding.js.map +1 -1
  21. package/dist/function-registry/context.d.ts +14 -26
  22. package/dist/function-registry/context.js +923 -97
  23. package/dist/function-registry/context.js.map +1 -1
  24. package/dist/function-registry/contracts.d.ts +4 -16
  25. package/dist/function-registry/contracts.js +860 -82
  26. package/dist/function-registry/contracts.js.map +1 -1
  27. package/dist/function-registry/coordination.d.ts +10 -46
  28. package/dist/function-registry/coordination.js +872 -84
  29. package/dist/function-registry/coordination.js.map +1 -1
  30. package/dist/function-registry/edges.d.ts +166 -18
  31. package/dist/function-registry/edges.js +1188 -97
  32. package/dist/function-registry/edges.js.map +1 -1
  33. package/dist/function-registry/evidence.d.ts +42 -74
  34. package/dist/function-registry/evidence.js +1106 -130
  35. package/dist/function-registry/evidence.js.map +1 -1
  36. package/dist/function-registry/graph.d.ts +132 -106
  37. package/dist/function-registry/graph.js +1006 -100
  38. package/dist/function-registry/graph.js.map +1 -1
  39. package/dist/function-registry/helpers.d.ts +8 -10
  40. package/dist/function-registry/helpers.js +869 -83
  41. package/dist/function-registry/helpers.js.map +1 -1
  42. package/dist/function-registry/identity.d.ts +4 -16
  43. package/dist/function-registry/identity.js +860 -82
  44. package/dist/function-registry/identity.js.map +1 -1
  45. package/dist/function-registry/index.d.ts +322 -8
  46. package/dist/function-registry/index.js +1249 -87
  47. package/dist/function-registry/index.js.map +1 -1
  48. package/dist/function-registry/judgments.d.ts +12 -20
  49. package/dist/function-registry/judgments.js +891 -94
  50. package/dist/function-registry/judgments.js.map +1 -1
  51. package/dist/function-registry/legacy.d.ts +2 -6
  52. package/dist/function-registry/legacy.js +860 -82
  53. package/dist/function-registry/legacy.js.map +1 -1
  54. package/dist/function-registry/lenses.d.ts +18 -34
  55. package/dist/function-registry/lenses.js +928 -88
  56. package/dist/function-registry/lenses.js.map +1 -1
  57. package/dist/function-registry/manifest.d.ts +7 -7
  58. package/dist/function-registry/manifest.js +19 -2
  59. package/dist/function-registry/manifest.js.map +1 -1
  60. package/dist/function-registry/ontologies.d.ts +46 -90
  61. package/dist/function-registry/ontologies.js +908 -109
  62. package/dist/function-registry/ontologies.js.map +1 -1
  63. package/dist/function-registry/pipeline.d.ts +14 -26
  64. package/dist/function-registry/pipeline.js +880 -85
  65. package/dist/function-registry/pipeline.js.map +1 -1
  66. package/dist/function-registry/questions.d.ts +50 -98
  67. package/dist/function-registry/questions.js +1043 -118
  68. package/dist/function-registry/questions.js.map +1 -1
  69. package/dist/function-registry/tasks.d.ts +18 -34
  70. package/dist/function-registry/tasks.js +973 -87
  71. package/dist/function-registry/tasks.js.map +1 -1
  72. package/dist/function-registry/topics.d.ts +100 -42
  73. package/dist/function-registry/topics.js +961 -89
  74. package/dist/function-registry/topics.js.map +1 -1
  75. package/dist/function-registry/types.d.ts +2 -2
  76. package/dist/function-registry/worktrees.d.ts +116 -74
  77. package/dist/function-registry/worktrees.js +1124 -115
  78. package/dist/function-registry/worktrees.js.map +1 -1
  79. package/dist/function-registry-input-audit.d.ts +13 -0
  80. package/dist/function-registry-input-audit.js +166 -0
  81. package/dist/function-registry-input-audit.js.map +1 -0
  82. package/dist/gateway.contract.d.ts +2 -0
  83. package/dist/gateway.contract.js.map +1 -1
  84. package/dist/generated/convexSchemas.js +8 -6
  85. package/dist/generated/convexSchemas.js.map +1 -1
  86. package/dist/generated/schema-manifest.json +103 -5
  87. package/dist/generated/tableOwnership.d.ts +4 -2
  88. package/dist/generated/tableOwnership.js +4 -0
  89. package/dist/generated/tableOwnership.js.map +1 -1
  90. package/dist/generated/tier-expectations.json +9 -4
  91. package/dist/graph-intelligence.contract.d.ts +506 -0
  92. package/dist/graph-intelligence.contract.js +595 -0
  93. package/dist/graph-intelligence.contract.js.map +1 -0
  94. package/dist/graph-types/index.d.ts +5 -1
  95. package/dist/graph-types/index.js +15 -4
  96. package/dist/graph-types/index.js.map +1 -1
  97. package/dist/index-O09U2xHk.d.ts +28 -0
  98. package/dist/index.d.ts +25 -4
  99. package/dist/index.js +3989 -236
  100. package/dist/index.js.map +1 -1
  101. package/dist/infisical-runtime.contract.d.ts +174 -0
  102. package/dist/infisical-runtime.contract.js +317 -0
  103. package/dist/infisical-runtime.contract.js.map +1 -0
  104. package/dist/lens-filter.contract.js +4 -3
  105. package/dist/lens-filter.contract.js.map +1 -1
  106. package/dist/lens-workflow.contract.js +4 -3
  107. package/dist/lens-workflow.contract.js.map +1 -1
  108. package/dist/manifests/edge-policy-manifest.d.ts +2 -0
  109. package/dist/manifests/edge-policy-manifest.data.d.ts +13 -0
  110. package/dist/manifests/edge-policy-manifest.data.js +26 -0
  111. package/dist/manifests/edge-policy-manifest.data.js.map +1 -0
  112. package/dist/manifests/edge-policy-manifest.js +92 -0
  113. package/dist/manifests/edge-policy-manifest.js.map +1 -0
  114. package/dist/manifests/infisical-runtime-manifest.d.ts +151 -0
  115. package/dist/manifests/infisical-runtime-manifest.js +316 -0
  116. package/dist/manifests/infisical-runtime-manifest.js.map +1 -0
  117. package/dist/manifests/invariant-manifest.d.ts +65 -0
  118. package/dist/manifests/invariant-manifest.js +18 -0
  119. package/dist/manifests/invariant-manifest.js.map +1 -0
  120. package/dist/manifests/invariants/ast-utils.d.ts +14 -0
  121. package/dist/manifests/invariants/ast-utils.js +54 -0
  122. package/dist/manifests/invariants/ast-utils.js.map +1 -0
  123. package/dist/manifests/invariants/index.d.ts +15 -0
  124. package/dist/manifests/invariants/index.js +183 -0
  125. package/dist/manifests/invariants/index.js.map +1 -0
  126. package/dist/manifests/invariants/inv-1-beliefs-append-only.d.ts +12 -0
  127. package/dist/manifests/invariants/inv-1-beliefs-append-only.js +94 -0
  128. package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +1 -0
  129. package/dist/manifests/invariants/inv-14-no-silent-transitions.d.ts +12 -0
  130. package/dist/manifests/invariants/inv-14-no-silent-transitions.js +99 -0
  131. package/dist/manifests/invariants/inv-14-no-silent-transitions.js.map +1 -0
  132. package/dist/manifests/invariants/manifest-1-projections-declare-audit.d.ts +12 -0
  133. package/dist/manifests/invariants/manifest-1-projections-declare-audit.js +42 -0
  134. package/dist/manifests/invariants/manifest-1-projections-declare-audit.js.map +1 -0
  135. package/dist/manifests/tenant-client-manifest.d.ts +322 -0
  136. package/dist/manifests/tenant-client-manifest.js +432 -0
  137. package/dist/manifests/tenant-client-manifest.js.map +1 -0
  138. package/dist/mcp-gateway-boundary.contract.d.ts +181 -0
  139. package/dist/mcp-gateway-boundary.contract.js +43 -0
  140. package/dist/mcp-gateway-boundary.contract.js.map +1 -0
  141. package/dist/projections/check-convex-args-shape.d.ts +3 -0
  142. package/dist/projections/check-convex-args-shape.js +399 -0
  143. package/dist/projections/check-convex-args-shape.js.map +1 -0
  144. package/dist/projections/create-evidence.projection.d.ts +176 -0
  145. package/dist/projections/create-evidence.projection.js +131 -0
  146. package/dist/projections/create-evidence.projection.js.map +1 -0
  147. package/dist/projections/index.d.ts +102 -0
  148. package/dist/projections/index.js +348 -0
  149. package/dist/projections/index.js.map +1 -0
  150. package/dist/projections/list-beliefs.projection.d.ts +36 -0
  151. package/dist/projections/list-beliefs.projection.js +54 -0
  152. package/dist/projections/list-beliefs.projection.js.map +1 -0
  153. package/dist/projections/list-tasks.projection.d.ts +32 -0
  154. package/dist/projections/list-tasks.projection.js +52 -0
  155. package/dist/projections/list-tasks.projection.js.map +1 -0
  156. package/dist/projections/modulate-confidence.projection.d.ts +219 -0
  157. package/dist/projections/modulate-confidence.projection.js +148 -0
  158. package/dist/projections/modulate-confidence.projection.js.map +1 -0
  159. package/dist/projections/projection-dsl.d.ts +11 -0
  160. package/dist/projections/projection-dsl.js +8 -0
  161. package/dist/projections/projection-dsl.js.map +1 -0
  162. package/dist/schema-helpers/enumValidation.js +2 -5
  163. package/dist/schema-helpers/enumValidation.js.map +1 -1
  164. package/dist/schema-helpers/spine/nodes/decision.js +2 -1
  165. package/dist/schema-helpers/spine/nodes/decision.js.map +1 -1
  166. package/dist/schema-helpers/spine/tables/epistemicNodes.js +27 -27
  167. package/dist/schema-helpers/spine/tables/epistemicNodes.js.map +1 -1
  168. package/dist/schema-helpers/validators.d.ts +1 -1
  169. package/dist/schema-helpers/validators.js +1 -1
  170. package/dist/schema-helpers/validators.js.map +1 -1
  171. package/dist/schemas/component-table-manifest.d.ts +74 -0
  172. package/dist/schemas/component-table-manifest.js +26 -0
  173. package/dist/schemas/component-table-manifest.js.map +1 -0
  174. package/dist/schemas/enums.d.ts +5 -2
  175. package/dist/schemas/enums.js +5 -2
  176. package/dist/schemas/enums.js.map +1 -1
  177. package/dist/schemas/index.d.ts +3 -1
  178. package/dist/schemas/index.js +112 -13
  179. package/dist/schemas/index.js.map +1 -1
  180. package/dist/schemas/manifest.d.ts +1154 -949
  181. package/dist/schemas/manifest.js +80 -12
  182. package/dist/schemas/manifest.js.map +1 -1
  183. package/dist/schemas/sl-opinion.d.ts +31 -0
  184. package/dist/schemas/sl-opinion.js +19 -0
  185. package/dist/schemas/sl-opinion.js.map +1 -0
  186. package/dist/schemas/tables/identity/platform.d.ts +10 -10
  187. package/dist/schemas/tables/kernel/epistemic.d.ts +12 -10
  188. package/dist/schemas/tables/kernel/epistemic.js +6 -4
  189. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  190. package/dist/schemas/tables/kernel/infra.d.ts +17 -5
  191. package/dist/schemas/tables/kernel/infra.js +23 -1
  192. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  193. package/dist/schemas/tables/kernel/intelligence.d.ts +10 -10
  194. package/dist/schemas/tables/kernel/lens.d.ts +4 -4
  195. package/dist/schemas/tables/kernel/platform.d.ts +12 -12
  196. package/dist/schemas/tables/kernel/spine.d.ts +3 -3
  197. package/dist/schemas/tables/kernel/spine.js +5 -2
  198. package/dist/schemas/tables/kernel/spine.js.map +1 -1
  199. package/dist/schemas/tables/kernel/task.d.ts +42 -42
  200. package/dist/schemas/tables/kernel/topic.js +5 -1
  201. package/dist/schemas/tables/kernel/topic.js.map +1 -1
  202. package/dist/schemas/tables/kernel/worktree.d.ts +62 -62
  203. package/dist/schemas/tables/kernel/worktree.js +6 -4
  204. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  205. package/dist/schemas/tables/mc/identity.d.ts +26 -3
  206. package/dist/schemas/tables/mc/identity.js +35 -1
  207. package/dist/schemas/tables/mc/identity.js.map +1 -1
  208. package/dist/schemas/tables/mc/pack.d.ts +20 -20
  209. package/dist/schemas/tables/mc/registry.d.ts +4 -4
  210. package/dist/schemas/tables/mc/runtime.d.ts +1 -1
  211. package/dist/schemas/tables/mc/runtime.js +1 -1
  212. package/dist/schemas/tables/mc/runtime.js.map +1 -1
  213. package/dist/schemas/tables/mc/workspace.d.ts +9 -3
  214. package/dist/schemas/tables/mc/workspace.js +3 -1
  215. package/dist/schemas/tables/mc/workspace.js.map +1 -1
  216. package/dist/sdk-methods.contract.d.ts +7 -4
  217. package/dist/{sdk-tools.contract-C2kQN_Xk.d.ts → sdk-tools.contract-BNklQDfB.d.ts} +2 -2
  218. package/dist/sdk-tools.contract.d.ts +2 -2
  219. package/dist/sdk-tools.contract.js +800 -74
  220. package/dist/sdk-tools.contract.js.map +1 -1
  221. package/dist/tenant-bootstrap-seed.contract.d.ts +1101 -0
  222. package/dist/tenant-bootstrap-seed.contract.js +653 -0
  223. package/dist/tenant-bootstrap-seed.contract.js.map +1 -0
  224. package/dist/tenant-bootstrap-seed.defaults.d.ts +16 -0
  225. package/dist/tenant-bootstrap-seed.defaults.js +303 -0
  226. package/dist/tenant-bootstrap-seed.defaults.js.map +1 -0
  227. package/dist/tenant-client.contract.d.ts +349 -0
  228. package/dist/tenant-client.contract.js +488 -0
  229. package/dist/tenant-client.contract.js.map +1 -0
  230. package/dist/{tool-contracts-WCnuE9DW.d.ts → tool-contracts-BevD9Ho2.d.ts} +39 -3
  231. package/dist/tool-contracts.d.ts +1 -1
  232. package/dist/tool-contracts.js +801 -75
  233. package/dist/tool-contracts.js.map +1 -1
  234. package/dist/workflow-runtime.contract.js +1 -1
  235. package/dist/workflow-runtime.contract.js.map +1 -1
  236. package/package.json +27 -1
  237. package/dist/index-DoDXl8KS.d.ts +0 -19
@@ -10,7 +10,7 @@ var LENS_PERSPECTIVE_TYPES = [
10
10
  // src/tool-contracts.ts
11
11
  var CREATE_BELIEF = {
12
12
  name: "create_belief",
13
- description: "Commit a new belief (knowledge unit) to the reasoning graph. Like `git commit` \u2014 creates an atomic, traceable knowledge object with a mandatory prior. Creation stores the vacuous opinion `(0, 0, 1, a)`; use modulate_confidence to record the first evidential update.",
13
+ description: "Commit a new belief (knowledge unit) to the reasoning graph. Like `git commit` \u2014 creates an atomic, traceable knowledge object with a prior. Creation stores the vacuous opinion `(0, 0, 1, a)`; use modulate_confidence to record the first evidential update.",
14
14
  parameters: {
15
15
  canonicalText: {
16
16
  type: "string",
@@ -22,7 +22,7 @@ var CREATE_BELIEF = {
22
22
  },
23
23
  baseRate: {
24
24
  type: "number",
25
- description: "Required prior probability used to seed the vacuous opinion `(0, 0, 1, a)` at creation time."
25
+ description: "Prior probability used to seed the vacuous opinion `(0, 0, 1, a)` at creation time. Defaults to 0.5 when omitted."
26
26
  },
27
27
  beliefType: {
28
28
  type: "string",
@@ -33,7 +33,7 @@ var CREATE_BELIEF = {
33
33
  description: "Optional extra metadata merged into the node (e.g., { codeAnchors: ['path/to/file.ts'] } for coding intelligence)"
34
34
  }
35
35
  },
36
- required: ["canonicalText", "baseRate"],
36
+ required: ["canonicalText"],
37
37
  response: {
38
38
  description: "The created canonical belief record",
39
39
  fields: {
@@ -96,7 +96,7 @@ var REFINE_BELIEF = {
96
96
  };
97
97
  var MODULATE_CONFIDENCE = {
98
98
  name: "modulate_confidence",
99
- description: "Record a confidence change for a belief. Like `git commit` to the credence log \u2014 an atomic, append-only write. Each modulation is a new entry in the history, not an overwrite. Scoring happens via merge; this tool records the individual data points. Pass the full subjective-logic tuple (`belief`, `disbelief`, `uncertainty`, `baseRate`) directly. If a caller only has a scalar probability, use `@lucern/sdk` helpers `opinionFromBaseRate`, `opinionFromDogmatic`, or `opinionFromProjected` to name the intended interpretation before calling this tool. Triggers: evidence_added, evidence_removed, contradiction_detected, contradiction_resolved, agent_assessment, worktree_outcome, worktree_completed, fusion, discount, deduction, manual, decay.",
99
+ description: "Record a confidence change for a belief. Like `git commit` to the credence log \u2014 an atomic, append-only write. Each modulation is a new entry in the history, not an overwrite. Scoring happens via merge; this tool records the individual data points. Pass the full subjective-logic tuple (`belief`, `disbelief`, `uncertainty`, `baseRate`) directly. If a caller only has a scalar probability, use `@lucern/sdk` helpers `opinionFromBaseRate`, `opinionFromDogmatic`, or `opinionFromProjected` to name the intended interpretation before calling this tool. Every modulation must cite a truth-bearing artifact: triggeringEvidenceId, triggeringQuestionId, triggeringAnswerId, triggeringContradictionId, or triggeringWorktreeId. Triggers: evidence_added, evidence_removed, contradiction_detected, contradiction_resolved, agent_assessment, worktree_outcome, worktree_completed, fusion, discount, deduction.",
100
100
  parameters: {
101
101
  nodeId: { type: "string", description: "The belief to score" },
102
102
  belief: {
@@ -115,9 +115,9 @@ var MODULATE_CONFIDENCE = {
115
115
  type: "number",
116
116
  description: "Subjective-logic base rate `a` in [0, 1]. Required for tuple payloads."
117
117
  },
118
- confidence: {
119
- type: "number",
120
- description: "Deprecated scalar confidence value in [0, 1]. Scalar-only payloads are rejected as AMBIGUOUS_SCALAR."
118
+ worktreeId: {
119
+ type: "string",
120
+ description: "Completed worktree that tested this belief when confidence policy requires merge-backed scoring."
121
121
  },
122
122
  trigger: {
123
123
  type: "string",
@@ -132,17 +132,43 @@ var MODULATE_CONFIDENCE = {
132
132
  "worktree_completed",
133
133
  "fusion",
134
134
  "discount",
135
- "deduction",
136
- "manual",
137
- "decay"
135
+ "deduction"
138
136
  ]
139
137
  },
138
+ triggeringEvidenceId: {
139
+ type: "string",
140
+ description: "Evidence node that caused an evidence-triggered modulation"
141
+ },
142
+ triggeringQuestionId: {
143
+ type: "string",
144
+ description: "Answered question whose resolution supports this modulation"
145
+ },
146
+ triggeringAnswerId: {
147
+ type: "string",
148
+ description: "Answer node whose content supports this modulation"
149
+ },
150
+ triggeringContradictionId: {
151
+ type: "string",
152
+ description: "Contradiction record that caused a contradiction-triggered modulation"
153
+ },
154
+ triggeringWorktreeId: {
155
+ type: "string",
156
+ description: "Completed worktree whose outcome caused a worktree-triggered modulation"
157
+ },
140
158
  rationale: {
141
159
  type: "string",
142
160
  description: "Human-readable explanation of why confidence changed"
143
161
  }
144
162
  },
145
- required: ["nodeId", "trigger", "rationale"],
163
+ required: [
164
+ "nodeId",
165
+ "belief",
166
+ "disbelief",
167
+ "uncertainty",
168
+ "baseRate",
169
+ "trigger",
170
+ "rationale"
171
+ ],
146
172
  response: {
147
173
  description: "Confidence modulation result",
148
174
  fields: {
@@ -336,7 +362,7 @@ var ADD_EVIDENCE = {
336
362
  description: "Optional extra metadata merged into the node (e.g., { codeAnchors: ['path/to/file.ts'], failedApproach: true } for coding intelligence)"
337
363
  }
338
364
  },
339
- required: ["canonicalText", "targetNodeId"],
365
+ required: ["canonicalText", "targetNodeId", "reasoning"],
340
366
  response: {
341
367
  description: "The created evidence node and its edge",
342
368
  fields: {
@@ -392,7 +418,22 @@ var ADD_WORKTREE = {
392
418
  description: "Check out a branch into an active worktree for investigation. Like `git worktree add <branch>` \u2014 creates independent working state on a thematic branch. Beliefs committed within the worktree can be freely amended (draft code on a feature branch). When investigation is complete, `merge` integrates findings into main.",
393
419
  parameters: {
394
420
  title: { type: "string", description: "Worktree name/objective" },
395
- topicId: { type: "string", description: "Optional topic scope hint" },
421
+ name: {
422
+ type: "string",
423
+ description: "Optional storage-name alias for callers that already use backend naming"
424
+ },
425
+ projectId: {
426
+ type: "string",
427
+ description: "Legacy topicId alias or resolver hint"
428
+ },
429
+ topicId: {
430
+ type: "string",
431
+ description: "Optional topic scope hint for resolver validation"
432
+ },
433
+ topicHint: {
434
+ type: "string",
435
+ description: "Natural-language topic hint for automatic topic resolution"
436
+ },
396
437
  branchId: {
397
438
  type: "string",
398
439
  description: "The branch this worktree investigates"
@@ -405,21 +446,122 @@ var ADD_WORKTREE = {
405
446
  type: "string",
406
447
  description: "The testable claim this worktree investigates"
407
448
  },
449
+ rationale: {
450
+ type: "string",
451
+ description: "Why this worktree exists and why it belongs in the campaign"
452
+ },
453
+ worktreeType: {
454
+ type: "string",
455
+ description: "Schema-enum worktree type used by the kernel lifecycle and retrieval layers"
456
+ },
457
+ gate: {
458
+ type: "string",
459
+ description: "Exit gate name for this worktree"
460
+ },
461
+ startDate: {
462
+ type: "number",
463
+ description: "Planned start timestamp in milliseconds since epoch"
464
+ },
465
+ endDate: {
466
+ type: "number",
467
+ description: "Planned end timestamp in milliseconds since epoch"
468
+ },
469
+ durationWeeks: {
470
+ type: "number",
471
+ description: "Planned duration in weeks"
472
+ },
473
+ confidenceImpact: {
474
+ type: "string",
475
+ description: "Expected confidence impact if the worktree succeeds",
476
+ enum: ["high", "medium", "low"]
477
+ },
478
+ beliefFocus: {
479
+ type: "string",
480
+ description: "Natural-language focus spanning the target belief neighborhood"
481
+ },
408
482
  beliefIds: {
409
483
  type: "array",
410
- description: "Beliefs to test in this worktree"
484
+ description: "Legacy alias for targetBeliefIds"
485
+ },
486
+ beliefs: {
487
+ type: "array",
488
+ description: "Legacy alias for targetBeliefIds"
489
+ },
490
+ targetBeliefIds: {
491
+ type: "array",
492
+ description: "Belief node IDs this worktree is expected to test or update"
493
+ },
494
+ targetQuestionIds: {
495
+ type: "array",
496
+ description: "Question node IDs this worktree is expected to answer"
497
+ },
498
+ keyQuestions: {
499
+ type: "array",
500
+ description: "Inline key question objects with question, optional status, answer, answerConfidence, and linkedQuestionId"
501
+ },
502
+ evidenceSignals: {
503
+ type: "array",
504
+ description: "Evidence signal objects with signal, optional collected state, progress, and notes"
505
+ },
506
+ decisionGate: {
507
+ type: "object",
508
+ description: "Decision gate object with goCriteria, noGoSignals, optional verdict, rationale, decidedAt, and decidedBy"
509
+ },
510
+ goCriteria: {
511
+ type: "array",
512
+ description: "Shorthand go criteria used to build decisionGate"
513
+ },
514
+ noGoSignals: {
515
+ type: "array",
516
+ description: "Shorthand no-go signals used to build decisionGate"
517
+ },
518
+ proofArtifacts: {
519
+ type: "array",
520
+ description: "Expected proof artifacts required to close the worktree"
411
521
  },
412
522
  autoShape: {
413
523
  type: "boolean",
414
524
  description: "Whether to invoke inquiry auto-shaping during worktree creation"
415
525
  },
526
+ autoFixPolicy: {
527
+ type: "object",
528
+ description: "Policy for permitted automatic remediation inside the worktree"
529
+ },
416
530
  domainPackId: {
417
531
  type: "string",
418
532
  description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
419
533
  },
420
- executionOrder: {
534
+ tags: {
535
+ type: "array",
536
+ description: "Additional topic-resolution tags for the worktree"
537
+ },
538
+ touchedPaths: {
539
+ type: "array",
540
+ description: "File paths used as topic-resolution signals"
541
+ },
542
+ sourceRef: {
543
+ type: "string",
544
+ description: "Source reference used as a topic-resolution signal"
545
+ },
546
+ sourceKind: {
547
+ type: "string",
548
+ description: "Source kind used as a topic-resolution signal"
549
+ },
550
+ campaign: {
421
551
  type: "number",
422
- description: "Global execution order for this worktree"
552
+ description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
553
+ },
554
+ lane: {
555
+ type: "string",
556
+ description: "GitButler-aligned workstream lane name inside the campaign."
557
+ },
558
+ laneOrderInCampaign: {
559
+ type: "number",
560
+ description: "Ordering for this lane within its campaign."
561
+ },
562
+ orderInLane: {
563
+ type: "number",
564
+ description: "Position of this worktree inside its lane."
423
565
  },
424
566
  dependsOn: {
425
567
  type: "array",
@@ -429,12 +571,20 @@ var ADD_WORKTREE = {
429
571
  type: "array",
430
572
  description: "Worktree IDs blocked by this worktree"
431
573
  },
432
- gate: {
574
+ staffingHint: {
433
575
  type: "string",
434
- description: "Exit gate name for this worktree"
576
+ description: "Suggested staffing or agent allocation note"
577
+ },
578
+ lensId: {
579
+ type: "string",
580
+ description: "Lens that scopes this worktree when applicable"
581
+ },
582
+ lastReconciledAt: {
583
+ type: "number",
584
+ description: "Timestamp when worktree metadata was last reconciled"
435
585
  }
436
586
  },
437
- required: ["title", "topicId"],
587
+ required: ["title"],
438
588
  response: {
439
589
  description: "The created worktree",
440
590
  fields: {
@@ -461,7 +611,7 @@ var MERGE = {
461
611
  worktreeId: { type: "string", description: "The worktree to merge" },
462
612
  outcomes: {
463
613
  type: "array",
464
- description: "Scoring outcomes for each belief: { beliefId, confidence, rationale }"
614
+ description: "Merge outcomes as key-finding strings, or scoring outcomes for beliefs: { beliefId, confidence, rationale }"
465
615
  },
466
616
  summary: { type: "string", description: "Overall findings summary" }
467
617
  },
@@ -679,19 +829,23 @@ var FIND_CONTRADICTIONS = {
679
829
  };
680
830
  var CREATE_EDGE = {
681
831
  name: "create_edge",
682
- description: "Commit a typed relationship between two nodes in the reasoning graph. Like `git commit` \u2014 an atomic write that declares a dependency between nodes. The engine enforces layer transition rules \u2014 for example, L1 \u2192 L3 direct edges are forbidden (must go through L2).",
832
+ description: "Commit a typed relationship between two nodes in the reasoning graph. Like `git commit` \u2014 an atomic write that declares a dependency between nodes. Accepts any public epistemic edge type between public graph node refs so agents can author the full spine.",
683
833
  parameters: {
684
- sourceId: {
685
- type: "string",
686
- description: "Source node of the relationship"
834
+ from: {
835
+ type: "object",
836
+ description: "Source graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'topic' }"
687
837
  },
688
- targetId: {
689
- type: "string",
690
- description: "Target node of the relationship"
838
+ to: {
839
+ type: "object",
840
+ description: "Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }"
691
841
  },
692
842
  edgeType: {
693
843
  type: "string",
694
- description: "Relationship type (informs, tests, depends_on, supersedes, etc.)"
844
+ description: "Relationship type from the public epistemic edge enum."
845
+ },
846
+ globalId: {
847
+ type: "string",
848
+ description: "Optional idempotent edge global ID."
695
849
  },
696
850
  weight: {
697
851
  type: "number",
@@ -702,9 +856,13 @@ var CREATE_EDGE = {
702
856
  type: "string",
703
857
  description: "How this was determined",
704
858
  enum: ["deductive", "inductive", "abductive", "analogical", "empirical"]
859
+ },
860
+ metadata: {
861
+ type: "object",
862
+ description: "Optional edge metadata."
705
863
  }
706
864
  },
707
- required: ["sourceId", "targetId", "edgeType"],
865
+ required: ["from", "to", "edgeType"],
708
866
  response: {
709
867
  description: "The created edge",
710
868
  fields: {
@@ -718,6 +876,240 @@ var CREATE_EDGE = {
718
876
  ontologyPrimitive: "edge",
719
877
  tier: "showcase"
720
878
  };
879
+ var UPDATE_EDGE = {
880
+ name: "update_edge",
881
+ description: "Amend metadata on an existing graph edge. Like `git commit --amend` \u2014 changes the edge annotation without recreating the relationship.",
882
+ parameters: {
883
+ edgeId: { type: "string", description: "Edge ID or global ID to update" },
884
+ weight: { type: "number", description: "Updated edge weight" },
885
+ confidence: { type: "number", description: "Updated confidence" },
886
+ context: { type: "string", description: "Updated human-readable context" },
887
+ derivationType: { type: "string", description: "Updated derivation type" },
888
+ metadata: { type: "object", description: "Updated metadata" }
889
+ },
890
+ required: ["edgeId"],
891
+ response: {
892
+ description: "Edge update result",
893
+ fields: { success: "boolean" }
894
+ },
895
+ ownerModule: "graph-primitives",
896
+ ontologyPrimitive: "edge",
897
+ tier: "workhorse"
898
+ };
899
+ var REMOVE_EDGE = {
900
+ name: "remove_edge",
901
+ description: "Remove one graph edge by ID. Like `git rm` \u2014 deletes a single explicit relationship from the spine.",
902
+ parameters: {
903
+ edgeId: { type: "string", description: "Edge ID or global ID to remove" }
904
+ },
905
+ required: ["edgeId"],
906
+ response: {
907
+ description: "Edge removal result",
908
+ fields: { success: "boolean" }
909
+ },
910
+ ownerModule: "graph-primitives",
911
+ ontologyPrimitive: "edge",
912
+ tier: "workhorse"
913
+ };
914
+ var REMOVE_EDGES_BETWEEN = {
915
+ name: "remove_edges_between",
916
+ description: "Remove graph edges between two nodes. Like `git rm <pathspec>` \u2014 deletes relationships matching a source, target, and optional type.",
917
+ parameters: {
918
+ fromNodeId: { type: "string", description: "Source node ID or global ID" },
919
+ toNodeId: { type: "string", description: "Target node ID or global ID" },
920
+ edgeType: { type: "string", description: "Optional edge type filter" }
921
+ },
922
+ required: ["fromNodeId", "toNodeId"],
923
+ response: {
924
+ description: "Matched edge removal result",
925
+ fields: { deleted: "number" }
926
+ },
927
+ ownerModule: "graph-primitives",
928
+ ontologyPrimitive: "edge",
929
+ tier: "workhorse"
930
+ };
931
+ var BATCH_CREATE_EDGES = {
932
+ name: "batch_create_edges",
933
+ description: "Commit multiple typed graph edges. Like `git commit` with many staged paths \u2014 writes a batch of explicit relationships atomically per edge.",
934
+ parameters: {
935
+ edges: {
936
+ type: "array",
937
+ description: "Edges to create, each with from, to, edgeType, and optional weight/confidence/context."
938
+ },
939
+ skipLayerValidation: {
940
+ type: "boolean",
941
+ description: "Skip kernel layer validation for trusted materialization flows."
942
+ }
943
+ },
944
+ required: ["edges"],
945
+ response: {
946
+ description: "Batch edge creation result",
947
+ fields: {
948
+ created: "number",
949
+ results: "array",
950
+ errors: "array"
951
+ }
952
+ },
953
+ ownerModule: "graph-primitives",
954
+ ontologyPrimitive: "edge",
955
+ tier: "workhorse"
956
+ };
957
+ var CREATE_EPISTEMIC_NODE = {
958
+ name: "create_epistemic_node",
959
+ description: "Commit a generic epistemic graph node. Like `git commit` \u2014 creates a canonical node in the public spine for topics, beliefs, evidence, questions, answers, sources, and entities.",
960
+ parameters: {
961
+ globalId: { type: "string", description: "Optional idempotent node global ID" },
962
+ nodeType: { type: "string", description: "Public epistemic node type" },
963
+ canonicalText: { type: "string", description: "Canonical node text" },
964
+ text: { type: "string", description: "Alias for canonicalText" },
965
+ contentHash: { type: "string", description: "Optional idempotency content hash" },
966
+ sourceType: { type: "string", description: "Source type for provenance" },
967
+ topicId: { type: "string", description: "Optional topic scope" },
968
+ content: { type: "string", description: "Extended content" },
969
+ title: { type: "string", description: "Display title" },
970
+ metadata: { type: "object", description: "Optional node metadata" }
971
+ },
972
+ required: ["nodeType"],
973
+ response: {
974
+ description: "Created node result",
975
+ fields: {
976
+ nodeId: "string",
977
+ nodeGlobalId: "string",
978
+ isDuplicate: "boolean"
979
+ }
980
+ },
981
+ ownerModule: "reasoning-kernel",
982
+ ontologyPrimitive: "graph",
983
+ tier: "showcase"
984
+ };
985
+ var GET_EPISTEMIC_NODE = {
986
+ name: "get_epistemic_node",
987
+ description: "Read one epistemic graph node. Like `git show` \u2014 resolves a canonical spine node by ID or global ID.",
988
+ parameters: {
989
+ nodeId: { type: "string", description: "Node ID or global ID" }
990
+ },
991
+ required: ["nodeId"],
992
+ response: {
993
+ description: "The resolved node",
994
+ fields: { node: "object" }
995
+ },
996
+ ownerModule: "reasoning-kernel",
997
+ ontologyPrimitive: "graph",
998
+ tier: "workhorse"
999
+ };
1000
+ var LIST_EPISTEMIC_NODES = {
1001
+ name: "list_epistemic_nodes",
1002
+ description: "List epistemic graph nodes. Like `git ls-tree` \u2014 lists canonical spine nodes by topic, type, status, or search query.",
1003
+ parameters: {
1004
+ topicId: { type: "string", description: "Optional topic scope" },
1005
+ nodeType: { type: "string", description: "Optional node type filter" },
1006
+ status: { type: "string", description: "Optional lifecycle status" },
1007
+ searchQuery: { type: "string", description: "Optional text search query" },
1008
+ limit: { type: "number", description: "Maximum nodes to return" }
1009
+ },
1010
+ required: [],
1011
+ response: {
1012
+ description: "Matching nodes",
1013
+ fields: { nodes: "array" }
1014
+ },
1015
+ ownerModule: "reasoning-kernel",
1016
+ ontologyPrimitive: "graph",
1017
+ tier: "workhorse"
1018
+ };
1019
+ var UPDATE_EPISTEMIC_NODE = {
1020
+ name: "update_epistemic_node",
1021
+ description: "Amend an epistemic graph node. Like `git commit --amend` \u2014 updates mutable node metadata, text, status, or verification fields.",
1022
+ parameters: {
1023
+ nodeId: { type: "string", description: "Node ID or global ID" },
1024
+ canonicalText: { type: "string", description: "Updated canonical text" },
1025
+ text: { type: "string", description: "Alias for canonicalText" },
1026
+ contentHash: { type: "string", description: "Updated content hash" },
1027
+ content: { type: "string", description: "Updated content" },
1028
+ title: { type: "string", description: "Updated display title" },
1029
+ metadata: { type: "object", description: "Updated metadata" },
1030
+ confidence: { type: "number", description: "Updated confidence" },
1031
+ verificationStatus: { type: "string", description: "Updated verification status" },
1032
+ status: { type: "string", description: "Updated lifecycle status" }
1033
+ },
1034
+ required: ["nodeId"],
1035
+ response: {
1036
+ description: "Node update result",
1037
+ fields: { success: "boolean" }
1038
+ },
1039
+ ownerModule: "reasoning-kernel",
1040
+ ontologyPrimitive: "graph",
1041
+ tier: "workhorse"
1042
+ };
1043
+ var ARCHIVE_EPISTEMIC_NODE = {
1044
+ name: "archive_epistemic_node",
1045
+ description: "Archive an epistemic graph node. Like `git rm --cached` \u2014 removes a node from active traversal without hard-deleting it.",
1046
+ parameters: {
1047
+ nodeId: { type: "string", description: "Node ID or global ID" }
1048
+ },
1049
+ required: ["nodeId"],
1050
+ response: {
1051
+ description: "Archive result",
1052
+ fields: { success: "boolean", effectiveStatus: "string" }
1053
+ },
1054
+ ownerModule: "reasoning-kernel",
1055
+ ontologyPrimitive: "graph",
1056
+ tier: "workhorse"
1057
+ };
1058
+ var VERIFY_EPISTEMIC_NODE = {
1059
+ name: "verify_epistemic_node",
1060
+ description: "Record verification state on an epistemic graph node. Like `git tag` \u2014 marks the node with a reviewed verification state.",
1061
+ parameters: {
1062
+ nodeId: { type: "string", description: "Node ID or global ID" },
1063
+ verificationStatus: { type: "string", description: "Verification status" },
1064
+ confidence: { type: "number", description: "Optional confidence update" }
1065
+ },
1066
+ required: ["nodeId", "verificationStatus"],
1067
+ response: {
1068
+ description: "Verification result",
1069
+ fields: { success: "boolean" }
1070
+ },
1071
+ ownerModule: "reasoning-kernel",
1072
+ ontologyPrimitive: "graph",
1073
+ tier: "workhorse"
1074
+ };
1075
+ var SUPERSEDE_EPISTEMIC_NODE = {
1076
+ name: "supersede_epistemic_node",
1077
+ description: "Supersede an epistemic graph node with a new version. Like `git commit --amend` on an immutable history branch \u2014 creates the replacement and marks the old node superseded.",
1078
+ parameters: {
1079
+ oldNodeId: { type: "string", description: "Node ID or global ID to supersede" },
1080
+ newGlobalId: { type: "string", description: "Optional replacement global ID" },
1081
+ newCanonicalText: { type: "string", description: "Replacement canonical text" },
1082
+ text: { type: "string", description: "Alias for newCanonicalText" },
1083
+ newContentHash: { type: "string", description: "Optional replacement content hash" },
1084
+ reason: { type: "string", description: "Reason for superseding" }
1085
+ },
1086
+ required: ["oldNodeId"],
1087
+ response: {
1088
+ description: "Supersede result",
1089
+ fields: { oldNodeId: "string", newNodeId: "string" }
1090
+ },
1091
+ ownerModule: "reasoning-kernel",
1092
+ ontologyPrimitive: "graph",
1093
+ tier: "workhorse"
1094
+ };
1095
+ var BATCH_CREATE_EPISTEMIC_NODES = {
1096
+ name: "batch_create_epistemic_nodes",
1097
+ description: "Commit multiple epistemic graph nodes. Like `git commit` with many staged files \u2014 writes a batch of canonical spine nodes.",
1098
+ parameters: {
1099
+ nodes: {
1100
+ type: "array",
1101
+ description: "Nodes to create with nodeType, canonicalText/text, and optional metadata."
1102
+ }
1103
+ },
1104
+ required: ["nodes"],
1105
+ response: {
1106
+ description: "Batch node creation result",
1107
+ fields: { created: "number", results: "array" }
1108
+ },
1109
+ ownerModule: "reasoning-kernel",
1110
+ ontologyPrimitive: "graph",
1111
+ tier: "workhorse"
1112
+ };
721
1113
  var RECORD_JUDGMENT = {
722
1114
  name: "record_judgment",
723
1115
  description: "Record a judgment \u2014 an irreversible commitment based on the current epistemic state. Like a `git tag` marking a release. A judgment synthesizes beliefs, evidence, and uncertainties into a determination. Once issued, a judgment is evaluated against the epistemic state that existed when it was made (knowledge horizon evaluation, Invariant #10).",
@@ -1015,6 +1407,74 @@ var GET_GRAPH_STRUCTURE_ANALYSIS = {
1015
1407
  ontologyPrimitive: "graph",
1016
1408
  tier: "showcase"
1017
1409
  };
1410
+ var LIST_GRAPH_INTELLIGENCE_QUERIES = {
1411
+ name: "list_graph_intelligence_queries",
1412
+ description: "List the Graph Intelligence query catalog that powers structural graph analysis experiences. Returns categories, query IDs, prompt templates, modes, and the public tool plan each query can use.",
1413
+ parameters: {
1414
+ categoryId: {
1415
+ type: "string",
1416
+ description: "Optional category filter, such as problems or strategic"
1417
+ },
1418
+ mode: {
1419
+ type: "string",
1420
+ description: "Optional mode filter: core, bias, stress, operational, alpha, semantic, or evidence"
1421
+ }
1422
+ },
1423
+ required: [],
1424
+ response: {
1425
+ description: "Graph Intelligence query catalog and mode-to-tool mapping",
1426
+ fields: {
1427
+ categories: "array \u2014 query categories",
1428
+ queries: "array \u2014 query definitions with prompt templates and tools",
1429
+ quickQueries: "array \u2014 recommended one-click query presets",
1430
+ publicToolNamesByMode: "object \u2014 public tool names available to each Graph Intelligence mode"
1431
+ }
1432
+ },
1433
+ ownerModule: "graph-intelligence",
1434
+ ontologyPrimitive: "graph",
1435
+ tier: "showcase"
1436
+ };
1437
+ var RUN_GRAPH_INTELLIGENCE_QUERY = {
1438
+ name: "run_graph_intelligence_query",
1439
+ description: "Run a named Graph Intelligence query against a tenant topic graph. Returns the selected query, prompt, deterministic graph-analysis bundle, graph context, and public tool plan for model synthesis.",
1440
+ parameters: {
1441
+ topicId: { type: "string", description: "Topic to analyze" },
1442
+ queryId: {
1443
+ type: "string",
1444
+ description: "Graph Intelligence query ID, such as confirmation-bias, pre-mortem, or thesis-summary"
1445
+ },
1446
+ prompt: {
1447
+ type: "string",
1448
+ description: "Optional custom prompt for custom analysis runs"
1449
+ },
1450
+ input: {
1451
+ type: "string",
1452
+ description: "Optional entity, theme, belief, company, or search text for input-driven queries"
1453
+ },
1454
+ mode: {
1455
+ type: "string",
1456
+ description: "Optional mode override: core, bias, stress, operational, alpha, semantic, or evidence"
1457
+ },
1458
+ limit: {
1459
+ type: "number",
1460
+ description: "Maximum graph context rows to return"
1461
+ }
1462
+ },
1463
+ required: ["topicId"],
1464
+ response: {
1465
+ description: "Graph Intelligence query result bundle ready for model or prompt-library synthesis",
1466
+ fields: {
1467
+ query: "object \u2014 selected query definition",
1468
+ prompt: "string \u2014 resolved prompt template",
1469
+ toolPlan: "array \u2014 public tools and args the model can call next",
1470
+ analysis: "object \u2014 structure, coverage, gap, and confirmation-bias analysis",
1471
+ context: "object \u2014 sampled beliefs, questions, evidence, edges, and contradictions"
1472
+ }
1473
+ },
1474
+ ownerModule: "graph-intelligence",
1475
+ ontologyPrimitive: "graph",
1476
+ tier: "showcase"
1477
+ };
1018
1478
  var GET_FALSIFICATION_QUESTIONS = {
1019
1479
  name: "get_falsification_questions",
1020
1480
  description: "Generate Popperian falsification questions for beliefs. Like `git test` \u2014 identifies the questions most likely to disprove current beliefs. Karl Popper as a tool: surfaces what would need to be true to invalidate each belief.",
@@ -1077,6 +1537,10 @@ var CREATE_EVIDENCE = {
1077
1537
  type: "object",
1078
1538
  description: "Optional metadata merged into the canonical evidence node"
1079
1539
  },
1540
+ rationale: {
1541
+ type: "string",
1542
+ description: "Why this evidence should enter the reasoning graph"
1543
+ },
1080
1544
  title: { type: "string", description: "Optional short title" },
1081
1545
  content: { type: "string", description: "Optional long-form content" },
1082
1546
  contentType: {
@@ -1085,7 +1549,7 @@ var CREATE_EVIDENCE = {
1085
1549
  },
1086
1550
  kind: { type: "string", description: "Optional evidence kind" }
1087
1551
  },
1088
- required: ["text"],
1552
+ required: ["text", "rationale"],
1089
1553
  response: {
1090
1554
  description: "The created canonical evidence record",
1091
1555
  fields: {
@@ -1133,7 +1597,7 @@ var LIST_EVIDENCE = {
1133
1597
  limit: { type: "number", description: "Max results" },
1134
1598
  cursor: { type: "string", description: "Pagination cursor" }
1135
1599
  },
1136
- required: [],
1600
+ required: ["topicId"],
1137
1601
  response: {
1138
1602
  description: "Canonical evidence page",
1139
1603
  fields: {
@@ -1318,6 +1782,7 @@ var ANSWER_QUESTION = {
1318
1782
  description: "Answer a question with optional evidence links. Like `git commit` on the question thread \u2014 records the answer and closes the loop with a canonical answered state.",
1319
1783
  parameters: {
1320
1784
  id: { type: "string", description: "Canonical question ID" },
1785
+ topicId: { type: "string", description: "Topic scope for the answer" },
1321
1786
  text: { type: "string", description: "Answer text" },
1322
1787
  confidence: {
1323
1788
  type: "string",
@@ -1330,7 +1795,7 @@ var ANSWER_QUESTION = {
1330
1795
  },
1331
1796
  rationale: { type: "string", description: "Why this answer is credible" }
1332
1797
  },
1333
- required: ["id", "text"],
1798
+ required: ["id", "topicId", "text"],
1334
1799
  response: {
1335
1800
  description: "Answer result",
1336
1801
  fields: {
@@ -1549,6 +2014,10 @@ var LIST_BELIEFS = {
1549
2014
  minConfidence: {
1550
2015
  type: "number",
1551
2016
  description: "Minimum confidence threshold"
2017
+ },
2018
+ limit: {
2019
+ type: "number",
2020
+ description: "Maximum results"
1552
2021
  }
1553
2022
  },
1554
2023
  required: ["topicId"],
@@ -1565,20 +2034,37 @@ var LIST_BELIEFS = {
1565
2034
  };
1566
2035
  var LIST_WORKTREES = {
1567
2036
  name: "list_worktrees",
1568
- description: "List all worktrees for a topic. Like `git worktree list` \u2014 shows active and completed investigation branches with their phase, status, and belief counts.",
2037
+ description: "List all worktrees for a topic. Like `git worktree list` \u2014 shows active and completed investigation branches with lifecycle phase, pipeline campaign/lane, status, and belief counts.",
1569
2038
  parameters: {
1570
2039
  topicId: { type: "string", description: "Topic scope" },
1571
2040
  status: {
1572
2041
  type: "string",
1573
2042
  description: "Filter: active, merged, abandoned",
1574
2043
  enum: ["active", "merged", "abandoned"]
2044
+ },
2045
+ groupBy: {
2046
+ type: "string",
2047
+ description: "Optional grouping mode for the response.",
2048
+ enum: ["campaign", "lane", "flat"]
2049
+ },
2050
+ lane: {
2051
+ type: "string",
2052
+ description: "Filter by GitButler-aligned lane name."
2053
+ },
2054
+ campaign: {
2055
+ type: "number",
2056
+ description: "Filter by top-level pipeline campaign number."
2057
+ },
2058
+ limit: {
2059
+ type: "number",
2060
+ description: "Maximum results to return."
1575
2061
  }
1576
2062
  },
1577
2063
  required: ["topicId"],
1578
2064
  response: {
1579
- description: "Worktrees with phase, status, belief count, and creation time",
2065
+ description: "Worktrees with lifecycle phase, campaign, lane, status, belief count, and creation time",
1580
2066
  fields: {
1581
- worktrees: "array \u2014 { worktreeId, title, phase, status, beliefCount, createdAt }"
2067
+ worktrees: "array \u2014 { worktreeId, title, phase, campaign, lane, laneOrderInCampaign, orderInLane, status, beliefCount, createdAt }"
1582
2068
  }
1583
2069
  },
1584
2070
  ownerModule: "workflow-engine",
@@ -1587,7 +2073,7 @@ var LIST_WORKTREES = {
1587
2073
  };
1588
2074
  var LIST_ALL_WORKTREES = {
1589
2075
  name: "list_all_worktrees",
1590
- description: "List ALL worktrees across ALL topics in one query. No topic scope required. Like `git worktree list --all` \u2014 returns the complete pipeline inventory with track, trackPosition, executionBand, dependencies, and status. Supports filtering by status, track, and executionBand. This is the PM's primary pipeline query \u2014 one call, full picture.",
2076
+ description: "List ALL worktrees across ALL topics in one query. No topic scope required. Like `git worktree list --all` \u2014 returns the complete pipeline inventory with campaign, lane, lane order, dependencies, and status. Supports filtering by status, lane, and campaign. This is the PM's primary pipeline query \u2014 one call, full picture.",
1591
2077
  parameters: {
1592
2078
  status: {
1593
2079
  type: "string",
@@ -1605,13 +2091,18 @@ var LIST_ALL_WORKTREES = {
1605
2091
  "dismissed"
1606
2092
  ]
1607
2093
  },
1608
- track: {
2094
+ lane: {
1609
2095
  type: "string",
1610
- description: "Filter by track name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity')"
2096
+ description: "Filter by lane name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity')"
1611
2097
  },
1612
- executionBand: {
2098
+ campaign: {
1613
2099
  type: "number",
1614
- description: "Filter by execution band number (e.g., 1, 2, 3). Returns only worktrees in that parallel execution group."
2100
+ description: "Filter by campaign number (e.g., 1, 2, 3). Returns only worktrees in that campaign."
2101
+ },
2102
+ groupBy: {
2103
+ type: "string",
2104
+ description: "Optional grouping mode for the response.",
2105
+ enum: ["campaign", "lane", "flat"]
1615
2106
  },
1616
2107
  limit: {
1617
2108
  type: "number",
@@ -1622,10 +2113,39 @@ var LIST_ALL_WORKTREES = {
1622
2113
  response: {
1623
2114
  description: "All worktrees across all topics with full pipeline metadata",
1624
2115
  fields: {
1625
- worktrees: "array \u2014 { worktreeId, title, topicId, topicName, phase, status, hypothesis, track, trackPosition, executionBand, executionOrder, dependsOn, blocks, gate, createdAt }",
2116
+ worktrees: "array \u2014 { worktreeId, title, topicId, topicName, phase, status, hypothesis, campaign, lane, laneOrderInCampaign, orderInLane, dependsOn, blocks, gate, createdAt }",
1626
2117
  total: "number \u2014 total count after filtering",
1627
- tracks: "object \u2014 { trackName: count } summary of worktrees per track",
1628
- bands: "object \u2014 { bandNumber: count } summary of worktrees per execution band"
2118
+ lanes: "object \u2014 { laneName: count } summary of worktrees per lane",
2119
+ campaigns: "object \u2014 { campaignNumber: count } summary of worktrees per campaign"
2120
+ }
2121
+ },
2122
+ ownerModule: "workflow-engine",
2123
+ ontologyPrimitive: "worktree",
2124
+ tier: "showcase"
2125
+ };
2126
+ var LIST_CAMPAIGNS = {
2127
+ name: "list_campaigns",
2128
+ description: "List compact pipeline campaigns with their nested lanes. Use this to see the top-level campaign > lane > worktree shape without pulling the full worktree inventory.",
2129
+ parameters: {
2130
+ topicId: {
2131
+ type: "string",
2132
+ description: "Optional topic scope."
2133
+ },
2134
+ status: {
2135
+ type: "string",
2136
+ description: "Optional worktree status filter before grouping campaigns and lanes."
2137
+ },
2138
+ limit: {
2139
+ type: "number",
2140
+ description: "Maximum worktrees to scan before grouping."
2141
+ }
2142
+ },
2143
+ required: [],
2144
+ response: {
2145
+ description: "Pipeline campaigns with nested lane summaries.",
2146
+ fields: {
2147
+ campaigns: "array \u2014 { campaign, lanes: [{ lane, laneOrderInCampaign, worktreeCount, activeCount, readyCount, blockedCount, completedCount, nextWorktree }] }",
2148
+ totalWorktrees: "number \u2014 total worktrees scanned after filtering"
1629
2149
  }
1630
2150
  },
1631
2151
  ownerModule: "workflow-engine",
@@ -1688,16 +2208,28 @@ var UPDATE_WORKTREE_TARGETS = {
1688
2208
  };
1689
2209
  var UPDATE_WORKTREE_METADATA = {
1690
2210
  name: "update_worktree_metadata",
1691
- description: "Update worktree sequencing metadata \u2014 execution order, dependencies, blocking relations, and gates. Like `git config` for a worktree \u2014 sets the scheduling and dependency metadata that determines when this worktree can activate relative to others. Use to backfill or correct sequencing data.",
2211
+ description: "Update worktree sequencing metadata \u2014 campaign, lane, dependencies, blocking relations, and gates. Like `git config` for a worktree \u2014 sets the scheduling and dependency metadata that determines when this worktree can activate relative to others. Use to backfill or correct sequencing data.",
1692
2212
  parameters: {
1693
2213
  worktreeId: { type: "string", description: "The worktree to update" },
1694
2214
  hypothesis: {
1695
2215
  type: "string",
1696
2216
  description: "Testable claim this worktree investigates"
1697
2217
  },
1698
- executionOrder: {
2218
+ campaign: {
1699
2219
  type: "number",
1700
- description: "Global execution order (1 = first, higher = later)"
2220
+ description: "Top-level pipeline campaign number."
2221
+ },
2222
+ lane: {
2223
+ type: "string",
2224
+ description: "GitButler-aligned workstream lane name inside the campaign."
2225
+ },
2226
+ laneOrderInCampaign: {
2227
+ type: "number",
2228
+ description: "Ordering for this lane within the campaign."
2229
+ },
2230
+ orderInLane: {
2231
+ type: "number",
2232
+ description: "Position of this worktree inside its lane."
1701
2233
  },
1702
2234
  dependsOn: {
1703
2235
  type: "array",
@@ -1735,18 +2267,6 @@ var UPDATE_WORKTREE_METADATA = {
1735
2267
  type: "object",
1736
2268
  description: "Calibrated auto-fix policy controlling dry-run vs safe execution, per-run action caps, and permitted mutation tiers."
1737
2269
  },
1738
- track: {
1739
- type: "string",
1740
- description: "Parallel workstream name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity', 'execution-program'). Groups worktrees into named lanes for pipeline visualization and PM analysis."
1741
- },
1742
- trackPosition: {
1743
- type: "number",
1744
- description: "Position within the track (1-indexed). E.g., TC-A=1, TC-B=2, TC-C=3 within the 'tc-scope' track."
1745
- },
1746
- executionBand: {
1747
- type: "number",
1748
- description: "Parallel execution band number. All worktrees in the same band can run simultaneously. Band 2 = OE-B + TC-A, Band 3 = TC-B + 11D-R + S2-13A, etc."
1749
- },
1750
2270
  status: {
1751
2271
  type: "string",
1752
2272
  description: "Override the worktree status. Use for lifecycle transitions like marking a worktree superseded, long-term, or as a raw idea.",
@@ -1803,15 +2323,15 @@ var IDENTITY_WHOAMI = {
1803
2323
  };
1804
2324
  var COMPILE_CONTEXT = {
1805
2325
  name: "compile_context",
1806
- description: "Compile a focused reasoning context for a topic. Like `git log --graph --decorate` for the reasoning substrate \u2014 returns the canonical Pillar 3 context pack through the public API shape.",
2326
+ description: "Compile a focused reasoning context. If topicId is omitted, Lucern resolves the best topic from the query. Like `git log --graph --decorate` for the reasoning substrate \u2014 returns the canonical Pillar 3 context pack through the public API shape.",
1807
2327
  parameters: {
1808
2328
  topicId: {
1809
2329
  type: "string",
1810
- description: "Topic scope ID to compile"
2330
+ description: "Optional topic scope ID. Omit to resolve the topic from query."
1811
2331
  },
1812
2332
  query: {
1813
2333
  type: "string",
1814
- description: "Optional focus query used to rank context items"
2334
+ description: "Focus query used to resolve the topic and rank context items. Required when topicId is omitted."
1815
2335
  },
1816
2336
  budget: {
1817
2337
  type: "number",
@@ -1835,7 +2355,7 @@ var COMPILE_CONTEXT = {
1835
2355
  description: "Include related ontological entities in the compiled result"
1836
2356
  }
1837
2357
  },
1838
- required: ["topicId"],
2358
+ required: [],
1839
2359
  response: {
1840
2360
  description: "Compiled context pack for the requested topic",
1841
2361
  fields: {
@@ -2009,18 +2529,60 @@ var CREATE_TASK = {
2009
2529
  name: "create_task",
2010
2530
  description: "Create an execution task tied to the reasoning state. Like `git task` \u2014 tracks concrete work items (calls to make, data to gather, analyses to run) linked to questions, beliefs, or worktrees.",
2011
2531
  parameters: {
2012
- title: { type: "string", description: "Task description" },
2532
+ title: { type: "string", description: "Task title" },
2013
2533
  topicId: { type: "string", description: "Topic scope" },
2534
+ description: {
2535
+ type: "string",
2536
+ description: "Long-form task description"
2537
+ },
2014
2538
  taskType: {
2015
2539
  type: "string",
2016
- description: "Type: research, interview, analysis, data_collection",
2017
- enum: ["research", "interview", "analysis", "data_collection"]
2540
+ description: "Task taxonomy",
2541
+ enum: [
2542
+ "general",
2543
+ "find_evidence",
2544
+ "verify_claim",
2545
+ "research",
2546
+ "review",
2547
+ "interview",
2548
+ "analysis",
2549
+ "track_metrics"
2550
+ ]
2551
+ },
2552
+ priority: {
2553
+ type: "string",
2554
+ description: "Priority",
2555
+ enum: ["urgent", "high", "medium", "low"]
2556
+ },
2557
+ status: {
2558
+ type: "string",
2559
+ description: "Initial status (defaults to todo)",
2560
+ enum: ["todo", "in_progress", "blocked", "done"]
2561
+ },
2562
+ linkedWorktreeId: {
2563
+ type: "string",
2564
+ description: "Worktree this task belongs to"
2565
+ },
2566
+ linkedBeliefId: {
2567
+ type: "string",
2568
+ description: "Belief this task supports"
2018
2569
  },
2019
2570
  linkedQuestionId: {
2020
2571
  type: "string",
2021
2572
  description: "Question this task addresses"
2022
2573
  },
2023
- linkedWorktreeId: { type: "string", description: "Worktree scope" }
2574
+ assigneeId: {
2575
+ type: "string",
2576
+ description: "Principal assigned to the task"
2577
+ },
2578
+ dueDate: {
2579
+ type: "number",
2580
+ description: "Due date as epoch milliseconds"
2581
+ },
2582
+ tags: {
2583
+ type: "array",
2584
+ description: "Free-form string tags"
2585
+ }
2024
2586
  },
2025
2587
  required: ["title"],
2026
2588
  response: {
@@ -2116,6 +2678,10 @@ var LIST_TASKS = {
2116
2678
  type: "string",
2117
2679
  description: "Filter to tasks linked to this worktree"
2118
2680
  },
2681
+ worktreeId: {
2682
+ type: "string",
2683
+ description: "Alias for linkedWorktreeId"
2684
+ },
2119
2685
  status: {
2120
2686
  type: "string",
2121
2687
  description: "Filter by status: todo, in_progress, blocked, done",
@@ -2136,6 +2702,10 @@ var CREATE_TOPIC = {
2136
2702
  name: "create_topic",
2137
2703
  description: "Create a new topic container for scoping knowledge. Like `git init` \u2014 initializes a new repository for a knowledge domain. Topics are hierarchical: a deal topic can nest under a theme topic. Types: domain, theme, deal, strategy, constitution, project, portfolio.",
2138
2704
  parameters: {
2705
+ globalId: {
2706
+ type: "string",
2707
+ description: "Optional idempotent topic global ID"
2708
+ },
2139
2709
  name: { type: "string", description: "Topic name" },
2140
2710
  type: {
2141
2711
  type: "string",
@@ -2146,6 +2716,18 @@ var CREATE_TOPIC = {
2146
2716
  type: "string",
2147
2717
  description: "Optional parent topic for nesting"
2148
2718
  },
2719
+ parentTopicGlobalId: {
2720
+ type: "string",
2721
+ description: "Optional parent topic global ID for nesting"
2722
+ },
2723
+ tenantId: { type: "string", description: "Optional tenant scope" },
2724
+ workspaceId: { type: "string", description: "Optional workspace scope" },
2725
+ visibility: {
2726
+ type: "string",
2727
+ description: "Topic visibility",
2728
+ enum: ["private", "team", "firm", "external", "public"]
2729
+ },
2730
+ metadata: { type: "object", description: "Optional topic metadata" },
2149
2731
  createdBy: { type: "string", description: "Who created this topic" }
2150
2732
  },
2151
2733
  required: ["name", "type"],
@@ -2154,6 +2736,9 @@ var CREATE_TOPIC = {
2154
2736
  fields: {
2155
2737
  id: "string \u2014 topic ID",
2156
2738
  globalId: "string \u2014 globally unique ID",
2739
+ topicGlobalId: "string \u2014 topic global ID",
2740
+ epistemicNodeId: "string \u2014 materialized topic node ID",
2741
+ epistemicNodeGlobalId: "string \u2014 materialized topic node global ID",
2157
2742
  depth: "number \u2014 nesting depth"
2158
2743
  }
2159
2744
  },
@@ -2203,7 +2788,7 @@ var GET_TOPIC = {
2203
2788
  description: "Legacy alias for topicId"
2204
2789
  }
2205
2790
  },
2206
- required: [],
2791
+ required: ["topicId"],
2207
2792
  response: {
2208
2793
  description: "Single topic record",
2209
2794
  fields: {
@@ -2284,6 +2869,65 @@ var GET_TOPIC_TREE = {
2284
2869
  ontologyPrimitive: "graph",
2285
2870
  tier: "workhorse"
2286
2871
  };
2872
+ var MATERIALIZE_TOPIC_GRAPH = {
2873
+ name: "materialize_topic_graph",
2874
+ description: "Backfill the topic graph spine. Like `git fsck --connectivity-only` with repair enabled \u2014 creates missing topic nodes and parent-child edges idempotently.",
2875
+ parameters: {
2876
+ rootTopicId: {
2877
+ type: "string",
2878
+ description: "Optional root topic for a bounded materialization pass"
2879
+ },
2880
+ dryRun: {
2881
+ type: "boolean",
2882
+ description: "When true, report missing rows without writing them"
2883
+ }
2884
+ },
2885
+ required: [],
2886
+ response: {
2887
+ description: "Topic graph materialization counts",
2888
+ fields: {
2889
+ topicsSeen: "number",
2890
+ nodesCreated: "number",
2891
+ nodesExisting: "number",
2892
+ edgesCreated: "number",
2893
+ edgesExisting: "number",
2894
+ errors: "array"
2895
+ }
2896
+ },
2897
+ ownerModule: "reasoning-kernel",
2898
+ ontologyPrimitive: "graph",
2899
+ tier: "workhorse"
2900
+ };
2901
+ var GET_TOPIC_GRAPH_SPINE = {
2902
+ name: "get_topic_graph_spine",
2903
+ description: "Verify the topic graph spine. Like `git fsck` \u2014 reads topics, materialized topic nodes, parent-child edges, and missing spine rows.",
2904
+ parameters: {
2905
+ rootTopicId: {
2906
+ type: "string",
2907
+ description: "Optional root topic for a bounded verifier pass"
2908
+ },
2909
+ includeTopicBeliefEdges: {
2910
+ type: "boolean",
2911
+ description: "Include topic -> belief edges in the verifier payload"
2912
+ }
2913
+ },
2914
+ required: [],
2915
+ response: {
2916
+ description: "Topic graph spine verification payload",
2917
+ fields: {
2918
+ ok: "boolean",
2919
+ counts: "object",
2920
+ topics: "array",
2921
+ topicNodes: "array",
2922
+ parentEdges: "array",
2923
+ missingTopicNodes: "array",
2924
+ missingParentEdges: "array"
2925
+ }
2926
+ },
2927
+ ownerModule: "reasoning-kernel",
2928
+ ontologyPrimitive: "graph",
2929
+ tier: "workhorse"
2930
+ };
2287
2931
  var GET_CODE_CONTEXT = {
2288
2932
  name: "get_code_context",
2289
2933
  description: "Returns code-grounded beliefs, contracts, migration states, and failed attempts anchored to a specific file or function path. Like `git log -- <path>` \u2014 filters the knowledge graph to nodes anchored to a file path via metadata.codeAnchors. Results are separated by coding belief type: decisions, contracts, migrations, patterns, deprecations, and failures.",
@@ -2558,7 +3202,7 @@ var GET_ONTOLOGY = {
2558
3202
  description: "Tenant scope for key lookup. Omit for platform-level."
2559
3203
  }
2560
3204
  },
2561
- required: [],
3205
+ required: ["id"],
2562
3206
  response: {
2563
3207
  description: "Ontology definition with latest published version",
2564
3208
  fields: {
@@ -2625,7 +3269,7 @@ var MATCH_ENTITY_TYPE = {
2625
3269
  description: "Optional maximum number of ranked matches to return"
2626
3270
  }
2627
3271
  },
2628
- required: ["text"],
3272
+ required: ["text", "ontologyId"],
2629
3273
  response: {
2630
3274
  description: "Ranked ontology entity type matches",
2631
3275
  fields: {
@@ -2879,7 +3523,7 @@ var RECORD_SCOPE_LEARNING = {
2879
3523
  };
2880
3524
  var PIPELINE_SNAPSHOT = {
2881
3525
  name: "pipeline_snapshot",
2882
- description: "Summarize a topic's worktree pipeline in band-and-lane form. Like `git status --short` for Lucern execution \u2014 returns the hinge worktree, next planned wave, blockers, critical path, superseded work, and graph hygiene debt.",
3526
+ description: "Summarize a topic's worktree pipeline in campaign-and-lane form. Like `git status --short` for Lucern execution \u2014 returns the hinge worktree, next planned wave, blockers, critical path, superseded work, and graph hygiene debt.",
2883
3527
  parameters: {
2884
3528
  topicId: { type: "string", description: "Topic scope ID" }
2885
3529
  },
@@ -2889,14 +3533,14 @@ var PIPELINE_SNAPSHOT = {
2889
3533
  fields: {
2890
3534
  topicId: "string",
2891
3535
  topicName: "string",
2892
- currentBand: "number | null",
2893
- nextBand: "number | null",
3536
+ currentCampaign: "number | null",
3537
+ nextCampaign: "number | null",
2894
3538
  activeWorktrees: "array \u2014 current hinge worktree(s)",
2895
- nextWave: "array \u2014 worktrees in the next planned band",
3539
+ nextWave: "array \u2014 worktrees in the next planned campaign",
2896
3540
  readyNow: "array \u2014 planning worktrees with dependencies completed",
2897
3541
  blockedBy: "array \u2014 grouped blockers",
2898
3542
  criticalPath: "array \u2014 ordered incomplete worktree chain",
2899
- bands: "array \u2014 incomplete worktrees grouped by executionBand",
3543
+ campaigns: "array \u2014 incomplete worktrees grouped by campaign",
2900
3544
  superseded: "array \u2014 worktrees marked superseded or not for activation",
2901
3545
  graphHygiene: "object \u2014 untargeted and taskless worktree debt",
2902
3546
  riskQuestions: "array \u2014 critical/high open questions",
@@ -3416,6 +4060,69 @@ var GENERATE_SESSION_HANDOFF = {
3416
4060
  tier: "showcase",
3417
4061
  internal: true
3418
4062
  };
4063
+ var BEGIN_BUILD_SESSION = {
4064
+ name: "begin_build_session",
4065
+ description: "Bootstrap a coding build session for a Lucern worktree. Like `git worktree add` plus `git status` \u2014 returns the compact context packet an agent needs before editing.",
4066
+ parameters: {
4067
+ worktreeId: {
4068
+ type: "string",
4069
+ description: "The Lucern worktree ID to bootstrap."
4070
+ },
4071
+ branch: {
4072
+ type: "string",
4073
+ description: "Optional git branch name. Auto-generated from the worktree name when omitted."
4074
+ },
4075
+ branchBase: {
4076
+ type: "string",
4077
+ description: 'Base branch for the feature branch. Default: "staging".'
4078
+ },
4079
+ prBase: {
4080
+ type: "string",
4081
+ description: 'Target branch for the PR. Default: "staging".'
4082
+ },
4083
+ sessionMode: {
4084
+ type: "string",
4085
+ description: 'Session mode: "async" for Codex/headless or "interactive" for live sessions.',
4086
+ enum: ["async", "interactive"]
4087
+ },
4088
+ activateIfPlanning: {
4089
+ type: "boolean",
4090
+ description: "When true, automatically activate a planning worktree during bootstrap."
4091
+ }
4092
+ },
4093
+ required: ["worktreeId"],
4094
+ response: {
4095
+ description: "A compact build-session packet with worktree metadata, graph anchors, questions, dependencies, and git defaults.",
4096
+ fields: {
4097
+ topicId: "string \u2014 canonical topic scope",
4098
+ topicName: "string \u2014 human-readable topic name",
4099
+ worktreeId: "string \u2014 worktree ID",
4100
+ worktreeName: "string \u2014 human-readable worktree name",
4101
+ branch: "string \u2014 git branch name",
4102
+ branchBase: "string \u2014 base branch",
4103
+ prBase: "string \u2014 PR target branch",
4104
+ campaign: "number | null \u2014 top-level pipeline campaign",
4105
+ lane: "string \u2014 campaign lane",
4106
+ gate: "string \u2014 exit gate",
4107
+ hypothesis: "string \u2014 worktree hypothesis",
4108
+ focus: "string \u2014 session focus",
4109
+ status: "string \u2014 worktree status after optional activation",
4110
+ sessionMode: "string \u2014 async | interactive",
4111
+ targetBeliefIds: "array \u2014 scoped belief IDs",
4112
+ targetQuestionIds: "array \u2014 scoped question IDs",
4113
+ topBeliefs: "array \u2014 highest-confidence scoped beliefs",
4114
+ openQuestions: "array \u2014 open scoped questions",
4115
+ resolvedDecisions: "array \u2014 answered questions summarized for the session",
4116
+ dependencies: "array \u2014 upstream worktrees",
4117
+ unblocks: "array \u2014 downstream worktrees",
4118
+ mergeOrderNotes: "string \u2014 merge ordering advisory"
4119
+ }
4120
+ },
4121
+ ownerModule: "bootstrap",
4122
+ ontologyPrimitive: "worktree",
4123
+ tier: "showcase",
4124
+ internal: true
4125
+ };
3419
4126
  var MCP_TOOL_CONTRACTS = {
3420
4127
  // Belief lifecycle (commit, amend, fork, archive)
3421
4128
  create_belief: CREATE_BELIEF,
@@ -3458,11 +4165,26 @@ var MCP_TOOL_CONTRACTS = {
3458
4165
  bisect_confidence: BISECT_CONFIDENCE,
3459
4166
  // Edges (commit)
3460
4167
  create_edge: CREATE_EDGE,
4168
+ update_edge: UPDATE_EDGE,
4169
+ remove_edge: REMOVE_EDGE,
4170
+ remove_edges_between: REMOVE_EDGES_BETWEEN,
4171
+ batch_create_edges: BATCH_CREATE_EDGES,
4172
+ // Epistemic node spine (commit/amend/show)
4173
+ create_epistemic_node: CREATE_EPISTEMIC_NODE,
4174
+ get_epistemic_node: GET_EPISTEMIC_NODE,
4175
+ list_epistemic_nodes: LIST_EPISTEMIC_NODES,
4176
+ update_epistemic_node: UPDATE_EPISTEMIC_NODE,
4177
+ archive_epistemic_node: ARCHIVE_EPISTEMIC_NODE,
4178
+ verify_epistemic_node: VERIFY_EPISTEMIC_NODE,
4179
+ supersede_epistemic_node: SUPERSEDE_EPISTEMIC_NODE,
4180
+ batch_create_epistemic_nodes: BATCH_CREATE_EPISTEMIC_NODES,
3461
4181
  // Judgments (tag)
3462
4182
  record_judgment: RECORD_JUDGMENT,
3463
4183
  // Graph intelligence (showcase)
3464
4184
  detect_confirmation_bias: DETECT_CONFIRMATION_BIAS,
3465
4185
  get_graph_structure_analysis: GET_GRAPH_STRUCTURE_ANALYSIS,
4186
+ list_graph_intelligence_queries: LIST_GRAPH_INTELLIGENCE_QUERIES,
4187
+ run_graph_intelligence_query: RUN_GRAPH_INTELLIGENCE_QUERY,
3466
4188
  get_falsification_questions: GET_FALSIFICATION_QUESTIONS,
3467
4189
  // Evidence operations (workhorse)
3468
4190
  search_evidence: SEARCH_EVIDENCE,
@@ -3485,6 +4207,7 @@ var MCP_TOOL_CONTRACTS = {
3485
4207
  list_beliefs: LIST_BELIEFS,
3486
4208
  list_worktrees: LIST_WORKTREES,
3487
4209
  list_all_worktrees: LIST_ALL_WORKTREES,
4210
+ list_campaigns: LIST_CAMPAIGNS,
3488
4211
  activate_worktree: ACTIVATE_WORKTREE,
3489
4212
  update_worktree_targets: UPDATE_WORKTREE_TARGETS,
3490
4213
  update_worktree_metadata: UPDATE_WORKTREE_METADATA,
@@ -3508,6 +4231,7 @@ var MCP_TOOL_CONTRACTS = {
3508
4231
  get_agent_inbox: GET_AGENT_INBOX,
3509
4232
  claim_files: CLAIM_FILES,
3510
4233
  generate_session_handoff: GENERATE_SESSION_HANDOFF,
4234
+ begin_build_session: BEGIN_BUILD_SESSION,
3511
4235
  // Policy / ACL (workhorse)
3512
4236
  check_permission: CHECK_PERMISSION,
3513
4237
  filter_by_permission: FILTER_BY_PERMISSION,
@@ -3527,6 +4251,8 @@ var MCP_TOOL_CONTRACTS = {
3527
4251
  get_topic: GET_TOPIC,
3528
4252
  update_topic: UPDATE_TOPIC,
3529
4253
  get_topic_tree: GET_TOPIC_TREE,
4254
+ materialize_topic_graph: MATERIALIZE_TOPIC_GRAPH,
4255
+ get_topic_graph_spine: GET_TOPIC_GRAPH_SPINE,
3530
4256
  // Coding intelligence (code-grounded knowledge)
3531
4257
  get_code_context: GET_CODE_CONTEXT,
3532
4258
  get_change_history: GET_CHANGE_HISTORY,