ai-design-context 0.4.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 (288) hide show
  1. package/AGENTS.md +156 -0
  2. package/CHANGELOG.md +71 -0
  3. package/CODE_OF_CONDUCT.md +29 -0
  4. package/CONTRIBUTING.md +128 -0
  5. package/LICENSE +21 -0
  6. package/README.md +283 -0
  7. package/RELEASE_NOTES_v0.1.0.md +45 -0
  8. package/RELEASE_NOTES_v0.3.0.md +47 -0
  9. package/RELEASE_NOTES_v0.4.0.md +29 -0
  10. package/RELEASE_READINESS.md +107 -0
  11. package/ROADMAP.md +60 -0
  12. package/SECURITY.md +40 -0
  13. package/assets/logo.svg +9 -0
  14. package/benchmarks/README.md +19 -0
  15. package/benchmarks/chat.md +37 -0
  16. package/benchmarks/mobile-home-screen.md +38 -0
  17. package/benchmarks/notes-app.md +37 -0
  18. package/benchmarks/settings.md +37 -0
  19. package/benchmarks/shopping-list.md +37 -0
  20. package/benchmarks/todo-app.md +144 -0
  21. package/checklists/DESIGN_QA.md +102 -0
  22. package/checklists/GENERATED_INDEX.md +7 -0
  23. package/docs/AGENT_CONTEXT.md +111 -0
  24. package/docs/BENCHMARK.md +170 -0
  25. package/docs/DESIGNLINT_READINESS.md +110 -0
  26. package/docs/DESIGN_SYSTEM.md +23 -0
  27. package/docs/EVALUATION_RUBRIC.md +154 -0
  28. package/docs/GITHUB_SETUP.md +28 -0
  29. package/docs/GLOSSARY.md +45 -0
  30. package/docs/INDEX.md +109 -0
  31. package/docs/KNOWLEDGE_ENGINE.md +594 -0
  32. package/docs/MOBILE_FIRST.md +18 -0
  33. package/docs/NPM_RELEASE.md +43 -0
  34. package/docs/PATTERN_SPEC.md +113 -0
  35. package/docs/PHILOSOPHY.md +25 -0
  36. package/docs/PRODUCT_THINKING.md +26 -0
  37. package/docs/STYLE_GUIDE.md +49 -0
  38. package/docs/TRACEABILITY.md +45 -0
  39. package/evidence/README.md +64 -0
  40. package/evidence/TEMPLATE.md +46 -0
  41. package/evidence/chat/.gitkeep +1 -0
  42. package/evidence/mobile-home/.gitkeep +1 -0
  43. package/evidence/notes/.gitkeep +1 -0
  44. package/evidence/settings/.gitkeep +1 -0
  45. package/evidence/shopping/.gitkeep +1 -0
  46. package/evidence/todo/.gitkeep +1 -0
  47. package/evidence/todo/2026-06-25-codex-gpt-5/EVALUATION.md +66 -0
  48. package/evidence/todo/2026-06-25-codex-gpt-5/README.md +40 -0
  49. package/evidence/todo/2026-06-25-codex-gpt-5/ai-design-rules/generated-output.md +163 -0
  50. package/evidence/todo/2026-06-25-codex-gpt-5/ai-design-rules/metadata.json +38 -0
  51. package/evidence/todo/2026-06-25-codex-gpt-5/ai-design-rules/notes.md +20 -0
  52. package/evidence/todo/2026-06-25-codex-gpt-5/ai-design-rules/prompt.md +16 -0
  53. package/evidence/todo/2026-06-25-codex-gpt-5/ai-design-rules/scores.md +18 -0
  54. package/evidence/todo/2026-06-25-codex-gpt-5/baseline/generated-output.md +98 -0
  55. package/evidence/todo/2026-06-25-codex-gpt-5/baseline/metadata.json +19 -0
  56. package/evidence/todo/2026-06-25-codex-gpt-5/baseline/notes.md +19 -0
  57. package/evidence/todo/2026-06-25-codex-gpt-5/baseline/prompt.md +9 -0
  58. package/evidence/todo/2026-06-25-codex-gpt-5/baseline/scores.md +18 -0
  59. package/evidence/todo/2026-09-28-codex-paired-todo/EVALUATION.md +70 -0
  60. package/evidence/todo/2026-09-28-codex-paired-todo/README.md +52 -0
  61. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/GENERATION_NOTES.md +133 -0
  62. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/app.js +289 -0
  63. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/context/context-preserving-preview.json +443 -0
  64. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/context/daily-home-surface.json +373 -0
  65. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/context/quick-capture.json +301 -0
  66. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/context/sources-read.txt +36 -0
  67. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/generated-output.md +11 -0
  68. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/index.html +64 -0
  69. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/launch-prompt.md +1 -0
  70. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/metadata.json +55 -0
  71. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/notes.md +15 -0
  72. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/parent-status-message.md +1 -0
  73. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/prompt.md +49 -0
  74. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/runtime-checks.json +776 -0
  75. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/scores.md +20 -0
  76. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-completed.png +0 -0
  77. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-default.png +0 -0
  78. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-detail-reduced-motion.png +0 -0
  79. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-detail.png +0 -0
  80. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-empty.png +0 -0
  81. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-keyboard-focus.png +0 -0
  82. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-save-error.png +0 -0
  83. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-saved.png +0 -0
  84. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-saving.png +0 -0
  85. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/desktop-validation.png +0 -0
  86. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-completed.png +0 -0
  87. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-default.png +0 -0
  88. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-detail-reduced-motion.png +0 -0
  89. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-detail.png +0 -0
  90. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-empty.png +0 -0
  91. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-keyboard-focus.png +0 -0
  92. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-save-error.png +0 -0
  93. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-saved.png +0 -0
  94. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-saving.png +0 -0
  95. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/screenshots/mobile-validation.png +0 -0
  96. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/source-hashes.json +5 -0
  97. package/evidence/todo/2026-09-28-codex-paired-todo/ai-design-rules/styles.css +122 -0
  98. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/GENERATION_NOTES.md +86 -0
  99. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/app.js +303 -0
  100. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/generated-output.md +11 -0
  101. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/index.html +71 -0
  102. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/launch-prompt.md +1 -0
  103. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/metadata.json +55 -0
  104. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/notes.md +15 -0
  105. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/parent-status-message.md +1 -0
  106. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/prompt.md +49 -0
  107. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/runtime-checks.json +772 -0
  108. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/scores.md +20 -0
  109. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-completed.png +0 -0
  110. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-default.png +0 -0
  111. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-detail-reduced-motion.png +0 -0
  112. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-detail.png +0 -0
  113. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-empty.png +0 -0
  114. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-keyboard-focus.png +0 -0
  115. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-save-error.png +0 -0
  116. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-saved.png +0 -0
  117. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-saving.png +0 -0
  118. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/desktop-validation.png +0 -0
  119. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-completed.png +0 -0
  120. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-default.png +0 -0
  121. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-detail-reduced-motion.png +0 -0
  122. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-detail.png +0 -0
  123. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-empty.png +0 -0
  124. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-keyboard-focus.png +0 -0
  125. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-save-error.png +0 -0
  126. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-saved.png +0 -0
  127. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-saving.png +0 -0
  128. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/screenshots/mobile-validation.png +0 -0
  129. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/source-hashes.json +5 -0
  130. package/evidence/todo/2026-09-28-codex-paired-todo/baseline/styles.css +9 -0
  131. package/evidence/todo/2026-09-28-codex-paired-todo/capture-ai-design-rules.js +60 -0
  132. package/evidence/todo/2026-09-28-codex-paired-todo/capture-baseline.js +60 -0
  133. package/evidence/todo/2026-09-28-codex-paired-todo/common/brief.md +35 -0
  134. package/evidence/todo/2026-09-28-codex-paired-todo/common/knowledge-files.json +127 -0
  135. package/evidence/todo/2026-09-28-codex-paired-todo/common/knowledge.patch +890 -0
  136. package/evidence/todo/2026-09-28-codex-paired-todo/common/review-context.json +550 -0
  137. package/evidence/todo/2026-09-28-codex-paired-todo/common/seed.json +86 -0
  138. package/evidence/todo/2026-09-28-codex-paired-todo/common/setup.json +47 -0
  139. package/evidence/todo/2026-09-28-codex-paired-todo/common/technical-envelope.md +11 -0
  140. package/evidence/todo/2026-09-28-codex-paired-todo/layout-metrics.json +133 -0
  141. package/evidence/todo/2026-09-28-codex-paired-todo/layout-probe.js +15 -0
  142. package/examples/GENERATED_INDEX.md +8 -0
  143. package/examples/INDEX.md +16 -0
  144. package/examples/README.md +15 -0
  145. package/examples/consequential-action-confirmation-reference.md +83 -0
  146. package/examples/todo-app-benchmark.md +117 -0
  147. package/examples/todo-reference/README.md +29 -0
  148. package/examples/todo-reference/app.js +154 -0
  149. package/examples/todo-reference/favicon.svg +4 -0
  150. package/examples/todo-reference/index.html +67 -0
  151. package/examples/todo-reference/review-evidence/2026-07-15/desktop-default.png +0 -0
  152. package/examples/todo-reference/review-evidence/2026-07-15/desktop-detail.png +0 -0
  153. package/examples/todo-reference/review-evidence/2026-07-15/mobile-detail.png +0 -0
  154. package/examples/todo-reference/review-evidence/2026-07-15/mobile-error.png +0 -0
  155. package/examples/todo-reference/styles.css +241 -0
  156. package/graph/GENERATED_GRAPH.md +71 -0
  157. package/observations/README.md +23 -0
  158. package/observations/accessibility/reduced-interaction-motion.md +49 -0
  159. package/observations/accessibility/textual-error-recovery.md +50 -0
  160. package/observations/accessibility/visible-keyboard-focus.md +49 -0
  161. package/observations/ai/agent-consequential-action-controls.md +56 -0
  162. package/observations/ai/agent-work-visibility-and-intervention.md +51 -0
  163. package/observations/ai/figma-agent-context-and-skills.md +52 -0
  164. package/observations/finance/high-risk-wallet-recovery-flows.md +55 -0
  165. package/observations/finance/market-interface-adaptive-trading-surfaces.md +55 -0
  166. package/observations/interaction/chrome-scoped-view-transitions.md +52 -0
  167. package/observations/interaction/figma-motion-as-system-capability.md +53 -0
  168. package/observations/mobile/mobile-bottom-sheet-choice-contracts.md +55 -0
  169. package/observations/performance/reserved-loading-space.md +51 -0
  170. package/observations/product-repos/pinned-ai-design-rules-integration.md +49 -0
  171. package/observations/visual/apple-liquid-glass-functional-layer.md +52 -0
  172. package/observations/visual/chrome-content-first-adaptive-ui.md +51 -0
  173. package/observations/visual/material-3-expressive-system.md +52 -0
  174. package/package.json +65 -0
  175. package/patterns/GENERATED_INDEX.md +13 -0
  176. package/patterns/INDEX.md +41 -0
  177. package/patterns/README.md +5 -0
  178. package/patterns/consequential-action-confirmation.md +127 -0
  179. package/patterns/context-preserving-preview.md +145 -0
  180. package/patterns/daily-home-surface.md +134 -0
  181. package/patterns/mobile-primary-action.md +110 -0
  182. package/patterns/object-status-list.md +114 -0
  183. package/patterns/progressive-detail.md +113 -0
  184. package/patterns/quick-capture.md +132 -0
  185. package/prompts/CONSEQUENTIAL_ACTION_REVIEW.md +100 -0
  186. package/prompts/DESIGN_EVIDENCE_REVIEW.md +49 -0
  187. package/prompts/GENERATED_INDEX.md +11 -0
  188. package/prompts/INDEX.md +24 -0
  189. package/prompts/PROTOTYPE_REVIEW.md +189 -0
  190. package/prompts/QUICK_CAPTURE_STATE_REVIEW.md +74 -0
  191. package/prompts/TODO_APP_BENCHMARK.md +88 -0
  192. package/registry/objects.json +568 -0
  193. package/registry/relationships.json +972 -0
  194. package/research/GENERATED_INDEX.md +18 -0
  195. package/research/INDEX.md +40 -0
  196. package/research/accessibility/keyboard-focus-and-interaction-motion.md +62 -0
  197. package/research/accessibility/textual-error-recovery.md +57 -0
  198. package/research/performance/reserved-loading-space.md +56 -0
  199. package/research/products/apple-reminders.md +59 -0
  200. package/research/products/arc.md +61 -0
  201. package/research/products/linear.md +62 -0
  202. package/research/products/telegram.md +61 -0
  203. package/research/products/things-3.md +60 -0
  204. package/research/ux/contextual-agentic-interface.md +68 -0
  205. package/research/ux/high-risk-operational-flows.md +89 -0
  206. package/research/ux/motion-as-state-continuity.md +71 -0
  207. package/research/visual/expressive-system-ui-2026.md +75 -0
  208. package/reviews/GENERATED_INDEX.md +9 -0
  209. package/reviews/README.md +25 -0
  210. package/reviews/consequential-action-confirmation-review.md +92 -0
  211. package/reviews/todo-app-benchmark-reference-review.md +86 -0
  212. package/reviews/todo-reference-fixture-review.md +77 -0
  213. package/rules/GENERATED_INDEX.md +23 -0
  214. package/rules/INDEX.md +37 -0
  215. package/rules/accessibility/A11Y-001.md +58 -0
  216. package/rules/accessibility/A11Y-002.md +55 -0
  217. package/rules/accessibility/A11Y-003.md +54 -0
  218. package/rules/accessibility/A11Y-004.md +54 -0
  219. package/rules/ia/IA-001.md +60 -0
  220. package/rules/ia/IA-002.md +61 -0
  221. package/rules/performance/PERF-001.md +55 -0
  222. package/rules/product/PRD-001.md +61 -0
  223. package/rules/product/PRD-002.md +61 -0
  224. package/rules/ux/UX-001.md +58 -0
  225. package/rules/ux/UX-002.md +61 -0
  226. package/rules/ux/UX-003.md +60 -0
  227. package/rules/ux/UX-004.md +61 -0
  228. package/rules/ux/UX-005.md +62 -0
  229. package/rules/ux/UX-006.md +69 -0
  230. package/rules/visual/VIS-001.md +59 -0
  231. package/rules/visual/VIS-002.md +59 -0
  232. package/schema/checklist.schema.json +21 -0
  233. package/schema/common.schema.json +178 -0
  234. package/schema/observation.schema.json +21 -0
  235. package/schema/pattern.schema.json +21 -0
  236. package/schema/prompt.schema.json +21 -0
  237. package/schema/reference-project.schema.json +21 -0
  238. package/schema/research.schema.json +21 -0
  239. package/schema/review.schema.json +21 -0
  240. package/schema/rule.schema.json +21 -0
  241. package/skills/README.md +48 -0
  242. package/skills/accessibility-reviewer/SKILL.md +101 -0
  243. package/skills/agent-context/SKILL.md +34 -0
  244. package/skills/agent-context/agents/openai.yaml +4 -0
  245. package/skills/design-evidence-researcher/SKILL.md +47 -0
  246. package/skills/design-evidence-researcher/agents/openai.yaml +4 -0
  247. package/skills/design-reviewer/SKILL.md +113 -0
  248. package/skills/design-system-architect/SKILL.md +101 -0
  249. package/skills/information-architect/SKILL.md +97 -0
  250. package/skills/interaction-designer/SKILL.md +104 -0
  251. package/skills/knowledge-graph-architect/SKILL.md +96 -0
  252. package/skills/mobile-ux-expert/SKILL.md +105 -0
  253. package/skills/motion-designer/SKILL.md +100 -0
  254. package/skills/performance-reviewer/SKILL.md +97 -0
  255. package/skills/product-designer/SKILL.md +104 -0
  256. package/skills/prompt-architect/SKILL.md +105 -0
  257. package/skills/reference-driven-design/SKILL.md +119 -0
  258. package/skills/ux-reviewer/SKILL.md +99 -0
  259. package/skills/visual-designer/SKILL.md +107 -0
  260. package/starter-kit/AGENTS.md +37 -0
  261. package/starter-kit/BOOTSTRAP.md +13 -0
  262. package/starter-kit/INSTALL_WITH_AGENT.md +133 -0
  263. package/starter-kit/PROJECT_INTEGRATION.md +60 -0
  264. package/starter-kit/README.md +41 -0
  265. package/starter-kit/benchmarks/BENCHMARK_CHECKLIST.md +10 -0
  266. package/starter-kit/docs/DESIGN_DECISIONS.md +22 -0
  267. package/starter-kit/docs/INFORMATION_ARCHITECTURE.md +25 -0
  268. package/starter-kit/docs/PERSONAS.md +14 -0
  269. package/starter-kit/docs/PRD.md +32 -0
  270. package/starter-kit/docs/USER_FLOWS.md +19 -0
  271. package/starter-kit/reviews/DESIGN_REVIEW.md +49 -0
  272. package/starter-kit/templates/FEATURE_TEMPLATE.md +36 -0
  273. package/starter-kit/templates/TASK_TEMPLATE.md +22 -0
  274. package/templates/CHECKLIST_TEMPLATE.md +43 -0
  275. package/templates/OBSERVATION_TEMPLATE.md +41 -0
  276. package/templates/PATTERN_TEMPLATE.md +100 -0
  277. package/templates/PROMPT_TEMPLATE.md +46 -0
  278. package/templates/PROTOTYPE_REVIEW.md +50 -0
  279. package/templates/REFERENCE_PROJECT_TEMPLATE.md +49 -0
  280. package/templates/REVIEW_TEMPLATE.md +55 -0
  281. package/templates/RULE_TEMPLATE.md +57 -0
  282. package/tools/cli.mjs +46 -0
  283. package/tools/context.mjs +342 -0
  284. package/tools/designlint.mjs +77 -0
  285. package/tools/generate-indexes.mjs +621 -0
  286. package/tools/init.mjs +99 -0
  287. package/tools/validate-benchmark-evidence.mjs +248 -0
  288. package/tools/validate-knowledge.mjs +481 -0
