oneie 2.0.2 → 2.0.5

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 (459) hide show
  1. package/AGENTS.md +245 -0
  2. package/CLAUDE.md +725 -0
  3. package/LICENSE.md +84 -0
  4. package/README.md +489 -931
  5. package/folders.yaml +78 -17
  6. package/one/.obsidian/app.json +1 -0
  7. package/one/.obsidian/appearance.json +1 -0
  8. package/one/.obsidian/core-plugins.json +33 -0
  9. package/one/.obsidian/workspace.json +211 -0
  10. package/one/connections/a2a.md +551 -0
  11. package/one/connections/acp.md +761 -0
  12. package/one/connections/acps.md +731 -0
  13. package/one/connections/agentkit.md +349 -0
  14. package/one/connections/agui.md +767 -0
  15. package/one/connections/any-backend.md +1702 -0
  16. package/one/connections/ap2.md +998 -0
  17. package/one/connections/api-docs.md +1891 -0
  18. package/one/connections/api.md +2190 -0
  19. package/one/connections/architecture-diagram.md +94 -0
  20. package/one/connections/communications.md +449 -0
  21. package/one/connections/connections.md +339 -0
  22. package/one/connections/copilotkit.md +1559 -0
  23. package/one/connections/cryptonetworks.md +781 -0
  24. package/one/connections/documentation.md +1120 -0
  25. package/one/connections/effect.md +279 -0
  26. package/one/connections/elizaos.md +1290 -0
  27. package/one/connections/inference.md +58 -0
  28. package/one/connections/kyc.md +632 -0
  29. package/one/connections/mcp.md +842 -0
  30. package/one/connections/membership.md +1152 -0
  31. package/one/connections/middleware.md +1067 -0
  32. package/one/connections/multitenant.md +1341 -0
  33. package/one/connections/n8n.md +1015 -0
  34. package/one/connections/patterns.md +89 -0
  35. package/one/connections/protocols.md +279 -0
  36. package/one/connections/relationships.md +107 -0
  37. package/one/connections/schema.md +587 -0
  38. package/one/connections/service-layer.md +550 -0
  39. package/one/connections/structure.md +0 -0
  40. package/one/connections/vectors.md +207 -0
  41. package/one/connections/wordpress.md +1302 -0
  42. package/one/connections/workflow-copy.md +905 -0
  43. package/one/connections/workflow-examples.md +741 -0
  44. package/one/connections/workflow.md +905 -0
  45. package/one/connections/workflows/delegation.md +885 -0
  46. package/one/connections/workflows/frontend.md +1037 -0
  47. package/one/connections/workflows/strategy.md +903 -0
  48. package/one/connections/workflows/tasks.md +698 -0
  49. package/one/connections/x402.md +1249 -0
  50. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +412 -0
  51. package/one/events/FEATURE-2-4-COMPLETE.md +302 -0
  52. package/one/events/FEATURE_2_3_COMPLETE.md +575 -0
  53. package/one/events/GROUPS-MIGRATION.md +625 -0
  54. package/one/events/INSTALL-TESTS.md +293 -0
  55. package/one/events/INTEGRATION-ARCHITECTURE.md +561 -0
  56. package/one/events/INTEGRATION-CHECKLIST.md +1234 -0
  57. package/one/events/INTEGRATION-ORCHESTRATION.md +2623 -0
  58. package/one/events/INTEGRATION-SUMMARY.md +653 -0
  59. package/one/events/MIGRATION-REPORT.md +435 -0
  60. package/one/events/MIGRATION.md +69 -0
  61. package/one/events/README-archived.md +519 -0
  62. package/one/events/TEST-SUMMARY.md +393 -0
  63. package/one/events/TESTS-QUICK-REF.md +262 -0
  64. package/one/events/events.md +545 -0
  65. package/one/groups/groups.md +543 -0
  66. package/one/groups/one.md +599 -0
  67. package/one/groups/revenue.md +673 -0
  68. package/one/groups/strategy.md +869 -0
  69. package/one/groups/vision.md +98 -0
  70. package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +49 -0
  71. package/one/knowledge/ai-platform.md +305 -0
  72. package/one/knowledge/architecture-any-backend.md +1366 -0
  73. package/one/knowledge/architecture-diagram.md +94 -0
  74. package/one/knowledge/architecture-frontend.md +930 -0
  75. package/one/knowledge/architecture.md +2077 -0
  76. package/one/knowledge/crypto.md +960 -0
  77. package/one/knowledge/docs/flow.md +0 -0
  78. package/one/knowledge/dsl.md +1660 -0
  79. package/one/knowledge/files.md +2471 -0
  80. package/one/knowledge/frontend.md +1038 -0
  81. package/one/knowledge/hono.md +2109 -0
  82. package/one/knowledge/implementation-examples.md +2536 -0
  83. package/one/knowledge/inference-score.md +159 -0
  84. package/one/knowledge/knowledge.md +642 -0
  85. package/one/knowledge/language.md +980 -0
  86. package/one/knowledge/lessons-learned.md +70 -0
  87. package/one/knowledge/ontology-6-dimensions.md +0 -0
  88. package/one/knowledge/ontology-documentation.md +356 -0
  89. package/one/knowledge/ontology-engineering-specification.md +1292 -0
  90. package/one/knowledge/ontology-engineering.md +1652 -0
  91. package/one/knowledge/ontology-frontend-copy-2.md +1492 -0
  92. package/one/knowledge/ontology-frontend-copy.md +753 -0
  93. package/one/knowledge/ontology-frontend-specifications.md +2188 -0
  94. package/one/knowledge/ontology-frontend.md +2427 -0
  95. package/one/knowledge/ontology-minimal.yaml +299 -0
  96. package/one/knowledge/ontology.md +2830 -0
  97. package/one/knowledge/ontology.md.backup +2822 -0
  98. package/one/knowledge/ontology.yaml +1165 -0
  99. package/one/knowledge/patterns/backend/convex-mutation-pattern.md +100 -0
  100. package/one/knowledge/patterns/backend/convex-query-pattern.md +88 -0
  101. package/one/knowledge/patterns/backend/mutation-template.md +231 -0
  102. package/one/knowledge/patterns/backend/query-template.md +267 -0
  103. package/one/knowledge/patterns/backend/service-template.md +237 -0
  104. package/one/knowledge/patterns/design/component-architecture.md +399 -0
  105. package/one/knowledge/patterns/design/test-driven-design-pattern.md +162 -0
  106. package/one/knowledge/patterns/design/wireframe-template.md +216 -0
  107. package/one/knowledge/patterns/frontend/component-template.md +195 -0
  108. package/one/knowledge/patterns/frontend/form-template.md +276 -0
  109. package/one/knowledge/patterns/frontend/page-template.md +178 -0
  110. package/one/knowledge/patterns/frontend/react-component-pattern.md +128 -0
  111. package/one/knowledge/patterns/test/acceptance-criteria-template.md +378 -0
  112. package/one/knowledge/patterns/test/technical-test-template.md +544 -0
  113. package/one/knowledge/patterns/test/test-driven-pattern.md +140 -0
  114. package/one/knowledge/patterns/test/user-flow-template.md +254 -0
  115. package/one/knowledge/provider-creation-guide.md +1064 -0
  116. package/one/knowledge/quality-loop.md +401 -0
  117. package/one/knowledge/readme.md +131 -0
  118. package/one/knowledge/rules.md +626 -0
  119. package/one/knowledge/score.md +67 -0
  120. package/one/knowledge/specifications.md +855 -0
  121. package/one/knowledge/tags.md +130 -0
  122. package/one/knowledge/todo.md +251 -0
  123. package/one/license.md +84 -0
  124. package/one/people/anthony-o-connell.md +440 -0
  125. package/one/people/people.md +567 -0
  126. package/one/things/CHECKLIST.md +356 -0
  127. package/one/things/ONE.md +510 -0
  128. package/one/things/agents/agent-backend.md +1401 -0
  129. package/one/things/agents/agent-builder.md +955 -0
  130. package/one/things/agents/agent-clean.md +709 -0
  131. package/one/things/agents/agent-clone.md +1341 -0
  132. package/one/things/agents/agent-designer.md +2177 -0
  133. package/one/things/agents/agent-director.md +1508 -0
  134. package/one/things/agents/agent-documenter.md +1049 -0
  135. package/one/things/agents/agent-frontend.md +1119 -0
  136. package/one/things/agents/agent-integrator.md +1192 -0
  137. package/one/things/agents/agent-problem-solver.md +1379 -0
  138. package/one/things/agents/agent-quality.md +1353 -0
  139. package/one/things/agents/agent-sales.md +986 -0
  140. package/one/things/cascade/cascade.yaml +464 -0
  141. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +470 -0
  142. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +264 -0
  143. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +486 -0
  144. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +497 -0
  145. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +227 -0
  146. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +516 -0
  147. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +544 -0
  148. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +223 -0
  149. package/one/things/cascade/docs/examples/1-3-event-coordination.md +508 -0
  150. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +609 -0
  151. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +195 -0
  152. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +577 -0
  153. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +797 -0
  154. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +212 -0
  155. package/one/things/cascade/docs/examples/1-5-quality-loops.md +641 -0
  156. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +610 -0
  157. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +213 -0
  158. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +575 -0
  159. package/one/things/cascade/docs/examples/readme.md +222 -0
  160. package/one/things/cascade/docs/getting-started.md +515 -0
  161. package/one/things/cascade/docs/workflow.md +1372 -0
  162. package/one/things/cascade/readme.md +336 -0
  163. package/one/things/cascade/templates/feature-template.md +267 -0
  164. package/one/things/claude/agents/advocacy-activation-manager.md +685 -0
  165. package/one/things/claude/agents/advocacy-campaign-designer.md +663 -0
  166. package/one/things/claude/agents/analyst.md +483 -0
  167. package/one/things/claude/agents/architect.md +480 -0
  168. package/one/things/claude/agents/brand-identity-specialist.md +513 -0
  169. package/one/things/claude/agents/bstp-token-strategist.md +667 -0
  170. package/one/things/claude/agents/builder-repo.md +489 -0
  171. package/one/things/claude/agents/bullstamp-community-builder.md +574 -0
  172. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +506 -0
  173. package/one/things/claude/agents/bulltilt-platform-growth.md +567 -0
  174. package/one/things/claude/agents/company-bullstamp-character.md +587 -0
  175. package/one/things/claude/agents/company-bullstamp-community.md +292 -0
  176. package/one/things/claude/agents/company-bullstamp-marketing.md +292 -0
  177. package/one/things/claude/agents/company-bullstamp-token.md +292 -0
  178. package/one/things/claude/agents/company-bulltilt-growth.md +292 -0
  179. package/one/things/claude/agents/content-bibliography-formatter.md +381 -0
  180. package/one/things/claude/agents/content-calendar-planner.md +448 -0
  181. package/one/things/claude/agents/content-chapter-formatter.md +488 -0
  182. package/one/things/claude/agents/content-formatter.md +546 -0
  183. package/one/things/claude/agents/content-hook-specialist.md +462 -0
  184. package/one/things/claude/agents/content-image-formatter.md +535 -0
  185. package/one/things/claude/agents/content-introduction-formatter.md +485 -0
  186. package/one/things/claude/agents/content-multiplication-engine.md +556 -0
  187. package/one/things/claude/agents/content-playbook-writer.md +448 -0
  188. package/one/things/claude/agents/content-team-manager.md +622 -0
  189. package/one/things/claude/agents/content-toc-formatter.md +522 -0
  190. package/one/things/claude/agents/convex-backend-specialist.md +2561 -0
  191. package/one/things/claude/agents/core-manager.md +582 -0
  192. package/one/things/claude/agents/core-master.md +403 -0
  193. package/one/things/claude/agents/cross-functional-manager.md +471 -0
  194. package/one/things/claude/agents/crypto-airdrop-strategist.md +602 -0
  195. package/one/things/claude/agents/crypto-analytics-educator.md +553 -0
  196. package/one/things/claude/agents/crypto-architecture-specialist.md +466 -0
  197. package/one/things/claude/agents/crypto-community-analyst.md +298 -0
  198. package/one/things/claude/agents/crypto-community-psychologist.md +509 -0
  199. package/one/things/claude/agents/crypto-dex-optimization-expert.md +538 -0
  200. package/one/things/claude/agents/crypto-dex-optimizer.md +292 -0
  201. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +513 -0
  202. package/one/things/claude/agents/crypto-diamond-hands.md +292 -0
  203. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +554 -0
  204. package/one/things/claude/agents/crypto-engagement-specialist.md +540 -0
  205. package/one/things/claude/agents/crypto-market-researcher.md +292 -0
  206. package/one/things/claude/agents/crypto-marketing-orchestrator.md +523 -0
  207. package/one/things/claude/agents/crypto-network-effect-amplifier.md +569 -0
  208. package/one/things/claude/agents/crypto-optimization-analyst.md +554 -0
  209. package/one/things/claude/agents/crypto-strategic-synthesizer.md +517 -0
  210. package/one/things/claude/agents/crypto-team-manager.md +387 -0
  211. package/one/things/claude/agents/crypto-token-analyst.md +278 -0
  212. package/one/things/claude/agents/crypto-viral-content-creator.md +546 -0
  213. package/one/things/claude/agents/crypto-wallet-identification-expert.md +517 -0
  214. package/one/things/claude/agents/crypto-wallet-identifier.md +292 -0
  215. package/one/things/claude/agents/customer-journey-designer.md +481 -0
  216. package/one/things/claude/agents/customer-success-manager.md +581 -0
  217. package/one/things/claude/agents/dev.md +413 -0
  218. package/one/things/claude/agents/documenter.md +546 -0
  219. package/one/things/claude/agents/elevate-marketing-orchestrator.md +410 -0
  220. package/one/things/claude/agents/engagement-specialist.md +509 -0
  221. package/one/things/claude/agents/engineering-architect.md +387 -0
  222. package/one/things/claude/agents/engineering-business-analyst.md +537 -0
  223. package/one/things/claude/agents/engineering-developer.md +387 -0
  224. package/one/things/claude/agents/engineering-director.md +282 -0
  225. package/one/things/claude/agents/engineering-ingestor.md +649 -0
  226. package/one/things/claude/agents/engineering-product-manager.md +537 -0
  227. package/one/things/claude/agents/engineering-product-owner.md +537 -0
  228. package/one/things/claude/agents/engineering-project-coordinator.md +537 -0
  229. package/one/things/claude/agents/engineering-quality-assurance.md +393 -0
  230. package/one/things/claude/agents/engineering-team-manager.md +512 -0
  231. package/one/things/claude/agents/engineering-user-experience.md +387 -0
  232. package/one/things/claude/agents/framework-elevate-manager.md +294 -0
  233. package/one/things/claude/agents/improver.md +763 -0
  234. package/one/things/claude/agents/intelligence-team-manager.md +385 -0
  235. package/one/things/claude/agents/lead-capture-expert.md +466 -0
  236. package/one/things/claude/agents/lead-magnet-creator.md +453 -0
  237. package/one/things/claude/agents/market-research-analyst.md +412 -0
  238. package/one/things/claude/agents/marketing-brand-identity.md +314 -0
  239. package/one/things/claude/agents/marketing-content-hooks.md +450 -0
  240. package/one/things/claude/agents/marketing-content-multiplier.md +326 -0
  241. package/one/things/claude/agents/marketing-content-poster.md +361 -0
  242. package/one/things/claude/agents/marketing-customer-journey.md +326 -0
  243. package/one/things/claude/agents/marketing-director.md +397 -0
  244. package/one/things/claude/agents/marketing-engagement.md +326 -0
  245. package/one/things/claude/agents/marketing-lead-capture.md +326 -0
  246. package/one/things/claude/agents/marketing-lead-magnet.md +326 -0
  247. package/one/things/claude/agents/marketing-network-effects.md +326 -0
  248. package/one/things/claude/agents/marketing-nurture-campaigns.md +326 -0
  249. package/one/things/claude/agents/marketing-share-optimizer.md +326 -0
  250. package/one/things/claude/agents/marketing-team-manager.md +446 -0
  251. package/one/things/claude/agents/marketing-viral-growth.md +201 -0
  252. package/one/things/claude/agents/mission-commander.md +373 -0
  253. package/one/things/claude/agents/network-effect-analyst.md +587 -0
  254. package/one/things/claude/agents/nextjs-15-specialist.md +1547 -0
  255. package/one/things/claude/agents/npx.md +890 -0
  256. package/one/things/claude/agents/nurture-campaign-manager.md +531 -0
  257. package/one/things/claude/agents/one-master.md +355 -0
  258. package/one/things/claude/agents/one-orchestrator.md +315 -0
  259. package/one/things/claude/agents/one.md +601 -0
  260. package/one/things/claude/agents/playbook-generator.md +503 -0
  261. package/one/things/claude/agents/pm.md +326 -0
  262. package/one/things/claude/agents/po.md +345 -0
  263. package/one/things/claude/agents/qa.md +336 -0
  264. package/one/things/claude/agents/research-foundation-analyst.md +307 -0
  265. package/one/things/claude/agents/research-intelligence-gatherer.md +408 -0
  266. package/one/things/claude/agents/research-market-analyst.md +307 -0
  267. package/one/things/claude/agents/research-team-manager.md +482 -0
  268. package/one/things/claude/agents/sales-environment-optimizer.md +494 -0
  269. package/one/things/claude/agents/sales-team-manager.md +400 -0
  270. package/one/things/claude/agents/sales-upsell-strategist.md +307 -0
  271. package/one/things/claude/agents/service-advocacy-campaigns.md +307 -0
  272. package/one/things/claude/agents/service-advocacy-manager.md +307 -0
  273. package/one/things/claude/agents/service-success-manager.md +307 -0
  274. package/one/things/claude/agents/service-team-manager.md +400 -0
  275. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +2302 -0
  276. package/one/things/claude/agents/share-optimization-specialist.md +551 -0
  277. package/one/things/claude/agents/sm.md +327 -0
  278. package/one/things/claude/agents/story-teller.md +473 -0
  279. package/one/things/claude/agents/task-master.md +596 -0
  280. package/one/things/claude/agents/tauri-cross-platform-specialist.md +1827 -0
  281. package/one/things/claude/agents/tester.md +556 -0
  282. package/one/things/claude/agents/the-bull-character-manager.md +580 -0
  283. package/one/things/claude/agents/tools-playbook-generator.md +489 -0
  284. package/one/things/claude/agents/turbo-repo-builder.md +316 -0
  285. package/one/things/claude/agents/upsell-strategist.md +480 -0
  286. package/one/things/claude/agents/ux-expert.md +335 -0
  287. package/one/things/claude/agents/viral-growth-orchestrator.md +497 -0
  288. package/one/things/claude/claude-code-hooks-development.json +21 -0
  289. package/one/things/claude/claude-code-hooks-production.json +21 -0
  290. package/one/things/claude/claude-code-hooks.json +25 -0
  291. package/one/things/claude/commands/agent.md +104 -0
  292. package/one/things/claude/commands/cascade-status.md +128 -0
  293. package/one/things/claude/commands/ingest.md +290 -0
  294. package/one/things/claude/commands/ingestor.md +136 -0
  295. package/one/things/claude/commands/mission.md +83 -0
  296. package/one/things/claude/commands/npx.md +133 -0
  297. package/one/things/claude/commands/one.md +440 -0
  298. package/one/things/claude/commands/quality-check.md +204 -0
  299. package/one/things/claude/commands/smart-route.md +220 -0
  300. package/one/things/claude/commands/start.md +121 -0
  301. package/one/things/claude/commands/story.md +83 -0
  302. package/one/things/claude/commands/task.md +173 -0
  303. package/one/things/claude/hook-bypass.json +32 -0
  304. package/one/things/claude/hooks/agent-hook-config.json +427 -0
  305. package/one/things/claude/hooks/agent-hook-manager.js +525 -0
  306. package/one/things/claude/hooks/agent-load-balancer.js +271 -0
  307. package/one/things/claude/hooks/agent-request-interceptor.js +70 -0
  308. package/one/things/claude/hooks/build-hook.sh +156 -0
  309. package/one/things/claude/hooks/cascade-feedback.js +297 -0
  310. package/one/things/claude/hooks/cascade-integration-hooks.js +648 -0
  311. package/one/things/claude/hooks/cleanup-hook.sh +201 -0
  312. package/one/things/claude/hooks/continuous-improvement-monitor.js +510 -0
  313. package/one/things/claude/hooks/file-organization-engine.js +427 -0
  314. package/one/things/claude/hooks/file-organization-hook.sh +80 -0
  315. package/one/things/claude/hooks/file-organization-monitor.js +269 -0
  316. package/one/things/claude/hooks/format-hook.sh +43 -0
  317. package/one/things/claude/hooks/hook-bypass.sh +293 -0
  318. package/one/things/claude/hooks/hook-config-manager.js +202 -0
  319. package/one/things/claude/hooks/hook-debouncer.sh +62 -0
  320. package/one/things/claude/hooks/hook-logger.sh +89 -0
  321. package/one/things/claude/hooks/hook-orchestrator.js +662 -0
  322. package/one/things/claude/hooks/hook-performance-report.js +120 -0
  323. package/one/things/claude/hooks/lint-hook.sh +140 -0
  324. package/one/things/claude/hooks/mcp-cascade-integration.js +816 -0
  325. package/one/things/claude/hooks/memory-optimizer.js +510 -0
  326. package/one/things/claude/hooks/notification-hook.sh +204 -0
  327. package/one/things/claude/hooks/ontology-compliance.js +394 -0
  328. package/one/things/claude/hooks/ontology-hook-manager.js +316 -0
  329. package/one/things/claude/hooks/ontology-validation-engine.js +317 -0
  330. package/one/things/claude/hooks/ontology-validation-hook.sh +86 -0
  331. package/one/things/claude/hooks/performance-metrics.json +25 -0
  332. package/one/things/claude/hooks/performance-monitoring-hook.js +422 -0
  333. package/one/things/claude/hooks/quality-scoring-engine.js +834 -0
  334. package/one/things/claude/hooks/security-hook.sh +256 -0
  335. package/one/things/claude/hooks/simple-load-balancer.js +238 -0
  336. package/one/things/claude/hooks/startup-optimizer.js +625 -0
  337. package/one/things/claude/hooks/story-scoring-system.js +445 -0
  338. package/one/things/claude/hooks/story-validation-engine.js +473 -0
  339. package/one/things/claude/hooks/story-validation-hook-enhanced.sh +210 -0
  340. package/one/things/claude/hooks/story-validation-hook.sh +145 -0
  341. package/one/things/claude/hooks/structure-synchronizer.js +194 -0
  342. package/one/things/claude/hooks/sub-agent-output-validator.js +647 -0
  343. package/one/things/claude/hooks/sub-agent-validation-hook.js +343 -0
  344. package/one/things/claude/hooks/test-hook.sh +145 -0
  345. package/one/things/claude/hooks/test-story-validation.sh +170 -0
  346. package/one/things/claude/hooks/trinity-validation-system.js +392 -0
  347. package/one/things/claude/settings-local.json +86 -0
  348. package/one/things/cli/cli-code.md +652 -0
  349. package/one/things/cli/cli-compiler-code.md +652 -0
  350. package/one/things/cli/cli.md +1068 -0
  351. package/one/things/components/card-shadcn.md +929 -0
  352. package/one/things/components/card.md +1050 -0
  353. package/one/things/components.md +1669 -0
  354. package/one/things/componets.md +4 -0
  355. package/one/things/creator-diagram.md +166 -0
  356. package/one/things/examples/children/lemonade-stand.md +366 -0
  357. package/one/things/examples/enterprise/crm-saas.md +1429 -0
  358. package/one/things/features/1-1-agent-prompts/design.md +470 -0
  359. package/one/things/features/1-1-agent-prompts/tests.md +264 -0
  360. package/one/things/features/1-1-agent-prompts.md +486 -0
  361. package/one/things/features/1-2-yaml-orchestrator/design.md +497 -0
  362. package/one/things/features/1-2-yaml-orchestrator/tests.md +227 -0
  363. package/one/things/features/1-2-yaml-orchestrator.md +516 -0
  364. package/one/things/features/1-3-event-coordination/design.md +544 -0
  365. package/one/things/features/1-3-event-coordination/tests.md +223 -0
  366. package/one/things/features/1-3-event-coordination.md +508 -0
  367. package/one/things/features/1-4-knowledge-management/design.md +609 -0
  368. package/one/things/features/1-4-knowledge-management/tests.md +195 -0
  369. package/one/things/features/1-4-knowledge-management.md +577 -0
  370. package/one/things/features/1-5-quality-loops/design.md +797 -0
  371. package/one/things/features/1-5-quality-loops/tests.md +212 -0
  372. package/one/things/features/1-5-quality-loops.md +641 -0
  373. package/one/things/features/1-6-numbering-structure/design.md +610 -0
  374. package/one/things/features/1-6-numbering-structure/tests.md +213 -0
  375. package/one/things/features/1-6-numbering-structure.md +575 -0
  376. package/one/things/features/2-1-dataprovider-interface.md +2358 -0
  377. package/one/things/features/2-2-config-system.md +3075 -0
  378. package/one/things/features/2-3-effectts-services.md +1498 -0
  379. package/one/things/features/2-4-react-hooks.md +2120 -0
  380. package/one/things/features/2-5-auth-migration.md +2046 -0
  381. package/one/things/features/2-6-dashboard-migration.md +1985 -0
  382. package/one/things/features/2-7-alternative-providers.md +2505 -0
  383. package/one/things/features/2-7-implementation-report.md +680 -0
  384. package/one/things/features/2-cli.md +1235 -0
  385. package/one/things/features/2-design.md +1738 -0
  386. package/one/things/features/2-tests.md +520 -0
  387. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +521 -0
  388. package/one/things/features/DECOUPLING.md +272 -0
  389. package/one/things/features/DEPLOYMENT.md +452 -0
  390. package/one/things/features/IMPLEMENTATION_SUMMARY.md +316 -0
  391. package/one/things/features/dataprovider-interface/1-tests.md +1522 -0
  392. package/one/things/features/improve.md +843 -0
  393. package/one/things/features/remove-convex-deps.md +45 -0
  394. package/one/things/features/top-features.md +79 -0
  395. package/one/things/features/use-one-backend.md +1180 -0
  396. package/one/things/ideas/1-create-workflow.md +189 -0
  397. package/one/things/ideas/2-backend-agnostic-frontend.md +384 -0
  398. package/one/things/plans/1-create-workflow-status.md +555 -0
  399. package/one/things/plans/1-create-workflow.md +713 -0
  400. package/one/things/plans/2-backend-agnostic-frontend.md +543 -0
  401. package/one/things/plans/3-groups.md +502 -0
  402. package/one/things/plans/app.md +761 -0
  403. package/one/things/plans/backend-agnostic-frontend.md +323 -0
  404. package/one/things/plans/better-auth-any-backend-revised.md +1065 -0
  405. package/one/things/plans/better-auth-any-backend.md +1852 -0
  406. package/one/things/plans/better-auth-available-features.md +235 -0
  407. package/one/things/plans/big-plan.md +38 -0
  408. package/one/things/plans/convex-better-auth.md +1109 -0
  409. package/one/things/plans/convex-on-off.md +389 -0
  410. package/one/things/plans/deploy-to-cloudflare.md +581 -0
  411. package/one/things/plans/desktop.md +1121 -0
  412. package/one/things/plans/effect-components.md +1669 -0
  413. package/one/things/plans/effect.md +973 -0
  414. package/one/things/plans/email.md +953 -0
  415. package/one/things/plans/enhance-auth.md +1669 -0
  416. package/one/things/plans/install-components.md +198 -0
  417. package/one/things/plans/landing.md +728 -0
  418. package/one/things/plans/layout.md +205 -0
  419. package/one/things/plans/mail-backend.md +1308 -0
  420. package/one/things/plans/mail.md +2624 -0
  421. package/one/things/plans/next-features.md +83 -0
  422. package/one/things/plans/one.md +658 -0
  423. package/one/things/plans/ontology-6-dimensions.md +2216 -0
  424. package/one/things/plans/ontology-driven-strategy.md +866 -0
  425. package/one/things/plans/ontology-ui-approach.md +357 -0
  426. package/one/things/plans/open-agent.md +785 -0
  427. package/one/things/plans/organizations-to-groups.md +705 -0
  428. package/one/things/plans/performace.md +90 -0
  429. package/one/things/plans/release.md +432 -0
  430. package/one/things/plans/releases.md +809 -0
  431. package/one/things/plans/repos.md +76 -0
  432. package/one/things/plans/separate-copy-2.md +1293 -0
  433. package/one/things/plans/separate-copy-3.md +2458 -0
  434. package/one/things/plans/separate-copy.md +1293 -0
  435. package/one/things/plans/separate.md +1983 -0
  436. package/one/things/plans/shadcn-integration-summary.md +450 -0
  437. package/one/things/plans/sidebar.md +172 -0
  438. package/one/things/plans/small-fixes.md +5 -0
  439. package/one/things/plans/test-backend-connection.md +476 -0
  440. package/one/things/plans/workflow-files.md +1196 -0
  441. package/one/things/plans/workflow.md +1372 -0
  442. package/one/things/products/cascade-landing-page.md +737 -0
  443. package/one/things/products/cascade.md +1518 -0
  444. package/one/things/products/context-engineering.md +1427 -0
  445. package/one/things/products/onthology.md +0 -0
  446. package/one/things/products/ontology-ui-shadcn.md +1280 -0
  447. package/one/things/products/ontology-ui.md +1387 -0
  448. package/one/things/products/ontology.md +717 -0
  449. package/one/things/products/sdk.md +557 -0
  450. package/one/things/promptkit.md +903 -0
  451. package/one/things/service-providers-new.md +982 -0
  452. package/one/things/service-providers.md +1092 -0
  453. package/one/things/system.md +600 -0
  454. package/one/things/tests/2-1-dataprovider-interface.md +1144 -0
  455. package/one/things/tests/2-1-test-analysis.md +496 -0
  456. package/one/things/things.md +349 -0
  457. package/one/things/todo.md +1248 -0
  458. package/one/things/vision/elegant-interface.md +214 -0
  459. package/package.json +5 -2
