@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,144 +0,0 @@
1
- ---
2
- name: rubric-cosmetic
3
- description: >
4
- Phase 4 rubric — visual and cosmetic quality audit of the canvas screenshot.
5
- Covers geometry, spacing, optical alignment, visual balance, and token usage.
6
- Separate from structural correctness (rubric-score.md).
7
- ---
8
-
9
- # Rubric — Cosmetic & Visual Quality
10
-
11
- **Used in**: Phase 4 of loop-protocol.md. **Input**: The canvas screenshot from Phase 2. **Output**: P1/P2/P3 issue count and issue list. P1 blocks prompt from PASSING.
12
-
13
- ---
14
-
15
- ## §Thresholds
16
-
17
- A prompt is considered **cosmetically PASSING** when:
18
-
19
- - P1 count = 0
20
- - P2 count ≤ 2
21
- - P3 count ≤ 4
22
-
23
- A prompt has a **cosmetic BLOCK** (cannot be marked PASSING overall) when:
24
-
25
- - P1 count ≥ 1
26
-
27
- ---
28
-
29
- ## §Severity Definitions
30
-
31
- | Severity | Meaning | Example |
32
- | --- | --- | --- |
33
- | **P1** | User-visible layout failure; something looks broken or unusable | Content overflows canvas, zero-height element, overlapping text, invisible text on background |
34
- | **P2** | Noticeably wrong; degrades quality but doesn't break functionality | Wrong padding on form fields, badge sitting outside its container, inconsistent gap scale |
35
- | **P3** | Minor cosmetic; acceptable but suboptimal | Slightly off optical alignment, minor spacing inconsistency, icon size mismatch |
36
-
37
- ---
38
-
39
- ## §Cosmetic Dimensions
40
-
41
- ### COS-1 — Container geometry (P1/P2/P3)
42
-
43
- Does each container use its space correctly?
44
-
45
- Questions:
46
-
47
- - Does any container have zero height or width when it should be non-zero? → P1
48
- - Does any container overflow its parent visibly? → P1
49
- - Is the aspect ratio of cards or images distorted? → P2
50
- - Are containers expanding beyond their content without reason? → P2
51
- - Is whitespace inside containers balanced (not all padding on one side)? → P3
52
-
53
- ### COS-2 — Spacing scale (P1/P2/P3)
54
-
55
- Is the spacing system applied consistently?
56
-
57
- Questions:
58
-
59
- - Are there any elements with 0 visible gap when there should be clear separation? → P1
60
- - Are any spacing values visually inconsistent within the same region (e.g. 3px between some fields, 20px between others)? → P2
61
- - Is the spacing scale consistent with the AdiaUI token scale (multiples of 4px)? → P3
62
- - Are margins and paddings balanced optically (left margin ≈ right margin in a centred block)? → P3
63
-
64
- ### COS-3 — Optical alignment (P2/P3)
65
-
66
- Are elements optically aligned?
67
-
68
- Questions:
69
-
70
- - Are text baselines misaligned across a horizontal row? → P2
71
- - Are icons vertically centred against their companion text? → P2 or P3
72
- - Are action buttons aligned to the trailing edge of their container? → P3
73
- - Are labels flush-left consistently within their group? → P3
74
-
75
- ### COS-4 — Visual balance (P2/P3)
76
-
77
- Does the composition feel balanced?
78
-
79
- Questions:
80
-
81
- - Is there a single element that dominates the canvas with no visual counterweight? → P2
82
- - Are left/right or top/bottom regions visually balanced relative to their importance? → P3
83
- - Are font weight / size contrast ratios appropriate (heading vs body vs label)? → P2 if heading and body are same weight
84
-
85
- ### COS-5 — Token usage signals (P2/P3)
86
-
87
- Can we infer any token misuse from the visual output?
88
-
89
- Questions:
90
-
91
- - Does any text appear at very low contrast against its background? → P2 (potential fg-subtle on bg-subtle)
92
- - Does any background appear black/white when it should be a subtle tint? → P2
93
- - Does any border appear too thick or too thin for its context? → P3
94
- - Does any component appear unstyled (default browser styles bleeding through)? → P1
95
-
96
- ### COS-6 — Empty state quality (P2/P3)
97
-
98
- For prompts where the canvas generates an empty or skeleton state:
99
-
100
- Questions:
101
-
102
- - Is the empty state visually communicative (not just a blank box)? → P2 if blank
103
- - Does the empty state have appropriate height (not collapsed to near-zero)? → P2 if collapsed
104
- - Is placeholder text readable and appropriately styled? → P3
105
-
106
- ---
107
-
108
- ## §Issue Format
109
-
110
- Record each issue as a severity + location + observation:
111
-
112
- ```json
113
- [
114
- { "severity": "P1", "location": "card-ui root", "issue": "Card height is zero — canvas-ui likely returned empty components array" },
115
- { "severity": "P2", "location": "field-ui email label", "issue": "Label appears right-aligned instead of left-aligned; field-ui inline mode applied incorrectly" },
116
- { "severity": "P2", "location": "action button", "issue": "button-ui primary appears clipped — container max-width cutting off trailing padding" },
117
- { "severity": "P3", "location": "col-ui body gap", "issue": "Gap between form fields inconsistent — some 8px, some 16px" }
118
- ]
119
- ```
120
-
121
- ---
122
-
123
- ## §Screenshot Reading Protocol
124
-
125
- When reading the screenshot:
126
-
127
- 1. First scan for P1 issues (broken layout, overflow, invisible content).
128
- 2. Then scan each region top-to-bottom for P2 issues.
129
- 3. Finally note P3 issues.
130
- 4. Do not infer issues beyond what is visible — if you cannot see the spacing value, note "spacing appears inconsistent" not "gap is 7px".
131
- 5. Use the prompt context to evaluate intent: a loading skeleton that looks sparse is correct; a completed form that looks sparse may be a COS-6 finding.
132
-
133
- ---
134
-
135
- ## §Connection to Root Causes
136
-
137
- Cosmetic findings often trace to one of:
138
-
139
- - **Canvas CSS** — the gallery's `gallery-canvas-wrap` or canvas-ui CSS.
140
- - **Component CSS** — the a2ui-root rendering inside canvas-ui picks up component token overrides.
141
- - **Template attrs missing** — `gap=` not in the component node; default renders without spacing.
142
- - **Wrong primitive** — a structurally wrong primitive that doesn't support the expected layout.
143
-
144
- Record the suspected connection in the finding when it's obvious. Phase 5 (root cause) confirms it.
@@ -1,117 +0,0 @@
1
- ---
2
- name: rubric-decompose
3
- description: >
4
- Phase 2 rubric — evaluates the structured decomposition of the actual
5
- canvas output. Measures the quality and completeness of the analysis,
6
- not the quality of the generated output (that's rubric-score.md).
7
- ---
8
-
9
- # Rubric — Canvas Decomposition
10
-
11
- **Used in**: Phase 2 of loop-protocol.md. **Input**: Screenshot + DOM tree from the canvas-ui render. **Output**: A score 0–100 and a list of findings (not yet compared to Spec).
12
-
13
- ---
14
-
15
- ## §Thresholds
16
-
17
- | Level | Score | Meaning |
18
- | --- | --- | --- |
19
- | **Excellence** | 85–100 | Complete outside-in decomposition; every element identified with correct primitive name |
20
- | **Acceptable** | 65–84 | Minor gaps in decomposition — one level missed, or one element misidentified |
21
- | **Failing** | 0–64 | Decomposition incomplete; root container or major child missed |
22
-
23
- **Gate score to pass this phase**: ≥ 65. Failing decomposition invalidates the score in Phase 3.
24
-
25
- ---
26
-
27
- ## §Decomposition Protocol
28
-
29
- The agent must walk the DOM from **outside-in**, exactly in this order:
30
-
31
- 1. **Root container** — What is the outermost element tag? (`canvas-ui` renders to a2ui-root, then the component tree. The "root" is the first rendered component node.)
32
- 2. **Layout strategy** — flex? grid? col-ui? row-ui? raw block?
33
- 3. **Primary regions** — Header / body / footer? Named card slots? Left/right panes?
34
- 4. **Content regions** — For each primary region, what primitives fill it?
35
- 5. **Leaf nodes** — What are the text nodes, icon nodes, button nodes at the leaves?
36
- 6. **Data binding** — What attributes carry content? (`text=`, `label=`, `value=`, `icon=`, etc.)
37
-
38
- For each level, the agent must name:
39
-
40
- - The element tag (e.g. `card-ui`, `col-ui`, `field-ui`)
41
- - Key attributes observed (e.g. `variant="primary"`, `icon="email"`)
42
- - Slot placement if a slotted child (e.g. `slot="action"`)
43
-
44
- ---
45
-
46
- ## §Dimensions
47
-
48
- Score each dimension 0–20. Total = sum of 5 dimensions.
49
-
50
- ### D1 — Root container identification (0–20)
51
-
52
- | Score | Description |
53
- | ----- | ------------------------------------------------ |
54
- | 18–20 | Correct tag + key attrs recorded |
55
- | 13–17 | Tag correct, attrs incomplete |
56
- | 8–12 | Tag partially correct (e.g. "some card element") |
57
- | 0–7 | Root not identified or wrong |
58
-
59
- ### D2 — Layout strategy accuracy (0–20)
60
-
61
- | Score | Description |
62
- | ----- | ------------------------------------------------------------------- |
63
- | 18–20 | Layout primitive named correctly with direction + gap if applicable |
64
- | 13–17 | Layout type correct but gap or direction missing |
65
- | 8–12 | "stacked" or "column" without naming the primitive |
66
- | 0–7 | Layout not described or incorrect |
67
-
68
- ### D3 — Primary and secondary region completeness (0–20)
69
-
70
- Score based on how many key regions were identified vs missed.
71
-
72
- - If the canvas has a card header, body section, and footer: all three must be named.
73
- - Partial credit proportional to regions identified.
74
-
75
- ### D4 — Primitive identification accuracy (0–20)
76
-
77
- For each named element, is the primitive correctly identified?
78
-
79
- - `button-ui` not `button` or "a button"
80
- - `field-ui` not `div with label`
81
- - `badge-ui` not "small colored text"
82
-
83
- Deduct 3 per misidentified primitive. Floor 0.
84
-
85
- ### D5 — Data binding capture (0–20)
86
-
87
- Were the key attrs recorded?
88
-
89
- - Content-carrying attrs: `text=`, `label=`, `value=`, `icon=`, `heading=`
90
- - Structural attrs: `variant=`, `size=`, `gap=`, `columns=`
91
- - Missing attrs that were visible: deduct 4 each. Floor 0.
92
-
93
- ---
94
-
95
- ## §Screenshot Requirements
96
-
97
- The agent must confirm:
98
-
99
- - [ ] Screenshot taken AFTER `canvas-ui.processAll()` settles (≥2s wait).
100
- - [ ] Clip is the `.gallery-canvas-wrap` bounding box exactly.
101
- - [ ] Screenshot is saved to the cycle's `screenshots/<slug>.png`.
102
- - [ ] If canvas height is < 50px, flag as RENDER_FAILURE and skip Phase 3.
103
-
104
- ---
105
-
106
- ## §Findings Format
107
-
108
- Record findings as descriptive strings (observations, not judgments):
109
-
110
- ```json
111
- [
112
- "Root: card-ui (no size or variant attrs visible)",
113
- "Layout: col-ui gap=3 inside section slot",
114
- "Missing: no footer slot populated; actions appear inline in body",
115
- "D5: button-ui text attr absent — label rendered via ::after pseudo, not captured"
116
- ]
117
- ```
@@ -1,249 +0,0 @@
1
- ---
2
- name: rubric-score
3
- description: >
4
- Phase 3 rubric — A-vs-B gap scoring. Compares the ideal spec (Phase 1)
5
- against the actual canvas decomposition (Phase 2) across five structural
6
- dimensions plus one mechanical intent check. Max score: 105.
7
- (v2.0.0: D6 replaced with mechanical root-component match check;
8
- rubric-spec.md deleted — Phase 1 no longer scored.)
9
- ---
10
-
11
- # Rubric — A-vs-B Gap Score (Fidelity)
12
-
13
- **Used in**: Phase 3 of loop-protocol.md. **Input**: `spec.*` fields from Phase 1 + the decomposed trust-boundary file from Phase 2. **Output**: Score 0–105, delta vs prior cycle, per-dimension breakdown.
14
-
15
- > The input is ALWAYS the sanitized decomposed file — never the raw DOM. See §TrustBoundary in loop-protocol.md.
16
-
17
- ---
18
-
19
- ## §Thresholds
20
-
21
- Max score is 105 (D1–D5 at 20 each = 100; D6 mechanical = 0 or +5).
22
-
23
- | Level | Score | Meaning |
24
- | --- | --- | --- |
25
- | **Excellence** | 92–105 | Generated output matches the ideal spec with only cosmetic gaps |
26
- | **Acceptable** | 70–91 | Structural intent met; minor primitive substitutions or missing secondary elements |
27
- | **Failing** | 0–69 | Wrong root container, wrong layout strategy, or primary intent not represented |
28
-
29
- **Exit condition gate**: every prompt at Excellence (92+) AND no prompt has `overflowElements.length > 0` in its decomposed file.
30
-
31
- ---
32
-
33
- ## §VisualGate (independent of structural score)
34
-
35
- **The visual gate is evaluated from `decomposed.overflowElements` before Phase 3 scoring. It cannot be compensated by a high structural score.**
36
-
37
- A prompt with `rubricScore.score ≥ 92` is still **FAILING** if:
38
-
39
- - `overflowElements.length > 0` — mechanically detected text/layout clipping
40
-
41
- Each overflow entry auto-promotes to a **P1 cosmetic finding** in Phase 4:
42
-
43
- - `p1Count += 1` per overflow element
44
- - Issue text: `"[tag] content clipped — overflow:hidden with scrollWidth > clientWidth"`
45
-
46
- This enforces the independence of visual and structural review lanes:
47
-
48
- - **Structural lane** (Phase 3): correct component types, nesting, attributes
49
- - **Visual lane** (Phase 2→4 overflow gate): legible, unclipped, visible render
50
-
51
- A prompt must clear both lanes independently. The analytics-chart case (score 93, all stat labels clipped to "T.." and "$..", chart invisible) is the canonical example of structural pass / visual fail.
52
-
53
- ---
54
-
55
- ## §Dimensions
56
-
57
- Score each dimension 0–20 except D6 (0–10 modifier). Apply D6 as a bonus or penalty on top of D1–D5.
58
-
59
- ### D1 — Root container fidelity (0–20)
60
-
61
- Does the actual root container match the spec?
62
-
63
- | Score | Condition |
64
- | --- | --- |
65
- | 20 | Exact match: same tag + same key attrs |
66
- | 15 | Same tag, minor attr difference (missing `size` or `variant`) |
67
- | 10 | Same category (both are card-like, or both are layout-only) |
68
- | 5 | Wrong category but not catastrophically wrong |
69
- | 0 | Completely wrong (e.g. bare div where card-ui expected; form stamped as table) |
70
-
71
- ### D2 — Layout strategy fidelity (0–20)
72
-
73
- Does the actual layout direction / primitive match the spec?
74
-
75
- | Score | Condition |
76
- | --- | --- |
77
- | 20 | Exact: same layout primitive, same gap, same direction |
78
- | 15 | Same direction (vertical/horizontal) but wrong primitive or missing gap attr |
79
- | 10 | Layout direction correct; gap incorrect or missing |
80
- | 5 | Wrong direction but content still readable |
81
- | 0 | Horizontal where vertical required (or vice versa), or no layout applied |
82
-
83
- ### D3 — Slot vocabulary fidelity (0–20)
84
-
85
- For slotted components (card-ui, drawer-ui, modal-ui, etc.): do the slot placements match?
86
-
87
- Key slot contracts to check:
88
-
89
- - card-ui: header → `slot=icon`, `slot=heading`, `slot=description`, `slot=action`; body → `<section>` child; footer → `slot="footer"` on footer element
90
- - list-item-ui: `slot=icon`, `slot=text`, `slot=description`, `slot=action`
91
- - field-ui: no slots — content is the control child
92
-
93
- Score: 18–20 = all key slots correct. Deduct 5 per incorrect or missing slot placement. Floor 0.
94
-
95
- ### D4 — Primitive accuracy (0–20)
96
-
97
- For each key element, does the actual primitive match what the spec required?
98
-
99
- Compare `spec.keyComponents` (A) against `decomposed.components` (B):
100
-
101
- - 20 = all key elements match
102
- - Deduct 5 per wrong primitive (component in B not matching corresponding component in A)
103
- - Deduct 3 per missing element (in A but absent from B)
104
- - Deduct 2 per unexpected element (in B but absent from A)
105
- - Floor 0
106
-
107
- Use the lookup table in loop-protocol.md §Phase 2 for tag-to-name mapping. Do NOT use rubric-spec.md D3 (that file was deleted in v2.0.0).
108
-
109
- ### D5 — Content and data binding fidelity (0–20)
110
-
111
- Are the key attrs populated with meaningful content?
112
-
113
- | Attr | Expected | Deduct if missing |
114
- | ----------------------- | ------------------------ | ----------------- |
115
- | `text=` on button-ui | Non-empty action label | –4 |
116
- | `label=` on field-ui | Describes the field | –3 |
117
- | `value=` on stat-ui | Shows a realistic number | –4 |
118
- | `change=` on stat-ui | Shows trend delta | –2 |
119
- | `icon=` on button/nav | Correct semantic icon | –3 |
120
- | `variant=` on badge/tag | Correct semantic variant | –2 |
121
-
122
- Score: Start at 20. Apply deductions. Floor 0.
123
-
124
- ### D6 — Root component match (mechanical, 0 or +5)
125
-
126
- Does `decomposed.rootComponent` (from Phase 2 lookup) match `spec.rootComponent` (from Phase 1 spec output)?
127
-
128
- | Score | Condition |
129
- | ----- | ------------------------------------------------------------- |
130
- | +5 | Exact tag match (both are "Card", or both are "Column", etc.) |
131
- | 0 | Different root component |
132
-
133
- This is a single mechanical lookup comparison — no agent judgment required. It replaced the former ±10 subjective "intent satisfaction modifier" (v2.0.0). The human QA gate in §Cycle Close covers intent verification for the cycle.
134
-
135
- ---
136
-
137
- ## §Delta Calculation
138
-
139
- For each prompt:
140
-
141
- ```text
142
- delta = rubricScore.score(cycle N) - rubricScore.score(cycle N-1)
143
- ```
144
-
145
- - Positive delta = improvement.
146
- - Zero delta = no change (investigate if this persists two cycles).
147
- - Negative delta = regression (must be explained in root-cause analysis before cycle N+1).
148
-
149
- If no prior cycle exists, delta = null.
150
-
151
- ---
152
-
153
- ## §Root-Cause Classification
154
-
155
- For each gap found in D1–D5, classify the cause:
156
-
157
- | Code | Cause |
158
- | --- | --- |
159
- | `WRONG_CHUNK` | Retrieval returned the wrong corpus chunk (wrong content for intent) |
160
- | `EMPTY_CHUNK` | Chunk exists but template has no useful attrs (props not transpiled) |
161
- | `WRONG_COMPONENT` | Chunk has the right structure but wrong primitive (e.g. select-ui children are Text nodes) |
162
- | `MISSING_PROPS` | Component present but key attrs not set (label, text, value) |
163
- | `WRONG_NESTING` | Component used correctly but placed at wrong DOM depth |
164
- | `TRANSPILER_GAP` | Prop not in catalog; transpiler cannot extract it |
165
- | `RETRIEVAL_SCORE` | Correct chunk exists but scored lower than wrong chunk |
166
- | `FREE_FORM_HALLUC` | Free-form LLM chose a non-existent or wrong primitive |
167
- | `COSMETIC_ONLY` | Structure correct; only visual/spacing issue |
168
-
169
- Record cause codes in `scores.json` per gap entry.
170
-
171
- ---
172
-
173
- ## §DomainMismatchCheck
174
-
175
- Before Phase 3 scoring, verify the retrieved chunk's domain matches the gallery prompt's group. This is a pre-scoring gate, not a rubric dimension:
176
-
177
- ```text
178
- prompt group → expected domains
179
- auth/ → auth, forms
180
- billing/ → billing, settings, forms
181
- dashboard/ → dashboard, data
182
- data-tables/ → data, settings
183
- forms/ → forms, data
184
- content/ → content, layout, marketing
185
- navigation/ → navigation, layout
186
- settings/ → settings, forms
187
- notifications/→ agent, data
188
- team-access/ → settings, data
189
- onboarding/ → onboarding, forms, auth
190
- ```
191
-
192
- If the decomposed rootComponent + components clearly indicate a **different domain** (e.g. email inbox for a contact form prompt, social media post for a blog post prompt), classify as `RETRIEVAL_SCORE` and flag for human QA review. **Do not score these prompts as PASSING without human verification.** DOM scoring will see valid component types regardless of whether the content answers the prompt.
193
-
194
- ---
195
-
196
- ## §KnownGaps — failures the scoring system cannot detect
197
-
198
- These failure classes pass Phase 3 and Phase 4 mechanically but are visually wrong. Human QA (§Cycle Close) is the only gate that catches them unless a computed-style probe is added to Phase 2.
199
-
200
- ### Layout-axis collapse (validated analytics-chart C14)
201
-
202
- **What it is**: Two or more elements that should be on separate lines render on the same line because the wrong CSS display mode is active.
203
-
204
- **Why it passes**: Phase 3 scores component presence — both Text nodes are in the tree, so D4 is satisfied. The overflow visual gate (Phase 4) only detects `scrollWidth > clientWidth`, not wrong-axis layout.
205
-
206
- **Canonical case**: `text-ui` has `display:inline` by default. In a card header where the grid layout didn't activate (because `slot` attribute was dropped during transpilation), an inline `text-ui` collapses next to the block `<h3>` on the same line.
207
-
208
- **Detection**: Only via human QA or a computed-style probe that checks `getComputedStyle(el).display` and `getBoundingClientRect().top` to confirm each Text node occupies a distinct vertical position.
209
-
210
- **Prevention**: In corpus HTML, use native block elements (`h3`, `p`) for card headers with subtitles — see loop-protocol.md §CorpusHTMLPatterns.
211
-
212
- ### Empty chart (no data)
213
-
214
- **What it is**: `chart-ui` renders at 0px height when no data is provided, but the component IS in the DOM tree.
215
-
216
- **Why it passes**: Phase 3 sees `Chart` in the component list — D4 satisfied. The visual gate doesn't flag 0px chart within a card that has other content (the card itself is non-zero height).
217
-
218
- **Detection**: Overflow gate catches 0px chart only if it causes the card to collapse below 50px. Otherwise only human QA.
219
-
220
- **Prevention**: Always provide `data='[…]'` inline on `chart-ui` elements in corpus HTML — see loop-protocol.md §CorpusHTMLPatterns.
221
-
222
- ### Viewport clipping (canvas boundary)
223
-
224
- **What it is**: Content is visually cut off by the canvas viewport edge, not by a CSS `overflow: hidden` boundary.
225
-
226
- **Why it passes**: The overflow detector (the Phase 2 decompose script) only fires on elements where `scrollWidth > clientWidth` AND `overflow: hidden` is computed. If the element is simply wider than the canvas viewport, no CSS overflow rule fires — the content is cut by the browser paint boundary instead.
227
-
228
- **Canonical case**: magic-link-sent alert content "Didn't get th..." — the alert renders fully but the canvas viewport clips the trailing text.
229
-
230
- **Detection**: Only via human visual inspection of the screenshot. The overflow gate misses this class entirely.
231
-
232
- **Prevention**: Keep canvas-bound content narrow (avoid long inline text without wrapping). Use `text-ui align="center"` for centered auth cards.
233
-
234
- ### RETRIEVAL_SCORE failures (wrong content, correct-looking DOM)
235
-
236
- **What it is**: The retrieval engine returns a completely different chunk (email inbox, social media post, etc.) that happens to share component types (Card + List + Avatar) with the expected content.
237
-
238
- **Why it passes**: Phase 3 scores component presence — `Card + List + Avatar = valid structure` regardless of whether those components are showing the right content for the prompt. The visual gate catches clipping, not semantic mismatch.
239
-
240
- **Canonical cases**:
241
-
242
- - contact-form → email inbox (both have Card + Field/List)
243
- - team-members → email inbox (both have List + Avatar + Text)
244
- - blog-post-card → social media post card (both have Card + Avatar + Image)
245
- - invoice-table → invoice detail line-items (both have Card + Table)
246
-
247
- **Detection**: Human QA gate — this IS why §Cycle Close requires human review of 5 sampled prompts. RETRIEVAL_SCORE failures will fool automated scoring every time. See §DomainMismatchCheck for a pre-screening heuristic.
248
-
249
- **Prevention**: Ensure each gallery prompt has a dedicated chunk with highly specific keywords that outscores any generic competitor. The HTML→harvest fix workflow ensures chunks are grounded.