@attalabs/vinaya 0.32.0 → 0.34.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 (218) hide show
  1. package/README.md +1 -1
  2. package/aeg-root/contracts/principal-operator.md +18 -5
  3. package/aeg-root/enforcement.md +1 -1
  4. package/aeg-root/glossary.md +4 -0
  5. package/aeg-root/roles/developer.md +3 -0
  6. package/aeg-root/roles/operator.md +89 -16
  7. package/aeg-root/roles/planner/reference.md +3 -2
  8. package/aeg-root/roles/planner.md +3 -1
  9. package/aeg-root/roles/tranche-archivist.md +1 -0
  10. package/aeg-root/skills/aeg-context-packets/SKILL.md +1 -1
  11. package/aeg-root/skills/aeg-context-packets/examples/operator-start.md +1 -1
  12. package/aeg-root/templates/brief-template.md +9 -7
  13. package/aeg-root/templates/pr-report-template.md +3 -1
  14. package/dist/checks/bin/check-body-bare-digits.js +213 -41
  15. package/dist/checks/bin/check-branch-topology.js +164 -41
  16. package/dist/checks/bin/check-brief-shape.js +219 -46
  17. package/dist/checks/bin/check-changeset-coverage.js +669 -152
  18. package/dist/checks/bin/check-closes-n.js +164 -41
  19. package/dist/checks/bin/check-coherence.js +220 -43
  20. package/dist/checks/bin/check-dead-branch-push.js +159 -40
  21. package/dist/checks/bin/check-dispatch-readiness.js +218 -42
  22. package/dist/checks/bin/check-doc-coverage-push.js +665 -148
  23. package/dist/checks/bin/check-doc-coverage.js +667 -150
  24. package/dist/checks/bin/check-doctrine-no-procedures.js +213 -41
  25. package/dist/checks/bin/check-doctrine-portability.js +666 -149
  26. package/dist/checks/bin/check-evidence-fresh.js +643 -125
  27. package/dist/checks/bin/check-exec-bits.js +663 -146
  28. package/dist/checks/bin/check-first-push-dispatch.js +218 -42
  29. package/dist/checks/bin/check-issue-assignment.js +164 -41
  30. package/dist/checks/bin/check-issue-milestone-attach.js +159 -40
  31. package/dist/checks/bin/check-issue-objectives-numbering.js +685 -41
  32. package/dist/checks/bin/check-issue-parts-coverage.js +159 -40
  33. package/dist/checks/bin/check-issue-surface-globs.js +258 -48
  34. package/dist/checks/bin/check-issue-title-grammar.js +159 -40
  35. package/dist/checks/bin/check-issue-tranche-label.js +159 -40
  36. package/dist/checks/bin/check-main-branch-refusal.js +159 -40
  37. package/dist/checks/bin/check-no-disk-state.js +159 -40
  38. package/dist/checks/bin/check-pr-premise-reassert.js +213 -41
  39. package/dist/checks/bin/check-pr-report-density.js +159 -40
  40. package/dist/checks/bin/check-principal-test-plan-wait.js +159 -40
  41. package/dist/checks/bin/check-quoted-command.js +586 -103
  42. package/dist/checks/bin/check-reader-resolvable-prose.js +637 -111
  43. package/dist/checks/bin/check-registry-gates.js +159 -40
  44. package/dist/checks/bin/check-retired-vocabulary.js +586 -103
  45. package/dist/checks/bin/check-review-gate.js +284 -152
  46. package/dist/checks/bin/check-single-plan-pr.js +159 -40
  47. package/dist/checks/bin/check-surface-scope.js +164 -41
  48. package/dist/checks/bin/check-test-plan.js +159 -40
  49. package/dist/checks/bin/check-token-collection-wired.js +159 -40
  50. package/dist/checks/bin/check-token-report.js +159 -40
  51. package/dist/checks/bin/check-workspace-escape.js +664 -147
  52. package/dist/index.js +3932 -1118
  53. package/dist/lib/pre-push-cache-test-run.js +507 -72
  54. package/dist/lib/pre-push-select-tests.js +136 -13
  55. package/package.json +1 -1
  56. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/actions.ts +10 -12
  57. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/anchored-region.ts +5 -5
  58. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/archive-task.ts +42 -17
  59. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/baseline-capture.ts +1 -2
  60. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/branch-topology-gate.ts +3 -3
  61. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +554 -95
  62. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +264 -44
  63. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/claude-code-transcript.ts +9 -9
  64. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/coherence-checks.ts +211 -30
  65. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/consumer-enumeration.ts +2 -2
  66. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/index.ts +75 -0
  67. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/local.ts +961 -0
  68. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/migration.ts +222 -0
  69. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/outcomes.ts +135 -0
  70. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/records.ts +394 -0
  71. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dead-branch-push-audit.ts +1 -2
  72. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dead-branch-push-guard.ts +1 -1
  73. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/derive-section7.ts +2 -2
  74. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +514 -0
  75. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/fakes.ts +110 -0
  76. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +30 -0
  77. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/journal-reconstruction.ts +219 -0
  78. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +97 -0
  79. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +240 -0
  80. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/diagram-model.ts +1 -1
  81. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/direct-main-push.ts +1 -2
  82. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dispatch-gate.ts +65 -22
  83. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-claim.ts +238 -0
  84. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-owners.ts +14 -1
  85. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/docs-coherence.ts +1 -1
  86. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/legacy-anchors.ts +1 -1
  87. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/node-route.ts +1 -1
  88. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/surfaced-manifest.ts +1 -1
  89. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-no-procedures.ts +1 -1
  90. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-portability.ts +5 -5
  91. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ensure-label.ts +1 -1
  92. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/first-push-dispatch-gate.ts +1 -1
  93. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-audience.ts +14 -3
  94. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +425 -11
  95. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-assignment.ts +3 -4
  96. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +1450 -33
  97. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/leftover-detection.ts +1 -2
  98. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/local-anchor-coverage.ts +2 -2
  99. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +119 -0
  100. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/index.ts +75 -0
  101. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/redact.ts +87 -0
  102. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema.ts +801 -0
  103. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/store.ts +373 -0
  104. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/main-branch-refusal.ts +2 -2
  105. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/metering-io-guard.ts +1 -1
  106. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/milestone-validation.ts +2 -3
  107. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/no-disk-state.ts +2 -2
  108. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/objectives.ts +288 -0
  109. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/parse-token-report.ts +3 -3
  110. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/parse-tranche.ts +1 -1
  111. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-report-density.ts +30 -16
  112. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-tier.ts +17 -1
  113. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/premise-check.ts +1 -1
  114. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/quoted-command.ts +1 -1
  115. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +267 -19
  116. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-checks.ts +91 -24
  117. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-scaffold.ts +6 -6
  118. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/report-tokens.ts +4 -4
  119. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +254 -110
  120. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-input-manifest.ts +384 -0
  121. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +208 -0
  122. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-status.ts +80 -28
  123. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ruling-ordinal.ts +92 -0
  124. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/single-plan-pr.ts +4 -4
  125. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/state-machine-model.ts +40 -27
  126. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/symbol-collisions.ts +2 -2
  127. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-branch-identity.ts +38 -0
  128. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-phase-history.ts +194 -0
  129. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-tools.ts +712 -0
  130. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-gate.ts +7 -9
  131. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-section.ts +5 -5
  132. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/types.ts +4 -4
  133. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/verdict-extraction.ts +368 -56
  134. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/waiver-label.ts +2 -3
  135. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/workspace-escape.ts +3 -3
  136. package/studio-standalone/apps/vinaya-studio/web/.next/BUILD_ID +1 -1
  137. package/studio-standalone/apps/vinaya-studio/web/.next/build-manifest.json +3 -3
  138. package/studio-standalone/apps/vinaya-studio/web/.next/prerender-manifest.json +3 -3
  139. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.html +1 -1
  140. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.rsc +1 -1
  141. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  142. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  143. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  144. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  145. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  146. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
  147. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  148. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  149. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js +1 -1
  150. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.nft.json +1 -1
  151. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page/server-reference-manifest.json +2 -2
  152. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js.nft.json +1 -1
  153. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page_client-reference-manifest.js +1 -1
  154. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page/server-reference-manifest.json +2 -2
  155. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js +1 -1
  156. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js.nft.json +1 -1
  157. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page_client-reference-manifest.js +1 -1
  158. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page/server-reference-manifest.json +2 -2
  159. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js +1 -1
  160. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js.nft.json +1 -1
  161. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page_client-reference-manifest.js +1 -1
  162. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page/server-reference-manifest.json +2 -2
  163. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js +1 -1
  164. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js.nft.json +1 -1
  165. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page_client-reference-manifest.js +1 -1
  166. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page/server-reference-manifest.json +3 -3
  167. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js +2 -2
  168. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js.nft.json +1 -1
  169. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page_client-reference-manifest.js +1 -1
  170. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page/server-reference-manifest.json +2 -2
  171. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js +1 -1
  172. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js.nft.json +1 -1
  173. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  174. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page/server-reference-manifest.json +2 -2
  175. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js +1 -1
  176. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js.nft.json +1 -1
  177. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page_client-reference-manifest.js +1 -1
  178. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page/server-reference-manifest.json +2 -2
  179. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js +1 -1
  180. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js.nft.json +1 -1
  181. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page_client-reference-manifest.js +1 -1
  182. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/{[externals]__1agj1ww._.js → [externals]__0cki-x_._.js} +2 -2
  183. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[root-of-the-server]__02a-3g8._.js +6 -6
  184. 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
  185. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__074w9nf._.js +3 -0
  186. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__0r7e54g._.js → [root-of-the-server]__07uhu5z._.js} +1 -1
  187. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ls23oh._.js +1 -1
  188. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1gjqmhq._.js +1 -1
  189. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1wc4-ip._.js +1 -1
  190. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1r47dr7._.js → _08onyya._.js} +3 -3
  191. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_096f46i._.js +1 -1
  192. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0af2one._.js +1 -1
  193. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0e5tkdd._.js +1 -1
  194. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0kf2g72._.js +1 -1
  195. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0y1jv16._.js +1 -1
  196. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0zf4d27._.js +1 -1
  197. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1-wo68i._.js +1 -1
  198. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_15gdg48._.js +5 -5
  199. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1achbh9._.js +1 -1
  200. 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
  201. package/studio-standalone/apps/vinaya-studio/web/.next/server/middleware-build-manifest.js +3 -3
  202. package/studio-standalone/apps/vinaya-studio/web/.next/server/pages/500.html +1 -1
  203. package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.js +1 -1
  204. package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.json +4 -4
  205. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0bjnj-5fy4e7l.js +1 -0
  206. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0ko698wh8xx2g.css +1 -0
  207. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{1dc2_-c_gavj1.js → 0q9p7c6vn-x2w.js} +4 -4
  208. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3xg6-flovrcx-.js → 2174nz5he_oc4.js} +1 -1
  209. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3xnma0-359j17.js +1 -0
  210. package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
  211. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0hstap0._.js +0 -3
  212. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0bm4nrrzwc7zi.css +0 -1
  213. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2t_rfsztmwu6y.js +0 -1
  214. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3ua4rm5f-a9k6.js +0 -1
  215. /package/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/{aeg-core → vinaya/studio-standalone/_node_modules/@attalabs/vinaya/studio-standalone/_node_modules/@attalabs/aeg-core}/bin/verify-coherence.ts +0 -0
  216. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → HmoeqXdX1E4drt7GReFOO}/_buildManifest.js +0 -0
  217. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → HmoeqXdX1E4drt7GReFOO}/_clientMiddlewareManifest.js +0 -0
  218. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → HmoeqXdX1E4drt7GReFOO}/_ssgManifest.js +0 -0
