oneie 3.6.12 → 3.6.14

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 (775) hide show
  1. package/.claude/agents/AUDIT-agent-ops-alignment.md +379 -0
  2. package/.claude/agents/NEWS-QUICKSTART.md +321 -0
  3. package/.claude/agents/NEWS-README.md +353 -0
  4. package/.claude/agents/agent-backend.md +1 -1
  5. package/.claude/agents/agent-builder.md +220 -151
  6. package/.claude/agents/agent-clean.md +39 -31
  7. package/.claude/agents/agent-clone.md +107 -54
  8. package/.claude/agents/agent-designer.md +76 -71
  9. package/.claude/agents/agent-director.md +164 -1
  10. package/.claude/agents/agent-documenter.md +169 -132
  11. package/.claude/agents/agent-frontend.md +442 -446
  12. package/.claude/agents/agent-integrator.md +30 -23
  13. package/.claude/agents/agent-lawyer.md +145 -98
  14. package/.claude/agents/agent-news.md +363 -0
  15. package/.claude/agents/agent-onboard.md +99 -69
  16. package/.claude/agents/agent-ontology.md +585 -0
  17. package/.claude/agents/agent-ops.md +178 -171
  18. package/.claude/agents/agent-problem-solver.md +132 -115
  19. package/.claude/agents/agent-quality.md +94 -77
  20. package/.claude/agents/agent-sales.md +89 -67
  21. package/.claude/commands/release.md +3 -1
  22. package/.claude/commands/server.md +64 -5
  23. package/.claude/hooks/README-knowledge-hooks.md +266 -80
  24. package/.claude/hooks/README-root-cleanup.md +200 -0
  25. package/.claude/hooks/README.md +284 -0
  26. package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
  27. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  28. package/.claude/hooks/check-filenames.py +169 -32
  29. package/.claude/hooks/clean-post.py +195 -28
  30. package/.claude/hooks/clean-pre.py +96 -11
  31. package/.claude/hooks/done.py +74 -13
  32. package/.claude/hooks/format-hook.sh +105 -17
  33. package/.claude/hooks/hook-logger.sh +121 -7
  34. package/.claude/hooks/knowledge-post.py +136 -32
  35. package/.claude/hooks/knowledge-pre.py +129 -34
  36. package/.claude/hooks/notification-hook.sh +184 -17
  37. package/.claude/hooks/root-cleanup.py +181 -39
  38. package/.claude/hooks/security-hook.sh +248 -8
  39. package/.claude/hooks/tag-all-docs.py +175 -49
  40. package/.claude/hooks/test-validate-ontology.sh +170 -0
  41. package/.claude/hooks/todo.py +92 -22
  42. package/.claude/hooks/validate-ontology-structure-summary.md +243 -0
  43. package/.claude/hooks/validate-ontology-structure.py +83 -20
  44. package/AGENTS.md +60 -245
  45. package/CLAUDE.md +70 -1
  46. package/README.md +25 -0
  47. package/folders.yaml +1 -1
  48. package/one/.claude/settings.local.json +11 -0
  49. package/one/.obsidian/community-plugins.json +3 -1
  50. package/one/.obsidian/plugins/editing-toolbar/data.json +328 -0
  51. package/one/.obsidian/plugins/editing-toolbar/main.js +12 -0
  52. package/one/.obsidian/plugins/editing-toolbar/manifest.json +10 -0
  53. package/one/.obsidian/plugins/editing-toolbar/styles.css +1338 -0
  54. package/one/.obsidian/plugins/terminal/data.json +154 -0
  55. package/one/.obsidian/plugins/terminal/main.js +197 -0
  56. package/one/.obsidian/plugins/terminal/manifest.json +14 -0
  57. package/one/.obsidian/plugins/terminal/styles.css +32 -0
  58. package/one/.obsidian/workspace.json +71 -45
  59. package/one/README.md +18 -0
  60. package/one/connections/a2a.md +49 -0
  61. package/one/connections/acp.md +47 -0
  62. package/one/connections/acps.md +18 -0
  63. package/one/connections/agentkit.md +18 -0
  64. package/one/connections/agui.md +18 -0
  65. package/one/connections/any-backend.md +39 -21
  66. package/one/connections/ap2.md +74 -0
  67. package/one/connections/api/queries-reference.md +18 -0
  68. package/one/connections/api-docs.md +18 -0
  69. package/one/connections/api-reference.md +18 -0
  70. package/one/connections/api.md +18 -0
  71. package/one/connections/architecture-diagram.md +18 -0
  72. package/one/connections/communications.md +18 -0
  73. package/one/connections/connections.md +18 -0
  74. package/one/connections/copilotkit.md +18 -0
  75. package/one/connections/cryptonetworks.md +18 -0
  76. package/one/connections/documentation.md +18 -0
  77. package/one/connections/effect.md +18 -0
  78. package/one/connections/elizaos.md +18 -0
  79. package/one/connections/groups.md +814 -0
  80. package/one/connections/inference.md +18 -0
  81. package/one/connections/integration-examples.md +18 -0
  82. package/one/connections/integration-guide.md +18 -0
  83. package/one/connections/integration-phase2.md +32 -14
  84. package/one/connections/kyc.md +18 -0
  85. package/one/connections/mcp.md +18 -0
  86. package/one/connections/membership.md +18 -0
  87. package/one/connections/middleware.md +18 -0
  88. package/one/connections/multitenant.md +18 -0
  89. package/one/connections/n8n.md +18 -0
  90. package/one/connections/patterns.md +18 -0
  91. package/one/connections/protocols.md +20 -2
  92. package/one/connections/relationships.md +18 -0
  93. package/one/connections/schema.md +18 -0
  94. package/one/connections/service-layer.md +18 -0
  95. package/one/connections/vectors.md +18 -0
  96. package/one/connections/wordpress.md +18 -0
  97. package/one/connections/workflow-copy.md +18 -0
  98. package/one/connections/workflow-examples.md +18 -0
  99. package/one/connections/workflow-onboarding.md +18 -0
  100. package/one/connections/workflow.md +18 -0
  101. package/one/connections/workflows/delegation.md +18 -0
  102. package/one/connections/workflows/frontend.md +18 -0
  103. package/one/connections/workflows/strategy.md +18 -0
  104. package/one/connections/workflows/tasks.md +18 -0
  105. package/one/connections/x402-baazar.md +131 -0
  106. package/one/connections/x402.md +268 -164
  107. package/one/events/2024-10-14-deployment-plan.md +15 -16
  108. package/one/events/2024-10-14-deployment-success.md +15 -16
  109. package/one/events/2024-10-14-final-sync-complete.md +15 -16
  110. package/one/events/2024-10-14-release-v2.0.6.md +15 -16
  111. package/one/events/2024-10-15-agent-clean-v2-summary.md +15 -16
  112. package/one/events/2024-10-15-handoff-to-clean.md +15 -16
  113. package/one/events/2024-10-15-package-manager-tests.md +15 -16
  114. package/one/events/2024-10-15-release-command-complete.md +15 -16
  115. package/one/events/2025-10-15-private-files-secured.md +18 -0
  116. package/one/events/2025-10-15-unignore-public-group-docs.md +18 -0
  117. package/one/events/ALIGNMENT_REPORT_PROBLEM_SOLVER.md +335 -0
  118. package/one/events/ALIGNMENT_SUMMARY.md +280 -0
  119. package/one/events/API_ROUTES_FIXES_SUMMARY.md +18 -0
  120. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +18 -0
  121. package/one/events/AUDIT-ONTOLOGY-ALIGNMENT.md +598 -0
  122. package/one/events/BEFORE_AFTER_COMPARISON.md +18 -0
  123. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +18 -0
  124. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +18 -0
  125. package/one/events/CLAUDE copy.md +897 -0
  126. package/one/events/CLEANUP-RELEASE-V2.0.8.md +18 -0
  127. package/one/events/CONNECTIONS_DEMO.md +18 -0
  128. package/one/events/CREATE-WEBSITE.md +18 -0
  129. package/one/events/CRITICAL-FIXES-COMPLETE.md +18 -0
  130. package/one/events/CUSTOM-DOMAIN.md +18 -0
  131. package/one/events/DELIVERABLES.md +18 -0
  132. package/one/events/DEMO-GROUPS-PAGE.md +18 -0
  133. package/one/events/DEMO-TESTING-SUMMARY.md +18 -0
  134. package/one/events/DEMO_COMPONENTS.md +18 -0
  135. package/one/events/DEMO_HOOKS_INDEX.md +18 -0
  136. package/one/events/DEMO_INFRASTRUCTURE.md +18 -0
  137. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +18 -0
  138. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +18 -0
  139. package/one/events/DEMO_QUICK_REFERENCE.md +18 -0
  140. package/one/events/DEMO_SETUP.md +18 -0
  141. package/one/events/DEPLOYMENT copy.md +18 -0
  142. package/one/events/DEPLOYMENT.md +18 -0
  143. package/one/events/ECOMMERCE-BEFORE-AFTER.md +16 -0
  144. package/one/events/ECOMMERCE-DEMO-PLAN.md +18 -0
  145. package/one/events/ECOMMERCE-ENHANCEMENTS.md +18 -0
  146. package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +18 -0
  147. package/one/events/ECOMMERCE-LIVE-DEMO.md +18 -0
  148. package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +18 -0
  149. package/one/events/ECOMMERCE-SETUP-SUMMARY.md +18 -0
  150. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +18 -0
  151. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +18 -0
  152. package/one/events/EFFECT_TS_API_PATTERN.md +18 -0
  153. package/one/events/FEATURE-2-4-COMPLETE.md +18 -0
  154. package/one/events/FEATURE_2_3_COMPLETE.md +18 -0
  155. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +18 -0
  156. package/one/events/GROUPS-MIGRATION.md +18 -0
  157. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +18 -0
  158. package/one/events/HANDOFF.md +18 -0
  159. package/one/events/HOOKS-DEMO.md +18 -0
  160. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +18 -0
  161. package/one/events/IMPLEMENTATION_SUMMARY.md +18 -0
  162. package/one/events/INSTALL-TESTS.md +18 -0
  163. package/one/events/INSTALLATION_FOLDERS.md +18 -0
  164. package/one/events/INSTALLATION_FOLDERS_FILES.md +18 -0
  165. package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +18 -0
  166. package/one/events/INTEGRATION-ARCHITECTURE.md +18 -0
  167. package/one/events/INTEGRATION-CHECKLIST.md +18 -0
  168. package/one/events/INTEGRATION-ORCHESTRATION.md +18 -0
  169. package/one/events/INTEGRATION-SUMMARY.md +18 -0
  170. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +18 -0
  171. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +18 -0
  172. package/one/events/LANDING-PAGE-QUICKSTART.md +18 -0
  173. package/one/events/LICENSE.md +18 -0
  174. package/one/events/MCP-CONFIGURATION.md +18 -0
  175. package/one/events/MCP-SETUP-COMPLETE.md +18 -0
  176. package/one/events/MIGRATION-REPORT.md +18 -0
  177. package/one/events/MIGRATION.md +18 -0
  178. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +18 -0
  179. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +18 -0
  180. package/one/events/NODE-UPGRADE.md +18 -0
  181. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +18 -0
  182. package/one/events/ONTOLOGY-HOOKS-README.md +18 -0
  183. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +18 -0
  184. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +18 -0
  185. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +18 -0
  186. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +18 -0
  187. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +18 -0
  188. package/one/events/PACKAGE-STRUCTURE.md +18 -0
  189. package/one/events/PLAYBOOK-SETUP-SUMMARY.md +18 -0
  190. package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +18 -0
  191. package/one/events/QA-CHECKLIST.md +18 -0
  192. package/one/events/QUICK-START-ONTOLOGY.md +18 -0
  193. package/one/events/README-archived.md +18 -0
  194. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +18 -0
  195. package/one/events/SEARCH_DEMO_DELIVERY.md +18 -0
  196. package/one/events/SEARCH_DEMO_SUMMARY.md +18 -0
  197. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +18 -0
  198. package/one/events/SECURITY-AUDIT-FIXES.md +18 -0
  199. package/one/events/SECURITY-SCAN-COMPLETE.md +18 -0
  200. package/one/events/SHOP-BUILD-STATUS.md +18 -0
  201. package/one/events/SHOP-PREMIUM-UPDATE.md +16 -0
  202. package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +18 -0
  203. package/one/events/SITE-WIDE-GRADIENT-FIX.md +18 -0
  204. package/one/events/STORE-PRODUCTION-READY-STATUS.md +18 -0
  205. package/one/events/STRIPE-INTEGRATION.md +18 -0
  206. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +18 -0
  207. package/one/events/STRIPE-SETUP-GUIDE.md +18 -0
  208. package/one/events/TEST-PLAN-INDEX.md +18 -0
  209. package/one/events/TEST-PLAN.md +18 -0
  210. package/one/events/TEST-SUMMARY.md +18 -0
  211. package/one/events/TESTS-QUICK-REF.md +18 -0
  212. package/one/events/TRANSITIONS-QUICK-START.md +18 -0
  213. package/one/events/TRANSPARENCY-FIXES.md +18 -0
  214. package/one/events/TYPESCRIPT_FIXES.md +18 -0
  215. package/one/events/TYPESCRIPT_FIXES_INDEX.md +18 -0
  216. package/one/events/VIEW-TRANSITIONS.md +18 -0
  217. package/one/events/agent-director-enhancement-summary.md +18 -0
  218. package/one/events/agent-onboard-implementation-summary.md +18 -0
  219. package/one/events/agent-ontology-alignment-completion.md +263 -0
  220. package/one/events/backend-integration-tests.md +18 -0
  221. package/one/events/clean-agent-ontology-cleanup-report.md +18 -0
  222. package/one/events/clean-agent-todo-analysis-summary.md +336 -0
  223. package/one/events/cloudflare-automation-complete.md +18 -0
  224. package/one/events/cloudflare-pages-infrastructure-setup.md +18 -0
  225. package/one/events/contact-page-complete.md +18 -0
  226. package/one/events/convex-analysis-index.md +18 -0
  227. package/one/events/convex-structure-analysis.md +18 -0
  228. package/one/events/deployment-installation-folders.md +18 -0
  229. package/one/events/deployment-ops-summary.md +18 -0
  230. package/one/events/deployment-verification.md +18 -0
  231. package/one/events/design-spec-complete.md +18 -0
  232. package/one/events/documentation-audit-index.md +473 -0
  233. package/one/events/documentation-audit-summary.md +417 -0
  234. package/one/events/documentation-improvement-roadmap.md +906 -0
  235. package/one/events/documentation-standards-compliance-report.md +538 -0
  236. package/one/events/events.md +18 -0
  237. package/one/events/frontend-effects-complete.md +584 -0
  238. package/one/events/frontend-effects-orchestration.md +1356 -0
  239. package/one/events/frontend-effects-risk-register.md +1055 -0
  240. package/one/events/frontend-effects-week1-assignments.md +1594 -0
  241. package/one/events/hook-ontology-alignment-summary.md +528 -0
  242. package/one/events/installation-folders-workflow-integration.md +18 -0
  243. package/one/events/landing-page-generator.md +18 -0
  244. package/one/events/legal-assessment-2025-10-16.md +18 -0
  245. package/one/events/onboarding-implementation-complete.md +18 -0
  246. package/one/events/ontology-test-examples.md +18 -0
  247. package/one/events/phase1-backend-implementation-complete.md +18 -0
  248. package/one/events/release.md +18 -0
  249. package/one/events/root-cleanup-alignment-report.md +265 -0
  250. package/one/events/separate-implementation-status.md +18 -0
  251. package/one/events/session-summary-2025-10-18.md +18 -0
  252. package/one/events/skills-complete.md +18 -0
  253. package/one/events/skills-infer-6-10-summary.md +18 -0
  254. package/one/events/skills-phase1-complete.md +18 -0
  255. package/one/events/structural-analysis-architecture-vs-plans.md +559 -0
  256. package/one/events/test-dashboard.md +18 -0
  257. package/one/events/test-index.md +18 -0
  258. package/one/events/test-report-ontology.md +18 -0
  259. package/one/events/testing-summary.md +18 -0
  260. package/one/events/todo-refactoring-complete.md +408 -0
  261. package/one/events/wave1-backend-implementation-complete.md +698 -0
  262. package/one/groups/features.md +26 -0
  263. package/one/groups/groups.md +83 -39
  264. package/one/groups/one.md +47 -27
  265. package/one/groups/{strategy copy.md → strategy-copy.md} +23 -5
  266. package/one/knowledge/.obsidian/ecommerce-ontology.md +18 -0
  267. package/one/knowledge/100-inference-quick-reference.md +18 -0
  268. package/one/knowledge/agent-onboard-usage.md +18 -0
  269. package/one/knowledge/agentic-commerce.md +146 -0
  270. package/one/knowledge/ai-agents-vs-memecoins-thesis.md +683 -0
  271. package/one/knowledge/ai-platform.md +18 -0
  272. package/one/knowledge/ai-token-crypto-analysis-framework.md +1191 -0
  273. package/one/knowledge/ai-token-paradigm-shift-2025.md +732 -0
  274. package/one/knowledge/altcoin-cycle-prediction-ontology.md +884 -0
  275. package/one/knowledge/altcoin-cycle-trading-strategy.md +642 -0
  276. package/one/knowledge/architecture-any-backend.md +265 -42
  277. package/one/knowledge/architecture-diagram.md +404 -94
  278. package/one/knowledge/architecture-frontend.md +130 -51
  279. package/one/knowledge/architecture.md +1496 -1831
  280. package/one/knowledge/{ontology.md.backup → archived/ontology.old.md} +18 -0
  281. package/one/knowledge/astro-effect-complete-vision.md +2148 -0
  282. package/one/knowledge/astro-effect-simple-architecture.md +717 -0
  283. package/one/knowledge/audit-agent-onboard-alignment.md +481 -0
  284. package/one/knowledge/audit-agent-sales-alignment.md +444 -0
  285. package/one/knowledge/backend-api-reference.md +18 -0
  286. package/one/knowledge/cli-claude-handoff.md +18 -0
  287. package/one/knowledge/context-engineering.md +610 -0
  288. package/one/knowledge/crypto-analysis-strategy.md +1276 -0
  289. package/one/knowledge/crypto-cycle-2024-2025-analysis.md +44 -0
  290. package/one/knowledge/crypto.md +18 -0
  291. package/one/knowledge/docs.md +627 -0
  292. package/one/knowledge/dsl.md +18 -0
  293. package/one/knowledge/files.md +18 -0
  294. package/one/knowledge/frontend.md +18 -0
  295. package/one/knowledge/hono.md +18 -0
  296. package/one/knowledge/implementation-examples.md +18 -0
  297. package/one/knowledge/installation-folders.md +18 -0
  298. package/one/knowledge/institutional-cycle-paradigm-2025.md +555 -0
  299. package/one/knowledge/knowledge.md +18 -0
  300. package/one/knowledge/language.md +18 -0
  301. package/one/knowledge/lessons-learned.md +18 -0
  302. package/one/knowledge/lessons-website-building-focus.md +18 -0
  303. package/one/knowledge/merge-report.md +254 -0
  304. package/one/knowledge/nine-padel-playbook.md +18 -0
  305. package/one/knowledge/ontology-blog.yaml +42 -26
  306. package/one/knowledge/ontology-cheatsheet.md +18 -0
  307. package/one/knowledge/ontology-community.yaml +60 -37
  308. package/one/knowledge/ontology-core-universal.md +19 -1
  309. package/one/knowledge/ontology-core.yaml +58 -45
  310. package/one/knowledge/ontology-courses.yaml +71 -48
  311. package/one/knowledge/ontology-creator.md +30 -4
  312. package/one/knowledge/ontology-crypto.md +1603 -0
  313. package/one/knowledge/ontology-developer-guide.md +18 -0
  314. package/one/knowledge/ontology-documentation.md +46 -25
  315. package/one/knowledge/ontology-ecommerce.md +24 -6
  316. package/one/knowledge/ontology-education.md +18 -0
  317. package/one/knowledge/ontology-engineering-specification.md +22 -4
  318. package/one/knowledge/ontology-engineering.md +67 -43
  319. package/one/knowledge/ontology-files.yaml +525 -0
  320. package/one/knowledge/ontology-frontend-master.md +2898 -0
  321. package/one/knowledge/ontology-frontend-specifications.md +57 -49
  322. package/one/knowledge/ontology-frontend.md +40 -22
  323. package/one/knowledge/ontology-index.md +18 -0
  324. package/one/knowledge/ontology-minimal.yaml +18 -16
  325. package/one/knowledge/ontology-portfolio.yaml +40 -26
  326. package/one/knowledge/ontology-quickstart.md +18 -0
  327. package/one/knowledge/ontology-release.md +317 -0
  328. package/one/knowledge/ontology-shop.yaml +146 -119
  329. package/one/knowledge/ontology-tokens.yaml +46 -27
  330. package/one/knowledge/ontology-tutorial.md +18 -0
  331. package/one/knowledge/ontology-video-script.md +18 -0
  332. package/one/knowledge/ontology-visual-guide.md +20 -2
  333. package/one/knowledge/ontology.md +1329 -304
  334. package/one/knowledge/ontology.yaml +763 -275
  335. package/one/knowledge/patterns/backend/convex-mutation-pattern.md +48 -18
  336. package/one/knowledge/patterns/backend/convex-query-pattern.md +78 -23
  337. package/one/knowledge/patterns/backend/mutation-template.md +28 -10
  338. package/one/knowledge/patterns/backend/query-template.md +44 -25
  339. package/one/knowledge/patterns/backend/service-template.md +35 -14
  340. package/one/knowledge/patterns/design/component-architecture.md +45 -9
  341. package/one/knowledge/patterns/design/test-driven-design-pattern.md +37 -3
  342. package/one/knowledge/patterns/design/wireframe-template.md +36 -2
  343. package/one/knowledge/patterns/frontend/component-template.md +91 -40
  344. package/one/knowledge/patterns/frontend/form-template.md +131 -59
  345. package/one/knowledge/patterns/frontend/page-template.md +59 -28
  346. package/one/knowledge/patterns/frontend/react-component-pattern.md +87 -27
  347. package/one/knowledge/patterns/test/acceptance-criteria-template.md +28 -10
  348. package/one/knowledge/patterns/test/technical-test-template.md +48 -26
  349. package/one/knowledge/patterns/test/test-driven-pattern.md +25 -5
  350. package/one/knowledge/patterns/test/user-flow-template.md +18 -0
  351. package/one/knowledge/provider-agnostic-content.md +995 -0
  352. package/one/knowledge/provider-creation-guide.md +18 -0
  353. package/one/knowledge/quality-loop.md +18 -0
  354. package/one/knowledge/readme-architecture.md +158 -0
  355. package/one/knowledge/readme.md +18 -0
  356. package/one/knowledge/rules.md +18 -0
  357. package/one/knowledge/score.md +18 -0
  358. package/one/knowledge/specifications.md +18 -0
  359. package/one/knowledge/tags.md +18 -0
  360. package/one/knowledge/todo-template.md +18 -0
  361. package/one/knowledge/todo.md +18 -0
  362. package/one/knowledge/typescript-patterns.md +18 -0
  363. package/one/knowledge/universal-generation-language.md +827 -0
  364. package/one/knowledge/x402-research.md +104 -0
  365. package/one/license.md +18 -0
  366. package/one/people/anthony-o-connell.md +48 -19
  367. package/one/people/people.md +54 -31
  368. package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +401 -0
  369. package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +588 -0
  370. package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +461 -0
  371. package/one/things/CHECKLIST.md +51 -0
  372. package/one/things/IMPLEMENTATION_STATUS.md +379 -0
  373. package/one/things/ONE.md +19 -1
  374. package/one/things/agents/agent-backend.md +198 -98
  375. package/one/things/agents/agent-builder.md +267 -158
  376. package/one/things/agents/agent-clean.md +40 -15
  377. package/one/things/agents/agent-clone.md +33 -50
  378. package/one/things/agents/agent-deploy.md +59 -11
  379. package/one/things/agents/agent-designer.md +274 -146
  380. package/one/things/agents/agent-director.md +20 -2
  381. package/one/things/agents/agent-documenter.md +126 -46
  382. package/one/things/agents/agent-frontend.md +104 -22
  383. package/one/things/agents/agent-integrator.md +153 -76
  384. package/one/things/agents/agent-lawyer.md +197 -92
  385. package/one/things/agents/agent-problem-solver.md +302 -224
  386. package/one/things/agents/agent-quality.md +149 -19
  387. package/one/things/agents/agent-sales.md +95 -7
  388. package/one/things/cascade/cascade.yaml +20 -3
  389. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +53 -0
  390. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +50 -0
  391. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +76 -0
  392. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +49 -3
  393. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +45 -0
  394. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +32 -0
  395. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +45 -3
  396. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +44 -0
  397. package/one/things/cascade/docs/examples/1-3-event-coordination.md +40 -1
  398. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +81 -25
  399. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +41 -0
  400. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +91 -16
  401. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +136 -73
  402. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +43 -0
  403. package/one/things/cascade/docs/examples/1-5-quality-loops.md +88 -4
  404. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +52 -3
  405. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +44 -1
  406. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +78 -14
  407. package/one/things/cascade/docs/examples/readme.md +37 -0
  408. package/one/things/cascade/docs/getting-started.md +18 -0
  409. package/one/things/cascade/docs/workflow.md +18 -12
  410. package/one/things/cascade/readme.md +43 -0
  411. package/one/things/cascade/templates/feature-template.md +28 -6
  412. package/one/things/claude/agents/advocacy-activation-manager.md +64 -39
  413. package/one/things/claude/agents/advocacy-campaign-designer.md +64 -39
  414. package/one/things/claude/agents/analyst.md +64 -39
  415. package/one/things/claude/agents/architect.md +64 -39
  416. package/one/things/claude/agents/brand-identity-specialist.md +64 -39
  417. package/one/things/claude/agents/bstp-token-strategist.md +48 -25
  418. package/one/things/claude/agents/builder-repo.md +69 -26
  419. package/one/things/claude/agents/bullstamp-community-builder.md +48 -25
  420. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +48 -25
  421. package/one/things/claude/agents/bulltilt-platform-growth.md +48 -25
  422. package/one/things/claude/agents/company-bullstamp-character.md +45 -30
  423. package/one/things/claude/agents/company-bullstamp-community.md +45 -30
  424. package/one/things/claude/agents/company-bullstamp-marketing.md +45 -30
  425. package/one/things/claude/agents/company-bullstamp-token.md +45 -30
  426. package/one/things/claude/agents/company-bulltilt-growth.md +45 -30
  427. package/one/things/claude/agents/content-bibliography-formatter.md +48 -25
  428. package/one/things/claude/agents/content-calendar-planner.md +59 -34
  429. package/one/things/claude/agents/content-chapter-formatter.md +60 -35
  430. package/one/things/claude/agents/content-formatter.md +59 -34
  431. package/one/things/claude/agents/content-hook-specialist.md +54 -31
  432. package/one/things/claude/agents/content-image-formatter.md +59 -34
  433. package/one/things/claude/agents/content-introduction-formatter.md +59 -34
  434. package/one/things/claude/agents/content-multiplication-engine.md +54 -31
  435. package/one/things/claude/agents/content-playbook-writer.md +60 -35
  436. package/one/things/claude/agents/content-team-manager.md +59 -34
  437. package/one/things/claude/agents/content-toc-formatter.md +60 -35
  438. package/one/things/claude/agents/convex-backend-specialist.md +380 -216
  439. package/one/things/claude/agents/core-manager.md +59 -34
  440. package/one/things/claude/agents/core-master.md +55 -32
  441. package/one/things/claude/agents/cross-functional-manager.md +46 -41
  442. package/one/things/claude/agents/crypto-airdrop-strategist.md +74 -54
  443. package/one/things/claude/agents/crypto-analytics-educator.md +73 -30
  444. package/one/things/claude/agents/crypto-architecture-specialist.md +70 -39
  445. package/one/things/claude/agents/crypto-community-analyst.md +47 -31
  446. package/one/things/claude/agents/crypto-community-psychologist.md +68 -31
  447. package/one/things/claude/agents/crypto-dex-optimization-expert.md +72 -31
  448. package/one/things/claude/agents/crypto-dex-optimizer.md +45 -30
  449. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +69 -30
  450. package/one/things/claude/agents/crypto-diamond-hands.md +45 -30
  451. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +73 -30
  452. package/one/things/claude/agents/crypto-engagement-specialist.md +71 -30
  453. package/one/things/claude/agents/crypto-market-researcher.md +45 -30
  454. package/one/things/claude/agents/crypto-marketing-orchestrator.md +74 -34
  455. package/one/things/claude/agents/crypto-network-effect-amplifier.md +75 -30
  456. package/one/things/claude/agents/crypto-optimization-analyst.md +73 -30
  457. package/one/things/claude/agents/crypto-strategic-synthesizer.md +69 -30
  458. package/one/things/claude/agents/crypto-team-manager.md +45 -40
  459. package/one/things/claude/agents/crypto-token-analyst.md +66 -25
  460. package/one/things/claude/agents/crypto-viral-content-creator.md +64 -61
  461. package/one/things/claude/agents/crypto-wallet-identification-expert.md +61 -51
  462. package/one/things/claude/agents/crypto-wallet-identifier.md +45 -30
  463. package/one/things/claude/agents/customer-journey-designer.md +51 -58
  464. package/one/things/claude/agents/customer-success-manager.md +51 -58
  465. package/one/things/claude/agents/dev.md +51 -58
  466. package/one/things/claude/agents/documenter.md +71 -69
  467. package/one/things/claude/agents/elevate-marketing-orchestrator.md +45 -52
  468. package/one/things/claude/agents/engagement-specialist.md +45 -52
  469. package/one/things/claude/agents/engineering-architect.md +54 -54
  470. package/one/things/claude/agents/engineering-business-analyst.md +46 -56
  471. package/one/things/claude/agents/engineering-developer.md +51 -52
  472. package/one/things/claude/agents/engineering-director.md +65 -25
  473. package/one/things/claude/agents/engineering-ingestor.md +110 -100
  474. package/one/things/claude/agents/engineering-product-manager.md +43 -55
  475. package/one/things/claude/agents/engineering-product-owner.md +46 -56
  476. package/one/things/claude/agents/engineering-project-coordinator.md +44 -56
  477. package/one/things/claude/agents/engineering-quality-assurance.md +53 -54
  478. package/one/things/claude/agents/engineering-team-manager.md +46 -43
  479. package/one/things/claude/agents/engineering-user-experience.md +51 -52
  480. package/one/things/claude/agents/framework-elevate-manager.md +45 -30
  481. package/one/things/claude/agents/improver.md +120 -78
  482. package/one/things/claude/agents/intelligence-team-manager.md +45 -40
  483. package/one/things/claude/agents/lead-capture-expert.md +45 -52
  484. package/one/things/claude/agents/lead-magnet-creator.md +45 -52
  485. package/one/things/claude/agents/market-research-analyst.md +48 -25
  486. package/one/things/claude/agents/marketing-brand-identity.md +57 -27
  487. package/one/things/claude/agents/marketing-content-hooks.md +45 -40
  488. package/one/things/claude/agents/marketing-content-multiplier.md +45 -40
  489. package/one/things/claude/agents/marketing-content-poster.md +71 -60
  490. package/one/things/claude/agents/marketing-customer-journey.md +45 -40
  491. package/one/things/claude/agents/marketing-director.md +46 -41
  492. package/one/things/claude/agents/marketing-engagement.md +45 -40
  493. package/one/things/claude/agents/marketing-lead-capture.md +45 -40
  494. package/one/things/claude/agents/marketing-lead-magnet.md +45 -40
  495. package/one/things/claude/agents/marketing-network-effects.md +45 -40
  496. package/one/things/claude/agents/marketing-nurture-campaigns.md +45 -40
  497. package/one/things/claude/agents/marketing-share-optimizer.md +45 -40
  498. package/one/things/claude/agents/marketing-team-manager.md +45 -40
  499. package/one/things/claude/agents/marketing-viral-growth.md +49 -18
  500. package/one/things/claude/agents/mission-commander.md +45 -40
  501. package/one/things/claude/agents/network-effect-analyst.md +48 -31
  502. package/one/things/claude/agents/nextjs-15-specialist.md +209 -122
  503. package/one/things/claude/agents/npx.md +126 -70
  504. package/one/things/claude/agents/nurture-campaign-manager.md +48 -25
  505. package/one/things/claude/agents/one-master.md +48 -25
  506. package/one/things/claude/agents/one-orchestrator.md +57 -27
  507. package/one/things/claude/agents/one.md +88 -31
  508. package/one/things/claude/agents/playbook-generator.md +48 -25
  509. package/one/things/claude/agents/pm.md +48 -25
  510. package/one/things/claude/agents/po.md +51 -26
  511. package/one/things/claude/agents/qa.md +50 -25
  512. package/one/things/claude/agents/research-foundation-analyst.md +48 -31
  513. package/one/things/claude/agents/research-intelligence-gatherer.md +59 -32
  514. package/one/things/claude/agents/research-market-analyst.md +47 -30
  515. package/one/things/claude/agents/research-team-manager.md +47 -40
  516. package/one/things/claude/agents/sales-environment-optimizer.md +50 -25
  517. package/one/things/claude/agents/sales-team-manager.md +47 -40
  518. package/one/things/claude/agents/sales-upsell-strategist.md +47 -30
  519. package/one/things/claude/agents/service-advocacy-campaigns.md +47 -30
  520. package/one/things/claude/agents/service-advocacy-manager.md +47 -30
  521. package/one/things/claude/agents/service-success-manager.md +47 -30
  522. package/one/things/claude/agents/service-team-manager.md +45 -40
  523. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +85 -30
  524. package/one/things/claude/agents/share-optimization-specialist.md +50 -25
  525. package/one/things/claude/agents/sm.md +50 -25
  526. package/one/things/claude/agents/story-teller.md +51 -26
  527. package/one/things/claude/agents/task-master.md +52 -27
  528. package/one/things/claude/agents/tauri-cross-platform-specialist.md +201 -116
  529. package/one/things/claude/agents/tester.md +85 -46
  530. package/one/things/claude/agents/the-bull-character-manager.md +48 -25
  531. package/one/things/claude/agents/tools-playbook-generator.md +43 -40
  532. package/one/things/claude/agents/turbo-repo-builder.md +57 -27
  533. package/one/things/claude/agents/upsell-strategist.md +48 -25
  534. package/one/things/claude/agents/ux-expert.md +50 -25
  535. package/one/things/claude/agents/viral-growth-orchestrator.md +50 -27
  536. package/one/things/claude/commands/agent.md +25 -5
  537. package/one/things/claude/commands/cascade-status.md +33 -8
  538. package/one/things/claude/commands/ingest.md +64 -11
  539. package/one/things/claude/commands/ingestor.md +29 -7
  540. package/one/things/claude/commands/mission.md +24 -4
  541. package/one/things/claude/commands/npx.md +30 -7
  542. package/one/things/claude/commands/one.md +114 -68
  543. package/one/things/claude/commands/quality-check.md +72 -24
  544. package/one/things/claude/commands/smart-route.md +45 -4
  545. package/one/things/claude/commands/start.md +22 -4
  546. package/one/things/claude/commands/story.md +25 -5
  547. package/one/things/claude/commands/task.md +21 -1
  548. package/one/things/cli/cli-code.md +244 -219
  549. package/one/things/cli/cli-compiler-code.md +244 -219
  550. package/one/things/cli/cli.md +30 -6
  551. package/one/things/components/card-shadcn.md +252 -228
  552. package/one/things/components/card.md +315 -324
  553. package/one/things/components.md +667 -593
  554. package/one/things/componets.md +16 -1
  555. package/one/things/creator-diagram.md +23 -5
  556. package/one/things/demo-accessibility-animations.md +73 -47
  557. package/one/things/demo-components.md +225 -219
  558. package/one/things/demo-design-summary.md +89 -26
  559. package/one/things/demo-design-system.md +184 -130
  560. package/one/things/demo-page-layouts.md +52 -25
  561. package/one/things/designs/accessibility-audit.md +153 -66
  562. package/one/things/designs/component-specifications.md +163 -65
  563. package/one/things/designs/design-overview.md +81 -22
  564. package/one/things/designs/design-tokens.md +127 -93
  565. package/one/things/designs/wireframes-dashboard.md +64 -7
  566. package/one/things/docs/api-requests.md +75 -11
  567. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +18 -0
  568. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +57 -0
  569. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +62 -6
  570. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +60 -5
  571. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +95 -27
  572. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +130 -62
  573. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +43 -19
  574. package/one/things/docs/ecommerce/QUICK-START.md +41 -4
  575. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +75 -6
  576. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +58 -24
  577. package/one/things/examples/children/lemonade-stand.md +52 -14
  578. package/one/things/examples/enterprise/crm-saas.md +43 -28
  579. package/one/things/features/1-1-agent-prompts.md +76 -0
  580. package/one/things/features/1-2-yaml-orchestrator.md +32 -0
  581. package/one/things/features/1-3-event-coordination.md +40 -1
  582. package/one/things/features/1-4-knowledge-management.md +91 -16
  583. package/one/things/features/1-5-quality-loops.md +88 -4
  584. package/one/things/features/1-6-numbering-structure.md +78 -14
  585. package/one/things/features/2-1-dataprovider-interface.md +311 -86
  586. package/one/things/features/2-2-config-system.md +307 -140
  587. package/one/things/features/2-3-effectts-services.md +263 -116
  588. package/one/things/features/2-4-react-hooks.md +217 -201
  589. package/one/things/features/2-5-auth-migration.md +406 -308
  590. package/one/things/features/2-6-dashboard-migration.md +112 -13
  591. package/one/things/features/2-7-alternative-providers.md +138 -65
  592. package/one/things/features/2-7-implementation-report.md +68 -24
  593. package/one/things/features/2-cli.md +88 -76
  594. package/one/things/features/2-design.md +112 -80
  595. package/one/things/features/2-tests.md +56 -0
  596. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +91 -36
  597. package/one/things/features/DECOUPLING.md +36 -18
  598. package/one/things/features/DEPLOYMENT.md +22 -4
  599. package/one/things/features/IMPLEMENTATION_SUMMARY.md +48 -2
  600. package/one/things/features/improve.md +47 -29
  601. package/one/things/features/remove-convex-deps.md +18 -0
  602. package/one/things/features/top-features.md +28 -20
  603. package/one/things/features/use-one-backend.md +210 -173
  604. package/one/things/features-in-english.md +19 -6
  605. package/one/things/files.yaml +721 -0
  606. package/one/things/ideas/1-create-workflow.md +18 -0
  607. package/one/things/ideas/2-backend-agnostic-frontend.md +57 -2
  608. package/one/things/implementation/backend-guide.md +64 -19
  609. package/one/things/interface.md +43 -0
  610. package/one/things/landing-page-implementation.md +455 -0
  611. package/one/things/legal/README.md +44 -0
  612. package/one/things/legal/privacy-policy.md +186 -23
  613. package/one/things/legal/terms-of-service.md +164 -3
  614. package/one/things/master-workflow-plan.md +806 -0
  615. package/one/things/plans/0-timeline.md +36 -0
  616. package/one/things/plans/1-create-workflow.md +19 -0
  617. package/one/things/plans/QUICK-START-SIMPLIFICATION.md +333 -0
  618. package/one/things/plans/README-SIMPLIFICATION.md +349 -0
  619. package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +16 -0
  620. package/one/things/plans/SIMPLIFICATION-SUMMARY.md +455 -0
  621. package/one/things/plans/ai-elements.md +21 -2
  622. package/one/things/plans/ai-integration.md +108 -59
  623. package/one/things/plans/ai-sdk.md +85 -48
  624. package/one/things/plans/ai-tools.md +621 -0
  625. package/one/things/plans/app.md +142 -71
  626. package/one/things/plans/architecture-summary.md +34 -5
  627. package/one/things/plans/async-ai-agents.md +19 -1
  628. package/one/things/plans/backend-agnostic-frontend.md +70 -8
  629. package/one/things/plans/backend-cleanup-quickstart.md +52 -18
  630. package/one/things/plans/backend-ontology-conformance.md +110 -51
  631. package/one/things/plans/backend-status.md +58 -0
  632. package/one/things/plans/backend-structure.md +103 -55
  633. package/one/things/plans/backend-target-structure.md +61 -17
  634. package/one/things/plans/backend.md +60 -18
  635. package/one/things/plans/better-auth-any-backend-revised.md +325 -287
  636. package/one/things/plans/better-auth-any-backend.md +575 -531
  637. package/one/things/plans/better-auth-available-features.md +43 -5
  638. package/one/things/plans/big-plan.md +20 -6
  639. package/one/things/plans/cli-updates-required.md +44 -4
  640. package/one/things/plans/complete-step-by-step.md +223 -116
  641. package/one/things/plans/components.md +709 -0
  642. package/one/things/plans/convex-agents.md +79 -50
  643. package/one/things/plans/convex-better-auth.md +186 -154
  644. package/one/things/plans/convex-on-off.md +47 -29
  645. package/one/things/plans/crypto-token-researcher.md +629 -0
  646. package/one/things/plans/data-quality-metrics.md +745 -0
  647. package/one/things/plans/deep-researcher-agent.md +466 -0
  648. package/one/things/plans/deploy-to-cloudflare.md +55 -13
  649. package/one/things/plans/deployment-architecture.md +54 -11
  650. package/one/things/plans/desktop.md +21 -3
  651. package/one/things/plans/development-plan.md +184 -121
  652. package/one/things/plans/development-workflow-tldr.md +207 -0
  653. package/one/things/plans/development-workflow.md +959 -0
  654. package/one/things/plans/effect-components.md +667 -593
  655. package/one/things/plans/effect-patterns-reference.md +2235 -0
  656. package/one/things/plans/effect.md +204 -131
  657. package/one/things/plans/email.md +21 -8
  658. package/one/things/plans/enhance-auth.md +64 -41
  659. package/one/things/plans/execution-strategy.md +1291 -0
  660. package/one/things/plans/existing-infrastructure.md +712 -0
  661. package/one/things/plans/feature-based-sites.md +124 -51
  662. package/one/things/plans/frontend-effects.md +1276 -0
  663. package/one/things/plans/group-folder-multi-tenancy.md +92 -29
  664. package/one/things/plans/improve-codebase.md +498 -421
  665. package/one/things/plans/install-components.md +18 -1
  666. package/one/things/plans/integrate-frontend-and-backend.md +68 -44
  667. package/one/things/plans/landing.md +92 -0
  668. package/one/things/plans/layout.md +45 -1
  669. package/one/things/plans/mail-backend.md +546 -493
  670. package/one/things/plans/mail.md +379 -326
  671. package/one/things/plans/mcp-clear-context-prompt.md +21 -0
  672. package/one/things/plans/mcp-simple.md +20 -0
  673. package/one/things/plans/multi-ontology-architecture.md +115 -66
  674. package/one/things/plans/next-features.md +31 -0
  675. package/one/things/plans/onboarding.md +20 -1
  676. package/one/things/plans/one.md +18 -0
  677. package/one/things/plans/ontology-6-dimensions.md +24 -45
  678. package/one/things/plans/ontology-compliance-audit.md +315 -0
  679. package/one/things/plans/ontology-driven-strategy.md +19 -3
  680. package/one/things/plans/ontology-refine.md +586 -0
  681. package/one/things/plans/ontology-ui-approach.md +18 -0
  682. package/one/things/plans/open-agent.md +152 -97
  683. package/one/things/plans/performace.md +32 -0
  684. package/one/things/plans/phase-1-foundation.md +620 -0
  685. package/one/things/plans/phase-3-implementation.md +1037 -0
  686. package/one/things/plans/quick-wins.md +342 -187
  687. package/one/things/plans/readme-backend-cleanup.md +54 -13
  688. package/one/things/plans/release.md +55 -2
  689. package/one/things/plans/repos.md +22 -0
  690. package/one/things/plans/separate-copy-2.md +127 -71
  691. package/one/things/plans/separate-copy-3.md +35 -14
  692. package/one/things/plans/separate-copy.md +127 -71
  693. package/one/things/plans/separate-demo.md +37 -3
  694. package/one/things/plans/separate.md +24 -6
  695. package/one/things/plans/sequence.md +155 -12
  696. package/one/things/plans/shadcn-integration-summary.md +104 -44
  697. package/one/things/plans/sidebar.md +44 -10
  698. package/one/things/plans/skills.md +103 -0
  699. package/one/things/plans/small-fixes.md +19 -1
  700. package/one/things/plans/start-new.md +34 -8
  701. package/one/things/plans/switch-off-auth.md +22 -0
  702. package/one/things/plans/sync-checklist.md +30 -0
  703. package/one/things/plans/test-backend-connection.md +38 -0
  704. package/one/things/plans/unified-implementation-plan.md +144 -62
  705. package/one/things/plans/update-demos.md +103 -35
  706. package/one/things/plans/use-our-backend.md +572 -0
  707. package/one/things/plans/wave1-onboarding-100-inferences.md +1686 -0
  708. package/one/things/plans/wave1-onboarding-vision.md +744 -0
  709. package/one/things/plans/wave1-orchestration-summary.md +604 -0
  710. package/one/things/plans/wave1-specialist-assignments.md +1413 -0
  711. package/one/things/plans/workflow-files.md +28 -14
  712. package/one/things/plans/workflow.md +18 -12
  713. package/one/things/products/cascade-landing-page.md +150 -46
  714. package/one/things/products/cascade.md +185 -135
  715. package/one/things/products/context-engineering.md +411 -350
  716. package/one/things/products/onthology.md +15 -0
  717. package/one/things/products/ontology-ui-shadcn.md +375 -353
  718. package/one/things/products/ontology-ui.md +101 -59
  719. package/one/things/products/ontology.md +90 -18
  720. package/one/things/products/sdk.md +181 -165
  721. package/one/things/promptkit.md +70 -43
  722. package/one/things/repos/all-repos.md +0 -0
  723. package/one/things/service-providers-new.md +95 -25
  724. package/one/things/service-providers.md +231 -202
  725. package/one/things/structure.md +532 -0
  726. package/one/things/system.md +18 -0
  727. package/one/things/templates.md +40 -0
  728. package/one/things/tests/2-1-dataprovider-interface.md +103 -31
  729. package/one/things/tests/2-1-test-analysis.md +65 -17
  730. package/one/things/things.md +48 -13
  731. package/one/things/todo-acp-integration.md +744 -0
  732. package/one/things/todo-ai.md +933 -0
  733. package/one/things/todo-api.md +1078 -0
  734. package/one/things/todo-assignment.md +580 -0
  735. package/one/things/todo-buy-chatgpt.md +1450 -0
  736. package/one/things/todo-components.md +1683 -0
  737. package/one/things/todo-connections.md +278 -0
  738. package/one/things/todo-ecommerce-frontend.md +1313 -0
  739. package/one/things/todo-ecommerce.md +569 -0
  740. package/one/things/todo-effects.md +1075 -0
  741. package/one/things/todo-frontend-effects.md +977 -0
  742. package/one/things/todo-landing-page.md +1091 -0
  743. package/one/things/todo-mail.md +1160 -0
  744. package/one/things/todo-master-plan.md +490 -0
  745. package/one/things/todo-onboard.md +666 -0
  746. package/one/things/todo-one-ie.md +538 -0
  747. package/one/things/todo-page.md +606 -0
  748. package/one/things/todo-plans.md +282 -0
  749. package/one/things/todo-projects.md +241 -0
  750. package/one/things/todo-refactoring-plan.md +366 -0
  751. package/one/things/todo-sequence.md +1621 -0
  752. package/one/things/todo-use-our-backend.md +1908 -0
  753. package/one/things/todo-workflow.md +626 -0
  754. package/one/things/todo-x402.md +2047 -0
  755. package/one/things/todo.md +459 -1075
  756. package/one/things/video/scripts-crypto.md +835 -0
  757. package/one/things/video-script-ontology.md +334 -0
  758. package/package.json +1 -1
  759. package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +0 -49
  760. package/one/knowledge/docs/flow.md +0 -0
  761. package/one/knowledge/documentation-summary.md +0 -285
  762. package/one/knowledge/inference-score.md +0 -159
  763. package/one/knowledge/ontology-frontend-copy-2.md +0 -1492
  764. package/one/knowledge/ontology-frontend-copy.md +0 -753
  765. package/one/knowledge/ontology-migration-guide.md +0 -811
  766. package/one/things/features/0 All Features.md +0 -2
  767. package/one/things/plans/1-create-workflow-status.md +0 -555
  768. package/one/things/plans/2-backend-agnostic-frontend.md +0 -546
  769. package/one/things/plans/2-sites.md +0 -895
  770. package/one/things/plans/3-groups.md +0 -735
  771. package/one/things/plans/5-build-frontend.md +0 -0
  772. package/one/things/plans/5-complete.md +0 -17
  773. package/one/things/plans/agent-director-100-inference-plans.md +0 -410
  774. package/one/things/plans/dual-website-strategy.md +0 -612
  775. package/one/things/plans/releases.md +0 -809
