@telora/daemon 0.22.169 → 0.22.187

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 (254) hide show
  1. package/build-info.json +9 -3
  2. package/dist/audit/audit-floor-policy.d.ts +188 -0
  3. package/dist/audit/audit-floor-policy.d.ts.map +1 -0
  4. package/dist/audit/audit-floor-policy.js +353 -0
  5. package/dist/audit/audit-floor-policy.js.map +1 -0
  6. package/dist/audit/audit-prompt.d.ts +4 -177
  7. package/dist/audit/audit-prompt.d.ts.map +1 -1
  8. package/dist/audit/audit-prompt.js +6 -329
  9. package/dist/audit/audit-prompt.js.map +1 -1
  10. package/dist/completion/commit-verdict-release.d.ts +37 -1
  11. package/dist/completion/commit-verdict-release.d.ts.map +1 -1
  12. package/dist/completion/commit-verdict-release.js +90 -15
  13. package/dist/completion/commit-verdict-release.js.map +1 -1
  14. package/dist/completion/escalations.d.ts.map +1 -1
  15. package/dist/completion/escalations.js +3 -1
  16. package/dist/completion/escalations.js.map +1 -1
  17. package/dist/completion/review-exit-verdict-gate.d.ts +11 -5
  18. package/dist/completion/review-exit-verdict-gate.d.ts.map +1 -1
  19. package/dist/completion/review-exit-verdict-gate.js +6 -3
  20. package/dist/completion/review-exit-verdict-gate.js.map +1 -1
  21. package/dist/delivery/commit-verdict-hold.d.ts.map +1 -1
  22. package/dist/delivery/commit-verdict-hold.js +2 -1
  23. package/dist/delivery/commit-verdict-hold.js.map +1 -1
  24. package/dist/directive/stranded-review-reroute.js +1 -1
  25. package/dist/directive/stranded-review-reroute.js.map +1 -1
  26. package/dist/focus/focus-executor.d.ts.map +1 -1
  27. package/dist/focus/focus-executor.js +2 -0
  28. package/dist/focus/focus-executor.js.map +1 -1
  29. package/dist/focus/pending-review-approved-head.d.ts +1 -1
  30. package/dist/focus/pending-review-approved-head.d.ts.map +1 -1
  31. package/dist/focus/pending-review-approved-head.js +4 -3
  32. package/dist/focus/pending-review-approved-head.js.map +1 -1
  33. package/dist/focus/session-health.d.ts.map +1 -1
  34. package/dist/focus/session-health.js +2 -1
  35. package/dist/focus/session-health.js.map +1 -1
  36. package/dist/focus-stage-lifecycle/planning-release.d.ts +52 -17
  37. package/dist/focus-stage-lifecycle/planning-release.d.ts.map +1 -1
  38. package/dist/focus-stage-lifecycle/planning-release.js +58 -70
  39. package/dist/focus-stage-lifecycle/planning-release.js.map +1 -1
  40. package/dist/focus-stage-lifecycle/ratify-bar-gate.d.ts +108 -0
  41. package/dist/focus-stage-lifecycle/ratify-bar-gate.d.ts.map +1 -0
  42. package/dist/focus-stage-lifecycle/ratify-bar-gate.js +174 -0
  43. package/dist/focus-stage-lifecycle/ratify-bar-gate.js.map +1 -0
  44. package/dist/git/merge-to-main.d.ts.map +1 -1
  45. package/dist/git/merge-to-main.js.map +1 -1
  46. package/dist/nexus/index.d.ts.map +1 -1
  47. package/dist/nexus/index.js +2 -1
  48. package/dist/nexus/index.js.map +1 -1
  49. package/dist/nexus/intake-prompt-sections.d.ts +70 -0
  50. package/dist/nexus/intake-prompt-sections.d.ts.map +1 -0
  51. package/dist/nexus/intake-prompt-sections.js +145 -0
  52. package/dist/nexus/intake-prompt-sections.js.map +1 -0
  53. package/dist/nexus/intake-spawn.d.ts +49 -13
  54. package/dist/nexus/intake-spawn.d.ts.map +1 -1
  55. package/dist/nexus/intake-spawn.js +45 -122
  56. package/dist/nexus/intake-spawn.js.map +1 -1
  57. package/dist/nexus/intake.d.ts +55 -0
  58. package/dist/nexus/intake.d.ts.map +1 -1
  59. package/dist/nexus/intake.js +62 -1
  60. package/dist/nexus/intake.js.map +1 -1
  61. package/dist/prd/arm-readiness.d.ts +93 -0
  62. package/dist/prd/arm-readiness.d.ts.map +1 -0
  63. package/dist/prd/arm-readiness.js +254 -0
  64. package/dist/prd/arm-readiness.js.map +1 -0
  65. package/dist/prd/arm-refusal.d.ts +149 -0
  66. package/dist/prd/arm-refusal.d.ts.map +1 -0
  67. package/dist/prd/arm-refusal.js +219 -0
  68. package/dist/prd/arm-refusal.js.map +1 -0
  69. package/dist/prd/controller-shared.d.ts +111 -0
  70. package/dist/prd/controller-shared.d.ts.map +1 -1
  71. package/dist/prd/controller-shared.js +3 -1
  72. package/dist/prd/controller-shared.js.map +1 -1
  73. package/dist/prd/controller.d.ts +16 -10
  74. package/dist/prd/controller.d.ts.map +1 -1
  75. package/dist/prd/controller.js +28 -35
  76. package/dist/prd/controller.js.map +1 -1
  77. package/dist/prd/frontier-arming.d.ts +151 -0
  78. package/dist/prd/frontier-arming.d.ts.map +1 -0
  79. package/dist/prd/frontier-arming.js +315 -0
  80. package/dist/prd/frontier-arming.js.map +1 -0
  81. package/dist/prd/index.d.ts +10 -1
  82. package/dist/prd/index.d.ts.map +1 -1
  83. package/dist/prd/index.js +9 -1
  84. package/dist/prd/index.js.map +1 -1
  85. package/dist/prd/scoping-prompt.d.ts +68 -0
  86. package/dist/prd/scoping-prompt.d.ts.map +1 -0
  87. package/dist/prd/scoping-prompt.js +86 -0
  88. package/dist/prd/scoping-prompt.js.map +1 -0
  89. package/dist/prompt/prompt-contradictions.d.ts +20 -1
  90. package/dist/prompt/prompt-contradictions.d.ts.map +1 -1
  91. package/dist/prompt/prompt-contradictions.js +35 -0
  92. package/dist/prompt/prompt-contradictions.js.map +1 -1
  93. package/dist/prompt/team-prompt-base.d.ts +18 -0
  94. package/dist/prompt/team-prompt-base.d.ts.map +1 -1
  95. package/dist/prompt/team-prompt-base.js +56 -11
  96. package/dist/prompt/team-prompt-base.js.map +1 -1
  97. package/dist/prompt-sections/persona-sections.d.ts +36 -13
  98. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  99. package/dist/prompt-sections/persona-sections.js +93 -16
  100. package/dist/prompt-sections/persona-sections.js.map +1 -1
  101. package/dist/prompt-sections/scoping-sections.d.ts +19 -5
  102. package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
  103. package/dist/prompt-sections/scoping-sections.js +45 -38
  104. package/dist/prompt-sections/scoping-sections.js.map +1 -1
  105. package/dist/prompt-sections/shared.d.ts +8 -0
  106. package/dist/prompt-sections/shared.d.ts.map +1 -1
  107. package/dist/prompt-sections/shared.js.map +1 -1
  108. package/dist/queries/delivery-gate-state.js +1 -1
  109. package/dist/queries/focus-criteria-standing.d.ts +170 -7
  110. package/dist/queries/focus-criteria-standing.d.ts.map +1 -1
  111. package/dist/queries/focus-criteria-standing.js +143 -8
  112. package/dist/queries/focus-criteria-standing.js.map +1 -1
  113. package/dist/queries/focus-ratify-release.d.ts +43 -0
  114. package/dist/queries/focus-ratify-release.d.ts.map +1 -0
  115. package/dist/queries/focus-ratify-release.js +45 -0
  116. package/dist/queries/focus-ratify-release.js.map +1 -0
  117. package/dist/queries/focuses.d.ts +0 -10
  118. package/dist/queries/focuses.d.ts.map +1 -1
  119. package/dist/queries/focuses.js +2 -15
  120. package/dist/queries/focuses.js.map +1 -1
  121. package/dist/queries/prd.d.ts +31 -0
  122. package/dist/queries/prd.d.ts.map +1 -1
  123. package/dist/queries/prd.js +26 -1
  124. package/dist/queries/prd.js.map +1 -1
  125. package/dist/queries/shared.js +1 -1
  126. package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -1
  127. package/dist/resolvers/focus-criteria-standing.js +324 -25
  128. package/dist/resolvers/focus-criteria-standing.js.map +1 -1
  129. package/dist/resolvers/shared/review-window-commits.d.ts.map +1 -1
  130. package/dist/resolvers/shared/review-window-commits.js +2 -1
  131. package/dist/resolvers/shared/review-window-commits.js.map +1 -1
  132. package/dist/security/security-auto-inject.d.ts +51 -0
  133. package/dist/security/security-auto-inject.d.ts.map +1 -1
  134. package/dist/security/security-auto-inject.js +101 -11
  135. package/dist/security/security-auto-inject.js.map +1 -1
  136. package/dist/security/security-scan-engine.d.ts +4 -4
  137. package/dist/security/security-scan-engine.d.ts.map +1 -1
  138. package/dist/security/security-scan-engine.js +6 -0
  139. package/dist/security/security-scan-engine.js.map +1 -1
  140. package/dist/session/session-lineage.d.ts.map +1 -1
  141. package/dist/session/session-lineage.js +2 -0
  142. package/dist/session/session-lineage.js.map +1 -1
  143. package/dist/shell/constants.d.ts +5 -0
  144. package/dist/shell/constants.d.ts.map +1 -1
  145. package/dist/shell/constants.js +5 -0
  146. package/dist/shell/constants.js.map +1 -1
  147. package/dist/shell/daemon-instance.d.ts +74 -64
  148. package/dist/shell/daemon-instance.d.ts.map +1 -1
  149. package/dist/shell/daemon-instance.js +16 -121
  150. package/dist/shell/daemon-instance.js.map +1 -1
  151. package/dist/shell/health-events.js +1 -1
  152. package/dist/shell/health-events.js.map +1 -1
  153. package/dist/shell/instance-liveness.d.ts +112 -0
  154. package/dist/shell/instance-liveness.d.ts.map +1 -0
  155. package/dist/shell/instance-liveness.js +205 -0
  156. package/dist/shell/instance-liveness.js.map +1 -0
  157. package/dist/shell/schema-version-gate.d.ts +22 -0
  158. package/dist/shell/schema-version-gate.d.ts.map +1 -1
  159. package/dist/shell/schema-version-gate.js +116 -6
  160. package/dist/shell/schema-version-gate.js.map +1 -1
  161. package/dist/shell/worker-pidfile.d.ts +21 -8
  162. package/dist/shell/worker-pidfile.d.ts.map +1 -1
  163. package/dist/shell/worker-pidfile.js +38 -9
  164. package/dist/shell/worker-pidfile.js.map +1 -1
  165. package/dist/spawn/lead-launch.d.ts.map +1 -1
  166. package/dist/spawn/lead-launch.js +2 -1
  167. package/dist/spawn/lead-launch.js.map +1 -1
  168. package/dist/spawn/one-shot-scoping-spawn.d.ts +51 -0
  169. package/dist/spawn/one-shot-scoping-spawn.d.ts.map +1 -0
  170. package/dist/spawn/one-shot-scoping-spawn.js +156 -0
  171. package/dist/spawn/one-shot-scoping-spawn.js.map +1 -0
  172. package/dist/spawn/process-spawn.d.ts +12 -0
  173. package/dist/spawn/process-spawn.d.ts.map +1 -1
  174. package/dist/spawn/process-spawn.js +1 -1
  175. package/dist/spawn/process-spawn.js.map +1 -1
  176. package/dist/spawn/prompt-assembly.d.ts +8 -0
  177. package/dist/spawn/prompt-assembly.d.ts.map +1 -1
  178. package/dist/spawn/prompt-assembly.js +15 -3
  179. package/dist/spawn/prompt-assembly.js.map +1 -1
  180. package/dist/spawn/worktree-session.d.ts +24 -6
  181. package/dist/spawn/worktree-session.d.ts.map +1 -1
  182. package/dist/spawn/worktree-session.js +37 -14
  183. package/dist/spawn/worktree-session.js.map +1 -1
  184. package/dist/testing/arm-coverage-model.d.ts +75 -0
  185. package/dist/testing/arm-coverage-model.d.ts.map +1 -0
  186. package/dist/testing/arm-coverage-model.js +114 -0
  187. package/dist/testing/arm-coverage-model.js.map +1 -0
  188. package/dist/testing/fixtures/index.js +1 -1
  189. package/dist/types/index.js +1 -1
  190. package/dist/verify/commit-gate-configured.d.ts.map +1 -1
  191. package/dist/verify/commit-gate-configured.js +1 -1
  192. package/dist/verify/commit-gate-configured.js.map +1 -1
  193. package/dist/verify/commit-verdict-pull.d.ts +48 -0
  194. package/dist/verify/commit-verdict-pull.d.ts.map +1 -0
  195. package/dist/verify/commit-verdict-pull.js +148 -0
  196. package/dist/verify/commit-verdict-pull.js.map +1 -0
  197. package/dist/verify/commit-verdict-record.js +1 -1
  198. package/dist/verify/credit-rearm.js +1 -1
  199. package/dist/verify/credit-rearm.js.map +1 -1
  200. package/dist/verify/default-on-guards.d.ts +74 -0
  201. package/dist/verify/default-on-guards.d.ts.map +1 -0
  202. package/dist/verify/default-on-guards.js +305 -0
  203. package/dist/verify/default-on-guards.js.map +1 -0
  204. package/dist/verify/explicit-rearm.d.ts.map +1 -1
  205. package/dist/verify/explicit-rearm.js +1 -0
  206. package/dist/verify/explicit-rearm.js.map +1 -1
  207. package/dist/verify/gate-run-registry.d.ts.map +1 -1
  208. package/dist/verify/gate-run-registry.js +1 -0
  209. package/dist/verify/gate-run-registry.js.map +1 -1
  210. package/dist/verify/judged-ancestor.d.ts +41 -0
  211. package/dist/verify/judged-ancestor.d.ts.map +1 -0
  212. package/dist/verify/judged-ancestor.js +101 -0
  213. package/dist/verify/judged-ancestor.js.map +1 -0
  214. package/dist/verify/no-own-delta-verdict.d.ts +7 -2
  215. package/dist/verify/no-own-delta-verdict.d.ts.map +1 -1
  216. package/dist/verify/no-own-delta-verdict.js +14 -17
  217. package/dist/verify/no-own-delta-verdict.js.map +1 -1
  218. package/dist/verify/rework-attribution.d.ts +71 -0
  219. package/dist/verify/rework-attribution.d.ts.map +1 -0
  220. package/dist/verify/rework-attribution.js +263 -0
  221. package/dist/verify/rework-attribution.js.map +1 -0
  222. package/dist/verify/shortfall-rulings.d.ts.map +1 -1
  223. package/dist/verify/shortfall-rulings.js +3 -2
  224. package/dist/verify/shortfall-rulings.js.map +1 -1
  225. package/dist/verify/verification-boundary-env.d.ts +70 -17
  226. package/dist/verify/verification-boundary-env.d.ts.map +1 -1
  227. package/dist/verify/verification-boundary-env.js +88 -14
  228. package/dist/verify/verification-boundary-env.js.map +1 -1
  229. package/dist/verify/verification-commit-sharing.d.ts.map +1 -1
  230. package/dist/verify/verification-commit-sharing.js +2 -1
  231. package/dist/verify/verification-commit-sharing.js.map +1 -1
  232. package/dist/verify/verification-config.d.ts.map +1 -1
  233. package/dist/verify/verification-config.js +1 -0
  234. package/dist/verify/verification-config.js.map +1 -1
  235. package/dist/verify/verification-default-on.d.ts +0 -32
  236. package/dist/verify/verification-default-on.d.ts.map +1 -1
  237. package/dist/verify/verification-default-on.js +10 -234
  238. package/dist/verify/verification-default-on.js.map +1 -1
  239. package/dist/verify/verification-deps-default.d.ts.map +1 -1
  240. package/dist/verify/verification-deps-default.js +9 -0
  241. package/dist/verify/verification-deps-default.js.map +1 -1
  242. package/dist/verify/verification-engine.d.ts +2 -1
  243. package/dist/verify/verification-engine.d.ts.map +1 -1
  244. package/dist/verify/verification-engine.js +12 -4
  245. package/dist/verify/verification-engine.js.map +1 -1
  246. package/dist/verify/verification-feedback.d.ts +1 -1
  247. package/dist/verify/verification-feedback.d.ts.map +1 -1
  248. package/dist/verify/verification-feedback.js +5 -0
  249. package/dist/verify/verification-feedback.js.map +1 -1
  250. package/dist/verify/verification-rework-issue.d.ts +48 -7
  251. package/dist/verify/verification-rework-issue.d.ts.map +1 -1
  252. package/dist/verify/verification-rework-issue.js +111 -9
  253. package/dist/verify/verification-rework-issue.js.map +1 -1
  254. package/package.json +2 -2
