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,3847 +0,0 @@
1
- ---
2
- title: Ontology
3
- dimension: knowledge
4
- category: ontology.md
5
- tags: 6-dimensions, ai, architecture, ontology
6
- related_dimensions: connections, events, groups, people, things
7
- scope: global
8
- created: 2025-11-03
9
- updated: 2025-11-03
10
- version: 1.0.0
11
- ai_context: |
12
- This document is part of the knowledge dimension in the ontology.md category.
13
- Location: one/knowledge/ontology.md
14
- Purpose: Documents one platform - ontology specification
15
- Related dimensions: connections, events, groups, people, things
16
- For AI agents: Read this to understand ontology.
17
- ---
18
-
19
- # ONE Platform - Ontology Specification
20
-
21
- **Version:** 1.0.0 (Reality as DSL - The Universal Code Generation Language)
22
- **Status:** Complete - Reality-Aware Architecture
23
- **Design Principle:** This isn't just a data model. It's a Domain-Specific Language (DSL) that models reality itself, enabling 98% AI code generation accuracy through compound structure.
24
-
25
- ---
26
-
27
- ## Why This Changes Everything
28
-
29
- ### The Breakthrough: Reality as DSL
30
-
31
- **Most developers think databases model their application.**
32
-
33
- We flipped this. **The 6-dimension ontology models reality itself**. Applications map to it.
34
-
35
- This enables:
36
-
37
- - **98% AI code generation accuracy** (not 30-70%)
38
- - **Compound structure** (each feature makes the next MORE accurate, not less)
39
- - **Universal feature import** (clone ANY system into the ontology)
40
- - **Never breaks** (reality doesn't change, technology does)
41
-
42
- ### What AI Sees
43
-
44
- **Traditional Codebase (Pattern Divergence):**
45
-
46
- ```
47
- Feature 1: createUser(email) ────────┐
48
- Feature 2: addProduct(name) ─────────┼─→ 100 patterns
49
- Feature 3: registerCustomer(data) ───┤ AI confused
50
- Feature 4: insertOrder(items) ───────┤ Accuracy: 30%
51
- ...each uses different approach
52
- ```
53
-
54
- **ONE Codebase (Pattern Convergence):**
55
-
56
- ```
57
- Feature 1: provider.things.create({ type: "user" }) ────┐
58
- Feature 2: provider.things.create({ type: "product" }) ─┼─→ 1 pattern
59
- Feature 3: provider.things.create({ type: "customer" })─┤ AI masters it
60
- Feature 4: provider.things.create({ type: "order" }) ───┤ Accuracy: 98%
61
- ...all use same pattern
62
- ```
63
-
64
- **The difference:** Traditional codebases teach AI 100 patterns (chaos). ONE teaches AI 1 pattern (mastery).
65
-
66
- ### Why This Never Breaks
67
-
68
- **Reality is stable. Technology changes.**
69
-
70
- The 6 dimensions model reality:
71
-
72
- 1. **Groups** - Containers exist (friend circles → governments)
73
- 2. **People** - Actors authorize (who can do what)
74
- 3. **Things** - Entities exist (users, products, courses, agents)
75
- 4. **Connections** - Relationships relate (owns, purchased, enrolled_in)
76
- 5. **Events** - Actions happen (created, updated, purchased)
77
- 6. **Knowledge** - Understanding emerges (embeddings, search, RAG)
78
-
79
- These dimensions NEVER change because they model reality itself, not any specific technology.
80
-
81
- **Examples of systems that map perfectly:**
82
-
83
- - **Shopify** → Products (things), Orders (connections + events), Customers (people)
84
- - **Moodle** → Courses (things), Enrollments (connections), Completions (events)
85
- - **Stripe** → Payments (things), Transactions (connections + events), Customers (people)
86
- - **WordPress** → Posts (things), Authors (people), Categories (knowledge labels)
87
-
88
- **Every system maps to the same 6 dimensions.** That's why AI agents achieve 98% accuracy.
89
-
90
- ---
91
-
92
- ## Structure
93
-
94
- This ontology is organized into 6 dimension files:
95
-
96
- 1. **[organisation.md](./organisation.md)** - Multi-tenant isolation & ownership
97
- 2. **[people.md](./people.md)** - Authorization, governance, & user customization
98
- 3. **[things.md](./things.md)** - 66 entity types (what exists)
99
- 4. **[connections.md](./connections.md)** - 25 relationship types (how they relate)
100
- 5. **[events.md](./events.md)** - 67 event types (what happened)
101
- 6. **[knowledge.md](./knowledge.md)** - Vectors, embeddings, RAG (what it means)
102
-
103
- **Execution Guide:**
104
-
105
- 7. **[todo.md](./todo.md)** - 100-cycle execution sequence (plan in cycles, not days)
106
-
107
- **This document (Ontology.md)** contains the complete technical specification. The consolidated files above provide focused summaries and patterns.
108
-
109
- **Planning Paradigm:** We don't plan in days. We plan in **cycle passes** (Cycle 1-100). See [todo.md](./todo.md) for the complete 100-cycle template that guides feature implementation from idea to production.
110
-
111
- ## The 6-Dimension Reality Model
112
-
113
- **This is the universal interface.** Every feature in every system maps to these 6 dimensions.
114
-
115
- **Every single thing in ONE platform exists within one of these 6 dimensions:**
116
-
117
- ```
118
- ┌──────────────────────────────────────────────────────────────┐
119
- │ 1. GROUPS │
120
- │ Multi-tenant isolation with hierarchical nesting - who owns │
121
- │ what at group level (friend circles → DAOs → governments) │
122
- └──────────────────────────────────────────────────────────────┘
123
- ↓
124
- ┌──────────────────────────────────────────────────────────────┐
125
- │ 2. PEOPLE │
126
- │ Authorization & governance - platform owner, group owners │
127
- └──────────────────────────────────────────────────────────────┘
128
- ↓
129
- ┌──────────────────────────────────────────────────────────────┐
130
- │ 3. THINGS │
131
- │ Every "thing" - users, agents, content, tokens, courses │
132
- └──────────────────────────────────────────────────────────────┘
133
- ↓
134
- ┌──────────────────────────────────────────────────────────────┐
135
- │ 4. CONNECTIONS │
136
- │ Every relationship - owns, follows, taught_by, powers │
137
- └──────────────────────────────────────────────────────────────┘
138
- ↓
139
- ┌──────────────────────────────────────────────────────────────┐
140
- │ 5. EVENTS │
141
- │ Every action - purchased, created, viewed, completed │
142
- └──────────────────────────────────────────────────────────────┘
143
- ↓
144
- ┌──────────────────────────────────────────────────────────────┐
145
- │ 6. KNOWLEDGE │
146
- │ Labels + chunks + vectors powering RAG & search │
147
- └──────────────────────────────────────────────────────────────┘
148
- ```
149
-
150
- **The Universal Interface (How Technology Implements the Ontology):**
151
-
152
- ```
153
- ┌─────────────────────────────────────────────────────────────────────┐
154
- │ LAYER 1: UNIVERSAL INTERFACE │
155
- │ (The 6-Dimension DSL) │
156
- ├─────────────────────────────────────────────────────────────────────┤
157
- │ groups → Hierarchical containers (friend circles → governments)│
158
- │ people → Authorization & governance (who can do what) │
159
- │ things → All entities (66 types: user, product, course...) │
160
- │ connections → All relationships (25 types: owns, purchased...) │
161
- │ events → All actions (67 types: created, updated, logged...) │
162
- │ knowledge → AI understanding (embeddings, search, RAG) │
163
- │ │
164
- │ This layer NEVER changes. It models reality. │
165
- └──────────────────┬──────────────────────────────────────────────────┘
166
- │
167
- ↓ Technology changes, ontology stays the same
168
-
169
- ┌─────────────────────────────────────────────────────────────────────┐
170
- │ TECHNOLOGY ADAPTERS (swap freely) │
171
- │ (Convex, Hono, Astro, React, etc.) │
172
- ├─────────────────────────────────────────────────────────────────────┤
173
- │ Backend: Hono API + Convex Database (implements ontology) │
174
- │ Frontend: Astro SSR + React Islands (renders ontology) │
175
- │ Real-time: Convex hooks (live ontology subscriptions) │
176
- │ Static: Astro Content Collections (ontology as files) │
177
- │ │
178
- │ Technology can be swapped. Ontology stays the same. │
179
- └─────────────────────────────────────────────────────────────────────┘
180
- ```
181
-
182
- ### Dimension 1: Groups (Containers)
183
-
184
- **Purpose:** Partition the system with hierarchical nesting (friend circles → DAOs → governments)
185
-
186
- **Why it never changes:** Containers always contain things. Whether it's a lemonade stand or a global government, the concept of "container" is universal.
187
-
188
- **Pattern for AI:**
189
-
190
- ```typescript
191
- // AI learns: Everything belongs to a group
192
- provider.things.create({ groupId, type, name, properties });
193
- ```
194
-
195
- **Example mappings:**
196
-
197
- - Shopify Store → group (type: business)
198
- - Moodle School → group (type: organization)
199
- - DAO Treasury → group (type: dao)
200
- - Friend Circle → group (type: friend_circle)
201
-
202
- ### Dimension 2: People (Authorization)
203
-
204
- **Purpose:** Define who can do what (actors, roles, permissions)
205
-
206
- **Why it never changes:** Authorization is a universal concept. Someone always performs actions.
207
-
208
- **Pattern for AI:**
209
-
210
- ```typescript
211
- // AI learns: Every action has an actor
212
- events.log({ actorId: personId, type, targetId });
213
- ```
214
-
215
- **Example mappings:**
216
-
217
- - Shopify Admin → person (role: org_owner)
218
- - Moodle Student → person (role: customer)
219
- - Platform Owner → person (role: platform_owner)
220
- - Team Member → person (role: org_user)
221
-
222
- ### Dimension 3: Things (Entities)
223
-
224
- **Purpose:** All nouns in the system (66 types, infinitely extensible)
225
-
226
- **Why it never changes:** Entities exist. Users, products, courses, agents—these are all "things" with different types.
227
-
228
- **Pattern for AI:**
229
-
230
- ```typescript
231
- // AI learns: One pattern for all entities
232
- provider.things.create({ type: "product" | "course" | "user" | ..., name, properties })
233
- ```
234
-
235
- **Example mappings:**
236
-
237
- - Shopify Product → thing (type: product)
238
- - Moodle Course → thing (type: course)
239
- - Stripe Payment → thing (type: payment)
240
- - WordPress Post → thing (type: blog_post)
241
-
242
- **New entity type?** Just add to `properties`. No schema migration needed.
243
-
244
- ### Dimension 4: Connections (Relationships)
245
-
246
- **Purpose:** How entities relate to each other (25 types + metadata)
247
-
248
- **Why it never changes:** Relationships are universal. Things connect to other things.
249
-
250
- **Pattern for AI:**
251
-
252
- ```typescript
253
- // AI learns: One pattern for all relationships
254
- provider.connections.create({
255
- fromThingId,
256
- toThingId,
257
- relationshipType,
258
- metadata,
259
- });
260
- ```
261
-
262
- **Example mappings:**
263
-
264
- - Shopify Order → connection (type: purchased) + event (type: order_placed)
265
- - Moodle Enrollment → connection (type: enrolled_in)
266
- - GitHub Follows → connection (type: following)
267
- - Token Holdings → connection (type: holds_tokens, metadata: { balance })
268
-
269
- ### Dimension 5: Events (Actions)
270
-
271
- **Purpose:** Complete audit trail of what happened when (67 types + metadata)
272
-
273
- **Why it never changes:** Actions happen at specific times. This is universal.
274
-
275
- **Pattern for AI:**
276
-
277
- ```typescript
278
- // AI learns: All actions are logged the same way
279
- provider.events.log({ type, actorId, targetId, timestamp, metadata });
280
- ```
281
-
282
- **Example mappings:**
283
-
284
- - Shopify Checkout → event (type: payment_processed)
285
- - Moodle Lesson View → event (type: content_viewed)
286
- - User Login → event (type: user_login)
287
- - Token Purchase → event (type: tokens_purchased)
288
-
289
- ### Dimension 6: Knowledge (Understanding)
290
-
291
- **Purpose:** Labels, embeddings, and semantic search for AI
292
-
293
- **Why it never changes:** Categorization and understanding are universal concepts.
294
-
295
- **Pattern for AI:**
296
-
297
- ```typescript
298
- // AI learns: Knowledge is linked to things
299
- provider.knowledge.create({
300
- sourceThingId,
301
- knowledgeType: "label" | "chunk",
302
- text,
303
- embedding,
304
- });
305
- ```
306
-
307
- **Example mappings:**
308
-
309
- - WordPress Categories → knowledge (type: label)
310
- - Course Content → knowledge (type: chunk, embedding: [...])
311
- - Product Tags → knowledge (type: label)
312
- - Semantic Search → knowledge vector search
313
-
314
- ---
315
-
316
- **Golden Rule:** If you can't map your feature to these 6 dimensions, you're thinking about it wrong.
317
-
318
- **For AI Agents:** This ontology is your universal language. Learn these 6 patterns and you can generate ANY feature with 98% accuracy.
319
-
320
- ---
321
-
322
- ## Compound Structure Accuracy: Why AI Gets Better Over Time
323
-
324
- ### Traditional AI Code Generation (Pattern Divergence)
325
-
326
- **The death spiral:**
327
-
328
- ```
329
- Generation 1: Clean code → 95% accurate
330
- Generation 2: Slight drift → 90% accurate (-5% - patterns starting to diverge)
331
- Generation 3: Pattern divergence → 80% accurate (-10% - AI sees multiple patterns)
332
- Generation 4: Inconsistency → 65% accurate (-15% - AI confused by variations)
333
- Generation N: Unmaintainable mess → 30% accurate (-20% - complete chaos)
334
- ```
335
-
336
- **Why?** Each feature introduces NEW patterns. AI has to guess which pattern to use.
337
-
338
- ### ONE's AI Code Generation (Pattern Convergence)
339
-
340
- **The virtuous cycle:**
341
-
342
- ```
343
- Generation 1: Maps to ontology → 85% accurate (learning the ontology)
344
- Generation 2: Follows patterns → 90% accurate (+5% - recognizing service pattern)
345
- Generation 3: Reuses services → 93% accurate (+3% - composing existing services)
346
- Generation 4: Predictable structure → 96% accurate (+3% - mastering Effect.ts patterns)
347
- Generation N: Perfect consistency → 98%+ accurate (+2% - generalized patterns)
348
- ```
349
-
350
- **Why?** Each feature uses the SAME patterns. AI masters the ontology, then reuses it.
351
-
352
- ### How Agents Learn the Ontology
353
-
354
- **Generation 1-5: Learning (85% accurate)**
355
-
356
- ```
357
- Agent thinks:
358
- "I see things being created with `type` field. Let me check..."
359
- "All entities are things? Even users, products, courses?"
360
- "Connections link things together. Got it."
361
- "Events log actions. People are actors."
362
- "Pattern emerging: 6 dimensions for everything."
363
- CONFIDENCE: 85% (still learning)
364
- ```
365
-
366
- **Generation 6-20: Recognizing (90% accurate)**
367
-
368
- ```
369
- Agent thinks:
370
- "Every create operation uses provider.things.create. 100% of the time."
371
- "Every service uses Effect.gen. Pattern confirmed."
372
- "All errors are tagged unions. I can handle exhaustively."
373
- "Dependencies are injected. I know what's needed."
374
- CONFIDENCE: 90% (pattern recognized)
375
- ```
376
-
377
- **Generation 21-50: Composing (93% accurate)**
378
-
379
- ```
380
- Agent thinks:
381
- "I can reuse existing services:"
382
- "- createThing service exists"
383
- "- createConnection service exists"
384
- "- logEvent service exists"
385
- "My new feature: compose these three services."
386
- "No new patterns needed. Just composition."
387
- CONFIDENCE: 93% (composing existing patterns)
388
- ```
389
-
390
- **Generation 51-100: Mastering (96% accurate)**
391
-
392
- ```
393
- Agent thinks:
394
- "I've generated 50 services. All follow same structure:"
395
- "1. Get provider from context"
396
- "2. Call provider operation"
397
- "3. Handle typed errors"
398
- "4. Return typed result"
399
- "Pattern is UNIVERSAL. Works for ANY feature."
400
- CONFIDENCE: 96% (mastered the structure)
401
- ```
402
-
403
- **Generation 100+: Generalizing (98%+ accurate)**
404
-
405
- ```
406
- Agent thinks:
407
- "I don't even need to think. The pattern IS the system."
408
- "New feature request? Map to 6 dimensions."
409
- "Need validation? Effect.ts service."
410
- "Need data? Provider interface."
411
- "Need state? Nanostores."
412
- "Every decision is deterministic."
413
- CONFIDENCE: 98%+ (system internalized)
414
- ```
415
-
416
- ### What This Means for Development
417
-
418
- **Feature #1:**
419
-
420
- - Traditional: 8 hours (70% AI, 30% human)
421
- - ONE: 8 hours (70% AI, 30% human)
422
- - **No difference yet**
423
-
424
- **Feature #10:**
425
-
426
- - Traditional: 10 hours (60% AI, 40% human - patterns diverging)
427
- - ONE: 6 hours (85% AI, 15% human - patterns converging)
428
- - **ONE is 1.7x faster**
429
-
430
- **Feature #50:**
431
-
432
- - Traditional: 16 hours (40% AI, 60% human - technical debt)
433
- - ONE: 3 hours (95% AI, 5% human - pattern mastery)
434
- - **ONE is 5.3x faster**
435
-
436
- **Feature #100:**
437
-
438
- - Traditional: 24 hours (25% AI, 75% human - chaos)
439
- - ONE: 1.5 hours (98% AI, 2% human - generalized)
440
- - **ONE is 16x faster**
441
-
442
- **Cumulative for 100 features:**
443
-
444
- - Traditional: 1,400 hours
445
- - ONE: 350 hours
446
- - **ONE is 4x faster overall**
447
- - **And the gap keeps growing**
448
-
449
- ### Why Schema Migrations Never Break This
450
-
451
- **New entity type?**
452
-
453
- ```typescript
454
- // NO schema migration needed
455
- { type: "new_thing", name: "...", properties: { ...custom } }
456
- ```
457
-
458
- **New field on existing type?**
459
-
460
- ```typescript
461
- // NO schema migration needed
462
- { type: "product", properties: { price, SKU, newField: "value" } }
463
- ```
464
-
465
- **New relationship?**
466
-
467
- ```typescript
468
- // NO schema migration needed
469
- { relationshipType: "new_connection", metadata: { ...custom } }
470
- ```
471
-
472
- **New protocol integration?**
473
-
474
- ```typescript
475
- // NO schema migration needed
476
- {
477
- relationshipType: "transacted",
478
- metadata: { protocol: "new_protocol", ...custom }
479
- }
480
- ```
481
-
482
- **Result:** Technology changes (React → Svelte, REST → GraphQL), but the ontology stays the same forever.
483
-
484
- ---
485
-
486
- ## GROUPS: The Isolation Boundary with Hierarchical Nesting
487
-
488
- Purpose: Partition the system with perfect isolation and support nested groups (groups within groups) - from friend circles to DAOs to governments. Every group owns its own graph of things, connections, events, and knowledge.
489
-
490
- ### Group Structure
491
-
492
- ```typescript
493
- {
494
- _id: Id<'groups'>,
495
- slug: string, // REQUIRED: URL identifier (/group/slug)
496
- name: string, // REQUIRED: Display name
497
- type: 'friend_circle' | 'business' | 'community' | 'dao' | 'government' | 'organization',
498
- parentGroupId?: Id<'groups'>, // OPTIONAL: Parent group for hierarchical nesting
499
- description?: string, // OPTIONAL: About text
500
-
501
- metadata: Record<string, any>,
502
-
503
- settings: {
504
- visibility: 'public' | 'private',
505
- joinPolicy: 'open' | 'invite_only' | 'approval_required',
506
- plan: 'starter' | 'pro' | 'enterprise',
507
- limits: {
508
- users: number,
509
- storage: number, // GB
510
- apiCalls: number,
511
- }
512
- },
513
-
514
- status: 'active' | 'archived',
515
- createdAt: number,
516
- updatedAt: number,
517
- }
518
- ```
519
-
520
- ### Common Fields by Use Case
521
-
522
- **Identity:** `[slug, name]` - Who they are + URL
523
- **Web:** `[slug, name, description]` - Website generation
524
- **Operations:** `[status, type, settings, parentGroupId]` - System management
525
-
526
- ### Why Groups Matter
527
-
528
- 1. **Multi-Tenant Isolation:** Each group's data is completely separate
529
- 2. **Hierarchical Nesting:** Groups can contain sub-groups for complex organizations (parent → child → grandchild...)
530
- 3. **Flexible Types:** From friend circles (2 people) to businesses to DAOs to governments (billions)
531
- 4. **Resource Quotas:** Control costs and usage per group
532
- 5. **Privacy Control:** Groups can be public or private with controlled access
533
- 6. **Flexible Scale:** Scales from friend circles to global governments without schema changes
534
-
535
- ### Hierarchical Group Examples by Domain
536
-
537
- **E-Commerce (Retail Chain):**
538
-
539
- ```
540
- Corporate Headquarters (group)
541
- ├─ North American Division (child group)
542
- │ ├─ New York Store (grandchild group)
543
- │ └─ California Store (grandchild group)
544
- └─ European Division (child group)
545
- ├─ London Store (grandchild group)
546
- └─ Paris Store (grandchild group)
547
- ```
548
-
549
- **Education (University System):**
550
-
551
- ```
552
- MIT (group)
553
- ├─ School of Engineering (child group)
554
- │ ├─ Computer Science Dept (grandchild group)
555
- │ ├─ Electrical Engineering Dept (grandchild group)
556
- │ └─ Mechanical Engineering Dept (grandchild group)
557
- ├─ School of Science (child group)
558
- │ ├─ Mathematics Dept (grandchild group)
559
- │ └─ Physics Dept (grandchild group)
560
- └─ School of Business (child group)
561
- ```
562
-
563
- **Creator (Multi-Channel Brand):**
564
-
565
- ```
566
- Creator Brand (group)
567
- ├─ YouTube Channel (child group)
568
- │ └─ Content Series 1 (grandchild group)
569
- ├─ Podcast (child group)
570
- │ └─ Season 2 (grandchild group)
571
- └─ Community (child group - Discord server with channels)
572
- ```
573
-
574
- **Crypto (DAO Treasury):**
575
-
576
- ```
577
- DAO Treasury (group)
578
- ├─ Core Operations (child group)
579
- │ ├─ Development Fund (grandchild group)
580
- │ └─ Marketing Fund (grandchild group)
581
- ├─ Investment Committee (child group)
582
- │ └─ Venture Capital Allocation (grandchild group)
583
- └─ Community Grants (child group)
584
- ```
585
-
586
- ---
587
-
588
- ## PEOPLE: Authorization & Governance
589
-
590
- Purpose: Define who can do what. People direct groups, customize AI agents, and govern access.
591
-
592
- ### Person Structure
593
-
594
- ```typescript
595
- {
596
- _id: Id<'people'>,
597
- email: string,
598
- username: string,
599
- displayName: string,
600
-
601
- // CRITICAL: Role determines access level
602
- role: 'platform_owner' | 'group_owner' | 'group_user' | 'customer',
603
-
604
- // Group context
605
- groupId?: Id<'groups'>, // Current/default group
606
- permissions?: string[],
607
-
608
- // Profile
609
- bio?: string,
610
- avatar?: string,
611
-
612
- // Multi-tenant tracking
613
- groups: Id<'groups'>[], // All groups this person belongs to
614
-
615
- createdAt: number,
616
- updatedAt: number,
617
- }
618
- ```
619
-
620
- ### Four Roles
621
-
622
- 1. **Platform Owner** (Anthony)
623
- - Owns the ONE Platform
624
- - 100% revenue from platform-level services
625
- - Can access all groups (support/debugging)
626
- - Creates new groups
627
-
628
- 2. **Group Owner**
629
- - Owns/manages one or more groups
630
- - Controls users, permissions, billing within group
631
- - Customizes AI agents and frontend
632
- - Revenue sharing with platform
633
-
634
- 3. **Group User**
635
- - Works within a group
636
- - Limited permissions (defined by group owner)
637
- - Can create content, run agents (within quotas)
638
-
639
- 4. **Customer**
640
- - External user consuming content
641
- - Purchases tokens, enrolls in courses
642
- - No admin access
643
-
644
- ### Why People Matter
645
-
646
- 1. **Authorization:** Every action must have an actor (person)
647
- 2. **Governance:** Group owners control who can do what
648
- 3. **Audit Trail:** Events log who did what when
649
- 4. **Customization:** People teach AI agents their preferences
650
-
651
- ---
652
-
653
- ## KNOWLEDGE: Labels, Chunks, and Vectors (RAG)
654
-
655
- Purpose: unify taxonomy (“tags”) and retrieval‑augmented generation (RAG) under one table. A knowledge item can be a label (former tag), a document wrapper, or a chunk with an embedding.
656
-
657
- Design principles:
658
-
659
- - Protocol‑agnostic: store protocol details in `metadata`.
660
- - Many‑to‑many: link knowledge ⇄ things via `thingKnowledge` with optional context metadata.
661
- - Scalable: consolidated types minimize index fan‑out; embeddings enable semantic search.
662
-
663
- ### Knowledge Types
664
-
665
- ```typescript
666
- type KnowledgeType =
667
- | "label" // replaces legacy "tag"; lightweight categorical marker
668
- | "document" // wrapper for a source text/blob (pre-chunking)
669
- | "chunk" // atomic chunk of text with embedding
670
- | "vector_only"; // embedding without stored text (e.g., privacy)
671
- ```
672
-
673
- ### Knowledge Structure
674
-
675
- ```typescript
676
- {
677
- _id: Id<'knowledge'>,
678
- knowledgeType: KnowledgeType,
679
- // Textual content (optional for label/vector_only)
680
- text?: string,
681
- // Embedding for semantic search (optional for label/document)
682
- embedding?: number[], // Float32 vector; model-dependent dimension
683
- embeddingModel?: string, // e.g., "text-embedding-3-large"
684
- embeddingDim?: number,
685
- // Source linkage
686
- sourceThingId?: Id<'things'>, // Primary source entity
687
- sourceField?: string, // e.g., 'content', 'transcript', 'title'
688
- chunk?: { index: number; start?: number; end?: number; tokenCount?: number; overlap?: number },
689
- // Lightweight categorization (free-form)
690
- labels?: string[], // Replaces per-thing tags; applied to knowledge
691
- // Additional metadata (protocol, language, mime, hash, version)
692
- metadata?: Record<string, any>,
693
- createdAt: number,
694
- updatedAt: number,
695
- deletedAt?: number,
696
- }
697
- ```
698
-
699
- ### Junction: thingKnowledge
700
-
701
- ```typescript
702
- {
703
- _id: Id<'thingKnowledge'>,
704
- thingId: Id<'things'>,
705
- knowledgeId: Id<'knowledge'>,
706
- role?: 'label' | 'summary' | 'chunk_of' | 'caption' | 'keyword',
707
- // Context for the link (e.g., confidence, section name)
708
- metadata?: Record<string, any>,
709
- createdAt: number,
710
- }
711
- ```
712
-
713
- ### Indexes (recommended)
714
-
715
- - `knowledge.by_type` (knowledgeType)
716
- - `knowledge.by_source` (sourceThingId)
717
- - `knowledge.by_created` (createdAt)
718
- - `thingKnowledge.by_thing` (thingId)
719
- - `thingKnowledge.by_knowledge` (knowledgeId)
720
- - Vector index (provider-dependent): `knowledge.by_embedding` for ANN search
721
-
722
- ### How Domains Apply Knowledge
723
-
724
- **Education - Learning Objectives & Study Materials:**
725
-
726
- ```typescript
727
- // Knowledge: Learning objective chunk
728
- {
729
- knowledgeType: 'chunk',
730
- text: 'Students should be able to solve quadratic equations',
731
- sourceThingId: courseId,
732
- labels: ['subject:mathematics', 'grade:9-12', 'objective:apply', 'skill:algebra']
733
- }
734
-
735
- // Link: Course references this learning objective
736
- {
737
- thingId: courseId,
738
- knowledgeId: knowledgeId,
739
- role: 'learning_objective'
740
- }
741
- ```
742
-
743
- **Creator - Content SEO & Discovery:**
744
-
745
- ```typescript
746
- // Knowledge: Video description chunk with embedded metadata
747
- {
748
- knowledgeType: 'chunk',
749
- text: 'This video teaches React hooks for beginners...',
750
- sourceThingId: videoId,
751
- embedding: [0.1, 0.2, ...],
752
- labels: ['topic:react', 'difficulty:beginner', 'platform:youtube', 'series:javascript101']
753
- }
754
- ```
755
-
756
- **E-Commerce - Product Categorization & Search:**
757
-
758
- ```typescript
759
- // Knowledge: Product description for semantic search
760
- {
761
- knowledgeType: 'document',
762
- text: 'Blue wireless headphones with 40-hour battery life',
763
- sourceThingId: productId,
764
- embedding: [0.5, 0.3, ...],
765
- labels: ['category:electronics', 'color:blue', 'feature:wireless', 'price_range:premium']
766
- }
767
- ```
768
-
769
- **Crypto - Risk Analysis & Token Intelligence:**
770
-
771
- ```typescript
772
- // Knowledge: Token risk assessment
773
- {
774
- knowledgeType: 'chunk',
775
- text: 'Token has no minting restrictions, moderate holder concentration',
776
- sourceThingId: tokenId,
777
- labels: ['risk:medium', 'metric:tvl_trend_up', 'audit:completed', 'governance:none']
778
- }
779
-
780
- // Knowledge: Protocol dependency analysis
781
- {
782
- knowledgeType: 'label',
783
- text: 'Depends on Chainlink oracle',
784
- sourceThingId: protocolId,
785
- labels: ['dependency:critical', 'type:oracle', 'risk_factor:oracle']
786
- }
787
- ```
788
-
789
- **Notes:**
790
-
791
- - The legacy ThingType `embedding` is deprecated for operational vectors; use the `knowledge` table with `knowledgeType: 'chunk' | 'vector_only'`.
792
- - Labels (formerly tags) now live in `knowledge.labels` and via `thingKnowledge` relations. Use labels to curate taxonomy without enum churn.
793
- - Domain-specific labels follow `category:value` pattern for semantic organization (e.g., `subject:math`, `platform:youtube`, `risk:high`).
794
-
795
- ---
796
-
797
- ## THINGS: All The "Things"
798
-
799
- ### What Goes in Things?
800
-
801
- **Simple test:** If you can point at it and say "this is a \_\_\_", it's a thing.
802
-
803
- Examples:
804
-
805
- - "This is a **creator**" ✅ Thing
806
- - "This is a **blog post**" ✅ Thing
807
- - "This is a **token**" ✅ Thing
808
- - "This is a **relationship**" ❌ Connection, not thing
809
- - "This is a **purchase**" ❌ Event, not thing
810
-
811
- ### Thing Types
812
-
813
- **66 Types Organized in 13 Categories:**
814
-
815
- ```typescript
816
- type ThingType =
817
- // CORE (4)
818
- | "creator" // Human creator (role: platform_owner, org_owner, org_user, customer)
819
- | "ai_clone" // Digital twin of creator
820
- | "audience_member" // Fan/user (role: customer)
821
- | "organization" // Multi-tenant organization
822
-
823
- // BUSINESS AGENTS (10)
824
- | "strategy_agent" // Vision, planning, OKRs
825
- | "research_agent" // Market, trends, competitors
826
- | "marketing_agent" // Content strategy, SEO, distribution
827
- | "sales_agent" // Funnels, conversion, follow-up
828
- | "service_agent" // Support, onboarding, success
829
- | "design_agent" // Brand, UI/UX, assets
830
- | "engineering_agent" // Tech, integration, automation
831
- | "finance_agent" // Revenue, costs, forecasting
832
- | "legal_agent" // Compliance, contracts, IP
833
- | "intelligence_agent" // Analytics, insights, predictions
834
-
835
- // CONTENT (7)
836
- | "blog_post" // Written content (guides, newsletters, articles)
837
- | "video" // Video content (lectures, demos, shorts)
838
- | "podcast" // Audio content (episodes, interviews)
839
- | "social_post" // Social media post (all platforms)
840
- | "email" // Email content (campaigns, newsletters)
841
- | "course" // Educational course (programs, learning paths)
842
- | "lesson" // Individual lesson (units, modules, segments)
843
-
844
- // PRODUCTS (4)
845
- | "digital_product" // Templates, tools, assets
846
- | "membership" // Tiered membership (Patreon, Substack)
847
- | "consultation" // 1-on-1 session (coaching, support)
848
- | "nft" // NFT collectible (governance, utility)
849
-
850
- // COMMUNITY (3)
851
- | "community" // Community space (Discord, forums)
852
- | "conversation" // Thread/discussion (boards, channels)
853
- | "message" // Individual message (chat, DM)
854
-
855
- // TOKEN (2)
856
- | "token" // Actual token instance
857
- | "token_contract" // Smart contract
858
-
859
- // KNOWLEDGE (2)
860
- | "knowledge_item" // Piece of creator knowledge
861
- | "embedding" // Vector embedding
862
-
863
- // PLATFORM (6)
864
- | "website" // Auto-generated creator site
865
- | "landing_page" // Custom landing pages (campaigns, sales)
866
- | "template" // Design templates (reusable components)
867
- | "livestream" // Live broadcast (streaming, webinars)
868
- | "recording" // Saved livestream content
869
- | "media_asset" // Images, videos, files
870
-
871
- // BUSINESS (7)
872
- | "payment" // Payment transaction
873
- | "subscription" // Recurring subscription
874
- | "invoice" // Invoice record
875
- | "metric" // Tracked metric
876
- | "insight" // AI-generated insight
877
- | "prediction" // AI prediction
878
- | "report" // Analytics report
879
-
880
- // AUTHENTICATION & SESSION (5)
881
- | "session" // User session (Better Auth)
882
- | "oauth_account" // OAuth connection (GitHub, Google)
883
- | "verification_token" // Email/2FA verification token
884
- | "password_reset_token" // Password reset token
885
- | "ui_preferences" // User UI settings (theme, layout)
886
-
887
- // MARKETING (6)
888
- | "notification" // System notification
889
- | "email_campaign" // Email marketing campaign
890
- | "announcement" // Platform announcement
891
- | "referral" // Referral record
892
- | "campaign" // Marketing campaign
893
- | "lead" // Potential customer/lead
894
-
895
- // EXTERNAL INTEGRATIONS (3)
896
- | "external_agent" // External AI agent (ElizaOS)
897
- | "external_workflow" // External workflow (n8n, Zapier)
898
- | "external_connection" // Connection config
899
-
900
- // PROTOCOL ENTITIES (2, protocol-agnostic)
901
- | "mandate" // Intent/cart (AP2, shopping)
902
- | "product"; // Sellable product (ACP marketplace)
903
- ```
904
-
905
- **How Domains Apply These Types:**
906
-
907
- - **E-Commerce**: Uses `product` (catalog items), `mandate` (shopping carts), `payment` (transactions), `subscription` (auto-renewals), `membership` (loyalty), `notification` (order updates), `email_campaign` (promotional)
908
- - **Education**: Uses `course` (programs), `lesson` (units), `community` (cohorts), `assignment` (assessments), `conversation` (discussion boards), `metric` (grades), `report` (transcripts)
909
- - **Creator**: Uses `video` (YouTube/TikTok), `podcast` (episodes), `blog_post` (newsletters), `membership` (tiers), `course` (products), `email_campaign` (outreach), `metric` (engagement), `insight` (analytics)
910
- - **Crypto**: Uses `token` (holdings), `token_contract` (smart contracts), `metric` (TVL/volume), `payment` (transfers), `knowledge_item` (risk profiles), `report` (protocol analysis)
911
-
912
- ### Thing Structure
913
-
914
- ```typescript
915
- {
916
- _id: Id<"things">,
917
- type: ThingType,
918
- name: string, // Display name
919
- properties: { // Type-specific properties (JSON)
920
- // For creator:
921
- email?: string,
922
- username?: string,
923
- niche?: string[],
924
- // For token:
925
- contractAddress?: string,
926
- totalSupply?: number,
927
- // etc...
928
- },
929
- status: "active" | "inactive" | "draft" | "published" | "archived",
930
- createdAt: number,
931
- updatedAt: number,
932
- deletedAt?: number
933
- }
934
- ```
935
-
936
- ### Properties by Thing Type
937
-
938
- **Creator Properties:**
939
-
940
- ```typescript
941
- {
942
- email: string,
943
- username: string,
944
- displayName: string,
945
- bio?: string,
946
- avatar?: string,
947
- niche: string[],
948
- expertise: string[],
949
- targetAudience: string,
950
- brandColors?: {
951
- primary: string,
952
- secondary: string,
953
- accent: string
954
- },
955
- totalFollowers: number,
956
- totalContent: number,
957
- totalRevenue: number,
958
- // MULTI-TENANT ROLES
959
- role: "platform_owner" | "group_owner" | "group_user" | "customer",
960
- groupId?: Id<"groups">, // Current/default group (if group_owner or group_user)
961
- permissions?: string[], // Additional permissions
962
- }
963
- ```
964
-
965
- **Organization Properties:**
966
-
967
- ```typescript
968
- {
969
- name: string,
970
- slug: string, // URL-friendly identifier
971
- domain?: string, // Custom domain (e.g., acme.one.ie)
972
- logo?: string,
973
- description?: string,
974
- status: "active" | "suspended" | "trial" | "cancelled",
975
- plan: "starter" | "pro" | "enterprise",
976
- limits: {
977
- users: number, // Max users allowed
978
- storage: number, // GB
979
- apiCalls: number, // Per month
980
- },
981
- usage: {
982
- users: number, // Current users
983
- storage: number, // GB used
984
- apiCalls: number, // This month
985
- },
986
- billing: {
987
- customerId?: string, // Stripe customer ID
988
- subscriptionId?: string, // Stripe subscription ID
989
- currentPeriodEnd?: number,
990
- },
991
- settings: {
992
- allowSignups: boolean,
993
- requireEmailVerification: boolean,
994
- enableTwoFactor: boolean,
995
- allowedDomains?: string[], // Email domain whitelist
996
- },
997
- createdAt: number,
998
- trialEndsAt?: number,
999
- }
1000
- ```
1001
-
1002
- **AI Clone Properties:**
1003
-
1004
- ```typescript
1005
- {
1006
- voiceId?: string,
1007
- voiceProvider?: "elevenlabs" | "azure" | "custom",
1008
- appearanceId?: string,
1009
- appearanceProvider?: "d-id" | "heygen" | "custom",
1010
- systemPrompt: string,
1011
- temperature: number,
1012
- knowledgeBaseSize: number,
1013
- lastTrainingDate: number,
1014
- totalInteractions: number,
1015
- satisfactionScore: number
1016
- }
1017
- ```
1018
-
1019
- **Agent Properties:**
1020
-
1021
- ```typescript
1022
- {
1023
- agentType: "strategy" | "marketing" | "sales" | ...,
1024
- systemPrompt: string,
1025
- model: string,
1026
- temperature: number,
1027
- capabilities: string[],
1028
- tools: string[],
1029
- totalExecutions: number,
1030
- successRate: number,
1031
- averageExecutionTime: number
1032
- }
1033
- ```
1034
-
1035
- **Token Properties:**
1036
-
1037
- ```typescript
1038
- {
1039
- contractAddress: string,
1040
- blockchain: "base" | "ethereum" | "polygon",
1041
- standard: "ERC20" | "ERC721" | "ERC1155",
1042
- totalSupply: number,
1043
- circulatingSupply: number,
1044
- price: number,
1045
- marketCap: number,
1046
- utility: string[],
1047
- burnRate: number,
1048
- holders: number,
1049
- transactions24h: number,
1050
- volume24h: number
1051
- }
1052
- ```
1053
-
1054
- **Course Properties:**
1055
-
1056
- ```typescript
1057
- {
1058
- title: string,
1059
- description: string,
1060
- thumbnail?: string,
1061
- modules: number,
1062
- lessons: number,
1063
- totalDuration: number,
1064
- price: number,
1065
- currency: string,
1066
- tokenPrice?: number,
1067
- enrollments: number,
1068
- completions: number,
1069
- averageRating: number,
1070
- generatedBy: "ai" | "human" | "hybrid",
1071
- personalizationLevel: "none" | "basic" | "advanced"
1072
- }
1073
- ```
1074
-
1075
- **Website Properties:**
1076
-
1077
- ```typescript
1078
- {
1079
- domain: string,
1080
- subdomain: string, // creator.one.ie
1081
- template: "minimal" | "showcase" | "portfolio",
1082
- customCSS?: string,
1083
- customDomain?: string,
1084
- sslEnabled: boolean,
1085
- analytics: {
1086
- visitors30d: number,
1087
- pageViews: number,
1088
- conversionRate: number
1089
- }
1090
- }
1091
- ```
1092
-
1093
- **Livestream Properties:**
1094
-
1095
- ```typescript
1096
- {
1097
- title: string,
1098
- scheduledAt: number,
1099
- startedAt?: number,
1100
- endedAt?: number,
1101
- platform: "youtube" | "twitch" | "custom",
1102
- streamUrl: string,
1103
- recordingUrl?: string,
1104
- viewersPeak: number,
1105
- viewersAverage: number,
1106
- chatEnabled: boolean,
1107
- aiCloneMixEnabled: boolean, // For human + AI mixing
1108
- status: "scheduled" | "live" | "ended" | "cancelled"
1109
- }
1110
- ```
1111
-
1112
- **Payment Properties:**
1113
-
1114
- ```typescript
1115
- {
1116
- amount: number,
1117
- currency: "usd" | "eur",
1118
- paymentMethod: "stripe" | "crypto",
1119
- stripePaymentIntentId?: string,
1120
- txHash?: string, // Blockchain transaction
1121
- status: "pending" | "completed" | "failed" | "refunded",
1122
- fees: number,
1123
- netAmount: number,
1124
- processedAt?: number
1125
- }
1126
- ```
1127
-
1128
- **Subscription Properties:**
1129
-
1130
- ```typescript
1131
- {
1132
- tier: "starter" | "pro" | "enterprise",
1133
- price: number,
1134
- currency: string,
1135
- interval: "monthly" | "yearly",
1136
- status: "active" | "cancelled" | "past_due" | "expired",
1137
- currentPeriodStart: number,
1138
- currentPeriodEnd: number,
1139
- cancelAt?: number,
1140
- stripeSubscriptionId?: string
1141
- }
1142
- ```
1143
-
1144
- **Metric Properties:**
1145
-
1146
- ```typescript
1147
- {
1148
- name: string,
1149
- value: number,
1150
- unit: string,
1151
- timestamp: number,
1152
- period: "realtime" | "hourly" | "daily" | "weekly" | "monthly",
1153
- change: number, // Percentage change from previous
1154
- trend: "up" | "down" | "stable"
1155
- }
1156
- ```
1157
-
1158
- **Insight Properties:**
1159
-
1160
- ```typescript
1161
- {
1162
- title: string,
1163
- description: string,
1164
- category: "performance" | "audience" | "revenue" | "content",
1165
- confidence: number, // 0.0 to 1.0
1166
- actionable: boolean,
1167
- recommendations: string[],
1168
- generatedAt: number,
1169
- generatedBy: Id<"things"> // intelligence_agent
1170
- }
1171
- ```
1172
-
1173
- **Referral Properties:**
1174
-
1175
- ```typescript
1176
- {
1177
- referrerCode: string,
1178
- referredEmail: string,
1179
- referredUserId?: Id<"things">,
1180
- status: "pending" | "converted" | "expired",
1181
- tokensEarned: number,
1182
- bonusEarned?: number,
1183
- conversionDate?: number,
1184
- expiresAt: number
1185
- }
1186
- ```
1187
-
1188
- **Notification Properties:**
1189
-
1190
- ```typescript
1191
- {
1192
- title: string,
1193
- message: string,
1194
- type: "info" | "success" | "warning" | "error",
1195
- channel: "email" | "sms" | "push" | "in_app",
1196
- read: boolean,
1197
- readAt?: number,
1198
- actionUrl?: string,
1199
- actionLabel?: string
1200
- }
1201
- ```
1202
-
1203
- **External Agent Properties:**
1204
-
1205
- ```typescript
1206
- {
1207
- platform: "elizaos" | "autogen" | "crewai" | "langchain" | "custom",
1208
- agentId: string, // External platform's agent ID
1209
- name: string, // Agent name
1210
- description?: string, // What the agent does
1211
- capabilities: string[], // Available actions/tools
1212
- apiEndpoint?: string, // REST/GraphQL endpoint
1213
- websocketUrl?: string, // WebSocket endpoint for real-time
1214
- status: "online" | "offline" | "busy" | "unknown",
1215
- lastSeen?: number,
1216
- metadata: { // Platform-specific data
1217
- personality?: any, // For ElizaOS character
1218
- tools?: string[], // Available tools
1219
- model?: string, // LLM model used
1220
- [key: string]: any // Other platform-specific fields
1221
- },
1222
- conversationCount: number, // Total conversations
1223
- messageCount: number, // Total messages exchanged
1224
- createdAt: number,
1225
- updatedAt: number
1226
- }
1227
- ```
1228
-
1229
- **External Workflow Properties:**
1230
-
1231
- ```typescript
1232
- {
1233
- platform: "n8n" | "zapier" | "make" | "pipedream" | "custom",
1234
- workflowId: string, // External platform's workflow ID
1235
- name: string, // Workflow name
1236
- description: string, // What the workflow does
1237
- webhookUrl?: string, // Trigger URL
1238
- active: boolean, // Is workflow active?
1239
- tags: string[], // Workflow tags/categories
1240
- inputSchema: { // Expected input parameters
1241
- [key: string]: {
1242
- type: "string" | "number" | "boolean" | "object" | "array",
1243
- required: boolean,
1244
- description: string,
1245
- default?: any
1246
- }
1247
- },
1248
- outputSchema: { // Expected output structure
1249
- [key: string]: {
1250
- type: "string" | "number" | "boolean" | "object" | "array",
1251
- description: string
1252
- }
1253
- },
1254
- executionCount: number, // Total executions
1255
- successRate: number, // 0.0 to 1.0
1256
- averageExecutionTime: number, // milliseconds
1257
- lastExecutedAt?: number,
1258
- createdAt: number,
1259
- updatedAt: number
1260
- }
1261
- ```
1262
-
1263
- **External Connection Properties:**
1264
-
1265
- ```typescript
1266
- {
1267
- platform: "elizaos" | "n8n" | "zapier" | "make" | "autogen" | "custom",
1268
- name: string, // Connection name
1269
- baseUrl?: string, // API base URL
1270
- apiKey?: string, // Encrypted API key
1271
- websocketUrl?: string, // WebSocket endpoint
1272
- webhookSecret?: string, // Webhook signature secret
1273
- connectionType: "rest" | "websocket" | "webhook" | "graphql",
1274
- authentication: {
1275
- type: "apiKey" | "oauth" | "basic" | "bearer" | "custom",
1276
- credentials: any // Encrypted credentials
1277
- },
1278
- status: "active" | "inactive" | "error",
1279
- lastConnectedAt?: number,
1280
- lastError?: string,
1281
- linkedEntityIds: string[], // Connected agents/workflows
1282
- rateLimits?: {
1283
- requestsPerMinute: number,
1284
- requestsPerDay: number
1285
- },
1286
- createdAt: number,
1287
- updatedAt: number
1288
- }
1289
- ```
1290
-
1291
- **Session Properties:**
1292
-
1293
- ```typescript
1294
- {
1295
- userId: Id<"things">, // User this session belongs to
1296
- token: string, // Session token (hashed)
1297
- expiresAt: number, // Expiration timestamp
1298
- ipAddress?: string, // IP address
1299
- userAgent?: string, // Browser/device info
1300
- lastActivityAt: number, // Last activity timestamp
1301
- createdAt: number,
1302
- }
1303
- ```
1304
-
1305
- **OAuth Account Properties:**
1306
-
1307
- ```typescript
1308
- {
1309
- userId: Id<"things">, // User this account belongs to
1310
- provider: "github" | "google" | "discord" | "twitter",
1311
- providerAccountId: string, // Provider's user ID
1312
- accessToken?: string, // Encrypted access token
1313
- refreshToken?: string, // Encrypted refresh token
1314
- expiresAt?: number, // Token expiration
1315
- tokenType?: string, // Bearer, etc.
1316
- scope?: string, // Granted scopes
1317
- idToken?: string, // OpenID Connect ID token
1318
- createdAt: number,
1319
- updatedAt: number,
1320
- }
1321
- ```
1322
-
1323
- **Verification Token Properties:**
1324
-
1325
- ```typescript
1326
- {
1327
- userId: Id<"things">, // User to verify
1328
- token: string, // Verification token (hashed)
1329
- type: "email" | "two_factor", // Verification type
1330
- expiresAt: number, // Expiration timestamp
1331
- attempts: number, // Failed attempts count
1332
- maxAttempts: number, // Max allowed attempts
1333
- verifiedAt?: number, // When verified (if completed)
1334
- createdAt: number,
1335
- }
1336
- ```
1337
-
1338
- **Password Reset Token Properties:**
1339
-
1340
- ```typescript
1341
- {
1342
- userId: Id<"things">, // User requesting reset
1343
- token: string, // Reset token (hashed)
1344
- expiresAt: number, // Expiration timestamp (15-30 min)
1345
- usedAt?: number, // When token was used
1346
- createdAt: number,
1347
- }
1348
- ```
1349
-
1350
- **UI Preferences Properties:**
1351
-
1352
- ```typescript
1353
- {
1354
- userId: Id<"things">, // User these preferences belong to
1355
- theme: "light" | "dark" | "system",
1356
- language: string, // ISO language code
1357
- timezone: string, // IANA timezone
1358
- dashboardLayout: {
1359
- sidebarCollapsed: boolean,
1360
- defaultView: "grid" | "list" | "kanban",
1361
- itemsPerPage: number,
1362
- },
1363
- notifications: {
1364
- email: boolean,
1365
- push: boolean,
1366
- sms: boolean,
1367
- inApp: boolean,
1368
- },
1369
- accessibility: {
1370
- reducedMotion: boolean,
1371
- highContrast: boolean,
1372
- fontSize: "small" | "medium" | "large",
1373
- },
1374
- customSettings: any, // App-specific settings
1375
- updatedAt: number,
1376
- }
1377
- ```
1378
-
1379
- ---
1380
-
1381
- ## CONNECTIONS: All The Relationships
1382
-
1383
- ### What Goes in Connections?
1384
-
1385
- **Simple test:** If you're describing how thing X relates to thing Y, it's a connection.
1386
-
1387
- Examples:
1388
-
1389
- - "Creator **owns** token" ✅ Connection
1390
- - "User **enrolled_in** course" ✅ Connection
1391
- - "Agent **powers** AI clone" ✅ Connection
1392
- - "Creator created a post" ❌ Event (action), not connection
1393
-
1394
- ### Connection Types (25 total)
1395
-
1396
- **Design Principle:** Consolidated types with metadata for variants. Protocol identity stored in `metadata.protocol`.
1397
-
1398
- ```typescript
1399
- type ConnectionType =
1400
- // OWNERSHIP (2)
1401
- | "owns"
1402
- | "created_by"
1403
-
1404
- // AI RELATIONSHIPS (3)
1405
- | "clone_of"
1406
- | "trained_on"
1407
- | "powers"
1408
-
1409
- // CONTENT RELATIONSHIPS (5)
1410
- | "authored"
1411
- | "generated_by"
1412
- | "published_to"
1413
- | "part_of"
1414
- | "references"
1415
-
1416
- // COMMUNITY RELATIONSHIPS (4)
1417
- | "member_of"
1418
- | "following"
1419
- | "moderates"
1420
- | "participated_in"
1421
-
1422
- // BUSINESS RELATIONSHIPS (3)
1423
- | "manages"
1424
- | "reports_to"
1425
- | "collaborates_with"
1426
-
1427
- // TOKEN RELATIONSHIPS (3)
1428
- | "holds_tokens"
1429
- | "staked_in"
1430
- | "earned_from"
1431
-
1432
- // PRODUCT RELATIONSHIPS (4)
1433
- | "purchased"
1434
- | "enrolled_in"
1435
- | "completed"
1436
- | "teaching"
1437
-
1438
- // CONSOLIDATED TYPES (use metadata for variants + protocol)
1439
- | "transacted" // Payment/subscription/invoice (metadata.transactionType + protocol)
1440
- | "notified" // Notifications (metadata.channel + notificationType)
1441
- | "referred" // Referrals (metadata.referralType)
1442
- | "communicated" // Agent/protocol communication (metadata.protocol + messageType)
1443
- | "delegated" // Task/workflow delegation (metadata.protocol + taskType)
1444
- | "approved" // Approvals (metadata.approvalType + protocol)
1445
- | "fulfilled"; // Fulfillment (metadata.fulfillmentType + protocol)
1446
-
1447
- // Total: 25 connection types
1448
- ```
1449
-
1450
- ### Connection Structure
1451
-
1452
- ```typescript
1453
- {
1454
- _id: Id<"connections">,
1455
- fromThingId: Id<"things">,
1456
- toThingId: Id<"things">,
1457
- relationshipType: ConnectionType,
1458
- metadata?: { // Optional relationship data
1459
- // For revenue splits:
1460
- revenueShare?: number, // 0.0 to 1.0
1461
- // For token holdings:
1462
- balance?: number,
1463
- // For course enrollment:
1464
- enrolledAt?: number,
1465
- progress?: number,
1466
- // etc...
1467
- },
1468
- strength?: number, // Relationship strength (0-1)
1469
- validFrom?: number, // When relationship started
1470
- validTo?: number, // When relationship ended
1471
- createdAt: number,
1472
- updatedAt?: number
1473
- }
1474
- ```
1475
-
1476
- ### Common Connection Patterns
1477
-
1478
- **Pattern: Ownership**
1479
-
1480
- ```typescript
1481
- // Creator owns AI clone (thing-to-thing)
1482
- {
1483
- fromThingId: creatorId,
1484
- toThingId: cloneId,
1485
- relationshipType: "owns",
1486
- createdAt: Date.now()
1487
- }
1488
-
1489
- // E-Commerce: Store owns product inventory
1490
- {
1491
- fromThingId: groupId, // Store
1492
- toThingId: productId,
1493
- relationshipType: "owns",
1494
- createdAt: Date.now()
1495
- }
1496
-
1497
- // Education: Department owns course
1498
- {
1499
- fromThingId: departmentGroupId,
1500
- toThingId: courseId,
1501
- relationshipType: "owns",
1502
- createdAt: Date.now()
1503
- }
1504
-
1505
- // Crypto: DAO owns treasury tokens
1506
- {
1507
- fromThingId: daoGroupId,
1508
- toThingId: tokenId,
1509
- relationshipType: "owns",
1510
- metadata: {
1511
- balance: 1000000
1512
- },
1513
- createdAt: Date.now()
1514
- }
1515
- ```
1516
-
1517
- **Pattern: Revenue Split**
1518
-
1519
- ```typescript
1520
- // Collaborator owns 30% of course
1521
- {
1522
- fromThingId: collaboratorId,
1523
- toThingId: courseId,
1524
- relationshipType: "owns",
1525
- metadata: {
1526
- revenueShare: 0.3
1527
- },
1528
- createdAt: Date.now()
1529
- }
1530
- ```
1531
-
1532
- **Pattern: Token Holding**
1533
-
1534
- ```typescript
1535
- // User holds 1000 tokens
1536
- {
1537
- fromThingId: userId,
1538
- toThingId: tokenId,
1539
- relationshipType: "holds_tokens",
1540
- metadata: {
1541
- balance: 1000,
1542
- acquiredAt: Date.now()
1543
- },
1544
- createdAt: Date.now()
1545
- }
1546
- ```
1547
-
1548
- **Pattern: Course Enrollment**
1549
-
1550
- ```typescript
1551
- // User enrolled in course
1552
- {
1553
- fromThingId: userId,
1554
- toThingId: courseId,
1555
- relationshipType: "enrolled_in",
1556
- metadata: {
1557
- progress: 0.45, // 45% complete
1558
- enrolledAt: Date.now(),
1559
- lastAccessedAt: Date.now()
1560
- },
1561
- createdAt: Date.now()
1562
- }
1563
-
1564
- // Education: Student enrolled in school with grade level
1565
- {
1566
- fromThingId: studentId,
1567
- toThingId: courseId,
1568
- relationshipType: "enrolled_in",
1569
- metadata: {
1570
- enrollmentType: "credit",
1571
- progress: 0.65,
1572
- currentGrade: 92.5,
1573
- letterGrade: "A",
1574
- enrolledAt: Date.now()
1575
- },
1576
- createdAt: Date.now()
1577
- }
1578
-
1579
- // E-Commerce: Customer purchased product
1580
- {
1581
- fromThingId: customerId,
1582
- toThingId: productId,
1583
- relationshipType: "purchased",
1584
- metadata: {
1585
- quantity: 2,
1586
- price: 49.99,
1587
- currency: "USD",
1588
- purchasedAt: Date.now()
1589
- },
1590
- createdAt: Date.now()
1591
- }
1592
-
1593
- // Creator: Subscriber joined membership tier
1594
- {
1595
- fromThingId: subscriberId,
1596
- toThingId: membershipTierId,
1597
- relationshipType: "member_of",
1598
- metadata: {
1599
- tier: "pro",
1600
- price: 9.99,
1601
- interval: "monthly",
1602
- subscribedAt: Date.now()
1603
- },
1604
- createdAt: Date.now()
1605
- }
1606
- ```
1607
-
1608
- **Pattern: Group Membership**
1609
-
1610
- ```typescript
1611
- // User is member of group with role
1612
- {
1613
- fromThingId: userId,
1614
- toThingId: groupId,
1615
- relationshipType: "member_of",
1616
- metadata: {
1617
- role: "group_owner" | "group_user", // Group-specific role
1618
- permissions: ["read", "write", "admin"],
1619
- invitedBy?: Id<"things">, // Who invited this user
1620
- invitedAt?: number,
1621
- joinedAt: Date.now(),
1622
- },
1623
- createdAt: Date.now()
1624
- }
1625
-
1626
- // Group owns content/resources
1627
- {
1628
- fromThingId: groupId,
1629
- toThingId: contentId,
1630
- relationshipType: "owns",
1631
- metadata: {
1632
- createdBy: userId, // User who created it
1633
- },
1634
- createdAt: Date.now()
1635
- }
1636
- ```
1637
-
1638
- **Pattern: Payment Transaction (Consolidated)**
1639
-
1640
- ```typescript
1641
- // User paid for product (use "transacted" with metadata)
1642
- {
1643
- fromThingId: userId,
1644
- toThingId: productId,
1645
- relationshipType: "transacted",
1646
- metadata: {
1647
- transactionType: "payment", // or "subscription" or "invoice"
1648
- amount: 99.00,
1649
- currency: "USD",
1650
- paymentId: "pi_123456",
1651
- status: "completed"
1652
- },
1653
- createdAt: Date.now()
1654
- }
1655
-
1656
- // User subscribed to service
1657
- {
1658
- fromThingId: userId,
1659
- toThingId: subscriptionId,
1660
- relationshipType: "transacted",
1661
- metadata: {
1662
- transactionType: "subscription",
1663
- amount: 29.00,
1664
- currency: "USD",
1665
- interval: "monthly",
1666
- subscriptionId: "sub_123456",
1667
- status: "active"
1668
- },
1669
- createdAt: Date.now()
1670
- }
1671
- ```
1672
-
1673
- **Pattern: Referral (Consolidated)**
1674
-
1675
- ```typescript
1676
- // User referred by another user (use "referred" with metadata)
1677
- {
1678
- fromThingId: newUserId,
1679
- toThingId: referrerId,
1680
- relationshipType: "referred",
1681
- metadata: {
1682
- referralType: "direct", // or "conversion" or "campaign"
1683
- source: "referral_link",
1684
- referralCode: "REF123",
1685
- tokensEarned: 100,
1686
- status: "converted"
1687
- },
1688
- createdAt: Date.now()
1689
- }
1690
- ```
1691
-
1692
- **Pattern: Notification (Consolidated)**
1693
-
1694
- ```typescript
1695
- // User notified about event (use "notified" with metadata)
1696
- {
1697
- fromThingId: userId,
1698
- toThingId: notificationId,
1699
- relationshipType: "notified",
1700
- metadata: {
1701
- channel: "email", // or "sms" or "push" or "in_app"
1702
- campaignId: campaignId, // optional
1703
- deliveredAt: Date.now(),
1704
- readAt: Date.now(),
1705
- clicked: true
1706
- },
1707
- createdAt: Date.now()
1708
- }
1709
- ```
1710
-
1711
- ---
1712
-
1713
- ## EVENTS: All The Actions
1714
-
1715
- ### What Goes in Events?
1716
-
1717
- **Simple test:** If you're describing something that HAPPENED at a specific TIME, it's an event.
1718
-
1719
- Examples:
1720
-
1721
- - "User **purchased** tokens at 3pm" ✅ Event
1722
- - "Content **was published** yesterday" ✅ Event
1723
- - "Clone **interacted** with user" ✅ Event
1724
- - "User owns tokens" ❌ Connection (state), not event
1725
-
1726
- ### Event Types (35 total)
1727
-
1728
- **Design Principle:** Consolidated types with metadata for variants. Protocol identity stored in `metadata.protocol`.
1729
-
1730
- ```typescript
1731
- type EventType =
1732
- // THING LIFECYCLE (3) - Consolidated with metadata.thingType
1733
- | "thing_created" // metadata: { thingType: "group" | "user" | "course" | etc. }
1734
- | "thing_updated" // metadata: { thingType, action: "updated" | "archived" | "restored" }
1735
- | "thing_deleted" // metadata: { thingType, action: "deleted" | "archived", deletionType: "soft" | "hard" }
1736
-
1737
- // USER EVENTS (5)
1738
- | "user_registered"
1739
- | "user_verified"
1740
- | "user_login"
1741
- | "user_logout"
1742
- | "profile_updated"
1743
-
1744
- // AUTHENTICATION EVENTS (6)
1745
- | "password_reset_requested"
1746
- | "password_reset_completed"
1747
- | "email_verification_sent"
1748
- | "email_verified"
1749
- | "two_factor_enabled"
1750
- | "two_factor_disabled"
1751
-
1752
- // GROUP-SPECIFIC EVENTS (3) - Not lifecycle events (those use thing_*)
1753
- | "user_invited_to_group"
1754
- | "user_joined_group"
1755
- | "user_removed_from_group"
1756
-
1757
- // DASHBOARD & UI EVENTS (4)
1758
- | "dashboard_viewed"
1759
- | "settings_updated"
1760
- | "theme_changed"
1761
- | "preferences_updated"
1762
-
1763
- // AI/CLONE EVENTS (2) - Creation uses thing_created with thingType: "clone"
1764
- | "voice_cloned"
1765
- | "appearance_cloned"
1766
-
1767
- // AGENT EVENTS (3) - Creation uses thing_created with thingType: "agent"
1768
- | "agent_executed"
1769
- | "agent_completed"
1770
- | "agent_failed"
1771
-
1772
- // TOKEN EVENTS (6) - Creation uses thing_created with thingType: "token"
1773
- | "token_minted"
1774
- | "token_burned"
1775
- | "tokens_purchased"
1776
- | "tokens_staked"
1777
- | "tokens_unstaked"
1778
- | "tokens_transferred"
1779
-
1780
- // COURSE EVENTS (4) - Creation uses thing_created with thingType: "course"
1781
- | "course_enrolled"
1782
- | "lesson_completed"
1783
- | "course_completed"
1784
- | "certificate_earned"
1785
-
1786
- // ANALYTICS EVENTS (5)
1787
- | "metric_calculated"
1788
- | "insight_generated"
1789
- | "prediction_made"
1790
- | "optimization_applied"
1791
- | "report_generated"
1792
-
1793
- // CYCLEENCE EVENTS (7) - NEW
1794
- | "cycle_request" // User requests AI cycle
1795
- | "cycle_completed" // Cycle result delivered
1796
- | "cycle_failed" // Cycle failed
1797
- | "cycle_quota_exceeded" // Monthly limit hit
1798
- | "cycle_revenue_collected" // Daily revenue sweep
1799
- | "org_revenue_generated" // Group generates platform revenue
1800
- | "revenue_share_distributed" // Revenue share paid out
1801
-
1802
- // BLOCKCHAIN EVENTS (5) - NEW
1803
- | "nft_minted" // NFT created on-chain
1804
- | "nft_transferred" // NFT ownership changed
1805
- | "tokens_bridged" // Cross-chain bridge
1806
- | "contract_deployed" // Smart contract deployed
1807
- | "treasury_withdrawal" // Platform owner withdraws revenue
1808
-
1809
- // CONSOLIDATED EVENTS (use metadata for variants + protocol)
1810
- | "content_event" // metadata.action: created|updated|deleted|viewed|shared|liked
1811
- | "payment_event" // metadata.status: requested|verified|processed + protocol
1812
- | "subscription_event" // metadata.action: started|renewed|cancelled
1813
- | "commerce_event" // metadata.eventType + protocol (ACP, AP2)
1814
- | "livestream_event" // metadata.status: started|ended + metadata.action: joined|left|chat|donation
1815
- | "notification_event" // metadata.channel: email|sms|push|in_app + deliveryStatus
1816
- | "referral_event" // metadata.action: created|completed|rewarded
1817
- | "communication_event" // metadata.protocol (A2A, ACP, AG-UI) + messageType
1818
- | "task_event" // metadata.action: delegated|completed|failed + protocol
1819
- | "mandate_event" // metadata.mandateType: intent|cart + protocol (AP2)
1820
- | "price_event"; // metadata.action: checked|changed
1821
-
1822
- // Total: 52 event types (35 original + 7 cycle + 5 blockchain + 5 NFT overlap)
1823
- ```
1824
-
1825
- ### Event Structure
1826
-
1827
- ```typescript
1828
- {
1829
- _id: Id<"events">,
1830
- type: EventType, // What happened
1831
- actorId: Id<"things">, // Who/what caused this
1832
- targetId?: Id<"things">, // Optional target thing
1833
- timestamp: number, // When it happened
1834
- metadata: any // Event-specific data
1835
- }
1836
- ```
1837
-
1838
- **Metadata Structure:**
1839
-
1840
- The `metadata` field is flexible JSON that ALWAYS includes `protocol` for protocol-specific events:
1841
-
1842
- ```typescript
1843
- // Protocol-agnostic events (no protocol field needed)
1844
- { action: "created", contentType: "blog_post" }
1845
-
1846
- // Protocol-specific events (includes protocol identifier)
1847
- {
1848
- protocol: "a2a" | "acp" | "ap2" | "x402" | "ag-ui",
1849
- // ... protocol-specific fields
1850
- }
1851
-
1852
- // Examples:
1853
- // A2A message
1854
- { protocol: "a2a", messageType: "task_delegation", task: "research" }
1855
-
1856
- // ACP commerce
1857
- { protocol: "acp", eventType: "purchase_initiated", agentPlatform: "chatgpt" }
1858
-
1859
- // AP2 mandate
1860
- { protocol: "ap2", mandateType: "intent", autoExecute: true }
1861
-
1862
- // X402 payment
1863
- { protocol: "x402", network: "base", txHash: "0x..." }
1864
- ```
1865
-
1866
- ### Event Patterns
1867
-
1868
- **Pattern: User Action**
1869
-
1870
- ```typescript
1871
- // User purchased tokens
1872
- {
1873
- type: "tokens_purchased",
1874
- actorId: userId,
1875
- targetId: tokenId,
1876
- timestamp: Date.now(),
1877
- metadata: {
1878
- amount: 100,
1879
- usdAmount: 10,
1880
- paymentId: "pi_123",
1881
- txHash: "0x456"
1882
- }
1883
- }
1884
- ```
1885
-
1886
- **Pattern: Payment Event (Consolidated)**
1887
-
1888
- ```typescript
1889
- // Payment completed (use "payment_processed" with metadata.status)
1890
- {
1891
- type: "payment_processed",
1892
- actorId: userId,
1893
- targetId: paymentId,
1894
- timestamp: Date.now(),
1895
- metadata: {
1896
- status: "completed", // or "initiated" | "failed" | "refunded"
1897
- amount: 99.00,
1898
- currency: "USD",
1899
- paymentId: "pi_123456",
1900
- method: "stripe"
1901
- }
1902
- }
1903
-
1904
- // Subscription renewed (use "subscription_updated" with metadata.action)
1905
- {
1906
- type: "subscription_updated",
1907
- actorId: userId,
1908
- targetId: subscriptionId,
1909
- timestamp: Date.now(),
1910
- metadata: {
1911
- action: "renewed", // or "started" | "cancelled"
1912
- tier: "pro",
1913
- amount: 29.00,
1914
- nextBillingDate: Date.now() + 30 * 24 * 60 * 60 * 1000
1915
- }
1916
- }
1917
- ```
1918
-
1919
- **Pattern: Content Event (Consolidated)**
1920
-
1921
- ```typescript
1922
- // Content created (use "content_changed" with metadata.action)
1923
- {
1924
- type: "content_changed",
1925
- actorId: creatorId,
1926
- targetId: contentId,
1927
- timestamp: Date.now(),
1928
- metadata: {
1929
- action: "created", // or "updated" | "deleted"
1930
- contentType: "blog_post",
1931
- generatedBy: "marketing_agent",
1932
- platform: "instagram"
1933
- }
1934
- }
1935
-
1936
- // Content viewed (use "content_interacted" with metadata.interactionType)
1937
- {
1938
- type: "content_interacted",
1939
- actorId: userId,
1940
- targetId: contentId,
1941
- timestamp: Date.now(),
1942
- metadata: {
1943
- interactionType: "viewed", // or "shared" | "liked"
1944
- duration: 120, // seconds
1945
- source: "feed"
1946
- }
1947
- }
1948
-
1949
- // Education: Assignment submitted
1950
- {
1951
- type: "content_changed",
1952
- actorId: studentId,
1953
- targetId: submissionId,
1954
- timestamp: Date.now(),
1955
- metadata: {
1956
- action: "submitted",
1957
- contentType: "assignment",
1958
- assignmentId: assignmentId,
1959
- courseId: courseId,
1960
- isLate: false
1961
- }
1962
- }
1963
-
1964
- // E-Commerce: Product reviewed
1965
- {
1966
- type: "content_interacted",
1967
- actorId: customerId,
1968
- targetId: productId,
1969
- timestamp: Date.now(),
1970
- metadata: {
1971
- interactionType: "reviewed",
1972
- rating: 5,
1973
- reviewText: "Great product!",
1974
- verified: true
1975
- }
1976
- }
1977
-
1978
- // Creator: Video published
1979
- {
1980
- type: "content_changed",
1981
- actorId: creatorId,
1982
- targetId: videoId,
1983
- timestamp: Date.now(),
1984
- metadata: {
1985
- action: "published",
1986
- contentType: "youtube_video",
1987
- platform: "youtube",
1988
- viewCount: 0,
1989
- engagementMetrics: {}
1990
- }
1991
- }
1992
- ```
1993
-
1994
- **Pattern: Livestream Event (Consolidated)**
1995
-
1996
- ```typescript
1997
- // Livestream started (use "livestream_status_changed" with metadata.status)
1998
- {
1999
- type: "livestream_status_changed",
2000
- actorId: creatorId,
2001
- targetId: livestreamId,
2002
- timestamp: Date.now(),
2003
- metadata: {
2004
- status: "started", // or "scheduled" | "ended"
2005
- streamId: "stream_123",
2006
- platform: "cloudflare",
2007
- rtmpUrl: "rtmp://..."
2008
- }
2009
- }
2010
-
2011
- // Viewer joined (use "livestream_interaction" with metadata.type)
2012
- {
2013
- type: "livestream_interaction",
2014
- actorId: viewerId,
2015
- targetId: livestreamId,
2016
- timestamp: Date.now(),
2017
- metadata: {
2018
- type: "joined", // or "left" | "message"
2019
- viewerCount: 42,
2020
- message: "Hello!" // if type === "message"
2021
- }
2022
- }
2023
- ```
2024
-
2025
- **Pattern: Notification Event (Consolidated)**
2026
-
2027
- ```typescript
2028
- // Email notification sent (use "notification_delivered" with metadata.channel)
2029
- {
2030
- type: "notification_delivered",
2031
- actorId: systemId,
2032
- targetId: userId,
2033
- timestamp: Date.now(),
2034
- metadata: {
2035
- channel: "email", // or "sms" | "push" | "in_app"
2036
- messageId: "msg_123",
2037
- subject: "New content available",
2038
- deliveredAt: Date.now(),
2039
- readAt: Date.now() + 1000 // optional
2040
- }
2041
- }
2042
- ```
2043
-
2044
- **Pattern: AI Interaction**
2045
-
2046
- ```typescript
2047
- // Clone chatted with user
2048
- {
2049
- type: "clone_interaction",
2050
- actorId: userId,
2051
- targetId: cloneId,
2052
- timestamp: Date.now(),
2053
- metadata: {
2054
- message: "How do I start?",
2055
- response: "Let me help you...",
2056
- tokensUsed: 150,
2057
- sentiment: "positive"
2058
- }
2059
- }
2060
- ```
2061
-
2062
- **Pattern: Metric Tracking**
2063
-
2064
- ```typescript
2065
- // Token price calculated
2066
- {
2067
- type: "metric_calculated",
2068
- actorId: systemId,
2069
- targetId: tokenId,
2070
- timestamp: Date.now(),
2071
- metadata: {
2072
- metric: "token_price",
2073
- value: 0.12,
2074
- change: +0.05,
2075
- changePercent: 4.2
2076
- }
2077
- }
2078
- ```
2079
-
2080
- **Pattern: Authentication Events**
2081
-
2082
- ```typescript
2083
- // Password reset requested
2084
- {
2085
- type: "password_reset_requested",
2086
- actorId: userId,
2087
- targetId: passwordResetTokenId,
2088
- timestamp: Date.now(),
2089
- metadata: {
2090
- email: "user@example.com",
2091
- ipAddress: "192.168.1.1",
2092
- expiresAt: Date.now() + 30 * 60 * 1000 // 30 minutes
2093
- }
2094
- }
2095
-
2096
- // Email verified
2097
- {
2098
- type: "email_verified",
2099
- actorId: userId,
2100
- targetId: verificationTokenId,
2101
- timestamp: Date.now(),
2102
- metadata: {
2103
- email: "user@example.com",
2104
- verificationMethod: "link" | "code"
2105
- }
2106
- }
2107
-
2108
- // Two-factor enabled
2109
- {
2110
- type: "two_factor_enabled",
2111
- actorId: userId,
2112
- timestamp: Date.now(),
2113
- metadata: {
2114
- method: "totp" | "sms" | "email",
2115
- backupCodesGenerated: 10
2116
- }
2117
- }
2118
- ```
2119
-
2120
- **Pattern: Group Events**
2121
-
2122
- ```typescript
2123
- // Group created
2124
- {
2125
- type: "group_created",
2126
- actorId: creatorId,
2127
- targetId: groupId,
2128
- timestamp: Date.now(),
2129
- metadata: {
2130
- name: "Acme Corp",
2131
- slug: "acme",
2132
- plan: "pro",
2133
- trialEndsAt: Date.now() + 14 * 24 * 60 * 60 * 1000 // 14 days
2134
- }
2135
- }
2136
-
2137
- // User invited to group
2138
- {
2139
- type: "user_invited_to_group",
2140
- actorId: inviterId,
2141
- targetId: groupId,
2142
- timestamp: Date.now(),
2143
- metadata: {
2144
- invitedEmail: "newuser@example.com",
2145
- role: "group_user",
2146
- inviteToken: "inv_123456",
2147
- expiresAt: Date.now() + 7 * 24 * 60 * 60 * 1000 // 7 days
2148
- }
2149
- }
2150
-
2151
- // User joined group
2152
- {
2153
- type: "user_joined_group",
2154
- actorId: userId,
2155
- targetId: groupId,
2156
- timestamp: Date.now(),
2157
- metadata: {
2158
- role: "group_user",
2159
- invitedBy: inviterId
2160
- }
2161
- }
2162
- ```
2163
-
2164
- **Pattern: Dashboard & UI Events**
2165
-
2166
- ```typescript
2167
- // Dashboard viewed
2168
- {
2169
- type: "dashboard_viewed",
2170
- actorId: userId,
2171
- timestamp: Date.now(),
2172
- metadata: {
2173
- dashboardType: "platform_owner" | "group_owner" | "group_user" | "customer",
2174
- groupId?: groupId,
2175
- route: "/admin/dashboard",
2176
- sessionDuration: 0 // Updated on session end
2177
- }
2178
- }
2179
-
2180
- // Theme changed
2181
- {
2182
- type: "theme_changed",
2183
- actorId: userId,
2184
- targetId: uiPreferencesId,
2185
- timestamp: Date.now(),
2186
- metadata: {
2187
- previousTheme: "light",
2188
- newTheme: "dark"
2189
- }
2190
- }
2191
-
2192
- // Settings updated
2193
- {
2194
- type: "settings_updated",
2195
- actorId: userId,
2196
- targetId: uiPreferencesId,
2197
- timestamp: Date.now(),
2198
- metadata: {
2199
- updatedFields: ["dashboardLayout", "notifications"],
2200
- changes: {
2201
- "dashboardLayout.sidebarCollapsed": { from: false, to: true },
2202
- "notifications.email": { from: true, to: false }
2203
- }
2204
- }
2205
- }
2206
- ```
2207
-
2208
- ---
2209
-
2210
- ## KNOWLEDGE Labels & Semantic Chunks
2211
-
2212
- Use knowledge items of `knowledgeType: 'label'` for taxonomy and `knowledgeType: 'chunk'` for RAG. Associate via `thingKnowledge`.
2213
-
2214
- Examples:
2215
-
2216
- - "This creator is in the fitness industry" ✅ label knowledge with `labels: ['industry:fitness']`
2217
- - "This content is video format" ✅ label knowledge with `labels: ['format:video']`
2218
- - "This page content paragraph 3" ✅ chunk knowledge with `text` + `embedding`
2219
-
2220
- Pattern: multi‑label entity
2221
-
2222
- ```typescript
2223
- const labels = [
2224
- "industry:fitness",
2225
- "skill:video-editing",
2226
- "technology:youtube",
2227
- "audience:beginners",
2228
- ];
2229
- for (const label of labels) {
2230
- const kid = await getOrCreateKnowledgeLabel(label);
2231
- await db.insert("thingKnowledge", {
2232
- thingId: creatorId,
2233
- knowledgeId: kid,
2234
- role: "label",
2235
- createdAt: Date.now(),
2236
- });
2237
- }
2238
- ```
2239
-
2240
- Pattern: semantic search across chunks
2241
-
2242
- ```typescript
2243
- // Given a query embedding, find top-k similar chunks for a group
2244
- const topK = await vectorSearch("knowledge", {
2245
- vectorField: "embedding",
2246
- query: queryEmbedding,
2247
- filter: { "sourceThingId.groupId": groupId, knowledgeType: "chunk" },
2248
- k: 10,
2249
- });
2250
- ```
2251
-
2252
- ---
2253
-
2254
- ## How Features Map to Ontology
2255
-
2256
- ### Feature: AI Clone Creation
2257
-
2258
- **Things Created:**
2259
-
2260
- 1. `ai_clone` thing (the clone)
2261
- 2. `knowledge_item` entities (training data)
2262
-
2263
- **Connections Created:**
2264
-
2265
- 1. creator → ai_clone (relationship: "owns")
2266
- 2. ai_clone → knowledge_items (relationship: "trained_on")
2267
-
2268
- **Events Logged:**
2269
-
2270
- 1. `clone_created` (when clone created)
2271
- 2. `voice_cloned` (when voice ready)
2272
- 3. `appearance_cloned` (when appearance ready)
2273
-
2274
- **Knowledge Labels Added:**
2275
-
2276
- - Clone inherits creator's labels
2277
- - Additional: "ai_clone", "active"
2278
-
2279
- ### Feature: Token Purchase
2280
-
2281
- **Things Involved:**
2282
-
2283
- 1. `token` thing (the token being purchased)
2284
- 2. `audience_member` thing (the buyer)
2285
-
2286
- **Connections Created/Updated:**
2287
-
2288
- 1. buyer → token (relationship: "holds_tokens", metadata: { balance: 100 })
2289
-
2290
- **Events Logged:**
2291
-
2292
- 1. `tokens_purchased` (the purchase)
2293
- 2. `revenue_generated` (for creator)
2294
-
2295
- **Knowledge Labels Added:**
2296
-
2297
- - None (tokens already labeled)
2298
-
2299
- ### Feature: Course Generation
2300
-
2301
- **Things Created:**
2302
-
2303
- 1. `course` entity
2304
- 2. `lesson` entities (multiple)
2305
-
2306
- **Connections Created:**
2307
-
2308
- 1. creator → course (relationship: "owns")
2309
- 2. ai_clone → course (relationship: "teaching")
2310
- 3. course → lessons (relationship: "part_of")
2311
-
2312
- **Events Logged:**
2313
-
2314
- 1. `course_created`
2315
- 2. `content_generated` (for each lesson)
2316
-
2317
- **Knowledge Labels Added:**
2318
-
2319
- - skill labels (what course teaches)
2320
- - industry labels (course category)
2321
- - audience labels (target audience)
2322
-
2323
- ### Feature: ELEVATE Journey
2324
-
2325
- **Things Involved:**
2326
-
2327
- 1. `audience_member` (user going through journey)
2328
- 2. Workflow thing (tracks progress)
2329
-
2330
- **Connections Created:**
2331
-
2332
- - None (journey tracked in workflow state)
2333
-
2334
- **Events Logged:**
2335
-
2336
- 1. `journey_step_completed` (for each step: hook, gift, identify, etc.)
2337
- 2. `achievement_unlocked` (at milestones)
2338
- 3. `tokens_earned` (rewards)
2339
-
2340
- **Knowledge Labels Added:**
2341
-
2342
- - Status labels (current step)
2343
-
2344
- ### Domain-Specific Feature Mapping
2345
-
2346
- **E-Commerce: Shopping Cart Checkout**
2347
-
2348
- **Things Created/Used:**
2349
-
2350
- - `mandate` thing (shopping cart)
2351
- - `product` thing (items in cart)
2352
- - `payment` thing (transaction record)
2353
-
2354
- **Connections Created:**
2355
-
2356
- - customer → mandate (relationship: "owns" or "has_active_cart")
2357
- - mandate → product items (relationship: "contains")
2358
- - customer → payment (relationship: "transacted", metadata: { transactionType: "payment" })
2359
-
2360
- **Events Logged:**
2361
-
2362
- - `mandate_event` (cart created, items added, checkout started)
2363
- - `payment_event` (payment processed)
2364
- - `commerce_event` (order completed)
2365
-
2366
- **Knowledge Added:**
2367
-
2368
- - Order items tagged for analytics
2369
-
2370
- ---
2371
-
2372
- **Education: Course Enrollment & Grading**
2373
-
2374
- **Things Created/Used:**
2375
-
2376
- - `course` thing
2377
- - `lesson` things (modules, assignments)
2378
- - `submission` thing (student work)
2379
- - `metric` thing (grades)
2380
-
2381
- **Connections Created:**
2382
-
2383
- - student → course (relationship: "enrolled_in", metadata: { progress, grade })
2384
- - student → submission (relationship: "submitted_for")
2385
- - submission → lesson (relationship: "part_of")
2386
- - teacher → submission (relationship: "graded_by")
2387
-
2388
- **Events Logged:**
2389
-
2390
- - `course_enrolled` (enrollment)
2391
- - `content_event` (lesson viewed/completed)
2392
- - `content_changed` (assignment submitted)
2393
- - `metric_calculated` (grade calculated)
2394
-
2395
- **Knowledge Added:**
2396
-
2397
- - Competency labels (skills demonstrated)
2398
- - Performance level tags
2399
-
2400
- ---
2401
-
2402
- **Creator: Multi-Platform Publishing**
2403
-
2404
- **Things Created/Used:**
2405
-
2406
- - `video` thing (YouTube upload)
2407
- - `podcast` thing (episode)
2408
- - `blog_post` thing (newsletter)
2409
- - `email_campaign` thing (broadcast)
2410
-
2411
- **Connections Created:**
2412
-
2413
- - creator → content (relationship: "authored")
2414
- - content → platform (relationship: "published_to", metadata: { platform: "youtube" | "spotify" })
2415
- - audience → content (relationship: "engaged_with")
2416
-
2417
- **Events Logged:**
2418
-
2419
- - `content_changed` (published, metadata: { platform, contentType })
2420
- - `content_interacted` (viewed, listened, shared)
2421
- - `metric_calculated` (engagement metrics)
2422
-
2423
- **Knowledge Added:**
2424
-
2425
- - Topic labels (subject matter)
2426
- - Platform tags
2427
- - Performance labels (trending, viral)
2428
-
2429
- ---
2430
-
2431
- **Crypto: Token Staking & Yield Farming**
2432
-
2433
- **Things Created/Used:**
2434
-
2435
- - `token` thing (token instance)
2436
- - `token_contract` thing (smart contract)
2437
- - `metric` thing (TVL, APY)
2438
- - `knowledge_item` thing (risk assessment)
2439
-
2440
- **Connections Created:**
2441
-
2442
- - user → token (relationship: "holds_tokens", metadata: { balance })
2443
- - user → token (relationship: "staked_in", metadata: { amount, duration, earnings })
2444
- - token → contract (relationship: "defined_by")
2445
- - contract → dependencies (relationship: "depends_on", metadata: { critical: true })
2446
-
2447
- **Events Logged:**
2448
-
2449
- - `token_minted` / `token_burned`
2450
- - `tokens_staked` / `tokens_unstaked`
2451
- - `metric_calculated` (TVL, APY updates)
2452
- - `price_event` (price changes)
2453
-
2454
- **Knowledge Added:**
2455
-
2456
- - Risk labels (audit status, vulnerability)
2457
- - Protocol labels (type, chain)
2458
- - Market labels (trend, momentum)
2459
-
2460
- ---
2461
-
2462
- ## Querying the Ontology
2463
-
2464
- ### Get Thing by ID (table: things)
2465
-
2466
- ```typescript
2467
- const thing = await db.get(thingId);
2468
- ```
2469
-
2470
- ### Get All Things of Type (index: by_type)
2471
-
2472
- ```typescript
2473
- const creators = await db
2474
- .query("things")
2475
- .withIndex("by_type", (q) => q.eq("type", "creator"))
2476
- .collect();
2477
- ```
2478
-
2479
- ### Get Thing's Relationships (table: connections)
2480
-
2481
- ```typescript
2482
- // Get all entities this entity owns
2483
- const owned = await db
2484
- .query("connections")
2485
- .withIndex("from_type", (q) =>
2486
- q.eq("fromThingId", thingId).eq("relationshipType", "owns"),
2487
- )
2488
- .collect();
2489
-
2490
- const ownedThings = await Promise.all(
2491
- owned.map((conn) => db.get(conn.toThingId)),
2492
- );
2493
- ```
2494
-
2495
- ### Get Thing's History (table: events)
2496
-
2497
- ```typescript
2498
- // Get all events for this entity
2499
- const history = await db
2500
- .query("events")
2501
- .withIndex("thing_type_time", (q) => q.eq("thingId", thingId))
2502
- .order("desc") // Most recent first
2503
- .collect();
2504
- ```
2505
-
2506
- ### Get Thing's Knowledge (junction: thingKnowledge)
2507
-
2508
- ```typescript
2509
- const knowledgeAssocs = await db
2510
- .query("thingKnowledge")
2511
- .withIndex("by_thing", (q) => q.eq("thingId", thingId))
2512
- .collect();
2513
-
2514
- const knowledgeItems = await Promise.all(
2515
- knowledgeAssocs.map((assoc) => db.get(assoc.knowledgeId)),
2516
- );
2517
- ```
2518
-
2519
- ### Search by Multiple Criteria
2520
-
2521
- ```typescript
2522
- // Find fitness creators with >10k followers
2523
- const creators = await db
2524
- .query("things")
2525
- .withIndex("by_type", (q) => q.eq("type", "creator"))
2526
- .collect();
2527
-
2528
- const fitnessCreators = creators.filter(
2529
- (c) =>
2530
- c.properties.totalFollowers > 10000 &&
2531
- c.properties.niche.includes("fitness"),
2532
- );
2533
- ```
2534
-
2535
- ---
2536
-
2537
- ## Migration from Old Systems
2538
-
2539
- When migrating from one.ie or bullfm:
2540
-
2541
- ### Step 1: Identify Thing Types
2542
-
2543
- Map old models to new thing types:
2544
-
2545
- - Old "User" → "creator" or "audience_member"
2546
- - Old "Post" → "blog_post" or "social_post"
2547
- - Old "Follow" → connection with "following" type
2548
- - Old "Like" → event with "content_liked" type
2549
-
2550
- ### Step 2: Transform Properties
2551
-
2552
- Extract structured data into `properties` JSON:
2553
-
2554
- ```typescript
2555
- // Old user model
2556
- {
2557
- id: "123",
2558
- name: "John",
2559
- email: "john@example.com",
2560
- bio: "Fitness coach",
2561
- followers: 5000
2562
- }
2563
-
2564
- // New entity
2565
- {
2566
- type: "creator",
2567
- name: "John",
2568
- properties: {
2569
- email: "john@example.com",
2570
- username: "john",
2571
- displayName: "John",
2572
- bio: "Fitness coach",
2573
- niche: ["fitness"],
2574
- totalFollowers: 5000,
2575
- totalContent: 0,
2576
- totalRevenue: 0
2577
- },
2578
- status: "active",
2579
- createdAt: Date.now(),
2580
- updatedAt: Date.now()
2581
- }
2582
- ```
2583
-
2584
- ### Step 3: Convert Relationships
2585
-
2586
- Transform foreign keys into connections:
2587
-
2588
- ```typescript
2589
- // Old: user_id in posts table
2590
- // New: connection
2591
- {
2592
- fromThingId: userId,
2593
- toThingId: postId,
2594
- relationshipType: "authored",
2595
- createdAt: Date.now()
2596
- }
2597
- ```
2598
-
2599
- ### Step 4: Preserve History
2600
-
2601
- Convert activity logs to events:
2602
-
2603
- ```typescript
2604
- // Old: activity log entry
2605
- { user: "123", action: "viewed", post: "456", timestamp: 1234567890 }
2606
-
2607
- // New: event
2608
- {
2609
- thingId: "post-456",
2610
- eventType: "content_viewed",
2611
- timestamp: 1234567890,
2612
- actorType: "user",
2613
- actorId: "user-123"
2614
- }
2615
- ```
2616
-
2617
- ---
2618
-
2619
- ## Validation Rules
2620
-
2621
- ### Thing Validation
2622
-
2623
- - `type` must be valid ThingType (implementation alias may be `EntityType`)
2624
- - `name` cannot be empty
2625
- - `properties` structure must match type
2626
- - `status` must be valid status
2627
- - `createdAt` required, `updatedAt` required
2628
-
2629
- ### Connection Validation
2630
-
2631
- - `fromThingId` must exist
2632
- - `toThingId` must exist
2633
- - `relationshipType` must be valid
2634
- - Cannot connect a thing to itself (usually)
2635
- - Relationship must make semantic sense
2636
-
2637
- ### Event Validation
2638
-
2639
- - `thingId` must exist
2640
- - `eventType` must be valid
2641
- - `timestamp` required
2642
- - `actorId` must exist if provided
2643
- - `metadata` structure must match event type
2644
-
2645
- ### Tag Validation
2646
-
2647
- - `name` must be unique
2648
- - `category` must be valid TagCategory
2649
- - `usageCount` must be >= 0
2650
-
2651
- ---
2652
-
2653
- ## Performance Optimization
2654
-
2655
- ### Indexes
2656
-
2657
- Every table has optimized indexes:
2658
-
2659
- ```typescript
2660
- things: -by_type(type) -
2661
- by_status(status) -
2662
- by_created(createdAt) -
2663
- search_things(name, type, status);
2664
-
2665
- connections: -from_type(fromThingId, relationshipType) -
2666
- to_type(toThingId, relationshipType) -
2667
- bidirectional(fromThingId, toThingId);
2668
-
2669
- events: -thing_type_time(thingId, eventType, timestamp) -
2670
- type_time(eventType, timestamp) -
2671
- session(sessionId, timestamp);
2672
-
2673
- knowledge: -by_type(knowledgeType) -
2674
- by_source(sourceThingId) -
2675
- by_created(createdAt);
2676
- ```
2677
-
2678
- ### Query Optimization
2679
-
2680
- - Always use indexes for filters
2681
- - Limit results with `.take(n)`
2682
- - Paginate large result sets
2683
- - Use `.collect()` sparingly, prefer streaming
2684
-
2685
- ---
2686
-
2687
- ## Event Retention & Archival
2688
-
2689
- - Purpose: keep queries fast and costs predictable at scale.
2690
- - Recommended windows (tune per deployment):
2691
- - Hot (fast queries): last 30–90 days in primary `events` table, fully indexed.
2692
- - Warm (historical analytics): 90–365 days; restrict heavy scans and rely on `type_time`/`actor_time`.
2693
- - Cold archive: >365 days exported to warehouse/storage; query via batch jobs or precomputed aggregates.
2694
- - Patterns:
2695
- - Use `type_time` and `actor_time` for filters; avoid full scans.
2696
- - Precompute aggregates into `metric` entities (daily revenue, views) to avoid wide re-reads.
2697
- - Optional scheduled rollups to move very old events to archive and keep hot sets lean.
2698
-
2699
- ---
2700
-
2701
- ## Protocol Integration Examples
2702
-
2703
- ### How Protocols Map to This Ontology
2704
-
2705
- **Key Principle:** Our ontology is protocol-agnostic. Protocols identify themselves via `metadata.protocol`.
2706
-
2707
- #### A2A Protocol (Agent-to-Agent)
2708
-
2709
- ```typescript
2710
- // Event: Agent delegates task
2711
- {
2712
- type: "task_delegated",
2713
- actorId: oneAgentId,
2714
- targetId: externalAgentId,
2715
- timestamp: Date.now(),
2716
- metadata: {
2717
- protocol: "a2a",
2718
- task: "research_market_trends",
2719
- parameters: { industry: "fitness" }
2720
- }
2721
- }
2722
-
2723
- // Connection: Agents communicate
2724
- {
2725
- fromThingId: oneAgentId,
2726
- toThingId: externalAgentId,
2727
- relationshipType: "communicates_with",
2728
- metadata: {
2729
- protocol: "a2a",
2730
- platform: "elizaos",
2731
- messagesExchanged: 42
2732
- }
2733
- }
2734
- ```
2735
-
2736
- #### ACP Protocol (Agentic Commerce)
2737
-
2738
- ```typescript
2739
- // Event: Purchase initiated
2740
- {
2741
- type: "commerce_event",
2742
- actorId: agentId,
2743
- targetId: transactionId,
2744
- timestamp: Date.now(),
2745
- metadata: {
2746
- protocol: "acp",
2747
- eventType: "purchase_initiated",
2748
- agentPlatform: "chatgpt",
2749
- productId: productId,
2750
- amount: 99.00
2751
- }
2752
- }
2753
-
2754
- // Connection: Merchant approves
2755
- {
2756
- fromThingId: merchantId,
2757
- toThingId: transactionId,
2758
- relationshipType: "approved",
2759
- metadata: {
2760
- protocol: "acp",
2761
- approvalType: "transaction",
2762
- approvedAt: Date.now()
2763
- }
2764
- }
2765
- ```
2766
-
2767
- #### AP2 Protocol (Agent Payments)
2768
-
2769
- ```typescript
2770
- // Event: Intent mandate created
2771
- {
2772
- type: "mandate_created",
2773
- actorId: userId,
2774
- targetId: mandateId,
2775
- timestamp: Date.now(),
2776
- metadata: {
2777
- protocol: "ap2",
2778
- mandateType: "intent",
2779
- autoExecute: true,
2780
- maxBudget: 1500
2781
- }
2782
- }
2783
-
2784
- // Event: Price checked
2785
- {
2786
- type: "price_checked",
2787
- actorId: agentId,
2788
- targetId: intentMandateId,
2789
- timestamp: Date.now(),
2790
- metadata: {
2791
- protocol: "ap2",
2792
- productId: "prod_123",
2793
- currentPrice: 1399,
2794
- targetPrice: 1500,
2795
- withinBudget: true
2796
- }
2797
- }
2798
-
2799
- // Connection: Cart fulfills intent
2800
- {
2801
- fromThingId: intentMandateId,
2802
- toThingId: cartMandateId,
2803
- relationshipType: "fulfills",
2804
- metadata: {
2805
- protocol: "ap2",
2806
- fulfillmentType: "intent_to_cart",
2807
- matchScore: 0.95
2808
- }
2809
- }
2810
- ```
2811
-
2812
- #### X402 Protocol (HTTP Micropayments)
2813
-
2814
- ```typescript
2815
- // Event: Payment requested (402 status)
2816
- {
2817
- type: "payment_requested",
2818
- actorId: apiServiceId,
2819
- targetId: resourceId,
2820
- timestamp: Date.now(),
2821
- metadata: {
2822
- protocol: "x402",
2823
- scheme: "permit",
2824
- network: "base",
2825
- amount: "0.01",
2826
- resource: "/api/agent/analyze"
2827
- }
2828
- }
2829
-
2830
- // Event: Payment verified
2831
- {
2832
- type: "payment_verified",
2833
- actorId: systemId,
2834
- targetId: paymentId,
2835
- timestamp: Date.now(),
2836
- metadata: {
2837
- protocol: "x402",
2838
- network: "base",
2839
- txHash: "0x...",
2840
- verified: true
2841
- }
2842
- }
2843
-
2844
- // Connection: Payment made
2845
- {
2846
- fromThingId: payerId,
2847
- toThingId: serviceId,
2848
- relationshipType: "transacted",
2849
- metadata: {
2850
- protocol: "x402",
2851
- network: "base",
2852
- amount: "0.01",
2853
- txHash: "0x..."
2854
- }
2855
- }
2856
- ```
2857
-
2858
- #### AG-UI Protocol (CopilotKit Generative UI)
2859
-
2860
- ```typescript
2861
- // Event: UI component sent
2862
- {
2863
- type: "message_sent",
2864
- actorId: agentId,
2865
- targetId: conversationId,
2866
- timestamp: Date.now(),
2867
- metadata: {
2868
- protocol: "ag-ui",
2869
- messageType: "ui",
2870
- component: "chart",
2871
- data: { chartType: "line", ... }
2872
- }
2873
- }
2874
-
2875
- // Connection: No connections needed (UI is stateless)
2876
- ```
2877
-
2878
- ### Cross-Protocol Queries
2879
-
2880
- **All payments across all protocols:**
2881
-
2882
- ```typescript
2883
- const allPayments = await ctx.db
2884
- .query("events")
2885
- .filter((q) => q.eq(q.field("type"), "payment_processed"))
2886
- .collect();
2887
- ```
2888
-
2889
- **Only X402 blockchain payments:**
2890
-
2891
- ```typescript
2892
- const x402Payments = allPayments.filter((e) => e.metadata.protocol === "x402");
2893
- ```
2894
-
2895
- **Total revenue by protocol:**
2896
-
2897
- ```typescript
2898
- const byProtocol = allPayments.reduce((acc, e) => {
2899
- const protocol = e.metadata.protocol || "traditional";
2900
- acc[protocol] = (acc[protocol] || 0) + e.metadata.amount;
2901
- return acc;
2902
- }, {});
2903
-
2904
- // Result: { x402: 1250, acp: 3400, ap2: 890, traditional: 5600 }
2905
- ```
2906
-
2907
- ---
2908
-
2909
- ## Merged: Protocol Integration Requirements (from OntologyUpdates.md)
2910
-
2911
- This section consolidates the proposal in `OntologyUpdates.md` into the ontology's protocol‑agnostic model. We preserve the 6‑dimension architecture (organizations, people, things, connections, events, knowledge) and use consolidated types + `metadata.protocol` for extensibility and query performance.
2912
-
2913
- - Things
2914
- - Keep consolidated `mandate` thing with `properties.mandateType: "intent" | "cart"` instead of separate `intent_mandate`/`cart_mandate` types. This reduces index fan‑out and simplifies queries while preserving full fidelity in `properties`.
2915
- - Keep `product` (ACP/marketplace) and `payment` (transaction). For X402/AP2/ACP specifics, store details in `payment.properties` and event metadata (see below).
2916
- - External integrations remain: `external_agent`, `external_workflow`, `external_connection`.
2917
-
2918
- - Connections
2919
- - Use existing specific types (e.g., `owns`, `member_of`, `holds_tokens`) plus consolidated types with metadata:
2920
- - `communicated` for cross‑agent communication (A2A/ACP/AG‑UI)
2921
- - `delegated` for task delegation/assignment
2922
- - `approved` for approvals; `fulfilled` for fulfillment; `transacted` for financial relations
2923
- - Protocol identity is always in `metadata.protocol`.
2924
-
2925
- - Events (consolidated, protocol‑aware)
2926
- - Use consolidated events already defined in this spec:
2927
- - `payment_event` with `metadata.status: requested|verified|processed` (X402/AP2/ACP)
2928
- - `commerce_event` with `metadata.eventType` (ACP/AP2)
2929
- - `communication_event` with `metadata.messageType` (A2A/ACP/AG‑UI)
2930
- - `task_event` with `metadata.action: delegated|completed|failed`
2931
- - `mandate_event` with `metadata.mandateType: intent|cart` (AP2)
2932
- - We map granular variants proposed in `OntologyUpdates.md` (e.g., `message_sent`, `task_delegated`, `price_checked`) to the consolidated forms for index efficiency and simpler analytics.
2933
-
2934
- - Protocol‑specific properties (examples)
2935
- - AP2 Mandate (stored on `mandate` thing):
2936
- - `properties`: `{ mandateType: "intent"|"cart", intent?: {...}, items?: [...], subtotal, tax, total, status, signature, credentialHash, approvedAt?, completedAt? }`
2937
- - X402/ACP/AP2 Payment (stored on `payment` thing and echoed in `payment_event.metadata`):
2938
- - `properties`: `{ protocol: "x402"|"acp"|"ap2", scheme?, network?, amount, currency?, txHash?, invoiceId?, status }`
2939
-
2940
- - Indexes (unchanged, validated)
2941
- - `things`: `by_type`, `by_status`, `by_created`, plus `search_things(name, type, status)`
2942
- - `connections`: `from_type`, `to_type`, `bidirectional`
2943
- - `events`: `type_time`, `actor_time`, `thing_type_time`
2944
- - `knowledge`: `by_type`, `by_source`, `by_created` (plus vector index when supported)
2945
-
2946
- - Auth migration strategy (compatibility)
2947
- - Existing auth tables (Better Auth: users, sessions, verification, resets, 2FA) remain intact.
2948
- - Link `users` to `things` via optional `users.thingId` and backfill with an internal migration (see `OntologyUpdates.md`). This preserves zero‑downtime compatibility.
2949
-
2950
- Rationale: Consolidation minimizes index cardinality, improves query ergonomics, and retains protocol fidelity in `metadata`/`properties`. This yields better beauty (clean mental model), completeness (coverage for all protocols), speed (lean indexes), and scalability (new protocols drop in via metadata).
2951
-
2952
- ---
2953
-
2954
- ## Extensibility: User-Safe Additions
2955
-
2956
- Principle: Users can add to any type without breaking the ontology.
2957
-
2958
- - Use `properties` for schema-free details; don’t edit core enums casually.
2959
- - Use knowledge labels to categorize, filter, and group. Add labels freely without schema changes.
2960
- - Use `metadata` on connections and events for protocol/workflow-specific context.
2961
- - When a new subtype emerges (e.g., new content flavor), prefer:
2962
- - Keep `type` stable (e.g., `video`).
2963
- - Add `properties.kind` and labels (e.g., `format:webinar`, `topic:fitness`).
2964
- - Introduce a new enum literal only when global indexes/constraints benefit.
2965
- - Custom automations integrate via `external_agent`, `external_workflow`, and `external_connection` entities with `delegated`/`communicated` connections.
2966
-
2967
- ---
2968
-
2969
- ## Glossary (Compact)
2970
-
2971
- - `entity` (thing): Any addressable object (creator, organization, content, product, payment, external_agent, mandate, etc.).
2972
- - `connection` (state): Relationship between two entities (owns, member_of, transacted, fulfilled, delegated, communicated).
2973
- - `event` (action): Time-stamped occurrence (content_changed, payment_event, communication_event, task_event, mandate_event).
2974
- - `knowledge` (label/chunk): Classification and RAG units applied via `thingKnowledge` (labels like skill/industry/topic and chunks with embeddings).
2975
- - `owner`: A `creator` with ownership responsibilities. Platform owner (platform_owner) or group owner (group_owner). See `one/people/owner.md`.
2976
- - `group`: Multi-tenant container for users and resources with hierarchical nesting. See `one/people/organisation.md`.
2977
-
2978
- ---
2979
-
2980
- ## Summary Statistics
2981
-
2982
- **Dimensions:** 6 total (groups, people, things, connections, events, knowledge)
2983
-
2984
- **Thing Types:** 66 total
2985
-
2986
- - Core: 4 (creator, ai_clone, audience_member, organization)
2987
- - Business Agents: 10
2988
- - Content: 7
2989
- - Products: 4
2990
- - Community: 3
2991
- - Token: 2
2992
- - Knowledge: 2
2993
- - Platform: 6
2994
- - Business: 7
2995
- - Authentication & Session: 5
2996
- - Marketing: 6
2997
- - External: 3
2998
- - Protocol: 2
2999
-
3000
- **Connection Types:** 25 total (Hybrid approach)
3001
-
3002
- - 18 specific semantic types
3003
- - 7 consolidated types with metadata variants
3004
- - Protocol-agnostic via metadata.protocol
3005
- - Includes group membership with role-based metadata
3006
-
3007
- **Event Types:** 67 total (Hybrid approach)
3008
-
3009
- - 4 Thing lifecycle
3010
- - 5 User events
3011
- - 6 Authentication events
3012
- - 5 Group events (formerly "Organization events")
3013
- - 4 Dashboard & UI events
3014
- - 4 AI/Clone events
3015
- - 4 Agent events
3016
- - 7 Token events
3017
- - 5 Course events
3018
- - 5 Analytics events
3019
- - 7 Cycle events
3020
- - 5 Blockchain events
3021
- - 11 consolidated types with metadata variants
3022
-
3023
- **Design Benefits:**
3024
-
3025
- - Six-dimension reality model
3026
- - Multi-tenant by design
3027
- - Clear ownership & governance
3028
- - Protocol-agnostic core
3029
- - Infinite protocol extensibility
3030
- - Cross-protocol analytics
3031
- - Type-safe
3032
- - Future-proof
3033
- - Scales from children to enterprise
3034
-
3035
- ---
3036
-
3037
- ## Knowledge Governance
3038
-
3039
- Policy: Default is free-form, user-extensible knowledge labels for maximum flexibility and zero schema churn.
3040
-
3041
- - Curated label prefixes (recommended): `skill:*`, `industry:*`, `topic:*`, `format:*`, `goal:*`, `audience:*`, `technology:*`, `status:*`, `capability:*`, `protocol:*`, `payment_method:*`, `network:*`.
3042
- - Validation: Enforce label hygiene (no duplicates within scope); allow synonyms via an alias list if needed.
3043
- - Ownership: Platform/group owners may curate official labels; users can still apply ad‑hoc labels.
3044
- - Hygiene: Periodically consolidate low-usage duplicates; do not delete knowledge items with active references—mark deprecated instead.
3045
-
3046
- ---
3047
-
3048
- ## Changelog
3049
-
3050
- - 2025-10-14
3051
- - Updated terminology from "organizations" to "groups" throughout Frontend Integration Examples, Summary Statistics, Philosophy, Knowledge Governance, and Glossary sections.
3052
- - Updated all code examples to use `groups` table and `groupId` references instead of organizations/orgId.
3053
- - Changed event category from "Organization events" to "Group events" in Summary Statistics.
3054
- - Updated role references from `org_owner` to `group_owner` throughout examples.
3055
- - Clarified that groups scale hierarchically from friend circles to governments.
3056
- - Updated RAG ingestion strategy to use "group" filtering instead of "org".
3057
-
3058
- - 2025-10-07
3059
- - Canonicalized terminology: "things" as the conceptual term; kept implementation table/fields as `entities` for compatibility.
3060
- - Merged protocol integration requirements; clarified consolidated events/connections with `metadata.protocol`.
3061
- - Added Event Retention & Archival guidance for scale.
3062
- - Added Extensibility rules and a compact Glossary.
3063
- - Added Knowledge Governance and links to `owner.md` and `organisation.md`.
3064
-
3065
- **Thing Types:** 66 total
3066
-
3067
- - Core: 4 (creator, ai_clone, audience_member, organization)
3068
- - Business Agents: 10
3069
- - Content: 7
3070
- - Products: 4
3071
- - Community: 3
3072
- - Token: 2
3073
- - Knowledge: 2
3074
- - Platform: 6
3075
- - Business: 7
3076
- - Authentication & Session: 5 (session, oauth_account, verification_token, password_reset_token, ui_preferences)
3077
- - Marketing: 6
3078
- - External: 3
3079
- - Protocol: 2
3080
-
3081
- **Connection Types:** 25 total (Hybrid approach)
3082
-
3083
- - 18 specific semantic types
3084
- - 7 consolidated types with metadata variants
3085
- - Protocol-agnostic via metadata.protocol
3086
- - Includes group membership with role-based metadata
3087
-
3088
- **Event Types:** 63 total (Hybrid approach)
3089
-
3090
- - 4 Thing lifecycle
3091
- - 5 User events
3092
- - 6 Authentication events (password_reset, email_verification, 2FA)
3093
- - 5 Group events (group_created, user_invited_to_group, user_joined_group)
3094
- - 4 Dashboard & UI events (dashboard_viewed, theme_changed, settings_updated)
3095
- - 4 AI/Clone events
3096
- - 4 Agent events
3097
- - 7 Token events
3098
- - 5 Course events
3099
- - 5 Analytics events
3100
- - **7 Cycle events** (NEW: cycle_request, cycle_completed, revenue_collected, quota_exceeded)
3101
- - **5 Blockchain events** (NEW: nft_minted, nft_transferred, tokens_bridged, contract_deployed, treasury_withdrawal)
3102
- - 11 consolidated types with metadata variants
3103
- - Protocol identification via metadata.protocol + metadata.network
3104
-
3105
- **Tag Categories:** 12 total
3106
-
3107
- - Industry, skill, topic, format, goal, audience, technology, status
3108
- - Plus: capability, protocol, payment_method, network
3109
-
3110
- **Design Benefits:**
3111
-
3112
- - ✅ Single source of truth
3113
- - ✅ Protocol-agnostic core
3114
- - ✅ Infinite protocol extensibility
3115
- - ✅ Cross-protocol analytics
3116
- - ✅ Clean, maintainable
3117
- - ✅ Type-safe
3118
- - ✅ Future-proof
3119
-
3120
- ---
3121
-
3122
- **END OF ONTOLOGY SPECIFICATION**
3123
-
3124
- ## The Philosophy: Reality as DSL
3125
-
3126
- **This isn't a database schema. It's a Domain-Specific Language for reality itself.**
3127
-
3128
- ### The Core Insight
3129
-
3130
- **Most systems model their application. ONE models reality.**
3131
-
3132
- This ontology proves that you don't need hundreds of tables or complex schemas to build a complete AI-native platform. You need:
3133
-
3134
- 1. **6 dimensions** (groups, people, things, connections, events, knowledge)
3135
- 2. **66 thing types** (every "thing")
3136
- 3. **25 connection types** (every relationship)
3137
- 4. **67 event types** (every action)
3138
- 5. **Metadata** (for protocol identity via metadata.protocol)
3139
-
3140
- That's it. Everything else is just data.
3141
-
3142
- ### Why This Works for AI Agents
3143
-
3144
- **Traditional codebases:**
3145
-
3146
- - 100 different patterns for the same concept
3147
- - AI sees chaos, accuracy degrades (95% → 30%)
3148
- - Technical debt compounds
3149
- - Each feature makes the next HARDER
3150
-
3151
- **ONE codebase:**
3152
-
3153
- - 1 universal pattern for each dimension
3154
- - AI sees structure, accuracy compounds (85% → 98%)
3155
- - Technical credit accumulates
3156
- - Each feature makes the next EASIER
3157
-
3158
- **The result:** 100x developer productivity. Not hyperbole. Math.
3159
-
3160
- ### Why Schema Migrations Never Happen
3161
-
3162
- **Other systems:**
3163
-
3164
- - Create new tables for every feature
3165
- - Add protocol-specific columns
3166
- - Pollute schema with temporary concepts
3167
- - End up with 50+ tables, 200+ columns
3168
- - Require migrations for every change
3169
- - Become unmaintainable nightmares
3170
-
3171
- **ONE's approach:**
3172
-
3173
- - Map every feature to 6 dimensions (reality model)
3174
- - Groups partition the space (hierarchical containers)
3175
- - People authorize and govern (role-based access)
3176
- - Things exist with flexible properties (no migrations)
3177
- - Connections relate (metadata for protocols)
3178
- - Events record (complete audit trail)
3179
- - Knowledge understands (embeddings + RAG)
3180
- - Scale infinitely without schema changes
3181
- - Stay simple, clean, beautiful
3182
-
3183
- ### The Economic Impact
3184
-
3185
- **Traditional Development:**
3186
-
3187
- - Developer writes 100 lines/day
3188
- - AI assistance degrades over time
3189
- - Technical debt compounds
3190
- - Codebases become unmaintainable
3191
- - **Cost scales linearly with codebase size**
3192
-
3193
- **ONE Development:**
3194
-
3195
- - Agent generates 10,000 lines/day (100x)
3196
- - AI accuracy improves over time (98%+)
3197
- - Structure compounds (technical credit)
3198
- - Codebases become MORE maintainable
3199
- - **Cost scales sublinearly—larger codebases are cheaper per feature**
3200
-
3201
- **Result:** 12x cheaper per feature at scale. Feature #100 costs LESS than feature #1.
3202
-
3203
- ### The Universal Language
3204
-
3205
- A system architecture that:
3206
-
3207
- - **Scales infinitely** - Lemonade stands to global governments, same schema
3208
- - **Children can understand** - "I own (group), I'm the boss (person), I sell lemonade (things)"
3209
- - **Enterprises can rely on** - Multi-tenant isolation, clear governance, infinite scale
3210
- - **AI agents can master** - 6 patterns, 98% accuracy, compound structure
3211
- - **Never breaks** - Reality doesn't change, technology does
3212
- - **Grows more powerful** - Each feature adds structure, making the next feature easier
3213
- - **Enables feature import** - Clone ANY system into the ontology (Shopify, Moodle, Stripe, etc.)
3214
-
3215
- ### What This Enables
3216
-
3217
- **1. Compound Velocity**
3218
-
3219
- - Traditional: Feature #100 takes LONGER than feature #1 (technical debt)
3220
- - ONE: Feature #100 takes LESS TIME than feature #1 (pattern reuse)
3221
-
3222
- **2. Universal Feature Import**
3223
-
3224
- - Traditional: Want Shopify's checkout? Build from scratch (3 months)
3225
- - ONE: Point agent-clone at Shopify. Clone checkout feature (20 minutes)
3226
-
3227
- **3. Backend Agnosticism**
3228
-
3229
- - Traditional: Migrating from WordPress to custom backend takes months
3230
- - ONE: Switch `CONTENT_SOURCE` env var. Done in 1 minute.
3231
-
3232
- **4. AI-Native Development**
3233
-
3234
- - Traditional: AI is an assistant. Human is the driver (70% human work)
3235
- - ONE: AI is the primary builder. Human is the architect (2% human work at scale)
3236
-
3237
- **5. No Breaking Changes**
3238
-
3239
- - Traditional: Major versions break everything
3240
- - ONE: Technology changes (React → Svelte), ontology stays the same
3241
-
3242
- **This is what happens when you design for AI agents first, not humans.**
3243
-
3244
- The 6-dimension ontology is the **universal code generation language** that enables 98% accuracy by modeling reality itself.
3245
-
3246
- ---
3247
-
3248
- ## Frontend Integration Examples
3249
-
3250
- ### How the Frontend Uses This Ontology
3251
-
3252
- The Astro frontend (documented in `Frontend.md`) uses this ontology through:
3253
-
3254
- 1. **Astro Content Collections** - Can load entities as typed collections
3255
- 2. **Convex Hooks** - Real-time subscriptions to entity/connection/event data
3256
- 3. **Hono API** - Complex mutations that create/update entities and log events
3257
-
3258
- **Example: Multi-Tenant Dashboard**
3259
-
3260
- ```typescript
3261
- // Frontend Component (src/components/admin/GroupList.tsx)
3262
- import { useQuery } from 'convex/react';
3263
- import { api } from '@/convex/_generated/api';
3264
-
3265
- export function GroupList() {
3266
- // Query groups (table: "groups")
3267
- const groups = useQuery(api.queries.admin.listGroups);
3268
-
3269
- return (
3270
- <div>
3271
- {groups?.map(group => (
3272
- <Card key={group._id}>
3273
- <CardHeader>
3274
- <CardTitle>{group.name}</CardTitle>
3275
- <Badge>{group.settings.plan}</Badge>
3276
- </CardHeader>
3277
- <CardContent>
3278
- <p>{group.metadata.userCount || 0} / {group.settings.limits.users} users</p>
3279
- <p>Status: {group.status}</p>
3280
- </CardContent>
3281
- </Card>
3282
- ))}
3283
- </div>
3284
- );
3285
- }
3286
- ```
3287
-
3288
- **Example: Authentication Flow**
3289
-
3290
- ```typescript
3291
- // Password reset request creates:
3292
- // 1. Entity: password_reset_token
3293
- // 2. Event: password_reset_requested
3294
-
3295
- // Backend (Convex mutation)
3296
- export const requestPasswordReset = mutation({
3297
- handler: async (ctx, { email }) => {
3298
- // 1. Find user entity
3299
- const user = await ctx.db
3300
- .query("entities")
3301
- .filter((q) => q.eq(q.field("properties.email"), email))
3302
- .first();
3303
-
3304
- if (!user) return { success: true }; // Don't reveal if user exists
3305
-
3306
- // 2. Create password_reset_token entity
3307
- const tokenId = await ctx.db.insert("entities", {
3308
- type: "password_reset_token",
3309
- name: `Reset token for ${email}`,
3310
- properties: {
3311
- userId: user._id,
3312
- token: hashedToken,
3313
- expiresAt: Date.now() + 30 * 60 * 1000,
3314
- },
3315
- status: "active",
3316
- createdAt: Date.now(),
3317
- updatedAt: Date.now(),
3318
- });
3319
-
3320
- // 3. Log event
3321
- await ctx.db.insert("events", {
3322
- type: "password_reset_requested",
3323
- actorId: user._id,
3324
- targetId: tokenId,
3325
- timestamp: Date.now(),
3326
- metadata: {
3327
- email,
3328
- ipAddress: ctx.auth.sessionId,
3329
- expiresAt: Date.now() + 30 * 60 * 1000,
3330
- },
3331
- });
3332
-
3333
- return { success: true };
3334
- },
3335
- });
3336
-
3337
- // Frontend usage
3338
- import { useMutation } from "convex/react";
3339
-
3340
- export function PasswordResetForm() {
3341
- const requestReset = useMutation(api.auth.requestPasswordReset);
3342
-
3343
- const handleSubmit = async (email: string) => {
3344
- await requestReset({ email });
3345
- // Show success message
3346
- };
3347
- }
3348
- ```
3349
-
3350
- **Example: Group Membership Check**
3351
-
3352
- ```typescript
3353
- // Check if user is group_owner (Middleware.md pattern)
3354
- export const checkGroupOwner = query({
3355
- args: { userId: v.id("things"), groupId: v.id("groups") },
3356
- handler: async (ctx, { userId, groupId }) => {
3357
- // Query connection with role metadata
3358
- const membership = await ctx.db
3359
- .query("connections")
3360
- .withIndex("from_type", (q) =>
3361
- q
3362
- .eq("fromThingId", userId)
3363
- .eq("toThingId", groupId)
3364
- .eq("relationshipType", "member_of"),
3365
- )
3366
- .first();
3367
-
3368
- return membership?.metadata?.role === "group_owner";
3369
- },
3370
- });
3371
-
3372
- // Frontend usage in middleware
3373
- import { ConvexHttpClient } from "convex/browser";
3374
-
3375
- export async function checkAccess(userId: string, groupId: string) {
3376
- const convex = new ConvexHttpClient(env.CONVEX_URL);
3377
- const isOwner = await convex.query(api.auth.checkGroupOwner, {
3378
- userId,
3379
- groupId,
3380
- });
3381
-
3382
- if (!isOwner) {
3383
- throw new Error("Forbidden: Group owner access required");
3384
- }
3385
- }
3386
- ```
3387
-
3388
- **Example: Dashboard Analytics**
3389
-
3390
- ```typescript
3391
- // Query events for analytics (Dashboard.md pattern)
3392
- export const getGroupAnalytics = query({
3393
- args: { groupId: v.id("groups"), days: v.number() },
3394
- handler: async (ctx, { groupId, days }) => {
3395
- const since = Date.now() - days * 24 * 60 * 60 * 1000;
3396
-
3397
- // Get all dashboard_viewed events for group users
3398
- const groupMembers = await ctx.db
3399
- .query("connections")
3400
- .withIndex("to_type", (q) =>
3401
- q.eq("toThingId", groupId).eq("relationshipType", "member_of"),
3402
- )
3403
- .collect();
3404
-
3405
- const memberIds = groupMembers.map((m) => m.fromThingId);
3406
-
3407
- const dashboardViews = await ctx.db
3408
- .query("events")
3409
- .withIndex("type_time", (q) =>
3410
- q.eq("type", "dashboard_viewed").gte("timestamp", since),
3411
- )
3412
- .filter((q) => memberIds.includes(q.field("actorId")))
3413
- .collect();
3414
-
3415
- return {
3416
- totalViews: dashboardViews.length,
3417
- uniqueUsers: new Set(dashboardViews.map((e) => e.actorId)).size,
3418
- averageSessionDuration:
3419
- dashboardViews.reduce(
3420
- (sum, e) => sum + (e.metadata.sessionDuration || 0),
3421
- 0,
3422
- ) / dashboardViews.length,
3423
- };
3424
- },
3425
- });
3426
- ```
3427
-
3428
- **Example: UI Preferences Sync**
3429
-
3430
- ```typescript
3431
- // Update user preferences (creates ui_preferences thing if not exists)
3432
- export const updatePreferences = mutation({
3433
- args: {
3434
- userId: v.id("entities"),
3435
- theme: v.optional(
3436
- v.union(v.literal("light"), v.literal("dark"), v.literal("system")),
3437
- ),
3438
- language: v.optional(v.string()),
3439
- },
3440
- handler: async (ctx, { userId, theme, language }) => {
3441
- // Get or create ui_preferences entity
3442
- let prefs = await ctx.db
3443
- .query("entities")
3444
- .withIndex("by_type", (q) => q.eq("type", "ui_preferences"))
3445
- .filter((q) => q.eq(q.field("properties.userId"), userId))
3446
- .first();
3447
-
3448
- if (!prefs) {
3449
- // Create new preferences entity
3450
- const prefsId = await ctx.db.insert("entities", {
3451
- type: "ui_preferences",
3452
- name: `Preferences for user ${userId}`,
3453
- properties: {
3454
- userId,
3455
- theme: theme || "system",
3456
- language: language || "en",
3457
- timezone: "UTC",
3458
- dashboardLayout: {
3459
- sidebarCollapsed: false,
3460
- defaultView: "grid",
3461
- itemsPerPage: 20,
3462
- },
3463
- notifications: { email: true, push: false, sms: false, inApp: true },
3464
- accessibility: {
3465
- reducedMotion: false,
3466
- highContrast: false,
3467
- fontSize: "medium",
3468
- },
3469
- updatedAt: Date.now(),
3470
- },
3471
- status: "active",
3472
- createdAt: Date.now(),
3473
- updatedAt: Date.now(),
3474
- });
3475
-
3476
- prefs = await ctx.db.get(prefsId);
3477
- } else {
3478
- // Update existing preferences
3479
- await ctx.db.patch(prefs._id, {
3480
- properties: {
3481
- ...prefs.properties,
3482
- theme: theme || prefs.properties.theme,
3483
- language: language || prefs.properties.language,
3484
- updatedAt: Date.now(),
3485
- },
3486
- updatedAt: Date.now(),
3487
- });
3488
- }
3489
-
3490
- // Log preferences_updated event
3491
- if (theme) {
3492
- await ctx.db.insert("events", {
3493
- type: "theme_changed",
3494
- actorId: userId,
3495
- targetId: prefs._id,
3496
- timestamp: Date.now(),
3497
- metadata: {
3498
- previousTheme: prefs.properties.theme,
3499
- newTheme: theme,
3500
- },
3501
- });
3502
- }
3503
-
3504
- return { success: true };
3505
- },
3506
- });
3507
-
3508
- // Frontend hook
3509
- export function usePreferences(userId: string) {
3510
- const prefs = useQuery(api.queries.preferences.get, { userId });
3511
- const updatePrefs = useMutation(api.mutations.preferences.update);
3512
-
3513
- return { preferences: prefs?.properties, updatePreferences: updatePrefs };
3514
- }
3515
- ```
3516
-
3517
- ### Key Frontend Patterns
3518
-
3519
- **1. Thing as Content Collection**
3520
-
3521
- ```typescript
3522
- // src/content/config.ts
3523
- const agentsCollection = defineCollection({
3524
- type: "data",
3525
- loader: async () => {
3526
- const convex = new ConvexHttpClient(env.CONVEX_URL);
3527
- const agents = await convex.query(api.queries.entities.list, {
3528
- type: "strategy_agent",
3529
- });
3530
- return agents;
3531
- },
3532
- });
3533
- ```
3534
-
3535
- **2. Real-time Dashboard Stats**
3536
-
3537
- ```tsx
3538
- export function DashboardStats({ groupId }) {
3539
- // Subscribes to changes - auto-updates when events are logged!
3540
- const stats = useQuery(api.queries.dashboard.getStats, { groupId });
3541
-
3542
- return <StatsCards data={stats} />;
3543
- }
3544
- ```
3545
-
3546
- **3. Permission-Based Rendering**
3547
-
3548
- ```tsx
3549
- export function AdminPanel({ userId, groupId }) {
3550
- const membership = useQuery(api.queries.groups.getMembership, {
3551
- userId,
3552
- groupId,
3553
- });
3554
-
3555
- if (membership?.metadata?.role !== "group_owner") {
3556
- return <div>Access denied</div>;
3557
- }
3558
-
3559
- return <AdminDashboard />;
3560
- }
3561
- ```
3562
-
3563
- **4. Astro SSR with Ontology**
3564
-
3565
- ```astro
3566
- ---
3567
- // src/pages/group/[groupId]/dashboard.astro
3568
- import { ConvexHttpClient } from 'convex/browser';
3569
- import { api } from '@/convex/_generated/api';
3570
-
3571
- const convex = new ConvexHttpClient(import.meta.env.PUBLIC_CONVEX_URL);
3572
-
3573
- // Fetch group
3574
- const group = await convex.query(api.queries.groups.get, {
3575
- id: Astro.params.groupId,
3576
- });
3577
-
3578
- // Fetch group members (connections where relationshipType = "member_of")
3579
- const members = await convex.query(api.queries.groups.getMembers, {
3580
- groupId: Astro.params.groupId,
3581
- });
3582
- ---
3583
-
3584
- <Layout title={group.name}>
3585
- <h1>{group.name} Dashboard</h1>
3586
- <p>Plan: {group.settings.plan}</p>
3587
- <p>Members: {members.length} / {group.settings.limits.users}</p>
3588
-
3589
- <!-- Real-time stats component -->
3590
- <GroupStats client:load groupId={group._id} />
3591
- </Layout>
3592
- ```
3593
-
3594
- This demonstrates how the complete ontology (things, connections, events, knowledge) powers the entire frontend architecture through clean, type-safe queries and real-time subscriptions.
3595
-
3596
- ---
3597
-
3598
- ## For Implementers: Using the Universal Language
3599
-
3600
- ### AI Agents: The 6-Question Framework
3601
-
3602
- When implementing ANY feature, ask these 6 questions (maps to 6 dimensions):
3603
-
3604
- 1. **Groups** - Which group owns this? Any parent/child relationships?
3605
- 2. **People** - Who can access/modify this? What role is required?
3606
- 3. **Things** - What entities are involved? Which thing types?
3607
- 4. **Connections** - How do they relate? Which connection types?
3608
- 5. **Events** - What actions need logging? Which event types?
3609
- 6. **Knowledge** - What needs to be learned/searched? Labels? Chunks? Embeddings?
3610
-
3611
- **Example: User Purchases a Course**
3612
-
3613
- 1. **Groups** - User's organization (groupId scoping)
3614
- 2. **People** - User (role: customer), Creator (role: org_owner)
3615
- 3. **Things** - User thing, Course thing, Payment thing
3616
- 4. **Connections** - User → Course (enrolled_in), User → Payment (transacted)
3617
- 5. **Events** - course_enrolled, payment_processed
3618
- 6. **Knowledge** - Course chunks (RAG), "education" label, "video" label
3619
-
3620
- **Pattern Learned:** Every feature maps to all 6 dimensions. This is the universal pattern.
3621
-
3622
- ### Humans: Why This Matters
3623
-
3624
- **You're building the universal code generation language.**
3625
-
3626
- Your AI agents now have a complete, unambiguous data model. They will generate consistent database operations because they understand the underlying structure.
3627
-
3628
- **Key insights:**
3629
-
3630
- - The ontology models reality, not your app (that's why it never breaks)
3631
- - Each feature AI generates makes the NEXT feature more accurate
3632
- - You're not managing technical debt—you're accumulating technical credit
3633
- - 100 features in, your codebase is EASIER to work with, not harder
3634
-
3635
- ### Developers: Pattern Recognition
3636
-
3637
- **You have a schema that will never need major refactoring.**
3638
-
3639
- **Adding features:**
3640
-
3641
- - New entity type? → Add to `properties`, no schema migration
3642
- - New relationship? → Use existing connection types + metadata
3643
- - New protocol? → Add `metadata.protocol`, no new tables
3644
- - New workflow? → Compose existing services via Effect.ts
3645
-
3646
- **What you DON'T do:**
3647
-
3648
- - ❌ Create custom tables (map to 6 dimensions instead)
3649
- - ❌ Add protocol-specific columns (use metadata)
3650
- - ❌ Schema migrations for new fields (use properties)
3651
- - ❌ Hardcode patterns (use provider interface)
3652
-
3653
- **What you DO:**
3654
-
3655
- - ✅ Map features to 6 dimensions (groups, people, things, connections, events, knowledge)
3656
- - ✅ Use flexible properties for type-specific data
3657
- - ✅ Use metadata for protocol identity
3658
- - ✅ Compose services via Effect.ts
3659
- - ✅ Log all actions as events (complete audit trail)
3660
-
3661
- ### The Learning Curve
3662
-
3663
- **Generation 1-10: Learning the ontology (85% accuracy)**
3664
-
3665
- - You're teaching AI the 6 dimensions
3666
- - Patterns are being established
3667
- - Services are being created
3668
-
3669
- **Generation 11-50: Pattern recognition (90-93% accuracy)**
3670
-
3671
- - AI recognizes the universal patterns
3672
- - Services are being reused
3673
- - Composition is happening
3674
-
3675
- **Generation 51-100: Pattern mastery (96-98% accuracy)**
3676
-
3677
- - AI has internalized the structure
3678
- - Generation is deterministic
3679
- - You're reviewing, not debugging
3680
-
3681
- **Generation 100+: Generalized patterns (98%+ accuracy)**
3682
-
3683
- - AI doesn't need to think
3684
- - Every decision is pattern-based
3685
- - You're the architect, AI is the builder
3686
-
3687
- **This ontology is complete. It's ready for production. It's the foundation for 98% AI code generation accuracy.**
3688
-
3689
- ---
3690
-
3691
- ## Summary: The Universal Code Generation Language
3692
-
3693
- ### What Makes ONE Universal
3694
-
3695
- 1. **6-Dimension Ontology** - Models reality, not technology
3696
- 2. **Compound Structure** - Each feature adds structure (not debt)
3697
- 3. **Pattern Convergence** - 1 pattern per dimension (not 100 patterns)
3698
- 4. **Backend Agnostic** - Swap technology freely (Convex, WordPress, Shopify)
3699
- 5. **Never Breaks** - Reality doesn't change, technology does
3700
- 6. **Infinite Scale** - Lemonade stands to global governments, same schema
3701
-
3702
- ### The Economic Result
3703
-
3704
- **Traditional Codebases:**
3705
-
3706
- ```
3707
- 100 files → 90% accurate
3708
- 1,000 files → 70% accurate
3709
- 10,000 files → 30% accurate
3710
- AI becomes a liability
3711
- ```
3712
-
3713
- **ONE Codebase:**
3714
-
3715
- ```
3716
- 100 files → 85% accurate (learning)
3717
- 1,000 files → 92% accurate (mastering)
3718
- 10,000 files → 98% accurate (generalized)
3719
- AI becomes more valuable
3720
- ```
3721
-
3722
- **Why?** The ontology is the language. Patterns converge. Structure compounds.
3723
-
3724
- ### Next Steps for AI Agents
3725
-
3726
- **When implementing ANY feature:**
3727
-
3728
- 1. Read `/CLAUDE.md` (platform overview)
3729
- 2. Read `/one/knowledge/ontology.md` (this file - understand the 6 dimensions)
3730
- 3. Read `/one/knowledge/architecture.md` (why this enables 98% accuracy)
3731
- 4. Map feature to ontology (groups, people, things, connections, events, knowledge)
3732
- 5. Generate Effect.ts services (composable business logic)
3733
- 6. Generate provider adapters (if needed)
3734
- 7. Generate UI components (shadcn/ui)
3735
- 8. Test with mocked layers
3736
-
3737
- **Remember:**
3738
-
3739
- - The ontology never changes (it's reality)
3740
- - Effect.ts is for agents (predictable patterns)
3741
- - Provider pattern is the universal adapter
3742
- - Every feature adds structure
3743
- - Each generation compounds accuracy
3744
-
3745
- **This is how software should be built.**
3746
-
3747
- ---
3748
-
3749
- ## RAG Ingestion Strategy for `one/`
3750
-
3751
- Objective: attach vectors to every relevant piece of content to enable high‑quality retrieval, while preserving ontology simplicity.
3752
-
3753
- 1. Inventory sources (by thing type)
3754
-
3755
- - Text bodies: `blog_post.content`, `social_post.text`, `email.content`, `lesson.content`, `course.description`, `website.page.html (stripped)`
3756
- - Transcripts: `video.transcript`, `podcast.transcript`, `livestream.recording.transcript`
3757
- - Metadata: titles, summaries, captions
3758
-
3759
- 2. Chunking standard
3760
-
3761
- - Window: ~800 tokens; overlap: ~200 tokens; language‑aware sentence boundaries when possible.
3762
- - Store per‑chunk: `{ index, tokenCount, start, end, overlap }`.
3763
-
3764
- 3. Embedding policy
3765
-
3766
- - Model: configurable via env (e.g., `text-embedding-3-large`). Store `embeddingModel` + `embeddingDim` per knowledge item.
3767
- - PII/Privacy: use `knowledgeType: 'vector_only'` for sensitive texts; omit `text` and keep only embeddings + hashes.
3768
-
3769
- 4. Ingestion pipeline
3770
-
3771
- - Mutation: `scheduleEmbeddingForThing({ thingId, fields[] })` validates and enqueues work.
3772
- - Internal action: `embedText({ text, model })` calls provider and returns `embedding`.
3773
- - Internal mutation: `upsertKnowledgeChunks({ thingId, chunks[] })` writes `knowledge` items and links via `thingKnowledge` with role `chunk_of`.
3774
- - Event log: `content_changed` on source updates triggers re‑embedding (debounced) via scheduler.
3775
-
3776
- 5. Query + retrieval
3777
-
3778
- - Vector search over `knowledge` filtered by group, creator, and content type; k‑NN approximate index when available, else provider‑side search.
3779
- - Hybrid scoring: combine semantic similarity with lexical signals from `labels` and metadata.
3780
-
3781
- 6. Governance + lifecycle
3782
-
3783
- - Versioning: keep `metadata.hash` of source; if unchanged, skip.
3784
- - Retention: archive old chunks on major edits; GC orphaned knowledge items.
3785
- - Quality: track `metadata.qualityScore` and `feedback` for active learning.
3786
-
3787
- Example (Convex pseudo‑API)
3788
-
3789
- ```typescript
3790
- // internal action: embed text
3791
- export const embedText = internalAction({
3792
- args: { text: v.string(), model: v.optional(v.string()) },
3793
- handler: async (ctx, { text, model }) => {
3794
- const embedding = await callEmbedProvider(text, model);
3795
- return {
3796
- embedding,
3797
- model: model || "text-embedding-3-large",
3798
- dim: embedding.length,
3799
- };
3800
- },
3801
- });
3802
-
3803
- // mutation: schedule embedding for a thing
3804
- export const scheduleEmbeddingForThing = mutation({
3805
- args: { id: v.id("things"), fields: v.optional(v.array(v.string())) },
3806
- handler: async (ctx, { id, fields }) => {
3807
- await ctx.scheduler.runAfter(0, internal.rag.ingestThing, { id, fields });
3808
- },
3809
- });
3810
-
3811
- // internal action: ingest a thing into knowledge
3812
- export const ingestThing = internalAction({
3813
- args: { id: v.id("things"), fields: v.optional(v.array(v.string())) },
3814
- handler: async (ctx, { id, fields }) => {
3815
- const thing = await ctx.runQuery(internal.entities.get, { id });
3816
- const texts = extractTexts(thing, fields);
3817
- let index = 0;
3818
- for (const t of chunk(texts, { size: 800, overlap: 200 })) {
3819
- const { embedding, model, dim } = await ctx.runAction(
3820
- internal.rag.embedText,
3821
- { text: t.text },
3822
- );
3823
- const knowledgeId = await ctx.runMutation(internal.rag.upsertKnowledge, {
3824
- item: {
3825
- knowledgeType: "chunk",
3826
- text: t.text,
3827
- embedding,
3828
- embeddingModel: model,
3829
- embeddingDim: dim,
3830
- sourceThingId: id,
3831
- sourceField: t.field,
3832
- chunk: { index, tokenCount: t.tokens, overlap: 200 },
3833
- labels: t.labels,
3834
- },
3835
- });
3836
- await ctx.runMutation(internal.rag.linkThingKnowledge, {
3837
- thingId: id,
3838
- knowledgeId,
3839
- role: "chunk_of",
3840
- });
3841
- index++;
3842
- }
3843
- },
3844
- });
3845
- ```
3846
-
3847
- This strategy keeps vectors first‑class without expanding primitives: knowledge absorbs both legacy tags (as labels) and semantic chunks (as embeddings).