oneie 3.6.13 → 3.6.14

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 (773) hide show
  1. package/.claude/agents/AUDIT-agent-ops-alignment.md +379 -0
  2. package/.claude/agents/NEWS-QUICKSTART.md +321 -0
  3. package/.claude/agents/NEWS-README.md +353 -0
  4. package/.claude/agents/agent-backend.md +1 -1
  5. package/.claude/agents/agent-builder.md +220 -151
  6. package/.claude/agents/agent-clean.md +39 -31
  7. package/.claude/agents/agent-clone.md +107 -54
  8. package/.claude/agents/agent-designer.md +76 -71
  9. package/.claude/agents/agent-director.md +164 -1
  10. package/.claude/agents/agent-documenter.md +169 -132
  11. package/.claude/agents/agent-frontend.md +442 -446
  12. package/.claude/agents/agent-integrator.md +30 -23
  13. package/.claude/agents/agent-lawyer.md +145 -98
  14. package/.claude/agents/agent-news.md +363 -0
  15. package/.claude/agents/agent-onboard.md +99 -69
  16. package/.claude/agents/agent-ontology.md +585 -0
  17. package/.claude/agents/agent-ops.md +178 -171
  18. package/.claude/agents/agent-problem-solver.md +132 -115
  19. package/.claude/agents/agent-quality.md +94 -77
  20. package/.claude/agents/agent-sales.md +89 -67
  21. package/.claude/commands/release.md +3 -1
  22. package/.claude/hooks/README-knowledge-hooks.md +266 -80
  23. package/.claude/hooks/README-root-cleanup.md +200 -0
  24. package/.claude/hooks/README.md +284 -0
  25. package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
  26. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  27. package/.claude/hooks/check-filenames.py +169 -32
  28. package/.claude/hooks/clean-post.py +195 -28
  29. package/.claude/hooks/clean-pre.py +96 -11
  30. package/.claude/hooks/done.py +74 -13
  31. package/.claude/hooks/format-hook.sh +105 -17
  32. package/.claude/hooks/hook-logger.sh +121 -7
  33. package/.claude/hooks/knowledge-post.py +136 -32
  34. package/.claude/hooks/knowledge-pre.py +129 -34
  35. package/.claude/hooks/notification-hook.sh +184 -17
  36. package/.claude/hooks/root-cleanup.py +181 -39
  37. package/.claude/hooks/security-hook.sh +248 -8
  38. package/.claude/hooks/tag-all-docs.py +175 -49
  39. package/.claude/hooks/test-validate-ontology.sh +170 -0
  40. package/.claude/hooks/todo.py +92 -22
  41. package/.claude/hooks/validate-ontology-structure-summary.md +243 -0
  42. package/.claude/hooks/validate-ontology-structure.py +83 -20
  43. package/AGENTS.md +60 -245
  44. package/CLAUDE.md +70 -1
  45. package/README.md +25 -0
  46. package/one/.claude/settings.local.json +11 -0
  47. package/one/.obsidian/community-plugins.json +3 -1
  48. package/one/.obsidian/plugins/editing-toolbar/data.json +328 -0
  49. package/one/.obsidian/plugins/editing-toolbar/main.js +12 -0
  50. package/one/.obsidian/plugins/editing-toolbar/manifest.json +10 -0
  51. package/one/.obsidian/plugins/editing-toolbar/styles.css +1338 -0
  52. package/one/.obsidian/plugins/terminal/data.json +154 -0
  53. package/one/.obsidian/plugins/terminal/main.js +197 -0
  54. package/one/.obsidian/plugins/terminal/manifest.json +14 -0
  55. package/one/.obsidian/plugins/terminal/styles.css +32 -0
  56. package/one/.obsidian/workspace.json +71 -45
  57. package/one/README.md +18 -0
  58. package/one/connections/a2a.md +49 -0
  59. package/one/connections/acp.md +47 -0
  60. package/one/connections/acps.md +18 -0
  61. package/one/connections/agentkit.md +18 -0
  62. package/one/connections/agui.md +18 -0
  63. package/one/connections/any-backend.md +39 -21
  64. package/one/connections/ap2.md +74 -0
  65. package/one/connections/api/queries-reference.md +18 -0
  66. package/one/connections/api-docs.md +18 -0
  67. package/one/connections/api-reference.md +18 -0
  68. package/one/connections/api.md +18 -0
  69. package/one/connections/architecture-diagram.md +18 -0
  70. package/one/connections/communications.md +18 -0
  71. package/one/connections/connections.md +18 -0
  72. package/one/connections/copilotkit.md +18 -0
  73. package/one/connections/cryptonetworks.md +18 -0
  74. package/one/connections/documentation.md +18 -0
  75. package/one/connections/effect.md +18 -0
  76. package/one/connections/elizaos.md +18 -0
  77. package/one/connections/groups.md +814 -0
  78. package/one/connections/inference.md +18 -0
  79. package/one/connections/integration-examples.md +18 -0
  80. package/one/connections/integration-guide.md +18 -0
  81. package/one/connections/integration-phase2.md +32 -14
  82. package/one/connections/kyc.md +18 -0
  83. package/one/connections/mcp.md +18 -0
  84. package/one/connections/membership.md +18 -0
  85. package/one/connections/middleware.md +18 -0
  86. package/one/connections/multitenant.md +18 -0
  87. package/one/connections/n8n.md +18 -0
  88. package/one/connections/patterns.md +18 -0
  89. package/one/connections/protocols.md +20 -2
  90. package/one/connections/relationships.md +18 -0
  91. package/one/connections/schema.md +18 -0
  92. package/one/connections/service-layer.md +18 -0
  93. package/one/connections/vectors.md +18 -0
  94. package/one/connections/wordpress.md +18 -0
  95. package/one/connections/workflow-copy.md +18 -0
  96. package/one/connections/workflow-examples.md +18 -0
  97. package/one/connections/workflow-onboarding.md +18 -0
  98. package/one/connections/workflow.md +18 -0
  99. package/one/connections/workflows/delegation.md +18 -0
  100. package/one/connections/workflows/frontend.md +18 -0
  101. package/one/connections/workflows/strategy.md +18 -0
  102. package/one/connections/workflows/tasks.md +18 -0
  103. package/one/connections/x402-baazar.md +131 -0
  104. package/one/connections/x402.md +268 -164
  105. package/one/events/2024-10-14-deployment-plan.md +15 -16
  106. package/one/events/2024-10-14-deployment-success.md +15 -16
  107. package/one/events/2024-10-14-final-sync-complete.md +15 -16
  108. package/one/events/2024-10-14-release-v2.0.6.md +15 -16
  109. package/one/events/2024-10-15-agent-clean-v2-summary.md +15 -16
  110. package/one/events/2024-10-15-handoff-to-clean.md +15 -16
  111. package/one/events/2024-10-15-package-manager-tests.md +15 -16
  112. package/one/events/2024-10-15-release-command-complete.md +15 -16
  113. package/one/events/2025-10-15-private-files-secured.md +18 -0
  114. package/one/events/2025-10-15-unignore-public-group-docs.md +18 -0
  115. package/one/events/ALIGNMENT_REPORT_PROBLEM_SOLVER.md +335 -0
  116. package/one/events/ALIGNMENT_SUMMARY.md +280 -0
  117. package/one/events/API_ROUTES_FIXES_SUMMARY.md +18 -0
  118. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +18 -0
  119. package/one/events/AUDIT-ONTOLOGY-ALIGNMENT.md +598 -0
  120. package/one/events/BEFORE_AFTER_COMPARISON.md +18 -0
  121. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +18 -0
  122. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +18 -0
  123. package/one/events/CLAUDE copy.md +897 -0
  124. package/one/events/CLEANUP-RELEASE-V2.0.8.md +18 -0
  125. package/one/events/CONNECTIONS_DEMO.md +18 -0
  126. package/one/events/CREATE-WEBSITE.md +18 -0
  127. package/one/events/CRITICAL-FIXES-COMPLETE.md +18 -0
  128. package/one/events/CUSTOM-DOMAIN.md +18 -0
  129. package/one/events/DELIVERABLES.md +18 -0
  130. package/one/events/DEMO-GROUPS-PAGE.md +18 -0
  131. package/one/events/DEMO-TESTING-SUMMARY.md +18 -0
  132. package/one/events/DEMO_COMPONENTS.md +18 -0
  133. package/one/events/DEMO_HOOKS_INDEX.md +18 -0
  134. package/one/events/DEMO_INFRASTRUCTURE.md +18 -0
  135. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +18 -0
  136. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +18 -0
  137. package/one/events/DEMO_QUICK_REFERENCE.md +18 -0
  138. package/one/events/DEMO_SETUP.md +18 -0
  139. package/one/events/DEPLOYMENT copy.md +18 -0
  140. package/one/events/DEPLOYMENT.md +18 -0
  141. package/one/events/ECOMMERCE-BEFORE-AFTER.md +16 -0
  142. package/one/events/ECOMMERCE-DEMO-PLAN.md +18 -0
  143. package/one/events/ECOMMERCE-ENHANCEMENTS.md +18 -0
  144. package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +18 -0
  145. package/one/events/ECOMMERCE-LIVE-DEMO.md +18 -0
  146. package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +18 -0
  147. package/one/events/ECOMMERCE-SETUP-SUMMARY.md +18 -0
  148. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +18 -0
  149. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +18 -0
  150. package/one/events/EFFECT_TS_API_PATTERN.md +18 -0
  151. package/one/events/FEATURE-2-4-COMPLETE.md +18 -0
  152. package/one/events/FEATURE_2_3_COMPLETE.md +18 -0
  153. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +18 -0
  154. package/one/events/GROUPS-MIGRATION.md +18 -0
  155. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +18 -0
  156. package/one/events/HANDOFF.md +18 -0
  157. package/one/events/HOOKS-DEMO.md +18 -0
  158. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +18 -0
  159. package/one/events/IMPLEMENTATION_SUMMARY.md +18 -0
  160. package/one/events/INSTALL-TESTS.md +18 -0
  161. package/one/events/INSTALLATION_FOLDERS.md +18 -0
  162. package/one/events/INSTALLATION_FOLDERS_FILES.md +18 -0
  163. package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +18 -0
  164. package/one/events/INTEGRATION-ARCHITECTURE.md +18 -0
  165. package/one/events/INTEGRATION-CHECKLIST.md +18 -0
  166. package/one/events/INTEGRATION-ORCHESTRATION.md +18 -0
  167. package/one/events/INTEGRATION-SUMMARY.md +18 -0
  168. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +18 -0
  169. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +18 -0
  170. package/one/events/LANDING-PAGE-QUICKSTART.md +18 -0
  171. package/one/events/LICENSE.md +18 -0
  172. package/one/events/MCP-CONFIGURATION.md +18 -0
  173. package/one/events/MCP-SETUP-COMPLETE.md +18 -0
  174. package/one/events/MIGRATION-REPORT.md +18 -0
  175. package/one/events/MIGRATION.md +18 -0
  176. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +18 -0
  177. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +18 -0
  178. package/one/events/NODE-UPGRADE.md +18 -0
  179. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +18 -0
  180. package/one/events/ONTOLOGY-HOOKS-README.md +18 -0
  181. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +18 -0
  182. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +18 -0
  183. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +18 -0
  184. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +18 -0
  185. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +18 -0
  186. package/one/events/PACKAGE-STRUCTURE.md +18 -0
  187. package/one/events/PLAYBOOK-SETUP-SUMMARY.md +18 -0
  188. package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +18 -0
  189. package/one/events/QA-CHECKLIST.md +18 -0
  190. package/one/events/QUICK-START-ONTOLOGY.md +18 -0
  191. package/one/events/README-archived.md +18 -0
  192. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +18 -0
  193. package/one/events/SEARCH_DEMO_DELIVERY.md +18 -0
  194. package/one/events/SEARCH_DEMO_SUMMARY.md +18 -0
  195. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +18 -0
  196. package/one/events/SECURITY-AUDIT-FIXES.md +18 -0
  197. package/one/events/SECURITY-SCAN-COMPLETE.md +18 -0
  198. package/one/events/SHOP-BUILD-STATUS.md +18 -0
  199. package/one/events/SHOP-PREMIUM-UPDATE.md +16 -0
  200. package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +18 -0
  201. package/one/events/SITE-WIDE-GRADIENT-FIX.md +18 -0
  202. package/one/events/STORE-PRODUCTION-READY-STATUS.md +18 -0
  203. package/one/events/STRIPE-INTEGRATION.md +18 -0
  204. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +18 -0
  205. package/one/events/STRIPE-SETUP-GUIDE.md +18 -0
  206. package/one/events/TEST-PLAN-INDEX.md +18 -0
  207. package/one/events/TEST-PLAN.md +18 -0
  208. package/one/events/TEST-SUMMARY.md +18 -0
  209. package/one/events/TESTS-QUICK-REF.md +18 -0
  210. package/one/events/TRANSITIONS-QUICK-START.md +18 -0
  211. package/one/events/TRANSPARENCY-FIXES.md +18 -0
  212. package/one/events/TYPESCRIPT_FIXES.md +18 -0
  213. package/one/events/TYPESCRIPT_FIXES_INDEX.md +18 -0
  214. package/one/events/VIEW-TRANSITIONS.md +18 -0
  215. package/one/events/agent-director-enhancement-summary.md +18 -0
  216. package/one/events/agent-onboard-implementation-summary.md +18 -0
  217. package/one/events/agent-ontology-alignment-completion.md +263 -0
  218. package/one/events/backend-integration-tests.md +18 -0
  219. package/one/events/clean-agent-ontology-cleanup-report.md +18 -0
  220. package/one/events/clean-agent-todo-analysis-summary.md +336 -0
  221. package/one/events/cloudflare-automation-complete.md +18 -0
  222. package/one/events/cloudflare-pages-infrastructure-setup.md +18 -0
  223. package/one/events/contact-page-complete.md +18 -0
  224. package/one/events/convex-analysis-index.md +18 -0
  225. package/one/events/convex-structure-analysis.md +18 -0
  226. package/one/events/deployment-installation-folders.md +18 -0
  227. package/one/events/deployment-ops-summary.md +18 -0
  228. package/one/events/deployment-verification.md +18 -0
  229. package/one/events/design-spec-complete.md +18 -0
  230. package/one/events/documentation-audit-index.md +473 -0
  231. package/one/events/documentation-audit-summary.md +417 -0
  232. package/one/events/documentation-improvement-roadmap.md +906 -0
  233. package/one/events/documentation-standards-compliance-report.md +538 -0
  234. package/one/events/events.md +18 -0
  235. package/one/events/frontend-effects-complete.md +584 -0
  236. package/one/events/frontend-effects-orchestration.md +1356 -0
  237. package/one/events/frontend-effects-risk-register.md +1055 -0
  238. package/one/events/frontend-effects-week1-assignments.md +1594 -0
  239. package/one/events/hook-ontology-alignment-summary.md +528 -0
  240. package/one/events/installation-folders-workflow-integration.md +18 -0
  241. package/one/events/landing-page-generator.md +18 -0
  242. package/one/events/legal-assessment-2025-10-16.md +18 -0
  243. package/one/events/onboarding-implementation-complete.md +18 -0
  244. package/one/events/ontology-test-examples.md +18 -0
  245. package/one/events/phase1-backend-implementation-complete.md +18 -0
  246. package/one/events/release.md +18 -0
  247. package/one/events/root-cleanup-alignment-report.md +265 -0
  248. package/one/events/separate-implementation-status.md +18 -0
  249. package/one/events/session-summary-2025-10-18.md +18 -0
  250. package/one/events/skills-complete.md +18 -0
  251. package/one/events/skills-infer-6-10-summary.md +18 -0
  252. package/one/events/skills-phase1-complete.md +18 -0
  253. package/one/events/structural-analysis-architecture-vs-plans.md +559 -0
  254. package/one/events/test-dashboard.md +18 -0
  255. package/one/events/test-index.md +18 -0
  256. package/one/events/test-report-ontology.md +18 -0
  257. package/one/events/testing-summary.md +18 -0
  258. package/one/events/todo-refactoring-complete.md +408 -0
  259. package/one/events/wave1-backend-implementation-complete.md +698 -0
  260. package/one/groups/features.md +26 -0
  261. package/one/groups/groups.md +83 -39
  262. package/one/groups/one.md +47 -27
  263. package/one/groups/{strategy copy.md → strategy-copy.md} +23 -5
  264. package/one/knowledge/.obsidian/ecommerce-ontology.md +18 -0
  265. package/one/knowledge/100-inference-quick-reference.md +18 -0
  266. package/one/knowledge/agent-onboard-usage.md +18 -0
  267. package/one/knowledge/agentic-commerce.md +146 -0
  268. package/one/knowledge/ai-agents-vs-memecoins-thesis.md +683 -0
  269. package/one/knowledge/ai-platform.md +18 -0
  270. package/one/knowledge/ai-token-crypto-analysis-framework.md +1191 -0
  271. package/one/knowledge/ai-token-paradigm-shift-2025.md +732 -0
  272. package/one/knowledge/altcoin-cycle-prediction-ontology.md +884 -0
  273. package/one/knowledge/altcoin-cycle-trading-strategy.md +642 -0
  274. package/one/knowledge/architecture-any-backend.md +265 -42
  275. package/one/knowledge/architecture-diagram.md +404 -94
  276. package/one/knowledge/architecture-frontend.md +130 -51
  277. package/one/knowledge/architecture.md +1496 -1831
  278. package/one/knowledge/{ontology.md.backup → archived/ontology.old.md} +18 -0
  279. package/one/knowledge/astro-effect-complete-vision.md +2148 -0
  280. package/one/knowledge/astro-effect-simple-architecture.md +717 -0
  281. package/one/knowledge/audit-agent-onboard-alignment.md +481 -0
  282. package/one/knowledge/audit-agent-sales-alignment.md +444 -0
  283. package/one/knowledge/backend-api-reference.md +18 -0
  284. package/one/knowledge/cli-claude-handoff.md +18 -0
  285. package/one/knowledge/context-engineering.md +610 -0
  286. package/one/knowledge/crypto-analysis-strategy.md +1276 -0
  287. package/one/knowledge/crypto-cycle-2024-2025-analysis.md +44 -0
  288. package/one/knowledge/crypto.md +18 -0
  289. package/one/knowledge/docs.md +627 -0
  290. package/one/knowledge/dsl.md +18 -0
  291. package/one/knowledge/files.md +18 -0
  292. package/one/knowledge/frontend.md +18 -0
  293. package/one/knowledge/hono.md +18 -0
  294. package/one/knowledge/implementation-examples.md +18 -0
  295. package/one/knowledge/installation-folders.md +18 -0
  296. package/one/knowledge/institutional-cycle-paradigm-2025.md +555 -0
  297. package/one/knowledge/knowledge.md +18 -0
  298. package/one/knowledge/language.md +18 -0
  299. package/one/knowledge/lessons-learned.md +18 -0
  300. package/one/knowledge/lessons-website-building-focus.md +18 -0
  301. package/one/knowledge/merge-report.md +254 -0
  302. package/one/knowledge/nine-padel-playbook.md +18 -0
  303. package/one/knowledge/ontology-blog.yaml +42 -26
  304. package/one/knowledge/ontology-cheatsheet.md +18 -0
  305. package/one/knowledge/ontology-community.yaml +60 -37
  306. package/one/knowledge/ontology-core-universal.md +19 -1
  307. package/one/knowledge/ontology-core.yaml +58 -45
  308. package/one/knowledge/ontology-courses.yaml +71 -48
  309. package/one/knowledge/ontology-creator.md +30 -4
  310. package/one/knowledge/ontology-crypto.md +1603 -0
  311. package/one/knowledge/ontology-developer-guide.md +18 -0
  312. package/one/knowledge/ontology-documentation.md +46 -25
  313. package/one/knowledge/ontology-ecommerce.md +24 -6
  314. package/one/knowledge/ontology-education.md +18 -0
  315. package/one/knowledge/ontology-engineering-specification.md +22 -4
  316. package/one/knowledge/ontology-engineering.md +67 -43
  317. package/one/knowledge/ontology-files.yaml +525 -0
  318. package/one/knowledge/ontology-frontend-master.md +2898 -0
  319. package/one/knowledge/ontology-frontend-specifications.md +57 -49
  320. package/one/knowledge/ontology-frontend.md +40 -22
  321. package/one/knowledge/ontology-index.md +18 -0
  322. package/one/knowledge/ontology-minimal.yaml +18 -16
  323. package/one/knowledge/ontology-portfolio.yaml +40 -26
  324. package/one/knowledge/ontology-quickstart.md +18 -0
  325. package/one/knowledge/ontology-release.md +317 -0
  326. package/one/knowledge/ontology-shop.yaml +146 -119
  327. package/one/knowledge/ontology-tokens.yaml +46 -27
  328. package/one/knowledge/ontology-tutorial.md +18 -0
  329. package/one/knowledge/ontology-video-script.md +18 -0
  330. package/one/knowledge/ontology-visual-guide.md +20 -2
  331. package/one/knowledge/ontology.md +1329 -304
  332. package/one/knowledge/ontology.yaml +763 -275
  333. package/one/knowledge/patterns/backend/convex-mutation-pattern.md +48 -18
  334. package/one/knowledge/patterns/backend/convex-query-pattern.md +78 -23
  335. package/one/knowledge/patterns/backend/mutation-template.md +28 -10
  336. package/one/knowledge/patterns/backend/query-template.md +44 -25
  337. package/one/knowledge/patterns/backend/service-template.md +35 -14
  338. package/one/knowledge/patterns/design/component-architecture.md +45 -9
  339. package/one/knowledge/patterns/design/test-driven-design-pattern.md +37 -3
  340. package/one/knowledge/patterns/design/wireframe-template.md +36 -2
  341. package/one/knowledge/patterns/frontend/component-template.md +91 -40
  342. package/one/knowledge/patterns/frontend/form-template.md +131 -59
  343. package/one/knowledge/patterns/frontend/page-template.md +59 -28
  344. package/one/knowledge/patterns/frontend/react-component-pattern.md +87 -27
  345. package/one/knowledge/patterns/test/acceptance-criteria-template.md +28 -10
  346. package/one/knowledge/patterns/test/technical-test-template.md +48 -26
  347. package/one/knowledge/patterns/test/test-driven-pattern.md +25 -5
  348. package/one/knowledge/patterns/test/user-flow-template.md +18 -0
  349. package/one/knowledge/provider-agnostic-content.md +995 -0
  350. package/one/knowledge/provider-creation-guide.md +18 -0
  351. package/one/knowledge/quality-loop.md +18 -0
  352. package/one/knowledge/readme-architecture.md +158 -0
  353. package/one/knowledge/readme.md +18 -0
  354. package/one/knowledge/rules.md +18 -0
  355. package/one/knowledge/score.md +18 -0
  356. package/one/knowledge/specifications.md +18 -0
  357. package/one/knowledge/tags.md +18 -0
  358. package/one/knowledge/todo-template.md +18 -0
  359. package/one/knowledge/todo.md +18 -0
  360. package/one/knowledge/typescript-patterns.md +18 -0
  361. package/one/knowledge/universal-generation-language.md +827 -0
  362. package/one/knowledge/x402-research.md +104 -0
  363. package/one/license.md +18 -0
  364. package/one/people/anthony-o-connell.md +48 -19
  365. package/one/people/people.md +54 -31
  366. package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +401 -0
  367. package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +588 -0
  368. package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +461 -0
  369. package/one/things/CHECKLIST.md +51 -0
  370. package/one/things/IMPLEMENTATION_STATUS.md +379 -0
  371. package/one/things/ONE.md +19 -1
  372. package/one/things/agents/agent-backend.md +198 -98
  373. package/one/things/agents/agent-builder.md +267 -158
  374. package/one/things/agents/agent-clean.md +40 -15
  375. package/one/things/agents/agent-clone.md +33 -50
  376. package/one/things/agents/agent-deploy.md +59 -11
  377. package/one/things/agents/agent-designer.md +274 -146
  378. package/one/things/agents/agent-director.md +20 -2
  379. package/one/things/agents/agent-documenter.md +126 -46
  380. package/one/things/agents/agent-frontend.md +104 -22
  381. package/one/things/agents/agent-integrator.md +153 -76
  382. package/one/things/agents/agent-lawyer.md +197 -92
  383. package/one/things/agents/agent-problem-solver.md +302 -224
  384. package/one/things/agents/agent-quality.md +149 -19
  385. package/one/things/agents/agent-sales.md +95 -7
  386. package/one/things/cascade/cascade.yaml +20 -3
  387. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +53 -0
  388. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +50 -0
  389. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +76 -0
  390. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +49 -3
  391. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +45 -0
  392. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +32 -0
  393. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +45 -3
  394. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +44 -0
  395. package/one/things/cascade/docs/examples/1-3-event-coordination.md +40 -1
  396. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +81 -25
  397. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +41 -0
  398. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +91 -16
  399. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +136 -73
  400. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +43 -0
  401. package/one/things/cascade/docs/examples/1-5-quality-loops.md +88 -4
  402. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +52 -3
  403. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +44 -1
  404. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +78 -14
  405. package/one/things/cascade/docs/examples/readme.md +37 -0
  406. package/one/things/cascade/docs/getting-started.md +18 -0
  407. package/one/things/cascade/docs/workflow.md +18 -12
  408. package/one/things/cascade/readme.md +43 -0
  409. package/one/things/cascade/templates/feature-template.md +28 -6
  410. package/one/things/claude/agents/advocacy-activation-manager.md +64 -39
  411. package/one/things/claude/agents/advocacy-campaign-designer.md +64 -39
  412. package/one/things/claude/agents/analyst.md +64 -39
  413. package/one/things/claude/agents/architect.md +64 -39
  414. package/one/things/claude/agents/brand-identity-specialist.md +64 -39
  415. package/one/things/claude/agents/bstp-token-strategist.md +48 -25
  416. package/one/things/claude/agents/builder-repo.md +69 -26
  417. package/one/things/claude/agents/bullstamp-community-builder.md +48 -25
  418. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +48 -25
  419. package/one/things/claude/agents/bulltilt-platform-growth.md +48 -25
  420. package/one/things/claude/agents/company-bullstamp-character.md +45 -30
  421. package/one/things/claude/agents/company-bullstamp-community.md +45 -30
  422. package/one/things/claude/agents/company-bullstamp-marketing.md +45 -30
  423. package/one/things/claude/agents/company-bullstamp-token.md +45 -30
  424. package/one/things/claude/agents/company-bulltilt-growth.md +45 -30
  425. package/one/things/claude/agents/content-bibliography-formatter.md +48 -25
  426. package/one/things/claude/agents/content-calendar-planner.md +59 -34
  427. package/one/things/claude/agents/content-chapter-formatter.md +60 -35
  428. package/one/things/claude/agents/content-formatter.md +59 -34
  429. package/one/things/claude/agents/content-hook-specialist.md +54 -31
  430. package/one/things/claude/agents/content-image-formatter.md +59 -34
  431. package/one/things/claude/agents/content-introduction-formatter.md +59 -34
  432. package/one/things/claude/agents/content-multiplication-engine.md +54 -31
  433. package/one/things/claude/agents/content-playbook-writer.md +60 -35
  434. package/one/things/claude/agents/content-team-manager.md +59 -34
  435. package/one/things/claude/agents/content-toc-formatter.md +60 -35
  436. package/one/things/claude/agents/convex-backend-specialist.md +380 -216
  437. package/one/things/claude/agents/core-manager.md +59 -34
  438. package/one/things/claude/agents/core-master.md +55 -32
  439. package/one/things/claude/agents/cross-functional-manager.md +46 -41
  440. package/one/things/claude/agents/crypto-airdrop-strategist.md +74 -54
  441. package/one/things/claude/agents/crypto-analytics-educator.md +73 -30
  442. package/one/things/claude/agents/crypto-architecture-specialist.md +70 -39
  443. package/one/things/claude/agents/crypto-community-analyst.md +47 -31
  444. package/one/things/claude/agents/crypto-community-psychologist.md +68 -31
  445. package/one/things/claude/agents/crypto-dex-optimization-expert.md +72 -31
  446. package/one/things/claude/agents/crypto-dex-optimizer.md +45 -30
  447. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +69 -30
  448. package/one/things/claude/agents/crypto-diamond-hands.md +45 -30
  449. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +73 -30
  450. package/one/things/claude/agents/crypto-engagement-specialist.md +71 -30
  451. package/one/things/claude/agents/crypto-market-researcher.md +45 -30
  452. package/one/things/claude/agents/crypto-marketing-orchestrator.md +74 -34
  453. package/one/things/claude/agents/crypto-network-effect-amplifier.md +75 -30
  454. package/one/things/claude/agents/crypto-optimization-analyst.md +73 -30
  455. package/one/things/claude/agents/crypto-strategic-synthesizer.md +69 -30
  456. package/one/things/claude/agents/crypto-team-manager.md +45 -40
  457. package/one/things/claude/agents/crypto-token-analyst.md +66 -25
  458. package/one/things/claude/agents/crypto-viral-content-creator.md +64 -61
  459. package/one/things/claude/agents/crypto-wallet-identification-expert.md +61 -51
  460. package/one/things/claude/agents/crypto-wallet-identifier.md +45 -30
  461. package/one/things/claude/agents/customer-journey-designer.md +51 -58
  462. package/one/things/claude/agents/customer-success-manager.md +51 -58
  463. package/one/things/claude/agents/dev.md +51 -58
  464. package/one/things/claude/agents/documenter.md +71 -69
  465. package/one/things/claude/agents/elevate-marketing-orchestrator.md +45 -52
  466. package/one/things/claude/agents/engagement-specialist.md +45 -52
  467. package/one/things/claude/agents/engineering-architect.md +54 -54
  468. package/one/things/claude/agents/engineering-business-analyst.md +46 -56
  469. package/one/things/claude/agents/engineering-developer.md +51 -52
  470. package/one/things/claude/agents/engineering-director.md +65 -25
  471. package/one/things/claude/agents/engineering-ingestor.md +110 -100
  472. package/one/things/claude/agents/engineering-product-manager.md +43 -55
  473. package/one/things/claude/agents/engineering-product-owner.md +46 -56
  474. package/one/things/claude/agents/engineering-project-coordinator.md +44 -56
  475. package/one/things/claude/agents/engineering-quality-assurance.md +53 -54
  476. package/one/things/claude/agents/engineering-team-manager.md +46 -43
  477. package/one/things/claude/agents/engineering-user-experience.md +51 -52
  478. package/one/things/claude/agents/framework-elevate-manager.md +45 -30
  479. package/one/things/claude/agents/improver.md +120 -78
  480. package/one/things/claude/agents/intelligence-team-manager.md +45 -40
  481. package/one/things/claude/agents/lead-capture-expert.md +45 -52
  482. package/one/things/claude/agents/lead-magnet-creator.md +45 -52
  483. package/one/things/claude/agents/market-research-analyst.md +48 -25
  484. package/one/things/claude/agents/marketing-brand-identity.md +57 -27
  485. package/one/things/claude/agents/marketing-content-hooks.md +45 -40
  486. package/one/things/claude/agents/marketing-content-multiplier.md +45 -40
  487. package/one/things/claude/agents/marketing-content-poster.md +71 -60
  488. package/one/things/claude/agents/marketing-customer-journey.md +45 -40
  489. package/one/things/claude/agents/marketing-director.md +46 -41
  490. package/one/things/claude/agents/marketing-engagement.md +45 -40
  491. package/one/things/claude/agents/marketing-lead-capture.md +45 -40
  492. package/one/things/claude/agents/marketing-lead-magnet.md +45 -40
  493. package/one/things/claude/agents/marketing-network-effects.md +45 -40
  494. package/one/things/claude/agents/marketing-nurture-campaigns.md +45 -40
  495. package/one/things/claude/agents/marketing-share-optimizer.md +45 -40
  496. package/one/things/claude/agents/marketing-team-manager.md +45 -40
  497. package/one/things/claude/agents/marketing-viral-growth.md +49 -18
  498. package/one/things/claude/agents/mission-commander.md +45 -40
  499. package/one/things/claude/agents/network-effect-analyst.md +48 -31
  500. package/one/things/claude/agents/nextjs-15-specialist.md +209 -122
  501. package/one/things/claude/agents/npx.md +126 -70
  502. package/one/things/claude/agents/nurture-campaign-manager.md +48 -25
  503. package/one/things/claude/agents/one-master.md +48 -25
  504. package/one/things/claude/agents/one-orchestrator.md +57 -27
  505. package/one/things/claude/agents/one.md +88 -31
  506. package/one/things/claude/agents/playbook-generator.md +48 -25
  507. package/one/things/claude/agents/pm.md +48 -25
  508. package/one/things/claude/agents/po.md +51 -26
  509. package/one/things/claude/agents/qa.md +50 -25
  510. package/one/things/claude/agents/research-foundation-analyst.md +48 -31
  511. package/one/things/claude/agents/research-intelligence-gatherer.md +59 -32
  512. package/one/things/claude/agents/research-market-analyst.md +47 -30
  513. package/one/things/claude/agents/research-team-manager.md +47 -40
  514. package/one/things/claude/agents/sales-environment-optimizer.md +50 -25
  515. package/one/things/claude/agents/sales-team-manager.md +47 -40
  516. package/one/things/claude/agents/sales-upsell-strategist.md +47 -30
  517. package/one/things/claude/agents/service-advocacy-campaigns.md +47 -30
  518. package/one/things/claude/agents/service-advocacy-manager.md +47 -30
  519. package/one/things/claude/agents/service-success-manager.md +47 -30
  520. package/one/things/claude/agents/service-team-manager.md +45 -40
  521. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +85 -30
  522. package/one/things/claude/agents/share-optimization-specialist.md +50 -25
  523. package/one/things/claude/agents/sm.md +50 -25
  524. package/one/things/claude/agents/story-teller.md +51 -26
  525. package/one/things/claude/agents/task-master.md +52 -27
  526. package/one/things/claude/agents/tauri-cross-platform-specialist.md +201 -116
  527. package/one/things/claude/agents/tester.md +85 -46
  528. package/one/things/claude/agents/the-bull-character-manager.md +48 -25
  529. package/one/things/claude/agents/tools-playbook-generator.md +43 -40
  530. package/one/things/claude/agents/turbo-repo-builder.md +57 -27
  531. package/one/things/claude/agents/upsell-strategist.md +48 -25
  532. package/one/things/claude/agents/ux-expert.md +50 -25
  533. package/one/things/claude/agents/viral-growth-orchestrator.md +50 -27
  534. package/one/things/claude/commands/agent.md +25 -5
  535. package/one/things/claude/commands/cascade-status.md +33 -8
  536. package/one/things/claude/commands/ingest.md +64 -11
  537. package/one/things/claude/commands/ingestor.md +29 -7
  538. package/one/things/claude/commands/mission.md +24 -4
  539. package/one/things/claude/commands/npx.md +30 -7
  540. package/one/things/claude/commands/one.md +114 -68
  541. package/one/things/claude/commands/quality-check.md +72 -24
  542. package/one/things/claude/commands/smart-route.md +45 -4
  543. package/one/things/claude/commands/start.md +22 -4
  544. package/one/things/claude/commands/story.md +25 -5
  545. package/one/things/claude/commands/task.md +21 -1
  546. package/one/things/cli/cli-code.md +244 -219
  547. package/one/things/cli/cli-compiler-code.md +244 -219
  548. package/one/things/cli/cli.md +30 -6
  549. package/one/things/components/card-shadcn.md +252 -228
  550. package/one/things/components/card.md +315 -324
  551. package/one/things/components.md +667 -593
  552. package/one/things/componets.md +16 -1
  553. package/one/things/creator-diagram.md +23 -5
  554. package/one/things/demo-accessibility-animations.md +73 -47
  555. package/one/things/demo-components.md +225 -219
  556. package/one/things/demo-design-summary.md +89 -26
  557. package/one/things/demo-design-system.md +184 -130
  558. package/one/things/demo-page-layouts.md +52 -25
  559. package/one/things/designs/accessibility-audit.md +153 -66
  560. package/one/things/designs/component-specifications.md +163 -65
  561. package/one/things/designs/design-overview.md +81 -22
  562. package/one/things/designs/design-tokens.md +127 -93
  563. package/one/things/designs/wireframes-dashboard.md +64 -7
  564. package/one/things/docs/api-requests.md +75 -11
  565. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +18 -0
  566. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +57 -0
  567. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +62 -6
  568. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +60 -5
  569. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +95 -27
  570. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +130 -62
  571. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +43 -19
  572. package/one/things/docs/ecommerce/QUICK-START.md +41 -4
  573. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +75 -6
  574. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +58 -24
  575. package/one/things/examples/children/lemonade-stand.md +52 -14
  576. package/one/things/examples/enterprise/crm-saas.md +43 -28
  577. package/one/things/features/1-1-agent-prompts.md +76 -0
  578. package/one/things/features/1-2-yaml-orchestrator.md +32 -0
  579. package/one/things/features/1-3-event-coordination.md +40 -1
  580. package/one/things/features/1-4-knowledge-management.md +91 -16
  581. package/one/things/features/1-5-quality-loops.md +88 -4
  582. package/one/things/features/1-6-numbering-structure.md +78 -14
  583. package/one/things/features/2-1-dataprovider-interface.md +311 -86
  584. package/one/things/features/2-2-config-system.md +307 -140
  585. package/one/things/features/2-3-effectts-services.md +263 -116
  586. package/one/things/features/2-4-react-hooks.md +217 -201
  587. package/one/things/features/2-5-auth-migration.md +406 -308
  588. package/one/things/features/2-6-dashboard-migration.md +112 -13
  589. package/one/things/features/2-7-alternative-providers.md +138 -65
  590. package/one/things/features/2-7-implementation-report.md +68 -24
  591. package/one/things/features/2-cli.md +88 -76
  592. package/one/things/features/2-design.md +112 -80
  593. package/one/things/features/2-tests.md +56 -0
  594. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +91 -36
  595. package/one/things/features/DECOUPLING.md +36 -18
  596. package/one/things/features/DEPLOYMENT.md +22 -4
  597. package/one/things/features/IMPLEMENTATION_SUMMARY.md +48 -2
  598. package/one/things/features/improve.md +47 -29
  599. package/one/things/features/remove-convex-deps.md +18 -0
  600. package/one/things/features/top-features.md +28 -20
  601. package/one/things/features/use-one-backend.md +210 -173
  602. package/one/things/features-in-english.md +19 -6
  603. package/one/things/files.yaml +721 -0
  604. package/one/things/ideas/1-create-workflow.md +18 -0
  605. package/one/things/ideas/2-backend-agnostic-frontend.md +57 -2
  606. package/one/things/implementation/backend-guide.md +64 -19
  607. package/one/things/interface.md +43 -0
  608. package/one/things/landing-page-implementation.md +455 -0
  609. package/one/things/legal/README.md +44 -0
  610. package/one/things/legal/privacy-policy.md +186 -23
  611. package/one/things/legal/terms-of-service.md +164 -3
  612. package/one/things/master-workflow-plan.md +806 -0
  613. package/one/things/plans/0-timeline.md +36 -0
  614. package/one/things/plans/1-create-workflow.md +19 -0
  615. package/one/things/plans/QUICK-START-SIMPLIFICATION.md +333 -0
  616. package/one/things/plans/README-SIMPLIFICATION.md +349 -0
  617. package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +16 -0
  618. package/one/things/plans/SIMPLIFICATION-SUMMARY.md +455 -0
  619. package/one/things/plans/ai-elements.md +21 -2
  620. package/one/things/plans/ai-integration.md +108 -59
  621. package/one/things/plans/ai-sdk.md +85 -48
  622. package/one/things/plans/ai-tools.md +621 -0
  623. package/one/things/plans/app.md +142 -71
  624. package/one/things/plans/architecture-summary.md +34 -5
  625. package/one/things/plans/async-ai-agents.md +19 -1
  626. package/one/things/plans/backend-agnostic-frontend.md +70 -8
  627. package/one/things/plans/backend-cleanup-quickstart.md +52 -18
  628. package/one/things/plans/backend-ontology-conformance.md +110 -51
  629. package/one/things/plans/backend-status.md +58 -0
  630. package/one/things/plans/backend-structure.md +103 -55
  631. package/one/things/plans/backend-target-structure.md +61 -17
  632. package/one/things/plans/backend.md +60 -18
  633. package/one/things/plans/better-auth-any-backend-revised.md +325 -287
  634. package/one/things/plans/better-auth-any-backend.md +575 -531
  635. package/one/things/plans/better-auth-available-features.md +43 -5
  636. package/one/things/plans/big-plan.md +20 -6
  637. package/one/things/plans/cli-updates-required.md +44 -4
  638. package/one/things/plans/complete-step-by-step.md +223 -116
  639. package/one/things/plans/components.md +709 -0
  640. package/one/things/plans/convex-agents.md +79 -50
  641. package/one/things/plans/convex-better-auth.md +186 -154
  642. package/one/things/plans/convex-on-off.md +47 -29
  643. package/one/things/plans/crypto-token-researcher.md +629 -0
  644. package/one/things/plans/data-quality-metrics.md +745 -0
  645. package/one/things/plans/deep-researcher-agent.md +466 -0
  646. package/one/things/plans/deploy-to-cloudflare.md +55 -13
  647. package/one/things/plans/deployment-architecture.md +54 -11
  648. package/one/things/plans/desktop.md +21 -3
  649. package/one/things/plans/development-plan.md +184 -121
  650. package/one/things/plans/development-workflow-tldr.md +207 -0
  651. package/one/things/plans/development-workflow.md +959 -0
  652. package/one/things/plans/effect-components.md +667 -593
  653. package/one/things/plans/effect-patterns-reference.md +2235 -0
  654. package/one/things/plans/effect.md +204 -131
  655. package/one/things/plans/email.md +21 -8
  656. package/one/things/plans/enhance-auth.md +64 -41
  657. package/one/things/plans/execution-strategy.md +1291 -0
  658. package/one/things/plans/existing-infrastructure.md +712 -0
  659. package/one/things/plans/feature-based-sites.md +124 -51
  660. package/one/things/plans/frontend-effects.md +1276 -0
  661. package/one/things/plans/group-folder-multi-tenancy.md +92 -29
  662. package/one/things/plans/improve-codebase.md +498 -421
  663. package/one/things/plans/install-components.md +18 -1
  664. package/one/things/plans/integrate-frontend-and-backend.md +68 -44
  665. package/one/things/plans/landing.md +92 -0
  666. package/one/things/plans/layout.md +45 -1
  667. package/one/things/plans/mail-backend.md +546 -493
  668. package/one/things/plans/mail.md +379 -326
  669. package/one/things/plans/mcp-clear-context-prompt.md +21 -0
  670. package/one/things/plans/mcp-simple.md +20 -0
  671. package/one/things/plans/multi-ontology-architecture.md +115 -66
  672. package/one/things/plans/next-features.md +31 -0
  673. package/one/things/plans/onboarding.md +20 -1
  674. package/one/things/plans/one.md +18 -0
  675. package/one/things/plans/ontology-6-dimensions.md +24 -45
  676. package/one/things/plans/ontology-compliance-audit.md +315 -0
  677. package/one/things/plans/ontology-driven-strategy.md +19 -3
  678. package/one/things/plans/ontology-refine.md +586 -0
  679. package/one/things/plans/ontology-ui-approach.md +18 -0
  680. package/one/things/plans/open-agent.md +152 -97
  681. package/one/things/plans/performace.md +32 -0
  682. package/one/things/plans/phase-1-foundation.md +620 -0
  683. package/one/things/plans/phase-3-implementation.md +1037 -0
  684. package/one/things/plans/quick-wins.md +342 -187
  685. package/one/things/plans/readme-backend-cleanup.md +54 -13
  686. package/one/things/plans/release.md +55 -2
  687. package/one/things/plans/repos.md +22 -0
  688. package/one/things/plans/separate-copy-2.md +127 -71
  689. package/one/things/plans/separate-copy-3.md +35 -14
  690. package/one/things/plans/separate-copy.md +127 -71
  691. package/one/things/plans/separate-demo.md +37 -3
  692. package/one/things/plans/separate.md +24 -6
  693. package/one/things/plans/sequence.md +155 -12
  694. package/one/things/plans/shadcn-integration-summary.md +104 -44
  695. package/one/things/plans/sidebar.md +44 -10
  696. package/one/things/plans/skills.md +103 -0
  697. package/one/things/plans/small-fixes.md +19 -1
  698. package/one/things/plans/start-new.md +34 -8
  699. package/one/things/plans/switch-off-auth.md +22 -0
  700. package/one/things/plans/sync-checklist.md +30 -0
  701. package/one/things/plans/test-backend-connection.md +38 -0
  702. package/one/things/plans/unified-implementation-plan.md +144 -62
  703. package/one/things/plans/update-demos.md +103 -35
  704. package/one/things/plans/use-our-backend.md +572 -0
  705. package/one/things/plans/wave1-onboarding-100-inferences.md +1686 -0
  706. package/one/things/plans/wave1-onboarding-vision.md +744 -0
  707. package/one/things/plans/wave1-orchestration-summary.md +604 -0
  708. package/one/things/plans/wave1-specialist-assignments.md +1413 -0
  709. package/one/things/plans/workflow-files.md +28 -14
  710. package/one/things/plans/workflow.md +18 -12
  711. package/one/things/products/cascade-landing-page.md +150 -46
  712. package/one/things/products/cascade.md +185 -135
  713. package/one/things/products/context-engineering.md +411 -350
  714. package/one/things/products/onthology.md +15 -0
  715. package/one/things/products/ontology-ui-shadcn.md +375 -353
  716. package/one/things/products/ontology-ui.md +101 -59
  717. package/one/things/products/ontology.md +90 -18
  718. package/one/things/products/sdk.md +181 -165
  719. package/one/things/promptkit.md +70 -43
  720. package/one/things/repos/all-repos.md +0 -0
  721. package/one/things/service-providers-new.md +95 -25
  722. package/one/things/service-providers.md +231 -202
  723. package/one/things/structure.md +532 -0
  724. package/one/things/system.md +18 -0
  725. package/one/things/templates.md +40 -0
  726. package/one/things/tests/2-1-dataprovider-interface.md +103 -31
  727. package/one/things/tests/2-1-test-analysis.md +65 -17
  728. package/one/things/things.md +48 -13
  729. package/one/things/todo-acp-integration.md +744 -0
  730. package/one/things/todo-ai.md +933 -0
  731. package/one/things/todo-api.md +1078 -0
  732. package/one/things/todo-assignment.md +580 -0
  733. package/one/things/todo-buy-chatgpt.md +1450 -0
  734. package/one/things/todo-components.md +1683 -0
  735. package/one/things/todo-connections.md +278 -0
  736. package/one/things/todo-ecommerce-frontend.md +1313 -0
  737. package/one/things/todo-ecommerce.md +569 -0
  738. package/one/things/todo-effects.md +1075 -0
  739. package/one/things/todo-frontend-effects.md +977 -0
  740. package/one/things/todo-landing-page.md +1091 -0
  741. package/one/things/todo-mail.md +1160 -0
  742. package/one/things/todo-master-plan.md +490 -0
  743. package/one/things/todo-onboard.md +666 -0
  744. package/one/things/todo-one-ie.md +538 -0
  745. package/one/things/todo-page.md +606 -0
  746. package/one/things/todo-plans.md +282 -0
  747. package/one/things/todo-projects.md +241 -0
  748. package/one/things/todo-refactoring-plan.md +366 -0
  749. package/one/things/todo-sequence.md +1621 -0
  750. package/one/things/todo-use-our-backend.md +1908 -0
  751. package/one/things/todo-workflow.md +626 -0
  752. package/one/things/todo-x402.md +2047 -0
  753. package/one/things/todo.md +459 -1075
  754. package/one/things/video/scripts-crypto.md +835 -0
  755. package/one/things/video-script-ontology.md +334 -0
  756. package/package.json +1 -1
  757. package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +0 -49
  758. package/one/knowledge/docs/flow.md +0 -0
  759. package/one/knowledge/documentation-summary.md +0 -285
  760. package/one/knowledge/inference-score.md +0 -159
  761. package/one/knowledge/ontology-frontend-copy-2.md +0 -1492
  762. package/one/knowledge/ontology-frontend-copy.md +0 -753
  763. package/one/knowledge/ontology-migration-guide.md +0 -811
  764. package/one/things/features/0 All Features.md +0 -2
  765. package/one/things/plans/1-create-workflow-status.md +0 -555
  766. package/one/things/plans/2-backend-agnostic-frontend.md +0 -546
  767. package/one/things/plans/2-sites.md +0 -895
  768. package/one/things/plans/3-groups.md +0 -735
  769. package/one/things/plans/5-build-frontend.md +0 -0
  770. package/one/things/plans/5-complete.md +0 -17
  771. package/one/things/plans/agent-director-100-inference-plans.md +0 -410
  772. package/one/things/plans/dual-website-strategy.md +0 -612
  773. package/one/things/plans/releases.md +0 -809
