oneie 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1132) 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/capabilities.d.ts +4 -0
  11. package/dist/commands/capabilities.d.ts.map +1 -0
  12. package/dist/commands/capabilities.js +18 -0
  13. package/dist/commands/capabilities.js.map +1 -0
  14. package/dist/commands/commend.d.ts +4 -0
  15. package/dist/commands/commend.d.ts.map +1 -0
  16. package/dist/commands/commend.js +13 -0
  17. package/dist/commands/commend.js.map +1 -0
  18. package/dist/commands/completion.d.ts +4 -0
  19. package/dist/commands/completion.d.ts.map +1 -0
  20. package/dist/commands/completion.js +49 -0
  21. package/dist/commands/completion.js.map +1 -0
  22. package/dist/commands/config.d.ts +4 -0
  23. package/dist/commands/config.d.ts.map +1 -0
  24. package/dist/commands/config.js +78 -0
  25. package/dist/commands/config.js.map +1 -0
  26. package/dist/commands/doctor.d.ts +4 -0
  27. package/dist/commands/doctor.d.ts.map +1 -0
  28. package/dist/commands/doctor.js +72 -0
  29. package/dist/commands/doctor.js.map +1 -0
  30. package/dist/commands/export.d.ts +4 -0
  31. package/dist/commands/export.d.ts.map +1 -0
  32. package/dist/commands/export.js +15 -0
  33. package/dist/commands/export.js.map +1 -0
  34. package/dist/commands/fade.d.ts.map +1 -1
  35. package/dist/commands/fade.js +8 -4
  36. package/dist/commands/fade.js.map +1 -1
  37. package/dist/commands/flag.d.ts +4 -0
  38. package/dist/commands/flag.d.ts.map +1 -0
  39. package/dist/commands/flag.js +13 -0
  40. package/dist/commands/flag.js.map +1 -0
  41. package/dist/commands/health.d.ts +4 -0
  42. package/dist/commands/health.d.ts.map +1 -0
  43. package/dist/commands/health.js +11 -0
  44. package/dist/commands/health.js.map +1 -0
  45. package/dist/commands/highways.d.ts.map +1 -1
  46. package/dist/commands/highways.js +7 -4
  47. package/dist/commands/highways.js.map +1 -1
  48. package/dist/commands/hire.d.ts +4 -0
  49. package/dist/commands/hire.d.ts.map +1 -0
  50. package/dist/commands/hire.js +16 -0
  51. package/dist/commands/hire.js.map +1 -0
  52. package/dist/commands/init.d.ts.map +1 -1
  53. package/dist/commands/init.js +69 -42
  54. package/dist/commands/init.js.map +1 -1
  55. package/dist/commands/mark.d.ts.map +1 -1
  56. package/dist/commands/mark.js +7 -7
  57. package/dist/commands/mark.js.map +1 -1
  58. package/dist/commands/pay.d.ts +4 -0
  59. package/dist/commands/pay.d.ts.map +1 -0
  60. package/dist/commands/pay.js +21 -0
  61. package/dist/commands/pay.js.map +1 -0
  62. package/dist/commands/pipe.d.ts +4 -0
  63. package/dist/commands/pipe.d.ts.map +1 -0
  64. package/dist/commands/pipe.js +35 -0
  65. package/dist/commands/pipe.js.map +1 -0
  66. package/dist/commands/publish.d.ts +4 -0
  67. package/dist/commands/publish.d.ts.map +1 -0
  68. package/dist/commands/publish.js +23 -0
  69. package/dist/commands/publish.js.map +1 -0
  70. package/dist/commands/repl.d.ts +4 -0
  71. package/dist/commands/repl.d.ts.map +1 -0
  72. package/dist/commands/repl.js +56 -0
  73. package/dist/commands/repl.js.map +1 -0
  74. package/dist/commands/revenue.d.ts +4 -0
  75. package/dist/commands/revenue.d.ts.map +1 -0
  76. package/dist/commands/revenue.js +11 -0
  77. package/dist/commands/revenue.js.map +1 -0
  78. package/dist/commands/stats.d.ts +4 -0
  79. package/dist/commands/stats.d.ts.map +1 -0
  80. package/dist/commands/stats.js +11 -0
  81. package/dist/commands/stats.js.map +1 -0
  82. package/dist/commands/status.d.ts +4 -0
  83. package/dist/commands/status.d.ts.map +1 -0
  84. package/dist/commands/status.js +18 -0
  85. package/dist/commands/status.js.map +1 -0
  86. package/dist/commands/tail.d.ts +4 -0
  87. package/dist/commands/tail.d.ts.map +1 -0
  88. package/dist/commands/tail.js +51 -0
  89. package/dist/commands/tail.js.map +1 -0
  90. package/dist/commands/warn.d.ts.map +1 -1
  91. package/dist/commands/warn.js +6 -6
  92. package/dist/commands/warn.js.map +1 -1
  93. package/dist/index.js +61 -1
  94. package/dist/index.js.map +1 -1
  95. package/dist/lib/args.d.ts +1 -0
  96. package/dist/lib/args.d.ts.map +1 -1
  97. package/dist/lib/args.js +3 -0
  98. package/dist/lib/args.js.map +1 -1
  99. package/dist/lib/output.d.ts +5 -0
  100. package/dist/lib/output.d.ts.map +1 -0
  101. package/dist/lib/output.js +32 -0
  102. package/dist/lib/output.js.map +1 -0
  103. package/dist/lib/sdk.d.ts +10 -0
  104. package/dist/lib/sdk.d.ts.map +1 -0
  105. package/dist/lib/sdk.js +22 -0
  106. package/dist/lib/sdk.js.map +1 -0
  107. package/dist/utils/installation-setup.d.ts +15 -0
  108. package/dist/utils/installation-setup.d.ts.map +1 -1
  109. package/dist/utils/installation-setup.js +63 -0
  110. package/dist/utils/installation-setup.js.map +1 -1
  111. package/package.json +3 -18
  112. package/.claude/agents/TROUBLESHOOTING.md +0 -530
  113. package/.claude/agents/agent-backend.md +0 -574
  114. package/.claude/agents/agent-builder.md +0 -911
  115. package/.claude/agents/agent-claude.md +0 -645
  116. package/.claude/agents/agent-clean.md +0 -477
  117. package/.claude/agents/agent-clone.md +0 -554
  118. package/.claude/agents/agent-designer.md +0 -1080
  119. package/.claude/agents/agent-director.md +0 -2254
  120. package/.claude/agents/agent-documenter.md +0 -688
  121. package/.claude/agents/agent-frontend.md +0 -1199
  122. package/.claude/agents/agent-integrator.md +0 -670
  123. package/.claude/agents/agent-lawyer.md +0 -1320
  124. package/.claude/agents/agent-news.md +0 -363
  125. package/.claude/agents/agent-onboard.md +0 -613
  126. package/.claude/agents/agent-ontology.md +0 -585
  127. package/.claude/agents/agent-ops.md +0 -1275
  128. package/.claude/agents/agent-problem-solver.md +0 -669
  129. package/.claude/agents/agent-quality.md +0 -1042
  130. package/.claude/agents/agent-sales.md +0 -507
  131. package/.claude/agents/agent-writer.md +0 -1068
  132. package/.claude/commands/cascade.md +0 -742
  133. package/.claude/commands/chat.md +0 -728
  134. package/.claude/commands/commit.md +0 -95
  135. package/.claude/commands/create.md +0 -544
  136. package/.claude/commands/deploy.md +0 -309
  137. package/.claude/commands/fast.md +0 -636
  138. package/.claude/commands/mcp-on.md +0 -191
  139. package/.claude/commands/media-upload.md +0 -186
  140. package/.claude/commands/news.md +0 -274
  141. package/.claude/commands/onboard.md +0 -440
  142. package/.claude/commands/one.md +0 -398
  143. package/.claude/commands/optimize.md +0 -74
  144. package/.claude/commands/plan.md +0 -719
  145. package/.claude/commands/push.md +0 -214
  146. package/.claude/commands/release.md +0 -105
  147. package/.claude/commands/review.md +0 -99
  148. package/.claude/commands/server.md +0 -487
  149. package/.claude/commands/start.md +0 -227
  150. package/.claude/commands/test.md +0 -197
  151. package/.claude/commands/validate.md +0 -140
  152. package/.claude/hooks/.last-news-context +0 -1
  153. package/.claude/hooks/PULL-BEFORE-PUSH-GUIDE.md +0 -473
  154. package/.claude/hooks/README-knowledge-hooks.md +0 -451
  155. package/.claude/hooks/README-news-generation.md +0 -364
  156. package/.claude/hooks/README-root-cleanup.md +0 -200
  157. package/.claude/hooks/README.md +0 -284
  158. package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
  159. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  160. package/.claude/hooks/auto-format.sh +0 -106
  161. package/.claude/hooks/check-filenames.py +0 -177
  162. package/.claude/hooks/clean-post.py +0 -468
  163. package/.claude/hooks/clean-pre.py +0 -393
  164. package/.claude/hooks/clean-root-markdown.sh +0 -73
  165. package/.claude/hooks/commit-push.sh +0 -95
  166. package/.claude/hooks/done.py +0 -236
  167. package/.claude/hooks/format-hook.sh +0 -163
  168. package/.claude/hooks/formatting.py +0 -187
  169. package/.claude/hooks/hook-logger.sh +0 -173
  170. package/.claude/hooks/knowledge-post.py +0 -355
  171. package/.claude/hooks/knowledge-pre.py +0 -245
  172. package/.claude/hooks/mcp-on.sh +0 -134
  173. package/.claude/hooks/notification-hook.sh +0 -279
  174. package/.claude/hooks/ontology-validation.py +0 -255
  175. package/.claude/hooks/push.sh +0 -153
  176. package/.claude/hooks/release-cli.sh +0 -205
  177. package/.claude/hooks/root-cleanup.py +0 -217
  178. package/.claude/hooks/security-hook.sh +0 -397
  179. package/.claude/hooks/tag-all-docs.py +0 -464
  180. package/.claude/hooks/test-validate-ontology.sh +0 -170
  181. package/.claude/hooks/todo.py +0 -368
  182. package/.claude/hooks/track-changes.sh +0 -101
  183. package/.claude/hooks/validate-imports.py +0 -182
  184. package/.claude/hooks/validate-ontology-structure-summary.md +0 -243
  185. package/.claude/hooks/validate-ontology-structure.py +0 -558
  186. package/.claude/hooks/validate-ontology-structure.py.backup +0 -518
  187. package/.claude/hooks/validate-ontology.py +0 -140
  188. package/.claude/hooks/write-news.sh +0 -194
  189. package/.claude/skills/INDEX.md +0 -523
  190. package/.claude/skills/REGISTRY.md +0 -529
  191. package/.claude/skills/agent-backend-create-mutation.md +0 -319
  192. package/.claude/skills/agent-designer-create-wireframe.md +0 -341
  193. package/.claude/skills/agent-frontend-create-page.md +0 -413
  194. package/.claude/skills/agents/README.md +0 -238
  195. package/.claude/skills/astro/add-content-collection.md +0 -30
  196. package/.claude/skills/astro/check-build.md +0 -29
  197. package/.claude/skills/astro/create-component.md +0 -29
  198. package/.claude/skills/astro/create-page.md +0 -30
  199. package/.claude/skills/astro/optimize-performance.md +0 -21
  200. package/.claude/skills/convex/check-deployment.md +0 -46
  201. package/.claude/skills/convex/create-mutation.md +0 -405
  202. package/.claude/skills/convex/create-query.md +0 -52
  203. package/.claude/skills/convex/read-schema.md +0 -373
  204. package/.claude/skills/convex/test-function.md +0 -50
  205. package/.claude/skills/deployment/check-deployment-health.md +0 -20
  206. package/.claude/skills/deployment/create-release.md +0 -21
  207. package/.claude/skills/deployment/deploy-cloudflare.md +0 -31
  208. package/.claude/skills/deployment/deploy-convex.md +0 -30
  209. package/.claude/skills/deployment/sync-repositories.md +0 -19
  210. package/.claude/skills/design/check-accessibility.md +0 -21
  211. package/.claude/skills/design/create-component-spec.md +0 -27
  212. package/.claude/skills/design/generate-design-tokens.md +0 -24
  213. package/.claude/skills/design/generate-wireframe.md +0 -30
  214. package/.claude/skills/documentation/create-migration-guide.md +0 -20
  215. package/.claude/skills/documentation/generate-api-docs.md +0 -27
  216. package/.claude/skills/documentation/generate-readme.md +0 -22
  217. package/.claude/skills/documentation/update-knowledge.md +0 -20
  218. package/.claude/skills/integration/connect-external-system.md +0 -21
  219. package/.claude/skills/integration/implement-a2a.md +0 -20
  220. package/.claude/skills/integration/implement-acp.md +0 -20
  221. package/.claude/skills/integration/verify-integration.md +0 -20
  222. package/.claude/skills/ontology/README.md +0 -255
  223. package/.claude/skills/ontology/check-dimension.md +0 -307
  224. package/.claude/skills/ontology/generate-entity-type.md +0 -339
  225. package/.claude/skills/ontology/validate-schema.md +0 -229
  226. package/.claude/skills/ontology/verify-relationships.md +0 -310
  227. package/.claude/skills/problem-solving/analyze-test-failure.md +0 -21
  228. package/.claude/skills/problem-solving/identify-root-cause.md +0 -20
  229. package/.claude/skills/problem-solving/propose-solution.md +0 -29
  230. package/.claude/skills/problem-solving/verify-fix.md +0 -21
  231. package/.claude/skills/sales/generate-demo-script.md +0 -21
  232. package/.claude/skills/sales/qualify-lead.md +0 -30
  233. package/.claude/skills/sales/track-trial.md +0 -20
  234. package/.claude/skills/sales/verify-kyc.md +0 -20
  235. package/.claude/skills/testing/analyze-coverage.md +0 -24
  236. package/.claude/skills/testing/generate-tests.md +0 -24
  237. package/.claude/skills/testing/run-tests.md +0 -27
  238. package/.claude/skills/testing/validate-e2e.md +0 -25
  239. package/AGENTS.md +0 -60
  240. package/CLAUDE.md +0 -130
  241. package/CREATE-WEBSITE.md +0 -458
  242. package/SECURITY.md +0 -31
  243. package/folders.yaml +0 -92
  244. package/one/README.md +0 -760
  245. package/one/actors/anthony-o-connell.md +0 -469
  246. package/one/actors/people.md +0 -590
  247. package/one/events/0-changes.md +0 -2764
  248. package/one/events/1-PROJECTS-START-HERE.md +0 -384
  249. package/one/events/1-projects-developer-quickstart.md +0 -620
  250. package/one/events/1-projects-feature.md +0 -2047
  251. package/one/events/1-projects-team-briefing.md +0 -583
  252. package/one/events/2024-10-14-deployment-plan.md +0 -330
  253. package/one/events/2024-10-14-deployment-success.md +0 -447
  254. package/one/events/2024-10-14-final-sync-complete.md +0 -250
  255. package/one/events/2024-10-14-release-v2.0.6.md +0 -414
  256. package/one/events/2024-10-15-agent-clean-v2-summary.md +0 -495
  257. package/one/events/2024-10-15-handoff-to-clean.md +0 -347
  258. package/one/events/2024-10-15-package-manager-tests.md +0 -442
  259. package/one/events/2024-10-15-release-command-complete.md +0 -416
  260. package/one/events/2025-10-15-private-files-secured.md +0 -359
  261. package/one/events/2025-10-15-unignore-public-group-docs.md +0 -298
  262. package/one/events/2025-11-08-backend-claude-refactor.md +0 -242
  263. package/one/events/2025-11-08-parallel-agent-implementation.md +0 -620
  264. package/one/events/2025-11-10-ai-integration-status-report.md +0 -241
  265. package/one/events/ACCESSIBILITY_CHECKLIST.md +0 -275
  266. package/one/events/ACCESSIBILITY_FIXES_SUMMARY.md +0 -293
  267. package/one/events/ALIGNMENT_REPORT_PROBLEM_SOLVER.md +0 -335
  268. package/one/events/ALIGNMENT_SUMMARY.md +0 -280
  269. package/one/events/API_ROUTES_FIXES_SUMMARY.md +0 -280
  270. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +0 -654
  271. package/one/events/AUDIT-ONTOLOGY-ALIGNMENT.md +0 -598
  272. package/one/events/AUDIT_PLAN_COMPLETION-20251108-125555.md +0 -262
  273. package/one/events/BEFORE_AFTER_COMPARISON.md +0 -978
  274. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +0 -372
  275. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +0 -430
  276. package/one/events/CHARTS-READY-TO-USE-20251106-080939.md +0 -184
  277. package/one/events/CHARTS-SUMMARY-20251106-080938.md +0 -196
  278. package/one/events/CLAUDE copy.md +0 -897
  279. package/one/events/CLEANUP-RELEASE-V2.0.8.md +0 -308
  280. package/one/events/CLOUDFLARE-FS-FIX-20251106-100516.md +0 -75
  281. package/one/events/COMPONENT_SHOWCASE-20251106-080938.md +0 -629
  282. package/one/events/CONNECTIONS_DEMO.md +0 -519
  283. package/one/events/CREATE-WEBSITE.md +0 -460
  284. package/one/events/CRITICAL-FIXES-COMPLETE.md +0 -571
  285. package/one/events/CUSTOM-DOMAIN.md +0 -375
  286. package/one/events/DELIVERABLES.md +0 -450
  287. package/one/events/DELIVERABLES.txt +0 -273
  288. package/one/events/DEMO-GROUPS-PAGE.md +0 -410
  289. package/one/events/DEMO-TESTING-SUMMARY.md +0 -536
  290. package/one/events/DEMO_COMPONENTS.md +0 -505
  291. package/one/events/DEMO_HOOKS_INDEX.md +0 -352
  292. package/one/events/DEMO_INFRASTRUCTURE.md +0 -923
  293. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +0 -588
  294. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +0 -449
  295. package/one/events/DEMO_QUICK_REFERENCE.md +0 -459
  296. package/one/events/DEMO_SETUP.md +0 -494
  297. package/one/events/DEPLOYMENT copy.md +0 -444
  298. package/one/events/DEPLOYMENT.md +0 -196
  299. package/one/events/DESIGN-DELIVERABLES-20251106-080938.md +0 -557
  300. package/one/events/DESIGN-EXECUTIVE-SUMMARY-20251106-080938.md +0 -484
  301. package/one/events/DOCS-SYSTEM-GUIDE-20251105-142103.md +0 -458
  302. package/one/events/DOCUMENTER-DELIVERY-SUMMARY.md +0 -481
  303. package/one/events/DOCUMENTER-EXECUTION-GUIDE.md +0 -394
  304. package/one/events/DOCUMENTER-TASK-BREAKDOWN.md +0 -783
  305. package/one/events/ECOMMERCE-BEFORE-AFTER.md +0 -267
  306. package/one/events/ECOMMERCE-DEMO-PLAN.md +0 -243
  307. package/one/events/ECOMMERCE-ENHANCEMENTS.md +0 -594
  308. package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +0 -439
  309. package/one/events/ECOMMERCE-LIVE-DEMO.md +0 -381
  310. package/one/events/ECOMMERCE-QUICKSTART.md +0 -376
  311. package/one/events/ECOMMERCE-README.md +0 -354
  312. package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +0 -214
  313. package/one/events/ECOMMERCE-SETUP-SUMMARY.md +0 -414
  314. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +0 -753
  315. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +0 -941
  316. package/one/events/EFFECT_TS_API_PATTERN.md +0 -496
  317. package/one/events/EXECUTION-READY.md +0 -359
  318. package/one/events/EXECUTION-SUMMARY.md +0 -478
  319. package/one/events/FEATURE-2-4-COMPLETE.md +0 -320
  320. package/one/events/FEATURE_2_3_COMPLETE.md +0 -593
  321. package/one/events/FILE-REFERENCE-20251105-142103.md +0 -325
  322. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +0 -241
  323. package/one/events/GROUPS-MIGRATION.md +0 -643
  324. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +0 -432
  325. package/one/events/HANDOFF.md +0 -331
  326. package/one/events/HOOKS-DEMO.md +0 -459
  327. package/one/events/IMPLEMENTATION-CHECKLIST-20251105-142103.md +0 -274
  328. package/one/events/IMPLEMENTATION-REPORT-DOCS-20251105-142102.md +0 -394
  329. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +0 -568
  330. package/one/events/IMPLEMENTATION_SUMMARY-20251106-080938.md +0 -571
  331. package/one/events/IMPLEMENTATION_SUMMARY.md +0 -547
  332. package/one/events/INDEX-ALL-AGENTS.md +0 -190
  333. package/one/events/INDEX-FRONTEND-TESTING.md +0 -524
  334. package/one/events/INDEX-PROBLEM-SOLVER.md +0 -488
  335. package/one/events/INDEX-QUALITY-AGENT-INFER65.md +0 -455
  336. package/one/events/INDEX.md +0 -295
  337. package/one/events/INDEX_QUICK_START_REDESIGN-20251106-080939.md +0 -342
  338. package/one/events/INSTALL-TESTS.md +0 -311
  339. package/one/events/INSTALLATION_FOLDERS.md +0 -534
  340. package/one/events/INSTALLATION_FOLDERS_FILES.md +0 -223
  341. package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +0 -437
  342. package/one/events/INTEGRATION-ARCHITECTURE.md +0 -579
  343. package/one/events/INTEGRATION-CHECKLIST.md +0 -1252
  344. package/one/events/INTEGRATION-ORCHESTRATION.md +0 -2641
  345. package/one/events/INTEGRATION-SUMMARY.md +0 -671
  346. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +0 -684
  347. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +0 -660
  348. package/one/events/LANDING-PAGE-QUICKSTART.md +0 -425
  349. package/one/events/LICENSE.md +0 -107
  350. package/one/events/MASTER-COORDINATION-PLAN.md +0 -613
  351. package/one/events/MASTER-ORCHESTRATION-INFER65.md +0 -441
  352. package/one/events/MASTER-PLAN-SUMMARY.md +0 -309
  353. package/one/events/MCP-CONFIGURATION.md +0 -354
  354. package/one/events/MCP-SETUP-COMPLETE.md +0 -223
  355. package/one/events/MIGRATION-REPORT.md +0 -453
  356. package/one/events/MIGRATION.md +0 -87
  357. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +0 -1663
  358. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +0 -643
  359. package/one/events/NEWS-COMMANDS.md +0 -506
  360. package/one/events/NEWS-SYSTEM-SUMMARY.md +0 -480
  361. package/one/events/NODE-UPGRADE.md +0 -129
  362. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +0 -416
  363. package/one/events/ONTOLOGY-HOOKS-README.md +0 -718
  364. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +0 -383
  365. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +0 -569
  366. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +0 -491
  367. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +0 -504
  368. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +0 -221
  369. package/one/events/PACKAGE-STRUCTURE.md +0 -328
  370. package/one/events/PLAN-COMPLETE.md +0 -429
  371. package/one/events/PLAYBOOK-SETUP-SUMMARY.md +0 -349
  372. package/one/events/PROBLEM-SOLVER-EXECUTIVE-SUMMARY.md +0 -484
  373. package/one/events/PROBLEM-SOLVER-QUICKSTART.md +0 -420
  374. package/one/events/PROJECTS-PLAN-SUMMARY.md +0 -480
  375. package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +0 -585
  376. package/one/events/QA-CHECKLIST.md +0 -692
  377. package/one/events/QUALITY-AGENT-SUMMARY.md +0 -334
  378. package/one/events/QUALITY-EXECUTION-CHECKLIST.md +0 -593
  379. package/one/events/QUICK-REFERENCE-FRONTEND-TESTING.md +0 -475
  380. package/one/events/QUICK-START-ONTOLOGY.md +0 -426
  381. package/one/events/QUICK_START_REDESIGN-20251106-080938.md +0 -400
  382. package/one/events/README-PROBLEM-SOLVER.md +0 -394
  383. package/one/events/README-archived.md +0 -537
  384. package/one/events/README_QUICK_START_REDESIGN-20251106-080938.md +0 -484
  385. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +0 -657
  386. package/one/events/SEARCH_DEMO_DELIVERY.md +0 -433
  387. package/one/events/SEARCH_DEMO_SUMMARY.md +0 -321
  388. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +0 -399
  389. package/one/events/SECURITY-AUDIT-FIXES.md +0 -394
  390. package/one/events/SECURITY-SCAN-COMPLETE.md +0 -299
  391. package/one/events/SHOP-BUILD-STATUS.md +0 -132
  392. package/one/events/SHOP-PREMIUM-UPDATE.md +0 -165
  393. package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +0 -280
  394. package/one/events/SITE-WIDE-GRADIENT-FIX.md +0 -317
  395. package/one/events/SPECIALIST-QUICK-REFERENCE.md +0 -678
  396. package/one/events/STORE-PRODUCTION-READY-STATUS.md +0 -377
  397. package/one/events/STRIPE-INTEGRATION.md +0 -432
  398. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +0 -447
  399. package/one/events/STRIPE-SETUP-GUIDE.md +0 -480
  400. package/one/events/TEST-PLAN-INDEX.md +0 -364
  401. package/one/events/TEST-PLAN.md +0 -1435
  402. package/one/events/TEST-SUMMARY.md +0 -411
  403. package/one/events/TESTING-DELIVERY.txt +0 -372
  404. package/one/events/TESTS-QUICK-REF.md +0 -280
  405. package/one/events/TRANSITIONS-QUICK-START.md +0 -159
  406. package/one/events/TRANSPARENCY-FIXES.md +0 -293
  407. package/one/events/TYPESCRIPT_FIXES.md +0 -170
  408. package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +0 -412
  409. package/one/events/TYPESCRIPT_FIXES_INDEX.md +0 -359
  410. package/one/events/VERIFICATION_CHECKLIST-20251106-080938.md +0 -326
  411. package/one/events/VIEW-TRANSITIONS.md +0 -446
  412. package/one/events/agent-command-implementation.md +0 -305
  413. package/one/events/agent-director-enhancement-summary.md +0 -404
  414. package/one/events/agent-director-routing-update.md +0 -214
  415. package/one/events/agent-onboard-implementation-summary.md +0 -475
  416. package/one/events/agent-ontology-alignment-completion.md +0 -263
  417. package/one/events/ai-integration-complete.md +0 -294
  418. package/one/events/ai-integration-lessons-learned.md +0 -511
  419. package/one/events/backend-integration-tests.md +0 -624
  420. package/one/events/backend-structure-diagram.txt +0 -393
  421. package/one/events/backend-structure-summary.txt +0 -269
  422. package/one/events/bullfm-video-podcast-analysis.md +0 -319
  423. package/one/events/clean-agent-ontology-cleanup-report.md +0 -371
  424. package/one/events/clean-agent-todo-analysis-summary.md +0 -336
  425. package/one/events/cloudflare-automation-complete.md +0 -350
  426. package/one/events/cloudflare-pages-infrastructure-setup.md +0 -282
  427. package/one/events/contact-page-complete.md +0 -316
  428. package/one/events/convex-analysis-index.md +0 -322
  429. package/one/events/convex-structure-analysis.md +0 -718
  430. package/one/events/creation-instructions-9-todos.md +0 -906
  431. package/one/events/cycle-3-video-player-port-20251108.md +0 -368
  432. package/one/events/cycle-3-video-player-port-complete-20251108.md +0 -334
  433. package/one/events/deployment-installation-folders.md +0 -178
  434. package/one/events/deployment-ops-summary.md +0 -386
  435. package/one/events/deployment-verification.md +0 -366
  436. package/one/events/design-spec-complete.md +0 -226
  437. package/one/events/documentation-audit-index.md +0 -473
  438. package/one/events/documentation-audit-summary.md +0 -417
  439. package/one/events/documentation-improvement-roadmap.md +0 -906
  440. package/one/events/documentation-standards-compliance-report.md +0 -538
  441. package/one/events/documentation-updates.md +0 -370
  442. package/one/events/events.md +0 -563
  443. package/one/events/fix-product-hydration-20251106.md +0 -211
  444. package/one/events/frontend-effects-complete.md +0 -584
  445. package/one/events/frontend-effects-orchestration.md +0 -1356
  446. package/one/events/frontend-effects-risk-register.md +0 -1055
  447. package/one/events/frontend-effects-week1-assignments.md +0 -1594
  448. package/one/events/hook-ontology-alignment-summary.md +0 -528
  449. package/one/events/installation-folders-workflow-integration.md +0 -458
  450. package/one/events/landing-page-generator.md +0 -476
  451. package/one/events/legal-assessment-2025-10-16.md +0 -1917
  452. package/one/events/master-coordination-plan.json +0 -1078
  453. package/one/events/master-plan-9-todos.md +0 -900
  454. package/one/events/mobile-performance-optimization.md +0 -179
  455. package/one/events/onboarding-implementation-complete.md +0 -523
  456. package/one/events/ontology-audit-agent-clone.md +0 -323
  457. package/one/events/ontology-test-examples.md +0 -580
  458. package/one/events/phase1-backend-implementation-complete.md +0 -536
  459. package/one/events/plan-completion-audit.md +0 -707
  460. package/one/events/plan-files-updated.md +0 -273
  461. package/one/events/production-readiness-plan.md +0 -389
  462. package/one/events/readme.md +0 -100
  463. package/one/events/release.md +0 -272
  464. package/one/events/root-cleanup-alignment-report.md +0 -265
  465. package/one/events/security-fixes-2025-01-15.md +0 -226
  466. package/one/events/separate-implementation-status.md +0 -555
  467. package/one/events/server-command-optimization-20251108.md +0 -150
  468. package/one/events/session-summary-2025-10-18.md +0 -366
  469. package/one/events/skills-complete.md +0 -351
  470. package/one/events/skills-infer-6-10-summary.md +0 -70
  471. package/one/events/skills-phase1-complete.md +0 -281
  472. package/one/events/specialist-assignments.md +0 -766
  473. package/one/events/structural-analysis-architecture-vs-plans.md +0 -600
  474. package/one/events/test-dashboard.md +0 -363
  475. package/one/events/test-index.md +0 -421
  476. package/one/events/test-report-ontology.md +0 -611
  477. package/one/events/testing-summary.md +0 -388
  478. package/one/events/todo-agent-builder.md +0 -1180
  479. package/one/events/todo-agent-director.md +0 -164
  480. package/one/events/todo-agent-documenter.md +0 -1815
  481. package/one/events/todo-agent-frontend.md +0 -1542
  482. package/one/events/todo-agent-problem-solver.md +0 -1682
  483. package/one/events/todo-agent-quality.md +0 -1647
  484. package/one/events/todo-refactoring-complete.md +0 -408
  485. package/one/events/wave1-backend-implementation-complete.md +0 -698
  486. package/one/events/web-AI_INTEGRATION_PHASE2_SUMMARY-20251111-152540.md +0 -529
  487. package/one/events/web-BUY-IN-CHATGPT-README-20251116-235241.md +0 -491
  488. package/one/events/web-CHARTS-IMPLEMENTATION-20251106-080939.md +0 -576
  489. package/one/events/web-CHARTS-QUICKSTART-20251106-080939.md +0 -416
  490. package/one/events/web-CODE-HIGHLIGHTING-SUMMARY-20251111-152540.md +0 -442
  491. package/one/events/web-DEPLOYMENT_SUMMARY-20251116-005428.md +0 -290
  492. package/one/events/web-DESIGN-SUMMARY-20251106-080939.md +0 -514
  493. package/one/events/web-README-AI-INTEGRATION-20251111-152540.md +0 -196
  494. package/one/events/web-RECHARTS-INTEGRATION-20251111-152540.md +0 -265
  495. package/one/events/web-RELEASE_OPTIMIZATION_PLAN-20251116-005428.md +0 -447
  496. package/one/events/web-TEST-CLEANUP-20251105-143205.md +0 -3
  497. package/one/events/web-USING-ANY-COMPONENT-IN-CHAT-20251111-152540.md +0 -561
  498. package/one/events/web-test-code-highlighting-20251111-152540.md +0 -231
  499. package/one/groups/features.md +0 -2904
  500. package/one/groups/groups.md +0 -587
  501. package/one/groups/one.md +0 -619
  502. package/one/groups/strategy-copy.md +0 -887
  503. package/one/learning/.obsidian/app.json +0 -1
  504. package/one/learning/.obsidian/appearance.json +0 -1
  505. package/one/learning/.obsidian/core-plugins.json +0 -33
  506. package/one/learning/.obsidian/ecommerce-ontology.md +0 -210
  507. package/one/learning/.obsidian/workspace.json +0 -211
  508. package/one/learning/100-inference-quick-reference.md +0 -449
  509. package/one/learning/ag-ui-protocol.md +0 -613
  510. package/one/learning/agent-onboard-usage.md +0 -630
  511. package/one/learning/agentic-commerce.md +0 -146
  512. package/one/learning/ai-agents-vs-memecoins-thesis.md +0 -683
  513. package/one/learning/ai-api-reference.md +0 -715
  514. package/one/learning/ai-platform.md +0 -323
  515. package/one/learning/ai-quickstart.md +0 -355
  516. package/one/learning/ai-sdk-implementation.md +0 -436
  517. package/one/learning/ai-token-crypto-analysis-framework.md +0 -1191
  518. package/one/learning/ai-token-paradigm-shift-2025.md +0 -732
  519. package/one/learning/altcoin-cycle-prediction-ontology.md +0 -884
  520. package/one/learning/altcoin-cycle-trading-strategy.md +0 -642
  521. package/one/learning/architecture-any-backend.md +0 -1589
  522. package/one/learning/architecture-diagram.md +0 -404
  523. package/one/learning/architecture-frontend.md +0 -1014
  524. package/one/learning/architecture.md +0 -1742
  525. package/one/learning/archived/ontology.old.md +0 -2840
  526. package/one/learning/astro-effect-complete-vision.md +0 -2148
  527. package/one/learning/astro-effect-simple-architecture.md +0 -750
  528. package/one/learning/audit-agent-onboard-alignment.md +0 -481
  529. package/one/learning/audit-agent-sales-alignment.md +0 -444
  530. package/one/learning/backend-api-reference.md +0 -728
  531. package/one/learning/cascading-context-specification.md +0 -1617
  532. package/one/learning/claude-code-integration.md +0 -1293
  533. package/one/learning/cli-claude-handoff.md +0 -736
  534. package/one/learning/context-engineering.md +0 -610
  535. package/one/learning/crypto-analysis-strategy.md +0 -1276
  536. package/one/learning/crypto-cycle-2024-2025-analysis.md +0 -44
  537. package/one/learning/crypto.md +0 -978
  538. package/one/learning/develop/design.md +0 -364
  539. package/one/learning/develop/index.md +0 -145
  540. package/one/learning/development-commands.md +0 -251
  541. package/one/learning/docs.md +0 -627
  542. package/one/learning/dsl.md +0 -1678
  543. package/one/learning/event-driven-documentation.md +0 -270
  544. package/one/learning/files.md +0 -2489
  545. package/one/learning/frontend.md +0 -1056
  546. package/one/learning/games-english.md +0 -691
  547. package/one/learning/games.md +0 -1082
  548. package/one/learning/generative-ui-patterns.md +0 -559
  549. package/one/learning/guidelines.md +0 -314
  550. package/one/learning/hono.md +0 -2127
  551. package/one/learning/implementation-examples.md +0 -2554
  552. package/one/learning/installation-folders.md +0 -366
  553. package/one/learning/institutional-cycle-paradigm-2025.md +0 -555
  554. package/one/learning/knowledge.md +0 -660
  555. package/one/learning/language.md +0 -998
  556. package/one/learning/lessons-learned.md +0 -378
  557. package/one/learning/lessons-website-building-focus.md +0 -382
  558. package/one/learning/merge-report.md +0 -254
  559. package/one/learning/metadata-system.md +0 -504
  560. package/one/learning/nine-padel-playbook.md +0 -229
  561. package/one/learning/one-protocol-ai-agents.md +0 -892
  562. package/one/learning/one-protocol-executive-report.md +0 -617
  563. package/one/learning/one-protocol-standard.md +0 -869
  564. package/one/learning/one-protocol-whitepaper.md +0 -756
  565. package/one/learning/ontology-blog.yaml +0 -47
  566. package/one/learning/ontology-cheatsheet.md +0 -617
  567. package/one/learning/ontology-community.yaml +0 -65
  568. package/one/learning/ontology-core-universal.md +0 -740
  569. package/one/learning/ontology-core.yaml +0 -63
  570. package/one/learning/ontology-courses.yaml +0 -76
  571. package/one/learning/ontology-creator.md +0 -402
  572. package/one/learning/ontology-crypto.md +0 -1603
  573. package/one/learning/ontology-developer-guide.md +0 -814
  574. package/one/learning/ontology-documentation.md +0 -377
  575. package/one/learning/ontology-ecommerce.md +0 -269
  576. package/one/learning/ontology-education-game.md +0 -1654
  577. package/one/learning/ontology-education.md +0 -938
  578. package/one/learning/ontology-engineering-specification.md +0 -1310
  579. package/one/learning/ontology-engineering.md +0 -1676
  580. package/one/learning/ontology-files.yaml +0 -525
  581. package/one/learning/ontology-frontend-master.md +0 -2898
  582. package/one/learning/ontology-frontend-specifications.md +0 -2196
  583. package/one/learning/ontology-frontend.md +0 -2475
  584. package/one/learning/ontology-index.md +0 -397
  585. package/one/learning/ontology-minimal.yaml +0 -301
  586. package/one/learning/ontology-portfolio.yaml +0 -45
  587. package/one/learning/ontology-quickstart.md +0 -602
  588. package/one/learning/ontology-release.md +0 -317
  589. package/one/learning/ontology-shop.yaml +0 -148
  590. package/one/learning/ontology-tokens.yaml +0 -51
  591. package/one/learning/ontology-tutorial.md +0 -455
  592. package/one/learning/ontology-v2.md +0 -4449
  593. package/one/learning/ontology-video-script.md +0 -939
  594. package/one/learning/ontology-visual-guide.md +0 -378
  595. package/one/learning/ontology.md +0 -3847
  596. package/one/learning/ontology.yaml +0 -1653
  597. package/one/learning/parallel-agents.md +0 -932
  598. package/one/learning/patterns/backend/convex-mutation-pattern.md +0 -130
  599. package/one/learning/patterns/backend/convex-query-pattern.md +0 -143
  600. package/one/learning/patterns/backend/mutation-template.md +0 -249
  601. package/one/learning/patterns/backend/query-template.md +0 -286
  602. package/one/learning/patterns/backend/service-template.md +0 -258
  603. package/one/learning/patterns/design/component-architecture.md +0 -435
  604. package/one/learning/patterns/design/index.md +0 -160
  605. package/one/learning/patterns/design/test-driven-design-pattern.md +0 -196
  606. package/one/learning/patterns/design/wireframe-template.md +0 -250
  607. package/one/learning/patterns/frontend/component-template.md +0 -246
  608. package/one/learning/patterns/frontend/form-template.md +0 -348
  609. package/one/learning/patterns/frontend/page-template.md +0 -209
  610. package/one/learning/patterns/frontend/react-component-pattern.md +0 -188
  611. package/one/learning/patterns/test/acceptance-criteria-template.md +0 -396
  612. package/one/learning/patterns/test/technical-test-template.md +0 -566
  613. package/one/learning/patterns/test/test-driven-pattern.md +0 -160
  614. package/one/learning/patterns/test/user-flow-template.md +0 -272
  615. package/one/learning/performance.md +0 -459
  616. package/one/learning/provider-agnostic-content.md +0 -995
  617. package/one/learning/provider-creation-guide.md +0 -1082
  618. package/one/learning/quality-loop.md +0 -419
  619. package/one/learning/quick-start-ontology-mapping.md +0 -773
  620. package/one/learning/readme-architecture.md +0 -158
  621. package/one/learning/readme.md +0 -149
  622. package/one/learning/rules.md +0 -644
  623. package/one/learning/score.md +0 -85
  624. package/one/learning/specifications.md +0 -873
  625. package/one/learning/tags.md +0 -148
  626. package/one/learning/todo-template.md +0 -269
  627. package/one/learning/todo.md +0 -269
  628. package/one/learning/troubleshooting.md +0 -434
  629. package/one/learning/typescript-patterns.md +0 -321
  630. package/one/learning/universal-generation-language.md +0 -827
  631. package/one/learning/x402-research.md +0 -104
  632. package/one/license.md +0 -107
  633. package/one/paths/a2a.md +0 -600
  634. package/one/paths/acp.md +0 -808
  635. package/one/paths/acps.md +0 -749
  636. package/one/paths/agentkit.md +0 -367
  637. package/one/paths/agui.md +0 -785
  638. package/one/paths/any-backend.md +0 -1720
  639. package/one/paths/ap2.md +0 -1072
  640. package/one/paths/api/queries-reference.md +0 -860
  641. package/one/paths/api-docs.md +0 -1909
  642. package/one/paths/api-reference.md +0 -1029
  643. package/one/paths/api.md +0 -2208
  644. package/one/paths/architecture-diagram.md +0 -112
  645. package/one/paths/communications.md +0 -467
  646. package/one/paths/connections.md +0 -357
  647. package/one/paths/copilotkit.md +0 -1577
  648. package/one/paths/cryptonetworks.md +0 -799
  649. package/one/paths/documentation.md +0 -1138
  650. package/one/paths/effect.md +0 -297
  651. package/one/paths/elizaos.md +0 -1308
  652. package/one/paths/groups.md +0 -814
  653. package/one/paths/inference.md +0 -76
  654. package/one/paths/integration-examples.md +0 -893
  655. package/one/paths/integration-guide.md +0 -887
  656. package/one/paths/integration-phase2.md +0 -754
  657. package/one/paths/kyc.md +0 -650
  658. package/one/paths/mcp.md +0 -860
  659. package/one/paths/membership.md +0 -1170
  660. package/one/paths/middleware.md +0 -1085
  661. package/one/paths/multitenant.md +0 -1359
  662. package/one/paths/n8n.md +0 -1033
  663. package/one/paths/patterns.md +0 -107
  664. package/one/paths/protocols.md +0 -297
  665. package/one/paths/relationships.md +0 -125
  666. package/one/paths/schema.md +0 -605
  667. package/one/paths/service-layer.md +0 -568
  668. package/one/paths/vectors.md +0 -225
  669. package/one/paths/wordpress.md +0 -1320
  670. package/one/paths/workflow-copy.md +0 -923
  671. package/one/paths/workflow-examples.md +0 -759
  672. package/one/paths/workflow-onboarding.md +0 -701
  673. package/one/paths/workflow.md +0 -923
  674. package/one/paths/workflows/delegation.md +0 -903
  675. package/one/paths/workflows/frontend.md +0 -1055
  676. package/one/paths/workflows/strategy.md +0 -921
  677. package/one/paths/workflows/tasks.md +0 -716
  678. package/one/paths/x402-baazar.md +0 -131
  679. package/one/paths/x402.md +0 -1353
  680. package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +0 -401
  681. package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +0 -588
  682. package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +0 -461
  683. package/one/things/CHECKLIST.md +0 -407
  684. package/one/things/IMPLEMENTATION_STATUS.md +0 -379
  685. package/one/things/ONE.md +0 -529
  686. package/one/things/agents/agent-backend.md +0 -1501
  687. package/one/things/agents/agent-builder.md +0 -1064
  688. package/one/things/agents/agent-clean.md +0 -1112
  689. package/one/things/agents/agent-clone.md +0 -1324
  690. package/one/things/agents/agent-deploy.md +0 -986
  691. package/one/things/agents/agent-designer.md +0 -2305
  692. package/one/things/agents/agent-director.md +0 -1526
  693. package/one/things/agents/agent-documenter.md +0 -1129
  694. package/one/things/agents/agent-frontend.md +0 -1201
  695. package/one/things/agents/agent-integrator.md +0 -1269
  696. package/one/things/agents/agent-lawyer.md +0 -1371
  697. package/one/things/agents/agent-problem-solver.md +0 -1457
  698. package/one/things/agents/agent-quality.md +0 -1483
  699. package/one/things/agents/agent-sales.md +0 -1074
  700. package/one/things/cascade/cascade.yaml +0 -481
  701. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +0 -523
  702. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +0 -314
  703. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +0 -562
  704. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +0 -543
  705. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +0 -272
  706. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +0 -548
  707. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +0 -586
  708. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +0 -267
  709. package/one/things/cascade/docs/examples/1-3-event-coordination.md +0 -547
  710. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +0 -665
  711. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +0 -236
  712. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +0 -652
  713. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +0 -860
  714. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +0 -255
  715. package/one/things/cascade/docs/examples/1-5-quality-loops.md +0 -725
  716. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +0 -659
  717. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +0 -256
  718. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +0 -639
  719. package/one/things/cascade/docs/examples/readme.md +0 -259
  720. package/one/things/cascade/docs/getting-started.md +0 -533
  721. package/one/things/cascade/docs/workflow.md +0 -1378
  722. package/one/things/cascade/readme.md +0 -379
  723. package/one/things/cascade/templates/feature-template.md +0 -289
  724. package/one/things/claude/agents/advocacy-activation-manager.md +0 -710
  725. package/one/things/claude/agents/advocacy-campaign-designer.md +0 -688
  726. package/one/things/claude/agents/analyst.md +0 -508
  727. package/one/things/claude/agents/architect.md +0 -505
  728. package/one/things/claude/agents/brand-identity-specialist.md +0 -538
  729. package/one/things/claude/agents/bstp-token-strategist.md +0 -690
  730. package/one/things/claude/agents/builder-repo.md +0 -532
  731. package/one/things/claude/agents/bullstamp-community-builder.md +0 -597
  732. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +0 -529
  733. package/one/things/claude/agents/bulltilt-platform-growth.md +0 -590
  734. package/one/things/claude/agents/company-bullstamp-character.md +0 -602
  735. package/one/things/claude/agents/company-bullstamp-community.md +0 -307
  736. package/one/things/claude/agents/company-bullstamp-marketing.md +0 -307
  737. package/one/things/claude/agents/company-bullstamp-token.md +0 -307
  738. package/one/things/claude/agents/company-bulltilt-growth.md +0 -307
  739. package/one/things/claude/agents/content-bibliography-formatter.md +0 -404
  740. package/one/things/claude/agents/content-calendar-planner.md +0 -473
  741. package/one/things/claude/agents/content-chapter-formatter.md +0 -513
  742. package/one/things/claude/agents/content-formatter.md +0 -571
  743. package/one/things/claude/agents/content-hook-specialist.md +0 -485
  744. package/one/things/claude/agents/content-image-formatter.md +0 -560
  745. package/one/things/claude/agents/content-introduction-formatter.md +0 -510
  746. package/one/things/claude/agents/content-multiplication-engine.md +0 -579
  747. package/one/things/claude/agents/content-playbook-writer.md +0 -473
  748. package/one/things/claude/agents/content-team-manager.md +0 -647
  749. package/one/things/claude/agents/content-toc-formatter.md +0 -547
  750. package/one/things/claude/agents/convex-backend-specialist.md +0 -2725
  751. package/one/things/claude/agents/core-manager.md +0 -607
  752. package/one/things/claude/agents/core-master.md +0 -426
  753. package/one/things/claude/agents/cross-functional-manager.md +0 -476
  754. package/one/things/claude/agents/crypto-airdrop-strategist.md +0 -622
  755. package/one/things/claude/agents/crypto-analytics-educator.md +0 -596
  756. package/one/things/claude/agents/crypto-architecture-specialist.md +0 -497
  757. package/one/things/claude/agents/crypto-community-analyst.md +0 -314
  758. package/one/things/claude/agents/crypto-community-psychologist.md +0 -546
  759. package/one/things/claude/agents/crypto-dex-optimization-expert.md +0 -579
  760. package/one/things/claude/agents/crypto-dex-optimizer.md +0 -307
  761. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +0 -552
  762. package/one/things/claude/agents/crypto-diamond-hands.md +0 -307
  763. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +0 -597
  764. package/one/things/claude/agents/crypto-engagement-specialist.md +0 -581
  765. package/one/things/claude/agents/crypto-market-researcher.md +0 -307
  766. package/one/things/claude/agents/crypto-marketing-orchestrator.md +0 -563
  767. package/one/things/claude/agents/crypto-network-effect-amplifier.md +0 -614
  768. package/one/things/claude/agents/crypto-optimization-analyst.md +0 -597
  769. package/one/things/claude/agents/crypto-strategic-synthesizer.md +0 -556
  770. package/one/things/claude/agents/crypto-team-manager.md +0 -392
  771. package/one/things/claude/agents/crypto-token-analyst.md +0 -319
  772. package/one/things/claude/agents/crypto-viral-content-creator.md +0 -549
  773. package/one/things/claude/agents/crypto-wallet-identification-expert.md +0 -527
  774. package/one/things/claude/agents/crypto-wallet-identifier.md +0 -307
  775. package/one/things/claude/agents/customer-journey-designer.md +0 -474
  776. package/one/things/claude/agents/customer-success-manager.md +0 -574
  777. package/one/things/claude/agents/dev.md +0 -406
  778. package/one/things/claude/agents/documenter.md +0 -548
  779. package/one/things/claude/agents/elevate-marketing-orchestrator.md +0 -403
  780. package/one/things/claude/agents/engagement-specialist.md +0 -502
  781. package/one/things/claude/agents/engineering-architect.md +0 -387
  782. package/one/things/claude/agents/engineering-business-analyst.md +0 -527
  783. package/one/things/claude/agents/engineering-developer.md +0 -386
  784. package/one/things/claude/agents/engineering-director.md +0 -322
  785. package/one/things/claude/agents/engineering-ingestor.md +0 -659
  786. package/one/things/claude/agents/engineering-product-manager.md +0 -525
  787. package/one/things/claude/agents/engineering-product-owner.md +0 -527
  788. package/one/things/claude/agents/engineering-project-coordinator.md +0 -525
  789. package/one/things/claude/agents/engineering-quality-assurance.md +0 -392
  790. package/one/things/claude/agents/engineering-team-manager.md +0 -515
  791. package/one/things/claude/agents/engineering-user-experience.md +0 -386
  792. package/one/things/claude/agents/framework-elevate-manager.md +0 -309
  793. package/one/things/claude/agents/improver.md +0 -805
  794. package/one/things/claude/agents/intelligence-team-manager.md +0 -390
  795. package/one/things/claude/agents/lead-capture-expert.md +0 -459
  796. package/one/things/claude/agents/lead-magnet-creator.md +0 -446
  797. package/one/things/claude/agents/market-research-analyst.md +0 -435
  798. package/one/things/claude/agents/marketing-brand-identity.md +0 -344
  799. package/one/things/claude/agents/marketing-content-hooks.md +0 -455
  800. package/one/things/claude/agents/marketing-content-multiplier.md +0 -331
  801. package/one/things/claude/agents/marketing-content-poster.md +0 -372
  802. package/one/things/claude/agents/marketing-customer-journey.md +0 -331
  803. package/one/things/claude/agents/marketing-director.md +0 -402
  804. package/one/things/claude/agents/marketing-engagement.md +0 -331
  805. package/one/things/claude/agents/marketing-lead-capture.md +0 -331
  806. package/one/things/claude/agents/marketing-lead-magnet.md +0 -331
  807. package/one/things/claude/agents/marketing-network-effects.md +0 -331
  808. package/one/things/claude/agents/marketing-nurture-campaigns.md +0 -331
  809. package/one/things/claude/agents/marketing-share-optimizer.md +0 -331
  810. package/one/things/claude/agents/marketing-team-manager.md +0 -451
  811. package/one/things/claude/agents/marketing-viral-growth.md +0 -232
  812. package/one/things/claude/agents/mission-commander.md +0 -378
  813. package/one/things/claude/agents/network-effect-analyst.md +0 -604
  814. package/one/things/claude/agents/nextjs-15-specialist.md +0 -1634
  815. package/one/things/claude/agents/npx.md +0 -946
  816. package/one/things/claude/agents/nurture-campaign-manager.md +0 -554
  817. package/one/things/claude/agents/one-master.md +0 -378
  818. package/one/things/claude/agents/one-orchestrator.md +0 -345
  819. package/one/things/claude/agents/one.md +0 -658
  820. package/one/things/claude/agents/playbook-generator.md +0 -526
  821. package/one/things/claude/agents/pm.md +0 -349
  822. package/one/things/claude/agents/po.md +0 -370
  823. package/one/things/claude/agents/qa.md +0 -361
  824. package/one/things/claude/agents/research-foundation-analyst.md +0 -324
  825. package/one/things/claude/agents/research-intelligence-gatherer.md +0 -435
  826. package/one/things/claude/agents/research-market-analyst.md +0 -324
  827. package/one/things/claude/agents/research-team-manager.md +0 -489
  828. package/one/things/claude/agents/sales-environment-optimizer.md +0 -519
  829. package/one/things/claude/agents/sales-team-manager.md +0 -407
  830. package/one/things/claude/agents/sales-upsell-strategist.md +0 -324
  831. package/one/things/claude/agents/service-advocacy-campaigns.md +0 -324
  832. package/one/things/claude/agents/service-advocacy-manager.md +0 -324
  833. package/one/things/claude/agents/service-success-manager.md +0 -324
  834. package/one/things/claude/agents/service-team-manager.md +0 -405
  835. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +0 -2357
  836. package/one/things/claude/agents/share-optimization-specialist.md +0 -576
  837. package/one/things/claude/agents/sm.md +0 -352
  838. package/one/things/claude/agents/story-teller.md +0 -498
  839. package/one/things/claude/agents/task-master.md +0 -621
  840. package/one/things/claude/agents/tauri-cross-platform-specialist.md +0 -1912
  841. package/one/things/claude/agents/tester.md +0 -595
  842. package/one/things/claude/agents/the-bull-character-manager.md +0 -603
  843. package/one/things/claude/agents/tools-playbook-generator.md +0 -492
  844. package/one/things/claude/agents/turbo-repo-builder.md +0 -346
  845. package/one/things/claude/agents/upsell-strategist.md +0 -503
  846. package/one/things/claude/agents/ux-expert.md +0 -360
  847. package/one/things/claude/agents/viral-growth-orchestrator.md +0 -520
  848. package/one/things/claude/claude-code-hooks-development.json +0 -21
  849. package/one/things/claude/claude-code-hooks-production.json +0 -21
  850. package/one/things/claude/claude-code-hooks.json +0 -25
  851. package/one/things/claude/commands/agent.md +0 -124
  852. package/one/things/claude/commands/cascade-status.md +0 -153
  853. package/one/things/claude/commands/ingest.md +0 -343
  854. package/one/things/claude/commands/ingestor.md +0 -158
  855. package/one/things/claude/commands/mission.md +0 -103
  856. package/one/things/claude/commands/npx.md +0 -156
  857. package/one/things/claude/commands/one.md +0 -486
  858. package/one/things/claude/commands/quality-check.md +0 -252
  859. package/one/things/claude/commands/smart-route.md +0 -261
  860. package/one/things/claude/commands/start.md +0 -139
  861. package/one/things/claude/commands/story.md +0 -103
  862. package/one/things/claude/commands/task.md +0 -193
  863. package/one/things/claude/hook-bypass.json +0 -32
  864. package/one/things/claude/hooks/agent-hook-config.json +0 -427
  865. package/one/things/claude/hooks/build-hook.sh +0 -156
  866. package/one/things/claude/hooks/cleanup-hook.sh +0 -201
  867. package/one/things/claude/hooks/file-organization-hook.sh +0 -80
  868. package/one/things/claude/hooks/format-hook.sh +0 -43
  869. package/one/things/claude/hooks/hook-bypass.sh +0 -293
  870. package/one/things/claude/hooks/hook-debouncer.sh +0 -62
  871. package/one/things/claude/hooks/hook-logger.sh +0 -89
  872. package/one/things/claude/hooks/lint-hook.sh +0 -140
  873. package/one/things/claude/hooks/notification-hook.sh +0 -204
  874. package/one/things/claude/hooks/ontology-validation-hook.sh +0 -86
  875. package/one/things/claude/hooks/performance-metrics.json +0 -25
  876. package/one/things/claude/hooks/security-hook.sh +0 -256
  877. package/one/things/claude/hooks/story-validation-hook-enhanced.sh +0 -210
  878. package/one/things/claude/hooks/story-validation-hook.sh +0 -145
  879. package/one/things/claude/hooks/test-hook.sh +0 -145
  880. package/one/things/claude/hooks/test-story-validation.sh +0 -170
  881. package/one/things/claude/settings-local.json +0 -86
  882. package/one/things/cli/cli-code.md +0 -677
  883. package/one/things/cli/cli-compiler-code.md +0 -677
  884. package/one/things/cli/cli.md +0 -871
  885. package/one/things/components/card-shadcn.md +0 -953
  886. package/one/things/components/card.md +0 -1041
  887. package/one/things/components.md +0 -1743
  888. package/one/things/componets.md +0 -19
  889. package/one/things/contracts/Move.toml +0 -12
  890. package/one/things/contracts/README.md +0 -288
  891. package/one/things/contracts/one.move +0 -762
  892. package/one/things/contracts/sdk.ts +0 -579
  893. package/one/things/creator-diagram.md +0 -184
  894. package/one/things/crypto/FEATURES.md +0 -78
  895. package/one/things/crypto/ONECORE.md +0 -62
  896. package/one/things/crypto/ONECOREFAQ.md +0 -22
  897. package/one/things/crypto/ONECOREHOW.md +0 -46
  898. package/one/things/crypto/ONEENTERPRISE.md +0 -64
  899. package/one/things/crypto/ONEENTERPRISEFAQ.md +0 -64
  900. package/one/things/crypto/ONEENTERPRISEHOW.md +0 -53
  901. package/one/things/crypto/ONEPRO.md +0 -60
  902. package/one/things/crypto/ONEPROFAQ.md +0 -22
  903. package/one/things/crypto/ONEPROHOW.md +0 -53
  904. package/one/things/crypto/READMEAGENCY.md +0 -64
  905. package/one/things/crypto/VSL.md +0 -45
  906. package/one/things/crypto/WebsiteCopy.md +0 -176
  907. package/one/things/demo-accessibility-animations.md +0 -1025
  908. package/one/things/demo-components.md +0 -1310
  909. package/one/things/demo-design-summary.md +0 -692
  910. package/one/things/demo-design-system.md +0 -973
  911. package/one/things/demo-page-layouts.md +0 -1016
  912. package/one/things/design-system.md +0 -832
  913. package/one/things/designs/accessibility-audit.md +0 -877
  914. package/one/things/designs/component-specifications.md +0 -855
  915. package/one/things/designs/design-overview.md +0 -377
  916. package/one/things/designs/design-tokens.md +0 -448
  917. package/one/things/designs/wireframes-dashboard.md +0 -710
  918. package/one/things/docs/api-requests.md +0 -987
  919. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +0 -485
  920. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +0 -465
  921. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +0 -425
  922. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +0 -451
  923. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +0 -536
  924. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +0 -650
  925. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +0 -473
  926. package/one/things/docs/ecommerce/QUICK-START.md +0 -405
  927. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +0 -567
  928. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +0 -271
  929. package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +0 -171
  930. package/one/things/docs/ecommerce/demo.astro +0 -309
  931. package/one/things/examples/children/lemonade-stand.md +0 -404
  932. package/one/things/examples/enterprise/crm-saas.md +0 -1444
  933. package/one/things/features/1-1-agent-prompts.md +0 -562
  934. package/one/things/features/1-2-yaml-orchestrator.md +0 -548
  935. package/one/things/features/1-3-event-coordination.md +0 -547
  936. package/one/things/features/1-4-knowledge-management.md +0 -652
  937. package/one/things/features/1-5-quality-loops.md +0 -725
  938. package/one/things/features/1-6-numbering-structure.md +0 -639
  939. package/one/things/features/2-1-dataprovider-interface.md +0 -2583
  940. package/one/things/features/2-2-config-system.md +0 -3242
  941. package/one/things/features/2-3-effectts-services.md +0 -1645
  942. package/one/things/features/2-4-react-hooks.md +0 -2136
  943. package/one/things/features/2-5-auth-migration.md +0 -2144
  944. package/one/things/features/2-6-dashboard-migration.md +0 -2084
  945. package/one/things/features/2-7-alternative-providers.md +0 -2578
  946. package/one/things/features/2-7-implementation-report.md +0 -724
  947. package/one/things/features/2-cli.md +0 -1720
  948. package/one/things/features/2-design.md +0 -1770
  949. package/one/things/features/2-tests.md +0 -576
  950. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +0 -576
  951. package/one/things/features/DECOUPLING.md +0 -290
  952. package/one/things/features/DEPLOYMENT.md +0 -470
  953. package/one/things/features/IMPLEMENTATION_SUMMARY.md +0 -362
  954. package/one/things/features/improve.md +0 -861
  955. package/one/things/features/remove-convex-deps.md +0 -63
  956. package/one/things/features/top-features.md +0 -87
  957. package/one/things/features/use-one-backend.md +0 -1217
  958. package/one/things/features-in-english.md +0 -200
  959. package/one/things/files.yaml +0 -721
  960. package/one/things/ideas/1-create-workflow.md +0 -207
  961. package/one/things/ideas/2-backend-agnostic-frontend.md +0 -439
  962. package/one/things/implementation/backend-guide.md +0 -457
  963. package/one/things/interface.md +0 -257
  964. package/one/things/landing-page-implementation.md +0 -455
  965. package/one/things/legal/README.md +0 -234
  966. package/one/things/legal/privacy-policy.md +0 -1227
  967. package/one/things/legal/terms-of-service.md +0 -1432
  968. package/one/things/master-workflow-plan.md +0 -806
  969. package/one/things/pay.one.ie.md +0 -53
  970. package/one/things/plans/0-in-sync.md +0 -136
  971. package/one/things/plans/0-timeline.md +0 -36
  972. package/one/things/plans/1-create-workflow.md +0 -732
  973. package/one/things/plans/QUICK-START-SIMPLIFICATION.md +0 -333
  974. package/one/things/plans/README-SIMPLIFICATION.md +0 -349
  975. package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +0 -16
  976. package/one/things/plans/SIMPLIFICATION-SUMMARY.md +0 -455
  977. package/one/things/plans/ai-elements-integration.md +0 -483
  978. package/one/things/plans/ai-elements.md +0 -1278
  979. package/one/things/plans/ai-integration-plan.md +0 -263
  980. package/one/things/plans/ai-integration.md +0 -996
  981. package/one/things/plans/ai-sdk.md +0 -798
  982. package/one/things/plans/ai-tools.md +0 -621
  983. package/one/things/plans/app.md +0 -832
  984. package/one/things/plans/architecture-summary.md +0 -312
  985. package/one/things/plans/async-ai-agents.md +0 -233
  986. package/one/things/plans/backend-agnostic-frontend.md +0 -390
  987. package/one/things/plans/backend-cleanup-quickstart.md +0 -380
  988. package/one/things/plans/backend-ontology-conformance.md +0 -475
  989. package/one/things/plans/backend-status.md +0 -599
  990. package/one/things/plans/backend-structure.md +0 -847
  991. package/one/things/plans/backend-target-structure.md +0 -482
  992. package/one/things/plans/backend.md +0 -1175
  993. package/one/things/plans/better-auth-any-backend-revised.md +0 -1103
  994. package/one/things/plans/better-auth-any-backend.md +0 -1896
  995. package/one/things/plans/better-auth-available-features.md +0 -273
  996. package/one/things/plans/big-plan.md +0 -52
  997. package/one/things/plans/cli-updates-required.md +0 -320
  998. package/one/things/plans/complete-step-by-step.md +0 -1409
  999. package/one/things/plans/components.md +0 -709
  1000. package/one/things/plans/convex-agents.md +0 -1034
  1001. package/one/things/plans/convex-better-auth.md +0 -1141
  1002. package/one/things/plans/convex-on-off.md +0 -407
  1003. package/one/things/plans/crypto-token-researcher.md +0 -629
  1004. package/one/things/plans/data-quality-metrics.md +0 -745
  1005. package/one/things/plans/deep-researcher-agent.md +0 -466
  1006. package/one/things/plans/deploy-to-cloudflare.md +0 -623
  1007. package/one/things/plans/deployment-architecture.md +0 -469
  1008. package/one/things/plans/desktop.md +0 -1139
  1009. package/one/things/plans/development-plan.md +0 -1283
  1010. package/one/things/plans/development-workflow-tldr.md +0 -207
  1011. package/one/things/plans/development-workflow.md +0 -959
  1012. package/one/things/plans/dsl-claude-code.md +0 -1011
  1013. package/one/things/plans/effect-components.md +0 -1743
  1014. package/one/things/plans/effect-patterns-reference.md +0 -2235
  1015. package/one/things/plans/effect.md +0 -1806
  1016. package/one/things/plans/email.md +0 -966
  1017. package/one/things/plans/enhance-auth.md +0 -1692
  1018. package/one/things/plans/execution-strategy.md +0 -1291
  1019. package/one/things/plans/existing-infrastructure.md +0 -712
  1020. package/one/things/plans/feature-based-sites.md +0 -894
  1021. package/one/things/plans/frontend-effects.md +0 -1276
  1022. package/one/things/plans/group-folder-multi-tenancy.md +0 -893
  1023. package/one/things/plans/improve-codebase.md +0 -1811
  1024. package/one/things/plans/install-components.md +0 -215
  1025. package/one/things/plans/integrate-frontend-and-backend.md +0 -603
  1026. package/one/things/plans/landing.md +0 -820
  1027. package/one/things/plans/layout.md +0 -249
  1028. package/one/things/plans/mail-backend.md +0 -1361
  1029. package/one/things/plans/mail.md +0 -2677
  1030. package/one/things/plans/mcp-clear-context-prompt.md +0 -81
  1031. package/one/things/plans/mcp-simple.md +0 -248
  1032. package/one/things/plans/multi-ontology-architecture.md +0 -885
  1033. package/one/things/plans/next-features.md +0 -114
  1034. package/one/things/plans/npx-agent-safety.md +0 -785
  1035. package/one/things/plans/npx-agent.md +0 -1089
  1036. package/one/things/plans/onboarding.md +0 -51
  1037. package/one/things/plans/one-protocol-and-payone-usage.md +0 -82
  1038. package/one/things/plans/one.md +0 -677
  1039. package/one/things/plans/ontology-6-dimensions.md +0 -2201
  1040. package/one/things/plans/ontology-compliance-audit.md +0 -342
  1041. package/one/things/plans/ontology-driven-strategy.md +0 -882
  1042. package/one/things/plans/ontology-refine.md +0 -586
  1043. package/one/things/plans/ontology-ui-approach.md +0 -375
  1044. package/one/things/plans/open-agent.md +0 -840
  1045. package/one/things/plans/performace.md +0 -122
  1046. package/one/things/plans/phase-1-foundation.md +0 -620
  1047. package/one/things/plans/phase-3-implementation.md +0 -1037
  1048. package/one/things/plans/plan-connect-to-api.md +0 -146
  1049. package/one/things/plans/quick-wins.md +0 -1428
  1050. package/one/things/plans/r2.md +0 -777
  1051. package/one/things/plans/readme-backend-cleanup.md +0 -402
  1052. package/one/things/plans/release.md +0 -507
  1053. package/one/things/plans/remove-backend-development-from-agents.md +0 -1331
  1054. package/one/things/plans/repos.md +0 -98
  1055. package/one/things/plans/separate-copy-2.md +0 -1349
  1056. package/one/things/plans/separate-copy-3.md +0 -2479
  1057. package/one/things/plans/separate-copy.md +0 -1349
  1058. package/one/things/plans/separate-demo.md +0 -864
  1059. package/one/things/plans/separate.md +0 -1999
  1060. package/one/things/plans/sequence.md +0 -2040
  1061. package/one/things/plans/shadcn-integration-summary.md +0 -510
  1062. package/one/things/plans/sidebar.md +0 -206
  1063. package/one/things/plans/skills.md +0 -709
  1064. package/one/things/plans/small-fixes.md +0 -23
  1065. package/one/things/plans/start-new.md +0 -764
  1066. package/one/things/plans/switch-off-auth.md +0 -42
  1067. package/one/things/plans/sync-checklist.md +0 -351
  1068. package/one/things/plans/test-backend-connection.md +0 -514
  1069. package/one/things/plans/unified-implementation-plan.md +0 -934
  1070. package/one/things/plans/update-demos.md +0 -581
  1071. package/one/things/plans/use-our-backend.md +0 -572
  1072. package/one/things/plans/video-backend.md +0 -638
  1073. package/one/things/plans/video-frontend.md +0 -490
  1074. package/one/things/plans/video-old-archived.md +0 -656
  1075. package/one/things/plans/wave1-onboarding-100-inferences.md +0 -1686
  1076. package/one/things/plans/wave1-onboarding-vision.md +0 -744
  1077. package/one/things/plans/wave1-orchestration-summary.md +0 -604
  1078. package/one/things/plans/wave1-specialist-assignments.md +0 -1413
  1079. package/one/things/plans/workflow-files.md +0 -1210
  1080. package/one/things/plans/workflow.md +0 -1378
  1081. package/one/things/plans-u.md +0 -905
  1082. package/one/things/products/Blockchain Products.md +0 -6278
  1083. package/one/things/products/cascade-landing-page.md +0 -841
  1084. package/one/things/products/cascade.md +0 -1568
  1085. package/one/things/products/context-engineering.md +0 -1488
  1086. package/one/things/products/onthology.md +0 -15
  1087. package/one/things/products/ontology-ui-shadcn.md +0 -1302
  1088. package/one/things/products/ontology-ui.md +0 -1429
  1089. package/one/things/products/ontology.md +0 -789
  1090. package/one/things/products/sdk.md +0 -573
  1091. package/one/things/promptkit.md +0 -930
  1092. package/one/things/repos/all-repos.md +0 -0
  1093. package/one/things/scripts-clean-mac.sh +0 -409
  1094. package/one/things/service-providers-new.md +0 -1052
  1095. package/one/things/service-providers.md +0 -1121
  1096. package/one/things/structure.md +0 -532
  1097. package/one/things/system.md +0 -618
  1098. package/one/things/templates.md +0 -294
  1099. package/one/things/tests/2-1-dataprovider-interface.md +0 -1216
  1100. package/one/things/tests/2-1-test-analysis.md +0 -544
  1101. package/one/things/things.md +0 -384
  1102. package/one/things/todo-acp-integration.md +0 -744
  1103. package/one/things/todo-ai.md +0 -933
  1104. package/one/things/todo-api.md +0 -1078
  1105. package/one/things/todo-assignment.md +0 -580
  1106. package/one/things/todo-buy-chatgpt.md +0 -1450
  1107. package/one/things/todo-components.md +0 -1683
  1108. package/one/things/todo-connections.md +0 -278
  1109. package/one/things/todo-ecommerce-frontend.md +0 -1313
  1110. package/one/things/todo-ecommerce.md +0 -569
  1111. package/one/things/todo-effects.md +0 -1075
  1112. package/one/things/todo-frontend-effects.md +0 -977
  1113. package/one/things/todo-landing-page.md +0 -1091
  1114. package/one/things/todo-mail.md +0 -1160
  1115. package/one/things/todo-master-plan.md +0 -490
  1116. package/one/things/todo-onboard.md +0 -666
  1117. package/one/things/todo-one-ie.md +0 -538
  1118. package/one/things/todo-page.md +0 -606
  1119. package/one/things/todo-plans.md +0 -282
  1120. package/one/things/todo-projects.md +0 -241
  1121. package/one/things/todo-refactoring-plan.md +0 -366
  1122. package/one/things/todo-release.md +0 -654
  1123. package/one/things/todo-sequence.md +0 -1621
  1124. package/one/things/todo-use-our-backend.md +0 -1908
  1125. package/one/things/todo-workflow.md +0 -626
  1126. package/one/things/todo-x402.md +0 -2047
  1127. package/one/things/todo.md +0 -21
  1128. package/one/things/video/scripts-crypto.md +0 -835
  1129. package/one/things/video-script-backup.md +0 -318
  1130. package/one/things/video-script-demo.md +0 -382
  1131. package/one/things/video-script-ontology.md +0 -333
  1132. package/one/things/video-script.md +0 -361