@@ -201,8 +201,8 @@ function maskIndentedCode(body, fill) {
201
201
  var SECTION_HEADER = /\*\*Dependency rationale\*\*/i;
202
202
  var NEXT_HEADER = /\*\*[A-Z][^*]*\*\*/;
203
203
  var FIELD_LABEL = /^(Depends-on|Conflicts-with)\s*:\s*(.*)$/i;
204
- var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d+[a-z]?$/i;
205
- var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+[a-z]?)$/i;
204
+ var ID_TOKEN = /^(?:[\w.-]+\s+)?#?\d+$/i;
205
+ var SLUG_QUALIFIED_ID = /^([\w.-]+)\s+(#?\d+)$/i;
206
206
  function splitSlugQualifiedEdge(edge) {
207
207
  const m = edge.trim().match(SLUG_QUALIFIED_ID);
208
208
  if (!m)
@@ -2050,12 +2050,24 @@ function extractBaseSha(comment) {
2050
2050
  const m = firstThirteenLines(comment).match(BASE_SHA_PATTERN);
2051
2051
  return m ? m[1].toLowerCase() : null;
2052
2052
  }
2053
- var FINDING_SEVERITY_LINE = /^\d+\.\s+\[([A-Z][A-Z]*)\]\s+(.+?)\s+—/gm;
2053
+ var FINDING_DESCRIPTION_STATE = /^F(\d+)(?:\s+\S+)?(?:\s+(open|fix-claimed|reproduced|resolved))?:/;
2054
+ function parseFindingState(description) {
2055
+ const m = FINDING_DESCRIPTION_STATE.exec(description.trim());
2056
+ if (!m)
2057
+ return { id: null, state: null };
2058
+ return { id: `F${m[1]}`, state: m[2] ?? null };
2059
+ }
2060
+ var FINDING_SEVERITY_LINE = /^\d+\.\s+\[([A-Z][A-Z]*)\]\s+(.+?)\s+—(?:\s+(.*))?$/gm;
2054
2061
  function extractFindingSeverities(comment) {
2055
- return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) => ({
2056
- severity: m[1],
2057
- location: m[2]
2058
- }));
2062
+ return [...comment.matchAll(FINDING_SEVERITY_LINE)].map((m) => {
2063
+ const { id, state } = parseFindingState(m[3] ?? "");
2064
+ return {
2065
+ severity: m[1],
2066
+ location: m[2],
2067
+ id,
2068
+ state
2069
+ };
2070
+ });
2059
2071
  }
