oneie 3.7.0 → 3.8.1

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 (1156) hide show
  1. package/README.md +9 -9
  2. package/dist/commands/agent.d.ts +2 -0
  3. package/dist/commands/agent.d.ts.map +1 -1
  4. package/dist/commands/agent.js +44 -0
  5. package/dist/commands/agent.js.map +1 -1
  6. package/dist/commands/bounty.d.ts +4 -0
  7. package/dist/commands/bounty.d.ts.map +1 -0
  8. package/dist/commands/bounty.js +24 -0
  9. package/dist/commands/bounty.js.map +1 -0
  10. package/dist/commands/buy.d.ts +19 -0
  11. package/dist/commands/buy.d.ts.map +1 -0
  12. package/dist/commands/buy.js +63 -0
  13. package/dist/commands/buy.js.map +1 -0
  14. package/dist/commands/capabilities.d.ts +4 -0
  15. package/dist/commands/capabilities.d.ts.map +1 -0
  16. package/dist/commands/capabilities.js +18 -0
  17. package/dist/commands/capabilities.js.map +1 -0
  18. package/dist/commands/commend.d.ts +4 -0
  19. package/dist/commands/commend.d.ts.map +1 -0
  20. package/dist/commands/commend.js +13 -0
  21. package/dist/commands/commend.js.map +1 -0
  22. package/dist/commands/completion.d.ts +4 -0
  23. package/dist/commands/completion.d.ts.map +1 -0
  24. package/dist/commands/completion.js +49 -0
  25. package/dist/commands/completion.js.map +1 -0
  26. package/dist/commands/config.d.ts +4 -0
  27. package/dist/commands/config.d.ts.map +1 -0
  28. package/dist/commands/config.js +78 -0
  29. package/dist/commands/config.js.map +1 -0
  30. package/dist/commands/deploy.d.ts +1 -1
  31. package/dist/commands/deploy.d.ts.map +1 -1
  32. package/dist/commands/deploy.js +39 -4
  33. package/dist/commands/deploy.js.map +1 -1
  34. package/dist/commands/doctor.d.ts +4 -0
  35. package/dist/commands/doctor.d.ts.map +1 -0
  36. package/dist/commands/doctor.js +72 -0
  37. package/dist/commands/doctor.js.map +1 -0
  38. package/dist/commands/domain.d.ts +4 -0
  39. package/dist/commands/domain.d.ts.map +1 -0
  40. package/dist/commands/domain.js +19 -0
  41. package/dist/commands/domain.js.map +1 -0
  42. package/dist/commands/export.d.ts +4 -0
  43. package/dist/commands/export.d.ts.map +1 -0
  44. package/dist/commands/export.js +15 -0
  45. package/dist/commands/export.js.map +1 -0
  46. package/dist/commands/fade.d.ts.map +1 -1
  47. package/dist/commands/fade.js +8 -4
  48. package/dist/commands/fade.js.map +1 -1
  49. package/dist/commands/flag.d.ts +4 -0
  50. package/dist/commands/flag.d.ts.map +1 -0
  51. package/dist/commands/flag.js +13 -0
  52. package/dist/commands/flag.js.map +1 -0
  53. package/dist/commands/health.d.ts +4 -0
  54. package/dist/commands/health.d.ts.map +1 -0
  55. package/dist/commands/health.js +11 -0
  56. package/dist/commands/health.js.map +1 -0
  57. package/dist/commands/highways.d.ts.map +1 -1
  58. package/dist/commands/highways.js +7 -4
  59. package/dist/commands/highways.js.map +1 -1
  60. package/dist/commands/hire.d.ts +4 -0
  61. package/dist/commands/hire.d.ts.map +1 -0
  62. package/dist/commands/hire.js +16 -0
  63. package/dist/commands/hire.js.map +1 -0
  64. package/dist/commands/init.d.ts.map +1 -1
  65. package/dist/commands/init.js +85 -48
  66. package/dist/commands/init.js.map +1 -1
  67. package/dist/commands/invite.d.ts +4 -0
  68. package/dist/commands/invite.d.ts.map +1 -0
  69. package/dist/commands/invite.js +37 -0
  70. package/dist/commands/invite.js.map +1 -0
  71. package/dist/commands/mark.d.ts.map +1 -1
  72. package/dist/commands/mark.js +7 -7
  73. package/dist/commands/mark.js.map +1 -1
  74. package/dist/commands/pay.d.ts +4 -0
  75. package/dist/commands/pay.d.ts.map +1 -0
  76. package/dist/commands/pay.js +21 -0
  77. package/dist/commands/pay.js.map +1 -0
  78. package/dist/commands/pipe.d.ts +4 -0
  79. package/dist/commands/pipe.d.ts.map +1 -0
  80. package/dist/commands/pipe.js +35 -0
  81. package/dist/commands/pipe.js.map +1 -0
  82. package/dist/commands/publish.d.ts +4 -0
  83. package/dist/commands/publish.d.ts.map +1 -0
  84. package/dist/commands/publish.js +23 -0
  85. package/dist/commands/publish.js.map +1 -0
  86. package/dist/commands/repl.d.ts +4 -0
  87. package/dist/commands/repl.d.ts.map +1 -0
  88. package/dist/commands/repl.js +56 -0
  89. package/dist/commands/repl.js.map +1 -0
  90. package/dist/commands/revenue.d.ts +4 -0
  91. package/dist/commands/revenue.d.ts.map +1 -0
  92. package/dist/commands/revenue.js +11 -0
  93. package/dist/commands/revenue.js.map +1 -0
  94. package/dist/commands/sell.d.ts +15 -0
  95. package/dist/commands/sell.d.ts.map +1 -0
  96. package/dist/commands/sell.js +49 -0
  97. package/dist/commands/sell.js.map +1 -0
  98. package/dist/commands/stats.d.ts +4 -0
  99. package/dist/commands/stats.d.ts.map +1 -0
  100. package/dist/commands/stats.js +11 -0
  101. package/dist/commands/stats.js.map +1 -0
  102. package/dist/commands/status.d.ts +4 -0
  103. package/dist/commands/status.d.ts.map +1 -0
  104. package/dist/commands/status.js +18 -0
  105. package/dist/commands/status.js.map +1 -0
  106. package/dist/commands/subscribe.d.ts +14 -0
  107. package/dist/commands/subscribe.d.ts.map +1 -0
  108. package/dist/commands/subscribe.js +33 -0
  109. package/dist/commands/subscribe.js.map +1 -0
  110. package/dist/commands/tail.d.ts +4 -0
  111. package/dist/commands/tail.d.ts.map +1 -0
  112. package/dist/commands/tail.js +51 -0
  113. package/dist/commands/tail.js.map +1 -0
  114. package/dist/commands/warn.d.ts.map +1 -1
  115. package/dist/commands/warn.js +6 -6
  116. package/dist/commands/warn.js.map +1 -1
  117. package/dist/index.js +70 -1
  118. package/dist/index.js.map +1 -1
  119. package/dist/lib/args.d.ts +1 -0
  120. package/dist/lib/args.d.ts.map +1 -1
  121. package/dist/lib/args.js +3 -0
  122. package/dist/lib/args.js.map +1 -1
  123. package/dist/lib/output.d.ts +5 -0
  124. package/dist/lib/output.d.ts.map +1 -0
  125. package/dist/lib/output.js +32 -0
  126. package/dist/lib/output.js.map +1 -0
  127. package/dist/lib/sdk.d.ts +10 -0
  128. package/dist/lib/sdk.d.ts.map +1 -0
  129. package/dist/lib/sdk.js +22 -0
  130. package/dist/lib/sdk.js.map +1 -0
  131. package/dist/utils/installation-setup.d.ts +15 -0
  132. package/dist/utils/installation-setup.d.ts.map +1 -1
  133. package/dist/utils/installation-setup.js +63 -0
  134. package/dist/utils/installation-setup.js.map +1 -1
  135. package/package.json +3 -18
  136. package/.claude/agents/TROUBLESHOOTING.md +0 -530
  137. package/.claude/agents/agent-backend.md +0 -574
  138. package/.claude/agents/agent-builder.md +0 -911
  139. package/.claude/agents/agent-claude.md +0 -645
  140. package/.claude/agents/agent-clean.md +0 -477
  141. package/.claude/agents/agent-clone.md +0 -554
  142. package/.claude/agents/agent-designer.md +0 -1080
  143. package/.claude/agents/agent-director.md +0 -2254
  144. package/.claude/agents/agent-documenter.md +0 -688
  145. package/.claude/agents/agent-frontend.md +0 -1199
  146. package/.claude/agents/agent-integrator.md +0 -670
  147. package/.claude/agents/agent-lawyer.md +0 -1320
  148. package/.claude/agents/agent-news.md +0 -363
  149. package/.claude/agents/agent-onboard.md +0 -613
  150. package/.claude/agents/agent-ontology.md +0 -585
  151. package/.claude/agents/agent-ops.md +0 -1275
  152. package/.claude/agents/agent-problem-solver.md +0 -669
  153. package/.claude/agents/agent-quality.md +0 -1042
  154. package/.claude/agents/agent-sales.md +0 -507
  155. package/.claude/agents/agent-writer.md +0 -1068
  156. package/.claude/commands/cascade.md +0 -742
  157. package/.claude/commands/chat.md +0 -728
  158. package/.claude/commands/commit.md +0 -95
  159. package/.claude/commands/create.md +0 -544
  160. package/.claude/commands/deploy.md +0 -309
  161. package/.claude/commands/fast.md +0 -636
  162. package/.claude/commands/mcp-on.md +0 -191
  163. package/.claude/commands/media-upload.md +0 -186
  164. package/.claude/commands/news.md +0 -274
  165. package/.claude/commands/onboard.md +0 -440
  166. package/.claude/commands/one.md +0 -398
  167. package/.claude/commands/optimize.md +0 -74
  168. package/.claude/commands/plan.md +0 -719
  169. package/.claude/commands/push.md +0 -214
  170. package/.claude/commands/release.md +0 -105
  171. package/.claude/commands/review.md +0 -99
  172. package/.claude/commands/server.md +0 -487
  173. package/.claude/commands/start.md +0 -227
  174. package/.claude/commands/test.md +0 -197
  175. package/.claude/commands/validate.md +0 -140
  176. package/.claude/hooks/.last-news-context +0 -1
  177. package/.claude/hooks/PULL-BEFORE-PUSH-GUIDE.md +0 -473
  178. package/.claude/hooks/README-knowledge-hooks.md +0 -451
  179. package/.claude/hooks/README-news-generation.md +0 -364
  180. package/.claude/hooks/README-root-cleanup.md +0 -200
  181. package/.claude/hooks/README.md +0 -284
  182. package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
  183. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  184. package/.claude/hooks/auto-format.sh +0 -106
  185. package/.claude/hooks/check-filenames.py +0 -177
  186. package/.claude/hooks/clean-post.py +0 -468
  187. package/.claude/hooks/clean-pre.py +0 -393
  188. package/.claude/hooks/clean-root-markdown.sh +0 -73
  189. package/.claude/hooks/commit-push.sh +0 -95
  190. package/.claude/hooks/done.py +0 -236
  191. package/.claude/hooks/format-hook.sh +0 -163
  192. package/.claude/hooks/formatting.py +0 -187
  193. package/.claude/hooks/hook-logger.sh +0 -173
  194. package/.claude/hooks/knowledge-post.py +0 -355
  195. package/.claude/hooks/knowledge-pre.py +0 -245
  196. package/.claude/hooks/mcp-on.sh +0 -134
  197. package/.claude/hooks/notification-hook.sh +0 -279
  198. package/.claude/hooks/ontology-validation.py +0 -255
  199. package/.claude/hooks/push.sh +0 -153
  200. package/.claude/hooks/release-cli.sh +0 -205
  201. package/.claude/hooks/root-cleanup.py +0 -217
  202. package/.claude/hooks/security-hook.sh +0 -397
  203. package/.claude/hooks/tag-all-docs.py +0 -464
  204. package/.claude/hooks/test-validate-ontology.sh +0 -170
  205. package/.claude/hooks/todo.py +0 -368
  206. package/.claude/hooks/track-changes.sh +0 -101
  207. package/.claude/hooks/validate-imports.py +0 -182
  208. package/.claude/hooks/validate-ontology-structure-summary.md +0 -243
  209. package/.claude/hooks/validate-ontology-structure.py +0 -558
  210. package/.claude/hooks/validate-ontology-structure.py.backup +0 -518
  211. package/.claude/hooks/validate-ontology.py +0 -140
  212. package/.claude/hooks/write-news.sh +0 -194
  213. package/.claude/skills/INDEX.md +0 -523
  214. package/.claude/skills/REGISTRY.md +0 -529
  215. package/.claude/skills/agent-backend-create-mutation.md +0 -319
  216. package/.claude/skills/agent-designer-create-wireframe.md +0 -341
  217. package/.claude/skills/agent-frontend-create-page.md +0 -413
  218. package/.claude/skills/agents/README.md +0 -238
  219. package/.claude/skills/astro/add-content-collection.md +0 -30
  220. package/.claude/skills/astro/check-build.md +0 -29
  221. package/.claude/skills/astro/create-component.md +0 -29
  222. package/.claude/skills/astro/create-page.md +0 -30
  223. package/.claude/skills/astro/optimize-performance.md +0 -21
  224. package/.claude/skills/convex/check-deployment.md +0 -46
  225. package/.claude/skills/convex/create-mutation.md +0 -405
  226. package/.claude/skills/convex/create-query.md +0 -52
  227. package/.claude/skills/convex/read-schema.md +0 -373
  228. package/.claude/skills/convex/test-function.md +0 -50
  229. package/.claude/skills/deployment/check-deployment-health.md +0 -20
  230. package/.claude/skills/deployment/create-release.md +0 -21
  231. package/.claude/skills/deployment/deploy-cloudflare.md +0 -31
  232. package/.claude/skills/deployment/deploy-convex.md +0 -30
  233. package/.claude/skills/deployment/sync-repositories.md +0 -19
  234. package/.claude/skills/design/check-accessibility.md +0 -21
  235. package/.claude/skills/design/create-component-spec.md +0 -27
  236. package/.claude/skills/design/generate-design-tokens.md +0 -24
  237. package/.claude/skills/design/generate-wireframe.md +0 -30
  238. package/.claude/skills/documentation/create-migration-guide.md +0 -20
  239. package/.claude/skills/documentation/generate-api-docs.md +0 -27
  240. package/.claude/skills/documentation/generate-readme.md +0 -22
  241. package/.claude/skills/documentation/update-knowledge.md +0 -20
  242. package/.claude/skills/integration/connect-external-system.md +0 -21
  243. package/.claude/skills/integration/implement-a2a.md +0 -20
  244. package/.claude/skills/integration/implement-acp.md +0 -20
  245. package/.claude/skills/integration/verify-integration.md +0 -20
  246. package/.claude/skills/ontology/README.md +0 -255
  247. package/.claude/skills/ontology/check-dimension.md +0 -307
  248. package/.claude/skills/ontology/generate-entity-type.md +0 -339
  249. package/.claude/skills/ontology/validate-schema.md +0 -229
  250. package/.claude/skills/ontology/verify-relationships.md +0 -310
  251. package/.claude/skills/problem-solving/analyze-test-failure.md +0 -21
  252. package/.claude/skills/problem-solving/identify-root-cause.md +0 -20
  253. package/.claude/skills/problem-solving/propose-solution.md +0 -29
  254. package/.claude/skills/problem-solving/verify-fix.md +0 -21
  255. package/.claude/skills/sales/generate-demo-script.md +0 -21
  256. package/.claude/skills/sales/qualify-lead.md +0 -30
  257. package/.claude/skills/sales/track-trial.md +0 -20
  258. package/.claude/skills/sales/verify-kyc.md +0 -20
  259. package/.claude/skills/testing/analyze-coverage.md +0 -24
  260. package/.claude/skills/testing/generate-tests.md +0 -24
  261. package/.claude/skills/testing/run-tests.md +0 -27
  262. package/.claude/skills/testing/validate-e2e.md +0 -25
  263. package/AGENTS.md +0 -60
  264. package/CLAUDE.md +0 -130
  265. package/CREATE-WEBSITE.md +0 -458
  266. package/SECURITY.md +0 -31
  267. package/folders.yaml +0 -92
  268. package/one/README.md +0 -760
  269. package/one/actors/anthony-o-connell.md +0 -469
  270. package/one/actors/people.md +0 -590
  271. package/one/events/0-changes.md +0 -2764
  272. package/one/events/1-PROJECTS-START-HERE.md +0 -384
  273. package/one/events/1-projects-developer-quickstart.md +0 -620
  274. package/one/events/1-projects-feature.md +0 -2047
  275. package/one/events/1-projects-team-briefing.md +0 -583
  276. package/one/events/2024-10-14-deployment-plan.md +0 -330
  277. package/one/events/2024-10-14-deployment-success.md +0 -447
  278. package/one/events/2024-10-14-final-sync-complete.md +0 -250
  279. package/one/events/2024-10-14-release-v2.0.6.md +0 -414
  280. package/one/events/2024-10-15-agent-clean-v2-summary.md +0 -495
  281. package/one/events/2024-10-15-handoff-to-clean.md +0 -347
  282. package/one/events/2024-10-15-package-manager-tests.md +0 -442
  283. package/one/events/2024-10-15-release-command-complete.md +0 -416
  284. package/one/events/2025-10-15-private-files-secured.md +0 -359
  285. package/one/events/2025-10-15-unignore-public-group-docs.md +0 -298
  286. package/one/events/2025-11-08-backend-claude-refactor.md +0 -242
  287. package/one/events/2025-11-08-parallel-agent-implementation.md +0 -620
  288. package/one/events/2025-11-10-ai-integration-status-report.md +0 -241
  289. package/one/events/ACCESSIBILITY_CHECKLIST.md +0 -275
  290. package/one/events/ACCESSIBILITY_FIXES_SUMMARY.md +0 -293
  291. package/one/events/ALIGNMENT_REPORT_PROBLEM_SOLVER.md +0 -335
  292. package/one/events/ALIGNMENT_SUMMARY.md +0 -280
  293. package/one/events/API_ROUTES_FIXES_SUMMARY.md +0 -280
  294. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +0 -654
  295. package/one/events/AUDIT-ONTOLOGY-ALIGNMENT.md +0 -598
  296. package/one/events/AUDIT_PLAN_COMPLETION-20251108-125555.md +0 -262
  297. package/one/events/BEFORE_AFTER_COMPARISON.md +0 -978
  298. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +0 -372
  299. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +0 -430
  300. package/one/events/CHARTS-READY-TO-USE-20251106-080939.md +0 -184
  301. package/one/events/CHARTS-SUMMARY-20251106-080938.md +0 -196
  302. package/one/events/CLAUDE copy.md +0 -897
  303. package/one/events/CLEANUP-RELEASE-V2.0.8.md +0 -308
  304. package/one/events/CLOUDFLARE-FS-FIX-20251106-100516.md +0 -75
  305. package/one/events/COMPONENT_SHOWCASE-20251106-080938.md +0 -629
  306. package/one/events/CONNECTIONS_DEMO.md +0 -519
  307. package/one/events/CREATE-WEBSITE.md +0 -460
  308. package/one/events/CRITICAL-FIXES-COMPLETE.md +0 -571
  309. package/one/events/CUSTOM-DOMAIN.md +0 -375
  310. package/one/events/DELIVERABLES.md +0 -450
  311. package/one/events/DELIVERABLES.txt +0 -273
  312. package/one/events/DEMO-GROUPS-PAGE.md +0 -410
  313. package/one/events/DEMO-TESTING-SUMMARY.md +0 -536
  314. package/one/events/DEMO_COMPONENTS.md +0 -505
  315. package/one/events/DEMO_HOOKS_INDEX.md +0 -352
  316. package/one/events/DEMO_INFRASTRUCTURE.md +0 -923
  317. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +0 -588
  318. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +0 -449
  319. package/one/events/DEMO_QUICK_REFERENCE.md +0 -459
  320. package/one/events/DEMO_SETUP.md +0 -494
  321. package/one/events/DEPLOYMENT copy.md +0 -444
  322. package/one/events/DEPLOYMENT.md +0 -196
  323. package/one/events/DESIGN-DELIVERABLES-20251106-080938.md +0 -557
  324. package/one/events/DESIGN-EXECUTIVE-SUMMARY-20251106-080938.md +0 -484
  325. package/one/events/DOCS-SYSTEM-GUIDE-20251105-142103.md +0 -458
  326. package/one/events/DOCUMENTER-DELIVERY-SUMMARY.md +0 -481
  327. package/one/events/DOCUMENTER-EXECUTION-GUIDE.md +0 -394
  328. package/one/events/DOCUMENTER-TASK-BREAKDOWN.md +0 -783
  329. package/one/events/ECOMMERCE-BEFORE-AFTER.md +0 -267
  330. package/one/events/ECOMMERCE-DEMO-PLAN.md +0 -243
  331. package/one/events/ECOMMERCE-ENHANCEMENTS.md +0 -594
  332. package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +0 -439
  333. package/one/events/ECOMMERCE-LIVE-DEMO.md +0 -381
  334. package/one/events/ECOMMERCE-QUICKSTART.md +0 -376
  335. package/one/events/ECOMMERCE-README.md +0 -354
  336. package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +0 -214
  337. package/one/events/ECOMMERCE-SETUP-SUMMARY.md +0 -414
  338. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +0 -753
  339. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +0 -941
  340. package/one/events/EFFECT_TS_API_PATTERN.md +0 -496
  341. package/one/events/EXECUTION-READY.md +0 -359
  342. package/one/events/EXECUTION-SUMMARY.md +0 -478
  343. package/one/events/FEATURE-2-4-COMPLETE.md +0 -320
  344. package/one/events/FEATURE_2_3_COMPLETE.md +0 -593
  345. package/one/events/FILE-REFERENCE-20251105-142103.md +0 -325
  346. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +0 -241
  347. package/one/events/GROUPS-MIGRATION.md +0 -643
  348. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +0 -432
  349. package/one/events/HANDOFF.md +0 -331
  350. package/one/events/HOOKS-DEMO.md +0 -459
  351. package/one/events/IMPLEMENTATION-CHECKLIST-20251105-142103.md +0 -274
  352. package/one/events/IMPLEMENTATION-REPORT-DOCS-20251105-142102.md +0 -394
  353. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +0 -568
  354. package/one/events/IMPLEMENTATION_SUMMARY-20251106-080938.md +0 -571
  355. package/one/events/IMPLEMENTATION_SUMMARY.md +0 -547
  356. package/one/events/INDEX-ALL-AGENTS.md +0 -190
  357. package/one/events/INDEX-FRONTEND-TESTING.md +0 -524
  358. package/one/events/INDEX-PROBLEM-SOLVER.md +0 -488
  359. package/one/events/INDEX-QUALITY-AGENT-INFER65.md +0 -455
  360. package/one/events/INDEX.md +0 -295
  361. package/one/events/INDEX_QUICK_START_REDESIGN-20251106-080939.md +0 -342
  362. package/one/events/INSTALL-TESTS.md +0 -311
  363. package/one/events/INSTALLATION_FOLDERS.md +0 -534
  364. package/one/events/INSTALLATION_FOLDERS_FILES.md +0 -223
  365. package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +0 -437
  366. package/one/events/INTEGRATION-ARCHITECTURE.md +0 -579
  367. package/one/events/INTEGRATION-CHECKLIST.md +0 -1252
  368. package/one/events/INTEGRATION-ORCHESTRATION.md +0 -2641
  369. package/one/events/INTEGRATION-SUMMARY.md +0 -671
  370. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +0 -684
  371. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +0 -660
  372. package/one/events/LANDING-PAGE-QUICKSTART.md +0 -425
  373. package/one/events/LICENSE.md +0 -107
  374. package/one/events/MASTER-COORDINATION-PLAN.md +0 -613
  375. package/one/events/MASTER-ORCHESTRATION-INFER65.md +0 -441
  376. package/one/events/MASTER-PLAN-SUMMARY.md +0 -309
  377. package/one/events/MCP-CONFIGURATION.md +0 -354
  378. package/one/events/MCP-SETUP-COMPLETE.md +0 -223
  379. package/one/events/MIGRATION-REPORT.md +0 -453
  380. package/one/events/MIGRATION.md +0 -87
  381. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +0 -1663
  382. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +0 -643
  383. package/one/events/NEWS-COMMANDS.md +0 -506
  384. package/one/events/NEWS-SYSTEM-SUMMARY.md +0 -480
  385. package/one/events/NODE-UPGRADE.md +0 -129
  386. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +0 -416
  387. package/one/events/ONTOLOGY-HOOKS-README.md +0 -718
  388. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +0 -383
  389. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +0 -569
  390. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +0 -491
  391. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +0 -504
  392. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +0 -221
  393. package/one/events/PACKAGE-STRUCTURE.md +0 -328
  394. package/one/events/PLAN-COMPLETE.md +0 -429
  395. package/one/events/PLAYBOOK-SETUP-SUMMARY.md +0 -349
  396. package/one/events/PROBLEM-SOLVER-EXECUTIVE-SUMMARY.md +0 -484
  397. package/one/events/PROBLEM-SOLVER-QUICKSTART.md +0 -420
  398. package/one/events/PROJECTS-PLAN-SUMMARY.md +0 -480
  399. package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +0 -585
  400. package/one/events/QA-CHECKLIST.md +0 -692
  401. package/one/events/QUALITY-AGENT-SUMMARY.md +0 -334
  402. package/one/events/QUALITY-EXECUTION-CHECKLIST.md +0 -593
  403. package/one/events/QUICK-REFERENCE-FRONTEND-TESTING.md +0 -475
  404. package/one/events/QUICK-START-ONTOLOGY.md +0 -426
  405. package/one/events/QUICK_START_REDESIGN-20251106-080938.md +0 -400
  406. package/one/events/README-PROBLEM-SOLVER.md +0 -394
  407. package/one/events/README-archived.md +0 -537
  408. package/one/events/README_QUICK_START_REDESIGN-20251106-080938.md +0 -484
  409. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +0 -657
  410. package/one/events/SEARCH_DEMO_DELIVERY.md +0 -433
  411. package/one/events/SEARCH_DEMO_SUMMARY.md +0 -321
  412. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +0 -399
  413. package/one/events/SECURITY-AUDIT-FIXES.md +0 -394
  414. package/one/events/SECURITY-SCAN-COMPLETE.md +0 -299
  415. package/one/events/SHOP-BUILD-STATUS.md +0 -132
  416. package/one/events/SHOP-PREMIUM-UPDATE.md +0 -165
  417. package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +0 -280
  418. package/one/events/SITE-WIDE-GRADIENT-FIX.md +0 -317
  419. package/one/events/SPECIALIST-QUICK-REFERENCE.md +0 -678
  420. package/one/events/STORE-PRODUCTION-READY-STATUS.md +0 -377
  421. package/one/events/STRIPE-INTEGRATION.md +0 -432
  422. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +0 -447
  423. package/one/events/STRIPE-SETUP-GUIDE.md +0 -480
  424. package/one/events/TEST-PLAN-INDEX.md +0 -364
  425. package/one/events/TEST-PLAN.md +0 -1435
  426. package/one/events/TEST-SUMMARY.md +0 -411
  427. package/one/events/TESTING-DELIVERY.txt +0 -372
  428. package/one/events/TESTS-QUICK-REF.md +0 -280
  429. package/one/events/TRANSITIONS-QUICK-START.md +0 -159
  430. package/one/events/TRANSPARENCY-FIXES.md +0 -293
  431. package/one/events/TYPESCRIPT_FIXES.md +0 -170
  432. package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +0 -412
  433. package/one/events/TYPESCRIPT_FIXES_INDEX.md +0 -359
  434. package/one/events/VERIFICATION_CHECKLIST-20251106-080938.md +0 -326
  435. package/one/events/VIEW-TRANSITIONS.md +0 -446
  436. package/one/events/agent-command-implementation.md +0 -305
  437. package/one/events/agent-director-enhancement-summary.md +0 -404
  438. package/one/events/agent-director-routing-update.md +0 -214
  439. package/one/events/agent-onboard-implementation-summary.md +0 -475
  440. package/one/events/agent-ontology-alignment-completion.md +0 -263
  441. package/one/events/ai-integration-complete.md +0 -294
  442. package/one/events/ai-integration-lessons-learned.md +0 -511
  443. package/one/events/backend-integration-tests.md +0 -624
  444. package/one/events/backend-structure-diagram.txt +0 -393
  445. package/one/events/backend-structure-summary.txt +0 -269
  446. package/one/events/bullfm-video-podcast-analysis.md +0 -319
  447. package/one/events/clean-agent-ontology-cleanup-report.md +0 -371
  448. package/one/events/clean-agent-todo-analysis-summary.md +0 -336
  449. package/one/events/cloudflare-automation-complete.md +0 -350
  450. package/one/events/cloudflare-pages-infrastructure-setup.md +0 -282
  451. package/one/events/contact-page-complete.md +0 -316
  452. package/one/events/convex-analysis-index.md +0 -322
  453. package/one/events/convex-structure-analysis.md +0 -718
  454. package/one/events/creation-instructions-9-todos.md +0 -906
  455. package/one/events/cycle-3-video-player-port-20251108.md +0 -368
  456. package/one/events/cycle-3-video-player-port-complete-20251108.md +0 -334
  457. package/one/events/deployment-installation-folders.md +0 -178
  458. package/one/events/deployment-ops-summary.md +0 -386
  459. package/one/events/deployment-verification.md +0 -366
  460. package/one/events/design-spec-complete.md +0 -226
  461. package/one/events/documentation-audit-index.md +0 -473
  462. package/one/events/documentation-audit-summary.md +0 -417
  463. package/one/events/documentation-improvement-roadmap.md +0 -906
  464. package/one/events/documentation-standards-compliance-report.md +0 -538
  465. package/one/events/documentation-updates.md +0 -370
  466. package/one/events/events.md +0 -563
  467. package/one/events/fix-product-hydration-20251106.md +0 -211
  468. package/one/events/frontend-effects-complete.md +0 -584
  469. package/one/events/frontend-effects-orchestration.md +0 -1356
  470. package/one/events/frontend-effects-risk-register.md +0 -1055
  471. package/one/events/frontend-effects-week1-assignments.md +0 -1594
  472. package/one/events/hook-ontology-alignment-summary.md +0 -528
  473. package/one/events/installation-folders-workflow-integration.md +0 -458
  474. package/one/events/landing-page-generator.md +0 -476
  475. package/one/events/legal-assessment-2025-10-16.md +0 -1917
  476. package/one/events/master-coordination-plan.json +0 -1078
  477. package/one/events/master-plan-9-todos.md +0 -900
  478. package/one/events/mobile-performance-optimization.md +0 -179
  479. package/one/events/onboarding-implementation-complete.md +0 -523
  480. package/one/events/ontology-audit-agent-clone.md +0 -323
  481. package/one/events/ontology-test-examples.md +0 -580
  482. package/one/events/phase1-backend-implementation-complete.md +0 -536
  483. package/one/events/plan-completion-audit.md +0 -707
  484. package/one/events/plan-files-updated.md +0 -273
  485. package/one/events/production-readiness-plan.md +0 -389
  486. package/one/events/readme.md +0 -100
  487. package/one/events/release.md +0 -272
  488. package/one/events/root-cleanup-alignment-report.md +0 -265
  489. package/one/events/security-fixes-2025-01-15.md +0 -226
  490. package/one/events/separate-implementation-status.md +0 -555
  491. package/one/events/server-command-optimization-20251108.md +0 -150
  492. package/one/events/session-summary-2025-10-18.md +0 -366
  493. package/one/events/skills-complete.md +0 -351
  494. package/one/events/skills-infer-6-10-summary.md +0 -70
  495. package/one/events/skills-phase1-complete.md +0 -281
  496. package/one/events/specialist-assignments.md +0 -766
  497. package/one/events/structural-analysis-architecture-vs-plans.md +0 -600
  498. package/one/events/test-dashboard.md +0 -363
  499. package/one/events/test-index.md +0 -421
  500. package/one/events/test-report-ontology.md +0 -611
  501. package/one/events/testing-summary.md +0 -388
  502. package/one/events/todo-agent-builder.md +0 -1180
  503. package/one/events/todo-agent-director.md +0 -164
  504. package/one/events/todo-agent-documenter.md +0 -1815
  505. package/one/events/todo-agent-frontend.md +0 -1542
  506. package/one/events/todo-agent-problem-solver.md +0 -1682
  507. package/one/events/todo-agent-quality.md +0 -1647
  508. package/one/events/todo-refactoring-complete.md +0 -408
  509. package/one/events/wave1-backend-implementation-complete.md +0 -698
  510. package/one/events/web-AI_INTEGRATION_PHASE2_SUMMARY-20251111-152540.md +0 -529
  511. package/one/events/web-BUY-IN-CHATGPT-README-20251116-235241.md +0 -491
  512. package/one/events/web-CHARTS-IMPLEMENTATION-20251106-080939.md +0 -576
  513. package/one/events/web-CHARTS-QUICKSTART-20251106-080939.md +0 -416
  514. package/one/events/web-CODE-HIGHLIGHTING-SUMMARY-20251111-152540.md +0 -442
  515. package/one/events/web-DEPLOYMENT_SUMMARY-20251116-005428.md +0 -290
  516. package/one/events/web-DESIGN-SUMMARY-20251106-080939.md +0 -514
  517. package/one/events/web-README-AI-INTEGRATION-20251111-152540.md +0 -196
  518. package/one/events/web-RECHARTS-INTEGRATION-20251111-152540.md +0 -265
  519. package/one/events/web-RELEASE_OPTIMIZATION_PLAN-20251116-005428.md +0 -447
  520. package/one/events/web-TEST-CLEANUP-20251105-143205.md +0 -3
  521. package/one/events/web-USING-ANY-COMPONENT-IN-CHAT-20251111-152540.md +0 -561
  522. package/one/events/web-test-code-highlighting-20251111-152540.md +0 -231
  523. package/one/groups/features.md +0 -2904
  524. package/one/groups/groups.md +0 -587
  525. package/one/groups/one.md +0 -619
  526. package/one/groups/strategy-copy.md +0 -887
  527. package/one/learning/.obsidian/app.json +0 -1
  528. package/one/learning/.obsidian/appearance.json +0 -1
  529. package/one/learning/.obsidian/core-plugins.json +0 -33
  530. package/one/learning/.obsidian/ecommerce-ontology.md +0 -210
  531. package/one/learning/.obsidian/workspace.json +0 -211
  532. package/one/learning/100-inference-quick-reference.md +0 -449
  533. package/one/learning/ag-ui-protocol.md +0 -613
  534. package/one/learning/agent-onboard-usage.md +0 -630
  535. package/one/learning/agentic-commerce.md +0 -146
  536. package/one/learning/ai-agents-vs-memecoins-thesis.md +0 -683
  537. package/one/learning/ai-api-reference.md +0 -715
  538. package/one/learning/ai-platform.md +0 -323
  539. package/one/learning/ai-quickstart.md +0 -355
  540. package/one/learning/ai-sdk-implementation.md +0 -436
  541. package/one/learning/ai-token-crypto-analysis-framework.md +0 -1191
  542. package/one/learning/ai-token-paradigm-shift-2025.md +0 -732
  543. package/one/learning/altcoin-cycle-prediction-ontology.md +0 -884
  544. package/one/learning/altcoin-cycle-trading-strategy.md +0 -642
  545. package/one/learning/architecture-any-backend.md +0 -1589
  546. package/one/learning/architecture-diagram.md +0 -404
  547. package/one/learning/architecture-frontend.md +0 -1014
  548. package/one/learning/architecture.md +0 -1742
  549. package/one/learning/archived/ontology.old.md +0 -2840
  550. package/one/learning/astro-effect-complete-vision.md +0 -2148
  551. package/one/learning/astro-effect-simple-architecture.md +0 -750
  552. package/one/learning/audit-agent-onboard-alignment.md +0 -481
  553. package/one/learning/audit-agent-sales-alignment.md +0 -444
  554. package/one/learning/backend-api-reference.md +0 -728
  555. package/one/learning/cascading-context-specification.md +0 -1617
  556. package/one/learning/claude-code-integration.md +0 -1293
  557. package/one/learning/cli-claude-handoff.md +0 -736
  558. package/one/learning/context-engineering.md +0 -610
  559. package/one/learning/crypto-analysis-strategy.md +0 -1276
  560. package/one/learning/crypto-cycle-2024-2025-analysis.md +0 -44
  561. package/one/learning/crypto.md +0 -978
  562. package/one/learning/develop/design.md +0 -364
  563. package/one/learning/develop/index.md +0 -145
  564. package/one/learning/development-commands.md +0 -251
  565. package/one/learning/docs.md +0 -627
  566. package/one/learning/dsl.md +0 -1678
  567. package/one/learning/event-driven-documentation.md +0 -270
  568. package/one/learning/files.md +0 -2489
  569. package/one/learning/frontend.md +0 -1056
  570. package/one/learning/games-english.md +0 -691
  571. package/one/learning/games.md +0 -1082
  572. package/one/learning/generative-ui-patterns.md +0 -559
  573. package/one/learning/guidelines.md +0 -314
  574. package/one/learning/hono.md +0 -2127
  575. package/one/learning/implementation-examples.md +0 -2554
  576. package/one/learning/installation-folders.md +0 -366
  577. package/one/learning/institutional-cycle-paradigm-2025.md +0 -555
  578. package/one/learning/knowledge.md +0 -660
  579. package/one/learning/language.md +0 -998
  580. package/one/learning/lessons-learned.md +0 -378
  581. package/one/learning/lessons-website-building-focus.md +0 -382
  582. package/one/learning/merge-report.md +0 -254
  583. package/one/learning/metadata-system.md +0 -504
  584. package/one/learning/nine-padel-playbook.md +0 -229
  585. package/one/learning/one-protocol-ai-agents.md +0 -892
  586. package/one/learning/one-protocol-executive-report.md +0 -617
  587. package/one/learning/one-protocol-standard.md +0 -869
  588. package/one/learning/one-protocol-whitepaper.md +0 -756
  589. package/one/learning/ontology-blog.yaml +0 -47
  590. package/one/learning/ontology-cheatsheet.md +0 -617
  591. package/one/learning/ontology-community.yaml +0 -65
  592. package/one/learning/ontology-core-universal.md +0 -740
  593. package/one/learning/ontology-core.yaml +0 -63
  594. package/one/learning/ontology-courses.yaml +0 -76
  595. package/one/learning/ontology-creator.md +0 -402
  596. package/one/learning/ontology-crypto.md +0 -1603
  597. package/one/learning/ontology-developer-guide.md +0 -814
  598. package/one/learning/ontology-documentation.md +0 -377
  599. package/one/learning/ontology-ecommerce.md +0 -269
  600. package/one/learning/ontology-education-game.md +0 -1654
  601. package/one/learning/ontology-education.md +0 -938
  602. package/one/learning/ontology-engineering-specification.md +0 -1310
  603. package/one/learning/ontology-engineering.md +0 -1676
  604. package/one/learning/ontology-files.yaml +0 -525
  605. package/one/learning/ontology-frontend-master.md +0 -2898
  606. package/one/learning/ontology-frontend-specifications.md +0 -2196
  607. package/one/learning/ontology-frontend.md +0 -2475
  608. package/one/learning/ontology-index.md +0 -397
  609. package/one/learning/ontology-minimal.yaml +0 -301
  610. package/one/learning/ontology-portfolio.yaml +0 -45
  611. package/one/learning/ontology-quickstart.md +0 -602
  612. package/one/learning/ontology-release.md +0 -317
  613. package/one/learning/ontology-shop.yaml +0 -148
  614. package/one/learning/ontology-tokens.yaml +0 -51
  615. package/one/learning/ontology-tutorial.md +0 -455
  616. package/one/learning/ontology-v2.md +0 -4449
  617. package/one/learning/ontology-video-script.md +0 -939
  618. package/one/learning/ontology-visual-guide.md +0 -378
  619. package/one/learning/ontology.md +0 -3847
  620. package/one/learning/ontology.yaml +0 -1653
  621. package/one/learning/parallel-agents.md +0 -932
  622. package/one/learning/patterns/backend/convex-mutation-pattern.md +0 -130
  623. package/one/learning/patterns/backend/convex-query-pattern.md +0 -143
  624. package/one/learning/patterns/backend/mutation-template.md +0 -249
  625. package/one/learning/patterns/backend/query-template.md +0 -286
  626. package/one/learning/patterns/backend/service-template.md +0 -258
  627. package/one/learning/patterns/design/component-architecture.md +0 -435
  628. package/one/learning/patterns/design/index.md +0 -160
  629. package/one/learning/patterns/design/test-driven-design-pattern.md +0 -196
  630. package/one/learning/patterns/design/wireframe-template.md +0 -250
  631. package/one/learning/patterns/frontend/component-template.md +0 -246
  632. package/one/learning/patterns/frontend/form-template.md +0 -348
  633. package/one/learning/patterns/frontend/page-template.md +0 -209
  634. package/one/learning/patterns/frontend/react-component-pattern.md +0 -188
  635. package/one/learning/patterns/test/acceptance-criteria-template.md +0 -396
  636. package/one/learning/patterns/test/technical-test-template.md +0 -566
  637. package/one/learning/patterns/test/test-driven-pattern.md +0 -160
  638. package/one/learning/patterns/test/user-flow-template.md +0 -272
  639. package/one/learning/performance.md +0 -459
  640. package/one/learning/provider-agnostic-content.md +0 -995
  641. package/one/learning/provider-creation-guide.md +0 -1082
  642. package/one/learning/quality-loop.md +0 -419
  643. package/one/learning/quick-start-ontology-mapping.md +0 -773
  644. package/one/learning/readme-architecture.md +0 -158
  645. package/one/learning/readme.md +0 -149
  646. package/one/learning/rules.md +0 -644
  647. package/one/learning/score.md +0 -85
  648. package/one/learning/specifications.md +0 -873
  649. package/one/learning/tags.md +0 -148
  650. package/one/learning/todo-template.md +0 -269
  651. package/one/learning/todo.md +0 -269
  652. package/one/learning/troubleshooting.md +0 -434
  653. package/one/learning/typescript-patterns.md +0 -321
  654. package/one/learning/universal-generation-language.md +0 -827
  655. package/one/learning/x402-research.md +0 -104
  656. package/one/license.md +0 -107
  657. package/one/paths/a2a.md +0 -600
  658. package/one/paths/acp.md +0 -808
  659. package/one/paths/acps.md +0 -749
  660. package/one/paths/agentkit.md +0 -367
  661. package/one/paths/agui.md +0 -785
  662. package/one/paths/any-backend.md +0 -1720
  663. package/one/paths/ap2.md +0 -1072
  664. package/one/paths/api/queries-reference.md +0 -860
  665. package/one/paths/api-docs.md +0 -1909
  666. package/one/paths/api-reference.md +0 -1029
  667. package/one/paths/api.md +0 -2208
  668. package/one/paths/architecture-diagram.md +0 -112
  669. package/one/paths/communications.md +0 -467
  670. package/one/paths/connections.md +0 -357
  671. package/one/paths/copilotkit.md +0 -1577
  672. package/one/paths/cryptonetworks.md +0 -799
  673. package/one/paths/documentation.md +0 -1138
  674. package/one/paths/effect.md +0 -297
  675. package/one/paths/elizaos.md +0 -1308
  676. package/one/paths/groups.md +0 -814
  677. package/one/paths/inference.md +0 -76
  678. package/one/paths/integration-examples.md +0 -893
  679. package/one/paths/integration-guide.md +0 -887
  680. package/one/paths/integration-phase2.md +0 -754
  681. package/one/paths/kyc.md +0 -650
  682. package/one/paths/mcp.md +0 -860
  683. package/one/paths/membership.md +0 -1170
  684. package/one/paths/middleware.md +0 -1085
  685. package/one/paths/multitenant.md +0 -1359
  686. package/one/paths/n8n.md +0 -1033
  687. package/one/paths/patterns.md +0 -107
  688. package/one/paths/protocols.md +0 -297
  689. package/one/paths/relationships.md +0 -125
  690. package/one/paths/schema.md +0 -605
  691. package/one/paths/service-layer.md +0 -568
  692. package/one/paths/vectors.md +0 -225
  693. package/one/paths/wordpress.md +0 -1320
  694. package/one/paths/workflow-copy.md +0 -923
  695. package/one/paths/workflow-examples.md +0 -759
  696. package/one/paths/workflow-onboarding.md +0 -701
  697. package/one/paths/workflow.md +0 -923
  698. package/one/paths/workflows/delegation.md +0 -903
  699. package/one/paths/workflows/frontend.md +0 -1055
  700. package/one/paths/workflows/strategy.md +0 -921
  701. package/one/paths/workflows/tasks.md +0 -716
  702. package/one/paths/x402-baazar.md +0 -131
  703. package/one/paths/x402.md +0 -1353
  704. package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +0 -401
  705. package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +0 -588
  706. package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +0 -461
  707. package/one/things/CHECKLIST.md +0 -407
  708. package/one/things/IMPLEMENTATION_STATUS.md +0 -379
  709. package/one/things/ONE.md +0 -529
  710. package/one/things/agents/agent-backend.md +0 -1501
  711. package/one/things/agents/agent-builder.md +0 -1064
  712. package/one/things/agents/agent-clean.md +0 -1112
  713. package/one/things/agents/agent-clone.md +0 -1324
  714. package/one/things/agents/agent-deploy.md +0 -986
  715. package/one/things/agents/agent-designer.md +0 -2305
  716. package/one/things/agents/agent-director.md +0 -1526
  717. package/one/things/agents/agent-documenter.md +0 -1129
  718. package/one/things/agents/agent-frontend.md +0 -1201
  719. package/one/things/agents/agent-integrator.md +0 -1269
  720. package/one/things/agents/agent-lawyer.md +0 -1371
  721. package/one/things/agents/agent-problem-solver.md +0 -1457
  722. package/one/things/agents/agent-quality.md +0 -1483
  723. package/one/things/agents/agent-sales.md +0 -1074
  724. package/one/things/cascade/cascade.yaml +0 -481
  725. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +0 -523
  726. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +0 -314
  727. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +0 -562
  728. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +0 -543
  729. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +0 -272
  730. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +0 -548
  731. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +0 -586
  732. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +0 -267
  733. package/one/things/cascade/docs/examples/1-3-event-coordination.md +0 -547
  734. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +0 -665
  735. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +0 -236
  736. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +0 -652
  737. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +0 -860
  738. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +0 -255
  739. package/one/things/cascade/docs/examples/1-5-quality-loops.md +0 -725
  740. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +0 -659
  741. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +0 -256
  742. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +0 -639
  743. package/one/things/cascade/docs/examples/readme.md +0 -259
  744. package/one/things/cascade/docs/getting-started.md +0 -533
  745. package/one/things/cascade/docs/workflow.md +0 -1378
  746. package/one/things/cascade/readme.md +0 -379
  747. package/one/things/cascade/templates/feature-template.md +0 -289
  748. package/one/things/claude/agents/advocacy-activation-manager.md +0 -710
  749. package/one/things/claude/agents/advocacy-campaign-designer.md +0 -688
  750. package/one/things/claude/agents/analyst.md +0 -508
  751. package/one/things/claude/agents/architect.md +0 -505
  752. package/one/things/claude/agents/brand-identity-specialist.md +0 -538
  753. package/one/things/claude/agents/bstp-token-strategist.md +0 -690
  754. package/one/things/claude/agents/builder-repo.md +0 -532
  755. package/one/things/claude/agents/bullstamp-community-builder.md +0 -597
  756. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +0 -529
  757. package/one/things/claude/agents/bulltilt-platform-growth.md +0 -590
  758. package/one/things/claude/agents/company-bullstamp-character.md +0 -602
  759. package/one/things/claude/agents/company-bullstamp-community.md +0 -307
  760. package/one/things/claude/agents/company-bullstamp-marketing.md +0 -307
  761. package/one/things/claude/agents/company-bullstamp-token.md +0 -307
  762. package/one/things/claude/agents/company-bulltilt-growth.md +0 -307
  763. package/one/things/claude/agents/content-bibliography-formatter.md +0 -404
  764. package/one/things/claude/agents/content-calendar-planner.md +0 -473
  765. package/one/things/claude/agents/content-chapter-formatter.md +0 -513
  766. package/one/things/claude/agents/content-formatter.md +0 -571
  767. package/one/things/claude/agents/content-hook-specialist.md +0 -485
  768. package/one/things/claude/agents/content-image-formatter.md +0 -560
  769. package/one/things/claude/agents/content-introduction-formatter.md +0 -510
  770. package/one/things/claude/agents/content-multiplication-engine.md +0 -579
  771. package/one/things/claude/agents/content-playbook-writer.md +0 -473
  772. package/one/things/claude/agents/content-team-manager.md +0 -647
  773. package/one/things/claude/agents/content-toc-formatter.md +0 -547
  774. package/one/things/claude/agents/convex-backend-specialist.md +0 -2725
  775. package/one/things/claude/agents/core-manager.md +0 -607
  776. package/one/things/claude/agents/core-master.md +0 -426
  777. package/one/things/claude/agents/cross-functional-manager.md +0 -476
  778. package/one/things/claude/agents/crypto-airdrop-strategist.md +0 -622
  779. package/one/things/claude/agents/crypto-analytics-educator.md +0 -596
  780. package/one/things/claude/agents/crypto-architecture-specialist.md +0 -497
  781. package/one/things/claude/agents/crypto-community-analyst.md +0 -314
  782. package/one/things/claude/agents/crypto-community-psychologist.md +0 -546
  783. package/one/things/claude/agents/crypto-dex-optimization-expert.md +0 -579
  784. package/one/things/claude/agents/crypto-dex-optimizer.md +0 -307
  785. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +0 -552
  786. package/one/things/claude/agents/crypto-diamond-hands.md +0 -307
  787. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +0 -597
  788. package/one/things/claude/agents/crypto-engagement-specialist.md +0 -581
  789. package/one/things/claude/agents/crypto-market-researcher.md +0 -307
  790. package/one/things/claude/agents/crypto-marketing-orchestrator.md +0 -563
  791. package/one/things/claude/agents/crypto-network-effect-amplifier.md +0 -614
  792. package/one/things/claude/agents/crypto-optimization-analyst.md +0 -597
  793. package/one/things/claude/agents/crypto-strategic-synthesizer.md +0 -556
  794. package/one/things/claude/agents/crypto-team-manager.md +0 -392
  795. package/one/things/claude/agents/crypto-token-analyst.md +0 -319
  796. package/one/things/claude/agents/crypto-viral-content-creator.md +0 -549
  797. package/one/things/claude/agents/crypto-wallet-identification-expert.md +0 -527
  798. package/one/things/claude/agents/crypto-wallet-identifier.md +0 -307
  799. package/one/things/claude/agents/customer-journey-designer.md +0 -474
  800. package/one/things/claude/agents/customer-success-manager.md +0 -574
  801. package/one/things/claude/agents/dev.md +0 -406
  802. package/one/things/claude/agents/documenter.md +0 -548
  803. package/one/things/claude/agents/elevate-marketing-orchestrator.md +0 -403
  804. package/one/things/claude/agents/engagement-specialist.md +0 -502
  805. package/one/things/claude/agents/engineering-architect.md +0 -387
  806. package/one/things/claude/agents/engineering-business-analyst.md +0 -527
  807. package/one/things/claude/agents/engineering-developer.md +0 -386
  808. package/one/things/claude/agents/engineering-director.md +0 -322
  809. package/one/things/claude/agents/engineering-ingestor.md +0 -659
  810. package/one/things/claude/agents/engineering-product-manager.md +0 -525
  811. package/one/things/claude/agents/engineering-product-owner.md +0 -527
  812. package/one/things/claude/agents/engineering-project-coordinator.md +0 -525
  813. package/one/things/claude/agents/engineering-quality-assurance.md +0 -392
  814. package/one/things/claude/agents/engineering-team-manager.md +0 -515
  815. package/one/things/claude/agents/engineering-user-experience.md +0 -386
  816. package/one/things/claude/agents/framework-elevate-manager.md +0 -309
  817. package/one/things/claude/agents/improver.md +0 -805
  818. package/one/things/claude/agents/intelligence-team-manager.md +0 -390
  819. package/one/things/claude/agents/lead-capture-expert.md +0 -459
  820. package/one/things/claude/agents/lead-magnet-creator.md +0 -446
  821. package/one/things/claude/agents/market-research-analyst.md +0 -435
  822. package/one/things/claude/agents/marketing-brand-identity.md +0 -344
  823. package/one/things/claude/agents/marketing-content-hooks.md +0 -455
  824. package/one/things/claude/agents/marketing-content-multiplier.md +0 -331
  825. package/one/things/claude/agents/marketing-content-poster.md +0 -372
  826. package/one/things/claude/agents/marketing-customer-journey.md +0 -331
  827. package/one/things/claude/agents/marketing-director.md +0 -402
  828. package/one/things/claude/agents/marketing-engagement.md +0 -331
  829. package/one/things/claude/agents/marketing-lead-capture.md +0 -331
  830. package/one/things/claude/agents/marketing-lead-magnet.md +0 -331
  831. package/one/things/claude/agents/marketing-network-effects.md +0 -331
  832. package/one/things/claude/agents/marketing-nurture-campaigns.md +0 -331
  833. package/one/things/claude/agents/marketing-share-optimizer.md +0 -331
  834. package/one/things/claude/agents/marketing-team-manager.md +0 -451
  835. package/one/things/claude/agents/marketing-viral-growth.md +0 -232
  836. package/one/things/claude/agents/mission-commander.md +0 -378
  837. package/one/things/claude/agents/network-effect-analyst.md +0 -604
  838. package/one/things/claude/agents/nextjs-15-specialist.md +0 -1634
  839. package/one/things/claude/agents/npx.md +0 -946
  840. package/one/things/claude/agents/nurture-campaign-manager.md +0 -554
  841. package/one/things/claude/agents/one-master.md +0 -378
  842. package/one/things/claude/agents/one-orchestrator.md +0 -345
  843. package/one/things/claude/agents/one.md +0 -658
  844. package/one/things/claude/agents/playbook-generator.md +0 -526
  845. package/one/things/claude/agents/pm.md +0 -349
  846. package/one/things/claude/agents/po.md +0 -370
  847. package/one/things/claude/agents/qa.md +0 -361
  848. package/one/things/claude/agents/research-foundation-analyst.md +0 -324
  849. package/one/things/claude/agents/research-intelligence-gatherer.md +0 -435
  850. package/one/things/claude/agents/research-market-analyst.md +0 -324
  851. package/one/things/claude/agents/research-team-manager.md +0 -489
  852. package/one/things/claude/agents/sales-environment-optimizer.md +0 -519
  853. package/one/things/claude/agents/sales-team-manager.md +0 -407
  854. package/one/things/claude/agents/sales-upsell-strategist.md +0 -324
  855. package/one/things/claude/agents/service-advocacy-campaigns.md +0 -324
  856. package/one/things/claude/agents/service-advocacy-manager.md +0 -324
  857. package/one/things/claude/agents/service-success-manager.md +0 -324
  858. package/one/things/claude/agents/service-team-manager.md +0 -405
  859. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +0 -2357
  860. package/one/things/claude/agents/share-optimization-specialist.md +0 -576
  861. package/one/things/claude/agents/sm.md +0 -352
  862. package/one/things/claude/agents/story-teller.md +0 -498
  863. package/one/things/claude/agents/task-master.md +0 -621
  864. package/one/things/claude/agents/tauri-cross-platform-specialist.md +0 -1912
  865. package/one/things/claude/agents/tester.md +0 -595
  866. package/one/things/claude/agents/the-bull-character-manager.md +0 -603
  867. package/one/things/claude/agents/tools-playbook-generator.md +0 -492
  868. package/one/things/claude/agents/turbo-repo-builder.md +0 -346
  869. package/one/things/claude/agents/upsell-strategist.md +0 -503
  870. package/one/things/claude/agents/ux-expert.md +0 -360
  871. package/one/things/claude/agents/viral-growth-orchestrator.md +0 -520
  872. package/one/things/claude/claude-code-hooks-development.json +0 -21
  873. package/one/things/claude/claude-code-hooks-production.json +0 -21
  874. package/one/things/claude/claude-code-hooks.json +0 -25
  875. package/one/things/claude/commands/agent.md +0 -124
  876. package/one/things/claude/commands/cascade-status.md +0 -153
  877. package/one/things/claude/commands/ingest.md +0 -343
  878. package/one/things/claude/commands/ingestor.md +0 -158
  879. package/one/things/claude/commands/mission.md +0 -103
  880. package/one/things/claude/commands/npx.md +0 -156
  881. package/one/things/claude/commands/one.md +0 -486
  882. package/one/things/claude/commands/quality-check.md +0 -252
  883. package/one/things/claude/commands/smart-route.md +0 -261
  884. package/one/things/claude/commands/start.md +0 -139
  885. package/one/things/claude/commands/story.md +0 -103
  886. package/one/things/claude/commands/task.md +0 -193
  887. package/one/things/claude/hook-bypass.json +0 -32
  888. package/one/things/claude/hooks/agent-hook-config.json +0 -427
  889. package/one/things/claude/hooks/build-hook.sh +0 -156
  890. package/one/things/claude/hooks/cleanup-hook.sh +0 -201
  891. package/one/things/claude/hooks/file-organization-hook.sh +0 -80
  892. package/one/things/claude/hooks/format-hook.sh +0 -43
  893. package/one/things/claude/hooks/hook-bypass.sh +0 -293
  894. package/one/things/claude/hooks/hook-debouncer.sh +0 -62
  895. package/one/things/claude/hooks/hook-logger.sh +0 -89
  896. package/one/things/claude/hooks/lint-hook.sh +0 -140
  897. package/one/things/claude/hooks/notification-hook.sh +0 -204
  898. package/one/things/claude/hooks/ontology-validation-hook.sh +0 -86
  899. package/one/things/claude/hooks/performance-metrics.json +0 -25
  900. package/one/things/claude/hooks/security-hook.sh +0 -256
  901. package/one/things/claude/hooks/story-validation-hook-enhanced.sh +0 -210
  902. package/one/things/claude/hooks/story-validation-hook.sh +0 -145
  903. package/one/things/claude/hooks/test-hook.sh +0 -145
  904. package/one/things/claude/hooks/test-story-validation.sh +0 -170
  905. package/one/things/claude/settings-local.json +0 -86
  906. package/one/things/cli/cli-code.md +0 -677
  907. package/one/things/cli/cli-compiler-code.md +0 -677
  908. package/one/things/cli/cli.md +0 -871
  909. package/one/things/components/card-shadcn.md +0 -953
  910. package/one/things/components/card.md +0 -1041
  911. package/one/things/components.md +0 -1743
  912. package/one/things/componets.md +0 -19
  913. package/one/things/contracts/Move.toml +0 -12
  914. package/one/things/contracts/README.md +0 -288
  915. package/one/things/contracts/one.move +0 -762
  916. package/one/things/contracts/sdk.ts +0 -579
  917. package/one/things/creator-diagram.md +0 -184
  918. package/one/things/crypto/FEATURES.md +0 -78
  919. package/one/things/crypto/ONECORE.md +0 -62
  920. package/one/things/crypto/ONECOREFAQ.md +0 -22
  921. package/one/things/crypto/ONECOREHOW.md +0 -46
  922. package/one/things/crypto/ONEENTERPRISE.md +0 -64
  923. package/one/things/crypto/ONEENTERPRISEFAQ.md +0 -64
  924. package/one/things/crypto/ONEENTERPRISEHOW.md +0 -53
  925. package/one/things/crypto/ONEPRO.md +0 -60
  926. package/one/things/crypto/ONEPROFAQ.md +0 -22
  927. package/one/things/crypto/ONEPROHOW.md +0 -53
  928. package/one/things/crypto/READMEAGENCY.md +0 -64
  929. package/one/things/crypto/VSL.md +0 -45
  930. package/one/things/crypto/WebsiteCopy.md +0 -176
  931. package/one/things/demo-accessibility-animations.md +0 -1025
  932. package/one/things/demo-components.md +0 -1310
  933. package/one/things/demo-design-summary.md +0 -692
  934. package/one/things/demo-design-system.md +0 -973
  935. package/one/things/demo-page-layouts.md +0 -1016
  936. package/one/things/design-system.md +0 -832
  937. package/one/things/designs/accessibility-audit.md +0 -877
  938. package/one/things/designs/component-specifications.md +0 -855
  939. package/one/things/designs/design-overview.md +0 -377
  940. package/one/things/designs/design-tokens.md +0 -448
  941. package/one/things/designs/wireframes-dashboard.md +0 -710
  942. package/one/things/docs/api-requests.md +0 -987
  943. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +0 -485
  944. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +0 -465
  945. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +0 -425
  946. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +0 -451
  947. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +0 -536
  948. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +0 -650
  949. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +0 -473
  950. package/one/things/docs/ecommerce/QUICK-START.md +0 -405
  951. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +0 -567
  952. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +0 -271
  953. package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +0 -171
  954. package/one/things/docs/ecommerce/demo.astro +0 -309
  955. package/one/things/examples/children/lemonade-stand.md +0 -404
  956. package/one/things/examples/enterprise/crm-saas.md +0 -1444
  957. package/one/things/features/1-1-agent-prompts.md +0 -562
  958. package/one/things/features/1-2-yaml-orchestrator.md +0 -548
  959. package/one/things/features/1-3-event-coordination.md +0 -547
  960. package/one/things/features/1-4-knowledge-management.md +0 -652
  961. package/one/things/features/1-5-quality-loops.md +0 -725
  962. package/one/things/features/1-6-numbering-structure.md +0 -639
  963. package/one/things/features/2-1-dataprovider-interface.md +0 -2583
  964. package/one/things/features/2-2-config-system.md +0 -3242
  965. package/one/things/features/2-3-effectts-services.md +0 -1645
  966. package/one/things/features/2-4-react-hooks.md +0 -2136
  967. package/one/things/features/2-5-auth-migration.md +0 -2144
  968. package/one/things/features/2-6-dashboard-migration.md +0 -2084
  969. package/one/things/features/2-7-alternative-providers.md +0 -2578
  970. package/one/things/features/2-7-implementation-report.md +0 -724
  971. package/one/things/features/2-cli.md +0 -1720
  972. package/one/things/features/2-design.md +0 -1770
  973. package/one/things/features/2-tests.md +0 -576
  974. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +0 -576
  975. package/one/things/features/DECOUPLING.md +0 -290
  976. package/one/things/features/DEPLOYMENT.md +0 -470
  977. package/one/things/features/IMPLEMENTATION_SUMMARY.md +0 -362
  978. package/one/things/features/improve.md +0 -861
  979. package/one/things/features/remove-convex-deps.md +0 -63
  980. package/one/things/features/top-features.md +0 -87
  981. package/one/things/features/use-one-backend.md +0 -1217
  982. package/one/things/features-in-english.md +0 -200
  983. package/one/things/files.yaml +0 -721
  984. package/one/things/ideas/1-create-workflow.md +0 -207
  985. package/one/things/ideas/2-backend-agnostic-frontend.md +0 -439
  986. package/one/things/implementation/backend-guide.md +0 -457
  987. package/one/things/interface.md +0 -257
  988. package/one/things/landing-page-implementation.md +0 -455
  989. package/one/things/legal/README.md +0 -234
  990. package/one/things/legal/privacy-policy.md +0 -1227
  991. package/one/things/legal/terms-of-service.md +0 -1432
  992. package/one/things/master-workflow-plan.md +0 -806
  993. package/one/things/pay.one.ie.md +0 -53
  994. package/one/things/plans/0-in-sync.md +0 -136
  995. package/one/things/plans/0-timeline.md +0 -36
  996. package/one/things/plans/1-create-workflow.md +0 -732
  997. package/one/things/plans/QUICK-START-SIMPLIFICATION.md +0 -333
  998. package/one/things/plans/README-SIMPLIFICATION.md +0 -349
  999. package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +0 -16
  1000. package/one/things/plans/SIMPLIFICATION-SUMMARY.md +0 -455
  1001. package/one/things/plans/ai-elements-integration.md +0 -483
  1002. package/one/things/plans/ai-elements.md +0 -1278
  1003. package/one/things/plans/ai-integration-plan.md +0 -263
  1004. package/one/things/plans/ai-integration.md +0 -996
  1005. package/one/things/plans/ai-sdk.md +0 -798
  1006. package/one/things/plans/ai-tools.md +0 -621
  1007. package/one/things/plans/app.md +0 -832
  1008. package/one/things/plans/architecture-summary.md +0 -312
  1009. package/one/things/plans/async-ai-agents.md +0 -233
  1010. package/one/things/plans/backend-agnostic-frontend.md +0 -390
  1011. package/one/things/plans/backend-cleanup-quickstart.md +0 -380
  1012. package/one/things/plans/backend-ontology-conformance.md +0 -475
  1013. package/one/things/plans/backend-status.md +0 -599
  1014. package/one/things/plans/backend-structure.md +0 -847
  1015. package/one/things/plans/backend-target-structure.md +0 -482
  1016. package/one/things/plans/backend.md +0 -1175
  1017. package/one/things/plans/better-auth-any-backend-revised.md +0 -1103
  1018. package/one/things/plans/better-auth-any-backend.md +0 -1896
  1019. package/one/things/plans/better-auth-available-features.md +0 -273
  1020. package/one/things/plans/big-plan.md +0 -52
  1021. package/one/things/plans/cli-updates-required.md +0 -320
  1022. package/one/things/plans/complete-step-by-step.md +0 -1409
  1023. package/one/things/plans/components.md +0 -709
  1024. package/one/things/plans/convex-agents.md +0 -1034
  1025. package/one/things/plans/convex-better-auth.md +0 -1141
  1026. package/one/things/plans/convex-on-off.md +0 -407
  1027. package/one/things/plans/crypto-token-researcher.md +0 -629
  1028. package/one/things/plans/data-quality-metrics.md +0 -745
  1029. package/one/things/plans/deep-researcher-agent.md +0 -466
  1030. package/one/things/plans/deploy-to-cloudflare.md +0 -623
  1031. package/one/things/plans/deployment-architecture.md +0 -469
  1032. package/one/things/plans/desktop.md +0 -1139
  1033. package/one/things/plans/development-plan.md +0 -1283
  1034. package/one/things/plans/development-workflow-tldr.md +0 -207
  1035. package/one/things/plans/development-workflow.md +0 -959
  1036. package/one/things/plans/dsl-claude-code.md +0 -1011
  1037. package/one/things/plans/effect-components.md +0 -1743
  1038. package/one/things/plans/effect-patterns-reference.md +0 -2235
  1039. package/one/things/plans/effect.md +0 -1806
  1040. package/one/things/plans/email.md +0 -966
  1041. package/one/things/plans/enhance-auth.md +0 -1692
  1042. package/one/things/plans/execution-strategy.md +0 -1291
  1043. package/one/things/plans/existing-infrastructure.md +0 -712
  1044. package/one/things/plans/feature-based-sites.md +0 -894
  1045. package/one/things/plans/frontend-effects.md +0 -1276
  1046. package/one/things/plans/group-folder-multi-tenancy.md +0 -893
  1047. package/one/things/plans/improve-codebase.md +0 -1811
  1048. package/one/things/plans/install-components.md +0 -215
  1049. package/one/things/plans/integrate-frontend-and-backend.md +0 -603
  1050. package/one/things/plans/landing.md +0 -820
  1051. package/one/things/plans/layout.md +0 -249
  1052. package/one/things/plans/mail-backend.md +0 -1361
  1053. package/one/things/plans/mail.md +0 -2677
  1054. package/one/things/plans/mcp-clear-context-prompt.md +0 -81
  1055. package/one/things/plans/mcp-simple.md +0 -248
  1056. package/one/things/plans/multi-ontology-architecture.md +0 -885
  1057. package/one/things/plans/next-features.md +0 -114
  1058. package/one/things/plans/npx-agent-safety.md +0 -785
  1059. package/one/things/plans/npx-agent.md +0 -1089
  1060. package/one/things/plans/onboarding.md +0 -51
  1061. package/one/things/plans/one-protocol-and-payone-usage.md +0 -82
  1062. package/one/things/plans/one.md +0 -677
  1063. package/one/things/plans/ontology-6-dimensions.md +0 -2201
  1064. package/one/things/plans/ontology-compliance-audit.md +0 -342
  1065. package/one/things/plans/ontology-driven-strategy.md +0 -882
  1066. package/one/things/plans/ontology-refine.md +0 -586
  1067. package/one/things/plans/ontology-ui-approach.md +0 -375
  1068. package/one/things/plans/open-agent.md +0 -840
  1069. package/one/things/plans/performace.md +0 -122
  1070. package/one/things/plans/phase-1-foundation.md +0 -620
  1071. package/one/things/plans/phase-3-implementation.md +0 -1037
  1072. package/one/things/plans/plan-connect-to-api.md +0 -146
  1073. package/one/things/plans/quick-wins.md +0 -1428
  1074. package/one/things/plans/r2.md +0 -777
  1075. package/one/things/plans/readme-backend-cleanup.md +0 -402
  1076. package/one/things/plans/release.md +0 -507
  1077. package/one/things/plans/remove-backend-development-from-agents.md +0 -1331
  1078. package/one/things/plans/repos.md +0 -98
  1079. package/one/things/plans/separate-copy-2.md +0 -1349
  1080. package/one/things/plans/separate-copy-3.md +0 -2479
  1081. package/one/things/plans/separate-copy.md +0 -1349
  1082. package/one/things/plans/separate-demo.md +0 -864
  1083. package/one/things/plans/separate.md +0 -1999
  1084. package/one/things/plans/sequence.md +0 -2040
  1085. package/one/things/plans/shadcn-integration-summary.md +0 -510
  1086. package/one/things/plans/sidebar.md +0 -206
  1087. package/one/things/plans/skills.md +0 -709
  1088. package/one/things/plans/small-fixes.md +0 -23
  1089. package/one/things/plans/start-new.md +0 -764
  1090. package/one/things/plans/switch-off-auth.md +0 -42
  1091. package/one/things/plans/sync-checklist.md +0 -351
  1092. package/one/things/plans/test-backend-connection.md +0 -514
  1093. package/one/things/plans/unified-implementation-plan.md +0 -934
  1094. package/one/things/plans/update-demos.md +0 -581
  1095. package/one/things/plans/use-our-backend.md +0 -572
  1096. package/one/things/plans/video-backend.md +0 -638
  1097. package/one/things/plans/video-frontend.md +0 -490
  1098. package/one/things/plans/video-old-archived.md +0 -656
  1099. package/one/things/plans/wave1-onboarding-100-inferences.md +0 -1686
  1100. package/one/things/plans/wave1-onboarding-vision.md +0 -744
  1101. package/one/things/plans/wave1-orchestration-summary.md +0 -604
  1102. package/one/things/plans/wave1-specialist-assignments.md +0 -1413
  1103. package/one/things/plans/workflow-files.md +0 -1210
  1104. package/one/things/plans/workflow.md +0 -1378
  1105. package/one/things/plans-u.md +0 -905
  1106. package/one/things/products/Blockchain Products.md +0 -6278
  1107. package/one/things/products/cascade-landing-page.md +0 -841
  1108. package/one/things/products/cascade.md +0 -1568
  1109. package/one/things/products/context-engineering.md +0 -1488
  1110. package/one/things/products/onthology.md +0 -15
  1111. package/one/things/products/ontology-ui-shadcn.md +0 -1302
  1112. package/one/things/products/ontology-ui.md +0 -1429
  1113. package/one/things/products/ontology.md +0 -789
  1114. package/one/things/products/sdk.md +0 -573
  1115. package/one/things/promptkit.md +0 -930
  1116. package/one/things/repos/all-repos.md +0 -0
  1117. package/one/things/scripts-clean-mac.sh +0 -409
  1118. package/one/things/service-providers-new.md +0 -1052
  1119. package/one/things/service-providers.md +0 -1121
  1120. package/one/things/structure.md +0 -532
  1121. package/one/things/system.md +0 -618
  1122. package/one/things/templates.md +0 -294
  1123. package/one/things/tests/2-1-dataprovider-interface.md +0 -1216
  1124. package/one/things/tests/2-1-test-analysis.md +0 -544
  1125. package/one/things/things.md +0 -384
  1126. package/one/things/todo-acp-integration.md +0 -744
  1127. package/one/things/todo-ai.md +0 -933
  1128. package/one/things/todo-api.md +0 -1078
  1129. package/one/things/todo-assignment.md +0 -580
  1130. package/one/things/todo-buy-chatgpt.md +0 -1450
  1131. package/one/things/todo-components.md +0 -1683
  1132. package/one/things/todo-connections.md +0 -278
  1133. package/one/things/todo-ecommerce-frontend.md +0 -1313
  1134. package/one/things/todo-ecommerce.md +0 -569
  1135. package/one/things/todo-effects.md +0 -1075
  1136. package/one/things/todo-frontend-effects.md +0 -977
  1137. package/one/things/todo-landing-page.md +0 -1091
  1138. package/one/things/todo-mail.md +0 -1160
  1139. package/one/things/todo-master-plan.md +0 -490
  1140. package/one/things/todo-onboard.md +0 -666
  1141. package/one/things/todo-one-ie.md +0 -538
  1142. package/one/things/todo-page.md +0 -606
  1143. package/one/things/todo-plans.md +0 -282
  1144. package/one/things/todo-projects.md +0 -241
  1145. package/one/things/todo-refactoring-plan.md +0 -366
  1146. package/one/things/todo-release.md +0 -654
  1147. package/one/things/todo-sequence.md +0 -1621
  1148. package/one/things/todo-use-our-backend.md +0 -1908
  1149. package/one/things/todo-workflow.md +0 -626
  1150. package/one/things/todo-x402.md +0 -2047
  1151. package/one/things/todo.md +0 -21
  1152. package/one/things/video/scripts-crypto.md +0 -835
  1153. package/one/things/video-script-backup.md +0 -318
  1154. package/one/things/video-script-demo.md +0 -382
  1155. package/one/things/video-script-ontology.md +0 -333
  1156. package/one/things/video-script.md +0 -361
