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,2840 +0,0 @@
1
- ---
2
- title: Ontology.Old
3
- dimension: knowledge
4
- category: archived
5
- tags: 6-dimensions, ai, architecture, connections, events, cycle, knowledge, ontology, people, protocol
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 archived category.
13
- Location: one/knowledge/archived/ontology.old.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.old.
17
- ---
18
-
19
- # ONE Platform - Ontology Specification
20
-
21
- **Version:** 2.0.0 (6-Dimension Architecture)
22
- **Status:** Complete - Reality-Aware Architecture
23
- **Design Principle:** This ontology models reality in six dimensions. All protocols map TO this ontology via metadata.
24
- ## Structure
25
-
26
- This ontology is organized into 6 dimension files:
27
-
28
- 1. **[organisation.md](./organisation.md)** - Multi-tenant isolation & ownership
29
- 2. **[people.md](./people.md)** - Authorization, governance, & user customization
30
- 3. **[things.md](./things.md)** - 66 entity types (what exists)
31
- 4. **[connections.md](./connections.md)** - 25 relationship types (how they relate)
32
- 5. **[events.md](./events.md)** - 67 event types (what happened)
33
- 6. **[knowledge.md](./knowledge.md)** - Vectors, embeddings, RAG (what it means)
34
-
35
- **Execution Guide:**
36
-
37
- 7. **[todo.md](./todo.md)** - 100-cycle execution sequence (plan in cycles, not days)
38
-
39
- **This document (Ontology.md)** contains the complete technical specification. The consolidated files above provide focused summaries and patterns.
40
-
41
- **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.
42
-
43
- ## The 6-Dimension Reality Model
44
-
45
- Every single thing in ONE platform exists within one of these 6 dimensions:
46
-
47
- ```
48
- ┌──────────────────────────────────────────────────────────────┐
49
- │ 1. GROUPS │
50
- │ Multi-tenant isolation with hierarchical nesting - who owns │
51
- │ what at group level (friend circles → DAOs → governments) │
52
- └──────────────────────────────────────────────────────────────┘
53
- ↓
54
- ┌──────────────────────────────────────────────────────────────┐
55
- │ 2. PEOPLE │
56
- │ Authorization & governance - platform owner, group owners │
57
- └──────────────────────────────────────────────────────────────┘
58
- ↓
59
- ┌──────────────────────────────────────────────────────────────┐
60
- │ 3. THINGS │
61
- │ Every "thing" - users, agents, content, tokens, courses │
62
- └──────────────────────────────────────────────────────────────┘
63
- ↓
64
- ┌──────────────────────────────────────────────────────────────┐
65
- │ 4. CONNECTIONS │
66
- │ Every relationship - owns, follows, taught_by, powers │
67
- └──────────────────────────────────────────────────────────────┘
68
- ↓
69
- ┌──────────────────────────────────────────────────────────────┐
70
- │ 5. EVENTS │
71
- │ Every action - purchased, created, viewed, completed │
72
- └──────────────────────────────────────────────────────────────┘
73
- ↓
74
- ┌──────────────────────────────────────────────────────────────┐
75
- │ 6. KNOWLEDGE │
76
- │ Labels + chunks + vectors powering RAG & search │
77
- └──────────────────────────────────────────────────────────────┘
78
- ```
79
-
80
- **Golden Rule:** If you can't map your feature to these 6 dimensions, you're thinking about it wrong.
81
-
82
- **Simplicity:** ONE is six dimensions — groups partition, people authorize, things exist, connections relate, events record, and knowledge understands. Everything composes from these building blocks.
83
-
84
- ---
85
-
86
- ## GROUPS: The Isolation Boundary with Hierarchical Nesting
87
-
88
- 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.
89
-
90
- ### Group Structure
91
-
92
- ```typescript
93
- {
94
- _id: Id<'groups'>,
95
- slug: string, // REQUIRED: URL identifier (/group/slug)
96
- name: string, // REQUIRED: Display name
97
- type: 'friend_circle' | 'business' | 'community' | 'dao' | 'government' | 'organization',
98
- parentGroupId?: Id<'groups'>, // OPTIONAL: Parent group for hierarchical nesting
99
- description?: string, // OPTIONAL: About text
100
-
101
- metadata: Record<string, any>,
102
-
103
- settings: {
104
- visibility: 'public' | 'private',
105
- joinPolicy: 'open' | 'invite_only' | 'approval_required',
106
- plan: 'starter' | 'pro' | 'enterprise',
107
- limits: {
108
- users: number,
109
- storage: number, // GB
110
- apiCalls: number,
111
- }
112
- },
113
-
114
- status: 'active' | 'archived',
115
- createdAt: number,
116
- updatedAt: number,
117
- }
118
- ```
119
-
120
- ### Common Fields by Use Case
121
-
122
- **Identity:** `[slug, name]` - Who they are + URL
123
- **Web:** `[slug, name, description]` - Website generation
124
- **Operations:** `[status, type, settings, parentGroupId]` - System management
125
-
126
- ### Why Groups Matter
127
-
128
- 1. **Multi-Tenant Isolation:** Each group's data is completely separate
129
- 2. **Hierarchical Nesting:** Groups can contain sub-groups for complex organizations (parent → child → grandchild...)
130
- 3. **Flexible Types:** From friend circles (2 people) to businesses to DAOs to governments (billions)
131
- 4. **Resource Quotas:** Control costs and usage per group
132
- 5. **Privacy Control:** Groups can be public or private with controlled access
133
- 6. **Flexible Scale:** Scales from friend circles to global governments without schema changes
134
-
135
- ---
136
-
137
- ## PEOPLE: Authorization & Governance
138
-
139
- Purpose: Define who can do what. People direct organizations, customize AI agents, and govern access.
140
-
141
- ### Person Structure
142
-
143
- ```typescript
144
- {
145
- _id: Id<'people'>,
146
- email: string,
147
- username: string,
148
- displayName: string,
149
-
150
- // CRITICAL: Role determines access level
151
- role: 'platform_owner' | 'org_owner' | 'org_user' | 'customer',
152
-
153
- // Organization context
154
- organizationId?: Id<'organizations'>, // Current/default org
155
- permissions?: string[],
156
-
157
- // Profile
158
- bio?: string,
159
- avatar?: string,
160
-
161
- // Multi-tenant tracking
162
- organizations: Id<'organizations'>[], // All orgs this person belongs to
163
-
164
- createdAt: number,
165
- updatedAt: number,
166
- }
167
- ```
168
-
169
- ### Four Roles
170
-
171
- 1. **Platform Owner** (Anthony)
172
- - Owns the ONE Platform
173
- - 100% revenue from platform-level services
174
- - Can access all organizations (support/debugging)
175
- - Creates new organizations
176
-
177
- 2. **Org Owner**
178
- - Owns/manages one or more organizations
179
- - Controls users, permissions, billing within org
180
- - Customizes AI agents and frontend
181
- - Revenue sharing with platform
182
-
183
- 3. **Org User**
184
- - Works within an organization
185
- - Limited permissions (defined by org owner)
186
- - Can create content, run agents (within quotas)
187
-
188
- 4. **Customer**
189
- - External user consuming content
190
- - Purchases tokens, enrolls in courses
191
- - No admin access
192
-
193
- ### Why People Matter
194
-
195
- 1. **Authorization:** Every action must have an actor (person)
196
- 2. **Governance:** Org owners control who can do what
197
- 3. **Audit Trail:** Events log who did what when
198
- 4. **Customization:** People teach AI agents their preferences
199
-
200
- ---
201
-
202
- ## KNOWLEDGE: Labels, Chunks, and Vectors (RAG)
203
-
204
- 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.
205
-
206
- Design principles:
207
- - Protocol‑agnostic: store protocol details in `metadata`.
208
- - Many‑to‑many: link knowledge ⇄ things via `thingKnowledge` with optional context metadata.
209
- - Scalable: consolidated types minimize index fan‑out; embeddings enable semantic search.
210
-
211
- ### Knowledge Types
212
-
213
- ```typescript
214
- type KnowledgeType =
215
- | 'label' // replaces legacy "tag"; lightweight categorical marker
216
- | 'document' // wrapper for a source text/blob (pre-chunking)
217
- | 'chunk' // atomic chunk of text with embedding
218
- | 'vector_only'; // embedding without stored text (e.g., privacy)
219
- ```
220
-
221
- ### Knowledge Structure
222
-
223
- ```typescript
224
- {
225
- _id: Id<'knowledge'>,
226
- knowledgeType: KnowledgeType,
227
- // Textual content (optional for label/vector_only)
228
- text?: string,
229
- // Embedding for semantic search (optional for label/document)
230
- embedding?: number[], // Float32 vector; model-dependent dimension
231
- embeddingModel?: string, // e.g., "text-embedding-3-large"
232
- embeddingDim?: number,
233
- // Source linkage
234
- sourceThingId?: Id<'things'>, // Primary source entity
235
- sourceField?: string, // e.g., 'content', 'transcript', 'title'
236
- chunk?: { index: number; start?: number; end?: number; tokenCount?: number; overlap?: number },
237
- // Lightweight categorization (free-form)
238
- labels?: string[], // Replaces per-thing tags; applied to knowledge
239
- // Additional metadata (protocol, language, mime, hash, version)
240
- metadata?: Record<string, any>,
241
- createdAt: number,
242
- updatedAt: number,
243
- deletedAt?: number,
244
- }
245
- ```
246
-
247
- ### Junction: thingKnowledge
248
-
249
- ```typescript
250
- {
251
- _id: Id<'thingKnowledge'>,
252
- thingId: Id<'things'>,
253
- knowledgeId: Id<'knowledge'>,
254
- role?: 'label' | 'summary' | 'chunk_of' | 'caption' | 'keyword',
255
- // Context for the link (e.g., confidence, section name)
256
- metadata?: Record<string, any>,
257
- createdAt: number,
258
- }
259
- ```
260
-
261
- ### Indexes (recommended)
262
-
263
- - `knowledge.by_type` (knowledgeType)
264
- - `knowledge.by_source` (sourceThingId)
265
- - `knowledge.by_created` (createdAt)
266
- - `thingKnowledge.by_thing` (thingId)
267
- - `thingKnowledge.by_knowledge` (knowledgeId)
268
- - Vector index (provider-dependent): `knowledge.by_embedding` for ANN search
269
-
270
- Notes:
271
- - The legacy ThingType `embedding` is deprecated for operational vectors; use the `knowledge` table with `knowledgeType: 'chunk' | 'vector_only'`.
272
- - Labels (formerly tags) now live in `knowledge.labels` and via `thingKnowledge` relations. Use labels to curate taxonomy without enum churn.
273
-
274
- ---
275
-
276
- ## THINGS: All The "Things"
277
-
278
- ### What Goes in Things?
279
-
280
- **Simple test:** If you can point at it and say "this is a \_\_\_", it's a thing.
281
-
282
- Examples:
283
-
284
- - "This is a **creator**" ✅ Thing
285
- - "This is a **blog post**" ✅ Thing
286
- - "This is a **token**" ✅ Thing
287
- - "This is a **relationship**" ❌ Connection, not thing
288
- - "This is a **purchase**" ❌ Event, not thing
289
-
290
- ### Thing Types
291
-
292
- ```typescript
293
- type ThingType =
294
- // CORE
295
- | 'creator' // Human creator (role: platform_owner, org_owner, org_user, customer)
296
- | 'ai_clone' // Digital twin of creator
297
- | 'audience_member' // Fan/user (role: customer)
298
- | 'organization' // Multi-tenant organization
299
-
300
- // BUSINESS AGENTS (10 types)
301
- | 'strategy_agent' // Vision, planning, OKRs
302
- | 'research_agent' // Market, trends, competitors
303
- | 'marketing_agent' // Content strategy, SEO, distribution
304
- | 'sales_agent' // Funnels, conversion, follow-up
305
- | 'service_agent' // Support, onboarding, success
306
- | 'design_agent' // Brand, UI/UX, assets
307
- | 'engineering_agent' // Tech, integration, automation
308
- | 'finance_agent' // Revenue, costs, forecasting
309
- | 'legal_agent' // Compliance, contracts, IP
310
- | 'intelligence_agent' // Analytics, insights, predictions
311
-
312
- // CONTENT
313
- | 'blog_post' // Written content
314
- | 'video' // Video content
315
- | 'podcast' // Audio content
316
- | 'social_post' // Social media post
317
- | 'email' // Email content
318
- | 'course' // Educational course
319
- | 'lesson' // Individual lesson
320
-
321
- // PRODUCTS
322
- | 'digital_product' // Templates, tools, assets
323
- | 'membership' // Tiered membership
324
- | 'consultation' // 1-on-1 session
325
- | 'nft' // NFT collectible
326
-
327
- // COMMUNITY
328
- | 'community' // Community space
329
- | 'conversation' // Thread/discussion
330
- | 'message' // Individual message
331
-
332
- // TOKEN
333
- | 'token' // Actual token instance
334
- | 'token_contract' // Smart contract
335
-
336
- // KNOWLEDGE
337
- | 'knowledge_item' // Piece of creator knowledge
338
- | 'embedding' // Vector embedding
339
-
340
- // PLATFORM
341
- | 'website' // Auto-generated creator site
342
- | 'landing_page' // Custom landing pages
343
- | 'template' // Design templates
344
- | 'livestream' // Live broadcast
345
- | 'recording' // Saved livestream content
346
- | 'media_asset' // Images, videos, files
347
-
348
- // BUSINESS
349
- | 'payment' // Payment transaction
350
- | 'subscription' // Recurring subscription
351
- | 'invoice' // Invoice record
352
- | 'metric' // Tracked metric
353
- | 'insight' // AI-generated insight
354
- | 'prediction' // AI prediction
355
- | 'report' // Analytics report
356
-
357
- // AUTHENTICATION & SESSION
358
- | 'session' // User session (Better Auth)
359
- | 'oauth_account' // OAuth connection (GitHub, Google)
360
- | 'verification_token' // Email/2FA verification token
361
- | 'password_reset_token' // Password reset token
362
-
363
- // UI & PREFERENCES
364
- | 'ui_preferences' // User UI settings (theme, layout, etc.)
365
-
366
- // MARKETING
367
- | 'notification' // System notification
368
- | 'email_campaign' // Email marketing campaign
369
- | 'announcement' // Platform announcement
370
- | 'referral' // Referral record
371
- | 'campaign' // Marketing campaign
372
- | 'lead' // Potential customer/lead
373
-
374
- // EXTERNAL INTEGRATIONS
375
- | 'external_agent' // External AI agent (ElizaOS, etc.)
376
- | 'external_workflow' // External workflow (n8n, Zapier, Make)
377
- | 'external_connection' // Connection config to external service
378
-
379
- // PROTOCOL ENTITIES (protocol-agnostic via properties.protocol)
380
- | 'mandate' // Intent or cart mandate (AP2)
381
- | 'product'; // Sellable product (ACP/marketplace)
382
- ```
383
-
384
- ### Thing Structure
385
-
386
- ```typescript
387
- {
388
- _id: Id<"things">,
389
- type: ThingType,
390
- name: string, // Display name
391
- properties: { // Type-specific properties (JSON)
392
- // For creator:
393
- email?: string,
394
- username?: string,
395
- niche?: string[],
396
- // For token:
397
- contractAddress?: string,
398
- totalSupply?: number,
399
- // etc...
400
- },
401
- status: "active" | "inactive" | "draft" | "published" | "archived",
402
- createdAt: number,
403
- updatedAt: number,
404
- deletedAt?: number
405
- }
406
- ```
407
-
408
- ### Properties by Thing Type
409
-
410
- **Creator Properties:**
411
-
412
- ```typescript
413
- {
414
- email: string,
415
- username: string,
416
- displayName: string,
417
- bio?: string,
418
- avatar?: string,
419
- niche: string[],
420
- expertise: string[],
421
- targetAudience: string,
422
- brandColors?: {
423
- primary: string,
424
- secondary: string,
425
- accent: string
426
- },
427
- totalFollowers: number,
428
- totalContent: number,
429
- totalRevenue: number,
430
- // MULTI-TENANT ROLES
431
- role: "platform_owner" | "group_owner" | "group_user" | "customer",
432
- groupId?: Id<"groups">, // Current/default group (if group_owner or group_user)
433
- permissions?: string[], // Additional permissions
434
- }
435
- ```
436
-
437
- **Organization Properties:**
438
-
439
- ```typescript
440
- {
441
- name: string,
442
- slug: string, // URL-friendly identifier
443
- domain?: string, // Custom domain (e.g., acme.one.ie)
444
- logo?: string,
445
- description?: string,
446
- status: "active" | "suspended" | "trial" | "cancelled",
447
- plan: "starter" | "pro" | "enterprise",
448
- limits: {
449
- users: number, // Max users allowed
450
- storage: number, // GB
451
- apiCalls: number, // Per month
452
- },
453
- usage: {
454
- users: number, // Current users
455
- storage: number, // GB used
456
- apiCalls: number, // This month
457
- },
458
- billing: {
459
- customerId?: string, // Stripe customer ID
460
- subscriptionId?: string, // Stripe subscription ID
461
- currentPeriodEnd?: number,
462
- },
463
- settings: {
464
- allowSignups: boolean,
465
- requireEmailVerification: boolean,
466
- enableTwoFactor: boolean,
467
- allowedDomains?: string[], // Email domain whitelist
468
- },
469
- createdAt: number,
470
- trialEndsAt?: number,
471
- }
472
- ```
473
-
474
- **AI Clone Properties:**
475
-
476
- ```typescript
477
- {
478
- voiceId?: string,
479
- voiceProvider?: "elevenlabs" | "azure" | "custom",
480
- appearanceId?: string,
481
- appearanceProvider?: "d-id" | "heygen" | "custom",
482
- systemPrompt: string,
483
- temperature: number,
484
- knowledgeBaseSize: number,
485
- lastTrainingDate: number,
486
- totalInteractions: number,
487
- satisfactionScore: number
488
- }
489
- ```
490
-
491
- **Agent Properties:**
492
-
493
- ```typescript
494
- {
495
- agentType: "strategy" | "marketing" | "sales" | ...,
496
- systemPrompt: string,
497
- model: string,
498
- temperature: number,
499
- capabilities: string[],
500
- tools: string[],
501
- totalExecutions: number,
502
- successRate: number,
503
- averageExecutionTime: number
504
- }
505
- ```
506
-
507
- **Token Properties:**
508
-
509
- ```typescript
510
- {
511
- contractAddress: string,
512
- blockchain: "base" | "ethereum" | "polygon",
513
- standard: "ERC20" | "ERC721" | "ERC1155",
514
- totalSupply: number,
515
- circulatingSupply: number,
516
- price: number,
517
- marketCap: number,
518
- utility: string[],
519
- burnRate: number,
520
- holders: number,
521
- transactions24h: number,
522
- volume24h: number
523
- }
524
- ```
525
-
526
- **Course Properties:**
527
-
528
- ```typescript
529
- {
530
- title: string,
531
- description: string,
532
- thumbnail?: string,
533
- modules: number,
534
- lessons: number,
535
- totalDuration: number,
536
- price: number,
537
- currency: string,
538
- tokenPrice?: number,
539
- enrollments: number,
540
- completions: number,
541
- averageRating: number,
542
- generatedBy: "ai" | "human" | "hybrid",
543
- personalizationLevel: "none" | "basic" | "advanced"
544
- }
545
- ```
546
-
547
- **Website Properties:**
548
-
549
- ```typescript
550
- {
551
- domain: string,
552
- subdomain: string, // creator.one.ie
553
- template: "minimal" | "showcase" | "portfolio",
554
- customCSS?: string,
555
- customDomain?: string,
556
- sslEnabled: boolean,
557
- analytics: {
558
- visitors30d: number,
559
- pageViews: number,
560
- conversionRate: number
561
- }
562
- }
563
- ```
564
-
565
- **Livestream Properties:**
566
-
567
- ```typescript
568
- {
569
- title: string,
570
- scheduledAt: number,
571
- startedAt?: number,
572
- endedAt?: number,
573
- platform: "youtube" | "twitch" | "custom",
574
- streamUrl: string,
575
- recordingUrl?: string,
576
- viewersPeak: number,
577
- viewersAverage: number,
578
- chatEnabled: boolean,
579
- aiCloneMixEnabled: boolean, // For human + AI mixing
580
- status: "scheduled" | "live" | "ended" | "cancelled"
581
- }
582
- ```
583
-
584
- **Payment Properties:**
585
-
586
- ```typescript
587
- {
588
- amount: number,
589
- currency: "usd" | "eur",
590
- paymentMethod: "stripe" | "crypto",
591
- stripePaymentIntentId?: string,
592
- txHash?: string, // Blockchain transaction
593
- status: "pending" | "completed" | "failed" | "refunded",
594
- fees: number,
595
- netAmount: number,
596
- processedAt?: number
597
- }
598
- ```
599
-
600
- **Subscription Properties:**
601
-
602
- ```typescript
603
- {
604
- tier: "starter" | "pro" | "enterprise",
605
- price: number,
606
- currency: string,
607
- interval: "monthly" | "yearly",
608
- status: "active" | "cancelled" | "past_due" | "expired",
609
- currentPeriodStart: number,
610
- currentPeriodEnd: number,
611
- cancelAt?: number,
612
- stripeSubscriptionId?: string
613
- }
614
- ```
615
-
616
- **Metric Properties:**
617
-
618
- ```typescript
619
- {
620
- name: string,
621
- value: number,
622
- unit: string,
623
- timestamp: number,
624
- period: "realtime" | "hourly" | "daily" | "weekly" | "monthly",
625
- change: number, // Percentage change from previous
626
- trend: "up" | "down" | "stable"
627
- }
628
- ```
629
-
630
- **Insight Properties:**
631
-
632
- ```typescript
633
- {
634
- title: string,
635
- description: string,
636
- category: "performance" | "audience" | "revenue" | "content",
637
- confidence: number, // 0.0 to 1.0
638
- actionable: boolean,
639
- recommendations: string[],
640
- generatedAt: number,
641
- generatedBy: Id<"things"> // intelligence_agent
642
- }
643
- ```
644
-
645
- **Referral Properties:**
646
-
647
- ```typescript
648
- {
649
- referrerCode: string,
650
- referredEmail: string,
651
- referredUserId?: Id<"things">,
652
- status: "pending" | "converted" | "expired",
653
- tokensEarned: number,
654
- bonusEarned?: number,
655
- conversionDate?: number,
656
- expiresAt: number
657
- }
658
- ```
659
-
660
- **Notification Properties:**
661
-
662
- ```typescript
663
- {
664
- title: string,
665
- message: string,
666
- type: "info" | "success" | "warning" | "error",
667
- channel: "email" | "sms" | "push" | "in_app",
668
- read: boolean,
669
- readAt?: number,
670
- actionUrl?: string,
671
- actionLabel?: string
672
- }
673
- ```
674
-
675
- **External Agent Properties:**
676
-
677
- ```typescript
678
- {
679
- platform: "elizaos" | "autogen" | "crewai" | "langchain" | "custom",
680
- agentId: string, // External platform's agent ID
681
- name: string, // Agent name
682
- description?: string, // What the agent does
683
- capabilities: string[], // Available actions/tools
684
- apiEndpoint?: string, // REST/GraphQL endpoint
685
- websocketUrl?: string, // WebSocket endpoint for real-time
686
- status: "online" | "offline" | "busy" | "unknown",
687
- lastSeen?: number,
688
- metadata: { // Platform-specific data
689
- personality?: any, // For ElizaOS character
690
- tools?: string[], // Available tools
691
- model?: string, // LLM model used
692
- [key: string]: any // Other platform-specific fields
693
- },
694
- conversationCount: number, // Total conversations
695
- messageCount: number, // Total messages exchanged
696
- createdAt: number,
697
- updatedAt: number
698
- }
699
- ```
700
-
701
- **External Workflow Properties:**
702
-
703
- ```typescript
704
- {
705
- platform: "n8n" | "zapier" | "make" | "pipedream" | "custom",
706
- workflowId: string, // External platform's workflow ID
707
- name: string, // Workflow name
708
- description: string, // What the workflow does
709
- webhookUrl?: string, // Trigger URL
710
- active: boolean, // Is workflow active?
711
- tags: string[], // Workflow tags/categories
712
- inputSchema: { // Expected input parameters
713
- [key: string]: {
714
- type: "string" | "number" | "boolean" | "object" | "array",
715
- required: boolean,
716
- description: string,
717
- default?: any
718
- }
719
- },
720
- outputSchema: { // Expected output structure
721
- [key: string]: {
722
- type: "string" | "number" | "boolean" | "object" | "array",
723
- description: string
724
- }
725
- },
726
- executionCount: number, // Total executions
727
- successRate: number, // 0.0 to 1.0
728
- averageExecutionTime: number, // milliseconds
729
- lastExecutedAt?: number,
730
- createdAt: number,
731
- updatedAt: number
732
- }
733
- ```
734
-
735
- **External Connection Properties:**
736
-
737
- ```typescript
738
- {
739
- platform: "elizaos" | "n8n" | "zapier" | "make" | "autogen" | "custom",
740
- name: string, // Connection name
741
- baseUrl?: string, // API base URL
742
- apiKey?: string, // Encrypted API key
743
- websocketUrl?: string, // WebSocket endpoint
744
- webhookSecret?: string, // Webhook signature secret
745
- connectionType: "rest" | "websocket" | "webhook" | "graphql",
746
- authentication: {
747
- type: "apiKey" | "oauth" | "basic" | "bearer" | "custom",
748
- credentials: any // Encrypted credentials
749
- },
750
- status: "active" | "inactive" | "error",
751
- lastConnectedAt?: number,
752
- lastError?: string,
753
- linkedEntityIds: string[], // Connected agents/workflows
754
- rateLimits?: {
755
- requestsPerMinute: number,
756
- requestsPerDay: number
757
- },
758
- createdAt: number,
759
- updatedAt: number
760
- }
761
- ```
762
-
763
- **Session Properties:**
764
-
765
- ```typescript
766
- {
767
- userId: Id<"things">, // User this session belongs to
768
- token: string, // Session token (hashed)
769
- expiresAt: number, // Expiration timestamp
770
- ipAddress?: string, // IP address
771
- userAgent?: string, // Browser/device info
772
- lastActivityAt: number, // Last activity timestamp
773
- createdAt: number,
774
- }
775
- ```
776
-
777
- **OAuth Account Properties:**
778
-
779
- ```typescript
780
- {
781
- userId: Id<"things">, // User this account belongs to
782
- provider: "github" | "google" | "discord" | "twitter",
783
- providerAccountId: string, // Provider's user ID
784
- accessToken?: string, // Encrypted access token
785
- refreshToken?: string, // Encrypted refresh token
786
- expiresAt?: number, // Token expiration
787
- tokenType?: string, // Bearer, etc.
788
- scope?: string, // Granted scopes
789
- idToken?: string, // OpenID Connect ID token
790
- createdAt: number,
791
- updatedAt: number,
792
- }
793
- ```
794
-
795
- **Verification Token Properties:**
796
-
797
- ```typescript
798
- {
799
- userId: Id<"things">, // User to verify
800
- token: string, // Verification token (hashed)
801
- type: "email" | "two_factor", // Verification type
802
- expiresAt: number, // Expiration timestamp
803
- attempts: number, // Failed attempts count
804
- maxAttempts: number, // Max allowed attempts
805
- verifiedAt?: number, // When verified (if completed)
806
- createdAt: number,
807
- }
808
- ```
809
-
810
- **Password Reset Token Properties:**
811
-
812
- ```typescript
813
- {
814
- userId: Id<"things">, // User requesting reset
815
- token: string, // Reset token (hashed)
816
- expiresAt: number, // Expiration timestamp (15-30 min)
817
- usedAt?: number, // When token was used
818
- createdAt: number,
819
- }
820
- ```
821
-
822
- **UI Preferences Properties:**
823
-
824
- ```typescript
825
- {
826
- userId: Id<"things">, // User these preferences belong to
827
- theme: "light" | "dark" | "system",
828
- language: string, // ISO language code
829
- timezone: string, // IANA timezone
830
- dashboardLayout: {
831
- sidebarCollapsed: boolean,
832
- defaultView: "grid" | "list" | "kanban",
833
- itemsPerPage: number,
834
- },
835
- notifications: {
836
- email: boolean,
837
- push: boolean,
838
- sms: boolean,
839
- inApp: boolean,
840
- },
841
- accessibility: {
842
- reducedMotion: boolean,
843
- highContrast: boolean,
844
- fontSize: "small" | "medium" | "large",
845
- },
846
- customSettings: any, // App-specific settings
847
- updatedAt: number,
848
- }
849
- ```
850
-
851
- ---
852
-
853
- ## CONNECTIONS: All The Relationships
854
-
855
- ### What Goes in Connections?
856
-
857
- **Simple test:** If you're describing how thing X relates to thing Y, it's a connection.
858
-
859
- Examples:
860
-
861
- - "Creator **owns** token" ✅ Connection
862
- - "User **enrolled_in** course" ✅ Connection
863
- - "Agent **powers** AI clone" ✅ Connection
864
- - "Creator created a post" ❌ Event (action), not connection
865
-
866
- ### Connection Types (25 total)
867
-
868
- **Design Principle:** Consolidated types with metadata for variants. Protocol identity stored in `metadata.protocol`.
869
-
870
- ```typescript
871
- type ConnectionType =
872
- // OWNERSHIP (2)
873
- | 'owns'
874
- | 'created_by'
875
-
876
- // AI RELATIONSHIPS (3)
877
- | 'clone_of'
878
- | 'trained_on'
879
- | 'powers'
880
-
881
- // CONTENT RELATIONSHIPS (5)
882
- | 'authored'
883
- | 'generated_by'
884
- | 'published_to'
885
- | 'part_of'
886
- | 'references'
887
-
888
- // COMMUNITY RELATIONSHIPS (4)
889
- | 'member_of'
890
- | 'following'
891
- | 'moderates'
892
- | 'participated_in'
893
-
894
- // BUSINESS RELATIONSHIPS (3)
895
- | 'manages'
896
- | 'reports_to'
897
- | 'collaborates_with'
898
-
899
- // TOKEN RELATIONSHIPS (3)
900
- | 'holds_tokens'
901
- | 'staked_in'
902
- | 'earned_from'
903
-
904
- // PRODUCT RELATIONSHIPS (4)
905
- | 'purchased'
906
- | 'enrolled_in'
907
- | 'completed'
908
- | 'teaching'
909
-
910
- // CONSOLIDATED TYPES (use metadata for variants + protocol)
911
- | 'transacted' // Payment/subscription/invoice (metadata.transactionType + protocol)
912
- | 'notified' // Notifications (metadata.channel + notificationType)
913
- | 'referred' // Referrals (metadata.referralType)
914
- | 'communicated' // Agent/protocol communication (metadata.protocol + messageType)
915
- | 'delegated' // Task/workflow delegation (metadata.protocol + taskType)
916
- | 'approved' // Approvals (metadata.approvalType + protocol)
917
- | 'fulfilled'; // Fulfillment (metadata.fulfillmentType + protocol)
918
-
919
- // Total: 25 connection types
920
- ```
921
-
922
- ### Connection Structure
923
-
924
- ```typescript
925
- {
926
- _id: Id<"connections">,
927
- fromThingId: Id<"things">,
928
- toThingId: Id<"things">,
929
- relationshipType: ConnectionType,
930
- metadata?: { // Optional relationship data
931
- // For revenue splits:
932
- revenueShare?: number, // 0.0 to 1.0
933
- // For token holdings:
934
- balance?: number,
935
- // For course enrollment:
936
- enrolledAt?: number,
937
- progress?: number,
938
- // etc...
939
- },
940
- strength?: number, // Relationship strength (0-1)
941
- validFrom?: number, // When relationship started
942
- validTo?: number, // When relationship ended
943
- createdAt: number,
944
- updatedAt?: number
945
- }
946
- ```
947
-
948
- ### Common Connection Patterns
949
-
950
- **Pattern: Ownership**
951
-
952
- ```typescript
953
- // Creator owns AI clone (thing-to-thing)
954
- {
955
- fromThingId: creatorId,
956
- toThingId: cloneId,
957
- relationshipType: "owns",
958
- createdAt: Date.now()
959
- }
960
- ```
961
-
962
- **Pattern: Revenue Split**
963
-
964
- ```typescript
965
- // Collaborator owns 30% of course
966
- {
967
- fromThingId: collaboratorId,
968
- toThingId: courseId,
969
- relationshipType: "owns",
970
- metadata: {
971
- revenueShare: 0.3
972
- },
973
- createdAt: Date.now()
974
- }
975
- ```
976
-
977
- **Pattern: Token Holding**
978
-
979
- ```typescript
980
- // User holds 1000 tokens
981
- {
982
- fromThingId: userId,
983
- toThingId: tokenId,
984
- relationshipType: "holds_tokens",
985
- metadata: {
986
- balance: 1000,
987
- acquiredAt: Date.now()
988
- },
989
- createdAt: Date.now()
990
- }
991
- ```
992
-
993
- **Pattern: Course Enrollment**
994
-
995
- ```typescript
996
- // User enrolled in course
997
- {
998
- fromThingId: userId,
999
- toThingId: courseId,
1000
- relationshipType: "enrolled_in",
1001
- metadata: {
1002
- progress: 0.45, // 45% complete
1003
- enrolledAt: Date.now(),
1004
- lastAccessedAt: Date.now()
1005
- },
1006
- createdAt: Date.now()
1007
- }
1008
- ```
1009
-
1010
- **Pattern: Group Membership**
1011
-
1012
- ```typescript
1013
- // User is member of group with role
1014
- {
1015
- fromThingId: userId,
1016
- toThingId: groupId,
1017
- relationshipType: "member_of",
1018
- metadata: {
1019
- role: "group_owner" | "group_user", // Group-specific role
1020
- permissions: ["read", "write", "admin"],
1021
- invitedBy?: Id<"things">, // Who invited this user
1022
- invitedAt?: number,
1023
- joinedAt: Date.now(),
1024
- },
1025
- createdAt: Date.now()
1026
- }
1027
-
1028
- // Group owns content/resources
1029
- {
1030
- fromThingId: groupId,
1031
- toThingId: contentId,
1032
- relationshipType: "owns",
1033
- metadata: {
1034
- createdBy: userId, // User who created it
1035
- },
1036
- createdAt: Date.now()
1037
- }
1038
- ```
1039
-
1040
- **Pattern: Payment Transaction (Consolidated)**
1041
-
1042
- ```typescript
1043
- // User paid for product (use "transacted" with metadata)
1044
- {
1045
- fromThingId: userId,
1046
- toThingId: productId,
1047
- relationshipType: "transacted",
1048
- metadata: {
1049
- transactionType: "payment", // or "subscription" or "invoice"
1050
- amount: 99.00,
1051
- currency: "USD",
1052
- paymentId: "pi_123456",
1053
- status: "completed"
1054
- },
1055
- createdAt: Date.now()
1056
- }
1057
-
1058
- // User subscribed to service
1059
- {
1060
- fromThingId: userId,
1061
- toThingId: subscriptionId,
1062
- relationshipType: "transacted",
1063
- metadata: {
1064
- transactionType: "subscription",
1065
- amount: 29.00,
1066
- currency: "USD",
1067
- interval: "monthly",
1068
- subscriptionId: "sub_123456",
1069
- status: "active"
1070
- },
1071
- createdAt: Date.now()
1072
- }
1073
- ```
1074
-
1075
- **Pattern: Referral (Consolidated)**
1076
-
1077
- ```typescript
1078
- // User referred by another user (use "referred" with metadata)
1079
- {
1080
- fromThingId: newUserId,
1081
- toThingId: referrerId,
1082
- relationshipType: "referred",
1083
- metadata: {
1084
- referralType: "direct", // or "conversion" or "campaign"
1085
- source: "referral_link",
1086
- referralCode: "REF123",
1087
- tokensEarned: 100,
1088
- status: "converted"
1089
- },
1090
- createdAt: Date.now()
1091
- }
1092
- ```
1093
-
1094
- **Pattern: Notification (Consolidated)**
1095
-
1096
- ```typescript
1097
- // User notified about event (use "notified" with metadata)
1098
- {
1099
- fromThingId: userId,
1100
- toThingId: notificationId,
1101
- relationshipType: "notified",
1102
- metadata: {
1103
- channel: "email", // or "sms" or "push" or "in_app"
1104
- campaignId: campaignId, // optional
1105
- deliveredAt: Date.now(),
1106
- readAt: Date.now(),
1107
- clicked: true
1108
- },
1109
- createdAt: Date.now()
1110
- }
1111
- ```
1112
-
1113
- ---
1114
-
1115
- ## EVENTS: All The Actions
1116
-
1117
- ### What Goes in Events?
1118
-
1119
- **Simple test:** If you're describing something that HAPPENED at a specific TIME, it's an event.
1120
-
1121
- Examples:
1122
-
1123
- - "User **purchased** tokens at 3pm" ✅ Event
1124
- - "Content **was published** yesterday" ✅ Event
1125
- - "Clone **interacted** with user" ✅ Event
1126
- - "User owns tokens" ❌ Connection (state), not event
1127
-
1128
- ### Event Types (35 total)
1129
-
1130
- **Design Principle:** Consolidated types with metadata for variants. Protocol identity stored in `metadata.protocol`.
1131
-
1132
- ```typescript
1133
- type EventType =
1134
- // ENTITY LIFECYCLE (4)
1135
- | 'entity_created'
1136
- | 'entity_updated'
1137
- | 'entity_deleted'
1138
- | 'entity_archived'
1139
-
1140
- // USER EVENTS (5)
1141
- | 'user_registered'
1142
- | 'user_verified'
1143
- | 'user_login'
1144
- | 'user_logout'
1145
- | 'profile_updated'
1146
-
1147
- // AUTHENTICATION EVENTS (6)
1148
- | 'password_reset_requested'
1149
- | 'password_reset_completed'
1150
- | 'email_verification_sent'
1151
- | 'email_verified'
1152
- | 'two_factor_enabled'
1153
- | 'two_factor_disabled'
1154
-
1155
- // GROUP EVENTS (5)
1156
- | 'group_created'
1157
- | 'group_updated'
1158
- | 'user_invited_to_group'
1159
- | 'user_joined_group'
1160
- | 'user_removed_from_group'
1161
-
1162
- // DASHBOARD & UI EVENTS (4)
1163
- | 'dashboard_viewed'
1164
- | 'settings_updated'
1165
- | 'theme_changed'
1166
- | 'preferences_updated'
1167
-
1168
- // AI/CLONE EVENTS (4)
1169
- | 'clone_created'
1170
- | 'clone_updated'
1171
- | 'voice_cloned'
1172
- | 'appearance_cloned'
1173
-
1174
- // AGENT EVENTS (4)
1175
- | 'agent_created'
1176
- | 'agent_executed'
1177
- | 'agent_completed'
1178
- | 'agent_failed'
1179
-
1180
- // TOKEN EVENTS (7)
1181
- | 'token_created'
1182
- | 'token_minted'
1183
- | 'token_burned'
1184
- | 'tokens_purchased'
1185
- | 'tokens_staked'
1186
- | 'tokens_unstaked'
1187
- | 'tokens_transferred'
1188
-
1189
- // COURSE EVENTS (5)
1190
- | 'course_created'
1191
- | 'course_enrolled'
1192
- | 'lesson_completed'
1193
- | 'course_completed'
1194
- | 'certificate_earned'
1195
-
1196
- // ANALYTICS EVENTS (5)
1197
- | 'metric_calculated'
1198
- | 'insight_generated'
1199
- | 'prediction_made'
1200
- | 'optimization_applied'
1201
- | 'report_generated'
1202
-
1203
- // CYCLEENCE EVENTS (7) - NEW
1204
- | 'cycle_request' // User requests AI cycle
1205
- | 'cycle_completed' // Cycle result delivered
1206
- | 'cycle_failed' // Cycle failed
1207
- | 'cycle_quota_exceeded' // Monthly limit hit
1208
- | 'cycle_revenue_collected' // Daily revenue sweep
1209
- | 'org_revenue_generated' // Org generates platform revenue
1210
- | 'revenue_share_distributed' // Revenue share paid out
1211
-
1212
- // BLOCKCHAIN EVENTS (5) - NEW
1213
- | 'nft_minted' // NFT created on-chain
1214
- | 'nft_transferred' // NFT ownership changed
1215
- | 'tokens_bridged' // Cross-chain bridge
1216
- | 'contract_deployed' // Smart contract deployed
1217
- | 'treasury_withdrawal' // Platform owner withdraws revenue
1218
-
1219
- // CONSOLIDATED EVENTS (use metadata for variants + protocol)
1220
- | 'content_event' // metadata.action: created|updated|deleted|viewed|shared|liked
1221
- | 'payment_event' // metadata.status: requested|verified|processed + protocol
1222
- | 'subscription_event' // metadata.action: started|renewed|cancelled
1223
- | 'commerce_event' // metadata.eventType + protocol (ACP, AP2)
1224
- | 'livestream_event' // metadata.status: started|ended + metadata.action: joined|left|chat|donation
1225
- | 'notification_event' // metadata.channel: email|sms|push|in_app + deliveryStatus
1226
- | 'referral_event' // metadata.action: created|completed|rewarded
1227
- | 'communication_event' // metadata.protocol (A2A, ACP, AG-UI) + messageType
1228
- | 'task_event' // metadata.action: delegated|completed|failed + protocol
1229
- | 'mandate_event' // metadata.mandateType: intent|cart + protocol (AP2)
1230
- | 'price_event'; // metadata.action: checked|changed
1231
-
1232
- // Total: 52 event types (35 original + 7 cycle + 5 blockchain + 5 NFT overlap)
1233
- ```
1234
-
1235
- ### Event Structure
1236
-
1237
- ```typescript
1238
- {
1239
- _id: Id<"events">,
1240
- type: EventType, // What happened
1241
- actorId: Id<"things">, // Who/what caused this
1242
- targetId?: Id<"things">, // Optional target thing
1243
- timestamp: number, // When it happened
1244
- metadata: any // Event-specific data
1245
- }
1246
- ```
1247
-
1248
- **Metadata Structure:**
1249
-
1250
- The `metadata` field is flexible JSON that ALWAYS includes `protocol` for protocol-specific events:
1251
-
1252
- ```typescript
1253
- // Protocol-agnostic events (no protocol field needed)
1254
- { action: "created", contentType: "blog_post" }
1255
-
1256
- // Protocol-specific events (includes protocol identifier)
1257
- {
1258
- protocol: "a2a" | "acp" | "ap2" | "x402" | "ag-ui",
1259
- // ... protocol-specific fields
1260
- }
1261
-
1262
- // Examples:
1263
- // A2A message
1264
- { protocol: "a2a", messageType: "task_delegation", task: "research" }
1265
-
1266
- // ACP commerce
1267
- { protocol: "acp", eventType: "purchase_initiated", agentPlatform: "chatgpt" }
1268
-
1269
- // AP2 mandate
1270
- { protocol: "ap2", mandateType: "intent", autoExecute: true }
1271
-
1272
- // X402 payment
1273
- { protocol: "x402", network: "base", txHash: "0x..." }
1274
- ```
1275
-
1276
- ### Event Patterns
1277
-
1278
- **Pattern: User Action**
1279
-
1280
- ```typescript
1281
- // User purchased tokens
1282
- {
1283
- type: "tokens_purchased",
1284
- actorId: userId,
1285
- targetId: tokenId,
1286
- timestamp: Date.now(),
1287
- metadata: {
1288
- amount: 100,
1289
- usdAmount: 10,
1290
- paymentId: "pi_123",
1291
- txHash: "0x456"
1292
- }
1293
- }
1294
- ```
1295
-
1296
- **Pattern: Payment Event (Consolidated)**
1297
-
1298
- ```typescript
1299
- // Payment completed (use "payment_processed" with metadata.status)
1300
- {
1301
- type: "payment_processed",
1302
- actorId: userId,
1303
- targetId: paymentId,
1304
- timestamp: Date.now(),
1305
- metadata: {
1306
- status: "completed", // or "initiated" | "failed" | "refunded"
1307
- amount: 99.00,
1308
- currency: "USD",
1309
- paymentId: "pi_123456",
1310
- method: "stripe"
1311
- }
1312
- }
1313
-
1314
- // Subscription renewed (use "subscription_updated" with metadata.action)
1315
- {
1316
- type: "subscription_updated",
1317
- actorId: userId,
1318
- targetId: subscriptionId,
1319
- timestamp: Date.now(),
1320
- metadata: {
1321
- action: "renewed", // or "started" | "cancelled"
1322
- tier: "pro",
1323
- amount: 29.00,
1324
- nextBillingDate: Date.now() + 30 * 24 * 60 * 60 * 1000
1325
- }
1326
- }
1327
- ```
1328
-
1329
- **Pattern: Content Event (Consolidated)**
1330
-
1331
- ```typescript
1332
- // Content created (use "content_changed" with metadata.action)
1333
- {
1334
- type: "content_changed",
1335
- actorId: creatorId,
1336
- targetId: contentId,
1337
- timestamp: Date.now(),
1338
- metadata: {
1339
- action: "created", // or "updated" | "deleted"
1340
- contentType: "blog_post",
1341
- generatedBy: "marketing_agent",
1342
- platform: "instagram"
1343
- }
1344
- }
1345
-
1346
- // Content viewed (use "content_interacted" with metadata.interactionType)
1347
- {
1348
- type: "content_interacted",
1349
- actorId: userId,
1350
- targetId: contentId,
1351
- timestamp: Date.now(),
1352
- metadata: {
1353
- interactionType: "viewed", // or "shared" | "liked"
1354
- duration: 120, // seconds
1355
- source: "feed"
1356
- }
1357
- }
1358
- ```
1359
-
1360
- **Pattern: Livestream Event (Consolidated)**
1361
-
1362
- ```typescript
1363
- // Livestream started (use "livestream_status_changed" with metadata.status)
1364
- {
1365
- type: "livestream_status_changed",
1366
- actorId: creatorId,
1367
- targetId: livestreamId,
1368
- timestamp: Date.now(),
1369
- metadata: {
1370
- status: "started", // or "scheduled" | "ended"
1371
- streamId: "stream_123",
1372
- platform: "cloudflare",
1373
- rtmpUrl: "rtmp://..."
1374
- }
1375
- }
1376
-
1377
- // Viewer joined (use "livestream_interaction" with metadata.type)
1378
- {
1379
- type: "livestream_interaction",
1380
- actorId: viewerId,
1381
- targetId: livestreamId,
1382
- timestamp: Date.now(),
1383
- metadata: {
1384
- type: "joined", // or "left" | "message"
1385
- viewerCount: 42,
1386
- message: "Hello!" // if type === "message"
1387
- }
1388
- }
1389
- ```
1390
-
1391
- **Pattern: Notification Event (Consolidated)**
1392
-
1393
- ```typescript
1394
- // Email notification sent (use "notification_delivered" with metadata.channel)
1395
- {
1396
- type: "notification_delivered",
1397
- actorId: systemId,
1398
- targetId: userId,
1399
- timestamp: Date.now(),
1400
- metadata: {
1401
- channel: "email", // or "sms" | "push" | "in_app"
1402
- messageId: "msg_123",
1403
- subject: "New content available",
1404
- deliveredAt: Date.now(),
1405
- readAt: Date.now() + 1000 // optional
1406
- }
1407
- }
1408
- ```
1409
-
1410
- **Pattern: AI Interaction**
1411
-
1412
- ```typescript
1413
- // Clone chatted with user
1414
- {
1415
- type: "clone_interaction",
1416
- actorId: userId,
1417
- targetId: cloneId,
1418
- timestamp: Date.now(),
1419
- metadata: {
1420
- message: "How do I start?",
1421
- response: "Let me help you...",
1422
- tokensUsed: 150,
1423
- sentiment: "positive"
1424
- }
1425
- }
1426
- ```
1427
-
1428
- **Pattern: Metric Tracking**
1429
-
1430
- ```typescript
1431
- // Token price calculated
1432
- {
1433
- type: "metric_calculated",
1434
- actorId: systemId,
1435
- targetId: tokenId,
1436
- timestamp: Date.now(),
1437
- metadata: {
1438
- metric: "token_price",
1439
- value: 0.12,
1440
- change: +0.05,
1441
- changePercent: 4.2
1442
- }
1443
- }
1444
- ```
1445
-
1446
- **Pattern: Authentication Events**
1447
-
1448
- ```typescript
1449
- // Password reset requested
1450
- {
1451
- type: "password_reset_requested",
1452
- actorId: userId,
1453
- targetId: passwordResetTokenId,
1454
- timestamp: Date.now(),
1455
- metadata: {
1456
- email: "user@example.com",
1457
- ipAddress: "192.168.1.1",
1458
- expiresAt: Date.now() + 30 * 60 * 1000 // 30 minutes
1459
- }
1460
- }
1461
-
1462
- // Email verified
1463
- {
1464
- type: "email_verified",
1465
- actorId: userId,
1466
- targetId: verificationTokenId,
1467
- timestamp: Date.now(),
1468
- metadata: {
1469
- email: "user@example.com",
1470
- verificationMethod: "link" | "code"
1471
- }
1472
- }
1473
-
1474
- // Two-factor enabled
1475
- {
1476
- type: "two_factor_enabled",
1477
- actorId: userId,
1478
- timestamp: Date.now(),
1479
- metadata: {
1480
- method: "totp" | "sms" | "email",
1481
- backupCodesGenerated: 10
1482
- }
1483
- }
1484
- ```
1485
-
1486
- **Pattern: Group Events**
1487
-
1488
- ```typescript
1489
- // Group created
1490
- {
1491
- type: "group_created",
1492
- actorId: creatorId,
1493
- targetId: groupId,
1494
- timestamp: Date.now(),
1495
- metadata: {
1496
- name: "Acme Corp",
1497
- slug: "acme",
1498
- plan: "pro",
1499
- trialEndsAt: Date.now() + 14 * 24 * 60 * 60 * 1000 // 14 days
1500
- }
1501
- }
1502
-
1503
- // User invited to group
1504
- {
1505
- type: "user_invited_to_group",
1506
- actorId: inviterId,
1507
- targetId: groupId,
1508
- timestamp: Date.now(),
1509
- metadata: {
1510
- invitedEmail: "newuser@example.com",
1511
- role: "group_user",
1512
- inviteToken: "inv_123456",
1513
- expiresAt: Date.now() + 7 * 24 * 60 * 60 * 1000 // 7 days
1514
- }
1515
- }
1516
-
1517
- // User joined group
1518
- {
1519
- type: "user_joined_group",
1520
- actorId: userId,
1521
- targetId: groupId,
1522
- timestamp: Date.now(),
1523
- metadata: {
1524
- role: "group_user",
1525
- invitedBy: inviterId
1526
- }
1527
- }
1528
- ```
1529
-
1530
- **Pattern: Dashboard & UI Events**
1531
-
1532
- ```typescript
1533
- // Dashboard viewed
1534
- {
1535
- type: "dashboard_viewed",
1536
- actorId: userId,
1537
- timestamp: Date.now(),
1538
- metadata: {
1539
- dashboardType: "platform_owner" | "group_owner" | "group_user" | "customer",
1540
- groupId?: groupId,
1541
- route: "/admin/dashboard",
1542
- sessionDuration: 0 // Updated on session end
1543
- }
1544
- }
1545
-
1546
- // Theme changed
1547
- {
1548
- type: "theme_changed",
1549
- actorId: userId,
1550
- targetId: uiPreferencesId,
1551
- timestamp: Date.now(),
1552
- metadata: {
1553
- previousTheme: "light",
1554
- newTheme: "dark"
1555
- }
1556
- }
1557
-
1558
- // Settings updated
1559
- {
1560
- type: "settings_updated",
1561
- actorId: userId,
1562
- targetId: uiPreferencesId,
1563
- timestamp: Date.now(),
1564
- metadata: {
1565
- updatedFields: ["dashboardLayout", "notifications"],
1566
- changes: {
1567
- "dashboardLayout.sidebarCollapsed": { from: false, to: true },
1568
- "notifications.email": { from: true, to: false }
1569
- }
1570
- }
1571
- }
1572
- ```
1573
-
1574
- ---
1575
-
1576
- ## KNOWLEDGE Labels & Semantic Chunks
1577
-
1578
- Use knowledge items of `knowledgeType: 'label'` for taxonomy and `knowledgeType: 'chunk'` for RAG. Associate via `thingKnowledge`.
1579
-
1580
- Examples:
1581
-
1582
- - "This creator is in the fitness industry" ✅ label knowledge with `labels: ['industry:fitness']`
1583
- - "This content is video format" ✅ label knowledge with `labels: ['format:video']`
1584
- - "This page content paragraph 3" ✅ chunk knowledge with `text` + `embedding`
1585
-
1586
- Pattern: multi‑label entity
1587
-
1588
- ```typescript
1589
- const labels = [ 'industry:fitness', 'skill:video-editing', 'technology:youtube', 'audience:beginners' ];
1590
- for (const label of labels) {
1591
- const kid = await getOrCreateKnowledgeLabel(label);
1592
- await db.insert('thingKnowledge', { thingId: creatorId, knowledgeId: kid, role: 'label', createdAt: Date.now() });
1593
- }
1594
- ```
1595
-
1596
- Pattern: semantic search across chunks
1597
-
1598
- ```typescript
1599
- // Given a query embedding, find top-k similar chunks for an org
1600
- const topK = await vectorSearch('knowledge', {
1601
- vectorField: 'embedding',
1602
- query: queryEmbedding,
1603
- filter: { 'sourceThingId.orgId': orgId, knowledgeType: 'chunk' },
1604
- k: 10,
1605
- });
1606
- ```
1607
-
1608
- ---
1609
-
1610
- ## How Features Map to Ontology
1611
-
1612
- ### Feature: AI Clone Creation
1613
-
1614
- **Things Created:**
1615
-
1616
- 1. `ai_clone` thing (the clone)
1617
- 2. `knowledge_item` entities (training data)
1618
-
1619
- **Connections Created:**
1620
-
1621
- 1. creator → ai_clone (relationship: "owns")
1622
- 2. ai_clone → knowledge_items (relationship: "trained_on")
1623
-
1624
- **Events Logged:**
1625
-
1626
- 1. `clone_created` (when clone created)
1627
- 2. `voice_cloned` (when voice ready)
1628
- 3. `appearance_cloned` (when appearance ready)
1629
-
1630
- **Knowledge Labels Added:**
1631
-
1632
- - Clone inherits creator's labels
1633
- - Additional: "ai_clone", "active"
1634
-
1635
- ### Feature: Token Purchase
1636
-
1637
- **Things Involved:**
1638
-
1639
- 1. `token` thing (the token being purchased)
1640
- 2. `audience_member` thing (the buyer)
1641
-
1642
- **Connections Created/Updated:**
1643
-
1644
- 1. buyer → token (relationship: "holds_tokens", metadata: { balance: 100 })
1645
-
1646
- **Events Logged:**
1647
-
1648
- 1. `tokens_purchased` (the purchase)
1649
- 2. `revenue_generated` (for creator)
1650
-
1651
- **Knowledge Labels Added:**
1652
-
1653
- - None (tokens already labeled)
1654
-
1655
- ### Feature: Course Generation
1656
-
1657
- **Things Created:**
1658
-
1659
- 1. `course` entity
1660
- 2. `lesson` entities (multiple)
1661
-
1662
- **Connections Created:**
1663
-
1664
- 1. creator → course (relationship: "owns")
1665
- 2. ai_clone → course (relationship: "teaching")
1666
- 3. course → lessons (relationship: "part_of")
1667
-
1668
- **Events Logged:**
1669
-
1670
- 1. `course_created`
1671
- 2. `content_generated` (for each lesson)
1672
-
1673
- **Knowledge Labels Added:**
1674
-
1675
- - skill labels (what course teaches)
1676
- - industry labels (course category)
1677
- - audience labels (target audience)
1678
-
1679
- ### Feature: ELEVATE Journey
1680
-
1681
- **Things Involved:**
1682
-
1683
- 1. `audience_member` (user going through journey)
1684
- 2. Workflow thing (tracks progress)
1685
-
1686
- **Connections Created:**
1687
-
1688
- - None (journey tracked in workflow state)
1689
-
1690
- **Events Logged:**
1691
-
1692
- 1. `journey_step_completed` (for each step: hook, gift, identify, etc.)
1693
- 2. `achievement_unlocked` (at milestones)
1694
- 3. `tokens_earned` (rewards)
1695
-
1696
- **Knowledge Labels Added:**
1697
-
1698
- - Status labels (current step)
1699
-
1700
- ---
1701
-
1702
- ## Querying the Ontology
1703
-
1704
- ### Get Thing by ID (table: things)
1705
-
1706
- ```typescript
1707
- const thing = await db.get(thingId);
1708
- ```
1709
-
1710
- ### Get All Things of Type (index: by_type)
1711
-
1712
- ```typescript
1713
- const creators = await db
1714
- .query('things')
1715
- .withIndex('by_type', (q) => q.eq('type', 'creator'))
1716
- .collect();
1717
- ```
1718
-
1719
- ### Get Thing's Relationships (table: connections)
1720
-
1721
- ```typescript
1722
- // Get all entities this entity owns
1723
- const owned = await db
1724
- .query('connections')
1725
- .withIndex('from_type', (q) =>
1726
- q.eq('fromThingId', thingId).eq('relationshipType', 'owns')
1727
- )
1728
- .collect();
1729
-
1730
- const ownedThings = await Promise.all(
1731
- owned.map((conn) => db.get(conn.toThingId))
1732
- );
1733
- ```
1734
-
1735
- ### Get Thing's History (table: events)
1736
-
1737
- ```typescript
1738
- // Get all events for this entity
1739
- const history = await db
1740
- .query('events')
1741
- .withIndex('thing_type_time', (q) => q.eq('thingId', thingId))
1742
- .order('desc') // Most recent first
1743
- .collect();
1744
- ```
1745
-
1746
- ### Get Thing's Knowledge (junction: thingKnowledge)
1747
-
1748
- ```typescript
1749
- const knowledgeAssocs = await db
1750
- .query('thingKnowledge')
1751
- .withIndex('by_thing', (q) => q.eq('thingId', thingId))
1752
- .collect();
1753
-
1754
- const knowledgeItems = await Promise.all(
1755
- knowledgeAssocs.map((assoc) => db.get(assoc.knowledgeId))
1756
- );
1757
- ```
1758
-
1759
- ### Search by Multiple Criteria
1760
-
1761
- ```typescript
1762
- // Find fitness creators with >10k followers
1763
- const creators = await db
1764
- .query('things')
1765
- .withIndex('by_type', (q) => q.eq('type', 'creator'))
1766
- .collect();
1767
-
1768
- const fitnessCreators = creators.filter(
1769
- (c) =>
1770
- c.properties.totalFollowers > 10000 &&
1771
- c.properties.niche.includes('fitness')
1772
- );
1773
- ```
1774
-
1775
- ---
1776
-
1777
- ## Migration from Old Systems
1778
-
1779
- When migrating from one.ie or bullfm:
1780
-
1781
- ### Step 1: Identify Thing Types
1782
-
1783
- Map old models to new thing types:
1784
-
1785
- - Old "User" → "creator" or "audience_member"
1786
- - Old "Post" → "blog_post" or "social_post"
1787
- - Old "Follow" → connection with "following" type
1788
- - Old "Like" → event with "content_liked" type
1789
-
1790
- ### Step 2: Transform Properties
1791
-
1792
- Extract structured data into `properties` JSON:
1793
-
1794
- ```typescript
1795
- // Old user model
1796
- {
1797
- id: "123",
1798
- name: "John",
1799
- email: "john@example.com",
1800
- bio: "Fitness coach",
1801
- followers: 5000
1802
- }
1803
-
1804
- // New entity
1805
- {
1806
- type: "creator",
1807
- name: "John",
1808
- properties: {
1809
- email: "john@example.com",
1810
- username: "john",
1811
- displayName: "John",
1812
- bio: "Fitness coach",
1813
- niche: ["fitness"],
1814
- totalFollowers: 5000,
1815
- totalContent: 0,
1816
- totalRevenue: 0
1817
- },
1818
- status: "active",
1819
- createdAt: Date.now(),
1820
- updatedAt: Date.now()
1821
- }
1822
- ```
1823
-
1824
- ### Step 3: Convert Relationships
1825
-
1826
- Transform foreign keys into connections:
1827
-
1828
- ```typescript
1829
- // Old: user_id in posts table
1830
- // New: connection
1831
- {
1832
- fromThingId: userId,
1833
- toThingId: postId,
1834
- relationshipType: "authored",
1835
- createdAt: Date.now()
1836
- }
1837
- ```
1838
-
1839
- ### Step 4: Preserve History
1840
-
1841
- Convert activity logs to events:
1842
-
1843
- ```typescript
1844
- // Old: activity log entry
1845
- { user: "123", action: "viewed", post: "456", timestamp: 1234567890 }
1846
-
1847
- // New: event
1848
- {
1849
- thingId: "post-456",
1850
- eventType: "content_viewed",
1851
- timestamp: 1234567890,
1852
- actorType: "user",
1853
- actorId: "user-123"
1854
- }
1855
- ```
1856
-
1857
- ---
1858
-
1859
- ## Validation Rules
1860
-
1861
- ### Thing Validation
1862
-
1863
- - `type` must be valid ThingType (implementation alias may be `EntityType`)
1864
- - `name` cannot be empty
1865
- - `properties` structure must match type
1866
- - `status` must be valid status
1867
- - `createdAt` required, `updatedAt` required
1868
-
1869
- ### Connection Validation
1870
-
1871
- - `fromThingId` must exist
1872
- - `toThingId` must exist
1873
- - `relationshipType` must be valid
1874
- - Cannot connect a thing to itself (usually)
1875
- - Relationship must make semantic sense
1876
-
1877
- ### Event Validation
1878
-
1879
- - `thingId` must exist
1880
- - `eventType` must be valid
1881
- - `timestamp` required
1882
- - `actorId` must exist if provided
1883
- - `metadata` structure must match event type
1884
-
1885
- ### Tag Validation
1886
-
1887
- - `name` must be unique
1888
- - `category` must be valid TagCategory
1889
- - `usageCount` must be >= 0
1890
-
1891
- ---
1892
-
1893
- ## Performance Optimization
1894
-
1895
- ### Indexes
1896
-
1897
- Every table has optimized indexes:
1898
-
1899
- ```typescript
1900
- things: -by_type(type) -
1901
- by_status(status) -
1902
- by_created(createdAt) -
1903
- search_things(name, type, status);
1904
-
1905
- connections: -from_type(fromThingId, relationshipType) -
1906
- to_type(toThingId, relationshipType) -
1907
- bidirectional(fromThingId, toThingId);
1908
-
1909
- events: -thing_type_time(thingId, eventType, timestamp) -
1910
- type_time(eventType, timestamp) -
1911
- session(sessionId, timestamp);
1912
-
1913
- knowledge: -by_type(knowledgeType) - by_source(sourceThingId) - by_created(createdAt);
1914
- ```
1915
-
1916
- ### Query Optimization
1917
-
1918
- - Always use indexes for filters
1919
- - Limit results with `.take(n)`
1920
- - Paginate large result sets
1921
- - Use `.collect()` sparingly, prefer streaming
1922
-
1923
- ---
1924
-
1925
- ## Event Retention & Archival
1926
-
1927
- - Purpose: keep queries fast and costs predictable at scale.
1928
- - Recommended windows (tune per deployment):
1929
- - Hot (fast queries): last 30–90 days in primary `events` table, fully indexed.
1930
- - Warm (historical analytics): 90–365 days; restrict heavy scans and rely on `type_time`/`actor_time`.
1931
- - Cold archive: >365 days exported to warehouse/storage; query via batch jobs or precomputed aggregates.
1932
- - Patterns:
1933
- - Use `type_time` and `actor_time` for filters; avoid full scans.
1934
- - Precompute aggregates into `metric` entities (daily revenue, views) to avoid wide re-reads.
1935
- - Optional scheduled rollups to move very old events to archive and keep hot sets lean.
1936
-
1937
- ---
1938
-
1939
- ## Protocol Integration Examples
1940
-
1941
- ### How Protocols Map to This Ontology
1942
-
1943
- **Key Principle:** Our ontology is protocol-agnostic. Protocols identify themselves via `metadata.protocol`.
1944
-
1945
- #### A2A Protocol (Agent-to-Agent)
1946
-
1947
- ```typescript
1948
- // Event: Agent delegates task
1949
- {
1950
- type: "task_delegated",
1951
- actorId: oneAgentId,
1952
- targetId: externalAgentId,
1953
- timestamp: Date.now(),
1954
- metadata: {
1955
- protocol: "a2a",
1956
- task: "research_market_trends",
1957
- parameters: { industry: "fitness" }
1958
- }
1959
- }
1960
-
1961
- // Connection: Agents communicate
1962
- {
1963
- fromThingId: oneAgentId,
1964
- toThingId: externalAgentId,
1965
- relationshipType: "communicates_with",
1966
- metadata: {
1967
- protocol: "a2a",
1968
- platform: "elizaos",
1969
- messagesExchanged: 42
1970
- }
1971
- }
1972
- ```
1973
-
1974
- #### ACP Protocol (Agentic Commerce)
1975
-
1976
- ```typescript
1977
- // Event: Purchase initiated
1978
- {
1979
- type: "commerce_event",
1980
- actorId: agentId,
1981
- targetId: transactionId,
1982
- timestamp: Date.now(),
1983
- metadata: {
1984
- protocol: "acp",
1985
- eventType: "purchase_initiated",
1986
- agentPlatform: "chatgpt",
1987
- productId: productId,
1988
- amount: 99.00
1989
- }
1990
- }
1991
-
1992
- // Connection: Merchant approves
1993
- {
1994
- fromThingId: merchantId,
1995
- toThingId: transactionId,
1996
- relationshipType: "approved",
1997
- metadata: {
1998
- protocol: "acp",
1999
- approvalType: "transaction",
2000
- approvedAt: Date.now()
2001
- }
2002
- }
2003
- ```
2004
-
2005
- #### AP2 Protocol (Agent Payments)
2006
-
2007
- ```typescript
2008
- // Event: Intent mandate created
2009
- {
2010
- type: "mandate_created",
2011
- actorId: userId,
2012
- targetId: mandateId,
2013
- timestamp: Date.now(),
2014
- metadata: {
2015
- protocol: "ap2",
2016
- mandateType: "intent",
2017
- autoExecute: true,
2018
- maxBudget: 1500
2019
- }
2020
- }
2021
-
2022
- // Event: Price checked
2023
- {
2024
- type: "price_checked",
2025
- actorId: agentId,
2026
- targetId: intentMandateId,
2027
- timestamp: Date.now(),
2028
- metadata: {
2029
- protocol: "ap2",
2030
- productId: "prod_123",
2031
- currentPrice: 1399,
2032
- targetPrice: 1500,
2033
- withinBudget: true
2034
- }
2035
- }
2036
-
2037
- // Connection: Cart fulfills intent
2038
- {
2039
- fromThingId: intentMandateId,
2040
- toThingId: cartMandateId,
2041
- relationshipType: "fulfills",
2042
- metadata: {
2043
- protocol: "ap2",
2044
- fulfillmentType: "intent_to_cart",
2045
- matchScore: 0.95
2046
- }
2047
- }
2048
- ```
2049
-
2050
- #### X402 Protocol (HTTP Micropayments)
2051
-
2052
- ```typescript
2053
- // Event: Payment requested (402 status)
2054
- {
2055
- type: "payment_requested",
2056
- actorId: apiServiceId,
2057
- targetId: resourceId,
2058
- timestamp: Date.now(),
2059
- metadata: {
2060
- protocol: "x402",
2061
- scheme: "permit",
2062
- network: "base",
2063
- amount: "0.01",
2064
- resource: "/api/agent/analyze"
2065
- }
2066
- }
2067
-
2068
- // Event: Payment verified
2069
- {
2070
- type: "payment_verified",
2071
- actorId: systemId,
2072
- targetId: paymentId,
2073
- timestamp: Date.now(),
2074
- metadata: {
2075
- protocol: "x402",
2076
- network: "base",
2077
- txHash: "0x...",
2078
- verified: true
2079
- }
2080
- }
2081
-
2082
- // Connection: Payment made
2083
- {
2084
- fromThingId: payerId,
2085
- toThingId: serviceId,
2086
- relationshipType: "transacted",
2087
- metadata: {
2088
- protocol: "x402",
2089
- network: "base",
2090
- amount: "0.01",
2091
- txHash: "0x..."
2092
- }
2093
- }
2094
- ```
2095
-
2096
- #### AG-UI Protocol (CopilotKit Generative UI)
2097
-
2098
- ```typescript
2099
- // Event: UI component sent
2100
- {
2101
- type: "message_sent",
2102
- actorId: agentId,
2103
- targetId: conversationId,
2104
- timestamp: Date.now(),
2105
- metadata: {
2106
- protocol: "ag-ui",
2107
- messageType: "ui",
2108
- component: "chart",
2109
- data: { chartType: "line", ... }
2110
- }
2111
- }
2112
-
2113
- // Connection: No connections needed (UI is stateless)
2114
- ```
2115
-
2116
- ### Cross-Protocol Queries
2117
-
2118
- **All payments across all protocols:**
2119
-
2120
- ```typescript
2121
- const allPayments = await ctx.db
2122
- .query('events')
2123
- .filter((q) => q.eq(q.field('type'), 'payment_processed'))
2124
- .collect();
2125
- ```
2126
-
2127
- **Only X402 blockchain payments:**
2128
-
2129
- ```typescript
2130
- const x402Payments = allPayments.filter((e) => e.metadata.protocol === 'x402');
2131
- ```
2132
-
2133
- **Total revenue by protocol:**
2134
-
2135
- ```typescript
2136
- const byProtocol = allPayments.reduce((acc, e) => {
2137
- const protocol = e.metadata.protocol || 'traditional';
2138
- acc[protocol] = (acc[protocol] || 0) + e.metadata.amount;
2139
- return acc;
2140
- }, {});
2141
-
2142
- // Result: { x402: 1250, acp: 3400, ap2: 890, traditional: 5600 }
2143
- ```
2144
-
2145
- ---
2146
-
2147
- ## Merged: Protocol Integration Requirements (from OntologyUpdates.md)
2148
-
2149
- 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.
2150
-
2151
- - Things
2152
- - 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`.
2153
- - Keep `product` (ACP/marketplace) and `payment` (transaction). For X402/AP2/ACP specifics, store details in `payment.properties` and event metadata (see below).
2154
- - External integrations remain: `external_agent`, `external_workflow`, `external_connection`.
2155
-
2156
- - Connections
2157
- - Use existing specific types (e.g., `owns`, `member_of`, `holds_tokens`) plus consolidated types with metadata:
2158
- - `communicated` for cross‑agent communication (A2A/ACP/AG‑UI)
2159
- - `delegated` for task delegation/assignment
2160
- - `approved` for approvals; `fulfilled` for fulfillment; `transacted` for financial relations
2161
- - Protocol identity is always in `metadata.protocol`.
2162
-
2163
- - Events (consolidated, protocol‑aware)
2164
- - Use consolidated events already defined in this spec:
2165
- - `payment_event` with `metadata.status: requested|verified|processed` (X402/AP2/ACP)
2166
- - `commerce_event` with `metadata.eventType` (ACP/AP2)
2167
- - `communication_event` with `metadata.messageType` (A2A/ACP/AG‑UI)
2168
- - `task_event` with `metadata.action: delegated|completed|failed`
2169
- - `mandate_event` with `metadata.mandateType: intent|cart` (AP2)
2170
- - 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.
2171
-
2172
- - Protocol‑specific properties (examples)
2173
- - AP2 Mandate (stored on `mandate` thing):
2174
- - `properties`: `{ mandateType: "intent"|"cart", intent?: {...}, items?: [...], subtotal, tax, total, status, signature, credentialHash, approvedAt?, completedAt? }`
2175
- - X402/ACP/AP2 Payment (stored on `payment` thing and echoed in `payment_event.metadata`):
2176
- - `properties`: `{ protocol: "x402"|"acp"|"ap2", scheme?, network?, amount, currency?, txHash?, invoiceId?, status }`
2177
-
2178
- - Indexes (unchanged, validated)
2179
- - `things`: `by_type`, `by_status`, `by_created`, plus `search_things(name, type, status)`
2180
- - `connections`: `from_type`, `to_type`, `bidirectional`
2181
- - `events`: `type_time`, `actor_time`, `thing_type_time`
2182
- - `knowledge`: `by_type`, `by_source`, `by_created` (plus vector index when supported)
2183
-
2184
- - Auth migration strategy (compatibility)
2185
- - Existing auth tables (Better Auth: users, sessions, verification, resets, 2FA) remain intact.
2186
- - Link `users` to `things` via optional `users.thingId` and backfill with an internal migration (see `OntologyUpdates.md`). This preserves zero‑downtime compatibility.
2187
-
2188
- 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).
2189
-
2190
- ---
2191
-
2192
- ## Extensibility: User-Safe Additions
2193
-
2194
- Principle: Users can add to any type without breaking the ontology.
2195
-
2196
- - Use `properties` for schema-free details; don’t edit core enums casually.
2197
- - Use knowledge labels to categorize, filter, and group. Add labels freely without schema changes.
2198
- - Use `metadata` on connections and events for protocol/workflow-specific context.
2199
- - When a new subtype emerges (e.g., new content flavor), prefer:
2200
- - Keep `type` stable (e.g., `video`).
2201
- - Add `properties.kind` and labels (e.g., `format:webinar`, `topic:fitness`).
2202
- - Introduce a new enum literal only when global indexes/constraints benefit.
2203
- - Custom automations integrate via `external_agent`, `external_workflow`, and `external_connection` entities with `delegated`/`communicated` connections.
2204
-
2205
- ---
2206
-
2207
- ## Glossary (Compact)
2208
-
2209
- - `entity` (thing): Any addressable object (creator, organization, content, product, payment, external_agent, mandate, etc.).
2210
- - `connection` (state): Relationship between two entities (owns, member_of, transacted, fulfilled, delegated, communicated).
2211
- - `event` (action): Time-stamped occurrence (content_changed, payment_event, communication_event, task_event, mandate_event).
2212
- - `knowledge` (label/chunk): Classification and RAG units applied via `thingKnowledge` (labels like skill/industry/topic and chunks with embeddings).
2213
- - `owner`: A `creator` with ownership responsibilities. Platform owner (platform_owner) or organization owner (org_owner). See `one/people/owner.md`.
2214
- - `organization`: Multi-tenant container for users and resources. See `one/people/organisation.md`.
2215
-
2216
- ---
2217
-
2218
- ## Summary Statistics
2219
-
2220
- **Dimensions:** 6 total (organizations, people, things, connections, events, knowledge)
2221
-
2222
- **Thing Types:** 66 total
2223
- - Core: 4 (creator, ai_clone, audience_member, organization)
2224
- - Business Agents: 10
2225
- - Content: 7
2226
- - Products: 4
2227
- - Community: 3
2228
- - Token: 2
2229
- - Knowledge: 2
2230
- - Platform: 6
2231
- - Business: 7
2232
- - Authentication & Session: 5
2233
- - Marketing: 6
2234
- - External: 3
2235
- - Protocol: 2
2236
-
2237
- **Connection Types:** 25 total (Hybrid approach)
2238
- - 18 specific semantic types
2239
- - 7 consolidated types with metadata variants
2240
- - Protocol-agnostic via metadata.protocol
2241
- - Includes organization membership with role-based metadata
2242
-
2243
- **Event Types:** 67 total (Hybrid approach)
2244
- - 4 Thing lifecycle
2245
- - 5 User events
2246
- - 6 Authentication events
2247
- - 5 Group events
2248
- - 4 Dashboard & UI events
2249
- - 4 AI/Clone events
2250
- - 4 Agent events
2251
- - 7 Token events
2252
- - 5 Course events
2253
- - 5 Analytics events
2254
- - 7 Cycle events
2255
- - 5 Blockchain events
2256
- - 11 consolidated types with metadata variants
2257
-
2258
- **Design Benefits:**
2259
- - Six-dimension reality model
2260
- - Multi-tenant by design
2261
- - Clear ownership & governance
2262
- - Protocol-agnostic core
2263
- - Infinite protocol extensibility
2264
- - Cross-protocol analytics
2265
- - Type-safe
2266
- - Future-proof
2267
- - Scales from children to enterprise
2268
-
2269
- ---
2270
-
2271
- ## Knowledge Governance
2272
-
2273
- Policy: Default is free-form, user-extensible knowledge labels for maximum flexibility and zero schema churn.
2274
-
2275
- - Curated label prefixes (recommended): `skill:*`, `industry:*`, `topic:*`, `format:*`, `goal:*`, `audience:*`, `technology:*`, `status:*`, `capability:*`, `protocol:*`, `payment_method:*`, `network:*`.
2276
- - Validation: Enforce label hygiene (no duplicates within scope); allow synonyms via an alias list if needed.
2277
- - Ownership: Platform/organization owners may curate official labels; users can still apply ad‑hoc labels.
2278
- - Hygiene: Periodically consolidate low-usage duplicates; do not delete knowledge items with active references—mark deprecated instead.
2279
-
2280
- ---
2281
-
2282
- ## Changelog
2283
-
2284
- - 2025-10-07
2285
- - Canonicalized terminology: “things” as the conceptual term; kept implementation table/fields as `entities` for compatibility.
2286
- - Merged protocol integration requirements; clarified consolidated events/connections with `metadata.protocol`.
2287
- - Added Event Retention & Archival guidance for scale.
2288
- - Added Extensibility rules and a compact Glossary.
2289
- - Added Knowledge Governance and links to `owner.md` and `organisation.md`.
2290
-
2291
- **Thing Types:** 66 total
2292
-
2293
- - Core: 4 (creator, ai_clone, audience_member, organization)
2294
- - Business Agents: 10
2295
- - Content: 7
2296
- - Products: 4
2297
- - Community: 3
2298
- - Token: 2
2299
- - Knowledge: 2
2300
- - Platform: 6
2301
- - Business: 7
2302
- - Authentication & Session: 5 (session, oauth_account, verification_token, password_reset_token, ui_preferences)
2303
- - Marketing: 6
2304
- - External: 3
2305
- - Protocol: 2
2306
-
2307
- **Connection Types:** 25 total (Hybrid approach)
2308
-
2309
- - 18 specific semantic types
2310
- - 7 consolidated types with metadata variants
2311
- - Protocol-agnostic via metadata.protocol
2312
- - Includes organization membership with role-based metadata
2313
-
2314
- **Event Types:** 63 total (Hybrid approach)
2315
-
2316
- - 4 Thing lifecycle
2317
- - 5 User events
2318
- - 6 Authentication events (password_reset, email_verification, 2FA)
2319
- - 5 Group events (group_created, user_invited_to_group, user_joined_group)
2320
- - 4 Dashboard & UI events (dashboard_viewed, theme_changed, settings_updated)
2321
- - 4 AI/Clone events
2322
- - 4 Agent events
2323
- - 7 Token events
2324
- - 5 Course events
2325
- - 5 Analytics events
2326
- - **7 Cycle events** (NEW: cycle_request, cycle_completed, revenue_collected, quota_exceeded)
2327
- - **5 Blockchain events** (NEW: nft_minted, nft_transferred, tokens_bridged, contract_deployed, treasury_withdrawal)
2328
- - 11 consolidated types with metadata variants
2329
- - Protocol identification via metadata.protocol + metadata.network
2330
-
2331
- **Tag Categories:** 12 total
2332
-
2333
- - Industry, skill, topic, format, goal, audience, technology, status
2334
- - Plus: capability, protocol, payment_method, network
2335
-
2336
- **Design Benefits:**
2337
-
2338
- - ✅ Single source of truth
2339
- - ✅ Protocol-agnostic core
2340
- - ✅ Infinite protocol extensibility
2341
- - ✅ Cross-protocol analytics
2342
- - ✅ Clean, maintainable
2343
- - ✅ Type-safe
2344
- - ✅ Future-proof
2345
-
2346
- ---
2347
-
2348
- **END OF ONTOLOGY SPECIFICATION**
2349
-
2350
- ## The Philosophy
2351
-
2352
- **Simplicity is the ultimate sophistication.**
2353
-
2354
- This ontology proves that you don't need hundreds of tables or complex schemas to build a complete AI-native platform. You need:
2355
-
2356
- 1. **6 dimensions** (organizations, people, things, connections, events, knowledge)
2357
- 2. **66 thing types** (every "thing")
2358
- 3. **25 connection types** (every relationship)
2359
- 4. **67 event types** (every action)
2360
- 5. **Metadata** (for protocol identity via metadata.protocol)
2361
-
2362
- That's it. Everything else is just data.
2363
-
2364
- ### Why This Works
2365
-
2366
- **Other systems:**
2367
-
2368
- - Create new tables for every feature
2369
- - Add protocol-specific columns
2370
- - Pollute schema with temporary concepts
2371
- - End up with 50+ tables, 200+ columns
2372
- - Become unmaintainable nightmares
2373
-
2374
- **ONE's approach:**
2375
-
2376
- - Map every feature to 6 dimensions
2377
- - Organizations partition the space
2378
- - People authorize and govern
2379
- - Things, connections, events flow from there
2380
- - Knowledge understands it all
2381
- - Scale infinitely without schema changes
2382
- - Stay simple, clean, beautiful
2383
-
2384
- ### The Result
2385
-
2386
- A database schema that:
2387
-
2388
- - Scales from lemonade stands to global enterprises
2389
- - Children can understand: "I own (org), I'm the boss (person), I sell lemonade (things)"
2390
- - Enterprises can rely on: Multi-tenant isolation, clear governance, infinite scale
2391
- - AI agents can reason about completely
2392
- - Never needs breaking changes
2393
- - Grows more powerful as it grows larger
2394
-
2395
- **This is what happens when you design for clarity first.**
2396
-
2397
- ---
2398
-
2399
- ## Frontend Integration Examples
2400
-
2401
- ### How the Frontend Uses This Ontology
2402
-
2403
- The Astro frontend (documented in `Frontend.md`) uses this ontology through:
2404
-
2405
- 1. **Astro Content Collections** - Can load entities as typed collections
2406
- 2. **Convex Hooks** - Real-time subscriptions to entity/connection/event data
2407
- 3. **Hono API** - Complex mutations that create/update entities and log events
2408
-
2409
- **Example: Multi-Tenant Dashboard**
2410
-
2411
- ```typescript
2412
- // Frontend Component (src/components/admin/OrganizationList.tsx)
2413
- import { useQuery } from 'convex/react';
2414
- import { api } from '@/convex/_generated/api';
2415
-
2416
- export function OrganizationList() {
2417
- // Query organizations (type: "organization")
2418
- const orgs = useQuery(api.queries.admin.listOrganizations);
2419
-
2420
- return (
2421
- <div>
2422
- {orgs?.map(org => (
2423
- <Card key={org._id}>
2424
- <CardHeader>
2425
- <CardTitle>{org.name}</CardTitle>
2426
- <Badge>{org.properties.plan}</Badge>
2427
- </CardHeader>
2428
- <CardContent>
2429
- <p>{org.properties.usage.users} / {org.properties.limits.users} users</p>
2430
- <p>Status: {org.properties.status}</p>
2431
- </CardContent>
2432
- </Card>
2433
- ))}
2434
- </div>
2435
- );
2436
- }
2437
- ```
2438
-
2439
- **Example: Authentication Flow**
2440
-
2441
- ```typescript
2442
- // Password reset request creates:
2443
- // 1. Entity: password_reset_token
2444
- // 2. Event: password_reset_requested
2445
-
2446
- // Backend (Convex mutation)
2447
- export const requestPasswordReset = mutation({
2448
- handler: async (ctx, { email }) => {
2449
- // 1. Find user entity
2450
- const user = await ctx.db
2451
- .query('entities')
2452
- .filter((q) => q.eq(q.field('properties.email'), email))
2453
- .first();
2454
-
2455
- if (!user) return { success: true }; // Don't reveal if user exists
2456
-
2457
- // 2. Create password_reset_token entity
2458
- const tokenId = await ctx.db.insert('entities', {
2459
- type: 'password_reset_token',
2460
- name: `Reset token for ${email}`,
2461
- properties: {
2462
- userId: user._id,
2463
- token: hashedToken,
2464
- expiresAt: Date.now() + 30 * 60 * 1000,
2465
- },
2466
- status: 'active',
2467
- createdAt: Date.now(),
2468
- updatedAt: Date.now(),
2469
- });
2470
-
2471
- // 3. Log event
2472
- await ctx.db.insert('events', {
2473
- type: 'password_reset_requested',
2474
- actorId: user._id,
2475
- targetId: tokenId,
2476
- timestamp: Date.now(),
2477
- metadata: {
2478
- email,
2479
- ipAddress: ctx.auth.sessionId,
2480
- expiresAt: Date.now() + 30 * 60 * 1000,
2481
- },
2482
- });
2483
-
2484
- return { success: true };
2485
- },
2486
- });
2487
-
2488
- // Frontend usage
2489
- import { useMutation } from 'convex/react';
2490
-
2491
- export function PasswordResetForm() {
2492
- const requestReset = useMutation(api.auth.requestPasswordReset);
2493
-
2494
- const handleSubmit = async (email: string) => {
2495
- await requestReset({ email });
2496
- // Show success message
2497
- };
2498
- }
2499
- ```
2500
-
2501
- **Example: Organization Membership Check**
2502
-
2503
- ```typescript
2504
- // Check if user is org_owner (Middleware.md pattern)
2505
- export const checkOrgOwner = query({
2506
- args: { userId: v.id('entities'), orgId: v.id('entities') },
2507
- handler: async (ctx, { userId, orgId }) => {
2508
- // Query connection with role metadata
2509
- const membership = await ctx.db
2510
- .query('connections')
2511
- .withIndex('from_type', (q) =>
2512
- q
2513
- .eq('fromThingId', userId)
2514
- .eq('toThingId', orgId)
2515
- .eq('relationshipType', 'member_of')
2516
- )
2517
- .first();
2518
-
2519
- return membership?.metadata?.role === 'org_owner';
2520
- },
2521
- });
2522
-
2523
- // Frontend usage in middleware
2524
- import { ConvexHttpClient } from 'convex/browser';
2525
-
2526
- export async function checkAccess(userId: string, orgId: string) {
2527
- const convex = new ConvexHttpClient(env.CONVEX_URL);
2528
- const isOwner = await convex.query(api.auth.checkOrgOwner, { userId, orgId });
2529
-
2530
- if (!isOwner) {
2531
- throw new Error('Forbidden: Org owner access required');
2532
- }
2533
- }
2534
- ```
2535
-
2536
- **Example: Dashboard Analytics**
2537
-
2538
- ```typescript
2539
- // Query events for analytics (Dashboard.md pattern)
2540
- export const getOrgAnalytics = query({
2541
- args: { orgId: v.id('entities'), days: v.number() },
2542
- handler: async (ctx, { orgId, days }) => {
2543
- const since = Date.now() - days * 24 * 60 * 60 * 1000;
2544
-
2545
- // Get all dashboard_viewed events for org users
2546
- const orgMembers = await ctx.db
2547
- .query('connections')
2548
- .withIndex('to_type', (q) =>
2549
- q.eq('toThingId', orgId).eq('relationshipType', 'member_of')
2550
- )
2551
- .collect();
2552
-
2553
- const memberIds = orgMembers.map((m) => m.fromThingId);
2554
-
2555
- const dashboardViews = await ctx.db
2556
- .query('events')
2557
- .withIndex('type_time', (q) =>
2558
- q.eq('type', 'dashboard_viewed').gte('timestamp', since)
2559
- )
2560
- .filter((q) => memberIds.includes(q.field('actorId')))
2561
- .collect();
2562
-
2563
- return {
2564
- totalViews: dashboardViews.length,
2565
- uniqueUsers: new Set(dashboardViews.map((e) => e.actorId)).size,
2566
- averageSessionDuration:
2567
- dashboardViews.reduce(
2568
- (sum, e) => sum + (e.metadata.sessionDuration || 0),
2569
- 0
2570
- ) / dashboardViews.length,
2571
- };
2572
- },
2573
- });
2574
- ```
2575
-
2576
- **Example: UI Preferences Sync**
2577
-
2578
- ```typescript
2579
- // Update user preferences (creates ui_preferences thing if not exists)
2580
- export const updatePreferences = mutation({
2581
- args: {
2582
- userId: v.id('entities'),
2583
- theme: v.optional(
2584
- v.union(v.literal('light'), v.literal('dark'), v.literal('system'))
2585
- ),
2586
- language: v.optional(v.string()),
2587
- },
2588
- handler: async (ctx, { userId, theme, language }) => {
2589
- // Get or create ui_preferences entity
2590
- let prefs = await ctx.db
2591
- .query('entities')
2592
- .withIndex('by_type', (q) => q.eq('type', 'ui_preferences'))
2593
- .filter((q) => q.eq(q.field('properties.userId'), userId))
2594
- .first();
2595
-
2596
- if (!prefs) {
2597
- // Create new preferences entity
2598
- const prefsId = await ctx.db.insert('entities', {
2599
- type: 'ui_preferences',
2600
- name: `Preferences for user ${userId}`,
2601
- properties: {
2602
- userId,
2603
- theme: theme || 'system',
2604
- language: language || 'en',
2605
- timezone: 'UTC',
2606
- dashboardLayout: {
2607
- sidebarCollapsed: false,
2608
- defaultView: 'grid',
2609
- itemsPerPage: 20,
2610
- },
2611
- notifications: { email: true, push: false, sms: false, inApp: true },
2612
- accessibility: {
2613
- reducedMotion: false,
2614
- highContrast: false,
2615
- fontSize: 'medium',
2616
- },
2617
- updatedAt: Date.now(),
2618
- },
2619
- status: 'active',
2620
- createdAt: Date.now(),
2621
- updatedAt: Date.now(),
2622
- });
2623
-
2624
- prefs = await ctx.db.get(prefsId);
2625
- } else {
2626
- // Update existing preferences
2627
- await ctx.db.patch(prefs._id, {
2628
- properties: {
2629
- ...prefs.properties,
2630
- theme: theme || prefs.properties.theme,
2631
- language: language || prefs.properties.language,
2632
- updatedAt: Date.now(),
2633
- },
2634
- updatedAt: Date.now(),
2635
- });
2636
- }
2637
-
2638
- // Log preferences_updated event
2639
- if (theme) {
2640
- await ctx.db.insert('events', {
2641
- type: 'theme_changed',
2642
- actorId: userId,
2643
- targetId: prefs._id,
2644
- timestamp: Date.now(),
2645
- metadata: {
2646
- previousTheme: prefs.properties.theme,
2647
- newTheme: theme,
2648
- },
2649
- });
2650
- }
2651
-
2652
- return { success: true };
2653
- },
2654
- });
2655
-
2656
- // Frontend hook
2657
- export function usePreferences(userId: string) {
2658
- const prefs = useQuery(api.queries.preferences.get, { userId });
2659
- const updatePrefs = useMutation(api.mutations.preferences.update);
2660
-
2661
- return { preferences: prefs?.properties, updatePreferences: updatePrefs };
2662
- }
2663
- ```
2664
-
2665
- ### Key Frontend Patterns
2666
-
2667
- **1. Thing as Content Collection**
2668
-
2669
- ```typescript
2670
- // src/content/config.ts
2671
- const agentsCollection = defineCollection({
2672
- type: 'data',
2673
- loader: async () => {
2674
- const convex = new ConvexHttpClient(env.CONVEX_URL);
2675
- const agents = await convex.query(api.queries.entities.list, {
2676
- type: 'strategy_agent',
2677
- });
2678
- return agents;
2679
- },
2680
- });
2681
- ```
2682
-
2683
- **2. Real-time Dashboard Stats**
2684
-
2685
- ```tsx
2686
- export function DashboardStats({ orgId }) {
2687
- // Subscribes to changes - auto-updates when events are logged!
2688
- const stats = useQuery(api.queries.dashboard.getStats, { orgId });
2689
-
2690
- return <StatsCards data={stats} />;
2691
- }
2692
- ```
2693
-
2694
- **3. Permission-Based Rendering**
2695
-
2696
- ```tsx
2697
- export function AdminPanel({ userId, orgId }) {
2698
- const membership = useQuery(api.queries.orgs.getMembership, {
2699
- userId,
2700
- orgId,
2701
- });
2702
-
2703
- if (membership?.metadata?.role !== 'org_owner') {
2704
- return <div>Access denied</div>;
2705
- }
2706
-
2707
- return <AdminDashboard />;
2708
- }
2709
- ```
2710
-
2711
- **4. Astro SSR with Ontology**
2712
-
2713
- ```astro
2714
- ---
2715
- // src/pages/org/[orgId]/dashboard.astro
2716
- import { ConvexHttpClient } from 'convex/browser';
2717
- import { api } from '@/convex/_generated/api';
2718
-
2719
- const convex = new ConvexHttpClient(import.meta.env.PUBLIC_CONVEX_URL);
2720
-
2721
- // Fetch organization entity
2722
- const org = await convex.query(api.queries.entities.get, {
2723
- id: Astro.params.orgId,
2724
- });
2725
-
2726
- // Fetch org members (connections where relationshipType = "member_of")
2727
- const members = await convex.query(api.queries.orgs.getMembers, {
2728
- orgId: Astro.params.orgId,
2729
- });
2730
- ---
2731
-
2732
- <Layout title={org.name}>
2733
- <h1>{org.name} Dashboard</h1>
2734
- <p>Plan: {org.properties.plan}</p>
2735
- <p>Members: {members.length} / {org.properties.limits.users}</p>
2736
-
2737
- <!-- Real-time stats component -->
2738
- <OrgStats client:load orgId={org._id} />
2739
- </Layout>
2740
- ```
2741
-
2742
- This demonstrates how the complete ontology (things, connections, events, knowledge) powers the entire frontend architecture through clean, type-safe queries and real-time subscriptions.
2743
-
2744
- ---
2745
-
2746
- ## For Implementers
2747
-
2748
- **AI agents:** When implementing ANY feature, start by asking:
2749
-
2750
- 1. What **entities** are involved?
2751
- 2. What **connections** link them?
2752
- 3. What **events** need to be logged?
2753
- 4. What **knowledge labels** categorize them?
2754
- 5. What **protocol** is this for? (add to metadata)
2755
- 6. What **knowledge** (labels + chunks) should be linked?
2756
-
2757
- **Humans:** Your AI agents now have a complete, unambiguous data model. They will generate consistent database operations because they understand the underlying structure.
2758
-
2759
- **Developers:** You have a schema that will never need major refactoring. Just add new thing types as needed, use existing event types with metadata, and enjoy the simplicity.
2760
-
2761
- **This ontology is complete. It's ready for production.**
2762
-
2763
- ---
2764
-
2765
- ## RAG Ingestion Strategy for `one/`
2766
-
2767
- Objective: attach vectors to every relevant piece of content to enable high‑quality retrieval, while preserving ontology simplicity.
2768
-
2769
- 1) Inventory sources (by thing type)
2770
- - Text bodies: `blog_post.content`, `social_post.text`, `email.content`, `lesson.content`, `course.description`, `website.page.html (stripped)`
2771
- - Transcripts: `video.transcript`, `podcast.transcript`, `livestream.recording.transcript`
2772
- - Metadata: titles, summaries, captions
2773
-
2774
- 2) Chunking standard
2775
- - Window: ~800 tokens; overlap: ~200 tokens; language‑aware sentence boundaries when possible.
2776
- - Store per‑chunk: `{ index, tokenCount, start, end, overlap }`.
2777
-
2778
- 3) Embedding policy
2779
- - Model: configurable via env (e.g., `text-embedding-3-large`). Store `embeddingModel` + `embeddingDim` per knowledge item.
2780
- - PII/Privacy: use `knowledgeType: 'vector_only'` for sensitive texts; omit `text` and keep only embeddings + hashes.
2781
-
2782
- 4) Ingestion pipeline
2783
- - Mutation: `scheduleEmbeddingForThing({ thingId, fields[] })` validates and enqueues work.
2784
- - Internal action: `embedText({ text, model })` calls provider and returns `embedding`.
2785
- - Internal mutation: `upsertKnowledgeChunks({ thingId, chunks[] })` writes `knowledge` items and links via `thingKnowledge` with role `chunk_of`.
2786
- - Event log: `content_changed` on source updates triggers re‑embedding (debounced) via scheduler.
2787
-
2788
- 5) Query + retrieval
2789
- - Vector search over `knowledge` filtered by org, creator, and content type; k‑NN approximate index when available, else provider‑side search.
2790
- - Hybrid scoring: combine semantic similarity with lexical signals from `labels` and metadata.
2791
-
2792
- 6) Governance + lifecycle
2793
- - Versioning: keep `metadata.hash` of source; if unchanged, skip.
2794
- - Retention: archive old chunks on major edits; GC orphaned knowledge items.
2795
- - Quality: track `metadata.qualityScore` and `feedback` for active learning.
2796
-
2797
- Example (Convex pseudo‑API)
2798
-
2799
- ```typescript
2800
- // internal action: embed text
2801
- export const embedText = internalAction({
2802
- args: { text: v.string(), model: v.optional(v.string()) },
2803
- handler: async (ctx, { text, model }) => {
2804
- const embedding = await callEmbedProvider(text, model);
2805
- return { embedding, model: model || 'text-embedding-3-large', dim: embedding.length };
2806
- },
2807
- });
2808
-
2809
- // mutation: schedule embedding for a thing
2810
- export const scheduleEmbeddingForThing = mutation({
2811
- args: { id: v.id('things'), fields: v.optional(v.array(v.string())) },
2812
- handler: async (ctx, { id, fields }) => {
2813
- await ctx.scheduler.runAfter(0, internal.rag.ingestThing, { id, fields });
2814
- },
2815
- });
2816
-
2817
- // internal action: ingest a thing into knowledge
2818
- export const ingestThing = internalAction({
2819
- args: { id: v.id('things'), fields: v.optional(v.array(v.string())) },
2820
- handler: async (ctx, { id, fields }) => {
2821
- const thing = await ctx.runQuery(internal.entities.get, { id });
2822
- const texts = extractTexts(thing, fields);
2823
- let index = 0;
2824
- for (const t of chunk(texts, { size: 800, overlap: 200 })) {
2825
- const { embedding, model, dim } = await ctx.runAction(internal.rag.embedText, { text: t.text });
2826
- const knowledgeId = await ctx.runMutation(internal.rag.upsertKnowledge, {
2827
- item: {
2828
- knowledgeType: 'chunk', text: t.text, embedding, embeddingModel: model, embeddingDim: dim,
2829
- sourceThingId: id, sourceField: t.field, chunk: { index, tokenCount: t.tokens, overlap: 200 },
2830
- labels: t.labels,
2831
- },
2832
- });
2833
- await ctx.runMutation(internal.rag.linkThingKnowledge, { thingId: id, knowledgeId, role: 'chunk_of' });
2834
- index++;
2835
- }
2836
- },
2837
- });
2838
- ```
2839
-
2840
- This strategy keeps vectors first‑class without expanding primitives: knowledge absorbs both legacy tags (as labels) and semantic chunks (as embeddings).