@@ -1,3 +1,21 @@
1
+ ---
2
+ title: Agent Designer
3
+ dimension: things
4
+ category: agents
5
+ tags: agent, ai-agent, connections, events, knowledge, ontology, things
6
+ related_dimensions: connections, events, groups, knowledge, people
7
+ scope: global
8
+ created: 2025-11-03
9
+ updated: 2025-11-03
10
+ version: 1.0.0
11
+ ai_context: |
12
+ This document is part of the things dimension in the agents category.
13
+ Location: one/things/agents/agent-designer.md
14
+ Purpose: Documents design agent
15
+ Related dimensions: connections, events, groups, knowledge, people
16
+ For AI agents: Read this to understand agent designer.
17
+ ---
18
+
1
19
  # Design Agent
2
20
 
3
21
  **Version:** 2.0.0 (6-Dimension Ontology Aligned)
@@ -28,7 +46,9 @@ Create test-driven visual designs (wireframes, components, tokens) that satisfy
28
46
  ## The 6-Dimension Ontology (Understanding Context)
29
47
 
30
48
  ### 1. Organizations (Multi-tenant isolation)
49
+
31
50
  Design Agent pulls brand guidelines from organization settings:
51
+
32
52
  - Brand colors (primary, secondary, accent)
33
53
  - Typography preferences (font families, scale)