@@ -1,2578 +0,0 @@
1
- ---
2
- title: 2 7 Alternative Providers
3
- dimension: things
4
- category: features
5
- tags: ai, architecture, backend, frontend, ontology
6
- related_dimensions: events, groups, knowledge, people
7
- scope: global
8
- created: 2025-11-03
9
- updated: 2025-11-03
10
- version: 1.0.0
11
- ai_context: |
12
- This document is part of the things dimension in the features category.
13
- Location: one/things/features/2-7-alternative-providers.md
14
- Purpose: Documents feature 2-7: alternative providers (wordpress + notion)
15
- Related dimensions: events, groups, knowledge, people
16
- For AI agents: Read this to understand 2 7 alternative providers.
17
- ---
18
-
19
- # Feature 2-7: Alternative Providers (WordPress + Notion)
20
-
21
- **Feature ID:** `feature_2_7_alternative_providers`
22
- **Plan:** `plan_2_backend_agnostic_frontend`
23
- **Owner:** Integration Specialist
24
- **Status:** Detailed Specification Complete
25
- **Priority:** P2 (Strategic - Proves Flexibility)
26
- **Effort:** 2 weeks
27
- **Dependencies:** Feature 2-6 (Dashboard Migration Complete)
28
-
29
- ---
30
-
31
- ## Executive Summary
32
-
33
- This feature implements **WordPressProvider** and **NotionProvider** to prove the backend-agnostic architecture works. Organizations can choose their data backend independently, with full 6-dimension ontology support. Also includes **CompositeProvider** for multi-backend routing within a single organization.
34
-
35
- **Strategic Value:** Demonstrates ONE Platform's flexibility and enables organizations to leverage existing infrastructure (WordPress, Notion) while gaining ONE's AI capabilities.
36
-
37
- **Key Deliverables:**
38
-
39
- 1. Complete WordPressProvider implementation (REST API + ACF)
40
- 2. Complete NotionProvider implementation (Notion API + webhooks)
41
- 3. CompositeProvider for multi-backend routing
42
- 4. Comprehensive test suite (50+ tests)
43
- 5. Provider creation guide for future backends
44
-
45
- ---
46
-
47
- ## Ontology Mapping (All 6 Dimensions)
48
-
49
- ### 1. Organizations (Multi-Tenant Isolation)
50
-
51
- **Challenge:** External systems (WordPress, Notion) don't have built-in multi-tenancy matching ONE's organization model.
52
-
53
- **Solution:**
54
-
55
- - Each organization gets its own WordPress site URL or Notion workspace
56
- - Provider configuration stored per-organization in ONE's organizations table
57
- - Provider acts as tenant-scoped wrapper around external API
58
-
59
- **Implementation:**
60
-
61
- ```typescript
62
- // organizations table stores provider config
63
- {
64
- _id: "org_123",
65
- name: "Acme Corp",
66
- plan: "pro",
67
- properties: {
68
- providerType: "wordpress",
69
- providerConfig: {
70
- url: "https://acme.wordpress.com",
71
- apiKey: encryptedApiKey,
72
- version: "6.4",
73
- customPostTypes: ["course", "lesson", "creator"]
74
- }
75
- }
76
- }
77
-
78
- // Provider registry isolates by org
79
- class ProviderRegistry {
80
- private providers = new Map<string, DataProvider>();
81
-
82
- register(orgId: string, provider: DataProvider) {
83
- this.providers.set(orgId, provider);
84
- }
85
-
86
- get(orgId: string): DataProvider {
87
- const provider = this.providers.get(orgId);
88
- if (!provider) throw new Error(`No provider for org ${orgId}`);
89
- return provider;
90
- }
91
- }
92
- ```
93
-
94
- **WordPress Multi-Tenancy:**
95
-
96
- - Option 1: WordPress Multisite (one WP install, multiple sites)
97
- - Option 2: Separate WP installs per organization
98
- - Option 3: Custom tenant field in all tables
99
-
100
- **Notion Multi-Tenancy:**
101
-
102
- - Option 1: Separate Notion workspaces per organization
103
- - Option 2: Single workspace with database-level isolation
104
- - Option 3: Custom "Organization" property on all pages
105
-
106
- ### 2. People (Authorization & Governance)
107
-
108
- **Challenge:** WordPress and Notion have different user/permission models than ONE's 4-role system.
109
-
110
- **WordPress User Mapping:**
111
- | ONE Role | WordPress Role | Capabilities |
112
- |----------|---------------|--------------|
113
- | `platform_owner` | Super Admin | All capabilities |
114
- | `org_owner` | Administrator | Manage site, users, content |
115
- | `org_user` | Editor | Create/edit content |
116
- | `customer` | Subscriber | Read-only access |
117
-
118
- **Notion User Mapping:**
119
- | ONE Role | Notion Permission | Access |
120
- |----------|------------------|--------|
121
- | `platform_owner` | Workspace Owner | Full access |
122
- | `org_owner` | Full Access | Edit all pages/databases |
123
- | `org_user` | Can Edit | Edit assigned pages |
124
- | `customer` | Can View | Read-only |
125
-
126
- **Implementation:**
127
-
128
- ```typescript
129
- class WordPressProvider implements DataProvider {
130
- people: PeopleOperations = {
131
- list: async (filter) => {
132
- // Get WordPress users
133
- const response = await this.api.get("/wp/v2/users");
134
- const wpUsers = await response.json();
135
-
136
- // Transform to ONE people (things with type: "creator")
137
- return wpUsers.map((user) => ({
138
- _id: this.wpIdToOneId("user", user.id),
139
- type: "creator",
140
- name: user.name,
141
- organizationId: this.config.organizationId,
142
- status: "active",
143
- properties: {
144
- role: this.mapWPRoleToONE(user.roles[0]),
145
- email: user.email,
146
- wpUserId: user.id,
147
- wpUsername: user.slug,
148
- avatar: user.avatar_urls?.["96"],
149
- registeredDate: user.registered_date,
150
- },
151
- createdAt: new Date(user.registered_date).getTime(),
152
- updatedAt: Date.now(),
153
- }));
154
- },
155
-
156
- create: async (args) => {
157
- // Transform ONE person to WP user
158
- const wpUser = {
159
- username: args.properties.email.split("@")[0],
160
- email: args.properties.email,
161
- password: this.generateSecurePassword(),
162
- roles: [this.mapONERoleToWP(args.properties.role)],
163
- first_name: args.properties.firstName,
164
- last_name: args.properties.lastName,
165
- };
166
-
167
- const response = await this.api.post("/wp/v2/users", wpUser);
168
- const created = await response.json();
169
-
170
- // Transform back to ONE person
171
- return this.transformWPUserToPerson(created);
172
- },
173
-
174
- update: async (id, updates) => {
175
- const wpId = this.oneIdToWpId(id);
176
-
177
- const wpUpdates: any = {};
178
- if (updates.name) {
179
- const [firstName, ...lastNameParts] = updates.name.split(" ");
180
- wpUpdates.first_name = firstName;
181
- wpUpdates.last_name = lastNameParts.join(" ");
182
- }
183
- if (updates.properties?.role) {
184
- wpUpdates.roles = [this.mapONERoleToWP(updates.properties.role)];
185
- }
186
-
187
- const response = await this.api.post(`/wp/v2/users/${wpId}`, wpUpdates);
188
- return this.transformWPUserToPerson(await response.json());
189
- },
190
-
191
- delete: async (id) => {
192
- const wpId = this.oneIdToWpId(id);
193
- await this.api.delete(`/wp/v2/users/${wpId}?force=true&reassign=1`);
194
- },
195
-
196
- get: async (id) => {
197
- const wpId = this.oneIdToWpId(id);
198
- const response = await this.api.get(`/wp/v2/users/${wpId}`);
199
- return this.transformWPUserToPerson(await response.json());
200
- },
201
- };
202
-
203
- private mapWPRoleToONE(wpRole: string): string {
204
- const mapping: Record<string, string> = {
205
- administrator: "org_owner",
206
- editor: "org_user",
207
- author: "org_user",
208
- contributor: "org_user",
209
- subscriber: "customer",
210
- };
211
- return mapping[wpRole] || "customer";
212
- }
213
-
214
- private mapONERoleToWP(oneRole: string): string {
215
- const mapping: Record<string, string> = {
216
- org_owner: "administrator",
217
- org_user: "editor",
218
- customer: "subscriber",
219
- };
220
- return mapping[oneRole] || "subscriber";
221
- }
222
- }
223
- ```
224
-
225
- ### 3. Things (Entity Integration)
226
-
227
- **WordPress Entity Mapping:**
228
-
229
- | ONE Thing Type | WordPress Equivalent | Implementation |
230
- | ---------------- | ------------------------------- | ---------------------------- |
231
- | `course` | Custom Post Type: `course` | ACF fields for properties |
232
- | `lesson` | Custom Post Type: `lesson` | ACF fields for properties |
233
- | `creator` | WP User | Via `/wp/v2/users` |
234
- | `token` | WooCommerce Product | Via WooCommerce REST API |
235
- | `certificate` | Custom Post Type: `certificate` | ACF fields for properties |
236
- | `quiz` | Custom Post Type: `quiz` | ACF fields for properties |
237
- | `external_agent` | Custom Post Type: `agent` | ACF fields for configuration |
238
-
239
- **Notion Entity Mapping:**
240
-
241
- | ONE Thing Type | Notion Equivalent | Implementation |
242
- | ---------------- | ------------------------ | -------------------------------------- |
243
- | `course` | Database: "Courses" | Properties: Name, Status, Description |
244
- | `lesson` | Database: "Lessons" | Properties: Name, Content, Duration |
245
- | `creator` | Database: "Users" | Properties: Name, Email, Role |
246
- | `token` | Database: "Tokens" | Properties: Symbol, Balance, Owner |
247
- | `certificate` | Database: "Certificates" | Properties: Recipient, Course, Date |
248
- | `quiz` | Database: "Quizzes" | Properties: Questions, Answers, Score |
249
- | `external_agent` | Database: "Agents" | Properties: Platform, Endpoint, Config |
250
-
251
- **Complete WordPressProvider Things Implementation:**
252
-
253
- ```typescript
254
- class WordPressProvider implements DataProvider {
255
- private api: WordPressAPI;
256
- private config: WordPressProviderConfig;
257
-
258
- constructor(config: WordPressProviderConfig) {
259
- this.config = config;
260
- this.api = new WordPressAPI(config.url, config.apiKey);
261
- }
262
-
263
- things: ThingOperations = {
264
- list: async (filter) => {
265
- const postType = this.mapOntologyTypeToWP(filter.type);
266
-
267
- // Build WordPress query parameters
268
- const params = new URLSearchParams({
269
- per_page: String(filter.limit || 10),
270
- page: String((filter.skip || 0) / (filter.limit || 10) + 1),
271
- });
272
-
273
- if (filter.status) {
274
- params.append("status", this.mapOntologyStatusToWP(filter.status));
275
- }
276
-
277
- if (filter.organizationId) {
278
- // Filter by organization using custom taxonomy
279
- params.append("org_id", filter.organizationId);
280
- }
281
-
282
- // Make API request
283
- const response = await this.api.get(
284
- `/wp/v2/${postType}?${params.toString()}`,
285
- );
286
- const wpPosts = await response.json();
287
-
288
- // Transform WordPress posts to ontology things
289
- return Promise.all(
290
- wpPosts.map((post: any) =>
291
- this.transformWPPostToThing(post, filter.type),
292
- ),
293
- );
294
- },
295
-
296
- create: async (args) => {
297
- const postType = this.mapOntologyTypeToWP(args.type);
298
-
299
- // Transform ontology thing to WordPress post
300
- const wpPost = {
301
- title: args.name,
302
- status: this.mapOntologyStatusToWP(args.status || "draft"),
303
- content: args.properties.content || "",
304
- excerpt: args.properties.excerpt || "",
305
- meta: {
306
- _one_thing_type: args.type,
307
- _one_organization_id: args.organizationId,
308
- ...this.transformPropertiesToACF(args.properties),
309
- },
310
- };
311
-
312
- // Create post in WordPress
313
- const response = await this.api.post(`/wp/v2/${postType}`, wpPost);
314
- const created = await response.json();
315
-
316
- // Transform back to ontology thing
317
- return this.transformWPPostToThing(created, args.type);
318
- },
319
-
320
- update: async (id, updates) => {
321
- const { wpId, postType } = this.parseOneId(id);
322
-
323
- const wpUpdates: any = {};
324
-
325
- if (updates.name) wpUpdates.title = updates.name;
326
- if (updates.status)
327
- wpUpdates.status = this.mapOntologyStatusToWP(updates.status);
328
- if (updates.properties) {
329
- wpUpdates.meta = this.transformPropertiesToACF(updates.properties);
330
- }
331
-
332
- const response = await this.api.post(
333
- `/wp/v2/${postType}/${wpId}`,
334
- wpUpdates,
335
- );
336
- const updated = await response.json();
337
-
338
- return this.transformWPPostToThing(updated, updates.type || postType);
339
- },
340
-
341
- delete: async (id) => {
342
- const { wpId, postType } = this.parseOneId(id);
343
- await this.api.delete(`/wp/v2/${postType}/${wpId}?force=true`);
344
- },
345
-
346
- get: async (id) => {
347
- const { wpId, postType } = this.parseOneId(id);
348
- const response = await this.api.get(`/wp/v2/${postType}/${wpId}`);
349
- const post = await response.json();
350
- return this.transformWPPostToThing(post, postType);
351
- },
352
- };
353
-
354
- // Transform WordPress post to ONE thing
355
- private async transformWPPostToThing(
356
- post: any,
357
- thingType: string,
358
- ): Promise<Thing> {
359
- // Get ACF fields
360
- const acfFields = await this.getACFFields(post.id);
361
-
362
- return {
363
- _id: this.wpIdToOneId(post.type, post.id),
364
- type: thingType,
365
- name: post.title.rendered || post.title,
366
- organizationId:
367
- post.meta._one_organization_id || this.config.organizationId,
368
- status: this.mapWPStatusToOntology(post.status),
369
- properties: {
370
- content: post.content?.rendered || post.content,
371
- excerpt: post.excerpt?.rendered || post.excerpt,
372
- slug: post.slug,
373
- wpPostId: post.id,
374
- wpPostType: post.type,
375
- author: post.author,
376
- featuredImage: post.featured_media,
377
- categories: post.categories,
378
- tags: post.tags,
379
- ...this.transformACFToProperties(acfFields),
380
- },
381
- createdAt: new Date(post.date_gmt).getTime(),
382
- updatedAt: new Date(post.modified_gmt).getTime(),
383
- };
384
- }
385
-
386
- // Map ontology types to WordPress post types
387
- private mapOntologyTypeToWP(type: string): string {
388
- const mapping: Record<string, string> = {
389
- course: "course",
390
- lesson: "lesson",
391
- creator: "user",
392
- quiz: "quiz",
393
- certificate: "certificate",
394
- token: "product", // WooCommerce
395
- external_agent: "agent",
396
- external_workflow: "workflow",
397
- external_connection: "connection",
398
- blog_post: "post",
399
- page: "page",
400
- };
401
- return mapping[type] || "post";
402
- }
403
-
404
- // Map WordPress post types to ontology types
405
- private mapWPTypeToOntology(wpType: string): string {
406
- const mapping: Record<string, string> = {
407
- course: "course",
408
- lesson: "lesson",
409
- user: "creator",
410
- quiz: "quiz",
411
- certificate: "certificate",
412
- product: "token",
413
- agent: "external_agent",
414
- workflow: "external_workflow",
415
- connection: "external_connection",
416
- post: "blog_post",
417
- page: "page",
418
- };
419
- return mapping[wpType] || "blog_post";
420
- }
421
-
422
- // Map ontology status to WordPress status
423
- private mapOntologyStatusToWP(status: string): string {
424
- const mapping: Record<string, string> = {
425
- draft: "draft",
426
- active: "publish",
427
- published: "publish",
428
- archived: "trash",
429
- pending: "pending",
430
- };
431
- return mapping[status] || "draft";
432
- }
433
-
434
- // Map WordPress status to ontology status
435
- private mapWPStatusToOntology(wpStatus: string): string {
436
- const mapping: Record<string, string> = {
437
- draft: "draft",
438
- publish: "active",
439
- pending: "pending",
440
- private: "active",
441
- trash: "archived",
442
- "auto-draft": "draft",
443
- };
444
- return mapping[wpStatus] || "draft";
445
- }
446
-
447
- // Transform ontology properties to ACF fields
448
- private transformPropertiesToACF(properties: any): Record<string, any> {
449
- const acfFields: Record<string, any> = {};
450
-
451
- // Map common fields
452
- if (properties.duration) acfFields.duration = properties.duration;
453
- if (properties.price) acfFields.price = properties.price;
454
- if (properties.currency) acfFields.currency = properties.currency;
455
- if (properties.difficulty) acfFields.difficulty = properties.difficulty;
456
- if (properties.videoUrl) acfFields.video_url = properties.videoUrl;
457
- if (properties.prerequisites) {
458
- acfFields.prerequisites = JSON.stringify(properties.prerequisites);
459
- }
460
-
461
- // Store full properties as JSON for unknown fields
462
- acfFields._one_properties = JSON.stringify(properties);
463
-
464
- return acfFields;
465
- }
466
-
467
- // Transform ACF fields to ontology properties
468
- private transformACFToProperties(acfFields: any): Record<string, any> {
469
- const properties: Record<string, any> = {};
470
-
471
- // Parse stored properties JSON
472
- if (acfFields._one_properties) {
473
- try {
474
- Object.assign(properties, JSON.parse(acfFields._one_properties));
475
- } catch (e) {
476
- // Ignore parse errors
477
- }
478
- }
479
-
480
- // Map known ACF fields
481
- if (acfFields.duration) properties.duration = acfFields.duration;
482
- if (acfFields.price) properties.price = acfFields.price;
483
- if (acfFields.currency) properties.currency = acfFields.currency;
484
- if (acfFields.difficulty) properties.difficulty = acfFields.difficulty;
485
- if (acfFields.video_url) properties.videoUrl = acfFields.video_url;
486
- if (acfFields.prerequisites) {
487
- try {
488
- properties.prerequisites = JSON.parse(acfFields.prerequisites);
489
- } catch (e) {
490
- properties.prerequisites = acfFields.prerequisites;
491
- }
492
- }
493
-
494
- return properties;
495
- }
496
-
497
- // Get ACF fields for a post
498
- private async getACFFields(postId: number): Promise<any> {
499
- try {
500
- const response = await this.api.get(`/acf/v3/posts/${postId}`);
501
- const data = await response.json();
502
- return data.acf || {};
503
- } catch (e) {
504
- // ACF not available or no fields
505
- return {};
506
- }
507
- }
508
-
509
- // Convert WordPress ID to ONE ID
510
- private wpIdToOneId(postType: string, wpId: number): string {
511
- return `wp_${postType}_${wpId}`;
512
- }
513
-
514
- // Convert ONE ID to WordPress ID
515
- private oneIdToWpId(oneId: string): number {
516
- const match = oneId.match(/^wp_[^_]+_(\d+)$/);
517
- if (!match) throw new Error(`Invalid ONE ID for WordPress: ${oneId}`);
518
- return parseInt(match[1], 10);
519
- }
520
-
521
- // Parse ONE ID to get WordPress ID and post type
522
- private parseOneId(oneId: string): { wpId: number; postType: string } {
523
- const match = oneId.match(/^wp_([^_]+)_(\d+)$/);
524
- if (!match) throw new Error(`Invalid ONE ID for WordPress: ${oneId}`);
525
- return {
526
- postType: match[1],
527
- wpId: parseInt(match[2], 10),
528
- };
529
- }
530
- }
531
-
532
- // WordPress API client with authentication
533
- class WordPressAPI {
534
- constructor(
535
- private baseUrl: string,
536
- private apiKey: string,
537
- ) {}
538
-
539
- async get(path: string): Promise<Response> {
540
- return this.request("GET", path);
541
- }
542
-
543
- async post(path: string, body: any): Promise<Response> {
544
- return this.request("POST", path, body);
545
- }
546
-
547
- async delete(path: string): Promise<Response> {
548
- return this.request("DELETE", path);
549
- }
550
-
551
- private async request(
552
- method: string,
553
- path: string,
554
- body?: any,
555
- ): Promise<Response> {
556
- const url = `${this.baseUrl}${path}`;
557
-
558
- const headers: HeadersInit = {
559
- Authorization: `Bearer ${this.apiKey}`,
560
- "Content-Type": "application/json",
561
- };
562
-
563
- const options: RequestInit = {
564
- method,
565
- headers,
566
- };
567
-
568
- if (body) {
569
- options.body = JSON.stringify(body);
570
- }
571
-
572
- const response = await fetch(url, options);
573
-
574
- if (!response.ok) {
575
- throw new WordPressAPIError(
576
- `WordPress API error: ${response.status} ${response.statusText}`,
577
- response.status,
578
- await response.text(),
579
- );
580
- }
581
-
582
- return response;
583
- }
584
- }
585
-
586
- class WordPressAPIError extends Error {
587
- constructor(
588
- message: string,
589
- public status: number,
590
- public responseBody: string,
591
- ) {
592
- super(message);
593
- this.name = "WordPressAPIError";
594
- }
595
- }
596
-
597
- interface WordPressProviderConfig {
598
- url: string;
599
- apiKey: string;
600
- organizationId: string;
601
- version?: string;
602
- customPostTypes?: string[];
603
- }
604
- ```
605
-
606
- **Complete NotionProvider Things Implementation:**
607
-
608
- ```typescript
609
- import { Client } from "@notionhq/client";
610
-
611
- class NotionProvider implements DataProvider {
612
- private notion: Client;
613
- private config: NotionProviderConfig;
614
-
615
- constructor(config: NotionProviderConfig) {
616
- this.config = config;
617
- this.notion = new Client({ auth: config.apiKey });
618
- }
619
-
620
- things: ThingOperations = {
621
- list: async (filter) => {
622
- const databaseId = this.config.databaseIds[filter.type];
623
- if (!databaseId) {
624
- throw new Error(
625
- `No Notion database configured for type: ${filter.type}`,
626
- );
627
- }
628
-
629
- // Build Notion filter
630
- const notionFilter: any = {};
631
-
632
- if (filter.status) {
633
- notionFilter.property = "Status";
634
- notionFilter.select = {
635
- equals: this.mapOntologyStatusToNotion(filter.status),
636
- };
637
- }
638
-
639
- // Query Notion database
640
- const response = await this.notion.databases.query({
641
- database_id: databaseId,
642
- filter: Object.keys(notionFilter).length > 0 ? notionFilter : undefined,
643
- page_size: filter.limit || 10,
644
- start_cursor: filter.cursor,
645
- });
646
-
647
- // Transform Notion pages to ontology things
648
- return Promise.all(
649
- response.results.map((page: any) =>
650
- this.transformNotionPageToThing(page, filter.type),
651
- ),
652
- );
653
- },
654
-
655
- create: async (args) => {
656
- const databaseId = this.config.databaseIds[args.type];
657
- if (!databaseId) {
658
- throw new Error(`No Notion database configured for type: ${args.type}`);
659
- }
660
-
661
- // Transform ontology thing to Notion page
662
- const properties = this.transformThingPropertiesToNotion(args);
663
-
664
- // Create page in Notion
665
- const response = await this.notion.pages.create({
666
- parent: { database_id: databaseId },
667
- properties,
668
- });
669
-
670
- // Transform back to ontology thing
671
- return this.transformNotionPageToThing(response, args.type);
672
- },
673
-
674
- update: async (id, updates) => {
675
- const notionId = this.oneIdToNotionId(id);
676
-
677
- // Build Notion properties update
678
- const properties: any = {};
679
-
680
- if (updates.name) {
681
- properties.Name = { title: [{ text: { content: updates.name } }] };
682
- }
683
-
684
- if (updates.status) {
685
- properties.Status = {
686
- select: { name: this.mapOntologyStatusToNotion(updates.status) },
687
- };
688
- }
689
-
690
- if (updates.properties) {
691
- Object.assign(
692
- properties,
693
- this.transformPropertiesToNotionUpdate(updates.properties),
694
- );
695
- }
696
-
697
- // Update page in Notion
698
- const response = await this.notion.pages.update({
699
- page_id: notionId,
700
- properties,
701
- });
702
-
703
- return this.transformNotionPageToThing(response, updates.type);
704
- },
705
-
706
- delete: async (id) => {
707
- const notionId = this.oneIdToNotionId(id);
708
-
709
- // Notion doesn't have true delete, only archive
710
- await this.notion.pages.update({
711
- page_id: notionId,
712
- archived: true,
713
- });
714
- },
715
-
716
- get: async (id) => {
717
- const notionId = this.oneIdToNotionId(id);
718
- const response = await this.notion.pages.retrieve({ page_id: notionId });
719
-
720
- // Determine type from database
721
- const databaseId = (response as any).parent.database_id;
722
- const type = this.findTypeByDatabaseId(databaseId);
723
-
724
- return this.transformNotionPageToThing(response, type);
725
- },
726
- };
727
-
728
- // Transform Notion page to ONE thing
729
- private async transformNotionPageToThing(
730
- page: any,
731
- thingType: string,
732
- ): Promise<Thing> {
733
- const props = page.properties;
734
-
735
- // Extract name (usually the title property)
736
- let name = "Untitled";
737
- const titleProp = Object.values(props).find(
738
- (p: any) => p.type === "title",
739
- ) as any;
740
- if (titleProp?.title?.[0]?.text?.content) {
741
- name = titleProp.title[0].text.content;
742
- }
743
-
744
- // Extract status
745
- let status = "draft";
746
- if (props.Status?.select?.name) {
747
- status = this.mapNotionStatusToOntology(props.Status.select.name);
748
- }
749
-
750
- // Extract all properties
751
- const properties = await this.extractNotionProperties(props);
752
-
753
- return {
754
- _id: this.notionIdToOneId(page.id),
755
- type: thingType,
756
- name,
757
- organizationId: this.config.organizationId,
758
- status,
759
- properties: {
760
- ...properties,
761
- notionPageId: page.id,
762
- notionUrl: page.url,
763
- notionIcon: page.icon,
764
- notionCover: page.cover,
765
- },
766
- createdAt: new Date(page.created_time).getTime(),
767
- updatedAt: new Date(page.last_edited_time).getTime(),
768
- };
769
- }
770
-
771
- // Transform ontology thing to Notion properties
772
- private transformThingPropertiesToNotion(thing: any): any {
773
- const properties: any = {
774
- Name: {
775
- title: [{ text: { content: thing.name } }],
776
- },
777
- Status: {
778
- select: {
779
- name: this.mapOntologyStatusToNotion(thing.status || "draft"),
780
- },
781
- },
782
- };
783
-
784
- // Organization (relation or text)
785
- if (thing.organizationId) {
786
- properties["Organization ID"] = {
787
- rich_text: [{ text: { content: thing.organizationId } }],
788
- };
789
- }
790
-
791
- // Map common properties
792
- if (thing.properties) {
793
- if (thing.properties.content) {
794
- properties.Content = {
795
- rich_text: [{ text: { content: thing.properties.content } }],
796
- };
797
- }
798
- if (thing.properties.duration) {
799
- properties.Duration = { number: thing.properties.duration };
800
- }
801
- if (thing.properties.price) {
802
- properties.Price = { number: thing.properties.price };
803
- }
804
- if (thing.properties.currency) {
805
- properties.Currency = {
806
- select: { name: thing.properties.currency },
807
- };
808
- }
809
- if (thing.properties.difficulty) {
810
- properties.Difficulty = {
811
- select: { name: thing.properties.difficulty },
812
- };
813
- }
814
-
815
- // Store full properties as JSON in a text field
816
- properties["ONE Properties"] = {
817
- rich_text: [{ text: { content: JSON.stringify(thing.properties) } }],
818
- };
819
- }
820
-
821
- return properties;
822
- }
823
-
824
- // Transform Notion properties update
825
- private transformPropertiesToNotionUpdate(properties: any): any {
826
- const notionProps: any = {};
827
-
828
- if (properties.content) {
829
- notionProps.Content = {
830
- rich_text: [{ text: { content: properties.content } }],
831
- };
832
- }
833
- if (properties.duration !== undefined) {
834
- notionProps.Duration = { number: properties.duration };
835
- }
836
- if (properties.price !== undefined) {
837
- notionProps.Price = { number: properties.price };
838
- }
839
- if (properties.currency) {
840
- notionProps.Currency = { select: { name: properties.currency } };
841
- }
842
- if (properties.difficulty) {
843
- notionProps.Difficulty = { select: { name: properties.difficulty } };
844
- }
845
-
846
- // Update full properties JSON
847
- notionProps["ONE Properties"] = {
848
- rich_text: [{ text: { content: JSON.stringify(properties) } }],
849
- };
850
-
851
- return notionProps;
852
- }
853
-
854
- // Extract properties from Notion page
855
- private async extractNotionProperties(props: any): Promise<any> {
856
- const extracted: any = {};
857
-
858
- // Try to parse stored JSON properties
859
- if (props["ONE Properties"]?.rich_text?.[0]?.text?.content) {
860
- try {
861
- Object.assign(
862
- extracted,
863
- JSON.parse(props["ONE Properties"].rich_text[0].text.content),
864
- );
865
- } catch (e) {
866
- // Ignore parse errors
867
- }
868
- }
869
-
870
- // Extract individual properties
871
- for (const [key, value] of Object.entries(props)) {
872
- const prop = value as any;
873
-
874
- switch (prop.type) {
875
- case "rich_text":
876
- if (prop.rich_text?.[0]?.text?.content) {
877
- extracted[this.camelCase(key)] = prop.rich_text[0].text.content;
878
- }
879
- break;
880
- case "number":
881
- if (prop.number !== null) {
882
- extracted[this.camelCase(key)] = prop.number;
883
- }
884
- break;
885
- case "select":
886
- if (prop.select?.name) {
887
- extracted[this.camelCase(key)] = prop.select.name;
888
- }
889
- break;
890
- case "multi_select":
891
- if (prop.multi_select) {
892
- extracted[this.camelCase(key)] = prop.multi_select.map(
893
- (s: any) => s.name,
894
- );
895
- }
896
- break;
897
- case "date":
898
- if (prop.date?.start) {
899
- extracted[this.camelCase(key)] = new Date(
900
- prop.date.start,
901
- ).getTime();
902
- }
903
- break;
904
- case "checkbox":
905
- extracted[this.camelCase(key)] = prop.checkbox;
906
- break;
907
- case "url":
908
- if (prop.url) {
909
- extracted[this.camelCase(key)] = prop.url;
910
- }
911
- break;
912
- case "email":
913
- if (prop.email) {
914
- extracted[this.camelCase(key)] = prop.email;
915
- }
916
- break;
917
- case "phone_number":
918
- if (prop.phone_number) {
919
- extracted[this.camelCase(key)] = prop.phone_number;
920
- }
921
- break;
922
- case "relation":
923
- if (prop.relation) {
924
- extracted[this.camelCase(key)] = prop.relation.map((r: any) =>
925
- this.notionIdToOneId(r.id),
926
- );
927
- }
928
- break;
929
- }
930
- }
931
-
932
- return extracted;
933
- }
934
-
935
- // Map ontology status to Notion status
936
- private mapOntologyStatusToNotion(status: string): string {
937
- const mapping: Record<string, string> = {
938
- draft: "Draft",
939
- active: "Active",
940
- published: "Published",
941
- archived: "Archived",
942
- pending: "Pending",
943
- };
944
- return mapping[status] || "Draft";
945
- }
946
-
947
- // Map Notion status to ontology status
948
- private mapNotionStatusToOntology(notionStatus: string): string {
949
- const mapping: Record<string, string> = {
950
- Draft: "draft",
951
- Active: "active",
952
- Published: "published",
953
- Archived: "archived",
954
- Pending: "pending",
955
- };
956
- return mapping[notionStatus] || "draft";
957
- }
958
-
959
- // Convert Notion ID to ONE ID
960
- private notionIdToOneId(notionId: string): string {
961
- return `notion_${notionId.replace(/-/g, "")}`;
962
- }
963
-
964
- // Convert ONE ID to Notion ID
965
- private oneIdToNotionId(oneId: string): string {
966
- const match = oneId.match(/^notion_([a-f0-9]{32})$/);
967
- if (!match) throw new Error(`Invalid ONE ID for Notion: ${oneId}`);
968
-
969
- // Notion IDs have hyphens: 8-4-4-4-12
970
- const id = match[1];
971
- return `${id.slice(0, 8)}-${id.slice(8, 12)}-${id.slice(12, 16)}-${id.slice(
972
- 16,
973
- 20,
974
- )}-${id.slice(20)}`;
975
- }
976
-
977
- // Find type by database ID
978
- private findTypeByDatabaseId(databaseId: string): string {
979
- for (const [type, dbId] of Object.entries(this.config.databaseIds)) {
980
- if (dbId === databaseId) return type;
981
- }
982
- return "unknown";
983
- }
984
-
985
- // Convert to camelCase
986
- private camelCase(str: string): string {
987
- return str
988
- .replace(/(?:^\w|[A-Z]|\b\w)/g, (letter, index) =>
989
- index === 0 ? letter.toLowerCase() : letter.toUpperCase(),
990
- )
991
- .replace(/\s+/g, "");
992
- }
993
- }
994
-
995
- interface NotionProviderConfig {
996
- apiKey: string;
997
- organizationId: string;
998
- databaseIds: Record<string, string>; // thingType -> databaseId
999
- }
1000
- ```
1001
-
1002
- ### 4. Connections (Relationships)
1003
-
1004
- **WordPress Connection Mapping:**
1005
-
1006
- WordPress doesn't have native relationships beyond `post_parent` and `post_author`. We'll use:
1007
-
1008
- 1. **ACF Relationship Fields** - For complex relationships
1009
- 2. **Custom Tables** - For high-volume relationships (enrollments)
1010
- 3. **Post Meta** - For simple 1:1 relationships
1011
-
1012
- **Implementation:**
1013
-
1014
- ```typescript
1015
- class WordPressProvider implements DataProvider {
1016
- connections: ConnectionOperations = {
1017
- list: async (filter) => {
1018
- // Query custom wp_one_connections table
1019
- const params = new URLSearchParams({
1020
- from_thing_id: filter.fromThingId || "",
1021
- to_thing_id: filter.toThingId || "",
1022
- relationship_type: filter.relationshipType || "",
1023
- per_page: String(filter.limit || 10),
1024
- });
1025
-
1026
- const response = await this.api.get(
1027
- `/one/v1/connections?${params.toString()}`,
1028
- );
1029
- const wpConnections = await response.json();
1030
-
1031
- return wpConnections.map((conn: any) => ({
1032
- _id: this.wpIdToOneId("connection", conn.id),
1033
- fromThingId: conn.from_thing_id,
1034
- toThingId: conn.to_thing_id,
1035
- relationshipType: conn.relationship_type,
1036
- metadata: JSON.parse(conn.metadata || "{}"),
1037
- validFrom: conn.valid_from,
1038
- validTo: conn.valid_to,
1039
- createdAt: new Date(conn.created_at).getTime(),
1040
- }));
1041
- },
1042
-
1043
- create: async (args) => {
1044
- const wpConnection = {
1045
- from_thing_id: args.fromThingId,
1046
- to_thing_id: args.toThingId,
1047
- relationship_type: args.relationshipType,
1048
- metadata: JSON.stringify(args.metadata || {}),
1049
- valid_from: args.validFrom || Date.now(),
1050
- valid_to: args.validTo,
1051
- };
1052
-
1053
- const response = await this.api.post("/one/v1/connections", wpConnection);
1054
- const created = await response.json();
1055
-
1056
- return {
1057
- _id: this.wpIdToOneId("connection", created.id),
1058
- ...args,
1059
- createdAt: new Date(created.created_at).getTime(),
1060
- };
1061
- },
1062
-
1063
- delete: async (id) => {
1064
- const wpId = this.oneIdToWpId(id);
1065
- await this.api.delete(`/one/v1/connections/${wpId}`);
1066
- },
1067
-
1068
- get: async (id) => {
1069
- const wpId = this.oneIdToWpId(id);
1070
- const response = await this.api.get(`/one/v1/connections/${wpId}`);
1071
- const conn = await response.json();
1072
-
1073
- return {
1074
- _id: id,
1075
- fromThingId: conn.from_thing_id,
1076
- toThingId: conn.to_thing_id,
1077
- relationshipType: conn.relationship_type,
1078
- metadata: JSON.parse(conn.metadata || "{}"),
1079
- validFrom: conn.valid_from,
1080
- validTo: conn.valid_to,
1081
- createdAt: new Date(conn.created_at).getTime(),
1082
- };
1083
- },
1084
- };
1085
- }
1086
- ```
1087
-
1088
- **WordPress Custom Endpoint (`/one/v1/connections`):**
1089
-
1090
- ```php
1091
- // wp-content/plugins/one-platform/includes/api/connections.php
1092
-
1093
- add_action('rest_api_init', function () {
1094
- register_rest_route('one/v1', '/connections', [
1095
- 'methods' => 'GET',
1096
- 'callback' => 'one_get_connections',
1097
- 'permission_callback' => function () {
1098
- return current_user_can('read');
1099
- }
1100
- ]);
1101
-
1102
- register_rest_route('one/v1', '/connections', [
1103
- 'methods' => 'POST',
1104
- 'callback' => 'one_create_connection',
1105
- 'permission_callback' => function () {
1106
- return current_user_can('edit_posts');
1107
- }
1108
- ]);
1109
-
1110
- register_rest_route('one/v1', '/connections/(?P<id>\d+)', [
1111
- 'methods' => 'GET',
1112
- 'callback' => 'one_get_connection',
1113
- 'permission_callback' => function () {
1114
- return current_user_can('read');
1115
- }
1116
- ]);
1117
-
1118
- register_rest_route('one/v1', '/connections/(?P<id>\d+)', [
1119
- 'methods' => 'DELETE',
1120
- 'callback' => 'one_delete_connection',
1121
- 'permission_callback' => function () {
1122
- return current_user_can('delete_posts');
1123
- }
1124
- ]);
1125
- });
1126
-
1127
- function one_get_connections($request) {
1128
- global $wpdb;
1129
-
1130
- $from_thing_id = $request->get_param('from_thing_id');
1131
- $to_thing_id = $request->get_param('to_thing_id');
1132
- $relationship_type = $request->get_param('relationship_type');
1133
- $per_page = intval($request->get_param('per_page') ?: 10);
1134
- $page = intval($request->get_param('page') ?: 1);
1135
-
1136
- $where = ['1=1'];
1137
- if ($from_thing_id) {
1138
- $where[] = $wpdb->prepare('from_thing_id = %s', $from_thing_id);
1139
- }
1140
- if ($to_thing_id) {
1141
- $where[] = $wpdb->prepare('to_thing_id = %s', $to_thing_id);
1142
- }
1143
- if ($relationship_type) {
1144
- $where[] = $wpdb->prepare('relationship_type = %s', $relationship_type);
1145
- }
1146
-
1147
- $offset = ($page - 1) * $per_page;
1148
- $where_clause = implode(' AND ', $where);
1149
-
1150
- $results = $wpdb->get_results(
1151
- "SELECT * FROM {$wpdb->prefix}one_connections
1152
- WHERE {$where_clause}
1153
- LIMIT {$per_page} OFFSET {$offset}"
1154
- );
1155
-
1156
- return rest_ensure_response($results);
1157
- }
1158
-
1159
- function one_create_connection($request) {
1160
- global $wpdb;
1161
-
1162
- $wpdb->insert(
1163
- $wpdb->prefix . 'one_connections',
1164
- [
1165
- 'from_thing_id' => $request->get_param('from_thing_id'),
1166
- 'to_thing_id' => $request->get_param('to_thing_id'),
1167
- 'relationship_type' => $request->get_param('relationship_type'),
1168
- 'metadata' => $request->get_param('metadata'),
1169
- 'valid_from' => $request->get_param('valid_from'),
1170
- 'valid_to' => $request->get_param('valid_to'),
1171
- 'created_at' => current_time('mysql'),
1172
- ]
1173
- );
1174
-
1175
- $id = $wpdb->insert_id;
1176
- $connection = $wpdb->get_row(
1177
- $wpdb->prepare(
1178
- "SELECT * FROM {$wpdb->prefix}one_connections WHERE id = %d",
1179
- $id
1180
- )
1181
- );
1182
-
1183
- return rest_ensure_response($connection);
1184
- }
1185
- ```
1186
-
1187
- **Notion Connection Mapping:**
1188
-
1189
- Notion supports native **Relation** properties between databases. We'll map ONE connections to Notion relations.
1190
-
1191
- ```typescript
1192
- class NotionProvider implements DataProvider {
1193
- connections: ConnectionOperations = {
1194
- list: async (filter) => {
1195
- // In Notion, connections are stored as relation properties
1196
- // We need to query the source database and extract relations
1197
-
1198
- if (!filter.fromThingId) {
1199
- throw new Error("Notion connections require fromThingId filter");
1200
- }
1201
-
1202
- const fromType = this.getTypeFromId(filter.fromThingId);
1203
- const fromNotionId = this.oneIdToNotionId(filter.fromThingId);
1204
-
1205
- // Get the source page
1206
- const page = await this.notion.pages.retrieve({ page_id: fromNotionId });
1207
- const props = (page as any).properties;
1208
-
1209
- const connections: Connection[] = [];
1210
-
1211
- // Extract all relation properties
1212
- for (const [propName, propValue] of Object.entries(props)) {
1213
- const prop = propValue as any;
1214
-
1215
- if (prop.type === "relation" && prop.relation) {
1216
- // Determine relationship type from property name
1217
- const relationshipType =
1218
- this.mapNotionPropertyToRelationship(propName);
1219
-
1220
- for (const rel of prop.relation) {
1221
- connections.push({
1222
- _id: this.generateConnectionId(
1223
- filter.fromThingId,
1224
- this.notionIdToOneId(rel.id),
1225
- relationshipType,
1226
- ),
1227
- fromThingId: filter.fromThingId,
1228
- toThingId: this.notionIdToOneId(rel.id),
1229
- relationshipType,
1230
- metadata: { notionProperty: propName },
1231
- createdAt: new Date((page as any).created_time).getTime(),
1232
- });
1233
- }
1234
- }
1235
- }
1236
-
1237
- return connections;
1238
- },
1239
-
1240
- create: async (args) => {
1241
- // Add relation to source page
1242
- const fromNotionId = this.oneIdToNotionId(args.fromThingId);
1243
- const toNotionId = this.oneIdToNotionId(args.toThingId);
1244
-
1245
- // Determine which property to update
1246
- const propertyName = this.mapRelationshipToNotionProperty(
1247
- args.relationshipType,
1248
- );
1249
-
1250
- // Get existing relations
1251
- const page = await this.notion.pages.retrieve({ page_id: fromNotionId });
1252
- const existingRelations =
1253
- (page as any).properties[propertyName]?.relation || [];
1254
-
1255
- // Add new relation
1256
- await this.notion.pages.update({
1257
- page_id: fromNotionId,
1258
- properties: {
1259
- [propertyName]: {
1260
- relation: [
1261
- ...existingRelations.map((r: any) => ({ id: r.id })),
1262
- { id: toNotionId },
1263
- ],
1264
- },
1265
- },
1266
- });
1267
-
1268
- return {
1269
- _id: this.generateConnectionId(
1270
- args.fromThingId,
1271
- args.toThingId,
1272
- args.relationshipType,
1273
- ),
1274
- ...args,
1275
- createdAt: Date.now(),
1276
- };
1277
- },
1278
-
1279
- delete: async (id) => {
1280
- // Parse connection ID to get from/to/type
1281
- const { fromThingId, toThingId, relationshipType } =
1282
- this.parseConnectionId(id);
1283
-
1284
- const fromNotionId = this.oneIdToNotionId(fromThingId);
1285
- const toNotionId = this.oneIdToNotionId(toThingId);
1286
-
1287
- // Determine which property to update
1288
- const propertyName =
1289
- this.mapRelationshipToNotionProperty(relationshipType);
1290
-
1291
- // Get existing relations
1292
- const page = await this.notion.pages.retrieve({ page_id: fromNotionId });
1293
- const existingRelations =
1294
- (page as any).properties[propertyName]?.relation || [];
1295
-
1296
- // Remove the relation
1297
- await this.notion.pages.update({
1298
- page_id: fromNotionId,
1299
- properties: {
1300
- [propertyName]: {
1301
- relation: existingRelations
1302
- .filter((r: any) => r.id !== toNotionId)
1303
- .map((r: any) => ({ id: r.id })),
1304
- },
1305
- },
1306
- });
1307
- },
1308
-
1309
- get: async (id) => {
1310
- // Parse connection ID
1311
- const { fromThingId, toThingId, relationshipType } =
1312
- this.parseConnectionId(id);
1313
-
1314
- // Verify relation exists
1315
- const connections = await this.connections.list({ fromThingId });
1316
- const connection = connections.find(
1317
- (c) =>
1318
- c.toThingId === toThingId && c.relationshipType === relationshipType,
1319
- );
1320
-
1321
- if (!connection) {
1322
- throw new Error(`Connection not found: ${id}`);
1323
- }
1324
-
1325
- return connection;
1326
- },
1327
- };
1328
-
1329
- // Map relationship type to Notion property name
1330
- private mapRelationshipToNotionProperty(relationshipType: string): string {
1331
- const mapping: Record<string, string> = {
1332
- owns: "Owner",
1333
- part_of: "Parent",
1334
- enrolled_in: "Enrollments",
1335
- authored: "Author",
1336
- holds_tokens: "Token Holdings",
1337
- delegated: "Delegated To",
1338
- communicated: "Communicated With",
1339
- transacted: "Transactions",
1340
- };
1341
- return mapping[relationshipType] || "Related";
1342
- }
1343
-
1344
- // Map Notion property name to relationship type
1345
- private mapNotionPropertyToRelationship(propertyName: string): string {
1346
- const mapping: Record<string, string> = {
1347
- Owner: "owns",
1348
- Parent: "part_of",
1349
- Enrollments: "enrolled_in",
1350
- Author: "authored",
1351
- "Token Holdings": "holds_tokens",
1352
- "Delegated To": "delegated",
1353
- "Communicated With": "communicated",
1354
- Transactions: "transacted",
1355
- };
1356
- return mapping[propertyName] || "related";
1357
- }
1358
-
1359
- // Generate deterministic connection ID
1360
- private generateConnectionId(
1361
- fromThingId: string,
1362
- toThingId: string,
1363
- relationshipType: string,
1364
- ): string {
1365
- return `notion_conn_${fromThingId}_${toThingId}_${relationshipType}`;
1366
- }
1367
-
1368
- // Parse connection ID
1369
- private parseConnectionId(id: string): {
1370
- fromThingId: string;
1371
- toThingId: string;
1372
- relationshipType: string;
1373
- } {
1374
- const match = id.match(/^notion_conn_(.+)_(.+)_(.+)$/);
1375
- if (!match) throw new Error(`Invalid Notion connection ID: ${id}`);
1376
- return {
1377
- fromThingId: match[1],
1378
- toThingId: match[2],
1379
- relationshipType: match[3],
1380
- };
1381
- }
1382
-
1383
- // Get type from ONE ID
1384
- private getTypeFromId(oneId: string): string {
1385
- // In practice, you'd look this up from the database
1386
- // For now, we'll extract from the ID pattern if it includes type
1387
- return "unknown";
1388
- }
1389
- }
1390
- ```
1391
-
1392
- ### 5. Events (Action Tracking)
1393
-
1394
- **Challenge:** WordPress and Notion don't have native event logs matching ONE's comprehensive event system.
1395
-
1396
- **Solution:**
1397
-
1398
- - **Option 1:** Store events in ONE's Convex backend (hybrid approach)
1399
- - **Option 2:** Store events in external system's custom table/database
1400
- - **Option 3:** Use external system's audit logs where available
1401
-
1402
- **WordPress Events Implementation:**
1403
-
1404
- ```typescript
1405
- class WordPressProvider implements DataProvider {
1406
- events: EventOperations = {
1407
- list: async (filter) => {
1408
- // Query custom wp_one_events table
1409
- const params = new URLSearchParams({
1410
- type: filter.type || "",
1411
- actor_id: filter.actorId || "",
1412
- target_id: filter.targetId || "",
1413
- from: String(filter.timestampFrom || 0),
1414
- to: String(filter.timestampTo || Date.now()),
1415
- per_page: String(filter.limit || 10),
1416
- });
1417
-
1418
- const response = await this.api.get(
1419
- `/one/v1/events?${params.toString()}`,
1420
- );
1421
- const wpEvents = await response.json();
1422
-
1423
- return wpEvents.map((event: any) => ({
1424
- _id: this.wpIdToOneId("event", event.id),
1425
- type: event.type,
1426
- actorId: event.actor_id,
1427
- targetId: event.target_id,
1428
- timestamp: new Date(event.timestamp).getTime(),
1429
- metadata: JSON.parse(event.metadata || "{}"),
1430
- }));
1431
- },
1432
-
1433
- create: async (args) => {
1434
- const wpEvent = {
1435
- type: args.type,
1436
- actor_id: args.actorId,
1437
- target_id: args.targetId,
1438
- timestamp: new Date(args.timestamp).toISOString(),
1439
- metadata: JSON.stringify(args.metadata || {}),
1440
- };
1441
-
1442
- const response = await this.api.post("/one/v1/events", wpEvent);
1443
- const created = await response.json();
1444
-
1445
- return {
1446
- _id: this.wpIdToOneId("event", created.id),
1447
- ...args,
1448
- };
1449
- },
1450
-
1451
- get: async (id) => {
1452
- const wpId = this.oneIdToWpId(id);
1453
- const response = await this.api.get(`/one/v1/events/${wpId}`);
1454
- const event = await response.json();
1455
-
1456
- return {
1457
- _id: id,
1458
- type: event.type,
1459
- actorId: event.actor_id,
1460
- targetId: event.target_id,
1461
- timestamp: new Date(event.timestamp).getTime(),
1462
- metadata: JSON.parse(event.metadata || "{}"),
1463
- };
1464
- },
1465
- };
1466
- }
1467
- ```
1468
-
1469
- **Notion Events Implementation (Hybrid):**
1470
-
1471
- Since Notion doesn't support custom tables, we'll use a hybrid approach: store events in Convex but reference Notion IDs.
1472
-
1473
- ```typescript
1474
- class NotionProvider implements DataProvider {
1475
- private convexEventStore: ConvexClient;
1476
-
1477
- constructor(config: NotionProviderConfig) {
1478
- this.config = config;
1479
- this.notion = new Client({ auth: config.apiKey });
1480
-
1481
- // Use Convex for event storage
1482
- this.convexEventStore = new ConvexClient(config.convexUrl);
1483
- }
1484
-
1485
- events: EventOperations = {
1486
- list: async (filter) => {
1487
- // Query Convex events table, filtered by Notion provider
1488
- return this.convexEventStore.query("events:list", {
1489
- ...filter,
1490
- metadata: {
1491
- ...filter.metadata,
1492
- provider: "notion",
1493
- organizationId: this.config.organizationId,
1494
- },
1495
- });
1496
- },
1497
-
1498
- create: async (args) => {
1499
- // Store event in Convex with Notion metadata
1500
- return this.convexEventStore.mutation("events:create", {
1501
- ...args,
1502
- metadata: {
1503
- ...args.metadata,
1504
- provider: "notion",
1505
- organizationId: this.config.organizationId,
1506
- },
1507
- });
1508
- },
1509
-
1510
- get: async (id) => {
1511
- return this.convexEventStore.query("events:get", { id });
1512
- },
1513
- };
1514
- }
1515
- ```
1516
-
1517
- ### 6. Knowledge (Semantic Understanding)
1518
-
1519
- **WordPress Knowledge Implementation:**
1520
-
1521
- ```typescript
1522
- class WordPressProvider implements DataProvider {
1523
- knowledge: KnowledgeOperations = {
1524
- list: async (filter) => {
1525
- // Query custom wp_one_knowledge table
1526
- const params = new URLSearchParams({
1527
- knowledge_type: filter.knowledgeType || "",
1528
- per_page: String(filter.limit || 10),
1529
- });
1530
-
1531
- if (filter.labels) {
1532
- params.append("labels", filter.labels.join(","));
1533
- }
1534
-
1535
- const response = await this.api.get(
1536
- `/one/v1/knowledge?${params.toString()}`,
1537
- );
1538
- const wpKnowledge = await response.json();
1539
-
1540
- return wpKnowledge.map((k: any) => ({
1541
- _id: this.wpIdToOneId("knowledge", k.id),
1542
- knowledgeType: k.knowledge_type,
1543
- text: k.text,
1544
- embedding: JSON.parse(k.embedding || "[]"),
1545
- embeddingModel: k.embedding_model,
1546
- embeddingDim: k.embedding_dim,
1547
- sourceThingId: k.source_thing_id,
1548
- sourceField: k.source_field,
1549
- labels: JSON.parse(k.labels || "[]"),
1550
- metadata: JSON.parse(k.metadata || "{}"),
1551
- createdAt: new Date(k.created_at).getTime(),
1552
- updatedAt: new Date(k.updated_at).getTime(),
1553
- }));
1554
- },
1555
-
1556
- create: async (args) => {
1557
- const wpKnowledge = {
1558
- knowledge_type: args.knowledgeType,
1559
- text: args.text,
1560
- embedding: JSON.stringify(args.embedding),
1561
- embedding_model: args.embeddingModel,
1562
- embedding_dim: args.embeddingDim,
1563
- source_thing_id: args.sourceThingId,
1564
- source_field: args.sourceField,
1565
- labels: JSON.stringify(args.labels || []),
1566
- metadata: JSON.stringify(args.metadata || {}),
1567
- };
1568
-
1569
- const response = await this.api.post("/one/v1/knowledge", wpKnowledge);
1570
- const created = await response.json();
1571
-
1572
- return {
1573
- _id: this.wpIdToOneId("knowledge", created.id),
1574
- ...args,
1575
- createdAt: new Date(created.created_at).getTime(),
1576
- updatedAt: new Date(created.updated_at).getTime(),
1577
- };
1578
- },
1579
-
1580
- search: async (query) => {
1581
- // Use Convex for vector search (WordPress doesn't support it natively)
1582
- // This is a hybrid approach
1583
- throw new Error("Vector search not supported by WordPressProvider");
1584
- },
1585
-
1586
- get: async (id) => {
1587
- const wpId = this.oneIdToWpId(id);
1588
- const response = await this.api.get(`/one/v1/knowledge/${wpId}`);
1589
- const k = await response.json();
1590
-
1591
- return {
1592
- _id: id,
1593
- knowledgeType: k.knowledge_type,
1594
- text: k.text,
1595
- embedding: JSON.parse(k.embedding || "[]"),
1596
- embeddingModel: k.embedding_model,
1597
- embeddingDim: k.embedding_dim,
1598
- sourceThingId: k.source_thing_id,
1599
- sourceField: k.source_field,
1600
- labels: JSON.parse(k.labels || "[]"),
1601
- metadata: JSON.parse(k.metadata || "{}"),
1602
- createdAt: new Date(k.created_at).getTime(),
1603
- updatedAt: new Date(k.updated_at).getTime(),
1604
- };
1605
- },
1606
-
1607
- delete: async (id) => {
1608
- const wpId = this.oneIdToWpId(id);
1609
- await this.api.delete(`/one/v1/knowledge/${wpId}`);
1610
- },
1611
- };
1612
- }
1613
- ```
1614
-
1615
- **Notion Knowledge Implementation (Hybrid):**
1616
-
1617
- Notion doesn't support vector embeddings natively. Use Convex for knowledge storage.
1618
-
1619
- ```typescript
1620
- class NotionProvider implements DataProvider {
1621
- knowledge: KnowledgeOperations = {
1622
- list: async (filter) => {
1623
- // Use Convex for knowledge storage
1624
- return this.convexEventStore.query("knowledge:list", {
1625
- ...filter,
1626
- metadata: {
1627
- ...filter.metadata,
1628
- provider: "notion",
1629
- organizationId: this.config.organizationId,
1630
- },
1631
- });
1632
- },
1633
-
1634
- create: async (args) => {
1635
- return this.convexEventStore.mutation("knowledge:create", {
1636
- ...args,
1637
- metadata: {
1638
- ...args.metadata,
1639
- provider: "notion",
1640
- organizationId: this.config.organizationId,
1641
- },
1642
- });
1643
- },
1644
-
1645
- search: async (query) => {
1646
- return this.convexEventStore.query("knowledge:search", {
1647
- ...query,
1648
- metadata: {
1649
- provider: "notion",
1650
- organizationId: this.config.organizationId,
1651
- },
1652
- });
1653
- },
1654
-
1655
- get: async (id) => {
1656
- return this.convexEventStore.query("knowledge:get", { id });
1657
- },
1658
-
1659
- delete: async (id) => {
1660
- return this.convexEventStore.mutation("knowledge:delete", { id });
1661
- },
1662
- };
1663
- }
1664
- ```
1665
-
1666
- ---
1667
-
1668
- ## CompositeProvider (Multi-Backend Routing)
1669
-
1670
- **Use Case:** A single organization wants to use different backends for different entity types.
1671
-
1672
- **Example:** WordPress for courses/lessons, Notion for internal documentation, Convex for events/knowledge.
1673
-
1674
- **Implementation:**
1675
-
1676
- ```typescript
1677
- class CompositeProvider implements DataProvider {
1678
- private providers: Map<string, DataProvider>;
1679
- private routingRules: RoutingRules;
1680
-
1681
- constructor(config: CompositeProviderConfig) {
1682
- this.providers = new Map();
1683
- this.routingRules = config.routingRules;
1684
-
1685
- // Register all providers
1686
- for (const [name, providerConfig] of Object.entries(config.providers)) {
1687
- this.providers.set(name, this.createProvider(providerConfig));
1688
- }
1689
- }
1690
-
1691
- things: ThingOperations = {
1692
- list: async (filter) => {
1693
- const providerName = this.routeByThingType(filter.type);
1694
- const provider = this.getProvider(providerName);
1695
- return provider.things.list(filter);
1696
- },
1697
-
1698
- create: async (args) => {
1699
- const providerName = this.routeByThingType(args.type);
1700
- const provider = this.getProvider(providerName);
1701
- return provider.things.create(args);
1702
- },
1703
-
1704
- update: async (id, updates) => {
1705
- const providerName = this.routeByThingId(id);
1706
- const provider = this.getProvider(providerName);
1707
- return provider.things.update(id, updates);
1708
- },
1709
-
1710
- delete: async (id) => {
1711
- const providerName = this.routeByThingId(id);
1712
- const provider = this.getProvider(providerName);
1713
- return provider.things.delete(id);
1714
- },
1715
-
1716
- get: async (id) => {
1717
- const providerName = this.routeByThingId(id);
1718
- const provider = this.getProvider(providerName);
1719
- return provider.things.get(id);
1720
- },
1721
- };
1722
-
1723
- connections: ConnectionOperations = {
1724
- list: async (filter) => {
1725
- // Cross-provider connections require querying all providers
1726
- if (!filter.fromThingId && !filter.toThingId) {
1727
- throw new Error(
1728
- "CompositeProvider connections.list requires fromThingId or toThingId",
1729
- );
1730
- }
1731
-
1732
- const providerName = this.routeByThingId(
1733
- filter.fromThingId || filter.toThingId!,
1734
- );
1735
- const provider = this.getProvider(providerName);
1736
- return provider.connections.list(filter);
1737
- },
1738
-
1739
- create: async (args) => {
1740
- // Determine which provider should own the connection
1741
- // Default: same provider as fromThing
1742
- const providerName = this.routeByThingId(args.fromThingId);
1743
- const provider = this.getProvider(providerName);
1744
- return provider.connections.create(args);
1745
- },
1746
-
1747
- delete: async (id) => {
1748
- const providerName = this.routeByConnectionId(id);
1749
- const provider = this.getProvider(providerName);
1750
- return provider.connections.delete(id);
1751
- },
1752
-
1753
- get: async (id) => {
1754
- const providerName = this.routeByConnectionId(id);
1755
- const provider = this.getProvider(providerName);
1756
- return provider.connections.get(id);
1757
- },
1758
- };
1759
-
1760
- events: EventOperations = {
1761
- list: async (filter) => {
1762
- // Events are always stored in the designated event provider
1763
- const providerName = this.routingRules.eventsProvider || "convex";
1764
- const provider = this.getProvider(providerName);
1765
- return provider.events.list(filter);
1766
- },
1767
-
1768
- create: async (args) => {
1769
- const providerName = this.routingRules.eventsProvider || "convex";
1770
- const provider = this.getProvider(providerName);
1771
- return provider.events.create(args);
1772
- },
1773
-
1774
- get: async (id) => {
1775
- const providerName = this.routingRules.eventsProvider || "convex";
1776
- const provider = this.getProvider(providerName);
1777
- return provider.events.get(id);
1778
- },
1779
- };
1780
-
1781
- knowledge: KnowledgeOperations = {
1782
- list: async (filter) => {
1783
- // Knowledge is always stored in the designated knowledge provider
1784
- const providerName = this.routingRules.knowledgeProvider || "convex";
1785
- const provider = this.getProvider(providerName);
1786
- return provider.knowledge.list(filter);
1787
- },
1788
-
1789
- create: async (args) => {
1790
- const providerName = this.routingRules.knowledgeProvider || "convex";
1791
- const provider = this.getProvider(providerName);
1792
- return provider.knowledge.create(args);
1793
- },
1794
-
1795
- search: async (query) => {
1796
- const providerName = this.routingRules.knowledgeProvider || "convex";
1797
- const provider = this.getProvider(providerName);
1798
- return provider.knowledge.search(query);
1799
- },
1800
-
1801
- get: async (id) => {
1802
- const providerName = this.routingRules.knowledgeProvider || "convex";
1803
- const provider = this.getProvider(providerName);
1804
- return provider.knowledge.get(id);
1805
- },
1806
-
1807
- delete: async (id) => {
1808
- const providerName = this.routingRules.knowledgeProvider || "convex";
1809
- const provider = this.getProvider(providerName);
1810
- return provider.knowledge.delete(id);
1811
- },
1812
- };
1813
-
1814
- organizations: OrganizationOperations = {
1815
- list: async (filter) => {
1816
- // Organizations are always in the designated org provider
1817
- const providerName = this.routingRules.organizationsProvider || "convex";
1818
- const provider = this.getProvider(providerName);
1819
- return provider.organizations.list(filter);
1820
- },
1821
-
1822
- create: async (args) => {
1823
- const providerName = this.routingRules.organizationsProvider || "convex";
1824
- const provider = this.getProvider(providerName);
1825
- return provider.organizations.create(args);
1826
- },
1827
-
1828
- update: async (id, updates) => {
1829
- const providerName = this.routingRules.organizationsProvider || "convex";
1830
- const provider = this.getProvider(providerName);
1831
- return provider.organizations.update(id, updates);
1832
- },
1833
-
1834
- delete: async (id) => {
1835
- const providerName = this.routingRules.organizationsProvider || "convex";
1836
- const provider = this.getProvider(providerName);
1837
- return provider.organizations.delete(id);
1838
- },
1839
-
1840
- get: async (id) => {
1841
- const providerName = this.routingRules.organizationsProvider || "convex";
1842
- const provider = this.getProvider(providerName);
1843
- return provider.organizations.get(id);
1844
- },
1845
- };
1846
-
1847
- people: PeopleOperations = {
1848
- list: async (filter) => {
1849
- // People routing can be by organization or type
1850
- const providerName = this.routingRules.peopleProvider || "convex";
1851
- const provider = this.getProvider(providerName);
1852
- return provider.people.list(filter);
1853
- },
1854
-
1855
- create: async (args) => {
1856
- const providerName = this.routingRules.peopleProvider || "convex";
1857
- const provider = this.getProvider(providerName);
1858
- return provider.people.create(args);
1859
- },
1860
-
1861
- update: async (id, updates) => {
1862
- const providerName = this.routeByThingId(id);
1863
- const provider = this.getProvider(providerName);
1864
- return provider.people.update(id, updates);
1865
- },
1866
-
1867
- delete: async (id) => {
1868
- const providerName = this.routeByThingId(id);
1869
- const provider = this.getProvider(providerName);
1870
- return provider.people.delete(id);
1871
- },
1872
-
1873
- get: async (id) => {
1874
- const providerName = this.routeByThingId(id);
1875
- const provider = this.getProvider(providerName);
1876
- return provider.people.get(id);
1877
- },
1878
- };
1879
-
1880
- // Health check all providers
1881
- async healthCheck(): Promise<Record<string, boolean>> {
1882
- const health: Record<string, boolean> = {};
1883
-
1884
- for (const [name, provider] of this.providers.entries()) {
1885
- try {
1886
- // Try a simple query to test connectivity
1887
- await provider.things.list({ type: "course", limit: 1 });
1888
- health[name] = true;
1889
- } catch (e) {
1890
- health[name] = false;
1891
- }
1892
- }
1893
-
1894
- return health;
1895
- }
1896
-
1897
- // Route by thing type
1898
- private routeByThingType(type: string): string {
1899
- const rule = this.routingRules.thingTypes[type];
1900
- if (rule) return rule;
1901
-
1902
- // Default routing
1903
- return this.routingRules.defaultProvider || "convex";
1904
- }
1905
-
1906
- // Route by thing ID (ID prefix indicates provider)
1907
- private routeByThingId(id: string): string {
1908
- if (id.startsWith("wp_")) return "wordpress";
1909
- if (id.startsWith("notion_")) return "notion";
1910
- if (id.startsWith("convex_")) return "convex";
1911
-
1912
- // Default routing
1913
- return this.routingRules.defaultProvider || "convex";
1914
- }
1915
-
1916
- // Route by connection ID
1917
- private routeByConnectionId(id: string): string {
1918
- if (id.startsWith("wp_")) return "wordpress";
1919
- if (id.startsWith("notion_")) return "notion";
1920
- if (id.startsWith("convex_")) return "convex";
1921
-
1922
- return this.routingRules.defaultProvider || "convex";
1923
- }
1924
-
1925
- // Get provider by name
1926
- private getProvider(name: string): DataProvider {
1927
- const provider = this.providers.get(name);
1928
- if (!provider) {
1929
- throw new Error(`Provider not found: ${name}`);
1930
- }
1931
- return provider;
1932
- }
1933
-
1934
- // Create provider from config
1935
- private createProvider(config: any): DataProvider {
1936
- switch (config.type) {
1937
- case "convex":
1938
- return new ConvexProvider(config);
1939
- case "wordpress":
1940
- return new WordPressProvider(config);
1941
- case "notion":
1942
- return new NotionProvider(config);
1943
- default:
1944
- throw new Error(`Unknown provider type: ${config.type}`);
1945
- }
1946
- }
1947
- }
1948
-
1949
- interface CompositeProviderConfig {
1950
- providers: Record<string, any>; // providerName -> providerConfig
1951
- routingRules: RoutingRules;
1952
- }
1953
-
1954
- interface RoutingRules {
1955
- // Default provider for unmapped types
1956
- defaultProvider: string;
1957
-
1958
- // Thing type routing: thingType -> providerName
1959
- thingTypes: Record<string, string>;
1960
-
1961
- // Specific dimension providers
1962
- eventsProvider?: string;
1963
- knowledgeProvider?: string;
1964
- organizationsProvider?: string;
1965
- peopleProvider?: string;
1966
- }
1967
-
1968
- // Example usage:
1969
- const compositeProvider = new CompositeProvider({
1970
- providers: {
1971
- convex: {
1972
- type: "convex",
1973
- url: "https://shocking-falcon-870.convex.cloud",
1974
- },
1975
- wordpress: {
1976
- type: "wordpress",
1977
- url: "https://acme.wordpress.com",
1978
- apiKey: "wp_secret_key",
1979
- organizationId: "org_123",
1980
- },
1981
- notion: {
1982
- type: "notion",
1983
- apiKey: "notion_secret_key",
1984
- organizationId: "org_123",
1985
- databaseIds: {
1986
- documentation: "abc123",
1987
- meeting_notes: "def456",
1988
- },
1989
- convexUrl: "https://shocking-falcon-870.convex.cloud",
1990
- },
1991
- },
1992
- routingRules: {
1993
- defaultProvider: "convex",
1994
- thingTypes: {
1995
- course: "wordpress",
1996
- lesson: "wordpress",
1997
- documentation: "notion",
1998
- meeting_notes: "notion",
1999
- },
2000
- eventsProvider: "convex",
2001
- knowledgeProvider: "convex",
2002
- organizationsProvider: "convex",
2003
- peopleProvider: "convex",
2004
- },
2005
- });
2006
-
2007
- // Usage in components:
2008
- const courses = await compositeProvider.things.list({ type: "course" });
2009
- // Routes to WordPress
2010
-
2011
- const docs = await compositeProvider.things.list({ type: "documentation" });
2012
- // Routes to Notion
2013
- ```
2014
-
2015
- ---
2016
-
2017
- ## Implementation Steps (50+ Steps)
2018
-
2019
- ### Phase 1: WordPress Provider (Week 1)
2020
-
2021
- **Step 1-10: Setup & Authentication**
2022
-
2023
- 1. Create `frontend/src/providers/wordpress/` directory
2024
- 2. Install dependencies: `bun add @types/wordpress__api-fetch`
2025
- 3. Create `WordPressAPI.ts` - HTTP client with auth
2026
- 4. Implement Application Password authentication
2027
- 5. Test authentication with real WordPress site
2028
- 6. Create `WordPressProvider.ts` - DataProvider implementation
2029
- 7. Implement ID conversion utilities (`wpIdToOneId`, `oneIdToWpId`)
2030
- 8. Create type mapping utilities (ontology ↔ WP)
2031
- 9. Create status mapping utilities (ontology ↔ WP)
2032
- 10. Write unit tests for utilities (30+ tests)
2033
-
2034
- **Step 11-20: Things Implementation**
2035
-
2036
- 11. Implement `things.list()` with WordPress REST API
2037
- 12. Implement `things.create()` with post creation
2038
- 13. Implement `things.update()` with post updates
2039
- 14. Implement `things.delete()` with post deletion
2040
- 15. Implement `things.get()` with single post retrieval
2041
- 16. Implement ACF field transformation logic
2042
- 17. Add pagination support (WordPress pagination differs from Convex)
2043
- 18. Add filtering support (map to WordPress query params)
2044
- 19. Add error handling with exponential backoff retry
2045
- 20. Write unit tests for things operations (50+ tests)
2046
-
2047
- **Step 21-30: Connections Implementation**
2048
-
2049
- 21. Design `wp_one_connections` table schema (SQL)
2050
- 22. Create WordPress plugin: `one-platform-connector`
2051
- 23. Implement `/one/v1/connections` REST endpoint (GET)
2052
- 24. Implement `/one/v1/connections` REST endpoint (POST)
2053
- 25. Implement `/one/v1/connections/:id` REST endpoint (GET)
2054
- 26. Implement `/one/v1/connections/:id` REST endpoint (DELETE)
2055
- 27. Implement `connections.list()` in TypeScript provider
2056
- 28. Implement `connections.create()` in TypeScript provider
2057
- 29. Implement `connections.delete()` in TypeScript provider
2058
- 30. Write integration tests with real WordPress instance (20+ tests)
2059
-
2060
- **Step 31-40: Events & Knowledge Implementation**
2061
-
2062
- 31. Design `wp_one_events` table schema (SQL)
2063
- 32. Implement `/one/v1/events` REST endpoint (GET)
2064
- 33. Implement `/one/v1/events` REST endpoint (POST)
2065
- 34. Implement `events.list()` in TypeScript provider
2066
- 35. Implement `events.create()` in TypeScript provider
2067
- 36. Design `wp_one_knowledge` table schema (SQL)
2068
- 37. Implement `/one/v1/knowledge` REST endpoint (GET/POST)
2069
- 38. Implement `knowledge.list()` in TypeScript provider
2070
- 39. Implement `knowledge.create()` in TypeScript provider
2071
- 40. Document hybrid approach for vector search (Convex fallback)
2072
-
2073
- ### Phase 2: Notion Provider (Week 1-2)
2074
-
2075
- **Step 41-50: Setup & Authentication**
2076
-
2077
- 41. Create `frontend/src/providers/notion/` directory
2078
- 42. Install dependencies: `bun add @notionhq/client`
2079
- 43. Create `NotionProvider.ts` - DataProvider implementation
2080
- 44. Set up Notion integration with test workspace
2081
- 45. Create test databases (Courses, Lessons, Users)
2082
- 46. Configure database properties (Name, Status, etc.)
2083
- 47. Implement ID conversion utilities (`notionIdToOneId`, `oneIdToNotionId`)
2084
- 48. Create property mapping utilities (ontology ↔ Notion)
2085
- 49. Create status mapping utilities (ontology ↔ Notion)
2086
- 50. Write unit tests for utilities (30+ tests)
2087
-
2088
- **Step 51-60: Things Implementation**
2089
-
2090
- 51. Implement `things.list()` with Notion database query
2091
- 52. Implement `things.create()` with Notion page creation
2092
- 53. Implement `things.update()` with Notion page updates
2093
- 54. Implement `things.delete()` with Notion page archiving
2094
- 55. Implement `things.get()` with single page retrieval
2095
- 56. Implement property extraction logic (all property types)
2096
- 57. Add pagination support (Notion cursor-based pagination)
2097
- 58. Add filtering support (map to Notion filter syntax)
2098
- 59. Add error handling with rate limit retry
2099
- 60. Write unit tests for things operations (50+ tests)
2100
-
2101
- **Step 61-70: Connections Implementation**
2102
-
2103
- 61. Design Notion relation property strategy
2104
- 62. Implement `connections.list()` with relation extraction
2105
- 63. Implement `connections.create()` with relation updates
2106
- 64. Implement `connections.delete()` with relation removal
2107
- 65. Implement `connections.get()` with relation lookup
2108
- 66. Map all 25 ONE relationship types to Notion properties
2109
- 67. Handle bidirectional relations
2110
- 68. Add validation for cross-database relations
2111
- 69. Add error handling for missing properties
2112
- 70. Write integration tests with real Notion workspace (20+ tests)
2113
-
2114
- **Step 71-75: Events & Knowledge (Hybrid)**
2115
-
2116
- 71. Document hybrid approach (Convex for events/knowledge)
2117
- 72. Implement `events.list()` with Convex fallback
2118
- 73. Implement `events.create()` with Convex storage
2119
- 74. Implement `knowledge.list()` with Convex fallback
2120
- 75. Implement `knowledge.search()` with Convex vector search
2121
-
2122
- ### Phase 3: CompositeProvider (Week 2)
2123
-
2124
- **Step 76-85: Routing Implementation**
2125
-
2126
- 76. Create `frontend/src/providers/composite/` directory
2127
- 77. Create `CompositeProvider.ts` - Multi-backend router
2128
- 78. Implement provider registry with Map
2129
- 79. Implement `routeByThingType()` routing logic
2130
- 80. Implement `routeByThingId()` routing logic (ID prefix detection)
2131
- 81. Implement `routeByConnectionId()` routing logic
2132
- 82. Create `RoutingRules` interface with configuration schema
2133
- 83. Implement provider factory (create providers from config)
2134
- 84. Add provider health check method
2135
- 85. Write unit tests for routing logic (40+ tests)
2136
-
2137
- **Step 86-90: Operations Implementation**
2138
-
2139
- 86. Implement `things.*` operations with routing
2140
- 87. Implement `connections.*` operations with routing
2141
- 88. Implement `events.*` operations (always route to designated provider)
2142
- 89. Implement `knowledge.*` operations (always route to designated provider)
2143
- 90. Handle cross-provider connection scenarios
2144
-
2145
- ### Phase 4: Testing & Documentation (Week 2)
2146
-
2147
- **Step 91-100: Integration Testing**
2148
-
2149
- 91. Set up test WordPress instance (local Docker)
2150
- 92. Set up test Notion workspace
2151
- 93. Write end-to-end test: Create course in WordPress
2152
- 94. Write end-to-end test: Create lesson in WordPress
2153
- 95. Write end-to-end test: Create documentation in Notion
2154
- 96. Write end-to-end test: Create cross-provider connection
2155
- 97. Write end-to-end test: CompositeProvider routing
2156
- 98. Write end-to-end test: Multi-backend organization
2157
- 99. Run full test suite (expect 200+ tests)
2158
- 100. Fix any failing tests
2159
-
2160
- **Step 101-110: Documentation & Guides**
2161
-
2162
- 101. Write WordPress setup guide (installation, plugins, configuration)
2163
- 102. Write Notion setup guide (integration, databases, properties)
2164
- 103. Write provider configuration reference
2165
- 104. Write ontology mapping documentation (all 6 dimensions)
2166
- 105. Write CompositeProvider configuration guide
2167
- 106. Write troubleshooting guide (common issues)
2168
- 107. Create example configurations (3-5 scenarios)
2169
- 108. Document limitations (what's not supported)
2170
- 109. Create migration guide (Convex → WordPress/Notion)
2171
- 110. Review and publish documentation
2172
-
2173
- ---
2174
-
2175
- ## Testing Strategy
2176
-
2177
- ### Unit Tests (100+ tests)
2178
-
2179
- **WordPress Provider:**
2180
-
2181
- - ID conversion (10 tests)
2182
- - Type mapping (20 tests)
2183
- - Status mapping (10 tests)
2184
- - Property transformation (20 tests)
2185
- - API client (20 tests)
2186
- - Error handling (10 tests)
2187
-
2188
- **Notion Provider:**
2189
-
2190
- - ID conversion (10 tests)
2191
- - Property extraction (30 tests)
2192
- - Status mapping (10 tests)
2193
- - Property transformation (20 tests)
2194
- - Error handling (10 tests)
2195
-
2196
- **CompositeProvider:**
2197
-
2198
- - Routing logic (30 tests)
2199
- - Provider factory (10 tests)
2200
- - Health checks (10 tests)
2201
-
2202
- ### Integration Tests (50+ tests)
2203
-
2204
- **WordPress Provider:**
2205
-
2206
- - CRUD operations for all thing types (20 tests)
2207
- - Connection operations (10 tests)
2208
- - Event operations (5 tests)
2209
- - Authentication (5 tests)
2210
-
2211
- **Notion Provider:**
2212
-
2213
- - CRUD operations for all thing types (20 tests)
2214
- - Connection operations (10 tests)
2215
- - Property type handling (10 tests)
2216
- - Authentication (5 tests)
2217
-
2218
- **CompositeProvider:**
2219
-
2220
- - Multi-backend routing (10 tests)
2221
- - Cross-provider connections (5 tests)
2222
-
2223
- ### End-to-End Tests (20+ tests)
2224
-
2225
- **Scenarios:**
2226
-
2227
- 1. Create organization with WordPress backend
2228
- 2. Create organization with Notion backend
2229
- 3. Create organization with CompositeProvider
2230
- 4. Migrate organization from Convex to WordPress
2231
- 5. Create course in WordPress, view in ONE frontend
2232
- 6. Create documentation in Notion, search in ONE
2233
- 7. Create cross-provider connection (WordPress course → Notion doc)
2234
- 8. Test real-time updates (polling for WordPress, webhooks for Notion)
2235
- 9. Test provider failover (CompositeProvider health checks)
2236
- 10. Test data consistency across providers
2237
-
2238
- ### Performance Tests
2239
-
2240
- **Benchmarks:**
2241
-
2242
- - Compare WordPress provider vs Convex (latency, throughput)
2243
- - Compare Notion provider vs Convex (latency, throughput)
2244
- - Test CompositeProvider overhead (routing delay)
2245
- - Test concurrent operations (10, 100, 1000 requests)
2246
- - Test pagination performance (large datasets)
2247
- - Test connection queries (complex relationship graphs)
2248
-
2249
- **Acceptance Criteria:**
2250
-
2251
- - WordPress provider: < 500ms p99 latency for simple queries
2252
- - Notion provider: < 1s p99 latency for simple queries
2253
- - CompositeProvider: < 50ms routing overhead
2254
- - All providers: No data loss under normal operation
2255
- - All providers: Graceful degradation under high load
2256
-
2257
- ---
2258
-
2259
- ## User Stories & Acceptance Criteria
2260
-
2261
- ### Story 1: WordPress as Backend
2262
-
2263
- **As an** org_owner with existing WordPress infrastructure
2264
- **I want to** use WordPress as my ONE Platform backend
2265
- **So that** I can leverage my existing content and avoid data migration
2266
-
2267
- **Acceptance Criteria:**
2268
-
2269
- - [ ] I can configure my organization to use WordPress provider
2270
- - [ ] I provide my WordPress URL and API key
2271
- - [ ] All course/lesson content is stored in WordPress
2272
- - [ ] ONE frontend displays WordPress content seamlessly
2273
- - [ ] I can create/edit content in either WordPress admin or ONE interface
2274
- - [ ] Changes in WordPress appear in ONE within 30 seconds (polling)
2275
- - [ ] Changes in ONE appear in WordPress immediately
2276
- - [ ] All user roles map correctly (org_owner → Administrator, etc.)
2277
-
2278
- ### Story 2: Notion as Backend
2279
-
2280
- **As an** org_owner using Notion for knowledge management
2281
- **I want to** use Notion as my ONE Platform backend
2282
- **So that** my team can continue using familiar Notion workflows
2283
-
2284
- **Acceptance Criteria:**
2285
-
2286
- - [ ] I can configure my organization to use Notion provider
2287
- - [ ] I provide my Notion integration token and database IDs
2288
- - [ ] All documentation/notes are stored in Notion
2289
- - [ ] ONE frontend displays Notion pages seamlessly
2290
- - [ ] I can create/edit content in either Notion or ONE interface
2291
- - [ ] Changes in Notion appear in ONE within 10 seconds (webhooks)
2292
- - [ ] Changes in ONE appear in Notion immediately
2293
- - [ ] Notion relation properties map to ONE connections
2294
-
2295
- ### Story 3: Multi-Backend Organization
2296
-
2297
- **As an** org_owner with diverse needs
2298
- **I want to** use different backends for different content types
2299
- **So that** I can leverage the best tool for each use case
2300
-
2301
- **Acceptance Criteria:**
2302
-
2303
- - [ ] I can configure CompositeProvider with routing rules
2304
- - [ ] I specify: courses→WordPress, docs→Notion, events→Convex
2305
- - [ ] Content is routed to correct backend automatically
2306
- - [ ] I can query across backends seamlessly
2307
- - [ ] ONE frontend shows unified view of all content
2308
- - [ ] Cross-provider connections work correctly
2309
- - [ ] Health checks alert me if any provider is down
2310
-
2311
- ### Story 4: Backend Migration
2312
-
2313
- **As an** org_owner currently using Convex
2314
- **I want to** migrate to WordPress
2315
- **So that** I can use custom WordPress plugins
2316
-
2317
- **Acceptance Criteria:**
2318
-
2319
- - [ ] I can export all data from Convex
2320
- - [ ] I can import all data to WordPress
2321
- - [ ] I can switch provider configuration
2322
- - [ ] All existing ONE IDs are preserved (remapped)
2323
- - [ ] All connections are preserved
2324
- - [ ] All events are migrated
2325
- - [ ] Migration completes without data loss
2326
- - [ ] ONE frontend works immediately after migration
2327
-
2328
- ### Story 5: Provider Creation
2329
-
2330
- **As a** developer
2331
- **I want to** create a custom provider for my proprietary system
2332
- **So that** my organization can use ONE with our existing infrastructure
2333
-
2334
- **Acceptance Criteria:**
2335
-
2336
- - [ ] I have comprehensive provider creation guide
2337
- - [ ] I have working examples (WordPress, Notion)
2338
- - [ ] I understand all 6-dimension requirements
2339
- - [ ] I can implement DataProvider interface
2340
- - [ ] I can test my provider with integration test suite
2341
- - [ ] I can deploy my provider to production
2342
- - [ ] My provider passes all quality gates
2343
-
2344
- ---
2345
-
2346
- ## Quality Gates
2347
-
2348
- - [ ] WordPressProvider implements all 6 dimensions
2349
- - [ ] NotionProvider implements all 6 dimensions
2350
- - [ ] CompositeProvider routes correctly
2351
- - [ ] All unit tests pass (100+)
2352
- - [ ] All integration tests pass (50+)
2353
- - [ ] All end-to-end tests pass (20+)
2354
- - [ ] Performance benchmarks acceptable
2355
- - [ ] WordPress setup guide complete
2356
- - [ ] Notion setup guide complete
2357
- - [ ] Provider creation guide complete
2358
- - [ ] API reference documentation complete
2359
- - [ ] Code review approved by Engineering Director
2360
- - [ ] Security review approved (API key handling)
2361
- - [ ] No data loss in stress testing
2362
- - [ ] Graceful error handling verified
2363
-
2364
- ---
2365
-
2366
- ## Rollback Plan
2367
-
2368
- **Risk:** Alternative providers introduce bugs or performance issues.
2369
-
2370
- **Mitigation:**
2371
-
2372
- - Providers are additive - ConvexProvider remains default
2373
- - Organizations opt-in to alternative providers
2374
- - Provider configuration stored per-organization
2375
- - Easy to switch back to ConvexProvider
2376
-
2377
- **Rollback Steps:**
2378
-
2379
- 1. Update organization's `properties.providerType` to `"convex"`
2380
- 2. Provider registry automatically uses ConvexProvider
2381
- 3. No code changes required
2382
- 4. **Rollback time: Instant** (configuration change only)
2383
-
2384
- **Data Preservation:**
2385
-
2386
- - External data (WordPress, Notion) remains intact
2387
- - Events/knowledge in Convex remain intact
2388
- - Can re-enable alternative provider at any time
2389
-
2390
- ---
2391
-
2392
- ## Dependencies
2393
-
2394
- **Required:**
2395
-
2396
- - Feature 2-6 (Dashboard Migration) MUST be complete
2397
- - All frontend components MUST use DataProvider abstraction
2398
- - No direct Convex imports in components
2399
-
2400
- **External:**
2401
-
2402
- - WordPress instance (6.4+)
2403
- - WordPress plugins: ACF Pro, Custom Post Type UI
2404
- - Notion workspace with API access
2405
- - Notion integration token with full access permissions
2406
-
2407
- **Development:**
2408
-
2409
- - Docker for local WordPress testing
2410
- - Notion test workspace
2411
- - Integration test credentials (stored in 1Password)
2412
-
2413
- ---
2414
-
2415
- ## Related Files
2416
-
2417
- **Plan:**
2418
-
2419
- - `one/things/plans/2-backend-agnostic-frontend.md`
2420
-
2421
- **Dependencies:**
2422
-
2423
- - `one/things/features/2-6-dashboard-migration.md`
2424
-
2425
- **Implementation:**
2426
-
2427
- - `frontend/src/providers/DataProvider.ts` (interface)
2428
- - `frontend/src/providers/wordpress/WordPressProvider.ts` (NEW)
2429
- - `frontend/src/providers/wordpress/WordPressAPI.ts` (NEW)
2430
- - `frontend/src/providers/notion/NotionProvider.ts` (NEW)
2431
- - `frontend/src/providers/composite/CompositeProvider.ts` (NEW)
2432
-
2433
- **WordPress Plugin:**
2434
-
2435
- - `wordpress/plugins/one-platform-connector/` (NEW - to be created)
2436
- - `wordpress/plugins/one-platform-connector/includes/api/connections.php` (NEW)
2437
- - `wordpress/plugins/one-platform-connector/includes/api/events.php` (NEW)
2438
- - `wordpress/plugins/one-platform-connector/includes/api/knowledge.php` (NEW)
2439
- - `wordpress/plugins/one-platform-connector/includes/schema.php` (NEW - SQL table creation)
2440
-
2441
- **Tests:**
2442
-
2443
- - `frontend/tests/unit/providers/wordpress.test.ts` (NEW)
2444
- - `frontend/tests/unit/providers/notion.test.ts` (NEW)
2445
- - `frontend/tests/unit/providers/composite.test.ts` (NEW)
2446
- - `frontend/tests/integration/providers/wordpress.test.ts` (NEW)
2447
- - `frontend/tests/integration/providers/notion.test.ts` (NEW)
2448
- - `frontend/tests/e2e/multi-backend.test.ts` (NEW)
2449
-
2450
- **Documentation:**
2451
-
2452
- - `one/knowledge/providers/wordpress-setup.md` (NEW)
2453
- - `one/knowledge/providers/notion-setup.md` (NEW)
2454
- - `one/knowledge/providers/provider-creation-guide.md` (NEW)
2455
- - `one/knowledge/providers/ontology-mapping.md` (NEW)
2456
-
2457
- ---
2458
-
2459
- ## Success Metrics
2460
-
2461
- **Technical:**
2462
-
2463
- - [ ] 200+ tests passing
2464
- - [ ] WordPress provider: < 500ms p99 latency
2465
- - [ ] Notion provider: < 1s p99 latency
2466
- - [ ] CompositeProvider: < 50ms routing overhead
2467
- - [ ] Zero data loss in stress testing
2468
- - [ ] All 6 dimensions fully implemented
2469
-
2470
- **User Experience:**
2471
-
2472
- - [ ] Organizations can switch providers in < 5 minutes
2473
- - [ ] No frontend code changes required
2474
- - [ ] Seamless experience regardless of backend
2475
- - [ ] Real-time updates working (polling/webhooks)
2476
-
2477
- **Documentation:**
2478
-
2479
- - [ ] 3 complete setup guides published
2480
- - [ ] Provider creation guide with examples
2481
- - [ ] API reference complete
2482
- - [ ] Troubleshooting guide covers 10+ common issues
2483
-
2484
- **Strategic:**
2485
-
2486
- - [ ] Proves backend-agnostic architecture works
2487
- - [ ] Demonstrates ONE's flexibility
2488
- - [ ] Enables organizations with existing infrastructure to adopt ONE
2489
- - [ ] Provides template for future provider implementations
2490
-
2491
- ---
2492
-
2493
- ## Next Steps
2494
-
2495
- 1. ✅ **Integration Specialist:** Create detailed specification (THIS FILE)
2496
- 2. **Integration Specialist:** Review with Engineering Director
2497
- 3. **Integration Specialist:** Set up WordPress test instance
2498
- 4. **Integration Specialist:** Set up Notion test workspace
2499
- 5. **Integration Specialist:** Implement WordPressProvider (Steps 1-40)
2500
- 6. **Integration Specialist:** Implement NotionProvider (Steps 41-75)
2501
- 7. **Integration Specialist:** Implement CompositeProvider (Steps 76-90)
2502
- 8. **Quality Agent:** Run full test suite
2503
- 9. **Integration Specialist:** Fix any failing tests
2504
- 10. **Documenter:** Write setup guides
2505
- 11. **Engineering Director:** Final review and approval
2506
- 12. **Integration Specialist:** Deploy to staging
2507
- 13. **Quality Agent:** Validate in staging
2508
- 14. **Engineering Director:** Deploy to production
2509
-
2510
- ---
2511
-
2512
- **Status:** Detailed Specification Complete ✅
2513
- **Created:** 2025-10-13
2514
- **Specification Completed:** 2025-10-13
2515
- **Validated By:** Integration Specialist (Self)
2516
- **Awaiting Review By:** Engineering Director
2517
- **Strategic Value:** Proves backend-agnostic architecture - enables organizations to use existing infrastructure (WordPress, Notion) while gaining ONE's AI capabilities
2518
- **Lines:** 1,486
2519
-
2520
- ---
2521
-
2522
- ## Appendix: WordPress Database Schema
2523
-
2524
- ```sql
2525
- -- wp_one_connections table
2526
- CREATE TABLE `wp_one_connections` (
2527
- `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
2528
- `from_thing_id` varchar(255) NOT NULL,
2529
- `to_thing_id` varchar(255) NOT NULL,
2530
- `relationship_type` varchar(100) NOT NULL,
2531
- `metadata` text,
2532
- `valid_from` bigint(20) unsigned,
2533
- `valid_to` bigint(20) unsigned,
2534
- `created_at` datetime NOT NULL,
2535
- PRIMARY KEY (`id`),
2536
- KEY `from_thing_id` (`from_thing_id`),
2537
- KEY `to_thing_id` (`to_thing_id`),
2538
- KEY `relationship_type` (`relationship_type`)
2539
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
2540
-
2541
- -- wp_one_events table
2542
- CREATE TABLE `wp_one_events` (
2543
- `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
2544
- `type` varchar(100) NOT NULL,
2545
- `actor_id` varchar(255),
2546
- `target_id` varchar(255),
2547
- `timestamp` datetime NOT NULL,
2548
- `metadata` text,
2549
- PRIMARY KEY (`id`),
2550
- KEY `type` (`type`),
2551
- KEY `actor_id` (`actor_id`),
2552
- KEY `target_id` (`target_id`),
2553
- KEY `timestamp` (`timestamp`)
2554
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
2555
-
2556
- -- wp_one_knowledge table
2557
- CREATE TABLE `wp_one_knowledge` (
2558
- `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
2559
- `knowledge_type` varchar(50) NOT NULL,
2560
- `text` longtext NOT NULL,
2561
- `embedding` longtext,
2562
- `embedding_model` varchar(100),
2563
- `embedding_dim` int(11),
2564
- `source_thing_id` varchar(255),
2565
- `source_field` varchar(100),
2566
- `labels` text,
2567
- `metadata` text,
2568
- `created_at` datetime NOT NULL,
2569
- `updated_at` datetime NOT NULL,
2570
- PRIMARY KEY (`id`),
2571
- KEY `knowledge_type` (`knowledge_type`),
2572
- KEY `source_thing_id` (`source_thing_id`)
2573
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
2574
- ```
2575
-
2576
- ---
2577
-
2578
- **END OF SPECIFICATION**