package/CLAUDE.md ADDED
@@ -0,0 +1,725 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Architecture Overview
6
+
7
+ **ONE Platform** is a multi-tenant AI-native platform built on a **6-dimension ontology** that models reality through: Groups, People, Things, Connections, Events, and Knowledge. The architecture separates concerns into three distinct layers:
8
+
9
+ ```
10
+ Web (Astro + React) → Backend (Convex) → 6-Dimension Ontology
11
+ ```
12
+
13
+ **Key Repositories:**
14
+
15
+ - `/web` - Main web application (Astro 5, React 19, Tailwind v4)
16
+ - `/backend` - Headless Convex backend (6-dimension ontology, auth, real-time)
17
+ - `/apps` - Example applications and integrations
18
+ - `/one` - Comprehensive platform documentation (41 files, 8 layers)
19
+
20
+ ## Planning Paradigm: Inference-Based Execution
21
+
22
+ **CRITICAL:** We don't plan in days. We plan in **inference passes** (Infer 1-100).
23
+
24
+ ### Why Inference-Based Planning?
25
+
26
+ Traditional planning uses time estimates ("Day 1-3", "Week 2"), which are:
27
+ - Inaccurate (time varies wildly)
28
+ - Context-heavy (requires re-planning)
29
+ - Sequential (blocks parallel work)
30
+
31
+ Inference-based planning uses **sequence positions** ("Infer 1-100"), which are:
32
+ - Precise (each inference is a concrete step)
33
+ - Context-light (< 3000 tokens per inference)
34
+ - Parallel-friendly (inferences can run concurrently when dependencies allow)
35
+
36
+ ### The 100-Inference Template
37
+
38
+ Every feature follows a **100-inference sequence** (see `one/knowledge/todo.md`):
39
+
40
+ ```
41
+ Infer 1-10: Foundation & Setup (validate, map, plan)
42
+ Infer 11-20: Backend Schema & Services (database, business logic)
43
+ Infer 21-30: Frontend Pages & Components (UI, interactions)
44
+ Infer 31-40: Integration & Connections (external systems)
45
+ Infer 41-50: Authentication & Authorization (security)
46
+ Infer 51-60: Knowledge & RAG (embeddings, search)
47
+ Infer 61-70: Quality & Testing (unit, integration, e2e)
48
+ Infer 71-80: Design & Wireframes (UI/UX, accessibility)
49
+ Infer 81-90: Performance & Optimization (speed, efficiency)
50
+ Infer 91-100: Deployment & Documentation (production, guides)
51
+ ```
52
+
53
+ ### How to Use Inference Planning
54
+
55
+ 1. **Start with the sequence:** Read `one/knowledge/todo.md` to understand the flow
56
+ 2. **Do the next thing:** Execute the next inference in sequence
57
+ 3. **Use hooks for context:**
58
+ - `.claude/hooks/todo` loads current inference context automatically
59
+ - `.claude/hooks/done` marks complete and advances to next
60
+ 4. **Adapt as needed:** Skip irrelevant inferences, add extras for complex features
61
+ 5. **Run in parallel:** Execute independent inferences concurrently (e.g., Backend + Frontend after schema defined)
62
+
63
+ ### Commands for Inference Workflow
64
+
65
+ ```
66
+ ██████╗ ███╗ ██╗███████╗
67
+ ██╔═══██╗████╗ ██║██╔════╝
68
+ ██║ ██║██╔██╗ ██║█████╗
69
+ ██║ ██║██║╚██╗██║██╔══╝
70
+ ╚██████╔╝██║ ╚████║███████╗
71
+ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
72
+
73
+ Make Your Ideas Real
74
+
75
+ https://one.ie • npx oneie
76
+
77
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
78
+ /now /next /todo /done
79
+ /build /design /deploy /see
80
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
81
+ ```
82
+
83
+ **Workflow Commands:**
84
+ - `/now` - Display current inference and what you're working on
85
+ - `/next` - Advance to next inference and load context
86
+ - `/todo` - View complete task list (100-inference sequence)
87
+ - `/done` - Mark current inference complete and advance
88
+
89
+ **Creation Commands:**
90
+ - `/build` - Build features with AI specialists
91
+ - `/design` - Create wireframes & UI components
92
+ - `/deploy` - Ship to production
93
+
94
+ **Insight Commands:**
95
+ - `/see` - View analytics, refine vision, explore courses
96
+
97
+ ### Benefits
98
+
99
+ - **98% context reduction:** 150k tokens → 3k tokens per inference
100
+ - **5x faster execution:** 115s → 20s per feature average
101
+ - **Flawless execution:** "Do the next thing, perfectly"
102
+ - **Continuous learning:** Lessons captured after each inference
103
+ - **Parallel execution:** Multiple inferences running concurrently
104
+
105
+ **Golden Rule:** Plan in inferences, not days. Where in the sequence does each thing belong?
106
+
107
+ ## The 6-Dimension Ontology (Core Data Model)
108
+
109
+ **CRITICAL:** Every feature MUST map to these 6 dimensions. If it doesn't, rethink your approach.
110
+
111
+ ### 1. groups
112
+
113
+ Hierarchical containers for collaboration - who belongs where and at what level
114
+
115
+ - **Infinite nesting:** Groups can contain groups (parent → child → grandchild...)
116
+ - **6 group types:** friend_circle, business, community, dao, government, organization
117
+ - **Data scoping:** All dimensions (things, connections, events, knowledge) scoped to groupId
118
+ - **Flexible scale:** From friend circles (2 people) to governments (billions of people)
119
+ - **Multi-tenancy:** Each group has independent data, billing, quotas, and customization
120
+ - **Hierarchical access:** Parent groups can access child group data (configurable)
121
+ - **Plans:** starter, pro, enterprise (at organization level)
122
+
123
+ ### 2. people
124
+
125
+ Authorization & governance - who can do what
126
+
127
+ - **4 roles**: platform_owner, org_owner, org_user, customer
128
+ - Represented as things with `type: 'creator'` and `properties.role`
129
+ - Every action has an actor (person)
130
+
131
+ ### 3. things (entities table)
132
+
133
+ All nouns in the system - users, agents, content, tokens, courses
134
+
135
+ - **66+ entity types** defined in schema
136
+ - Flexible `properties` field for type-specific data
137
+ - Status lifecycle: draft → active → published → archived
138
+ - Every thing belongs to a group (scoped via groupId)
139
+
140
+ ### 4. connections
141
+
142
+ All relationships between entities
143
+
144
+ - **25+ connection types**: owns, authored, holds_tokens, enrolled_in, etc.
145
+ - **7 consolidated types** with rich metadata: transacted, communicated, delegated, etc.
146
+ - Bidirectional with temporal validity (validFrom/validTo)
147
+ - Scoped to groups (via groupId)
148
+
149
+ ### 5. events
150
+
151
+ All actions and state changes over time
152
+
153
+ - **67+ event types** including inference and blockchain events
154
+ - Complete audit trail with actor (person), target (thing), timestamp
155
+ - **Consolidated event families** with metadata.protocol for multi-protocol support
156
+ - Scoped to groups (via groupId)
157
+
158
+ ### 6. knowledge
159
+
160
+ Labels, embeddings, and semantic search
161
+
162
+ - Vector storage for RAG (Retrieval-Augmented Generation)
163
+ - Linked to things via junction table
164
+ - Supports categorization and taxonomy
165
+ - Scoped to groups (via groupId)
166
+
167
+ **Golden Rule:** If you can't map a feature to these 6 dimensions, you're thinking about it wrong.
168
+
169
+ **Implementation:** The 6 dimensions are implemented using 5 database tables (groups, things, connections, events, knowledge), with people represented as things with role metadata.
170
+
171
+ **Schema Structure:**
172
+
173
+ ```typescript
174
+ // groups table
175
+ {
176
+ _id: Id<"groups">,
177
+ name: string,
178
+ type: "friend_circle" | "business" | "community" | "dao" | "government" | "organization",
179
+ parentGroupId?: Id<"groups">, // For hierarchical nesting
180
+ properties: {
181
+ description?: string,
182
+ plan?: "starter" | "pro" | "enterprise",
183
+ settings?: any,
184
+ // ... type-specific fields
185
+ },
186
+ status: "draft" | "active" | "archived",
187
+ createdAt: number,
188
+ updatedAt: number
189
+ }
190
+
191
+ // All other dimensions include groupId:
192
+ things → groupId: Id<"groups">
193
+ connections → groupId: Id<"groups">
194
+ events → groupId: Id<"groups">
195
+ knowledge → groupId: Id<"groups">
196
+ ```
197
+
198
+ ## Development Commands
199
+
200
+ ### Frontend Development
201
+
202
+ ```bash
203
+ cd web/
204
+
205
+ # Development server (localhost:4321)
206
+ bun run dev
207
+
208
+ # Build for production (includes type checking)
209
+ bun run build
210
+
211
+ # Type checking only
212
+ bunx astro check
213
+
214
+ # Generate content collection types
215
+ bunx astro sync
216
+
217
+ # Linting
218
+ bun run lint
219
+
220
+ # Formatting
221
+ bun run format
222
+ ```
223
+
224
+ ### Backend Development
225
+
226
+ ```bash
227
+ cd backend/
228
+
229
+ # Start Convex dev server (watch mode)
230
+ npx convex dev
231
+
232
+ # Deploy to production
233
+ npx convex deploy
234
+
235
+ # Run query from CLI
236
+ npx convex run queries/entities:list '{"type": "user"}'
237
+
238
+ # View function logs
239
+ npx convex logs --history 50 --success
240
+ ```
241
+
242
+ ### Testing
243
+
244
+ ```bash
245
+ cd web/
246
+
247
+ # Run all tests
248
+ bun test
249
+
250
+ # Run auth tests specifically
251
+ bun test test/auth
252
+
253
+ # Watch mode
254
+ bun test --watch
255
+ ```
256
+
257
+ **Test Coverage:**
258
+
259
+ - 50+ test cases for authentication (6 methods: email/password, OAuth, magic links, password reset, email verification, 2FA)
260
+ - Integration tests verify frontend → backend auth flows
261
+ - Backend connection: `https://shocking-falcon-870.convex.cloud`
262
+
263
+ ## Technology Stack
264
+
265
+ ### Frontend Layer
266
+
267
+ - **Astro 5.14+**: Static site generation + server-side rendering
268
+ - **React 19**: Islands architecture with selective hydration
269
+ - **Tailwind CSS v4**: CSS-based configuration (no JS config)
270
+ - **shadcn/ui**: 50+ pre-installed accessible components
271
+ - **TypeScript 5.9+**: Strict mode with path aliases
272
+ - **Better Auth**: Multi-method authentication
273
+
274
+ ### Backend Layer
275
+
276
+ - **Convex**: Real-time database with typed functions
277
+ - **Better Auth + Convex Adapter**: Authentication system
278
+ - **@convex-dev/resend**: Email component for transactional emails
279
+ - **@convex-dev/rate-limiter**: Brute force protection
280
+
281
+ ### Deployment
282
+
283
+ - **Frontend**: Cloudflare Pages with React 19 SSR (using `react-dom/server.edge`)
284
+ - **Backend**: Convex Cloud (`shocking-falcon-870.convex.cloud`)
285
+ - **Edge Runtime**: Cloudflare Workers compatibility
286
+
287
+ ## File Structure
288
+
289
+ ```
290
+ ONE/
291
+ ├── frontend/ # Main Astro application
292
+ │ ├── src/
293
+ │ │ ├── pages/ # File-based routing
294
+ │ │ ├── components/ # React components + shadcn/ui
295
+ │ │ ├── layouts/ # Page layouts
296
+ │ │ ├── content/ # Content collections (blog, etc.)
297
+ │ │ ├── lib/ # Utilities
298
+ │ │ └── styles/ # Global CSS + Tailwind config
299
+ │ ├── convex/ # Convex schema and functions (legacy)
300
+ │ └── test/ # Test suites
301
+ │
302
+ ├── backend/ # Headless Convex backend
303
+ │ └── convex/
304
+ │ ├── schema.ts # 6-dimension ontology schema (5 tables)
305
+ │ ├── auth.ts # Better Auth configuration
306
+ │ ├── queries/ # Read operations
307
+ │ ├── mutations/ # Write operations
308
+ │ └── _generated/ # Auto-generated types
309
+ │
310
+ ├── one/ # Platform documentation (41 files)
311
+ │ ├── connections/ # Ontology, protocols, patterns
312
+ │ ├── things/ # Architecture, specifications
313
+ │ ├── events/ # Event specifications
314
+ │ ├── knowledge/ # RAG, AI, implementation
315
+ │ └── people/ # Roles, groups, governance
316
+ │
317
+ └── apps/ # Example applications
318
+ ├── oneie/ # Main example app
319
+ ├── eliza/ # ElizaOS integration
320
+ └── stack/ # Stack Auth example
321
+ ```
322
+
323
+ ## Development Workflow (6-Phase Process)
324
+
325
+ Before implementing ANY feature, follow this workflow defined in `one/connections/workflow.md`:
326
+
327
+ ### Phase 1: UNDERSTAND
328
+
329
+ 1. Read `one/knowledge/ontology.md` (understand the 6 dimensions)
330
+ 2. Read `frontend/AGENTS.md` (Convex patterns and quick reference)
331
+ 3. Read `one/knowledge/rules.md` (golden rules for AI agents)
332
+ 4. Identify feature category (entity, relationship, action, query)
333
+ 5. Find similar patterns in existing code
334
+
335
+ ### Phase 2: MAP TO ONTOLOGY
336
+
337
+ 1. Identify **groups** (which group owns this? any parent/child relationships?)
338
+ 2. Identify **people** (who can access/modify this?)
339
+ 3. Identify **things** (what entities are involved?)
340
+ 4. Identify **connections** (how do they relate?)
341
+ 5. Identify **events** (what actions need logging?)
342
+ 6. Identify **knowledge** (what needs to be learned/searched?)
343
+
344
+ ### Phase 3: DESIGN SERVICES
345
+
346
+ 1. Design Effect.ts service (pure business logic)
347
+ 2. Define types (no `any` except in entity `properties`)
348
+ 3. Define errors (tagged unions with `_tag`)
349
+ 4. Plan dependencies and layers
350
+
351
+ ### Phase 4: IMPLEMENT BACKEND
352
+
353
+ 1. Update schema if needed (`backend/convex/schema.ts`)
354
+ 2. Create Convex mutations/queries (thin wrappers)
355
+ 3. Implement Effect.ts services (`convex/services/`)
356
+ 4. Add proper error handling
357
+
358
+ ### Phase 5: BUILD FRONTEND
359
+
360
+ 1. Create React components (`src/components/features/`)
361
+ 2. Use shadcn/ui components
362
+ 3. Add loading/error states
363
+ 4. Create Astro pages with SSR data fetching
364
+ 5. Add `client:load` for interactive components
365
+
366
+ ### Phase 6: TEST & DOCUMENT
367
+
368
+ 1. Write unit tests for services
369
+ 2. Write integration tests for full flows
370
+ 3. Update documentation in `one/` directory
371
+ 4. Run type checking (`bunx astro check`)
372
+
373
+ ## Key Patterns and Best Practices
374
+
375
+ ### Convex Query Pattern
376
+
377
+ ```typescript
378
+ // backend/convex/queries/entities.ts
379
+ import { query } from "./_generated/server";
380
+ import { v } from "convex/values";
381
+
382
+ export const list = query({
383
+ args: { type: v.string() },
384
+ handler: async (ctx, args) => {
385
+ return await ctx.db
386
+ .query("entities")
387
+ .withIndex("by_type", (q) => q.eq("type", args.type))
388
+ .collect();
389
+ },
390
+ });
391
+ ```
392
+
393
+ ### Convex Mutation Pattern
394
+
395
+ ```typescript
396
+ // backend/convex/mutations/entities.ts
397
+ import { mutation } from "./_generated/server";
398
+ import { v } from "convex/values";
399
+
400
+ export const create = mutation({
401
+ args: {
402
+ groupId: v.id("groups"),
403
+ type: v.string(),
404
+ name: v.string(),
405
+ properties: v.any(),
406
+ },
407
+ handler: async (ctx, args) => {
408
+ const entityId = await ctx.db.insert("things", {
409
+ groupId: args.groupId,
410
+ type: args.type,
411
+ name: args.name,
412
+ properties: args.properties,
413
+ status: "draft",
414
+ createdAt: Date.now(),
415
+ updatedAt: Date.now(),
416
+ });
417
+
418
+ // Log creation event
419
+ await ctx.db.insert("events", {
420
+ groupId: args.groupId,
421
+ type: "entity_created",
422
+ actorId: ctx.auth?.getUserIdentity()?.tokenIdentifier,
423
+ targetId: entityId,
424
+ timestamp: Date.now(),
425
+ metadata: { entityType: args.type },
426
+ });
427
+
428
+ return entityId;
429
+ },
430
+ });
431
+ ```
432
+
433
+ ### Hierarchical Group Pattern
434
+
435
+ ```typescript
436
+ // backend/convex/mutations/groups.ts
437
+ import { mutation } from "./_generated/server";
438
+ import { v } from "convex/values";
439
+
440
+ // Create parent group
441
+ export const createOrganization = mutation({
442
+ args: {
443
+ name: v.string(),
444
+ plan: v.optional(v.union(v.literal("starter"), v.literal("pro"), v.literal("enterprise"))),
445
+ },
446
+ handler: async (ctx, args) => {
447
+ const groupId = await ctx.db.insert("groups", {
448
+ name: args.name,
449
+ type: "organization",
450
+ parentGroupId: undefined, // Top-level group
451
+ properties: {
452
+ plan: args.plan || "starter",
453
+ },
454
+ status: "active",
455
+ createdAt: Date.now(),
456
+ updatedAt: Date.now(),
457
+ });
458
+ return groupId;
459
+ },
460
+ });
461
+
462
+ // Create child group (e.g., department within organization)
463
+ export const createSubGroup = mutation({
464
+ args: {
465
+ parentGroupId: v.id("groups"),
466
+ name: v.string(),
467
+ type: v.union(
468
+ v.literal("friend_circle"),
469
+ v.literal("business"),
470
+ v.literal("community"),
471
+ v.literal("dao"),
472
+ v.literal("government"),
473
+ v.literal("organization")
474
+ ),
475
+ },
476
+ handler: async (ctx, args) => {
477
+ // Verify parent exists
478
+ const parent = await ctx.db.get(args.parentGroupId);
479
+ if (!parent) throw new Error("Parent group not found");
480
+
481
+ const groupId = await ctx.db.insert("groups", {
482
+ name: args.name,
483
+ type: args.type,
484
+ parentGroupId: args.parentGroupId, // Link to parent
485
+ properties: {},
486
+ status: "active",
487
+ createdAt: Date.now(),
488
+ updatedAt: Date.now(),
489
+ });
490
+
491
+ return groupId;
492
+ },
493
+ });
494
+ ```
495
+
496
+ ### React Component with Convex Hooks
497
+
498
+ ```typescript
499
+ // frontend/src/components/features/EntityList.tsx
500
+ import { useQuery } from "convex/react";
501
+ import { api } from "@/convex/_generated/api";
502
+
503
+ export function EntityList({ groupId, type }: { groupId: string; type: string }) {
504
+ const entities = useQuery(api.queries.entities.list, { groupId, type });
505
+
506
+ if (entities === undefined) return <div>Loading...</div>;
507
+
508
+ return (
509
+ <div>
510
+ {entities.map((entity) => (
511
+ <div key={entity._id}>{entity.name}</div>
512
+ ))}
513
+ </div>
514
+ );
515
+ }
516
+ ```
517
+
518
+ ### Astro Page with SSR
519
+
520
+ ```astro
521
+ ---
522
+ // frontend/src/pages/groups/[groupId]/entities/[type].astro
523
+ import { ConvexHttpClient } from "convex/browser";
524
+ import { api } from "@/convex/_generated/api";
525
+ import EntityList from "@/components/features/EntityList";
526
+
527
+ const convex = new ConvexHttpClient(import.meta.env.PUBLIC_CONVEX_URL);
528
+ const entities = await convex.query(api.queries.entities.list, {
529
+ groupId: Astro.params.groupId,
530
+ type: Astro.params.type
531
+ });
532
+ ---
533
+
534
+ <Layout>
535
+ <h1>{Astro.params.type} Entities</h1>
536
+ <EntityList
537
+ client:load
538
+ groupId={Astro.params.groupId}
539
+ type={Astro.params.type}
540
+ />
541
+ </Layout>
542
+ ```
543
+
544
+ ### Tailwind v4 Styling
545
+
546
+ ```css
547
+ /* src/styles/global.css */
548
+ @import "tailwindcss";
549
+
550
+ @theme {
551
+ --color-background: 0 0% 100%;
552
+ --color-foreground: 222.2 84% 4.9%;
553
+ --color-primary: 222.2 47.4% 11.2%;
554
+ }
555
+
556
+ /* Dark mode overrides */
557
+ @variant dark (.dark &);
558
+
559
+ .dark {
560
+ --color-background: 222.2 84% 4.9%;
561
+ --color-foreground: 210 40% 98%;
562
+ }
563
+
564
+ /* Use colors with hsl() wrapper */
565
+ .my-component {
566
+ background-color: hsl(var(--color-background));
567
+ color: hsl(var(--color-foreground));
568
+ }
569
+ ```
570
+
571
+ ## Important Guidelines
572
+
573
+ ### Authentication
574
+
575
+ - Backend handles all auth logic (`backend/convex/auth.ts`)
576
+ - Frontend uses Better Auth client hooks
577
+ - 6 authentication methods supported
578
+ - All auth pages under `/account/*` route
579
+
580
+ ### Environment Variables
581
+
582
+ **Web (.env.local):**
583
+
584
+ ```bash
585
+ PUBLIC_CONVEX_URL=https://shocking-falcon-870.convex.cloud
586
+ CONVEX_DEPLOYMENT=prod:shocking-falcon-870
587
+ BETTER_AUTH_SECRET=your-secret-key
588
+ BETTER_AUTH_URL=http://localhost:4321
589
+ # OAuth credentials...
590
+ ```
591
+
592
+ **Backend (.env.local):**
593
+
594
+ ```bash
595
+ CONVEX_DEPLOYMENT=prod:shocking-falcon-870
596
+ RESEND_API_KEY=your-resend-api-key
597
+ RESEND_FROM_EMAIL=noreply@yourdomain.com
598
+ ```
599
+
600
+ ### Tailwind v4 Specifics
601
+
602
+ - NO `tailwind.config.mjs` file - use CSS `@theme` blocks
603
+ - ALWAYS use HSL format: `--color-name: 0 0% 100%`
604
+ - ALWAYS wrap with `hsl()`: `hsl(var(--color-background))`
605
+ - NO `@apply` directive in Tailwind v4
606
+ - Use `@variant dark (.dark &)` for dark mode
607
+ - Add `@source` directive to scan component files
608
+
609
+ ### React 19 + Cloudflare
610
+
611
+ - Uses `react-dom/server.edge` for SSR compatibility
612
+ - Configured in `astro.config.mjs` with Vite alias
613
+ - Deployed to Cloudflare Pages with edge rendering
614
+
615
+ ### Content Collections
616
+
617
+ - Blog posts in `src/content/blog/`
618
+ - Type-safe schemas in `src/content/config.ts`
619
+ - Run `bunx astro sync` after content changes
620
+ - Use `CollectionEntry<"blog">` type (lowercase)
621
+
622
+ ## Common Issues and Solutions
623
+
624
+ ### Issue: TypeScript errors after schema changes
625
+
626
+ ```bash
627
+ cd backend && npx convex dev # Regenerate types
628
+ cd web && bunx astro check
629
+ ```
630
+
631
+ ### Issue: Auth not working
632
+
633
+ Check that BETTER_AUTH_SECRET matches between frontend and backend `.env.local` files.
634
+
635
+ ### Issue: Hydration mismatch
636
+
637
+ Add `client:load` directive to interactive React components used in Astro pages.
638
+
639
+ ### Issue: Tailwind styles not applying
640
+
641
+ Ensure colors use HSL format wrapped with `hsl()` function, not OKLCH or raw values.
642
+
643
+ ### Issue: Build fails on Cloudflare
644
+
645
+ Verify `react-dom/server.edge` alias is set in `astro.config.mjs` under `vite.resolve.alias`.
646
+
647
+ ## Critical Reading Before Coding
648
+
649
+ **For ANY feature implementation, read in this order:**
650
+
651
+ 1. **`one/knowledge/ontology.md`** - Complete 6-dimension ontology specification (Version 1.0.0)
652
+ 2. **`frontend/AGENTS.md`** - Quick reference for Convex patterns
653
+ 3. **`one/knowledge/rules.md`** - Golden rules for AI development
654
+ 4. **`one/connections/workflow.md`** - 6-phase development workflow
655
+ 5. **`one/connections/patterns.md`** - Proven code patterns to replicate
656
+
657
+ **For specific feature types:**
658
+
659
+ - **Protocol integration**: `one/connections/protocols.md` + specific protocol doc
660
+ - **External integration**: `one/connections/communications.md` + specific integration doc
661
+ - **Blockchain features**: `one/connections/cryptonetworks.md`
662
+ - **Agent features**: `one/things/agentkit.md`, `one/things/copilotkit.md`
663
+ - **Inference/AI**: `one/connections/inference.md`
664
+
665
+ ## Documentation Structure
666
+
667
+ The `one/` directory contains **41 documentation files** organized in **8 layers**:
668
+
669
+ 1. **Strategy Layer**: Vision, revenue, organization
670
+ 2. **Ontology Layer**: Core data model and 6 dimensions
671
+ 3. **Protocols Layer**: A2A, ACP, AP2, X402, AG-UI specifications
672
+ 4. **Services Layer**: Effect.ts patterns, service providers
673
+ 5. **Implementation Layer**: Frontend, architecture, patterns
674
+ 6. **Integration Layer**: ElizaOS, CopilotKit, MCP, N8N
675
+ 7. **Examples Layer**: Lemonade stand, enterprise CRM
676
+ 8. **Plans Layer**: Future enhancements and technical debt
677
+
678
+ **Use targeted reading:** Don't read everything - follow the critical path for your specific feature type.
679
+
680
+ ## Deployment
681
+
682
+ ### Web (Cloudflare Pages)
683
+
684
+ ```bash
685
+ cd web/
686
+ bun run build
687
+ wrangler pages deploy dist --project-name=one-platform
688
+ ```
689
+
690
+ ### Backend (Convex Cloud)
691
+
692
+ ```bash
693
+ cd backend/
694
+ npx convex deploy
695
+ ```
696
+
697
+ Convex automatically deploys on git push when connected to GitHub.
698
+
699
+ ## Philosophy
700
+
701
+ **Simple enough for children. Powerful enough for enterprises.**
702
+
703
+ - Groups partition the space (hierarchical containers from friend circles to governments)
704
+ - People authorize and govern (role-based access)
705
+ - Things exist (entities with flexible properties)
706
+ - Connections relate (relationships with metadata)
707
+ - Events record (complete audit trail)
708
+ - Knowledge understands (embeddings and vectors)
709
+
710
+ Everything else is just data. This ontology scales from friend circles (2 people) to global governments (billions) without schema changes.
711
+
712
+ ## Getting Help
713
+
714
+ For questions about:
715
+
716
+ - **6-Dimension Ontology**: Read `one/knowledge/ontology.md` (Version 1.0.0 - complete specification)
717
+ - **Convex patterns**: Read `frontend/AGENTS.md`
718
+ - **Architecture**: Read `one/knowledge/architecture.md`
719
+ - **Workflows**: Read `one/connections/workflow.md`
720
+ - **Best practices**: Read `one/knowledge/rules.md`
721
+ - **Migration from 4-table**: Read `one/things/plans/ontology-6-dimensions.md`
722
+
723
+ ---
724
+
725
+ **Built with clarity, simplicity, and infinite scale in mind.**