34
54
  - Spacing system (4px base unit or custom)
@@ -36,6 +56,7 @@ Design Agent pulls brand guidelines from organization settings:
36
56
  - Logo and visual identity
37
57
 
38
58
  **Key Operation:**
59
+
39
60
  ```typescript
40
61
  // Get organization brand guidelines
41
62
  const org = await ctx.db.get(organizationId);
@@ -44,12 +65,15 @@ const typography = org.properties.typography;
44
65
  ```
45
66
 
46
67
  ### 2. People (Authorization & governance)
68
+
47
69
  Design Agent respects roles:
70
+
48
71
  - **org_owner**: Can customize brand guidelines
49
72
  - **org_user**: Uses established design system
50
73
  - **platform_owner**: Can access all org designs for support
51
74
 
52
75
  **Key Operation:**
76
+
53
77
  ```typescript
54
78
  // Check if person can modify design tokens
55
79
  const person = await ctx.db.get(actorId);
@@ -59,12 +83,15 @@ if (person.properties.role !== "org_owner") {
59
83
  ```
60
84
 
61
85
  ### 3. Things (All entities)
86
+
62
87
  Design Agent creates and consumes things:
88
+
63
89
  - **Reads:** feature (specifications), test (user flows + acceptance criteria), organization (brand)
