@attalabs/vinaya 0.31.0 → 0.33.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 (212) hide show
  1. package/README.md +2 -3
  2. package/aeg-root/contracts/principal-operator.md +18 -5
  3. package/aeg-root/roles/developer/reference.md +3 -3
  4. package/aeg-root/roles/operator.md +69 -16
  5. package/aeg-root/roles/planner/reference.md +1 -1
  6. package/aeg-root/roles/tranche-archivist.md +1 -0
  7. package/aeg-root/skills/aeg-context-packets/SKILL.md +1 -1
  8. package/aeg-root/skills/aeg-context-packets/examples/operator-start.md +1 -1
  9. package/aeg-root/templates/pr-report-template.md +7 -2
  10. package/dist/checks/bin/check-body-bare-digits.js +340 -101
  11. package/dist/checks/bin/check-branch-topology.js +184 -105
  12. package/dist/checks/bin/check-brief-shape.js +333 -94
  13. package/dist/checks/bin/check-changeset-coverage.js +1028 -248
  14. package/dist/checks/bin/check-ci-shard-coverage.js +82 -0
  15. package/dist/checks/bin/check-closes-n.js +184 -105
  16. package/dist/checks/bin/check-coherence.js +345 -145
  17. package/dist/checks/bin/check-dead-branch-push.js +179 -59
  18. package/dist/checks/bin/check-dispatch-readiness.js +350 -150
  19. package/dist/checks/bin/check-doc-coverage-push.js +1011 -231
  20. package/dist/checks/bin/check-doc-coverage.js +1015 -235
  21. package/dist/checks/bin/check-doctrine-no-procedures.js +333 -94
  22. package/dist/checks/bin/check-doctrine-portability.js +1013 -233
  23. package/dist/checks/bin/check-evidence-fresh.js +1010 -222
  24. package/dist/checks/bin/check-exec-bits.js +1009 -229
  25. package/dist/checks/bin/check-first-push-dispatch.js +343 -145
  26. package/dist/checks/bin/check-issue-assignment.js +186 -107
  27. package/dist/checks/bin/check-issue-milestone-attach.js +176 -56
  28. package/dist/checks/bin/check-issue-objectives-numbering.js +176 -56
  29. package/dist/checks/bin/check-issue-parts-coverage.js +176 -56
  30. package/dist/checks/bin/check-issue-surface-globs.js +363 -143
  31. package/dist/checks/bin/check-issue-title-grammar.js +176 -56
  32. package/dist/checks/bin/check-issue-tranche-label.js +176 -56
  33. package/dist/checks/bin/check-main-branch-refusal.js +176 -56
  34. package/dist/checks/bin/check-no-disk-state.js +176 -56
  35. package/dist/checks/bin/check-pr-premise-reassert.js +333 -92
  36. package/dist/checks/bin/check-pr-report-density.js +176 -56
  37. package/dist/checks/bin/check-principal-test-plan-wait.js +176 -54
  38. package/dist/checks/bin/check-quoted-command.js +999 -217
  39. package/dist/checks/bin/check-reader-resolvable-prose.js +1011 -229
  40. package/dist/checks/bin/check-registry-gates.js +186 -56
  41. package/dist/checks/bin/check-retired-vocabulary.js +997 -215
  42. package/dist/checks/bin/check-review-gate.js +403 -203
  43. package/dist/checks/bin/check-single-plan-pr.js +176 -56
  44. package/dist/checks/bin/check-surface-scope.js +184 -105
  45. package/dist/checks/bin/check-test-plan.js +176 -54
  46. package/dist/checks/bin/check-token-collection-wired.js +182 -57
  47. package/dist/checks/bin/check-token-report.js +178 -58
  48. package/dist/checks/bin/check-workspace-escape.js +1011 -229
  49. package/dist/index.js +5971 -3489
  50. package/dist/lib/pre-push-cache-test-run.js +4431 -0
  51. package/dist/lib/pre-push-select-tests.js +799 -110
  52. package/package.json +3 -2
  53. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/actions.ts +10 -12
  54. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/anchored-region.ts +5 -5
  55. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/archive-task.ts +42 -17
  56. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/baseline-capture.ts +1 -2
  57. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/branch-topology-gate.ts +3 -3
  58. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-render.ts +554 -95
  59. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/brief-validation.ts +264 -44
  60. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/claude-code-transcript.ts +9 -9
  61. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/coherence-checks.ts +211 -30
  62. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/consumer-enumeration.ts +2 -2
  63. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/index.ts +75 -0
  64. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/local.ts +961 -0
  65. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/migration.ts +212 -0
  66. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/outcomes.ts +135 -0
  67. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/control-store/records.ts +394 -0
  68. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dead-branch-push-audit.ts +1 -2
  69. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dead-branch-push-guard.ts +1 -1
  70. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/derive-section7.ts +2 -2
  71. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/assess-round.ts +514 -0
  72. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/fakes.ts +110 -0
  73. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/index.ts +27 -0
  74. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/journal-reconstruction.ts +123 -0
  75. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/render-summary.ts +27 -0
  76. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dev-review-loop/types.ts +240 -0
  77. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/diagram-model.ts +1 -1
  78. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/direct-main-push.ts +1 -2
  79. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/dispatch-gate.ts +65 -22
  80. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-claim.ts +238 -0
  81. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doc-owners.ts +14 -1
  82. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/docs-coherence.ts +1 -1
  83. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/legacy-anchors.ts +1 -1
  84. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/node-route.ts +1 -1
  85. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/docs/surfaced-manifest.ts +1 -1
  86. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-no-procedures.ts +1 -1
  87. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/doctrine-portability.ts +5 -5
  88. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ensure-label.ts +1 -1
  89. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/first-push-dispatch-gate.ts +1 -1
  90. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/gate-audience.ts +14 -3
  91. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/index.ts +379 -11
  92. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-assignment.ts +3 -4
  93. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/issue-validation.ts +1450 -33
  94. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/leftover-detection.ts +1 -2
  95. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/local-anchor-coverage.ts +2 -2
  96. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/envelope.ts +119 -0
  97. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/index.ts +75 -0
  98. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/redact.ts +87 -0
  99. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/schema.ts +801 -0
  100. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/log/store.ts +373 -0
  101. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/main-branch-refusal.ts +2 -2
  102. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/metering-io-guard.ts +1 -1
  103. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/milestone-validation.ts +2 -3
  104. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/no-disk-state.ts +2 -2
  105. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/objectives.ts +288 -0
  106. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/parse-token-report.ts +3 -3
  107. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/parse-tranche.ts +1 -1
  108. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-report-density.ts +30 -16
  109. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/pr-tier.ts +17 -1
  110. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/premise-check.ts +1 -1
  111. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/quoted-command.ts +1 -1
  112. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/reader-resolvable-prose.ts +267 -19
  113. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-checks.ts +91 -24
  114. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/registry-scaffold.ts +6 -6
  115. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/report-tokens.ts +4 -4
  116. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-gate.ts +239 -110
  117. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-input-manifest.ts +384 -0
  118. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-policy.ts +184 -0
  119. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/review-status.ts +65 -18
  120. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/ruling-ordinal.ts +76 -0
  121. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/single-plan-pr.ts +4 -4
  122. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/state-machine-model.ts +40 -27
  123. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/symbol-collisions.ts +2 -2
  124. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-branch-identity.ts +38 -0
  125. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/task-tools.ts +488 -0
  126. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-gate.ts +7 -9
  127. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/test-plan-section.ts +5 -5
  128. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/types.ts +4 -4
  129. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/verdict-extraction.ts +314 -56
  130. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/waiver-label.ts +2 -3
  131. package/studio-standalone/_node_modules/@attalabs/aeg-core/src/workspace-escape.ts +3 -3
  132. package/studio-standalone/apps/vinaya-studio/web/.next/BUILD_ID +1 -1
  133. package/studio-standalone/apps/vinaya-studio/web/.next/build-manifest.json +3 -3
  134. package/studio-standalone/apps/vinaya-studio/web/.next/prerender-manifest.json +3 -3
  135. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.html +1 -1
  136. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.rsc +1 -1
  137. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  138. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  139. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  140. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  141. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  142. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page/server-reference-manifest.json +2 -2
  143. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  144. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  145. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js +1 -1
  146. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/api/coherence/route.js.nft.json +1 -1
  147. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page/server-reference-manifest.json +2 -2
  148. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page.js.nft.json +1 -1
  149. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/page_client-reference-manifest.js +1 -1
  150. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page/server-reference-manifest.json +2 -2
  151. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js +1 -1
  152. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page.js.nft.json +1 -1
  153. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/backlog/page_client-reference-manifest.js +1 -1
  154. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page/server-reference-manifest.json +2 -2
  155. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js +1 -1
  156. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page.js.nft.json +1 -1
  157. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/page_client-reference-manifest.js +1 -1
  158. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page/server-reference-manifest.json +2 -2
  159. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js +1 -1
  160. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page.js.nft.json +1 -1
  161. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/page_client-reference-manifest.js +1 -1
  162. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page/server-reference-manifest.json +3 -3
  163. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js +2 -2
  164. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page.js.nft.json +1 -1
  165. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/page_client-reference-manifest.js +1 -1
  166. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page/server-reference-manifest.json +2 -2
  167. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js +1 -1
  168. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page.js.nft.json +1 -1
  169. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/[name]/tranches/[slug]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  170. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page/server-reference-manifest.json +2 -2
  171. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js +1 -1
  172. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page.js.nft.json +1 -1
  173. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/projects/page_client-reference-manifest.js +1 -1
  174. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page/server-reference-manifest.json +2 -2
  175. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js +1 -1
  176. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page.js.nft.json +1 -1
  177. package/studio-standalone/apps/vinaya-studio/web/.next/server/app/studio/tranches/page_client-reference-manifest.js +1 -1
  178. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/{[externals]__1agj1ww._.js → [externals]__0cki-x_._.js} +2 -2
  179. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/[root-of-the-server]__02a-3g8._.js +6 -6
  180. 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
  181. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__074w9nf._.js +3 -0
  182. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0ls23oh._.js +1 -1
  183. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__0r7e54g._.js → [root-of-the-server]__18paley._.js} +1 -1
  184. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1gjqmhq._.js +1 -1
  185. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__1wc4-ip._.js +1 -1
  186. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/{[root-of-the-server]__1r47dr7._.js → _08onyya._.js} +3 -3
  187. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_096f46i._.js +1 -1
  188. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0af2one._.js +1 -1
  189. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0e5tkdd._.js +1 -1
  190. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0kf2g72._.js +1 -1
  191. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0y1jv16._.js +1 -1
  192. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_0zf4d27._.js +1 -1
  193. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1-wo68i._.js +1 -1
  194. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_15gdg48._.js +5 -5
  195. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/_1achbh9._.js +1 -1
  196. 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
  197. package/studio-standalone/apps/vinaya-studio/web/.next/server/middleware-build-manifest.js +3 -3
  198. package/studio-standalone/apps/vinaya-studio/web/.next/server/pages/500.html +1 -1
  199. package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.js +1 -1
  200. package/studio-standalone/apps/vinaya-studio/web/.next/server/server-reference-manifest.json +4 -4
  201. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/0bjnj-5fy4e7l.js +1 -0
  202. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{1dc2_-c_gavj1.js → 1ce2dj27_cgbj.js} +4 -4
  203. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/{3xg6-flovrcx-.js → 22s44f5k3ecmj.js} +1 -1
  204. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/34hhdtbp20krb.js +1 -0
  205. package/studio-standalone/apps/vinaya-studio/web/package.json +2 -2
  206. package/studio-standalone/apps/vinaya-studio/web/.next/server/chunks/ssr/[root-of-the-server]__0hstap0._.js +0 -3
  207. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/2t_rfsztmwu6y.js +0 -1
  208. package/studio-standalone/apps/vinaya-studio/web/.next/static/chunks/3ua4rm5f-a9k6.js +0 -1
  209. /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/aeg-core}/bin/verify-coherence.ts +0 -0
  210. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → vl7QVqELe1AQ-9kaOd9mR}/_buildManifest.js +0 -0
  211. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → vl7QVqELe1AQ-9kaOd9mR}/_clientMiddlewareManifest.js +0 -0
  212. /package/studio-standalone/apps/vinaya-studio/web/.next/static/{e8XbZ2vlVz40KzHmlqhwP → vl7QVqELe1AQ-9kaOd9mR}/_ssgManifest.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@attalabs/vinaya",