2060
2072
  function extractVerdict(comments, valuePattern, missingLabel) {
2061
2073
  const candidates = comments.filter((c) => valuePattern.test(c));
@@ -2469,6 +2481,12 @@ function evaluateReviewFindings(findings, scale, threshold) {
2469
2481
  });
2470
2482
  return { outcome: blockingFindings.length > 0 ? "blocked" : "clean", blockingFindings };
2471
2483
  }
2484
+ function isConsequentialFinding(finding) {
2485
+ return finding.state !== "resolved";
2486
+ }
2487
+ function consequentialFindings(findings) {
2488
+ return findings.filter((f) => isConsequentialFinding(f));
2489
+ }
2472
2490
  function evaluateCodeReview(findings, policy) {
2473
2491
  return evaluateReviewFindings(findings, CODE_REVIEW_SEVERITY_ORDER, policy.codeReviewThreshold);
2474
2492
  }
@@ -2605,7 +2623,7 @@ function isIssueNotFoundError(err) {
2605
2623
  return /could not resolve to an (?:issue|pull request)|\b404\b|not found/i.test(haystack);
2606
2624
  }
2607
2625
  function resolveObjectivesSource(prBody, issue, cutoverIssue) {
2608
- if (issue !== null && issue < cutoverIssue)
2626
+ if (issue !== null && cutoverIssue !== null && issue < cutoverIssue)
2609
2627
  return { kind: "none" };
2610
2628
  if (issue !== null)
2611
2629
  return { kind: "issue", issue };
@@ -2881,9 +2899,18 @@ var COMMIT_TYPES = [
2881
2899
  ];
2882
2900
  var COMMIT_TYPE_STYLE = new RegExp(`^(${COMMIT_TYPES.join("|")})(\\([a-z0-9-]+\\))?: \\S`);
2883
2901
  function checkForgeTitle(title) {
2884
- const taskStyle = /^\[[a-z0-9._-]+\] \S+ — \S/;
2902
+ const taskStyle = /^\[[a-z0-9._-]+\] \d+ — \S/;
2885
2903
  if (COMMIT_TYPE_STYLE.test(title) || taskStyle.test(title))
2886
2904
  return { status: "pass", errors: [] };
2905
+ const letteredTaskId = /^\[[a-z0-9._-]+\] (\S+) — \S/.exec(title);
2906
+ if (letteredTaskId) {
2907
+ return {
2908
+ status: "fail",
2909
+ errors: [
2910
+ `brief-validation title: "${title}" names task id \`${letteredTaskId[1]}\` — task ids are whole numbers (\`1\`, \`2\`), never lettered (\`2a\`). \`vinaya task run\` and \`task dispatch\` refuse a non-numeric id, so a plan titled this way names a task that cannot be started.`
2911
+ ]
2912
+ };
2913
+ }
2887
2914
  return {
2888
2915
  status: "fail",
2889
2916
  errors: [
@@ -2916,19 +2943,31 @@ function checkNoAgentBoxes(prBody) {
2916
2943
  ]
2917
2944
  };
2918
2945
  }
2919
- function rolloutThresholdFor(message) {
2946
+ function rolloutRuleFor(message) {
2920
2947
  if (message.startsWith("brief-validation unpinned code claim:") || message.startsWith("brief-validation commands carry output:") || message.startsWith("brief-validation consumer tests:") || message.startsWith("brief-validation defeat cases:")) {
2921
- return BRIEF_RULES_SINCE_PR;
2948
+ return "briefRules";
2922
2949
  }
2923
2950
  if (message.startsWith("brief-validation no agent boxes:"))
2924
- return AGENT_BOXES_REFUSED_SINCE_PR;
2951
+ return "agentBoxes";
2925
2952
  return null;
2926
2953
  }
2927
- function partitionBriefErrorsByRollout(errors, prNumber) {
2954
+ var DEFAULT_BRIEF_ROLLOUT_CUTOVERS = {
2955
+ briefRulesSincePr: BRIEF_RULES_SINCE_PR,
2956
+ agentBoxesRefusedSincePr: AGENT_BOXES_REFUSED_SINCE_PR
2957
+ };
2958
+ function rolloutThresholdFor(message, cutovers) {
2959
+ const rule = rolloutRuleFor(message);
2960
+ if (rule === "briefRules")
2961
+ return cutovers.briefRulesSincePr;
2962
+ if (rule === "agentBoxes")
2963
+ return cutovers.agentBoxesRefusedSincePr;
2964
+ return null;
2965
+ }
2966
+ function partitionBriefErrorsByRollout(errors, prNumber, cutovers = DEFAULT_BRIEF_ROLLOUT_CUTOVERS) {
2928
2967
  const blocking = [];
2929
2968
  const info = [];
2930
2969
  for (const e of errors) {
2931
- const threshold = rolloutThresholdFor(e);
2970
+ const threshold = rolloutThresholdFor(e, cutovers);
2932
2971
  const grandfathered = threshold !== null && prNumber !== null && prNumber < threshold;
2933
2972
  (grandfathered ? info : blocking).push(e);
2934
2973
  }
@@ -3396,8 +3435,8 @@ function checkIssueRationale(body) {
3396
3435
  return { status: errors.length > 0 ? "fail" : "pass", errors };
3397
3436
  }
3398
3437
  var OBJECTIVES_SINCE_ISSUE = 404;
3399
- function checkIssueObjectives(body, issueNumber) {
3400
- if (issueNumber !== null && issueNumber < OBJECTIVES_SINCE_ISSUE)
3438
+ function checkIssueObjectives(body, issueNumber, sinceIssue = OBJECTIVES_SINCE_ISSUE) {
3439
+ if (sinceIssue !== null && issueNumber !== null && issueNumber < sinceIssue)
3401
3440
  return { status: "pass", errors: [] };
3402
3441
  const result = objectivesOf(body);
3403
3442
  if (result.ok)
@@ -3842,7 +3881,7 @@ function resolveDepEntry(dep, trancheSlug, issueToEntry, taskToEntry) {
3842
3881
  return issueToEntry.get(Number(issueMatch[1]));
3843
3882
  return taskToEntry.get(`${trancheSlug}/${dep}`) ?? taskToEntry.get(dep);
3844
3883
  }
3845
- function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
3884
+ function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = [], objectivesSinceIssue) {
3846
3885
  const failures = [];
3847
3886
  for (const [slug, issues] of issuesBySlug) {
3848
3887
  for (const issue of issues) {
@@ -3851,7 +3890,7 @@ function checkR1(issuesBySlug, grandfatheredIssues, registeredNames = []) {
3851
3890
  const errors = [
3852
3891
  ...checkIssueRationale(issue.body).errors,
3853
3892
  ...checkProjectsRegistered(issue.body, issue.labels, registeredNames).errors,
3854
- ...checkIssueObjectives(issue.body, issue.number).errors,
3893
+ ...checkIssueObjectives(issue.body, issue.number, objectivesSinceIssue).errors,
3855
3894
  ...checkPartsCiteDefinedObjectives(issue.body).errors
3856
3895
  ];
3857
3896
  if (errors.length === 0)
@@ -4101,8 +4140,8 @@ function checkReviewGate(input) {
4101
4140
  let codeReviewPolicyEvaluation;
4102
4141
  let securityPolicyEvaluation;
4103
4142
  try {
4104
- codeReviewPolicyEvaluation = evaluateCodeReview(codeReview.findingSeverities, policy);
4105
- securityPolicyEvaluation = evaluateSecurityReview(security.findingSeverities, policy);
4143
+ codeReviewPolicyEvaluation = evaluateCodeReview(consequentialFindings(codeReview.findingSeverities), policy);
4144
+ securityPolicyEvaluation = evaluateSecurityReview(consequentialFindings(security.findingSeverities), policy);
4106
4145
  } catch (err) {
4107
4146
  return {
4108
4147
  verdict: "fail",
@@ -4474,13 +4513,27 @@ var SHIPS_PREFIX = "aeg-root/";
4474
4513
  function shipsArchivePrefix(shipsPrefix) {
4475
4514
  return `${shipsPrefix}tranches/completed/`;
4476
4515
  }
4477
- function isSpecFile2(path) {
4478
- return path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md");
4516
+ var DEFAULT_SPEC_PATHS = ["SPEC.md", "CONTEXT.md", "docs/adr"];
4517
+ function normalizeSpecPath(entry) {
4518
+ let out = entry.replace(/\\/g, "/");
4519
+ while (out.startsWith("./"))
4520
+ out = out.slice(2);
4521
+ out = out.replace(/\/{2,}/g, "/");
4522
+ while (out.endsWith("/"))
4523
+ out = out.slice(0, -1);
4524
+ return out;
4525
+ }
4526
+ function isSpecFile2(path, specPaths) {
4527
+ if (path.startsWith("apps/") && path.includes("/specs/") && path.endsWith(".md"))
4528
+ return true;
4529
+ if (!path.endsWith(".md"))
4530
+ return false;
4531
+ return specPaths.some((entry) => isUnderOrEqual(path, normalizeSpecPath(entry)));
4479
4532
  }
4480
4533
  function isClaudeMdFile(path) {
4481
4534
  return path === "CLAUDE.md" || path.endsWith("/CLAUDE.md");
4482
4535
  }
4483
- function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX) {
4536
+ function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPrefix = SHIPS_PREFIX, specPaths = DEFAULT_SPEC_PATHS) {
4484
4537
  if (path.startsWith(shipsPrefix)) {
4485
4538
  return path.startsWith(shipsArchivePrefix(shipsPrefix)) ? "internal" : "ships";
4486
4539
  }
@@ -4489,7 +4542,7 @@ function classifyProseFile(path, readerFacingPrefix, readerFacingSuffix, shipsPr
4489
4542
  }
4490
4543
  if (isClaudeMdFile(path))
4491
4544
  return "internal";
4492
- if (isSpecFile2(path))
4545
+ if (isSpecFile2(path, specPaths))
4493
4546
  return "spec";
4494
4547
  if (isProductScopeFile(path))
4495
4548
  return "product";
@@ -4518,13 +4571,14 @@ function lineAt(content, index) {
4518
4571
  }
4519
4572
  var FORGE_NUMBER_PATTERN = /#[0-9]{2,4}/g;
4520
4573
  var TRANCHE_SLUG_VN_PATTERN = /[a-z][a-z-]+-v[0-9]/g;
4574
+ var TASK_NUMBER_PATTERN = /(^|[^a-z0-9-])(tasks?[ \t]+#?[0-9]+)/gi;
4521
4575
  function legacySlugPattern(legacySlugs) {
4522
4576
  if (legacySlugs.length === 0)
4523
4577
  return null;
4524
4578
  const alternation = legacySlugs.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
4525
4579
  return new RegExp(`(^|[^a-zA-Z0-9\\n-])(${alternation})([^a-zA-Z0-9\\n-]|$)`, "g");
4526
4580
  }
4527
- function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
4581
+ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
4528
4582
  const findings = [];
4529
4583
  const legacyPattern = legacySlugPattern(legacySlugs);
4530
4584
  const grandfathered = new Set(specGrandfather);
@@ -4536,8 +4590,12 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
4536
4590
  const productPatterns = [
4537
4591
  { pattern: TRANCHE_SLUG_VN_PATTERN, what: "an internal tranche slug in product code" }
4538
4592
  ];
4593
+ const specPatterns = [
4594
+ ...patterns,
4595
+ { pattern: TASK_NUMBER_PATTERN, what: "a task number", group: 2 }
4596
+ ];
4539
4597
  for (const file of files) {
4540
- const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix);
4598
+ const cls = classifyProseFile(file.path, readerFacingPrefix, readerFacingSuffix, shipsPrefix, specPaths);
4541
4599
  if (!cls || cls === "internal")
4542
4600
  continue;
4543
4601
  if (cls !== "product" && cls !== "spec" && !SWEPT_CLASSES.has(cls))
@@ -4546,15 +4604,16 @@ function checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuff
4546
4604
  continue;
4547
4605
  const blocking = cls === "product" || cls === "spec";
4548
4606
  const scrubbed = cls === "product" ? stripNonProseForProduct(file.path, file.content) : stripNonProse(file.path, file.content);
4549
- const patternsToRun = cls === "product" ? productPatterns : patterns;
4607
+ const patternsToRun = cls === "product" ? productPatterns : cls === "spec" ? specPatterns : patterns;
4550
4608
  for (const { pattern, what, group } of patternsToRun) {
4551
4609
  pattern.lastIndex = 0;
4552
4610
  let match = pattern.exec(scrubbed);
4553
4611
  while (match !== null) {
4554
4612
  const cited = group !== undefined ? match[group] ?? match[0] : match[0];
4613
+ const citedIndex = match.index + match[0].indexOf(cited);
4555
4614
  findings.push({
4556
4615
  file: file.path,
4557
- line: lineAt(scrubbed, match.index),
4616
+ line: lineAt(scrubbed, citedIndex),
4558
4617
  message: `references ${what} ("${cited}") a reader outside this repo's tracker cannot resolve`,
4559
4618
  blocking
4560
4619
  });
@@ -4740,9 +4799,9 @@ function checkSourceComments(files, allowlist = []) {
4740
4799
  }
4741
4800
  return findings;
4742
4801
  }
4743
- function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = []) {
4802
+ function checkReaderResolvableProse(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, legacySlugs = [], shipsPrefix = SHIPS_PREFIX, specGrandfather = [], specPaths = DEFAULT_SPEC_PATHS) {
4744
4803
  return [
4745
- ...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather),
4804
+ ...checkUnresolvableReferences(files, readerFacingPrefix, readerFacingSuffix, legacySlugs, shipsPrefix, specGrandfather, specPaths),
4746
4805
  ...checkUndefinedVocabulary(files, glossaryTerms, readerFacingPrefix, readerFacingSuffix, shipsPrefix)
4747
4806
  ];
4748
4807
  }
@@ -5183,15 +5242,32 @@ var ObservedSchema = z.object({
5183
5242
  var TaskStatusInputSchema = z.object({
5184
5243
  task: TaskToolRefSchema.optional()
5185
5244
  }).merge(PageRequestSchema).strict();
5245
+ var TaskConfidenceSchema = z.object({
5246
+ round: z.number().int().positive(),
5247
+ percent: z.number().int().min(0).max(100).nullable(),
5248
+ source: z.enum(["stated", "published-summary"])
5249
+ }).strict();
5250
+ var TaskPhaseHistorySchema = z.object({
5251
+ typicalPhaseMinutes: z.number().nonnegative(),
5252
+ typicalPhaseSamples: z.number().int().positive()
5253
+ }).strict();
5186
5254
  var TaskStatusItemSchema = z.object({
5187
5255
  task: TaskToolRefSchema,
5188
5256
  issue: z.number().int().positive(),
5189
5257
  pr: z.number().int().positive().nullable(),
5190
- state: z.string()
5258
+ state: z.string(),
5259
+ round: z.number().int().positive().nullable().optional(),
5260
+ phase: z.string().min(1).nullable().optional(),
5261
+ minutesInPhase: z.number().nonnegative().nullable().optional(),
5262
+ phaseIsCurrent: z.boolean().nullable().optional(),
5263
+ lastConfidence: TaskConfidenceSchema.nullable().optional(),
5264
+ lastConfidenceUnread: z.boolean().optional(),
5265
+ phaseHistory: TaskPhaseHistorySchema.nullable().optional()
5191
5266
  }).merge(ObservedSchema);
5192
5267
  var TaskStatusResultSchema = z.object({
5193
5268
  items: z.array(TaskStatusItemSchema),
5194
- nextCursor: z.string().nullable()
5269
+ nextCursor: z.string().nullable(),
5270
+ table: z.string()
5195
5271
  });
5196
5272
  var RequestedAuthoritySchema = z.enum(["planner", "principal", "operator", "self"]);
5197
5273
  var EscalationInputsSchema = z.object({
@@ -5199,7 +5275,7 @@ var EscalationInputsSchema = z.object({
5199
5275
  round: z.number().int().nonnegative(),
5200
5276
  head: z.string(),
5201
5277
  branch: z.string(),
5202
- prNumber: z.number().int().positive()
5278
+ prNumber: z.number().int().positive().nullable()
5203
5279
  });
5204
5280
  var EscalationEvidenceSchema = z.object({
5205
5281
  round: z.number().int().nonnegative(),
@@ -5235,13 +5311,45 @@ var TaskEscalationReadResultSchema = z.object({
5235
5311
  items: z.array(TaskEscalationPacketSchema),
5236
5312
  nextCursor: z.string().nullable()
5237
5313
  }).merge(ObservedSchema);
5238
- var TaskStartInputSchema = z.object({
5239
- tranche: z.string().min(1),
5240
- id: z.string().min(1)
5314
+ var TaskPrCheckSchema = z.object({
5315
+ name: z.string(),
5316
+ required: z.boolean(),
5317
+ status: z.string(),
5318
+ conclusion: z.string().nullable(),
5319
+ detailsUrl: z.string().nullable(),
5320
+ failureSummary: z.string().nullable()
5321
+ });
5322
+ var TaskPrVerdictSchema = z.object({
5323
+ role: z.enum(["code-review", "security"]),
5324
+ value: z.string(),
5325
+ judgedHead: z.string().nullable(),
5326
+ objectivesVersion: z.string().nullable()
5327
+ });
5328
+ var TaskPrPauseSchema = z.object({
5329
+ reason: z.string(),
5330
+ body: z.string()
5331
+ });
5332
+ var TaskPrReviewRecordSchema = z.object({
5333
+ verdicts: z.array(TaskPrVerdictSchema),
5334
+ roundMarkers: z.array(z.number().int().nonnegative()),
5335
+ summaryTable: z.string().nullable(),
5336
+ pause: TaskPrPauseSchema.nullable()
5337
+ });
5338
+ var TaskPrReadInputSchema = z.object({
5339
+ task: TaskToolRefSchema,
5340
+ pr: z.number().int().positive().optional()
5241
5341
  }).strict();
5342
+ var TaskPrReadResultSchema = z.object({
5343
+ task: TaskToolRefSchema,
5344
+ issue: z.number().int().positive(),
5345
+ pr: z.number().int().positive(),
5346
+ head: z.string().nullable(),
5347
+ checks: z.array(TaskPrCheckSchema),
5348
+ review: TaskPrReviewRecordSchema
5349
+ }).merge(ObservedSchema);
5242
5350
  var TaskStartResultSchema = z.object({
5243
5351
  requestId: z.string().min(1),
5244
- run: z.object({ tranche: z.string().min(1), id: z.string().min(1) }),
5352
+ run: TaskToolRefSchema,
5245
5353
  started: z.boolean(),
5246
5354
  startedAt: z.string(),
5247
5355
  mode: z.literal("attended")
@@ -5255,7 +5363,7 @@ var TaskCancelInputSchema = z.object({
5255
5363
  }).strict();
5256
5364
  var TaskResumeResultSchema = z.object({
5257
5365
  task: z.number().int().positive(),
5258
- pr: z.number().int().positive(),
5366
+ pr: z.number().int().positive().nullable(),
5259
5367
  escalationId: z.string().min(1),
5260
5368
  outcome: z.enum(["started", "already_resumed"]),
5261
5369
  authenticatedBy: z.string().min(1),
@@ -5264,7 +5372,7 @@ var TaskResumeResultSchema = z.object({
5264
5372
  var TaskCancelOutcomeSchema = z.enum(["confirmed", "pending", "uncertain"]);
5265
5373
  var TaskCancelResultSchema = z.object({
5266
5374
  task: z.number().int().positive(),
5267
- pr: z.number().int().positive(),
5375
+ pr: z.number().int().positive().nullable(),
5268
5376
  escalationId: z.string().min(1),
5269
5377
  outcome: TaskCancelOutcomeSchema,
5270
5378
  authenticatedBy: z.string().min(1),
@@ -5275,6 +5383,7 @@ var TASK_TOOL_NAMES = [
5275
5383
  "task_start",
5276
5384
  "task_status",
5277
5385
  "task_escalation_read",
5386
+ "task_pr_read",
5278
5387
  "task_resume",
5279
5388
  "task_cancel"
5280
5389
  ];
@@ -5502,6 +5611,14 @@ function findWorkspaceEscapes(files, knownPaths, workspaceDirs = DEFAULT_WORKSPA
5502
5611
  }
5503
5612
  return findings;
5504
5613
  }
5614
+ // ../../packages/aeg-core/src/gate-cutovers.ts
5615
+ var NO_GATE_CUTOVERS = {
5616
+ objectivesSinceIssue: null,
5617
+ briefSectionsSinceIssue: null,
5618
+ documentationSinceIssue: null,
5619
+ briefRulesSincePr: null,
5620
+ agentBoxesRefusedSincePr: null
5621
+ };
5505
5622
  // ../../packages/aeg-core/src/dev-review-loop/types.ts
5506
5623
  var SEVERITY_COLUMNS = ["blocker", "major", "minor", "critical", "high", "medium", "low"];
5507
5624
  // ../../packages/aeg-core/src/dev-review-loop/journal-reconstruction.ts
@@ -5951,6 +6068,8 @@ function attemptFromEnv(value) {
5951
6068
  function provenanceFor(input) {
5952
6069
  if (input.provenance)
5953
6070
  return input.provenance;
6071
+ if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
6072
+ return "unavailable";
5954
6073
  if (input.env.role || input.env.task)
5955
6074
  return "env_correlated";
5956
6075
  return "unavailable";
@@ -5971,7 +6090,7 @@ function buildHeader(input) {
5971
6090
  const role = isRole(input.env.role) ? input.env.role : "unattributed";
5972
6091
  const round = roundFromEnv(input.env.round);
5973
6092
  const subject = {
5974
- issue: issueFromTask(input.env.task),
6093
+ issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
5975
6094
  role,
5976
6095
  ...round !== undefined ? { round } : {},
5977
6096
  ...input.subject ?? {}
@@ -6444,7 +6563,7 @@ var COMMANDS = [
6444
6563
  details: [
6445
6564
  "Exposes the task-operator tool catalog (`packages/aeg-core/src/task-tools.ts`) to an agent runtime as one MCP server speaking newline-delimited JSON-RPC 2.0 (`initialize`/`tools/list`/`tools/call`). Claude registers it through the generated `.mcp.json`; Codex through its documented `~/.codex/config.toml` `[mcp_servers]` table — both point at this same command.",
6446
6565
  "stdout carries JSON-RPC and nothing else: any stray write from the CLI (a forge-read warning) is redirected to stderr, so the protocol stream is never corrupted.",
6447
- "`task_status`/`task_escalation_read` read; `task_start` starts a run in attended mode only, requiring an authenticated caller from the invocation context (`VINAYA_MCP_CALLER`) and refusing without one — MCP is a transport, not authorization. `task_resume`/`task_cancel` require the same authenticated caller, plus a current Principal ruling read fresh from the run's own PR — never a caller-supplied approval; `task_resume` triggers the existing `dev-review-loop --resume` continuation exactly once per escalation, and `task_cancel` reports a truthful `confirmed`/`pending`/`uncertain` outcome, idempotently, across repeated calls. No unattended start until the worker-isolation boundary and a capability flag land."
6566
+ "`task_status`/`task_escalation_read`/`task_pr_read` read; `task_pr_read` returns the selected task's OWN pull request — every required and reported check with its state, conclusion and failure summary, plus the principal-authored review record (newest verdicts and their judged head, round markers, published summary table, pause comment) — and refuses any other pull request; `task_start` starts a run in attended mode only, requiring an authenticated caller from the invocation context (`VINAYA_MCP_CALLER`) and refusing without one — MCP is a transport, not authorization. `task_resume`/`task_cancel` require the same authenticated caller, plus a current Principal ruling read fresh from the run's own PR — never a caller-supplied approval; `task_resume` triggers the existing `dev-review-loop --resume` continuation exactly once per escalation, and `task_cancel` reports a truthful `confirmed`/`pending`/`uncertain` outcome, idempotently, across repeated calls. No unattended start until the worker-isolation boundary and a capability flag land."
6448
6567
  ],
6449
6568
  status: "shipped"
6450
6569
  },
@@ -6755,6 +6874,10 @@ var COMMANDS = [
6755
6874
  flag: "--role <name>",
6756
6875
  description: "Resolve to a specific role file (roles/<name>.md) instead of the front door"
6757
6876
  },
6877
+ {
6878
+ flag: "--template <name>",
6879
+ description: "Print a template the package ships (templates/<name>-template.md) instead of the front door"
6880
+ },
6758
6881
  {
6759
6882
  flag: "--print",
6760
6883
  description: "Emit the resolved file's body (frontmatter stripped) instead of its path — the one-hop mode every generated skill and slash command invokes. A role file whose frontmatter carries an `ack-token` emits that token as the output's own first line."
@@ -7122,7 +7245,12 @@ var VinayaConfigSchema = z5.object({
7122
7245
  allowlist: z5.array(z5.string().min(1)).optional(),
7123
7246
  severity: z5.enum(["warning", "error"]).optional()
7124
7247
  }).optional(),
7125
- specGrandfather: z5.array(z5.string().min(1)).optional()
7248
+ specGrandfather: z5.array(z5.string().min(1)).optional(),
7249
+ specPaths: z5.array(z5.string().min(1).refine((entry) => !entry.startsWith("/") && !/^[A-Za-z]:/.test(entry), {
7250
+ message: "must be a repository-relative path, not an absolute one"
7251
+ }).refine((entry) => !entry.split(/[\\/]/).includes(".."), {
7252
+ message: "must stay inside the repository — no `..` segment"
7253
+ })).optional()
7126
7254
  }).optional(),
7127
7255
  projects: z5.array(ProjectEntrySchema).optional(),
7128
7256
  dispatch: z5.object({
@@ -7136,6 +7264,13 @@ var VinayaConfigSchema = z5.object({
7136
7264
  securityThreshold: z5.string().min(1).optional(),
7137
7265
  maxRounds: z5.number().optional()
7138
7266
  }).optional(),
7267
+ gateCutovers: z5.object({
7268
+ objectivesSinceIssue: z5.number().int().nonnegative().optional(),
7269
+ briefSectionsSinceIssue: z5.number().int().nonnegative().optional(),
7270
+ documentationSinceIssue: z5.number().int().nonnegative().optional(),
7271
+ briefRulesSincePr: z5.number().int().nonnegative().optional(),
7272
+ agentBoxesRefusedSincePr: z5.number().int().nonnegative().optional()
7273
+ }).optional(),
7139
7274
  prePush: z5.object({
7140
7275
  alwaysRun: z5.array(z5.string()).optional()
7141
7276
  }).optional(),
@@ -7273,6 +7408,18 @@ function resolveReviewPolicy(config) {
7273
7408
  maxRounds
7274
7409
  };
7275
7410
  }
7411
+ function resolveGateCutovers(config) {
7412
+ const raw = config?.gateCutovers;
7413
+ if (!raw)
7414
+ return NO_GATE_CUTOVERS;
7415
+ return {
7416
+ objectivesSinceIssue: raw.objectivesSinceIssue ?? null,
7417
+ briefSectionsSinceIssue: raw.briefSectionsSinceIssue ?? null,
7418
+ documentationSinceIssue: raw.documentationSinceIssue ?? null,
7419
+ briefRulesSincePr: raw.briefRulesSincePr ?? null,
7420
+ agentBoxesRefusedSincePr: raw.agentBoxesRefusedSincePr ?? null
7421
+ };
7422
+ }
7276
7423
  function resolveRuntimeDirSetting(config) {
7277
7424
  return config?.runtimeDir ?? null;
7278
7425
  }
@@ -7347,7 +7494,28 @@ function trustAnchorRepoFromRemoteUrl(url) {
7347
7494
  return m?.[1] && m[2] ? wellFormedRepoSlug(`${m[1]}/${m[2]}`) : null;
7348
7495
  }
7349
7496
  var execFileAsync4 = promisify4(execFile4);
7497
+ function resolveCiTrustAnchorProbeRef(env = process.env) {
7498
+ const ref = env.VINAYA_CI_CONFIG_PROBE_REF?.trim();
7499
+ if (!ref)
7500
+ return null;
7501
+ if (env.GITHUB_ACTIONS !== "true")
7502
+ return null;
7503
+ if ((env.GH_TOKEN ?? "").length > 0 || (env.GITHUB_TOKEN ?? "").length > 0)
7504
+ return null;
7505
+ return ref;
7506
+ }
7507
+ function readTrustAnchorConfigAtRef(ref) {
7508
+ const raw = execFileSync2("git", ["show", `${ref}:${LOCAL_CONFIG_FILENAME}`], {
7509
+ encoding: "utf-8",
7510
+ stdio: ["ignore", "pipe", "pipe"],
7511
+ timeout: 1e4
7512
+ });
7513
+ return Buffer.from(raw, "utf-8").toString("base64");
7514
+ }
7350
7515
  function ghFetchTrustAnchorConfig() {
7516
+ const probeRef = resolveCiTrustAnchorProbeRef();
7517
+ if (probeRef)
7518
+ return readTrustAnchorConfigAtRef(probeRef);
7351
7519
  const repo = trustAnchorRepo();
7352
7520
  if (!repo)
7353
7521
  throw new Error("could not resolve repo identity for the trust-anchor read");
@@ -7357,6 +7525,14 @@ function ghFetchTrustAnchorConfig() {
7357
7525
  });
7358
7526
  }
7359
7527
  async function ghFetchTrustAnchorConfigAsync() {
7528
+ const probeRef = resolveCiTrustAnchorProbeRef();
7529
+ if (probeRef) {
7530
+ const { stdout } = await execFileAsync4("git", ["show", `${probeRef}:${LOCAL_CONFIG_FILENAME}`], {
7531
+ encoding: "utf-8",
7532
+ timeout: 1e4
7533
+ });
7534
+ return Buffer.from(stdout, "utf-8").toString("base64");
7535
+ }
7360
7536
  const repo = await trustAnchorRepoAsync();
7361
7537
  if (!repo)
7362
7538
  throw new Error("could not resolve repo identity for the trust-anchor read");