64
90
  - **Creates:** design (wireframes), design (component-definition), design (design-tokens)
65
91
  - **References:** blog_post, course, video (content types being designed)
66
92
 
67
93
  **Key Operation:**
94
+
68
95
  ```typescript
69
96
  // Create wireframe thing
70
97
  await ctx.db.insert("things", {
@@ -83,7 +110,9 @@ await ctx.db.insert("things", {
83
110
  ```
84
111
 
85
112
  ### 4. Connections (Relationships)
113
+
86
114
  Design Agent establishes connections:
115
+
87
116
  - **assigned_to**: feature → design_agent (work assignment)
88
117
  - **tested_by**: test → feature (informs design decisions)
89
118
  - **implements**: design → feature (design fulfills feature)
@@ -91,6 +120,7 @@ Design Agent establishes connections:
91
120
  - **configured_by**: organization → design_agent (brand settings)
92
121
 
93
122
  **Key Operation:**
123
+
94
124
  ```typescript
95
125
  // Link design to feature
96
126
  await ctx.db.insert("connections", {
@@ -98,12 +128,14 @@ await ctx.db.insert("connections", {
98
128
  toThingId: featureId,
99
129
  relationshipType: "implements",
100
130
  metadata: { stage: "5_design", completeness: 100 },
101
- createdAt: Date.now()
131
+ createdAt: Date.now(),
102
132
  });
103
133
  ```
104
134
 
105
135
  ### 5. Events (All actions over time)
136
+
106
137
  Design Agent logs all work as events:
138
+
107
139
  - **agent_created**: Design agent initialized
108
140
  - **agent_executed**: Design work started
109
141
  - **agent_completed**: Design work finished successfully
@@ -114,6 +146,7 @@ Design Agent logs all work as events:
114
146
  - **accessibility_validated**: WCAG compliance checked
115
147
 
116
148
  **Key Operation:**
149
+
117
150
  ```typescript
118
151
  // Log wireframe creation event
119
152
  await ctx.db.insert("events", {
@@ -124,18 +157,21 @@ await ctx.db.insert("events", {
124
157
  metadata: {
125
158
  featureId: featureId,
126
159
  screens: ["create-course", "edit-course", "delete-confirmation"],
127
- format: "figma-url" | "svg" | "html-prototype"
128
- }
160
+ format: "figma-url" | "svg" | "html-prototype",
161
+ },
129
162
  });
130
163
  ```
131
164
 
132
165
  ### 6. Knowledge (Labels + vectors for RAG)
166
+
133
167
  Design Agent builds knowledge:
168
+
134
169
  - **Labels**: skill:ui-design, skill:ux-design, format:wireframe, technology:tailwind-v4, capability:responsive-design
135
170
  - **Chunks**: Reusable design patterns (3-column layout, centered form, modal patterns)
136
171
  - **Junction**: Links design patterns (knowledge) to design agent (thing) via thingKnowledge
137
172
 
138
173
  **Key Operation:**
174
+
139
175
  ```typescript
140
176
  // Store design pattern as knowledge chunk
141
177
  await ctx.db.insert("knowledge", {
@@ -206,6 +242,7 @@ await ctx.db.insert("thingKnowledge", {
206
242
  ### Connections (Ontology Lines 465-567)
207
243
 
208
244
  **Inputs (work assignments):**
245
+
209
246
  ```typescript
210
247
  // Feature assigned to design agent