@@ -1,18 +1,6 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
2
  // Pinned by: none -- no test imports this module directly (baselined; see lint:pinned-by)
3
3
  // PINNED-BY-END
4
- /**
5
- * SCOPING section builders: the scoping mandate, mid-flight rescoping, and the
6
- * new-work delivery rule.
7
- *
8
- * Split out of execution-sections.ts, which holds the run-the-work sections
9
- * (planning, delivery listing, status rules, session constraints, workers,
10
- * error handling, completion). These three are a distinct job: they tell the
11
- * team lead how to CHANGE the shape of the work -- decompose a delivery, add
12
- * issues mid-flight, route genuinely new work -- rather than how to execute it.
13
- *
14
- * Re-exported from execution-sections.ts, so existing importers are unaffected.
15
- */
16
4
  /**
17
5
  * Build the scoping mandate section.
18
6
  *
@@ -21,7 +9,8 @@
21
9
  * section makes the requirement visible to the team lead so it does not waste
22
10
  * a turn discovering it through a 400 response.
23
11
  */
24
- export function buildScopingMandateSection() {
12
+ export function buildScopingMandateSection(options = {}) {
13
+ const mayCreate = options.mayCreateDeliveries !== false;
25
14
  return [
26
15
  '### Scoping Mandate',
27
16
  '',
@@ -59,41 +48,60 @@ export function buildScopingMandateSection() {
59
48
  'own escalation. It is never inferred from prose someone wrote into criteria --',
60
49
  'a prose hold is always a defect to report and route past, never an order.',
61
50
  '',
62
- '**Declare the work-facing label.** Whenever you create a delivery via',
63
- '`telora_product_delivery` create, pass `workFacing: "outward" | "inward"` as',
64
- 'a byproduct of the scoping context -- it forces the explicit "new ground or',
65
- 'improving old ground?" question out loud at scope time:',
66
- '',
67
- '- `outward` = a capability the user did not have before (new ground;',
68
- ' includes machine/tooling capabilities -- the axis is NOVELTY, not',
69
- ' product-vs-system).',
70
- '- `inward` = improving a capability that already exists (refining ground',
71
- ' already taken).',
72
- '',
73
- 'Declare it once, at inception, from what the delivery is FOR -- do not infer',
74
- 'it later and do not re-read it on a loop. A genuine purpose change is a',
75
- 're-scope (re-declare the label), never a completion-inferred drift. This',
76
- 'label is read downstream as a MIRROR of where intent-energy went, never a',
77
- 'quota -- so label honestly; relabelling refinement as frontier to flatter a',
78
- 'number destroys the only signal the instrument carries.',
79
- '',
51
+ ...(mayCreate ? [
52
+ '**Declare the work-facing label.** Whenever you create a delivery via',
53
+ '`telora_product_delivery` create, pass `workFacing: "outward" | "inward"` as',
54
+ 'a byproduct of the scoping context -- it forces the explicit "new ground or',
55
+ 'improving old ground?" question out loud at scope time:',
56
+ '',
57
+ '- `outward` = a capability the user did not have before (new ground;',
58
+ ' includes machine/tooling capabilities -- the axis is NOVELTY, not',
59
+ ' product-vs-system).',
60
+ '- `inward` = improving a capability that already exists (refining ground',
61
+ ' already taken).',
62
+ '',
63
+ 'Declare it once, at inception, from what the delivery is FOR -- do not infer',
64
+ 'it later and do not re-read it on a loop. A genuine purpose change is a',
65
+ 're-scope (re-declare the label), never a completion-inferred drift. This',
66
+ 'label is read downstream as a MIRROR of where intent-energy went, never a',
67
+ 'quota -- so label honestly; relabelling refinement as frontier to flatter a',
68
+ 'number destroys the only signal the instrument carries.',
69
+ '',
70
+ ] : []),
80
71
  ];
81
72
  }
82
73
  /**
83
74
  * Build the rescoping and splitting deliveries section.
84
75
  */
85
- export function buildRescopingSection(focusId, productId) {
76
+ /**
77
+ * The delivery-CREATING half of the rescoping section: the only text that tells
78
+ * a team to open a new delivery. Withheld (mayCreateDeliveries=false) from a
79
+ * review pass and from a team answering review findings -- no delivery is
80
+ * created in answer to a review finding (operator ruling 2026-09-22).
81
+ */
82
+ function buildSplittingBlock(focusId, productId) {
86
83
  return [
87
- '### Rescoping and Splitting Deliveries',
88
- '',
89
- 'You are encouraged to restructure work as you learn more about the codebase. If a delivery is larger than expected, split it. If an issue is unnecessary, close it. If you discover new work, create issues for it.',
90
- '',
91
84
  '**Splitting a delivery:**',
92
85
  `1. Create new deliveries via \`telora_product_delivery\` (action: "create") (same focusId: "${focusId}", productId: "${productId}"). Anchor each to the reality-tree injection it materializes via injectionNodeId -- once the focus is past planning with an active tree, an unanchored create is REFUSED (no row); pass allowUnanchored: true only for a legitimate non-tree delivery. Declare workFacing ("outward" = new ground / a capability not had before; "inward" = improving existing ground) on each new or split delivery.`,
93
86
  '2. Create issues under the new deliveries via `telora_product_issue` (action: "create")',
94
87
  "3. Mark the original delivery's remaining issues as Done (if moved) or close as won't-do",
95
88
  '4. The daemon will automatically pick up new deliveries',
96
89
  '',
90
+ ];
91
+ }
92
+ /** Withheld alongside the splitting block: a remediation team asks nothing, it closes findings. */
93
+ const RESCOPE_WITHOUT_ASKING_LINES = [
94
+ '**Do not ask for permission to rescope.** Restructure autonomously based on what you learn.',
95
+ '',
96
+ ];
97
+ export function buildRescopingSection(focusId, productId, options = {}) {
98
+ const mayCreate = options.mayCreateDeliveries !== false;
99
+ return [
100
+ '### Rescoping and Splitting Deliveries',
101
+ '',
102
+ 'You are encouraged to restructure work as you learn more about the codebase. If a delivery is larger than expected, split it. If an issue is unnecessary, close it. If you discover new work, create issues for it.',
103
+ '',
104
+ ...(mayCreate ? buildSplittingBlock(focusId, productId) : []),
97
105
  '**Adding issues:**',
98
106
  '- Create new issues on any delivery you are working on via `telora_product_issue` (action: "create")',
99
107
  "- Set status to 'To Do' -- they will be picked up in your current execution",
@@ -103,8 +111,7 @@ export function buildRescopingSection(focusId, productId) {
103
111
  '- Do not leave orphan issues -- always update status',
104
112
  "- Known limitation: there is no 'Won't Do' status. Using Done with a note is the convention for now. The description note is important for audit trail.",
105
113
  '',
106
- '**Do not ask for permission to rescope.** Restructure autonomously based on what you learn.',
107
- '',
114
+ ...(mayCreate ? RESCOPE_WITHOUT_ASKING_LINES : []),
108
115
  '**Acceptance criteria you write must be agent-satisfiable.** Whenever you',
109
116
  'create or rescope a delivery -- and whenever you create or update an issue --',
110
117
  'every acceptance / completion criterion must be checkable purely by',
@@ -1 +1 @@
1
- {"version":3,"file":"scoping-sections.js","sourceRoot":"","sources":["../../src/prompt-sections/scoping-sections.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,gBAAgB;AAEhB;;;;;;;;;;;GAWG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,qBAAqB;QACrB,EAAE;QACF,yEAAyE;QACzE,kDAAkD;QAClD,sFAAsF;QACtF,4EAA4E;QAC5E,uEAAuE;QACvE,wEAAwE;QACxE,EAAE;QACF,0EAA0E;QAC1E,yEAAyE;QACzE,yEAAyE;QACzE,yFAAyF;QACzF,EAAE;QACF,sEAAsE;QACtE,4EAA4E;QAC5E,8EAA8E;QAC9E,sEAAsE;QACtE,8EAA8E;QAC9E,+EAA+E;QAC/E,2EAA2E;QAC3E,8EAA8E;QAC9E,4EAA4E;QAC5E,EAAE;QACF,4EAA4E;QAC5E,+EAA+E;QAC/E,iFAAiF;QACjF,+EAA+E;QAC/E,gFAAgF;QAChF,sBAAsB;QACtB,EAAE;QACF,6EAA6E;QAC7E,+EAA+E;QAC/E,gFAAgF;QAChF,2EAA2E;QAC3E,EAAE;QACF,uEAAuE;QACvE,8EAA8E;QAC9E,6EAA6E;QAC7E,yDAAyD;QACzD,EAAE;QACF,sEAAsE;QACtE,qEAAqE;QACrE,uBAAuB;QACvB,0EAA0E;QAC1E,mBAAmB;QACnB,EAAE;QACF,8EAA8E;QAC9E,yEAAyE;QACzE,0EAA0E;QAC1E,2EAA2E;QAC3E,6EAA6E;QAC7E,yDAAyD;QACzD,EAAE;KACH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAe,EAAE,SAAiB;IACtE,OAAO;QACL,wCAAwC;QACxC,EAAE;QACF,qNAAqN;QACrN,EAAE;QACF,2BAA2B;QAC3B,+FAA+F,OAAO,kBAAkB,SAAS,wYAAwY;QACzgB,yFAAyF;QACzF,0FAA0F;Q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8EAA8E;QAC9E,gFAAgF;QAChF,EAAE;QACF,6EAA6E;QAC7E,4EAA4E;QAC5E,0EAA0E;QAC1E,8EAA8E;QAC9E,2EAA2E;QAC3E,6DAA6D;QAC7D,EAAE;KACH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL,gCAAgC;QAChC,EAAE;QACF,8EAA8E;QAC9E,wEAAwE;QACxE,EAAE;QACF,kDAAkD;QAClD,mEAAmE;QACnE,yEAAyE;QACzE,4EAA4E;QAC5E,mDAAmD;QACnD,EAAE;QACF,oFAAoF;QACpF,gFAAgF;QAChF,EAAE;KACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"scoping-sections.js","sourceRoot":"","sources":["../../src/prompt-sections/scoping-sections.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,gBAAgB;AAiChB;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAAiC,EAAE;IAC5E,MAAM,SAAS,GAAG,OAAO,CAAC,mBAAmB,KAAK,KAAK,CAAC;IACxD,OAAO;QACL,qBAAqB;QACrB,EAAE;QACF,yEAAyE;QACzE,kDAAkD;QAClD,sFAAsF;QACtF,4EAA4E;QAC5E,uEAAuE;QACvE,wEAAwE;QACxE,EAAE;QACF,0EAA0E;QAC1E,yEAAyE;QACzE,yEAAyE;QACzE,yFAAyF;QACzF,EAAE;QACF,sEAAsE;QACtE,4EAA4E;QAC5E,8EAA8E;QAC9E,sEAAsE;QACtE,8EAA8E;QAC9E,+EAA+E;QAC/E,2EAA2E;QAC3E,8EAA8E;QAC9E,4EAA4E;QAC5E,EAAE;QACF,4EAA4E;QAC5E,+EAA+E;QAC/E,iFAAiF;QACjF,+EAA+E;QAC/E,gFAAgF;QAChF,sBAAsB;QACtB,EAAE;QACF,6EAA6E;QAC7E,+EAA+E;QAC/E,gFAAgF;QAChF,2EAA2E;QAC3E,EAAE;QACF,GAAG,CAAC,S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9E,wEAAwE;QACxE,EAAE;QACF,kDAAkD;QAClD,mEAAmE;QACnE,yEAAyE;QACzE,4EAA4E;QAC5E,mDAAmD;QACnD,EAAE;QACF,oFAAoF;QACpF,gFAAgF;QAChF,EAAE;KACH,CAAC;AACJ,CAAC"}
@@ -34,6 +34,14 @@ export interface FocusTeamPromptContext {
34
34
  * orienting the team to "fix flagged defects, do not expand scope".
35
35
  */
36
36
  reviewFiledOpenCount?: number;
37
+ /**
38
+ * True when the prompt is composed for a review-lineage pass. Together with a
39
+ * non-zero reviewFiledOpenCount this decides which framework the spawn
40
+ * composes: a review pass and a team answering review findings are NOT handed
41
+ * the scoping mandate / rescoping / new-work-delivery sections (no delivery is
42
+ * created in answer to a review finding). Absent = coding/scoping pass.
43
+ */
44
+ isReviewPass?: boolean;
37
45
  /**
38
46
  * Focus.description -- the focus statement that serves as the implicit
39
47
  * apex of the reality tree. Surfaced to the close_loop stage agent as
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/prompt-sections/shared.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,S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ClB;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,uBAAuB,CAyB7F"}
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/prompt-sections/shared.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,yEAAyE;AACzE,sEAAsE;AACtE,gBAAgB;AAgGhB,MAAM,UAAU,uBAAuB,CAAC,QAA4B;IAClE,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,OAAO;YACL,SAAS,EAAE,uFAAuF;YAClG,eAAe,EACb,mFAAmF;gBACnF,iCAAiC;YACnC,MAAM,EAAE;gBACN,EAAE;gBACF,6CAA6C;gBAC7C,8EAA8E;gBAC9E,gFAAgF;gBAChF,gFAAgF;gBAChF,uBAAuB;aACxB;SACF,CAAC;IACJ,CAAC;IACD,iEAAiE;IACjE,OAAO;QACL,SAAS,EAAE,gEAAgE;QAC3E,eAAe,EACb,0EAA0E;YAC1E,iCAAiC;QACnC,MAAM,EAAE,EAAE;KACX,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/prompt-sections/shared.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,yEAAyE;AACzE,sEAAsE;AACtE,gBAAgB;AAwGhB,MAAM,UAAU,uBAAuB,CAAC,QAA4B;IAClE,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,OAAO;YACL,SAAS,EAAE,uFAAuF;YAClG,eAAe,EACb,mFAAmF;gBACnF,iCAAiC;YACnC,MAAM,EAAE;gBACN,EAAE;gBACF,6CAA6C;gBAC7C,8EAA8E;gBAC9E,gFAAgF;gBAChF,gFAAgF;gBAChF,uBAAuB;aACxB;SACF,CAAC;IACJ,CAAC;IACD,iEAAiE;IACjE,OAAO;QACL,SAAS,EAAE,gEAAgE;QAC3E,eAAe,EACb,0EAA0E;YAC1E,iCAAiC;QACnC,MAAM,EAAE,EAAE;KACX,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
- // Pinned by: 33 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/queries/delivery-gate-state.ts
2
+ // Pinned by: 34 tests -- run: npm run gen:pinned-by -- --list packages/daemon/src/queries/delivery-gate-state.ts
3
3
  // PINNED-BY-END
4
4
  /**
5
5
  * The shape of `org_nodes.gate_state` on a delivery row, plus the per-origin
@@ -1,6 +1,16 @@
1
1
  /**
2
- * The FOCUS CRITERIA STANDING read: which of a focus's DECLARED acceptance
3
- * criteria its current deliveries address, and which remain open.
2
+ * The FOCUS CRITERIA STANDING read: what a focus is FOR, and where each part of
3
+ * it stands. Two statements, both carried: the futures of the undesired effects
4
+ * its ARM covers (met only when verify recorded the future as landed), and the
5
+ * focus's OWN declared acceptance criteria (addressed when a current delivery
6
+ * declares one).
7
+ *
8
+ * EVERY ENUM HERE IS A DEPLOY-ORDER CONTRACT. The schemas are `.passthrough()`,
9
+ * so a field the edge adds costs nothing -- but an enum VALUE the edge adds and
10
+ * this daemon has not learned throws, and the one reader turns a throw into the
11
+ * explicit READ FAILED line. So the widening ships FIRST and the edge second;
12
+ * every optional field below is optional for the same reason, read from the
13
+ * other side.
4
14
  *
5
15
  * Read through the `focus_criteria_standing` product-api action
6
16
  * (handlers/focus/criteria-standing.ts), which loads the focus's own
@@ -47,10 +57,39 @@ declare const CriterionMatchSchema: z.ZodObject<{
47
57
  significantTokenCount: z.ZodNumber;
48
58
  }, z.core.$loose>;
49
59
  /**
50
- * One criterion and where it stands. `status` IS enumerated: rendering a
51
- * criterion as addressed or open is the decision this whole section carries, so
52
- * an unrecognized status must fail the read loudly rather than be printed as if
53
- * it were understood.
60
+ * What VERIFY recorded about a tree criterion's node -- carried out of the
61
+ * edge's landing predicate (`supabase/functions/_shared/effect-future-landed.ts`) verbatim.
62
+ *
63
+ * Every field here is a plain string, NOT an enum, for the same reason
64
+ * `matchBasis` is: the resolver only ECHOES them into prose. The met/open
65
+ * decision hangs on `status` above, which IS enumerated, so a new landing basis
66
+ * added at the edge must not cost the pass its whole standing section.
67
+ */
68
+ declare const CriterionLandingSchema: z.ZodObject<{
69
+ standing: z.ZodString;
70
+ basis: z.ZodString;
71
+ classification: z.ZodNullable<z.ZodString>;
72
+ divergenceReason: z.ZodNullable<z.ZodString>;
73
+ }, z.core.$loose>;
74
+ /**
75
+ * One criterion and where it stands.
76
+ *
77
+ * `status` IS enumerated: rendering a criterion as met, addressed or open is
78
+ * the decision this whole section carries, so an unrecognized status must fail
79
+ * the read loudly rather than be printed as if it were understood. `'met'` and
80
+ * `'addressed'` are DIFFERENT claims and the resolver renders them as such --
81
+ * `'addressed'` says a delivery POINTS AT a declared criterion (scoping),
82
+ * `'met'` says verify RECORDED a tree criterion's declared future as landed
83
+ * (reality). A daemon that lacked `'met'` threw on every armed focus carrying
84
+ * one and rendered the READ FAILED line in place of the whole section; that is
85
+ * the failure this enum's width exists to prevent, and why widening it ships
86
+ * BEFORE the edge that emits the value.
87
+ *
88
+ * `source` and the three TREE-only fields are OPTIONAL, deliberately. The
89
+ * daemon deploys ahead of the edge, so for one window the edge answering this
90
+ * action is the older one that emits neither -- and a required field would
91
+ * invert the very deploy order this widening exists to honour. An absent
92
+ * `source` is rendered as UNSTATED rather than guessed at.
54
93
  */
55
94
  declare const CriterionStandingSchema: z.ZodObject<{
56
95
  criterion: z.ZodString;
@@ -62,11 +101,63 @@ declare const CriterionStandingSchema: z.ZodObject<{
62
101
  matchedTokens: z.ZodArray<z.ZodString>;
63
102
  significantTokenCount: z.ZodNumber;
64
103
  }, z.core.$loose>>;
104
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
105
+ deliveryId: z.ZodString;
106
+ deliveryName: z.ZodString;
107
+ matchBasis: z.ZodString;
108
+ overlap: z.ZodNumber;
109
+ matchedTokens: z.ZodArray<z.ZodString>;
110
+ significantTokenCount: z.ZodNumber;
111
+ }, z.core.$loose>>>;
112
+ source: z.ZodOptional<z.ZodEnum<{
113
+ declared: "declared";
114
+ tree: "tree";
115
+ }>>;
116
+ nodeId: z.ZodOptional<z.ZodString>;
117
+ seq: z.ZodOptional<z.ZodNumber>;
118
+ drafted: z.ZodOptional<z.ZodBoolean>;
119
+ landing: z.ZodOptional<z.ZodObject<{
120
+ standing: z.ZodString;
121
+ basis: z.ZodString;
122
+ classification: z.ZodNullable<z.ZodString>;
123
+ divergenceReason: z.ZodNullable<z.ZodString>;
124
+ }, z.core.$loose>>;
65
125
  status: z.ZodEnum<{
66
126
  open: "open";
67
127
  addressed: "addressed";
128
+ met: "met";
68
129
  }>;
69
130
  }, z.core.$loose>;
131
+ /**
132
+ * A covered undesired effect that states NO future. On an un-armed focus this
133
+ * is exactly what the arm would REFUSE on, named by the same `seq` the refusal
134
+ * message names -- which is the whole value of the un-armed preview.
135
+ */
136
+ declare const UnstatedCoveredEffectSchema: z.ZodObject<{
137
+ nodeId: z.ZodString;
138
+ seq: z.ZodNumber;
139
+ statement: z.ZodString;
140
+ }, z.core.$loose>;
141
+ /** A covered undesired effect whose future is only a MACHINE DRAFT. */
142
+ declare const DraftedCoveredEffectSchema: z.ZodObject<{
143
+ nodeId: z.ZodString;
144
+ seq: z.ZodNumber;
145
+ draft: z.ZodString;
146
+ }, z.core.$loose>;
147
+ /**
148
+ * The bounds the edge's TREE scans applied. OPTIONAL for the same reason
149
+ * `deliveryScan` is, and reported for a sharper reason: a truncated NODE scan
150
+ * can only move a criterion toward open, but a truncated EDGE scan SHRINKS a
151
+ * live-derived bar, so a caller must never be left to assume it saw the whole
152
+ * tree.
153
+ */
154
+ declare const TreeScanSchema: z.ZodObject<{
155
+ limit: z.ZodNumber;
156
+ injections: z.ZodNumber;
157
+ edges: z.ZodNumber;
158
+ nodes: z.ZodNumber;
159
+ truncated: z.ZodBoolean;
160
+ }, z.core.$loose>;
70
161
  /**
71
162
  * The bounds the edge's delivery scan applied. OPTIONAL on purpose: if a future
72
163
  * edge stops reporting it, the standing itself is still usable and the resolver
@@ -78,6 +169,8 @@ declare const DeliveryScanSchema: z.ZodObject<{
78
169
  scanned: z.ZodNumber;
79
170
  evaluated: z.ZodNumber;
80
171
  truncated: z.ZodBoolean;
172
+ anchors: z.ZodOptional<z.ZodNumber>;
173
+ anchorsTruncated: z.ZodOptional<z.ZodBoolean>;
81
174
  }, z.core.$loose>;
82
175
  /**
83
176
  * The standing. `floorBasis` is enumerated deliberately: `no_criteria_declared`
@@ -85,6 +178,17 @@ declare const DeliveryScanSchema: z.ZodObject<{
85
178
  * the entire point of the read. A basis this daemon cannot interpret must throw
86
179
  * -- rendering an unknown basis would be guessing at exactly the value that
87
180
  * decides whether the elaboration loop stops.
181
+ *
182
+ * `derived_live_unarmed` is the fourth member and a FIFTH situation: the tree
183
+ * half is a PREVIEW of the bar an arm would stamp, so there is no stamped bar
184
+ * to have reached. It is neither a floor nor a missed floor, and the resolver
185
+ * renders it as its own line.
186
+ *
187
+ * `treeBasis` is enumerated for the same reason -- it answers "whose statement
188
+ * of the bar am I reading", and an un-armed PREVIEW must never be rendered as
189
+ * the arm's own stamp -- but it is OPTIONAL: an edge predating the tree half
190
+ * reports none, and the resolver says the tree half was not reported rather
191
+ * than inventing one.
88
192
  */
89
193
  export declare const FocusCriteriaStandingSchema: z.ZodObject<{
90
194
  focusId: z.ZodString;
@@ -98,9 +202,31 @@ export declare const FocusCriteriaStandingSchema: z.ZodObject<{
98
202
  matchedTokens: z.ZodArray<z.ZodString>;
99
203
  significantTokenCount: z.ZodNumber;
100
204
  }, z.core.$loose>>;
205
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
206
+ deliveryId: z.ZodString;
207
+ deliveryName: z.ZodString;
208
+ matchBasis: z.ZodString;
209
+ overlap: z.ZodNumber;
210
+ matchedTokens: z.ZodArray<z.ZodString>;
211
+ significantTokenCount: z.ZodNumber;
212
+ }, z.core.$loose>>>;
213
+ source: z.ZodOptional<z.ZodEnum<{
214
+ declared: "declared";
215
+ tree: "tree";
216
+ }>>;
217
+ nodeId: z.ZodOptional<z.ZodString>;
218
+ seq: z.ZodOptional<z.ZodNumber>;
219
+ drafted: z.ZodOptional<z.ZodBoolean>;
220
+ landing: z.ZodOptional<z.ZodObject<{
221
+ standing: z.ZodString;
222
+ basis: z.ZodString;
223
+ classification: z.ZodNullable<z.ZodString>;
224
+ divergenceReason: z.ZodNullable<z.ZodString>;
225
+ }, z.core.$loose>>;
101
226
  status: z.ZodEnum<{
102
227
  open: "open";
103
228
  addressed: "addressed";
229
+ met: "met";
104
230
  }>;
105
231
  }, z.core.$loose>>;
106
232
  floorReached: z.ZodBoolean;
@@ -108,21 +234,58 @@ export declare const FocusCriteriaStandingSchema: z.ZodObject<{
108
234
  all_criteria_addressed: "all_criteria_addressed";
109
235
  open_criteria_remain: "open_criteria_remain";
110
236
  no_criteria_declared: "no_criteria_declared";
237
+ derived_live_unarmed: "derived_live_unarmed";
238
+ derived_live_incomplete: "derived_live_incomplete";
111
239
  }>;
240
+ treeBasis: z.ZodOptional<z.ZodEnum<{
241
+ none: "none";
242
+ derived_live_unarmed: "derived_live_unarmed";
243
+ armed_stamp: "armed_stamp";
244
+ derived_live_unstamped_arm: "derived_live_unstamped_arm";
245
+ }>>;
246
+ unstatedCoveredEffects: z.ZodOptional<z.ZodArray<z.ZodObject<{
247
+ nodeId: z.ZodString;
248
+ seq: z.ZodNumber;
249
+ statement: z.ZodString;
250
+ }, z.core.$loose>>>;
251
+ draftedCoveredEffects: z.ZodOptional<z.ZodArray<z.ZodObject<{
252
+ nodeId: z.ZodString;
253
+ seq: z.ZodNumber;
254
+ draft: z.ZodString;
255
+ }, z.core.$loose>>>;
256
+ treeCoverageIncomplete: z.ZodOptional<z.ZodBoolean>;
257
+ armWouldRefuseNoEffect: z.ZodOptional<z.ZodBoolean>;
112
258
  openCriteria: z.ZodArray<z.ZodString>;
113
259
  deliveryScan: z.ZodOptional<z.ZodObject<{
114
260
  limit: z.ZodNumber;
115
261
  scanned: z.ZodNumber;
116
262
  evaluated: z.ZodNumber;
117
263
  truncated: z.ZodBoolean;
264
+ anchors: z.ZodOptional<z.ZodNumber>;
265
+ anchorsTruncated: z.ZodOptional<z.ZodBoolean>;
266
+ }, z.core.$loose>>;
267
+ treeScan: z.ZodOptional<z.ZodObject<{
268
+ limit: z.ZodNumber;
269
+ injections: z.ZodNumber;
270
+ edges: z.ZodNumber;
271
+ nodes: z.ZodNumber;
272
+ truncated: z.ZodBoolean;
118
273
  }, z.core.$loose>>;
119
274
  }, z.core.$loose>;
120
275
  /** One delivery's claim on one criterion, with its evidence. */
121
276
  export type CriterionMatch = z.infer<typeof CriterionMatchSchema>;
122
- /** One declared criterion and its standing. */
277
+ /** One criterion -- tree or declared -- and its standing. */
123
278
  export type CriterionStanding = z.infer<typeof CriterionStandingSchema>;
279
+ /** What verify recorded about a tree criterion's node. */
280
+ export type CriterionLanding = z.infer<typeof CriterionLandingSchema>;
281
+ /** A covered undesired effect stating no future -- what an arm would refuse on. */
282
+ export type UnstatedCoveredEffect = z.infer<typeof UnstatedCoveredEffectSchema>;
283
+ /** A covered undesired effect whose stated future is a machine draft. */
284
+ export type DraftedCoveredEffect = z.infer<typeof DraftedCoveredEffectSchema>;
124
285
  /** The bounds the edge's delivery scan applied, when it reported them. */
125
286
  export type CriteriaDeliveryScan = z.infer<typeof DeliveryScanSchema>;
287
+ /** The bounds the edge's tree scans applied, when it reported them. */
288
+ export type CriteriaTreeScan = z.infer<typeof TreeScanSchema>;
126
289
  /** A focus's declared criteria measured against its current deliveries. */
127
290
  export type FocusCriteriaStanding = z.infer<typeof FocusCriteriaStandingSchema>;
128
291
  /** Injectable API seam (a test passes a fake validated caller; no mock.module). */
@@ -1 +1 @@
1
- {"version":3,"file":"focus-criteria-standing.d.ts","sourceRoot":"","sources":["../../src/queries/focus-criteria-standing.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,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AAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,0EAA0E;AAC1E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEtE,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE9D,2EAA2E;AAC3E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,mFAAmF;AACnF,MAAM,WAAW,8BAA8B;IAC7C,gBAAgB,CAAC,EAAE,OAAO,gBAAgB,CAAC;CAC5C;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,8BAAmC,GACxC,OAAO,CAAC,qBAAqB,CAAC,CAGhC"}
@@ -2,8 +2,18 @@
2
2
  // Pinned by: packages/daemon/src/resolvers/focus-criteria-standing.test.ts
3
3
  // PINNED-BY-END
4
4
  /**
5
- * The FOCUS CRITERIA STANDING read: which of a focus's DECLARED acceptance
6
- * criteria its current deliveries address, and which remain open.
5
+ * The FOCUS CRITERIA STANDING read: what a focus is FOR, and where each part of
6
+ * it stands. Two statements, both carried: the futures of the undesired effects
7
+ * its ARM covers (met only when verify recorded the future as landed), and the
8
+ * focus's OWN declared acceptance criteria (addressed when a current delivery
9
+ * declares one).
10
+ *
11
+ * EVERY ENUM HERE IS A DEPLOY-ORDER CONTRACT. The schemas are `.passthrough()`,
12
+ * so a field the edge adds costs nothing -- but an enum VALUE the edge adds and
13
+ * this daemon has not learned throws, and the one reader turns a throw into the
14
+ * explicit READ FAILED line. So the widening ships FIRST and the edge second;
15
+ * every optional field below is optional for the same reason, read from the
16
+ * other side.
7
17
  *
8
18
  * Read through the `focus_criteria_standing` product-api action
9
19
  * (handlers/focus/criteria-standing.ts), which loads the focus's own
@@ -50,15 +60,86 @@ const CriterionMatchSchema = z.object({
50
60
  significantTokenCount: z.number(),
51
61
  }).passthrough();
52
62
  /**
53
- * One criterion and where it stands. `status` IS enumerated: rendering a
54
- * criterion as addressed or open is the decision this whole section carries, so
55
- * an unrecognized status must fail the read loudly rather than be printed as if
56
- * it were understood.
63
+ * What VERIFY recorded about a tree criterion's node -- carried out of the
64
+ * edge's landing predicate (`supabase/functions/_shared/effect-future-landed.ts`) verbatim.
65
+ *
66
+ * Every field here is a plain string, NOT an enum, for the same reason
67
+ * `matchBasis` is: the resolver only ECHOES them into prose. The met/open
68
+ * decision hangs on `status` above, which IS enumerated, so a new landing basis
69
+ * added at the edge must not cost the pass its whole standing section.
70
+ */
71
+ const CriterionLandingSchema = z.object({
72
+ standing: z.string(),
73
+ basis: z.string(),
74
+ classification: z.string().nullable(),
75
+ divergenceReason: z.string().nullable(),
76
+ }).passthrough();
77
+ /**
78
+ * One criterion and where it stands.
79
+ *
80
+ * `status` IS enumerated: rendering a criterion as met, addressed or open is
81
+ * the decision this whole section carries, so an unrecognized status must fail
82
+ * the read loudly rather than be printed as if it were understood. `'met'` and
83
+ * `'addressed'` are DIFFERENT claims and the resolver renders them as such --
84
+ * `'addressed'` says a delivery POINTS AT a declared criterion (scoping),
85
+ * `'met'` says verify RECORDED a tree criterion's declared future as landed
86
+ * (reality). A daemon that lacked `'met'` threw on every armed focus carrying
87
+ * one and rendered the READ FAILED line in place of the whole section; that is
88
+ * the failure this enum's width exists to prevent, and why widening it ships
89
+ * BEFORE the edge that emits the value.
90
+ *
91
+ * `source` and the three TREE-only fields are OPTIONAL, deliberately. The
92
+ * daemon deploys ahead of the edge, so for one window the edge answering this
93
+ * action is the older one that emits neither -- and a required field would
94
+ * invert the very deploy order this widening exists to honour. An absent
95
+ * `source` is rendered as UNSTATED rather than guessed at.
57
96
  */
58
97
  const CriterionStandingSchema = z.object({
59
98
  criterion: z.string(),
60
99
  addressedBy: z.array(CriterionMatchSchema),
61
- status: z.enum(['addressed', 'open']),
100
+ /** Weak, NON-CLOSING signals. Absent on an edge predating the field. */
101
+ evidence: z.array(CriterionMatchSchema).optional(),
102
+ /** WHICH statement this came from, and therefore which rule judged it. */
103
+ source: z.enum(['tree', 'declared']).optional(),
104
+ /** TREE only: `reality_tree_nodes.id` of the covered undesired effect. */
105
+ nodeId: z.string().optional(),
106
+ /** TREE only: `reality_tree_nodes.seq` -- how a human names the node. */
107
+ seq: z.number().optional(),
108
+ /** TREE only: a MACHINE wrote this future and a human accepted it by arming. */
109
+ drafted: z.boolean().optional(),
110
+ /** TREE only: what verify recorded about the node. See the schema. */
111
+ landing: CriterionLandingSchema.optional(),
112
+ status: z.enum(['addressed', 'met', 'open']),
113
+ }).passthrough();
114
+ /**
115
+ * A covered undesired effect that states NO future. On an un-armed focus this
116
+ * is exactly what the arm would REFUSE on, named by the same `seq` the refusal
117
+ * message names -- which is the whole value of the un-armed preview.
118
+ */
119
+ const UnstatedCoveredEffectSchema = z.object({
120
+ nodeId: z.string(),
121
+ seq: z.number(),
122
+ statement: z.string(),
123
+ }).passthrough();
124
+ /** A covered undesired effect whose future is only a MACHINE DRAFT. */
125
+ const DraftedCoveredEffectSchema = z.object({
126
+ nodeId: z.string(),
127
+ seq: z.number(),
128
+ draft: z.string(),
129
+ }).passthrough();
130
+ /**
131
+ * The bounds the edge's TREE scans applied. OPTIONAL for the same reason
132
+ * `deliveryScan` is, and reported for a sharper reason: a truncated NODE scan
133
+ * can only move a criterion toward open, but a truncated EDGE scan SHRINKS a
134
+ * live-derived bar, so a caller must never be left to assume it saw the whole
135
+ * tree.
136
+ */
137
+ const TreeScanSchema = z.object({
138
+ limit: z.number(),
139
+ injections: z.number(),
140
+ edges: z.number(),
141
+ nodes: z.number(),
142
+ truncated: z.boolean(),
62
143
  }).passthrough();
63
144
  /**
64
145
  * The bounds the edge's delivery scan applied. OPTIONAL on purpose: if a future
@@ -71,6 +152,20 @@ const DeliveryScanSchema = z.object({
71
152
  scanned: z.number(),
72
153
  evaluated: z.number(),
73
154
  truncated: z.boolean(),
155
+ /**
156
+ * Injection anchors the TREE half was derived over. OPTIONAL: the edge that
157
+ * resolves anchors separately from the bounded delivery rows ships AFTER
158
+ * this daemon, so for one window the answer carries neither this nor
159
+ * `anchorsTruncated`.
160
+ */
161
+ anchors: z.number().optional(),
162
+ /**
163
+ * True when the separate anchor read hit its own bound -- the only case in
164
+ * which a truncated delivery scan still shortens the tree half. Absent means
165
+ * the edge did not resolve anchors separately, which the resolver reports as
166
+ * the weaker reading rather than as "the tree half is whole".
167
+ */
168
+ anchorsTruncated: z.boolean().optional(),
74
169
  }).passthrough();
75
170
  /**
76
171
  * The standing. `floorBasis` is enumerated deliberately: `no_criteria_declared`
@@ -78,14 +173,54 @@ const DeliveryScanSchema = z.object({
78
173
  * the entire point of the read. A basis this daemon cannot interpret must throw
79
174
  * -- rendering an unknown basis would be guessing at exactly the value that
80
175
  * decides whether the elaboration loop stops.
176
+ *
177
+ * `derived_live_unarmed` is the fourth member and a FIFTH situation: the tree
178
+ * half is a PREVIEW of the bar an arm would stamp, so there is no stamped bar
179
+ * to have reached. It is neither a floor nor a missed floor, and the resolver
180
+ * renders it as its own line.
181
+ *
182
+ * `treeBasis` is enumerated for the same reason -- it answers "whose statement
183
+ * of the bar am I reading", and an un-armed PREVIEW must never be rendered as
184
+ * the arm's own stamp -- but it is OPTIONAL: an edge predating the tree half
185
+ * reports none, and the resolver says the tree half was not reported rather
186
+ * than inventing one.
81
187
  */
82
188
  export const FocusCriteriaStandingSchema = z.object({
83
189
  focusId: z.string(),
84
190
  criteria: z.array(CriterionStandingSchema),
85
191
  floorReached: z.boolean(),
86
- floorBasis: z.enum(['all_criteria_addressed', 'open_criteria_remain', 'no_criteria_declared']),
192
+ floorBasis: z.enum([
193
+ 'all_criteria_addressed',
194
+ 'open_criteria_remain',
195
+ 'no_criteria_declared',
196
+ 'derived_live_unarmed',
197
+ // The FIFTH member: a live derivation over coverage the edge could not
198
+ // fully resolve. Learned here BEFORE the edge can emit it -- that is the
199
+ // whole deploy-order contract this schema's header states, and an enum
200
+ // value is exactly the kind of widening that must ship first.
201
+ 'derived_live_incomplete',
202
+ ]),
203
+ treeBasis: z
204
+ .enum(['armed_stamp', 'derived_live_unstamped_arm', 'derived_live_unarmed', 'none'])
205
+ .optional(),
206
+ unstatedCoveredEffects: z.array(UnstatedCoveredEffectSchema).optional(),
207
+ draftedCoveredEffects: z.array(DraftedCoveredEffectSchema).optional(),
208
+ /**
209
+ * True when the tree half was derived LIVE over coverage the edge could not
210
+ * fully resolve, so a criterion may be MISSING from the list entirely.
211
+ * OPTIONAL for the deploy order: the edge that computes it ships after this
212
+ * daemon, and an absent flag means the older edge, not "the bar is whole".
213
+ */
214
+ treeCoverageIncomplete: z.boolean().optional(),
215
+ /**
216
+ * True when a live derivation walked real coverage and found no judgeable
217
+ * undesired effect in it -- the `arm_criteria_required` refusal an arm would
218
+ * raise right now. OPTIONAL for the same deploy-order reason.
219
+ */
220
+ armWouldRefuseNoEffect: z.boolean().optional(),
87
221
  openCriteria: z.array(z.string()),
88
222
  deliveryScan: DeliveryScanSchema.optional(),
223
+ treeScan: TreeScanSchema.optional(),
89
224
  }).passthrough();
90
225
  /**
91
226
  * Read a focus's criteria standing. Throws on a failed or malformed read --
@@ -1 +1 @@
1
- {"version":3,"file":"focus-criteria-standing.js","sourceRoot":"","sources":["../../src/queries/focus-criteria-standing.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,2EAA2E;AAC3E,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,wEAAwE;AACxE,MAAM,CAAC,MAAM,8BAA8B,GAAG,yBAAyB,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,UAAU,EAAE,CAAC,CAAC,MAAM,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