@@ -1,2047 +0,0 @@
1
- ---
2
- title: Todo X402
3
- dimension: things
4
- primary_dimension: things
5
- category: todo-x402.md
6
- tags: agent, ai, architecture, connections, groups, cycle, ontology, people, protocol, things
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-x402.md category.
14
- Location: one/things/todo-x402.md
15
- Purpose: Documents one platform: x402 integration roadmap v1.0.0
16
- Related dimensions: connections, events, groups, knowledge, people
17
- For AI agents: Read this to understand todo x402.
18
- ---
19
-
20
- # ONE Platform: X402 Integration Roadmap v1.0.0
21
-
22
- **Focus:** Integrate X402 HTTP-native payments into the web platform
23
- **Protocol:** https://www.x402.org/ (HTTP 402 Payment Required)
24
- **Timeline:** 100 cycles (cycle-based planning, not time-based)
25
- **Target:** AI agent micropayments, API monetization, provider discovery via Bazar
26
-
27
- ---
28
-
29
- ## PHASE 1: FOUNDATION & SETUP (Cycle 1-10)
30
-
31
- **Purpose:** Validate architecture, map to 6-dimension ontology, plan implementation
32
-
33
- ### Cycle 1: Validate X402 Protocol Alignment with Ontology
34
-
35
- - [ ] Read `/one/connections/x402.md` (protocol spec)
36
- - [ ] Map X402 payment flow to 6-dimension ontology:
37
- - [ ] **Groups:** Merchant group owns API service, customer group initiates payment
38
- - [ ] **People:** Platform owner authorizes payment schemes, merchant/customer actors
39
- - [ ] **Things:** payment (transaction), external_agent (service provider), product (API listing)
40
- - [ ] **Connections:** transacted (payment relationship), communicated (X402 protocol handshake)
41
- - [ ] **Events:** payment_event (402 response, payment verified, settled)
42
- - [ ] **Knowledge:** payment_method label, x402_scheme, blockchain_network labels
43
- - [ ] Identify 3 core use cases:
44
- - [ ] Agent-to-agent API calls (internal agents)
45
- - [ ] External provider access (ElizaOS agents via A2A)
46
- - [ ] Bazar marketplace discovery + payment
47
-
48
- ### Cycle 2: Review Existing Payment Infrastructure
49
-
50
- - [ ] Examine `backend/convex/schema.ts` for payment thing type
51
- - [ ] Check `web/src/components/` for any existing payment UI
52
- - [ ] Review `backend/convex/mutations/` for payment flows
53
- - [ ] Document current payment handling:
54
- - [ ] Stripe integration (if any)
55
- - [ ] Token purchase flows
56
- - [ ] Invoice/subscription patterns
57
- - [ ] Note: **Goal is X402 as PRIMARY payment, not replacement**
58
-
59
- ### Cycle 3: Map X402 to Web Application Layers
60
-
61
- - [ ] **Frontend (Astro):**
62
- - [ ] X402 payment prompt components (402 handling)
63
- - [ ] Wallet connection UI (viem, wagmi)
64
- - [ ] Payment status display
65
- - [ ] **API Routes (Astro):**
66
- - [ ] GET routes that can respond 402
67
- - [ ] Handle X-PAYMENT header verification
68
- - [ ] Return protected resources on valid payment
69
- - [ ] **Backend (Convex):**
70
- - [ ] X402PaymentService (Effect.ts)
71
- - [ ] Blockchain provider integrations
72
- - [ ] Payment verification + settlement
73
- - [ ] **Database (Convex):**
74
- - [ ] payment thing type schema
75
- - [ ] payment_event event types
76
- - [ ] transacted connection metadata
77
-
78
- ### Cycle 4: Define X402 Integration Scope
79
-
80
- - [ ] **Phase 1 (Cycle 1-100):** Core X402 infrastructure
81
- - [ ] HTTP 402 protocol implementation
82
- - [ ] Base network support (preferred for low fees)
83
- - [ ] Permit + Transfer payment schemes
84
- - [ ] Payment verification via facilitator
85
- - [ ] **Future phases (separate todos):**
86
- - [ ] Bazar marketplace discovery layer
87
- - [ ] Multi-chain support (Ethereum, Solana)
88
- - [ ] Advanced payment schemes (invoice, signature)
89
- - [ ] Revenue distribution to merchants
90
- - [ ] Document assumptions:
91
- - [ ] Base USDC as primary token
92
- - [ ] Coinbase facilitator for verification
93
- - [ ] Pay-per-request model (not subscriptions initially)
94
-
95
- ### Cycle 5: Set Up Development Environment
96
-
97
- - [ ] Ensure `.env.local` in `/web` contains:
98
- - [ ] `PUBLIC_CONVEX_URL` (Convex endpoint)
99
- - [ ] `BETTER_AUTH_SECRET` (auth)
100
- - [ ] Add (new): `VITE_X402_FACILITATOR_URL` (e.g., Coinbase CDP)
101
- - [ ] Add (new): `VITE_BLOCKCHAIN_RPC_BASE` (Base network RPC)
102
- - [ ] Ensure `backend/.env.local` contains:
103
- - [ ] `CONVEX_DEPLOYMENT` (Convex)
104
- - [ ] Add (new): `X402_PAYMENT_ADDRESS_BASE` (treasury address)
105
- - [ ] Add (new): `X402_PAYMENT_ADDRESS_ETHEREUM` (treasury address)
106
- - [ ] Add (new): `X402_PAYMENT_ADDRESS_SOLANA` (future)
107
- - [ ] Add (new): `FACILITATOR_URL` (Coinbase CDP)
108
- - [ ] Add (new): `FACILITATOR_API_KEY` (if needed)
109
- - [ ] Add to `package.json` dependencies:
110
- - [ ] `viem` (blockchain client)
111
- - [ ] `wagmi` (React hooks)
112
- - [ ] `@coinbase/cdp-sdk` (facilitator)
113
- - [ ] `effect` (Effect.ts already included)
114
-
115
- ### Cycle 6: Review Convex Schema for Payment Thing Type
116
-
117
- - [ ] Open `backend/convex/schema.ts`
118
- - [ ] Verify payment thing type exists:
119
- ```typescript
120
- {
121
- type: "payment",
122
- properties: {
123
- protocol: "x402", // NEW: add protocol field
124
- amount: number,
125
- currency: "USDC",
126
- paymentMethod: "crypto",
127
- scheme: "permit" | "transfer",
128
- network: "base" | "ethereum" | "solana",
129
- status: "pending" | "verified" | "settled" | "failed",
130
- txHash: string,
131
- paymentId: string,
132
- payTo: string,
133
- facilitatorResponse: any, // NEW: store facilitator verification
134
- }
135
- }
136
- ```
137
- - [ ] If missing, add payment thing type to schema
138
- - [ ] Verify indexes on payment things:
139
- - [ ] by_type(type = "payment")
140
- - [ ] by_status(status)
141
- - [ ] by_protocol(protocol)
142
-
143
- ### Cycle 7: Create X402 Protocol Type Definitions File
144
-
145
- - [ ] Create `backend/convex/protocols/x402.ts` with:
146
- - [ ] PaymentRequired interface (402 response)
147
- - [ ] PaymentRequirement interface (per-scheme/network)
148
- - [ ] PaymentPayload interface (X-PAYMENT header)
149
- - [ ] PermitPayload, TransferPayload interfaces
150
- - [ ] FacilitatorEndpoints, VerifyPaymentRequest/Response
151
- - [ ] SupportedSchemesResponse interface
152
- - [ ] Convex validators for all above
153
- - [ ] X402_VERSION = 1 constant
154
- - [ ] Document TypeScript patterns for each interface
155
- - [ ] Note: Copy from `/one/connections/x402.md` "TypeScript Protocol Interfaces" section
156
-
157
- ### Cycle 8: Understand X402 Protocol Flow in Web Context
158
-
159
- - [ ] Study the 4-step HTTP 402 flow:
160
- 1. Client requests protected resource
161
- 2. Server responds 402 with PaymentRequired
162
- 3. Client sends payment in X-PAYMENT header + retries
163
- 4. Server verifies, returns resource + X-PAYMENT-ID header
164
- - [ ] Map to Astro patterns:
165
- - [ ] `GET /api/agent/execute` (Astro API route)
166
- - [ ] Check if payment required (config-based)
167
- - [ ] Return 402 if unpaid
168
- - [ ] Handle POST with X-PAYMENT header
169
- - [ ] Verify via Convex effect service
170
- - [ ] Execute agent + return 200
171
- - [ ] Identify which endpoints need X402 protection:
172
- - [ ] Agent execution: `/api/agent/[agentId]/execute`
173
- - [ ] Provider access: `/api/provider/[providerId]/call`
174
- - [ ] N8N workflows: `/api/workflow/[workflowId]/trigger`
175
- - [ ] Custom API: `/api/custom/[name]` (future)
176
-
177
- ### Cycle 9: Plan Blockchain Integration
178
-
179
- - [ ] Choose primary network: **Base (Coinbase L2)**
180
- - [ ] Lowest fees (~$0.001 per transaction)
181
- - [ ] USDC natively supported
182
- - [ ] ERC-2612 permit support
183
- - [ ] Fast finality (~2 seconds)
184
- - [ ] Secondary networks (future):
185
- - [ ] Ethereum mainnet (if higher value txns)
186
- - [ ] Solana (if volume justifies)
187
- - [ ] Choose permit scheme (preferred):
188
- - [ ] ERC-2612 permit (gasless approval)
189
- - [ ] No approval tx needed
190
- - [ ] Saves gas + UX
191
- - [ ] Identify token: **USDC on Base**
192
- - [ ] Address: `0x833589fcd6edb6e08f4c7c32d4f71b54bda02913` (Base)
193
- - [ ] Decimals: 6
194
- - [ ] Facilitator: Coinbase CDP (pre-hosted)
195
-
196
- ### Cycle 10: Define Success Metrics for X402 Phase
197
-
198
- - [ ] Integration complete when:
199
- - [ ] [ ] HTTP 402 responses sent from Astro API routes
200
- - [ ] [ ] X-PAYMENT header validation working
201
- - [ ] [ ] Blockchain payment verification functional
202
- - [ ] [ ] Payment events logged in Convex
203
- - [ ] [ ] UI shows payment prompt + wallet connection
204
- - [ ] [ ] Demo: Agent request → 402 prompt → payment → resource delivered
205
- - [ ] Test targets:
206
- - [ ] 3+ protected endpoints (agent, provider, workflow)
207
- - [ ] 2+ payment schemes (permit, transfer)
208
- - [ ] Payment history queryable
209
- - [ ] E2E test: Request → payment → access
210
- - [ ] Document in: `one/events/deployments/x402-phase1.md`
211
-
212
- ---
213
-
214
- ## PHASE 2: BACKEND SCHEMA & SERVICES (Cycle 11-20)
215
-
216
- **Purpose:** Implement Effect.ts payment services, update Convex schema
217
-
218
- ### Cycle 11: Extend Payment Thing Type in Schema
219
-
220
- - [ ] Edit `backend/convex/schema.ts`
221
- - [ ] Update payment thing properties:
222
-
223
- ```typescript
224
- properties: {
225
- protocol: v.literal('x402'), // X402-specific
226
- scheme: v.union(
227
- v.literal('permit'),
228
- v.literal('transfer'),
229
- v.literal('signature'),
230
- v.literal('invoice')
231
- ),
232
- network: v.union(
233
- v.literal('base'),
234
- v.literal('ethereum'),
235
- v.literal('solana'),
236
- v.literal('arbitrum'),
237
- v.literal('optimism'),
238
- v.literal('polygon')
239
- ),
240
- amount: v.string(), // Decimal string
241
- currency: v.literal('USDC'),
242
- paymentMethod: v.literal('crypto'),
243
-
244
- // Payment details
245
- payTo: v.string(), // Recipient address
246
- payFrom: v.string(), // Payer address
247
- txHash: v.optional(v.string()),
248
- paymentId: v.string(), // Unique ID
249
-
250
- // Status tracking
251
- status: v.union(
252
- v.literal('pending'),
253
- v.literal('payment_required'),
254
- v.literal('verified'),
255
- v.literal('settled'),
256
- v.literal('failed')
257
- ),
258
-
259
- // X402 request/response
260
- resource: v.string(), // Protected endpoint
261
- payload: v.optional(v.any()), // X-PAYMENT payload
262
- facilitatorResponse: v.optional(v.any()), // Verification response
263
-
264
- // Metadata
265
- description: v.optional(v.string()),
266
- invoiceId: v.optional(v.string()),
267
- metadata: v.optional(v.any()),
268
- }
269
- ```
270
-
271
- - [ ] Add payment indexes:
272
- - [ ] by_type("payment")
273
- - [ ] by_status(status)
274
- - [ ] by_network(network)
275
- - [ ] by_payto(payTo)
276
- - [ ] Create migration if needed (Convex migrations)
277
-
278
- ### Cycle 12: Create X402PaymentService (Effect.ts)
279
-
280
- - [ ] Create `backend/convex/services/x402-payment.ts`
281
- - [ ] Implement X402PaymentService class:
282
- ```typescript
283
- export class X402PaymentService extends Effect.Service<...>() {
284
- // Service methods (from /one/connections/x402.md)
285
- }
286
- ```
287
- - [ ] Implement core methods:
288
- - [ ] `createPaymentRequest()` → PaymentRequired (402 response)
289
- - [ ] `verifyPayment()` → boolean (X-PAYMENT validation)
290
- - [ ] `settlePayment()` → string (txHash)
291
- - [ ] `getPaymentHistory()` → Payment[]
292
- - [ ] `recordPayment()` → void (log event)
293
- - [ ] Document each method with:
294
- - [ ] Input types
295
- - [ ] Output types
296
- - [ ] Effect.ts error handling
297
- - [ ] Blockchain interaction
298
- - [ ] Note: Reference `/one/connections/x402.md` Part 2 for code
299
-
300
- ### Cycle 13: Create X402FacilitatorService (Effect.ts)
301
-
302
- - [ ] Create `backend/convex/services/x402-facilitator.ts`
303
- - [ ] Implement X402FacilitatorService class:
304
- ```typescript
305
- export class X402FacilitatorService extends Effect.Service<...>() {
306
- // Facilitator interaction methods
307
- }
308
- ```
309
- - [ ] Implement methods to interact with Coinbase CDP:
310
- - [ ] `verifyPayment(paymentPayload)` → VerifyPaymentResponse
311
- - [ ] `settlePayment(settlementRequest)` → SettlePaymentResponse
312
- - [ ] `getSupportedSchemes()` → SupportedSchemesResponse
313
- - [ ] `checkNetworkSupport(network)` → boolean
314
- - [ ] Handle facilitator API calls:
315
- - [ ] POST /verify (validate X402 payment)
316
- - [ ] POST /settle (execute settlement)
317
- - [ ] GET /supported (list schemes)
318
- - [ ] Implement error handling:
319
- - [ ] Network errors (retry logic)
320
- - [ ] Invalid payment (return error)
321
- - [ ] Unsupported scheme/network
322
-
323
- ### Cycle 14: Create Blockchain Provider Service (Effect.ts)
324
-
325
- - [ ] Create `backend/convex/services/blockchain-provider.ts`
326
- - [ ] Implement BlockchainProviderService class:
327
- ```typescript
328
- export class BlockchainProviderService extends Effect.Service<...>() {
329
- // Multi-chain provider methods
330
- }
331
- ```
332
- - [ ] Support networks:
333
- - [ ] **Base:** via viem/ethers client
334
- - [ ] **Ethereum:** via viem/ethers client
335
- - [ ] **Solana:** (stub for now, full in future)
336
- - [ ] Implement methods:
337
- - [ ] `getProvider(network)` → Client instance
338
- - [ ] `getTokenContract(network)` → Contract ABI
339
- - [ ] `verifyTransaction(txHash, network)` → tx details
340
- - [ ] `estimateGas(tx, network)` → gas estimate
341
- - [ ] `getGasPrice(network)` → current gas price
342
- - [ ] Cache provider instances for efficiency
343
-
344
- ### Cycle 15: Implement Payment Event Logging
345
-
346
- - [ ] Ensure payment_event exists in events table (from ontology)
347
- - [ ] Create `backend/convex/services/payment-event-logger.ts`
348
- - [ ] Log event types:
349
- - [ ] `payment_event` with metadata.status = "requested" (402 sent)
350
- - [ ] `payment_event` with metadata.status = "verified" (X-PAYMENT valid)
351
- - [ ] `payment_event` with metadata.status = "settled" (blockchain confirmed)
352
- - [ ] `payment_event` with metadata.status = "failed" (error occurred)
353
- - [ ] Event structure:
354
- ```typescript
355
- {
356
- type: 'payment_event',
357
- actorId: userId, // Who initiated payment
358
- targetId: paymentId, // Payment thing ID
359
- timestamp: Date.now(),
360
- metadata: {
361
- protocol: 'x402',
362
- status: 'requested' | 'verified' | 'settled' | 'failed',
363
- network: 'base' | 'ethereum' | ...,
364
- scheme: 'permit' | 'transfer' | ...,
365
- amount: amount,
366
- txHash: txHash, // if settled
367
- resource: resourcePath,
368
- facilitatorResponse: response,
369
- }
370
- }
371
- ```
372
- - [ ] Create helper function to log events
373
- - [ ] Test event logging in dev environment
374
-
375
- ### Cycle 16: Create X402Middleware for Astro API Routes
376
-
377
- - [ ] Create `web/src/middleware/x402-middleware.ts`
378
- - [ ] Implement middleware that:
379
- - [ ] Intercepts API route requests
380
- - [ ] Checks if endpoint requires X402 payment
381
- - [ ] Validates X-PAYMENT header if present
382
- - [ ] Returns 402 if payment required + not provided
383
- - [ ] Returns 200 + X-PAYMENT-ID if valid payment
384
- - [ ] Middleware signature:
385
- ```typescript
386
- export function x402Middleware(
387
- request: Request,
388
- endpoint: X402ProtectedEndpoint,
389
- ): {
390
- requiresPayment: boolean;
391
- statusCode: number;
392
- paymentRequired?: PaymentRequired;
393
- xPaymentId?: string;
394
- };
395
- ```
396
- - [ ] Handle edge cases:
397
- - [ ] Missing X-PAYMENT header
398
- - [ ] Invalid X-PAYMENT JSON
399
- - [ ] Payment amount < required
400
- - [ ] Payment already used (replay protection)
401
-
402
- ### Cycle 17: Set Up X402 Configuration
403
-
404
- - [ ] Create `backend/convex/config/x402-config.ts`
405
- - [ ] Define configuration object:
406
- ```typescript
407
- export const x402Config = {
408
- enabled: true,
409
- facilitator: {
410
- url: process.env.FACILITATOR_URL,
411
- apiKey: process.env.FACILITATOR_API_KEY,
412
- },
413
- networks: {
414
- base: {
415
- rpcUrl: process.env.VITE_BLOCKCHAIN_RPC_BASE,
416
- chainId: 8453,
417
- usdcAddress: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
418
- treasury: process.env.X402_PAYMENT_ADDRESS_BASE,
419
- },
420
- ethereum: {
421
- rpcUrl: process.env.VITE_BLOCKCHAIN_RPC_ETHEREUM,
422
- chainId: 1,
423
- usdcAddress: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
424
- treasury: process.env.X402_PAYMENT_ADDRESS_ETHEREUM,
425
- },
426
- },
427
- payments: {
428
- minAmount: "0.001", // $0.001 minimum
429
- defaultAmount: "0.01", // $0.01 default for API calls
430
- defaultNetwork: "base",
431
- defaultScheme: "permit",
432
- expirationTime: 5 * 60 * 1000, // 5 minutes
433
- },
434
- };
435
- ```
436
- - [ ] Load config from env vars in both `.env` files
437
- - [ ] Document required env vars
438
-
439
- ### Cycle 18: Implement Payment Verification Logic
440
-
441
- - [ ] Create `backend/convex/lib/x402-verify.ts`
442
- - [ ] Implement verification function:
443
- ```typescript
444
- export async function verifyX402Payment(
445
- paymentPayload: PaymentPayload,
446
- requirement: PaymentRequirement,
447
- resource: string,
448
- ): Promise<{ valid: boolean; paymentId: string; error?: string }>;
449
- ```
450
- - [ ] Verification steps:
451
- 1. Validate payload structure (JSON schema)
452
- 2. Verify X402 version matches
453
- 3. Validate scheme (permit/transfer/etc)
454
- 4. Call facilitator API to verify payment
455
- 5. Check payment amount >= required
456
- 6. Verify recipient address matches
457
- 7. Check replay (txHash not used before)
458
- 8. Log result in events table
459
- 9. Return validation result
460
- - [ ] Handle each error case with descriptive message
461
-
462
- ### Cycle 19: Implement Payment Settlement
463
-
464
- - [ ] Create `backend/convex/lib/x402-settle.ts`
465
- - [ ] Implement settlement function:
466
- ```typescript
467
- export async function settleX402Payment(
468
- paymentPayload: PaymentPayload,
469
- paymentId: string,
470
- ): Promise<{ settled: boolean; txHash: string; error?: string }>;
471
- ```
472
- - [ ] Settlement steps:
473
- 1. Get verified payment from database
474
- 2. Check status = "verified"
475
- 3. Call facilitator to execute settlement
476
- 4. Update payment status to "settled"
477
- 5. Log settlement event
478
- 6. Return settlement result
479
- - [ ] Handle settlement errors:
480
- - [ ] Blockchain errors (retry)
481
- - [ ] Insufficient gas (recommend amount)
482
- - [ ] Network issues (queue for retry)
483
-
484
- ### Cycle 20: Create Convex Mutations for Payment Handling
485
-
486
- - [ ] Create `backend/convex/mutations/payments.ts`
487
- - [ ] Implement mutations:
488
- - [ ] `createPaymentRequest(resource, amount)` → PaymentRequired
489
- - [ ] `verifyPayment(paymentPayload, requirement)` → verification result
490
- - [ ] `recordPayment(paymentPayload, resource)` → paymentId
491
- - [ ] `updatePaymentStatus(paymentId, status)` → void
492
- - [ ] Each mutation:
493
- - [ ] Takes typed arguments (Convex v)
494
- - [ ] Calls appropriate Effect.ts service
495
- - [ ] Handles errors gracefully
496
- - [ ] Returns structured result
497
- - [ ] Logs events
498
- - [ ] Document expected flow:
499
- - [ ] Frontend requests resource
500
- - [ ] Astro calls `createPaymentRequest` mutation
501
- - [ ] Returns 402 to frontend
502
- - [ ] Frontend shows payment prompt
503
- - [ ] User connects wallet + makes payment
504
- - [ ] Frontend calls `verifyPayment` mutation
505
- - [ ] If valid, calls `recordPayment` mutation
506
- - [ ] Astro re-processes original request
507
-
508
- ---
509
-
510
- ## PHASE 3: FRONTEND COMPONENTS & PAGES (Cycle 21-30)
511
-
512
- **Purpose:** Build React components and Astro pages for payment flow
513
-
514
- ### Cycle 21: Create PaymentRequired Component
515
-
516
- - [ ] Create `web/src/components/features/PaymentRequired.tsx`
517
- - [ ] Component displays:
518
- - [ ] Payment amount in USD + tokens
519
- - [ ] Multiple network options (Base, Ethereum)
520
- - [ ] Multiple scheme options (Permit, Transfer)
521
- - [ ] "Connect Wallet" button
522
- - [ ] Error messages
523
- - [ ] Loading state during payment
524
- - [ ] Props:
525
- ```typescript
526
- interface PaymentRequiredProps {
527
- paymentRequired: PaymentRequired; // 402 response
528
- onPaymentComplete: (payload: PaymentPayload) => void;
529
- onCancel: () => void;
530
- }
531
- ```
532
- - [ ] Features:
533
- - [ ] Responsive design
534
- - [ ] Dark mode support
535
- - [ ] Accessibility (WCAG)
536
- - [ ] Mobile wallet support
537
-
538
- ### Cycle 22: Create WalletConnection Component
539
-
540
- - [ ] Create `web/src/components/features/WalletConnection.tsx`
541
- - [ ] Component handles:
542
- - [ ] Connecting wallet (MetaMask, Rainbow Kit, etc)
543
- - [ ] Displaying connected address
544
- - [ ] Showing wallet balance (USDC)
545
- - [ ] Switching networks (to Base, Ethereum)
546
- - [ ] Disconnecting wallet
547
- - [ ] Use libraries:
548
- - [ ] `wagmi` (React hooks for wallet)
549
- - [ ] `viem` (blockchain client)
550
- - [ ] `@rainbow-me/rainbowkit` (UI kit)
551
- - [ ] Features:
552
- - [ ] One-click connect
553
- - [ ] Auto-switch to required network
554
- - [ ] Display balance in USD + tokens
555
- - [ ] Error handling for network mismatch
556
-
557
- ### Cycle 23: Create PaymentProcessor Component
558
-
559
- - [ ] Create `web/src/components/features/PaymentProcessor.tsx`
560
- - [ ] Component orchestrates:
561
- - [ ] Taking PaymentRequired + PaymentPayload
562
- - [ ] Calling Convex to verify payment
563
- - [ ] Handling verification response
564
- - [ ] Showing success/error to user
565
- - [ ] Retrying if transaction pending
566
- - [ ] Handles payment schemes:
567
- - [ ] **Permit:** ERC-2612 signature + transfer in one tx
568
- - [ ] **Transfer:** Direct token transfer (requires approval first)
569
- - [ ] Features:
570
- - [ ] Retry logic for network timeouts
571
- - [ ] Shows tx hash when sent
572
- - [ ] Polls for confirmation (~2 seconds on Base)
573
- - [ ] Timeout after 5 minutes
574
-
575
- ### Cycle 24: Create PaymentPrompt Modal
576
-
577
- - [ ] Create `web/src/components/features/PaymentPromptModal.tsx`
578
- - [ ] Modal that combines:
579
- - [ ] PaymentRequired display
580
- - [ ] WalletConnection
581
- - [ ] PaymentProcessor
582
- - [ ] Success/error states
583
- - [ ] Behavior:
584
- - [ ] Shows when backend returns 402
585
- - [ ] User connects wallet
586
- - [ ] Processes payment
587
- - [ ] Auto-closes + retries original request on success
588
- - [ ] Design:
589
- - [ ] Centered modal with overlay
590
- - [ ] Progress indicator (step 1/3, etc)
591
- - [ ] Clear instructions for user
592
- - [ ] Cancel button to dismiss
593
-
594
- ### Cycle 25: Create PaymentHistory Component
595
-
596
- - [ ] Create `web/src/components/features/PaymentHistory.tsx`
597
- - [ ] Component displays:
598
- - [ ] List of past payments
599
- - [ ] Amount, date, status, network
600
- - [ ] Tx hash link to explorer
601
- - [ ] Filter by status, network, date range
602
- - [ ] Search by tx hash
603
- - [ ] Table columns:
604
- - [ ] Timestamp
605
- - [ ] Resource (API endpoint)
606
- - [ ] Amount (USD + tokens)
607
- - [ ] Network
608
- - [ ] Status badge (✓ settled, ⏳ verified, ✗ failed)
609
- - [ ] Tx hash (link to block explorer)
610
- - [ ] Action button (view details)
611
- - [ ] Fetches data from Convex query
612
- - [ ] Pagination for many transactions
613
-
614
- ### Cycle 26: Create BalanceDisplay Component
615
-
616
- - [ ] Create `web/src/components/features/BalanceDisplay.tsx`
617
- - [ ] Component shows:
618
- - [ ] Wallet USDC balance
619
- - [ ] Formatted in USD + token units
620
- - [ ] Network indicator (Base, Ethereum, etc)
621
- - [ ] Refresh button
622
- - [ ] Low balance warning (if < $0.05)
623
- - [ ] Real-time updates:
624
- - [ ] Subscribes to Convex changes
625
- - [ ] Updates when new payment made
626
- - [ ] Design:
627
- - [ ] Card layout
628
- - [ ] Badge showing network
629
- - [ ] Loading skeleton
630
- - [ ] Error message if balance fetch fails
631
-
632
- ### Cycle 27: Create AgentExecutionFlow with X402
633
-
634
- - [ ] Create `web/src/components/features/AgentExecutionFlow.tsx`
635
- - [ ] Component orchestrates:
636
- - [ ] User selects agent + parameters
637
- - [ ] Clicks "Execute" button
638
- - [ ] Backend returns 402 if payment required
639
- - [ ] Shows PaymentPromptModal
640
- - [ ] User pays
641
- - [ ] Retries agent execution
642
- - [ ] Shows agent result
643
- - [ ] Handles all payment states:
644
- - [ ] Payment required
645
- - [ ] Payment processing
646
- - [ ] Payment verified
647
- - [ ] Agent executing
648
- - [ ] Agent complete
649
- - [ ] Payment failed (show retry)
650
- - [ ] UX flow:
651
- ```
652
- Agent Selection → Execute → [Payment Modal if 402] → Agent Results
653
- ```
654
-
655
- ### Cycle 28: Update ExternalProviderAccess Component
656
-
657
- - [ ] Modify `web/src/components/features/ExternalProviderAccess.tsx`
658
- - [ ] Add X402 payment flow:
659
- - [ ] Show provider listing from Bazar (future)
660
- - [ ] Compare pricing + availability
661
- - [ ] Select provider + call API
662
- - [ ] Handle 402 payment prompt
663
- - [ ] Execute provider request
664
- - [ ] Show results
665
- - [ ] Features:
666
- - [ ] Provider comparison table
667
- - [ ] Price in USD per request
668
- - [ ] Network availability badge
669
- - [ ] Success rate %
670
-
671
- ### Cycle 29: Create X402 Demo Page
672
-
673
- - [ ] Create `web/src/pages/demo/x402-payments.astro`
674
- - [ ] Interactive demo showing:
675
- - [ ] Protected API endpoint (returns 402)
676
- - [ ] Payment requirement breakdown
677
- - [ ] Wallet connection flow
678
- - [ ] Payment execution
679
- - [ ] Transaction confirmation
680
- - [ ] Final resource access
681
- - [ ] Demo scenarios:
682
- - [ ] Minimum payment ($0.001)
683
- - [ ] Standard payment ($0.01)
684
- - [ ] Higher amount ($1.00)
685
- - [ ] Educational content:
686
- - [ ] How X402 works (animation)
687
- - [ ] Why X402 > API keys
688
- - [ ] Integration for developers
689
- - [ ] FAQ section
690
-
691
- ### Cycle 30: Create X402 Documentation Page
692
-
693
- - [ ] Create `web/src/pages/docs/x402-integration.astro`
694
- - [ ] Document for developers:
695
- - [ ] X402 protocol overview
696
- - [ ] How to protect endpoints
697
- - [ ] How to handle 402 responses
698
- - [ ] Integration examples (curl, JS, Python)
699
- - [ ] Error handling
700
- - [ ] Retry logic
701
- - [ ] Code examples:
702
- - [ ] Backend: Mark endpoint as requiring payment
703
- - [ ] Frontend: Handle 402 + show payment modal
704
- - [ ] Wallet: Connect + sign permit
705
- - [ ] Settlement: Verify payment + grant access
706
- - [ ] Deploy to `/docs/x402-integration`
707
-
708
- ---
709
-
710
- ## PHASE 4: API ROUTES & ASTRO INTEGRATION (Cycle 31-40)
711
-
712
- **Purpose:** Implement X402-protected API routes in Astro
713
-
714
- ### Cycle 31: Create X402 Astro API Route Handler
715
-
716
- - [ ] Create `web/src/lib/x402-route-handler.ts`
717
- - [ ] Export function:
718
- ```typescript
719
- export async function handleX402Request(
720
- request: Request,
721
- handler: (req: Request) => Promise<Response>,
722
- options: X402RouteOptions,
723
- ): Promise<Response>;
724
- ```
725
- - [ ] Implements full X402 flow:
726
- 1. Check if X-PAYMENT header exists
727
- 2. If not → return 402 PaymentRequired
728
- 3. If yes → verify payment via Convex
729
- 4. If invalid → return 402 with error
730
- 5. If valid → call handler to get resource
731
- 6. Return 200 + X-PAYMENT-ID header + resource
732
- - [ ] Options interface:
733
- ```typescript
734
- interface X402RouteOptions {
735
- requiresPayment: boolean;
736
- amount?: string;
737
- description?: string;
738
- resource: string; // endpoint path
739
- }
740
- ```
741
- - [ ] Error handling:
742
- - [ ] Invalid payload format
743
- - [ ] Verification failed
744
- - [ ] Facilitator error (return 502)
745
- - [ ] Payment expired
746
-
747
- ### Cycle 32: Create Agent Execution API Route
748
-
749
- - [ ] Create `web/src/pages/api/agent/execute.ts`
750
- - [ ] Astro API route that:
751
- - [ ] Accepts POST request with agent config
752
- - [ ] Checks if payment required (config-based)
753
- - [ ] Uses handleX402Request to enforce payment
754
- - [ ] Calls Convex to execute agent
755
- - [ ] Returns agent result
756
- - [ ] Request body:
757
- ```typescript
758
- {
759
- agentId: string;
760
- parameters: Record<string, any>;
761
- userId: string;
762
- }
763
- ```
764
- - [ ] Response on success (200):
765
- ```typescript
766
- {
767
- success: true;
768
- result: any;
769
- executionTime: number;
770
- paymentId: string; // X-PAYMENT-ID
771
- }
772
- ```
773
- - [ ] Response on payment required (402):
774
- ```typescript
775
- {
776
- x402Version: 1;
777
- accepts: PaymentRequirement[];
778
- }
779
- ```
780
-
781
- ### Cycle 33: Create Provider API Call Route
782
-
783
- - [ ] Create `web/src/pages/api/provider/[providerId]/call.ts`
784
- - [ ] Astro API route that:
785
- - [ ] Accepts POST request with provider method + params
786
- - [ ] Enforces X402 payment
787
- - [ ] Forwards request to external provider
788
- - [ ] Returns provider response
789
- - [ ] Request body:
790
- ```typescript
791
- {
792
- method: string;
793
- parameters: Record<string, any>;
794
- }
795
- ```
796
- - [ ] Handles:
797
- - [ ] Rate limiting per provider
798
- - [ ] Provider availability check
799
- - [ ] Timeout handling
800
- - [ ] Error forwarding from provider
801
-
802
- ### Cycle 34: Create Workflow Trigger Route
803
-
804
- - [ ] Create `web/src/pages/api/workflow/[workflowId]/trigger.ts`
805
- - [ ] Astro API route that:
806
- - [ ] Accepts POST with workflow inputs
807
- - [ ] Enforces X402 payment
808
- - [ ] Triggers N8N workflow
809
- - [ ] Returns workflow execution status
810
- - [ ] Workflow payment tiers (future):
811
- - [ ] Small workflow ($0.001)
812
- - [ ] Medium workflow ($0.01)
813
- - [ ] Large workflow ($0.10)
814
- - [ ] Integration with N8N:
815
- - [ ] POST to N8N webhook URL
816
- - [ ] Include payment ID in headers
817
- - [ ] Track execution in Convex
818
-
819
- ### Cycle 35: Create Payment Verification Route
820
-
821
- - [ ] Create `web/src/pages/api/payments/verify.ts`
822
- - [ ] POST route that:
823
- - [ ] Takes X-PAYMENT payload
824
- - [ ] Calls Convex to verify
825
- - [ ] Returns verification result
826
- - [ ] Request body:
827
- ```typescript
828
- {
829
- paymentPayload: PaymentPayload;
830
- resource: string;
831
- }
832
- ```
833
- - [ ] Response:
834
- ```typescript
835
- {
836
- valid: boolean;
837
- paymentId: string;
838
- txHash: string;
839
- error?: string;
840
- }
841
- ```
842
-
843
- ### Cycle 36: Create Payment Settlement Route
844
-
845
- - [ ] Create `web/src/pages/api/payments/settle.ts`
846
- - [ ] POST route that:
847
- - [ ] Takes verified payment
848
- - [ ] Calls Convex to settle on blockchain
849
- - [ ] Returns settlement result
850
- - [ ] Request body:
851
- ```typescript
852
- {
853
- paymentId: string;
854
- }
855
- ```
856
- - [ ] Response:
857
- ```typescript
858
- {
859
- settled: boolean;
860
- txHash: string;
861
- blockNumber: number;
862
- error?: string;
863
- }
864
- ```
865
-
866
- ### Cycle 37: Create Payment Query Route
867
-
868
- - [ ] Create `web/src/pages/api/payments/history.ts`
869
- - [ ] GET route that:
870
- - [ ] Requires authentication
871
- - [ ] Returns user's payment history
872
- - [ ] Supports filtering + pagination
873
- - [ ] Query params:
874
- ```
875
- ?status=settled&network=base&limit=20&offset=0&sortBy=date
876
- ```
877
- - [ ] Response:
878
- ```typescript
879
- {
880
- payments: Payment[];
881
- total: number;
882
- page: number;
883
- }
884
- ```
885
-
886
- ### Cycle 38: Create Payment Configuration Route
887
-
888
- - [ ] Create `web/src/pages/api/x402/config.ts`
889
- - [ ] GET route that returns:
890
- - [ ] Supported networks
891
- - [ ] Supported payment schemes
892
- - [ ] Min/max payment amounts
893
- - [ ] Accepted tokens
894
- - [ ] Facilitator details
895
- - [ ] Used by frontend to:
896
- - [ ] Display payment options
897
- - [ ] Validate amounts
898
- - [ ] Show available networks
899
- - [ ] Response:
900
- ```typescript
901
- {
902
- version: 1;
903
- networks: BlockchainNetwork[];
904
- schemes: PaymentScheme[];
905
- tokens: Token[];
906
- minAmount: string;
907
- maxAmount: string;
908
- facilitator: FacilitatorInfo;
909
- }
910
- ```
911
-
912
- ### Cycle 39: Add Error Handling Middleware
913
-
914
- - [ ] Create `web/src/middleware/error-handler.ts`
915
- - [ ] Handle X402-specific errors:
916
- - [ ] 402: Payment Required
917
- - [ ] 402 with error: Payment Invalid
918
- - [ ] 503: Facilitator Down
919
- - [ ] 500: Internal Server Error
920
- - [ ] Error response format:
921
- ```typescript
922
- {
923
- error: string;
924
- code: string;
925
- details: any;
926
- x402Info?: PaymentRequired; // If 402
927
- }
928
- ```
929
-
930
- ### Cycle 40: Test All API Routes
931
-
932
- - [ ] Write tests for each route:
933
- - [ ] Test without payment (expect 402)
934
- - [ ] Test with invalid payment (expect error)
935
- - [ ] Test with valid payment (expect 200)
936
- - [ ] Test payment history query
937
- - [ ] Test config endpoint
938
- - [ ] Test error scenarios:
939
- - [ ] Malformed X-PAYMENT header
940
- - [ ] Expired payment request
941
- - [ ] Replay attack (same txHash twice)
942
- - [ ] Insufficient amount
943
- - [ ] Document test results
944
-
945
- ---
946
-
947
- ## PHASE 5: BLOCKCHAIN & PAYMENT MECHANICS (Cycle 41-50)
948
-
949
- **Purpose:** Implement blockchain payment processing
950
-
951
- ### Cycle 41: Implement Permit-Based Payment Flow
952
-
953
- - [ ] Create `backend/convex/lib/permit-payment.ts`
954
- - [ ] Implement permit generation:
955
- ```typescript
956
- export async function generatePermit(
957
- token: string, // USDC address
958
- owner: string, // User's wallet
959
- spender: string, // Treasury contract
960
- amount: string, // Amount in token units
961
- deadline: number, // Unix timestamp
962
- nonce: number, // Permit nonce
963
- ): Promise<{
964
- permit: PermitData;
965
- signature: string;
966
- }>;
967
- ```
968
- - [ ] Permit structure (ERC-2612):
969
- - [ ] Token holder (owner) can authorize transfer
970
- - [ ] Without separate approval transaction
971
- - [ ] Signature proves authorization
972
- - [ ] Spender executes transfer with permit
973
- - [ ] Frontend flow:
974
- 1. Show permit details to user
975
- 2. User signs with wallet (MetaMask popup)
976
- 3. Signature sent to backend
977
- 4. Backend calls facilitator to execute transfer
978
-
979
- ### Cycle 42: Implement Transfer-Based Payment Flow
980
-
981
- - [ ] Create `backend/convex/lib/transfer-payment.ts`
982
- - [ ] For chains without permit support (Solana):
983
- - [ ] User approves spender in separate tx
984
- - [ ] User signs transfer in second tx
985
- - [ ] Both txHashes submitted to backend
986
- - [ ] Flow:
987
- 1. Generate approval tx (user can preview)
988
- 2. User submits + signs approval
989
- 3. Wait for approval confirmation
990
- 4. Generate transfer tx
991
- 5. User submits + signs transfer
992
- 6. Backend verifies both on-chain
993
- - [ ] Handle edge cases:
994
- - [ ] User cancels approval
995
- - [ ] Approval expires (re-generate)
996
- - [ ] Insufficient allowance (show error)
997
-
998
- ### Cycle 43: Integrate with Coinbase CDP Facilitator
999
-
1000
- - [ ] Create `backend/convex/lib/coinbase-facilitator.ts`
1001
- - [ ] Implement facilitator client:
1002
- ```typescript
1003
- export class CoinbaseFacilitator {
1004
- async verifyPayment(payload: PaymentPayload): Promise<VerifyResponse>;
1005
- async settlePayment(txHash: string): Promise<SettleResponse>;
1006
- async getSupportedSchemes(): Promise<SupportedSchemesResponse>;
1007
- }
1008
- ```
1009
- - [ ] API calls to Coinbase:
1010
- - [ ] POST /verify - Check payment validity
1011
- - [ ] POST /settle - Execute on-chain settlement
1012
- - [ ] GET /supported - List supported schemes/networks
1013
- - [ ] Authentication:
1014
- - [ ] API key in env var
1015
- - [ ] Include in Authorization header
1016
- - [ ] Error handling:
1017
- - [ ] Retry on 5xx errors
1018
- - [ ] Propagate validation errors
1019
- - [ ] Log all facilitator calls
1020
-
1021
- ### Cycle 44: Implement Gas Estimation
1022
-
1023
- - [ ] Create `backend/convex/lib/gas-estimation.ts`
1024
- - [ ] Estimate gas for:
1025
- - [ ] Permit signature (no gas)
1026
- - [ ] Transfer transaction (gas cost on Base ~$0.0001)
1027
- - [ ] Settlement on Base (gas cost)
1028
- - [ ] Functions:
1029
- ```typescript
1030
- async function estimateTransferGas(network: string): Promise<string>;
1031
- async function estimateTxCost(network: string, gas: string): Promise<string>;
1032
- ```
1033
- - [ ] Show to user:
1034
- - [ ] Gas cost in USD
1035
- - [ ] Total cost = amount + gas
1036
- - [ ] On Base: Gas typically negligible (~$0.0001)
1037
-
1038
- ### Cycle 45: Implement Transaction Verification
1039
-
1040
- - [ ] Create `backend/convex/lib/tx-verification.ts`
1041
- - [ ] Verify on-chain transaction:
1042
- ```typescript
1043
- async function verifyTransaction(
1044
- txHash: string,
1045
- network: string,
1046
- expectedAmount: string,
1047
- expectedRecipient: string,
1048
- ): Promise<{
1049
- valid: boolean;
1050
- blockNumber: number;
1051
- confirmations: number;
1052
- error?: string;
1053
- }>;
1054
- ```
1055
- - [ ] Checks:
1056
- - [ ] Tx exists on-chain
1057
- - [ ] Status = success
1058
- - [ ] Amount >= required
1059
- - [ ] Recipient = treasury address
1060
- - [ ] Token = USDC
1061
- - [ ] Enough confirmations (1 on Base)
1062
- - [ ] Handle cases:
1063
- - [ ] Tx pending (return confirmations = 0)
1064
- - [ ] Tx failed (return error)
1065
- - [ ] Wrong recipient (return error)
1066
- - [ ] Insufficient amount (return error)
1067
-
1068
- ### Cycle 46: Implement Replay Protection
1069
-
1070
- - [ ] Create `backend/convex/lib/replay-protection.ts`
1071
- - [ ] Prevent using same payment twice:
1072
- ```typescript
1073
- async function checkReplayProtection(
1074
- paymentPayload: PaymentPayload,
1075
- ): Promise<boolean>;
1076
- ```
1077
- - [ ] Methods:
1078
- - [ ] Check txHash not in used payments
1079
- - [ ] Check nonce unique (if present)
1080
- - [ ] Check timestamp recent (< 5 minutes)
1081
- - [ ] Mark txHash as used after payment
1082
- - [ ] Store used txHashes:
1083
- - [ ] In Convex `payments` table (status = "settled")
1084
- - [ ] Add index: by_txHash(txHash)
1085
- - [ ] Query existing payments:
1086
- ```typescript
1087
- const existing = await db
1088
- .query("entities")
1089
- .withIndex("by_type", (q) => q.eq("type", "payment"))
1090
- .filter((q) => q.eq(q.field("properties.txHash"), txHash))
1091
- .first();
1092
- ```
1093
-
1094
- ### Cycle 47: Implement Rate Limiting per User
1095
-
1096
- - [ ] Create `backend/convex/lib/rate-limiter.ts`
1097
- - [ ] Rate limit payment attempts:
1098
- - [ ] Per user: 10 requests/minute (prevent spam)
1099
- - [ ] Per endpoint: 100 payments/minute (per-resource)
1100
- - [ ] Sliding window counter
1101
- - [ ] Store rates in Convex or in-memory (fast)
1102
- - [ ] Return 429 Too Many Requests if exceeded
1103
- - [ ] Log rate limit violations
1104
-
1105
- ### Cycle 48: Implement Payment Reconciliation
1106
-
1107
- - [ ] Create `backend/convex/services/payment-reconciliation.ts`
1108
- - [ ] Scheduled job to:
1109
- - [ ] Check pending payments (every minute)
1110
- - [ ] Verify status with blockchain
1111
- - [ ] Update payment status in DB
1112
- - [ ] Log discrepancies
1113
- - [ ] States:
1114
- - [ ] payment_required: Awaiting user action
1115
- - [ ] verified: User signed, awaiting settlement
1116
- - [ ] settled: Confirmed on-chain
1117
- - [ ] failed: Error, mark for cleanup
1118
- - [ ] Reconciliation logic:
1119
- ```typescript
1120
- async function reconcilePendingPayments() {
1121
- // Get all payments with status != "settled"
1122
- // For each, check blockchain
1123
- // Update status + log event
1124
- }
1125
- ```
1126
-
1127
- ### Cycle 49: Implement Refund Logic (Future)
1128
-
1129
- - [ ] Create `backend/convex/lib/refund-handler.ts`
1130
- - [ ] Handle refunds if:
1131
- - [ ] Service fails after payment
1132
- - [ ] User cancels within timeout
1133
- - [ ] Overpayment (refund difference)
1134
- - [ ] Refund flow:
1135
- 1. Receive refund request
1136
- 2. Verify eligibility
1137
- 3. Call facilitator to issue refund
1138
- 4. Update payment status to "refunded"
1139
- 5. Log refund event
1140
- - [ ] Note: Implement in Phase 2+ (not required for MVP)
1141
-
1142
- ### Cycle 50: Document Payment Architecture
1143
-
1144
- - [ ] Write `one/connections/x402-architecture.md`
1145
- - [ ] Document:
1146
- - [ ] Payment flow diagram
1147
- - [ ] Components + responsibilities
1148
- - [ ] Data structures
1149
- - [ ] Error scenarios + recovery
1150
- - [ ] Security considerations
1151
- - [ ] Performance characteristics
1152
- - [ ] Add to `/one` documentation
1153
-
1154
- ---
1155
-
1156
- ## PHASE 6: QUALITY & TESTING (Cycle 51-60)
1157
-
1158
- **Purpose:** Test all payment flows end-to-end
1159
-
1160
- ### Cycle 51: Write Unit Tests for X402 Services
1161
-
1162
- - [ ] Create `backend/convex/__tests__/x402-payment.test.ts`
1163
- - [ ] Test X402PaymentService:
1164
- - [ ] createPaymentRequest returns 402 structure
1165
- - [ ] verifyPayment validates payload
1166
- - [ ] getPaymentHistory returns user's payments
1167
- - [ ] Test X402FacilitatorService:
1168
- - [ ] verifyPayment calls Coinbase API
1169
- - [ ] settlePayment executes transaction
1170
- - [ ] Error handling + retries
1171
- - [ ] Mock external calls:
1172
- - [ ] Mock Convex database
1173
- - [ ] Mock HTTP calls to facilitator
1174
- - [ ] Mock blockchain calls
1175
-
1176
- ### Cycle 52: Write Integration Tests
1177
-
1178
- - [ ] Create `backend/convex/__tests__/x402-integration.test.ts`
1179
- - [ ] Test complete flow:
1180
- 1. Create payment request (get 402)
1181
- 2. Create payment payload (sign)
1182
- 3. Verify payment (call facilitator)
1183
- 4. Settle payment (on-chain)
1184
- 5. Verify recorded in DB
1185
- - [ ] Test error scenarios:
1186
- - [ ] Invalid signature
1187
- - [ ] Insufficient balance
1188
- - [ ] Wrong recipient
1189
- - [ ] Replay attack
1190
- - [ ] Network timeout
1191
-
1192
- ### Cycle 53: Write Frontend Component Tests
1193
-
1194
- - [ ] Create `web/src/components/__tests__/PaymentRequired.test.tsx`
1195
- - [ ] Test PaymentRequired component:
1196
- - [ ] Renders correctly
1197
- - [ ] Shows network/scheme options
1198
- - [ ] Handles wallet connection
1199
- - [ ] Displays error messages
1200
- - [ ] Callback on payment
1201
- - [ ] Test WalletConnection component:
1202
- - [ ] Connect button works
1203
- - [ ] Wallet list shows
1204
- - [ ] Balance displays
1205
- - [ ] Network switching
1206
- - [ ] Test PaymentProcessor:
1207
- - [ ] Calls verify endpoint
1208
- - [ ] Handles verification result
1209
- - [ ] Retries on failure
1210
- - [ ] Shows success message
1211
-
1212
- ### Cycle 54: Write E2E Tests
1213
-
1214
- - [ ] Create `web/src/__tests__/x402-e2e.test.ts`
1215
- - [ ] Test full user flow:
1216
- 1. Visit protected endpoint
1217
- 2. Get 402 response
1218
- 3. Modal shows payment prompt
1219
- 4. User connects wallet
1220
- 5. User approves permit
1221
- 6. Payment verified
1222
- 7. Endpoint returns resource
1223
- - [ ] Use test wallet (e.g., testnet USDC)
1224
- - [ ] Verify in block explorer
1225
- - [ ] Test retry flows
1226
-
1227
- ### Cycle 55: Write API Route Tests
1228
-
1229
- - [ ] Create `web/src/pages/api/__tests__/agent-execute.test.ts`
1230
- - [ ] Test agent execution endpoint:
1231
- - [ ] Without payment → 402
1232
- - [ ] With invalid payment → error
1233
- - [ ] With valid payment → 200 + result
1234
- - [ ] Test other routes similarly:
1235
- - [ ] Provider call
1236
- - [ ] Workflow trigger
1237
- - [ ] Payment history
1238
-
1239
- ### Cycle 56: Create Test Fixtures
1240
-
1241
- - [ ] Create `web/src/__fixtures__/x402-fixtures.ts`
1242
- - [ ] Define test data:
1243
- - [ ] Sample payment payloads
1244
- - [ ] Sample facilitator responses
1245
- - [ ] Sample blockchain transactions
1246
- - [ ] Mock wallet addresses
1247
- - [ ] Test amounts
1248
- - [ ] Reuse across all tests
1249
-
1250
- ### Cycle 57: Test Error Scenarios
1251
-
1252
- - [ ] Create `web/src/__tests__/x402-error-scenarios.test.ts`
1253
- - [ ] Test error handling:
1254
- - [ ] Facilitator down (503)
1255
- - [ ] Invalid payment (402 with error)
1256
- - [ ] Expired request
1257
- - [ ] Malformed payload
1258
- - [ ] Network timeout
1259
- - [ ] Gas estimation error
1260
- - [ ] Insufficient gas
1261
- - [ ] Verify error messages are helpful
1262
-
1263
- ### Cycle 58: Test Security
1264
-
1265
- - [ ] Create `web/src/__tests__/x402-security.test.ts`
1266
- - [ ] Test security aspects:
1267
- - [ ] Replay protection works
1268
- - [ ] Signature verification
1269
- - [ ] Recipient validation
1270
- - [ ] Amount validation
1271
- - [ ] Rate limiting
1272
- - [ ] XSS protection (payment modal)
1273
- - [ ] CSRF protection
1274
-
1275
- ### Cycle 59: Test Performance
1276
-
1277
- - [ ] Create `web/src/__tests__/x402-performance.test.ts`
1278
- - [ ] Measure:
1279
- - [ ] Payment creation time (< 100ms)
1280
- - [ ] Verification time (< 500ms)
1281
- - [ ] Settlement time (< 2s on Base)
1282
- - [ ] UI responsiveness during payment
1283
- - [ ] Load test: 100 concurrent payments
1284
- - [ ] Document results in metrics file
1285
-
1286
- ### Cycle 60: Final Test Coverage Report
1287
-
1288
- - [ ] Run full test suite: `bun test`
1289
- - [ ] Generate coverage report
1290
- - [ ] Target: 80%+ coverage
1291
- - [ ] Document:
1292
- - [ ] Test count
1293
- - [ ] Coverage %
1294
- - [ ] Known gaps
1295
- - [ ] Performance metrics
1296
- - [ ] Save to: `one/events/x402-test-report.md`
1297
-
1298
- ---
1299
-
1300
- ## PHASE 7: DESIGN & WIREFRAMES (Cycle 61-70)
1301
-
1302
- **Purpose:** Finalize UI/UX design for payment flow
1303
-
1304
- ### Cycle 61: Design Payment Prompt Modal
1305
-
1306
- - [ ] Create wireframe: PaymentPromptModal
1307
- - [ ] Layout:
1308
- - [ ] Title: "Payment Required"
1309
- - [ ] Amount display (USD + tokens)
1310
- - [ ] Network selector dropdown
1311
- - [ ] Scheme selector (Permit, Transfer)
1312
- - [ ] "Connect Wallet" button
1313
- - [ ] "Cancel" button
1314
- - [ ] States:
1315
- - [ ] Initial (awaiting wallet connect)
1316
- - [ ] Connected (show address + balance)
1317
- - [ ] Signing (show "Please sign in wallet")
1318
- - [ ] Processing (show spinner)
1319
- - [ ] Success (show checkmark + close)
1320
- - [ ] Error (show error message + retry)
1321
-
1322
- ### Cycle 62: Design Payment History Page
1323
-
1324
- - [ ] Create wireframe: PaymentHistory
1325
- - [ ] Components:
1326
- - [ ] Header: "Payment History"
1327
- - [ ] Filter bar (status, network, date)
1328
- - [ ] Table with columns:
1329
- - [ ] Date/time
1330
- - [ ] Resource (API endpoint)
1331
- - [ ] Amount
1332
- - [ ] Network badge
1333
- - [ ] Status badge
1334
- - [ ] Tx hash (clickable)
1335
- - [ ] Pagination controls
1336
- - [ ] Empty state (no payments)
1337
- - [ ] Error state (failed to load)
1338
-
1339
- ### Cycle 63: Design Balance Display
1340
-
1341
- - [ ] Create wireframe: BalanceDisplay
1342
- - [ ] Card layout:
1343
- - [ ] Title: "Wallet Balance"
1344
- - [ ] Network badge (Base, Ethereum)
1345
- - [ ] Large balance display ($X.XX)
1346
- - [ ] Token display (Y USDC)
1347
- - [ ] Refresh button
1348
- - [ ] Low balance warning (if < $0.05)
1349
- - [ ] "Add Funds" link (future)
1350
-
1351
- ### Cycle 64: Design Agent Execution Flow
1352
-
1353
- - [ ] Create wireframe: AgentExecutionFlow
1354
- - [ ] States:
1355
- - [ ] Initial: Agent selection + parameters
1356
- - [ ] Submitted: Show spinner "Executing..."
1357
- - [ ] Payment required: Show PaymentPromptModal
1358
- - [ ] Retrying: Show spinner "Retrying execution..."
1359
- - [ ] Success: Show agent result
1360
- - [ ] Error: Show error message + retry button
1361
- - [ ] Include payment info in result:
1362
- - [ ] Payment ID
1363
- - [ ] Tx hash
1364
- - [ ] Network used
1365
- - [ ] Cost in USD
1366
-
1367
- ### Cycle 65: Design X402 Demo Page
1368
-
1369
- - [ ] Create wireframe: DemoPage (/demo/x402-payments)
1370
- - [ ] Sections:
1371
- - [ ] Hero: "Try X402 Payments"
1372
- - [ ] How it works (3-step animation)
1373
- - [ ] Live demo (test payment)
1374
- - [ ] Pricing comparison (X402 vs traditional)
1375
- - [ ] FAQ section
1376
- - [ ] CTA: "Integrate X402"
1377
- - [ ] Interactive elements:
1378
- - [ ] Animated flow chart
1379
- - [ ] Live payment example
1380
- - [ ] Code snippets (copy-able)
1381
-
1382
- ### Cycle 66: Create Design Tokens for X402
1383
-
1384
- - [ ] Update `web/src/styles/x402-tokens.css`:
1385
-
1386
- ```css
1387
- :root {
1388
- --x402-primary: hsl(180, 82%, 50%); /* X402 blue */
1389
- --x402-success: hsl(120, 100%, 50%); /* Payment success */
1390
- --x402-warning: hsl(45, 100%, 50%); /* Awaiting user */
1391
- --x402-error: hsl(0, 100%, 50%); /* Payment failed */
1392
- --x402-pending: hsl(45, 100%, 50%); /* Processing */
1393
-
1394
- --blockchain-base: hsl(220, 90%, 50%); /* Base blue */
1395
- --blockchain-ethereum: hsl(250, 60%, 50%); /* Ethereum purple */
1396
- --blockchain-solana: hsl(280, 80%, 50%); /* Solana pink */
1397
-
1398
- --x402-border-radius: 12px;
1399
- --x402-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1400
- }
1401
- ```
1402
-
1403
- ### Cycle 67: Ensure Accessibility (WCAG 2.1 AA)
1404
-
1405
- - [ ] Update components for accessibility:
1406
- - [ ] PaymentPromptModal: Add aria-modal, role, keyboard nav
1407
- - [ ] WalletConnection: Add labels, focus states
1408
- - [ ] PaymentProcessor: Add aria-live for status updates
1409
- - [ ] PaymentHistory: Add table headers, sort buttons
1410
- - [ ] BalanceDisplay: Add aria-label for amount
1411
- - [ ] Test with:
1412
- - [ ] Screen reader (NVDA, JAWS)
1413
- - [ ] Keyboard navigation (Tab, Enter, Escape)
1414
- - [ ] Color contrast (ratio 4.5:1 minimum)
1415
- - [ ] Focus indicators (visible)
1416
-
1417
- ### Cycle 68: Test Mobile Responsiveness
1418
-
1419
- - [ ] Test PaymentPromptModal on:
1420
- - [ ] iPhone 12 (390px)
1421
- - [ ] iPad (768px)
1422
- - [ ] Android phone (360px)
1423
- - [ ] Issues to fix:
1424
- - [ ] Modal overflow
1425
- - [ ] Button sizes (tap targets 48px+)
1426
- - [ ] Text readability
1427
- - [ ] Wallet connect dropdown
1428
- - [ ] Test touch interactions:
1429
- - [ ] Network selector (dropdown)
1430
- - [ ] Scheme selector (radio buttons)
1431
- - [ ] Buttons (click area)
1432
-
1433
- ### Cycle 69: Design Dark Mode Styles
1434
-
1435
- - [ ] Update CSS for dark mode:
1436
- ```css
1437
- @media (prefers-color-scheme: dark) {
1438
- --x402-bg: hsl(220, 13%, 13%);
1439
- --x402-text: hsl(0, 0%, 100%);
1440
- --x402-border: hsl(220, 13%, 23%);
1441
- --x402-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
1442
- }
1443
- ```
1444
- - [ ] Test all components in dark mode
1445
- - [ ] Verify contrast ratios still valid
1446
-
1447
- ### Cycle 70: Create Component Library Documentation
1448
-
1449
- - [ ] Document all X402 components:
1450
- - [ ] PaymentPromptModal
1451
- - [ ] WalletConnection
1452
- - [ ] PaymentProcessor
1453
- - [ ] PaymentHistory
1454
- - [ ] BalanceDisplay
1455
- - [ ] AgentExecutionFlow
1456
- - [ ] For each: Props, states, usage examples
1457
- - [ ] Add Storybook stories (future):
1458
- - [ ] Story for each state
1459
- - [ ] Interactive playground
1460
- - [ ] Component docs
1461
-
1462
- ---
1463
-
1464
- ## PHASE 8: PERFORMANCE & OPTIMIZATION (Cycle 71-80)
1465
-
1466
- **Purpose:** Optimize payment flow for speed + efficiency
1467
-
1468
- ### Cycle 71: Optimize Frontend Bundle Size
1469
-
1470
- - [ ] Audit bundle:
1471
- - [ ] Run `bun run build` with analysis
1472
- - [ ] Identify large dependencies (wagmi, viem)
1473
- - [ ] Tree-shake unused code
1474
- - [ ] Optimize:
1475
- - [ ] Code-split payment components (lazy load)
1476
- - [ ] Minimize Redux/state duplicates
1477
- - [ ] Remove unused shadcn/ui components
1478
- - [ ] Target: Payment modal < 50KB gzipped
1479
-
1480
- ### Cycle 72: Implement Payment Caching
1481
-
1482
- - [ ] Cache frequently accessed data:
1483
- - [ ] X402 config (supported networks, amounts)
1484
- - [ ] User payment history (first 50 records)
1485
- - [ ] Facilitator status
1486
- - [ ] Cache strategy:
1487
- - [ ] Config: 1 hour (update on page load)
1488
- - [ ] History: 5 minutes (refresh on new payment)
1489
- - [ ] Facilitator: 5 minutes (health check)
1490
- - [ ] Use Convex caching + browser localStorage
1491
-
1492
- ### Cycle 73: Implement Pagination for Payment History
1493
-
1494
- - [ ] Load payments in batches:
1495
- - [ ] Initial load: 20 most recent
1496
- - [ ] On scroll: Load next 20
1497
- - [ ] User can jump to page
1498
- - [ ] Database query optimization:
1499
- - [ ] Index: by_timestamp(createdAt)
1500
- - [ ] Limit + offset in query
1501
- - [ ] Count total for pagination info
1502
-
1503
- ### Cycle 74: Optimize Blockchain RPC Calls
1504
-
1505
- - [ ] Batch RPC requests:
1506
- - [ ] Use eth_call for read-only operations
1507
- - [ ] Batch multiple calls in single JSON-RPC batch
1508
- - [ ] Cache results (gas prices, contract state)
1509
- - [ ] Reduce RPC calls:
1510
- - [ ] Cache token balances (poll every 10 seconds)
1511
- - [ ] Cache gas prices (poll every 30 seconds)
1512
- - [ ] Cache supported schemes (poll on demand)
1513
- - [ ] Monitor RPC usage:
1514
- - [ ] Track calls per second
1515
- - [ ] Alert if quota exceeded
1516
-
1517
- ### Cycle 75: Implement Permit Caching
1518
-
1519
- - [ ] Cache permit data to avoid re-generating:
1520
- - [ ] Store permit in localStorage + Convex
1521
- - [ ] Reuse for 5 minutes (before expiry)
1522
- - [ ] User can view previous permits
1523
- - [ ] Cache structure:
1524
- ```typescript
1525
- {
1526
- paymentId: string;
1527
- permit: PermitData;
1528
- signature: string;
1529
- expiresAt: number;
1530
- usedAt?: number;
1531
- }
1532
- ```
1533
-
1534
- ### Cycle 76: Implement Progressive Enhancement
1535
-
1536
- - [ ] Website works without JavaScript (server-rendered):
1537
- - [ ] Show payment form with standard HTML
1538
- - [ ] POST to API endpoint
1539
- - [ ] Server returns 402 with HTML form
1540
- - [ ] User can submit (without client-side validation)
1541
- - [ ] With JavaScript: Enhanced UX
1542
- - [ ] Client-side validation
1543
- - [ ] Real-time feedback
1544
- - [ ] Wallet integration
1545
- - [ ] Goal: Graceful degradation
1546
-
1547
- ### Cycle 77: Monitor Payment Latency
1548
-
1549
- - [ ] Add performance metrics:
1550
- - [ ] Payment creation time
1551
- - [ ] Verification time
1552
- - [ ] Settlement time
1553
- - [ ] UI render time
1554
- - [ ] Track in Convex events:
1555
- ```typescript
1556
- {
1557
- type: 'payment_event',
1558
- metadata: {
1559
- status: 'settled',
1560
- createdAt: 1234567890,
1561
- verifiedAt: 1234567900,
1562
- settledAt: 1234567910,
1563
- creationMs: 10,
1564
- verificationMs: 10,
1565
- settlementMs: 10,
1566
- }
1567
- }
1568
- ```
1569
- - [ ] Alert if > expected time
1570
-
1571
- ### Cycle 78: Implement Connection Pooling
1572
-
1573
- - [ ] Reuse blockchain client connections:
1574
- - [ ] Create single viem client per network
1575
- - [ ] Share across multiple requests
1576
- - [ ] Avoid creating new clients per request
1577
- - [ ] Connection pooling strategy:
1578
- - [ ] Singleton pattern for viem clients
1579
- - [ ] Base client created on startup
1580
- - [ ] Reuse for all requests
1581
-
1582
- ### Cycle 79: Optimize Payment Settlement
1583
-
1584
- - [ ] Parallelize settlement tasks:
1585
- - [ ] Verify payment on blockchain (parallel)
1586
- - [ ] Update DB (parallel)
1587
- - [ ] Log event (parallel)
1588
- - [ ] Notify user (parallel)
1589
- - [ ] Use Convex's scheduler for batch operations
1590
- - [ ] Goal: Settlement < 2 seconds on Base
1591
-
1592
- ### Cycle 80: Performance Baseline & Regression Testing
1593
-
1594
- - [ ] Establish baseline metrics:
1595
- - [ ] Payment creation: 50-100ms
1596
- - [ ] Verification: 300-500ms
1597
- - [ ] Settlement: 1-2s (blockchain dependent)
1598
- - [ ] UI responsiveness: 60 FPS
1599
- - [ ] CI/CD integration:
1600
- - [ ] Run performance tests on every PR
1601
- - [ ] Fail if regression > 10%
1602
- - [ ] Report metrics in PR
1603
- - [ ] Document in: `one/events/x402-performance.md`
1604
-
1605
- ---
1606
-
1607
- ## PHASE 9: DEPLOYMENT & DOCUMENTATION (Cycle 81-90)
1608
-
1609
- **Purpose:** Deploy to production, document for users + developers
1610
-
1611
- ### Cycle 81: Set Up Production Environment Variables
1612
-
1613
- - [ ] Update `.env` (root) with production values:
1614
- - [ ] VITE_BLOCKCHAIN_RPC_BASE (Coinbase mainnet RPC)
1615
- - [ ] VITE_BLOCKCHAIN_RPC_ETHEREUM (if needed)
1616
- - [ ] X402_PAYMENT_ADDRESS_BASE (production treasury)
1617
- - [ ] FACILITATOR_URL (production Coinbase endpoint)
1618
- - [ ] FACILITATOR_API_KEY (production API key)
1619
- - [ ] Secure env vars:
1620
- - [ ] Use Cloudflare secrets (not .env.local)
1621
- - [ ] Rotate API keys quarterly
1622
- - [ ] Audit access logs monthly
1623
- - [ ] Document in: `DEPLOYMENT.md`
1624
-
1625
- ### Cycle 82: Deploy Backend to Convex
1626
-
1627
- - [ ] Ensure all backend changes committed:
1628
- - [ ] `backend/convex/schema.ts` updated
1629
- - [ ] `backend/convex/protocols/x402.ts` created
1630
- - [ ] `backend/convex/services/x402-*.ts` created
1631
- - [ ] `backend/convex/mutations/payments.ts` created
1632
- - [ ] `backend/convex/queries/payments.ts` created
1633
- - [ ] Run deployment checks:
1634
- - [ ] `npx convex dev` (local test)
1635
- - [ ] TypeScript check passes
1636
- - [ ] No schema breaking changes
1637
- - [ ] Deploy: `npx convex deploy`
1638
- - [ ] Verify in Convex dashboard
1639
-
1640
- ### Cycle 83: Build + Deploy Frontend to Cloudflare
1641
-
1642
- - [ ] Build frontend:
1643
- - [ ] `cd web && bun run build`
1644
- - [ ] Type check: `bunx astro check`
1645
- - [ ] Verify dist/ created
1646
- - [ ] Deploy to Cloudflare Pages:
1647
- - [ ] `wrangler pages deploy dist --project-name=web`
1648
- - [ ] Verify deployment URL: https://web.one.ie
1649
- - [ ] Test in browser (smoke test)
1650
- - [ ] Monitor for errors:
1651
- - [ ] Check DevTools console
1652
- - [ ] Monitor Cloudflare logs
1653
-
1654
- ### Cycle 84: Verify Production Endpoints
1655
-
1656
- - [ ] Test in production:
1657
- - [ ] GET /api/agent/execute (without payment) → 402
1658
- - [ ] POST /api/agent/execute (with payment) → 200
1659
- - [ ] GET /api/payments/history → user's payments
1660
- - [ ] GET /api/x402/config → config object
1661
- - [ ] Verify payment flows:
1662
- - [ ] Create payment request
1663
- - [ ] Verify payment
1664
- - [ ] Settle payment
1665
- - [ ] Check Convex logs
1666
- - [ ] Monitor for issues:
1667
- - [ ] Error rates
1668
- - [ ] Slow requests
1669
- - [ ] Failed payments
1670
-
1671
- ### Cycle 85: Create User Documentation
1672
-
1673
- - [ ] Write `web/public/docs/x402-user-guide.md`:
1674
- - [ ] How to connect wallet
1675
- - [ ] How to approve payments
1676
- - [ ] How to view payment history
1677
- - [ ] Supported networks
1678
- - [ ] Minimum/maximum amounts
1679
- - [ ] Troubleshooting section
1680
- - [ ] FAQ
1681
- - [ ] Include screenshots:
1682
- - [ ] Payment prompt
1683
- - [ ] Wallet connection
1684
- - [ ] Payment confirmation
1685
- - [ ] Payment history
1686
-
1687
- ### Cycle 86: Create Developer Documentation
1688
-
1689
- - [ ] Write `one/connections/x402-developer-guide.md`:
1690
- - [ ] X402 protocol overview
1691
- - [ ] How to protect endpoints with X402
1692
- - [ ] How to handle 402 responses
1693
- - [ ] Integration examples:
1694
- - [ ] cURL
1695
- - [ ] JavaScript/fetch
1696
- - [ ] Python
1697
- - [ ] Go
1698
- - [ ] Error codes + meanings
1699
- - [ ] Rate limiting info
1700
- - [ ] Security best practices
1701
- - [ ] Code examples:
1702
-
1703
- ```bash
1704
- # Request protected resource
1705
- curl https://one.ie/api/agent/execute
1706
- # → 402 Payment Required (with PaymentRequired body)
1707
-
1708
- # Make payment + retry
1709
- curl -H "X-PAYMENT: {...}" https://one.ie/api/agent/execute
1710
- # → 200 OK (with X-PAYMENT-ID header)
1711
- ```
1712
-
1713
- ### Cycle 87: Create Integration Guide for Partners
1714
-
1715
- - [ ] Write `one/connections/x402-integration-guide.md`:
1716
- - [ ] High-level overview
1717
- - [ ] When to use X402
1718
- - [ ] How to onboard:
1719
- 1. Set payment requirements on endpoints
1720
- 2. Choose amount + description
1721
- 3. Choose networks
1722
- 4. Configure payout address
1723
- - [ ] How to test:
1724
- 1. Use testnet (if available)
1725
- 2. Test 402 responses
1726
- 3. Test payment flows
1727
- - [ ] How to monitor:
1728
- - [ ] Payment history
1729
- - [ ] Error rates
1730
- - [ ] Settlement times
1731
- - [ ] Support + troubleshooting
1732
-
1733
- ### Cycle 88: Write Architecture Decision Record (ADR)
1734
-
1735
- - [ ] Create `one/events/adr-x402-integration.md`:
1736
- - [ ] Context: Why X402?
1737
- - [ ] Decision: Use X402 for micropayments
1738
- - [ ] Consequences:
1739
- - [ ] Positive: No payment infrastructure needed
1740
- - [ ] Positive: Instant settlement
1741
- - [ ] Positive: Blockchain transparent
1742
- - [ ] Negative: Requires user wallet
1743
- - [ ] Negative: Blockchain dependent
1744
- - [ ] Alternatives considered:
1745
- - [ ] Stripe/PayPal
1746
- - [ ] Custom payment solution
1747
- - [ ] Status: APPROVED/IN PROGRESS
1748
-
1749
- ### Cycle 89: Create Monitoring + Alerting
1750
-
1751
- - [ ] Set up monitoring for:
1752
- - [ ] Payment success rate (target 99%+)
1753
- - [ ] Settlement time (target < 2s)
1754
- - [ ] Facilitator availability (target 99.9%)
1755
- - [ ] Blockchain RPC uptime (target 99.99%)
1756
- - [ ] Alerting rules:
1757
- - [ ] Payment success rate < 95% → alert
1758
- - [ ] Settlement time > 5s → alert
1759
- - [ ] Facilitator down → alert
1760
- - [ ] RPC down → alert
1761
- - [ ] Dashboard:
1762
- - [ ] Real-time metrics
1763
- - [ ] Payment volume
1764
- - [ ] Revenue tracked
1765
- - [ ] Error rate by type
1766
-
1767
- ### Cycle 90: Plan Maintenance + Updates
1768
-
1769
- - [ ] Document maintenance schedule:
1770
- - [ ] Monthly: Security updates
1771
- - [ ] Quarterly: Dependency updates
1772
- - [ ] Annually: Major version upgrades
1773
- - [ ] Runbooks:
1774
- - [ ] How to handle facilitator outage
1775
- - [ ] How to handle blockchain outage
1776
- - [ ] How to handle security incident
1777
- - [ ] How to rollback deployment
1778
- - [ ] Store in: `one/events/x402-maintenance.md`
1779
-
1780
- ---
1781
-
1782
- ## PHASE 10: KNOWLEDGE & LESSONS LEARNED (Cycle 91-100)
1783
-
1784
- **Purpose:** Document learnings, capture institutional knowledge
1785
-
1786
- ### Cycle 91: Document Ontology Mapping
1787
-
1788
- - [ ] Write `one/knowledge/x402-ontology-mapping.md`:
1789
- - [ ] **Groups:** Merchant group, customer group, platform
1790
- - [ ] **People:** Platform owner, merchant, customer
1791
- - [ ] **Things:** payment, external_agent, product
1792
- - [ ] **Connections:** transacted, communicated, delegated
1793
- - [ ] **Events:** payment_event (with protocol: x402)
1794
- - [ ] **Knowledge:** payment_method, x402_scheme labels
1795
- - [ ] Use 6-dimension framework throughout
1796
- - [ ] Show examples of real data structures
1797
-
1798
- ### Cycle 92: Create Payment Flow State Diagram
1799
-
1800
- - [ ] Create `one/events/x402-state-diagram.md` with diagram:
1801
- ```
1802
- [ initial ] --request_payment--> [ payment_required ]
1803
- ^ |
1804
- | user_initiates_payment
1805
- | ↓
1806
- +--- [verify_failed] <-- [ payment_signing ]
1807
- | |
1808
- | user_signs_permit
1809
- | ↓
1810
- +--- [verify_success] <-- [ verification ]
1811
- |
1812
- facilitator_confirms
1813
- ↓
1814
- [ settled ]
1815
- ```
1816
- - [ ] Document transitions:
1817
- - [ ] Timeout: 5 minutes in any state
1818
- - [ ] Retry: User can retry on failure
1819
- - [ ] Settlement: Happens automatically after verification
1820
-
1821
- ### Cycle 93: Document Security Considerations
1822
-
1823
- - [ ] Write `one/connections/x402-security.md`:
1824
- - [ ] **Signature Verification:** User signature proves authorization
1825
- - [ ] **Replay Protection:** Each txHash used only once
1826
- - [ ] **Amount Validation:** Check >= required
1827
- - [ ] **Recipient Validation:** Check = treasury address
1828
- - [ ] **Expiry:** Payment request valid 5 minutes
1829
- - [ ] **Rate Limiting:** 10 requests/min per user
1830
- - [ ] **Facilitator Verification:** Trust Coinbase CDP
1831
- - [ ] **Blockchain Finality:** Verify 1+ confirmations on Base
1832
- - [ ] Known risks:
1833
- - [ ] User sends to wrong address (no recovery)
1834
- - [ ] Private key compromised (wallet issue, not ours)
1835
- - [ ] Blockchain reorg (very unlikely on Base)
1836
- - [ ] Facilitator breach (trust issue)
1837
-
1838
- ### Cycle 94: Document Blockchain Specifics
1839
-
1840
- - [ ] Write `one/connections/x402-blockchain.md`:
1841
- - [ ] **Base Network:**
1842
- - [ ] Chain ID: 8453
1843
- - [ ] Block time: ~2 seconds
1844
- - [ ] Finality: 1 block (~2 seconds)
1845
- - [ ] USDC address: 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
1846
- - [ ] Average cost per transaction: $0.0001
1847
- - [ ] **Permit Support:**
1848
- - [ ] ERC-2612 standard
1849
- - [ ] No separate approval needed
1850
- - [ ] Deadline: must be > current block timestamp
1851
- - [ ] Nonce: auto-incrementing for each permit
1852
- - [ ] **Token Contracts:**
1853
- - [ ] USDC decimals: 6
1854
- - [ ] Balance queries: eth_call (read-only)
1855
- - [ ] Transfer: state-changing transaction
1856
-
1857
- ### Cycle 95: Capture Performance Benchmarks
1858
-
1859
- - [ ] Write `one/events/x402-performance-benchmarks.md`:
1860
- - [ ] **Payment Creation:** 50-100ms
1861
- - [ ] **Permit Generation:** 30-50ms
1862
- - [ ] **User Signature:** 2-5s (user-dependent)
1863
- - [ ] **Facilitator Verification:** 200-300ms
1864
- - [ ] **Blockchain Settlement:** 1-2s (on Base)
1865
- - [ ] **Total E2E Time:** 4-8s
1866
- - [ ] **UI Responsiveness:** 60 FPS (payment modal)
1867
- - [ ] **Bundle Size:** 45KB gzipped (payment module)
1868
- - [ ] **Cache Hit Rate:** 85%+ for config/history
1869
- - [ ] Comparison to alternatives:
1870
- - [ ] Stripe: 1-3s (no blockchain wait)
1871
- - [ ] PayPal: 2-5s (no blockchain wait)
1872
- - [ ] X402: 4-8s (includes blockchain settlement)
1873
-
1874
- ### Cycle 96: Document Common Issues + Solutions
1875
-
1876
- - [ ] Write `one/connections/x402-troubleshooting.md`:
1877
- - [ ] **Issue: Payment times out**
1878
- - [ ] Cause: Facilitator slow or down
1879
- - [ ] Solution: Retry after 5 minutes
1880
- - [ ] **Issue: "Insufficient Balance"**
1881
- - [ ] Cause: User balance < payment amount
1882
- - [ ] Solution: Show user balance, suggest adding funds
1883
- - [ ] **Issue: "Wrong Recipient"**
1884
- - [ ] Cause: Payment sent to wrong address
1885
- - [ ] Solution: Show treasury address before signing
1886
- - [ ] **Issue: "Permit Signature Invalid"**
1887
- - [ ] Cause: User canceled signing
1888
- - [ ] Solution: Show error, let user retry
1889
- - [ ] **Issue: "Network Mismatch"**
1890
- - [ ] Cause: User on wrong blockchain
1891
- - [ ] Solution: Auto-switch or show dialog
1892
- - [ ] **Issue: "Replay Protection Triggered"**
1893
- - [ ] Cause: User tried same payment twice
1894
- - [ ] Solution: Create new payment request
1895
-
1896
- ### Cycle 97: Create Cost Analysis Report
1897
-
1898
- - [ ] Write `one/events/x402-cost-analysis.md`:
1899
- - [ ] **Blockchain Costs:**
1900
- - [ ] Base: $0.0001 per payment
1901
- - [ ] Ethereum: $1-5 per payment (high)
1902
- - [ ] Solana: $0.00001 per payment (future)
1903
- - [ ] **Facilitator Costs:**
1904
- - [ ] Coinbase CDP: Free (for now)
1905
- - [ ] **Infrastructure Costs:**
1906
- - [ ] Convex: Included in platform costs
1907
- - [ ] Cloudflare: Included in platform costs
1908
- - [ ] RPC Provider: $100-500/month (if own node)
1909
- - [ ] **Revenue Potential:**
1910
- - [ ] If 1000 payments/day at $0.01 = $10/day
1911
- - [ ] At 80% markup = $2/day profit
1912
- - [ ] Annualized: $730/year at current volume
1913
- - [ ] **Break-even Analysis:**
1914
- - [ ] Need 10+ payments/day to offset costs
1915
-
1916
- ### Cycle 98: Plan Future Enhancements
1917
-
1918
- - [ ] Document Phase 2+ features in `one/things/todo-x402-phase2.md`:
1919
- - [ ] [ ] Bazar marketplace discovery layer
1920
- - [ ] [ ] Multi-chain support (Ethereum, Solana, Polygon)
1921
- - [ ] [ ] Invoice payment scheme
1922
- - [ ] [ ] Signature-based payments
1923
- - [ ] [ ] Refund mechanism
1924
- - [ ] [ ] Revenue distribution to merchants
1925
- - [ ] [ ] Subscription-based payments
1926
- - [ ] [ ] Conditional payments (if/then logic)
1927
- - [ ] [ ] Payment analytics dashboard
1928
- - [ ] [ ] Webhook notifications on payment
1929
- - [ ] [ ] Custom facilitator support
1930
- - [ ] [ ] Stablecoin alternatives (USDT, DAI)
1931
- - [ ] Prioritize by impact + effort
1932
-
1933
- ### Cycle 99: Create Lessons Learned Document
1934
-
1935
- - [ ] Write `one/events/x402-lessons-learned.md`:
1936
- - [ ] **What went well:**
1937
- - [ ] Coinbase CDP integration smooth
1938
- - [ ] Permit-based payments have great UX
1939
- - [ ] Base network perfect for micropayments
1940
- - [ ] **What was challenging:**
1941
- - [ ] Wallet integration complexity
1942
- - [ ] Blockchain async operations
1943
- - [ ] Testing with real wallets
1944
- - [ ] **What we'd do differently:**
1945
- - [ ] Start with testnet longer
1946
- - [ ] Build more test utilities earlier
1947
- - [ ] Design payment history upfront
1948
- - [ ] **Skills gained:**
1949
- - [ ] ERC-2612 permits
1950
- - [ ] Facilitator patterns
1951
- - [ ] Blockchain integration testing
1952
- - [ ] **Team feedback:**
1953
- - [ ] Quotes from team members
1954
- - [ ] What they learned
1955
-
1956
- ### Cycle 100: Final Summary + Celebration
1957
-
1958
- - [ ] Create `one/events/x402-phase1-complete.md`:
1959
- - [ ] **Project Status:** ✅ COMPLETE
1960
- - [ ] **Timeline:** Cycle 1-100 (100 cycles)
1961
- - [ ] **Delivered:**
1962
- - [ ] [x] HTTP 402 protocol implementation
1963
- - [ ] [x] X402PaymentService (Effect.ts)
1964
- - [ ] [x] Blockchain integration (Base)
1965
- - [ ] [x] Frontend components (React)
1966
- - [ ] [x] Astro API routes (protected)
1967
- - [ ] [x] Payment history tracking
1968
- - [ ] [x] Full E2E testing
1969
- - [ ] [x] Production deployment
1970
- - [ ] [x] Complete documentation
1971
- - [ ] **Next Steps:**
1972
- - [ ] Monitor production metrics
1973
- - [ ] Gather user feedback
1974
- - [ ] Plan Phase 2 features
1975
- - [ ] **Thank you message:**
1976
- - [ ] Credit to team
1977
- - [ ] Thanks to Coinbase for CDP
1978
- - [ ] Thanks to users for feedback
1979
- - [ ] 🎉 **X402 Phase 1 Complete!**
1980
-
1981
- ---
1982
-
1983
- ## SUCCESS CRITERIA
1984
-
1985
- X402 integration is complete when:
1986
-
1987
- - ✅ HTTP 402 responses sent from Astro API routes
1988
- - ✅ X-PAYMENT header validation working end-to-end
1989
- - ✅ Blockchain payment verification via Coinbase facilitator
1990
- - ✅ Payment events logged in Convex events table
1991
- - ✅ Payment history queryable + filterable
1992
- - ✅ Frontend components (React) render correctly
1993
- - ✅ UI shows payment prompt + wallet connection
1994
- - ✅ Demo: Request → 402 → payment → access
1995
- - ✅ 3+ protected endpoints (agent, provider, workflow)
1996
- - ✅ All tests passing (80%+ coverage)
1997
- - ✅ Performance baselines established
1998
- - ✅ Production deployment verified
1999
- - ✅ Documentation complete (user + developer)
2000
- - ✅ Architecture documented in ontology
2001
- - ✅ Lessons learned captured
2002
-
2003
- ---
2004
-
2005
- ## QUICK REFERENCE
2006
-
2007
- **Files Created:**
2008
-
2009
- - `backend/convex/protocols/x402.ts` - Type definitions
2010
- - `backend/convex/services/x402-payment.ts` - Payment service
2011
- - `backend/convex/services/x402-facilitator.ts` - Facilitator service
2012
- - `backend/convex/services/blockchain-provider.ts` - Blockchain client
2013
- - `backend/convex/config/x402-config.ts` - Configuration
2014
- - `backend/convex/mutations/payments.ts` - Convex mutations
2015
- - `backend/convex/queries/payments.ts` - Convex queries
2016
- - `web/src/components/features/PaymentRequired.tsx` - Component
2017
- - `web/src/components/features/WalletConnection.tsx` - Component
2018
- - `web/src/components/features/PaymentProcessor.tsx` - Component
2019
- - `web/src/pages/api/agent/execute.ts` - API route
2020
- - `web/src/pages/api/provider/[providerId]/call.ts` - API route
2021
- - `web/src/pages/api/payments/verify.ts` - API route
2022
- - `web/src/pages/demo/x402-payments.astro` - Demo page
2023
- - `one/connections/x402-architecture.md` - Architecture docs
2024
- - `one/connections/x402-developer-guide.md` - Developer docs
2025
- - `one/connections/x402-security.md` - Security docs
2026
-
2027
- **Environment Variables Required:**
2028
-
2029
- - `VITE_BLOCKCHAIN_RPC_BASE` - Base network RPC URL
2030
- - `X402_PAYMENT_ADDRESS_BASE` - Treasury address
2031
- - `FACILITATOR_URL` - Coinbase CDP endpoint
2032
- - `FACILITATOR_API_KEY` - API key (if needed)
2033
-
2034
- **Tests to Write:**
2035
-
2036
- - Unit tests (payment services)
2037
- - Integration tests (E2E payment flow)
2038
- - Component tests (React components)
2039
- - API route tests (Astro endpoints)
2040
- - Security tests (replay, validation)
2041
- - Performance tests (benchmarks)
2042
-
2043
- ---
2044
-
2045
- **Remember:** Plan in cycles, not days. Where in the sequence does each thing belong?
2046
-
2047
- **Status:** Ready for execution. Begin with Cycle 1-10 (Foundation).