@adia-ai/adia-ui-forge 0.1.3 → 0.8.1

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 +4 -7
  2. package/CHANGELOG.md +35 -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 +28 -3
  90. package/skills/{adia-ui-release → adia-release}/scripts/dispatch-publish.mjs +10 -7
  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 +38 -31
  95. package/skills/{adia-ui-release → adia-release}/scripts/tag-lockstep.mjs +7 -3
  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,428 +0,0 @@
1
- # Reference: Teach Protocol — Absorbing new knowledge into the adia-ui-authoring skill
2
-
3
- **Ecosystem context:** This reference is one instantiation of a generalizable **extensibility** pattern shared across the forge skill family (the consumer-side composition skill in the adia-ui-factory plugin and the sibling **adia-ui-release** skill carry parallel `teach-protocol.md` files). The pattern separates universal components (the trigger cluster, the 7 anti-patterns, the 5-step landing procedure, the citation-vs-knowledge principle, the negative case) from skill-specific components (the decision tree's branches, the worked examples). When editing this file, preserve the universal sections verbatim where possible — they're shared infrastructure. The ecosystem-level rationale lives in `${CLAUDE_PLUGIN_ROOT}/references/shared/pev-rationale.md` and `${CLAUDE_PLUGIN_ROOT}/references/shared/skill-conventions.md`.
4
-
5
- **Why this exists:** As the authoring skill absorbs new authoring-side patterns (new primitive-audit checklist items, new CSS / token / lifecycle rules, new shell-cluster decompositions, new module-promotion observations, new LLM-bridge defaults, new anti-patterns), each absorption was previously a one-off improvisation. This protocol gives every future "make sure `adia-ui-authoring` knows about [pattern]" request a deterministic landing path.
6
-
7
- **Used by:** the `adia-ui-authoring` skill, when an agent receives one of the trigger phrases below. SKILL.md §Teach is the seed; this file is the binding procedure.
8
-
9
- - "make sure `adia-ui-authoring` knows about [the new primitive contract / token rule / shell pattern]"
10
- - "train `adia-ui-authoring` on [the new lifecycle rule / module-promotion observation]"
11
- - "the skill should know about [the new CSS pattern from ADR-NNNN]"
12
- - "absorb this authoring-pattern into adia-ui-authoring"
13
- - "teach the skill about [the new LLM-bridge default / the new anti-pattern]"
14
- - "[a FEEDBACK item resolved with this fix] — make sure the skill reflects it"
15
-
16
- **Companion:** the `§SelfAudit` section + `scripts/audit-authoring-roster.mjs` (run after any §Teach landing to verify the mechanized axes hold — manifest / reference graph / capability-menu drift / authoring-roster currency), and [authoring-cycle.md](authoring-cycle.md) (the 5-step canonical procedure — §Teach landings near it should preserve its structure).
17
-
18
- **Anti-companion:** the repo's dated journal (`docs/journal/YYYY/MM/<date>.md`) — one-off authoring debug stories, "how I caught the lifecycle leak today" arc stories belong there, NOT in the skill (see Branch H below).
19
-
20
- ---
21
-
22
- ## When to Use
23
-
24
- Trigger phrases (mirrored from the SKILL.md §Teach section):
25
-
26
- - "make sure `adia-ui-authoring` knows about X"
27
- - "train the skill on X"
28
- - "teach the skill about Y"
29
- - "the skill should be aware of Z"
30
- - "absorb [pattern / lesson / FEEDBACK resolution] into adia-ui-authoring"
31
- - "update the skill to reflect [the new ADR / the resolved contract bug / the new shell pattern]"
32
-
33
- This protocol applies when **another agent in the codebase** (substrate author, kanban worker, peer skill author) hands the authoring skill new knowledge to integrate. It does NOT apply when:
34
-
35
- - You're authoring a NEW primitive right now (use mode 1 / [primitive-audit.md](primitive-audit.md) + [authoring-cycle.md](authoring-cycle.md))
36
- - You're modifying an existing primitive (use mode 2 / [authoring-cycle.md](authoring-cycle.md) step 2 onward)
37
- - You're running cleanup / archive sweeps (use §SelfAudit's hygiene-cut shape)
38
-
39
- The procedure below is the binding for skill-teach requests against `adia-ui-authoring`. Follow it in order. Each step has a stop-condition; do not skip ahead.
40
-
41
- ---
42
-
43
- ## Core Principles
44
-
45
- 1. **The skill is a citation layer, not a knowledge layer.** Per-component contracts live in `packages/web-components/components/*.yaml` (props, slots, decision rules, keywords, synonyms). ADR rationale lives in the repo's ADR set. The skill cites yaml tags + ADR numbers + contract-spec sections — it does NOT duplicate yaml prose or ADR rationale. When a §Teach landing's first instinct is "rewrite what `docs/specs/component-token-contract.md` says," stop: the substrate is the source of truth.
46
- 2. **Reference files are the cold-start budget's safety valve.** New content > ~50 LOC of procedural detail belongs in `references/<topic>.md` and is cited from SKILL.md, not inlined. This keeps the cold-start surface small (the ColdStartTriage menu) and lets modes load only their declared bundles.
47
- 3. **Triggers without binding sections are waste.** Adding keywords to `trigger:` without a corresponding section in SKILL.md (or referenced file) consumes activation budget for no payoff. Always pair the two.
48
- 4. **Capability menu items must reach an actual mode.** The cold-start `§ColdStartTriage` table is the agent's mental model on bare activation. Lies in that table cost more than gaps.
49
- 5. **Version bumps are PATCH for citations, MINOR for new sections, MAJOR for renames/removals.** Most §Teach landings here are PATCH (a new anti-pattern in [anti-patterns.md](anti-patterns.md), a new rule in [api-contract.md](api-contract.md)) or MINOR (a new mode, a new reference file). Never bundle MINOR with PATCH polish in one cut.
50
- 6. **§SelfAudit is the receipt.** A §Teach landing isn't done until `node scripts/audit-authoring-roster.mjs --strict` runs clean. If the audit regresses, fix in the same cut.
51
-
52
- ---
53
-
54
- ## The Decision Tree — where does new authoring knowledge land?
55
-
56
- Run this **before** any patch. The wrong landing target wastes effort and creates drift.
57
-
58
- ```text
59
- Is the new fact a PER-COMPONENT contract (slot, prop, decision rule,
60
- keyword, synonym, a2ui.rule, default value)?
61
- → YES: belongs in YAML SoT, not in the skill.
62
- Open the component's `.yaml` file at
63
- `packages/web-components/components/<name>/<name>.yaml`
64
- (or `packages/web-modules/.../<name>.yaml`).
65
- Add to the appropriate field; run `npm run build:components`
66
- to regenerate sidecars + catalog. Skill cites by tag — it
67
- doesn't need to change.
68
- STOP HERE. Do not edit the skill.
69
- (See Worked Example A below.)
70
- → NO: continue.
71
-
72
- Is it a NEW AUTHORING RULE that belongs to the four-axis contract
73
- (props/attributes, CSS @scope/tokens, lifecycle, form-association)?
74
- → YES: route to the appropriate mode-1/2 reference:
75
- - prop naming / reflection / static properties → references/api-contract.md
76
- - @scope / variants / modes / L3 tokens → references/css-patterns.md
77
- - connected/disconnected / observers / listeners → references/lifecycle-patterns.md
78
- - raw colors / chrome palette / data palette → references/token-contract.md
79
- - general convention not fitting the above → references/code-style.md
80
- Add cross-link from authoring-cycle.md Step 3 if the new
81
- rule extends the non-negotiable list.
82
- (See Worked Example B below.)
83
-
84
- Is it a NEW SHELL PATTERN — a new bespoke child concern, a 5th cluster
85
- candidate, a new state-as-attribute convention, or an ADR-0023 extension?
86
- → YES: lands in references/shell-patterns.md (mode 3). Add to
87
- the 4-concern decomposition heuristic if the concern is new;
88
- add to the pitfall list if it's a failure mode; add to the
89
- 4-canonical-cluster table if it's a 5th instance.
90
- (See Worked Example C below.)
91
-
92
- Is it a NEW MODULE-PROMOTION pattern — a new OD-NNN rule, a new
93
- cluster-placement consideration, a new phase or sweep technique?
94
- → YES: lands in references/module-promotion.md (mode 4). The
95
- 5-phase arc is the spine; new ODs extend the "Two rules from
96
- observed bugs" section. Add a worked-example reference if
97
- the pattern is grounded in a real arc.
98
- (See Worked Example D below.)
99
-
100
- Is it a NEW LLM-BRIDGE DEFAULT or extension procedure step?
101
- → YES: lands in references/llm-bridge.md (mode 6). The 5 hard
102
- rules are the spine; new rules extend that list. The
103
- "add a 4th provider" 8-step procedure extends if a new
104
- provider class (passthrough proxy, smart proxy, hybrid)
105
- needs documenting.
106
- (See Worked Example E below.)
107
-
108
- Is it a NEW ANTI-PATTERN or WORKED EXAMPLE?
109
- → YES: lands in references/anti-patterns.md (failure-mode
110
- catalogue) OR references/worked-example.md (positive
111
- example). Anti-patterns get the AP-N## label form
112
- (AP-N## for new-component AP, AP-T## for token AP, etc.).
113
- Worked examples mirror the badge-ui / counter-ui shape.
114
- (See Worked Example F below.)
115
-
116
- Is it a METHODOLOGY / POSTURE shift — a new cold-start mode, a new
117
- §SelfAudit axis, a new architectural principle (§FirstPrinciples
118
- extension)?
119
- → YES: lands INLINE in SKILL.md (the procedural spine). These
120
- shape every mode: §Mission, §ColdStartTriage, §Posture,
121
- §LoadingProtocol, §FirstPrinciples, §Plan-Execute-Verify,
122
- §SelfAudit, §FileMap. They're allowed to grow because they
123
- shape every other section. Run §SelfAudit immediately to
124
- confirm the cold-start budget held.
125
- (See Worked Example G below.)
126
-
127
- Is it a one-off AUTHORING ARC STORY, debug session, or LESSON LEARNED
128
- for a specific component (one-off fix, journal-worthy)?
129
- → NO landing in the skill. It belongs in docs/journal/YYYY/MM/<date>.md
130
- where future archeology will find it (per the repo's journal
131
- discipline). The GENERALIZED rule extracted from the arc may
132
- graduate to the skill via one of the branches above, but the
133
- cycle-specific story stays in the journal.
134
- Skipping the skill is a FEATURE, not a gap.
135
- (See Worked Example H — the negative case.)
136
- ```
137
-
138
- ---
139
-
140
- ## The Five-Step Landing Procedure
141
-
142
- After the decision tree picks a target, follow these steps in order:
143
-
144
- ### Step 1 — Audit before patching
145
-
146
- Before writing anything:
147
-
148
- 1. **Read the target file in full.** Don't skim. The authoring-skill reference files have established voice + section ordering; patches must match.
149
- 2. **`git status` + `git log -5`** on the working tree. Confirm no peer activity in the skill directory (peer agents may be authoring sibling skills like **adia-ui-release** or the consumer-side composition skill). If a peer is dirty here, halt + coordinate.
150
- 3. **Grep for existing coverage.** Run `grep -rn "<keyword>" skills/adia-ui-authoring/` to confirm the new knowledge isn't already partly covered. If it IS, the landing is a _patch + augment_, not a _new section_.
151
- 4. **Confirm the landing-target choice.** Re-read the Decision Tree above against your specific case. Two minutes of "is this really a CSS pattern, or is it actually a lifecycle rule?" prevents two hours of misplaced content.
152
-
153
- ### Step 2 — Author the patch
154
-
155
- Two shapes depending on Step 1's grep:
156
-
157
- #### Shape A — NEW section / file (no existing coverage)
158
-
159
- If the target is a new reference file: create `references/<topic>.md` with the canonical header (provenance, why-authored, used-by, companion, anti-companion), then "## When to Use", "## Core Principles", then content. Reference from SKILL.md §FileMap + §ColdStartTriage if it opens a new mode.
160
-
161
- If the target is a new H2 inside an existing reference (most common for authoring-skill §Teach): find the semantically correct insertion point. E.g., a new lifecycle rule goes in `lifecycle-patterns.md` near related rules, not at the file's end. A new anti-pattern goes in `anti-patterns.md` under its axis (AP-N## / AP-T## / AP-S## / AP-L##).
162
-
163
- #### Shape B — AUGMENT existing section (grep found partial coverage)
164
-
165
- Read the entire existing section first, including any cross-references to other files. Author the augment as a sub-section or inline paragraph at the _semantically correct place_, not the end. If the augment changes the meaning of nearby paragraphs, edit those too — don't leave stale claims standing.
166
-
167
- ### Step 3 — Wire the activation surface
168
-
169
- For any §Teach landing that should be discoverable:
170
-
171
- 1. **Add trigger keywords to `description:` in the frontmatter** if the new knowledge introduces a vocabulary the existing trigger phrases don't cover. Pick 1-3 phrases an operator would naturally say (e.g. "validate primitive contract", "audit token consumption").
172
- 2. **Add a capability menu entry** in §ColdStartTriage ONLY if the new content opens a new mode. Most §Teach landings extend existing modes 1-6; they don't create new ones.
173
- 3. **Add a binding-procedure line** in §LoadingProtocol or §Plan-Execute-Verify only if the new section must run in a specific phase. Most don't (default LLM behavior is "scan cold-start menu → match → jump").
174
-
175
- If the landing is a new reference file, the SKILL.md edits are minimal — just the §FileMap row + a §ColdStartTriage row if it warrants one.
176
-
177
- ### Step 4 — Version + CHANGELOG
178
-
179
- Cut the new content as a release:
180
-
181
- - **PATCH (vN.M.x+1)** — citation strengthening, typo fixes, augmenting an existing section with one paragraph, new anti-pattern entry, new rule in api-contract / css-patterns / lifecycle-patterns.
182
- - **MINOR (vN.M+1.0)** — new reference file, new H2 section in SKILL.md, new cold-start mode with binding, new §SelfAudit axis.
183
- - **MAJOR (vN+1.0.0)** — renames, removals, restructuring (don't bundle with adds).
184
-
185
- Update `skill.json` version + `CHANGELOG.md` entry. The entry must name:
186
-
187
- - What was added (one-line summary)
188
- - Where it lives (file path + section anchor)
189
- - What triggers it (1-3 phrases from the trigger keywords)
190
- - What it replaces / supersedes (if anything)
191
-
192
- ### Step 5 — Verify with §SelfAudit
193
-
194
- Run the audit:
195
-
196
- ```bash
197
- node scripts/audit-authoring-roster.mjs --strict
198
- ```
199
-
200
- Mechanized axes are checked: manifest enforcement (skill.json vs on-disk), reference graph (all intra-skill links resolve), capability-menu drift (every mode points to an existing reference), authoring-roster currency (every absorbed-skill has a redirect or correct absence). The manual-review axes (token economy, content currency, cold-start path weight, fence-leak, CLI helper currency) need eyeballing — see `${CLAUDE_PLUGIN_ROOT}/references/shared/skill-conventions.md`.
201
-
202
- If the audit regresses, **fix in the same cut**. Don't defer hygiene-debt; it compounds.
203
-
204
- ---
205
-
206
- ## Worked Examples
207
-
208
- ### Example A — Per-component yaml fact (NOT a skill landing)
209
-
210
- **Request:** "make sure adia-ui-authoring knows that `<rating-ui>` defaults to `count=5` and supports half-star precision via `step=0.5`."
211
-
212
- **Decision tree:** Per-component contract (default value + prop semantics). → **YAML SoT, not skill.**
213
-
214
- **Action:**
215
-
216
- ```bash
217
- # Open the yaml
218
- $EDITOR packages/web-components/components/rating/rating.yaml
219
-
220
- # Update props section with default + step values + a2ui.rule
221
- # Run regen
222
- npm run build:components
223
- npm run verify:components # "clean — N files up-to-date"
224
- ```
225
-
226
- **No skill edits required.** The skill cites `<rating-ui>` by tag in `code-style.md`'s primitive examples; the yaml propagates through the catalog automatically.
227
-
228
- **Pitfall to avoid:** "While I'm in the skill, let me add a paragraph about rating-ui in `code-style.md`." NO. That paragraph would duplicate the yaml SoT and drift on the next yaml change. Skill cites the tag; doesn't describe its contract.
229
-
230
- ### Example B — New authoring rule (four-axis contract extension)
231
-
232
- **Request:** "train adia-ui-authoring on the new rule: state-bearing Booleans MUST also reflect to attribute via `reflect: true` so CSS `:scope[disabled]` selectors fire."
233
-
234
- **Decision tree:** New authoring rule, axis = API contract (reflection). → **references/api-contract.md**.
235
-
236
- **Action:**
237
-
238
- 1. Open `api-contract.md`. Find the section on `static properties` declarations.
239
- 2. Add a new rule entry: rule body + rationale + example showing right vs wrong.
240
- 3. If the rule replaces a previous looser claim, edit that claim too — don't leave stale guidance standing.
241
- 4. Cross-link from `authoring-cycle.md` Step 3 (the non-negotiable rules list) if it's a hard rule.
242
- 5. PATCH bump (`vN.M.x+1`) — augmenting existing reference.
243
-
244
- ### Example C — New shell pattern
245
-
246
- **Request:** "absorb the new `<docs-shell>` decomposition pattern (5th cluster after admin/chat/editor/simple)."
247
-
248
- **Decision tree:** New shell pattern. → **references/shell-patterns.md** (mode 3).
249
-
250
- **Action:**
251
-
252
- 1. Open `shell-patterns.md`. Find the "Examples — 4 canonical clusters" section.
253
- 2. Add a 5th example block: `<docs-shell>` family (JS-bearing + CSS-only children), CSS bridge file, tests, replication notes.
254
- 3. Update the compounding-insight table with a 5th row (build time, notes).
255
- 4. If the new cluster surfaces a 16th pitfall, append to the pitfall list (numbered, not bullets).
256
- 5. PATCH bump (augmenting existing reference).
257
-
258
- ### Example D — New module-promotion observation
259
-
260
- **Request:** "OD-004 — when the promoted module owns a popover, the consumer's existing popover-trigger button must move INTO the module's [data-trigger] slot, not stay outside; otherwise the popover-trigger binding silently breaks."
261
-
262
- **Decision tree:** New module-promotion observation. → **references/module-promotion.md** (mode 4), "Two rules from observed bugs" → "Three rules" (now 4).
263
-
264
- **Action:**
265
-
266
- 1. Open `module-promotion.md`. Find the OD-002 + OD-003 section.
267
- 2. Add OD-004 as a new H3 with: pattern (the failure mode), recipe (the fix), example (the real arc that surfaced it).
268
- 3. Update the section heading from "Two rules" → "Four rules" (or generalize to "rules from observed bugs").
269
- 4. PATCH bump.
270
-
271
- **Pitfall to avoid:** Authoring OD-004 in `worked-example.md` instead. The OD-NNN labels belong in `module-promotion.md` where the matrix of observation rules lives.
272
-
273
- ### Example E — New LLM-bridge rule
274
-
275
- **Request:** "make sure adia-ui-authoring knows about Rule 6 — providers with native function-calling must not be wrapped with the json-mode fallback; the bridge auto-detects via `MODELS.<provider>.supportsTools`."
276
-
277
- **Decision tree:** New LLM-bridge default. → **references/llm-bridge.md** (mode 6), "Hard rules — defaults that bit us" extends.
278
-
279
- **Action:**
280
-
281
- 1. Open `llm-bridge.md`. Find the "Rule 1 / 2 / 3 / 4 / 5" section.
282
- 2. Add Rule 6 in the same H3 form: rule body + rationale + example (provider list affected).
283
- 3. If the rule affects the 8-step "How to add a 4th provider" procedure, update step 1 (adapter file) and step 4 (models.js) to reference the new constraint.
284
- 4. PATCH bump.
285
-
286
- ### Example F — New anti-pattern
287
-
288
- **Request:** "AP-T07 — using `color: var(--a-fg)` inside a `:scope[variant="accent"]` body bypasses the L3 cascade (should be `--a-accent-fg-hover` etc); we saw this in `tag-ui`."
289
-
290
- **Decision tree:** New anti-pattern, axis T (token contract). → **references/anti-patterns.md**.
291
-
292
- **Action:**
293
-
294
- 1. Open `anti-patterns.md`. Find the AP-T section (token contract).
295
- 2. Add AP-T07 as a new entry: failure mode + symptom + fix + file:line where the bug was found.
296
- 3. Cross-link from `token-contract.md` if the rule maps to a documented audit step.
297
- 4. Cross-link from `code-style.md` § "Tokens, never raw colors" if it extends that section.
298
- 5. PATCH bump.
299
-
300
- **Pitfall to avoid:** Authoring AP-T07 only in `token-contract.md`. The canonical home for anti-patterns is `anti-patterns.md` — that's where the catalogue lives. Other references cite the AP-NN label.
301
-
302
- ### Example G — Methodology / posture (inline)
303
-
304
- **Request:** "we should add a §FirstPrinciples #6: 'Light-DOM positioning is by CSS rule, never by slot' — slot= attributes are decorative metadata per ADR-0033. The retraction lesson generalizes."
305
-
306
- **Decision tree:** New first-principle. → **INLINE in SKILL.md §FirstPrinciples**.
307
-
308
- **Action:**
309
-
310
- 1. Open `skills/adia-ui-authoring/SKILL.md` §FirstPrinciples.
311
- 2. Add the new principle as #6 with: principle body + rationale + ADR cross-reference + cite-by-tag of the retraction.
312
- 3. MINOR bump (new first-principle = new procedural commitment).
313
- 4. Run §SelfAudit immediately — confirm the cold-start budget held (the new principle adds maybe 50 lines).
314
-
315
- **Why inline, not reference file:** §FirstPrinciples is the procedural spine. Reference-extracting it would mean agents miss it on cold-start. It's allowed to grow.
316
-
317
- ### Example H — One-off arc story (the NEGATIVE case)
318
-
319
- **Request:** "the skill should remember the author-from-scratch bug — a peer landed source under [Unreleased] but no release commit; I had to do a mode-2 cycle 'from scratch'. Make sure adia-ui-authoring knows about it."
320
-
321
- **Decision tree:** This is a RELEASE-cycle arc, not an AUTHORING-cycle arc. → **wrong skill entirely — should be the adia-ui-release skill's recovery-paths reference, NOT adia-ui-authoring.**
322
-
323
- **Action:**
324
-
325
- 1. Route to the **adia-ui-release** skill's recovery-paths reference instead.
326
- 2. **Do nothing in adia-ui-authoring.** This is anti-pattern 7 (one-way thinking) avoided.
327
-
328
- **Counter-example** (a genuine NEGATIVE case for authoring):
329
-
330
- **Request:** "the skill should remember how I caught the `<rating-ui>` `reflect: true` missing bug today — grep'd for `reflect: true` in `static properties` arrays, found 3 components missing it, fixed all 3 in one PR."
331
-
332
- **Decision tree:** One-off authoring arc story / specific debug session. → **`docs/journal/YYYY/MM/<date>.md`, NOT the skill.**
333
-
334
- **Action:**
335
-
336
- 1. Write the journal entry under §N — the arc.
337
- 2. The GENERALIZED rule extracted ("state-bearing Booleans need `reflect: true`") may already be in `api-contract.md` (Example B above). If so, no skill change needed. If not, that's a Branch B landing — separate arc.
338
- 3. **Do nothing else in the skill.** The skill teaches the agent what to do; the journal records what happened.
339
-
340
- **Pitfall to avoid:** "But the skill should know about every important arc!" NO. Conflating procedural ("what to do") with historical ("what happened") bloats the skill and rots the journal.
341
-
342
- ---
343
-
344
- ## Anti-patterns (the §Teach landing failure modes)
345
-
346
- These are universal across extensible skills. Each one was observed during sibling-skill §Teach rollouts.
347
-
348
- ### Anti-pattern 1 — "Append-only" landing
349
-
350
- Adding new content to the end of an existing reference without integrating it. Symptom: `anti-patterns.md` grows monotonically; new APs pile under no axis header; cross-references go stale.
351
-
352
- **Fix:** When augmenting a reference, find the _semantically correct insertion point_. APs go under their axis section. Lifecycle rules go near related rules in `lifecycle-patterns.md`. Don't pile at file ends.
353
-
354
- ### Anti-pattern 2 — Duplicating substrate facts
355
-
356
- Adding what `packages/web-components/components/<name>/<name>.yaml` already says as prose in the skill. Symptom: the skill paragraph and the yaml `description` say the same thing in different words; the next yaml edit drifts the skill.
357
-
358
- **Fix:** When you catch yourself writing "the `<X-ui>` component does Y", check — is this really in the yaml? If yes, cite by tag. Skill cites; doesn't describe.
359
-
360
- ### Anti-pattern 3 — Trigger keywords without binding
361
-
362
- Adding phrases to `description:` for content that doesn't exist yet, or that exists but has no procedural binding. Symptom: agent activates the skill on the keyword, then has no procedure to follow.
363
-
364
- **Fix:** Pair the keyword add with the section authoring in the SAME cut. Never bump the version with orphan triggers.
365
-
366
- ### Anti-pattern 4 — Capability menu lies
367
-
368
- Adding a §ColdStartTriage row pointing to a section that doesn't exist or to a stub. Symptom: agent reads the menu, picks the row, jumps to the reference, finds nothing actionable.
369
-
370
- **Fix:** §ColdStartTriage entries are the cold-start surface — load-bearing. Treat each new row as a contract that the underlying reference MUST deliver. If you're not ready to write the section, don't add the row yet.
371
-
372
- ### Anti-pattern 5 — Bundling MINOR + PATCH in one cut
373
-
374
- Shipping a new §SelfAudit axis (MINOR) alongside three citation-strengthening edits to `anti-patterns.md` (PATCH) in a single `vN.M+1.0` cut. Symptom: the CHANGELOG entry is unclear; consumers can't tell what the new behavior is.
375
-
376
- **Fix:** Cut the MINOR first (with just the new axis). Cut the PATCH after (with the polish). Each cut has a clean intent.
377
-
378
- ### Anti-pattern 6 — Hygiene-debt deferral
379
-
380
- Landing a new section, observing that `audit-authoring-roster.mjs --strict` shows axis regression, and deferring the fix. Symptom: the next cut has a different focus; the hygiene-debt is forgotten; six cuts later the skill has 30+ unresolved references in the manifest.
381
-
382
- **Fix:** Fix axis regressions IN THE SAME CUT as the §Teach landing. Hygiene-debt compounds.
383
-
384
- ### Anti-pattern 7 — Treating §Teach as one-way
385
-
386
- Receiving a §Teach request and landing the content without asking "should this be in `adia-ui-authoring`, or in the consumer-side composition skill (composition recipes) / **adia-ui-release** (release-cycle patterns) / **adia-ui-a2ui** (generator internals) / an incident-postmortem skill (incident write-ups)?" Symptom: the authoring skill absorbs content that semantically belongs in a sibling, blowing past the cold-start budget while leaving the sibling thin.
387
-
388
- **Fix:** Before landing here, ask: is there a sibling skill for this domain? The consumer-side composition skill (in the adia-ui-factory plugin) owns 3rd-party composition; **adia-ui-release** owns the release cycle; **adia-ui-a2ui** owns generator + corpus internals; an incident-postmortem skill owns incident write-ups; a deployment-ops skill owns long-running VM ops. The authoring skill owns the four-axis contract for code inside the monorepo, not adjacent concerns. Example H above demonstrates the routing decision.
389
-
390
- ---
391
-
392
- ## Cross-references
393
-
394
- - **§Mission** (`SKILL.md`) — defines the authoring-engineer posture. §Teach is a narrower lane.
395
- - **§SelfAudit** (`SKILL.md`) + **`scripts/audit-authoring-roster.mjs`** — the audit gate that catches §Teach landing regressions. Always run after.
396
- - **§LoadingProtocol** (`SKILL.md`) — defines the reference-file extraction discipline. §Teach respects it by routing content > ~50 LOC to `references/`.
397
- - **§ColdStartTriage** (`SKILL.md`) — the mode cold-start menu. §Teach lands in mode 7.
398
- - `${CLAUDE_PLUGIN_ROOT}/references/shared/skill-conventions.md` + `${CLAUDE_PLUGIN_ROOT}/references/shared/pev-rationale.md` — the shared infrastructure motivating §Teach and PEV across the forge family.
399
- - the **adia-ui-release** skill's `teach-protocol.md` — a sibling instantiation. Universal sections vendored here.
400
- - the repo's AGENTS.md — defines journal + audit-history disciplines that §Teach defers to for arc stories.
401
-
402
- ---
403
-
404
- ## Worked Decision Examples — Quick-Reference Card
405
-
406
- When in doubt, the table below routes by request shape.
407
-
408
- | Request shape | Landing target | Version bump | Audit gate |
409
- | --- | --- | --- | --- |
410
- | "new primitive contract / yaml fact" | yaml SoT only (no skill change) | yaml change only | `npm run verify:components` |
411
- | "new prop reflection / attribute mapping rule" | references/api-contract.md | PATCH | `audit-authoring-roster.mjs` |
412
- | "new @scope / variant-vs-mode / L3 token rule" | references/css-patterns.md or token-contract.md | PATCH | `audit-authoring-roster.mjs` |
413
- | "new lifecycle rule (observer / listener / cleanup)" | references/lifecycle-patterns.md | PATCH | `audit-authoring-roster.mjs` |
414
- | "new shell pattern / 5th cluster / state-as-attr" | references/shell-patterns.md | PATCH | `audit-authoring-roster.mjs` |
415
- | "new OD-NNN module-promotion rule" | references/module-promotion.md | PATCH | `audit-authoring-roster.mjs` |
416
- | "new LLM-bridge default / Rule N+1" | references/llm-bridge.md | PATCH | `audit-authoring-roster.mjs` |
417
- | "new anti-pattern (AP-N## / AP-T## / AP-S## / AP-L##)" | references/anti-patterns.md | PATCH | `audit-authoring-roster.mjs` |
418
- | "new worked example (badge-ui / counter-ui shape)" | references/worked-example.md | PATCH | `audit-authoring-roster.mjs` |
419
- | "new general convention / code style" | references/code-style.md | PATCH | `audit-authoring-roster.mjs` |
420
- | "new first-principle / cold-start mode / §SelfAudit axis" | inline in SKILL.md | MINOR | `audit-authoring-roster.mjs` after |
421
- | "one-off authoring arc / debug session" | `docs/journal/YYYY/MM/<date>.md` (NOT skill) | n/a | journal-date hook |
422
- | "release-cycle pattern" | route to adia-ui-release (NOT this skill) | varies | peer review |
423
- | "3rd-party composition recipe" | route to the adia-ui-factory plugin (NOT this skill) | varies | peer review |
424
- | "A2UI corpus / generator internals" | route to adia-ui-a2ui (NOT this skill) | varies | peer review |
425
-
426
- ---
427
-
428
- When new landing-target patterns emerge that don't fit the 8 branches above, augment this file's decision tree + worked examples in the same arc as the landing.
@@ -1,148 +0,0 @@
1
- #!/usr/bin/env node
2
- // audit-authoring-roster.mjs — §SelfAudit enforcement for adia-ui-authoring.
3
- // Universal axes via the shared audit-axes lib; plus a skill-specific
4
- // absorbed-skill roster-currency axis.
5
- //
6
- // Usage (from anywhere):
7
- // node scripts/audit-authoring-roster.mjs
8
- // node scripts/audit-authoring-roster.mjs --json
9
- // node scripts/audit-authoring-roster.mjs --strict
10
- //
11
- // Resolves the shared lib via ${CLAUDE_PLUGIN_ROOT}/bin/lib/audit-axes.mjs,
12
- // with a fallback relative to this script (skills/<name>/scripts → bin/lib).
13
-
14
- import fs from 'node:fs';
15
- import path from 'node:path';
16
- import process from 'node:process';
17
- import { fileURLToPath, pathToFileURL } from 'node:url';
18
-
19
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
20
- const SKILL_DIR = path.resolve(__dirname, '..'); // skills/adia-ui-authoring
21
- const SKILLS_ROOT = path.resolve(SKILL_DIR, '..'); // skills/
22
- const PLUGIN_ROOT = process.env.CLAUDE_PLUGIN_ROOT
23
- ? path.resolve(process.env.CLAUDE_PLUGIN_ROOT)
24
- : path.resolve(SKILL_DIR, '..', '..'); // plugin root
25
-
26
- const SKILL_MD = path.join(SKILL_DIR, 'SKILL.md');
27
- const SKILL_JSON = path.join(SKILL_DIR, 'skill.json');
28
-
29
- // Resolve the shared audit-axes library from the plugin root, falling back
30
- // to the script-relative location if the env var isn't set.
31
- const auditAxesPath = (() => {
32
- const fromEnv = path.join(PLUGIN_ROOT, 'bin', 'lib', 'audit-axes.mjs');
33
- if (fs.existsSync(fromEnv)) return fromEnv;
34
- return path.resolve(__dirname, '..', '..', '..', 'bin', 'lib', 'audit-axes.mjs');
35
- })();
36
-
37
- const { runUniversalAxes, formatResults } = await import(pathToFileURL(auditAxesPath).href);
38
-
39
- // [name, expected-redirect-path or null if already-gone]. The legacy
40
- // skills these absorbed were never carried into this plugin, so every
41
- // entry is expected to be absorbed-clean (no directory present).
42
- const ABSORBED = [
43
- ['primitive-audit', null],
44
- ['component-token-audit', null],
45
- ['llm-bridge-extension', null],
46
- ['adia-ui-code-bestpractices', null],
47
- ['bespoke-shell-children', null],
48
- ['promote-inline-to-module', null],
49
- ];
50
-
51
- const CLEAN_STATUSES = ['absorbed-clean', 'absorbed-clean-deleted', 'redirect-ok'];
52
-
53
- function parseArgs(argv) {
54
- if (argv.includes('--help') || argv.includes('-h')) {
55
- console.log(`audit-authoring-roster.mjs — adia-ui-authoring §SelfAudit.
56
-
57
- USAGE
58
- node scripts/audit-authoring-roster.mjs [--json] [--strict]
59
-
60
- FLAGS
61
- --json Emit findings as JSON instead of human text
62
- --strict Exit 1 on any drifting axis
63
- --help Show this help
64
-
65
- AXES (universal axes from \${CLAUDE_PLUGIN_ROOT}/bin/lib/audit-axes.mjs)
66
- 1 Manifest enforcement — skill.json files[] matches disk (recursive)
67
- 2 Reference graph — every markdown link inside SKILL.md resolves
68
- 3 Capability-menu drift — every §ColdStartTriage row's entry reference exists
69
- 4 Version-literal parity — SKILL.md frontmatter version matches skill.json
70
- 5 Phase-label absence — no stale Phase N annotations in skill prose
71
- 6 Fence-leak detection — no orphan fence markers
72
- 7 Content currency — references cited by skill.json exist on disk
73
- 8 CLI helper currency — npm scripts cited by SKILL.md (skips substrate-only)
74
-
75
- 9 Authoring-roster currency (skill-specific) — every absorbed skill has a
76
- redirect SKILL.md at the expected path or is absorbed-clean (no directory).
77
-
78
- EXIT CODES
79
- 0 All axes clean
80
- 1 At least one axis drifting (with --strict)
81
- `);
82
- process.exit(0);
83
- }
84
- return { json: argv.includes('--json'), strict: argv.includes('--strict') };
85
- }
86
-
87
- function axis9_authoringRosterCurrency() {
88
- const findings = [];
89
- for (const [name, redirectPath] of ABSORBED) {
90
- if (redirectPath === null) {
91
- const dir = path.join(SKILLS_ROOT, name);
92
- if (fs.existsSync(dir)) {
93
- findings.push({ type: 'unexpected-directory', message: `${name}/ exists but was claimed absorbed-and-gone`, name });
94
- } else {
95
- findings.push({ type: 'absorbed-clean', message: `${name}: no directory — correct`, name });
96
- }
97
- } else {
98
- const full = path.join(PLUGIN_ROOT, redirectPath);
99
- if (!fs.existsSync(full)) {
100
- const dir = path.dirname(full);
101
- findings.push({
102
- type: fs.existsSync(dir) ? 'redirect-missing' : 'absorbed-clean-deleted',
103
- message: fs.existsSync(dir)
104
- ? `${name}: expected redirect at ${redirectPath} — not found`
105
- : `${name}: fully deleted post-soak`,
106
- name,
107
- });
108
- } else {
109
- const txt = fs.readFileSync(full, 'utf8');
110
- findings.push(
111
- /status:\s*redirect/m.test(txt)
112
- ? { type: 'redirect-ok', message: `${name}: redirect ok`, name }
113
- : { type: 'redirect-not-tagged', message: `${name}: ${redirectPath} lacks 'status: redirect'`, name }
114
- );
115
- }
116
- }
117
- }
118
- const driftCount = findings.filter(f => !CLEAN_STATUSES.includes(f.type)).length;
119
- return {
120
- axis: 'authoringRosterCurrency',
121
- axis_num: 9,
122
- status: driftCount > 0 ? 'drift' : 'ok',
123
- findings,
124
- summary: driftCount > 0 ? `${driftCount} absorbed-skill issue(s)` : 'all absorbed-skill entries clean',
125
- };
126
- }
127
-
128
- function main() {
129
- const args = parseArgs(process.argv.slice(2));
130
- const ctx = { skillDir: SKILL_DIR, skillMd: SKILL_MD, skillJson: SKILL_JSON, repoRoot: PLUGIN_ROOT };
131
- const { results: universal } = runUniversalAxes(ctx);
132
- const axis9 = axis9_authoringRosterCurrency();
133
- const allResults = [...universal, axis9];
134
- const driftCount = allResults.filter(r => r.status === 'drift').length;
135
-
136
- if (args.json) {
137
- console.log(JSON.stringify({ results: allResults, driftCount }, null, 2));
138
- if (args.strict && driftCount > 0) process.exit(1);
139
- return;
140
- }
141
-
142
- console.log(`[audit-authoring-roster] adia-ui-authoring §SelfAudit — ${driftCount} drifting axis/axes`);
143
- console.log(formatResults(allResults));
144
- if (driftCount === 0) console.log('\n✓ All clean.');
145
- if (args.strict && driftCount > 0) process.exit(1);
146
- }
147
-
148
- main();
@@ -1,45 +0,0 @@
1
- {
2
- "name": "adia-ui-authoring",
3
- "version": "1.9.2",
4
- "description": "Author or modify code INSIDE the adia-ui (@adia-ai) monorepo — primitives in packages/web-components/, composite shells in packages/web-modules/, inline page content promoted to reusable modules, composite/module demos (.examples.html, .contents.html), the @adia-ai/llm bridge, the trait catalog, .a2ui.json sidecars, yaml SoTs — clearing the four-axis contract before review and VERIFYING against the built/rendered artifact (build:components --verify, the primitive's demo page, the rendered-DOM probe), never 'looks done'. Use whenever the user wants to ADD A NEW PRIMITIVE / MODIFY A COMPONENT / FIX A YAML / PROMOTE INLINE TO MODULE / UPDATE A SHELL / AUTHOR A DEMO FOR A COMPOSITE OR MODULE / COMPOSE EXAMPLES.HTML / EXTEND THE LLM BRIDGE — the work happens on packages/* source, not on consumer code. Triggers on 'add a primitive', 'modify table-ui yaml', 'author a new web-module shell', 'trait catalog regenerated wrong', 'promote inline CSS to a module', 'audit the four-axis contract', '.a2ui.json sidecar is stale', 'set up LLM-bridge surface', 'author a demo for X', 'compose examples.html for Y', any edit under packages/web-modules/**/*.examples.html or **/*.contents.html. Does NOT trigger for: composing screens FROM existing primitives in consumer/app code (the adia-ui-factory plugin), cutting a release (adia-ui-release), generation-pipeline internals (adia-ui-a2ui), scoring generated UI quality (adia-ui-gen-review), broad cross-surface QA (adia-ui-dogfood). Absorbs primitive-audit + component-token-audit + code-bestpractices + bespoke-shell-children + promote-inline-to-module + llm-bridge-extension.",
5
- "status": "stable",
6
- "authors": ["kim.granlund"],
7
- "codeowners": [],
8
- "tags": ["adia-ui", "web-components", "web-modules", "design-system", "component-authoring", "tokens", "light-dom", "scope-css", "lifecycle", "form-associated", "shell-patterns", "inline-to-module", "llm-bridge", "composite-demo"],
9
- "depends_on": [],
10
- "peer_skills": ["adia-ui-release", "adia-ui-a2ui", "adia-ui-llm", "adia-ui-gen-review", "adia-ui-dogfood", "ui-audit-coherence", "analyze-css", "ui-build-components"],
11
- "environment": {
12
- "portable": false,
13
- "requires": ["the adia-ui (@adia-ai) framework monorepo with packages/web-components/, packages/web-modules/, packages/llm/, packages/a2ui/, and the component-token-contract spec"],
14
- "rationale": "Every mode operates on monorepo-specific source layout, build scripts, and the four-axis contract; it does not apply to consumer repos."
15
- },
16
- "files": [
17
- "SKILL.md",
18
- "CHANGELOG.md",
19
- "skill.json",
20
- "references/primitive-audit.md",
21
- "references/authoring-cycle.md",
22
- "references/code-style.md",
23
- "references/api-contract.md",
24
- "references/yaml-contract.md",
25
- "references/css-patterns.md",
26
- "references/lifecycle-patterns.md",
27
- "references/shell-patterns.md",
28
- "references/module-promotion.md",
29
- "references/token-contract.md",
30
- "references/llm-bridge.md",
31
- "references/teach-protocol.md",
32
- "references/composite-demo-protocol.md",
33
- "references/canonical-pattern-index.md",
34
- "references/common-gotchas.md",
35
- "references/anti-patterns.md",
36
- "references/worked-example.md",
37
- "scripts/audit-authoring-roster.mjs",
38
- "scripts/build-canonical-pattern-index.mjs",
39
- "evals/routing-corpus.json",
40
- "evals/adversarial-design-plan-gates.json",
41
- "assets/case-studies/maxtokens-32768-discovery.md",
42
- "assets/case-studies/admin-shell-decomposition.md",
43
- "assets/case-studies/theme-panel-promotion.md"
44
- ]
45
- }
@@ -1,17 +0,0 @@
1
- # Changelog — adia-ui-dogfood
2
-
3
- ## [0.1.0] stable — 2026-06-03
4
-
5
- **MINOR** — first cut as a plugin skill. Ported from the framework monorepo's maintainer skill `dogfood-sweep`, renamed and de-repo'd: absolute paths stripped, shared-infra references rewritten to `${CLAUDE_PLUGIN_ROOT}/...`, the component visual probe bundled at `scripts/analyze.mjs` (repo-root resolved from `$ADIA_REPO_ROOT` / cwd, not a path relative to the install), instance data dropped. No procedural changes to the 6 modes.
6
-
7
- SKILL.md carries all 6 modes inline (component visual probe / app-shell QA / HTML typo sweep / native-primitive leak / admin-shell composition / component anatomy + card header), with a cold-start triage menu, §Plan-Execute-Verify, §SelfAudit, §Teach, and §FileMap added to match the rollup-family conventions. Modes 2 / 4 / 5 drive **repo-local** audit scripts that ship in the monorepo (`scripts/dev/audit-app-shells.mjs`, `audit-native-primitive-leak.mjs`, `audit-shell-composition.mjs`); modes 3 / 6 use inline shell snippets.
8
-
9
- ### Reconstructed history (pre-port)
10
-
11
- - Added probe #6 (missing component CSS detection) to mode 1 after the swap-to-primitive-but-forget-the-link class slipped past a real PR. The bug class: an agent uses `<button-ui>` markup but forgets the `<link rel="stylesheet">` for the button component CSS; the element registers, the markup looks right, and the control renders unstyled.
12
-
13
- - Native-primitive-leak audit (mode 4) intent-marker detection window widened from 80 → 200 chars after a peer agent found that realistic preceding-line comments (indent + comment prefix + reason text + closing `-->` + newline) sat at exactly the 80-char boundary and were not detected.
14
-
15
- - Mode 6 (Component Anatomy + Card Header Sweep) added: card-ui `<header><div>` wrapper anti-pattern + missing anatomy sections per the anatomy-sweep gate's expectations.
16
-
17
- - Mode 1 (component visual probe via Chromium) was the initial skill. Modes 2–5 were absorbed from the substrate-side `scripts/dev/audit-*.mjs` work over multiple cycles. The skill grew its 6-mode catalog organically.