@adia-ai/adia-ui-forge 0.1.3 → 0.8.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 (259) hide show
  1. package/.claude-plugin/plugin.json +3 -6
  2. package/CHANGELOG.md +27 -34
  3. package/README.md +35 -40
  4. package/agents/a2ui-engineer.md +22 -53
  5. package/agents/component-author.md +29 -0
  6. package/agents/framework-verifier.md +26 -0
  7. package/agents/release-engineer.md +21 -81
  8. package/agents/routing-corpus.json +293 -64
  9. package/bin/demo-postwrite-pattern-gate +94 -0
  10. package/bin/forge-lint +17 -2
  11. package/bin/sidecar-prewrite-guard +104 -0
  12. package/commands/deploy.md +9 -0
  13. package/commands/dogfood.md +10 -0
  14. package/commands/gen-review.md +9 -0
  15. package/commands/release.md +10 -0
  16. package/hooks/hooks.json +15 -0
  17. package/package.json +3 -6
  18. package/references/contracts/a2ui-mcp-surface.md +35 -0
  19. package/references/contracts/migration-guide-format.md +34 -0
  20. package/references/shared/content-trust.md +19 -74
  21. package/skills/adia-a2ui/SKILL.md +99 -0
  22. package/skills/{adia-ui-a2ui → adia-a2ui}/evals/routing-corpus.json +10 -10
  23. package/skills/adia-a2ui/references/anti-patterns.md +27 -0
  24. package/skills/adia-a2ui/references/chunk-authoring.md +71 -0
  25. package/skills/adia-a2ui/references/corpus-discipline.md +68 -0
  26. package/skills/adia-a2ui/references/eval-diagnostics.md +86 -0
  27. package/skills/adia-a2ui/references/format-extension-decisions.md +66 -0
  28. package/skills/adia-a2ui/references/leverage-rules.md +52 -0
  29. package/skills/adia-a2ui/references/mcp-pipeline-ops.md +83 -0
  30. package/skills/adia-a2ui/references/mcp-tool-reference.md +59 -0
  31. package/skills/adia-a2ui/references/pipeline-overview.md +115 -0
  32. package/skills/adia-a2ui/references/semantic-fail-lifting.md +74 -0
  33. package/skills/adia-a2ui/references/strategy-engines.md +109 -0
  34. package/skills/adia-a2ui/references/zettel-calibration.md +104 -0
  35. package/skills/adia-author/SKILL.md +112 -0
  36. package/skills/adia-author/evals/routing-corpus.json +222 -0
  37. package/skills/{adia-ui-authoring → adia-author}/references/anti-patterns.md +33 -4
  38. package/skills/{adia-ui-authoring → adia-author}/references/authoring-cycle.md +9 -11
  39. package/skills/adia-author/references/canonical-pattern-index.md +243 -0
  40. package/skills/{adia-ui-authoring → adia-author}/references/code-style.md +19 -21
  41. package/skills/adia-author/references/common-gotchas.md +129 -0
  42. package/skills/adia-author/references/composite-demo-protocol.md +271 -0
  43. package/skills/{adia-ui-authoring → adia-author}/references/css-patterns.md +19 -6
  44. package/skills/{adia-ui-authoring → adia-author}/references/lifecycle-patterns.md +1 -0
  45. package/skills/{adia-ui-authoring → adia-author}/references/llm-bridge.md +3 -5
  46. package/skills/{adia-ui-authoring → adia-author}/references/module-promotion.md +20 -38
  47. package/skills/{adia-ui-authoring → adia-author}/references/primitive-audit.md +2 -4
  48. package/skills/{adia-ui-authoring → adia-author}/references/shell-patterns.md +12 -18
  49. package/skills/{adia-ui-authoring → adia-author}/references/token-contract.md +5 -7
  50. package/skills/{adia-ui-authoring → adia-author}/references/worked-example.md +3 -3
  51. package/skills/{adia-ui-authoring → adia-author}/references/yaml-contract.md +3 -3
  52. package/skills/{adia-ui-authoring → adia-author}/scripts/build-canonical-pattern-index.mjs +3 -3
  53. package/skills/adia-deploy/SKILL.md +128 -0
  54. package/skills/{adia-ui-ops → adia-deploy}/references/deploy-playbooks.md +47 -30
  55. package/skills/adia-dogfood/SKILL.md +124 -0
  56. package/skills/adia-dogfood/references/admin-shell-anatomy.md +77 -0
  57. package/skills/adia-dogfood/references/app-shell-pitfalls.md +66 -0
  58. package/skills/adia-dogfood/references/card-anatomy-sweep.md +66 -0
  59. package/skills/adia-dogfood/references/html-attr-sweep.md +63 -0
  60. package/skills/adia-dogfood/references/native-leak-annotations.md +73 -0
  61. package/skills/adia-dogfood/references/visual-probe-triage.md +80 -0
  62. package/skills/{adia-ui-dogfood → adia-dogfood}/scripts/analyze.mjs +30 -14
  63. package/skills/adia-gen-review/SKILL.md +127 -0
  64. package/skills/adia-gen-review/references/corpus-html-patterns.md +279 -0
  65. package/skills/adia-gen-review/references/loop-protocol.md +216 -0
  66. package/skills/adia-gen-review/references/rubric-cosmetic.md +100 -0
  67. package/skills/adia-gen-review/references/rubric-decompose.md +101 -0
  68. package/skills/adia-gen-review/references/rubric-score.md +214 -0
  69. package/skills/{adia-ui-gen-review → adia-gen-review}/references/scores.schema.json +2 -2
  70. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-coverage-audit.mjs +4 -4
  71. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-decompose.mjs +10 -6
  72. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/gen-review-status.mjs +5 -5
  73. package/skills/{adia-ui-gen-review → adia-gen-review}/scripts/validate-cycle-scores.mjs +5 -5
  74. package/skills/adia-llm-internals/SKILL.md +77 -0
  75. package/skills/{adia-ui-llm → adia-llm-internals}/references/adapter-contract.md +4 -2
  76. package/skills/{adia-ui-llm → adia-llm-internals}/references/add-a-provider.md +4 -5
  77. package/skills/{adia-ui-llm → adia-llm-internals}/references/bridge-facade.md +10 -3
  78. package/skills/{adia-ui-llm → adia-llm-internals}/references/browser-proxy-boundary.md +1 -1
  79. package/skills/{adia-ui-llm → adia-llm-internals}/references/model-registry.md +5 -3
  80. package/skills/{adia-ui-llm → adia-llm-internals}/references/streaming-sse.md +2 -2
  81. package/skills/adia-release/SKILL.md +72 -0
  82. package/skills/adia-release/references/changelog-discipline.md +119 -0
  83. package/skills/adia-release/references/cut-procedure.md +247 -0
  84. package/skills/adia-release/references/gates-catalog.md +222 -0
  85. package/skills/adia-release/references/independent-package-release.md +52 -0
  86. package/skills/adia-release/references/migration-guide-authoring.md +86 -0
  87. package/skills/adia-release/references/notes-authoring.md +90 -0
  88. package/skills/adia-release/references/recovery-paths.md +106 -0
  89. package/skills/{adia-ui-release → adia-release}/scripts/bump.mjs +27 -2
  90. package/skills/{adia-ui-release → adia-release}/scripts/dispatch-publish.mjs +4 -1
  91. package/skills/{adia-ui-release → adia-release}/scripts/insert-stub.mjs +1 -1
  92. package/skills/{adia-ui-release → adia-release}/scripts/package-paths.mjs +6 -0
  93. package/skills/{adia-ui-release → adia-release}/scripts/promote-unreleased.mjs +1 -1
  94. package/skills/{adia-ui-release → adia-release}/scripts/release-pack.mjs +13 -21
  95. package/skills/{adia-ui-release → adia-release}/scripts/tag-lockstep.mjs +5 -1
  96. package/skills/adia-site-docs/SKILL.md +68 -0
  97. package/skills/adia-site-docs/evals/audit-report.md +30 -0
  98. package/skills/adia-site-docs/evals/routing-corpus.json +176 -0
  99. package/skills/adia-site-docs/intent.md +72 -0
  100. package/agents/README.md +0 -209
  101. package/agents/author.md +0 -56
  102. package/agents/repo-steward.md +0 -56
  103. package/agents/spec-architect.md +0 -53
  104. package/agents/tech-lead.md +0 -57
  105. package/agents/verifier.md +0 -55
  106. package/bin/lib/audit-axes.mjs +0 -555
  107. package/bin/lib/dry-run-irreversible.mjs +0 -236
  108. package/bin/lib/run-skill-evals.mjs +0 -487
  109. package/bin/lib/teach-router.mjs +0 -250
  110. package/commands/adia-forge-a2ui.md +0 -10
  111. package/commands/adia-forge-author.md +0 -10
  112. package/commands/adia-forge-dogfood.md +0 -8
  113. package/commands/adia-forge-llm.md +0 -8
  114. package/commands/adia-forge-orient.md +0 -10
  115. package/commands/adia-forge-release.md +0 -8
  116. package/commands/adia-forge-review.md +0 -10
  117. package/references/shared/pev-rationale.md +0 -64
  118. package/references/shared/skill-conventions.md +0 -133
  119. package/skills/adia-ui-a2ui/CHANGELOG.md +0 -32
  120. package/skills/adia-ui-a2ui/SKILL.md +0 -243
  121. package/skills/adia-ui-a2ui/evals/adversarial-corpus.json +0 -75
  122. package/skills/adia-ui-a2ui/evals/teach-routing-cases.json +0 -100
  123. package/skills/adia-ui-a2ui/references/anti-patterns.md +0 -24
  124. package/skills/adia-ui-a2ui/references/chunk-authoring.md +0 -88
  125. package/skills/adia-ui-a2ui/references/corpus-discipline.md +0 -56
  126. package/skills/adia-ui-a2ui/references/eval-diagnostics.md +0 -127
  127. package/skills/adia-ui-a2ui/references/fragment-graph.md +0 -91
  128. package/skills/adia-ui-a2ui/references/mcp-pipeline-ops.md +0 -106
  129. package/skills/adia-ui-a2ui/references/mcp-tool-reference.md +0 -398
  130. package/skills/adia-ui-a2ui/references/pipeline-overview.md +0 -175
  131. package/skills/adia-ui-a2ui/references/semantic-fail-lifting.md +0 -120
  132. package/skills/adia-ui-a2ui/references/strategy-engines.md +0 -111
  133. package/skills/adia-ui-a2ui/references/teach-protocol.md +0 -220
  134. package/skills/adia-ui-a2ui/references/zettel-calibration.md +0 -93
  135. package/skills/adia-ui-a2ui/scripts/audit-a2ui-roster.mjs +0 -96
  136. package/skills/adia-ui-a2ui/scripts/teach-route.mjs +0 -157
  137. package/skills/adia-ui-a2ui/skill.json +0 -38
  138. package/skills/adia-ui-authoring/CHANGELOG.md +0 -32
  139. package/skills/adia-ui-authoring/SKILL.md +0 -256
  140. package/skills/adia-ui-authoring/assets/case-studies/admin-shell-decomposition.md +0 -101
  141. package/skills/adia-ui-authoring/assets/case-studies/maxtokens-32768-discovery.md +0 -109
  142. package/skills/adia-ui-authoring/assets/case-studies/theme-panel-promotion.md +0 -113
  143. package/skills/adia-ui-authoring/evals/adversarial-design-plan-gates.json +0 -138
  144. package/skills/adia-ui-authoring/evals/routing-corpus.json +0 -245
  145. package/skills/adia-ui-authoring/references/canonical-pattern-index.md +0 -179
  146. package/skills/adia-ui-authoring/references/common-gotchas.md +0 -93
  147. package/skills/adia-ui-authoring/references/composite-demo-protocol.md +0 -1084
  148. package/skills/adia-ui-authoring/references/teach-protocol.md +0 -428
  149. package/skills/adia-ui-authoring/scripts/audit-authoring-roster.mjs +0 -148
  150. package/skills/adia-ui-authoring/skill.json +0 -45
  151. package/skills/adia-ui-dogfood/CHANGELOG.md +0 -17
  152. package/skills/adia-ui-dogfood/README.md +0 -62
  153. package/skills/adia-ui-dogfood/SKILL.md +0 -866
  154. package/skills/adia-ui-dogfood/skill.json +0 -40
  155. package/skills/adia-ui-forge/SKILL.md +0 -88
  156. package/skills/adia-ui-forge/evals/routing-corpus.json +0 -30
  157. package/skills/adia-ui-gen-review/CHANGELOG.md +0 -108
  158. package/skills/adia-ui-gen-review/SKILL.md +0 -266
  159. package/skills/adia-ui-gen-review/references/loop-protocol.md +0 -712
  160. package/skills/adia-ui-gen-review/references/rubric-cosmetic.md +0 -144
  161. package/skills/adia-ui-gen-review/references/rubric-decompose.md +0 -117
  162. package/skills/adia-ui-gen-review/references/rubric-score.md +0 -249
  163. package/skills/adia-ui-gen-review/references/teach-protocol.md +0 -214
  164. package/skills/adia-ui-gen-review/skill.json +0 -23
  165. package/skills/adia-ui-llm/CHANGELOG.md +0 -25
  166. package/skills/adia-ui-llm/SKILL.md +0 -165
  167. package/skills/adia-ui-llm/evals/adversarial-corpus.json +0 -75
  168. package/skills/adia-ui-llm/evals/routing-corpus.json +0 -30
  169. package/skills/adia-ui-llm/evals/teach-routing-cases.json +0 -73
  170. package/skills/adia-ui-llm/references/teach-protocol.md +0 -78
  171. package/skills/adia-ui-llm/scripts/audit-llm-roster.mjs +0 -93
  172. package/skills/adia-ui-llm/scripts/teach-route.mjs +0 -119
  173. package/skills/adia-ui-llm/skill.json +0 -33
  174. package/skills/adia-ui-ops/CHANGELOG.md +0 -291
  175. package/skills/adia-ui-ops/SKILL.md +0 -401
  176. package/skills/adia-ui-ops/references/INDEX.md +0 -158
  177. package/skills/adia-ui-ops/references/audit-cadence.md +0 -263
  178. package/skills/adia-ui-ops/references/audit-patterns/archive-link-sweep.md +0 -96
  179. package/skills/adia-ui-ops/references/audit-patterns/audit-history-ledger.md +0 -162
  180. package/skills/adia-ui-ops/references/audit-patterns/browser-bundle-node-imports.md +0 -154
  181. package/skills/adia-ui-ops/references/audit-patterns/changelog-unreleased-bloat.md +0 -75
  182. package/skills/adia-ui-ops/references/audit-patterns/coverage-gaps.md +0 -187
  183. package/skills/adia-ui-ops/references/audit-patterns/entry-file-coverage.md +0 -122
  184. package/skills/adia-ui-ops/references/audit-patterns/format-hygiene.md +0 -217
  185. package/skills/adia-ui-ops/references/audit-patterns/lockstep-versioning.md +0 -113
  186. package/skills/adia-ui-ops/references/audit-patterns/memory-fragmentation.md +0 -180
  187. package/skills/adia-ui-ops/references/audit-patterns/orphan-detection.md +0 -202
  188. package/skills/adia-ui-ops/references/audit-patterns/pointer-validation.md +0 -180
  189. package/skills/adia-ui-ops/references/audit-patterns/redundancy-detection.md +0 -210
  190. package/skills/adia-ui-ops/references/audit-patterns/spec-dating-sweep.md +0 -91
  191. package/skills/adia-ui-ops/references/audit-patterns/stale-content.md +0 -182
  192. package/skills/adia-ui-ops/references/audit-patterns/staleness-tooling.md +0 -156
  193. package/skills/adia-ui-ops/references/audit-patterns/token-waste-detection.md +0 -196
  194. package/skills/adia-ui-ops/references/doc-types/adr-pattern.md +0 -210
  195. package/skills/adia-ui-ops/references/doc-types/architecture-md.md +0 -190
  196. package/skills/adia-ui-ops/references/doc-types/changelog.md +0 -183
  197. package/skills/adia-ui-ops/references/doc-types/decisions-log.md +0 -146
  198. package/skills/adia-ui-ops/references/doc-types/plan-roadmap.md +0 -182
  199. package/skills/adia-ui-ops/references/doc-types/postmortem-pattern.md +0 -206
  200. package/skills/adia-ui-ops/references/genres/prose-and-writing.md +0 -149
  201. package/skills/adia-ui-ops/references/guidance/context-budget.md +0 -137
  202. package/skills/adia-ui-ops/references/guidance/llm-doc-writing.md +0 -116
  203. package/skills/adia-ui-ops/references/guidance/reliability-dial.md +0 -186
  204. package/skills/adia-ui-ops/references/recipes/adr-introduction.md +0 -211
  205. package/skills/adia-ui-ops/references/recipes/audit-existing-repo.md +0 -234
  206. package/skills/adia-ui-ops/references/recipes/cold-start-harvest.md +0 -263
  207. package/skills/adia-ui-ops/references/recipes/concurrent-learnings-merge.md +0 -158
  208. package/skills/adia-ui-ops/references/recipes/continuous-learning-loop.md +0 -169
  209. package/skills/adia-ui-ops/references/recipes/external-reference-verification.md +0 -158
  210. package/skills/adia-ui-ops/references/recipes/findings-index-readout.md +0 -126
  211. package/skills/adia-ui-ops/references/recipes/greenfield-setup.md +0 -252
  212. package/skills/adia-ui-ops/references/recipes/harvest-repo-brain.md +0 -169
  213. package/skills/adia-ui-ops/references/recipes/import-repo-brain-harvest.md +0 -153
  214. package/skills/adia-ui-ops/references/recipes/memory-organization.md +0 -182
  215. package/skills/adia-ui-ops/references/recipes/recommend-then-validate.md +0 -199
  216. package/skills/adia-ui-ops/references/recipes/self-healing-hooks.md +0 -366
  217. package/skills/adia-ui-ops/references/recipes/skill-stewardship-loop.md +0 -113
  218. package/skills/adia-ui-ops/references/standards/agents-md-spec.md +0 -138
  219. package/skills/adia-ui-ops/references/standards/claude-md-convention.md +0 -123
  220. package/skills/adia-ui-ops/references/standards/cross-tool-matrix.md +0 -85
  221. package/skills/adia-ui-ops/references/standards/readme-conventions.md +0 -232
  222. package/skills/adia-ui-ops/references/teach-protocol.md +0 -215
  223. package/skills/adia-ui-ops/scripts/audit-ops-roster.mjs +0 -104
  224. package/skills/adia-ui-ops/skill.json +0 -65
  225. package/skills/adia-ui-release/CHANGELOG.md +0 -66
  226. package/skills/adia-ui-release/SKILL.md +0 -323
  227. package/skills/adia-ui-release/assets/case-studies/2026-05-20-batch-push-v0.6.14-v0.6.15.md +0 -144
  228. package/skills/adia-ui-release/assets/case-studies/2026-05-20-corpus-drift-remediation-v0.6.15.md +0 -155
  229. package/skills/adia-ui-release/assets/case-studies/2026-05-20-version-skip-correction-v0.6.12.md +0 -114
  230. package/skills/adia-ui-release/assets/case-studies/2026-05-21-author-from-scratch-v0.6.18.md +0 -139
  231. package/skills/adia-ui-release/assets/case-studies/2026-05-21-feedback37-retraction-v0.6.21.md +0 -124
  232. package/skills/adia-ui-release/assets/case-studies/2026-05-21-fn1-enrichment-pass-v0.6.19.md +0 -125
  233. package/skills/adia-ui-release/assets/case-studies/2026-05-21-stale-test-detection-v0.6.20.md +0 -142
  234. package/skills/adia-ui-release/assets/case-studies/2026-05-23-freshness-gate-recovery-v0.6.32.md +0 -97
  235. package/skills/adia-ui-release/assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md +0 -147
  236. package/skills/adia-ui-release/assets/templates/stub-changelog.template.md +0 -22
  237. package/skills/adia-ui-release/evals/evals.json +0 -164
  238. package/skills/adia-ui-release/references/changelog-discipline.md +0 -250
  239. package/skills/adia-ui-release/references/cycle-happy-path.md +0 -520
  240. package/skills/adia-ui-release/references/exe-deploy.md +0 -149
  241. package/skills/adia-ui-release/references/gates-catalog.md +0 -778
  242. package/skills/adia-ui-release/references/independent-package-release.md +0 -129
  243. package/skills/adia-ui-release/references/ledger-discipline.md +0 -232
  244. package/skills/adia-ui-release/references/migration-guide-authoring.md +0 -174
  245. package/skills/adia-ui-release/references/multi-agent-baseline.md +0 -207
  246. package/skills/adia-ui-release/references/notes-authoring.md +0 -212
  247. package/skills/adia-ui-release/references/recovery-paths.md +0 -262
  248. package/skills/adia-ui-release/references/rollup-notes.md +0 -208
  249. package/skills/adia-ui-release/references/teach-protocol.md +0 -468
  250. package/skills/adia-ui-release/scripts/audit-gate-roster.mjs +0 -196
  251. package/skills/adia-ui-release/scripts/make-ledger.mjs +0 -200
  252. package/skills/adia-ui-release/skill.json +0 -77
  253. package/skills/dogfood-sweep/CHANGELOG.md +0 -37
  254. package/skills/dogfood-sweep/README.md +0 -105
  255. package/skills/dogfood-sweep/SKILL.md +0 -1000
  256. package/skills/dogfood-sweep/analyze.mjs +0 -600
  257. package/skills/dogfood-sweep/skill.json +0 -31
  258. /package/skills/{adia-ui-authoring → adia-author}/references/api-contract.md +0 -0
  259. /package/skills/{adia-ui-release → adia-release}/scripts/assert-monorepo-root.mjs +0 -0