211
248
  {
@@ -250,6 +287,7 @@ await ctx.db.insert("thingKnowledge", {
250
287
  ```
251
288
 
252
289
  **Outputs (design artifacts):**
290
+
253
291
  ```typescript
254
292
  // Design artifact created
255
293
  {
@@ -306,6 +344,7 @@ await ctx.db.insert("thingKnowledge", {
306
344
  ### Events (Ontology Lines 569-709)
307
345
 
308
346
  **Watches for (Events this agent monitors):**
347
+
309
348
  ```typescript
310
349
  // Quality check complete - ready for design
311
350
  {
@@ -347,6 +386,7 @@ await ctx.db.insert("thingKnowledge", {
347
386
  ```
348
387
 
349
388
  **Emits (Events this agent creates):**
389
+
350
390
  ```typescript
351
391
  // Agent lifecycle events (ontology lines 642-645)
352
392
  {
@@ -486,28 +526,30 @@ await ctx.db.insert("thingKnowledge", {
486
526
  ### Knowledge Integration (Ontology Lines 153-228)
487
527
 
488
528
  **Labels (categorization - ontology lines 213-226):**
529
+
489
530
  ```typescript
490
531
  // Design agent knowledge labels
491
532
  [
492
- "skill:ui-design", // Curated prefix: skill:*
533
+ "skill:ui-design", // Curated prefix: skill:*
493
534
  "skill:ux-design",
494
535
  "skill:accessibility",
495
536
  "skill:visual-hierarchy",
496
537
  "skill:color-theory",
497
- "format:wireframe", // Curated prefix: format:*
538
+ "format:wireframe", // Curated prefix: format:*
498
539
  "format:component-spec",
499
540
  "format:design-tokens",
500
- "technology:tailwind-v4", // Curated prefix: technology:*
541
+ "technology:tailwind-v4", // Curated prefix: technology:*
501
542
  "technology:shadcn-ui",
502
543
  "technology:react-19",
503
544
  "technology:astro-5",
504
- "capability:responsive-design", // Curated prefix: capability:*
545
+ "capability:responsive-design", // Curated prefix: capability:*
505
546
  "capability:dark-mode",
506
- "capability:brand-systems"
507
- ]
547
+ "capability:brand-systems",
548
+ ];
508
549
  ```
509
550
 
510
551
  **Chunks (RAG for design patterns - ontology lines 163-188):**
552
+
511
553
  ```typescript
512
554
  // Design patterns stored as knowledge chunks
513
555
  {
@@ -573,17 +615,18 @@ await ctx.db.insert("thingKnowledge", {
573
615
  ```
574
616
 
575
617
  **Vector Search for Pattern Matching:**
618
+
576
619
  ```typescript
577
620
  // Query: Find similar design patterns via vector search
578
621
  // Use knowledge.by_embedding index (ontology line 209)
579
622
  const similarPatterns = await ctx.vectorSearch("knowledge", "by_embedding", {
580
- vector: queryEmbedding, // Embedding of current design challenge
581
- limit: 5
623
+ vector: queryEmbedding, // Embedding of current design challenge
624
+ limit: 5,
582
625
  });
583
626
 
584
627
  // Filter by labels for more precision
585
- const layoutPatterns = similarPatterns.filter(p =>
586
- p.labels.includes("pattern:layout") || p.labels.includes("layout:*")
628
+ const layoutPatterns = similarPatterns.filter(
629
+ (p) => p.labels.includes("pattern:layout") || p.labels.includes("layout:*"),
587
630
  );
588
631
  ```
589
632
 
@@ -598,12 +641,14 @@ const layoutPatterns = similarPatterns.filter(p =>
598
641
  **Workflow Position:** Stage 5 (design) - runs AFTER stage 4 (tests) completes successfully.
599
642
 
600
643
  **Input:**
644
+
601
645
  - Feature specification (thing type: feature, from specialist)
602
646
  - Test definitions (thing type: test, from quality agent)
603
647
  - User flows with acceptance criteria
604
648
  - Organization brand guidelines (from organization thing)
605
649
 
606
650
  **Process:**
651
+
607
652
  1. **Read ontology context:**
608
653
  - Get feature thing (type, name, properties)
609
654
  - Get test thing (userFlows, acceptanceCriteria)
@@ -633,10 +678,11 @@ const layoutPatterns = similarPatterns.filter(p =>
633
678
  - Log event (content_event with action: "created", contentType: "wireframe")
634
679
 
635
680
  **Output (Ontology Operations):**
681
+
636
682
  ```typescript
637
683
  // 1. Create wireframe thing
638
684
  const wireframeId = await ctx.db.insert("things", {
639
- type: "design", // Not a separate thing type, use properties.designType
685
+ type: "design", // Not a separate thing type, use properties.designType
640
686
  name: "Wireframe: Course CRUD",
641
687
  properties: {
642
688
  designType: "wireframe",
@@ -649,46 +695,46 @@ const wireframeId = await ctx.db.insert("things", {
649
695
  components: [
650
696
  { type: "Card", contains: ["CardHeader", "CardContent"] },
651
697
  { type: "Form", fields: ["title", "description", "price"] },
652
- { type: "Button", variant: "primary", label: "Create Course" }
698
+ { type: "Button", variant: "primary", label: "Create Course" },
653
699
  ],
654
700
  userFlow: "Flow 1: Create a Course",
655
701
  acceptanceCriteria: [
656
702
  "User can create course with just title",
657
703
  "User sees loading state",
658
- "User sees success confirmation"
704
+ "User sees success confirmation",
659
705
  ],
660
706
  responsive: {
661
707
  mobile: "single-column",
662
708
  tablet: "single-column",
663
- desktop: "centered-max-w-2xl"
664
- }
665
- }
709
+ desktop: "centered-max-w-2xl",
710
+ },
711
+ },
666
712
  ],
667
713
  designSystem: "shadcn-ui",
668
714
  framework: "astro-react",
669
- brandGuidelines: org.properties.brandColors
715
+ brandGuidelines: org.properties.brandColors,
670
716
  },
671
717
  status: "draft",
672
718
  createdAt: Date.now(),
673
- updatedAt: Date.now()
719
+ updatedAt: Date.now(),
674
720
  });
675
721
 
676
722
  // 2. Create connection (design implements feature)
677
723
  await ctx.db.insert("connections", {
678
724
  fromThingId: wireframeId,
679
725
  toThingId: featureId,
680
- relationshipType: "part_of", // Use part_of instead of implements
726
+ relationshipType: "part_of", // Use part_of instead of implements
681
727
  metadata: {
682
728
  stage: "5_design",
683
729
  completeness: 100,
684
- reviewed: false
730
+ reviewed: false,
685
731
  },
686
- createdAt: Date.now()
732
+ createdAt: Date.now(),
687
733
  });
688
734
 
689
735
  // 3. Log event
690
736
  await ctx.db.insert("events", {
691
- type: "content_event", // Use consolidated event type
737
+ type: "content_event", // Use consolidated event type
692
738
  actorId: designAgentId,
693
739
  targetId: wireframeId,
694
740
  timestamp: Date.now(),
@@ -697,28 +743,29 @@ await ctx.db.insert("events", {
697
743
  contentType: "wireframe",
698
744
  featureId: featureId,
699
745
  screens: ["create-course", "edit-course", "delete-confirmation"],
700
- format: "structured-json"
701
- }
746
+ format: "structured-json",
747
+ },
702
748
  });
703
749
 
704
750
  // 4. Link design patterns from knowledge base
705
751
  const relevantPatterns = await vectorSearch("knowledge", {
706
752
  query: "centered form layout for CRUD operations",
707
- filter: { labels: ["pattern:centered-form", "layout:single-column"] }
753
+ filter: { labels: ["pattern:centered-form", "layout:single-column"] },
708
754
  });
709
755
 
710
756
  for (const pattern of relevantPatterns.slice(0, 3)) {
711
757
  await ctx.db.insert("thingKnowledge", {
712
758
  thingId: wireframeId,
713
759
  knowledgeId: pattern._id,
714
- role: "label", // This design uses these patterns
760
+ role: "label", // This design uses these patterns
715
761
  metadata: { relevance: pattern.score },
716
- createdAt: Date.now()
762
+ createdAt: Date.now(),
717
763
  });
718
764
  }
719
765
  ```
720
766
 
721
767
  **Example Implementation:**
768
+
722
769
  ```typescript
723
770
  // Design Agent Service (Effect.ts pattern)
724
771
  export class DesignAgentService extends Effect.Service<DesignAgentService>()(
@@ -728,10 +775,15 @@ export class DesignAgentService extends Effect.Service<DesignAgentService>()(
728
775
  const db = yield* ConvexDatabase;
729
776
 
730
777
  return {
731
- createWireframes: (args: { featureId: Id<"things">, testId: Id<"things"> }) =>
778
+ createWireframes: (args: {
779
+ featureId: Id<"things">;
780
+ testId: Id<"things">;
781
+ }) =>
732
782
  Effect.gen(function* () {
733
783
  // 1. Get feature thing (ontology dimension 3)
734
- const feature = yield* Effect.tryPromise(() => db.get(args.featureId));
784
+ const feature = yield* Effect.tryPromise(() =>
785
+ db.get(args.featureId),
786
+ );
735
787
  if (feature.type !== "feature") {
736
788
  return yield* Effect.fail({ _tag: "InvalidFeatureType" });
737
789
  }
@@ -743,30 +795,31 @@ export class DesignAgentService extends Effect.Service<DesignAgentService>()(
743
795
 
744
796
  // 3. Get organization thing (ontology dimension 1)
745
797
  const org = yield* Effect.tryPromise(() =>
746
- db.get(feature.properties.organizationId)
798
+ db.get(feature.properties.organizationId),
747
799
  );
748
800
  const brandGuidelines = org.properties.brandColors;
749
801
 
750
802
  // 4. Get relevant design patterns from knowledge (ontology dimension 6)
751
803
  const patterns = yield* Effect.tryPromise(() =>
752
- db.query("knowledge")
753
- .withIndex("by_type", q => q.eq("knowledgeType", "chunk"))
754
- .filter(q =>
804
+ db
805
+ .query("knowledge")
806
+ .withIndex("by_type", (q) => q.eq("knowledgeType", "chunk"))
807
+ .filter((q) =>
755
808
  q.or(
756
809
  q.eq(q.field("labels"), "pattern:centered-form"),
757
- q.eq(q.field("labels"), "layout:single-column")
758
- )
810
+ q.eq(q.field("labels"), "layout:single-column"),
811
+ ),
759
812
  )
760
- .take(5)
813
+ .take(5),
761
814
  );
762
815
 
763
816
  // 5. Map flows to screens
764
- const screens = userFlows.map(flow => ({
817
+ const screens = userFlows.map((flow) => ({
765
818
  name: flow.name,
766
819
  layout: determineLayout(flow),
767
820
  components: mapFlowToComponents(flow, acceptanceCriteria),
768
821
  userFlow: flow.goal,
769
- acceptanceCriteria: flow.criteria
822
+ acceptanceCriteria: flow.criteria,
770
823
  }));
771
824
 
772
825
  // 6. Create wireframe thing (ontology dimension 3)
@@ -779,12 +832,12 @@ export class DesignAgentService extends Effect.Service<DesignAgentService>()(
779
832
  featureId: args.featureId,
780
833
  screens: screens,
781
834
  brandGuidelines: brandGuidelines,
782
- patternsUsed: patterns.map(p => p._id)
835
+ patternsUsed: patterns.map((p) => p._id),
783
836
  },
784
837
  status: "draft",
785
838
  createdAt: Date.now(),
786
- updatedAt: Date.now()
787
- })
839
+ updatedAt: Date.now(),
840
+ }),
788
841
  );
789
842
 
790
843
  // 7. Create connection (ontology dimension 4)
@@ -794,8 +847,8 @@ export class DesignAgentService extends Effect.Service<DesignAgentService>()(
794
847
  toThingId: args.featureId,
795
848
  relationshipType: "part_of",
796
849
  metadata: { stage: "5_design" },
797
- createdAt: Date.now()
798
- })
850
+ createdAt: Date.now(),
851
+ }),
799
852
  );
800
853
 
801
854
  // 8. Log event (ontology dimension 5)
@@ -809,9 +862,9 @@ export class DesignAgentService extends Effect.Service<DesignAgentService>()(
809
862
  action: "created",
810
863
  contentType: "wireframe",
811
864
  featureId: args.featureId,
812
- screens: screens.map(s => s.name)
813
- }
814
- })
865
+ screens: screens.map((s) => s.name),
866
+ },
867
+ }),
815
868
  );
816
869
 
817
870
  // 9. Link knowledge patterns (ontology dimension 6)
@@ -822,17 +875,17 @@ export class DesignAgentService extends Effect.Service<DesignAgentService>()(
822
875
  knowledgeId: pattern._id,
823
876
  role: "label",
824
877
  metadata: { usageContext: "wireframe-creation" },
825
- createdAt: Date.now()
826
- })
878
+ createdAt: Date.now(),
879
+ }),
827
880
  );
828
881
  }
829
882
 
830
883
  return { wireframeId, screens };
831
- })
884
+ }),
832
885
  };
833
886
  }),
834
- dependencies: [ConvexDatabase.Default]
835
- }
887
+ dependencies: [ConvexDatabase.Default],
888
+ },
836
889
  ) {}
837
890
  ```
838
891
 
@@ -843,11 +896,13 @@ export class DesignAgentService extends Effect.Service<DesignAgentService>()(
843
896
  **Workflow Position:** Stage 5 (design) - runs after create_wireframes completes.
844
897
 
845
898
  **Input:**
899
+
846
900
  - Wireframes (thing type: design, designType: "wireframe")
847
901
  - Feature specification (entity operations from feature thing)
848
902
  - shadcn/ui component library (50+ components)
849
903
 
850
904
  **Process:**
905
+
851
906
  1. **Read wireframe thing:**
852
907
  - Extract screens and components
853
908
  - Identify reusable component patterns
@@ -874,6 +929,7 @@ export class DesignAgentService extends Effect.Service<DesignAgentService>()(
874
929
  - Log event (content_event with action: "created", contentType: "component-definition")
875
930
 
876
931
  **Output (Ontology Operations):**
932
+
877
933
  ```typescript
878
934
  // 1. Create component-definition thing
879
935
  const componentId = await ctx.db.insert("things", {
@@ -888,25 +944,25 @@ const componentId = await ctx.db.insert("things", {
888
944
  props: {
889
945
  courseId: "Id<'things'> | undefined",
890
946
  onSuccess: "(courseId: Id<'things'>) => void",
891
- onCancel: "() => void"
947
+ onCancel: "() => void",
892
948
  },
893
949
  state: {
894
950
  queries: ["api.courses.get"],
895
951
  mutations: ["api.courses.create", "api.courses.update"],
896
952
  loading: "boolean",
897
- error: "string | null"
953
+ error: "string | null",
898
954
  },
899
955
  shadcnComponents: ["Card", "Button", "Input", "Label"],
900
956
  accessibility: {
901
957
  ariaLabels: ["Create course form"],
902
958
  keyboardNav: true,
903
- focusManagement: "auto-focus first input"
904
- }
905
- }
959
+ focusManagement: "auto-focus first input",
960
+ },
961
+ },
906
962
  },
907
963
  status: "active",
908
964
  createdAt: Date.now(),
909
- updatedAt: Date.now()
965
+ updatedAt: Date.now(),
910
966
  });
911
967
 
912
968
  // 2. Create connection (component part of feature)
@@ -915,7 +971,7 @@ await ctx.db.insert("connections", {
915
971
  toThingId: featureId,
916
972
  relationshipType: "part_of",
917
973
  metadata: { stage: "5_design" },
918
- createdAt: Date.now()
974
+ createdAt: Date.now(),
919
975
  });
