@attalabs/vinaya 0.39.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +9 -9
  2. package/aeg-root/contracts/developer-reviewer.md +2 -2
  3. package/aeg-root/contracts/planner-developer.md +5 -5
  4. package/aeg-root/enforcement.md +22 -22
  5. package/aeg-root/process.md +4 -4
  6. package/aeg-root/roles/archivist.md +1 -1
  7. package/aeg-root/roles/developer/reference.md +7 -1
  8. package/aeg-root/roles/developer.md +1 -1
  9. package/aeg-root/roles/planner/reference.md +18 -5
  10. package/aeg-root/roles/principal.md +1 -1
  11. package/aeg-root/roles/reviewer.md +3 -3
  12. package/aeg-root/roles/security.md +4 -4
  13. package/aeg-root/roles/tranche-archivist.md +2 -2
  14. package/aeg-root/skills/aeg/SKILL.md +1 -1
  15. package/aeg-root/state-machine.md +10 -15
  16. package/aeg-root/templates/brief-template.md +5 -2
  17. package/aeg-root/templates/decision-record-template.md +38 -0
  18. package/aeg-root/templates/issue-rationale-template.md +1 -1
  19. package/aeg-root/tranche-model.md +1 -1
  20. package/dist/checks/bin/check-body-bare-digits.js +1974 -354
  21. package/dist/checks/bin/check-branch-topology.js +1296 -243
  22. package/dist/checks/bin/check-brief-shape.js +2038 -460
  23. package/dist/checks/bin/check-changeset-coverage.js +2411 -564
  24. package/dist/checks/bin/check-ci-shard-coverage.js +12391 -15
  25. package/dist/checks/bin/check-closes-n.js +1296 -243
  26. package/dist/checks/bin/check-coherence.js +1914 -1155
  27. package/dist/checks/bin/check-dead-branch-push.js +1242 -230
  28. package/dist/checks/bin/check-dispatch-readiness.js +2222 -460
  29. package/dist/checks/bin/check-doc-claims.js +2233 -260
  30. package/dist/checks/bin/check-doc-coverage-push.js +2436 -550
  31. package/dist/checks/bin/check-doc-coverage.js +2434 -552
  32. package/dist/checks/bin/check-doctrine-no-procedures.js +1776 -353
  33. package/dist/checks/bin/check-doctrine-portability.js +2408 -561
  34. package/dist/checks/bin/check-evidence-fresh.js +2370 -508
  35. package/dist/checks/bin/check-exec-bits.js +2407 -560
  36. package/dist/checks/bin/check-first-push-dispatch.js +1984 -380
  37. package/dist/checks/bin/check-issue-assignment.js +712 -170
  38. package/dist/checks/bin/check-issue-milestone-attach.js +1233 -230
  39. package/dist/checks/bin/check-issue-objectives-numbering.js +1769 -346
  40. package/dist/checks/bin/check-issue-parts-coverage.js +1233 -230
  41. package/dist/checks/bin/check-issue-surface-globs.js +1926 -378
  42. package/dist/checks/bin/check-issue-title-grammar.js +1233 -230
  43. package/dist/checks/bin/check-issue-tranche-label.js +702 -170
  44. package/dist/checks/bin/check-main-branch-refusal.js +1245 -232
  45. package/dist/checks/bin/check-no-disk-state.js +1233 -230
  46. package/dist/checks/bin/check-pr-premise-reassert.js +1769 -346
  47. package/dist/checks/bin/check-pr-report-density.js +1233 -230
  48. package/dist/checks/bin/check-principal-test-plan-wait.js +2489 -259
  49. package/dist/checks/bin/check-quoted-command.js +2391 -544
  50. package/dist/checks/bin/check-reader-resolvable-prose.js +2437 -564
  51. package/dist/checks/bin/check-registry-gates.js +1380 -296
  52. package/dist/checks/bin/check-retired-vocabulary.js +2416 -550
  53. package/dist/checks/bin/check-review-gate.js +2073 -371
  54. package/dist/checks/bin/check-single-plan-pr.js +1297 -235
  55. package/dist/checks/bin/check-surface-scope.js +1531 -252
  56. package/dist/checks/bin/check-test-plan.js +2487 -258
  57. package/dist/checks/bin/check-token-collection-wired.js +1233 -230
  58. package/dist/checks/bin/check-workspace-escape.js +2408 -561
  59. package/dist/checks/bin/verify-coherence.js +597 -97
  60. package/dist/checks/bin/verify-dispatch.js +632 -152
  61. package/dist/checks/bin/verify-docs.js +642 -132
  62. package/dist/index.js +25948 -16630
  63. package/dist/lib/pre-push-cache-test-run.js +1813 -297
  64. package/dist/lib/pre-push-changed-files.js +65 -19
  65. package/dist/lib/pre-push-mode.js +466 -0
  66. package/dist/lib/pre-push-progress-dir.js +4205 -0
  67. package/dist/lib/pre-push-record-tests.js +446 -0
  68. package/dist/lib/pre-push-select-tests.js +2353 -632
  69. package/dist/lib/push-progress-observer.js +4213 -0
  70. package/package.json +22 -5
  71. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/anchored-region.ts +17 -3
  72. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +73 -30
  73. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +3 -3
  74. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/coherence-checks.ts +2 -2
  75. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/local.ts +88 -5
  76. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/records.ts +34 -2
  77. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +26 -4
  78. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/fakes.ts +7 -2
  79. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +7 -1
  80. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +29 -3
  81. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dispatch-gate.ts +35 -18
  82. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/index.ts +1 -1
  83. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/published-prose.ts +70 -45
  84. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-portability.ts +6 -1
  85. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/entry-point.ts +27 -0
  86. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-audience.ts +3 -5
  87. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +96 -9
  88. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-assignment.ts +24 -54
  89. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +809 -106
  90. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/live-record.ts +179 -0
  91. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +8 -2
  92. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/index.ts +1 -0
  93. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/narration.ts +2 -0
  94. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema-digest.ts +225 -0
  95. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema.ts +7 -1
  96. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/main-branch-refusal.ts +23 -1
  97. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-report-density.ts +6 -4
  98. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/principals-config.ts +44 -0
  99. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/prose-rules.ts +532 -0
  100. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/protected-paths.ts +31 -0
  101. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +157 -80
  102. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-checks.ts +8 -12
  103. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/retired-vocabulary.ts +53 -93
  104. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +46 -17
  105. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-input-manifest.ts +85 -1
  106. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +32 -13
  107. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ruling-ordinal.ts +46 -0
  108. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-branch-identity.ts +2 -4
  109. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-gate.ts +63 -8
  110. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/verdict-extraction.ts +24 -0
  111. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/waiver-label.ts +0 -1
  112. package/studio-standalone/apps/vinaya-studio/web/.next/BUILD_ID +1 -1
  113. package/studio-standalone/apps/vinaya-studio/web/.next/build-manifest.json +3 -3
  114. package/studio-standalone/apps/vinaya-studio/web/.next/prerender-manifest.json +3 -3
  115. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.html +1 -1
  116. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.rsc +1 -1
  117. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  118. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  119. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  120. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  121. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  122. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
  123. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  124. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  125. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page/server-reference-manifest.json +2 -2
  126. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js.nft.json +1 -1
  127. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page_client-reference-manifest.js +1 -1
  128. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page/server-reference-manifest.json +2 -2
  129. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js +1 -1
  130. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js.nft.json +1 -1
  131. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page_client-reference-manifest.js +1 -1
  132. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page/server-reference-manifest.json +2 -2
  133. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js +1 -1
  134. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js.nft.json +1 -1
  135. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page_client-reference-manifest.js +1 -1
  136. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page/server-reference-manifest.json +2 -2
  137. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js +1 -1
  138. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js.nft.json +1 -1
  139. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page_client-reference-manifest.js +1 -1
  140. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page/server-reference-manifest.json +3 -3
  141. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js +1 -1
  142. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js.nft.json +1 -1
  143. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page_client-reference-manifest.js +1 -1
  144. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page/server-reference-manifest.json +2 -2
  145. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js +2 -2
  146. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js.nft.json +1 -1
  147. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  148. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page/server-reference-manifest.json +2 -2
  149. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js +1 -1
  150. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js.nft.json +1 -1
  151. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page_client-reference-manifest.js +1 -1
  152. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page/server-reference-manifest.json +2 -2
  153. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js +1 -1
  154. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js.nft.json +1 -1
  155. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page_client-reference-manifest.js +1 -1
  156. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/1q96_modules_@clerk_nextjs_dist_esm_app-router_client_keyless-creator-reader_0lom2js.js +1 -1
  157. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__08e39jo._.js +1 -1
  158. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ls23oh._.js +1 -1
  159. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0sxadt2._.js +13 -0
  160. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1a3j3n1._.js +57 -0
  161. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1ug9syi._.js → [root-of-the-server]__1d4eth3._.js} +1 -1
  162. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1gjqmhq._.js +1 -1
  163. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1snpgaw._.js +3 -3
  164. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1wc4-ip._.js +1 -1
  165. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_08onyya._.js +2 -2
  166. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_096f46i._.js +1 -1
  167. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0af2one._.js +1 -1
  168. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0e5tkdd._.js +1 -1
  169. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0kf2g72._.js +1 -1
  170. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0zf4d27._.js +3 -3
  171. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1-wo68i._.js +1 -1
  172. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1achbh9._.js +1 -1
  173. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/node_modules_@clerk_nextjs_dist_esm_app-router_server-actions_1x7vfhn.js +2 -2
  174. package/studio-standalone/apps/vinaya-studio/web/.next/server/middleware-build-manifest.js +3 -3
  175. package/studio-standalone/apps/vinaya-studio/web/.next/server/pages/500.html +1 -1
  176. package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.js +1 -1
  177. package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.json +4 -4
  178. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{33rszkngkuoko.js → 0x7u6si-ai179.js} +1 -1
  179. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{06_55xbp7rcbi.js → 2fu7mfsj4oima.js} +1 -1
  180. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{2brkwv169ygep.js → 34b4ruddunn3q.js} +1 -1
  181. package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
  182. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__04adkz-._.js +0 -57
  183. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__19jyp3m._.js +0 -13
  184. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{D3LiJNIq5FWZxen7CpOSJ → 2ZARxTwpuRew8-SvYsRdU}/_buildManifest.js +0 -0
  185. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{D3LiJNIq5FWZxen7CpOSJ → 2ZARxTwpuRew8-SvYsRdU}/_clientMiddlewareManifest.js +0 -0
  186. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{D3LiJNIq5FWZxen7CpOSJ → 2ZARxTwpuRew8-SvYsRdU}/_ssgManifest.js +0 -0
