oneie 3.7.0 → 3.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1156) hide show
  1. package/README.md +9 -9
  2. package/dist/commands/agent.d.ts +2 -0
  3. package/dist/commands/agent.d.ts.map +1 -1
  4. package/dist/commands/agent.js +44 -0
  5. package/dist/commands/agent.js.map +1 -1
  6. package/dist/commands/bounty.d.ts +4 -0
  7. package/dist/commands/bounty.d.ts.map +1 -0
  8. package/dist/commands/bounty.js +24 -0
  9. package/dist/commands/bounty.js.map +1 -0
  10. package/dist/commands/buy.d.ts +19 -0
  11. package/dist/commands/buy.d.ts.map +1 -0
  12. package/dist/commands/buy.js +63 -0
  13. package/dist/commands/buy.js.map +1 -0
  14. package/dist/commands/capabilities.d.ts +4 -0
  15. package/dist/commands/capabilities.d.ts.map +1 -0
  16. package/dist/commands/capabilities.js +18 -0
  17. package/dist/commands/capabilities.js.map +1 -0
  18. package/dist/commands/commend.d.ts +4 -0
  19. package/dist/commands/commend.d.ts.map +1 -0
  20. package/dist/commands/commend.js +13 -0
  21. package/dist/commands/commend.js.map +1 -0
  22. package/dist/commands/completion.d.ts +4 -0
  23. package/dist/commands/completion.d.ts.map +1 -0
  24. package/dist/commands/completion.js +49 -0
  25. package/dist/commands/completion.js.map +1 -0
  26. package/dist/commands/config.d.ts +4 -0
  27. package/dist/commands/config.d.ts.map +1 -0
  28. package/dist/commands/config.js +78 -0
  29. package/dist/commands/config.js.map +1 -0
  30. package/dist/commands/deploy.d.ts +1 -1
  31. package/dist/commands/deploy.d.ts.map +1 -1
  32. package/dist/commands/deploy.js +39 -4
  33. package/dist/commands/deploy.js.map +1 -1
  34. package/dist/commands/doctor.d.ts +4 -0
  35. package/dist/commands/doctor.d.ts.map +1 -0
  36. package/dist/commands/doctor.js +72 -0
  37. package/dist/commands/doctor.js.map +1 -0
  38. package/dist/commands/domain.d.ts +4 -0
  39. package/dist/commands/domain.d.ts.map +1 -0
  40. package/dist/commands/domain.js +19 -0
  41. package/dist/commands/domain.js.map +1 -0
  42. package/dist/commands/export.d.ts +4 -0
  43. package/dist/commands/export.d.ts.map +1 -0
  44. package/dist/commands/export.js +15 -0
  45. package/dist/commands/export.js.map +1 -0
  46. package/dist/commands/fade.d.ts.map +1 -1
  47. package/dist/commands/fade.js +8 -4
  48. package/dist/commands/fade.js.map +1 -1
  49. package/dist/commands/flag.d.ts +4 -0
  50. package/dist/commands/flag.d.ts.map +1 -0
  51. package/dist/commands/flag.js +13 -0
  52. package/dist/commands/flag.js.map +1 -0
  53. package/dist/commands/health.d.ts +4 -0
  54. package/dist/commands/health.d.ts.map +1 -0
  55. package/dist/commands/health.js +11 -0
  56. package/dist/commands/health.js.map +1 -0
  57. package/dist/commands/highways.d.ts.map +1 -1
  58. package/dist/commands/highways.js +7 -4
  59. package/dist/commands/highways.js.map +1 -1
  60. package/dist/commands/hire.d.ts +4 -0
  61. package/dist/commands/hire.d.ts.map +1 -0
  62. package/dist/commands/hire.js +16 -0
  63. package/dist/commands/hire.js.map +1 -0
  64. package/dist/commands/init.d.ts.map +1 -1
  65. package/dist/commands/init.js +85 -48
  66. package/dist/commands/init.js.map +1 -1
  67. package/dist/commands/invite.d.ts +4 -0
  68. package/dist/commands/invite.d.ts.map +1 -0
  69. package/dist/commands/invite.js +37 -0
  70. package/dist/commands/invite.js.map +1 -0
  71. package/dist/commands/mark.d.ts.map +1 -1
  72. package/dist/commands/mark.js +7 -7
  73. package/dist/commands/mark.js.map +1 -1
  74. package/dist/commands/pay.d.ts +4 -0
  75. package/dist/commands/pay.d.ts.map +1 -0
  76. package/dist/commands/pay.js +21 -0
  77. package/dist/commands/pay.js.map +1 -0
  78. package/dist/commands/pipe.d.ts +4 -0
  79. package/dist/commands/pipe.d.ts.map +1 -0
  80. package/dist/commands/pipe.js +35 -0
  81. package/dist/commands/pipe.js.map +1 -0
  82. package/dist/commands/publish.d.ts +4 -0
  83. package/dist/commands/publish.d.ts.map +1 -0
  84. package/dist/commands/publish.js +23 -0
  85. package/dist/commands/publish.js.map +1 -0
  86. package/dist/commands/repl.d.ts +4 -0
  87. package/dist/commands/repl.d.ts.map +1 -0
  88. package/dist/commands/repl.js +56 -0
  89. package/dist/commands/repl.js.map +1 -0
  90. package/dist/commands/revenue.d.ts +4 -0
  91. package/dist/commands/revenue.d.ts.map +1 -0
  92. package/dist/commands/revenue.js +11 -0
  93. package/dist/commands/revenue.js.map +1 -0
  94. package/dist/commands/sell.d.ts +15 -0
  95. package/dist/commands/sell.d.ts.map +1 -0
  96. package/dist/commands/sell.js +49 -0
  97. package/dist/commands/sell.js.map +1 -0
  98. package/dist/commands/stats.d.ts +4 -0
  99. package/dist/commands/stats.d.ts.map +1 -0
  100. package/dist/commands/stats.js +11 -0
  101. package/dist/commands/stats.js.map +1 -0
  102. package/dist/commands/status.d.ts +4 -0
  103. package/dist/commands/status.d.ts.map +1 -0
  104. package/dist/commands/status.js +18 -0
  105. package/dist/commands/status.js.map +1 -0
  106. package/dist/commands/subscribe.d.ts +14 -0
  107. package/dist/commands/subscribe.d.ts.map +1 -0
  108. package/dist/commands/subscribe.js +33 -0
  109. package/dist/commands/subscribe.js.map +1 -0
  110. package/dist/commands/tail.d.ts +4 -0
  111. package/dist/commands/tail.d.ts.map +1 -0
  112. package/dist/commands/tail.js +51 -0
  113. package/dist/commands/tail.js.map +1 -0
  114. package/dist/commands/warn.d.ts.map +1 -1
  115. package/dist/commands/warn.js +6 -6
  116. package/dist/commands/warn.js.map +1 -1
  117. package/dist/index.js +70 -1
  118. package/dist/index.js.map +1 -1
  119. package/dist/lib/args.d.ts +1 -0
  120. package/dist/lib/args.d.ts.map +1 -1
  121. package/dist/lib/args.js +3 -0
  122. package/dist/lib/args.js.map +1 -1
  123. package/dist/lib/output.d.ts +5 -0
  124. package/dist/lib/output.d.ts.map +1 -0
  125. package/dist/lib/output.js +32 -0
  126. package/dist/lib/output.js.map +1 -0
  127. package/dist/lib/sdk.d.ts +10 -0
  128. package/dist/lib/sdk.d.ts.map +1 -0
  129. package/dist/lib/sdk.js +22 -0
  130. package/dist/lib/sdk.js.map +1 -0
  131. package/dist/utils/installation-setup.d.ts +15 -0
  132. package/dist/utils/installation-setup.d.ts.map +1 -1
  133. package/dist/utils/installation-setup.js +63 -0
  134. package/dist/utils/installation-setup.js.map +1 -1
  135. package/package.json +3 -18
  136. package/.claude/agents/TROUBLESHOOTING.md +0 -530
  137. package/.claude/agents/agent-backend.md +0 -574
  138. package/.claude/agents/agent-builder.md +0 -911
  139. package/.claude/agents/agent-claude.md +0 -645
  140. package/.claude/agents/agent-clean.md +0 -477
  141. package/.claude/agents/agent-clone.md +0 -554
  142. package/.claude/agents/agent-designer.md +0 -1080
  143. package/.claude/agents/agent-director.md +0 -2254
  144. package/.claude/agents/agent-documenter.md +0 -688
  145. package/.claude/agents/agent-frontend.md +0 -1199
  146. package/.claude/agents/agent-integrator.md +0 -670
  147. package/.claude/agents/agent-lawyer.md +0 -1320
  148. package/.claude/agents/agent-news.md +0 -363
  149. package/.claude/agents/agent-onboard.md +0 -613
  150. package/.claude/agents/agent-ontology.md +0 -585
  151. package/.claude/agents/agent-ops.md +0 -1275
  152. package/.claude/agents/agent-problem-solver.md +0 -669
  153. package/.claude/agents/agent-quality.md +0 -1042
  154. package/.claude/agents/agent-sales.md +0 -507
  155. package/.claude/agents/agent-writer.md +0 -1068
  156. package/.claude/commands/cascade.md +0 -742
  157. package/.claude/commands/chat.md +0 -728
  158. package/.claude/commands/commit.md +0 -95
  159. package/.claude/commands/create.md +0 -544
  160. package/.claude/commands/deploy.md +0 -309
  161. package/.claude/commands/fast.md +0 -636
  162. package/.claude/commands/mcp-on.md +0 -191
  163. package/.claude/commands/media-upload.md +0 -186
  164. package/.claude/commands/news.md +0 -274
  165. package/.claude/commands/onboard.md +0 -440
  166. package/.claude/commands/one.md +0 -398
  167. package/.claude/commands/optimize.md +0 -74
  168. package/.claude/commands/plan.md +0 -719
  169. package/.claude/commands/push.md +0 -214
  170. package/.claude/commands/release.md +0 -105
  171. package/.claude/commands/review.md +0 -99
  172. package/.claude/commands/server.md +0 -487
  173. package/.claude/commands/start.md +0 -227
  174. package/.claude/commands/test.md +0 -197
  175. package/.claude/commands/validate.md +0 -140
  176. package/.claude/hooks/.last-news-context +0 -1
  177. package/.claude/hooks/PULL-BEFORE-PUSH-GUIDE.md +0 -473
  178. package/.claude/hooks/README-knowledge-hooks.md +0 -451
  179. package/.claude/hooks/README-news-generation.md +0 -364
  180. package/.claude/hooks/README-root-cleanup.md +0 -200
  181. package/.claude/hooks/README.md +0 -284
  182. package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
  183. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  184. package/.claude/hooks/auto-format.sh +0 -106
  185. package/.claude/hooks/check-filenames.py +0 -177
  186. package/.claude/hooks/clean-post.py +0 -468
  187. package/.claude/hooks/clean-pre.py +0 -393
  188. package/.claude/hooks/clean-root-markdown.sh +0 -73
  189. package/.claude/hooks/commit-push.sh +0 -95
  190. package/.claude/hooks/done.py +0 -236
  191. package/.claude/hooks/format-hook.sh +0 -163
  192. package/.claude/hooks/formatting.py +0 -187
  193. package/.claude/hooks/hook-logger.sh +0 -173
  194. package/.claude/hooks/knowledge-post.py +0 -355
  195. package/.claude/hooks/knowledge-pre.py +0 -245
  196. package/.claude/hooks/mcp-on.sh +0 -134
  197. package/.claude/hooks/notification-hook.sh +0 -279
  198. package/.claude/hooks/ontology-validation.py +0 -255
  199. package/.claude/hooks/push.sh +0 -153
  200. package/.claude/hooks/release-cli.sh +0 -205
  201. package/.claude/hooks/root-cleanup.py +0 -217
  202. package/.claude/hooks/security-hook.sh +0 -397
  203. package/.claude/hooks/tag-all-docs.py +0 -464
  204. package/.claude/hooks/test-validate-ontology.sh +0 -170
  205. package/.claude/hooks/todo.py +0 -368
  206. package/.claude/hooks/track-changes.sh +0 -101
  207. package/.claude/hooks/validate-imports.py +0 -182
  208. package/.claude/hooks/validate-ontology-structure-summary.md +0 -243
  209. package/.claude/hooks/validate-ontology-structure.py +0 -558
  210. package/.claude/hooks/validate-ontology-structure.py.backup +0 -518
  211. package/.claude/hooks/validate-ontology.py +0 -140
  212. package/.claude/hooks/write-news.sh +0 -194
  213. package/.claude/skills/INDEX.md +0 -523
  214. package/.claude/skills/REGISTRY.md +0 -529
  215. package/.claude/skills/agent-backend-create-mutation.md +0 -319
  216. package/.claude/skills/agent-designer-create-wireframe.md +0 -341
  217. package/.claude/skills/agent-frontend-create-page.md +0 -413
  218. package/.claude/skills/agents/README.md +0 -238
  219. package/.claude/skills/astro/add-content-collection.md +0 -30
  220. package/.claude/skills/astro/check-build.md +0 -29
  221. package/.claude/skills/astro/create-component.md +0 -29
  222. package/.claude/skills/astro/create-page.md +0 -30
  223. package/.claude/skills/astro/optimize-performance.md +0 -21
  224. package/.claude/skills/convex/check-deployment.md +0 -46
  225. package/.claude/skills/convex/create-mutation.md +0 -405
  226. package/.claude/skills/convex/create-query.md +0 -52
  227. package/.claude/skills/convex/read-schema.md +0 -373
  228. package/.claude/skills/convex/test-function.md +0 -50
  229. package/.claude/skills/deployment/check-deployment-health.md +0 -20
  230. package/.claude/skills/deployment/create-release.md +0 -21
  231. package/.claude/skills/deployment/deploy-cloudflare.md +0 -31
  232. package/.claude/skills/deployment/deploy-convex.md +0 -30
  233. package/.claude/skills/deployment/sync-repositories.md +0 -19
  234. package/.claude/skills/design/check-accessibility.md +0 -21
  235. package/.claude/skills/design/create-component-spec.md +0 -27
  236. package/.claude/skills/design/generate-design-tokens.md +0 -24
  237. package/.claude/skills/design/generate-wireframe.md +0 -30
  238. package/.claude/skills/documentation/create-migration-guide.md +0 -20
  239. package/.claude/skills/documentation/generate-api-docs.md +0 -27
  240. package/.claude/skills/documentation/generate-readme.md +0 -22
  241. package/.claude/skills/documentation/update-knowledge.md +0 -20
  242. package/.claude/skills/integration/connect-external-system.md +0 -21
  243. package/.claude/skills/integration/implement-a2a.md +0 -20
  244. package/.claude/skills/integration/implement-acp.md +0 -20
  245. package/.claude/skills/integration/verify-integration.md +0 -20
  246. package/.claude/skills/ontology/README.md +0 -255
  247. package/.claude/skills/ontology/check-dimension.md +0 -307
  248. package/.claude/skills/ontology/generate-entity-type.md +0 -339
  249. package/.claude/skills/ontology/validate-schema.md +0 -229
  250. package/.claude/skills/ontology/verify-relationships.md +0 -310
  251. package/.claude/skills/problem-solving/analyze-test-failure.md +0 -21
  252. package/.claude/skills/problem-solving/identify-root-cause.md +0 -20
  253. package/.claude/skills/problem-solving/propose-solution.md +0 -29
  254. package/.claude/skills/problem-solving/verify-fix.md +0 -21
  255. package/.claude/skills/sales/generate-demo-script.md +0 -21
  256. package/.claude/skills/sales/qualify-lead.md +0 -30
  257. package/.claude/skills/sales/track-trial.md +0 -20
  258. package/.claude/skills/sales/verify-kyc.md +0 -20
  259. package/.claude/skills/testing/analyze-coverage.md +0 -24
  260. package/.claude/skills/testing/generate-tests.md +0 -24
  261. package/.claude/skills/testing/run-tests.md +0 -27
  262. package/.claude/skills/testing/validate-e2e.md +0 -25
  263. package/AGENTS.md +0 -60
  264. package/CLAUDE.md +0 -130
  265. package/CREATE-WEBSITE.md +0 -458
  266. package/SECURITY.md +0 -31
  267. package/folders.yaml +0 -92
  268. package/one/README.md +0 -760
  269. package/one/actors/anthony-o-connell.md +0 -469
  270. package/one/actors/people.md +0 -590
  271. package/one/events/0-changes.md +0 -2764
  272. package/one/events/1-PROJECTS-START-HERE.md +0 -384
  273. package/one/events/1-projects-developer-quickstart.md +0 -620
  274. package/one/events/1-projects-feature.md +0 -2047
  275. package/one/events/1-projects-team-briefing.md +0 -583
  276. package/one/events/2024-10-14-deployment-plan.md +0 -330
  277. package/one/events/2024-10-14-deployment-success.md +0 -447
  278. package/one/events/2024-10-14-final-sync-complete.md +0 -250
  279. package/one/events/2024-10-14-release-v2.0.6.md +0 -414
  280. package/one/events/2024-10-15-agent-clean-v2-summary.md +0 -495
  281. package/one/events/2024-10-15-handoff-to-clean.md +0 -347
  282. package/one/events/2024-10-15-package-manager-tests.md +0 -442
  283. package/one/events/2024-10-15-release-command-complete.md +0 -416
  284. package/one/events/2025-10-15-private-files-secured.md +0 -359
  285. package/one/events/2025-10-15-unignore-public-group-docs.md +0 -298
  286. package/one/events/2025-11-08-backend-claude-refactor.md +0 -242
  287. package/one/events/2025-11-08-parallel-agent-implementation.md +0 -620
  288. package/one/events/2025-11-10-ai-integration-status-report.md +0 -241
  289. package/one/events/ACCESSIBILITY_CHECKLIST.md +0 -275
  290. package/one/events/ACCESSIBILITY_FIXES_SUMMARY.md +0 -293
  291. package/one/events/ALIGNMENT_REPORT_PROBLEM_SOLVER.md +0 -335
  292. package/one/events/ALIGNMENT_SUMMARY.md +0 -280
  293. package/one/events/API_ROUTES_FIXES_SUMMARY.md +0 -280
  294. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +0 -654
  295. package/one/events/AUDIT-ONTOLOGY-ALIGNMENT.md +0 -598
  296. package/one/events/AUDIT_PLAN_COMPLETION-20251108-125555.md +0 -262
  297. package/one/events/BEFORE_AFTER_COMPARISON.md +0 -978
  298. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +0 -372
  299. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +0 -430
  300. package/one/events/CHARTS-READY-TO-USE-20251106-080939.md +0 -184
  301. package/one/events/CHARTS-SUMMARY-20251106-080938.md +0 -196
  302. package/one/events/CLAUDE copy.md +0 -897
  303. package/one/events/CLEANUP-RELEASE-V2.0.8.md +0 -308
  304. package/one/events/CLOUDFLARE-FS-FIX-20251106-100516.md +0 -75
  305. package/one/events/COMPONENT_SHOWCASE-20251106-080938.md +0 -629
  306. package/one/events/CONNECTIONS_DEMO.md +0 -519
  307. package/one/events/CREATE-WEBSITE.md +0 -460
  308. package/one/events/CRITICAL-FIXES-COMPLETE.md +0 -571
  309. package/one/events/CUSTOM-DOMAIN.md +0 -375
  310. package/one/events/DELIVERABLES.md +0 -450
  311. package/one/events/DELIVERABLES.txt +0 -273
  312. package/one/events/DEMO-GROUPS-PAGE.md +0 -410
  313. package/one/events/DEMO-TESTING-SUMMARY.md +0 -536
  314. package/one/events/DEMO_COMPONENTS.md +0 -505
  315. package/one/events/DEMO_HOOKS_INDEX.md +0 -352
  316. package/one/events/DEMO_INFRASTRUCTURE.md +0 -923
  317. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +0 -588
  318. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +0 -449
  319. package/one/events/DEMO_QUICK_REFERENCE.md +0 -459
  320. package/one/events/DEMO_SETUP.md +0 -494
  321. package/one/events/DEPLOYMENT copy.md +0 -444
  322. package/one/events/DEPLOYMENT.md +0 -196
  323. package/one/events/DESIGN-DELIVERABLES-20251106-080938.md +0 -557
  324. package/one/events/DESIGN-EXECUTIVE-SUMMARY-20251106-080938.md +0 -484
  325. package/one/events/DOCS-SYSTEM-GUIDE-20251105-142103.md +0 -458
  326. package/one/events/DOCUMENTER-DELIVERY-SUMMARY.md +0 -481
  327. package/one/events/DOCUMENTER-EXECUTION-GUIDE.md +0 -394
  328. package/one/events/DOCUMENTER-TASK-BREAKDOWN.md +0 -783
  329. package/one/events/ECOMMERCE-BEFORE-AFTER.md +0 -267
  330. package/one/events/ECOMMERCE-DEMO-PLAN.md +0 -243
  331. package/one/events/ECOMMERCE-ENHANCEMENTS.md +0 -594
  332. package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +0 -439
  333. package/one/events/ECOMMERCE-LIVE-DEMO.md +0 -381
  334. package/one/events/ECOMMERCE-QUICKSTART.md +0 -376
  335. package/one/events/ECOMMERCE-README.md +0 -354
  336. package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +0 -214
  337. package/one/events/ECOMMERCE-SETUP-SUMMARY.md +0 -414
  338. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +0 -753
  339. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +0 -941
  340. package/one/events/EFFECT_TS_API_PATTERN.md +0 -496
  341. package/one/events/EXECUTION-READY.md +0 -359
  342. package/one/events/EXECUTION-SUMMARY.md +0 -478
  343. package/one/events/FEATURE-2-4-COMPLETE.md +0 -320
  344. package/one/events/FEATURE_2_3_COMPLETE.md +0 -593
  345. package/one/events/FILE-REFERENCE-20251105-142103.md +0 -325
  346. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +0 -241
  347. package/one/events/GROUPS-MIGRATION.md +0 -643
  348. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +0 -432
  349. package/one/events/HANDOFF.md +0 -331
  350. package/one/events/HOOKS-DEMO.md +0 -459
  351. package/one/events/IMPLEMENTATION-CHECKLIST-20251105-142103.md +0 -274
  352. package/one/events/IMPLEMENTATION-REPORT-DOCS-20251105-142102.md +0 -394
  353. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +0 -568
  354. package/one/events/IMPLEMENTATION_SUMMARY-20251106-080938.md +0 -571
  355. package/one/events/IMPLEMENTATION_SUMMARY.md +0 -547
  356. package/one/events/INDEX-ALL-AGENTS.md +0 -190
  357. package/one/events/INDEX-FRONTEND-TESTING.md +0 -524
  358. package/one/events/INDEX-PROBLEM-SOLVER.md +0 -488
  359. package/one/events/INDEX-QUALITY-AGENT-INFER65.md +0 -455
  360. package/one/events/INDEX.md +0 -295
  361. package/one/events/INDEX_QUICK_START_REDESIGN-20251106-080939.md +0 -342
  362. package/one/events/INSTALL-TESTS.md +0 -311
  363. package/one/events/INSTALLATION_FOLDERS.md +0 -534
  364. package/one/events/INSTALLATION_FOLDERS_FILES.md +0 -223
  365. package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +0 -437
  366. package/one/events/INTEGRATION-ARCHITECTURE.md +0 -579
  367. package/one/events/INTEGRATION-CHECKLIST.md +0 -1252
  368. package/one/events/INTEGRATION-ORCHESTRATION.md +0 -2641
  369. package/one/events/INTEGRATION-SUMMARY.md +0 -671
  370. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +0 -684
  371. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +0 -660
  372. package/one/events/LANDING-PAGE-QUICKSTART.md +0 -425
  373. package/one/events/LICENSE.md +0 -107
  374. package/one/events/MASTER-COORDINATION-PLAN.md +0 -613
  375. package/one/events/MASTER-ORCHESTRATION-INFER65.md +0 -441
  376. package/one/events/MASTER-PLAN-SUMMARY.md +0 -309
  377. package/one/events/MCP-CONFIGURATION.md +0 -354
  378. package/one/events/MCP-SETUP-COMPLETE.md +0 -223
  379. package/one/events/MIGRATION-REPORT.md +0 -453
  380. package/one/events/MIGRATION.md +0 -87
  381. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +0 -1663
  382. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +0 -643
  383. package/one/events/NEWS-COMMANDS.md +0 -506
  384. package/one/events/NEWS-SYSTEM-SUMMARY.md +0 -480
  385. package/one/events/NODE-UPGRADE.md +0 -129
  386. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +0 -416
  387. package/one/events/ONTOLOGY-HOOKS-README.md +0 -718
  388. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +0 -383
  389. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +0 -569
  390. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +0 -491
  391. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +0 -504
  392. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +0 -221
  393. package/one/events/PACKAGE-STRUCTURE.md +0 -328
  394. package/one/events/PLAN-COMPLETE.md +0 -429
  395. package/one/events/PLAYBOOK-SETUP-SUMMARY.md +0 -349
  396. package/one/events/PROBLEM-SOLVER-EXECUTIVE-SUMMARY.md +0 -484
  397. package/one/events/PROBLEM-SOLVER-QUICKSTART.md +0 -420
  398. package/one/events/PROJECTS-PLAN-SUMMARY.md +0 -480
  399. package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +0 -585
  400. package/one/events/QA-CHECKLIST.md +0 -692
  401. package/one/events/QUALITY-AGENT-SUMMARY.md +0 -334
  402. package/one/events/QUALITY-EXECUTION-CHECKLIST.md +0 -593
  403. package/one/events/QUICK-REFERENCE-FRONTEND-TESTING.md +0 -475
  404. package/one/events/QUICK-START-ONTOLOGY.md +0 -426
  405. package/one/events/QUICK_START_REDESIGN-20251106-080938.md +0 -400
  406. package/one/events/README-PROBLEM-SOLVER.md +0 -394
  407. package/one/events/README-archived.md +0 -537
  408. package/one/events/README_QUICK_START_REDESIGN-20251106-080938.md +0 -484
  409. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +0 -657
  410. package/one/events/SEARCH_DEMO_DELIVERY.md +0 -433
  411. package/one/events/SEARCH_DEMO_SUMMARY.md +0 -321
  412. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +0 -399
  413. package/one/events/SECURITY-AUDIT-FIXES.md +0 -394
  414. package/one/events/SECURITY-SCAN-COMPLETE.md +0 -299
  415. package/one/events/SHOP-BUILD-STATUS.md +0 -132
  416. package/one/events/SHOP-PREMIUM-UPDATE.md +0 -165
  417. package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +0 -280
  418. package/one/events/SITE-WIDE-GRADIENT-FIX.md +0 -317
  419. package/one/events/SPECIALIST-QUICK-REFERENCE.md +0 -678
  420. package/one/events/STORE-PRODUCTION-READY-STATUS.md +0 -377
  421. package/one/events/STRIPE-INTEGRATION.md +0 -432
  422. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +0 -447
  423. package/one/events/STRIPE-SETUP-GUIDE.md +0 -480
  424. package/one/events/TEST-PLAN-INDEX.md +0 -364
  425. package/one/events/TEST-PLAN.md +0 -1435
  426. package/one/events/TEST-SUMMARY.md +0 -411
  427. package/one/events/TESTING-DELIVERY.txt +0 -372
  428. package/one/events/TESTS-QUICK-REF.md +0 -280
  429. package/one/events/TRANSITIONS-QUICK-START.md +0 -159
  430. package/one/events/TRANSPARENCY-FIXES.md +0 -293
  431. package/one/events/TYPESCRIPT_FIXES.md +0 -170
  432. package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +0 -412
  433. package/one/events/TYPESCRIPT_FIXES_INDEX.md +0 -359
  434. package/one/events/VERIFICATION_CHECKLIST-20251106-080938.md +0 -326
  435. package/one/events/VIEW-TRANSITIONS.md +0 -446
  436. package/one/events/agent-command-implementation.md +0 -305
  437. package/one/events/agent-director-enhancement-summary.md +0 -404
  438. package/one/events/agent-director-routing-update.md +0 -214
  439. package/one/events/agent-onboard-implementation-summary.md +0 -475
  440. package/one/events/agent-ontology-alignment-completion.md +0 -263
  441. package/one/events/ai-integration-complete.md +0 -294
  442. package/one/events/ai-integration-lessons-learned.md +0 -511
  443. package/one/events/backend-integration-tests.md +0 -624
  444. package/one/events/backend-structure-diagram.txt +0 -393
  445. package/one/events/backend-structure-summary.txt +0 -269
  446. package/one/events/bullfm-video-podcast-analysis.md +0 -319
  447. package/one/events/clean-agent-ontology-cleanup-report.md +0 -371
  448. package/one/events/clean-agent-todo-analysis-summary.md +0 -336
  449. package/one/events/cloudflare-automation-complete.md +0 -350
  450. package/one/events/cloudflare-pages-infrastructure-setup.md +0 -282
  451. package/one/events/contact-page-complete.md +0 -316
  452. package/one/events/convex-analysis-index.md +0 -322
  453. package/one/events/convex-structure-analysis.md +0 -718
  454. package/one/events/creation-instructions-9-todos.md +0 -906
  455. package/one/events/cycle-3-video-player-port-20251108.md +0 -368
  456. package/one/events/cycle-3-video-player-port-complete-20251108.md +0 -334
  457. package/one/events/deployment-installation-folders.md +0 -178
  458. package/one/events/deployment-ops-summary.md +0 -386
  459. package/one/events/deployment-verification.md +0 -366
  460. package/one/events/design-spec-complete.md +0 -226
  461. package/one/events/documentation-audit-index.md +0 -473
  462. package/one/events/documentation-audit-summary.md +0 -417
  463. package/one/events/documentation-improvement-roadmap.md +0 -906
  464. package/one/events/documentation-standards-compliance-report.md +0 -538
  465. package/one/events/documentation-updates.md +0 -370
  466. package/one/events/events.md +0 -563
  467. package/one/events/fix-product-hydration-20251106.md +0 -211
  468. package/one/events/frontend-effects-complete.md +0 -584
  469. package/one/events/frontend-effects-orchestration.md +0 -1356
  470. package/one/events/frontend-effects-risk-register.md +0 -1055
  471. package/one/events/frontend-effects-week1-assignments.md +0 -1594
  472. package/one/events/hook-ontology-alignment-summary.md +0 -528
  473. package/one/events/installation-folders-workflow-integration.md +0 -458
  474. package/one/events/landing-page-generator.md +0 -476
  475. package/one/events/legal-assessment-2025-10-16.md +0 -1917
  476. package/one/events/master-coordination-plan.json +0 -1078
  477. package/one/events/master-plan-9-todos.md +0 -900
  478. package/one/events/mobile-performance-optimization.md +0 -179
  479. package/one/events/onboarding-implementation-complete.md +0 -523
  480. package/one/events/ontology-audit-agent-clone.md +0 -323
  481. package/one/events/ontology-test-examples.md +0 -580
  482. package/one/events/phase1-backend-implementation-complete.md +0 -536
  483. package/one/events/plan-completion-audit.md +0 -707
  484. package/one/events/plan-files-updated.md +0 -273
  485. package/one/events/production-readiness-plan.md +0 -389
  486. package/one/events/readme.md +0 -100
  487. package/one/events/release.md +0 -272
  488. package/one/events/root-cleanup-alignment-report.md +0 -265
  489. package/one/events/security-fixes-2025-01-15.md +0 -226
  490. package/one/events/separate-implementation-status.md +0 -555
  491. package/one/events/server-command-optimization-20251108.md +0 -150
  492. package/one/events/session-summary-2025-10-18.md +0 -366
  493. package/one/events/skills-complete.md +0 -351
  494. package/one/events/skills-infer-6-10-summary.md +0 -70
  495. package/one/events/skills-phase1-complete.md +0 -281
  496. package/one/events/specialist-assignments.md +0 -766
  497. package/one/events/structural-analysis-architecture-vs-plans.md +0 -600
  498. package/one/events/test-dashboard.md +0 -363
  499. package/one/events/test-index.md +0 -421
  500. package/one/events/test-report-ontology.md +0 -611
  501. package/one/events/testing-summary.md +0 -388
  502. package/one/events/todo-agent-builder.md +0 -1180
  503. package/one/events/todo-agent-director.md +0 -164
  504. package/one/events/todo-agent-documenter.md +0 -1815
  505. package/one/events/todo-agent-frontend.md +0 -1542
  506. package/one/events/todo-agent-problem-solver.md +0 -1682
  507. package/one/events/todo-agent-quality.md +0 -1647
  508. package/one/events/todo-refactoring-complete.md +0 -408
  509. package/one/events/wave1-backend-implementation-complete.md +0 -698
  510. package/one/events/web-AI_INTEGRATION_PHASE2_SUMMARY-20251111-152540.md +0 -529
  511. package/one/events/web-BUY-IN-CHATGPT-README-20251116-235241.md +0 -491
  512. package/one/events/web-CHARTS-IMPLEMENTATION-20251106-080939.md +0 -576
  513. package/one/events/web-CHARTS-QUICKSTART-20251106-080939.md +0 -416
  514. package/one/events/web-CODE-HIGHLIGHTING-SUMMARY-20251111-152540.md +0 -442
  515. package/one/events/web-DEPLOYMENT_SUMMARY-20251116-005428.md +0 -290
  516. package/one/events/web-DESIGN-SUMMARY-20251106-080939.md +0 -514
  517. package/one/events/web-README-AI-INTEGRATION-20251111-152540.md +0 -196
  518. package/one/events/web-RECHARTS-INTEGRATION-20251111-152540.md +0 -265
  519. package/one/events/web-RELEASE_OPTIMIZATION_PLAN-20251116-005428.md +0 -447
  520. package/one/events/web-TEST-CLEANUP-20251105-143205.md +0 -3
  521. package/one/events/web-USING-ANY-COMPONENT-IN-CHAT-20251111-152540.md +0 -561
  522. package/one/events/web-test-code-highlighting-20251111-152540.md +0 -231
  523. package/one/groups/features.md +0 -2904
  524. package/one/groups/groups.md +0 -587
  525. package/one/groups/one.md +0 -619
  526. package/one/groups/strategy-copy.md +0 -887
  527. package/one/learning/.obsidian/app.json +0 -1
  528. package/one/learning/.obsidian/appearance.json +0 -1
  529. package/one/learning/.obsidian/core-plugins.json +0 -33
  530. package/one/learning/.obsidian/ecommerce-ontology.md +0 -210
  531. package/one/learning/.obsidian/workspace.json +0 -211
  532. package/one/learning/100-inference-quick-reference.md +0 -449
  533. package/one/learning/ag-ui-protocol.md +0 -613
  534. package/one/learning/agent-onboard-usage.md +0 -630
  535. package/one/learning/agentic-commerce.md +0 -146
  536. package/one/learning/ai-agents-vs-memecoins-thesis.md +0 -683
  537. package/one/learning/ai-api-reference.md +0 -715
  538. package/one/learning/ai-platform.md +0 -323
  539. package/one/learning/ai-quickstart.md +0 -355
  540. package/one/learning/ai-sdk-implementation.md +0 -436
  541. package/one/learning/ai-token-crypto-analysis-framework.md +0 -1191
  542. package/one/learning/ai-token-paradigm-shift-2025.md +0 -732
  543. package/one/learning/altcoin-cycle-prediction-ontology.md +0 -884
  544. package/one/learning/altcoin-cycle-trading-strategy.md +0 -642
  545. package/one/learning/architecture-any-backend.md +0 -1589
  546. package/one/learning/architecture-diagram.md +0 -404
  547. package/one/learning/architecture-frontend.md +0 -1014
  548. package/one/learning/architecture.md +0 -1742
  549. package/one/learning/archived/ontology.old.md +0 -2840
  550. package/one/learning/astro-effect-complete-vision.md +0 -2148
  551. package/one/learning/astro-effect-simple-architecture.md +0 -750
  552. package/one/learning/audit-agent-onboard-alignment.md +0 -481
  553. package/one/learning/audit-agent-sales-alignment.md +0 -444
  554. package/one/learning/backend-api-reference.md +0 -728
  555. package/one/learning/cascading-context-specification.md +0 -1617
  556. package/one/learning/claude-code-integration.md +0 -1293
  557. package/one/learning/cli-claude-handoff.md +0 -736
  558. package/one/learning/context-engineering.md +0 -610
  559. package/one/learning/crypto-analysis-strategy.md +0 -1276
  560. package/one/learning/crypto-cycle-2024-2025-analysis.md +0 -44
  561. package/one/learning/crypto.md +0 -978
  562. package/one/learning/develop/design.md +0 -364
  563. package/one/learning/develop/index.md +0 -145
  564. package/one/learning/development-commands.md +0 -251
  565. package/one/learning/docs.md +0 -627
  566. package/one/learning/dsl.md +0 -1678
  567. package/one/learning/event-driven-documentation.md +0 -270
  568. package/one/learning/files.md +0 -2489
  569. package/one/learning/frontend.md +0 -1056
  570. package/one/learning/games-english.md +0 -691
  571. package/one/learning/games.md +0 -1082
  572. package/one/learning/generative-ui-patterns.md +0 -559
  573. package/one/learning/guidelines.md +0 -314
  574. package/one/learning/hono.md +0 -2127
  575. package/one/learning/implementation-examples.md +0 -2554
  576. package/one/learning/installation-folders.md +0 -366
  577. package/one/learning/institutional-cycle-paradigm-2025.md +0 -555
  578. package/one/learning/knowledge.md +0 -660
  579. package/one/learning/language.md +0 -998
  580. package/one/learning/lessons-learned.md +0 -378
  581. package/one/learning/lessons-website-building-focus.md +0 -382
  582. package/one/learning/merge-report.md +0 -254
  583. package/one/learning/metadata-system.md +0 -504
  584. package/one/learning/nine-padel-playbook.md +0 -229
  585. package/one/learning/one-protocol-ai-agents.md +0 -892
  586. package/one/learning/one-protocol-executive-report.md +0 -617
  587. package/one/learning/one-protocol-standard.md +0 -869
  588. package/one/learning/one-protocol-whitepaper.md +0 -756
  589. package/one/learning/ontology-blog.yaml +0 -47
  590. package/one/learning/ontology-cheatsheet.md +0 -617
  591. package/one/learning/ontology-community.yaml +0 -65
  592. package/one/learning/ontology-core-universal.md +0 -740
  593. package/one/learning/ontology-core.yaml +0 -63
  594. package/one/learning/ontology-courses.yaml +0 -76
  595. package/one/learning/ontology-creator.md +0 -402
  596. package/one/learning/ontology-crypto.md +0 -1603
  597. package/one/learning/ontology-developer-guide.md +0 -814
  598. package/one/learning/ontology-documentation.md +0 -377
  599. package/one/learning/ontology-ecommerce.md +0 -269
  600. package/one/learning/ontology-education-game.md +0 -1654
  601. package/one/learning/ontology-education.md +0 -938
  602. package/one/learning/ontology-engineering-specification.md +0 -1310
  603. package/one/learning/ontology-engineering.md +0 -1676
  604. package/one/learning/ontology-files.yaml +0 -525
  605. package/one/learning/ontology-frontend-master.md +0 -2898
  606. package/one/learning/ontology-frontend-specifications.md +0 -2196
  607. package/one/learning/ontology-frontend.md +0 -2475
  608. package/one/learning/ontology-index.md +0 -397
  609. package/one/learning/ontology-minimal.yaml +0 -301
  610. package/one/learning/ontology-portfolio.yaml +0 -45
  611. package/one/learning/ontology-quickstart.md +0 -602
  612. package/one/learning/ontology-release.md +0 -317
  613. package/one/learning/ontology-shop.yaml +0 -148
  614. package/one/learning/ontology-tokens.yaml +0 -51
  615. package/one/learning/ontology-tutorial.md +0 -455
  616. package/one/learning/ontology-v2.md +0 -4449
  617. package/one/learning/ontology-video-script.md +0 -939
  618. package/one/learning/ontology-visual-guide.md +0 -378
  619. package/one/learning/ontology.md +0 -3847
  620. package/one/learning/ontology.yaml +0 -1653
  621. package/one/learning/parallel-agents.md +0 -932
  622. package/one/learning/patterns/backend/convex-mutation-pattern.md +0 -130
  623. package/one/learning/patterns/backend/convex-query-pattern.md +0 -143
  624. package/one/learning/patterns/backend/mutation-template.md +0 -249
  625. package/one/learning/patterns/backend/query-template.md +0 -286
  626. package/one/learning/patterns/backend/service-template.md +0 -258
  627. package/one/learning/patterns/design/component-architecture.md +0 -435
  628. package/one/learning/patterns/design/index.md +0 -160
  629. package/one/learning/patterns/design/test-driven-design-pattern.md +0 -196
  630. package/one/learning/patterns/design/wireframe-template.md +0 -250
  631. package/one/learning/patterns/frontend/component-template.md +0 -246
  632. package/one/learning/patterns/frontend/form-template.md +0 -348
  633. package/one/learning/patterns/frontend/page-template.md +0 -209
  634. package/one/learning/patterns/frontend/react-component-pattern.md +0 -188
  635. package/one/learning/patterns/test/acceptance-criteria-template.md +0 -396
  636. package/one/learning/patterns/test/technical-test-template.md +0 -566
  637. package/one/learning/patterns/test/test-driven-pattern.md +0 -160
  638. package/one/learning/patterns/test/user-flow-template.md +0 -272
  639. package/one/learning/performance.md +0 -459
  640. package/one/learning/provider-agnostic-content.md +0 -995
  641. package/one/learning/provider-creation-guide.md +0 -1082
  642. package/one/learning/quality-loop.md +0 -419
  643. package/one/learning/quick-start-ontology-mapping.md +0 -773
  644. package/one/learning/readme-architecture.md +0 -158
  645. package/one/learning/readme.md +0 -149
  646. package/one/learning/rules.md +0 -644
  647. package/one/learning/score.md +0 -85
  648. package/one/learning/specifications.md +0 -873
  649. package/one/learning/tags.md +0 -148
  650. package/one/learning/todo-template.md +0 -269
  651. package/one/learning/todo.md +0 -269
  652. package/one/learning/troubleshooting.md +0 -434
  653. package/one/learning/typescript-patterns.md +0 -321
  654. package/one/learning/universal-generation-language.md +0 -827
  655. package/one/learning/x402-research.md +0 -104
  656. package/one/license.md +0 -107
  657. package/one/paths/a2a.md +0 -600
  658. package/one/paths/acp.md +0 -808
  659. package/one/paths/acps.md +0 -749
  660. package/one/paths/agentkit.md +0 -367
  661. package/one/paths/agui.md +0 -785
  662. package/one/paths/any-backend.md +0 -1720
  663. package/one/paths/ap2.md +0 -1072
  664. package/one/paths/api/queries-reference.md +0 -860
  665. package/one/paths/api-docs.md +0 -1909
  666. package/one/paths/api-reference.md +0 -1029
  667. package/one/paths/api.md +0 -2208
  668. package/one/paths/architecture-diagram.md +0 -112
  669. package/one/paths/communications.md +0 -467
  670. package/one/paths/connections.md +0 -357
  671. package/one/paths/copilotkit.md +0 -1577
  672. package/one/paths/cryptonetworks.md +0 -799
  673. package/one/paths/documentation.md +0 -1138
  674. package/one/paths/effect.md +0 -297
  675. package/one/paths/elizaos.md +0 -1308
  676. package/one/paths/groups.md +0 -814
  677. package/one/paths/inference.md +0 -76
  678. package/one/paths/integration-examples.md +0 -893
  679. package/one/paths/integration-guide.md +0 -887
  680. package/one/paths/integration-phase2.md +0 -754
  681. package/one/paths/kyc.md +0 -650
  682. package/one/paths/mcp.md +0 -860
  683. package/one/paths/membership.md +0 -1170
  684. package/one/paths/middleware.md +0 -1085
  685. package/one/paths/multitenant.md +0 -1359
  686. package/one/paths/n8n.md +0 -1033
  687. package/one/paths/patterns.md +0 -107
  688. package/one/paths/protocols.md +0 -297
  689. package/one/paths/relationships.md +0 -125
  690. package/one/paths/schema.md +0 -605
  691. package/one/paths/service-layer.md +0 -568
  692. package/one/paths/vectors.md +0 -225
  693. package/one/paths/wordpress.md +0 -1320
  694. package/one/paths/workflow-copy.md +0 -923
  695. package/one/paths/workflow-examples.md +0 -759
  696. package/one/paths/workflow-onboarding.md +0 -701
  697. package/one/paths/workflow.md +0 -923
  698. package/one/paths/workflows/delegation.md +0 -903
  699. package/one/paths/workflows/frontend.md +0 -1055
  700. package/one/paths/workflows/strategy.md +0 -921
  701. package/one/paths/workflows/tasks.md +0 -716
  702. package/one/paths/x402-baazar.md +0 -131
  703. package/one/paths/x402.md +0 -1353
  704. package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +0 -401
  705. package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +0 -588
  706. package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +0 -461
  707. package/one/things/CHECKLIST.md +0 -407
  708. package/one/things/IMPLEMENTATION_STATUS.md +0 -379
  709. package/one/things/ONE.md +0 -529
  710. package/one/things/agents/agent-backend.md +0 -1501
  711. package/one/things/agents/agent-builder.md +0 -1064
  712. package/one/things/agents/agent-clean.md +0 -1112
  713. package/one/things/agents/agent-clone.md +0 -1324
  714. package/one/things/agents/agent-deploy.md +0 -986
  715. package/one/things/agents/agent-designer.md +0 -2305
  716. package/one/things/agents/agent-director.md +0 -1526
  717. package/one/things/agents/agent-documenter.md +0 -1129
  718. package/one/things/agents/agent-frontend.md +0 -1201
  719. package/one/things/agents/agent-integrator.md +0 -1269
  720. package/one/things/agents/agent-lawyer.md +0 -1371
  721. package/one/things/agents/agent-problem-solver.md +0 -1457
  722. package/one/things/agents/agent-quality.md +0 -1483
  723. package/one/things/agents/agent-sales.md +0 -1074
  724. package/one/things/cascade/cascade.yaml +0 -481
  725. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +0 -523
  726. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +0 -314
  727. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +0 -562
  728. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +0 -543
  729. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +0 -272
  730. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +0 -548
  731. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +0 -586
  732. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +0 -267
  733. package/one/things/cascade/docs/examples/1-3-event-coordination.md +0 -547
  734. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +0 -665
  735. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +0 -236
  736. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +0 -652
  737. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +0 -860
  738. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +0 -255
  739. package/one/things/cascade/docs/examples/1-5-quality-loops.md +0 -725
  740. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +0 -659
  741. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +0 -256
  742. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +0 -639
  743. package/one/things/cascade/docs/examples/readme.md +0 -259
  744. package/one/things/cascade/docs/getting-started.md +0 -533
  745. package/one/things/cascade/docs/workflow.md +0 -1378
  746. package/one/things/cascade/readme.md +0 -379
  747. package/one/things/cascade/templates/feature-template.md +0 -289
  748. package/one/things/claude/agents/advocacy-activation-manager.md +0 -710
  749. package/one/things/claude/agents/advocacy-campaign-designer.md +0 -688
  750. package/one/things/claude/agents/analyst.md +0 -508
  751. package/one/things/claude/agents/architect.md +0 -505
  752. package/one/things/claude/agents/brand-identity-specialist.md +0 -538
  753. package/one/things/claude/agents/bstp-token-strategist.md +0 -690
  754. package/one/things/claude/agents/builder-repo.md +0 -532
  755. package/one/things/claude/agents/bullstamp-community-builder.md +0 -597
  756. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +0 -529
  757. package/one/things/claude/agents/bulltilt-platform-growth.md +0 -590
  758. package/one/things/claude/agents/company-bullstamp-character.md +0 -602
  759. package/one/things/claude/agents/company-bullstamp-community.md +0 -307
  760. package/one/things/claude/agents/company-bullstamp-marketing.md +0 -307
  761. package/one/things/claude/agents/company-bullstamp-token.md +0 -307
  762. package/one/things/claude/agents/company-bulltilt-growth.md +0 -307
  763. package/one/things/claude/agents/content-bibliography-formatter.md +0 -404
  764. package/one/things/claude/agents/content-calendar-planner.md +0 -473
  765. package/one/things/claude/agents/content-chapter-formatter.md +0 -513
  766. package/one/things/claude/agents/content-formatter.md +0 -571
  767. package/one/things/claude/agents/content-hook-specialist.md +0 -485
  768. package/one/things/claude/agents/content-image-formatter.md +0 -560
  769. package/one/things/claude/agents/content-introduction-formatter.md +0 -510
  770. package/one/things/claude/agents/content-multiplication-engine.md +0 -579
  771. package/one/things/claude/agents/content-playbook-writer.md +0 -473
  772. package/one/things/claude/agents/content-team-manager.md +0 -647
  773. package/one/things/claude/agents/content-toc-formatter.md +0 -547
  774. package/one/things/claude/agents/convex-backend-specialist.md +0 -2725
  775. package/one/things/claude/agents/core-manager.md +0 -607
  776. package/one/things/claude/agents/core-master.md +0 -426
  777. package/one/things/claude/agents/cross-functional-manager.md +0 -476
  778. package/one/things/claude/agents/crypto-airdrop-strategist.md +0 -622
  779. package/one/things/claude/agents/crypto-analytics-educator.md +0 -596
  780. package/one/things/claude/agents/crypto-architecture-specialist.md +0 -497
  781. package/one/things/claude/agents/crypto-community-analyst.md +0 -314
  782. package/one/things/claude/agents/crypto-community-psychologist.md +0 -546
  783. package/one/things/claude/agents/crypto-dex-optimization-expert.md +0 -579
  784. package/one/things/claude/agents/crypto-dex-optimizer.md +0 -307
  785. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +0 -552
  786. package/one/things/claude/agents/crypto-diamond-hands.md +0 -307
  787. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +0 -597
  788. package/one/things/claude/agents/crypto-engagement-specialist.md +0 -581
  789. package/one/things/claude/agents/crypto-market-researcher.md +0 -307
  790. package/one/things/claude/agents/crypto-marketing-orchestrator.md +0 -563
  791. package/one/things/claude/agents/crypto-network-effect-amplifier.md +0 -614
  792. package/one/things/claude/agents/crypto-optimization-analyst.md +0 -597
  793. package/one/things/claude/agents/crypto-strategic-synthesizer.md +0 -556
  794. package/one/things/claude/agents/crypto-team-manager.md +0 -392
  795. package/one/things/claude/agents/crypto-token-analyst.md +0 -319
  796. package/one/things/claude/agents/crypto-viral-content-creator.md +0 -549
  797. package/one/things/claude/agents/crypto-wallet-identification-expert.md +0 -527
  798. package/one/things/claude/agents/crypto-wallet-identifier.md +0 -307
  799. package/one/things/claude/agents/customer-journey-designer.md +0 -474
  800. package/one/things/claude/agents/customer-success-manager.md +0 -574
  801. package/one/things/claude/agents/dev.md +0 -406
  802. package/one/things/claude/agents/documenter.md +0 -548
  803. package/one/things/claude/agents/elevate-marketing-orchestrator.md +0 -403
  804. package/one/things/claude/agents/engagement-specialist.md +0 -502
  805. package/one/things/claude/agents/engineering-architect.md +0 -387
  806. package/one/things/claude/agents/engineering-business-analyst.md +0 -527
  807. package/one/things/claude/agents/engineering-developer.md +0 -386
  808. package/one/things/claude/agents/engineering-director.md +0 -322
  809. package/one/things/claude/agents/engineering-ingestor.md +0 -659
  810. package/one/things/claude/agents/engineering-product-manager.md +0 -525
  811. package/one/things/claude/agents/engineering-product-owner.md +0 -527
  812. package/one/things/claude/agents/engineering-project-coordinator.md +0 -525
  813. package/one/things/claude/agents/engineering-quality-assurance.md +0 -392
  814. package/one/things/claude/agents/engineering-team-manager.md +0 -515
  815. package/one/things/claude/agents/engineering-user-experience.md +0 -386
  816. package/one/things/claude/agents/framework-elevate-manager.md +0 -309
  817. package/one/things/claude/agents/improver.md +0 -805
  818. package/one/things/claude/agents/intelligence-team-manager.md +0 -390
  819. package/one/things/claude/agents/lead-capture-expert.md +0 -459
  820. package/one/things/claude/agents/lead-magnet-creator.md +0 -446
  821. package/one/things/claude/agents/market-research-analyst.md +0 -435
  822. package/one/things/claude/agents/marketing-brand-identity.md +0 -344
  823. package/one/things/claude/agents/marketing-content-hooks.md +0 -455
  824. package/one/things/claude/agents/marketing-content-multiplier.md +0 -331
  825. package/one/things/claude/agents/marketing-content-poster.md +0 -372
  826. package/one/things/claude/agents/marketing-customer-journey.md +0 -331
  827. package/one/things/claude/agents/marketing-director.md +0 -402
  828. package/one/things/claude/agents/marketing-engagement.md +0 -331
  829. package/one/things/claude/agents/marketing-lead-capture.md +0 -331
  830. package/one/things/claude/agents/marketing-lead-magnet.md +0 -331
  831. package/one/things/claude/agents/marketing-network-effects.md +0 -331
  832. package/one/things/claude/agents/marketing-nurture-campaigns.md +0 -331
  833. package/one/things/claude/agents/marketing-share-optimizer.md +0 -331
  834. package/one/things/claude/agents/marketing-team-manager.md +0 -451
  835. package/one/things/claude/agents/marketing-viral-growth.md +0 -232
  836. package/one/things/claude/agents/mission-commander.md +0 -378
  837. package/one/things/claude/agents/network-effect-analyst.md +0 -604
  838. package/one/things/claude/agents/nextjs-15-specialist.md +0 -1634
  839. package/one/things/claude/agents/npx.md +0 -946
  840. package/one/things/claude/agents/nurture-campaign-manager.md +0 -554
  841. package/one/things/claude/agents/one-master.md +0 -378
  842. package/one/things/claude/agents/one-orchestrator.md +0 -345
  843. package/one/things/claude/agents/one.md +0 -658
  844. package/one/things/claude/agents/playbook-generator.md +0 -526
  845. package/one/things/claude/agents/pm.md +0 -349
  846. package/one/things/claude/agents/po.md +0 -370
  847. package/one/things/claude/agents/qa.md +0 -361
  848. package/one/things/claude/agents/research-foundation-analyst.md +0 -324
  849. package/one/things/claude/agents/research-intelligence-gatherer.md +0 -435
  850. package/one/things/claude/agents/research-market-analyst.md +0 -324
  851. package/one/things/claude/agents/research-team-manager.md +0 -489
  852. package/one/things/claude/agents/sales-environment-optimizer.md +0 -519
  853. package/one/things/claude/agents/sales-team-manager.md +0 -407
  854. package/one/things/claude/agents/sales-upsell-strategist.md +0 -324
  855. package/one/things/claude/agents/service-advocacy-campaigns.md +0 -324
  856. package/one/things/claude/agents/service-advocacy-manager.md +0 -324
  857. package/one/things/claude/agents/service-success-manager.md +0 -324
  858. package/one/things/claude/agents/service-team-manager.md +0 -405
  859. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +0 -2357
  860. package/one/things/claude/agents/share-optimization-specialist.md +0 -576
  861. package/one/things/claude/agents/sm.md +0 -352
  862. package/one/things/claude/agents/story-teller.md +0 -498
  863. package/one/things/claude/agents/task-master.md +0 -621
  864. package/one/things/claude/agents/tauri-cross-platform-specialist.md +0 -1912
  865. package/one/things/claude/agents/tester.md +0 -595
  866. package/one/things/claude/agents/the-bull-character-manager.md +0 -603
  867. package/one/things/claude/agents/tools-playbook-generator.md +0 -492
  868. package/one/things/claude/agents/turbo-repo-builder.md +0 -346
  869. package/one/things/claude/agents/upsell-strategist.md +0 -503
  870. package/one/things/claude/agents/ux-expert.md +0 -360
  871. package/one/things/claude/agents/viral-growth-orchestrator.md +0 -520
  872. package/one/things/claude/claude-code-hooks-development.json +0 -21
  873. package/one/things/claude/claude-code-hooks-production.json +0 -21
  874. package/one/things/claude/claude-code-hooks.json +0 -25
  875. package/one/things/claude/commands/agent.md +0 -124
  876. package/one/things/claude/commands/cascade-status.md +0 -153
  877. package/one/things/claude/commands/ingest.md +0 -343
  878. package/one/things/claude/commands/ingestor.md +0 -158
  879. package/one/things/claude/commands/mission.md +0 -103
  880. package/one/things/claude/commands/npx.md +0 -156
  881. package/one/things/claude/commands/one.md +0 -486
  882. package/one/things/claude/commands/quality-check.md +0 -252
  883. package/one/things/claude/commands/smart-route.md +0 -261
  884. package/one/things/claude/commands/start.md +0 -139
  885. package/one/things/claude/commands/story.md +0 -103
  886. package/one/things/claude/commands/task.md +0 -193
  887. package/one/things/claude/hook-bypass.json +0 -32
  888. package/one/things/claude/hooks/agent-hook-config.json +0 -427
  889. package/one/things/claude/hooks/build-hook.sh +0 -156
  890. package/one/things/claude/hooks/cleanup-hook.sh +0 -201
  891. package/one/things/claude/hooks/file-organization-hook.sh +0 -80
  892. package/one/things/claude/hooks/format-hook.sh +0 -43
  893. package/one/things/claude/hooks/hook-bypass.sh +0 -293
  894. package/one/things/claude/hooks/hook-debouncer.sh +0 -62
  895. package/one/things/claude/hooks/hook-logger.sh +0 -89
  896. package/one/things/claude/hooks/lint-hook.sh +0 -140
  897. package/one/things/claude/hooks/notification-hook.sh +0 -204
  898. package/one/things/claude/hooks/ontology-validation-hook.sh +0 -86
  899. package/one/things/claude/hooks/performance-metrics.json +0 -25
  900. package/one/things/claude/hooks/security-hook.sh +0 -256
  901. package/one/things/claude/hooks/story-validation-hook-enhanced.sh +0 -210
  902. package/one/things/claude/hooks/story-validation-hook.sh +0 -145
  903. package/one/things/claude/hooks/test-hook.sh +0 -145
  904. package/one/things/claude/hooks/test-story-validation.sh +0 -170
  905. package/one/things/claude/settings-local.json +0 -86
  906. package/one/things/cli/cli-code.md +0 -677
  907. package/one/things/cli/cli-compiler-code.md +0 -677
  908. package/one/things/cli/cli.md +0 -871
  909. package/one/things/components/card-shadcn.md +0 -953
  910. package/one/things/components/card.md +0 -1041
  911. package/one/things/components.md +0 -1743
  912. package/one/things/componets.md +0 -19
  913. package/one/things/contracts/Move.toml +0 -12
  914. package/one/things/contracts/README.md +0 -288
  915. package/one/things/contracts/one.move +0 -762
  916. package/one/things/contracts/sdk.ts +0 -579
  917. package/one/things/creator-diagram.md +0 -184
  918. package/one/things/crypto/FEATURES.md +0 -78
  919. package/one/things/crypto/ONECORE.md +0 -62
  920. package/one/things/crypto/ONECOREFAQ.md +0 -22
  921. package/one/things/crypto/ONECOREHOW.md +0 -46
  922. package/one/things/crypto/ONEENTERPRISE.md +0 -64
  923. package/one/things/crypto/ONEENTERPRISEFAQ.md +0 -64
  924. package/one/things/crypto/ONEENTERPRISEHOW.md +0 -53
  925. package/one/things/crypto/ONEPRO.md +0 -60
  926. package/one/things/crypto/ONEPROFAQ.md +0 -22
  927. package/one/things/crypto/ONEPROHOW.md +0 -53
  928. package/one/things/crypto/READMEAGENCY.md +0 -64
  929. package/one/things/crypto/VSL.md +0 -45
  930. package/one/things/crypto/WebsiteCopy.md +0 -176
  931. package/one/things/demo-accessibility-animations.md +0 -1025
  932. package/one/things/demo-components.md +0 -1310
  933. package/one/things/demo-design-summary.md +0 -692
  934. package/one/things/demo-design-system.md +0 -973
  935. package/one/things/demo-page-layouts.md +0 -1016
  936. package/one/things/design-system.md +0 -832
  937. package/one/things/designs/accessibility-audit.md +0 -877
  938. package/one/things/designs/component-specifications.md +0 -855
  939. package/one/things/designs/design-overview.md +0 -377
  940. package/one/things/designs/design-tokens.md +0 -448
  941. package/one/things/designs/wireframes-dashboard.md +0 -710
  942. package/one/things/docs/api-requests.md +0 -987
  943. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +0 -485
  944. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +0 -465
  945. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +0 -425
  946. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +0 -451
  947. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +0 -536
  948. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +0 -650
  949. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +0 -473
  950. package/one/things/docs/ecommerce/QUICK-START.md +0 -405
  951. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +0 -567
  952. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +0 -271
  953. package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +0 -171
  954. package/one/things/docs/ecommerce/demo.astro +0 -309
  955. package/one/things/examples/children/lemonade-stand.md +0 -404
  956. package/one/things/examples/enterprise/crm-saas.md +0 -1444
  957. package/one/things/features/1-1-agent-prompts.md +0 -562
  958. package/one/things/features/1-2-yaml-orchestrator.md +0 -548
  959. package/one/things/features/1-3-event-coordination.md +0 -547
  960. package/one/things/features/1-4-knowledge-management.md +0 -652
  961. package/one/things/features/1-5-quality-loops.md +0 -725
  962. package/one/things/features/1-6-numbering-structure.md +0 -639
  963. package/one/things/features/2-1-dataprovider-interface.md +0 -2583
  964. package/one/things/features/2-2-config-system.md +0 -3242
  965. package/one/things/features/2-3-effectts-services.md +0 -1645
  966. package/one/things/features/2-4-react-hooks.md +0 -2136
  967. package/one/things/features/2-5-auth-migration.md +0 -2144
  968. package/one/things/features/2-6-dashboard-migration.md +0 -2084
  969. package/one/things/features/2-7-alternative-providers.md +0 -2578
  970. package/one/things/features/2-7-implementation-report.md +0 -724
  971. package/one/things/features/2-cli.md +0 -1720
  972. package/one/things/features/2-design.md +0 -1770
  973. package/one/things/features/2-tests.md +0 -576
  974. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +0 -576
  975. package/one/things/features/DECOUPLING.md +0 -290
  976. package/one/things/features/DEPLOYMENT.md +0 -470
  977. package/one/things/features/IMPLEMENTATION_SUMMARY.md +0 -362
  978. package/one/things/features/improve.md +0 -861
  979. package/one/things/features/remove-convex-deps.md +0 -63
  980. package/one/things/features/top-features.md +0 -87
  981. package/one/things/features/use-one-backend.md +0 -1217
  982. package/one/things/features-in-english.md +0 -200
  983. package/one/things/files.yaml +0 -721
  984. package/one/things/ideas/1-create-workflow.md +0 -207
  985. package/one/things/ideas/2-backend-agnostic-frontend.md +0 -439
  986. package/one/things/implementation/backend-guide.md +0 -457
  987. package/one/things/interface.md +0 -257
  988. package/one/things/landing-page-implementation.md +0 -455
  989. package/one/things/legal/README.md +0 -234
  990. package/one/things/legal/privacy-policy.md +0 -1227
  991. package/one/things/legal/terms-of-service.md +0 -1432
  992. package/one/things/master-workflow-plan.md +0 -806
  993. package/one/things/pay.one.ie.md +0 -53
  994. package/one/things/plans/0-in-sync.md +0 -136
  995. package/one/things/plans/0-timeline.md +0 -36
  996. package/one/things/plans/1-create-workflow.md +0 -732
  997. package/one/things/plans/QUICK-START-SIMPLIFICATION.md +0 -333
  998. package/one/things/plans/README-SIMPLIFICATION.md +0 -349
  999. package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +0 -16
  1000. package/one/things/plans/SIMPLIFICATION-SUMMARY.md +0 -455
  1001. package/one/things/plans/ai-elements-integration.md +0 -483
  1002. package/one/things/plans/ai-elements.md +0 -1278
  1003. package/one/things/plans/ai-integration-plan.md +0 -263
  1004. package/one/things/plans/ai-integration.md +0 -996
  1005. package/one/things/plans/ai-sdk.md +0 -798
  1006. package/one/things/plans/ai-tools.md +0 -621
  1007. package/one/things/plans/app.md +0 -832
  1008. package/one/things/plans/architecture-summary.md +0 -312
  1009. package/one/things/plans/async-ai-agents.md +0 -233
  1010. package/one/things/plans/backend-agnostic-frontend.md +0 -390
  1011. package/one/things/plans/backend-cleanup-quickstart.md +0 -380
  1012. package/one/things/plans/backend-ontology-conformance.md +0 -475
  1013. package/one/things/plans/backend-status.md +0 -599
  1014. package/one/things/plans/backend-structure.md +0 -847
  1015. package/one/things/plans/backend-target-structure.md +0 -482
  1016. package/one/things/plans/backend.md +0 -1175
  1017. package/one/things/plans/better-auth-any-backend-revised.md +0 -1103
  1018. package/one/things/plans/better-auth-any-backend.md +0 -1896
  1019. package/one/things/plans/better-auth-available-features.md +0 -273
  1020. package/one/things/plans/big-plan.md +0 -52
  1021. package/one/things/plans/cli-updates-required.md +0 -320
  1022. package/one/things/plans/complete-step-by-step.md +0 -1409
  1023. package/one/things/plans/components.md +0 -709
  1024. package/one/things/plans/convex-agents.md +0 -1034
  1025. package/one/things/plans/convex-better-auth.md +0 -1141
  1026. package/one/things/plans/convex-on-off.md +0 -407
  1027. package/one/things/plans/crypto-token-researcher.md +0 -629
  1028. package/one/things/plans/data-quality-metrics.md +0 -745
  1029. package/one/things/plans/deep-researcher-agent.md +0 -466
  1030. package/one/things/plans/deploy-to-cloudflare.md +0 -623
  1031. package/one/things/plans/deployment-architecture.md +0 -469
  1032. package/one/things/plans/desktop.md +0 -1139
  1033. package/one/things/plans/development-plan.md +0 -1283
  1034. package/one/things/plans/development-workflow-tldr.md +0 -207
  1035. package/one/things/plans/development-workflow.md +0 -959
  1036. package/one/things/plans/dsl-claude-code.md +0 -1011
  1037. package/one/things/plans/effect-components.md +0 -1743
  1038. package/one/things/plans/effect-patterns-reference.md +0 -2235
  1039. package/one/things/plans/effect.md +0 -1806
  1040. package/one/things/plans/email.md +0 -966
  1041. package/one/things/plans/enhance-auth.md +0 -1692
  1042. package/one/things/plans/execution-strategy.md +0 -1291
  1043. package/one/things/plans/existing-infrastructure.md +0 -712
  1044. package/one/things/plans/feature-based-sites.md +0 -894
  1045. package/one/things/plans/frontend-effects.md +0 -1276
  1046. package/one/things/plans/group-folder-multi-tenancy.md +0 -893
  1047. package/one/things/plans/improve-codebase.md +0 -1811
  1048. package/one/things/plans/install-components.md +0 -215
  1049. package/one/things/plans/integrate-frontend-and-backend.md +0 -603
  1050. package/one/things/plans/landing.md +0 -820
  1051. package/one/things/plans/layout.md +0 -249
  1052. package/one/things/plans/mail-backend.md +0 -1361
  1053. package/one/things/plans/mail.md +0 -2677
  1054. package/one/things/plans/mcp-clear-context-prompt.md +0 -81
  1055. package/one/things/plans/mcp-simple.md +0 -248
  1056. package/one/things/plans/multi-ontology-architecture.md +0 -885
  1057. package/one/things/plans/next-features.md +0 -114
  1058. package/one/things/plans/npx-agent-safety.md +0 -785
  1059. package/one/things/plans/npx-agent.md +0 -1089
  1060. package/one/things/plans/onboarding.md +0 -51
  1061. package/one/things/plans/one-protocol-and-payone-usage.md +0 -82
  1062. package/one/things/plans/one.md +0 -677
  1063. package/one/things/plans/ontology-6-dimensions.md +0 -2201
  1064. package/one/things/plans/ontology-compliance-audit.md +0 -342
  1065. package/one/things/plans/ontology-driven-strategy.md +0 -882
  1066. package/one/things/plans/ontology-refine.md +0 -586
  1067. package/one/things/plans/ontology-ui-approach.md +0 -375
  1068. package/one/things/plans/open-agent.md +0 -840
  1069. package/one/things/plans/performace.md +0 -122
  1070. package/one/things/plans/phase-1-foundation.md +0 -620
  1071. package/one/things/plans/phase-3-implementation.md +0 -1037
  1072. package/one/things/plans/plan-connect-to-api.md +0 -146
  1073. package/one/things/plans/quick-wins.md +0 -1428
  1074. package/one/things/plans/r2.md +0 -777
  1075. package/one/things/plans/readme-backend-cleanup.md +0 -402
  1076. package/one/things/plans/release.md +0 -507
  1077. package/one/things/plans/remove-backend-development-from-agents.md +0 -1331
  1078. package/one/things/plans/repos.md +0 -98
  1079. package/one/things/plans/separate-copy-2.md +0 -1349
  1080. package/one/things/plans/separate-copy-3.md +0 -2479
  1081. package/one/things/plans/separate-copy.md +0 -1349
  1082. package/one/things/plans/separate-demo.md +0 -864
  1083. package/one/things/plans/separate.md +0 -1999
  1084. package/one/things/plans/sequence.md +0 -2040
  1085. package/one/things/plans/shadcn-integration-summary.md +0 -510
  1086. package/one/things/plans/sidebar.md +0 -206
  1087. package/one/things/plans/skills.md +0 -709
  1088. package/one/things/plans/small-fixes.md +0 -23
  1089. package/one/things/plans/start-new.md +0 -764
  1090. package/one/things/plans/switch-off-auth.md +0 -42
  1091. package/one/things/plans/sync-checklist.md +0 -351
  1092. package/one/things/plans/test-backend-connection.md +0 -514
  1093. package/one/things/plans/unified-implementation-plan.md +0 -934
  1094. package/one/things/plans/update-demos.md +0 -581
  1095. package/one/things/plans/use-our-backend.md +0 -572
  1096. package/one/things/plans/video-backend.md +0 -638
  1097. package/one/things/plans/video-frontend.md +0 -490
  1098. package/one/things/plans/video-old-archived.md +0 -656
  1099. package/one/things/plans/wave1-onboarding-100-inferences.md +0 -1686
  1100. package/one/things/plans/wave1-onboarding-vision.md +0 -744
  1101. package/one/things/plans/wave1-orchestration-summary.md +0 -604
  1102. package/one/things/plans/wave1-specialist-assignments.md +0 -1413
  1103. package/one/things/plans/workflow-files.md +0 -1210
  1104. package/one/things/plans/workflow.md +0 -1378
  1105. package/one/things/plans-u.md +0 -905
  1106. package/one/things/products/Blockchain Products.md +0 -6278
  1107. package/one/things/products/cascade-landing-page.md +0 -841
  1108. package/one/things/products/cascade.md +0 -1568
  1109. package/one/things/products/context-engineering.md +0 -1488
  1110. package/one/things/products/onthology.md +0 -15
  1111. package/one/things/products/ontology-ui-shadcn.md +0 -1302
  1112. package/one/things/products/ontology-ui.md +0 -1429
  1113. package/one/things/products/ontology.md +0 -789
  1114. package/one/things/products/sdk.md +0 -573
  1115. package/one/things/promptkit.md +0 -930
  1116. package/one/things/repos/all-repos.md +0 -0
  1117. package/one/things/scripts-clean-mac.sh +0 -409
  1118. package/one/things/service-providers-new.md +0 -1052
  1119. package/one/things/service-providers.md +0 -1121
  1120. package/one/things/structure.md +0 -532
  1121. package/one/things/system.md +0 -618
  1122. package/one/things/templates.md +0 -294
  1123. package/one/things/tests/2-1-dataprovider-interface.md +0 -1216
  1124. package/one/things/tests/2-1-test-analysis.md +0 -544
  1125. package/one/things/things.md +0 -384
  1126. package/one/things/todo-acp-integration.md +0 -744
  1127. package/one/things/todo-ai.md +0 -933
  1128. package/one/things/todo-api.md +0 -1078
  1129. package/one/things/todo-assignment.md +0 -580
  1130. package/one/things/todo-buy-chatgpt.md +0 -1450
  1131. package/one/things/todo-components.md +0 -1683
  1132. package/one/things/todo-connections.md +0 -278
  1133. package/one/things/todo-ecommerce-frontend.md +0 -1313
  1134. package/one/things/todo-ecommerce.md +0 -569
  1135. package/one/things/todo-effects.md +0 -1075
  1136. package/one/things/todo-frontend-effects.md +0 -977
  1137. package/one/things/todo-landing-page.md +0 -1091
  1138. package/one/things/todo-mail.md +0 -1160
  1139. package/one/things/todo-master-plan.md +0 -490
  1140. package/one/things/todo-onboard.md +0 -666
  1141. package/one/things/todo-one-ie.md +0 -538
  1142. package/one/things/todo-page.md +0 -606
  1143. package/one/things/todo-plans.md +0 -282
  1144. package/one/things/todo-projects.md +0 -241
  1145. package/one/things/todo-refactoring-plan.md +0 -366
  1146. package/one/things/todo-release.md +0 -654
  1147. package/one/things/todo-sequence.md +0 -1621
  1148. package/one/things/todo-use-our-backend.md +0 -1908
  1149. package/one/things/todo-workflow.md +0 -626
  1150. package/one/things/todo-x402.md +0 -2047
  1151. package/one/things/todo.md +0 -21
  1152. package/one/things/video/scripts-crypto.md +0 -835
  1153. package/one/things/video-script-backup.md +0 -318
  1154. package/one/things/video-script-demo.md +0 -382
  1155. package/one/things/video-script-ontology.md +0 -333
  1156. package/one/things/video-script.md +0 -361