@@ -0,0 +1,133 @@
1
+ {
2
+ "browserVersion": "153.0.8010.53",
3
+ "locale": "en-GB",
4
+ "deviceScaleFactor": 1,
5
+ "rows": [
6
+ {
7
+ "variant": "baseline",
8
+ "initial": {
9
+ "input": {
10
+ "x": 61.875,
11
+ "y": 286.671875,
12
+ "width": 239.3125,
13
+ "height": 34
14
+ },
15
+ "button": {
16
+ "x": 311.1875,
17
+ "y": 281.671875,
18
+ "width": 47.8125,
19
+ "height": 44
20
+ },
21
+ "firstRow": {
22
+ "x": 23,
23
+ "y": 426.671875,
24
+ "width": 344,
25
+ "height": 63
26
+ }
27
+ },
28
+ "saving": {
29
+ "input": {
30
+ "x": 61.875,
31
+ "y": 286.671875,
32
+ "width": 209.6875,
33
+ "height": 34
34
+ },
35
+ "button": {
36
+ "x": 281.5625,
37
+ "y": 281.671875,
38
+ "width": 77.4375,
39
+ "height": 44
40
+ },
41
+ "firstRow": {
42
+ "x": 23,
43
+ "y": 426.671875,
44
+ "width": 344,
45
+ "height": 63
46
+ }
47
+ },
48
+ "failure": {
49
+ "input": {
50
+ "x": 61.875,
51
+ "y": 286.671875,
52
+ "width": 239.3125,
53
+ "height": 34
54
+ },
55
+ "button": {
56
+ "x": 311.1875,
57
+ "y": 281.671875,
58
+ "width": 47.8125,
59
+ "height": 44
60
+ },
61
+ "firstRow": {
62
+ "x": 23,
63
+ "y": 448.671875,
64
+ "width": 344,
65
+ "height": 63
66
+ }
67
+ }
68
+ },
69
+ {
70
+ "variant": "ai-design-rules",
71
+ "initial": {
72
+ "input": {
73
+ "x": 52,
74
+ "y": 754.5,
75
+ "width": 242.546875,
76
+ "height": 44
77
+ },
78
+ "button": {
79
+ "x": 302.546875,
80
+ "y": 754.5,
81
+ "width": 62.453125,
82
+ "height": 44
83
+ },
84
+ "firstRow": {
85
+ "x": 20,
86
+ "y": 306.5,
87
+ "width": 350,
88
+ "height": 64.796875
89
+ }
90
+ },
91
+ "saving": {
92
+ "input": {
93
+ "x": 52,
94
+ "y": 754.5,
95
+ "width": 207.78125,
96
+ "height": 44
97
+ },
98
+ "button": {
99
+ "x": 267.78125,
100
+ "y": 754.5,
101
+ "width": 97.21875,
102
+ "height": 44
103
+ },
104
+ "firstRow": {
105
+ "x": 20,
106
+ "y": 306.5,
107
+ "width": 350,
108
+ "height": 64.796875
109
+ }
110
+ },
111
+ "failure": {
112
+ "input": {
113
+ "x": 52,
114
+ "y": 754.5,
115
+ "width": 232.0625,
116
+ "height": 44
117
+ },
118
+ "button": {
119
+ "x": 292.0625,
120
+ "y": 754.5,
121
+ "width": 72.9375,
122
+ "height": 44
123
+ },
124
+ "firstRow": {
125
+ "x": 20,
126
+ "y": 306.5,
127
+ "width": 350,
128
+ "height": 64.796875
129
+ }
130
+ }
131
+ }
132
+ ]
133
+ }
@@ -0,0 +1,15 @@
1
+ async (page) => {
2
+ const rows=[];
3
+ for(const variant of ['baseline','ai-design-rules']) {
4
+ await page.goto(`http://127.0.0.1:4183/${variant}/`);
5
+ await page.setViewportSize({width:390,height:844});
6
+ await page.waitForFunction(()=>window.__benchmark);
7
+ await page.evaluate(()=>{window.__benchmark.reset('seed');document.activeElement.blur();window.scrollTo(0,0);window.__benchmark.setSaveDelay(1500);window.__benchmark.failNextSave();});
8
+ const input=variant==='baseline'?'#new-task':'#task-title';const button=variant==='baseline'?'#add-button':'#add-task';
9
+ const boxes=async()=>({input:await page.locator(input).boundingBox(),button:await page.locator(button).boundingBox(),firstRow:await page.locator('[data-task-id="t01"]').boundingBox()});
10
+ const initial=await boxes();await page.locator(input).fill('Buy apples');await page.locator(button).click();const saving=await boxes();
11
+ await page.waitForFunction(()=>!window.__benchmark.getState().pending);const failure=await boxes();
12
+ rows.push({variant,initial,saving,failure});
13
+ }
14
+ return {browserVersion:page.context().browser().version(),locale:await page.evaluate(()=>navigator.language),deviceScaleFactor:await page.evaluate(()=>devicePixelRatio),rows};
15
+ }
@@ -0,0 +1,8 @@
1
+ # Generated Examples Index
2
+
3
+ This file is generated from registry metadata. Do not edit manually.
4
+
5
+ | ID | Alias | Title | Category | Status | Maturity | File Path | Implements | Validates |
6
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
7
+ | REF-00001 | REF-TODO-BENCHMARK | Todo App Benchmark Reference Project | consumer | draft | reviewed | examples/todo-app-benchmark.md | PROMPT-TODO-BENCHMARK / PROMPT-00003 Todo App Benchmark Prompt | PROMPT-TODO-BENCHMARK / PROMPT-00003 Todo App Benchmark Prompt<br>PAT-001 / PAT-00001 Daily Home Surface<br>PAT-002 / PAT-00002 Quick Capture<br>PAT-003 / PAT-00003 Mobile Primary Action<br>PAT-004 / PAT-00004 Progressive Detail<br>PAT-005 / PAT-00005 Context-Preserving Preview<br>PAT-006 / PAT-00006 Object Status List |
8
+ | REF-00002 | REF-CONSEQUENTIAL-ACTION-CONFIRMATION | Consequential Action Confirmation Reference Project | fintech | active | validated | examples/consequential-action-confirmation-reference.md | PROMPT-CONSEQUENTIAL-ACTION-REVIEW / PROMPT-00006 Consequential Action Review Prompt | HIGH-RISK-OPERATIONAL-FLOWS / RESEARCH-00012 High-Risk Operational Flows<br>UX-006 / RULE-00017 Confirm Consequential Actions With Preserved Context<br>PAT-007 / PAT-00007 Consequential Action Confirmation<br>PROMPT-CONSEQUENTIAL-ACTION-REVIEW / PROMPT-00006 Consequential Action Review Prompt |
@@ -0,0 +1,16 @@
1
+ # Examples Index
2
+
3
+ Reference projects use generic product archetypes and benchmark-backed evidence.
4
+
5
+ The Todo App Benchmark Reference Project is a `draft` / `seed` object backed by one directional benchmark run. It is not a production or general-quality claim.
6
+
7
+ Use `examples/GENERATED_INDEX.md` for registry-backed reference project navigation. It may be empty until public reference archetypes are added.
8
+
9
+ ## Contribution Rule
10
+
11
+ A future reference project must be:
12
+
13
+ - generic enough for public OSS;
14
+ - backed by benchmark evidence or a reproducible scenario;
15
+ - free of private product, customer, author, or commercial project details;
16
+ - connected to rules and patterns through registry metadata.
@@ -0,0 +1,15 @@
1
+ # Examples
2
+
3
+ Reference projects use generic product archetypes and benchmark-backed evidence.
4
+
5
+ The Todo App Benchmark Reference Project is a `draft` / `seed` object backed by one directional benchmark run. It is not a production or general-quality claim.
6
+
7
+ Current public validation should use:
8
+
9
+ - `benchmarks/`
10
+ - `evidence/`
11
+ - generated registry reports
12
+
13
+ `examples/todo-reference/` is a runnable fixture for visual and interaction QA. It does not replace a paired benchmark run or change the directional status of `REF-00001`.
14
+
15
+ Do not add author-specific, private, or commercial project examples.
@@ -0,0 +1,83 @@
1
+ ---
2
+ id: REF-00002
3
+ alias: REF-CONSEQUENTIAL-ACTION-CONFIRMATION
4
+ slug: consequential-action-confirmation-reference
5
+ title: Consequential Action Confirmation Reference Project
6
+ object_type: reference_project
7
+ status: active
8
+ version: 0.1.0
9
+ category: fintech
10
+ tags:
11
+ - reference-project
12
+ - confirmation
13
+ - wallet
14
+ - agentic-ui
15
+ last_reviewed_at: 2026-08-12
16
+ maturity: validated
17
+ risk_level: high
18
+ relationships:
19
+ - type: implements
20
+ target: PROMPT-00006
21
+ - type: implements
22
+ target: PAT-00007
23
+ - type: validates
24
+ target: RESEARCH-00012
25
+ - type: validates
26
+ target: RULE-00017
27
+ - type: validates
28
+ target: PAT-00007
29
+ - type: validates
30
+ target: PROMPT-00006
31
+ ---
32
+
33
+ # Consequential Action Confirmation Reference Project
34
+
35
+ ## Product Context
36
+
37
+ This reference project defines a reviewable wallet withdrawal and agent-approval flow for validating high-risk operational guidance. It is a specification reference, not a runnable financial product and not legal, compliance, trading, or security policy.
38
+
39
+ The core object is a `WithdrawalRequest`. Its critical fields are asset, amount, fee, provider, destination, selected account, server-requested challenge, execution state, and final request identifier.
40
+
41
+ ## Patterns Used
42
+
43
+ - `PAT-00007` / `PAT-007` Consequential Action Confirmation
44
+ - `PAT-00005` / `PAT-005` Context-Preserving Preview when the source form or object list must remain inspectable
45
+ - `PAT-00006` / `PAT-006` Object Status List when multiple affected objects or challenge states must be compared
46
+
47
+ ## Rules Applied
48
+
49
+ - `RULE-00017` / `UX-006` Confirm Consequential Actions With Preserved Context
50
+ - `RULE-00007` / `UX-003` Preserve Context During Inspection
51
+ - `RULE-00010` / `A11Y-002` Textual Input Error Recovery
52
+ - `RULE-00016` / `UX-005` Expose Agent Work And Intervention when an agent assists or initiates the action
53
+
54
+ ## Research Influence
55
+
56
+ - `RESEARCH-00012` / High-Risk Operational Flows
57
+ - `RESEARCH-00011` / Contextual And Observable Agentic Interfaces
58
+ - `RESEARCH-00006` / Textual Error Recovery
59
+
60
+ ## Reference Flow
61
+
62
+ 1. The user enters withdrawal details: asset, amount, provider, destination, and optional note.
63
+ 2. The product computes fee, limit, balance impact, and available execution path.
64
+ 3. The confirmation surface repeats the critical object and consequence: asset, amount, fee, destination, provider, account, expected status, and reversibility.
65
+ 4. If the server requires 2FA, passkey, KYC, email approval, or another challenge, the challenge is added without clearing withdrawal details.
66
+ 5. During pending execution, the reviewed object remains visible and duplicate submission is blocked.
67
+ 6. On error, the failed challenge or blocked prerequisite is named in product language, entered data remains available, and the recovery action is explicit.
68
+ 7. On success, the terminal state shows the request identifier, next status, expected user action, and route to history.
69
+ 8. If an agent prepared the action, the agent cannot execute the withdrawal or external side effect without explicit approval and an interruptible pre-execution state.
70
+
71
+ ## Validation Questions
72
+
73
+ - Does every confirmation keep the affected object and side effects visible?
74
+ - Does every challenge add only the missing confirmation field?
75
+ - Can the user cancel, edit critical inputs, retry, or inspect the terminal result?
76
+ - Does the flow avoid raw backend codes as product copy?
77
+ - For agent-assisted work, is explicit approval required before execution and is the audit trail inspectable?
78
+
79
+ ## Evidence Limits
80
+
81
+ - This validates a specification-level contract and review prompt, not a shipped wallet implementation.
82
+ - It does not validate backend policy, financial compliance, fraud controls, custody safety, or trading suitability.
83
+ - A future rendered fixture should test keyboard traversal, mobile sheet behavior, focus recovery, reduced motion, and failure copy before promoting this pattern toward canonical maturity.
@@ -0,0 +1,117 @@
1
+ ---
2
+ id: REF-00001
3
+ alias: REF-TODO-BENCHMARK
4
+ slug: todo-app-benchmark-reference
5
+ title: Todo App Benchmark Reference Project
6
+ object_type: reference_project
7
+ status: draft
8
+ version: 0.1.0
9
+ category: consumer
10
+ tags:
11
+ - reference-project
12
+ - benchmark
13
+ - todo
14
+ last_reviewed_at: 2026-07-15
15
+ maturity: reviewed
16
+ risk_level: high
17
+ relationships:
18
+ - type: implements
19
+ target: PROMPT-00003
20
+ - type: implements
21
+ target: PAT-00001
22
+ - type: implements
23
+ target: PAT-00002
24
+ - type: implements
25
+ target: PAT-00003
26
+ - type: implements
27
+ target: PAT-00004
28
+ - type: implements
29
+ target: PAT-00005
30
+ - type: implements
31
+ target: PAT-00006
32
+ - type: validates
33
+ target: PROMPT-00003
34
+ - type: validates
35
+ target: PAT-00001
36
+ - type: validates
37
+ target: PAT-00002
38
+ - type: validates
39
+ target: PAT-00003
40
+ - type: validates
41
+ target: PAT-00004
42
+ - type: validates
43
+ target: PAT-00005
44
+ - type: validates
45
+ target: PAT-00006
46
+ ---
47
+
48
+ # Todo App Benchmark Reference Project
49
+
50
+ ## Product Context
51
+
52
+ This reference project records the AI Design Context output for the public Todo App benchmark: a responsive consumer product for quickly capturing, seeing, completing, and inspecting everyday tasks.
53
+
54
+ The core object is `Task`. Its required fields are a title and completion state; note, due time, repeat, list, and priority remain optional and secondary.
55
+
56
+ ## Benchmark Evidence
57
+
58
+ - Scenario: `benchmarks/todo-app.md`
59
+ - Run: `evidence/todo/2026-06-25-codex-gpt-5/`
60
+ - AI Design Context artifact: `evidence/todo/2026-06-25-codex-gpt-5/ai-design-rules/generated-output.md`
61
+ - Comparative evaluation: `evidence/todo/2026-06-25-codex-gpt-5/EVALUATION.md`
62
+
63
+ The evaluation reports a directional score difference of `+2.09` for this run. It is not evidence of general product-quality improvement.
64
+
65
+ ## Runnable Reference Fixture
66
+
67
+ `examples/todo-reference/` is a local HTML, CSS, and JavaScript fixture for inspecting the documented task flow at mobile and desktop widths. It is a QA aid for the rule and pattern coverage below, not a replacement for the historical benchmark output and not comparative benchmark evidence.
68
+
69
+ ## Fixture Review Evidence
70
+
71
+ - Review: `reviews/todo-reference-fixture-review.md`
72
+ - Desktop default: `examples/todo-reference/review-evidence/2026-07-15/desktop-default.png`
73
+ - Desktop detail: `examples/todo-reference/review-evidence/2026-07-15/desktop-detail.png`
74
+ - Mobile error recovery: `examples/todo-reference/review-evidence/2026-07-15/mobile-error.png`
75
+ - Mobile detail sheet: `examples/todo-reference/review-evidence/2026-07-15/mobile-detail.png`
76
+
77
+ This evidence confirms rendered fixture behavior for the reviewed flows. It does not turn the historical Markdown benchmark output into a rendered, independently evaluated benchmark result.
78
+
79
+ ## Patterns Used
80
+
81
+ - `PAT-00001` / `PAT-001` Daily Home Surface
82
+ - `PAT-00002` / `PAT-002` Quick Capture
83
+ - `PAT-00003` / `PAT-003` Mobile Primary Action
84
+ - `PAT-00004` / `PAT-004` Progressive Detail
85
+ - `PAT-00005` / `PAT-005` Context-Preserving Preview
86
+ - `PAT-00006` / `PAT-006` Object Status List
87
+
88
+ ## Rules Applied
89
+
90
+ - `RULE-00001` / `PRD-001` Daily Actions First
91
+ - `RULE-00002` / `PRD-002` Low-Friction Capture Before Organization
92
+ - `RULE-00003` / `IA-001` One Stable Home Surface
93
+ - `RULE-00004` / `IA-002` Define The Object Model Before Screens
94
+ - `RULE-00005` / `UX-001` Thumb-Zone Primary Actions
95
+ - `RULE-00006` / `UX-002` Progressively Disclose Power
96
+ - `RULE-00007` / `UX-003` Preserve Context During Inspection
97
+ - `RULE-00008` / `VIS-001` Semantic Tokens Only
98
+ - `RULE-00009` / `A11Y-001` 44x44 Touch Targets
99
+
100
+ ## Validation Questions
101
+
102
+ - Does the first viewport prioritize Today and quick capture over dashboard summaries?
103
+ - Can a user add, complete, and inspect a task while optional metadata remains secondary?
104
+ - Does failed save preserve task text and expose a specific retry or edit path?
105
+ - Does the same `Task` model survive the mobile bottom-sheet and desktop side-panel variants?
106
+ - Does a rendered implementation preserve these claims under mobile, desktop, slow-network, keyboard, and assistive-technology testing?
107
+
108
+ ## Evidence Limits
109
+
110
+ - The historical benchmark artifact is Markdown, not a rendered implementation.
111
+ - The fixture screenshots are not paired baseline-vs-rules benchmark evidence and include no runtime performance measurements.
112
+ - The same model generated and evaluated both outputs.
113
+ - The baseline ran in a repository-aware conversation, so isolation is incomplete.
114
+
115
+ ## Next Validation
116
+
117
+ Repeat the scenario in a clean session with paired rendered outputs, mobile and desktop screenshots, measured loading behavior, and at least one independent evaluator. Keep this object at `draft` / `reviewed` until that evidence exists.
@@ -0,0 +1,29 @@
1
+ # Todo Reference Fixture
2
+
3
+ This runnable fixture demonstrates the Todo reference project's existing task flow at desktop and mobile widths. It is a QA aid, not a baseline-vs-rules benchmark result and not evidence for changing benchmark scores.
4
+
5
+ ## Covered Behaviour
6
+
7
+ - today-first task list and quick capture;
8
+ - textual error recovery for an empty submission;
9
+ - an asynchronous save state without a layout jump;
10
+ - completion state;
11
+ - detail inspection that keeps the list visible on desktop and behind a mobile sheet;
12
+ - visible keyboard focus, accessible names, 44px controls, and reduced-motion handling.
13
+
14
+ ## Run Locally
15
+
16
+ ```bash
17
+ python3 -m http.server 4173 --directory examples/todo-reference
18
+ ```
19
+
20
+ Open `http://127.0.0.1:4173` and use the Playwright CLI for a reproducible check:
21
+
22
+ ```bash
23
+ export PWCLI="$HOME/.codex/skills/playwright/scripts/playwright_cli.sh"
24
+ "$PWCLI" --session todo-reference open http://127.0.0.1:4173
25
+ "$PWCLI" --session todo-reference resize 390 844
26
+ "$PWCLI" --session todo-reference snapshot
27
+ ```
28
+
29
+ Capture files generated by the Playwright CLI are local QA artifacts. Promote screenshots into a benchmark evidence run only together with the matched baseline output, metadata, evaluator notes, and rubric evaluation required by `docs/BENCHMARK.md`.
@@ -0,0 +1,154 @@
1
+ const tasks = [
2
+ { id: 1, title: 'Pick up fruit for breakfast', detail: 'Errand · before 18:00', complete: false },
3
+ { id: 2, title: 'Send the design review notes', detail: 'Work · 20 min', complete: false },
4
+ { id: 3, title: 'Book a dentist appointment', detail: 'Personal · this week', complete: false },
5
+ ];
6
+
7
+ const taskList = document.querySelector('[data-task-list]');
8
+ const emptyState = document.querySelector('[data-empty-state]');
9
+ const taskSurface = document.querySelector('.task-surface');
10
+ const remainingCount = document.querySelector('#remaining-count');
11
+ const progressCopy = document.querySelector('#progress-copy');
12
+ const captureForm = document.querySelector('[data-capture-form]');
13
+ const taskInput = document.querySelector('#task-title');
14
+ const captureError = document.querySelector('#capture-error');
15
+ const addButton = document.querySelector('[data-add-task]');
16
+ const saveStatus = document.querySelector('#save-status');
17
+ const detailPanel = document.querySelector('[data-detail-panel]');
18
+ const detailHeading = document.querySelector('#detail-heading');
19
+ const detailStatus = document.querySelector('[data-detail-status]');
20
+ const completeDetailButton = document.querySelector('[data-action="complete-detail"]');
21
+ let selectedTaskId = null;
22
+ let detailReturnFocus = null;
23
+ let showEmpty = false;
24
+
25
+ function activeTasks() {
26
+ return tasks.filter((task) => !task.complete);
27
+ }
28
+
29
+ function render() {
30
+ const visibleTasks = showEmpty ? [] : tasks;
31
+ taskList.hidden = visibleTasks.length === 0;
32
+ emptyState.hidden = visibleTasks.length !== 0;
33
+ taskList.replaceChildren(
34
+ ...visibleTasks.map((task) => {
35
+ const item = document.createElement('li');
36
+ item.className = `task-row${task.complete ? ' is-complete' : ''}`;
37
+
38
+ const taskMain = document.createElement('div');
39
+ taskMain.className = 'task-main';
40
+
41
+ const completeButton = document.createElement('button');
42
+ completeButton.className = 'complete-toggle';
43
+ completeButton.type = 'button';
44
+ completeButton.dataset.completeId = String(task.id);
45
+ completeButton.setAttribute('aria-pressed', String(task.complete));
46
+ completeButton.setAttribute(
47
+ 'aria-label',
48
+ `${task.complete ? 'Mark incomplete' : 'Mark complete'}: ${task.title}`,
49
+ );
50
+ completeButton.textContent = task.complete ? '✓' : '';
51
+
52
+ const openButton = document.createElement('button');
53
+ openButton.className = 'task-open';
54
+ openButton.type = 'button';
55
+ openButton.dataset.openId = String(task.id);
56
+
57
+ const title = document.createElement('span');
58
+ title.className = 'task-title';
59
+ title.textContent = task.title;
60
+
61
+ const meta = document.createElement('span');
62
+ meta.className = 'task-meta';
63
+ meta.textContent = task.detail;
64
+
65
+ openButton.append(title, meta);
66
+ taskMain.append(completeButton, openButton);
67
+ item.append(taskMain);
68
+ return item;
69
+ }),
70
+ );
71
+
72
+ const remaining = activeTasks().length;
73
+ remainingCount.textContent = String(remaining);
74
+ progressCopy.textContent = remaining === 0 ? 'Everything is complete.' : 'A clear plan for the day.';
75
+ }
76
+
77
+ function openDetail(taskId, returnFocus = document.activeElement) {
78
+ const task = tasks.find((item) => item.id === taskId);
79
+ if (!task) return;
80
+ selectedTaskId = task.id;
81
+ detailReturnFocus = returnFocus instanceof HTMLElement ? returnFocus : null;
82
+ detailHeading.textContent = task.title;
83
+ detailStatus.textContent = task.complete ? 'Complete' : 'Open';
84
+ completeDetailButton.textContent = task.complete ? 'Mark incomplete' : 'Mark complete';
85
+ detailPanel.hidden = false;
86
+ detailPanel.querySelector('[data-action="close-detail"]').focus();
87
+ }
88
+
89
+ function closeDetail({ restoreFocus = true } = {}) {
90
+ detailPanel.hidden = true;
91
+ selectedTaskId = null;
92
+ const returnFocus = detailReturnFocus;
93
+ detailReturnFocus = null;
94
+ if (restoreFocus && returnFocus?.isConnected) returnFocus.focus();
95
+ }
96
+
97
+ function toggleComplete(taskId) {
98
+ const task = tasks.find((item) => item.id === taskId);
99
+ if (!task) return;
100
+ task.complete = !task.complete;
101
+ render();
102
+ if (selectedTaskId === task.id) {
103
+ openDetail(task.id, document.querySelector(`[data-open-id="${task.id}"]`));
104
+ }
105
+ }
106
+
107
+ captureForm.addEventListener('submit', (event) => {
108
+ event.preventDefault();
109
+ const title = taskInput.value.trim();
110
+ captureError.hidden = true;
111
+ taskInput.removeAttribute('aria-invalid');
112
+
113
+ if (!title) {
114
+ captureError.textContent = 'Enter a task before adding it.';
115
+ captureError.hidden = false;
116
+ taskInput.setAttribute('aria-invalid', 'true');
117
+ taskInput.focus();
118
+ return;
119
+ }
120
+
121
+ taskSurface.setAttribute('aria-busy', 'true');
122
+ addButton.disabled = true;
123
+ saveStatus.textContent = 'Saving…';
124
+ window.setTimeout(() => {
125
+ tasks.unshift({ id: Date.now(), title, detail: 'Just added · Today', complete: false });
126
+ taskInput.value = '';
127
+ showEmpty = false;
128
+ taskSurface.setAttribute('aria-busy', 'false');
129
+ addButton.disabled = false;
130
+ saveStatus.textContent = 'Saved';
131
+ render();
132
+ window.setTimeout(() => { saveStatus.textContent = ''; }, 1800);
133
+ }, 420);
134
+ });
135
+
136
+ taskList.addEventListener('click', (event) => {
137
+ const completion = event.target.closest('[data-complete-id]');
138
+ const opener = event.target.closest('[data-open-id]');
139
+ if (completion) toggleComplete(Number(completion.dataset.completeId));
140
+ if (opener) openDetail(Number(opener.dataset.openId), opener);
141
+ });
142
+
143
+ document.querySelector('[data-action="toggle-empty"]').addEventListener('click', (event) => {
144
+ showEmpty = !showEmpty;
145
+ event.currentTarget.setAttribute('aria-pressed', String(showEmpty));
146
+ event.currentTarget.setAttribute('aria-label', showEmpty ? 'Show task list' : 'Show empty state');
147
+ closeDetail({ restoreFocus: false });
148
+ render();
149
+ });
150
+ document.querySelector('[data-action="focus-capture"]').addEventListener('click', () => taskInput.focus());
151
+ document.querySelector('[data-action="close-detail"]').addEventListener('click', closeDetail);
152
+ completeDetailButton.addEventListener('click', () => toggleComplete(selectedTaskId));
153
+
154
+ render();
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
2
+ <rect width="64" height="64" rx="18" fill="#286248"/>
3
+ <path d="m18 33 9 9 19-21" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="7"/>
4
+ </svg>
@@ -0,0 +1,67 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta name="description" content="Runnable Todo reference fixture for visual and interaction QA." />
7
+ <title>Today — Todo reference fixture</title>
8
+ <link rel="icon" href="favicon.svg" type="image/svg+xml" />
9
+ <link rel="stylesheet" href="styles.css" />
10
+ </head>
11
+ <body>
12
+ <main class="app-shell">
13
+ <section class="content-column">
14
+ <header class="app-header">
15
+ <div>
16
+ <p class="eyebrow">Tuesday, 14 July</p>
17
+ <h1>Today</h1>
18
+ </div>
19
+ <button class="icon-button" type="button" data-action="toggle-empty" aria-pressed="false" aria-label="Show empty state">
20
+ <span aria-hidden="true">⌁</span>
21
+ </button>
22
+ </header>
23
+
24
+ <section class="summary" aria-label="Today summary">
25
+ <p><strong id="remaining-count">3</strong> tasks left</p>
26
+ <p id="progress-copy">A clear plan for the day.</p>
27
+ </section>
28
+
29
+ <form class="quick-capture" data-capture-form novalidate>
30
+ <label class="sr-only" for="task-title">Add a task</label>
31
+ <input id="task-title" name="task-title" type="text" autocomplete="off" placeholder="What needs doing?" aria-describedby="capture-error" />
32
+ <button type="submit" data-add-task>Add task</button>
33
+ <p id="capture-error" class="form-error" role="alert" hidden></p>
34
+ </form>
35
+
36
+ <section class="task-surface" aria-labelledby="task-list-heading" aria-busy="false">
37
+ <div class="section-heading">
38
+ <h2 id="task-list-heading">Your tasks</h2>
39
+ <span id="save-status" class="save-status" aria-live="polite"></span>
40
+ </div>
41
+ <ul class="task-list" data-task-list></ul>
42
+ <div class="empty-state" data-empty-state hidden>
43
+ <span class="empty-icon" aria-hidden="true">✓</span>
44
+ <h2>Your day is clear</h2>
45
+ <p>Add the first small thing you want to remember.</p>
46
+ <button type="button" data-action="focus-capture">Add a task</button>
47
+ </div>
48
+ </section>
49
+ </section>
50
+
51
+ <aside class="detail-panel" data-detail-panel aria-labelledby="detail-heading" hidden>
52
+ <div class="detail-header">
53
+ <p class="eyebrow">Task details</p>
54
+ <button class="icon-button" type="button" data-action="close-detail" aria-label="Close task details">×</button>
55
+ </div>
56
+ <h2 id="detail-heading"></h2>
57
+ <dl class="detail-list">
58
+ <div><dt>Status</dt><dd data-detail-status></dd></div>
59
+ <div><dt>When</dt><dd data-detail-date>Today</dd></div>
60
+ <div><dt>Notes</dt><dd>Optional details stay here, not in the list.</dd></div>
61
+ </dl>
62
+ <button type="button" class="secondary-button" data-action="complete-detail">Mark complete</button>
63
+ </aside>
64
+ </main>
65
+ <script type="module" src="app.js"></script>
66
+ </body>
67
+ </html>