@@ -62,7 +62,8 @@ export type FindingObservation = {
62
62
  /**
63
63
  * Set only when the round set this finding aside rather than let it block
64
64
  * (O2/O3): `'unchanged-line'` (round 2 on, a line that did not change) or
65
- * `'outside-surface'` (any round, a file the Surface `in:` does not cover).
65
+ * `'outside-surface'` (any round, a file the Surface `in:` does not cover
66
+ * and the task branch did not change).
66
67
  * Absent means the finding was NOT deferred — it blocked, or was below
67
68
  * threshold. `policyTreatment` reads `non_blocking` whenever this is set.
68
69
  */
@@ -200,7 +201,7 @@ export type Observations =
200
201
  * carries the repeated key(s) in the pause's own `detail`.
201
202
  *
202
203
  * `'repeat_failure'`: two consecutive attempts ended on the same mechanical
203
- * failure — a refused push, a premise re-check mismatch, a forge or network
204
+ * failure, with a finished Developer attempt between them — a refused push, a premise re-check mismatch, a forge or network
204
205
  * error, a failed pre-push test — matched by the normalised signature
205
206
  * `normalizeFailureSignature` derives (`assess-round.ts`), never by raw
206
207
  * string equality: the volatile parts of such a message (timestamps,
@@ -229,6 +230,24 @@ export type Observations =
229
230
  * `assessRound` from the clock its caller reads (this module has none of its
230
231
  * own); `detail` names the budget, the active time spent, and the active phases
231
232
  * that time was summed from.
233
+ *
234
+ * `'sandbox_refused'`: a dispatch was refused before the agent started
235
+ * because the agent's own sandbox could not run a probe command on this host
236
+ * — a capability refusal, not a transient: the host does not change by
237
+ * itself, so the driver never retries it. Driver-decided from the dispatch's
238
+ * typed probe result, addressed to the Operator; `detail` carries the
239
+ * probe's own error. It is outside the automatic-recovery set and spends no
240
+ * infrastructure retry; once the host is repaired, the ordinary start
241
+ * continues the task from it, recording the pause's resolution once.
242
+ *
243
+ * `'missing_source'`: a required source the frozen brief names could not be
244
+ * prepared before the Developer's turn — a page behind a login, a page that
245
+ * answered from another host or with no document, a repository path absent
246
+ * at the frozen base, or a source naming neither — so the turn never starts
247
+ * and the run never continues on model memory in its place. Driver-decided
248
+ * by the controller's source provider; `detail` names each unavailable
249
+ * source with its typed reason (`RequiredSourceMissingReason`). Addressed to
250
+ * the Planner, whose correction of the task's sources is what resolves it.
232
251
  */
233
252
  export type PauseReason =
234
253
  | 'escalation'
@@ -246,6 +265,8 @@ export type PauseReason =
246
265
  | 'stale_driver'
247
266
  | 'brief_superseded'
248
267
  | 'policy_changed'
268
+ | 'sandbox_refused'
269
+ | 'missing_source'
249
270
 
250
271
  export type Decision =
251
272
  | { type: 'dispatch_developer'; reason?: 'confidence' }
@@ -414,8 +435,13 @@ export type LoopState = {
414
435
  * (what two attempts are matched on) and the `message` as reported (what
415
436
  * the pause names). `null` whenever the last attempt reached a green gate,
416
437
  * or failed with no reported cause: either breaks the repeat chain.
438
+ * `developerAttemptedSince` is `true` once a Developer attempt finished
439
+ * after this failure was recorded (`recordDeveloperAttempt`): only then is
440
+ * the same failure read again a second attempt's failure rather than the
441
+ * same attempt's read twice. Absent — a record written before this field
442
+ * existed — reads as no attempt recorded.
417
443
  */
418
- lastFailure: { signature: string; message: string } | null
444
+ lastFailure: { signature: string; message: string; developerAttemptedSince?: boolean } | null
419
445
  /** Running sums for `journal_finalized` — updated once per concluded round, never recomputed from `rounds` (which carries counts only, not diff stats). */
420
446
  totalWallMs: number
421
447
  totalFilesChanged: number
@@ -18,8 +18,30 @@
18
18
  * line per failure, naming the exact task/Issue/PR involved.
19
19
  */
20
20
 
21
+ import type { PriorTrancheArchivalFact } from '@attalabs/aeg-forge-state'
22
+ import { edgesNameEachOther } from './issue-validation'
23
+
24
+ /** The one edge reader both gates use — the write gate's own function, re-exposed so a test can assert identity. */
25
+ export const conflictEdgeReader = edgesNameEachOther
26
+
27
+ /** One task Issue reduced to what an edge reader needs: its reference and its parsed `Conflicts-with` ids. */
28
+ export type ConflictEdgeParty = { ref: string; conflictsWith: string[] }
29
+
30
+ /**
31
+ * The dispatch gate's edge reader: the same `edgesNameEachOther` the Issue
32
+ * write gate uses, so a `Conflicts-with` edge is present when EITHER task
33
+ * names the other. Returns the siblings sharing an edge with `subject`,
34
+ * whichever side declared it. `Depends-on` is directed and never read here.
35
+ */
36
+ export function siblingsSharingConflictEdge<S extends ConflictEdgeParty>(
37
+ subject: ConflictEdgeParty,
38
+ siblings: S[]
39
+ ): S[] {
40
+ return siblings.filter((s) => s.ref !== subject.ref && conflictEdgeReader(subject, s))
41
+ }
42
+
21
43
  import type { Task } from './types'
22
- import { isPrincipal, PRINCIPAL_ALLOWLIST } from './waiver-label'
44
+ import { isPrincipal } from './waiver-label'
23
45
 
24
46
  export type DispatchIssueFact = { number: number; state: 'open' | 'closed' } | null
25
47
 
@@ -111,12 +133,8 @@ export type DispatchPriorTaskFact = {
111
133
  hasProvenance: boolean
112
134
  }
113
135
 
114
- export type DispatchPriorTrancheFact = {
115
- project: string
116
- /** null when this project has no prior tranche at all — the gate passes trivially for it. */
117
- priorTrancheSlug: string | null
118
- archived: boolean
119
- }
136
+ /** One entry per project a task names — the shape `resolvePriorTrancheArchival` returns, defined beside the reads that produce it. */
137
+ export type DispatchPriorTrancheFact = PriorTrancheArchivalFact
120
138
 
121
139
  export type DispatchGateInput = {
122
140
  trancheSlug: string
@@ -137,16 +155,15 @@ export type DispatchGateInput = {
137
155
  /** One entry per project named in `task.projects`. */
138
156
  priorTrancheArchival: DispatchPriorTrancheFact[]
139
157
  /**
140
- * Overrides `PRINCIPAL_ALLOWLIST` for hand-close recognition when
141
- * provided — an adopter repo's own `vinaya.config.json` `principals`
142
- * field, resolved by the CLI bin before calling in (never read from here;
143
- * this stays pure). Defaults to `PRINCIPAL_ALLOWLIST` when omitted, same
144
- * pattern as `checkReviewGate`'s `principalAllowlist` (`review-gate.ts`) —
145
- * hardcoding this repo's own principal made that gate unpassable on any
146
- * adopter repo; the same mistake here would silently do the same to the
147
- * hand-close path.
158
+ * The Principal list for hand-close recognition — the repository's own
159
+ * `vinaya.config.json` `principals` field, resolved by the caller before
160
+ * calling in (never read from here; this stays pure). REQUIRED, with no
161
+ * built-in fallback, same as `checkReviewGate`'s `principalAllowlist`
162
+ * (`review-gate.ts`) — hardcoding this repo's own principal made that gate
163
+ * unpassable on any adopter repo; the same mistake here would silently do
164
+ * the same to the hand-close path.
148
165
  */
149
- principalAllowlist?: string[]
166
+ principalAllowlist: string[]
150
167
  }
151
168
 
152
169
  /**
@@ -221,7 +238,7 @@ function isSelfDependency(dep: DispatchDependsOnFact, task: Task, issue: Dispatc
221
238
  export function checkDispatchReadiness(input: DispatchGateInput): DispatchResult {
222
239
  const { trancheSlug, task } = input
223
240
  const taskLabel = `task ${task.id} (tranche ${trancheSlug})`
224
- const principalAllowlist = input.principalAllowlist ?? PRINCIPAL_ALLOWLIST
241
+ const { principalAllowlist } = input
225
242
  const blockerDetails: DispatchBlocker[] = []
226
243
  const push = (blockerClass: DispatchBlockerClass, message: string): void => {
227
244
  blockerDetails.push({ class: blockerClass, message })
@@ -245,7 +262,7 @@ export function checkDispatchReadiness(input: DispatchGateInput): DispatchResult
245
262
  if (input.issue !== null && !input.issueRationalePass) {
246
263
  push(
247
264
  'rationale',
248
- `dispatch-gate rationale: Issue #${input.issue.number} for ${taskLabel} fails the rationale gate (checkIssueRationale) — the Planner must complete the eight-field rationale before this task is dispatchable.`
265
+ `dispatch-gate rationale: Issue #${input.issue.number} for ${taskLabel} fails the rationale gate (checkIssueRationale) — the Planner must complete the rationale (all eight fields for a tranche task; a single-fix Issue omits only Sizing, Project(s) + blast radius and Dependency rationale) before this task is dispatchable.`
249
266
  )
250
267
  }
251
268
 
@@ -28,4 +28,4 @@ export {
28
28
  SHORT_VERSION_MIN_WORDS,
29
29
  WHAT_YOU_CHECK_HEADING
30
30
  } from './published-prose'
31
- export type { PublishedProseEntry, PublishedProseResult } from './published-prose'
31
+ export type { PublishedProseEntry, PublishedProseOptions, PublishedProseResult } from './published-prose'
@@ -44,6 +44,12 @@
44
44
  */
45
45
 
46
46
  import { findHeadingLine, findTable } from '../markdown-table'
47
+ import {
48
+ DECISION_RECORD_CITATION_ID,
49
+ DECISION_RECORD_CITATION_MESSAGE,
50
+ decisionRecordCitationPattern,
51
+ rulesForGroup
52
+ } from '../prose-rules'
47
53
  import { isSurfacedDoc } from './surfaced-manifest'
48
54
  import type { DocFrontmatter } from './types'
49
55
 
@@ -71,13 +77,10 @@ export const CONTRACT_BLOCKS = [
71
77
  /**
72
78
  * Protocol facts that must survive every readability rule. Masked out of the
73
79
  * text before scanning, longest first, so a repo-internal-path rule can never
74
- * claim the branch convention.
80
+ * claim the branch convention. The default of `proseGates.published.allow`;
81
+ * a configured list replaces it.
75
82
  */
76
- export const ALLOWED_MECHANICS: readonly string[] = [
77
- '.worktrees/task/<tranche>/<n>',
78
- 'task/<tranche>/<n>',
79
- '.worktrees/'
80
- ]
83
+ export const ALLOWED_MECHANICS: readonly string[] = rulesForGroup('published-prose')[0]?.exemptions ?? []
81
84
 
82
85
  export type PublishedProseEntry = {
83
86
  /** Path relative to `aeg-root/`, e.g. `roles/developer.md`. */
@@ -88,6 +91,9 @@ export type PublishedProseEntry = {
88
91
 
89
92
  export type PublishedProseResult = { errors: string[]; notes: string[] }
90
93
 
94
+ /** `decisionRecordsPath` is `decisionRecords.path`; absent, the decision-record citation rule does not run. */
95
+ export type PublishedProseOptions = { decisionRecordsPath?: string }
96
+
91
97
  type ProseRule = { id: string; what: string; pattern: RegExp }
92
98
 
93
99
  /**
@@ -96,33 +102,28 @@ type ProseRule = { id: string; what: string; pattern: RegExp }
96
102
  * English word ("Project:", the PR-body field) from being read as the deleted
97
103
  * `project:*` label family.
98
104
  */
99
- const PROSE_RULES: ProseRule[] = [
100
- { id: 'decision-id', what: 'a decision id', pattern: /\bD-\d{3,}\b/ },
101
- { id: 'section-ref', what: 'a section reference', pattern: /§/ },
102
- { id: 'forge-number', what: 'a forge number', pattern: /#\d+/ },
103
- { id: 'retired-name', what: 'the retired public name', pattern: /\bAEG\b/ },
104
- { id: 'tranche-slug', what: 'a tranche slug', pattern: /\b[a-z][a-z0-9]*(?:-[a-z0-9]+)+-v\d+\b/ },
105
- {
106
- id: 'label-vocabulary',
107
- what: 'forge label vocabulary',
108
- // Every entry here is CUMULATIVE — a retired namespace stays banned after
109
- // the objects carrying it are gone, because a published page naming it is
110
- // just as unreadable to a stranger as one naming the current grammar (see
111
- // the module header). `aeg:` is retired and still listed for that reason,
112
- // and `iteration:` joins it: the rename to `tranche:` ADDS an alternative,
113
- // it does not substitute one. Substituting is how a rename silently
114
- // narrows this gate — the forge still carried `vinaya/iteration:*` labels
115
- // when the rename landed, and a page naming one would have passed.
116
- pattern: /(?:vinaya\/)?\b(?:tranche|iteration|tier|needs|waiver|project|aeg):(?![/\s]|$)/
117
- },
118
- { id: 'internal-path', what: 'a repo-internal path', pattern: /\b(?:packages|apps|aeg-root|tools|scripts)\// },
119
- { id: 'internal-path', what: 'a repo-internal path', pattern: /\.(?:claude|husky|github)\// },
120
- {
121
- id: 'internal-path',
122
- what: 'a repo-internal file',
123
- pattern: /(?:^|[\s(`"'[])[\w.-]+(?:\/[\w.-]+)*\.(?:ts|tsx|js|jsx|mjs|cjs|sh|ya?ml|json|md)\b/
124
- }
125
- ]
105
+ const PROSE_RULES: ProseRule[] = rulesForGroup('published-prose').map((rule) => ({
106
+ id: rule.id,
107
+ what: rule.message,
108
+ pattern: rule.patterns.published as RegExp
109
+ }))
110
+
111
+ /**
112
+ * The rules the published pass runs: the shipped ones, plus the
113
+ * decision-record citation rule while `decisionRecords.path` is set — and
114
+ * only then.
115
+ */
116
+ function publishedRules(decisionRecordsPath: string | undefined): ProseRule[] {
117
+ if (decisionRecordsPath === undefined) return PROSE_RULES
118
+ return [
119
+ ...PROSE_RULES,
120
+ {
121
+ id: DECISION_RECORD_CITATION_ID,
122
+ what: DECISION_RECORD_CITATION_MESSAGE,
123
+ pattern: decisionRecordCitationPattern(decisionRecordsPath)
124
+ }
125
+ ]
126
+ }
126
127
 
127
128
  /** The doc kinds this check governs, and the block set each answers with. */
128
129
  function blocksFor(relPath: string): readonly string[] | null {
@@ -196,9 +197,12 @@ export function countWords(text: string): number {
196
197
  return text.split(/\s+/).filter(Boolean).length
197
198
  }
198
199
 
199
- function maskAllowedMechanics(text: string): string {
200
+ function maskAllowedMechanics(text: string, allow: readonly string[]): string {
200
201
  let masked = text
201
- for (const literal of ALLOWED_MECHANICS) {
202
+ // Longest first, whatever order the list was written in, so a shorter
203
+ // literal can never cut a longer one apart before it is masked.
204
+ const ordered = [...allow].sort((a, b) => b.length - a.length)
205
+ for (const literal of ordered) {
202
206
  masked = masked.split(literal).join(' ')
203
207
  }
204
208
  return masked
@@ -243,17 +247,28 @@ export function enforcementPublishedText(content: string): string[] {
243
247
  * never sees it. A whole published page was unguarded on that technicality;
244
248
  * `actions.test.ts` closes it by running this over every entry.
245
249
  */
246
- export function readabilityErrors(where: string, texts: string[]): string[] {
250
+ export function readabilityErrors(
251
+ where: string,
252
+ texts: string[],
253
+ allow: readonly string[] = ALLOWED_MECHANICS,
254
+ options: PublishedProseOptions = {}
255
+ ): string[] {
247
256
  const errors: string[] = []
248
- checkReadability(where, texts, errors)
257
+ checkReadability(where, texts, errors, allow, publishedRules(options.decisionRecordsPath))
249
258
  return errors
250
259
  }
251
260
 
252
- function checkReadability(where: string, texts: string[], errors: string[]): void {
261
+ function checkReadability(
262
+ where: string,
263
+ texts: string[],
264
+ errors: string[],
265
+ allow: readonly string[] = ALLOWED_MECHANICS,
266
+ rules: readonly ProseRule[] = PROSE_RULES
267
+ ): void {
253
268
  const seen = new Set<string>()
254
269
  for (const raw of texts) {
255
- const text = maskAllowedMechanics(raw)
256
- for (const rule of PROSE_RULES) {
270
+ const text = maskAllowedMechanics(raw, allow)
271
+ for (const rule of rules) {
257
272
  const match = text.match(rule.pattern)
258
273
  if (!match) continue
259
274
  const token = (match[0] ?? '').trim()
@@ -300,14 +315,18 @@ function checkStructure(relPath: string, body: string, blocks: readonly string[]
300
315
  * Runs both checks over the published set only. `entries` may hold every doc
301
316
  * under `aeg-root/`; `surfacedPaths` (the model-backed allowlist) is what
302
317
  * narrows it, so this check can never publish-check a doc the site does not
303
- * publish, nor miss one it does.
318
+ * publish, nor miss one it does. `allow` is `proseGates.published.allow`
319
+ * when a repository configures it.
304
320
  */
305
321
  export function evaluatePublishedProse(
306
322
  entries: PublishedProseEntry[],
307
- surfacedPaths: ReadonlySet<string> = new Set()
323
+ surfacedPaths: ReadonlySet<string> = new Set(),
324
+ allow: readonly string[] = ALLOWED_MECHANICS,
325
+ options: PublishedProseOptions = {}
308
326
  ): PublishedProseResult {
309
327
  const errors: string[] = []
310
328
  const notes: string[] = []
329
+ const rules = publishedRules(options.decisionRecordsPath)
311
330
 
312
331
  const surfaced = entries.filter((e) => isSurfacedDoc(e.relPath, e.frontmatter, surfacedPaths))
313
332
 
@@ -316,17 +335,23 @@ export function evaluatePublishedProse(
316
335
  // entry, `description` is the page metadata. Checking only the body left
317
336
  // both unguarded — a citation in a title reaches a reader exactly as
318
337
  // surely as one in a paragraph.
319
- checkReadability(entry.relPath, [entry.frontmatter.title ?? '', entry.frontmatter.description ?? ''], errors)
338
+ checkReadability(
339
+ entry.relPath,
340
+ [entry.frontmatter.title ?? '', entry.frontmatter.description ?? ''],
341
+ errors,
342
+ allow,
343
+ rules
344
+ )
320
345
 
321
346
  const blocks = blocksFor(entry.relPath)
322
347
  if (blocks) {
323
348
  checkStructure(entry.relPath, entry.body, blocks, errors)
324
349
  const short = extractShortVersion(entry.body)
325
- if (short !== null) checkReadability(entry.relPath, [short], errors)
350
+ if (short !== null) checkReadability(entry.relPath, [short], errors, allow, rules)
326
351
  continue
327
352
  }
328
353
  if (entry.relPath === 'enforcement.md') {
329
- checkReadability(entry.relPath, enforcementPublishedText(entry.body), errors)
354
+ checkReadability(entry.relPath, enforcementPublishedText(entry.body), errors, allow, rules)
330
355
  }
331
356
  }
332
357
 
@@ -83,7 +83,12 @@ const STATIC_PORTABLE_PREFIXES: readonly string[] = [
83
83
  // genuinely has — adopter-owned by construction, the same class as
84
84
  // `.github/`/`.vinaya/`/`.claude/` above.
85
85
  '.git/',
86
- '.husky/'
86
+ '.husky/',
87
+ // The per-role entry points `vinaya init` writes into every adopter — the
88
+ // shared agent-skills directory and a second host's command directory —
89
+ // adopter-owned by construction, the same class as `.claude/` above.
90
+ '.agents/',
91
+ '.gemini/'
87
92
  ]
88
93
 
89
94
  /**
@@ -0,0 +1,27 @@
1
+ import { realpathSync } from 'node:fs'
2
+ import { basename, extname } from 'node:path'
3
+ import { fileURLToPath } from 'node:url'
4
+
5
+ /**
6
+ * Whether the module at `moduleUrl` (pass `import.meta.url`) is the script
7
+ * named `scriptName` (its file name without extension) the runtime was started
8
+ * on. Bundled bins use this instead of `import.meta.main`, which the CLI build
9
+ * rewrites to a CommonJS `__require.main` check that throws on load under ESM
10
+ * when no `__require` shim is emitted. Both paths are resolved through
11
+ * `realpathSync` because the installed CLI is reached through a symlinked bin.
12
+ * `scriptName` is needed because a bundle that inlines this module into another
13
+ * entry (the CLI's own `index.js`) gives every inlined module that entry's URL.
14
+ */
15
+ export function isEntryPoint(
16
+ moduleUrl: string,
17
+ scriptName: string,
18
+ startedOn: string | undefined = process.argv[1]
19
+ ): boolean {
20
+ if (!startedOn) return false
21
+ try {
22
+ const started = realpathSync(startedOn)
23
+ return basename(started, extname(started)) === scriptName && realpathSync(fileURLToPath(moduleUrl)) === started
24
+ } catch {
25
+ return false
26
+ }
27
+ }
@@ -126,7 +126,7 @@ export const CLI_CHECK_RING: Readonly<Record<string, 0 | 1 | 2>> = {
126
126
  'dispatch-readiness': 0,
127
127
  'closes-n': 1,
128
128
  'single-plan-pr': 0,
129
- 'surface-scope': 0,
129
+ 'surface-scope': 1,
130
130
  'test-plan': 1,
131
131
  'principal-test-plan-wait': 1,
132
132
  'body-bare-digits': 1,
@@ -137,9 +137,9 @@ export const CLI_CHECK_RING: Readonly<Record<string, 0 | 1 | 2>> = {
137
137
  'dead-branch-push': 0,
138
138
  'first-push-dispatch': 0,
139
139
  'doc-coverage-push': 0,
140
- 'issue-assignment': 0,
141
140
  'evidence-fresh': 1,
142
141
  'reader-resolvable-prose': 0,
142
+ 'doc-claims': 0,
143
143
  'retired-vocabulary': 0,
144
144
  'doctrine-no-procedures': 0,
145
145
  'doctrine-portability': 0,
@@ -151,13 +151,12 @@ export const CLI_CHECK_RING: Readonly<Record<string, 0 | 1 | 2>> = {
151
151
  'main-branch-refusal': 0,
152
152
  'token-collection-wired': 0,
153
153
  'pr-premise-reassert': 0,
154
- // The six write-only rules named apart — `ownWorkflow: true`
154
+ // The five write-only rules named apart — `ownWorkflow: true`
155
155
  // each, same ring reasoning as `review-gate`/`body-bare-digits` above.
156
156
  'issue-title-grammar': 1,
157
157
  'issue-objectives-numbering': 1,
158
158
  'issue-parts-coverage': 1,
159
159
  'issue-surface-globs': 1,
160
- 'issue-tranche-label': 1,
161
160
  'issue-milestone-attach': 1
162
161
  }
163
162
 
@@ -168,7 +167,6 @@ export const CLI_CHECK_RING: Readonly<Record<string, 0 | 1 | 2>> = {
168
167
  */
169
168
  export const NON_GATE_BINS = [
170
169
  'archive-task',
171
- 'assign-task-issue',
172
170
  'dead-branch-audit',
173
171
  'eval-agent-compliance',
174
172
  'open-issue',
@@ -1,3 +1,4 @@
1
+ export { isEntryPoint } from './entry-point'
1
2
  export * from './types'
2
3
  export type { StateSource } from './state-source'
3
4
  export type { DoctrineContent, DoctrineSource } from './doctrine-source'
@@ -78,7 +79,6 @@ export type { C5Result, DocAck, DocNeutral, DocOwnersBinding, DocOwnersManifestS
78
79
  export {
79
80
  isPrincipal,
80
81
  isWaiverLabelActorVerified,
81
- PRINCIPAL_ALLOWLIST,
82
82
  WAIVER_LABEL,
83
83
  WAIVER_LABEL_REVIEW
84
84
  } from './waiver-label'
@@ -223,6 +223,7 @@ export {
223
223
  export type { MergedPrFacts } from './archive-task'
224
224
  export {
225
225
  extractCodeReviewVerdict,
226
+ extractPauseBoundRuling,
226
227
  extractSecurityReviewVerdict,
227
228
  parseFindingState,
228
229
  VERDICT_MARKER_SOURCE
@@ -236,7 +237,13 @@ export {
236
237
  isReviewGateExemptBranch
237
238
  } from './review-gate'
238
239
  export type { ReviewGateComment, ReviewGateInput, ReviewGateResult, ReviewGateVerdict } from './review-gate'
239
- export { newestPrincipalRulingAuthor, newestPrincipalRulingOrdinal, principalRulingMarker } from './ruling-ordinal'
240
+ export {
241
+ newestPrincipalRulingAuthor,
242
+ newestPrincipalRulingOrdinal,
243
+ parseRulingIdentity,
244
+ principalRulingMarker,
245
+ principalRulingTextById
246
+ } from './ruling-ordinal'
240
247
  export type { RulingComment } from './ruling-ordinal'
241
248
  export {
242
249
  briefHash,
@@ -250,11 +257,15 @@ export {
250
257
  isBoundToPolicy,
251
258
  isBoundToRulings,
252
259
  manifestAsEchoed,
260
+ pauseBoundRulingDigest,
261
+ pauseBoundRulingFromResolution,
253
262
  policyDigest
254
263
  } from './review-input-manifest'
255
264
  export type {
265
+ ConsumedResolution,
256
266
  EchoedManifest,
257
267
  ManifestBindingResult,
268
+ PauseBoundRuling,
258
269
  ReviewInputManifest,
259
270
  ReviewInputManifestFacts
260
271
  } from './review-input-manifest'
@@ -272,19 +283,29 @@ export {
272
283
  checkIssueObjectives,
273
284
  checkIssuePremises,
274
285
  checkIssueRationale,
286
+ type IssueRationaleOptions,
275
287
  checkIssueType,
276
288
  checkIntroducedCommandsCovered,
277
289
  checkIntroducedConfigKeysCovered,
278
290
  checkMilestoneAttach,
279
291
  checkNoBriefContent,
280
292
  checkNoForeignTaskOwnership,
293
+ checkProseAllowsBeyondSurfaceEdit,
294
+ checkCrossTaskValuesPinned,
281
295
  checkObjectivesRespectBoundary,
282
296
  checkPartsCiteDefinedObjectives,
283
297
  checkPartsCoverageAndSequence,
284
298
  checkPinnedFileImportersCovered,
299
+ decidePinnedFileImporters,
300
+ checkPinnedFileChecksDecided,
301
+ decidePinnedFileChecks,
302
+ surfaceForcedSet,
285
303
  checkNewTestFilesCoverShards,
286
304
  checkNewLoopFilesCoverInvariantMap,
287
305
  checkDocumentationReadable,
306
+ checkDocumentationPathsExist,
307
+ classifyDocumentationSource,
308
+ REQUIRED_SOURCE_MISSING_REASONS,
288
309
  isNonPublicHost,
289
310
  documentationUrls,
290
311
  type DocumentationProbe,
@@ -295,9 +316,14 @@ export {
295
316
  checkRationaleSurfaceCoverage,
296
317
  checkSurfaceExcludesBoundDoc,
297
318
  checkSurfaceGlobsResolve,
319
+ surfaceEntryResolves,
298
320
  checkSurfaceOverlap,
299
- checkTrancheLabelPresence,
321
+ checkTestPlanDeveloperRunnable,
300
322
  checkSurfaceScope,
323
+ beyondSurfacePaths,
324
+ recordedBeyondSurfacePaths,
325
+ renderBeyondSurfaceBlock,
326
+ withBeyondSurfaceBlock,
301
327
  declaredProjects,
302
328
  edgesNameEachOther,
303
329
  frozenSectionsChanged,
@@ -312,7 +338,8 @@ export {
312
338
  parseIssuePremises,
313
339
  parseIssueStopConditions,
314
340
  parseIssueSurface,
315
- parseIssueTestPlan
341
+ parseIssueTestPlan,
342
+ parseLiveTestPlanItems
316
343
  } from './issue-validation'
317
344
  export type {
318
345
  CommandReferenceEntry,
@@ -322,14 +349,25 @@ export type {
322
349
  FrozenSection,
323
350
  IssueDocumentation,
324
351
  IssueDocumentationSource,
352
+ RequiredSourceLocator,
353
+ RequiredSourceMissingReason,
325
354
  IssuePart,
326
355
  IssuePremise,
327
356
  IssueSectionResult,
328
357
  IssueSurface,
329
358
  IssueTestPlan,
330
359
  PinnedFileImporters,
360
+ PinnedFileCheck,
361
+ PinnedFileChecks,
362
+ PinnedCheckDecision,
363
+ PinnedFileCheckDecisions,
364
+ PinnedImporterDecision,
365
+ PinnedFileDecisions,
366
+ SurfaceForcedSet,
367
+ ForcedCompanion,
368
+ BeyondSurfacePath,
331
369
  SurfaceScopeResult,
332
- SurfaceScopeViolation,
370
+ ProtectedPathViolation,
333
371
  ProjectPath,
334
372
  TaskFileFacts,
335
373
  TaskIssueFacts,
@@ -413,7 +451,13 @@ export {
413
451
  stripNonProse,
414
452
  TASK_NUMBER_PATTERN
415
453
  } from './reader-resolvable-prose'
416
- export type { ProseFileClass, ProseFinding, ProseSourceFile, SpecGrandfather } from './reader-resolvable-prose'
454
+ export type {
455
+ ProseFileClass,
456
+ ProseFinding,
457
+ ProseSourceFile,
458
+ ProseSweepOptions,
459
+ SpecGrandfather
460
+ } from './reader-resolvable-prose'
417
461
  export {
418
462
  checkQuotedCommandStaleness,
419
463
  evaluateCitedQuotes,
@@ -428,6 +472,36 @@ export {
428
472
  scanRetiredVocabulary
429
473
  } from './retired-vocabulary'
430
474
  export type { VocabFinding, VocabSourceFile } from './retired-vocabulary'
475
+ export {
476
+ allowedScopesFor,
477
+ CONFIGURABLE_DEFAULT_RULES,
478
+ CONFIGURABLE_PROSE_SCOPES,
479
+ CONFIGURED_PATTERN_MAX_LENGTH,
480
+ CONFIGURED_PROSE_FLAGS,
481
+ DECISION_RECORD_CITATION_ID,
482
+ DECISION_RECORD_CITATION_SCOPES,
483
+ DEFAULT_PROSE_RULE_SET,
484
+ DEFAULT_PROSE_RULES,
485
+ decisionRecordCitationPattern,
486
+ decisionRecordCitationRule,
487
+ groupOfScope,
488
+ RESOLVABLE_SCOPES,
489
+ RETIRED_SCOPES,
490
+ resolveProseRules,
491
+ rulesForGroup,
492
+ rulesOfGroup
493
+ } from './prose-rules'
494
+ export type {
495
+ CustomProseRule,
496
+ DefaultProseRule,
497
+ ProseCheckGroup,
498
+ ProseRuleOverride,
499
+ ProseRuleSet,
500
+ ProseRuleSeverity,
501
+ ProseRuleSeveritySetting,
502
+ ProseRulesConfig,
503
+ ResolvedProseRule
504
+ } from './prose-rules'
431
505
  export { checkLocalAnchorCoverage } from './local-anchor-coverage'
432
506
  export type {
433
507
  AnchorCoverageFinding,
@@ -436,7 +510,8 @@ export type {
436
510
  LocalAnchorCoverageOptions,
437
511
  LocalAnchorCoverageResult
438
512
  } from './local-anchor-coverage'
439
- export { checkDispatchReadiness } from './dispatch-gate'
513
+ export { checkDispatchReadiness, siblingsSharingConflictEdge } from './dispatch-gate'
514
+ export type { ConflictEdgeParty } from './dispatch-gate'
440
515
  export type {
441
516
  DispatchBlocker,
442
517
  DispatchBlockerClass,
@@ -455,7 +530,7 @@ export { isNewDiskStateFile } from './no-disk-state'
455
530
  export type { DiskStateFileStatus } from './no-disk-state'
456
531
  export { checkDirectMainPush } from './direct-main-push'
457
532
  export type { DirectMainPushFact, DirectMainPushResult } from './direct-main-push'
458
- export { checkMainBranchRefusal } from './main-branch-refusal'
533
+ export { checkMainBranchRefusal, resolveDefaultBranch } from './main-branch-refusal'
459
534
  export type { MainBranchRefusalFinding, MainBranchRefusalReason } from './main-branch-refusal'
460
535
  export { ensureLabelExists, LABEL_COLOR } from './ensure-label'
461
536
  export type { LabelExistenceIo } from './ensure-label'
@@ -563,8 +638,17 @@ export { decideIssueAssignment } from './issue-assignment'
563
638
  export type { IssueAssignmentDecision, IssueAssignmentInput } from './issue-assignment'
564
639
  export { locateTestPlanSection } from './test-plan-section'
565
640
  export type { TestPlanSection } from './test-plan-section'
641
+ export {
642
+ carryLiveRecord,
643
+ type LiveRecordEntry,
644
+ type LiveRecordLine,
645
+ readLiveRecord,
646
+ renderLiveRecordBlock,
647
+ renderLiveRecordLine,
648
+ withLiveRecord
649
+ } from './live-record'
566
650
  export { evaluateTestPlanGate } from './test-plan-gate'
567
- export type { TestPlanGateResult, TestPlanGateVerdict } from './test-plan-gate'
651
+ export type { LiveGateInputs, TestPlanGateResult, TestPlanGateVerdict } from './test-plan-gate'
568
652
  export {
569
653
  AEG_BLOCKED_LABEL,
570
654
  buildBranchName,
@@ -630,6 +714,7 @@ export {
630
714
  parseSummaryConfidenceRows,
631
715
  PUBLISHED_MARKER_LINE,
632
716
  reconstructRounds,
717
+ recordDeveloperAttempt,
633
718
  renderPhaseBreakdown,
634
719
  renderPublishedMarker,
635
720
  renderTaskBudgetDetail,
@@ -838,3 +923,5 @@ export type {
838
923
  TransitionInput,
839
924
  TransitionRecord
840
925
  } from './control-store'
926
+
927
+ export { isProtectedAdminPath, normalizeTouchedPath, PROTECTED_ADMIN_PATHS } from './protected-paths'