3
- "version": "0.31.0",
3
+ "version": "0.33.0",
4
4
  "description": "Vinaya — Agentic Engineering Harness. Deterministic checks every AI coding agent must satisfy before merge.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -8,7 +8,8 @@
8
8
  "bin": {
9
9
  "vinaya": "./dist/index.js",
10
10
  "vinaya-select-tests": "./dist/lib/pre-push-select-tests.js",
11
- "vinaya-changed-files": "./dist/lib/pre-push-changed-files.js"
11
+ "vinaya-changed-files": "./dist/lib/pre-push-changed-files.js",
12
+ "vinaya-cache-test-run": "./dist/lib/pre-push-cache-test-run.js"
12
13
  },
13
14
  "files": [
14
15
  "dist",
@@ -4,7 +4,7 @@
4
4
  * Pure data, zero I/O, zero imports beyond the type itself — same discipline
5
5
  * as `waiver-label.ts`.
6
6
  *
7
- * Two consumers read this one list (Issue #505): G3's "no seventh way into
7
+ * Two consumers read this one list: G3's "no seventh way into
8
8
  * GitHub" completeness story (`registry-checks.ts`) targets the
9
9
  * `crosses: 'into-github'` subset against `enforcement.md`'s Ring-0 gate rows;
10
10
  * task 506's DiagramModel places each action both inside a ring-0 gate (as a
@@ -12,16 +12,15 @@
12
12
  * hand-off). One list, so an `ACTIONS.length`-driven diagram edge count and
13
13
  * G3's crossing list can never drift apart.
14
14
  *
15
- * The set is 11 distinct actions: the 6 crossings named in Issue #505 plus 5
16
- * seam-only actions (4 original, plus `create-the-milestone`,
17
- * vinaya-milestone-model-v1 task 2). Two of the six contract seams are already
15
+ * The set is 11 distinct actions: 6 real crossings plus 5
16
+ * seam-only actions (4 original, plus `create-the-milestone`). Two of the six contract seams are already
18
17
  * accomplished by a GitHub crossing (the Planner→Brief seam's carrier is the
19
18
  * Issue body, created by `create-a-task-issue`; the Developer→Reviewer seam's
20
19
  * carrier is the PR, created by `open-a-pull-request`), so they get no
21
20
  * duplicate id — inventing one would give two ids for one real act and break
22
21
  * any `ACTIONS.length`-driven edge count.
23
22
  *
24
- * `crosses` is factually per-action, not a mirror of Issue #505's prose:
23
+ * `crosses` is factually per-action, not a mirror of a rationale's prose:
25
24
  * `commit-the-work` is `'none'` because `git commit` never leaves the local
26
25
  * machine — it is `git push` (`publish-the-branch`) that reaches the
27
26
  * GitHub-hosted remote. `enforcement.md`'s own Ring-0 table lists them as
@@ -29,7 +28,7 @@
29
28
  * reason..
30
29
  *
31
30
  * The only valid `performedBy` values are the 9 `role_id`s under
32
- * `aeg-root/roles/*.md` (task 2, #522) — asserted by the real-file test.
31
+ * `aeg-root/roles/*.md` — asserted by the real-file test.
33
32
  */
34
33
 
35
34
  export type ActionCrossing = 'into-github' | 'none'
@@ -105,10 +104,10 @@ export const ACTIONS: Action[] = [
105
104
  id: 'author-the-brief',
106
105
  label: 'author the brief',
107
106
  crosses: 'none',
108
- performedBy: ['brief-author'],
107
+ performedBy: ['planner'],
109
108
  summary: 'Ever started a task with no clear idea of what "done" means?',
110
109
  description:
111
- 'Turning one intent into instructions someone can execute: what to build, what is out of scope, and what done means.'
110
+ 'Dispatching one intent as instructions someone can execute: what to build, what is out of scope, and what done means.'
112
111
  },
113
112
  {
114
113
  id: 'produce-the-verdict',
@@ -143,8 +142,7 @@ export const ACTIONS: Action[] = [
143
142
  // reason `post-provenance-comment`/`produce-the-verdict` are 'none'
144
143
  // despite writing PR comments via the API. `vinaya milestone create`
145
144
  // is a manually-invoked CLI command with no Ring-0 hook intercepting a
146
- // raw bypass, so it stays seam-only here (vinaya-milestone-model-v1
147
- // task 2).
145
+ // raw bypass, so it stays seam-only here.
148
146
  crosses: 'none',
149
147
  performedBy: ['architect'],
150
148
  summary: 'Ever had a Milestone whose title quietly became the only place a version lived?',
@@ -154,8 +152,8 @@ export const ACTIONS: Action[] = [
154
152
  ]
155
153
 
156
154
  // A stable keyword per into-github action that must appear (case-insensitive)
157
- // in some real Ring-0 gate row's action text — the "feeds G3" tripwire from
158
- // Issue #505. If enforcement.md ever drops the gate row backing a crossing,
155
+ // in some real Ring-0 gate row's action text — the "feeds G3" tripwire.
156
+ // If enforcement.md ever drops the gate row backing a crossing,
159
157
  // the corresponding assertion fails. grant-a-waiver's keyword is
160
158
  // `pull request`: granting a waiver is an act on a pull request (labeling it),
161
159
  // honored at the Ring-0 PR-creation/editing gate and refused-from-agents at
@@ -1,5 +1,5 @@
1
1
  /**
2
- * AEG anchored-region grammar (aeg-governance-hardening task 30, #393). Pure —
2
+ * AEG anchored-region grammar. Pure —
3
3
  * no `fs`, no `gh`/`git`.
4
4
  *
5
5
  * One anchor syntax for every gate-read field: an HTML comment pair
@@ -7,8 +7,8 @@
7
7
  * field's one canonical home inside a PR/Issue body. HTML comments render
8
8
  * invisibly on the forge, survive inside `<details>` blocks, and can never be
9
9
  * produced accidentally by freeform prose — which is exactly the failure class
10
- * this closes (PR #392's pasted reference brief duplicated its own Test Plan
11
- * inside the PR body; #363/#377 were the same shape as real bugs).
10
+ * this closes (a real pasted reference brief duplicated its own Test Plan
11
+ * inside the PR body; other real PRs hit the same shape of bug).
12
12
  *
13
13
  * Recognition semantics, shared by every consumer
14
14
  * (`pr-tier.ts`, `test-plan-section.ts`, `premise-check.ts`,
@@ -31,7 +31,7 @@
31
31
  * - **Markers inside fenced code blocks or inline code spans do not count**
32
32
  * — example/quoted anchor syntax in documentation or evidence output is
33
33
  * never mistaken for a real anchor (same code-stripping philosophy as
34
- * `archive-task.ts`'s `stripCode`, #311 regression).
34
+ * `archive-task.ts`'s `stripCode`, after a real regression).
35
35
  *
36
36
  * The field line/block goes on its own line(s) INSIDE the pair — e.g.
37
37
  *
@@ -52,7 +52,7 @@
52
52
  import { maskCode } from '@attalabs/aeg-forge-state/strip-code'
53
53
 
54
54
  /**
55
- * The seven gate-read fields with an anchored home. `TOKENS` (task 5, #378)
55
+ * The seven gate-read fields with an anchored home. `TOKENS`
56
56
  * joined here rather than through a second, parallel field list —
57
57
  * `pr-report.ts`'s own `AEG:TOKENS:START`/`:END` markers already use this
58
58
  * exact grammar, so the registry is the fix, not a workaround beside it.
@@ -1,6 +1,5 @@
1
1
  /**
2
- * Post-merge Archivist provenance assembly (aeg-governance-hardening
3
- * task 5d, #309). Pure — no `fs`, no `fetch`, no `process.env`. The CLI shim
2
+ * Post-merge Archivist provenance assembly. Pure — no `fs`, no `fetch`, no `process.env`. The CLI shim
4
3
  * (`bin/archive-task.ts`) resolves the merged PR via `gh`, gathers
5
4
  * `MergedPrFacts`, and calls these functions.
6
5
  *
@@ -9,13 +8,14 @@
9
8
  * froze — the PR body, PR metadata, or PR comments. A field whose source
10
9
  * fact is absent becomes a DANGLING entry, never an inferred or defaulted
11
10
  * value. Field/heading shapes below mirror the live provenance comments
12
- * posted by hand on PRs #302/#305/#306.
11
+ * posted by hand on real PRs.
13
12
  */
14
13
 
15
14
  import { hasLabel } from '@attalabs/aeg-forge-state'
16
15
  import { type AnchorField, anchoredRegion, stripCode } from './anchored-region'
17
16
  import { headerRegion } from './brief-validation'
18
17
  import { readTierFromPrBody } from './pr-tier'
18
+ import { parseTaskBranchIdentity } from './task-branch-identity'
19
19
  import { extractCodeReviewVerdict, extractSecurityReviewVerdict } from './verdict-extraction'
20
20
 
21
21
  export type MergedPrFacts = {
@@ -25,12 +25,22 @@ export type MergedPrFacts = {
25
25
  mergedAt: string
26
26
  mergeSha: string
27
27
  comments: string[]
28
+ /**
29
+ * The task Issue's frozen `aeg:brief:v1` comment URL (`dispatchTask`) —
30
+ * the brief's permanent home now that it no
31
+ * longer lives in this PR body at all. `null` when the CLI shim
32
+ * (`bin/archive-task.ts`) could not resolve one — no Issue to close, no
33
+ * `aeg:brief:v1` comment on it (a pre-cutover task, or one dispatched by
34
+ * hand), or the lookup itself failed — never defaulted to a guess.
35
+ * Optional so a caller assembling `MergedPrFacts` without this task's
36
+ * change still type-checks; `buildProvenanceBlock` treats an absent field
37
+ * exactly like an explicit `null`.
38
+ */
39
+ briefCommentUrl?: string | null
28
40
  }
29
41
 
30
- const TASK_BRANCH_PATTERN = /^task\/([^/]+)\/([^/]+)$/
31
-
32
42
  /**
33
- * null when headRefName is not task/<tranche>/<taskId>.
43
+ * null when headRefName is not task/<tranche>/<taskId> or task/issue-<n>.
34
44
  *
35
45
  * This is ONE of two independent eligibility signals for provenance —
36
46
  * the branch-name pattern — not the only one. A PR that closes a
@@ -45,11 +55,18 @@ const TASK_BRANCH_PATTERN = /^task\/([^/]+)\/([^/]+)$/
45
55
  * the sole gate. (Confirmed gap: a task whose Issue carried a
46
56
  * `vinaya/tranche:*` label was closed by a `fix/*`-branch PR;
47
57
  * branch-name-only detection silently skipped provenance forever.)
58
+ *
59
+ * `tranche: null` for a backlog Issue's `task/issue-<n>` branch —
60
+ * `taskId` is the Issue number itself, so this signal alone
61
+ * makes a backlog task's PR eligible for provenance, with no
62
+ * `vinaya/tranche:*` label needed at all.
48
63
  */
49
- export function taskRefFromBranch(branch: string): { tranche: string; taskId: string } | null {
50
- const m = branch.match(TASK_BRANCH_PATTERN)
51
- if (!m) return null
52
- return { tranche: m[1] as string, taskId: m[2] as string }
64
+ export function taskRefFromBranch(branch: string): { tranche: string | null; taskId: string } | null {
65
+ const ref = parseTaskBranchIdentity(branch)
66
+ if (!ref) return null
67
+ return ref.kind === 'issue'
68
+ ? { tranche: null, taskId: String(ref.issueNumber) }
69
+ : { tranche: ref.tranche, taskId: ref.taskId }
53
70
  }
54
71
 
55
72
  /**
@@ -60,7 +77,7 @@ export function taskRefFromBranch(branch: string): { tranche: string; taskId: st
60
77
  * or the closed Issue's own labels carry an `vinaya/tranche:*` tag.
61
78
  */
62
79
  export function isEligibleForProvenance(
63
- ref: { tranche: string; taskId: string } | null,
80
+ ref: { tranche: string | null; taskId: string } | null,
64
81
  issueLabels: string[]
65
82
  ): boolean {
66
83
  if (ref !== null) return true
@@ -79,7 +96,7 @@ export function hasProvenance(comments: string[]): boolean {
79
96
  * searched ONLY in the header region (shared with `brief-validation.ts`'s
80
97
  * gate — gate and archivist read the same region, so a body that passes the
81
98
  * gate can't produce a DANGLING field here). Whole-body scanning is the
82
- * regression from #311's first live run, where a prose sentence *about* the
99
+ * regression from a real first live run, where a prose sentence *about* the
83
100
  * `Ticket:` field in a later section was extracted as the field's value.
84
101
  *
85
102
  * When `anchor` is given and the body carries that anchor pair
@@ -106,7 +123,7 @@ function closesRefs(text: string): number[] {
106
123
  * falling back to the first anywhere in the body (flagged, not lost). Extras
107
124
  * are scanned body-wide so a real second closing reference in prose is still
108
125
  * flagged — but always fence-stripped, so example text like a Test Plan's
109
- * `Closes #123` fixture never counts (#311 regression).
126
+ * `Closes #NNN` fixture never counts (a real regression).
110
127
  *
111
128
  * When the body carries an `AEG:CLOSES` anchor pair (`anchored-region.ts`,
112
129
  * task 30), the pair replaces the header block as the canonical placement:
@@ -122,8 +139,8 @@ export function extractIssue(body: string): { issue: number | null; extraIssues:
122
139
  // GitHub *does* auto-close it) but looks like a bare 4-space indented code
123
140
  // block once sliced, so stripping the region blanked the reference and
124
141
  // returned `issue: null` — the Issue then goes unclosed on merge, the exact
125
- // stranding this PR exists to eliminate, reintroduced along the over-strip
126
- // axis (PR #617 review MAJOR). Stripping first also subsumes the decoy
142
+ // stranding this exists to eliminate, reintroduced along the over-strip
143
+ // axis (a MAJOR review finding). Stripping first also subsumes the decoy
127
144
  // protection rather than trading against it: `AEG:*` markers are HTML
128
145
  // comments and survive the strip, while a decoy anchor inside code does not
129
146
  // survive to be sliced in the first place.
@@ -169,6 +186,10 @@ export function buildProvenanceBlock(facts: MergedPrFacts): {
169
186
  const tier = readTierFromPrBody(facts.body)
170
187
  if (tier === null) dangling.push('no `Tier:` field found in PR body — Tier field is DANGLING')
171
188
 
189
+ if (issue !== null && (facts.briefCommentUrl ?? null) === null) {
190
+ dangling.push(`no \`aeg:brief:v1\` comment resolved for Issue #${issue} — Brief field is DANGLING`)
191
+ }
192
+
172
193
  const project = extractField(facts.body, 'Project(?:\\(s\\))?', 'PROJECT')
173
194
  if (!project) dangling.push('no `Project:` field found in PR body — Project(s) field is DANGLING')
174
195
 
@@ -183,13 +204,17 @@ export function buildProvenanceBlock(facts: MergedPrFacts): {
183
204
 
184
205
  const ticket = extractField(facts.body, 'Ticket') ?? 'none'
185
206
 
186
- const taskLabel = ref ? `task ${ref.taskId} (tranche ${ref.tranche})` : `task (branch ${facts.headRefName})`
207
+ const taskLabel = ref
208
+ ? ref.tranche !== null
209
+ ? `task ${ref.taskId} (tranche ${ref.tranche})`
210
+ : `task (backlog Issue #${ref.taskId})`
211
+ : `task (branch ${facts.headRefName})`
187
212
 
188
213
  const lines = [
189
214
  `${PROVENANCE_HEADING} — ${taskLabel}`,
190
215
  `- Issue: ${issue !== null ? `#${issue} (closed by merge)` : 'DANGLING — no Closes #N in PR body'}`,
191
216
  `- Tier: ${tier !== null ? tier : 'DANGLING — no Tier field in PR body'}`,
192
- '- Brief: in this PR body (the frozen intent)',
217
+ `- Brief: ${facts.briefCommentUrl ?? 'DANGLING — no aeg:brief:v1 comment resolved for this task'}`,
193
218
  `- Project(s): ${project ?? 'DANGLING — no Project field in PR body'}`,
194
219
  `- Model/agent: ${forField ?? 'DANGLING — no For field in PR body'}`,
195
220
  `- Code review: ${codeReview.value}`,
@@ -1,6 +1,5 @@
1
1
  /**
2
- * Finding-count baseline capture + comparison (aeg-governance-hardening task
3
- * 11, #324). Pure — does not run `verify-docs.ts`/`verify-coherence.ts`
2
+ * Finding-count baseline capture + comparison. Pure — does not run `verify-docs.ts`/`verify-coherence.ts`
4
3
  * itself and never calls `Date.now()` (a pure `src/` module cannot — see
5
4
  * `packages/aeg-core/CLAUDE.md`-equivalent constraint, this repo's is the
6
5
  * Workflow-script rule of the same shape). The CLI shim runs those tools,
@@ -1,10 +1,10 @@
1
1
  import type { Tranche } from './types'
2
2
 
3
3
  /**
4
- * Branch↔topology gate (aeg-governance-hardening task 32, #399). Pure — no
4
+ * Branch↔topology gate. Pure — no
5
5
  * `fs`, no shell-outs. The CLI shim (`bin/check-branch-topology.ts`) derives
6
- * the tranche from the forge (`@attalabs/aeg-forge-state`, task
7
- * aeg-forge-state-v1 3a) and passes the result (or `null` when no tranche
6
+ * the tranche from the forge (`@attalabs/aeg-forge-state`)
7
+ * and passes the result (or `null` when no tranche
8
8
  * data could be derived) in here.
9
9
  *
10
10
  * Closes the logic fork: `.husky/pre-push` used to answer "does this