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

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 (117) hide show
  1. package/dist/dsl.js +3 -0
  2. package/dist/dsl.js.map +1 -1
  3. package/dist/function-registry/beliefs.d.ts +11 -51
  4. package/dist/function-registry/beliefs.js +445 -94
  5. package/dist/function-registry/beliefs.js.map +1 -1
  6. package/dist/function-registry/coding.d.ts +7 -31
  7. package/dist/function-registry/coding.js +264 -81
  8. package/dist/function-registry/coding.js.map +1 -1
  9. package/dist/function-registry/context.d.ts +4 -16
  10. package/dist/function-registry/context.js +223 -62
  11. package/dist/function-registry/context.js.map +1 -1
  12. package/dist/function-registry/contracts.d.ts +4 -16
  13. package/dist/function-registry/contracts.js +195 -54
  14. package/dist/function-registry/contracts.js.map +1 -1
  15. package/dist/function-registry/coordination.d.ts +10 -46
  16. package/dist/function-registry/coordination.js +208 -57
  17. package/dist/function-registry/coordination.js.map +1 -1
  18. package/dist/function-registry/edges.d.ts +10 -18
  19. package/dist/function-registry/edges.js +343 -68
  20. package/dist/function-registry/edges.js.map +1 -1
  21. package/dist/function-registry/evidence.d.ts +17 -49
  22. package/dist/function-registry/evidence.js +395 -99
  23. package/dist/function-registry/evidence.js.map +1 -1
  24. package/dist/function-registry/graph.d.ts +14 -66
  25. package/dist/function-registry/graph.js +225 -65
  26. package/dist/function-registry/graph.js.map +1 -1
  27. package/dist/function-registry/helpers.d.ts +6 -8
  28. package/dist/function-registry/helpers.js +204 -55
  29. package/dist/function-registry/helpers.js.map +1 -1
  30. package/dist/function-registry/identity.d.ts +4 -16
  31. package/dist/function-registry/identity.js +195 -54
  32. package/dist/function-registry/identity.js.map +1 -1
  33. package/dist/function-registry/index.d.ts +2 -2
  34. package/dist/function-registry/index.js +204 -55
  35. package/dist/function-registry/index.js.map +1 -1
  36. package/dist/function-registry/judgments.d.ts +5 -13
  37. package/dist/function-registry/judgments.js +214 -63
  38. package/dist/function-registry/judgments.js.map +1 -1
  39. package/dist/function-registry/legacy.d.ts +2 -6
  40. package/dist/function-registry/legacy.js +195 -54
  41. package/dist/function-registry/legacy.js.map +1 -1
  42. package/dist/function-registry/lenses.d.ts +5 -21
  43. package/dist/function-registry/lenses.js +241 -58
  44. package/dist/function-registry/lenses.js.map +1 -1
  45. package/dist/function-registry/manifest.d.ts +3 -3
  46. package/dist/function-registry/manifest.js +1 -0
  47. package/dist/function-registry/manifest.js.map +1 -1
  48. package/dist/function-registry/ontologies.d.ts +12 -56
  49. package/dist/function-registry/ontologies.js +227 -77
  50. package/dist/function-registry/ontologies.js.map +1 -1
  51. package/dist/function-registry/pipeline.d.ts +4 -16
  52. package/dist/function-registry/pipeline.js +207 -55
  53. package/dist/function-registry/pipeline.js.map +1 -1
  54. package/dist/function-registry/questions.d.ts +13 -61
  55. package/dist/function-registry/questions.js +281 -82
  56. package/dist/function-registry/questions.js.map +1 -1
  57. package/dist/function-registry/tasks.d.ts +5 -21
  58. package/dist/function-registry/tasks.js +265 -58
  59. package/dist/function-registry/tasks.js.map +1 -1
  60. package/dist/function-registry/topics.d.ts +6 -26
  61. package/dist/function-registry/topics.js +214 -57
  62. package/dist/function-registry/topics.js.map +1 -1
  63. package/dist/function-registry/types.d.ts +2 -2
  64. package/dist/function-registry/worktrees.d.ts +49 -46
  65. package/dist/function-registry/worktrees.js +326 -81
  66. package/dist/function-registry/worktrees.js.map +1 -1
  67. package/dist/generated/convexSchemas.js +4 -3
  68. package/dist/generated/convexSchemas.js.map +1 -1
  69. package/dist/generated/schema-manifest.json +55 -3
  70. package/dist/generated/tableOwnership.d.ts +2 -1
  71. package/dist/generated/tableOwnership.js +2 -0
  72. package/dist/generated/tableOwnership.js.map +1 -1
  73. package/dist/generated/tier-expectations.json +6 -3
  74. package/dist/index-CV-0_VWJ.d.ts +25 -0
  75. package/dist/index.d.ts +414 -4
  76. package/dist/index.js +665 -62
  77. package/dist/index.js.map +1 -1
  78. package/dist/schema-helpers/validators.d.ts +1 -1
  79. package/dist/schema-helpers/validators.js +1 -1
  80. package/dist/schema-helpers/validators.js.map +1 -1
  81. package/dist/schemas/component-table-manifest.d.ts +74 -0
  82. package/dist/schemas/component-table-manifest.js +26 -0
  83. package/dist/schemas/component-table-manifest.js.map +1 -0
  84. package/dist/schemas/index.d.ts +2 -0
  85. package/dist/schemas/index.js +68 -10
  86. package/dist/schemas/index.js.map +1 -1
  87. package/dist/schemas/manifest.d.ts +110 -45
  88. package/dist/schemas/manifest.js +36 -9
  89. package/dist/schemas/manifest.js.map +1 -1
  90. package/dist/schemas/sl-opinion.d.ts +31 -0
  91. package/dist/schemas/sl-opinion.js +19 -0
  92. package/dist/schemas/sl-opinion.js.map +1 -0
  93. package/dist/schemas/tables/kernel/epistemic.d.ts +6 -4
  94. package/dist/schemas/tables/kernel/epistemic.js +6 -4
  95. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  96. package/dist/schemas/tables/kernel/infra.d.ts +13 -1
  97. package/dist/schemas/tables/kernel/infra.js +23 -1
  98. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  99. package/dist/schemas/tables/kernel/worktree.d.ts +4 -4
  100. package/dist/schemas/tables/kernel/worktree.js +6 -4
  101. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  102. package/dist/schemas/tables/mc/runtime.d.ts +1 -1
  103. package/dist/schemas/tables/mc/runtime.js +1 -1
  104. package/dist/schemas/tables/mc/runtime.js.map +1 -1
  105. package/dist/sdk-methods.contract.d.ts +5 -2
  106. package/dist/{sdk-tools.contract-C2kQN_Xk.d.ts → sdk-tools.contract-S4ia0TTo.d.ts} +1 -1
  107. package/dist/sdk-tools.contract.d.ts +2 -2
  108. package/dist/sdk-tools.contract.js +154 -51
  109. package/dist/sdk-tools.contract.js.map +1 -1
  110. package/dist/{tool-contracts-WCnuE9DW.d.ts → tool-contracts-C92-9ueT.d.ts} +5 -3
  111. package/dist/tool-contracts.d.ts +1 -1
  112. package/dist/tool-contracts.js +155 -52
  113. package/dist/tool-contracts.js.map +1 -1
  114. package/dist/workflow-runtime.contract.js +1 -1
  115. package/dist/workflow-runtime.contract.js.map +1 -1
  116. package/package.json +19 -1
  117. 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: {
@@ -417,9 +443,21 @@ var ADD_WORKTREE = {
417
443
  type: "string",
418
444
  description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
419
445
  },
420
- executionOrder: {
446
+ campaign: {
447
+ type: "number",
448
+ description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
449
+ },
450
+ lane: {
451
+ type: "string",
452
+ description: "GitButler-aligned workstream lane name inside the campaign."
453
+ },
454
+ laneOrderInCampaign: {
455
+ type: "number",
456
+ description: "Ordering for this lane within its campaign."
457
+ },
458
+ orderInLane: {
421
459
  type: "number",
422
- description: "Global execution order for this worktree"
460
+ description: "Position of this worktree inside its lane."
423
461
  },
424
462
  dependsOn: {
425
463
  type: "array",
@@ -1077,6 +1115,10 @@ var CREATE_EVIDENCE = {
1077
1115
  type: "object",
1078
1116
  description: "Optional metadata merged into the canonical evidence node"
1079
1117
  },
1118
+ rationale: {
1119
+ type: "string",
1120
+ description: "Why this evidence should enter the reasoning graph"
1121
+ },
1080
1122
  title: { type: "string", description: "Optional short title" },
1081
1123
  content: { type: "string", description: "Optional long-form content" },
1082
1124
  contentType: {
@@ -1085,7 +1127,7 @@ var CREATE_EVIDENCE = {
1085
1127
  },
1086
1128
  kind: { type: "string", description: "Optional evidence kind" }
1087
1129
  },
1088
- required: ["text"],
1130
+ required: ["text", "rationale"],
1089
1131
  response: {
1090
1132
  description: "The created canonical evidence record",
1091
1133
  fields: {
@@ -1133,7 +1175,7 @@ var LIST_EVIDENCE = {
1133
1175
  limit: { type: "number", description: "Max results" },
1134
1176
  cursor: { type: "string", description: "Pagination cursor" }
1135
1177
  },
1136
- required: [],
1178
+ required: ["topicId"],
1137
1179
  response: {
1138
1180
  description: "Canonical evidence page",
1139
1181
  fields: {
@@ -1318,6 +1360,7 @@ var ANSWER_QUESTION = {
1318
1360
  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
1361
  parameters: {
1320
1362
  id: { type: "string", description: "Canonical question ID" },
1363
+ topicId: { type: "string", description: "Topic scope for the answer" },
1321
1364
  text: { type: "string", description: "Answer text" },
1322
1365
  confidence: {
1323
1366
  type: "string",
@@ -1330,7 +1373,7 @@ var ANSWER_QUESTION = {
1330
1373
  },
1331
1374
  rationale: { type: "string", description: "Why this answer is credible" }
1332
1375
  },
1333
- required: ["id", "text"],
1376
+ required: ["id", "topicId", "text"],
1334
1377
  response: {
1335
1378
  description: "Answer result",
1336
1379
  fields: {
@@ -1549,6 +1592,10 @@ var LIST_BELIEFS = {
1549
1592
  minConfidence: {
1550
1593
  type: "number",
1551
1594
  description: "Minimum confidence threshold"
1595
+ },
1596
+ limit: {
1597
+ type: "number",
1598
+ description: "Maximum results"
1552
1599
  }
1553
1600
  },
1554
1601
  required: ["topicId"],
@@ -1565,20 +1612,37 @@ var LIST_BELIEFS = {
1565
1612
  };
1566
1613
  var LIST_WORKTREES = {
1567
1614
  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.",
1615
+ 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
1616
  parameters: {
1570
1617
  topicId: { type: "string", description: "Topic scope" },
1571
1618
  status: {
1572
1619
  type: "string",
1573
1620
  description: "Filter: active, merged, abandoned",
1574
1621
  enum: ["active", "merged", "abandoned"]
1622
+ },
1623
+ groupBy: {
1624
+ type: "string",
1625
+ description: "Optional grouping mode for the response.",
1626
+ enum: ["campaign", "lane", "flat"]
1627
+ },
1628
+ lane: {
1629
+ type: "string",
1630
+ description: "Filter by GitButler-aligned lane name."
1631
+ },
1632
+ campaign: {
1633
+ type: "number",
1634
+ description: "Filter by top-level pipeline campaign number."
1635
+ },
1636
+ limit: {
1637
+ type: "number",
1638
+ description: "Maximum results to return."
1575
1639
  }
1576
1640
  },
1577
1641
  required: ["topicId"],
1578
1642
  response: {
1579
- description: "Worktrees with phase, status, belief count, and creation time",
1643
+ description: "Worktrees with lifecycle phase, campaign, lane, status, belief count, and creation time",
1580
1644
  fields: {
1581
- worktrees: "array \u2014 { worktreeId, title, phase, status, beliefCount, createdAt }"
1645
+ worktrees: "array \u2014 { worktreeId, title, phase, campaign, lane, laneOrderInCampaign, orderInLane, status, beliefCount, createdAt }"
1582
1646
  }
1583
1647
  },
1584
1648
  ownerModule: "workflow-engine",
@@ -1587,7 +1651,7 @@ var LIST_WORKTREES = {
1587
1651
  };
1588
1652
  var LIST_ALL_WORKTREES = {
1589
1653
  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.",
1654
+ 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
1655
  parameters: {
1592
1656
  status: {
1593
1657
  type: "string",
@@ -1605,13 +1669,18 @@ var LIST_ALL_WORKTREES = {
1605
1669
  "dismissed"
1606
1670
  ]
1607
1671
  },
1608
- track: {
1672
+ lane: {
1609
1673
  type: "string",
1610
- description: "Filter by track name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity')"
1674
+ description: "Filter by lane name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity')"
1611
1675
  },
1612
- executionBand: {
1676
+ campaign: {
1613
1677
  type: "number",
1614
- description: "Filter by execution band number (e.g., 1, 2, 3). Returns only worktrees in that parallel execution group."
1678
+ description: "Filter by campaign number (e.g., 1, 2, 3). Returns only worktrees in that campaign."
1679
+ },
1680
+ groupBy: {
1681
+ type: "string",
1682
+ description: "Optional grouping mode for the response.",
1683
+ enum: ["campaign", "lane", "flat"]
1615
1684
  },
1616
1685
  limit: {
1617
1686
  type: "number",
@@ -1622,10 +1691,39 @@ var LIST_ALL_WORKTREES = {
1622
1691
  response: {
1623
1692
  description: "All worktrees across all topics with full pipeline metadata",
1624
1693
  fields: {
1625
- worktrees: "array \u2014 { worktreeId, title, topicId, topicName, phase, status, hypothesis, track, trackPosition, executionBand, executionOrder, dependsOn, blocks, gate, createdAt }",
1694
+ worktrees: "array \u2014 { worktreeId, title, topicId, topicName, phase, status, hypothesis, campaign, lane, laneOrderInCampaign, orderInLane, dependsOn, blocks, gate, createdAt }",
1626
1695
  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"
1696
+ lanes: "object \u2014 { laneName: count } summary of worktrees per lane",
1697
+ campaigns: "object \u2014 { campaignNumber: count } summary of worktrees per campaign"
1698
+ }
1699
+ },
1700
+ ownerModule: "workflow-engine",
1701
+ ontologyPrimitive: "worktree",
1702
+ tier: "showcase"
1703
+ };
1704
+ var LIST_CAMPAIGNS = {
1705
+ name: "list_campaigns",
1706
+ 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.",
1707
+ parameters: {
1708
+ topicId: {
1709
+ type: "string",
1710
+ description: "Optional topic scope."
1711
+ },
1712
+ status: {
1713
+ type: "string",
1714
+ description: "Optional worktree status filter before grouping campaigns and lanes."
1715
+ },
1716
+ limit: {
1717
+ type: "number",
1718
+ description: "Maximum worktrees to scan before grouping."
1719
+ }
1720
+ },
1721
+ required: [],
1722
+ response: {
1723
+ description: "Pipeline campaigns with nested lane summaries.",
1724
+ fields: {
1725
+ campaigns: "array \u2014 { campaign, lanes: [{ lane, laneOrderInCampaign, worktreeCount, activeCount, readyCount, blockedCount, completedCount, nextWorktree }] }",
1726
+ totalWorktrees: "number \u2014 total worktrees scanned after filtering"
1629
1727
  }
1630
1728
  },
1631
1729
  ownerModule: "workflow-engine",
@@ -1688,16 +1786,28 @@ var UPDATE_WORKTREE_TARGETS = {
1688
1786
  };
1689
1787
  var UPDATE_WORKTREE_METADATA = {
1690
1788
  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.",
1789
+ 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
1790
  parameters: {
1693
1791
  worktreeId: { type: "string", description: "The worktree to update" },
1694
1792
  hypothesis: {
1695
1793
  type: "string",
1696
1794
  description: "Testable claim this worktree investigates"
1697
1795
  },
1698
- executionOrder: {
1796
+ campaign: {
1797
+ type: "number",
1798
+ description: "Top-level pipeline campaign number."
1799
+ },
1800
+ lane: {
1801
+ type: "string",
1802
+ description: "GitButler-aligned workstream lane name inside the campaign."
1803
+ },
1804
+ laneOrderInCampaign: {
1699
1805
  type: "number",
1700
- description: "Global execution order (1 = first, higher = later)"
1806
+ description: "Ordering for this lane within the campaign."
1807
+ },
1808
+ orderInLane: {
1809
+ type: "number",
1810
+ description: "Position of this worktree inside its lane."
1701
1811
  },
1702
1812
  dependsOn: {
1703
1813
  type: "array",
@@ -1735,18 +1845,6 @@ var UPDATE_WORKTREE_METADATA = {
1735
1845
  type: "object",
1736
1846
  description: "Calibrated auto-fix policy controlling dry-run vs safe execution, per-run action caps, and permitted mutation tiers."
1737
1847
  },
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
1848
  status: {
1751
1849
  type: "string",
1752
1850
  description: "Override the worktree status. Use for lifecycle transitions like marking a worktree superseded, long-term, or as a raw idea.",
@@ -2116,6 +2214,10 @@ var LIST_TASKS = {
2116
2214
  type: "string",
2117
2215
  description: "Filter to tasks linked to this worktree"
2118
2216
  },
2217
+ worktreeId: {
2218
+ type: "string",
2219
+ description: "Alias for linkedWorktreeId"
2220
+ },
2119
2221
  status: {
2120
2222
  type: "string",
2121
2223
  description: "Filter by status: todo, in_progress, blocked, done",
@@ -2203,7 +2305,7 @@ var GET_TOPIC = {
2203
2305
  description: "Legacy alias for topicId"
2204
2306
  }
2205
2307
  },
2206
- required: [],
2308
+ required: ["topicId"],
2207
2309
  response: {
2208
2310
  description: "Single topic record",
2209
2311
  fields: {
@@ -2558,7 +2660,7 @@ var GET_ONTOLOGY = {
2558
2660
  description: "Tenant scope for key lookup. Omit for platform-level."
2559
2661
  }
2560
2662
  },
2561
- required: [],
2663
+ required: ["id"],
2562
2664
  response: {
2563
2665
  description: "Ontology definition with latest published version",
2564
2666
  fields: {
@@ -2625,7 +2727,7 @@ var MATCH_ENTITY_TYPE = {
2625
2727
  description: "Optional maximum number of ranked matches to return"
2626
2728
  }
2627
2729
  },
2628
- required: ["text"],
2730
+ required: ["text", "ontologyId"],
2629
2731
  response: {
2630
2732
  description: "Ranked ontology entity type matches",
2631
2733
  fields: {
@@ -2879,7 +2981,7 @@ var RECORD_SCOPE_LEARNING = {
2879
2981
  };
2880
2982
  var PIPELINE_SNAPSHOT = {
2881
2983
  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.",
2984
+ 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
2985
  parameters: {
2884
2986
  topicId: { type: "string", description: "Topic scope ID" }
2885
2987
  },
@@ -2889,14 +2991,14 @@ var PIPELINE_SNAPSHOT = {
2889
2991
  fields: {
2890
2992
  topicId: "string",
2891
2993
  topicName: "string",
2892
- currentBand: "number | null",
2893
- nextBand: "number | null",
2994
+ currentCampaign: "number | null",
2995
+ nextCampaign: "number | null",
2894
2996
  activeWorktrees: "array \u2014 current hinge worktree(s)",
2895
- nextWave: "array \u2014 worktrees in the next planned band",
2997
+ nextWave: "array \u2014 worktrees in the next planned campaign",
2896
2998
  readyNow: "array \u2014 planning worktrees with dependencies completed",
2897
2999
  blockedBy: "array \u2014 grouped blockers",
2898
3000
  criticalPath: "array \u2014 ordered incomplete worktree chain",
2899
- bands: "array \u2014 incomplete worktrees grouped by executionBand",
3001
+ campaigns: "array \u2014 incomplete worktrees grouped by campaign",
2900
3002
  superseded: "array \u2014 worktrees marked superseded or not for activation",
2901
3003
  graphHygiene: "object \u2014 untargeted and taskless worktree debt",
2902
3004
  riskQuestions: "array \u2014 critical/high open questions",
@@ -3485,6 +3587,7 @@ var MCP_TOOL_CONTRACTS = {
3485
3587
  list_beliefs: LIST_BELIEFS,
3486
3588
  list_worktrees: LIST_WORKTREES,
3487
3589
  list_all_worktrees: LIST_ALL_WORKTREES,
3590
+ list_campaigns: LIST_CAMPAIGNS,
3488
3591
  activate_worktree: ACTIVATE_WORKTREE,
3489
3592
  update_worktree_targets: UPDATE_WORKTREE_TARGETS,
3490
3593
  update_worktree_metadata: UPDATE_WORKTREE_METADATA,