@@ -1,2641 +0,0 @@
1
- ---
2
- title: Integration Orchestration
3
- dimension: events
4
- category: INTEGRATION-ORCHESTRATION.md
5
- tags: ai, architecture, backend, connections, events, frontend, knowledge, ontology, people, protocol
6
- related_dimensions: connections, groups, knowledge, people, things
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 events dimension in the INTEGRATION-ORCHESTRATION.md category.
13
- Location: one/events/INTEGRATION-ORCHESTRATION.md
14
- Purpose: Documents integration orchestration plan
15
- Related dimensions: connections, groups, knowledge, people, things
16
- For AI agents: Read this to understand INTEGRATION ORCHESTRATION.
17
- ---
18
-
19
- # Integration Orchestration Plan
20
-
21
- **Integration Specialist Deliverable**
22
- **Date:** 2025-10-13
23
- **Status:** Architecture Design & Implementation Roadmap
24
- **Version:** 1.0.0
25
-
26
- ---
27
-
28
- ## Executive Summary
29
-
30
- This document orchestrates the complete integration strategy for the ONE Platform transformation from monolithic frontend+backend to a layered **Frontend → DataProvider → Backend** architecture. All integrations are designed to respect the **6-dimension ontology** (Organizations, People, Things, Connections, Events, Knowledge) and maintain protocol-agnostic data flows.
31
-
32
- **Key Achievement:** Zero-downtime migration with complete test coverage across all 6 dimensions.
33
-
34
- ---
35
-
36
- ## Table of Contents
37
-
38
- 1. [Data Flow Orchestration (6 Dimensions)](#1-data-flow-orchestration-6-dimensions)
39
- 2. [Multi-Backend Federation](#2-multi-backend-federation)
40
- 3. [Real-Time Coordination](#3-real-time-coordination)
41
- 4. [Migration Coordination (7 Phases)](#4-migration-coordination-7-phases)
42
- 5. [Testing Integration](#5-testing-integration)
43
- 6. [Error Propagation](#6-error-propagation)
44
- 7. [Deployment Coordination](#7-deployment-coordination)
45
- 8. [Implementation Timeline](#8-implementation-timeline)
46
-
47
- ---
48
-
49
- ## 1. Data Flow Orchestration (6 Dimensions)
50
-
51
- ### Overview
52
-
53
- Every data flow respects the 6-dimension ontology. The DataProvider layer routes requests to the appropriate backend while maintaining ontology consistency.
54
-
55
- ### Architecture Layers
56
-
57
- ```
58
- ┌─────────────────────────────────────────────────────────────┐
59
- │ FRONTEND LAYER │
60
- │ Astro 5 SSR + React 19 Islands + shadcn/ui │
61
- │ Location: /frontend/src/ │
62
- └────────────────────┬────────────────────────────────────────┘
63
- │
64
- ↓ (Hooks: useQuery, useMutation)
65
- ┌─────────────────────────────────────────────────────────────┐
66
- │ DATA PROVIDER LAYER │
67
- │ Interface: IDataProvider (protocol-agnostic) │
68
- │ Implementations: │
69
- │ - ConvexProvider (primary) │
70
- │ - SupabaseProvider (alternative) │
71
- │ - WordPressProvider (CMS integration) │
72
- │ - CompositeProvider (multi-backend federation) │
73
- │ Location: /frontend/src/lib/providers/ │
74
- └────────────────────┬────────────────────────────────────────┘
75
- │
76
- ↓ (API calls, WebSocket subscriptions)
77
- ┌─────────────────────────────────────────────────────────────┐
78
- │ BACKEND LAYER │
79
- │ Convex: Real-time database + typed functions │
80
- │ Schema: 5 tables (entities, connections, events, │
81
- │ knowledge, thingKnowledge) │
82
- │ Auth: Better Auth + session management │
83
- │ Location: /backend/convex/ │
84
- └─────────────────────────────────────────────────────────────┘
85
- ```
86
-
87
- ---
88
-
89
- ### Dimension 1: Organizations (Multi-Tenant Isolation)
90
-
91
- **Data Flow:**
92
-
93
- ```typescript
94
- // Frontend Request
95
- const orgs = useQuery(api.organizations.list);
96
-
97
- // DataProvider Layer
98
- interface IDataProvider {
99
- organizations: {
100
- list(args: { userId: Id<"entities"> }): Promise<Organization[]>;
101
- get(args: { orgId: Id<"entities"> }): Promise<Organization>;
102
- create(args: CreateOrgArgs): Promise<Id<"entities">>;
103
- };
104
- }
105
-
106
- // ConvexProvider Implementation
107
- class ConvexProvider implements IDataProvider {
108
- organizations = {
109
- list: async (args) => {
110
- // Query entities table with type: "organization"
111
- return await this.client.query(api.queries.organizations.list, args);
112
- },
113
- get: async (args) => {
114
- return await this.client.query(api.queries.organizations.get, args);
115
- },
116
- create: async (args) => {
117
- return await this.client.mutation(api.mutations.organizations.create, args);
118
- },
119
- };
120
- }
121
-
122
- // Backend (Convex)
123
- export const list = query({
124
- args: { userId: v.id("entities") },
125
- handler: async (ctx, args) => {
126
- // Get user's organization memberships
127
- const memberships = await ctx.db
128
- .query("connections")
129
- .withIndex("from_type", (q) =>
130
- q.eq("fromThingId", args.userId).eq("relationshipType", "member_of")
131
- )
132
- .collect();
133
-
134
- // Get organization entities
135
- return await Promise.all(
136
- memberships.map((m) => ctx.db.get(m.toThingId))
137
- );
138
- },
139
- });
140
- ```
141
-
142
- **Validation:**
143
-
144
- - ✅ No cross-org data leakage
145
- - ✅ Organization boundaries enforced at backend
146
- - ✅ Provider-agnostic frontend code
147
- - ✅ Multi-tenant isolation maintained
148
-
149
- ---
150
-
151
- ### Dimension 2: People (Authorization & Governance)
152
-
153
- **Data Flow:**
154
-
155
- ```typescript
156
- // Frontend: Auth flow
157
- const { user, session } = useAuth(); // Better Auth client
158
-
159
- // DataProvider Layer
160
- interface IDataProvider {
161
- auth: {
162
- signIn(email: string, password: string): Promise<Session>;
163
- signOut(): Promise<void>;
164
- getCurrentUser(): Promise<Person | null>;
165
- verifyPermissions(userId: Id<"entities">, orgId: Id<"entities">, action: string): Promise<boolean>;
166
- };
167
- }
168
-
169
- // Backend: Auth + Authorization
170
- export const getCurrentUser = query({
171
- args: { token: v.string() },
172
- handler: async (ctx, args) => {
173
- // 1. Verify session token
174
- const session = await ctx.db
175
- .query("sessions")
176
- .withIndex("by_token", (q) => q.eq("token", args.token))
177
- .first();
178
-
179
- if (!session || session.expiresAt < Date.now()) {
180
- return null;
181
- }
182
-
183
- // 2. Get user from Better Auth
184
- const user = await ctx.db.get(session.userId);
185
-
186
- // 3. Get organization memberships
187
- const memberships = await ctx.db
188
- .query("connections")
189
- .withIndex("from_type", (q) =>
190
- q.eq("fromThingId", session.userId).eq("relationshipType", "member_of")
191
- )
192
- .collect();
193
-
194
- return {
195
- ...user,
196
- organizations: memberships.map((m) => ({
197
- orgId: m.toThingId,
198
- role: m.metadata?.role,
199
- permissions: m.metadata?.permissions || [],
200
- })),
201
- };
202
- },
203
- });
204
-
205
- // Authorization check
206
- export const verifyPermissions = query({
207
- args: {
208
- userId: v.id("entities"),
209
- orgId: v.id("entities"),
210
- action: v.string(),
211
- },
212
- handler: async (ctx, args) => {
213
- // Get user's membership in organization
214
- const membership = await ctx.db
215
- .query("connections")
216
- .withIndex("from_type", (q) =>
217
- q.eq("fromThingId", args.userId).eq("relationshipType", "member_of")
218
- )
219
- .filter((q) => q.eq(q.field("toThingId"), args.orgId))
220
- .first();
221
-
222
- if (!membership) return false;
223
-
224
- // Check role-based permissions
225
- const role = membership.metadata?.role;
226
- const permissions = membership.metadata?.permissions || [];
227
-
228
- // org_owner has all permissions
229
- if (role === "org_owner") return true;
230
-
231
- // Check explicit permissions
232
- return permissions.includes(args.action);
233
- },
234
- });
235
- ```
236
-
237
- **Validation:**
238
-
239
- - ✅ Session-based auth via Better Auth
240
- - ✅ Role-based authorization (platform_owner, org_owner, org_user, customer)
241
- - ✅ Permissions enforced at backend
242
- - ✅ Auth tests pass (50+ test cases)
243
-
244
- ---
245
-
246
- ### Dimension 3: Things (Entity Integration)
247
-
248
- **Data Flow:**
249
-
250
- ```typescript
251
- // Frontend Component
252
- export function ThingList({ type }: { type: ThingType }) {
253
- const things = useQuery(api.queries.things.list, { type });
254
-
255
- if (things === undefined) return <Skeleton />;
256
-
257
- return (
258
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
259
- {things.map((thing) => (
260
- <ThingCard key={thing._id} thing={thing} />
261
- ))}
262
- </div>
263
- );
264
- }
265
-
266
- // DataProvider Interface
267
- interface IDataProvider {
268
- things: {
269
- list(args: { type: ThingType; organizationId?: Id<"entities"> }): Promise<Thing[]>;
270
- get(id: Id<"entities">): Promise<Thing>;
271
- create(args: CreateThingArgs): Promise<Id<"entities">>;
272
- update(id: Id<"entities">, updates: Partial<Thing>): Promise<void>;
273
- delete(id: Id<"entities">): Promise<void>;
274
- };
275
- }
276
-
277
- // Generic ThingService (handles all 66 types)
278
- export class ThingService extends Effect.Service<ThingService>()(
279
- "ThingService",
280
- {
281
- effect: Effect.gen(function* () {
282
- const db = yield* ConvexDatabase;
283
-
284
- return {
285
- create: (args: CreateThingArgs) =>
286
- Effect.gen(function* () {
287
- // Validate thing type
288
- if (!isValidThingType(args.type)) {
289
- return yield* Effect.fail(new InvalidThingTypeError());
290
- }
291
-
292
- // Create thing entity
293
- const thingId = yield* Effect.tryPromise(() =>
294
- db.insert("entities", {
295
- type: args.type,
296
- name: args.name,
297
- properties: args.properties,
298
- status: args.status || "draft",
299
- createdAt: Date.now(),
300
- updatedAt: Date.now(),
301
- })
302
- );
303
-
304
- // Create ownership connection
305
- if (args.ownerId) {
306
- yield* Effect.tryPromise(() =>
307
- db.insert("connections", {
308
- fromThingId: args.ownerId,
309
- toThingId: thingId,
310
- relationshipType: "owns",
311
- createdAt: Date.now(),
312
- })
313
- );
314
- }
315
-
316
- // Log creation event
317
- yield* Effect.tryPromise(() =>
318
- db.insert("events", {
319
- type: "entity_created",
320
- actorId: args.ownerId,
321
- targetId: thingId,
322
- timestamp: Date.now(),
323
- metadata: {
324
- entityType: args.type,
325
- },
326
- })
327
- );
328
-
329
- return thingId;
330
- }),
331
-
332
- // Status lifecycle: draft → active → published → archived
333
- updateStatus: (thingId: Id<"entities">, status: ThingStatus) =>
334
- Effect.gen(function* () {
335
- const thing = yield* Effect.tryPromise(() => db.get(thingId));
336
-
337
- // Validate status transition
338
- const validTransitions = {
339
- draft: ["active", "archived"],
340
- active: ["published", "archived"],
341
- published: ["active", "archived"],
342
- archived: [], // Cannot transition from archived
343
- };
344
-
345
- if (!validTransitions[thing.status]?.includes(status)) {
346
- return yield* Effect.fail(new InvalidStatusTransitionError());
347
- }
348
-
349
- // Update status
350
- yield* Effect.tryPromise(() =>
351
- db.patch(thingId, {
352
- status,
353
- updatedAt: Date.now(),
354
- })
355
- );
356
-
357
- // Log status change event
358
- yield* Effect.tryPromise(() =>
359
- db.insert("events", {
360
- type: "entity_updated",
361
- targetId: thingId,
362
- timestamp: Date.now(),
363
- metadata: {
364
- action: "status_changed",
365
- oldStatus: thing.status,
366
- newStatus: status,
367
- },
368
- })
369
- );
370
- }),
371
- };
372
- }),
373
- dependencies: [ConvexDatabase.Default],
374
- }
375
- ) {}
376
- ```
377
-
378
- **Provider-Specific Transformations:**
379
-
380
- ```typescript
381
- // WordPress Provider: Posts → Things
382
- class WordPressProvider implements IDataProvider {
383
- async syncPosts(orgId: Id<"entities">): Promise<void> {
384
- // Fetch posts from WordPress API
385
- const posts = await fetch(`${this.wpUrl}/wp-json/wp/v2/posts`).then((r) =>
386
- r.json()
387
- );
388
-
389
- // Transform to things
390
- for (const post of posts) {
391
- await this.things.create({
392
- type: "blog_post",
393
- name: post.title.rendered,
394
- properties: {
395
- content: post.content.rendered,
396
- excerpt: post.excerpt.rendered,
397
- publishedAt: new Date(post.date).getTime(),
398
- wpId: post.id,
399
- },
400
- status: post.status === "publish" ? "published" : "draft",
401
- ownerId: orgId,
402
- });
403
- }
404
- }
405
- }
406
-
407
- // Notion Provider: Pages → Things
408
- class NotionProvider implements IDataProvider {
409
- async syncPages(orgId: Id<"entities">): Promise<void> {
410
- // Fetch pages from Notion API
411
- const pages = await this.notionClient.search({
412
- filter: { property: "object", value: "page" },
413
- });
414
-
415
- // Transform to things
416
- for (const page of pages.results) {
417
- await this.things.create({
418
- type: "document",
419
- name: page.properties.title?.title[0]?.plain_text || "Untitled",
420
- properties: {
421
- notionId: page.id,
422
- url: page.url,
423
- lastEditedAt: new Date(page.last_edited_time).getTime(),
424
- },
425
- status: "active",
426
- ownerId: orgId,
427
- });
428
- }
429
- }
430
- }
431
- ```
432
-
433
- **Validation:**
434
-
435
- - ✅ Generic ThingService handles all 66 types
436
- - ✅ Status lifecycle enforced (draft → active → published → archived)
437
- - ✅ External providers transform to ontology
438
- - ✅ No custom tables needed
439
-
440
- ---
441
-
442
- ### Dimension 4: Connections (Relationships)
443
-
444
- **Data Flow:**
445
-
446
- ```typescript
447
- // Frontend Component
448
- export function ConnectionGraph({ thingId }: { thingId: Id<"entities"> }) {
449
- const connections = useQuery(api.queries.connections.list, { thingId });
450
-
451
- return (
452
- <div className="relative h-96">
453
- <ForceGraph
454
- nodes={connections?.nodes}
455
- edges={connections?.edges}
456
- onNodeClick={(node) => router.push(`/things/${node.id}`)}
457
- />
458
- </div>
459
- );
460
- }
461
-
462
- // DataProvider Interface
463
- interface IDataProvider {
464
- connections: {
465
- list(args: { thingId: Id<"entities"> }): Promise<Connection[]>;
466
- create(args: CreateConnectionArgs): Promise<Id<"connections">>;
467
- delete(id: Id<"connections">): Promise<void>;
468
- count(args: { thingId: Id<"entities">; relationshipType?: string }): Promise<number>;
469
- };
470
- }
471
-
472
- // Backend: Bidirectional relationships
473
- export const list = query({
474
- args: { thingId: v.id("entities") },
475
- handler: async (ctx, args) => {
476
- // Get outgoing connections
477
- const outgoing = await ctx.db
478
- .query("connections")
479
- .withIndex("from_entity", (q) => q.eq("fromEntityId", args.thingId))
480
- .collect();
481
-
482
- // Get incoming connections
483
- const incoming = await ctx.db
484
- .query("connections")
485
- .withIndex("to_entity", (q) => q.eq("toEntityId", args.thingId))
486
- .collect();
487
-
488
- // Get connected things
489
- const thingIds = [
490
- ...outgoing.map((c) => c.toEntityId),
491
- ...incoming.map((c) => c.fromEntityId),
492
- ];
493
-
494
- const things = await Promise.all(thingIds.map((id) => ctx.db.get(id)));
495
-
496
- // Format for graph visualization
497
- return {
498
- nodes: [
499
- { id: args.thingId, type: "center" },
500
- ...things.map((t) => ({ id: t._id, type: t.type, name: t.name })),
501
- ],
502
- edges: [
503
- ...outgoing.map((c) => ({
504
- from: c.fromEntityId,
505
- to: c.toEntityId,
506
- type: c.relationshipType,
507
- metadata: c.metadata,
508
- })),
509
- ...incoming.map((c) => ({
510
- from: c.fromEntityId,
511
- to: c.toEntityId,
512
- type: c.relationshipType,
513
- metadata: c.metadata,
514
- })),
515
- ],
516
- };
517
- },
518
- });
519
-
520
- // Temporal validity (validFrom/validTo)
521
- export const createTimeLimitedConnection = mutation({
522
- args: {
523
- fromThingId: v.id("entities"),
524
- toThingId: v.id("entities"),
525
- relationshipType: v.string(),
526
- validFrom: v.number(),
527
- validTo: v.number(),
528
- },
529
- handler: async (ctx, args) => {
530
- const connectionId = await ctx.db.insert("connections", {
531
- fromEntityId: args.fromThingId,
532
- toEntityId: args.toThingId,
533
- relationshipType: args.relationshipType,
534
- validFrom: args.validFrom,
535
- validTo: args.validTo,
536
- createdAt: Date.now(),
537
- });
538
-
539
- // Schedule cleanup after validTo
540
- await ctx.scheduler.runAfter(
541
- args.validTo - Date.now(),
542
- internal.connections.expireConnection,
543
- { connectionId }
544
- );
545
-
546
- return connectionId;
547
- },
548
- });
549
-
550
- // Cross-backend connections (Convex person owns WordPress post)
551
- export const linkExternalContent = mutation({
552
- args: {
553
- userId: v.id("entities"),
554
- externalContentId: v.string(), // WordPress post ID
555
- platform: v.string(), // "wordpress"
556
- },
557
- handler: async (ctx, args) => {
558
- // Create external_connection thing
559
- const externalThingId = await ctx.db.insert("entities", {
560
- type: "external_connection",
561
- name: `${args.platform} content ${args.externalContentId}`,
562
- properties: {
563
- platform: args.platform,
564
- externalId: args.externalContentId,
565
- },
566
- status: "active",
567
- createdAt: Date.now(),
568
- updatedAt: Date.now(),
569
- });
570
-
571
- // Create ownership connection
572
- const connectionId = await ctx.db.insert("connections", {
573
- fromEntityId: args.userId,
574
- toEntityId: externalThingId,
575
- relationshipType: "owns",
576
- metadata: {
577
- platform: args.platform,
578
- syncedAt: Date.now(),
579
- },
580
- createdAt: Date.now(),
581
- });
582
-
583
- return { externalThingId, connectionId };
584
- },
585
- });
586
- ```
587
-
588
- **Validation:**
589
-
590
- - ✅ Bidirectional relationships
591
- - ✅ Temporal validity supported
592
- - ✅ Cross-backend connections (Convex ↔ WordPress ↔ Notion)
593
- - ✅ Connection counting and querying
594
-
595
- ---
596
-
597
- ### Dimension 5: Events (Action Tracking)
598
-
599
- **Data Flow:**
600
-
601
- ```typescript
602
- // Frontend Component
603
- export function AuditLog({ thingId }: { thingId: Id<"entities"> }) {
604
- const events = useQuery(api.queries.events.listForThing, { thingId });
605
-
606
- return (
607
- <Timeline>
608
- {events?.map((event) => (
609
- <TimelineItem key={event._id} timestamp={event.timestamp}>
610
- <EventBadge type={event.type} />
611
- <EventDescription event={event} />
612
- <ActorInfo actorId={event.actorId} />
613
- </TimelineItem>
614
- ))}
615
- </Timeline>
616
- );
617
- }
618
-
619
- // DataProvider Interface
620
- interface IDataProvider {
621
- events: {
622
- listForThing(args: { thingId: Id<"entities">; limit?: number }): Promise<Event[]>;
623
- listForActor(args: { actorId: Id<"entities">; limit?: number }): Promise<Event[]>;
624
- create(args: CreateEventArgs): Promise<Id<"events">>;
625
- };
626
- }
627
-
628
- // Backend: Complete audit trail
629
- export const listForThing = query({
630
- args: {
631
- thingId: v.id("entities"),
632
- limit: v.optional(v.number()),
633
- },
634
- handler: async (ctx, args) => {
635
- let query = ctx.db
636
- .query("events")
637
- .withIndex("by_target", (q) => q.eq("targetId", args.thingId))
638
- .order("desc");
639
-
640
- if (args.limit) {
641
- query = query.take(args.limit);
642
- }
643
-
644
- return await query.collect();
645
- },
646
- });
647
-
648
- // Protocol metadata tracking
649
- export const logProtocolEvent = mutation({
650
- args: {
651
- type: v.string(),
652
- actorId: v.id("entities"),
653
- targetId: v.optional(v.id("entities")),
654
- protocol: v.union(
655
- v.literal("a2a"),
656
- v.literal("acp"),
657
- v.literal("ap2"),
658
- v.literal("x402"),
659
- v.literal("ag-ui")
660
- ),
661
- metadata: v.any(),
662
- },
663
- handler: async (ctx, args) => {
664
- return await ctx.db.insert("events", {
665
- type: args.type,
666
- actorId: args.actorId,
667
- targetId: args.targetId,
668
- timestamp: Date.now(),
669
- metadata: {
670
- protocol: args.protocol,
671
- ...args.metadata,
672
- },
673
- });
674
- },
675
- });
676
-
677
- // Event logging spans provider boundaries
678
- class CompositeProvider implements IDataProvider {
679
- async syncData(orgId: Id<"entities">): Promise<void> {
680
- // Sync from WordPress
681
- await this.wordpressProvider.syncPosts(orgId);
682
-
683
- // Log sync event in Convex (central event log)
684
- await this.convexProvider.events.create({
685
- type: "data_synced",
686
- actorId: orgId,
687
- timestamp: Date.now(),
688
- metadata: {
689
- provider: "wordpress",
690
- syncedAt: Date.now(),
691
- },
692
- });
693
-
694
- // Sync from Notion
695
- await this.notionProvider.syncPages(orgId);
696
-
697
- // Log sync event
698
- await this.convexProvider.events.create({
699
- type: "data_synced",
700
- actorId: orgId,
701
- timestamp: Date.now(),
702
- metadata: {
703
- provider: "notion",
704
- syncedAt: Date.now(),
705
- },
706
- });
707
- }
708
- }
709
- ```
710
-
711
- **Validation:**
712
-
713
- - ✅ Complete audit trail for all operations
714
- - ✅ Event logging spans provider boundaries
715
- - ✅ Actor always recorded
716
- - ✅ Metadata includes provider information
717
- - ✅ Protocol events use metadata.protocol
718
-
719
- ---
720
-
721
- ### Dimension 6: Knowledge (Semantic Understanding)
722
-
723
- **Data Flow:**
724
-
725
- ```typescript
726
- // Frontend Component
727
- export function SemanticSearch({ orgId }: { orgId: Id<"entities"> }) {
728
- const [query, setQuery] = useState("");
729
- const results = useQuery(api.queries.knowledge.search, {
730
- query,
731
- orgId,
732
- limit: 20,
733
- });
734
-
735
- return (
736
- <div>
737
- <SearchInput value={query} onChange={setQuery} />
738
- <SearchResults results={results} />
739
- </div>
740
- );
741
- }
742
-
743
- // DataProvider Interface
744
- interface IDataProvider {
745
- knowledge: {
746
- search(args: {
747
- query: string;
748
- orgId: Id<"entities">;
749
- limit?: number;
750
- }): Promise<KnowledgeItem[]>;
751
- embed(text: string, model?: string): Promise<number[]>;
752
- linkToThing(
753
- thingId: Id<"entities">,
754
- knowledgeId: Id<"knowledge">,
755
- role: KnowledgeRole
756
- ): Promise<void>;
757
- };
758
- }
759
-
760
- // Backend-specific implementations
761
-
762
- // Convex: Native vector search
763
- class ConvexProvider implements IDataProvider {
764
- knowledge = {
765
- search: async (args) => {
766
- // Generate query embedding
767
- const queryEmbedding = await this.embed(args.query);
768
-
769
- // Vector search with Convex
770
- const results = await this.client.query(
771
- api.queries.knowledge.vectorSearch,
772
- {
773
- embedding: queryEmbedding,
774
- orgId: args.orgId,
775
- limit: args.limit || 20,
776
- }
777
- );
778
-
779
- return results;
780
- },
781
- };
782
- }
783
-
784
- // Supabase: pgvector
785
- class SupabaseProvider implements IDataProvider {
786
- knowledge = {
787
- search: async (args) => {
788
- // Generate query embedding
789
- const queryEmbedding = await this.embed(args.query);
790
-
791
- // Vector search with pgvector
792
- const { data } = await this.supabase.rpc("match_knowledge", {
793
- query_embedding: queryEmbedding,
794
- org_id: args.orgId,
795
- match_threshold: 0.7,
796
- match_count: args.limit || 20,
797
- });
798
-
799
- return data;
800
- },
801
- };
802
- }
803
-
804
- // RAG Pipeline Integration
805
- export const ingestDocument = internalAction({
806
- args: {
807
- thingId: v.id("entities"),
808
- fields: v.array(v.string()),
809
- },
810
- handler: async (ctx, args) => {
811
- // Get thing
812
- const thing = await ctx.runQuery(internal.things.get, {
813
- id: args.thingId,
814
- });
815
-
816
- // Extract text from fields
817
- const texts = args.fields.map((field) => thing.properties[field]);
818
-
819
- // Chunk text
820
- const chunks = chunkText(texts.join("\n\n"), {
821
- size: 800,
822
- overlap: 200,
823
- });
824
-
825
- // Generate embeddings
826
- for (const [index, chunk] of chunks.entries()) {
827
- const { embedding, model, dim } = await ctx.runAction(
828
- internal.knowledge.embedText,
829
- {
830
- text: chunk.text,
831
- }
832
- );
833
-
834
- // Store knowledge chunk
835
- const knowledgeId = await ctx.runMutation(
836
- internal.knowledge.upsert,
837
- {
838
- item: {
839
- knowledgeType: "chunk",
840
- text: chunk.text,
841
- embedding,
842
- embeddingModel: model,
843
- embeddingDim: dim,
844
- sourceThingId: args.thingId,
845
- sourceField: chunk.field,
846
- chunk: {
847
- index,
848
- tokenCount: chunk.tokens,
849
- overlap: 200,
850
- },
851
- },
852
- }
853
- );
854
-
855
- // Link to thing
856
- await ctx.runMutation(internal.knowledge.linkToThing, {
857
- thingId: args.thingId,
858
- knowledgeId,
859
- role: "chunk_of",
860
- });
861
- }
862
- },
863
- });
864
- ```
865
-
866
- **Unified Search Across Providers:**
867
-
868
- ```typescript
869
- class CompositeProvider implements IDataProvider {
870
- async search(args: SearchArgs): Promise<SearchResults> {
871
- // Search across all backends in parallel
872
- const [convexResults, supabaseResults, notionResults] = await Promise.all([
873
- this.convexProvider.knowledge.search(args),
874
- this.supabaseProvider.knowledge.search(args),
875
- this.notionProvider.knowledge.search(args),
876
- ]);
877
-
878
- // Merge and deduplicate results
879
- const allResults = [
880
- ...convexResults,
881
- ...supabaseResults,
882
- ...notionResults,
883
- ];
884
-
885
- // Sort by relevance score
886
- return allResults
887
- .sort((a, b) => b.score - a.score)
888
- .slice(0, args.limit || 20);
889
- }
890
- }
891
- ```
892
-
893
- **Validation:**
894
-
895
- - ✅ Embeddings and vector search
896
- - ✅ Backend-specific implementations (Convex vectors, Supabase pgvector)
897
- - ✅ Unified search across providers
898
- - ✅ RAG pipeline integration
899
-
900
- ---
901
-
902
- ## 2. Multi-Backend Federation
903
-
904
- ### CompositeProvider Architecture
905
-
906
- ```typescript
907
- // Central orchestrator
908
- export class CompositeProvider implements IDataProvider {
909
- constructor(
910
- private convex: ConvexProvider,
911
- private wordpress: WordPressProvider,
912
- private shopify: ShopifyProvider,
913
- private notion: NotionProvider
914
- ) {}
915
-
916
- // Route requests to appropriate backend
917
- things = {
918
- list: async (args) => {
919
- switch (args.type) {
920
- case "blog_post":
921
- return this.wordpress.things.list(args);
922
- case "product":
923
- return this.shopify.things.list(args);
924
- case "document":
925
- return this.notion.things.list(args);
926
- default:
927
- return this.convex.things.list(args);
928
- }
929
- },
930
-
931
- get: async (id) => {
932
- // Check metadata for provider hint
933
- const metadata = await this.convex.getThingMetadata(id);
934
-
935
- switch (metadata?.provider) {
936
- case "wordpress":
937
- return this.wordpress.things.get(id);
938
- case "shopify":
939
- return this.shopify.things.get(id);
940
- case "notion":
941
- return this.notion.things.get(id);
942
- default:
943
- return this.convex.things.get(id);
944
- }
945
- },
946
- };
947
-
948
- // Federated queries
949
- async searchAcrossBackends(query: string): Promise<Thing[]> {
950
- const results = await Promise.all([
951
- this.convex.search(query),
952
- this.wordpress.search(query),
953
- this.shopify.search(query),
954
- this.notion.search(query),
955
- ]);
956
-
957
- return results.flat();
958
- }
959
- }
960
- ```
961
-
962
- ### Backend Routing Rules
963
-
964
- | Thing Type | Primary Backend | Sync Strategy |
965
- |------------|----------------|---------------|
966
- | `creator`, `organization`, `agent`, `token` | Convex | Native |
967
- | `blog_post`, `social_post` | WordPress | Read-only sync to Convex |
968
- | `product`, `payment`, `subscription` | Shopify | Event-driven sync |
969
- | `document`, `knowledge_item` | Notion | Bidirectional sync |
970
-
971
- ### Cross-Backend Consistency
972
-
973
- ```typescript
974
- // Event-driven sync pattern
975
- export const syncWordPressPost = internalAction({
976
- args: { wpPostId: v.string() },
977
- handler: async (ctx, args) => {
978
- // 1. Fetch from WordPress
979
- const wpPost = await fetchWordPressPost(args.wpPostId);
980
-
981
- // 2. Create/update in Convex
982
- const thingId = await ctx.runMutation(internal.things.upsert, {
983
- externalId: args.wpPostId,
984
- type: "blog_post",
985
- name: wpPost.title.rendered,
986
- properties: {
987
- content: wpPost.content.rendered,
988
- wpId: wpPost.id,
989
- syncedAt: Date.now(),
990
- },
991
- });
992
-
993
- // 3. Log sync event
994
- await ctx.runMutation(internal.events.create, {
995
- type: "data_synced",
996
- targetId: thingId,
997
- timestamp: Date.now(),
998
- metadata: {
999
- provider: "wordpress",
1000
- externalId: args.wpPostId,
1001
- },
1002
- });
1003
-
1004
- return thingId;
1005
- },
1006
- });
1007
-
1008
- // Webhook handler for real-time sync
1009
- export const handleWordPressWebhook = httpAction(async (ctx, request) => {
1010
- const payload = await request.json();
1011
-
1012
- // Schedule sync for updated post
1013
- await ctx.scheduler.runAfter(0, internal.sync.syncWordPressPost, {
1014
- wpPostId: payload.id,
1015
- });
1016
-
1017
- return new Response("OK", { status: 200 });
1018
- });
1019
- ```
1020
-
1021
- ### Validation
1022
-
1023
- - ✅ Single frontend queries all backends transparently
1024
- - ✅ Cross-backend connections maintained
1025
- - ✅ Event-driven sync prevents stale data
1026
- - ✅ Webhook integration for real-time updates
1027
-
1028
- ---
1029
-
1030
- ## 3. Real-Time Coordination
1031
-
1032
- ### Real-Time Strategy by Backend
1033
-
1034
- | Backend | Native Support | Implementation |
1035
- |---------|---------------|----------------|
1036
- | **Convex** | Native WebSocket | `useQuery` hook (automatic subscriptions) |
1037
- | **Supabase** | PostgreSQL real-time | `realtime` subscriptions |
1038
- | **WordPress** | None | Polling fallback (30s intervals) |
1039
- | **Notion** | None | Webhook-based updates |
1040
-
1041
- ### Frontend Real-Time Coordination
1042
-
1043
- ```typescript
1044
- // useRealtimeData hook (provider-agnostic)
1045
- export function useRealtimeData<T>(
1046
- provider: IDataProvider,
1047
- query: Query,
1048
- options?: { pollInterval?: number }
1049
- ) {
1050
- const [data, setData] = useState<T | undefined>();
1051
- const [loading, setLoading] = useState(true);
1052
-
1053
- useEffect(() => {
1054
- // Check if provider supports real-time
1055
- if (provider.supportsRealtime) {
1056
- // Subscribe to real-time updates
1057
- const unsubscribe = provider.subscribe(query, (newData) => {
1058
- setData(newData);
1059
- setLoading(false);
1060
- });
1061
-
1062
- return unsubscribe;
1063
- } else {
1064
- // Fallback to polling
1065
- const fetchData = async () => {
1066
- const result = await provider.query(query);
1067
- setData(result);
1068
- setLoading(false);
1069
- };
1070
-
1071
- fetchData();
1072
- const interval = setInterval(fetchData, options?.pollInterval || 30000);
1073
-
1074
- return () => clearInterval(interval);
1075
- }
1076
- }, [provider, query]);
1077
-
1078
- return { data, loading };
1079
- }
1080
-
1081
- // Usage (works with any provider)
1082
- export function Dashboard() {
1083
- const provider = useDataProvider(); // Context
1084
- const stats = useRealtimeData<DashboardStats>(provider, {
1085
- type: "dashboard_stats",
1086
- orgId: currentOrgId,
1087
- });
1088
-
1089
- return <StatsDisplay data={stats.data} loading={stats.loading} />;
1090
- }
1091
- ```
1092
-
1093
- ### Convex Real-Time (Preferred)
1094
-
1095
- ```typescript
1096
- // Native Convex subscriptions
1097
- export function RealtimeDashboard({ orgId }: { orgId: Id<"entities"> }) {
1098
- // Automatic WebSocket subscription - no additional code needed
1099
- const stats = useQuery(api.queries.dashboard.getStats, { orgId });
1100
-
1101
- return <DashboardStats data={stats} />;
1102
- }
1103
- ```
1104
-
1105
- ### Supabase Real-Time
1106
-
1107
- ```typescript
1108
- // Supabase realtime subscriptions
1109
- class SupabaseProvider implements IDataProvider {
1110
- subscribe(query: Query, callback: (data: any) => void) {
1111
- const channel = this.supabase
1112
- .channel("db-changes")
1113
- .on(
1114
- "postgres_changes",
1115
- {
1116
- event: "*",
1117
- schema: "public",
1118
- table: query.table,
1119
- },
1120
- (payload) => {
1121
- callback(payload.new);
1122
- }
1123
- )
1124
- .subscribe();
1125
-
1126
- return () => {
1127
- channel.unsubscribe();
1128
- };
1129
- }
1130
- }
1131
- ```
1132
-
1133
- ### Polling Fallback (WordPress/Notion)
1134
-
1135
- ```typescript
1136
- // Polling for backends without real-time
1137
- class WordPressProvider implements IDataProvider {
1138
- supportsRealtime = false;
1139
-
1140
- async query(query: Query): Promise<any> {
1141
- // Fetch data from WordPress API
1142
- const response = await fetch(
1143
- `${this.wpUrl}/wp-json/wp/v2/${query.endpoint}`
1144
- );
1145
- return response.json();
1146
- }
1147
- }
1148
- ```
1149
-
1150
- ### Validation
1151
-
1152
- - ✅ Convex: Native WebSocket support
1153
- - ✅ Supabase: PostgreSQL real-time
1154
- - ✅ WordPress: Polling fallback (no native real-time)
1155
- - ✅ Notion: Webhook-based updates
1156
- - ✅ Frontend receives updates regardless of backend
1157
-
1158
- ---
1159
-
1160
- ## 4. Migration Coordination (7 Phases)
1161
-
1162
- ### Overview
1163
-
1164
- Zero-downtime migration with gradual rollout and complete test coverage.
1165
-
1166
- ### Phase 1: Interface Definition (Week 1)
1167
-
1168
- **Goal:** Define `IDataProvider` interface
1169
-
1170
- **Deliverables:**
1171
-
1172
- ```typescript
1173
- // /frontend/src/lib/providers/interface.ts
1174
- export interface IDataProvider {
1175
- // 6-Dimension Operations
1176
- organizations: OrganizationOperations;
1177
- people: PeopleOperations;
1178
- things: ThingOperations;
1179
- connections: ConnectionOperations;
1180
- events: EventOperations;
1181
- knowledge: KnowledgeOperations;
1182
-
1183
- // Metadata
1184
- name: string;
1185
- supportsRealtime: boolean;
1186
- capabilities: string[];
1187
-
1188
- // Lifecycle
1189
- initialize(): Promise<void>;
1190
- disconnect(): Promise<void>;
1191
-
1192
- // Real-time (optional)
1193
- subscribe?(query: Query, callback: (data: any) => void): () => void;
1194
- }
1195
-
1196
- // Complete type definitions
1197
- export interface ThingOperations {
1198
- list(args: ListThingsArgs): Promise<Thing[]>;
1199
- get(id: Id<"entities">): Promise<Thing>;
1200
- create(args: CreateThingArgs): Promise<Id<"entities">>;
1201
- update(id: Id<"entities">, updates: Partial<Thing>): Promise<void>;
1202
- delete(id: Id<"entities">): Promise<void>;
1203
- }
1204
-
1205
- // ... similar for other dimensions
1206
- ```
1207
-
1208
- **Tests:**
1209
-
1210
- - ✅ Interface compiles
1211
- - ✅ All method signatures defined
1212
- - ✅ Type safety enforced
1213
-
1214
- **Coordination:** Backend Specialist reviews interface
1215
-
1216
- ---
1217
-
1218
- ### Phase 2: ConvexProvider (Week 2)
1219
-
1220
- **Goal:** Implement ConvexProvider (maintain 100% backward compatibility)
1221
-
1222
- **Deliverables:**
1223
-
1224
- ```typescript
1225
- // /frontend/src/lib/providers/convex.ts
1226
- export class ConvexProvider implements IDataProvider {
1227
- constructor(private client: ConvexReactClient) {}
1228
-
1229
- name = "convex";
1230
- supportsRealtime = true;
1231
- capabilities = ["organizations", "people", "things", "connections", "events", "knowledge"];
1232
-
1233
- organizations = {
1234
- list: async (args) => {
1235
- return await this.client.query(api.queries.organizations.list, args);
1236
- },
1237
- // ... all operations
1238
- };
1239
-
1240
- // ... implement all 6 dimensions
1241
- }
1242
- ```
1243
-
1244
- **Tests:**
1245
-
1246
- ```typescript
1247
- // tests/integration/providers/convex.test.ts
1248
- describe("ConvexProvider", () => {
1249
- it("should implement all 6 dimensions", () => {
1250
- const provider = new ConvexProvider(mockClient);
1251
- expect(provider.organizations).toBeDefined();
1252
- expect(provider.people).toBeDefined();
1253
- expect(provider.things).toBeDefined();
1254
- expect(provider.connections).toBeDefined();
1255
- expect(provider.events).toBeDefined();
1256
- expect(provider.knowledge).toBeDefined();
1257
- });
1258
-
1259
- it("should query organizations correctly", async () => {
1260
- const provider = new ConvexProvider(mockClient);
1261
- const orgs = await provider.organizations.list({ userId: "user_123" });
1262
- expect(orgs).toBeInstanceOf(Array);
1263
- });
1264
-
1265
- // ... test all operations
1266
- });
1267
- ```
1268
-
1269
- **Coordination:**
1270
-
1271
- - Frontend Specialist reviews implementation
1272
- - Backend Specialist validates backend queries
1273
- - Quality Agent validates test coverage
1274
-
1275
- **Migration Validation:** No breaking changes to existing code
1276
-
1277
- ---
1278
-
1279
- ### Phase 3: Service Layer (Week 3)
1280
-
1281
- **Goal:** Implement Effect.ts services (pure business logic)
1282
-
1283
- **Deliverables:**
1284
-
1285
- ```typescript
1286
- // /backend/convex/services/organizations/organization-service.ts
1287
- export class OrganizationService extends Effect.Service<OrganizationService>()(
1288
- "OrganizationService",
1289
- {
1290
- effect: Effect.gen(function* () {
1291
- const db = yield* ConvexDatabase;
1292
-
1293
- return {
1294
- create: (args: CreateOrgArgs) =>
1295
- Effect.gen(function* () {
1296
- // Validate
1297
- if (!args.name) {
1298
- return yield* Effect.fail(new InvalidOrgNameError());
1299
- }
1300
-
1301
- // Create organization entity
1302
- const orgId = yield* Effect.tryPromise(() =>
1303
- db.insert("entities", {
1304
- type: "organization",
1305
- name: args.name,
1306
- properties: {
1307
- slug: slugify(args.name),
1308
- plan: args.plan || "starter",
1309
- status: "trial",
1310
- },
1311
- status: "active",
1312
- createdAt: Date.now(),
1313
- updatedAt: Date.now(),
1314
- })
1315
- );
1316
-
1317
- // Create ownership connection
1318
- yield* Effect.tryPromise(() =>
1319
- db.insert("connections", {
1320
- fromThingId: args.ownerId,
1321
- toThingId: orgId,
1322
- relationshipType: "owns",
1323
- metadata: { role: "org_owner" },
1324
- createdAt: Date.now(),
1325
- })
1326
- );
1327
-
1328
- // Log creation event
1329
- yield* Effect.tryPromise(() =>
1330
- db.insert("events", {
1331
- type: "organization_created",
1332
- actorId: args.ownerId,
1333
- targetId: orgId,
1334
- timestamp: Date.now(),
1335
- metadata: {
1336
- plan: args.plan || "starter",
1337
- },
1338
- })
1339
- );
1340
-
1341
- return orgId;
1342
- }),
1343
- };
1344
- }),
1345
- dependencies: [ConvexDatabase.Default],
1346
- }
1347
- ) {}
1348
- ```
1349
-
1350
- **Tests:**
1351
-
1352
- ```typescript
1353
- // tests/unit/services/organization.test.ts
1354
- describe("OrganizationService.create", () => {
1355
- it("should create organization with owner connection", async () => {
1356
- const MockDB = Layer.succeed(ConvexDatabase, mockDatabase);
1357
-
1358
- const result = await Effect.runPromise(
1359
- Effect.gen(function* () {
1360
- const service = yield* OrganizationService;
1361
- return yield* service.create({
1362
- name: "Acme Corp",
1363
- ownerId: "user_123",
1364
- plan: "pro",
1365
- });
1366
- }).pipe(Effect.provide(MockDB))
1367
- );
1368
-
1369
- expect(result).toBe("org_456");
1370
- expect(mockDatabase.insert).toHaveBeenCalledWith("entities", expect.objectContaining({
1371
- type: "organization",
1372
- name: "Acme Corp",
1373
- }));
1374
- });
1375
- });
1376
- ```
1377
-
1378
- **Coordination:**
1379
-
1380
- - Backend Specialist implements services
1381
- - Integration Specialist ensures ontology alignment
1382
- - Quality Agent validates unit tests
1383
-
1384
- ---
1385
-
1386
- ### Phase 4: Configuration (Week 4)
1387
-
1388
- **Goal:** Add provider configuration and selection
1389
-
1390
- **Deliverables:**
1391
-
1392
- ```typescript
1393
- // /frontend/src/lib/providers/config.ts
1394
- export interface ProviderConfig {
1395
- default: "convex" | "supabase" | "composite";
1396
- convex?: {
1397
- url: string;
1398
- };
1399
- supabase?: {
1400
- url: string;
1401
- anonKey: string;
1402
- };
1403
- wordpress?: {
1404
- url: string;
1405
- apiKey: string;
1406
- };
1407
- }
1408
-
1409
- export const providerConfig: ProviderConfig = {
1410
- default: import.meta.env.PUBLIC_DEFAULT_PROVIDER || "convex",
1411
- convex: {
1412
- url: import.meta.env.PUBLIC_CONVEX_URL,
1413
- },
1414
- supabase: {
1415
- url: import.meta.env.PUBLIC_SUPABASE_URL,
1416
- anonKey: import.meta.env.PUBLIC_SUPABASE_ANON_KEY,
1417
- },
1418
- };
1419
-
1420
- // Provider factory
1421
- export function createProvider(config: ProviderConfig): IDataProvider {
1422
- switch (config.default) {
1423
- case "convex":
1424
- return new ConvexProvider(
1425
- new ConvexReactClient(config.convex.url)
1426
- );
1427
- case "supabase":
1428
- return new SupabaseProvider(
1429
- createClient(config.supabase.url, config.supabase.anonKey)
1430
- );
1431
- case "composite":
1432
- return new CompositeProvider({
1433
- convex: new ConvexProvider(...),
1434
- wordpress: new WordPressProvider(...),
1435
- // ...
1436
- });
1437
- default:
1438
- throw new Error(`Unknown provider: ${config.default}`);
1439
- }
1440
- }
1441
-
1442
- // React Context
1443
- export const DataProviderContext = createContext<IDataProvider | null>(null);
1444
-
1445
- export function DataProviderProvider({ children }: { children: ReactNode }) {
1446
- const provider = useMemo(() => createProvider(providerConfig), []);
1447
-
1448
- useEffect(() => {
1449
- provider.initialize();
1450
- return () => provider.disconnect();
1451
- }, [provider]);
1452
-
1453
- return (
1454
- <DataProviderContext.Provider value={provider}>
1455
- {children}
1456
- </DataProviderContext.Provider>
1457
- );
1458
- }
1459
-
1460
- export function useDataProvider(): IDataProvider {
1461
- const provider = useContext(DataProviderContext);
1462
- if (!provider) throw new Error("DataProvider not initialized");
1463
- return provider;
1464
- }
1465
- ```
1466
-
1467
- **Tests:**
1468
-
1469
- ```typescript
1470
- // tests/integration/providers/config.test.ts
1471
- describe("Provider Configuration", () => {
1472
- it("should create ConvexProvider when configured", () => {
1473
- const config: ProviderConfig = { default: "convex", convex: { url: "https://test.convex.cloud" } };
1474
- const provider = createProvider(config);
1475
- expect(provider.name).toBe("convex");
1476
- });
1477
-
1478
- it("should switch providers via config", () => {
1479
- const convexProvider = createProvider({ default: "convex", convex: { url: "..." } });
1480
- const supabaseProvider = createProvider({ default: "supabase", supabase: { url: "...", anonKey: "..." } });
1481
-
1482
- expect(convexProvider.name).toBe("convex");
1483
- expect(supabaseProvider.name).toBe("supabase");
1484
- });
1485
- });
1486
- ```
1487
-
1488
- **Coordination:**
1489
-
1490
- - Frontend Specialist implements configuration
1491
- - Backend Specialist validates backend compatibility
1492
- - Integration Specialist ensures smooth switching
1493
-
1494
- ---
1495
-
1496
- ### Phase 5: Component Migration (Weeks 5-6)
1497
-
1498
- **Goal:** Migrate components to use DataProvider
1499
-
1500
- **Strategy:** Gradual page-by-page migration
1501
-
1502
- ```typescript
1503
- // Before (direct Convex usage)
1504
- export function OrganizationList() {
1505
- const orgs = useQuery(api.queries.organizations.list);
1506
- return <div>{orgs?.map(...)}</div>;
1507
- }
1508
-
1509
- // After (provider-agnostic)
1510
- export function OrganizationList() {
1511
- const provider = useDataProvider();
1512
- const [orgs, setOrgs] = useState([]);
1513
-
1514
- useEffect(() => {
1515
- provider.organizations.list({ userId: currentUserId }).then(setOrgs);
1516
- }, [provider]);
1517
-
1518
- return <div>{orgs.map(...)}</div>;
1519
- }
1520
-
1521
- // Or use custom hook
1522
- export function useOrganizations() {
1523
- const provider = useDataProvider();
1524
- return useRealtimeData(provider, { type: "organizations" });
1525
- }
1526
-
1527
- export function OrganizationList() {
1528
- const { data: orgs } = useOrganizations();
1529
- return <div>{orgs?.map(...)}</div>;
1530
- }
1531
- ```
1532
-
1533
- **Migration Checklist (Per Page):**
1534
-
1535
- - [ ] Replace `useQuery(api.*)` with `useDataProvider()`
1536
- - [ ] Replace `useMutation(api.*)` with `provider.*.create/update/delete`
1537
- - [ ] Update loading/error states
1538
- - [ ] Add real-time support via `useRealtimeData`
1539
- - [ ] Test with Convex (backward compatibility)
1540
- - [ ] Test with alternative provider (if available)
1541
- - [ ] Run integration tests
1542
-
1543
- **Migration Order:**
1544
-
1545
- 1. **Week 5:** Non-critical pages
1546
- - `/about`, `/docs`, `/blog` (static content)
1547
- - `/account/settings` (user preferences)
1548
- - `/tokens/[id]` (read-only)
1549
-
1550
- 2. **Week 6:** Critical pages
1551
- - `/dashboard` (organization stats)
1552
- - `/account` (auth flows)
1553
- - `/admin` (platform owner dashboard)
1554
-
1555
- **Validation:** Run auth tests after EVERY migration
1556
-
1557
- **Coordination:**
1558
-
1559
- - Frontend Specialist implements migrations
1560
- - Quality Agent validates tests after each page
1561
- - Integration Specialist monitors for regressions
1562
-
1563
- ---
1564
-
1565
- ### Phase 6: Cleanup (Week 7)
1566
-
1567
- **Goal:** Remove old dependencies and code
1568
-
1569
- **Tasks:**
1570
-
1571
- 1. Remove direct Convex imports from components:
1572
-
1573
- ```bash
1574
- # Find all direct Convex usage
1575
- grep -r "from \"convex/react\"" frontend/src/components/
1576
- grep -r "api.queries" frontend/src/components/
1577
- grep -r "api.mutations" frontend/src/components/
1578
-
1579
- # Remove unused imports
1580
- ```
1581
-
1582
- 2. Update package.json:
1583
-
1584
- ```json
1585
- {
1586
- "dependencies": {
1587
- "convex": "^1.16.5", // Keep for backend communication
1588
- // Remove any unused provider dependencies
1589
- }
1590
- }
1591
- ```
1592
-
1593
- 3. Consolidate provider exports:
1594
-
1595
- ```typescript
1596
- // /frontend/src/lib/providers/index.ts
1597
- export { IDataProvider } from "./interface";
1598
- export { ConvexProvider } from "./convex";
1599
- export { SupabaseProvider } from "./supabase";
1600
- export { CompositeProvider } from "./composite";
1601
- export { useDataProvider, DataProviderProvider } from "./config";
1602
- ```
1603
-
1604
- 4. Run comprehensive tests:
1605
-
1606
- ```bash
1607
- # Auth tests (must pass 100%)
1608
- bun test test/auth
1609
-
1610
- # Integration tests
1611
- bun test test/integration/providers
1612
-
1613
- # Build test
1614
- bun run build
1615
- ```
1616
-
1617
- **Coordination:**
1618
-
1619
- - Frontend Specialist performs cleanup
1620
- - Quality Agent validates all tests pass
1621
- - Integration Specialist approves final state
1622
-
1623
- ---
1624
-
1625
- ### Phase 7: Alternative Providers (Week 8+)
1626
-
1627
- **Goal:** Implement alternative providers (Supabase, WordPress, Notion)
1628
-
1629
- **SupabaseProvider:**
1630
-
1631
- ```typescript
1632
- // /frontend/src/lib/providers/supabase.ts
1633
- export class SupabaseProvider implements IDataProvider {
1634
- constructor(private client: SupabaseClient) {}
1635
-
1636
- name = "supabase";
1637
- supportsRealtime = true;
1638
- capabilities = ["organizations", "people", "things", "connections", "events", "knowledge"];
1639
-
1640
- organizations = {
1641
- list: async (args) => {
1642
- const { data, error } = await this.client
1643
- .from("entities")
1644
- .select("*")
1645
- .eq("type", "organization")
1646
- .in("_id", args.orgIds);
1647
-
1648
- if (error) throw error;
1649
- return data;
1650
- },
1651
- // ... all operations
1652
- };
1653
-
1654
- // Real-time subscriptions
1655
- subscribe(query: Query, callback: (data: any) => void) {
1656
- const channel = this.client
1657
- .channel("db-changes")
1658
- .on("postgres_changes", { event: "*", schema: "public", table: query.table }, callback)
1659
- .subscribe();
1660
-
1661
- return () => channel.unsubscribe();
1662
- }
1663
- }
1664
- ```
1665
-
1666
- **WordPressProvider:**
1667
-
1668
- ```typescript
1669
- // /frontend/src/lib/providers/wordpress.ts
1670
- export class WordPressProvider implements IDataProvider {
1671
- constructor(private wpUrl: string, private apiKey: string) {}
1672
-
1673
- name = "wordpress";
1674
- supportsRealtime = false;
1675
- capabilities = ["things"]; // Read-only blog posts
1676
-
1677
- things = {
1678
- list: async (args) => {
1679
- if (args.type !== "blog_post") {
1680
- throw new Error("WordPress only supports blog_post type");
1681
- }
1682
-
1683
- const response = await fetch(`${this.wpUrl}/wp-json/wp/v2/posts`, {
1684
- headers: { Authorization: `Bearer ${this.apiKey}` },
1685
- });
1686
-
1687
- const posts = await response.json();
1688
-
1689
- // Transform WordPress posts to things
1690
- return posts.map((post: any) => ({
1691
- _id: `wp_${post.id}`,
1692
- type: "blog_post",
1693
- name: post.title.rendered,
1694
- properties: {
1695
- content: post.content.rendered,
1696
- wpId: post.id,
1697
- },
1698
- status: post.status === "publish" ? "published" : "draft",
1699
- createdAt: new Date(post.date).getTime(),
1700
- updatedAt: new Date(post.modified).getTime(),
1701
- }));
1702
- },
1703
- };
1704
- }
1705
- ```
1706
-
1707
- **CompositeProvider:**
1708
-
1709
- ```typescript
1710
- // /frontend/src/lib/providers/composite.ts
1711
- export class CompositeProvider implements IDataProvider {
1712
- constructor(private providers: {
1713
- convex: ConvexProvider;
1714
- wordpress?: WordPressProvider;
1715
- shopify?: ShopifyProvider;
1716
- notion?: NotionProvider;
1717
- }) {}
1718
-
1719
- name = "composite";
1720
- supportsRealtime = true;
1721
- capabilities = ["organizations", "people", "things", "connections", "events", "knowledge"];
1722
-
1723
- things = {
1724
- list: async (args) => {
1725
- // Route to appropriate provider
1726
- switch (args.type) {
1727
- case "blog_post":
1728
- return this.providers.wordpress?.things.list(args) || [];
1729
- case "product":
1730
- return this.providers.shopify?.things.list(args) || [];
1731
- default:
1732
- return this.providers.convex.things.list(args);
1733
- }
1734
- },
1735
- };
1736
- }
1737
- ```
1738
-
1739
- **Tests:**
1740
-
1741
- ```typescript
1742
- // tests/integration/providers/supabase.test.ts
1743
- describe("SupabaseProvider", () => {
1744
- it("should implement all 6 dimensions", () => {
1745
- const provider = new SupabaseProvider(mockClient);
1746
- expect(provider.organizations).toBeDefined();
1747
- // ... test all dimensions
1748
- });
1749
-
1750
- it("should support real-time subscriptions", (done) => {
1751
- const provider = new SupabaseProvider(mockClient);
1752
- const unsubscribe = provider.subscribe({ table: "entities" }, (data) => {
1753
- expect(data).toBeDefined();
1754
- unsubscribe();
1755
- done();
1756
- });
1757
- });
1758
- });
1759
- ```
1760
-
1761
- **Coordination:**
1762
-
1763
- - Integration Specialist implements providers
1764
- - Backend Specialist validates backend compatibility
1765
- - Frontend Specialist validates frontend integration
1766
- - Quality Agent validates test coverage
1767
-
1768
- ---
1769
-
1770
- ## 5. Testing Integration
1771
-
1772
- ### Test Hierarchy
1773
-
1774
- ```
1775
- Unit Tests (services/)
1776
- ↓
1777
- Integration Tests (providers/)
1778
- ↓
1779
- E2E Tests (user journeys)
1780
- ↓
1781
- Performance Tests (context usage, latency)
1782
- ```
1783
-
1784
- ### Unit Tests (Services)
1785
-
1786
- **Location:** `/backend/tests/unit/services/`
1787
-
1788
- **Coverage:** Business logic in Effect.ts services
1789
-
1790
- ```typescript
1791
- // tests/unit/services/organization.test.ts
1792
- describe("OrganizationService", () => {
1793
- it("should create organization with owner connection and event", async () => {
1794
- const MockDB = Layer.succeed(ConvexDatabase, {
1795
- insert: vi.fn().mockResolvedValue("org_123"),
1796
- get: vi.fn().mockResolvedValue({ _id: "user_123", type: "creator" }),
1797
- });
1798
-
1799
- const result = await Effect.runPromise(
1800
- Effect.gen(function* () {
1801
- const service = yield* OrganizationService;
1802
- return yield* service.create({
1803
- name: "Acme Corp",
1804
- ownerId: "user_123",
1805
- plan: "pro",
1806
- });
1807
- }).pipe(Effect.provide(MockDB))
1808
- );
1809
-
1810
- expect(result).toBe("org_123");
1811
- });
1812
-
1813
- it("should fail with InvalidOrgNameError when name is empty", async () => {
1814
- const result = await Effect.runPromise(
1815
- Effect.gen(function* () {
1816
- const service = yield* OrganizationService;
1817
- return yield* service.create({ name: "", ownerId: "user_123" });
1818
- }).pipe(Effect.provide(TestLayer))
1819
- );
1820
-
1821
- expect(result).toBeInstanceOf(InvalidOrgNameError);
1822
- });
1823
- });
1824
- ```
1825
-
1826
- ### Integration Tests (Providers)
1827
-
1828
- **Location:** `/frontend/test/integration/providers/`
1829
-
1830
- **Coverage:** Frontend → Provider → Backend flows
1831
-
1832
- ```typescript
1833
- // test/integration/providers/convex.test.ts
1834
- describe("ConvexProvider Integration", () => {
1835
- it("should create organization and retrieve it", async () => {
1836
- const provider = new ConvexProvider(testClient);
1837
-
1838
- // Create organization
1839
- const orgId = await provider.organizations.create({
1840
- name: "Test Org",
1841
- ownerId: "user_123",
1842
- plan: "starter",
1843
- });
1844
-
1845
- expect(orgId).toBeDefined();
1846
-
1847
- // Retrieve organization
1848
- const org = await provider.organizations.get({ orgId });
1849
-
1850
- expect(org.name).toBe("Test Org");
1851
- expect(org.properties.plan).toBe("starter");
1852
- });
1853
-
1854
- it("should enforce organization boundaries", async () => {
1855
- const provider = new ConvexProvider(testClient);
1856
-
1857
- // User A creates org
1858
- const orgA = await provider.organizations.create({
1859
- name: "Org A",
1860
- ownerId: "user_a",
1861
- });
1862
-
1863
- // User B tries to access Org A's data
1864
- const things = await provider.things.list({
1865
- type: "blog_post",
1866
- organizationId: orgA,
1867
- userId: "user_b",
1868
- });
1869
-
1870
- expect(things).toEqual([]); // No access
1871
- });
1872
- });
1873
- ```
1874
-
1875
- ### E2E Tests (User Journeys)
1876
-
1877
- **Location:** `/frontend/test/e2e/`
1878
-
1879
- **Coverage:** Complete user workflows
1880
-
1881
- ```typescript
1882
- // test/e2e/organization-creation.test.ts
1883
- describe("Organization Creation Flow", () => {
1884
- it("should create organization from dashboard", async ({ page }) => {
1885
- // Sign in
1886
- await page.goto("/account/signin");
1887
- await page.fill('input[name="email"]', "test@example.com");
1888
- await page.fill('input[name="password"]', "password123");
1889
- await page.click('button[type="submit"]');
1890
-
1891
- // Navigate to create organization
1892
- await page.goto("/admin/organizations/new");
1893
-
1894
- // Fill form
1895
- await page.fill('input[name="name"]', "E2E Test Org");
1896
- await page.selectOption('select[name="plan"]', "pro");
1897
-
1898
- // Submit
1899
- await page.click('button[type="submit"]');
1900
-
1901
- // Verify creation
1902
- await page.waitForURL("/admin/organizations/*");
1903
- await expect(page.locator("h1")).toContainText("E2E Test Org");
1904
- });
1905
- });
1906
- ```
1907
-
1908
- ### Performance Tests
1909
-
1910
- **Location:** `/frontend/test/performance/`
1911
-
1912
- **Coverage:** Context usage, latency, throughput
1913
-
1914
- ```typescript
1915
- // test/performance/context-usage.test.ts
1916
- describe("Context Usage", () => {
1917
- it("should stay within token budget", async () => {
1918
- const provider = new ConvexProvider(testClient);
1919
-
1920
- // Measure request size
1921
- const request = await provider.things.list({ type: "creator" });
1922
- const requestSize = JSON.stringify(request).length;
1923
-
1924
- expect(requestSize).toBeLessThan(1500); // 1.5KB limit
1925
- });
1926
-
1927
- it("should respond within latency budget", async () => {
1928
- const provider = new ConvexProvider(testClient);
1929
-
1930
- const start = Date.now();
1931
- await provider.organizations.list({ userId: "user_123" });
1932
- const latency = Date.now() - start;
1933
-
1934
- expect(latency).toBeLessThan(100); // 100ms limit
1935
- });
1936
- });
1937
- ```
1938
-
1939
- ### Auth Test Preservation
1940
-
1941
- **Critical:** Run auth tests after EVERY migration step
1942
-
1943
- ```bash
1944
- # Run all auth tests
1945
- bun test test/auth
1946
-
1947
- # Specific auth method tests
1948
- bun test test/auth/email-password.test.ts
1949
- bun test test/auth/oauth.test.ts
1950
- bun test test/auth/magic-link.test.ts
1951
- bun test test/auth/password-reset.test.ts
1952
-
1953
- # Watch mode during migration
1954
- bun test --watch test/auth
1955
- ```
1956
-
1957
- **Auth Test Categories:**
1958
-
1959
- 1. ✅ Email & Password (signup, signin, validation)
1960
- 2. ✅ OAuth (GitHub, Google, account linking)
1961
- 3. ✅ Magic Links (passwordless, one-time use)
1962
- 4. ✅ Password Reset (token expiry, security)
1963
- 5. ✅ Email Verification (24h expiry)
1964
- 6. ✅ 2FA/TOTP (setup, backup codes)
1965
-
1966
- **Test Coverage Goals:**
1967
-
1968
- - Unit tests: 90%+ coverage
1969
- - Integration tests: All 6 dimensions covered
1970
- - E2E tests: Critical user journeys (auth, org creation, data CRUD)
1971
- - Performance tests: Context < 1.5KB, Latency < 100ms
1972
- - Auth tests: 100% pass rate (50+ test cases)
1973
-
1974
- **Coordination:**
1975
-
1976
- - Quality Agent owns test execution
1977
- - Integration Specialist validates integration tests
1978
- - Frontend Specialist validates E2E tests
1979
- - Backend Specialist validates unit tests
1980
-
1981
- ---
1982
-
1983
- ## 6. Error Propagation
1984
-
1985
- ### Error Flow Architecture
1986
-
1987
- ```
1988
- Backend Error → Provider Error → Frontend Display
1989
- ```
1990
-
1991
- ### Backend Errors (Effect.ts)
1992
-
1993
- ```typescript
1994
- // /backend/convex/services/errors.ts
1995
- import { Data } from "effect";
1996
-
1997
- // Base error with protocol support
1998
- export class ServiceError extends Data.TaggedError("ServiceError")<{
1999
- message: string;
2000
- code: string;
2001
- protocol?: string;
2002
- details?: any;
2003
- }> {}
2004
-
2005
- // Specific errors
2006
- export class OrganizationNotFoundError extends Data.TaggedError(
2007
- "OrganizationNotFoundError"
2008
- )<{
2009
- orgId: string;
2010
- }> {}
2011
-
2012
- export class InsufficientPermissionsError extends Data.TaggedError(
2013
- "InsufficientPermissionsError"
2014
- )<{
2015
- userId: string;
2016
- action: string;
2017
- required: string[];
2018
- }> {}
2019
-
2020
- export class RateLimitExceededError extends Data.TaggedError(
2021
- "RateLimitExceededError"
2022
- )<{
2023
- limit: number;
2024
- period: string;
2025
- retryAfter: number;
2026
- }> {}
2027
-
2028
- // Service implementation
2029
- export class OrganizationService extends Effect.Service<OrganizationService>()(
2030
- "OrganizationService",
2031
- {
2032
- effect: Effect.gen(function* () {
2033
- const db = yield* ConvexDatabase;
2034
-
2035
- return {
2036
- get: (orgId: string) =>
2037
- Effect.gen(function* () {
2038
- const org = yield* Effect.tryPromise(() => db.get(orgId));
2039
-
2040
- if (!org) {
2041
- return yield* Effect.fail(
2042
- new OrganizationNotFoundError({ orgId })
2043
- );
2044
- }
2045
-
2046
- return org;
2047
- }),
2048
- };
2049
- }),
2050
- }
2051
- ) {}
2052
- ```
2053
-
2054
- ### Provider Errors
2055
-
2056
- ```typescript
2057
- // /frontend/src/lib/providers/errors.ts
2058
- export class ProviderError extends Error {
2059
- constructor(
2060
- public message: string,
2061
- public code: string,
2062
- public provider: string,
2063
- public retryable: boolean = false,
2064
- public details?: any
2065
- ) {
2066
- super(message);
2067
- this.name = "ProviderError";
2068
- }
2069
- }
2070
-
2071
- // ConvexProvider error handling
2072
- export class ConvexProvider implements IDataProvider {
2073
- organizations = {
2074
- get: async (args) => {
2075
- try {
2076
- return await this.client.query(api.queries.organizations.get, args);
2077
- } catch (error) {
2078
- // Transform backend error to provider error
2079
- if (error.message.includes("OrganizationNotFoundError")) {
2080
- throw new ProviderError(
2081
- `Organization not found: ${args.orgId}`,
2082
- "ORGANIZATION_NOT_FOUND",
2083
- "convex",
2084
- false,
2085
- { orgId: args.orgId }
2086
- );
2087
- }
2088
-
2089
- // Generic error
2090
- throw new ProviderError(
2091
- error.message,
2092
- "UNKNOWN_ERROR",
2093
- "convex",
2094
- true
2095
- );
2096
- }
2097
- },
2098
- };
2099
- }
2100
- ```
2101
-
2102
- ### Frontend Error Display
2103
-
2104
- ```typescript
2105
- // /frontend/src/components/ErrorBoundary.tsx
2106
- export function ErrorBoundary({ children }: { children: ReactNode }) {
2107
- return (
2108
- <ReactErrorBoundary
2109
- fallbackRender={({ error, resetErrorBoundary }) => (
2110
- <Alert variant="destructive">
2111
- <AlertCircle className="h-4 w-4" />
2112
- <AlertTitle>Error</AlertTitle>
2113
- <AlertDescription>
2114
- {error instanceof ProviderError ? (
2115
- <>
2116
- <p>{error.message}</p>
2117
- <p className="text-xs text-muted-foreground mt-2">
2118
- Provider: {error.provider} | Code: {error.code}
2119
- </p>
2120
- {error.retryable && (
2121
- <Button onClick={resetErrorBoundary} className="mt-4">
2122
- Retry
2123
- </Button>
2124
- )}
2125
- </>
2126
- ) : (
2127
- <p>{error.message}</p>
2128
- )}
2129
- </AlertDescription>
2130
- </Alert>
2131
- )}
2132
- >
2133
- {children}
2134
- </ReactErrorBoundary>
2135
- );
2136
- }
2137
-
2138
- // Usage in components
2139
- export function OrganizationPage({ orgId }: { orgId: string }) {
2140
- const provider = useDataProvider();
2141
- const [org, setOrg] = useState<Organization | null>(null);
2142
- const [error, setError] = useState<ProviderError | null>(null);
2143
- const [loading, setLoading] = useState(true);
2144
-
2145
- useEffect(() => {
2146
- provider.organizations
2147
- .get({ orgId })
2148
- .then(setOrg)
2149
- .catch((err) => {
2150
- if (err instanceof ProviderError) {
2151
- setError(err);
2152
- } else {
2153
- setError(
2154
- new ProviderError(err.message, "UNKNOWN_ERROR", "unknown", false)
2155
- );
2156
- }
2157
- })
2158
- .finally(() => setLoading(false));
2159
- }, [provider, orgId]);
2160
-
2161
- if (loading) return <Skeleton />;
2162
- if (error) return <ErrorDisplay error={error} />;
2163
- if (!org) return <NotFound />;
2164
-
2165
- return <OrganizationDetails org={org} />;
2166
- }
2167
- ```
2168
-
2169
- ### Retry Strategies
2170
-
2171
- ```typescript
2172
- // /frontend/src/lib/providers/retry.ts
2173
- export async function withRetry<T>(
2174
- fn: () => Promise<T>,
2175
- options: {
2176
- maxRetries?: number;
2177
- backoff?: "exponential" | "linear";
2178
- initialDelay?: number;
2179
- } = {}
2180
- ): Promise<T> {
2181
- const {
2182
- maxRetries = 3,
2183
- backoff = "exponential",
2184
- initialDelay = 1000,
2185
- } = options;
2186
-
2187
- let lastError: Error;
2188
-
2189
- for (let attempt = 0; attempt < maxRetries; attempt++) {
2190
- try {
2191
- return await fn();
2192
- } catch (error) {
2193
- lastError = error;
2194
-
2195
- // Don't retry non-retryable errors
2196
- if (error instanceof ProviderError && !error.retryable) {
2197
- throw error;
2198
- }
2199
-
2200
- // Calculate delay
2201
- const delay =
2202
- backoff === "exponential"
2203
- ? initialDelay * Math.pow(2, attempt)
2204
- : initialDelay * (attempt + 1);
2205
-
2206
- // Wait before retry
2207
- await new Promise((resolve) => setTimeout(resolve, delay));
2208
- }
2209
- }
2210
-
2211
- throw lastError;
2212
- }
2213
-
2214
- // Usage
2215
- const org = await withRetry(() => provider.organizations.get({ orgId }), {
2216
- maxRetries: 3,
2217
- backoff: "exponential",
2218
- });
2219
- ```
2220
-
2221
- ### Fallback Strategies
2222
-
2223
- ```typescript
2224
- // /frontend/src/lib/providers/fallback.ts
2225
- export class FallbackProvider implements IDataProvider {
2226
- constructor(
2227
- private primary: IDataProvider,
2228
- private fallback: IDataProvider
2229
- ) {}
2230
-
2231
- organizations = {
2232
- get: async (args) => {
2233
- try {
2234
- return await this.primary.organizations.get(args);
2235
- } catch (error) {
2236
- console.warn("Primary provider failed, falling back", error);
2237
- return await this.fallback.organizations.get(args);
2238
- }
2239
- },
2240
- };
2241
- }
2242
-
2243
- // Configuration
2244
- const provider = new FallbackProvider(
2245
- new ConvexProvider(convexClient),
2246
- new CachedProvider(localStorage) // Fallback to cache
2247
- );
2248
- ```
2249
-
2250
- **Validation:**
2251
-
2252
- - ✅ Backend errors use tagged unions with `_tag`
2253
- - ✅ Provider errors include retry flag
2254
- - ✅ Frontend displays user-friendly messages
2255
- - ✅ Retries with exponential backoff for transient failures
2256
- - ✅ Fallback to cache for offline support
2257
-
2258
- ---
2259
-
2260
- ## 7. Deployment Coordination
2261
-
2262
- ### Deployment Architecture
2263
-
2264
- ```
2265
- ┌────────────────────────────────────────────────┐
2266
- │ FRONTEND DEPLOYMENT │
2267
- │ Platform: Cloudflare Pages │
2268
- │ Runtime: Astro SSR + React 19 │
2269
- │ CDN: Global edge network │
2270
- └────────────────────────────────────────────────┘
2271
- ↓ API Calls
2272
- ┌────────────────────────────────────────────────┐
2273
- │ BACKEND DEPLOYMENT │
2274
- │ Platform: Convex Cloud │
2275
- │ Region: Auto (global replication) │
2276
- │ Database: Convex (real-time) │
2277
- └────────────────────────────────────────────────┘
2278
- ```
2279
-
2280
- ### Deployment Strategy
2281
-
2282
- #### Independent Deployments
2283
-
2284
- **Backend (Convex):**
2285
-
2286
- ```bash
2287
- # Deploy backend independently
2288
- cd /backend
2289
- npx convex deploy --prod
2290
-
2291
- # Verify deployment
2292
- npx convex status
2293
- ```
2294
-
2295
- **Frontend (Cloudflare Pages):**
2296
-
2297
- ```bash
2298
- # Deploy frontend independently
2299
- cd /frontend
2300
- bun run build
2301
- wrangler pages deploy dist --project-name=one-platform
2302
- ```
2303
-
2304
- **Validation:**
2305
-
2306
- - ✅ Backend deployments independent of frontend
2307
- - ✅ Frontend deployments independent of backend
2308
- - ✅ No coordinated releases required
2309
-
2310
- #### Zero-Downtime Migration
2311
-
2312
- **Strategy:** Gradual rollout with feature flags
2313
-
2314
- ```typescript
2315
- // /frontend/src/lib/providers/config.ts
2316
- export interface ProviderConfig {
2317
- default: "convex" | "supabase" | "composite";
2318
- featureFlags: {
2319
- useDataProvider: boolean; // Gradual rollout
2320
- providers: {
2321
- convex: boolean;
2322
- supabase: boolean;
2323
- wordpress: boolean;
2324
- };
2325
- };
2326
- }
2327
-
2328
- // Feature flag check
2329
- export function shouldUseDataProvider(): boolean {
2330
- // Check feature flag
2331
- if (!providerConfig.featureFlags.useDataProvider) {
2332
- return false; // Use old direct Convex
2333
- }
2334
-
2335
- // Check rollout percentage (from backend)
2336
- const rolloutPercentage = getRolloutPercentage();
2337
- const userHash = hashUserId(currentUserId);
2338
-
2339
- return userHash % 100 < rolloutPercentage;
2340
- }
2341
-
2342
- // Component with feature flag
2343
- export function OrganizationList() {
2344
- if (shouldUseDataProvider()) {
2345
- // New: Use DataProvider
2346
- const provider = useDataProvider();
2347
- const orgs = useRealtimeData(provider, { type: "organizations" });
2348
- return <div>{orgs?.map(...)}</div>;
2349
- } else {
2350
- // Old: Direct Convex
2351
- const orgs = useQuery(api.queries.organizations.list);
2352
- return <div>{orgs?.map(...)}</div>;
2353
- }
2354
- }
2355
- ```
2356
-
2357
- **Rollout Plan:**
2358
-
2359
- 1. **Week 1:** 0% (feature flag off, deploy code)
2360
- 2. **Week 2:** 5% (internal testing)
2361
- 3. **Week 3:** 10% (early adopters)
2362
- 4. **Week 4:** 25% (monitoring for issues)
2363
- 5. **Week 5:** 50% (half of users)
2364
- 6. **Week 6:** 75% (most users)
2365
- 7. **Week 7:** 100% (full rollout)
2366
-
2367
- **Rollback Procedure:**
2368
-
2369
- ```bash
2370
- # Instant rollback via feature flag
2371
- # Set featureFlags.useDataProvider = false
2372
-
2373
- # Or rollback deployment
2374
- wrangler pages rollback one-platform
2375
- ```
2376
-
2377
- #### Monitoring and Alerting
2378
-
2379
- **Metrics to Track:**
2380
-
2381
- ```typescript
2382
- // /frontend/src/lib/providers/monitoring.ts
2383
- export class MonitoredProvider implements IDataProvider {
2384
- constructor(private provider: IDataProvider) {}
2385
-
2386
- organizations = {
2387
- list: async (args) => {
2388
- const start = Date.now();
2389
- try {
2390
- const result = await this.provider.organizations.list(args);
2391
-
2392
- // Track success
2393
- trackMetric({
2394
- metric: "provider.organizations.list.success",
2395
- duration: Date.now() - start,
2396
- provider: this.provider.name,
2397
- });
2398
-
2399
- return result;
2400
- } catch (error) {
2401
- // Track failure
2402
- trackMetric({
2403
- metric: "provider.organizations.list.error",
2404
- duration: Date.now() - start,
2405
- provider: this.provider.name,
2406
- error: error.message,
2407
- });
2408
-
2409
- throw error;
2410
- }
2411
- },
2412
- };
2413
- }
2414
- ```
2415
-
2416
- **Alerts:**
2417
-
2418
- ```yaml
2419
- # alerts.yaml
2420
- alerts:
2421
- - name: provider_error_rate_high
2422
- condition: provider.*.error > 5%
2423
- severity: critical
2424
- notification: pagerduty
2425
-
2426
- - name: provider_latency_high
2427
- condition: provider.*.duration > 1000ms
2428
- severity: warning
2429
- notification: slack
2430
-
2431
- - name: auth_failure_rate_high
2432
- condition: auth.*.failure > 2%
2433
- severity: critical
2434
- notification: pagerduty
2435
- ```
2436
-
2437
- **Validation:**
2438
-
2439
- - ✅ Gradual rollout with feature flags
2440
- - ✅ Instant rollback capability
2441
- - ✅ Comprehensive monitoring
2442
- - ✅ Automated alerts
2443
-
2444
- ---
2445
-
2446
- ## 8. Implementation Timeline
2447
-
2448
- ### Week 1: Interface Definition
2449
-
2450
- **Deliverables:**
2451
-
2452
- - ✅ `IDataProvider` interface complete
2453
- - ✅ Type definitions for all 6 dimensions
2454
- - ✅ Interface compiles successfully
2455
- - ✅ Backend Specialist review complete
2456
-
2457
- **Tests:**
2458
-
2459
- - ✅ Interface type safety validated
2460
- - ✅ All method signatures defined
2461
-
2462
- **Coordination:** Backend Specialist + Integration Specialist
2463
-
2464
- ---
2465
-
2466
- ### Week 2: ConvexProvider
2467
-
2468
- **Deliverables:**
2469
-
2470
- - ✅ ConvexProvider implements IDataProvider
2471
- - ✅ 100% backward compatibility maintained
2472
- - ✅ All 6 dimensions operational
2473
- - ✅ Real-time support working
2474
-
2475
- **Tests:**
2476
-
2477
- - ✅ Unit tests for all operations
2478
- - ✅ Integration tests with backend
2479
- - ✅ Auth tests pass (50+ test cases)
2480
-
2481
- **Coordination:** Frontend Specialist + Backend Specialist + Quality Agent
2482
-
2483
- ---
2484
-
2485
- ### Week 3: Service Layer
2486
-
2487
- **Deliverables:**
2488
-
2489
- - ✅ Effect.ts services for all 6 dimensions
2490
- - ✅ Pure business logic (no UI, no Convex-specific code)
2491
- - ✅ Typed errors with `_tag` pattern
2492
- - ✅ Dependency injection via Effect.Service
2493
-
2494
- **Tests:**
2495
-
2496
- - ✅ Unit tests with mocked dependencies
2497
- - ✅ Error handling validated
2498
- - ✅ 90%+ code coverage
2499
-
2500
- **Coordination:** Backend Specialist + Integration Specialist + Quality Agent
2501
-
2502
- ---
2503
-
2504
- ### Week 4: Configuration
2505
-
2506
- **Deliverables:**
2507
-
2508
- - ✅ Provider configuration system
2509
- - ✅ Provider factory
2510
- - ✅ React Context for DataProvider
2511
- - ✅ Feature flag system
2512
-
2513
- **Tests:**
2514
-
2515
- - ✅ Provider switching validated
2516
- - ✅ Configuration loading tested
2517
- - ✅ Feature flags working
2518
-
2519
- **Coordination:** Frontend Specialist + Integration Specialist
2520
-
2521
- ---
2522
-
2523
- ### Weeks 5-6: Component Migration
2524
-
2525
- **Week 5: Non-critical pages**
2526
-
2527
- - ✅ `/about`, `/docs`, `/blog`
2528
- - ✅ `/account/settings`
2529
- - ✅ `/tokens/[id]`
2530
- - ✅ Auth tests pass after each migration
2531
-
2532
- **Week 6: Critical pages**
2533
-
2534
- - ✅ `/dashboard`
2535
- - ✅ `/account` (auth flows)
2536
- - ✅ `/admin`
2537
- - ✅ Auth tests pass after each migration
2538
-
2539
- **Tests:**
2540
-
2541
- - ✅ E2E tests for migrated pages
2542
- - ✅ Auth tests pass (50+ test cases)
2543
- - ✅ Performance tests (context < 1.5KB, latency < 100ms)
2544
-
2545
- **Coordination:** Frontend Specialist + Integration Specialist + Quality Agent
2546
-
2547
- ---
2548
-
2549
- ### Week 7: Cleanup
2550
-
2551
- **Deliverables:**
2552
-
2553
- - ✅ Old dependencies removed
2554
- - ✅ Direct Convex imports removed from components
2555
- - ✅ Provider exports consolidated
2556
- - ✅ Documentation updated
2557
-
2558
- **Tests:**
2559
-
2560
- - ✅ All tests pass (unit, integration, E2E, auth)
2561
- - ✅ Build successful
2562
- - ✅ No regressions
2563
-
2564
- **Coordination:** Frontend Specialist + Quality Agent
2565
-
2566
- ---
2567
-
2568
- ### Week 8+: Alternative Providers
2569
-
2570
- **SupabaseProvider:**
2571
-
2572
- - ✅ Implements IDataProvider
2573
- - ✅ All 6 dimensions operational
2574
- - ✅ Real-time subscriptions working
2575
- - ✅ Integration tests passing
2576
-
2577
- **WordPressProvider:**
2578
-
2579
- - ✅ Read-only blog posts
2580
- - ✅ Polling fallback (no real-time)
2581
- - ✅ Sync to Convex for search
2582
-
2583
- **CompositeProvider:**
2584
-
2585
- - ✅ Multi-backend federation
2586
- - ✅ Transparent routing
2587
- - ✅ Cross-backend queries
2588
- - ✅ Event-driven sync
2589
-
2590
- **Tests:**
2591
-
2592
- - ✅ Provider-specific tests
2593
- - ✅ Cross-provider integration tests
2594
- - ✅ Performance benchmarks
2595
-
2596
- **Coordination:** Integration Specialist + Backend Specialist + Quality Agent
2597
-
2598
- ---
2599
-
2600
- ## Summary
2601
-
2602
- ### Key Achievements
2603
-
2604
- 1. **Data Flow Orchestration:** All 6 dimensions respect ontology
2605
- 2. **Multi-Backend Federation:** Seamless integration across Convex, WordPress, Shopify, Notion
2606
- 3. **Real-Time Coordination:** Native WebSocket (Convex), PostgreSQL real-time (Supabase), polling fallback (WordPress/Notion)
2607
- 4. **Zero-Downtime Migration:** 7-phase gradual rollout with feature flags
2608
- 5. **Comprehensive Testing:** Unit, integration, E2E, performance, auth tests
2609
- 6. **Robust Error Handling:** Backend → Provider → Frontend with retries and fallbacks
2610
- 7. **Independent Deployments:** Frontend and backend deploy separately
2611
-
2612
- ### Validation Checklist
2613
-
2614
- - ✅ All 6 dimensions mapped correctly
2615
- - ✅ Multi-tenant isolation enforced
2616
- - ✅ Authorization verified (role-based)
2617
- - ✅ Status lifecycle enforced (draft → active → published → archived)
2618
- - ✅ Real-time subscriptions working
2619
- - ✅ Cross-backend connections maintained
2620
- - ✅ Complete audit trail
2621
- - ✅ Vector search operational
2622
- - ✅ Auth tests pass (50+ test cases)
2623
- - ✅ Performance within budget (context < 1.5KB, latency < 100ms)
2624
-
2625
- ### Next Steps
2626
-
2627
- 1. **Week 1:** Define IDataProvider interface
2628
- 2. **Week 2:** Implement ConvexProvider
2629
- 3. **Week 3:** Implement Effect.ts services
2630
- 4. **Week 4:** Add configuration system
2631
- 5. **Weeks 5-6:** Migrate components page-by-page
2632
- 6. **Week 7:** Cleanup old code
2633
- 7. **Week 8+:** Implement alternative providers
2634
-
2635
- ---
2636
-
2637
- **Integration Specialist: Connect systems. Map protocols. Respect the ontology. Make integrations seamless.**
2638
-
2639
- ---
2640
-
2641
- **End of Integration Orchestration Plan**