@@ -1,520 +0,0 @@
1
- # `cycle-happy-path.md` — the standard 12-step release cycle
2
-
3
- > Loaded by **mode 1 (Cut & ship)** and **mode 3 (Deploy handoff)**. Cross-references: `multi-agent-baseline.md` (peer-in-flight classification), `gates-catalog.md` (pre-flight gate roster), `changelog-discipline.md` (F-N1 enrichment), `exe-deploy.md` (site deploy).
4
-
5
- > **Worked example — the @adia-ai monorepo's 9-package lockstep.** The concrete gate names, the 9 package paths, the `ui-kit.exe.xyz` deploy, and the npm-workflow specifics below are **the worked example** of the portable release discipline, drawn from the @adia-ai (`@adia-ai/*`) lockstep monorepo. The DISCIPLINE generalizes to any @adia-ai-style lockstep monorepo (re-baseline → classify peer-in-flight → pre-flight gates → changelog promotion → bump → cut → tag → release trip-wire → push → publish → notes → ledger). When you cut a _different_ lockstep monorepo, keep the step skeleton and substitute its own package set, gate roster, and deploy target. `$REPO` below = the monorepo root.
6
-
7
- This is the canonical 12-step happy-path cycle. It applies to any PATCH cut in a lockstep line, with two entry-point variants:
8
-
9
- - **§Variant A — Deploy handoff** (mode 3): peer pre-cut the release commit + CHANGELOG + bump + lockfile. You re-baseline, verify, tag, push, publish.
10
- - **§Variant B — Author from scratch** (mode 2): peer landed source changes under `## [Unreleased]` but did not bump or cut. You do the promotion, bump, lockfile, then re-enter the standard cycle.
11
-
12
- Both variants converge at **Step 5 (Tag at HEAD)**.
13
-
14
- ---
15
-
16
- ## §The 12 steps
17
-
18
- | Step | Action | Mutates? |
19
- | --- | --- | --- |
20
- | 1 | Re-baseline (git status + log + fetch + check for peer notes) | No |
21
- | 2 | Classify peer-in-flight files; stash strays if needed | Yes (stash) |
22
- | 3 | Run pre-flight gates | No |
23
- | 4 | (Variant B only) Promote `[Unreleased]` → `[vX.Y.Z] — DATE`; bump; lockfile | Yes |
24
- | 5 | Stage release allowlist; create release commit | Yes |
25
- | 5.5 | Pre-commit verification trip-wire (re-verify staged state) | No |
26
- | 6 | Tag umbrella `vX.Y.Z` + per-package tags at HEAD | Yes |
27
- | 7 | Run the release trip-wire (F-N1, `check:release --all-pending`); enrich CHANGELOGs if warns | Yes if warns |
28
- | 8 | Push `main` + all tags | Yes (push) |
29
- | 9 | Dispatch the publish workflows; wait for completion | Yes (publish) |
30
- | 10 | Create the GH releases; build + deploy site | Yes (deploy) |
31
- | 11 | Write the audit-history ledger; commit + push | Yes |
32
- | 12 | **Author release notes** (single-version via `notes-authoring.md`, or rollup if recent gap) and surface to operator for copy-paste | No |
33
-
34
- ---
35
-
36
- ## §Step 1 — Re-baseline (every turn)
37
-
38
- The multi-agent baseline assumption is non-negotiable. Your context is stale at the start of every turn. Run these unconditionally:
39
-
40
- ```bash
41
- git -C "$REPO" branch --show-current # MUST be main
42
- git -C "$REPO" status --short
43
- git -C "$REPO" log --oneline -8
44
- git -C "$REPO" fetch && git -C "$REPO" log HEAD..origin/main --oneline
45
- ```
46
-
47
- > **`branch --show-current` MUST be `main` before cutting.** Peers in a shared clone sometimes check out local feature branches; the session "Current branch: main" snapshot is from the _prior_ session. Cutting on a feature branch silently breaks the push (stale `main` ref pushed, tags ahead of main). Full recovery: `multi-agent-baseline.md` § Wrong-branch recovery.
48
-
49
- Also check:
50
-
51
- ```bash
52
- # Current package versions (all should match — confirms lockstep state)
53
- grep -h '"version"' packages/web-components/package.json \
54
- packages/web-modules/package.json packages/a2ui/validator/package.json
55
-
56
- # Existing tags for this version (must NOT exist before this cycle)
57
- git tag --list 'v0.X.Y' '*-v0.X.Y'
58
-
59
- # Peer prep note?
60
- ls -la .brain/notes/ | grep "v0.X.Y-release-prep"
61
- ```
62
-
63
- Classify the situation. The triage table in `SKILL.md` § Where are you starting from is the routing input. If multiple unpushed `release(*): vN.M.X` commits exist, this is a **batch push** — bail out to mode 4 (`recovery-paths.md` § Scenario 2 — batch push).
64
-
65
- ---
66
-
67
- ## §Step 2 — Classify peer-in-flight files
68
-
69
- `git status --short` will likely show files you didn't author. Apply the discipline in `multi-agent-baseline.md`:
70
-
71
- - **Identify** every modified / untracked file.
72
- - **Diff** any file whose intent you can't tell from filename.
73
- - **Classify** each as: yours · peer-in-flight (release-relevant) · peer-in-flight (ticket lane / journal / skill — exclude) · unknown.
74
- - **Stash** any file that's release-relevant but uncommitted + undocumented + contradicts the release CHANGELOG. (See the `admin-shell.tokens.css` saga in `multi-agent-baseline.md` § Discipline 4 as the canonical example.) The stash preserves the work for the peer; staging it silently is destructive.
75
-
76
- The stash command pattern:
77
-
78
- ```bash
79
- git -C "$REPO" stash push <file1> <file2> -m "vX.Y.Z-cycle: <reason> — parked"
80
- ```
81
-
82
- Confirm working tree is now sane:
83
-
84
- ```bash
85
- git -C "$REPO" status --short
86
- ```
87
-
88
- After the cycle completes (Step 11+), `git stash pop` to restore the peer files. Note the stash in the audit-history ledger.
89
-
90
- ---
91
-
92
- ## §Step 3 — Pre-flight gates
93
-
94
- ### §Step 3.0 — Harvest preamble (when source content changed)
95
-
96
- **Before running the gates,** check whether source content changed in the release window. If yes, regenerate downstream artifacts proactively — otherwise the freshness gates will catch the drift reactively (and force a tag-move recovery, see `../assets/case-studies/2026-05-23-freshness-gate-recovery-v0.6.32.md`).
97
-
98
- Source-content signals that warrant a harvest preamble:
99
-
100
- - `git diff <prev-tag>..HEAD --name-only` shows changes to:
101
- - `packages/web-components/components/**/*.yaml` or `*.a2ui.json`
102
- - `apps/**/*.contents.html` or `playgrounds/**/*.contents.html`
103
- - `catalog/**/*.contents.html` or `catalog/**/index.html`
104
- - `site/pages/**/*.html` with `data-chunk-*` annotations
105
- - The release window contains a "status:stable sweep" / "anatomy sweep" / "data-property sweep" / "data-chunk-\* sweep" — all are yaml/HTML touches that propagate to the chunk corpus.
106
-
107
- If any of those land, run the **four-deliverable preamble** — every output below must land in the release commit even when the same file paths are peer-in-flight in the working tree:
108
-
109
- ```bash
110
- node scripts/build/components.mjs # → catalog-a2ui_0_9.{json,_rules.txt} + per-component .a2ui.json sidecars
111
- npm run harvest # full harvest (yaml + composition + chunks)
112
- # or for chunk-only changes:
113
- npm run harvest:chunks # site/pages + apps + playgrounds + catalog → chunk corpus
114
- npm run build:embeddings:chunks # embedding index (e.g. OpenAI text-embedding-3-small)
115
- npm run build:bundles # dist/*.min.{css,js} (web-components + shells + everything)
116
- ```
117
-
118
- Then stage the regenerated artifacts (full list — `packages/a2ui/corpus/chunks/`, `packages/a2ui/corpus/chunk-embeddings.json`, `packages/a2ui/corpus/catalog-a2ui_0_9.json`, `packages/a2ui/corpus/catalog-a2ui_0_9_rules.txt`, `packages/web-components/dist/`, `packages/web-modules/dist/`) into the release commit. Add a CHANGELOG note to `@adia-ai/a2ui-corpus [vX.Y.Z]` describing the regen.
119
-
120
- **⚠️ Regen-output supersedes-WT contract** — the regen output **always** lands in the release commit, even when the same file paths are also peer-in-flight in the working tree. Peer's uncommitted catalog / chunk / bundle modifications are SUPERSEDED by the fresh regen. Stage the regenerated paths into the release-commit allowlist UNCONDITIONALLY (see §Step 5 allowlist convention below + §Step 5.5 verification trip-wire). Peer can rebase any divergent work on top of the release commit after the cycle. Canonical incident: `../assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md`.
121
-
122
- The preamble is OPTIONAL when the release window is purely docs/skills/CHANGELOG. Run the preamble freshness checks anyway — they're cheap and confirm nothing drifted.
123
-
124
- ### §Step 3.1 — The full gate roster
125
-
126
- **Every gate in the roster MUST run. A selective subset = pre-flight failure.** This is a hard rule. A commit message claiming "verification: green" without enumerating the full roster is incomplete. The canonical failure: a release commit that ran 7 of the documented gates — `check:embeddings-fresh` failure surfaced 1d post-cut and required a tag-move recovery (see `../assets/case-studies/2026-05-23-freshness-gate-recovery-v0.6.32.md`).
127
-
128
- The @adia-ai monorepo's roster (the worked example) is:
129
-
130
- ```bash
131
- node scripts/build/components.mjs --verify # 1. yaml ↔ .a2ui.json ↔ .d.ts coherence
132
- npm run verify:traits # 2. trait coverage
133
- npm run check:lockstep # 3. all packages at same version
134
- npm run test:unit # 4. full vitest suite
135
- npm run typecheck # 5. tsc --noEmit
136
- npm run check:demo-shells # 6. demo .html imports cover composes:
137
- npm run check:lightningcss-build # 7. CSS files minify
138
- npm run check:css-bundles-fresh # 8. dist CSS bundles match source
139
- npm run check:js-bundles-fresh # 9. dist JS bundles match source
140
- npm run smoke:engines # 10. gen-UI engine smoke
141
- npm run smoke:register-engine # 11. register-engine
142
- npm run verify:corpus # 12. 0 errors (warnings carried forward)
143
- npm run check:chunks-fresh # 13. corpus captured_at vs source fragments
144
- npm run check:embeddings-fresh # 14. chunk-embeddings.json mtime vs chunks/_index.json
145
- npm run check:links # 15. intra-repo link integrity
146
- npm run eval:diff -- --engine zettel # 16. cov ≥ 5%, avg ≥ 85 (floors)
147
- npm run dogfood:status # 17. aggregate dogfood audits — exit-1 on P0/P1
148
- ```
149
-
150
- Full gate roster + failure recovery: `gates-catalog.md`.
151
-
152
- The dogfood-status gate is a thin aggregator over the component-authoring dogfood audits (itself composed into `npm run check`). The release-cut signal it gates is specifically the P0/P1 floor — P2/P3 findings are advisory and don't block the cut.
153
-
154
- If `check:embeddings-fresh` FAILS — the corpus chunks changed but the embedding index didn't regenerate. **Run** `npm run build:embeddings:chunks`. Then add a note to the a2ui-corpus CHANGELOG `[vX.Y.Z]` entry about the regen. Canonical example: `../assets/case-studies/2026-05-20-corpus-drift-remediation-v0.6.15.md`.
155
-
156
- If `check:css-bundles-fresh` FAILS — the source CSS changed but the rolled-up CDN bundles weren't regenerated. **Run** `npm run build:bundle-css`. Then re-stage `packages/web-components/dist/` + `packages/web-modules/dist/` into the release commit. The bundles ship as part of the tarball + serve via the CDN automatically. Consumers reach them via `@adia-ai/web-components/css/bundled` and `@adia-ai/web-modules/shell/admin-shell/bundled` (plus `chat/` / `editor/` / `simple/` variants).
157
-
158
- If `check:js-bundles-fresh` FAILS — the source JS changed but the rolled-up CDN JS bundles weren't regenerated. **Run** `npm run build:bundle-js`. Then re-stage `packages/web-components/dist/` + `packages/web-modules/dist/` into the release commit. The bundler emits the JS entry points (web-components/index.js, the shells, and web-modules/index.js → everything.min.js). CDN consumers reach them via `@adia-ai/web-modules/everything` (kitchen-sink) or `@adia-ai/web-components/js/bundled` (primitives only). One bundle path per page — mixing causes `customElements.define` dup-name errors.
159
-
160
- Shorthand: `npm run build:bundles` runs both CSS + JS together.
161
-
162
- If `check:demo-shells` FAILS at a release-commit candidate — the new primitive's demos may not import a newly-added composes-dep. **Do not tag at that commit.** Either fix the demo .html files (Mode 2 path) or extend the release window to include the fix commit. Canonical example: `../assets/case-studies/2026-05-21-author-from-scratch-v0.6.18.md`.
163
-
164
- ---
165
-
166
- ## §Step 4 — (Variant B only) Promote, bump, lockfile
167
-
168
- Skip if peer pre-cut the release commit (Variant A).
169
-
170
- For **Variant B (author from scratch)**:
171
-
172
- **4a. Promote `[Unreleased]` blocks to `[vX.Y.Z] — YYYY-MM-DD`.**
173
-
174
- The Keep-a-Changelog discipline: every CHANGELOG that has `## [Unreleased]` content gets its heading renamed to `## [vX.Y.Z] — YYYY-MM-DD`. The content under it stays.
175
-
176
- Across the packages, typically:
177
-
178
- - 2–3 have substantive `[Unreleased]` content (web-components, web-modules, sometimes a2ui-corpus).
179
- - The rest have nothing — author a stub block (see `../assets/templates/stub-changelog.template.md`).
180
-
181
- For substantive packages with `[Unreleased]`: the heading swap is the simplest case (`## [Unreleased]` → `## [vX.Y.Z] — YYYY-MM-DD`); see `changelog-discipline.md` § Promotion for the exact text-edit pattern.
182
-
183
- For packages with NO `[Unreleased]` block but with source changes (e.g. a2ui-corpus when only the catalog regenerated): **add a fresh `## [vX.Y.Z]` block** describing what generated content changed. Stale "no source changes" stubs on packages that DID change are an F-N1 diff-coverage warn waiting to happen.
184
-
185
- For packages with NO source changes: insert the lockstep stub (`promote-unreleased.mjs` and `insert-stub.mjs` automate this).
186
-
187
- **4b. Bump package versions.**
188
-
189
- > **PATCH vs MINOR — operator convention.** MINOR (`0.X.0`) is reserved for **API-surface breaks ONLY**: a removed or renamed prop, attribute, slot, or component (cf. `stat-ui`→`stat` rename; avatar `name` + chart `aspect`/`heading` removed). **Everything else stays PATCH** — including _visible behavior changes_: default spacing/radius re-scaling, register changes, token-shadowing reverts with no public-API change, new opt-in features. A CHANGELOG bullet annotated `(MINOR behavior change)` is **descriptive prose, not a semver directive** — do NOT stop to surface it or bump MINOR for it. Only stop for an actual removed/renamed API symbol. Range bump (`^0.X.0`→`^0.Y.0`) happens on MINOR only — see §ReleaseInvariant 2 (PATCH-cut asymmetry).
190
-
191
- Use `bump.mjs --from 0.X.Y --to 0.X.Z`. Note: `bump.mjs` bumps `"version"` fields only; on a **MINOR** cut the internal `@adia-ai/*` `^ranges` must be bumped separately (text-preserving regex on the `@adia-ai/*` dependency lines).
192
-
193
- **4c. Regenerate the lockfile.**
194
-
195
- ```bash
196
- npm install --package-lock-only --no-audit --no-fund
197
- ```
198
-
199
- **4d. Confirm lockstep.**
200
-
201
- ```bash
202
- npm run check:lockstep
203
- # Expected: [lockstep] OK — all packages at 0.X.Z, all internal ranges at ^0.X.0
204
- ```
205
-
206
- ---
207
-
208
- ## §Step 5 — Stage and commit
209
-
210
- **Defensive `git reset HEAD` before staging.** Per the multi-agent baseline (`multi-agent-baseline.md` § Discipline 3), the staging area may contain peer-staged files you don't know about.
211
-
212
- ```bash
213
- git -C "$REPO" reset HEAD >/dev/null 2>&1
214
- ```
215
-
216
- Then stage the **explicit allowlist** for the release commit:
217
-
218
- - `package-lock.json`
219
- - each `packages/*/package.json` (or `packages/a2ui/*/package.json`)
220
- - each `packages/*/CHANGELOG.md` (or `packages/a2ui/*/CHANGELOG.md`)
221
- - Any additional source files in scope (e.g. a test update that's part of the cycle's work)
222
-
223
- **Allowlist convention — regen-deterministic outputs.** When source content changed in the release window (yaml / examples.html / contents.html with `data-chunk-*` / status:stable sweeps / Wave commits / anatomy sweeps) — i.e. any time §Step 3.0 ran — the allowlist MUST also include the following regen-deterministic outputs **UNCONDITIONALLY**, even when they're also peer-in-flight in WT:
224
-
225
- - `packages/a2ui/corpus/catalog-a2ui_0_9.json`
226
- - `packages/a2ui/corpus/catalog-a2ui_0_9_rules.txt`
227
- - `packages/a2ui/corpus/chunk-embeddings.json`
228
- - `packages/a2ui/corpus/chunks/` (if chunk content drifted)
229
- - `packages/web-components/dist/web-components.min.{css,js}`
230
- - `packages/web-components/dist/icons-manifest.js`
231
- - `packages/web-modules/dist/everything.min.js`
232
- - `packages/web-modules/dist/shell/admin-shell.min.js`
233
- - `packages/web-modules/dist/icons-manifest.js`
234
-
235
- These are regen-deterministic — your §Step 3.0 output is the authoritative state. Peer's WT pre-state on the same paths is SUPERSEDED. This is **not** "stage WT changes" (would violate multi-agent baseline). This is "stage the regen outputs you just produced in §Step 3.0 — they supersede any peer WT pre-state on the same paths." Canonical incident: `../assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md`.
236
-
237
- **Never `git add -A`.** Stage by name. Confirm the staged diff:
238
-
239
- ```bash
240
- git -C "$REPO" diff --cached --stat | tail -3
241
- # Expect: "N files changed, M insertions(+), L deletions(-)"
242
- ```
243
-
244
- Commit (HEREDOC for multi-line):
245
-
246
- ```bash
247
- git -C "$REPO" commit -m "$(cat <<'EOF'
248
- chore(release): vX.Y.Z lockstep — <one-line summary>
249
-
250
- N-package lockstep PATCH cut to X.Y.Z. Internal dep ranges hold at
251
- ^X.Y.0 (PATCH-cut asymmetry).
252
-
253
- Substantive scope:
254
- - @adia-ai/web-components: <bullet list>
255
- - @adia-ai/web-modules: <bullet list>
256
- - @adia-ai/a2ui-corpus: <bullet list>
257
-
258
- Ride-along stubs (lockstep bump only): <package list>
259
-
260
- Excluded — peer-agent in-flight (if any):
261
- - <file path> (<reason>)
262
-
263
- Verification:
264
- - check:lockstep OK at X.Y.Z / ^X.Y.0
265
- - NNNN/NNNN vitest across NN files
266
- - ... (paste the gate summary)
267
- EOF
268
- )"
269
- ```
270
-
271
- ---
272
-
273
- ## §Step 5.5 — Pre-commit verification trip-wire
274
-
275
- After `git add` (§Step 5) but **BEFORE** `git commit`, re-run the freshness gates one final time against the staged state. This catches the case where a regen-deterministic output was excluded from the allowlist (same-paths-as-peer-WT exclusion conflict — see §Step 3.0 supersedes-WT contract).
276
-
277
- ```bash
278
- node scripts/build/components.mjs --verify # catalog + sidecar drift?
279
- npm run check:chunks-fresh # chunks/_index vs source fragments
280
- npm run check:embeddings-fresh # chunk-embeddings.json vs chunks/_index
281
- ```
282
-
283
- **Any DRIFT here means a regen output was excluded from staging.** Recovery is in-cycle (no force-push, no tag-move):
284
-
285
- ```bash
286
- git -C "$REPO" add <drift-paths> # stage the missing regen output
287
- # Re-run §Step 5.5 → expect clean
288
- # Then re-create the commit (HEREDOC again — same body works).
289
- ```
290
-
291
- The trip-wire runs in <2 seconds locally vs ~5 minutes to recover from a CI failure (regen + commit follow-up + force-move tags + re-dispatch). Pure win. Canonical incident: `../assets/case-studies/2026-05-26-catalog-drift-recurring-v0.6.40.md`.
292
-
293
- If §Step 5.5 fails: rewind to a pre-commit state, re-stage, re-commit. Do **not** proceed to §Step 6 (tag) with drift — the tag-at-HEAD invariant means CI will hit the drift after publish, not before.
294
-
295
- ---
296
-
297
- ## §Step 6 — Tag
298
-
299
- One umbrella tag + one per-package tag at the release-commit HEAD:
300
-
301
- ```bash
302
- git -C "$REPO" tag vX.Y.Z
303
- for pkg in web-components web-modules llm a2ui-runtime a2ui-compose \
304
- a2ui-corpus a2ui-mcp a2ui-retrieval a2ui-validator; do
305
- git -C "$REPO" tag "$pkg-vX.Y.Z"
306
- done
307
- ```
308
-
309
- (`tag-lockstep.mjs --version X.Y.Z` mechanizes this loop.)
310
-
311
- **Tag-at-HEAD invariant** (`SKILL.md` § ReleaseInvariants #3): post-bump fixes, tests, README updates belong in the tarball. The release window's last commit is the tag point.
312
-
313
- Exception: **batch push** (mode 4). Each version tags at its own release-commit SHA. See `recovery-paths.md` § Scenario 2 — batch push.
314
-
315
- ---
316
-
317
- ## §Step 7 — The release trip-wire (F-N1)
318
-
319
- ```bash
320
- node scripts/release/check-release.mjs --all-pending
321
- ```
322
-
323
- Expected for a clean cycle:
324
-
325
- ```text
326
- │ ✓ clean (× the per-package tags)
327
- │ ✗ [error] tag 'vX.Y.Z' doesn't match <pkg>-v<version> (umbrella — EXPECTED, ignore)
328
- ```
329
-
330
- If you see **warns** of the form:
331
-
332
- ```text
333
- ⚠ [warn] diff 'packages/web-components/components/' touched between
334
- web-components-v0.X.Y-1 → web-components-v0.X.Y but CHANGELOG [0.X.Y]
335
- doesn't mention 'components'
336
- ```
337
-
338
- This is the **F-N1 diff-coverage enrichment pass**. The change is documented but the CHANGELOG entry didn't use the literal path keyword the regex expects. Fix: add the path keyword naturally to a relevant entry (e.g., change "`table.yaml`" → "`components/table/table.yaml`"). Then **amend the release commit** (it's yours, unpushed, and the enrichment belongs in the same commit conceptually):
339
-
340
- ```bash
341
- git -C "$REPO" add packages/<pkg>/CHANGELOG.md
342
- git -C "$REPO" commit --amend --no-edit
343
-
344
- # Re-tag (the SHA moved): delete all tags, then re-create them.
345
- node scripts/release/check-release.mjs --all-pending # re-run; expect per-package clean
346
- ```
347
-
348
- See `changelog-discipline.md` § F-N1 enrichment for the full discipline + the worked example (`../assets/case-studies/2026-05-21-fn1-enrichment-pass-v0.6.19.md`).
349
-
350
- ---
351
-
352
- ## §Step 8 — Push
353
-
354
- ```bash
355
- echo "commits to push: $(git -C "$REPO" rev-list --count origin/main..HEAD)"
356
- git -C "$REPO" push origin main 2>&1 | tail -3
357
- ```
358
-
359
- Then the tags:
360
-
361
- ```bash
362
- git -C "$REPO" push origin vX.Y.Z \
363
- web-components-vX.Y.Z web-modules-vX.Y.Z llm-vX.Y.Z \
364
- a2ui-runtime-vX.Y.Z a2ui-compose-vX.Y.Z a2ui-corpus-vX.Y.Z \
365
- a2ui-mcp-vX.Y.Z a2ui-retrieval-vX.Y.Z a2ui-validator-vX.Y.Z \
366
- 2>&1 | grep -c 'new tag'
367
- ```
368
-
369
- ---
370
-
371
- ## §Step 9 — Publish
372
-
373
- The repo's `publish-<pkg>.yml` workflows only auto-trigger on per-package tag push sometimes. **Always dispatch manually** to be safe:
374
-
375
- ```bash
376
- sleep 4 # let the CI host index the new tags
377
- for pkg in web-components web-modules llm a2ui-runtime a2ui-compose \
378
- a2ui-corpus a2ui-mcp a2ui-retrieval a2ui-validator; do
379
- gh workflow run "publish-$pkg.yml" --ref "$pkg-vX.Y.Z" 2>&1 | head -1
380
- echo " dispatched: $pkg"
381
- done
382
- ```
383
-
384
- (`dispatch-publish.mjs --version X.Y.Z` mechanizes this loop, and its `--after <prev-version>` flag enforces the batch-push ordering rule. The npm scope it checks defaults to `@adia-ai`; a fork overrides it with `--scope <@org>` or `$ADIA_NPM_SCOPE`.)
385
-
386
- Wait for completion (use `run_in_background`):
387
-
388
- ```bash
389
- until [ "$(gh run list --workflow=publish-a2ui-validator.yml \
390
- --limit 1 --json status -q '.[0].status')" = "completed" ]; do
391
- sleep 5
392
- done
393
- echo "vX.Y.Z publishes settled"
394
- ```
395
-
396
- Verify all succeeded, then confirm npm:
397
-
398
- ```bash
399
- for pkg in web-components web-modules llm a2ui-runtime a2ui-compose \
400
- a2ui-corpus a2ui-mcp a2ui-retrieval a2ui-validator; do
401
- echo -n "$pkg: "; npm view "@adia-ai/$pkg" version 2>/dev/null
402
- done
403
- echo -n "latest: "; npm view @adia-ai/web-components dist-tags.latest 2>/dev/null
404
- ```
405
-
406
- All should print `X.Y.Z`. `latest` should be `X.Y.Z`.
407
-
408
- **Batch-push exception**: dispatch the older version's workflows + WAIT for completion + verify, THEN dispatch the newer version's. Otherwise `npm dist-tag latest` lands on the older version. See `recovery-paths.md` § Scenario 2 — batch push.
409
-
410
- ---
411
-
412
- ## §Step 10 — GH releases + site deploy
413
-
414
- GH releases (use the `.brain/release-notes/{version}-release-notes.md` body — see `notes-authoring.md` for the template; strip the YAML frontmatter before passing as the GH-release body):
415
-
416
- ```bash
417
- # Frontmatter-stripped body for the GH release:
418
- sed '1{/^---$/!q;};1,/^---$/d' .brain/release-notes/X.Y.Z-release-notes.md > /tmp/gh-body-X.Y.Z.md
419
- for pkg in web-components web-modules llm a2ui-runtime a2ui-compose \
420
- a2ui-corpus a2ui-mcp a2ui-retrieval a2ui-validator; do
421
- gh release create "$pkg-vX.Y.Z" \
422
- --title "@adia-ai/$pkg vX.Y.Z" \
423
- --notes-file /tmp/gh-body-X.Y.Z.md \
424
- 2>&1 | tail -1
425
- done
426
- ```
427
-
428
- Then site build + deploy (see `exe-deploy.md` for the @adia-ai monorepo's deploy specifics — the `ui-kit.exe.xyz` host is the worked example; a different lockstep monorepo substitutes its own demo-site host):
429
-
430
- ```bash
431
- npm run build:site 2>&1 | tail -2
432
- # rsync to the demo host + verify; see exe-deploy.md for the FILES-not-routes
433
- # verification discipline (an SPA returns 200 for unmatched routes).
434
- ```
435
-
436
- If any peer-in-flight file was stashed in Step 2, **keep it stashed** through this step. The site build runs from the working tree; the deployed site should match this version's npm packages exactly.
437
-
438
- ---
439
-
440
- ## §Step 11 — Audit-history ledger
441
-
442
- Write `.brain/audit-history/YYYY-MM-DD-release-vX.Y.Z.json` (`make-ledger.mjs` scaffolds it from git state; see `ledger-discipline.md` for the canonical schema). Minimum fields:
443
-
444
- ```json
445
- {
446
- "kind": "release-cut",
447
- "audit_id": "YYYY-MM-DD-release-vX.Y.Z",
448
- "released_at": "YYYY-MM-DD",
449
- "version": "X.Y.Z",
450
- "release_type": "PATCH",
451
- "summary": "<one-paragraph>",
452
- "release_commit": "<sha>",
453
- "tag_commit": "<sha>",
454
- "tags": ["vX.Y.Z", "web-components-vX.Y.Z", "..."],
455
- "verification": { "...": "gate-by-gate summary" },
456
- "publish_workflows": { "dispatched": "N/N", "conclusions": "N/N success" },
457
- "notes": ["<lesson>", "<excluded peer file>", "<F-N1 enrichment if any>"]
458
- }
459
- ```
460
-
461
- Commit + push the ledger:
462
-
463
- ```bash
464
- git -C "$REPO" add .brain/audit-history/YYYY-MM-DD-release-vX.Y.Z.json
465
- git -C "$REPO" commit -m "chore(audit-history): vX.Y.Z release ledger ..."
466
- git -C "$REPO" push origin main
467
- ```
468
-
469
- If anything was stashed in Step 2, `git stash pop` now and **flag any that returned with conflicts** to the operator.
470
-
471
- ---
472
-
473
- ## §Step 12 — Author release notes (default, not optional)
474
-
475
- After the cycle ships clean (npm publish + site deploy + ledger committed), **always** author release notes for the operator. The operator does not need to ask. This is the default end-of-cycle behavior.
476
-
477
- **Single-version cut** (most cycles) → load `notes-authoring.md`:
478
-
479
- - One body covering this version's substantive packages, FEEDBACK closures, behavior changes, and verification baseline.
480
- - **Save to `.brain/release-notes/{version}-release-notes.md`** (durable repo artifact, committed with the ledger) — NOT `/tmp`, and NOT `.brain/notes/` (that's working notes; `release-notes/` is the ship record). Open with YAML frontmatter (see `notes-authoring.md` § Where to put the notes). The Slack/GH-release body is derived from this file, not the reverse.
481
- - Surface inline in the operator's terminal as well — they may want to paste without opening the file.
482
-
483
- **Rollup** (when ≥2 versions have shipped since the last operator- acknowledged notes broadcast, or when the operator says "rollup notes" / "v0.6.X → v0.6.Y notes") → load `rollup-notes.md`:
484
-
485
- - One body using the 5-section skeleton + framing option A/B/C.
486
- - **Save to `.brain/release-notes/{lo}-to-{hi}-rollup-notes.md`** with the same frontmatter convention.
487
-
488
- **Surfacing convention**: present the notes inline at the end of the cycle report ("the cycle shipped clean; here are the notes for copy-paste:"). The operator copies wherever they want (Slack #releases, GH release body, internal announcement). The skill does NOT post to Slack directly — that's operator-mediated.
489
-
490
- **Skip-condition (rare)**: skip Step 12 only if the operator explicitly says "no notes this cycle" / "skip notes" / "I'll write them myself." Even then, surface a one-line summary so they have a starting point.
491
-
492
- **Why this is a default, not a prompt**: cycle context is freshest at end-of-cycle; the notes draft compounds with the audit-history ledger. Asking the operator "do you want notes?" creates friction they consistently answer "yes" to — so the skill answers it.
493
-
494
- ---
495
-
496
- ## §Variant A (Deploy handoff) shortcut
497
-
498
- If the peer pre-cut the release commit + CHANGELOG + bump + lockfile already:
499
-
500
- 1. Re-baseline (Step 1) — confirm HEAD is the peer's `release(*): vX.Y.Z` commit.
501
- 2. Skim the peer's prep note at `.brain/notes/vX.Y.Z-release-prep-*.md`.
502
- 3. Stash peer-in-flight strays per Step 2.
503
- 4. Run pre-flight (Step 3) — confirm gates clean.
504
- 5. **Skip Step 4** (the peer did the promotion + bump + lockfile).
505
- 6. **Skip Step 5** (the peer's release commit IS the commit to tag).
506
- 7. Resume at Step 6 (Tag at HEAD).
507
-
508
- ---
509
-
510
- ## §When to abort
511
-
512
- Stop and surface the situation to the operator if:
513
-
514
- - Pre-flight gate fails AND the failure mode doesn't fit a documented recovery in `gates-catalog.md`.
515
- - F-N1 reports more than 1 warn per per-package tag, or any non-umbrella error.
516
- - The peer's release-commit candidate fails `check:demo-shells` / `check:lockstep` / `check:embeddings-fresh` (see `recovery-paths.md` § Scenario 4 — author-from-scratch / extension).
517
- - The working tree has uncommitted source files with unclear provenance after diffing (see `multi-agent-baseline.md` § Discipline 4 — stash discipline).
518
- - Publish workflow fails with E404 / E401 — npm-token rotation required.
519
-
520
- Do NOT improvise past these — the operator owns the judgment call.