oneie 3.6.40 → 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 (984) hide show
  1. package/README.md +28 -9
  2. package/dist/admin/build.d.ts +15 -0
  3. package/dist/admin/build.d.ts.map +1 -0
  4. package/dist/admin/build.js +295 -0
  5. package/dist/admin/build.js.map +1 -0
  6. package/dist/admin/index.d.ts +24 -0
  7. package/dist/admin/index.d.ts.map +1 -0
  8. package/dist/admin/index.js +98 -0
  9. package/dist/admin/index.js.map +1 -0
  10. package/dist/admin/list.d.ts +14 -0
  11. package/dist/admin/list.d.ts.map +1 -0
  12. package/dist/admin/list.js +90 -0
  13. package/dist/admin/list.js.map +1 -0
  14. package/dist/admin/manifest.d.ts +86 -0
  15. package/dist/admin/manifest.d.ts.map +1 -0
  16. package/dist/admin/manifest.js +183 -0
  17. package/dist/admin/manifest.js.map +1 -0
  18. package/dist/admin/monorepo.d.ts +25 -0
  19. package/dist/admin/monorepo.d.ts.map +1 -0
  20. package/dist/admin/monorepo.js +59 -0
  21. package/dist/admin/monorepo.js.map +1 -0
  22. package/dist/admin/release.d.ts +17 -0
  23. package/dist/admin/release.d.ts.map +1 -0
  24. package/dist/admin/release.js +144 -0
  25. package/dist/admin/release.js.map +1 -0
  26. package/dist/admin/sync.d.ts +14 -0
  27. package/dist/admin/sync.d.ts.map +1 -0
  28. package/dist/admin/sync.js +104 -0
  29. package/dist/admin/sync.js.map +1 -0
  30. package/dist/admin/validate.d.ts +15 -0
  31. package/dist/admin/validate.d.ts.map +1 -0
  32. package/dist/admin/validate.js +169 -0
  33. package/dist/admin/validate.js.map +1 -0
  34. package/dist/commands/agent.d.ts +2 -0
  35. package/dist/commands/agent.d.ts.map +1 -1
  36. package/dist/commands/agent.js +44 -0
  37. package/dist/commands/agent.js.map +1 -1
  38. package/dist/commands/ask.d.ts +4 -0
  39. package/dist/commands/ask.d.ts.map +1 -0
  40. package/dist/commands/ask.js +8 -0
  41. package/dist/commands/ask.js.map +1 -0
  42. package/dist/commands/bounty.d.ts +4 -0
  43. package/dist/commands/bounty.d.ts.map +1 -0
  44. package/dist/commands/bounty.js +24 -0
  45. package/dist/commands/bounty.js.map +1 -0
  46. package/dist/commands/capabilities.d.ts +4 -0
  47. package/dist/commands/capabilities.d.ts.map +1 -0
  48. package/dist/commands/capabilities.js +18 -0
  49. package/dist/commands/capabilities.js.map +1 -0
  50. package/dist/commands/claw.d.ts +4 -0
  51. package/dist/commands/claw.d.ts.map +1 -0
  52. package/dist/commands/claw.js +14 -0
  53. package/dist/commands/claw.js.map +1 -0
  54. package/dist/commands/commend.d.ts +4 -0
  55. package/dist/commands/commend.d.ts.map +1 -0
  56. package/dist/commands/commend.js +13 -0
  57. package/dist/commands/commend.js.map +1 -0
  58. package/dist/commands/completion.d.ts +4 -0
  59. package/dist/commands/completion.d.ts.map +1 -0
  60. package/dist/commands/completion.js +49 -0
  61. package/dist/commands/completion.js.map +1 -0
  62. package/dist/commands/config.d.ts +4 -0
  63. package/dist/commands/config.d.ts.map +1 -0
  64. package/dist/commands/config.js +78 -0
  65. package/dist/commands/config.js.map +1 -0
  66. package/dist/commands/deploy.d.ts +4 -0
  67. package/dist/commands/deploy.d.ts.map +1 -0
  68. package/dist/commands/deploy.js +10 -0
  69. package/dist/commands/deploy.js.map +1 -0
  70. package/dist/commands/doctor.d.ts +4 -0
  71. package/dist/commands/doctor.d.ts.map +1 -0
  72. package/dist/commands/doctor.js +72 -0
  73. package/dist/commands/doctor.js.map +1 -0
  74. package/dist/commands/export.d.ts +4 -0
  75. package/dist/commands/export.d.ts.map +1 -0
  76. package/dist/commands/export.js +15 -0
  77. package/dist/commands/export.js.map +1 -0
  78. package/dist/commands/fade.d.ts +4 -0
  79. package/dist/commands/fade.d.ts.map +1 -0
  80. package/dist/commands/fade.js +15 -0
  81. package/dist/commands/fade.js.map +1 -0
  82. package/dist/commands/flag.d.ts +4 -0
  83. package/dist/commands/flag.d.ts.map +1 -0
  84. package/dist/commands/flag.js +13 -0
  85. package/dist/commands/flag.js.map +1 -0
  86. package/dist/commands/forget.d.ts +4 -0
  87. package/dist/commands/forget.d.ts.map +1 -0
  88. package/dist/commands/forget.js +16 -0
  89. package/dist/commands/forget.js.map +1 -0
  90. package/dist/commands/frontier.d.ts +4 -0
  91. package/dist/commands/frontier.d.ts.map +1 -0
  92. package/dist/commands/frontier.js +11 -0
  93. package/dist/commands/frontier.js.map +1 -0
  94. package/dist/commands/health.d.ts +4 -0
  95. package/dist/commands/health.d.ts.map +1 -0
  96. package/dist/commands/health.js +11 -0
  97. package/dist/commands/health.js.map +1 -0
  98. package/dist/commands/highways.d.ts +4 -0
  99. package/dist/commands/highways.d.ts.map +1 -0
  100. package/dist/commands/highways.js +14 -0
  101. package/dist/commands/highways.js.map +1 -0
  102. package/dist/commands/hire.d.ts +4 -0
  103. package/dist/commands/hire.d.ts.map +1 -0
  104. package/dist/commands/hire.js +16 -0
  105. package/dist/commands/hire.js.map +1 -0
  106. package/dist/commands/init.d.ts.map +1 -1
  107. package/dist/commands/init.js +69 -42
  108. package/dist/commands/init.js.map +1 -1
  109. package/dist/commands/know.d.ts +4 -0
  110. package/dist/commands/know.d.ts.map +1 -0
  111. package/dist/commands/know.js +8 -0
  112. package/dist/commands/know.js.map +1 -0
  113. package/dist/commands/launch.d.ts +4 -0
  114. package/dist/commands/launch.d.ts.map +1 -0
  115. package/dist/commands/launch.js +16 -0
  116. package/dist/commands/launch.js.map +1 -0
  117. package/dist/commands/mark.d.ts +4 -0
  118. package/dist/commands/mark.d.ts.map +1 -0
  119. package/dist/commands/mark.js +15 -0
  120. package/dist/commands/mark.js.map +1 -0
  121. package/dist/commands/pay.d.ts +4 -0
  122. package/dist/commands/pay.d.ts.map +1 -0
  123. package/dist/commands/pay.js +21 -0
  124. package/dist/commands/pay.js.map +1 -0
  125. package/dist/commands/pipe.d.ts +4 -0
  126. package/dist/commands/pipe.d.ts.map +1 -0
  127. package/dist/commands/pipe.js +35 -0
  128. package/dist/commands/pipe.js.map +1 -0
  129. package/dist/commands/publish.d.ts +4 -0
  130. package/dist/commands/publish.d.ts.map +1 -0
  131. package/dist/commands/publish.js +23 -0
  132. package/dist/commands/publish.js.map +1 -0
  133. package/dist/commands/recall.d.ts +4 -0
  134. package/dist/commands/recall.d.ts.map +1 -0
  135. package/dist/commands/recall.js +12 -0
  136. package/dist/commands/recall.js.map +1 -0
  137. package/dist/commands/repl.d.ts +4 -0
  138. package/dist/commands/repl.d.ts.map +1 -0
  139. package/dist/commands/repl.js +56 -0
  140. package/dist/commands/repl.js.map +1 -0
  141. package/dist/commands/reveal.d.ts +4 -0
  142. package/dist/commands/reveal.d.ts.map +1 -0
  143. package/dist/commands/reveal.js +11 -0
  144. package/dist/commands/reveal.js.map +1 -0
  145. package/dist/commands/revenue.d.ts +4 -0
  146. package/dist/commands/revenue.d.ts.map +1 -0
  147. package/dist/commands/revenue.js +11 -0
  148. package/dist/commands/revenue.js.map +1 -0
  149. package/dist/commands/select.d.ts +4 -0
  150. package/dist/commands/select.d.ts.map +1 -0
  151. package/dist/commands/select.js +19 -0
  152. package/dist/commands/select.js.map +1 -0
  153. package/dist/commands/signal.d.ts +4 -0
  154. package/dist/commands/signal.d.ts.map +1 -0
  155. package/dist/commands/signal.js +8 -0
  156. package/dist/commands/signal.js.map +1 -0
  157. package/dist/commands/stats.d.ts +4 -0
  158. package/dist/commands/stats.d.ts.map +1 -0
  159. package/dist/commands/stats.js +11 -0
  160. package/dist/commands/stats.js.map +1 -0
  161. package/dist/commands/status.d.ts +4 -0
  162. package/dist/commands/status.d.ts.map +1 -0
  163. package/dist/commands/status.js +18 -0
  164. package/dist/commands/status.js.map +1 -0
  165. package/dist/commands/sync.d.ts +4 -0
  166. package/dist/commands/sync.d.ts.map +1 -0
  167. package/dist/commands/sync.js +20 -0
  168. package/dist/commands/sync.js.map +1 -0
  169. package/dist/commands/tail.d.ts +4 -0
  170. package/dist/commands/tail.d.ts.map +1 -0
  171. package/dist/commands/tail.js +51 -0
  172. package/dist/commands/tail.js.map +1 -0
  173. package/dist/commands/warn.d.ts +4 -0
  174. package/dist/commands/warn.d.ts.map +1 -0
  175. package/dist/commands/warn.js +15 -0
  176. package/dist/commands/warn.js.map +1 -0
  177. package/dist/create-org-profile.js +2 -2
  178. package/dist/create-user-profile.js +2 -2
  179. package/dist/index.js +135 -7
  180. package/dist/index.js.map +1 -1
  181. package/dist/lib/args.d.ts +11 -0
  182. package/dist/lib/args.d.ts.map +1 -0
  183. package/dist/lib/args.js +57 -0
  184. package/dist/lib/args.js.map +1 -0
  185. package/dist/lib/config.d.ts +12 -0
  186. package/dist/lib/config.d.ts.map +1 -0
  187. package/dist/lib/config.js +38 -0
  188. package/dist/lib/config.js.map +1 -0
  189. package/dist/lib/http.d.ts +9 -0
  190. package/dist/lib/http.d.ts.map +1 -0
  191. package/dist/lib/http.js +25 -0
  192. package/dist/lib/http.js.map +1 -0
  193. package/dist/lib/output.d.ts +5 -0
  194. package/dist/lib/output.d.ts.map +1 -0
  195. package/dist/lib/output.js +32 -0
  196. package/dist/lib/output.js.map +1 -0
  197. package/dist/lib/sdk.d.ts +10 -0
  198. package/dist/lib/sdk.d.ts.map +1 -0
  199. package/dist/lib/sdk.js +22 -0
  200. package/dist/lib/sdk.js.map +1 -0
  201. package/dist/lib/telemetry.d.ts +4 -0
  202. package/dist/lib/telemetry.d.ts.map +1 -0
  203. package/dist/lib/telemetry.js +61 -0
  204. package/dist/lib/telemetry.js.map +1 -0
  205. package/dist/utils/file-resolver.js +1 -3
  206. package/dist/utils/file-resolver.js.map +1 -1
  207. package/dist/utils/installation-setup.d.ts +15 -0
  208. package/dist/utils/installation-setup.d.ts.map +1 -1
  209. package/dist/utils/installation-setup.js +71 -8
  210. package/dist/utils/installation-setup.js.map +1 -1
  211. package/package.json +5 -21
  212. package/.claude/agents/TROUBLESHOOTING.md +0 -530
  213. package/.claude/agents/agent-backend.md +0 -574
  214. package/.claude/agents/agent-builder.md +0 -911
  215. package/.claude/agents/agent-claude.md +0 -645
  216. package/.claude/agents/agent-clean.md +0 -477
  217. package/.claude/agents/agent-clone.md +0 -554
  218. package/.claude/agents/agent-designer.md +0 -1080
  219. package/.claude/agents/agent-director.md +0 -2254
  220. package/.claude/agents/agent-documenter.md +0 -688
  221. package/.claude/agents/agent-frontend.md +0 -1199
  222. package/.claude/agents/agent-integrator.md +0 -670
  223. package/.claude/agents/agent-lawyer.md +0 -1320
  224. package/.claude/agents/agent-news.md +0 -363
  225. package/.claude/agents/agent-onboard.md +0 -613
  226. package/.claude/agents/agent-ontology.md +0 -585
  227. package/.claude/agents/agent-ops.md +0 -1275
  228. package/.claude/agents/agent-problem-solver.md +0 -669
  229. package/.claude/agents/agent-quality.md +0 -1042
  230. package/.claude/agents/agent-sales.md +0 -507
  231. package/.claude/agents/agent-writer.md +0 -1068
  232. package/.claude/commands/cascade.md +0 -742
  233. package/.claude/commands/chat.md +0 -728
  234. package/.claude/commands/commit.md +0 -95
  235. package/.claude/commands/create.md +0 -544
  236. package/.claude/commands/deploy.md +0 -309
  237. package/.claude/commands/fast.md +0 -636
  238. package/.claude/commands/mcp-on.md +0 -191
  239. package/.claude/commands/media-upload.md +0 -186
  240. package/.claude/commands/news.md +0 -274
  241. package/.claude/commands/onboard.md +0 -440
  242. package/.claude/commands/one.md +0 -398
  243. package/.claude/commands/optimize.md +0 -74
  244. package/.claude/commands/plan.md +0 -719
  245. package/.claude/commands/push.md +0 -214
  246. package/.claude/commands/release.md +0 -105
  247. package/.claude/commands/review.md +0 -99
  248. package/.claude/commands/server.md +0 -487
  249. package/.claude/commands/start.md +0 -227
  250. package/.claude/commands/test.md +0 -197
  251. package/.claude/commands/validate.md +0 -140
  252. package/.claude/hooks/.last-news-context +0 -1
  253. package/.claude/hooks/PULL-BEFORE-PUSH-GUIDE.md +0 -473
  254. package/.claude/hooks/README-knowledge-hooks.md +0 -451
  255. package/.claude/hooks/README-news-generation.md +0 -364
  256. package/.claude/hooks/README-root-cleanup.md +0 -200
  257. package/.claude/hooks/README.md +0 -284
  258. package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
  259. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  260. package/.claude/hooks/auto-format.sh +0 -106
  261. package/.claude/hooks/check-filenames.py +0 -177
  262. package/.claude/hooks/clean-post.py +0 -468
  263. package/.claude/hooks/clean-pre.py +0 -393
  264. package/.claude/hooks/clean-root-markdown.sh +0 -73
  265. package/.claude/hooks/commit-push.sh +0 -95
  266. package/.claude/hooks/done.py +0 -236
  267. package/.claude/hooks/format-hook.sh +0 -163
  268. package/.claude/hooks/formatting.py +0 -187
  269. package/.claude/hooks/hook-logger.sh +0 -173
  270. package/.claude/hooks/knowledge-post.py +0 -355
  271. package/.claude/hooks/knowledge-pre.py +0 -245
  272. package/.claude/hooks/mcp-on.sh +0 -134
  273. package/.claude/hooks/notification-hook.sh +0 -279
  274. package/.claude/hooks/ontology-validation.py +0 -255
  275. package/.claude/hooks/push.sh +0 -153
  276. package/.claude/hooks/release-cli.sh +0 -205
  277. package/.claude/hooks/root-cleanup.py +0 -217
  278. package/.claude/hooks/security-hook.sh +0 -397
  279. package/.claude/hooks/tag-all-docs.py +0 -464
  280. package/.claude/hooks/test-validate-ontology.sh +0 -170
  281. package/.claude/hooks/todo.py +0 -368
  282. package/.claude/hooks/track-changes.sh +0 -101
  283. package/.claude/hooks/validate-imports.py +0 -182
  284. package/.claude/hooks/validate-ontology-structure-summary.md +0 -243
  285. package/.claude/hooks/validate-ontology-structure.py +0 -558
  286. package/.claude/hooks/validate-ontology-structure.py.backup +0 -518
  287. package/.claude/hooks/validate-ontology.py +0 -140
  288. package/.claude/hooks/write-news.sh +0 -194
  289. package/.claude/skills/INDEX.md +0 -523
  290. package/.claude/skills/REGISTRY.md +0 -529
  291. package/.claude/skills/agent-backend-create-mutation.md +0 -319
  292. package/.claude/skills/agent-designer-create-wireframe.md +0 -341
  293. package/.claude/skills/agent-frontend-create-page.md +0 -413
  294. package/.claude/skills/agents/README.md +0 -238
  295. package/.claude/skills/astro/add-content-collection.md +0 -30
  296. package/.claude/skills/astro/check-build.md +0 -29
  297. package/.claude/skills/astro/create-component.md +0 -29
  298. package/.claude/skills/astro/create-page.md +0 -30
  299. package/.claude/skills/astro/optimize-performance.md +0 -21
  300. package/.claude/skills/convex/check-deployment.md +0 -46
  301. package/.claude/skills/convex/create-mutation.md +0 -405
  302. package/.claude/skills/convex/create-query.md +0 -52
  303. package/.claude/skills/convex/read-schema.md +0 -373
  304. package/.claude/skills/convex/test-function.md +0 -50
  305. package/.claude/skills/deployment/check-deployment-health.md +0 -20
  306. package/.claude/skills/deployment/create-release.md +0 -21
  307. package/.claude/skills/deployment/deploy-cloudflare.md +0 -31
  308. package/.claude/skills/deployment/deploy-convex.md +0 -30
  309. package/.claude/skills/deployment/sync-repositories.md +0 -19
  310. package/.claude/skills/design/check-accessibility.md +0 -21
  311. package/.claude/skills/design/create-component-spec.md +0 -27
  312. package/.claude/skills/design/generate-design-tokens.md +0 -24
  313. package/.claude/skills/design/generate-wireframe.md +0 -30
  314. package/.claude/skills/documentation/create-migration-guide.md +0 -20
  315. package/.claude/skills/documentation/generate-api-docs.md +0 -27
  316. package/.claude/skills/documentation/generate-readme.md +0 -22
  317. package/.claude/skills/documentation/update-knowledge.md +0 -20
  318. package/.claude/skills/integration/connect-external-system.md +0 -21
  319. package/.claude/skills/integration/implement-a2a.md +0 -20
  320. package/.claude/skills/integration/implement-acp.md +0 -20
  321. package/.claude/skills/integration/verify-integration.md +0 -20
  322. package/.claude/skills/ontology/README.md +0 -255
  323. package/.claude/skills/ontology/check-dimension.md +0 -307
  324. package/.claude/skills/ontology/generate-entity-type.md +0 -339
  325. package/.claude/skills/ontology/validate-schema.md +0 -229
  326. package/.claude/skills/ontology/verify-relationships.md +0 -310
  327. package/.claude/skills/problem-solving/analyze-test-failure.md +0 -21
  328. package/.claude/skills/problem-solving/identify-root-cause.md +0 -20
  329. package/.claude/skills/problem-solving/propose-solution.md +0 -29
  330. package/.claude/skills/problem-solving/verify-fix.md +0 -21
  331. package/.claude/skills/sales/generate-demo-script.md +0 -21
  332. package/.claude/skills/sales/qualify-lead.md +0 -30
  333. package/.claude/skills/sales/track-trial.md +0 -20
  334. package/.claude/skills/sales/verify-kyc.md +0 -20
  335. package/.claude/skills/testing/analyze-coverage.md +0 -24
  336. package/.claude/skills/testing/generate-tests.md +0 -24
  337. package/.claude/skills/testing/run-tests.md +0 -27
  338. package/.claude/skills/testing/validate-e2e.md +0 -25
  339. package/AGENTS.md +0 -60
  340. package/CLAUDE.md +0 -321
  341. package/CREATE-WEBSITE.md +0 -458
  342. package/SECURITY.md +0 -31
  343. package/dist/commands/create-website.d.ts +0 -19
  344. package/dist/commands/create-website.d.ts.map +0 -1
  345. package/dist/commands/create-website.js +0 -231
  346. package/dist/commands/create-website.js.map +0 -1
  347. package/folders.yaml +0 -92
  348. package/one/README.md +0 -760
  349. package/one/connections/a2a.md +0 -600
  350. package/one/connections/acp.md +0 -808
  351. package/one/connections/acps.md +0 -749
  352. package/one/connections/agentkit.md +0 -367
  353. package/one/connections/agui.md +0 -785
  354. package/one/connections/any-backend.md +0 -1720
  355. package/one/connections/ap2.md +0 -1072
  356. package/one/connections/api/queries-reference.md +0 -860
  357. package/one/connections/api-docs.md +0 -1909
  358. package/one/connections/api-reference.md +0 -1029
  359. package/one/connections/api.md +0 -2208
  360. package/one/connections/architecture-diagram.md +0 -112
  361. package/one/connections/communications.md +0 -467
  362. package/one/connections/connections.md +0 -357
  363. package/one/connections/copilotkit.md +0 -1577
  364. package/one/connections/cryptonetworks.md +0 -799
  365. package/one/connections/documentation.md +0 -1138
  366. package/one/connections/effect.md +0 -297
  367. package/one/connections/elizaos.md +0 -1308
  368. package/one/connections/groups.md +0 -814
  369. package/one/connections/inference.md +0 -76
  370. package/one/connections/integration-examples.md +0 -893
  371. package/one/connections/integration-guide.md +0 -887
  372. package/one/connections/integration-phase2.md +0 -754
  373. package/one/connections/kyc.md +0 -650
  374. package/one/connections/mcp.md +0 -860
  375. package/one/connections/membership.md +0 -1170
  376. package/one/connections/middleware.md +0 -1085
  377. package/one/connections/multitenant.md +0 -1359
  378. package/one/connections/n8n.md +0 -1033
  379. package/one/connections/patterns.md +0 -107
  380. package/one/connections/protocols.md +0 -297
  381. package/one/connections/relationships.md +0 -125
  382. package/one/connections/schema.md +0 -605
  383. package/one/connections/service-layer.md +0 -568
  384. package/one/connections/vectors.md +0 -225
  385. package/one/connections/wordpress.md +0 -1320
  386. package/one/connections/workflow-copy.md +0 -923
  387. package/one/connections/workflow-examples.md +0 -759
  388. package/one/connections/workflow-onboarding.md +0 -701
  389. package/one/connections/workflow.md +0 -923
  390. package/one/connections/workflows/delegation.md +0 -903
  391. package/one/connections/workflows/frontend.md +0 -1055
  392. package/one/connections/workflows/strategy.md +0 -921
  393. package/one/connections/workflows/tasks.md +0 -716
  394. package/one/connections/x402-baazar.md +0 -131
  395. package/one/connections/x402.md +0 -1353
  396. package/one/groups/features.md +0 -2904
  397. package/one/groups/groups.md +0 -587
  398. package/one/groups/one.md +0 -619
  399. package/one/groups/strategy-copy.md +0 -887
  400. package/one/knowledge/.obsidian/app.json +0 -1
  401. package/one/knowledge/.obsidian/appearance.json +0 -1
  402. package/one/knowledge/.obsidian/core-plugins.json +0 -33
  403. package/one/knowledge/.obsidian/ecommerce-ontology.md +0 -210
  404. package/one/knowledge/.obsidian/workspace.json +0 -211
  405. package/one/knowledge/100-inference-quick-reference.md +0 -449
  406. package/one/knowledge/ag-ui-protocol.md +0 -613
  407. package/one/knowledge/agent-onboard-usage.md +0 -630
  408. package/one/knowledge/agentic-commerce.md +0 -146
  409. package/one/knowledge/ai-agents-vs-memecoins-thesis.md +0 -683
  410. package/one/knowledge/ai-api-reference.md +0 -715
  411. package/one/knowledge/ai-platform.md +0 -323
  412. package/one/knowledge/ai-quickstart.md +0 -355
  413. package/one/knowledge/ai-sdk-implementation.md +0 -436
  414. package/one/knowledge/ai-token-crypto-analysis-framework.md +0 -1191
  415. package/one/knowledge/ai-token-paradigm-shift-2025.md +0 -732
  416. package/one/knowledge/altcoin-cycle-prediction-ontology.md +0 -884
  417. package/one/knowledge/altcoin-cycle-trading-strategy.md +0 -642
  418. package/one/knowledge/architecture-any-backend.md +0 -1589
  419. package/one/knowledge/architecture-diagram.md +0 -404
  420. package/one/knowledge/architecture-frontend.md +0 -1014
  421. package/one/knowledge/architecture.md +0 -1742
  422. package/one/knowledge/archived/ontology.old.md +0 -2840
  423. package/one/knowledge/astro-effect-complete-vision.md +0 -2148
  424. package/one/knowledge/astro-effect-simple-architecture.md +0 -750
  425. package/one/knowledge/audit-agent-onboard-alignment.md +0 -481
  426. package/one/knowledge/audit-agent-sales-alignment.md +0 -444
  427. package/one/knowledge/backend-api-reference.md +0 -728
  428. package/one/knowledge/cascading-context-specification.md +0 -1617
  429. package/one/knowledge/claude-code-integration.md +0 -1293
  430. package/one/knowledge/cli-claude-handoff.md +0 -736
  431. package/one/knowledge/context-engineering.md +0 -610
  432. package/one/knowledge/crypto-analysis-strategy.md +0 -1276
  433. package/one/knowledge/crypto-cycle-2024-2025-analysis.md +0 -44
  434. package/one/knowledge/crypto.md +0 -978
  435. package/one/knowledge/develop/design.md +0 -364
  436. package/one/knowledge/develop/index.md +0 -145
  437. package/one/knowledge/development-commands.md +0 -251
  438. package/one/knowledge/docs.md +0 -627
  439. package/one/knowledge/dsl.md +0 -1678
  440. package/one/knowledge/event-driven-documentation.md +0 -270
  441. package/one/knowledge/files.md +0 -2489
  442. package/one/knowledge/frontend.md +0 -1056
  443. package/one/knowledge/games-english.md +0 -691
  444. package/one/knowledge/games.md +0 -1082
  445. package/one/knowledge/generative-ui-patterns.md +0 -559
  446. package/one/knowledge/guidelines.md +0 -314
  447. package/one/knowledge/hono.md +0 -2127
  448. package/one/knowledge/implementation-examples.md +0 -2554
  449. package/one/knowledge/installation-folders.md +0 -366
  450. package/one/knowledge/institutional-cycle-paradigm-2025.md +0 -555
  451. package/one/knowledge/knowledge.md +0 -660
  452. package/one/knowledge/language.md +0 -998
  453. package/one/knowledge/lessons-learned.md +0 -378
  454. package/one/knowledge/lessons-website-building-focus.md +0 -382
  455. package/one/knowledge/merge-report.md +0 -254
  456. package/one/knowledge/metadata-system.md +0 -504
  457. package/one/knowledge/nine-padel-playbook.md +0 -229
  458. package/one/knowledge/one-protocol-ai-agents.md +0 -892
  459. package/one/knowledge/one-protocol-executive-report.md +0 -617
  460. package/one/knowledge/one-protocol-standard.md +0 -869
  461. package/one/knowledge/one-protocol-whitepaper.md +0 -756
  462. package/one/knowledge/ontology-blog.yaml +0 -47
  463. package/one/knowledge/ontology-cheatsheet.md +0 -617
  464. package/one/knowledge/ontology-community.yaml +0 -65
  465. package/one/knowledge/ontology-core-universal.md +0 -740
  466. package/one/knowledge/ontology-core.yaml +0 -63
  467. package/one/knowledge/ontology-courses.yaml +0 -76
  468. package/one/knowledge/ontology-creator.md +0 -402
  469. package/one/knowledge/ontology-crypto.md +0 -1603
  470. package/one/knowledge/ontology-developer-guide.md +0 -814
  471. package/one/knowledge/ontology-documentation.md +0 -377
  472. package/one/knowledge/ontology-ecommerce.md +0 -269
  473. package/one/knowledge/ontology-education-game.md +0 -1654
  474. package/one/knowledge/ontology-education.md +0 -938
  475. package/one/knowledge/ontology-engineering-specification.md +0 -1310
  476. package/one/knowledge/ontology-engineering.md +0 -1676
  477. package/one/knowledge/ontology-files.yaml +0 -525
  478. package/one/knowledge/ontology-frontend-master.md +0 -2898
  479. package/one/knowledge/ontology-frontend-specifications.md +0 -2196
  480. package/one/knowledge/ontology-frontend.md +0 -2475
  481. package/one/knowledge/ontology-index.md +0 -397
  482. package/one/knowledge/ontology-minimal.yaml +0 -301
  483. package/one/knowledge/ontology-portfolio.yaml +0 -45
  484. package/one/knowledge/ontology-quickstart.md +0 -602
  485. package/one/knowledge/ontology-release.md +0 -317
  486. package/one/knowledge/ontology-shop.yaml +0 -148
  487. package/one/knowledge/ontology-tokens.yaml +0 -51
  488. package/one/knowledge/ontology-tutorial.md +0 -455
  489. package/one/knowledge/ontology-v2.md +0 -4449
  490. package/one/knowledge/ontology-video-script.md +0 -939
  491. package/one/knowledge/ontology-visual-guide.md +0 -378
  492. package/one/knowledge/ontology.md +0 -3847
  493. package/one/knowledge/ontology.yaml +0 -1653
  494. package/one/knowledge/parallel-agents.md +0 -932
  495. package/one/knowledge/patterns/backend/convex-mutation-pattern.md +0 -130
  496. package/one/knowledge/patterns/backend/convex-query-pattern.md +0 -143
  497. package/one/knowledge/patterns/backend/mutation-template.md +0 -249
  498. package/one/knowledge/patterns/backend/query-template.md +0 -286
  499. package/one/knowledge/patterns/backend/service-template.md +0 -258
  500. package/one/knowledge/patterns/design/component-architecture.md +0 -435
  501. package/one/knowledge/patterns/design/index.md +0 -160
  502. package/one/knowledge/patterns/design/test-driven-design-pattern.md +0 -196
  503. package/one/knowledge/patterns/design/wireframe-template.md +0 -250
  504. package/one/knowledge/patterns/frontend/component-template.md +0 -246
  505. package/one/knowledge/patterns/frontend/form-template.md +0 -348
  506. package/one/knowledge/patterns/frontend/page-template.md +0 -209
  507. package/one/knowledge/patterns/frontend/react-component-pattern.md +0 -188
  508. package/one/knowledge/patterns/test/acceptance-criteria-template.md +0 -396
  509. package/one/knowledge/patterns/test/technical-test-template.md +0 -566
  510. package/one/knowledge/patterns/test/test-driven-pattern.md +0 -160
  511. package/one/knowledge/patterns/test/user-flow-template.md +0 -272
  512. package/one/knowledge/performance.md +0 -459
  513. package/one/knowledge/provider-agnostic-content.md +0 -995
  514. package/one/knowledge/provider-creation-guide.md +0 -1082
  515. package/one/knowledge/quality-loop.md +0 -419
  516. package/one/knowledge/quick-start-ontology-mapping.md +0 -773
  517. package/one/knowledge/readme-architecture.md +0 -158
  518. package/one/knowledge/readme.md +0 -149
  519. package/one/knowledge/rules.md +0 -644
  520. package/one/knowledge/score.md +0 -85
  521. package/one/knowledge/specifications.md +0 -873
  522. package/one/knowledge/tags.md +0 -148
  523. package/one/knowledge/todo-template.md +0 -269
  524. package/one/knowledge/todo.md +0 -269
  525. package/one/knowledge/troubleshooting.md +0 -434
  526. package/one/knowledge/typescript-patterns.md +0 -321
  527. package/one/knowledge/universal-generation-language.md +0 -827
  528. package/one/knowledge/x402-research.md +0 -104
  529. package/one/license.md +0 -107
  530. package/one/people/anthony-o-connell.md +0 -469
  531. package/one/people/people.md +0 -590
  532. package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +0 -401
  533. package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +0 -588
  534. package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +0 -461
  535. package/one/things/CHECKLIST.md +0 -407
  536. package/one/things/IMPLEMENTATION_STATUS.md +0 -379
  537. package/one/things/ONE.md +0 -529
  538. package/one/things/agents/agent-backend.md +0 -1501
  539. package/one/things/agents/agent-builder.md +0 -1064
  540. package/one/things/agents/agent-clean.md +0 -1112
  541. package/one/things/agents/agent-clone.md +0 -1324
  542. package/one/things/agents/agent-deploy.md +0 -986
  543. package/one/things/agents/agent-designer.md +0 -2305
  544. package/one/things/agents/agent-director.md +0 -1526
  545. package/one/things/agents/agent-documenter.md +0 -1129
  546. package/one/things/agents/agent-frontend.md +0 -1201
  547. package/one/things/agents/agent-integrator.md +0 -1269
  548. package/one/things/agents/agent-lawyer.md +0 -1371
  549. package/one/things/agents/agent-problem-solver.md +0 -1457
  550. package/one/things/agents/agent-quality.md +0 -1483
  551. package/one/things/agents/agent-sales.md +0 -1074
  552. package/one/things/cascade/cascade.yaml +0 -481
  553. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +0 -523
  554. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +0 -314
  555. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +0 -562
  556. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +0 -543
  557. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +0 -272
  558. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +0 -548
  559. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +0 -586
  560. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +0 -267
  561. package/one/things/cascade/docs/examples/1-3-event-coordination.md +0 -547
  562. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +0 -665
  563. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +0 -236
  564. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +0 -652
  565. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +0 -860
  566. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +0 -255
  567. package/one/things/cascade/docs/examples/1-5-quality-loops.md +0 -725
  568. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +0 -659
  569. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +0 -256
  570. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +0 -639
  571. package/one/things/cascade/docs/examples/readme.md +0 -259
  572. package/one/things/cascade/docs/getting-started.md +0 -533
  573. package/one/things/cascade/docs/workflow.md +0 -1378
  574. package/one/things/cascade/readme.md +0 -379
  575. package/one/things/cascade/templates/feature-template.md +0 -289
  576. package/one/things/claude/agents/advocacy-activation-manager.md +0 -710
  577. package/one/things/claude/agents/advocacy-campaign-designer.md +0 -688
  578. package/one/things/claude/agents/analyst.md +0 -508
  579. package/one/things/claude/agents/architect.md +0 -505
  580. package/one/things/claude/agents/brand-identity-specialist.md +0 -538
  581. package/one/things/claude/agents/bstp-token-strategist.md +0 -690
  582. package/one/things/claude/agents/builder-repo.md +0 -532
  583. package/one/things/claude/agents/bullstamp-community-builder.md +0 -597
  584. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +0 -529
  585. package/one/things/claude/agents/bulltilt-platform-growth.md +0 -590
  586. package/one/things/claude/agents/company-bullstamp-character.md +0 -602
  587. package/one/things/claude/agents/company-bullstamp-community.md +0 -307
  588. package/one/things/claude/agents/company-bullstamp-marketing.md +0 -307
  589. package/one/things/claude/agents/company-bullstamp-token.md +0 -307
  590. package/one/things/claude/agents/company-bulltilt-growth.md +0 -307
  591. package/one/things/claude/agents/content-bibliography-formatter.md +0 -404
  592. package/one/things/claude/agents/content-calendar-planner.md +0 -473
  593. package/one/things/claude/agents/content-chapter-formatter.md +0 -513
  594. package/one/things/claude/agents/content-formatter.md +0 -571
  595. package/one/things/claude/agents/content-hook-specialist.md +0 -485
  596. package/one/things/claude/agents/content-image-formatter.md +0 -560
  597. package/one/things/claude/agents/content-introduction-formatter.md +0 -510
  598. package/one/things/claude/agents/content-multiplication-engine.md +0 -579
  599. package/one/things/claude/agents/content-playbook-writer.md +0 -473
  600. package/one/things/claude/agents/content-team-manager.md +0 -647
  601. package/one/things/claude/agents/content-toc-formatter.md +0 -547
  602. package/one/things/claude/agents/convex-backend-specialist.md +0 -2725
  603. package/one/things/claude/agents/core-manager.md +0 -607
  604. package/one/things/claude/agents/core-master.md +0 -426
  605. package/one/things/claude/agents/cross-functional-manager.md +0 -476
  606. package/one/things/claude/agents/crypto-airdrop-strategist.md +0 -622
  607. package/one/things/claude/agents/crypto-analytics-educator.md +0 -596
  608. package/one/things/claude/agents/crypto-architecture-specialist.md +0 -497
  609. package/one/things/claude/agents/crypto-community-analyst.md +0 -314
  610. package/one/things/claude/agents/crypto-community-psychologist.md +0 -546
  611. package/one/things/claude/agents/crypto-dex-optimization-expert.md +0 -579
  612. package/one/things/claude/agents/crypto-dex-optimizer.md +0 -307
  613. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +0 -552
  614. package/one/things/claude/agents/crypto-diamond-hands.md +0 -307
  615. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +0 -597
  616. package/one/things/claude/agents/crypto-engagement-specialist.md +0 -581
  617. package/one/things/claude/agents/crypto-market-researcher.md +0 -307
  618. package/one/things/claude/agents/crypto-marketing-orchestrator.md +0 -563
  619. package/one/things/claude/agents/crypto-network-effect-amplifier.md +0 -614
  620. package/one/things/claude/agents/crypto-optimization-analyst.md +0 -597
  621. package/one/things/claude/agents/crypto-strategic-synthesizer.md +0 -556
  622. package/one/things/claude/agents/crypto-team-manager.md +0 -392
  623. package/one/things/claude/agents/crypto-token-analyst.md +0 -319
  624. package/one/things/claude/agents/crypto-viral-content-creator.md +0 -549
  625. package/one/things/claude/agents/crypto-wallet-identification-expert.md +0 -527
  626. package/one/things/claude/agents/crypto-wallet-identifier.md +0 -307
  627. package/one/things/claude/agents/customer-journey-designer.md +0 -474
  628. package/one/things/claude/agents/customer-success-manager.md +0 -574
  629. package/one/things/claude/agents/dev.md +0 -406
  630. package/one/things/claude/agents/documenter.md +0 -548
  631. package/one/things/claude/agents/elevate-marketing-orchestrator.md +0 -403
  632. package/one/things/claude/agents/engagement-specialist.md +0 -502
  633. package/one/things/claude/agents/engineering-architect.md +0 -387
  634. package/one/things/claude/agents/engineering-business-analyst.md +0 -527
  635. package/one/things/claude/agents/engineering-developer.md +0 -386
  636. package/one/things/claude/agents/engineering-director.md +0 -322
  637. package/one/things/claude/agents/engineering-ingestor.md +0 -659
  638. package/one/things/claude/agents/engineering-product-manager.md +0 -525
  639. package/one/things/claude/agents/engineering-product-owner.md +0 -527
  640. package/one/things/claude/agents/engineering-project-coordinator.md +0 -525
  641. package/one/things/claude/agents/engineering-quality-assurance.md +0 -392
  642. package/one/things/claude/agents/engineering-team-manager.md +0 -515
  643. package/one/things/claude/agents/engineering-user-experience.md +0 -386
  644. package/one/things/claude/agents/framework-elevate-manager.md +0 -309
  645. package/one/things/claude/agents/improver.md +0 -805
  646. package/one/things/claude/agents/intelligence-team-manager.md +0 -390
  647. package/one/things/claude/agents/lead-capture-expert.md +0 -459
  648. package/one/things/claude/agents/lead-magnet-creator.md +0 -446
  649. package/one/things/claude/agents/market-research-analyst.md +0 -435
  650. package/one/things/claude/agents/marketing-brand-identity.md +0 -344
  651. package/one/things/claude/agents/marketing-content-hooks.md +0 -455
  652. package/one/things/claude/agents/marketing-content-multiplier.md +0 -331
  653. package/one/things/claude/agents/marketing-content-poster.md +0 -372
  654. package/one/things/claude/agents/marketing-customer-journey.md +0 -331
  655. package/one/things/claude/agents/marketing-director.md +0 -402
  656. package/one/things/claude/agents/marketing-engagement.md +0 -331
  657. package/one/things/claude/agents/marketing-lead-capture.md +0 -331
  658. package/one/things/claude/agents/marketing-lead-magnet.md +0 -331
  659. package/one/things/claude/agents/marketing-network-effects.md +0 -331
  660. package/one/things/claude/agents/marketing-nurture-campaigns.md +0 -331
  661. package/one/things/claude/agents/marketing-share-optimizer.md +0 -331
  662. package/one/things/claude/agents/marketing-team-manager.md +0 -451
  663. package/one/things/claude/agents/marketing-viral-growth.md +0 -232
  664. package/one/things/claude/agents/mission-commander.md +0 -378
  665. package/one/things/claude/agents/network-effect-analyst.md +0 -604
  666. package/one/things/claude/agents/nextjs-15-specialist.md +0 -1634
  667. package/one/things/claude/agents/npx.md +0 -946
  668. package/one/things/claude/agents/nurture-campaign-manager.md +0 -554
  669. package/one/things/claude/agents/one-master.md +0 -378
  670. package/one/things/claude/agents/one-orchestrator.md +0 -345
  671. package/one/things/claude/agents/one.md +0 -658
  672. package/one/things/claude/agents/playbook-generator.md +0 -526
  673. package/one/things/claude/agents/pm.md +0 -349
  674. package/one/things/claude/agents/po.md +0 -370
  675. package/one/things/claude/agents/qa.md +0 -361
  676. package/one/things/claude/agents/research-foundation-analyst.md +0 -324
  677. package/one/things/claude/agents/research-intelligence-gatherer.md +0 -435
  678. package/one/things/claude/agents/research-market-analyst.md +0 -324
  679. package/one/things/claude/agents/research-team-manager.md +0 -489
  680. package/one/things/claude/agents/sales-environment-optimizer.md +0 -519
  681. package/one/things/claude/agents/sales-team-manager.md +0 -407
  682. package/one/things/claude/agents/sales-upsell-strategist.md +0 -324
  683. package/one/things/claude/agents/service-advocacy-campaigns.md +0 -324
  684. package/one/things/claude/agents/service-advocacy-manager.md +0 -324
  685. package/one/things/claude/agents/service-success-manager.md +0 -324
  686. package/one/things/claude/agents/service-team-manager.md +0 -405
  687. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +0 -2357
  688. package/one/things/claude/agents/share-optimization-specialist.md +0 -576
  689. package/one/things/claude/agents/sm.md +0 -352
  690. package/one/things/claude/agents/story-teller.md +0 -498
  691. package/one/things/claude/agents/task-master.md +0 -621
  692. package/one/things/claude/agents/tauri-cross-platform-specialist.md +0 -1912
  693. package/one/things/claude/agents/tester.md +0 -595
  694. package/one/things/claude/agents/the-bull-character-manager.md +0 -603
  695. package/one/things/claude/agents/tools-playbook-generator.md +0 -492
  696. package/one/things/claude/agents/turbo-repo-builder.md +0 -346
  697. package/one/things/claude/agents/upsell-strategist.md +0 -503
  698. package/one/things/claude/agents/ux-expert.md +0 -360
  699. package/one/things/claude/agents/viral-growth-orchestrator.md +0 -520
  700. package/one/things/claude/claude-code-hooks-development.json +0 -21
  701. package/one/things/claude/claude-code-hooks-production.json +0 -21
  702. package/one/things/claude/claude-code-hooks.json +0 -25
  703. package/one/things/claude/commands/agent.md +0 -124
  704. package/one/things/claude/commands/cascade-status.md +0 -153
  705. package/one/things/claude/commands/ingest.md +0 -343
  706. package/one/things/claude/commands/ingestor.md +0 -158
  707. package/one/things/claude/commands/mission.md +0 -103
  708. package/one/things/claude/commands/npx.md +0 -156
  709. package/one/things/claude/commands/one.md +0 -486
  710. package/one/things/claude/commands/quality-check.md +0 -252
  711. package/one/things/claude/commands/smart-route.md +0 -261
  712. package/one/things/claude/commands/start.md +0 -139
  713. package/one/things/claude/commands/story.md +0 -103
  714. package/one/things/claude/commands/task.md +0 -193
  715. package/one/things/claude/hook-bypass.json +0 -32
  716. package/one/things/claude/hooks/agent-hook-config.json +0 -427
  717. package/one/things/claude/hooks/build-hook.sh +0 -156
  718. package/one/things/claude/hooks/cleanup-hook.sh +0 -201
  719. package/one/things/claude/hooks/file-organization-hook.sh +0 -80
  720. package/one/things/claude/hooks/format-hook.sh +0 -43
  721. package/one/things/claude/hooks/hook-bypass.sh +0 -293
  722. package/one/things/claude/hooks/hook-debouncer.sh +0 -62
  723. package/one/things/claude/hooks/hook-logger.sh +0 -89
  724. package/one/things/claude/hooks/lint-hook.sh +0 -140
  725. package/one/things/claude/hooks/notification-hook.sh +0 -204
  726. package/one/things/claude/hooks/ontology-validation-hook.sh +0 -86
  727. package/one/things/claude/hooks/performance-metrics.json +0 -25
  728. package/one/things/claude/hooks/security-hook.sh +0 -256
  729. package/one/things/claude/hooks/story-validation-hook-enhanced.sh +0 -210
  730. package/one/things/claude/hooks/story-validation-hook.sh +0 -145
  731. package/one/things/claude/hooks/test-hook.sh +0 -145
  732. package/one/things/claude/hooks/test-story-validation.sh +0 -170
  733. package/one/things/claude/settings-local.json +0 -86
  734. package/one/things/cli/cli-code.md +0 -677
  735. package/one/things/cli/cli-compiler-code.md +0 -677
  736. package/one/things/cli/cli.md +0 -871
  737. package/one/things/components/card-shadcn.md +0 -953
  738. package/one/things/components/card.md +0 -1041
  739. package/one/things/components.md +0 -1743
  740. package/one/things/componets.md +0 -19
  741. package/one/things/contracts/Move.toml +0 -12
  742. package/one/things/contracts/README.md +0 -288
  743. package/one/things/contracts/one.move +0 -762
  744. package/one/things/contracts/sdk.ts +0 -578
  745. package/one/things/creator-diagram.md +0 -184
  746. package/one/things/crypto/FEATURES.md +0 -78
  747. package/one/things/crypto/ONECORE.md +0 -62
  748. package/one/things/crypto/ONECOREFAQ.md +0 -22
  749. package/one/things/crypto/ONECOREHOW.md +0 -46
  750. package/one/things/crypto/ONEENTERPRISE.md +0 -64
  751. package/one/things/crypto/ONEENTERPRISEFAQ.md +0 -64
  752. package/one/things/crypto/ONEENTERPRISEHOW.md +0 -53
  753. package/one/things/crypto/ONEPRO.md +0 -60
  754. package/one/things/crypto/ONEPROFAQ.md +0 -22
  755. package/one/things/crypto/ONEPROHOW.md +0 -53
  756. package/one/things/crypto/READMEAGENCY.md +0 -64
  757. package/one/things/crypto/VSL.md +0 -45
  758. package/one/things/crypto/WebsiteCopy.md +0 -176
  759. package/one/things/demo-accessibility-animations.md +0 -1025
  760. package/one/things/demo-components.md +0 -1310
  761. package/one/things/demo-design-summary.md +0 -692
  762. package/one/things/demo-design-system.md +0 -973
  763. package/one/things/demo-page-layouts.md +0 -1016
  764. package/one/things/design-system.md +0 -832
  765. package/one/things/designs/accessibility-audit.md +0 -877
  766. package/one/things/designs/component-specifications.md +0 -855
  767. package/one/things/designs/design-overview.md +0 -377
  768. package/one/things/designs/design-tokens.md +0 -448
  769. package/one/things/designs/wireframes-dashboard.md +0 -710
  770. package/one/things/docs/api-requests.md +0 -987
  771. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +0 -485
  772. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +0 -465
  773. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +0 -425
  774. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +0 -451
  775. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +0 -536
  776. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +0 -650
  777. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +0 -473
  778. package/one/things/docs/ecommerce/QUICK-START.md +0 -405
  779. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +0 -567
  780. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +0 -271
  781. package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +0 -171
  782. package/one/things/docs/ecommerce/demo.astro +0 -309
  783. package/one/things/examples/children/lemonade-stand.md +0 -404
  784. package/one/things/examples/enterprise/crm-saas.md +0 -1444
  785. package/one/things/features/1-1-agent-prompts.md +0 -562
  786. package/one/things/features/1-2-yaml-orchestrator.md +0 -548
  787. package/one/things/features/1-3-event-coordination.md +0 -547
  788. package/one/things/features/1-4-knowledge-management.md +0 -652
  789. package/one/things/features/1-5-quality-loops.md +0 -725
  790. package/one/things/features/1-6-numbering-structure.md +0 -639
  791. package/one/things/features/2-1-dataprovider-interface.md +0 -2583
  792. package/one/things/features/2-2-config-system.md +0 -3242
  793. package/one/things/features/2-3-effectts-services.md +0 -1645
  794. package/one/things/features/2-4-react-hooks.md +0 -2136
  795. package/one/things/features/2-5-auth-migration.md +0 -2144
  796. package/one/things/features/2-6-dashboard-migration.md +0 -2084
  797. package/one/things/features/2-7-alternative-providers.md +0 -2578
  798. package/one/things/features/2-7-implementation-report.md +0 -724
  799. package/one/things/features/2-cli.md +0 -1720
  800. package/one/things/features/2-design.md +0 -1770
  801. package/one/things/features/2-tests.md +0 -576
  802. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +0 -576
  803. package/one/things/features/DECOUPLING.md +0 -290
  804. package/one/things/features/DEPLOYMENT.md +0 -470
  805. package/one/things/features/IMPLEMENTATION_SUMMARY.md +0 -362
  806. package/one/things/features/improve.md +0 -861
  807. package/one/things/features/remove-convex-deps.md +0 -63
  808. package/one/things/features/top-features.md +0 -87
  809. package/one/things/features/use-one-backend.md +0 -1217
  810. package/one/things/features-in-english.md +0 -200
  811. package/one/things/files.yaml +0 -721
  812. package/one/things/ideas/1-create-workflow.md +0 -207
  813. package/one/things/ideas/2-backend-agnostic-frontend.md +0 -439
  814. package/one/things/implementation/backend-guide.md +0 -457
  815. package/one/things/interface.md +0 -257
  816. package/one/things/landing-page-implementation.md +0 -455
  817. package/one/things/legal/README.md +0 -234
  818. package/one/things/legal/privacy-policy.md +0 -1227
  819. package/one/things/legal/terms-of-service.md +0 -1432
  820. package/one/things/master-workflow-plan.md +0 -806
  821. package/one/things/pay.one.ie.md +0 -53
  822. package/one/things/plans/0-in-sync.md +0 -136
  823. package/one/things/plans/0-timeline.md +0 -36
  824. package/one/things/plans/1-create-workflow.md +0 -732
  825. package/one/things/plans/QUICK-START-SIMPLIFICATION.md +0 -333
  826. package/one/things/plans/README-SIMPLIFICATION.md +0 -349
  827. package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +0 -16
  828. package/one/things/plans/SIMPLIFICATION-SUMMARY.md +0 -455
  829. package/one/things/plans/ai-elements-integration.md +0 -483
  830. package/one/things/plans/ai-elements.md +0 -1278
  831. package/one/things/plans/ai-integration-plan.md +0 -263
  832. package/one/things/plans/ai-integration.md +0 -996
  833. package/one/things/plans/ai-sdk.md +0 -798
  834. package/one/things/plans/ai-tools.md +0 -621
  835. package/one/things/plans/app.md +0 -832
  836. package/one/things/plans/architecture-summary.md +0 -312
  837. package/one/things/plans/async-ai-agents.md +0 -233
  838. package/one/things/plans/backend-agnostic-frontend.md +0 -390
  839. package/one/things/plans/backend-cleanup-quickstart.md +0 -380
  840. package/one/things/plans/backend-ontology-conformance.md +0 -475
  841. package/one/things/plans/backend-status.md +0 -599
  842. package/one/things/plans/backend-structure.md +0 -847
  843. package/one/things/plans/backend-target-structure.md +0 -482
  844. package/one/things/plans/backend.md +0 -1175
  845. package/one/things/plans/better-auth-any-backend-revised.md +0 -1103
  846. package/one/things/plans/better-auth-any-backend.md +0 -1896
  847. package/one/things/plans/better-auth-available-features.md +0 -273
  848. package/one/things/plans/big-plan.md +0 -52
  849. package/one/things/plans/cli-updates-required.md +0 -320
  850. package/one/things/plans/complete-step-by-step.md +0 -1409
  851. package/one/things/plans/components.md +0 -709
  852. package/one/things/plans/convex-agents.md +0 -1034
  853. package/one/things/plans/convex-better-auth.md +0 -1141
  854. package/one/things/plans/convex-on-off.md +0 -407
  855. package/one/things/plans/crypto-token-researcher.md +0 -629
  856. package/one/things/plans/data-quality-metrics.md +0 -745
  857. package/one/things/plans/deep-researcher-agent.md +0 -466
  858. package/one/things/plans/deploy-to-cloudflare.md +0 -623
  859. package/one/things/plans/deployment-architecture.md +0 -469
  860. package/one/things/plans/desktop.md +0 -1139
  861. package/one/things/plans/development-plan.md +0 -1283
  862. package/one/things/plans/development-workflow-tldr.md +0 -207
  863. package/one/things/plans/development-workflow.md +0 -959
  864. package/one/things/plans/dsl-claude-code.md +0 -1011
  865. package/one/things/plans/effect-components.md +0 -1743
  866. package/one/things/plans/effect-patterns-reference.md +0 -2235
  867. package/one/things/plans/effect.md +0 -1806
  868. package/one/things/plans/email.md +0 -966
  869. package/one/things/plans/enhance-auth.md +0 -1692
  870. package/one/things/plans/execution-strategy.md +0 -1291
  871. package/one/things/plans/existing-infrastructure.md +0 -712
  872. package/one/things/plans/feature-based-sites.md +0 -894
  873. package/one/things/plans/frontend-effects.md +0 -1276
  874. package/one/things/plans/group-folder-multi-tenancy.md +0 -893
  875. package/one/things/plans/improve-codebase.md +0 -1811
  876. package/one/things/plans/install-components.md +0 -215
  877. package/one/things/plans/integrate-frontend-and-backend.md +0 -603
  878. package/one/things/plans/landing.md +0 -820
  879. package/one/things/plans/layout.md +0 -249
  880. package/one/things/plans/mail-backend.md +0 -1361
  881. package/one/things/plans/mail.md +0 -2677
  882. package/one/things/plans/mcp-clear-context-prompt.md +0 -81
  883. package/one/things/plans/mcp-simple.md +0 -248
  884. package/one/things/plans/multi-ontology-architecture.md +0 -885
  885. package/one/things/plans/next-features.md +0 -114
  886. package/one/things/plans/npx-agent-safety.md +0 -785
  887. package/one/things/plans/npx-agent.md +0 -1089
  888. package/one/things/plans/onboarding.md +0 -51
  889. package/one/things/plans/one-protocol-and-payone-usage.md +0 -82
  890. package/one/things/plans/one.md +0 -677
  891. package/one/things/plans/ontology-6-dimensions.md +0 -2201
  892. package/one/things/plans/ontology-compliance-audit.md +0 -342
  893. package/one/things/plans/ontology-driven-strategy.md +0 -882
  894. package/one/things/plans/ontology-refine.md +0 -586
  895. package/one/things/plans/ontology-ui-approach.md +0 -375
  896. package/one/things/plans/open-agent.md +0 -840
  897. package/one/things/plans/performace.md +0 -122
  898. package/one/things/plans/phase-1-foundation.md +0 -620
  899. package/one/things/plans/phase-3-implementation.md +0 -1037
  900. package/one/things/plans/plan-connect-to-api.md +0 -146
  901. package/one/things/plans/quick-wins.md +0 -1428
  902. package/one/things/plans/r2.md +0 -777
  903. package/one/things/plans/readme-backend-cleanup.md +0 -402
  904. package/one/things/plans/release.md +0 -507
  905. package/one/things/plans/remove-backend-development-from-agents.md +0 -1331
  906. package/one/things/plans/repos.md +0 -98
  907. package/one/things/plans/separate-copy-2.md +0 -1349
  908. package/one/things/plans/separate-copy-3.md +0 -2479
  909. package/one/things/plans/separate-copy.md +0 -1349
  910. package/one/things/plans/separate-demo.md +0 -864
  911. package/one/things/plans/separate.md +0 -1999
  912. package/one/things/plans/sequence.md +0 -2040
  913. package/one/things/plans/shadcn-integration-summary.md +0 -510
  914. package/one/things/plans/sidebar.md +0 -206
  915. package/one/things/plans/skills.md +0 -709
  916. package/one/things/plans/small-fixes.md +0 -23
  917. package/one/things/plans/start-new.md +0 -764
  918. package/one/things/plans/switch-off-auth.md +0 -42
  919. package/one/things/plans/sync-checklist.md +0 -351
  920. package/one/things/plans/test-backend-connection.md +0 -514
  921. package/one/things/plans/unified-implementation-plan.md +0 -934
  922. package/one/things/plans/update-demos.md +0 -581
  923. package/one/things/plans/use-our-backend.md +0 -572
  924. package/one/things/plans/video-backend.md +0 -638
  925. package/one/things/plans/video-frontend.md +0 -490
  926. package/one/things/plans/video-old-archived.md +0 -656
  927. package/one/things/plans/wave1-onboarding-100-inferences.md +0 -1686
  928. package/one/things/plans/wave1-onboarding-vision.md +0 -744
  929. package/one/things/plans/wave1-orchestration-summary.md +0 -604
  930. package/one/things/plans/wave1-specialist-assignments.md +0 -1413
  931. package/one/things/plans/workflow-files.md +0 -1210
  932. package/one/things/plans/workflow.md +0 -1378
  933. package/one/things/plans-u.md +0 -905
  934. package/one/things/products/Blockchain Products.md +0 -6278
  935. package/one/things/products/cascade-landing-page.md +0 -841
  936. package/one/things/products/cascade.md +0 -1568
  937. package/one/things/products/context-engineering.md +0 -1488
  938. package/one/things/products/onthology.md +0 -15
  939. package/one/things/products/ontology-ui-shadcn.md +0 -1302
  940. package/one/things/products/ontology-ui.md +0 -1429
  941. package/one/things/products/ontology.md +0 -789
  942. package/one/things/products/sdk.md +0 -573
  943. package/one/things/promptkit.md +0 -930
  944. package/one/things/repos/all-repos.md +0 -0
  945. package/one/things/scripts-clean-mac.sh +0 -409
  946. package/one/things/service-providers-new.md +0 -1052
  947. package/one/things/service-providers.md +0 -1121
  948. package/one/things/structure.md +0 -532
  949. package/one/things/system.md +0 -618
  950. package/one/things/templates.md +0 -294
  951. package/one/things/tests/2-1-dataprovider-interface.md +0 -1216
  952. package/one/things/tests/2-1-test-analysis.md +0 -544
  953. package/one/things/things.md +0 -384
  954. package/one/things/todo-acp-integration.md +0 -744
  955. package/one/things/todo-ai.md +0 -933
  956. package/one/things/todo-api.md +0 -1078
  957. package/one/things/todo-assignment.md +0 -580
  958. package/one/things/todo-buy-chatgpt.md +0 -1450
  959. package/one/things/todo-components.md +0 -1683
  960. package/one/things/todo-connections.md +0 -278
  961. package/one/things/todo-ecommerce-frontend.md +0 -1313
  962. package/one/things/todo-ecommerce.md +0 -569
  963. package/one/things/todo-effects.md +0 -1075
  964. package/one/things/todo-frontend-effects.md +0 -977
  965. package/one/things/todo-landing-page.md +0 -1091
  966. package/one/things/todo-mail.md +0 -1160
  967. package/one/things/todo-master-plan.md +0 -490
  968. package/one/things/todo-onboard.md +0 -666
  969. package/one/things/todo-one-ie.md +0 -538
  970. package/one/things/todo-page.md +0 -606
  971. package/one/things/todo-plans.md +0 -282
  972. package/one/things/todo-projects.md +0 -241
  973. package/one/things/todo-refactoring-plan.md +0 -366
  974. package/one/things/todo-release.md +0 -654
  975. package/one/things/todo-sequence.md +0 -1621
  976. package/one/things/todo-use-our-backend.md +0 -1908
  977. package/one/things/todo-workflow.md +0 -626
  978. package/one/things/todo-x402.md +0 -2047
  979. package/one/things/todo.md +0 -21
  980. package/one/things/video/scripts-crypto.md +0 -835
  981. package/one/things/video-script-backup.md +0 -318
  982. package/one/things/video-script-demo.md +0 -382
  983. package/one/things/video-script-ontology.md +0 -333
  984. package/one/things/video-script.md +0 -361