@@ -0,0 +1,1908 @@
1
+ ---
2
+ title: Todo Use Our Backend
3
+ dimension: things
4
+ primary_dimension: things
5
+ category: todo-use-our-backend.md
6
+ tags: agent, ai, backend, connections, convex, events, groups, inference, knowledge, ontology
7
+ related_dimensions: connections, events, groups, knowledge, people
8
+ scope: global
9
+ created: 2025-11-03
10
+ updated: 2025-11-03
11
+ version: 1.0.0
12
+ ai_context: |
13
+ This document is part of the things dimension in the todo-use-our-backend.md category.
14
+ Location: one/things/todo-use-our-backend.md
15
+ Purpose: Documents backend api service - 100 inference todo list
16
+ Related dimensions: connections, events, groups, knowledge, people
17
+ For AI agents: Read this to understand todo use our backend.
18
+ ---
19
+
20
+ # Backend API Service - 100 Inference Todo List
21
+
22
+ **Feature:** External API Access to ONE Platform Backend
23
+ **Status:** Planning Complete → Ready for Execution
24
+ **Created:** 2025-10-30
25
+
26
+ ## Overview
27
+
28
+ This document tracks all 100 inferences for implementing the Backend-as-a-Service feature, allowing external developers to consume the ONE Platform backend via API keys with full 6-dimension ontology access and multi-tenant group isolation.
29
+
30
+ ---
31
+
32
+ ## Foundation Phase (Infer 1-10)
33
+
34
+ **Agent:** agent-director
35
+ **Goal:** Validate idea, map to ontology, create execution plan
36
+
37
+ ### ✅ Infer 1: Validate Idea Against 6-Dimension Ontology
38
+
39
+ **Status:** ✅ Complete
40
+ **Task:** Ensure API service maps cleanly to Groups, People, Things, Connections, Events, Knowledge
41
+ **Validation:**
42
+
43
+ - Groups: Multi-tenant isolation per API consumer ✅
44
+ - People: Service accounts and API key owners ✅
45
+ - Things: api_key, api_application, service_account, api_quota entities ✅
46
+ - Connections: owns_api_key, authenticated_by, has_quota ✅
47
+ - Events: api_request_made, api_key_generated, quota_exceeded ✅
48
+ - Knowledge: API docs via RAG, error message search ✅
49
+
50
+ ### ✅ Infer 2: Map Entity Types
51
+
52
+ **Status:** ✅ Complete
53
+ **New Entity Types:**
54
+
55
+ - `api_key` - Credentials with scopes and rate limits
56
+ - `api_application` - Registered app consuming API
57
+ - `api_quota` - Usage limits by billing tier
58
+ - `service_account` - Non-human actor for API requests
59
+
60
+ **Existing Entity Types Accessible:**
61
+
62
+ - All 66+ entity types available through authenticated endpoints
63
+
64
+ ### ✅ Infer 3: Identify Connection Types
65
+
66
+ **Status:** ✅ Complete
67
+ **New Connection Types:**
68
+
69
+ - `owns_api_key` - person → api_key
70
+ - `authenticated_by` - api_application → api_key
71
+ - `belongs_to_org` - api_application → group
72
+ - `has_quota` - api_application → api_quota
73
+
74
+ ### ✅ Infer 4: List Event Types
75
+
76
+ **Status:** ✅ Complete
77
+ **New Event Types:**
78
+
79
+ - `api_key_generated` - New key created
80
+ - `api_key_revoked` - Key invalidated
81
+ - `api_request_made` - Every API call logged
82
+ - `quota_exceeded` - Rate limit hit
83
+ - `api_auth_failed` - Invalid key used
84
+ - `api_application_registered` - New app registered
85
+
86
+ ### ✅ Infer 5: Determine Knowledge Requirements
87
+
88
+ **Status:** ✅ Complete
89
+ **Knowledge Dimension Usage:**
90
+
91
+ - API documentation searchable via RAG
92
+ - Error messages semantically indexed
93
+ - Usage pattern learning for UX improvements
94
+ - Auto-completion suggestions based on context
95
+
96
+ ### ✅ Infer 6: Identify Organization Scope
97
+
98
+ **Status:** ✅ Complete
99
+ **Multi-Tenant Strategy:**
100
+
101
+ - Each API consumer = top-level group (organization)
102
+ - Hierarchical sub-groups allowed for nested tenancy
103
+ - All API requests automatically scoped to authenticated org's groupId
104
+ - Complete data isolation enforced by schema
105
+
106
+ ### ✅ Infer 7: Define People Roles
107
+
108
+ **Status:** ✅ Complete
109
+ **Roles:**
110
+
111
+ - `api_consumer` - External developer with org_owner role
112
+ - `service_account` - Non-human actor representing API application
113
+ - Permissions: read-only, read-write, admin (via API key scopes)
114
+
115
+ ### ✅ Infer 8: Create Vision Document
116
+
117
+ **Status:** ✅ Complete
118
+ **Deliverable:** `/one/things/plans/use-our-backend.md`
119
+ **Content:** Executive summary, architecture, implementation phases, success metrics
120
+
121
+ ### ✅ Infer 9: Break Down Features
122
+
123
+ **Status:** ✅ Complete
124
+ **10 Major Components:**
125
+
126
+ 1. API Key Generation & Management
127
+ 2. Authentication Middleware
128
+ 3. Group Scoping & Isolation
129
+ 4. Rate Limiting & Quotas
130
+ 5. Public API Gateway
131
+ 6. Admin UI for Key Management
132
+ 7. Developer Documentation Portal
133
+ 8. Usage Analytics Dashboard
134
+ 9. SDKs (JS, Python, Go, Ruby)
135
+ 10. Monitoring & Operations
136
+
137
+ ### ✅ Infer 10: Create 100-Inference Plan
138
+
139
+ **Status:** ✅ Complete
140
+ **Deliverable:** This file (`/one/things/todo-use-our-backend.md`)
141
+
142
+ ---
143
+
144
+ ## Backend Phase: Schema Design (Infer 11-15)
145
+
146
+ **Agent:** agent-backend
147
+ **Goal:** Design database schema for API entities
148
+
149
+ ### ⏳ Infer 11: Extend Things Schema with API Entity Types
150
+
151
+ **Status:** Pending
152
+ **Dependencies:** Infer 1-10 (Foundation complete)
153
+ **Task:** Add entity type definitions for api_key, api_application, service_account, api_quota
154
+ **File:** `backend/convex/schema.ts`
155
+ **Acceptance Criteria:**
156
+
157
+ - [ ] `api_key` type with properties: key (hashed), prefix, organizationId, scopes, rateLimit
158
+ - [ ] `api_application` type with properties: name, description, webhookUrl, redirectUris
159
+ - [ ] `service_account` type with properties: applicationId, permissions
160
+ - [ ] `api_quota` type with properties: tier (starter/pro/enterprise), limits, usage stats
161
+ - [ ] All types inherit base fields: \_id, type, name, properties, status, groupId, createdAt, updatedAt
162
+
163
+ ### ⏳ Infer 12: Add Database Indexes for API Key Lookup
164
+
165
+ **Status:** Pending
166
+ **Dependencies:** Infer 11
167
+ **Task:** Create indexes for fast API key validation and lookup
168
+ **File:** `backend/convex/schema.ts`
169
+ **Acceptance Criteria:**
170
+
171
+ - [ ] Index on `things.type` + `things.properties.key` for O(log n) key lookup
172
+ - [ ] Index on `things.type` + `things.properties.organizationId` for org queries
173
+ - [ ] Index on `things.type` + `things.status` for active key filtering
174
+ - [ ] Index on `things.properties.expiresAt` for expired key cleanup
175
+
176
+ ### ⏳ Infer 13: Design Connection Types for API Relationships
177
+
178
+ **Status:** Pending
179
+ **Dependencies:** Infer 11
180
+ **Task:** Add connection type definitions for API entity relationships
181
+ **File:** `backend/convex/schema.ts`
182
+ **Acceptance Criteria:**
183
+
184
+ - [ ] `owns_api_key` connection (person → api_key)
185
+ - [ ] `authenticated_by` connection (api_application → api_key)
186
+ - [ ] `belongs_to_org` connection (api_application → group)
187
+ - [ ] `has_quota` connection (api_application → api_quota)
188
+ - [ ] All connections include bidirectional fields, validFrom/validTo, groupId
189
+
190
+ ### ⏳ Infer 14: Plan Event Types for API Audit Trail
191
+
192
+ **Status:** Pending
193
+ **Dependencies:** Infer 11
194
+ **Task:** Define event schemas for API operations
195
+ **File:** `backend/convex/schema.ts`
196
+ **Acceptance Criteria:**
197
+
198
+ - [ ] `api_key_generated` event with metadata: keyId, scopes, expiresAt
199
+ - [ ] `api_key_revoked` event with metadata: keyId, reason
200
+ - [ ] `api_request_made` event with metadata: endpoint, method, statusCode, latency, payloadSize, ipAddress
201
+ - [ ] `quota_exceeded` event with metadata: keyId, limitType (minute/day), attempted
202
+ - [ ] `api_auth_failed` event with metadata: keyPrefix, reason, ipAddress
203
+ - [ ] `api_application_registered` event with metadata: applicationId, initialScopes
204
+
205
+ ### ⏳ Infer 15: Create Schema Migration Strategy
206
+
207
+ **Status:** Pending
208
+ **Dependencies:** Infer 11-14
209
+ **Task:** Plan backward-compatible schema changes
210
+ **File:** `backend/convex/migrations/add-api-entities.ts`
211
+ **Acceptance Criteria:**
212
+
213
+ - [ ] Migration script to add new entity types without downtime
214
+ - [ ] Validation that existing data not affected
215
+ - [ ] Rollback plan if migration fails
216
+ - [ ] Migration tested on development environment
217
+
218
+ ---
219
+
220
+ ## Backend Phase: Authentication Service (Infer 16-20)
221
+
222
+ **Agent:** agent-backend
223
+ **Goal:** Implement API key generation, validation, and scoping
224
+
225
+ ### ⏳ Infer 16: Implement API Key Generation
226
+
227
+ **Status:** Pending
228
+ **Dependencies:** Infer 15 (Schema ready)
229
+ **Task:** Create secure API key generation service
230
+ **File:** `backend/convex/mutations/api-keys.ts`
231
+ **Acceptance Criteria:**
232
+
233
+ - [ ] Generate cryptographically secure keys (32+ bytes entropy)
234
+ - [ ] Key format: `org_{orgId}_key_{random}` for easy identification
235
+ - [ ] Hash keys before storage (bcrypt or Argon2)
236
+ - [ ] Store only prefix in plaintext for display
237
+ - [ ] Return full key only once at creation
238
+ - [ ] Validate no key collisions
239
+
240
+ **Example:**
241
+
242
+ ```typescript
243
+ export const generateApiKey = mutation({
244
+ args: {
245
+ name: v.string(),
246
+ scopes: v.array(v.string()),
247
+ expiresAt: v.optional(v.number()),
248
+ },
249
+ handler: async (ctx, args) => {
250
+ // Generate key, hash, store, return once
251
+ },
252
+ });
253
+ ```
254
+
255
+ ### ⏳ Infer 17: Create API Key Validation Middleware
256
+
257
+ **Status:** Pending
258
+ **Dependencies:** Infer 16
259
+ **Task:** Build middleware to validate API keys on every request
260
+ **File:** `backend/convex/lib/api-auth.ts`
261
+ **Acceptance Criteria:**
262
+
263
+ - [ ] Extract API key from Authorization header (`Bearer {key}`)
264
+ - [ ] Hash incoming key and compare with stored hash
265
+ - [ ] Verify key status is `active` (not revoked/expired)
266
+ - [ ] Check expiration timestamp if set
267
+ - [ ] Update `lastUsedAt` field on successful auth
268
+ - [ ] Return 401 Unauthorized for invalid keys
269
+ - [ ] Log authentication failures as events
270
+
271
+ **Example:**
272
+
273
+ ```typescript
274
+ export async function validateApiKey(
275
+ ctx: QueryCtx | MutationCtx,
276
+ apiKey: string,
277
+ ): Promise<{ organizationId: Id<"groups">; scopes: string[] }> {
278
+ // Validate and return org + scopes
279
+ }
280
+ ```
281
+
282
+ ### ⏳ Infer 18: Build Scope Verification System
283
+
284
+ **Status:** Pending
285
+ **Dependencies:** Infer 17
286
+ **Task:** Implement fine-grained permission checking based on API key scopes
287
+ **File:** `backend/convex/lib/api-auth.ts`
288
+ **Acceptance Criteria:**
289
+
290
+ - [ ] Define scope hierarchy (e.g., `entities:write` implies `entities:read`)
291
+ - [ ] Check required scopes before allowing operations
292
+ - [ ] Return 403 Forbidden for insufficient scopes
293
+ - [ ] Support wildcard scopes (e.g., `entities:*` for all entity operations)
294
+ - [ ] Log scope violations as events
295
+
296
+ **Available Scopes:**
297
+
298
+ - `entities:read`, `entities:write`, `entities:delete`
299
+ - `connections:read`, `connections:write`, `connections:delete`
300
+ - `events:read`, `events:write`
301
+ - `knowledge:read`, `knowledge:write`
302
+ - `groups:read`, `groups:write`
303
+ - `api_keys:manage`, `quota:view`
304
+
305
+ ### ⏳ Infer 19: Add Rate Limiting
306
+
307
+ **Status:** Pending
308
+ **Dependencies:** Infer 17
309
+ **Task:** Implement rate limiting per API key using @convex-dev/rate-limiter
310
+ **File:** `backend/convex/lib/rate-limit.ts`
311
+ **Acceptance Criteria:**
312
+
313
+ - [ ] Install `@convex-dev/rate-limiter` package
314
+ - [ ] Implement per-minute rate limit (60 req/min for starter)
315
+ - [ ] Implement per-day rate limit (10,000 req/day for starter)
316
+ - [ ] Return 429 Too Many Requests when exceeded
317
+ - [ ] Include `Retry-After` header with reset time
318
+ - [ ] Log quota_exceeded events
319
+ - [ ] Different limits per tier (starter/pro/enterprise)
320
+
321
+ **Example:**
322
+
323
+ ```typescript
324
+ const rateLimiter = new RateLimiter(ctx.db, {
325
+ minute: { kind: "fixed window", rate: 60 },
326
+ day: { kind: "fixed window", rate: 10000 },
327
+ });
328
+
329
+ await rateLimiter.limit(ctx, `api_key:${keyId}`);
330
+ ```
331
+
332
+ ### ⏳ Infer 20: Implement Key Rotation Mechanism
333
+
334
+ **Status:** Pending
335
+ **Dependencies:** Infer 16-19
336
+ **Task:** Allow users to rotate API keys without downtime
337
+ **File:** `backend/convex/mutations/api-keys.ts`
338
+ **Acceptance Criteria:**
339
+
340
+ - [ ] `rotateApiKey` mutation creates new key, marks old as `rotating`
341
+ - [ ] Grace period (e.g., 24 hours) where both keys valid
342
+ - [ ] After grace period, old key automatically revoked
343
+ - [ ] Email notification before old key expires
344
+ - [ ] Log key rotation events
345
+
346
+ ---
347
+
348
+ ## Backend Phase: Group Scoping Service (Infer 21-25)
349
+
350
+ **Agent:** agent-backend
351
+ **Goal:** Ensure complete multi-tenant data isolation
352
+
353
+ ### ⏳ Infer 21: Create Automatic GroupId Injection Middleware
354
+
355
+ **Status:** Pending
356
+ **Dependencies:** Infer 17 (API key validation complete)
357
+ **Task:** Automatically scope all API requests to authenticated organization's groupId
358
+ **File:** `backend/convex/lib/group-scoping.ts`
359
+ **Acceptance Criteria:**
360
+
361
+ - [ ] Extract organizationId from validated API key
362
+ - [ ] Inject `groupId: organizationId` into all mutations/queries
363
+ - [ ] Prevent clients from overriding groupId
364
+ - [ ] Throw error if groupId mismatch detected
365
+ - [ ] Log attempted unauthorized access
366
+
367
+ **Example:**
368
+
369
+ ```typescript
370
+ export function withGroupScoping<T>(
371
+ handler: (
372
+ ctx: MutationCtx,
373
+ args: T & { groupId: Id<"groups"> },
374
+ ) => Promise<any>,
375
+ ) {
376
+ return async (ctx: MutationCtx, args: T) => {
377
+ const { organizationId } = await validateApiKey(ctx, getAuthHeader(ctx));
378
+ return handler(ctx, { ...args, groupId: organizationId });
379
+ };
380
+ }
381
+ ```
382
+
383
+ ### ⏳ Infer 22: Implement Organization Isolation Checks
384
+
385
+ **Status:** Pending
386
+ **Dependencies:** Infer 21
387
+ **Task:** Verify queries/mutations only access data within authenticated organization
388
+ **File:** `backend/convex/lib/group-scoping.ts`
389
+ **Acceptance Criteria:**
390
+
391
+ - [ ] All `ctx.db.query()` calls filtered by groupId
392
+ - [ ] Cross-group queries explicitly blocked
393
+ - [ ] Read operations verify entity belongs to authorized group
394
+ - [ ] Write operations enforce groupId constraint
395
+ - [ ] Delete operations verify ownership before deletion
396
+
397
+ ### ⏳ Infer 23: Build Hierarchical Group Access Rules
398
+
399
+ **Status:** Pending
400
+ **Dependencies:** Infer 22
401
+ **Task:** Allow parent groups to access child group data (configurable)
402
+ **File:** `backend/convex/lib/group-scoping.ts`
403
+ **Acceptance Criteria:**
404
+
405
+ - [ ] Implement `canAccessGroup(actorGroupId, targetGroupId)` function
406
+ - [ ] Walk group hierarchy tree (parentGroupId references)
407
+ - [ ] Cache hierarchy lookups for performance
408
+ - [ ] Respect group settings (`allowParentAccess` boolean)
409
+ - [ ] Log hierarchical access attempts
410
+
411
+ ### ⏳ Infer 24: Add Cross-Group Query Prevention
412
+
413
+ **Status:** Pending
414
+ **Dependencies:** Infer 23
415
+ **Task:** Prevent accidental data leakage via joins/relationships
416
+ **File:** `backend/convex/lib/group-scoping.ts`
417
+ **Acceptance Criteria:**
418
+
419
+ - [ ] Verify all connection endpoints belong to same group
420
+ - [ ] Prevent event queries from crossing group boundaries
421
+ - [ ] Filter knowledge search results by groupId
422
+ - [ ] Validate webhook payloads don't leak cross-group data
423
+ - [ ] Add integration tests for isolation
424
+
425
+ ### ⏳ Infer 25: Implement Audit Logging for API Requests
426
+
427
+ **Status:** Pending
428
+ **Dependencies:** Infer 21-24
429
+ **Task:** Log every API request as an event for security and analytics
430
+ **File:** `backend/convex/lib/api-audit.ts`
431
+ **Acceptance Criteria:**
432
+
433
+ - [ ] Log `api_request_made` event with full metadata
434
+ - [ ] Include: timestamp, endpoint, method, statusCode, latency, payloadSize, ipAddress, userAgent
435
+ - [ ] Async logging (don't block requests)
436
+ - [ ] Retention policy (30 days for starter, 1 year for enterprise)
437
+ - [ ] Export API for audit log retrieval
438
+
439
+ ---
440
+
441
+ ## Backend Phase: API Gateway Layer (Infer 26-30)
442
+
443
+ **Agent:** agent-backend
444
+ **Goal:** Create public REST-style endpoints over Convex HTTP
445
+
446
+ ### ⏳ Infer 26: Create Public API Endpoints
447
+
448
+ **Status:** Pending
449
+ **Dependencies:** Infer 25 (Auth & scoping complete)
450
+ **Task:** Implement RESTful HTTP endpoints for all operations
451
+ **File:** `backend/convex/http.ts`
452
+ **Acceptance Criteria:**
453
+
454
+ - [ ] `POST /api/v1/entities` - Create entity
455
+ - [ ] `GET /api/v1/entities/:id` - Get entity by ID
456
+ - [ ] `GET /api/v1/entities?type={type}` - List entities by type
457
+ - [ ] `PATCH /api/v1/entities/:id` - Update entity
458
+ - [ ] `DELETE /api/v1/entities/:id` - Delete entity
459
+ - [ ] Same pattern for connections, events, groups
460
+ - [ ] All endpoints use API key authentication
461
+ - [ ] All endpoints return JSON
462
+
463
+ **Example:**
464
+
465
+ ```typescript
466
+ const http = httpRouter();
467
+
468
+ http.route({
469
+ path: "/api/v1/entities",
470
+ method: "POST",
471
+ handler: httpAction(async (ctx, request) => {
472
+ const apiKey = extractApiKey(request);
473
+ const { organizationId, scopes } = await validateApiKey(ctx, apiKey);
474
+
475
+ const body = await request.json();
476
+ const entityId = await ctx.runMutation(internal.mutations.entities.create, {
477
+ ...body,
478
+ groupId: organizationId,
479
+ });
480
+
481
+ return new Response(JSON.stringify({ id: entityId }), {
482
+ status: 201,
483
+ headers: { "Content-Type": "application/json" },
484
+ });
485
+ }),
486
+ });
487
+ ```
488
+
489
+ ### ⏳ Infer 27: Implement Request/Response Transformers
490
+
491
+ **Status:** Pending
492
+ **Dependencies:** Infer 26
493
+ **Task:** Transform Convex native types to/from JSON for HTTP
494
+ **File:** `backend/convex/lib/transformers.ts`
495
+ **Acceptance Criteria:**
496
+
497
+ - [ ] Convert Convex Id types to strings in responses
498
+ - [ ] Parse string IDs back to Id types in requests
499
+ - [ ] Handle Date objects (timestamps ↔ ISO 8601 strings)
500
+ - [ ] Transform `properties` field (preserve arbitrary JSON)
501
+ - [ ] Validate request schemas (return 400 Bad Request for invalid)
502
+
503
+ ### ⏳ Infer 28: Add Error Handling with HTTP Status Codes
504
+
505
+ **Status:** Pending
506
+ **Dependencies:** Infer 26
507
+ **Task:** Map errors to appropriate HTTP status codes with helpful messages
508
+ **File:** `backend/convex/lib/error-handler.ts`
509
+ **Acceptance Criteria:**
510
+
511
+ - [ ] 400 Bad Request - Invalid input/schema validation failed
512
+ - [ ] 401 Unauthorized - Missing or invalid API key
513
+ - [ ] 403 Forbidden - Insufficient scopes/permissions
514
+ - [ ] 404 Not Found - Entity doesn't exist or not in org
515
+ - [ ] 429 Too Many Requests - Rate limit exceeded
516
+ - [ ] 500 Internal Server Error - Unexpected errors
517
+ - [ ] Include error code and message in response body
518
+ - [ ] Log all 500 errors to Sentry
519
+
520
+ **Example Response:**
521
+
522
+ ```json
523
+ {
524
+ "error": {
525
+ "code": "INSUFFICIENT_SCOPES",
526
+ "message": "API key requires 'entities:write' scope",
527
+ "statusCode": 403
528
+ }
529
+ }
530
+ ```
531
+
532
+ ### ⏳ Infer 29: Build Response Pagination System
533
+
534
+ **Status:** Pending
535
+ **Dependencies:** Infer 26
536
+ **Task:** Add cursor-based pagination for list endpoints
537
+ **File:** `backend/convex/lib/pagination.ts`
538
+ **Acceptance Criteria:**
539
+
540
+ - [ ] Accept `limit` query param (default 50, max 1000)
541
+ - [ ] Accept `cursor` query param for next page
542
+ - [ ] Return `nextCursor` in response if more results exist
543
+ - [ ] Use Convex paginate() for efficient queries
544
+ - [ ] Document pagination in API reference
545
+
546
+ **Example Response:**
547
+
548
+ ```json
549
+ {
550
+ "data": [...],
551
+ "pagination": {
552
+ "nextCursor": "abc123...",
553
+ "hasMore": true,
554
+ "totalCount": 150
555
+ }
556
+ }
557
+ ```
558
+
559
+ ### ⏳ Infer 30: Create Webhook Delivery System
560
+
561
+ **Status:** Pending
562
+ **Dependencies:** Infer 26-29
563
+ **Task:** Deliver events to customer webhooks in real-time
564
+ **File:** `backend/convex/lib/webhooks.ts`
565
+ **Acceptance Criteria:**
566
+
567
+ - [ ] Accept webhook URL during API application registration
568
+ - [ ] Verify webhook endpoint (send test event on registration)
569
+ - [ ] Deliver events matching subscription filters
570
+ - [ ] Retry failed deliveries (exponential backoff, max 3 retries)
571
+ - [ ] Sign webhook payloads (HMAC-SHA256)
572
+ - [ ] Log delivery attempts and failures
573
+ - [ ] Provide webhook logs in dashboard
574
+
575
+ ---
576
+
577
+ ## Frontend Phase: API Keys Management Page (Infer 31-35)
578
+
579
+ **Agent:** agent-frontend
580
+ **Goal:** UI for developers to manage API keys
581
+
582
+ ### ⏳ Infer 31: Design API Keys Management Page Wireframe
583
+
584
+ **Status:** Pending
585
+ **Dependencies:** Infer 30 (Backend API complete)
586
+ **Task:** Create wireframe satisfying user stories
587
+ **File:** `one/things/wireframes/api-keys-page.md`
588
+ **Acceptance Criteria:**
589
+
590
+ - [ ] User story: "As a developer, I want to generate API keys to access the backend"
591
+ - [ ] Page layout: Header, key list table, "Generate Key" button
592
+ - [ ] Table columns: Name, Prefix, Scopes, Created, Last Used, Actions
593
+ - [ ] Actions: Copy key (if just created), Revoke, Edit scopes
594
+ - [ ] Responsive design (mobile + desktop)
595
+
596
+ ### ⏳ Infer 32: Implement Key Generation UI
597
+
598
+ **Status:** Pending
599
+ **Dependencies:** Infer 31
600
+ **Task:** Build modal/form for creating new API keys
601
+ **File:** `web/src/components/features/api-keys/GenerateKeyModal.tsx`
602
+ **Acceptance Criteria:**
603
+
604
+ - [ ] Form fields: Name (required), Scopes (checkboxes), Expiration (optional)
605
+ - [ ] Show scope descriptions on hover
606
+ - [ ] Warn about scope implications (e.g., "entities:delete is destructive")
607
+ - [ ] On success, show full key ONCE in copyable format
608
+ - [ ] Alert user: "Save this key now. You won't see it again."
609
+ - [ ] Automatically copy to clipboard
610
+ - [ ] Close modal after key saved/copied
611
+
612
+ ### ⏳ Infer 33: Create Key Listing with Usage Stats
613
+
614
+ **Status:** Pending
615
+ **Dependencies:** Infer 32
616
+ **Task:** Display all API keys with usage information
617
+ **File:** `web/src/components/features/api-keys/ApiKeyList.tsx`
618
+ **Acceptance Criteria:**
619
+
620
+ - [ ] Fetch keys using Convex query (`api.queries.apiKeys.list`)
621
+ - [ ] Show key prefix (first 8 chars) + "..." for identification
622
+ - [ ] Display creation date (relative: "2 days ago")
623
+ - [ ] Display last used date (or "Never used")
624
+ - [ ] Show scopes as badges (e.g., "entities:read", "connections:write")
625
+ - [ ] Color-code status: green (active), red (revoked), yellow (expiring soon)
626
+ - [ ] Loading skeleton while fetching
627
+
628
+ ### ⏳ Infer 34: Add Key Revocation Interface
629
+
630
+ **Status:** Pending
631
+ **Dependencies:** Infer 33
632
+ **Task:** Allow users to revoke API keys with confirmation
633
+ **File:** `web/src/components/features/api-keys/RevokeKeyDialog.tsx`
634
+ **Acceptance Criteria:**
635
+
636
+ - [ ] "Revoke" button in key list table
637
+ - [ ] Confirmation dialog: "This action cannot be undone. Revoke {keyName}?"
638
+ - [ ] Optional revocation reason (dropdown: "Compromised", "Rotation", "No longer needed")
639
+ - [ ] Call `api.mutations.apiKeys.revoke` on confirm
640
+ - [ ] Show success toast: "API key revoked"
641
+ - [ ] Update key list (mark as revoked, gray out)
642
+
643
+ ### ⏳ Infer 35: Show Last Used Timestamp and IP
644
+
645
+ **Status:** Pending
646
+ **Dependencies:** Infer 33
647
+ **Task:** Display detailed usage info for security monitoring
648
+ **File:** `web/src/components/features/api-keys/ApiKeyDetails.tsx`
649
+ **Acceptance Criteria:**
650
+
651
+ - [ ] Click key row to expand details panel
652
+ - [ ] Show: Last used timestamp, IP address, User agent, Request count (last 24h)
653
+ - [ ] Link to full audit log for this key
654
+ - [ ] Show geographic location from IP (optional, using API)
655
+ - [ ] Alert if IP changed recently (potential compromise)
656
+
657
+ ---
658
+
659
+ ## Frontend Phase: API Documentation Portal (Infer 36-40)
660
+
661
+ **Agent:** agent-frontend
662
+ **Goal:** Interactive docs for developers
663
+
664
+ ### ⏳ Infer 36: Design Documentation Portal Wireframe
665
+
666
+ **Status:** Pending
667
+ **Dependencies:** Infer 30 (Backend API complete)
668
+ **Task:** Create wireframe for API docs site
669
+ **File:** `one/things/wireframes/api-docs-portal.md`
670
+ **Acceptance Criteria:**
671
+
672
+ - [ ] Layout: Sidebar (navigation), Main content (docs), Right panel ("Try It" console)
673
+ - [ ] Sections: Getting Started, Authentication, Entities, Connections, Events, Errors
674
+ - [ ] Search bar (semantic search via RAG)
675
+ - [ ] Code examples in multiple languages (tabs for JS/Python/Go/Ruby)
676
+ - [ ] Responsive (collapsible sidebar on mobile)
677
+
678
+ ### ⏳ Infer 37: Implement Interactive API Explorer
679
+
680
+ **Status:** Pending
681
+ **Dependencies:** Infer 36
682
+ **Task:** Build "Try It" console for testing endpoints
683
+ **File:** `web/src/components/features/docs/ApiExplorer.tsx`
684
+ **Acceptance Criteria:**
685
+
686
+ - [ ] Endpoint selector (dropdown: POST /api/v1/entities, GET /api/v1/entities/:id, etc.)
687
+ - [ ] Request builder: Headers (auto-fill API key), Body (JSON editor with syntax highlighting)
688
+ - [ ] "Send Request" button
689
+ - [ ] Response viewer: Status code, headers, body (formatted JSON)
690
+ - [ ] Error handling (show 401/403/429 with explanations)
691
+ - [ ] Save request as cURL command
692
+ - [ ] Generate code snippet in selected language
693
+
694
+ ### ⏳ Infer 38: Add Code Examples in 5+ Languages
695
+
696
+ **Status:** Pending
697
+ **Dependencies:** Infer 36
698
+ **Task:** Provide copy-pasteable examples for common operations
699
+ **File:** `web/src/content/docs/code-examples/`
700
+ **Acceptance Criteria:**
701
+
702
+ - [ ] Examples for: Authentication, Create entity, List entities, Update entity, Delete entity
703
+ - [ ] Languages: JavaScript/TypeScript, Python, Go, Ruby, cURL
704
+ - [ ] Use syntax highlighting (Prism.js or Shiki)
705
+ - [ ] "Copy" button for each example
706
+ - [ ] Examples use placeholder values (API_KEY, ORG_ID) with tooltips explaining replacement
707
+
708
+ **Example (JavaScript):**
709
+
710
+ ```javascript
711
+ import { OneClient } from "@one-platform/sdk";
712
+
713
+ const client = new OneClient({
714
+ apiKey: "YOUR_API_KEY",
715
+ organizationId: "YOUR_ORG_ID",
716
+ });
717
+
718
+ const course = await client.entities.create({
719
+ type: "course",
720
+ name: "Introduction to AI",
721
+ properties: {
722
+ description: "Learn AI fundamentals",
723
+ price: 49.99,
724
+ },
725
+ });
726
+ ```
727
+
728
+ ### ⏳ Infer 39: Show Real-Time Usage Stats in Docs
729
+
730
+ **Status:** Pending
731
+ **Dependencies:** Infer 37
732
+ **Task:** Display live API status and usage metrics
733
+ **File:** `web/src/components/features/docs/ApiStatus.tsx`
734
+ **Acceptance Criteria:**
735
+
736
+ - [ ] Status indicator: "All Systems Operational" (green) or "Degraded Performance" (yellow)
737
+ - [ ] Current requests/minute (personal usage)
738
+ - [ ] Quota consumption: "2,450 / 10,000 requests today (24%)"
739
+ - [ ] Latency stats: "Average response time: 120ms"
740
+ - [ ] Link to full analytics dashboard
741
+ - [ ] Auto-refresh every 30 seconds
742
+
743
+ ### ⏳ Infer 40: Add Error Code Reference
744
+
745
+ **Status:** Pending
746
+ **Dependencies:** Infer 36
747
+ **Task:** Comprehensive error documentation with solutions
748
+ **File:** `web/src/content/docs/error-codes.md`
749
+ **Acceptance Criteria:**
750
+
751
+ - [ ] List all error codes (INVALID_API_KEY, INSUFFICIENT_SCOPES, QUOTA_EXCEEDED, etc.)
752
+ - [ ] For each: HTTP status, description, common causes, solutions
753
+ - [ ] Searchable (Ctrl+F friendly)
754
+ - [ ] Link from error responses in API Explorer
755
+
756
+ **Example:**
757
+
758
+ ```markdown
759
+ ### INSUFFICIENT_SCOPES (403)
760
+
761
+ **Description:** Your API key does not have the required permissions.
762
+
763
+ **Common Causes:**
764
+
765
+ - Attempting to write data with a read-only key
766
+ - Missing scope for specific resource type
767
+
768
+ **Solution:**
769
+
770
+ 1. Go to API Keys page
771
+ 2. Edit key scopes or generate new key with required permissions
772
+ 3. Required scope for this operation: `entities:write`
773
+ ```
774
+
775
+ ---
776
+
777
+ ## Frontend Phase: Usage Dashboard (Infer 41-45)
778
+
779
+ **Agent:** agent-frontend
780
+ **Goal:** Analytics and monitoring for API consumers
781
+
782
+ ### ⏳ Infer 41: Design Usage Dashboard Wireframe
783
+
784
+ **Status:** Pending
785
+ **Dependencies:** Infer 30 (Backend API complete)
786
+ **Task:** Create wireframe for analytics page
787
+ **File:** `one/things/wireframes/usage-dashboard.md`
788
+ **Acceptance Criteria:**
789
+
790
+ - [ ] Layout: Top metrics cards, Charts section, Recent requests table
791
+ - [ ] Metrics: Total requests (24h), Average latency, Error rate, Quota usage
792
+ - [ ] Charts: Requests over time (line), Top endpoints (bar), Status codes (pie), Latency distribution (histogram)
793
+ - [ ] Date range selector (Last 24h, 7 days, 30 days, Custom)
794
+ - [ ] Responsive design
795
+
796
+ ### ⏳ Infer 42: Show Quota Consumption with Progress Bars
797
+
798
+ **Status:** Pending
799
+ **Dependencies:** Infer 41
800
+ **Task:** Visual representation of usage limits
801
+ **File:** `web/src/components/features/analytics/QuotaUsage.tsx`
802
+ **Acceptance Criteria:**
803
+
804
+ - [ ] Per-minute quota: "45 / 60 requests (75%)" with progress bar
805
+ - [ ] Per-day quota: "2,450 / 10,000 requests (24%)" with progress bar
806
+ - [ ] Color-coded: Green (<50%), Yellow (50-80%), Red (>80%)
807
+ - [ ] Show time until reset ("Resets in 15 minutes")
808
+ - [ ] Warning if nearing limit: "You've used 90% of your daily quota"
809
+
810
+ ### ⏳ Infer 43: Add Billing Projection
811
+
812
+ **Status:** Pending
813
+ **Dependencies:** Infer 42
814
+ **Task:** Estimate costs based on current usage trends
815
+ **File:** `web/src/components/features/analytics/BillingProjection.tsx`
816
+ **Acceptance Criteria:**
817
+
818
+ - [ ] Calculate: (Current daily average) \* 30 = Monthly projection
819
+ - [ ] Show projected requests for month
820
+ - [ ] Recommend tier upgrade if over limit: "Projected usage: 450K requests/month. Consider upgrading to Pro (100K → 1M requests)"
821
+ - [ ] Chart: Usage trend (last 30 days) + forecast (next 30 days)
822
+ - [ ] Link to billing/upgrade page
823
+
824
+ ### ⏳ Infer 44: Create Alert Configuration UI
825
+
826
+ **Status:** Pending
827
+ **Dependencies:** Infer 42
828
+ **Task:** Let users set up usage alerts
829
+ **File:** `web/src/components/features/analytics/AlertConfig.tsx`
830
+ **Acceptance Criteria:**
831
+
832
+ - [ ] Alert types: Quota threshold (%), Error rate threshold (%), Latency threshold (ms)
833
+ - [ ] Notification channels: Email, Webhook, SMS (future)
834
+ - [ ] Thresholds: "Notify me when quota reaches 80%"
835
+ - [ ] Test alert button (send sample notification)
836
+ - [ ] Save alerts to database (new entity type: `api_alert`)
837
+
838
+ ### ⏳ Infer 45: Display Top Endpoints by Usage
839
+
840
+ **Status:** Pending
841
+ **Dependencies:** Infer 41
842
+ **Task:** Show which endpoints are most frequently called
843
+ **File:** `web/src/components/features/analytics/TopEndpoints.tsx`
844
+ **Acceptance Criteria:**
845
+
846
+ - [ ] Table: Endpoint, Method, Requests (count), Avg Latency, Error Rate (%)
847
+ - [ ] Sort by: Requests (desc), Latency (desc), Error rate (desc)
848
+ - [ ] Filter by date range
849
+ - [ ] Click endpoint to see request samples
850
+ - [ ] Export to CSV
851
+
852
+ ---
853
+
854
+ ## Frontend Phase: Developer Onboarding Flow (Infer 46-50)
855
+
856
+ **Agent:** agent-frontend
857
+ **Goal:** Seamless first-time experience
858
+
859
+ ### ⏳ Infer 46: Create "Get Started" Wizard
860
+
861
+ **Status:** Pending
862
+ **Dependencies:** Infer 35 (API key management complete)
863
+ **Task:** Multi-step onboarding for new developers
864
+ **File:** `web/src/components/features/onboarding/OnboardingWizard.tsx`
865
+ **Acceptance Criteria:**
866
+
867
+ - [ ] Step 1: "Create your organization" (name, description)
868
+ - [ ] Step 2: "Generate your first API key" (name, scopes)
869
+ - [ ] Step 3: "Make your first API call" (copy-paste cURL example)
870
+ - [ ] Step 4: "Choose your SDK" (JS/Python/Go/Ruby links)
871
+ - [ ] Progress indicator (1/4, 2/4, etc.)
872
+ - [ ] Skip option (save progress, resume later)
873
+ - [ ] Confetti animation on completion 🎉
874
+
875
+ ### ⏳ Infer 47: Add SDK Download Options
876
+
877
+ **Status:** Pending
878
+ **Dependencies:** Infer 46
879
+ **Task:** Provide easy access to official SDKs
880
+ **File:** `web/src/components/features/onboarding/SdkDownload.tsx`
881
+ **Acceptance Criteria:**
882
+
883
+ - [ ] SDK cards: JavaScript, Python, Go, Ruby (+ coming soon: Java, PHP)
884
+ - [ ] Each card: Logo, install command, quick example, "View Docs" link
885
+ - [ ] Install commands: `npm install @one-platform/sdk`, `pip install one-platform`, etc.
886
+ - [ ] Copy button for install commands
887
+ - [ ] Link to GitHub repositories
888
+
889
+ ### ⏳ Infer 48: Implement Quick Start Templates
890
+
891
+ **Status:** Pending
892
+ **Dependencies:** Infer 47
893
+ **Task:** Provide boilerplate projects for common use cases
894
+ **File:** `web/src/content/templates/`
895
+ **Acceptance Criteria:**
896
+
897
+ - [ ] Templates: "Next.js + ONE Backend", "Express API + ONE", "Python Flask + ONE", "Astro + ONE"
898
+ - [ ] Each template: Zip download, GitHub repo link, StackBlitz live demo
899
+ - [ ] README with setup instructions
900
+ - [ ] Pre-configured API client with placeholder credentials
901
+ - [ ] Example: List entities, Create entity, Update entity
902
+
903
+ ### ⏳ Infer 49: Show Example Applications
904
+
905
+ **Status:** Pending
906
+ **Dependencies:** Infer 48
907
+ **Task:** Showcase real-world apps built on ONE Platform
908
+ **File:** `web/src/components/features/onboarding/ExampleApps.tsx`
909
+ **Acceptance Criteria:**
910
+
911
+ - [ ] Gallery: Course platform, E-commerce store, CRM, Chat app, Task manager
912
+ - [ ] Each app: Screenshot, description, "Try Demo" button, "View Code" (GitHub)
913
+ - [ ] Filter by category: Education, Commerce, Productivity, Social
914
+ - [ ] "Submit your app" form (user-generated examples)
915
+
916
+ ### ⏳ Infer 50: Add Video Tutorials
917
+
918
+ **Status:** Pending
919
+ **Dependencies:** Infer 46-49
920
+ **Task:** Embed walkthrough videos for visual learners
921
+ **File:** `web/src/components/features/onboarding/VideoTutorials.tsx`
922
+ **Acceptance Criteria:**
923
+
924
+ - [ ] Videos: "5-minute quick start", "Authentication explained", "Building your first feature", "Advanced: Webhooks"
925
+ - [ ] Embedded player (YouTube or self-hosted)
926
+ - [ ] Chapters/timestamps for skipping
927
+ - [ ] Transcripts available (accessibility)
928
+ - [ ] "Suggest a topic" form
929
+
930
+ ---
931
+
932
+ ## Quality Phase: Unit Tests (Infer 51-55)
933
+
934
+ **Agent:** agent-quality
935
+ **Goal:** Test individual components
936
+
937
+ ### ⏳ Infer 51: Test API Key Generation
938
+
939
+ **Status:** Pending
940
+ **Dependencies:** Infer 16-20 (Auth service complete)
941
+ **Task:** Validate key generation logic
942
+ **File:** `backend/convex/mutations/api-keys.test.ts`
943
+ **Acceptance Criteria:**
944
+
945
+ - [ ] Test: Keys are cryptographically random (entropy check)
946
+ - [ ] Test: No key collisions after 10,000 generations
947
+ - [ ] Test: Keys match format `org_{orgId}_key_{random}`
948
+ - [ ] Test: Keys hashed before storage (bcrypt/Argon2)
949
+ - [ ] Test: Full key returned only once
950
+ - [ ] Test: Prefix stored in plaintext for display
951
+ - [ ] All tests pass (100%)
952
+
953
+ ### ⏳ Infer 52: Test Scope Validation
954
+
955
+ **Status:** Pending
956
+ **Dependencies:** Infer 18 (Scope system complete)
957
+ **Task:** Verify permission checks work correctly
958
+ **File:** `backend/convex/lib/api-auth.test.ts`
959
+ **Acceptance Criteria:**
960
+
961
+ - [ ] Test: `entities:write` grants `entities:read` (hierarchy)
962
+ - [ ] Test: `entities:read` does NOT grant `entities:write`
963
+ - [ ] Test: Wildcard `entities:*` grants all entity operations
964
+ - [ ] Test: Missing scope returns 403 Forbidden
965
+ - [ ] Test: Invalid scope format rejected
966
+ - [ ] All tests pass (100%)
967
+
968
+ ### ⏳ Infer 53: Test Rate Limiting
969
+
970
+ **Status:** Pending
971
+ **Dependencies:** Infer 19 (Rate limiter complete)
972
+ **Task:** Ensure quotas enforced correctly
973
+ **File:** `backend/convex/lib/rate-limit.test.ts`
974
+ **Acceptance Criteria:**
975
+
976
+ - [ ] Test: 61st request in minute returns 429
977
+ - [ ] Test: Request succeeds after window resets
978
+ - [ ] Test: Daily limit enforced independently
979
+ - [ ] Test: Different tiers have different limits
980
+ - [ ] Test: Burst handling (all 60 requests in 1 second)
981
+ - [ ] Test: `Retry-After` header present in 429 response
982
+ - [ ] All tests pass (100%)
983
+
984
+ ### ⏳ Infer 54: Test Group Isolation
985
+
986
+ **Status:** Pending
987
+ **Dependencies:** Infer 21-24 (Group scoping complete)
988
+ **Task:** Validate no data leakage between organizations
989
+ **File:** `backend/convex/lib/group-scoping.test.ts`
990
+ **Acceptance Criteria:**
991
+
992
+ - [ ] Test: Org A cannot read Org B's entities
993
+ - [ ] Test: Org A cannot update Org B's entities
994
+ - [ ] Test: Org A cannot delete Org B's entities
995
+ - [ ] Test: Connection queries don't cross org boundaries
996
+ - [ ] Test: Event logs filtered by org
997
+ - [ ] Test: Knowledge search scoped to org
998
+ - [ ] All tests pass (100%) - CRITICAL for security
999
+
1000
+ ### ⏳ Infer 55: Test Key Rotation
1001
+
1002
+ **Status:** Pending
1003
+ **Dependencies:** Infer 20 (Key rotation complete)
1004
+ **Task:** Verify seamless key rotation
1005
+ **File:** `backend/convex/mutations/api-keys.test.ts`
1006
+ **Acceptance Criteria:**
1007
+
1008
+ - [ ] Test: Both old and new keys valid during grace period
1009
+ - [ ] Test: Old key revoked after grace period expires
1010
+ - [ ] Test: Email notification sent before old key expires
1011
+ - [ ] Test: New key has same scopes as old key
1012
+ - [ ] Test: `rotateApiKey` logs appropriate events
1013
+ - [ ] All tests pass (100%)
1014
+
1015
+ ---
1016
+
1017
+ ## Quality Phase: Integration Tests (Infer 56-60)
1018
+
1019
+ **Agent:** agent-quality
1020
+ **Goal:** Test end-to-end flows
1021
+
1022
+ ### ⏳ Infer 56: Test Full Authentication Flow
1023
+
1024
+ **Status:** Pending
1025
+ **Dependencies:** Infer 51-55 (Unit tests complete)
1026
+ **Task:** Validate complete auth flow from key to scoped request
1027
+ **File:** `backend/convex/integration/auth-flow.test.ts`
1028
+ **Acceptance Criteria:**
1029
+
1030
+ - [ ] Test: Generate key → Make request → Verify success
1031
+ - [ ] Test: Invalid key → 401 Unauthorized
1032
+ - [ ] Test: Expired key → 401 Unauthorized
1033
+ - [ ] Test: Revoked key → 401 Unauthorized
1034
+ - [ ] Test: Insufficient scopes → 403 Forbidden
1035
+ - [ ] Test: Valid request logs event
1036
+ - [ ] All tests pass (100%)
1037
+
1038
+ ### ⏳ Infer 57: Test Multi-Tenant Isolation
1039
+
1040
+ **Status:** Pending
1041
+ **Dependencies:** Infer 56
1042
+ **Task:** Comprehensive cross-org security tests
1043
+ **File:** `backend/convex/integration/multi-tenant.test.ts`
1044
+ **Acceptance Criteria:**
1045
+
1046
+ - [ ] Test: Create entity in Org A, verify not visible to Org B
1047
+ - [ ] Test: Attempt to read Org B entity with Org A key → 404
1048
+ - [ ] Test: Attempt to update Org B entity with Org A key → 404
1049
+ - [ ] Test: Attempt to delete Org B entity with Org A key → 404
1050
+ - [ ] Test: Connection creation across orgs blocked
1051
+ - [ ] Test: Event queries don't leak cross-org data
1052
+ - [ ] All tests pass (100%) - CRITICAL for security
1053
+
1054
+ ### ⏳ Infer 58: Test Rate Limit Enforcement
1055
+
1056
+ **Status:** Pending
1057
+ **Dependencies:** Infer 56
1058
+ **Task:** Validate rate limiting under real load
1059
+ **File:** `backend/convex/integration/rate-limits.test.ts`
1060
+ **Acceptance Criteria:**
1061
+
1062
+ - [ ] Test: Send 60 requests in 1 minute → All succeed
1063
+ - [ ] Test: Send 61st request → 429 Too Many Requests
1064
+ - [ ] Test: Wait for window reset → Next request succeeds
1065
+ - [ ] Test: Daily limit enforced after per-minute resets
1066
+ - [ ] Test: Different keys have independent limits
1067
+ - [ ] Test: `quota_exceeded` event logged
1068
+ - [ ] All tests pass (100%)
1069
+
1070
+ ### ⏳ Infer 59: Test Webhook Delivery
1071
+
1072
+ **Status:** Pending
1073
+ **Dependencies:** Infer 30 (Webhook system complete)
1074
+ **Task:** Validate event delivery to customer endpoints
1075
+ **File:** `backend/convex/integration/webhooks.test.ts`
1076
+ **Acceptance Criteria:**
1077
+
1078
+ - [ ] Test: Register webhook → Receive verification event
1079
+ - [ ] Test: Create entity → Webhook receives `entity_created` event
1080
+ - [ ] Test: Webhook payload includes HMAC signature
1081
+ - [ ] Test: Failed delivery retries 3 times with exponential backoff
1082
+ - [ ] Test: Webhook logs show delivery attempts
1083
+ - [ ] All tests pass (100%)
1084
+
1085
+ ### ⏳ Infer 60: Test Concurrent Requests
1086
+
1087
+ **Status:** Pending
1088
+ **Dependencies:** Infer 56-59
1089
+ **Task:** Ensure no race conditions or deadlocks
1090
+ **File:** `backend/convex/integration/concurrency.test.ts`
1091
+ **Acceptance Criteria:**
1092
+
1093
+ - [ ] Test: 100 concurrent entity creates → All succeed
1094
+ - [ ] Test: Concurrent rate limit checks → Accurate counting
1095
+ - [ ] Test: Concurrent key rotations → No collisions
1096
+ - [ ] Test: Database transactions isolated (no dirty reads)
1097
+ - [ ] Test: No deadlocks detected
1098
+ - [ ] All tests pass (100%)
1099
+
1100
+ ---
1101
+
1102
+ ## Quality Phase: Security Tests (Infer 61-65)
1103
+
1104
+ **Agent:** agent-quality
1105
+ **Goal:** Penetration testing and vulnerability scanning
1106
+
1107
+ ### ⏳ Infer 61: Test Key Brute Force Protection
1108
+
1109
+ **Status:** Pending
1110
+ **Dependencies:** Infer 56-60 (Integration tests complete)
1111
+ **Task:** Validate resistance to key guessing attacks
1112
+ **File:** `backend/convex/security/brute-force.test.ts`
1113
+ **Acceptance Criteria:**
1114
+
1115
+ - [ ] Test: 10 invalid key attempts → Temporary IP ban (5 minutes)
1116
+ - [ ] Test: Rate limiter independent of main API rate limits
1117
+ - [ ] Test: CAPTCHA challenge after 5 failed attempts (future)
1118
+ - [ ] Test: `api_auth_failed` events logged with IP
1119
+ - [ ] Test: Admin notification if >100 failed attempts from single IP
1120
+ - [ ] All tests pass (100%)
1121
+
1122
+ ### ⏳ Infer 62: Test SQL Injection Attempts
1123
+
1124
+ **Status:** Pending
1125
+ **Dependencies:** Infer 61
1126
+ **Task:** Verify Convex's built-in protection (should be safe by design)
1127
+ **File:** `backend/convex/security/injection.test.ts`
1128
+ **Acceptance Criteria:**
1129
+
1130
+ - [ ] Test: Malicious input in entity name (e.g., `'; DROP TABLE entities; --`)
1131
+ - [ ] Test: Malicious input in query parameters
1132
+ - [ ] Test: Malicious input in properties field (arbitrary JSON)
1133
+ - [ ] Test: No data corruption or deletion
1134
+ - [ ] Test: Inputs sanitized/escaped in responses
1135
+ - [ ] All tests pass (100%)
1136
+
1137
+ ### ⏳ Infer 63: Test Unauthorized Scope Escalation
1138
+
1139
+ **Status:** Pending
1140
+ **Dependencies:** Infer 61-62
1141
+ **Task:** Ensure users can't grant themselves additional scopes
1142
+ **File:** `backend/convex/security/scope-escalation.test.ts`
1143
+ **Acceptance Criteria:**
1144
+
1145
+ - [ ] Test: Attempt to modify API key scopes via API → 403 Forbidden
1146
+ - [ ] Test: Attempt to create key with admin scopes using non-admin key → 403
1147
+ - [ ] Test: Attempt to access `api_keys:manage` endpoint without scope → 403
1148
+ - [ ] Test: Scope verification happens before all operations
1149
+ - [ ] Test: Scope tampering in request headers ignored
1150
+ - [ ] All tests pass (100%)
1151
+
1152
+ ### ⏳ Infer 64: Test Expired Key Handling
1153
+
1154
+ **Status:** Pending
1155
+ **Dependencies:** Infer 61-63
1156
+ **Task:** Validate expired keys immediately rejected
1157
+ **File:** `backend/convex/security/expiration.test.ts`
1158
+ **Acceptance Criteria:**
1159
+
1160
+ - [ ] Test: Key expires at exact timestamp → Next request fails
1161
+ - [ ] Test: Expired key returns 401 with clear message: "API key expired on {date}"
1162
+ - [ ] Test: Expired keys cleaned up automatically (daily cron)
1163
+ - [ ] Test: Email notification sent 7 days before expiration
1164
+ - [ ] Test: Renewal flow works (extend expiration)
1165
+ - [ ] All tests pass (100%)
1166
+
1167
+ ### ⏳ Infer 65: Penetration Testing (OWASP Top 10)
1168
+
1169
+ **Status:** Pending
1170
+ **Dependencies:** Infer 61-64
1171
+ **Task:** External security audit against OWASP Top 10
1172
+ **File:** `one/events/security-audit-report.md`
1173
+ **Acceptance Criteria:**
1174
+
1175
+ - [ ] Test: Broken Access Control (A01:2021) → No vulnerabilities
1176
+ - [ ] Test: Cryptographic Failures (A02:2021) → Keys hashed, HTTPS enforced
1177
+ - [ ] Test: Injection (A03:2021) → Convex safe by design
1178
+ - [ ] Test: Insecure Design (A04:2021) → Rate limiting, key rotation implemented
1179
+ - [ ] Test: Security Misconfiguration (A05:2021) → No default keys, proper CORS
1180
+ - [ ] Test: All other OWASP categories → No critical/high vulnerabilities
1181
+ - [ ] Report: No critical vulnerabilities, recommendations for improvements
1182
+
1183
+ ---
1184
+
1185
+ ## Quality Phase: Performance Tests (Infer 66-70)
1186
+
1187
+ **Agent:** agent-quality
1188
+ **Goal:** Validate performance under load
1189
+
1190
+ ### ⏳ Infer 66: Load Test (10K Requests/Minute)
1191
+
1192
+ **Status:** Pending
1193
+ **Dependencies:** Infer 61-65 (Security tests complete)
1194
+ **Task:** Simulate high traffic and measure performance
1195
+ **File:** `backend/convex/performance/load-test.ts`
1196
+ **Acceptance Criteria:**
1197
+
1198
+ - [ ] Test: Sustained 10,000 req/min for 10 minutes
1199
+ - [ ] Test: All requests complete successfully
1200
+ - [ ] Test: No timeouts or connection errors
1201
+ - [ ] Test: Database performance stable (no degradation)
1202
+ - [ ] Test: CPU/memory usage within acceptable limits
1203
+ - [ ] Test: Convex functions scale automatically
1204
+ - [ ] Pass: 99.9% success rate
1205
+
1206
+ ### ⏳ Infer 67: Latency Testing (p50, p95, p99)
1207
+
1208
+ **Status:** Pending
1209
+ **Dependencies:** Infer 66
1210
+ **Task:** Measure response times at different percentiles
1211
+ **File:** `backend/convex/performance/latency-test.ts`
1212
+ **Acceptance Criteria:**
1213
+
1214
+ - [ ] Measure: 10,000 API requests under normal load
1215
+ - [ ] Target: p50 < 100ms, p95 < 200ms, p99 < 500ms
1216
+ - [ ] Breakdown by endpoint (entities, connections, events)
1217
+ - [ ] Identify slowest queries for optimization
1218
+ - [ ] Compare: Cold start vs warm cache performance
1219
+ - [ ] Pass: All targets met
1220
+
1221
+ ### ⏳ Infer 68: Database Query Optimization
1222
+
1223
+ **Status:** Pending
1224
+ **Dependencies:** Infer 67
1225
+ **Task:** Optimize slow queries identified in latency tests
1226
+ **File:** `backend/convex/queries/` (various files)
1227
+ **Acceptance Criteria:**
1228
+
1229
+ - [ ] Add indexes for frequently queried fields
1230
+ - [ ] Optimize N+1 query patterns (batch fetches)
1231
+ - [ ] Cache frequently accessed data (Redis/Convex caching)
1232
+ - [ ] Paginate large result sets
1233
+ - [ ] Use Convex's `withIndex()` for fast lookups
1234
+ - [ ] Re-run latency tests → 20% improvement
1235
+
1236
+ ### ⏳ Infer 69: CDN Caching Strategy
1237
+
1238
+ **Status:** Pending
1239
+ **Dependencies:** Infer 68
1240
+ **Task:** Implement edge caching for static/semi-static data
1241
+ **File:** `backend/convex/http.ts` (add cache headers)
1242
+ **Acceptance Criteria:**
1243
+
1244
+ - [ ] Cache GET requests for public data (e.g., API docs)
1245
+ - [ ] Set `Cache-Control` headers (e.g., `max-age=3600` for 1 hour)
1246
+ - [ ] Vary caching by API key (private data never cached)
1247
+ - [ ] Implement cache invalidation on data changes
1248
+ - [ ] Test: Cached requests return instantly (<10ms)
1249
+ - [ ] Pass: 50% cache hit rate for eligible requests
1250
+
1251
+ ### ⏳ Infer 70: Connection Pooling Validation
1252
+
1253
+ **Status:** Pending
1254
+ **Dependencies:** Infer 66-69
1255
+ **Task:** Ensure efficient connection reuse
1256
+ **File:** `backend/convex/lib/connection-pool.ts`
1257
+ **Acceptance Criteria:**
1258
+
1259
+ - [ ] Test: 1,000 concurrent requests reuse connections
1260
+ - [ ] Test: No connection leaks (all connections closed)
1261
+ - [ ] Test: Connection pool size scales with load
1262
+ - [ ] Monitor: Connection pool metrics (active, idle, waiting)
1263
+ - [ ] Optimize: Pool size configuration
1264
+ - [ ] Pass: Zero connection errors under load
1265
+
1266
+ ---
1267
+
1268
+ ## SDK Phase: Official SDKs (Infer 71-75)
1269
+
1270
+ **Agent:** agent-builder
1271
+ **Goal:** Create client libraries for popular languages
1272
+
1273
+ ### ⏳ Infer 71: JavaScript/TypeScript SDK
1274
+
1275
+ **Status:** Pending
1276
+ **Dependencies:** Infer 30 (API Gateway complete)
1277
+ **Task:** Build npm package for Node.js and browsers
1278
+ **File:** `sdk/javascript/`
1279
+ **Acceptance Criteria:**
1280
+
1281
+ - [ ] Package: `@one-platform/sdk` on npm
1282
+ - [ ] Support: Node.js 18+, browsers (via bundler)
1283
+ - [ ] Features: Full TypeScript types, tree-shakeable, ESM + CJS
1284
+ - [ ] Methods: `client.entities.create()`, `.list()`, `.get()`, `.update()`, `.delete()`
1285
+ - [ ] Same for connections, events, groups
1286
+ - [ ] Authentication: Constructor accepts `apiKey`, `organizationId`
1287
+ - [ ] Error handling: Typed error classes (`ApiError`, `AuthError`, `RateLimitError`)
1288
+ - [ ] Tests: 100% coverage
1289
+ - [ ] Docs: README, API reference, examples
1290
+
1291
+ **Example:**
1292
+
1293
+ ```typescript
1294
+ import { OneClient } from "@one-platform/sdk";
1295
+
1296
+ const client = new OneClient({
1297
+ apiKey: process.env.ONE_API_KEY,
1298
+ organizationId: "org_abc123",
1299
+ });
1300
+
1301
+ const course = await client.entities.create({
1302
+ type: "course",
1303
+ name: "Introduction to AI",
1304
+ properties: { price: 49.99 },
1305
+ });
1306
+ ```
1307
+
1308
+ ### ⏳ Infer 72: Python SDK
1309
+
1310
+ **Status:** Pending
1311
+ **Dependencies:** Infer 71
1312
+ **Task:** Build PyPI package for Python developers
1313
+ **File:** `sdk/python/`
1314
+ **Acceptance Criteria:**
1315
+
1316
+ - [ ] Package: `one-platform` on PyPI
1317
+ - [ ] Support: Python 3.8+
1318
+ - [ ] Features: Type hints (mypy compatible), async support (asyncio)
1319
+ - [ ] Methods: `client.entities.create()`, `.list()`, `.get()`, `.update()`, `.delete()`
1320
+ - [ ] Authentication: Constructor accepts `api_key`, `organization_id`
1321
+ - [ ] Error handling: Custom exceptions (`ApiError`, `AuthError`, `RateLimitError`)
1322
+ - [ ] Tests: pytest, 100% coverage
1323
+ - [ ] Docs: README, Sphinx API reference, examples
1324
+
1325
+ **Example:**
1326
+
1327
+ ```python
1328
+ from one_platform import OneClient
1329
+
1330
+ client = OneClient(
1331
+ api_key=os.environ['ONE_API_KEY'],
1332
+ organization_id='org_abc123'
1333
+ )
1334
+
1335
+ course = client.entities.create(
1336
+ type='course',
1337
+ name='Introduction to AI',
1338
+ properties={'price': 49.99}
1339
+ )
1340
+ ```
1341
+
1342
+ ### ⏳ Infer 73: Go SDK
1343
+
1344
+ **Status:** Pending
1345
+ **Dependencies:** Infer 72
1346
+ **Task:** Build Go module for Go developers
1347
+ **File:** `sdk/go/`
1348
+ **Acceptance Criteria:**
1349
+
1350
+ - [ ] Module: `github.com/one-platform/go-sdk`
1351
+ - [ ] Support: Go 1.21+
1352
+ - [ ] Features: Context support, generics, idiomatic error handling
1353
+ - [ ] Methods: `client.Entities.Create()`, `.List()`, `.Get()`, `.Update()`, `.Delete()`
1354
+ - [ ] Authentication: `NewClient(apiKey, organizationID string)`
1355
+ - [ ] Error handling: Typed errors (`*ApiError`, `*AuthError`, `*RateLimitError`)
1356
+ - [ ] Tests: `go test`, 100% coverage
1357
+ - [ ] Docs: README, GoDoc, examples
1358
+
1359
+ **Example:**
1360
+
1361
+ ```go
1362
+ import "github.com/one-platform/go-sdk"
1363
+
1364
+ client := onesdk.NewClient(
1365
+ os.Getenv("ONE_API_KEY"),
1366
+ "org_abc123",
1367
+ )
1368
+
1369
+ course, err := client.Entities.Create(ctx, &onesdk.Entity{
1370
+ Type: "course",
1371
+ Name: "Introduction to AI",
1372
+ Properties: map[string]any{"price": 49.99},
1373
+ })
1374
+ ```
1375
+
1376
+ ### ⏳ Infer 74: Ruby SDK
1377
+
1378
+ **Status:** Pending
1379
+ **Dependencies:** Infer 73
1380
+ **Task:** Build gem for Ruby developers
1381
+ **File:** `sdk/ruby/`
1382
+ **Acceptance Criteria:**
1383
+
1384
+ - [ ] Gem: `one-platform` on RubyGems
1385
+ - [ ] Support: Ruby 3.0+
1386
+ - [ ] Features: Idiomatic Ruby (snake_case), blocks for configuration
1387
+ - [ ] Methods: `client.entities.create`, `.list`, `.get`, `.update`, `.delete`
1388
+ - [ ] Authentication: `OnePlatform::Client.new(api_key:, organization_id:)`
1389
+ - [ ] Error handling: Custom exceptions (`ApiError`, `AuthError`, `RateLimitError`)
1390
+ - [ ] Tests: RSpec, 100% coverage
1391
+ - [ ] Docs: README, YARD API reference, examples
1392
+
1393
+ **Example:**
1394
+
1395
+ ```ruby
1396
+ require 'one_platform'
1397
+
1398
+ client = OnePlatform::Client.new(
1399
+ api_key: ENV['ONE_API_KEY'],
1400
+ organization_id: 'org_abc123'
1401
+ )
1402
+
1403
+ course = client.entities.create(
1404
+ type: 'course',
1405
+ name: 'Introduction to AI',
1406
+ properties: { price: 49.99 }
1407
+ )
1408
+ ```
1409
+
1410
+ ### ⏳ Infer 75: Add Type Definitions (Full TypeScript Support)
1411
+
1412
+ **Status:** Pending
1413
+ **Dependencies:** Infer 71-74
1414
+ **Task:** Generate TypeScript definitions for all SDKs
1415
+ **File:** `sdk/types/` (shared type definitions)
1416
+ **Acceptance Criteria:**
1417
+
1418
+ - [ ] Shared types: `Entity`, `Connection`, `Event`, `Group`, `ApiKey`
1419
+ - [ ] All entity types (66+) as discriminated unions
1420
+ - [ ] All connection types (25+) with proper generics
1421
+ - [ ] Error types with discriminated unions
1422
+ - [ ] Export types from all SDKs (`@one-platform/sdk/types`)
1423
+ - [ ] IntelliSense support in VS Code
1424
+ - [ ] TypeScript strict mode compatible
1425
+
1426
+ ---
1427
+
1428
+ ## SDK Phase: CLI Tool (Infer 76-80)
1429
+
1430
+ **Agent:** agent-builder
1431
+ **Goal:** Command-line tool for API management
1432
+
1433
+ ### ⏳ Infer 76: Create `oneie` CLI for API Management
1434
+
1435
+ **Status:** Pending
1436
+ **Dependencies:** Infer 71 (JS SDK complete)
1437
+ **Task:** Build command-line tool using Node.js
1438
+ **File:** `cli/`
1439
+ **Acceptance Criteria:**
1440
+
1441
+ - [ ] Package: `oneie` (already exists, extend with API commands)
1442
+ - [ ] Commands: `oneie api:*` subcommands
1443
+ - [ ] Authentication: Config file `~/.oneie/config.json` with API key
1444
+ - [ ] Auto-completion: Bash, Zsh, Fish support
1445
+ - [ ] Colored output (chalk or similar)
1446
+ - [ ] Tests: CLI integration tests
1447
+ - [ ] Docs: `oneie help api`
1448
+
1449
+ ### ⏳ Infer 77: Add Commands (keys:create, keys:list, keys:revoke)
1450
+
1451
+ **Status:** Pending
1452
+ **Dependencies:** Infer 76
1453
+ **Task:** Implement API key management commands
1454
+ **File:** `cli/commands/api/keys.ts`
1455
+ **Acceptance Criteria:**
1456
+
1457
+ - [ ] `oneie api:keys:create` - Interactive wizard (name, scopes, expiration)
1458
+ - [ ] `oneie api:keys:list` - Table of all keys (name, prefix, scopes, status)
1459
+ - [ ] `oneie api:keys:revoke` - Revoke key by prefix (confirmation prompt)
1460
+ - [ ] `oneie api:keys:show [prefix]` - Show detailed key info
1461
+ - [ ] All commands use SDK internally
1462
+ - [ ] Proper error handling (friendly messages)
1463
+
1464
+ **Example:**
1465
+
1466
+ ```bash
1467
+ $ oneie api:keys:create
1468
+ ? Key name: Production API
1469
+ ? Scopes: entities:read, entities:write, connections:read
1470
+ ? Expiration: Never
1471
+ ✅ API key created: org_abc123_key_xyz789
1472
+ ⚠️ Save this key now. You won't see it again.
1473
+ ```
1474
+
1475
+ ### ⏳ Infer 78: Implement `oneie test` for Endpoint Testing
1476
+
1477
+ **Status:** Pending
1478
+ **Dependencies:** Infer 77
1479
+ **Task:** Interactive endpoint tester in CLI
1480
+ **File:** `cli/commands/api/test.ts`
1481
+ **Acceptance Criteria:**
1482
+
1483
+ - [ ] `oneie api:test` - Interactive mode (select endpoint, enter params, see response)
1484
+ - [ ] `oneie api:test --endpoint=POST:/api/v1/entities --body='{"type":"course"}'` - Non-interactive
1485
+ - [ ] Pretty-print JSON responses (syntax highlighting)
1486
+ - [ ] Show: Status code, headers, latency, response size
1487
+ - [ ] Save requests as templates (`oneie api:test --save=create-course`)
1488
+ - [ ] Load templates (`oneie api:test --template=create-course`)
1489
+
1490
+ **Example:**
1491
+
1492
+ ```bash
1493
+ $ oneie api:test
1494
+ ? Endpoint: POST /api/v1/entities
1495
+ ? Body: {"type":"course","name":"AI 101"}
1496
+ ✅ 201 Created (120ms)
1497
+ {
1498
+ "id": "j57abc123..."
1499
+ }
1500
+ ```
1501
+
1502
+ ### ⏳ Infer 79: Add `oneie logs` for Request History
1503
+
1504
+ **Status:** Pending
1505
+ **Dependencies:** Infer 78
1506
+ **Task:** View API request logs from CLI
1507
+ **File:** `cli/commands/api/logs.ts`
1508
+ **Acceptance Criteria:**
1509
+
1510
+ - [ ] `oneie api:logs` - Show recent requests (last 50)
1511
+ - [ ] `oneie api:logs --tail` - Live streaming logs (like `tail -f`)
1512
+ - [ ] `oneie api:logs --filter=error` - Only errors
1513
+ - [ ] `oneie api:logs --endpoint=/api/v1/entities` - Filter by endpoint
1514
+ - [ ] Display: Timestamp, Method, Endpoint, Status, Latency
1515
+ - [ ] Color-coded status (green=2xx, yellow=3xx, red=4xx/5xx)
1516
+
1517
+ **Example:**
1518
+
1519
+ ```bash
1520
+ $ oneie api:logs --tail
1521
+ [12:34:56] POST /api/v1/entities 201 (120ms)
1522
+ [12:34:57] GET /api/v1/entities 200 (45ms)
1523
+ [12:34:58] POST /api/v1/connections 403 (30ms) ❌
1524
+ ```
1525
+
1526
+ ### ⏳ Infer 80: Create `oneie deploy` for Webhook Configuration
1527
+
1528
+ **Status:** Pending
1529
+ **Dependencies:** Infer 79
1530
+ **Task:** Manage webhook subscriptions from CLI
1531
+ **File:** `cli/commands/api/webhooks.ts`
1532
+ **Acceptance Criteria:**
1533
+
1534
+ - [ ] `oneie api:webhooks:add` - Register webhook URL (interactive: URL, events)
1535
+ - [ ] `oneie api:webhooks:list` - Show all webhooks
1536
+ - [ ] `oneie api:webhooks:test [id]` - Send test event
1537
+ - [ ] `oneie api:webhooks:logs [id]` - Show delivery attempts
1538
+ - [ ] `oneie api:webhooks:remove [id]` - Delete webhook
1539
+ - [ ] Validate webhook endpoint responds correctly
1540
+
1541
+ **Example:**
1542
+
1543
+ ```bash
1544
+ $ oneie api:webhooks:add
1545
+ ? Webhook URL: https://myapp.com/webhooks
1546
+ ? Events: entity_created, entity_updated
1547
+ ✅ Webhook created (ID: wh_123)
1548
+ 📤 Sending test event...
1549
+ ✅ Test event delivered successfully
1550
+ ```
1551
+
1552
+ ---
1553
+
1554
+ ## Operations Phase: Monitoring & Observability (Infer 81-85)
1555
+
1556
+ **Agent:** agent-ops
1557
+ **Goal:** Production monitoring setup
1558
+
1559
+ ### ⏳ Infer 81: Set Up API Metrics Dashboard
1560
+
1561
+ **Status:** Pending
1562
+ **Dependencies:** Infer 70 (Performance tests complete)
1563
+ **Task:** Create real-time monitoring dashboard
1564
+ **Tool:** Grafana or Datadog
1565
+ **Acceptance Criteria:**
1566
+
1567
+ - [ ] Metrics: Requests/second, Latency (p50/p95/p99), Error rate (%), Active connections
1568
+ - [ ] Graphs: Time series (last 24h, 7d, 30d), heatmaps (latency distribution)
1569
+ - [ ] Breakdown: By endpoint, by organization, by status code
1570
+ - [ ] Alerts: High error rate (>5%), high latency (p95 >500ms), downtime
1571
+ - [ ] Dashboard accessible to internal team + customers (separate views)
1572
+
1573
+ ### ⏳ Infer 82: Add Error Tracking (Sentry Integration)
1574
+
1575
+ **Status:** Pending
1576
+ **Dependencies:** Infer 81
1577
+ **Task:** Track and triage backend errors
1578
+ **Tool:** Sentry
1579
+ **Acceptance Criteria:**
1580
+
1581
+ - [ ] Install `@sentry/node` in backend
1582
+ - [ ] Capture all 500 errors automatically
1583
+ - [ ] Capture rate limit errors (for analysis)
1584
+ - [ ] Group errors by type (auth failures, database errors, etc.)
1585
+ - [ ] Include: Stack trace, request context, user context (orgId)
1586
+ - [ ] Alert: Slack notification for critical errors
1587
+ - [ ] Integration: Link Sentry issues to GitHub issues
1588
+
1589
+ ### ⏳ Infer 83: Configure Uptime Monitoring (Status Page)
1590
+
1591
+ **Status:** Pending
1592
+ **Dependencies:** Infer 81-82
1593
+ **Task:** Public status page for API health
1594
+ **Tool:** Statuspage.io or custom
1595
+ **Acceptance Criteria:**
1596
+
1597
+ - [ ] Status page: `status.one.ie`
1598
+ - [ ] Components: API Gateway, Database, Authentication, Webhooks
1599
+ - [ ] Incidents: Automatic creation from alerting system
1600
+ - [ ] Uptime: 99.9% SLA tracking (last 30d, 90d)
1601
+ - [ ] Subscribe: Email/SMS/Slack notifications
1602
+ - [ ] History: Past incidents with postmortems
1603
+
1604
+ ### ⏳ Infer 84: Create Alerting Rules
1605
+
1606
+ **Status:** Pending
1607
+ **Dependencies:** Infer 81-83
1608
+ **Task:** Define when to notify team of issues
1609
+ **File:** `infrastructure/alerts.yml`
1610
+ **Acceptance Criteria:**
1611
+
1612
+ - [ ] Alert: Error rate >5% for 5 minutes → Page on-call engineer
1613
+ - [ ] Alert: Latency p95 >500ms for 10 minutes → Slack notification
1614
+ - [ ] Alert: Uptime <99.9% → Incident created automatically
1615
+ - [ ] Alert: Rate limit hit by >10 orgs in 1 minute → Investigate (potential attack)
1616
+ - [ ] Alert: Quota exceeded by enterprise customer → Notify sales team
1617
+ - [ ] Escalation: If not acknowledged in 15 minutes, escalate to manager
1618
+
1619
+ ### ⏳ Infer 85: Implement Distributed Tracing
1620
+
1621
+ **Status:** Pending
1622
+ **Dependencies:** Infer 81-84
1623
+ **Task:** Trace requests across services for debugging
1624
+ **Tool:** OpenTelemetry + Jaeger/Zipkin
1625
+ **Acceptance Criteria:**
1626
+
1627
+ - [ ] Install OpenTelemetry SDK
1628
+ - [ ] Trace: API Gateway → Auth → Database → Response
1629
+ - [ ] Span details: Function name, duration, input/output
1630
+ - [ ] Propagate trace IDs across service boundaries
1631
+ - [ ] Visualize: Flame graphs for slow requests
1632
+ - [ ] Retention: 7 days of traces
1633
+
1634
+ ---
1635
+
1636
+ ## Operations Phase: Documentation & Knowledge Base (Infer 86-90)
1637
+
1638
+ **Agent:** agent-documenter
1639
+ **Goal:** Comprehensive documentation for developers
1640
+
1641
+ ### ⏳ Infer 86: Write Comprehensive API Reference
1642
+
1643
+ **Status:** Pending
1644
+ **Dependencies:** Infer 30 (API Gateway complete)
1645
+ **Task:** Generate OpenAPI/Swagger spec from code
1646
+ **File:** `backend/convex/openapi.yaml`
1647
+ **Acceptance Criteria:**
1648
+
1649
+ - [ ] OpenAPI 3.0 spec with all endpoints
1650
+ - [ ] For each endpoint: Path, method, parameters, request body, responses (200/400/401/403/404/429/500)
1651
+ - [ ] Examples for each endpoint
1652
+ - [ ] Authentication scheme (Bearer token)
1653
+ - [ ] Rate limiting headers documented
1654
+ - [ ] Generate from code comments (annotations)
1655
+ - [ ] Validate: No broken links, all examples valid
1656
+
1657
+ ### ⏳ Infer 87: Create Developer Guides
1658
+
1659
+ **Status:** Pending
1660
+ **Dependencies:** Infer 86
1661
+ **Task:** Write prose guides for common workflows
1662
+ **File:** `web/src/content/docs/guides/`
1663
+ **Acceptance Criteria:**
1664
+
1665
+ - [ ] Guide: "Getting Started with ONE API" (5-minute tutorial)
1666
+ - [ ] Guide: "Authentication Best Practices" (key rotation, scoping)
1667
+ - [ ] Guide: "Building Multi-Tenant Apps" (group hierarchy patterns)
1668
+ - [ ] Guide: "Webhooks Deep Dive" (setup, security, debugging)
1669
+ - [ ] Guide: "Rate Limiting & Quotas" (understanding limits, upgrading tiers)
1670
+ - [ ] All guides: Step-by-step, code examples, troubleshooting section
1671
+
1672
+ ### ⏳ Infer 88: Add Troubleshooting Runbook
1673
+
1674
+ **Status:** Pending
1675
+ **Dependencies:** Infer 87
1676
+ **Task:** Solutions for common issues
1677
+ **File:** `web/src/content/docs/troubleshooting.md`
1678
+ **Acceptance Criteria:**
1679
+
1680
+ - [ ] Issue: "401 Unauthorized" → Check key validity, expiration, revocation status
1681
+ - [ ] Issue: "403 Forbidden" → Check scopes, verify endpoint requires correct scope
1682
+ - [ ] Issue: "429 Too Many Requests" → Explain rate limits, show how to check quota
1683
+ - [ ] Issue: "Slow requests" → Optimization tips (pagination, filtering, caching)
1684
+ - [ ] Issue: "Webhook not receiving events" → Verify URL, check logs, test endpoint
1685
+ - [ ] Each issue: Symptoms, causes, step-by-step solution
1686
+
1687
+ ### ⏳ Infer 89: Generate SDK Documentation
1688
+
1689
+ **Status:** Pending
1690
+ **Dependencies:** Infer 71-75 (SDKs complete)
1691
+ **Task:** Auto-generate docs from code comments
1692
+ **File:** `sdk/docs/`
1693
+ **Acceptance Criteria:**
1694
+
1695
+ - [ ] JavaScript/TypeScript: TypeDoc-generated docs
1696
+ - [ ] Python: Sphinx-generated docs
1697
+ - [ ] Go: GoDoc-generated docs
1698
+ - [ ] Ruby: YARD-generated docs
1699
+ - [ ] Hosted: `docs.one.ie/sdk/javascript`, `/python`, `/go`, `/ruby`
1700
+ - [ ] Searchable: Full-text search across all SDK docs
1701
+
1702
+ ### ⏳ Infer 90: Create Migration Guides (v1 → v2)
1703
+
1704
+ **Status:** Pending
1705
+ **Dependencies:** Infer 86-89
1706
+ **Task:** Future-proofing for API versioning
1707
+ **File:** `web/src/content/docs/migrations/`
1708
+ **Acceptance Criteria:**
1709
+
1710
+ - [ ] Guide: "Migrating from v1 to v2" (when v2 released)
1711
+ - [ ] Breaking changes documented
1712
+ - [ ] Side-by-side code comparisons
1713
+ - [ ] Deprecation timeline (v1 supported for 12 months)
1714
+ - [ ] Automated migration tool (CLI command)
1715
+ - [ ] For now: Placeholder guide explaining versioning strategy
1716
+
1717
+ ---
1718
+
1719
+ ## Operations Phase: Deployment & CI/CD (Infer 91-95)
1720
+
1721
+ **Agent:** agent-ops
1722
+ **Goal:** Automated deployment pipeline
1723
+
1724
+ ### ⏳ Infer 91: Configure Cloudflare Workers for API Gateway
1725
+
1726
+ **Status:** Pending
1727
+ **Dependencies:** Infer 85 (Monitoring setup complete)
1728
+ **Task:** Deploy API Gateway to Cloudflare's edge network
1729
+ **File:** `backend/wrangler.toml`
1730
+ **Acceptance Criteria:**
1731
+
1732
+ - [ ] Cloudflare Workers route: `api.one.ie/*`
1733
+ - [ ] Edge caching: Cache-Control headers for GET requests
1734
+ - [ ] DDoS protection: Cloudflare's automatic mitigation
1735
+ - [ ] Rate limiting: Cloudflare rate limiting + backend rate limiting (layered)
1736
+ - [ ] SSL/TLS: HTTPS enforced, TLS 1.3
1737
+ - [ ] Deploy: `wrangler deploy` from CI/CD
1738
+
1739
+ ### ⏳ Infer 92: Set Up Convex HTTP Endpoints
1740
+
1741
+ **Status:** Pending
1742
+ **Dependencies:** Infer 91
1743
+ **Task:** Configure Convex to handle HTTP traffic
1744
+ **File:** `backend/convex/http.ts`
1745
+ **Acceptance Criteria:**
1746
+
1747
+ - [ ] HTTP routes registered: All `/api/v1/*` endpoints
1748
+ - [ ] CORS configured: Allow all origins (or whitelist customer domains)
1749
+ - [ ] Request validation: Schema validation for all inputs
1750
+ - [ ] Response formatting: Consistent JSON structure
1751
+ - [ ] Error handling: Proper HTTP status codes
1752
+ - [ ] Deploy: `npx convex deploy` from CI/CD
1753
+
1754
+ ### ⏳ Infer 93: Implement Blue-Green Deployment
1755
+
1756
+ **Status:** Pending
1757
+ **Dependencies:** Infer 92
1758
+ **Task:** Zero-downtime deployment strategy
1759
+ **File:** `.github/workflows/deploy-api.yml`
1760
+ **Acceptance Criteria:**
1761
+
1762
+ - [ ] Two environments: Blue (current production), Green (new version)
1763
+ - [ ] Deploy new version to Green environment
1764
+ - [ ] Run smoke tests on Green (health checks)
1765
+ - [ ] Switch traffic: Blue → Green (Cloudflare Workers routing)
1766
+ - [ ] Monitor: If error rate spikes, rollback to Blue
1767
+ - [ ] Rollback: Automated, <1 minute to revert
1768
+
1769
+ ### ⏳ Infer 94: Add Automated Testing in CI
1770
+
1771
+ **Status:** Pending
1772
+ **Dependencies:** Infer 93
1773
+ **Task:** Run all tests on every commit
1774
+ **File:** `.github/workflows/test-api.yml`
1775
+ **Acceptance Criteria:**
1776
+
1777
+ - [ ] Trigger: Every push to main, every PR
1778
+ - [ ] Tests: Unit tests, integration tests, security tests
1779
+ - [ ] Coverage: Fail if coverage drops below 90%
1780
+ - [ ] Linting: ESLint, Prettier, TypeScript strict mode
1781
+ - [ ] Build: Ensure `npx convex deploy --dry-run` succeeds
1782
+ - [ ] Notify: Slack notification if tests fail
1783
+
1784
+ ### ⏳ Infer 95: Create Rollback Procedures
1785
+
1786
+ **Status:** Pending
1787
+ **Dependencies:** Infer 93-94
1788
+ **Task:** Define process for reverting bad deployments
1789
+ **File:** `one/knowledge/rollback-procedures.md`
1790
+ **Acceptance Criteria:**
1791
+
1792
+ - [ ] Automatic rollback: If error rate >10% after deploy, rollback immediately
1793
+ - [ ] Manual rollback: `oneie api:rollback` command (CLI)
1794
+ - [ ] Rollback: Switch Cloudflare routing back to previous version
1795
+ - [ ] Database migrations: Reversible (use Convex's schema versioning)
1796
+ - [ ] Postmortem: Required after every rollback (document in `one/events/`)
1797
+ - [ ] Test rollback: Quarterly drill to ensure process works
1798
+
1799
+ ---
1800
+
1801
+ ## Launch Phase: Final Steps (Infer 96-100)
1802
+
1803
+ **Agent:** agent-director
1804
+ **Goal:** Security audit, load testing, launch
1805
+
1806
+ ### ⏳ Infer 96: Conduct Security Audit (External Firm)
1807
+
1808
+ **Status:** Pending
1809
+ **Dependencies:** Infer 61-65 (Security tests complete)
1810
+ **Task:** Hire external security firm for audit
1811
+ **File:** `one/events/security-audit-final-report.md`
1812
+ **Acceptance Criteria:**
1813
+
1814
+ - [ ] Audit scope: API authentication, authorization, data isolation, rate limiting
1815
+ - [ ] Audit duration: 2 weeks
1816
+ - [ ] Deliverable: Report with findings (critical/high/medium/low)
1817
+ - [ ] Fix: All critical and high vulnerabilities before launch
1818
+ - [ ] Re-test: Verify fixes with auditors
1819
+ - [ ] Certificate: Security audit badge for marketing
1820
+
1821
+ ### ⏳ Infer 97: Perform Load Testing at Scale
1822
+
1823
+ **Status:** Pending
1824
+ **Dependencies:** Infer 66-70 (Performance tests complete)
1825
+ **Task:** Validate production capacity with realistic traffic
1826
+ **File:** `one/events/load-test-production-report.md`
1827
+ **Acceptance Criteria:**
1828
+
1829
+ - [ ] Test: 100,000 requests/minute for 1 hour (10x expected launch traffic)
1830
+ - [ ] Test: 1,000 concurrent organizations
1831
+ - [ ] Test: Burst traffic (10,000 req in 1 second)
1832
+ - [ ] Pass: 99.9% success rate, p95 latency <200ms, no errors
1833
+ - [ ] Capacity planning: Document max capacity and scaling thresholds
1834
+ - [ ] Auto-scaling: Convex scales automatically (verify)
1835
+
1836
+ ### ⏳ Infer 98: Create Onboarding Materials for First 10 Customers
1837
+
1838
+ **Status:** Pending
1839
+ **Dependencies:** Infer 46-50 (Onboarding flow complete)
1840
+ **Task:** Personalized onboarding for early adopters
1841
+ **File:** `one/events/early-customer-onboarding.md`
1842
+ **Acceptance Criteria:**
1843
+
1844
+ - [ ] Materials: Welcome email, 1-on-1 onboarding call, custom integration support
1845
+ - [ ] Beta program: Free Pro tier for 3 months
1846
+ - [ ] Feedback: Weekly surveys to gather product feedback
1847
+ - [ ] Slack channel: Private channel with engineering team
1848
+ - [ ] Success metrics: All 10 customers make >100 API calls within 1 week
1849
+ - [ ] Case studies: Write 2-3 case studies from early customers
1850
+
1851
+ ### ⏳ Infer 99: Write Launch Announcement
1852
+
1853
+ **Status:** Pending
1854
+ **Dependencies:** Infer 96-98 (All pre-launch tasks complete)
1855
+ **Task:** Create launch announcement and marketing materials
1856
+ **File:** `one/events/api-launch-announcement.md`
1857
+ **Acceptance Criteria:**
1858
+
1859
+ - [ ] Blog post: "Introducing ONE Platform Backend API"
1860
+ - [ ] Content: Vision, features, pricing, getting started
1861
+ - [ ] Channels: X (Twitter), LinkedIn, Product Hunt, Hacker News, Dev.to
1862
+ - [ ] Video: 2-minute demo screencast
1863
+ - [ ] Press release: Send to tech publications (TechCrunch, The Verge, etc.)
1864
+ - [ ] Launch date: Announce date and countdown
1865
+
1866
+ ### ⏳ Infer 100: Mark Feature Complete and Notify Stakeholders
1867
+
1868
+ **Status:** Pending
1869
+ **Dependencies:** Infer 99 (Launch announcement complete)
1870
+ **Task:** Final sign-off and handoff
1871
+ **File:** `one/events/api-feature-complete.md`
1872
+ **Acceptance Criteria:**
1873
+
1874
+ - [ ] All 100 inferences complete ✅
1875
+ - [ ] All tests passing (unit, integration, security, performance) ✅
1876
+ - [ ] Documentation complete (API reference, guides, SDKs) ✅
1877
+ - [ ] Monitoring setup (dashboards, alerts, status page) ✅
1878
+ - [ ] Security audit passed (no critical vulnerabilities) ✅
1879
+ - [ ] Load testing passed (100K req/min sustained) ✅
1880
+ - [ ] Launch announcement published ✅
1881
+ - [ ] Notify stakeholders: Engineering team, sales team, customers
1882
+ - [ ] Celebrate! 🎉
1883
+
1884
+ ---
1885
+
1886
+ ## Summary Statistics
1887
+
1888
+ **Total Inferences:** 100
1889
+ **Estimated Duration:** 60-90 days (with parallelization)
1890
+ **Agents Involved:** 7 (director, backend, frontend, designer, quality, builder, ops, documenter, problem-solver)
1891
+ **New Entity Types:** 4 (api_key, api_application, service_account, api_quota)
1892
+ **New Connection Types:** 4 (owns_api_key, authenticated_by, belongs_to_org, has_quota)
1893
+ **New Event Types:** 6 (api_key_generated, api_key_revoked, api_request_made, quota_exceeded, api_auth_failed, api_application_registered)
1894
+ **Test Coverage:** 90%+ (300+ test cases)
1895
+ **Security Audit:** External firm, OWASP Top 10
1896
+ **Performance Targets:** p95 <200ms, 99.9% uptime, 100K req/min sustained
1897
+
1898
+ ---
1899
+
1900
+ ## Next Steps
1901
+
1902
+ 1. **Start Execution:** Run `/next` to begin Infer 1
1903
+ 2. **Review Plan:** Use `/plan` to see full breakdown
1904
+ 3. **Assign Agents:** Agents will be automatically assigned based on inference type
1905
+ 4. **Track Progress:** Use `/now` to see current inference, `/done` to mark complete
1906
+ 5. **Monitor Quality:** agent-quality will continuously validate ontology alignment
1907
+
1908
+ **Ready to begin? Type `/next` to start Infer 1!**