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,113 @@
1
+ # Pattern Specification
2
+
3
+ Patterns are compositions of rules. They describe reusable product structures that agents can apply across products without copying a specific UI.
4
+
5
+ Every pattern document must contain exactly these sections, in this order.
6
+
7
+ ## # Pattern Name
8
+
9
+ Names the reusable solution. The name should describe the product behavior, not a component.
10
+
11
+ Why it exists: agents need stable names to reference patterns in prompts, reviews, and reference projects.
12
+
13
+ ## Purpose
14
+
15
+ Explains the design problem the pattern solves.
16
+
17
+ Why it exists: a pattern should solve one problem only. Purpose prevents overlap with adjacent patterns.
18
+
19
+ ## User Goal
20
+
21
+ States what the user is trying to accomplish.
22
+
23
+ Why it exists: agents should start from user intent, not layout or component choice.
24
+
25
+ ## Product Context
26
+
27
+ Defines the type of product, screen, or workflow where the pattern belongs.
28
+
29
+ Why it exists: patterns are not universal. Context prevents misuse in products with different constraints.
30
+
31
+ ## Use When
32
+
33
+ Lists conditions where the pattern is appropriate.
34
+
35
+ Why it exists: agents need a trigger for selecting the pattern.
36
+
37
+ ## Do Not Use When
38
+
39
+ Lists conditions where the pattern should be avoided.
40
+
41
+ Why it exists: good patterns include boundaries, not only positive examples.
42
+
43
+ ## UX Rules
44
+
45
+ Lists UX-focused rules that shape the interaction.
46
+
47
+ Why it exists: patterns must remain connected to rules instead of becoming standalone advice.
48
+
49
+ ## Accessibility Rules
50
+
51
+ Lists accessibility rules or requirements that affect the pattern.
52
+
53
+ Why it exists: accessibility is part of the pattern contract, not a final polish step.
54
+
55
+ ## Mobile Behavior
56
+
57
+ Explains how the pattern behaves on touch-first and narrow screens.
58
+
59
+ Why it exists: AI agents often create desktop-first layouts unless mobile behavior is explicit.
60
+
61
+ ## Desktop Behavior
62
+
63
+ Explains how the pattern behaves on larger screens, keyboard-heavy workflows, or dense layouts.
64
+
65
+ Why it exists: desktop behavior should adapt the pattern without changing its core purpose.
66
+
67
+ ## Empty State
68
+
69
+ Explains what the user sees when there is no content yet.
70
+
71
+ Why it exists: empty states should help users start the intended workflow.
72
+
73
+ ## Loading State
74
+
75
+ Explains what remains stable while data or actions are loading.
76
+
77
+ Why it exists: loading should preserve orientation and avoid layout jumps.
78
+
79
+ ## Error State
80
+
81
+ Explains how the pattern handles failure and recovery.
82
+
83
+ Why it exists: errors should preserve user input, context, and trust.
84
+
85
+ ## Required Rules
86
+
87
+ Lists all rule IDs required by the pattern.
88
+
89
+ Why it exists: rules are the source of pattern authority and keep the knowledge graph traceable.
90
+
91
+ ## Related Research
92
+
93
+ Lists research files that influenced the pattern.
94
+
95
+ Why it exists: patterns must trace back to observed product behavior, not taste.
96
+
97
+ ## Related Patterns
98
+
99
+ Lists parent, child, alternative, dependent, or adjacent patterns.
100
+
101
+ Why it exists: related patterns clarify ownership and prevent duplicate responsibilities.
102
+
103
+ ## Examples
104
+
105
+ Shows concise product situations where the pattern applies.
106
+
107
+ Why it exists: examples help agents map the abstract pattern to concrete product work.
108
+
109
+ ## Agent Checklist
110
+
111
+ Provides review questions an agent can run before using or shipping the pattern.
112
+
113
+ Why it exists: patterns must be actionable and reviewable.
@@ -0,0 +1,25 @@
1
+ # Philosophy
2
+
3
+ AI Design Context exists to help AI coding agents make better product decisions before generating UI.
4
+
5
+ The baseline is simple: good design reduces user effort.
6
+
7
+ ## What This Means
8
+
9
+ - Start from the user's real goal, not from a screen layout.
10
+ - Prefer the smallest clear workflow over a feature-heavy interface.
11
+ - Make repeated actions fast and obvious.
12
+ - Treat empty, loading, error, and disabled states as part of the product.
13
+ - Use visual design to clarify priority, not to decorate weak structure.
14
+
15
+ ## What This Does Not Mean
16
+
17
+ This repository does not replace product judgment, research, accessibility review, or engineering constraints.
18
+
19
+ It gives agents a structured way to reason from evidence:
20
+
21
+ ```text
22
+ research -> rules -> patterns -> prompts -> evidence
23
+ ```
24
+
25
+ When a rule or pattern cannot be traced to evidence, mark the gap instead of inventing authority.
@@ -0,0 +1,26 @@
1
+ # Product Thinking
2
+
3
+ Product thinking comes before interface generation.
4
+
5
+ Before an agent proposes UI, it should understand:
6
+
7
+ - who the user is;
8
+ - what job they are trying to complete;
9
+ - what they repeat often;
10
+ - what must be fast, calm, or trustworthy;
11
+ - what can wait until later.
12
+
13
+ ## Agent Questions
14
+
15
+ - What is the user's primary goal in this product?
16
+ - What action happens every day or every session?
17
+ - What object is the product built around?
18
+ - What must be visible immediately?
19
+ - What should be progressively disclosed?
20
+ - What state can block user progress?
21
+
22
+ ## Output Standard
23
+
24
+ A product decision should be specific enough to become a rule, pattern, prompt, benchmark criterion, or review finding.
25
+
26
+ Avoid vague claims such as "make it clean" or "make it modern" unless they are translated into concrete behavior.
@@ -0,0 +1,49 @@
1
+ # Documentation Style Guide
2
+
3
+ AI Design Context documentation must help agents act. Write for practical use inside real product codebases.
4
+
5
+ ## Tone
6
+
7
+ - Concise.
8
+ - Practical.
9
+ - Rule-based.
10
+ - Direct.
11
+ - Specific enough to review.
12
+
13
+ ## Content Rules
14
+
15
+ - Explain why, not only what.
16
+ - Prefer short sections over long essays.
17
+ - Use examples only when they clarify a decision.
18
+ - Keep advice tied to product behavior.
19
+ - Separate evidence, rules, patterns, prompts, and reviews.
20
+
21
+ ## Avoid
22
+
23
+ - Filler paragraphs.
24
+ - Generic design slogans.
25
+ - Unreviewable taste claims.
26
+ - Long prompt dumps.
27
+ - Duplicating the same concept under new names.
28
+ - Inventing rules without research.
29
+
30
+ ## Good Documentation Answers
31
+
32
+ Every substantial document should make these clear:
33
+
34
+ - What problem does this solve?
35
+ - Who uses it?
36
+ - When should it be applied?
37
+ - What should an agent do with it?
38
+ - How can the result be reviewed?
39
+
40
+ ## Naming
41
+
42
+ - Use lowercase plural folder names: `research/`, `rules/`, `patterns/`, `prompts/`, `skills/`.
43
+ - Use uppercase topic files in `docs/`: `PRODUCT_THINKING.md`, `MOBILE_FIRST.md`.
44
+ - Use stable rule IDs in `rules/`: `UX-001.md`, `A11Y-001.md`.
45
+ - Do not create a new folder when an existing folder already owns the concept.
46
+
47
+ ## TODO Placeholders
48
+
49
+ Use TODO placeholders only when they mark a real missing artifact. Keep them specific and easy to remove.
@@ -0,0 +1,45 @@
1
+ # Traceability
2
+
3
+ Traceability proves that a design decision is connected to the knowledge graph.
4
+
5
+ Use this chain:
6
+
7
+ ```text
8
+ feature -> observation -> research -> rule -> pattern -> prompt -> reference implementation -> review
9
+ ```
10
+
11
+ ## Purpose
12
+
13
+ Traceability prevents agents from designing from taste. If a decision cannot be traced, the missing layer should be named instead of inventing new guidance.
14
+
15
+ ## Traceability Fields
16
+
17
+ - Feature: product area being validated.
18
+ - Observation: concrete product or reference-project behavior.
19
+ - Research: source research that supports the observation.
20
+ - Rule: reviewable instruction derived from research.
21
+ - Pattern: reusable composition of rules.
22
+ - Prompt: agent instruction that applies the pattern.
23
+ - Reference implementation: reference project surface or workflow.
24
+ - Review: checklist or review question used to validate the result.
25
+ - Gap: missing layer, if any.
26
+
27
+ ## Coverage Levels
28
+
29
+ - Covered: every layer exists and links to the next layer.
30
+ - Partial: some layers exist, but one or more links are weak or missing.
31
+ - Missing: the feature cannot be supported by the current graph.
32
+
33
+ ## Validation Rule
34
+
35
+ Do not create new rules, patterns, or prompts during traceability review. Record missing layers and decide later whether the architecture needs new objects.
36
+
37
+ ## DesignLint Relevance
38
+
39
+ Future DesignLint should use traceability to detect:
40
+
41
+ - orphan rules;
42
+ - patterns without rules;
43
+ - prompts without patterns;
44
+ - reference projects without validation links;
45
+ - feature decisions without source research.
@@ -0,0 +1,64 @@
1
+ # Evidence
2
+
3
+ Benchmark results are stored here.
4
+
5
+ - [2026-06-25 Todo run](todo/2026-06-25-codex-gpt-5/README.md): directional evidence.
6
+ - [2026-09-28 paired rendered Todo run](todo/2026-09-28-codex-paired-todo/README.md): frozen source, forty screenshots, runtime checks, and an internal unblinded comparison with mixed results.
7
+
8
+ Do not add fabricated scores.
9
+
10
+ Every benchmark result should include:
11
+
12
+ - scenario name;
13
+ - run date;
14
+ - model and provider;
15
+ - generation surface;
16
+ - temperature or sampling settings;
17
+ - tool access;
18
+ - baseline prompt;
19
+ - AI Design Rules prompt;
20
+ - baseline output;
21
+ - AI Design Rules output;
22
+ - screenshots or preview links;
23
+ - completed evaluation rubric;
24
+ - evaluator notes.
25
+
26
+ Validate all stored runs with:
27
+
28
+ ```bash
29
+ npm run benchmark:validate
30
+ ```
31
+
32
+ ## Evidence Levels
33
+
34
+ - `directional`: raw prompts, outputs, scorecards, and evaluator notes are present, but the implementation is not rendered or has no local visual evidence. It must not be described as proof of product quality.
35
+ - `rendered`: both comparison outputs are runnable or rendered, and each run stores at least one local screenshot path. The harness verifies that every declared screenshot stays inside its matching run directory and is a regular file with a supported image signature; it does not score pixels or certify a result as production-ready.
36
+
37
+ Suggested structure:
38
+
39
+ ```text
40
+ evidence/
41
+ todo/
42
+ notes/
43
+ chat/
44
+ settings/
45
+ shopping/
46
+ mobile-home/
47
+ ```
48
+
49
+ Each scenario folder should contain one folder per run.
50
+
51
+ Example:
52
+
53
+ ```text
54
+ evidence/todo/2026-06-25-model-name/
55
+ baseline-prompt.md
56
+ rules-prompt.md
57
+ baseline-output/
58
+ rules-output/
59
+ screenshots/
60
+ evaluation.md
61
+ metadata.json
62
+ ```
63
+
64
+ Results are evidence only when raw outputs and scoring notes are included.
@@ -0,0 +1,46 @@
1
+ # Benchmark Evidence Run Template
2
+
3
+ Create one directory per scenario and run, then validate it with `npm run benchmark:validate`.
4
+
5
+ ```text
6
+ evidence/<scenario>/<yyyy-mm-dd-model>/
7
+ README.md
8
+ EVALUATION.md
9
+ baseline/
10
+ metadata.json
11
+ prompt.md
12
+ generated-output.md
13
+ notes.md
14
+ scores.md
15
+ screenshots/ # required when evidence_level is rendered
16
+ ai-design-rules/
17
+ metadata.json
18
+ prompt.md
19
+ generated-output.md
20
+ notes.md
21
+ scores.md
22
+ screenshots/ # required when evidence_level is rendered
23
+ ```
24
+
25
+ Both `metadata.json` files must contain the same benchmark setup and differ only in `run_type` (`baseline` or `ai-design-rules`) and run-specific limitations.
26
+
27
+ ```json
28
+ {
29
+ "scenario": "Todo App",
30
+ "run_type": "baseline",
31
+ "date": "2026-07-14",
32
+ "model": "Model name",
33
+ "provider": "Provider",
34
+ "generation_surface": "CLI or product surface",
35
+ "temperature": "0.2",
36
+ "tool_access": ["filesystem write"],
37
+ "implementation_target": "Rendered responsive web app",
38
+ "evaluator": "Evaluator name or handle",
39
+ "rubric_version": "docs/EVALUATION_RUBRIC.md@v0.1.0",
40
+ "evidence_level": "rendered",
41
+ "screenshots": ["baseline/screenshots/mobile.png", "baseline/screenshots/desktop.png"],
42
+ "limitation": "Any remaining comparability limit"
43
+ }
44
+ ```
45
+
46
+ Use `directional` only when rendered, local visual evidence does not exist. Do not upgrade the level based on a score alone.
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,66 @@
1
+ # Todo App Evaluation
2
+
3
+ Scenario: Todo App
4
+ Run: 2026-06-25-codex-gpt-5
5
+ Model: Codex GPT-5
6
+ Evaluator: Codex GPT-5, single evaluator
7
+ Date: 2026-06-25
8
+
9
+ ## Score Table
10
+
11
+ | Category | Baseline | AI Design Rules | Difference | Notes |
12
+ | --- | ---: | ---: | ---: | --- |
13
+ | Product Thinking | 6 | 8 | +2 | AI Design Rules output centers the daily surface and primary action more clearly. |
14
+ | UX | 6 | 8 | +2 | AI Design Rules output reduces capture friction and improves recovery. |
15
+ | Information Architecture | 6 | 8 | +2 | AI Design Rules output names the task object and separates required from optional fields. |
16
+ | Navigation | 6 | 7 | +1 | AI Design Rules output keeps Today stable and uses context-preserving detail. |
17
+ | Accessibility | 5 | 7 | +2 | AI Design Rules output specifies labels, target size, keyboard order, and text errors. |
18
+ | Mobile-first | 5 | 8 | +3 | AI Design Rules output defines mobile bottom sheet and reachable primary action behavior. |
19
+ | Visual Hierarchy | 6 | 7 | +1 | AI Design Rules output is clearer but not visually rendered. |
20
+ | State Design | 5 | 8 | +3 | AI Design Rules output gives specific empty, loading, failed save, and retry behavior. |
21
+ | Consistency | 6 | 8 | +2 | AI Design Rules output keeps one product model across mobile and desktop. |
22
+ | Performance Awareness | 5 | 7 | +2 | AI Design Rules output preserves the shell during loading; no measured performance data. |
23
+ | Simplicity | 5 | 8 | +3 | AI Design Rules output avoids dashboard cards and keeps metadata secondary. |
24
+ | Overall Product Quality | 6 | 8 | +2 | AI Design Rules output is more coherent as a consumer todo product. |
25
+
26
+ Baseline average: 5.58
27
+ AI Design Rules average: 7.67
28
+ Difference: +2.09
29
+
30
+ ## Evidence Links
31
+
32
+ - Baseline prompt: `baseline/prompt.md`
33
+ - Baseline output: `baseline/generated-output.md`
34
+ - Baseline metadata: `baseline/metadata.json`
35
+ - Baseline notes: `baseline/notes.md`
36
+ - Baseline scores: `baseline/scores.md`
37
+ - AI Design Rules prompt: `ai-design-rules/prompt.md`
38
+ - AI Design Rules output: `ai-design-rules/generated-output.md`
39
+ - AI Design Rules metadata: `ai-design-rules/metadata.json`
40
+ - AI Design Rules notes: `ai-design-rules/notes.md`
41
+ - AI Design Rules scores: `ai-design-rules/scores.md`
42
+
43
+ ## Strongest Improvements
44
+
45
+ - Mobile-first behavior improved from generic responsive stacking to explicit reachable actions and bottom-sheet detail.
46
+ - State design improved from generic empty/loading/error states to input-preserving failed-save recovery.
47
+ - Simplicity improved by removing dashboard summary cards and keeping optional metadata secondary.
48
+ - Product thinking improved by centering the Today surface and low-friction capture.
49
+
50
+ ## Weaknesses
51
+
52
+ - This run produced Markdown UI artifacts, not rendered implementations.
53
+ - No screenshots were captured.
54
+ - The same model and evaluator generated and scored both outputs.
55
+ - The conversation already contained repository context, so the baseline is not perfectly isolated.
56
+ - Performance was judged from described behavior, not measured runtime data.
57
+
58
+ ## Does This Support The Project Claim?
59
+
60
+ This benchmark provides directional support, not proof.
61
+
62
+ The AI Design Rules output scored higher in every category in this single run, especially mobile-first behavior, state design, simplicity, and product thinking.
63
+
64
+ However, the evidence is not strong enough for broad claims because it uses one model, one evaluator, no screenshots, no rendered implementation, and an imperfectly isolated baseline.
65
+
66
+ The next experiment should use a clean session, produce rendered implementations, capture screenshots, and include at least one independent evaluator.
@@ -0,0 +1,40 @@
1
+ # Todo App Benchmark Run
2
+
3
+ Date: 2026-06-25
4
+
5
+ Model: Codex GPT-5
6
+
7
+ Scenario: `benchmarks/todo-app.md`
8
+
9
+ ## Contents
10
+
11
+ - `baseline/` - baseline AI run using only the raw benchmark prompt.
12
+ - `ai-design-rules/` - run using the AI Design Rules prompt.
13
+ - `EVALUATION.md` - comparative rubric scoring and notes.
14
+
15
+ ## Result Summary
16
+
17
+ | Run | Average Score |
18
+ | --- | ---: |
19
+ | Baseline AI | 5.58 |
20
+ | AI + AI Design Rules | 7.67 |
21
+
22
+ Difference: +2.09
23
+
24
+ ## Interpretation
25
+
26
+ This run gives directional evidence that AI Design Rules improved the generated Todo App artifact in this setting.
27
+
28
+ It does not prove general improvement.
29
+
30
+ The main limitations are:
31
+
32
+ - same model generated both outputs;
33
+ - same evaluator scored both outputs;
34
+ - baseline was generated in a repository-aware conversation;
35
+ - outputs are Markdown UI artifacts, not rendered implementations;
36
+ - no screenshots were captured.
37
+
38
+ ## Next Run Recommendation
39
+
40
+ Repeat this benchmark in a clean session with rendered implementations, screenshots, and at least one independent evaluator.
@@ -0,0 +1,163 @@
1
+ # Generated Output: AI Design Rules Todo App
2
+
3
+ ## Product
4
+
5
+ Name: Today List
6
+
7
+ Today List is a mobile-first consumer todo app centered on one stable daily surface. The app helps a busy person capture a task before organizing it, see today's useful work, complete tasks, and inspect details without losing the list.
8
+
9
+ ## Main Surface
10
+
11
+ Primary screen: `Today`
12
+
13
+ The first screen shows:
14
+
15
+ - current date;
16
+ - quick capture input;
17
+ - today's active tasks;
18
+ - completed tasks collapsed below active tasks;
19
+ - quiet status feedback for saved, saving, and failed tasks.
20
+
21
+ No dashboard cards are shown. The first viewport is reserved for the current tasks and the add action.
22
+
23
+ ## Core Object
24
+
25
+ Object: `Task`
26
+
27
+ Required fields:
28
+
29
+ - title;
30
+ - completion state.
31
+
32
+ Optional fields:
33
+
34
+ - note;
35
+ - due time;
36
+ - repeat;
37
+ - list;
38
+ - priority.
39
+
40
+ Optional fields are hidden until the user opens detail.
41
+
42
+ ## Core Interactions
43
+
44
+ ### Quick Capture
45
+
46
+ The user types a task into a single input and presses `Add`.
47
+
48
+ The task appears immediately in Today with a quiet `Saving` status.
49
+
50
+ If saving fails, the task remains in place with:
51
+
52
+ - visible failed state;
53
+ - `Retry`;
54
+ - `Edit`;
55
+ - preserved text.
56
+
57
+ ### Complete Task
58
+
59
+ The user taps a 44px checkbox row target.
60
+
61
+ The task moves to completed state in place first, then collapses under `Completed today`.
62
+
63
+ ### Inspect Details
64
+
65
+ The user selects a task row.
66
+
67
+ Desktop:
68
+
69
+ - a side panel opens beside the Today list.
70
+ - the Today list remains visible.
71
+
72
+ Mobile:
73
+
74
+ - a bottom sheet opens over the Today list.
75
+ - the sheet has a clear close control.
76
+ - the task title remains visible at the top.
77
+
78
+ ### Edit Optional Details
79
+
80
+ Inside detail, the user can add note, due time, repeat, list, or priority.
81
+
82
+ These fields do not block capture.
83
+
84
+ ## Empty State
85
+
86
+ Title: `Nothing for today`
87
+
88
+ Text: `Add one thing to get it out of your head.`
89
+
90
+ Primary action: focused quick capture input.
91
+
92
+ ## Loading State
93
+
94
+ Keep the Today header and quick capture input visible.
95
+
96
+ Show two quiet task row skeletons below. Do not replace the whole screen with a spinner.
97
+
98
+ ## Error State
99
+
100
+ Task save failure appears on the affected task row.
101
+
102
+ Message: `Not saved. Retry?`
103
+
104
+ Actions:
105
+
106
+ - `Retry`;
107
+ - `Edit`.
108
+
109
+ The task text is preserved.
110
+
111
+ ## Accessibility Notes
112
+
113
+ - Primary input has label `New task`.
114
+ - Add button has label `Add task`.
115
+ - Task rows have accessible names using task title and completion state.
116
+ - Checkbox row target is at least 44px high.
117
+ - Detail sheet close control is labeled.
118
+ - Error state uses text, not color alone.
119
+ - Keyboard order: quick add -> task rows -> detail fields -> close.
120
+
121
+ ## Responsive Behavior
122
+
123
+ Mobile:
124
+
125
+ - quick capture stays near the bottom action zone or immediately above the task list depending on viewport.
126
+ - primary add action remains reachable.
127
+ - detail opens as a bottom sheet.
128
+ - no multi-column dashboard layout.
129
+
130
+ Desktop:
131
+
132
+ - Today list remains primary.
133
+ - detail can open as a side panel.
134
+ - additional width improves inspection without changing the product model.
135
+
136
+ ## Applied Rules
137
+
138
+ - `PRD-001` Daily Actions First
139
+ - `PRD-002` Low-Friction Capture Before Organization
140
+ - `IA-001` One Stable Home Surface
141
+ - `IA-002` Define The Object Model Before Screens
142
+ - `UX-001` Thumb-Zone Primary Actions
143
+ - `UX-002` Progressively Disclose Power
144
+ - `UX-003` Preserve Context During Inspection
145
+ - `VIS-001` Semantic Tokens Only
146
+ - `A11Y-001` 44x44 Touch Targets
147
+
148
+ ## Applied Patterns
149
+
150
+ - `PAT-001` Daily Home Surface
151
+ - `PAT-002` Quick Capture
152
+ - `PAT-003` Mobile Primary Action
153
+ - `PAT-004` Progressive Detail
154
+ - `PAT-005` Context-Preserving Preview
155
+ - `PAT-006` Object Status List
156
+
157
+ ## Known Output Characteristics
158
+
159
+ - The output is more focused on the daily task surface.
160
+ - Optional details are secondary.
161
+ - Mobile and desktop share the same product model.
162
+ - State behavior preserves user input and orientation.
163
+ - The artifact is a design specification, not a rendered implementation.