920
976
 
921
977
  // 3. Log event
@@ -928,8 +984,8 @@ await ctx.db.insert("events", {
928
984
  action: "created",
929
985
  contentType: "component-definition",
930
986
  componentName: "CourseForm",
931
- featureId: featureId
932
- }
987
+ featureId: featureId,
988
+ },
933
989
  });
934
990
  ```
935
991
 
@@ -940,11 +996,13 @@ await ctx.db.insert("events", {
940
996
  **Workflow Position:** Stage 5 (design) - can run in parallel with create_wireframes.
941
997
 
942
998
  **Input:**
999
+
943
1000
  - Organization brand guidelines (from organization thing)
944
1001
  - Tailwind v4 CSS-based configuration
945
1002
  - WCAG accessibility requirements (AA minimum)
946
1003
 
947
1004
  **Process:**
1005
+
948
1006
  1. **Read organization thing (ontology dimension 1):**
949
1007
  - Get brandColors (primary, secondary, accent)
950
1008
  - Get typography preferences
@@ -974,6 +1032,7 @@ await ctx.db.insert("events", {
974
1032
  - Link to organization for context
975
1033
 
976
1034
  **Output (Ontology Operations):**
1035
+
977
1036
  ```typescript
978
1037
  // 1. Create design-tokens thing