@@ -1,1742 +0,0 @@
1
- ---
2
- title: Architecture
3
- dimension: knowledge
4
- category: architecture.md
5
- tags: agent, ai, architecture, people, system-design
6
- related_dimensions: 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 architecture.md category.
13
- Location: one/knowledge/architecture.md
14
- Purpose: Documents one platform - the universal code generation language
15
- Related dimensions: people, things
16
- For AI agents: Read this to understand architecture.
17
- ---
18
-
19
- # ONE Platform - The Universal Code Generation Language
20
-
21
- **Version:** 3.0.0
22
- **Purpose:** Explain how ONE creates a Domain-Specific Language (DSL) that enables compound structure accuracy in AI code generation
23
-
24
- ---
25
-
26
- ## Why This Changes Everything
27
-
28
- ### The Breakthrough Insight
29
-
30
- **Most people think AI code generation has a fundamental problem: it gets worse as codebases grow.**
31
-
32
- They're right. But not because AI is fundamentally limited. Because **traditional architectures are optimized for humans, not AI**.
33
-
34
- ONE flips this. It creates an architecture where:
35
-
36
- - **Every new line of code makes the next line MORE accurate**
37
- - **The 10,000-file codebase is EASIER than the 100-file codebase**
38
- - **Agents don't just write code—they BUILD a universal language**
39
-
40
- This isn't incremental improvement. **This is a paradigm shift.**
41
-
42
- ### The Economic Impact
43
-
44
- **Traditional Development:**
45
- - Developer writes 100 lines/day
46
- - AI assistance degrades over time
47
- - Technical debt compounds
48
- - Codebases become unmaintainable
49
- - **Cost scales linearly with codebase size**
50
-
51
- **ONE Development:**
52
- - Agent generates 10,000 lines/day (100x)
53
- - AI accuracy improves over time (98%+)
54
- - Structure compounds (technical credit)
55
- - Codebases become MORE maintainable
56
- - **Cost scales sublinearly—larger codebases are cheaper per feature**
57
-
58
- **Result:** 100x developer productivity. Not hyperbole. Math.
59
-
60
- ### The "Aha Moment"
61
-
62
- Traditional codebases have **infinite ways to express the same concept**:
63
-
64
- ```typescript
65
- // 10 different ways to create a user
66
- createUser(email)
67
- addUser(email)
68
- registerUser(email)
69
- insertUser(email)
70
- saveUser(email)
71
- User.create(email)
72
- new User(email).save()
73
- db.users.add(email)
74
- await createNewUser(email)
75
- userService.register(email)
76
- ```
77
-
78
- **Agents see:** 10 different patterns. Accuracy degrades.
79
-
80
- ONE has **ONE way**:
81
-
82
- ```typescript
83
- // Always the same pattern
84
- provider.things.create({ type: "user", name: email, properties: { email } })
85
- ```
86
-
87
- **Agents see:** ONE pattern. Accuracy compounds.
88
-
89
- **This is the insight.** Restrict expressiveness for humans (slight cost). Maximize pattern recognition for AI (massive gain).
90
-
91
- ---
92
-
93
- ## The Core Vision
94
-
95
- This isn't about "simplifying for beginners." This is about creating a **Domain-Specific Language (DSL)** that:
96
-
97
- 1. **Models reality, not technology** (groups, people, things, connections, events, knowledge)
98
- 2. **Never breaks** (because reality doesn't change, even when technology does)
99
- 3. **Makes each line of code add structure** (compound accuracy over time)
100
- 4. **Enables universal feature import** (clone ANY system into the ontology)
101
-
102
- ### The Problem with Traditional Architectures
103
-
104
- **Traditional AI code generation degrades over time:**
105
-
106
- ```
107
- Generation 1: Clean code → 95% accurate
108
- Generation 2: Slight drift → 90% accurate (-5% - patterns starting to diverge)
109
- Generation 3: Pattern divergence → 80% accurate (-10% - AI sees multiple patterns)
110
- Generation 4: Inconsistency → 65% accurate (-15% - AI confused by variations)
111
- Generation N: Unmaintainable mess → 30% accurate (-20% - complete chaos)
112
- ```
113
-
114
- **Why?**
115
- 1. No universal structure (every feature introduces new patterns)
116
- 2. Technology-specific abstractions leak (React patterns, SQL patterns, REST patterns)
117
- 3. Infinite expressiveness (100 ways to do the same thing)
118
- 4. Implicit dependencies (global state, side effects)
119
- 5. Untyped errors (try/catch everywhere, no pattern)
120
-
121
- **The death spiral:** Each feature makes the next feature HARDER to generate accurately.
122
-
123
- ### The ONE Approach: Compound Structure Accuracy
124
-
125
- **ONE's AI code generation improves over time:**
126
-
127
- ```
128
- Generation 1: Maps to ontology → 85% accurate (learning the ontology)
129
- Generation 2: Follows patterns → 90% accurate (+5% - recognizing service pattern)
130
- Generation 3: Reuses services → 93% accurate (+3% - composing existing services)
131
- Generation 4: Predictable structure → 96% accurate (+3% - mastering Effect.ts patterns)
132
- Generation N: Perfect consistency → 98%+ accurate (+2% - generalized patterns)
133
- ```
134
-
135
- **Why?**
136
- 1. Universal structure (everything maps to 6 dimensions)
137
- 2. Reality-based abstraction (groups/people/things never change)
138
- 3. Restricted expressiveness (ONE way to do each thing)
139
- 4. Explicit dependencies (Effect.ts makes everything visible)
140
- 5. Typed errors (tagged unions, exhaustive patterns)
141
-
142
- **The virtuous cycle:** Each feature makes the next feature EASIER to generate accurately.
143
-
144
- ### Visual: Pattern Convergence vs Divergence
145
-
146
- **Traditional Codebase (Pattern Divergence):**
147
-
148
- ```
149
- Feature 1: createUser(email) ────────┐
150
- Feature 2: addProduct(name) ─────────┼─→ 10 patterns
151
- Feature 3: registerCustomer(data) ───┤ AI confused
152
- Feature 4: insertOrder(items) ───────┤ Accuracy: 30%
153
- Feature 5: saveInvoice(invoice) ─────┘
154
- ...each uses different approach
155
- ```
156
-
157
- **ONE Codebase (Pattern Convergence):**
158
-
159
- ```
160
- Feature 1: provider.things.create({ type: "user" }) ────┐
161
- Feature 2: provider.things.create({ type: "product" }) ─┼─→ 1 pattern
162
- Feature 3: provider.things.create({ type: "customer" })─┤ AI masters it
163
- Feature 4: provider.things.create({ type: "order" }) ───┤ Accuracy: 98%
164
- Feature 5: provider.things.create({ type: "invoice" }) ─┘
165
- ...all use same pattern
166
- ```
167
-
168
- **The difference:** Traditional codebases teach AI 100 patterns (chaos). ONE teaches AI 1 pattern (mastery).
169
-
170
- ---
171
-
172
- ## The Three Pillars of the Universal Language
173
-
174
- ### Pillar 1: The 6-Dimension Ontology (Reality as DSL)
175
-
176
- **The ontology IS the language. Every feature in every system maps to these 6 dimensions:**
177
-
178
- ```typescript
179
- interface Reality {
180
- groups: Container[]; // Hierarchical spaces (friend circles → governments)
181
- people: Actor[]; // Authorization (who can do what)
182
- things: Entity[]; // All nouns (users, products, courses, agents)
183
- connections: Relation[]; // All verbs (owns, enrolled_in, purchased)
184
- events: Action[]; // Audit trail (what happened when)
185
- knowledge: Embedding[]; // Understanding (RAG, search, AI)
186
- }
187
- ```
188
-
189
- **Why this works:**
190
-
191
- 1. **Reality doesn't change** - Groups always contain things, people always authorize, connections always relate
192
- 2. **Technology does change** - React → Svelte, REST → GraphQL, MySQL → Convex
193
- 3. **The ontology maps to ALL technology** - It's an abstraction of reality itself
194
- 4. **Agents understand reality** - Not framework-specific patterns
195
-
196
- **Example: Mapping Shopify to the Ontology**
197
-
198
- ```
199
- Shopify Products → things (type: product)
200
- Shopify Customers → people (role: customer)
201
- Shopify Orders → connections (type: purchased) + events (type: order_placed)
202
- Shopify Cart → connections (type: in_cart)
203
- Shopify Inventory → properties on product thing
204
- Shopify Admin → people (role: org_owner)
205
- Shopify Store → groups (type: business)
206
- ```
207
-
208
- **The agent doesn't learn Shopify. It learns the ontology. Shopify maps to it.**
209
-
210
- ### Pillar 2: Effect.ts (Composable Structure for Agents)
211
-
212
- **Effect.ts isn't for humans. It's for AGENTS.**
213
-
214
- Humans see this:
215
- ```typescript
216
- const registerUser = Effect.gen(function* () {
217
- const validated = yield* validateUser(input);
218
- const user = yield* createUser(validated);
219
- yield* sendEmail(user);
220
- return user;
221
- });
222
- ```
223
-
224
- Agents see this:
225
- ```
226
- PATTERN DETECTED: Service composition
227
- - Input: unknown data
228
- - Step 1: Validation (Effect<T, ValidationError>)
229
- - Step 2: Persistence (Effect<T, DatabaseError>)
230
- - Step 3: Side effect (Effect<void, EmailError>)
231
- - Output: Success or tagged union error
232
- - PREDICTABLE. STRUCTURED. COMPOSABLE.
233
- ```
234
-
235
- **Why Effect.ts:**
236
-
237
- 1. **Readable** - Each line is a discrete step (agents can parse steps)
238
- 2. **Structured** - Error handling is explicit (tagged unions, no try/catch)
239
- 3. **Composable** - Services chain together predictably (agents compose services)
240
- 4. **Type-safe** - 100% typed (`Effect<Success, Error, Dependencies>`)
241
- 5. **Agent-friendly** - Patterns are consistent across entire codebase
242
-
243
- **Every service follows this pattern. Every. Single. One. That's compound structure.**
244
-
245
- ### Pillar 3: Provider Pattern (Universal Adapter)
246
-
247
- **The provider pattern isn't "extra complexity" - it's the UNIVERSAL INTERFACE.**
248
-
249
- ```typescript
250
- // Frontend speaks ontology (never changes)
251
- const provider = getContentProvider("products");
252
- const products = await provider.things.list();
253
-
254
- // Backend can be ANYTHING:
255
- // - Shopify, WordPress, Convex, Supabase, Custom API
256
- // The ontology is the CONTRACT
257
- ```
258
-
259
- **This is how agent-clone imports ANY feature from ANY system.**
260
-
261
- ```typescript
262
- // Same interface for ALL backends
263
- interface ContentProvider {
264
- things: {
265
- list: (opts) => Effect.Effect<Thing[], QueryError>;
266
- get: (id) => Effect.Effect<Thing, NotFoundError>;
267
- create: (input) => Effect.Effect<string, CreateError>;
268
- };
269
- connections: { /* ... */ };
270
- events: { /* ... */ };
271
- knowledge: { /* ... */ };
272
- }
273
- ```
274
-
275
- **Implementations:**
276
- - `MarkdownProvider` - Development (static files)
277
- - `ConvexProvider` - Production (real-time database)
278
- - `ShopifyProvider` - E-commerce (Shopify API → ontology)
279
- - `WordPressProvider` - Content (WordPress REST → ontology)
280
- - `SupabaseProvider` - Custom backend (PostgreSQL → ontology)
281
-
282
- **The frontend code NEVER changes. One env var switches backends.**
283
-
284
- ---
285
-
286
- ## Counter-Arguments Addressed
287
-
288
- ### "Effect.ts is too verbose and complex"
289
-
290
- **Counter:** Effect.ts isn't designed for human reading pleasure. It's designed for AI pattern recognition.
291
-
292
- Compare these:
293
-
294
- **Option A: Concise (for humans)**
295
- ```typescript
296
- async function buy(id) {
297
- const p = await stripe.charge(99);
298
- const t = await mint(id);
299
- await db.add(p, t);
300
- }
301
- ```
302
-
303
- **Option B: Explicit (for agents)**
304
- ```typescript
305
- const buy = (id: string): Effect.Effect<Purchase, StripeError | MintError | DbError> =>
306
- Effect.gen(function* () {
307
- const payment = yield* stripe.charge(99);
308
- const tokens = yield* mint(id);
309
- const purchase = yield* db.insert({ payment, tokens });
310
- return purchase;
311
- });
312
- ```
313
-
314
- **Humans prefer A** (less typing, looks cleaner).
315
-
316
- **Agents need B** because:
317
- 1. Input/output types are explicit (`string` → `Purchase`)
318
- 2. All possible errors are in the signature (`StripeError | MintError | DbError`)
319
- 3. Every dependency is visible (no hidden imports)
320
- 4. Every step is discrete (can be pattern-matched)
321
- 5. Composition is predictable (always `Effect.gen` + `yield*`)
322
-
323
- **The tradeoff:** Write 20% more code. Get 300% better AI accuracy. Worth it.
324
-
325
- ### "The ontology is too generic—you lose domain specificity"
326
-
327
- **Counter:** Generic schema, specific metadata. Best of both worlds.
328
-
329
- **Bad approach:** Custom tables for everything
330
- ```sql
331
- CREATE TABLE courses (...)
332
- CREATE TABLE products (...)
333
- CREATE TABLE events (...)
334
- CREATE TABLE workshops (...)
335
- -- 100 custom tables = 100 patterns = AI confusion
336
- ```
337
-
338
- **ONE approach:** One schema, rich metadata
339
- ```typescript
340
- // All are "things" with type-specific properties
341
- { type: "course", properties: { instructor, curriculum, duration } }
342
- { type: "product", properties: { price, inventory, variants } }
343
- { type: "event", properties: { date, location, capacity } }
344
- { type: "workshop", properties: { instructor, materials, prerequisites } }
345
- ```
346
-
347
- **Why this works:**
348
- - **AI learns ONE pattern** (create thing → connection → event → knowledge)
349
- - **Full type safety** (Zod schemas validate properties per type)
350
- - **Domain flexibility** (properties can be ANYTHING for each type)
351
- - **Query simplicity** (`things.filter(t => t.type === "course")`)
352
-
353
- **You don't lose specificity. You gain universality.**
354
-
355
- ### "Nanostores adds unnecessary complexity"
356
-
357
- **Counter:** Nanostores REMOVES complexity by providing structure.
358
-
359
- **Without nanostores (Astro islands can't communicate):**
360
- ```typescript
361
- // Island 1: Header.tsx (can't access cart)
362
- // Island 2: AddToCart.tsx (can't update header)
363
- // Island 3: CartSidebar.tsx (can't sync with others)
364
-
365
- // "Solutions":
366
- // - localStorage (unstructured, no types)
367
- // - URL params (messy, limited data)
368
- // - window.dispatchEvent (no types, manual sync)
369
- // - Rebuild as SPA (lose Astro benefits)
370
- ```
371
-
372
- **With nanostores (ONE pattern):**
373
- ```typescript
374
- // stores/cart.ts
375
- export const cart$ = atom<CartItem[]>([]);
376
-
377
- // ANY island can read/write
378
- const cart = useStore(cart$);
379
- cart$.set([...cart, newItem]);
380
- ```
381
-
382
- **Agents see:** ONE way to share state across islands. Pattern learned. Accuracy compounds.
383
-
384
- ### "Provider pattern is over-engineering"
385
-
386
- **Counter:** Provider pattern is the ONLY way to achieve backend agnosticism.
387
-
388
- **Without providers:**
389
- ```typescript
390
- // Tightly coupled to Convex
391
- const product = await ctx.db.query("products").first();
392
-
393
- // Want to switch to WordPress? REWRITE EVERYTHING.
394
- ```
395
-
396
- **With providers:**
397
- ```typescript
398
- // Backend-agnostic
399
- const product = await provider.things.get(productId);
400
-
401
- // Switch backends with ONE ENV VAR:
402
- // CONTENT_SOURCE=markdown (development)
403
- // CONTENT_SOURCE=convex (production)
404
- // CONTENT_SOURCE=wordpress (existing site)
405
- // CONTENT_SOURCE=shopify (e-commerce)
406
-
407
- // CODE NEVER CHANGES.
408
- ```
409
-
410
- **This isn't over-engineering. This is the MINIMUM structure needed for true portability.**
411
-
412
- ---
413
-
414
- ## The Agent's Perspective: What AI Actually "Sees"
415
-
416
- ### Humans vs Agents
417
-
418
- **Humans think in concepts:**
419
- - "I need to create a user"
420
- - "I should add authentication"
421
- - "Let's build a shopping cart"
422
-
423
- **Agents think in patterns:**
424
- - "I've seen `provider.things.create` 47 times. 98% confidence this is the pattern."
425
- - "Every time I see `Effect.gen`, the next line is `yield*`. 100% confidence."
426
- - "Services always have dependencies in the constructor. Pattern complete."
427
-
428
- ### What Traditional Codebases Look Like to Agents
429
-
430
- **Agent analyzing traditional codebase:**
431
-
432
- ```
433
- File 1: createUser(email) { await db.users.insert({email}) }
434
- File 2: addProduct(name, price) { await database.products.add({name, price}) }
435
- File 3: registerCustomer(data) { try { await api.post('/customers', data) } catch (e) { ... } }
436
- File 4: insertOrder(items) { const order = new Order(items); await order.save(); }
437
- File 5: saveInvoice(inv) { await db.collection('invoices').insertOne(inv) }
438
-
439
- AGENT ANALYSIS:
440
- - Pattern confidence: 23%
441
- - 5 different function naming conventions
442
- - 4 different data access patterns
443
- - 3 different error handling approaches
444
- - 2 different promise patterns
445
- - PREDICTION: Next "create entity" function will use ???
446
-
447
- ACCURACY: 45% (guessing)
448
- ```
449
-
450
- **Agent analyzing ONE codebase:**
451
-
452
- ```
453
- File 1: provider.things.create({ type: "user", name: email, properties: { email } })
454
- File 2: provider.things.create({ type: "product", name, properties: { price } })
455
- File 3: provider.things.create({ type: "customer", name: data.name, properties: data })
456
- File 4: provider.things.create({ type: "order", name: `Order ${id}`, properties: { items } })
457
- File 5: provider.things.create({ type: "invoice", name: inv.number, properties: inv })
458
-
459
- AGENT ANALYSIS:
460
- - Pattern confidence: 98%
461
- - 1 function pattern (provider.things.create)
462
- - 1 data structure ({ type, name, properties })
463
- - 1 error handling pattern (Effect errors)
464
- - 1 promise pattern (Effect<T, E>)
465
- - PREDICTION: Next "create entity" function will use provider.things.create
466
-
467
- ACCURACY: 98% (certainty)
468
- ```
469
-
470
- **The difference:** Traditional code requires AI to be a "code psychic" (guess the pattern). ONE code requires AI to be a "pattern matcher" (recognize the pattern).
471
-
472
- ### Learning Progression: How Agents Master ONE
473
-
474
- **Generation 1-5: Learning the Ontology (85% accurate)**
475
-
476
- Agent thinks:
477
- ```
478
- "I see things being created with `type` field. Let me check..."
479
- "All entities are things? Even users, products, courses?"
480
- "Connections link things together. Got it."
481
- "Events log actions. People are actors."
482
- "Pattern emerging: 6 dimensions for everything."
483
- CONFIDENCE: 85% (still learning)
484
- ```
485
-
486
- **Generation 6-20: Recognizing Patterns (90% accurate)**
487
-
488
- Agent thinks:
489
- ```
490
- "Every create operation uses provider.things.create. 100% of the time."
491
- "Every service uses Effect.gen. Pattern confirmed."
492
- "All errors are tagged unions. I can handle exhaustively."
493
- "Dependencies are injected. I know what's needed."
494
- CONFIDENCE: 90% (pattern recognized)
495
- ```
496
-
497
- **Generation 21-50: Composing Services (93% accurate)**
498
-
499
- Agent thinks:
500
- ```
501
- "I can reuse existing services:"
502
- "- createThing service exists"
503
- "- createConnection service exists"
504
- "- logEvent service exists"
505
- "My new feature: compose these three services."
506
- "No new patterns needed. Just composition."
507
- CONFIDENCE: 93% (composing existing patterns)
508
- ```
509
-
510
- **Generation 51-100: Mastering Structure (96% accurate)**
511
-
512
- Agent thinks:
513
- ```
514
- "I've generated 50 services. All follow same structure:"
515
- "1. Get provider from context"
516
- "2. Call provider operation"
517
- "3. Handle typed errors"
518
- "4. Return typed result"
519
- "Pattern is UNIVERSAL. Works for ANY feature."
520
- CONFIDENCE: 96% (mastered the structure)
521
- ```
522
-
523
- **Generation 100+: Generalizing (98%+ accurate)**
524
-
525
- Agent thinks:
526
- ```
527
- "I don't even need to think. The pattern IS the system."
528
- "New feature request? Map to 6 dimensions."
529
- "Need validation? Effect.ts service."
530
- "Need data? Provider interface."
531
- "Need state? Nanostores."
532
- "Every decision is deterministic."
533
- CONFIDENCE: 98%+ (system internalized)
534
- ```
535
-
536
- ---
537
-
538
- ## What 98% Accuracy Enables
539
-
540
- ### Today (With 30-70% AI Accuracy)
541
-
542
- **Development workflow:**
543
- 1. Developer writes spec (1 hour)
544
- 2. AI generates code (30-70% accurate)
545
- 3. Developer fixes bugs (3-5 hours)
546
- 4. Developer refactors for consistency (2 hours)
547
- 5. **Total: 6-8 hours per feature**
548
-
549
- **Economics:**
550
- - AI saves maybe 30% of time
551
- - Still need senior developers
552
- - Still accumulates technical debt
553
- - **Cost: $150/hour × 6 hours = $900/feature**
554
-
555
- ### Tomorrow (With 98% AI Accuracy via ONE)
556
-
557
- **Development workflow:**
558
- 1. Developer writes spec (1 hour)
559
- 2. AI generates code (98% accurate)
560
- 3. Developer reviews (30 minutes)
561
- 4. **Total: 1.5 hours per feature**
562
-
563
- **Economics:**
564
- - AI saves 80% of time
565
- - Junior developers can review
566
- - Structure compounds (technical credit)
567
- - **Cost: $50/hour × 1.5 hours = $75/feature**
568
-
569
- **Result: 12x cheaper per feature. Not 2x. 12x.**
570
-
571
- ### Future (With Agent-Clone)
572
-
573
- **Development workflow:**
574
- 1. Point agent-clone at Shopify repo (5 minutes)
575
- 2. AI maps to ontology automatically (5 minutes)
576
- 3. AI generates entire e-commerce platform (10 minutes)
577
- 4. **Total: 20 minutes for full clone**
578
-
579
- **Economics:**
580
- - Cloning Shopify from scratch normally takes 6-12 months
581
- - With agent-clone: 20 minutes
582
- - **Time savings: 99.999%**
583
- - **Cost savings: Infinite (effectively free after ONE setup)**
584
-
585
- ### What Becomes Possible
586
-
587
- **1. Infinite Customization (No Cost Penalty)**
588
-
589
- Traditional: Every customization adds technical debt. Eventually unmaintainable.
590
-
591
- ONE: Every customization adds to the ontology. System becomes MORE maintainable.
592
-
593
- **2. Instant Platform Migration**
594
-
595
- Traditional: Migrating from WordPress to custom backend takes months.
596
-
597
- ONE: Switch `CONTENT_SOURCE` env var. Done in 1 minute.
598
-
599
- **3. Universal Feature Import**
600
-
601
- Traditional: Want Shopify's checkout? Build it from scratch (3 months).
602
-
603
- ONE: Point agent-clone at Shopify. Clone checkout feature (20 minutes).
604
-
605
- **4. Compound Velocity**
606
-
607
- Traditional: Feature #100 takes LONGER than feature #1 (technical debt).
608
-
609
- ONE: Feature #100 takes LESS TIME than feature #1 (pattern reuse).
610
-
611
- **5. AI-Native Development**
612
-
613
- Traditional: AI is an assistant. Human is the driver.
614
-
615
- ONE: AI is the primary builder. Human is the architect.
616
-
617
- ---
618
-
619
- ## Real Metrics: Why This Matters
620
-
621
- ### Context Efficiency
622
-
623
- **Before (Traditional Architecture):**
624
- - Agent needs to read 10,000+ lines to understand patterns
625
- - 80% of context is irrelevant to current task
626
- - Pattern recognition confidence: 30-50%
627
- - Generation time: 60 seconds per feature
628
- - **Cost: $0.06/1k tokens × 50k tokens = $3/feature**
629
-
630
- **After (ONE Architecture):**
631
- - Agent needs to read 2,000 lines (ontology + patterns)
632
- - 90% of context is directly relevant
633
- - Pattern recognition confidence: 98%
634
- - Generation time: 15 seconds per feature
635
- - **Cost: $0.06/1k tokens × 5k tokens = $0.30/feature**
636
-
637
- **Result: 10x context efficiency. 4x faster. 10x cheaper.**
638
-
639
- ### Accuracy Compounding
640
-
641
- **Example: Building a SaaS with 100 features**
642
-
643
- **Traditional approach:**
644
- ```
645
- Feature 1-10: 90% accurate × 10 = 9 working features, 1 broken
646
- Feature 11-20: 80% accurate × 10 = 8 working features, 2 broken
647
- Feature 21-30: 70% accurate × 10 = 7 working features, 3 broken
648
- Feature 31-40: 60% accurate × 10 = 6 working features, 4 broken
649
- ...
650
- Feature 91-100: 30% accurate × 10 = 3 working features, 7 broken
651
-
652
- Total: 50/100 features working correctly
653
- Time to fix: 250 hours (debugging mess)
654
- ```
655
-
656
- **ONE approach:**
657
- ```
658
- Feature 1-10: 85% accurate × 10 = 8.5 working features, 1.5 broken
659
- Feature 11-20: 90% accurate × 10 = 9 working features, 1 broken
660
- Feature 21-30: 93% accurate × 10 = 9.3 working features, 0.7 broken
661
- Feature 31-40: 96% accurate × 10 = 9.6 working features, 0.4 broken
662
- ...
663
- Feature 91-100: 98% accurate × 10 = 9.8 working features, 0.2 broken
664
-
665
- Total: 95/100 features working correctly
666
- Time to fix: 25 hours (minor tweaks)
667
- ```
668
-
669
- **Difference:**
670
- - 1.9x more working features
671
- - 10x less debugging time
672
- - System is MORE maintainable at the end (not less)
673
-
674
- ### The Exponential Payoff
675
-
676
- **Feature #1:**
677
- - Traditional: 8 hours (70% AI, 30% human)
678
- - ONE: 8 hours (70% AI, 30% human)
679
- - **No difference yet**
680
-
681
- **Feature #10:**
682
- - Traditional: 10 hours (60% AI, 40% human - patterns diverging)
683
- - ONE: 6 hours (85% AI, 15% human - patterns converging)
684
- - **ONE is 1.7x faster**
685
-
686
- **Feature #50:**
687
- - Traditional: 16 hours (40% AI, 60% human - technical debt)
688
- - ONE: 3 hours (95% AI, 5% human - pattern mastery)
689
- - **ONE is 5.3x faster**
690
-
691
- **Feature #100:**
692
- - Traditional: 24 hours (25% AI, 75% human - chaos)
693
- - ONE: 1.5 hours (98% AI, 2% human - generalized)
694
- - **ONE is 16x faster**
695
-
696
- **Cumulative for 100 features:**
697
- - Traditional: 1,400 hours
698
- - ONE: 350 hours
699
- - **ONE is 4x faster overall**
700
- - **And the gap keeps growing**
701
-
702
- ---
703
-
704
- ## The Architecture: Layered Reality
705
-
706
- **Every single thing in ONE platform exists within one of these 6 dimensions:**
707
-
708
- ```
709
- ┌──────────────────────────────────────────────────────────────┐
710
- │ 1. GROUPS │
711
- │ Multi-tenant isolation with hierarchical nesting - who owns │
712
- │ what at group level (friend circles → DAOs → governments) │
713
- └──────────────────────────────────────────────────────────────┘
714
- ↓
715
- ┌──────────────────────────────────────────────────────────────┐
716
- │ 2. PEOPLE │
717
- │ Authorization & governance - platform owner, group owners │
718
- └──────────────────────────────────────────────────────────────┘
719
- ↓
720
- ┌──────────────────────────────────────────────────────────────┐
721
- │ 3. THINGS │
722
- │ Every "thing" - users, agents, content, tokens, courses │
723
- └──────────────────────────────────────────────────────────────┘
724
- ↓
725
- ┌──────────────────────────────────────────────────────────────┐
726
- │ 4. CONNECTIONS │
727
- │ Every relationship - owns, follows, taught_by, powers │
728
- └──────────────────────────────────────────────────────────────┘
729
- ↓
730
- ┌──────────────────────────────────────────────────────────────┐
731
- │ 5. EVENTS │
732
- │ Every action - purchased, created, viewed, completed │
733
- └──────────────────────────────────────────────────────────────┘
734
- ↓
735
- ┌──────────────────────────────────────────────────────────────┐
736
- │ 6. KNOWLEDGE │
737
- │ Labels + chunks + vectors powering RAG & search │
738
- └──────────────────────────────────────────────────────────────┘
739
- ```
740
-
741
- **How Technology Layers Implement the 6-Dimension DSL:**
742
-
743
- ```
744
- ┌─────────────────────────────────────────────────────────────────────┐
745
- │ LAYER 1: UNIVERSAL INTERFACE │
746
- │ (The 6-Dimension DSL) │
747
- ├─────────────────────────────────────────────────────────────────────┤
748
- │ groups → Hierarchical containers (friend circles → governments)│
749
- │ people → Authorization & governance (who can do what) │
750
- │ things → All entities (66 types: user, product, course...) │
751
- │ connections → All relationships (25 types: owns, purchased...) │
752
- │ events → All actions (67 types: created, updated, logged...) │
753
- │ knowledge → AI understanding (embeddings, search, RAG) │
754
- │ │
755
- │ This layer NEVER changes. It models reality. │
756
- └──────────────────┬──────────────────────────────────────────────────┘
757
- │
758
- ↓
759
- ┌─────────────────────────────────────────────────────────────────────┐
760
- │ LAYER 2: COMPOSITION ENGINE │
761
- │ (Effect.ts Services) │
762
- ├─────────────────────────────────────────────────────────────────────┤
763
- │ ALL business logic (pure functional programming) │
764
- │ ├─ Service layer (composable business logic) │
765
- │ ├─ Provider layer (external system adapters) │
766
- │ ├─ Layer system (dependency injection) │
767
- │ └─ 100% Effect.ts (typed errors, automatic retry/timeout) │
768
- │ │
769
- │ Services compose ontology operations into features. │
770
- └──────────────────┬──────────────────────────────────────────────────┘
771
- │
772
- ↓
773
- ┌─────────────────────────────────────────────────────────────────────┐
774
- │ LAYER 3: TECHNOLOGY ADAPTERS │
775
- │ (Convex, Hono, Astro, React) │
776
- ├─────────────────────────────────────────────────────────────────────┤
777
- │ Backend: Hono API + Convex Database (implements ontology) │
778
- │ Frontend: Astro SSR + React Islands (renders ontology) │
779
- │ Real-time: Convex hooks (live ontology subscriptions) │
780
- │ Static: Astro Content Collections (ontology as files) │
781
- │ │
782
- │ Technology can be swapped. Ontology stays the same. │
783
- └─────────────────────────────────────────────────────────────────────┘
784
- ```
785
-
786
- ### Layer Interactions
787
-
788
- **Example: User purchases a course**
789
-
790
- ```typescript
791
- // LAYER 1: Ontology (The Language)
792
- // These dimensions are ALWAYS the same, regardless of technology
793
-
794
- Group: "fitnesspro" (organization boundary)
795
- Person: "john@fitnesspro.com" (actor, role: customer)
796
- Thing: "Fitness Fundamentals" (entity, type: course)
797
- Connection: john -[purchased]-> course (relationship)
798
- Event: "purchase_completed" (action, actorId: john)
799
- Knowledge: "John likes fitness courses" (AI learning)
800
-
801
- // LAYER 2: Service (Effect.ts - The Composition)
802
- const purchaseCourse = Effect.gen(function* () {
803
- const provider = yield* DataProvider;
804
-
805
- // Step 1: Validate (ontology operation)
806
- const person = yield* provider.people.get(userId);
807
- const course = yield* provider.things.get(courseId);
808
-
809
- // Step 2: Create connection (ontology operation)
810
- const purchase = yield* provider.connections.create({
811
- fromPersonId: person._id,
812
- toThingId: course._id,
813
- relationshipType: "purchased",
814
- metadata: { amount: 99, method: "stripe" },
815
- });
816
-
817
- // Step 3: Log event (ontology operation)
818
- yield* provider.events.log({
819
- type: "purchase_completed",
820
- actorId: person._id,
821
- targetId: purchase._id,
822
- metadata: { amount: 99 },
823
- });
824
-
825
- return { success: true, purchaseId: purchase._id };
826
- });
827
-
828
- // LAYER 3: Technology (Adapters - The Implementation)
829
-
830
- // Convex implementation
831
- class ConvexProvider implements DataProvider {
832
- people = {
833
- get: (id) => Effect.tryPromise({
834
- try: () => this.client.query(api.people.get, { id }),
835
- catch: (e) => new PersonNotFoundError(id),
836
- }),
837
- };
838
- // ... implements all ontology operations
839
- }
840
-
841
- // WordPress implementation (different technology, SAME interface)
842
- class WordPressProvider implements DataProvider {
843
- people = {
844
- get: (id) => Effect.tryPromise({
845
- try: () => wpClient.users.get(id).then(mapToOntology),
846
- catch: (e) => new PersonNotFoundError(id),
847
- }),
848
- };
849
- // ... implements all ontology operations
850
- }
851
-
852
- // Frontend (Astro + React)
853
- const purchaseButton = (
854
- <Button onClick={() => provider.purchaseCourse(courseId)}>
855
- Buy Course
856
- </Button>
857
- );
858
- ```
859
-
860
- **The magic:** Same ontology operations work with Convex, WordPress, Shopify, Supabase, or ANY backend. The frontend never changes.
861
-
862
- ---
863
-
864
- ## Why This Enables Compound Structure Accuracy
865
-
866
- ### Traditional Approach: Degrading Patterns
867
-
868
- ```typescript
869
- // Generation 1: Create user (initial pattern)
870
- async function createUser(email: string) {
871
- const user = await db.users.create({ email });
872
- return user;
873
- }
874
-
875
- // Generation 2: Create product (different pattern - drift begins)
876
- async function createProduct(name: string) {
877
- try {
878
- const product = await db.products.insert({ name });
879
- await logProductCreated(product);
880
- return product;
881
- } catch (e) {
882
- console.error(e);
883
- throw new Error("Failed");
884
- }
885
- }
886
-
887
- // Generation 3: Create course (more drift)
888
- async function createCourse(title: string) {
889
- let course;
890
- try {
891
- course = await database.addCourse({ title });
892
- await notifyAdmins(course);
893
- await updateMetrics("course_created");
894
- } catch (error) {
895
- if (course) {
896
- await database.deleteCourse(course.id);
897
- }
898
- throw error;
899
- }
900
- return course;
901
- }
902
-
903
- // Agent sees three different patterns. Accuracy degrades.
904
- ```
905
-
906
- ### ONE Approach: Converging Patterns
907
-
908
- ```typescript
909
- // Generation 1: Create user (ontology pattern)
910
- export const createUser = Effect.gen(function* () {
911
- const provider = yield* DataProvider;
912
- const userId = yield* provider.things.create({
913
- type: "user",
914
- name: input.email,
915
- properties: { email: input.email },
916
- });
917
- return userId;
918
- });
919
-
920
- // Generation 2: Create product (SAME ontology pattern)
921
- export const createProduct = Effect.gen(function* () {
922
- const provider = yield* DataProvider;
923
- const productId = yield* provider.things.create({
924
- type: "product",
925
- name: input.name,
926
- properties: { price: input.price },
927
- });
928
- return productId;
929
- });
930
-
931
- // Generation 3: Create course (SAME ontology pattern)
932
- export const createCourse = Effect.gen(function* () {
933
- const provider = yield* DataProvider;
934
- const courseId = yield* provider.things.create({
935
- type: "course",
936
- name: input.title,
937
- properties: { instructor: input.instructor },
938
- });
939
- return courseId;
940
- });
941
-
942
- // Agent sees ONE pattern. Accuracy compounds.
943
- ```
944
-
945
- **What the agent learns:**
946
-
947
- ```
948
- PATTERN: Create entity
949
- 1. Get DataProvider from context
950
- 2. Call provider.things.create()
951
- 3. Specify type (maps to thingType in ontology)
952
- 4. Specify name (required field)
953
- 5. Specify properties (type-specific data)
954
- 6. Return entity ID (Effect<string, CreateError>)
955
-
956
- LEARNED: This pattern works for ALL entity types.
957
- RESULT: Next generation uses same pattern → more accurate.
958
- ```
959
-
960
- ### Compound Structure in Action
961
-
962
- ```typescript
963
- // Generation 50: Agent has seen 49 entity creation patterns
964
- // Agent recognizes the universal pattern immediately
965
-
966
- export const createAnything = <T extends Thing>(
967
- type: ThingType,
968
- input: CreateThingInput<T>
969
- ) => Effect.gen(function* () {
970
- const provider = yield* DataProvider;
971
-
972
- // Validation (learned pattern)
973
- const validated = yield* validateThing(type, input);
974
-
975
- // Creation (learned pattern)
976
- const thingId = yield* provider.things.create({
977
- type,
978
- name: validated.name,
979
- properties: validated.properties,
980
- });
981
-
982
- // Event logging (learned pattern)
983
- yield* provider.events.log({
984
- type: `${type}_created`,
985
- actorId: validated.creatorId,
986
- targetId: thingId,
987
- });
988
-
989
- return thingId;
990
- });
991
-
992
- // Agent has GENERALIZED the pattern.
993
- // Accuracy is now 98%+ because pattern is universal.
994
- ```
995
-
996
- ---
997
-
998
- ## The 6-Dimension Ontology: Complete Specification
999
-
1000
- ### Dimension 1: Groups (Containers)
1001
-
1002
- **Purpose:** Hierarchical spaces that partition all other dimensions.
1003
-
1004
- **For comprehensive documentation, see:** `/one/connections/groups.md`
1005
-
1006
- ```typescript
1007
- interface Group {
1008
- _id: Id<"groups">;
1009
- slug: string; // Unique identifier (URL-friendly)
1010
- name: string;
1011
- type: "friend_circle" | "business" | "community" | "dao" | "government" | "organization";
1012
- parentGroupId?: Id<"groups">; // CRITICAL: Infinite hierarchical nesting
1013
- description?: string;
1014
- metadata: any;
1015
- settings: {
1016
- visibility: "public" | "private";
1017
- joinPolicy: "open" | "invite_only" | "approval_required";
1018
- plan?: "starter" | "pro" | "enterprise";
1019
- limits?: {
1020
- users: number;
1021
- storage: number;
1022
- apiCalls: number;
1023
- };
1024
- };
1025
- status: "active" | "archived";
1026
- createdAt: number;
1027
- updatedAt: number;
1028
- }
1029
- ```
1030
-
1031
- **Key insights:**
1032
- - **Every other dimension is scoped to a `groupId`** - This is the foundation of multi-tenancy
1033
- - **Groups can contain groups** - Hierarchical via `parentGroupId` (infinite nesting)
1034
- - **Scales infinitely** - From friend circles (2 people) to governments (billions)
1035
- - **Multi-tenancy:** Each group has isolated data, billing, quotas, and customization
1036
- - **6 group types:** friend_circle, business, community, dao, government, organization
1037
- - **Access control:** Parent groups can access child groups (configurable)
1038
-
1039
- **Why groups are dimension #1:**
1040
- - Without groups → single-tenant system
1041
- - With groups → infinite multi-tenant scale
1042
- - All queries MUST filter by `groupId` first
1043
- - All entities MUST include `groupId` field
1044
-
1045
- **See `/one/connections/groups.md` for:**
1046
- - Complete group lifecycle (create, update, archive)
1047
- - Hierarchical query patterns (children, descendants, ancestors)
1048
- - Multi-tenancy isolation guarantees
1049
- - Access control patterns
1050
- - Usage tracking & quotas
1051
- - Real-world examples (lemonade stand → enterprise → DAO)
1052
-
1053
- ### Dimension 2: People (Authorization)
1054
-
1055
- **Purpose:** Actors who perform actions and control access.
1056
-
1057
- **Conceptual Model (for understanding):**
1058
-
1059
- ```typescript
1060
- interface Person {
1061
- _id: Id<"entities">; // NOTE: Stored in entities table
1062
- type: "creator" | "ai_clone" | "audience_member";
1063
- name: string;
1064
- groupId: Id<"groups">;
1065
- properties: {
1066
- email: string;
1067
- username?: string;
1068
- displayName?: string;
1069
- role: "platform_owner" | "org_owner" | "org_user" | "customer";
1070
- groups?: Id<"groups">[]; // Multi-org membership
1071
- permissions?: string[];
1072
- image?: string;
1073
- bio?: string;
1074
- };
1075
- status: "active" | "inactive" | "archived";
1076
- createdAt: number;
1077
- updatedAt: number;
1078
- }
1079
- ```
1080
-
1081
- **Implementation Note:**
1082
-
1083
- People are **conceptually a separate dimension** but **implemented as entities** with special types (`creator`, `ai_clone`, `audience_member`). This design choice provides:
1084
-
1085
- 1. **Unified interface:** All dimensions use the same base structure (groupId, type, name, properties)
1086
- 2. **Flexible properties:** Role and permissions stored in `properties.role` field
1087
- 3. **Relationship simplicity:** Connections can link people ↔ things without special handling
1088
- 4. **Query efficiency:** Same index patterns work for people and things
1089
-
1090
- **Why not a separate table?**
1091
-
1092
- - Eliminates JOIN operations (people and things share connections)
1093
- - Consistent query patterns (all entities use same indexes)
1094
- - Simpler schema evolution (one entity type system)
1095
- - Better agent code generation (one pattern to learn, not two)
1096
-
1097
- **Key insights:**
1098
- - Every action has an `actorId` (entity with type="creator")
1099
- - Roles define permissions (stored in `properties.role`)
1100
- - People can belong to multiple groups (via `properties.groups` array)
1101
- - Implementation uses entities table, but conceptually a separate dimension
1102
-
1103
- ### Dimension 3: Things (Entities)
1104
-
1105
- **Purpose:** All nouns in the system.
1106
-
1107
- ```typescript
1108
- interface Thing {
1109
- _id: Id<"things">;
1110
- type: ThingType; // 66 types: user, product, course, agent, token...
1111
- name: string;
1112
- groupId: Id<"groups">; // Scoped to group
1113
- description?: string;
1114
- properties: any; // Type-specific data (flexible)
1115
- status: "draft" | "active" | "published" | "archived";
1116
- createdAt: number;
1117
- updatedAt: number;
1118
- }
1119
- ```
1120
-
1121
- **66 thing types organized by domain:**
1122
-
1123
- **Platform:** website, landing_page, template, livestream, recording, media_asset
1124
- **Content:** post, article, lesson, module, course, series
1125
- **Commerce:** product, variant, collection, subscription, plan
1126
- **Social:** creator, community, group, event
1127
- **Business:** invoice, payment, metric, insight, prediction, report
1128
- **Crypto:** token, wallet, nft, contract
1129
- **AI:** agent, model, prompt, workflow
1130
- **Communication:** notification, email, message, announcement
1131
-
1132
- **Key insights:**
1133
- - Flexible `properties` field for type-specific data
1134
- - Every thing belongs to a group (scoped)
1135
- - Status lifecycle: draft → active → published → archived
1136
-
1137
- ### Dimension 4: Connections (Relationships)
1138
-
1139
- **Purpose:** All relationships between entities.
1140
-
1141
- ```typescript
1142
- interface Connection {
1143
- _id: Id<"connections">;
1144
- fromThingId?: Id<"things">;
1145
- toThingId?: Id<"things">;
1146
- fromPersonId?: Id<"people">; // Can connect people → things
1147
- toPersonId?: Id<"people">; // Or people → people
1148
- relationshipType: ConnectionType; // 25 types
1149
- groupId: Id<"groups">; // Scoped to group
1150
- metadata: any; // Relationship-specific data
1151
- createdAt: number;
1152
- }
1153
- ```
1154
-
1155
- **25 connection types (consolidated):**
1156
-
1157
- **User Relationships (6):** follows, subscribes_to, owns, purchased, created, manages
1158
- **Content Relationships (6):** belongs_to, tagged_with, appears_in, references, derived_from, version_of
1159
- **Token & Financial (5):** holds_tokens, staked_in, earned_from, spent_on, paid_for
1160
- **Platform & Infrastructure (4):** hosted_on, deployed_to, integrated_with, streamed_on
1161
- **Business & Analytics (3):** tracked_by, invoiced_by, referred_by
1162
-
1163
- **Key insights:**
1164
- - Bidirectional (from → to)
1165
- - Rich metadata for relationship-specific data
1166
- - Can connect things ↔ things, people ↔ things, people ↔ people
1167
- - Temporal validity (can add validFrom/validTo to metadata)
1168
-
1169
- ### Dimension 5: Events (Actions)
1170
-
1171
- **Purpose:** Complete audit trail of all actions over time.
1172
-
1173
- ```typescript
1174
- interface Event {
1175
- _id: Id<"events">;
1176
- type: EventType; // 55 types (44 specific + 11 consolidated)
1177
- actorId: Id<"people">; // REQUIRED: Who did it
1178
- targetId?: Id<"things"> | Id<"people"> | Id<"connections">; // What was acted upon
1179
- groupId: Id<"groups">; // Scoped to group
1180
- metadata: any; // Event-specific data
1181
- timestamp: number;
1182
- }
1183
- ```
1184
-
1185
- **55 event types (44 specific + 11 consolidated):**
1186
-
1187
- **Entity Lifecycle (4):** entity_created, entity_updated, entity_deleted, entity_archived
1188
- **User Events (5):** user_registered, user_verified, user_login, user_logout, profile_updated
1189
- **Authentication Events (6):** password_reset_requested, password_reset_completed, email_verification_sent, email_verified, two_factor_enabled, two_factor_disabled
1190
- **Organization Events (5):** organization_created, organization_updated, user_invited_to_org, user_joined_org, user_removed_from_org
1191
- **Dashboard & UI Events (4):** dashboard_viewed, settings_updated, theme_changed, preferences_updated
1192
- **AI/Clone Events (4):** clone_created, clone_updated, voice_cloned, appearance_cloned
1193
- **Agent Events (4):** agent_created, agent_executed, agent_completed, agent_failed
1194
- **Token Events (7):** token_created, token_minted, token_burned, tokens_purchased, tokens_staked, tokens_unstaked, tokens_transferred
1195
- **Course Events (5):** course_created, course_enrolled, lesson_completed, course_completed, certificate_earned
1196
- **Analytics Events (5):** metric_calculated, insight_generated, prediction_made, optimization_applied, report_generated
1197
-
1198
- **Consolidated Event Types (11):** content_event, payment_event, subscription_event, commerce_event, livestream_event, notification_event, referral_event, communication_event, task_event, mandate_event, price_event (use metadata.action for variants)
1199
-
1200
- **Key insights:**
1201
- - Every event has an `actorId` (person)
1202
- - Events are immutable (append-only)
1203
- - Rich metadata for event-specific data
1204
- - Enables complete audit trail, analytics, AI learning
1205
-
1206
- ### Dimension 6: Knowledge (Understanding)
1207
-
1208
- **Purpose:** Embeddings, vectors, and semantic search for AI.
1209
-
1210
- ```typescript
1211
- interface Knowledge {
1212
- _id: Id<"knowledge">;
1213
- type: "embedding" | "label" | "category" | "tag";
1214
- text?: string;
1215
- embedding?: number[]; // Vector embedding
1216
- embeddingModel?: string;
1217
- embeddingDim?: number;
1218
- sourceThingId?: Id<"things">;
1219
- sourcePersonId?: Id<"people">;
1220
- groupId: Id<"groups">; // Scoped to group
1221
- labels?: string[];
1222
- metadata?: any;
1223
- createdAt: number;
1224
- updatedAt: number;
1225
- }
1226
- ```
1227
-
1228
- **Key insights:**
1229
- - Vector storage for RAG (Retrieval-Augmented Generation)
1230
- - Linked to things/people via sourceId
1231
- - Enables semantic search, recommendations, AI learning
1232
- - Scoped to groups (knowledge isolation)
1233
-
1234
- ---
1235
-
1236
- ## Protocols as Metadata: Universal Integration
1237
-
1238
- **X402 (Blockchain Settlement)**
1239
-
1240
- ```typescript
1241
- yield* provider.connections.create({
1242
- fromPersonId: senderId,
1243
- toPersonId: receiverId,
1244
- relationshipType: "transacted",
1245
- metadata: {
1246
- protocol: "x402",
1247
- blockchain: "ethereum",
1248
- amount: "1.5",
1249
- currency: "USDC",
1250
- txHash: "0x...",
1251
- },
1252
- });
1253
- ```
1254
-
1255
- **ActivityPub 2.0 (Federation)**
1256
-
1257
- ```typescript
1258
- yield* provider.connections.create({
1259
- fromPersonId: localUserId,
1260
- toPersonId: remoteUserId,
1261
- relationshipType: "follows",
1262
- metadata: {
1263
- protocol: "activitypub",
1264
- activityType: "Follow",
1265
- actor: "https://mastodon.social/@user",
1266
- object: "https://one.ie/@otheruser",
1267
- },
1268
- });
1269
- ```
1270
-
1271
- **A2A (Agent-to-Agent)**
1272
-
1273
- ```typescript
1274
- yield* provider.connections.create({
1275
- fromThingId: agentId1,
1276
- toThingId: agentId2,
1277
- relationshipType: "delegated",
1278
- metadata: {
1279
- protocol: "a2a",
1280
- task: "generate_invoice",
1281
- status: "pending",
1282
- payload: { orderId: "123" },
1283
- },
1284
- });
1285
- ```
1286
-
1287
- **Key insight:** Protocols don't require new tables or schemas. They're just metadata on connections. The ontology is protocol-agnostic.
1288
-
1289
- ---
1290
-
1291
- ## Technology Layer: Implementation Details
1292
-
1293
- ### Backend: Convex + Hono + Effect.ts
1294
-
1295
- **Convex Schema (Plain, No Convex Ents):**
1296
-
1297
- ```typescript
1298
- // backend/convex/schema.ts
1299
- export default defineSchema({
1300
- groups: defineTable({
1301
- name: v.string(),
1302
- type: v.string(),
1303
- parentGroupId: v.optional(v.id("groups")),
1304
- properties: v.any(),
1305
- status: v.string(),
1306
- createdAt: v.number(),
1307
- updatedAt: v.number(),
1308
- }).index("by_type", ["type"]),
1309
-
1310
- people: defineTable({
1311
- email: v.string(),
1312
- username: v.string(),
1313
- displayName: v.string(),
1314
- role: v.string(),
1315
- groupId: v.id("groups"),
1316
- groups: v.array(v.id("groups")),
1317
- createdAt: v.number(),
1318
- updatedAt: v.number(),
1319
- }).index("by_email", ["email"])
1320
- .index("by_group", ["groupId"]),
1321
-
1322
- things: defineTable({
1323
- type: v.string(),
1324
- name: v.string(),
1325
- groupId: v.id("groups"),
1326
- properties: v.any(),
1327
- status: v.string(),
1328
- createdAt: v.number(),
1329
- updatedAt: v.number(),
1330
- }).index("by_type", ["type"])
1331
- .index("by_group", ["groupId"])
1332
- .index("by_group_type", ["groupId", "type"]),
1333
-
1334
- connections: defineTable({
1335
- fromThingId: v.optional(v.id("things")),
1336
- toThingId: v.optional(v.id("things")),
1337
- fromPersonId: v.optional(v.id("people")),
1338
- toPersonId: v.optional(v.id("people")),
1339
- relationshipType: v.string(),
1340
- groupId: v.id("groups"),
1341
- metadata: v.any(),
1342
- createdAt: v.number(),
1343
- }).index("by_from_thing", ["fromThingId"])
1344
- .index("by_to_thing", ["toThingId"])
1345
- .index("by_from_person", ["fromPersonId"])
1346
- .index("by_to_person", ["toPersonId"])
1347
- .index("by_relationship", ["relationshipType"])
1348
- .index("by_group", ["groupId"]),
1349
-
1350
- events: defineTable({
1351
- type: v.string(),
1352
- actorId: v.id("people"),
1353
- targetId: v.optional(v.union(v.id("things"), v.id("people"), v.id("connections"))),
1354
- groupId: v.id("groups"),
1355
- metadata: v.any(),
1356
- timestamp: v.number(),
1357
- }).index("by_actor", ["actorId"])
1358
- .index("by_target", ["targetId"])
1359
- .index("by_type", ["type"])
1360
- .index("by_group", ["groupId"])
1361
- .index("by_timestamp", ["timestamp"]),
1362
-
1363
- knowledge: defineTable({
1364
- type: v.string(),
1365
- text: v.optional(v.string()),
1366
- embedding: v.optional(v.array(v.number())),
1367
- embeddingModel: v.optional(v.string()),
1368
- sourceThingId: v.optional(v.id("things")),
1369
- sourcePersonId: v.optional(v.id("people")),
1370
- groupId: v.id("groups"),
1371
- labels: v.optional(v.array(v.string())),
1372
- metadata: v.optional(v.any()),
1373
- createdAt: v.number(),
1374
- updatedAt: v.number(),
1375
- }).index("by_source_thing", ["sourceThingId"])
1376
- .index("by_source_person", ["sourcePersonId"])
1377
- .index("by_group", ["groupId"])
1378
- .vectorIndex("by_embedding", {
1379
- vectorField: "embedding",
1380
- dimensions: 768,
1381
- filterFields: ["type", "groupId"],
1382
- }),
1383
- });
1384
- ```
1385
-
1386
- **Effect.ts Service Pattern:**
1387
-
1388
- ```typescript
1389
- // backend/convex/services/things.ts
1390
- export class ThingService extends Effect.Service<ThingService>()("ThingService", {
1391
- effect: Effect.gen(function* () {
1392
- const db = yield* ConvexDatabase;
1393
-
1394
- return {
1395
- create: (input: CreateThingInput) =>
1396
- Effect.gen(function* () {
1397
- // Validation
1398
- const validated = yield* validateThing(input);
1399
-
1400
- // Creation
1401
- const thingId = yield* db.insert("things", {
1402
- type: validated.type,
1403
- name: validated.name,
1404
- groupId: validated.groupId,
1405
- properties: validated.properties,
1406
- status: "draft",
1407
- createdAt: Date.now(),
1408
- updatedAt: Date.now(),
1409
- });
1410
-
1411
- // Event logging
1412
- yield* db.insert("events", {
1413
- type: `${validated.type}_created`,
1414
- actorId: validated.creatorId,
1415
- targetId: thingId,
1416
- groupId: validated.groupId,
1417
- metadata: {},
1418
- timestamp: Date.now(),
1419
- });
1420
-
1421
- return thingId;
1422
- }).pipe(
1423
- Effect.retry({ times: 3 }),
1424
- Effect.timeout("30 seconds"),
1425
- Effect.catchTags({
1426
- ValidationError: (e) => Effect.fail(new ThingCreateError(e)),
1427
- DatabaseError: (e) => Effect.fail(new ThingCreateError(e)),
1428
- })
1429
- ),
1430
- };
1431
- }),
1432
- dependencies: [ConvexDatabase.Default],
1433
- }) {}
1434
- ```
1435
-
1436
- ### Frontend: Astro + React + Provider Pattern
1437
-
1438
- **Progressive Complexity (5 Layers):**
1439
-
1440
- **Layer 1:** Content + Pages (static) - 80% of apps stop here
1441
- **Layer 2:** + Validation (Effect.ts services) - 15% of apps
1442
- **Layer 3:** + State (Nanostores + hooks) - 4% of apps
1443
- **Layer 4:** + Multiple Sources (provider pattern) - 1% of apps
1444
- **Layer 5:** + Backend (REST API + database) - <1% of apps
1445
-
1446
- **Layer 1 Example (Blog):**
1447
-
1448
- ```astro
1449
- ---
1450
- // src/pages/blog/index.astro
1451
- import { getCollection } from "astro:content";
1452
- const posts = await getCollection("posts");
1453
- ---
1454
-
1455
- <Layout>
1456
- {posts.map(post => (
1457
- <PostCard post={post.data} />
1458
- ))}
1459
- </Layout>
1460
- ```
1461
-
1462
- **Layer 4 Example (Multi-Source):**
1463
-
1464
- ```typescript
1465
- // src/lib/providers/getContentProvider.ts
1466
- export function getContentProvider(collection: string) {
1467
- const mode = import.meta.env.CONTENT_SOURCE || "markdown";
1468
-
1469
- switch (mode) {
1470
- case "api":
1471
- return new ApiProvider(apiUrl);
1472
- case "hybrid":
1473
- return new HybridProvider(
1474
- new ApiProvider(apiUrl),
1475
- new MarkdownProvider(collection)
1476
- );
1477
- default:
1478
- return new MarkdownProvider(collection);
1479
- }
1480
- }
1481
-
1482
- // Same code, different backends
1483
- const provider = getContentProvider("products");
1484
- const products = await provider.things.list({ type: "product" });
1485
- ```
1486
-
1487
- ---
1488
-
1489
- ## Agent Clone: Import ANY Feature from ANY System
1490
-
1491
- ### Example: Clone Shopify E-commerce
1492
-
1493
- ```bash
1494
- npx oneie clone https://github.com/Shopify/shopify-api-node
1495
- ```
1496
-
1497
- **Agent workflow:**
1498
-
1499
- **Step 1: Analyze Shopify schema**
1500
- ```
1501
- Products → things (type: product)
1502
- Customers → people (role: customer)
1503
- Orders → connections (purchased) + events (order_placed)
1504
- Cart → connections (in_cart)
1505
- Inventory → thing properties
1506
- Collections → groups (type: collection)
1507
- ```
1508
-
1509
- **Step 2: Generate ShopifyProvider**
1510
- ```typescript
1511
- export class ShopifyProvider implements ContentProvider {
1512
- things = {
1513
- list: ({ type }) => {
1514
- if (type === "product") {
1515
- return Effect.tryPromise({
1516
- try: async () => {
1517
- const products = await shopify.product.list();
1518
- return products.map(p => ({
1519
- _id: p.id,
1520
- type: "product",
1521
- name: p.title,
1522
- properties: {
1523
- price: p.variants[0].price,
1524
- inventory: p.variants[0].inventory_quantity,
1525
- shopifyId: p.id,
1526
- },
1527
- }));
1528
- },
1529
- catch: (e) => new QueryError(String(e)),
1530
- });
1531
- }
1532
- },
1533
- };
1534
- // ... implement all ontology operations
1535
- }
1536
- ```
1537
-
1538
- **Step 3: Generate Effect.ts services**
1539
- ```typescript
1540
- export const createOrder = Effect.gen(function* () {
1541
- const provider = yield* DataProvider;
1542
-
1543
- const product = yield* provider.things.get(productId);
1544
- const customer = yield* provider.people.get(customerId);
1545
-
1546
- const connection = yield* provider.connections.create({
1547
- fromPersonId: customer._id,
1548
- toThingId: product._id,
1549
- relationshipType: "purchased",
1550
- metadata: { quantity, price: product.properties.price },
1551
- });
1552
-
1553
- yield* provider.events.log({
1554
- type: "order_placed",
1555
- actorId: customer._id,
1556
- targetId: connection._id,
1557
- metadata: { amount: quantity * product.properties.price },
1558
- });
1559
-
1560
- return connection._id;
1561
- });
1562
- ```
1563
-
1564
- **Step 4: Generate Astro pages**
1565
- ```astro
1566
- ---
1567
- const provider = getContentProvider("products");
1568
- const products = await provider.things.list({ type: "product" });
1569
- ---
1570
- <Layout>
1571
- {products.map(product => (
1572
- <ProductCard product={product} />
1573
- ))}
1574
- </Layout>
1575
- ```
1576
-
1577
- **Result:** Full e-commerce system imported into ONE's ontology. No custom schema. Everything maps to the 6 dimensions.
1578
-
1579
- ---
1580
-
1581
- ## Why This Never Breaks
1582
-
1583
- ### 1. Reality is Stable
1584
-
1585
- The 6 dimensions model reality:
1586
- - Groups (containers)
1587
- - People (actors)
1588
- - Things (entities)
1589
- - Connections (relationships)
1590
- - Events (actions)
1591
- - Knowledge (understanding)
1592
-
1593
- **Reality doesn't change.** Technology does. The ontology abstracts reality.
1594
-
1595
- ### 2. Technology is Adapter
1596
-
1597
- ```
1598
- Shopify API → ShopifyProvider → Ontology Interface
1599
- Moodle Database → MoodleProvider → Ontology Interface
1600
- WordPress REST → WordPressProvider → Ontology Interface
1601
- Custom Backend → CustomProvider → Ontology Interface
1602
- ```
1603
-
1604
- **New technology?** Write new adapter. Ontology stays the same.
1605
-
1606
- ### 3. Structure Compounds
1607
-
1608
- ```typescript
1609
- // Generation 1: Agent learns the pattern
1610
- export const createUser = Effect.gen(function* () {
1611
- const provider = yield* DataProvider;
1612
- return yield* provider.things.create({ type: "user", ...input });
1613
- });
1614
-
1615
- // Generation 2: Agent reuses the pattern
1616
- export const createProduct = Effect.gen(function* () {
1617
- const provider = yield* DataProvider;
1618
- return yield* provider.things.create({ type: "product", ...input });
1619
- });
1620
-
1621
- // Generation N: Agent has mastered the pattern
1622
- export const createAnything = <T>(type: ThingType, input: T) =>
1623
- Effect.gen(function* () {
1624
- const provider = yield* DataProvider;
1625
- return yield* provider.things.create({ type, ...input });
1626
- });
1627
- ```
1628
-
1629
- **Each generation reinforces the pattern. Accuracy compounds to 98%+.**
1630
-
1631
- ### 4. Type Safety is Complete
1632
-
1633
- ```
1634
- Schema (Zod) → Type (TypeScript) → Service (Effect) → Component (React)
1635
- ```
1636
-
1637
- **Every layer is 100% typed.** No `any` types (except flexible `properties`). No runtime surprises.
1638
-
1639
- ---
1640
-
1641
- ## Documentation Structure: Cascading Context
1642
-
1643
- ONE uses **hierarchical context precedence** for AI agents and humans:
1644
-
1645
- ```
1646
- /CLAUDE.md (root) ← Platform-wide instructions (all agents read)
1647
- ↓ precedence
1648
- /backend/CLAUDE.md ← Backend-specific instructions (agents in backend/)
1649
- ↓ precedence
1650
- /backend/convex/CLAUDE.md ← Convex-specific instructions (agents in convex/)
1651
- ↓ precedence
1652
- /backend/convex/services/CLAUDE.md ← Service-specific instructions
1653
-
1654
- /web/CLAUDE.md ← Frontend-specific instructions (agents in web/)
1655
- ↓ precedence
1656
- /web/src/pages/CLAUDE.md ← Astro pages instructions (agents in pages/)
1657
-
1658
- /one/CLAUDE.md ← Ontology documentation instructions
1659
- ```
1660
-
1661
- **Same pattern for:**
1662
- - `AGENTS.md` - Instructions for GPT (via Codex/other systems)
1663
- - `README.md` - Instructions for humans
1664
-
1665
- **How it works:**
1666
-
1667
- 1. Agent starts at root `/CLAUDE.md` (global context)
1668
- 2. Agent navigates to `/backend/`
1669
- 3. Agent reads `/backend/CLAUDE.md` (backend context, takes precedence)
1670
- 4. Agent navigates to `/backend/convex/services/`
1671
- 5. Agent reads `/backend/convex/services/CLAUDE.md` (most specific, highest precedence)
1672
-
1673
- **Benefits:**
1674
-
1675
- - **Context efficiency:** Agents read only what they need
1676
- - **Specificity:** More specific instructions override general ones
1677
- - **Scalability:** Add context at any level without cluttering root
1678
- - **Consistency:** Global patterns in root, exceptions in subdirectories
1679
-
1680
- See `/one/knowledge/context-engineering.md` for complete documentation structure.
1681
-
1682
- ---
1683
-
1684
- ## Summary: The Universal Code Generation Language
1685
-
1686
- ### What Makes ONE Universal
1687
-
1688
- 1. **6-Dimension Ontology** - Models reality, not technology
1689
- 2. **Effect.ts Services** - Composable structure agents can master
1690
- 3. **Provider Pattern** - Universal adapter for ANY backend
1691
- 4. **Cascading Context** - Hierarchical documentation with precedence
1692
- 5. **Type Safety** - 100% typed end-to-end
1693
- 6. **Compound Accuracy** - Each generation adds structure
1694
-
1695
- ### The Result
1696
-
1697
- **Traditional Codebases:**
1698
- ```
1699
- 100 files → 90% accurate
1700
- 1,000 files → 70% accurate
1701
- 10,000 files → 30% accurate
1702
- AI becomes a liability
1703
- ```
1704
-
1705
- **ONE Codebase:**
1706
- ```
1707
- 100 files → 85% accurate (learning)
1708
- 1,000 files → 92% accurate (mastering)
1709
- 10,000 files → 98% accurate (generalized)
1710
- AI becomes more valuable
1711
- ```
1712
-
1713
- **Why?** The ontology is the language. Patterns converge. Structure compounds.
1714
-
1715
- ---
1716
-
1717
- ## Next Steps for AI Agents
1718
-
1719
- **When implementing ANY feature:**
1720
-
1721
- 1. Read `/CLAUDE.md` (platform overview)
1722
- 2. Read `/one/knowledge/ontology.md` (understand the 6 dimensions)
1723
- 3. Map feature to ontology (groups, people, things, connections, events, knowledge)
1724
- 4. Read specialist docs:
1725
- - Frontend: `/one/knowledge/astro-effect-simple-architecture.md`
1726
- - Backend: `/web/AGENTS.md` (Convex patterns)
1727
- - Integration: `/one/connections/protocols.md`
1728
- 5. Generate Effect.ts services (composable business logic)
1729
- 6. Generate provider adapters (if needed)
1730
- 7. Generate UI components (shadcn/ui)
1731
- 8. Test with mocked layers
1732
-
1733
- **Remember:**
1734
- - The ontology never changes (it's reality)
1735
- - Effect.ts is for agents (predictable patterns)
1736
- - Provider pattern is the universal adapter
1737
- - Every feature adds structure
1738
- - Each generation compounds accuracy
1739
-
1740
- ---
1741
-
1742
- **This is how software should be built.**