979
1038
  const tokensId = await ctx.db.insert("things", {
@@ -1082,6 +1141,7 @@ await ctx.db.insert("thingKnowledge", {
1082
1141
  ## Input
1083
1142
 
1084
1143
  **From Quality Agent (stage 4_tests):**
1144
+
1085
1145
  - Feature specification (thing type: feature)
1086
1146
  - Test definitions (thing type: test)
1087
1147
  - User flows (what users must accomplish)
@@ -1089,16 +1149,19 @@ await ctx.db.insert("thingKnowledge", {
1089
1149
  - Accessibility requirements (WCAG AA minimum)
1090
1150
 
1091
1151
  **From Organization (ontology dimension 1):**
1152
+
1092
1153
  - Brand guidelines (brandColors, typography, spacing)
1093
1154
  - Design preferences (borderRadius, shadows)
1094
1155
  - Logo and visual identity
1095
1156
 
1096
1157
  **From Knowledge Base (ontology dimension 6):**
1158
+
1097
1159
  - Design patterns (layout patterns, component patterns)
1098
1160
  - Previous designs (similar features, proven solutions)
1099
1161
  - Accessibility guidelines (WCAG best practices)
1100
1162
 
1101
1163
  **From Workflow Events (ontology dimension 5):**
1164
+
1102
1165
  - `quality_check_complete` event (tests defined, ready for design)
1103
1166
  - `feature_assigned` event (design work assigned to this agent)
1104
1167
  - `test_passed` event (validates design decisions)
@@ -1108,16 +1171,19 @@ await ctx.db.insert("thingKnowledge", {
1108
1171
  ## Output
1109
1172
 
1110
1173
  **Things Created (ontology dimension 3):**
1174
+
1111
1175
  - Wireframe things (type: "design", designType: "wireframe")
1112
1176
  - Component-definition things (type: "design", designType: "component-definition")
1113
1177
  - Design-token things (type: "design", designType: "design-tokens")
1114
1178
 
1115
1179
  **Connections Created (ontology dimension 4):**
1180
+
1116
1181
  - part_of: design → feature (design belongs to feature)
1117
1182
  - created_by: design → design_agent (ownership)
1118
1183
  - tested_by: test → design (test informs design)
1119
1184
 
1120
1185
  **Events Logged (ontology dimension 5):**
1186
+
1121
1187
  - content_event (action: "created", contentType: "wireframe")
1122
1188
  - content_event (action: "created", contentType: "component-definition")
1123
1189
  - content_event (action: "created", contentType: "design-tokens")
@@ -1125,6 +1191,7 @@ await ctx.db.insert("thingKnowledge", {
1125
1191
  - agent_completed (action: "design_complete")
1126
1192
 
1127
1193
  **Knowledge Built (ontology dimension 6):**
1194
+
1128
1195
  - Design pattern chunks (reusable patterns for future work)
1129
1196
  - Design token documentation (brand system knowledge)
1130
1197
  - thingKnowledge junctions (link patterns to designs)
@@ -1138,12 +1205,14 @@ await ctx.db.insert("thingKnowledge", {
1138
1205
  **Question:** What's the primary user goal and content structure?
1139
1206
 
1140
1207
  **Process:**
1208
+
1141
1209
  1. Read feature thing (type, name, properties)
1142
1210
  2. Identify primary entity being displayed/edited (course, blog_post, user)
1143
1211
  3. Check user flows from test thing (create, list, detail, edit)
1144
1212
  4. Match to proven pattern from knowledge base
1145
1213
 
1146
1214
  **Patterns (stored in knowledge dimension):**
1215
+
1147
1216
  - **Content-heavy (blog, docs):** 3-column grid [nav | content | meta]
1148
1217
  - **Dashboard (analytics, admin):** Sidebar + main area with cards
1149
1218
  - **Form-based (create/edit):** Centered single column with max-w-2xl
@@ -1151,11 +1220,12 @@ await ctx.db.insert("thingKnowledge", {
1151
1220
  - **Focus area (email, chat):** Central white panel with muted sidebars
1152
1221
 
1153
1222
  **Example:**
1223
+
1154
1224
  ```typescript
1155
1225
  // Query knowledge base for similar features
1156
1226
  const similarFeatures = await vectorSearch("knowledge", {
1157
- query: feature.name, // "Course CRUD"
1158
- filter: { labels: ["pattern:layout", "use-case:crud"] }
1227
+ query: feature.name, // "Course CRUD"
1228
+ filter: { labels: ["pattern:layout", "use-case:crud"] },
1159
1229
  });
1160
1230
 
1161
1231
  // Extract pattern from highest-scoring result
@@ -1163,9 +1233,9 @@ const recommendedPattern = similarFeatures[0].metadata.layoutPattern; // "center
1163
1233
 
1164
1234
  // Validate pattern matches user flows
1165
1235
  if (userFlows.includes("create") || userFlows.includes("edit")) {
1166
- return "centered-form"; // CRUD operations use centered forms
1236
+ return "centered-form"; // CRUD operations use centered forms
1167
1237
  } else if (userFlows.includes("list") || userFlows.includes("browse")) {
1168
- return "grid-of-cards"; // List views use card grids
1238
+ return "grid-of-cards"; // List views use card grids
1169
1239
  }
1170
1240
  ```
1171
1241
 
@@ -1174,12 +1244,14 @@ if (userFlows.includes("create") || userFlows.includes("edit")) {
1174
1244
  **Question:** What shadcn/ui components enable the user flow?
1175
1245
 
1176
1246
  **Process:**
1247
+
1177
1248
  1. Read wireframe thing (screens array)
1178
1249
  2. For each screen, identify interactive elements
1179
1250
  3. Map elements to shadcn/ui components
1180
1251
  4. Validate components satisfy acceptance criteria
1181
1252
 
1182
1253
  **Mapping (stored as knowledge chunk):**
1254
+
1183
1255
  - **Create/Edit forms:** Card, Button, Input, Label, Select, Textarea
1184
1256
  - **Lists:** Card, Badge, Separator
1185
1257
  - **Data tables:** Table, Pagination, Dropdown
@@ -1188,26 +1260,28 @@ if (userFlows.includes("create") || userFlows.includes("edit")) {
1188
1260
  - **Feedback:** Toast, Alert, Progress, Spinner
1189
1261
 
1190
1262
  **Example:**
1263
+
1191
1264
  ```typescript
1192
1265
  // User Flow: "Delete a Course"
1193
1266
  // Acceptance Criterion: "Delete requires confirmation"
1194
1267
 
1195
1268
  // Query knowledge for "delete confirmation" pattern
1196
- const deletePattern = await db.query("knowledge")
1197
- .withIndex("by_type", q => q.eq("knowledgeType", "chunk"))
1198
- .filter(q => q.eq(q.field("labels"), "pattern:delete-confirmation"))
1269
+ const deletePattern = await db
1270
+ .query("knowledge")
1271
+ .withIndex("by_type", (q) => q.eq("knowledgeType", "chunk"))
1272
+ .filter((q) => q.eq(q.field("labels"), "pattern:delete-confirmation"))
1199
1273
  .first();
1200
1274
 
1201
1275
  // Pattern recommends: AlertDialog with destructive button
1202
1276
  components: [
1203
1277
  { type: "AlertDialog", usage: "Confirmation modal" },
1204
1278
  { type: "Button", variant: "destructive", label: "Delete Course" },
1205
- { type: "Card", usage: "Course preview in modal" }
1206
- ]
1279
+ { type: "Card", usage: "Course preview in modal" },
1280
+ ];
1207
1281
 
1208
1282
  // Validate against acceptance criteria
1209
1283
  const criterion = "Delete requires confirmation";
1210
- const componentSatisfies = components.some(c => c.type === "AlertDialog"); // ✓ Pass
1284
+ const componentSatisfies = components.some((c) => c.type === "AlertDialog"); // ✓ Pass
1211
1285
  ```
1212
1286
 
1213
1287
  ### Decision 3: How does this design enable tests to pass?
@@ -1215,12 +1289,14 @@ const componentSatisfies = components.some(c => c.type === "AlertDialog"); //
1215
1289
  **Question:** Can I trace each acceptance criterion to a UI element?
1216
1290
 
1217
1291
  **Process:**
1292
+
1218
1293
  1. Read test thing (acceptanceCriteria array)
1219
1294
  2. For each criterion, identify corresponding UI element in wireframe
1220
1295
  3. If no element exists, add to design
1221
1296
  4. Validate all criteria are satisfied
1222
1297
 
1223
1298
  **Validation:**
1299
+
1224
1300
  ```typescript
1225
1301
  // Map acceptance criteria to UI elements
1226
1302
  for (const criterion of test.properties.acceptanceCriteria) {
@@ -1247,6 +1323,7 @@ for (const criterion of test.properties.acceptanceCriteria) {
1247
1323
  ```
1248
1324
 
1249
1325
  **Store decision as knowledge:**
1326
+
1250
1327
  ```typescript
1251
1328
  await ctx.db.insert("knowledge", {
1252
1329
  knowledgeType: "chunk",
@@ -1274,6 +1351,7 @@ await ctx.db.insert("knowledge", {
1274
1351
  **Question:** Does design pass WCAG AA validation?
1275
1352
 
1276
1353
  **Checklist (stored as knowledge chunk):**
1354
+
1277
1355
  - [ ] Color contrast ratio ≥ 4.5:1 for body text (WCAG AA)
1278
1356
  - [ ] Color contrast ratio ≥ 3:1 for large text (≥18px)
1279
1357
  - [ ] Keyboard navigation works (Tab, Enter, Escape)
@@ -1284,21 +1362,22 @@ await ctx.db.insert("knowledge", {
1284
1362
  - [ ] Loading states communicated
1285
1363
 
1286
1364
  **Example:**
1365
+
1287
1366
  ```typescript
1288
1367
  // Validate contrast ratios
1289
1368
  const contrastRatios = {
1290
1369
  "text-foreground on bg-background": calculateContrast(
1291
1370
  tokens.colors.foreground,
1292
- tokens.colors.background
1371
+ tokens.colors.background,
1293
1372
  ), // 16.4 - ✓ Pass
1294
1373
  "text-muted-foreground on bg-background": calculateContrast(
1295
1374
  tokens.colors["muted-foreground"],
1296
- tokens.colors.background
1375
+ tokens.colors.background,
1297
1376
  ), // 5.2 - ✓ Pass
1298
1377
  "text-primary on bg-card": calculateContrast(
1299
1378
  tokens.colors.primary,
1300
- tokens.colors.card
1301
- ) // 4.5 - ✓ Pass (exactly WCAG AA)
1379
+ tokens.colors.card,
1380
+ ), // 4.5 - ✓ Pass (exactly WCAG AA)
1302
1381
  };
1303
1382
 
1304
1383
  // Log accessibility validation event
@@ -1313,8 +1392,8 @@ await ctx.db.insert("events", {
1313
1392
  contrastRatios: contrastRatios,
1314
1393
  keyboardNav: true,
1315
1394
  ariaLabels: true,
1316
- issuesFound: []
1317
- }
1395
+ issuesFound: [],
1396
+ },
1318
1397
  });
1319
1398
  ```
1320
1399
 
@@ -1323,18 +1402,21 @@ await ctx.db.insert("events", {
1323
1402
  ## Key Behaviors
1324
1403
 
1325
1404
  ### 1. Design is NOT decoration
1405
+
1326
1406
  - Every design decision must enable a user flow or test to pass
1327
1407
  - Remove unnecessary visual elements (minimal yet sophisticated)
1328
1408
  - Prioritize readability and usability over aesthetics
1329
1409
  - **Ontology mapping:** Each design element traces back to acceptance criterion (test thing)
1330
1410
 
1331
1411
  ### 2. Design BEFORE implementation
1412
+
1332
1413
  - Specialists should receive complete wireframes + component specs
1333
1414
  - No "design as you go" - front-load design decisions
1334
1415
  - Changes to design should trigger re-validation of tests
1335
1416
  - **Ontology mapping:** Stage 5 (design) completes BEFORE stage 6 (implementation)
1336
1417
 
1337
1418
  ### 3. Accessibility is non-negotiable
1419
+
1338
1420
  - WCAG AA compliance is the minimum
1339
1421
  - Use semantic HTML (forms use `<form>`, buttons use `<button>`)
1340
1422
  - Test with keyboard only (no mouse)
@@ -1342,24 +1424,28 @@ await ctx.db.insert("events", {
1342
1424
  - **Ontology mapping:** Log accessibility validation as quality_check_complete event
1343
1425
 
1344
1426
  ### 4. Brand consistency
1427
+
1345
1428
  - Pull colors from organization settings (don't hard-code)
1346
1429
  - Use organization's typography preferences
1347
1430
  - Apply organization's border radius style (modern/sharp/soft)
1348
1431
  - **Ontology mapping:** Query organization thing for brandColors, typography, spacing
1349
1432
 
1350
1433
  ### 5. Responsive by default
1434
+
1351
1435
  - Mobile-first thinking (what's the smallest screen?)
1352
1436
  - Test wireframes at 320px, 768px, 1024px, 1440px
1353
1437
  - Use Tailwind responsive variants (sm:, md:, lg:, xl:)
1354
1438
  - **Ontology mapping:** Store responsive strategy in wireframe properties
1355
1439
 
1356
1440
  ### 6. Build reusable knowledge
1441
+
1357
1442
  - Store successful patterns as knowledge chunks
1358
1443
  - Link patterns to designs via thingKnowledge junctions
1359
1444
  - Enable future designs to learn from past work
1360
1445
  - **Ontology mapping:** Every pattern becomes searchable via vector embeddings
1361
1446
 
1362
1447
  ### 7. Event-driven coordination
1448
+
1363
1449
  - Watch for quality_check_complete event (stage 4 → stage 5 transition)
1364
1450
  - Emit content_event when designs are created
1365
1451
  - No manual handoffs - autonomous work pickup
@@ -1372,11 +1458,13 @@ await ctx.db.insert("events", {
1372
1458
  ### Event-Driven Coordination (Ontology Dimension 5)
1373
1459
 
1374
1460
  **Watches for:**
1461
+
1375
1462
  - `quality_check_complete` → Begin design work (stage 4 complete)
1376
1463
  - `test_passed` → Validates design decisions
1377
1464
  - `feature_assigned` → New work to pick up
1378
1465
 
1379
1466
  **Emits:**
1467
+
1380
1468
  - `agent_executed` → Design work started
1381
1469
  - `content_event` (contentType: "wireframe") → Wireframes ready for review
1382
1470
  - `content_event` (contentType: "component-definition") → Component specs ready
@@ -1388,18 +1476,17 @@ await ctx.db.insert("events", {
1388
1476
  Design agent watches events table autonomously. When `quality_check_complete` appears with `testsCreated: true`, design agent picks up work automatically.
1389
1477
 
1390
1478
  **Query Pattern:**
1479
+
1391
1480
  ```typescript
1392
1481
  // Watch for quality_check_complete events
1393
1482
  const readyForDesign = await ctx.db
1394
1483
  .query("events")
1395
- .withIndex("type_time", q =>
1396
- q.eq("type", "quality_check_complete")
1397
- )
1398
- .filter(q =>
1484
+ .withIndex("type_time", (q) => q.eq("type", "quality_check_complete"))
1485
+ .filter((q) =>
1399
1486
  q.and(
1400
1487
  q.eq(q.field("metadata.testsCreated"), true),
1401
- q.eq(q.field("metadata.status"), "approved")
1402
- )
1488
+ q.eq(q.field("metadata.status"), "approved"),
1489
+ ),
1403
1490
  )
1404
1491
  .order("desc")
1405
1492
  .take(10);
@@ -1408,11 +1495,10 @@ const readyForDesign = await ctx.db
1408
1495
  for (const event of readyForDesign) {
1409
1496
  const existingDesign = await ctx.db
1410
1497
  .query("connections")
1411
- .withIndex("to_type", q =>
1412
- q.eq("toThingId", event.targetId)
1413
- .eq("relationshipType", "part_of")
1498
+ .withIndex("to_type", (q) =>
1499
+ q.eq("toThingId", event.targetId).eq("relationshipType", "part_of"),
1414
1500
  )
1415
- .filter(q => q.eq(q.field("metadata.stage"), "5_design"))
1501
+ .filter((q) => q.eq(q.field("metadata.stage"), "5_design"))
1416
1502
  .first();
1417
1503
 
1418
1504
  if (!existingDesign) {
@@ -1429,6 +1515,7 @@ for (const event of readyForDesign) {
1429
1515
  ### Example 1: Create Wireframes for Course CRUD (6-Dimension Operations)
1430
1516
 
1431
1517
  **Input:**
1518
+
1432
1519
  ```typescript
1433
1520
  // Feature thing
1434
1521
  {
@@ -1522,34 +1609,41 @@ const org = await ctx.db.get("org_xyz789");
1522
1609
  // 2. KNOWLEDGE: Query design patterns
1523
1610
  const patterns = await ctx.db
1524
1611
  .query("knowledge")
1525
- .withIndex("by_type", q => q.eq("knowledgeType", "chunk"))
1526
- .filter(q =>
1612
+ .withIndex("by_type", (q) => q.eq("knowledgeType", "chunk"))
1613
+ .filter((q) =>
1527
1614
  q.or(
1528
1615
  q.eq(q.field("labels"), "pattern:centered-form"),
1529
- q.eq(q.field("labels"), "use-case:crud")
1530
- )
1616
+ q.eq(q.field("labels"), "use-case:crud"),
1617
+ ),
1531
1618
  )
1532
1619
  .take(5);
1533
1620
 
1534
1621
  // 3. Map user flows to screens
1535
- const screens = test.properties.userFlows.map(flow => ({
1622
+ const screens = test.properties.userFlows.map((flow) => ({
1536
1623
  name: flow.name,
1537
- path: flow.name === "create-course" ? "/courses/new" : `/courses/[id]/${flow.name.split('-')[1]}`,
1624
+ path:
1625
+ flow.name === "create-course"
1626
+ ? "/courses/new"
1627
+ : `/courses/[id]/${flow.name.split("-")[1]}`,
1538
1628
  layout: "centered-form",
1539
1629
  components: [
1540
1630
  { type: "Card", contains: ["CardHeader", "CardContent"] },
1541
1631
  { type: "Form", fields: ["title", "description", "price"] },
1542
- { type: "Button", variant: "primary", label: flow.name.includes("create") ? "Create" : "Save" }
1632
+ {
1633
+ type: "Button",
1634
+ variant: "primary",
1635
+ label: flow.name.includes("create") ? "Create" : "Save",
1636
+ },
1543
1637
  ],
1544
1638
  userFlow: flow.goal,
1545
- acceptanceCriteria: test.properties.acceptanceCriteria.filter(c =>
1546
- c.toLowerCase().includes(flow.name.split('-')[0])
1639
+ acceptanceCriteria: test.properties.acceptanceCriteria.filter((c) =>
1640
+ c.toLowerCase().includes(flow.name.split("-")[0]),
1547
1641
  ),
1548
1642
  responsive: {
1549
1643
  mobile: "single-column p-4",
1550
1644
  tablet: "max-w-2xl mx-auto p-6",
1551
- desktop: "max-w-2xl mx-auto p-8"
1552
- }
1645
+ desktop: "max-w-2xl mx-auto p-8",
1646
+ },
1553
1647
  }));
1554
1648
 
1555
1649
  // 4. THINGS: Create wireframe thing
@@ -1562,11 +1656,11 @@ const wireframeId = await ctx.db.insert("things", {
1562
1656
  organizationId: "org_xyz789",
1563
1657
  screens: screens,
1564
1658
  brandGuidelines: org.properties.brandColors,
1565
- patternsUsed: patterns.map(p => p._id)
1659
+ patternsUsed: patterns.map((p) => p._id),
1566
1660
  },
1567
1661
  status: "draft",
1568
1662
  createdAt: Date.now(),
1569
- updatedAt: Date.now()
1663
+ updatedAt: Date.now(),
1570
1664
  });
1571
1665
 
1572
1666
  // 5. CONNECTIONS: Link wireframe to feature
@@ -1577,9 +1671,9 @@ await ctx.db.insert("connections", {
1577
1671
  metadata: {
1578
1672
  stage: "5_design",
1579
1673
  completeness: 100,
1580
- reviewed: false
1674
+ reviewed: false,
1581
1675
  },
1582
- createdAt: Date.now()
1676
+ createdAt: Date.now(),
1583
1677
  });
1584
1678
 
1585
1679
  // 6. CONNECTIONS: Link wireframe to test (design informed by tests)
@@ -1588,9 +1682,9 @@ await ctx.db.insert("connections", {
1588
1682
  toThingId: wireframeId,
1589
1683
  relationshipType: "tested_by",
1590
1684
  metadata: {
1591
- testsCovered: test.properties.userFlows.length
1685
+ testsCovered: test.properties.userFlows.length,
1592
1686
  },
1593
- createdAt: Date.now()
1687
+ createdAt: Date.now(),
1594
1688
  });
1595
1689
 
1596
1690
  // 7. EVENTS: Log wireframe creation
@@ -1603,9 +1697,9 @@ await ctx.db.insert("events", {
1603
1697
  action: "created",
1604
1698
  contentType: "wireframe",
1605
1699
  featureId: "feature_abc123",
1606
- screens: screens.map(s => s.name),
1607
- format: "structured-json"
1608
- }
1700
+ screens: screens.map((s) => s.name),
1701
+ format: "structured-json",
1702
+ },
1609
1703
  });
1610
1704
 
1611
1705
  // 8. KNOWLEDGE: Link patterns used to wireframe
@@ -1616,9 +1710,9 @@ for (const pattern of patterns) {
1616
1710
  role: "label",
1617
1711
  metadata: {
1618
1712
  usageContext: "wireframe-creation",
1619
- relevance: pattern.metadata.frequency
1713
+ relevance: pattern.metadata.frequency,
1620
1714
  },
1621
- createdAt: Date.now()
1715
+ createdAt: Date.now(),
1622
1716
  });
1623
1717
  }
1624
1718
 
@@ -1632,12 +1726,13 @@ await ctx.db.insert("events", {
1632
1726
  action: "create_wireframes",
1633
1727
  duration: 1200,
1634
1728
  success: true,
1635
- screensCreated: screens.length
1636
- }
1729
+ screensCreated: screens.length,
1730
+ },
1637
1731
  });
1638
1732
  ```
1639
1733
 
1640
1734
  **Output (6-Dimension Summary):**
1735
+
1641
1736
  - **THINGS:** 1 wireframe thing created
1642
1737
  - **CONNECTIONS:** 2 connections created (part_of feature, tested_by test)
1643
1738
  - **EVENTS:** 2 events logged (content_event, agent_completed)
@@ -1646,6 +1741,7 @@ await ctx.db.insert("events", {
1646
1741
  ### Example 2: Set Design Tokens from Organization (Multi-Tenant)
1647
1742
 
1648
1743
  **Input:**
1744
+
1649
1745
  ```typescript
1650
1746
  // Organization thing
1651
1747
  {
@@ -1823,6 +1919,7 @@ await ctx.db.insert("events", {
1823
1919
  ```
1824
1920
 
1825
1921
  **Output (6-Dimension Summary):**
1922
+
1826
1923
  - **ORGANIZATIONS:** Token system scoped to organization (multi-tenant)
1827
1924
  - **THINGS:** 1 design-tokens thing created
1828
1925
  - **CONNECTIONS:** 1 connection created (created_by organization)
@@ -1830,9 +1927,10 @@ await ctx.db.insert("events", {
1830
1927
  - **KNOWLEDGE:** 1 chunk created + 1 thingKnowledge junction
1831
1928
 
1832
1929
  **Multi-Tenant Benefit:**
1930
+
1833
1931
  - Organization A has blue tokens
1834
1932
  - Organization B has green tokens
1835
- - Same Design Agent serves both (queries org._id for brand settings)
1933
+ - Same Design Agent serves both (queries org.\_id for brand settings)
1836
1934
  - Each organization's designs are isolated
1837
1935
 
1838
1936
  ---
@@ -1840,41 +1938,49 @@ await ctx.db.insert("events", {
1840
1938
  ## Common Mistakes to Avoid
1841
1939
 
1842
1940
  ### Mistake 1: Designing without understanding tests
1941
+
1843
1942
  ❌ **Wrong:** Create beautiful wireframes without checking acceptance criteria
1844
1943
  ✅ **Right:** Map every acceptance criterion to a UI element in the wireframe
1845
1944
  **Ontology:** Query test thing BEFORE creating wireframe thing
1846
1945
 
1847
1946
  ### Mistake 2: Over-designing
1947
+
1848
1948
  ❌ **Wrong:** Add complex animations, custom illustrations, unique layouts for every page
1849
1949
  ✅ **Right:** Use proven patterns from knowledge base, shadcn/ui components, minimal custom styling
1850
1950
  **Ontology:** Query knowledge dimension for reusable patterns
1851
1951
 
1852
1952
  ### Mistake 3: Ignoring accessibility
1953
+
1853
1954
  ❌ **Wrong:** Use low-contrast colors because they look modern
1854
1955
  ✅ **Right:** Validate all color pairs meet WCAG AA (4.5:1 body, 3:1 large text)
1855
1956
  **Ontology:** Log quality_check_complete event with accessibility validation
1856
1957
 
1857
1958
  ### Mistake 4: Hard-coding brand values
1959
+
1858
1960
  ❌ **Wrong:** Set primary color to "blue-500" in wireframe
1859
1961
  ✅ **Right:** Reference organization's brand settings, generate tokens dynamically
1860
1962
  **Ontology:** Query organization thing for brandColors
1861
1963
 
1862
1964
  ### Mistake 5: Skipping responsive thinking
1965
+
1863
1966
  ❌ **Wrong:** Design only for desktop (1440px)
1864
1967
  ✅ **Right:** Consider mobile (320px), tablet (768px), desktop (1024px+)
1865
1968
  **Ontology:** Store responsive strategy in wireframe properties
1866
1969
 
1867
1970
  ### Mistake 6: Not defining loading states
1971
+
1868
1972
  ❌ **Wrong:** Show form with just submit button
1869
1973
  ✅ **Right:** Define loading spinner on button, disabled state, skeleton for data loading
1870
1974
  **Ontology:** Include loading/error states in component-definition thing
1871
1975
 
1872
1976
  ### Mistake 7: Vague component specs
1977
+
1873
1978
  ❌ **Wrong:** "User sees a form"
1874
1979
  ✅ **Right:** "Card > CardContent > Form > [Input (title), Textarea (description), Button (submit)]"
1875
1980
  **Ontology:** Store precise component hierarchy in properties.component.children
1876
1981
 
1877
1982
  ### Mistake 8: Breaking ontology isolation
1983
+
1878
1984
  ❌ **Wrong:** Create design for Organization A that references Organization B's tokens
1879
1985
  ✅ **Right:** Always scope designs to organizationId, query org-specific settings
1880
1986
  **Ontology:** Multi-tenant isolation via organizations dimension
@@ -1884,6 +1990,7 @@ await ctx.db.insert("events", {
1884
1990
  ## Success Criteria
1885
1991
 
1886
1992
  **Design Agent is successful when:**
1993
+
1887
1994
  - [ ] Every user flow has a corresponding wireframe (mapped to test thing)
1888
1995
  - [ ] Every acceptance criterion is satisfied by a UI element (traceable in properties)
1889
1996
  - [ ] All designs meet WCAG AA accessibility (logged as quality_check_complete)
@@ -1896,6 +2003,7 @@ await ctx.db.insert("events", {
1896
2003
  - [ ] Designs scoped to organization (multi-tenant isolation)
1897
2004
 
1898
2005
  **Measurement (via events dimension):**
2006
+
1899
2007
  - Time from `quality_check_complete` to `content_event` (wireframe): < 5 minutes
1900
2008
  - Accessibility issues found: 0 (validated before completion)
1901
2009
  - Specialist questions about design: < 2 per feature (designs should be clear)
@@ -1903,22 +2011,23 @@ await ctx.db.insert("events", {
1903
2011
  - Pattern reuse rate: > 50% (knowledge base reduces reinvention)
1904
2012
 
1905
2013
  **Queries for Metrics:**
2014
+
1906
2015
  ```typescript
1907
2016
  // Time from quality check to wireframe creation
1908
2017
  const qualityEvent = await ctx.db
1909
2018
  .query("events")
1910
- .withIndex("type_time", q => q.eq("type", "quality_check_complete"))
1911
- .filter(q => q.eq(q.field("targetId"), featureId))
2019
+ .withIndex("type_time", (q) => q.eq("type", "quality_check_complete"))
2020
+ .filter((q) => q.eq(q.field("targetId"), featureId))
1912
2021
  .first();
1913
2022
 
1914
2023
  const wireframeEvent = await ctx.db
1915
2024
  .query("events")
1916
- .withIndex("type_time", q => q.eq("type", "content_event"))
1917
- .filter(q =>
2025
+ .withIndex("type_time", (q) => q.eq("type", "content_event"))
2026
+ .filter((q) =>
1918
2027
  q.and(
1919
2028
  q.eq(q.field("metadata.featureId"), featureId),
1920
- q.eq(q.field("metadata.contentType"), "wireframe")
1921
- )
2029
+ q.eq(q.field("metadata.contentType"), "wireframe"),
2030
+ ),
1922
2031
  )
1923
2032
  .first();
1924
2033
 
@@ -1936,12 +2045,12 @@ Every design is scoped to an organization. Brand guidelines, color tokens, and d
1936
2045
  // Query: Get organization's design tokens
1937
2046
  const tokens = await ctx.db
1938
2047
  .query("things")
1939
- .withIndex("by_type", q => q.eq("type", "design"))
1940
- .filter(q =>
2048
+ .withIndex("by_type", (q) => q.eq("type", "design"))
2049
+ .filter((q) =>
1941
2050
  q.and(
1942
2051
  q.eq(q.field("properties.designType"), "design-tokens"),
1943
- q.eq(q.field("properties.organizationId"), organizationId)
1944
- )
2052
+ q.eq(q.field("properties.organizationId"), organizationId),
2053
+ ),
1945
2054
  )
1946
2055
  .first();
1947
2056
 
@@ -1949,12 +2058,14 @@ const tokens = await ctx.db
1949
2058
  ```
1950
2059
 
1951
2060
  **Benefit:**
2061
+
1952
2062
  - Organization A can have blue primary color
1953
2063
  - Organization B can have green primary color
1954
2064
  - Same Design Agent serves both, pulling correct tokens per org
1955
2065
  - Complete data isolation (ORGANIZATIONS dimension)
1956
2066
 
1957
2067
  **Query Pattern:**
2068
+
1958
2069
  ```typescript
1959
2070
  // Get feature's organization
1960
2071
  const feature = await ctx.db.get(featureId);
@@ -1966,7 +2077,7 @@ const brandColors = org.properties.brandColors;
1966
2077
 
1967
2078
  // Use org-specific settings in design
1968
2079
  const wireframe = {
1969
- brandColors: brandColors, // NOT hard-coded colors
2080
+ brandColors: brandColors, // NOT hard-coded colors
1970
2081
  // ...
1971
2082
  };
1972
2083
  ```
@@ -1976,9 +2087,11 @@ const wireframe = {
1976
2087
  ## Integration with Other Agents
1977
2088
 
1978
2089
  ### Quality Agent (Stage 4 → Stage 5)
2090
+
1979
2091
  **Connection:** Quality agent completes tests → Design agent creates wireframes
1980
2092
 
1981
2093
  **Event Flow:**
2094
+
1982
2095
  1. Quality agent emits `quality_check_complete` (testsCreated: true)
1983
2096
  2. Design agent watches for this event
1984
2097
  3. Design agent reads test thing (userFlows, acceptanceCriteria)
@@ -1986,15 +2099,18 @@ const wireframe = {
1986
2099
  5. Design agent emits `content_event` (wireframe created)
1987
2100
 
1988
2101
  **Ontology Operations:**
2102
+
1989
2103
  - Query: events.by_type("quality_check_complete")
1990
2104
  - Read: test thing (ontology dimension 3)
1991
2105
  - Create: wireframe thing (ontology dimension 3)
1992
2106
  - Log: content_event (ontology dimension 5)
1993
2107
 
1994
2108
  ### Frontend Specialist (Stage 5 → Stage 6)
2109
+
1995
2110
  **Connection:** Design agent completes wireframes → Frontend specialist implements
1996
2111
 
1997
2112
  **Event Flow:**
2113
+
1998
2114
  1. Design agent emits `agent_completed` (design_complete)
1999
2115
  2. Frontend specialist watches for this event
2000
2116
  3. Frontend specialist reads wireframe thing (screens, components)
@@ -2002,15 +2118,18 @@ const wireframe = {
2002
2118
  5. Frontend specialist emits `implementation_complete`
2003
2119
 
2004
2120
  **Ontology Operations:**
2121
+
2005
2122
  - Query: events.by_type("agent_completed")
2006
2123
  - Read: wireframe thing, component-definition thing
2007
2124
  - Create: React components (not in ontology yet - future)
2008
2125
  - Log: task_completed (ontology dimension 5)
2009
2126
 
2010
2127
  ### Problem Solver Agent (Test Failures)
2128
+
2011
2129
  **Connection:** Tests fail due to design issues → Problem solver analyzes → Design agent fixes
2012
2130
 
2013
2131
  **Event Flow:**
2132
+
2014
2133
  1. Quality agent emits `test_failed` (design-related failure)
2015
2134
  2. Problem solver agent analyzes
2016
2135
  3. Problem solver delegates fix to design agent
@@ -2018,6 +2137,7 @@ const wireframe = {
2018
2137
  5. Design agent emits `content_event` (action: "updated")
2019
2138
 
2020
2139
  **Ontology Operations:**
2140
+
2021
2141
  - Query: events.by_type("test_failed")
2022
2142
  - Update: wireframe thing (status: "draft" → "active")
2023
2143
  - Create: knowledge chunk (lesson learned)
@@ -2030,25 +2150,28 @@ const wireframe = {
2030
2150
  Design Agent operates in **Phase 5: DESIGN** (ontology line 1042).
2031
2151
 
2032
2152
  ### Phase 4 → Phase 5 Transition
2153
+
2033
2154
  **Trigger:** `quality_check_complete` event with `testsCreated: true`
2034
2155
 
2035
2156
  **Process:**
2157
+
2036
2158
  1. Design agent watches events table
2037
2159
  2. Finds `quality_check_complete` for feature
2038
2160
  3. Checks if design already exists (query connections)
2039
2161
  4. If not, starts design work (create_wireframes)
2040
2162
 
2041
2163
  **Ontology Operations:**
2164
+
2042
2165
  ```typescript
2043
2166
  // Watch for phase 4 completion
2044
2167
  const readyForDesign = await ctx.db
2045
2168
  .query("events")
2046
- .withIndex("type_time", q => q.eq("type", "quality_check_complete"))
2047
- .filter(q =>
2169
+ .withIndex("type_time", (q) => q.eq("type", "quality_check_complete"))
2170
+ .filter((q) =>
2048
2171
  q.and(
2049
2172
  q.eq(q.field("metadata.testsCreated"), true),
2050
- q.eq(q.field("metadata.status"), "approved")
2051
- )
2173
+ q.eq(q.field("metadata.status"), "approved"),
2174
+ ),
2052
2175
  )
2053
2176
  .order("desc")
2054
2177
  .take(10);
@@ -2057,11 +2180,10 @@ const readyForDesign = await ctx.db
2057
2180
  for (const event of readyForDesign) {
2058
2181
  const existingDesign = await ctx.db
2059
2182
  .query("connections")
2060
- .withIndex("to_type", q =>
2061
- q.eq("toThingId", event.targetId)
2062
- .eq("relationshipType", "part_of")
2183
+ .withIndex("to_type", (q) =>
2184
+ q.eq("toThingId", event.targetId).eq("relationshipType", "part_of"),
2063
2185
  )
2064
- .filter(q => q.eq(q.field("metadata.stage"), "5_design"))
2186
+ .filter((q) => q.eq(q.field("metadata.stage"), "5_design"))
2065
2187
  .first();
2066
2188
 
2067
2189
  if (!existingDesign) {
@@ -2072,15 +2194,18 @@ for (const event of readyForDesign) {
2072
2194
  ```
2073
2195
 
2074
2196
  ### Phase 5 → Phase 6 Transition
2197
+
2075
2198
  **Trigger:** Design agent emits `agent_completed` event
2076
2199
 
2077
2200
  **Process:**
2201
+
2078
2202
  1. Design agent completes all design work
2079
2203
  2. Emits `agent_completed` (action: "design_complete")
2080
2204
  3. Frontend specialist watches for this event
2081
2205
  4. Frontend specialist starts implementation (phase 6)
2082
2206
 
2083
2207
  **Ontology Operations:**
2208
+
2084
2209
  ```typescript
2085
2210
  // Design complete - signal phase 6
2086
2211
  await ctx.db.insert("events", {
@@ -2096,20 +2221,20 @@ await ctx.db.insert("events", {
2096
2221
  outputs: {
2097
2222
  wireframes: [wireframeId],
2098
2223
  components: [componentId],
2099
- tokens: [tokensId]
2100
- }
2101
- }
2224
+ tokens: [tokensId],
2225
+ },
2226
+ },
2102
2227
  });
2103
2228
 
2104
2229
  // Frontend specialist watches and picks up
2105
2230
  const designComplete = await ctx.db
2106
2231
  .query("events")
2107
- .withIndex("type_time", q => q.eq("type", "agent_completed"))
2108
- .filter(q =>
2232
+ .withIndex("type_time", (q) => q.eq("type", "agent_completed"))
2233
+ .filter((q) =>
2109
2234
  q.and(
2110
2235
  q.eq(q.field("metadata.action"), "design_complete"),
2111
- q.eq(q.field("metadata.stage"), "5_design")
2112
- )
2236
+ q.eq(q.field("metadata.stage"), "5_design"),
2237
+ ),
2113
2238
  )
2114
2239
  .order("desc")
2115
2240
  .take(10);
@@ -2122,30 +2247,32 @@ const designComplete = await ctx.db
2122
2247
  Design Agent has a **2,000 token context budget** (ontology line 1064).
2123
2248
 
2124
2249
  **Context Allocation:**
2250
+
2125
2251
  - **500 tokens:** Feature specification (from feature thing)
2126
2252
  - **800 tokens:** Test definitions (from test thing - user flows + acceptance criteria)
2127
2253
  - **300 tokens:** Organization brand guidelines (from organization thing)
2128
2254
  - **400 tokens:** Design patterns (from knowledge dimension - top 3-5 relevant patterns)
2129
2255
 
2130
2256
  **Context Optimization:**
2257
+
2131
2258
  ```typescript
2132
2259
  // 1. Load minimal feature data
2133
2260
  const feature = await ctx.db.get(featureId);
2134
2261
  const featureContext = {
2135
2262
  name: feature.name,
2136
2263
  entities: feature.properties.entities,
2137
- operations: feature.properties.operations
2264
+ operations: feature.properties.operations,
2138
2265
  }; // ~100 tokens
2139
2266
 
2140
2267
  // 2. Load test definitions
2141
2268
  const test = await ctx.db.get(testId);
2142
2269
  const testContext = {
2143
- userFlows: test.properties.userFlows.map(f => ({
2270
+ userFlows: test.properties.userFlows.map((f) => ({
2144
2271
  name: f.name,
2145
2272
  goal: f.goal,
2146
- steps: f.steps
2273
+ steps: f.steps,
2147
2274
  })),
2148
- acceptanceCriteria: test.properties.acceptanceCriteria
2275
+ acceptanceCriteria: test.properties.acceptanceCriteria,
2149
2276
  }; // ~600 tokens
2150
2277
 
2151
2278
  // 3. Load organization brand (minimal)
@@ -2153,20 +2280,21 @@ const org = await ctx.db.get(organizationId);
2153
2280
  const orgContext = {
2154
2281
  brandColors: org.properties.brandColors,
2155
2282
  typography: org.properties.typography,
2156
- spacing: org.properties.spacing
2283
+ spacing: org.properties.spacing,
2157
2284
  }; // ~150 tokens
2158
2285
 
2159
2286
  // 4. Load top design patterns (vector search)
2160
2287
  const patterns = await vectorSearch("knowledge", {
2161
2288
  query: feature.name,
2162
2289
  limit: 3,
2163
- filter: { labels: ["pattern:layout", "pattern:component"] }
2290
+ filter: { labels: ["pattern:layout", "pattern:component"] },
2164
2291
  }); // ~400 tokens (3 patterns × ~130 tokens each)
2165
2292
 
2166
2293
  // Total: ~1,250 tokens (within 2,000 budget)
2167
2294
  ```
2168
2295
 
2169
2296
  **Why 2,000 Tokens is Enough:**
2297
+
2170
2298
  - Design decisions are **visual and structural**, not code-heavy
2171
2299
  - Patterns are **reusable templates**, not full implementations
2172
2300
  - Most context comes from **tests** (what needs to be designed)