oneie 2.0.2 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (459) hide show
  1. package/AGENTS.md +245 -0
  2. package/CLAUDE.md +725 -0
  3. package/LICENSE.md +84 -0
  4. package/README.md +489 -931
  5. package/folders.yaml +78 -17
  6. package/one/.obsidian/app.json +1 -0
  7. package/one/.obsidian/appearance.json +1 -0
  8. package/one/.obsidian/core-plugins.json +33 -0
  9. package/one/.obsidian/workspace.json +211 -0
  10. package/one/connections/a2a.md +551 -0
  11. package/one/connections/acp.md +761 -0
  12. package/one/connections/acps.md +731 -0
  13. package/one/connections/agentkit.md +349 -0
  14. package/one/connections/agui.md +767 -0
  15. package/one/connections/any-backend.md +1702 -0
  16. package/one/connections/ap2.md +998 -0
  17. package/one/connections/api-docs.md +1891 -0
  18. package/one/connections/api.md +2190 -0
  19. package/one/connections/architecture-diagram.md +94 -0
  20. package/one/connections/communications.md +449 -0
  21. package/one/connections/connections.md +339 -0
  22. package/one/connections/copilotkit.md +1559 -0
  23. package/one/connections/cryptonetworks.md +781 -0
  24. package/one/connections/documentation.md +1120 -0
  25. package/one/connections/effect.md +279 -0
  26. package/one/connections/elizaos.md +1290 -0
  27. package/one/connections/inference.md +58 -0
  28. package/one/connections/kyc.md +632 -0
  29. package/one/connections/mcp.md +842 -0
  30. package/one/connections/membership.md +1152 -0
  31. package/one/connections/middleware.md +1067 -0
  32. package/one/connections/multitenant.md +1341 -0
  33. package/one/connections/n8n.md +1015 -0
  34. package/one/connections/patterns.md +89 -0
  35. package/one/connections/protocols.md +279 -0
  36. package/one/connections/relationships.md +107 -0
  37. package/one/connections/schema.md +587 -0
  38. package/one/connections/service-layer.md +550 -0
  39. package/one/connections/structure.md +0 -0
  40. package/one/connections/vectors.md +207 -0
  41. package/one/connections/wordpress.md +1302 -0
  42. package/one/connections/workflow-copy.md +905 -0
  43. package/one/connections/workflow-examples.md +741 -0
  44. package/one/connections/workflow.md +905 -0
  45. package/one/connections/workflows/delegation.md +885 -0
  46. package/one/connections/workflows/frontend.md +1037 -0
  47. package/one/connections/workflows/strategy.md +903 -0
  48. package/one/connections/workflows/tasks.md +698 -0
  49. package/one/connections/x402.md +1249 -0
  50. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +412 -0
  51. package/one/events/FEATURE-2-4-COMPLETE.md +302 -0
  52. package/one/events/FEATURE_2_3_COMPLETE.md +575 -0
  53. package/one/events/GROUPS-MIGRATION.md +625 -0
  54. package/one/events/INSTALL-TESTS.md +293 -0
  55. package/one/events/INTEGRATION-ARCHITECTURE.md +561 -0
  56. package/one/events/INTEGRATION-CHECKLIST.md +1234 -0
  57. package/one/events/INTEGRATION-ORCHESTRATION.md +2623 -0
  58. package/one/events/INTEGRATION-SUMMARY.md +653 -0
  59. package/one/events/MIGRATION-REPORT.md +435 -0
  60. package/one/events/MIGRATION.md +69 -0
  61. package/one/events/README-archived.md +519 -0
  62. package/one/events/TEST-SUMMARY.md +393 -0
  63. package/one/events/TESTS-QUICK-REF.md +262 -0
  64. package/one/events/events.md +545 -0
  65. package/one/groups/groups.md +543 -0
  66. package/one/groups/one.md +599 -0
  67. package/one/groups/revenue.md +673 -0
  68. package/one/groups/strategy.md +869 -0
  69. package/one/groups/vision.md +98 -0
  70. package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +49 -0
  71. package/one/knowledge/ai-platform.md +305 -0
  72. package/one/knowledge/architecture-any-backend.md +1366 -0
  73. package/one/knowledge/architecture-diagram.md +94 -0
  74. package/one/knowledge/architecture-frontend.md +930 -0
  75. package/one/knowledge/architecture.md +2077 -0
  76. package/one/knowledge/crypto.md +960 -0
  77. package/one/knowledge/docs/flow.md +0 -0
  78. package/one/knowledge/dsl.md +1660 -0
  79. package/one/knowledge/files.md +2471 -0
  80. package/one/knowledge/frontend.md +1038 -0
  81. package/one/knowledge/hono.md +2109 -0
  82. package/one/knowledge/implementation-examples.md +2536 -0
  83. package/one/knowledge/inference-score.md +159 -0
  84. package/one/knowledge/knowledge.md +642 -0
  85. package/one/knowledge/language.md +980 -0
  86. package/one/knowledge/lessons-learned.md +70 -0
  87. package/one/knowledge/ontology-6-dimensions.md +0 -0
  88. package/one/knowledge/ontology-documentation.md +356 -0
  89. package/one/knowledge/ontology-engineering-specification.md +1292 -0
  90. package/one/knowledge/ontology-engineering.md +1652 -0
  91. package/one/knowledge/ontology-frontend-copy-2.md +1492 -0
  92. package/one/knowledge/ontology-frontend-copy.md +753 -0
  93. package/one/knowledge/ontology-frontend-specifications.md +2188 -0
  94. package/one/knowledge/ontology-frontend.md +2427 -0
  95. package/one/knowledge/ontology-minimal.yaml +299 -0
  96. package/one/knowledge/ontology.md +2830 -0
  97. package/one/knowledge/ontology.md.backup +2822 -0
  98. package/one/knowledge/ontology.yaml +1165 -0
  99. package/one/knowledge/patterns/backend/convex-mutation-pattern.md +100 -0
  100. package/one/knowledge/patterns/backend/convex-query-pattern.md +88 -0
  101. package/one/knowledge/patterns/backend/mutation-template.md +231 -0
  102. package/one/knowledge/patterns/backend/query-template.md +267 -0
  103. package/one/knowledge/patterns/backend/service-template.md +237 -0
  104. package/one/knowledge/patterns/design/component-architecture.md +399 -0
  105. package/one/knowledge/patterns/design/test-driven-design-pattern.md +162 -0
  106. package/one/knowledge/patterns/design/wireframe-template.md +216 -0
  107. package/one/knowledge/patterns/frontend/component-template.md +195 -0
  108. package/one/knowledge/patterns/frontend/form-template.md +276 -0
  109. package/one/knowledge/patterns/frontend/page-template.md +178 -0
  110. package/one/knowledge/patterns/frontend/react-component-pattern.md +128 -0
  111. package/one/knowledge/patterns/test/acceptance-criteria-template.md +378 -0
  112. package/one/knowledge/patterns/test/technical-test-template.md +544 -0
  113. package/one/knowledge/patterns/test/test-driven-pattern.md +140 -0
  114. package/one/knowledge/patterns/test/user-flow-template.md +254 -0
  115. package/one/knowledge/provider-creation-guide.md +1064 -0
  116. package/one/knowledge/quality-loop.md +401 -0
  117. package/one/knowledge/readme.md +131 -0
  118. package/one/knowledge/rules.md +626 -0
  119. package/one/knowledge/score.md +67 -0
  120. package/one/knowledge/specifications.md +855 -0
  121. package/one/knowledge/tags.md +130 -0
  122. package/one/knowledge/todo.md +251 -0
  123. package/one/license.md +84 -0
  124. package/one/people/anthony-o-connell.md +440 -0
  125. package/one/people/people.md +567 -0
  126. package/one/things/CHECKLIST.md +356 -0
  127. package/one/things/ONE.md +510 -0
  128. package/one/things/agents/agent-backend.md +1401 -0
  129. package/one/things/agents/agent-builder.md +955 -0
  130. package/one/things/agents/agent-clean.md +709 -0
  131. package/one/things/agents/agent-clone.md +1341 -0
  132. package/one/things/agents/agent-designer.md +2177 -0
  133. package/one/things/agents/agent-director.md +1508 -0
  134. package/one/things/agents/agent-documenter.md +1049 -0
  135. package/one/things/agents/agent-frontend.md +1119 -0
  136. package/one/things/agents/agent-integrator.md +1192 -0
  137. package/one/things/agents/agent-problem-solver.md +1379 -0
  138. package/one/things/agents/agent-quality.md +1353 -0
  139. package/one/things/agents/agent-sales.md +986 -0
  140. package/one/things/cascade/cascade.yaml +464 -0
  141. package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +470 -0
  142. package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +264 -0
  143. package/one/things/cascade/docs/examples/1-1-agent-prompts.md +486 -0
  144. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +497 -0
  145. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +227 -0
  146. package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +516 -0
  147. package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +544 -0
  148. package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +223 -0
  149. package/one/things/cascade/docs/examples/1-3-event-coordination.md +508 -0
  150. package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +609 -0
  151. package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +195 -0
  152. package/one/things/cascade/docs/examples/1-4-knowledge-management.md +577 -0
  153. package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +797 -0
  154. package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +212 -0
  155. package/one/things/cascade/docs/examples/1-5-quality-loops.md +641 -0
  156. package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +610 -0
  157. package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +213 -0
  158. package/one/things/cascade/docs/examples/1-6-numbering-structure.md +575 -0
  159. package/one/things/cascade/docs/examples/readme.md +222 -0
  160. package/one/things/cascade/docs/getting-started.md +515 -0
  161. package/one/things/cascade/docs/workflow.md +1372 -0
  162. package/one/things/cascade/readme.md +336 -0
  163. package/one/things/cascade/templates/feature-template.md +267 -0
  164. package/one/things/claude/agents/advocacy-activation-manager.md +685 -0
  165. package/one/things/claude/agents/advocacy-campaign-designer.md +663 -0
  166. package/one/things/claude/agents/analyst.md +483 -0
  167. package/one/things/claude/agents/architect.md +480 -0
  168. package/one/things/claude/agents/brand-identity-specialist.md +513 -0
  169. package/one/things/claude/agents/bstp-token-strategist.md +667 -0
  170. package/one/things/claude/agents/builder-repo.md +489 -0
  171. package/one/things/claude/agents/bullstamp-community-builder.md +574 -0
  172. package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +506 -0
  173. package/one/things/claude/agents/bulltilt-platform-growth.md +567 -0
  174. package/one/things/claude/agents/company-bullstamp-character.md +587 -0
  175. package/one/things/claude/agents/company-bullstamp-community.md +292 -0
  176. package/one/things/claude/agents/company-bullstamp-marketing.md +292 -0
  177. package/one/things/claude/agents/company-bullstamp-token.md +292 -0
  178. package/one/things/claude/agents/company-bulltilt-growth.md +292 -0
  179. package/one/things/claude/agents/content-bibliography-formatter.md +381 -0
  180. package/one/things/claude/agents/content-calendar-planner.md +448 -0
  181. package/one/things/claude/agents/content-chapter-formatter.md +488 -0
  182. package/one/things/claude/agents/content-formatter.md +546 -0
  183. package/one/things/claude/agents/content-hook-specialist.md +462 -0
  184. package/one/things/claude/agents/content-image-formatter.md +535 -0
  185. package/one/things/claude/agents/content-introduction-formatter.md +485 -0
  186. package/one/things/claude/agents/content-multiplication-engine.md +556 -0
  187. package/one/things/claude/agents/content-playbook-writer.md +448 -0
  188. package/one/things/claude/agents/content-team-manager.md +622 -0
  189. package/one/things/claude/agents/content-toc-formatter.md +522 -0
  190. package/one/things/claude/agents/convex-backend-specialist.md +2561 -0
  191. package/one/things/claude/agents/core-manager.md +582 -0
  192. package/one/things/claude/agents/core-master.md +403 -0
  193. package/one/things/claude/agents/cross-functional-manager.md +471 -0
  194. package/one/things/claude/agents/crypto-airdrop-strategist.md +602 -0
  195. package/one/things/claude/agents/crypto-analytics-educator.md +553 -0
  196. package/one/things/claude/agents/crypto-architecture-specialist.md +466 -0
  197. package/one/things/claude/agents/crypto-community-analyst.md +298 -0
  198. package/one/things/claude/agents/crypto-community-psychologist.md +509 -0
  199. package/one/things/claude/agents/crypto-dex-optimization-expert.md +538 -0
  200. package/one/things/claude/agents/crypto-dex-optimizer.md +292 -0
  201. package/one/things/claude/agents/crypto-diamond-formation-specialist.md +513 -0
  202. package/one/things/claude/agents/crypto-diamond-hands.md +292 -0
  203. package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +554 -0
  204. package/one/things/claude/agents/crypto-engagement-specialist.md +540 -0
  205. package/one/things/claude/agents/crypto-market-researcher.md +292 -0
  206. package/one/things/claude/agents/crypto-marketing-orchestrator.md +523 -0
  207. package/one/things/claude/agents/crypto-network-effect-amplifier.md +569 -0
  208. package/one/things/claude/agents/crypto-optimization-analyst.md +554 -0
  209. package/one/things/claude/agents/crypto-strategic-synthesizer.md +517 -0
  210. package/one/things/claude/agents/crypto-team-manager.md +387 -0
  211. package/one/things/claude/agents/crypto-token-analyst.md +278 -0
  212. package/one/things/claude/agents/crypto-viral-content-creator.md +546 -0
  213. package/one/things/claude/agents/crypto-wallet-identification-expert.md +517 -0
  214. package/one/things/claude/agents/crypto-wallet-identifier.md +292 -0
  215. package/one/things/claude/agents/customer-journey-designer.md +481 -0
  216. package/one/things/claude/agents/customer-success-manager.md +581 -0
  217. package/one/things/claude/agents/dev.md +413 -0
  218. package/one/things/claude/agents/documenter.md +546 -0
  219. package/one/things/claude/agents/elevate-marketing-orchestrator.md +410 -0
  220. package/one/things/claude/agents/engagement-specialist.md +509 -0
  221. package/one/things/claude/agents/engineering-architect.md +387 -0
  222. package/one/things/claude/agents/engineering-business-analyst.md +537 -0
  223. package/one/things/claude/agents/engineering-developer.md +387 -0
  224. package/one/things/claude/agents/engineering-director.md +282 -0
  225. package/one/things/claude/agents/engineering-ingestor.md +649 -0
  226. package/one/things/claude/agents/engineering-product-manager.md +537 -0
  227. package/one/things/claude/agents/engineering-product-owner.md +537 -0
  228. package/one/things/claude/agents/engineering-project-coordinator.md +537 -0
  229. package/one/things/claude/agents/engineering-quality-assurance.md +393 -0
  230. package/one/things/claude/agents/engineering-team-manager.md +512 -0
  231. package/one/things/claude/agents/engineering-user-experience.md +387 -0
  232. package/one/things/claude/agents/framework-elevate-manager.md +294 -0
  233. package/one/things/claude/agents/improver.md +763 -0
  234. package/one/things/claude/agents/intelligence-team-manager.md +385 -0
  235. package/one/things/claude/agents/lead-capture-expert.md +466 -0
  236. package/one/things/claude/agents/lead-magnet-creator.md +453 -0
  237. package/one/things/claude/agents/market-research-analyst.md +412 -0
  238. package/one/things/claude/agents/marketing-brand-identity.md +314 -0
  239. package/one/things/claude/agents/marketing-content-hooks.md +450 -0
  240. package/one/things/claude/agents/marketing-content-multiplier.md +326 -0
  241. package/one/things/claude/agents/marketing-content-poster.md +361 -0
  242. package/one/things/claude/agents/marketing-customer-journey.md +326 -0
  243. package/one/things/claude/agents/marketing-director.md +397 -0
  244. package/one/things/claude/agents/marketing-engagement.md +326 -0
  245. package/one/things/claude/agents/marketing-lead-capture.md +326 -0
  246. package/one/things/claude/agents/marketing-lead-magnet.md +326 -0
  247. package/one/things/claude/agents/marketing-network-effects.md +326 -0
  248. package/one/things/claude/agents/marketing-nurture-campaigns.md +326 -0
  249. package/one/things/claude/agents/marketing-share-optimizer.md +326 -0
  250. package/one/things/claude/agents/marketing-team-manager.md +446 -0
  251. package/one/things/claude/agents/marketing-viral-growth.md +201 -0
  252. package/one/things/claude/agents/mission-commander.md +373 -0
  253. package/one/things/claude/agents/network-effect-analyst.md +587 -0
  254. package/one/things/claude/agents/nextjs-15-specialist.md +1547 -0
  255. package/one/things/claude/agents/npx.md +890 -0
  256. package/one/things/claude/agents/nurture-campaign-manager.md +531 -0
  257. package/one/things/claude/agents/one-master.md +355 -0
  258. package/one/things/claude/agents/one-orchestrator.md +315 -0
  259. package/one/things/claude/agents/one.md +601 -0
  260. package/one/things/claude/agents/playbook-generator.md +503 -0
  261. package/one/things/claude/agents/pm.md +326 -0
  262. package/one/things/claude/agents/po.md +345 -0
  263. package/one/things/claude/agents/qa.md +336 -0
  264. package/one/things/claude/agents/research-foundation-analyst.md +307 -0
  265. package/one/things/claude/agents/research-intelligence-gatherer.md +408 -0
  266. package/one/things/claude/agents/research-market-analyst.md +307 -0
  267. package/one/things/claude/agents/research-team-manager.md +482 -0
  268. package/one/things/claude/agents/sales-environment-optimizer.md +494 -0
  269. package/one/things/claude/agents/sales-team-manager.md +400 -0
  270. package/one/things/claude/agents/sales-upsell-strategist.md +307 -0
  271. package/one/things/claude/agents/service-advocacy-campaigns.md +307 -0
  272. package/one/things/claude/agents/service-advocacy-manager.md +307 -0
  273. package/one/things/claude/agents/service-success-manager.md +307 -0
  274. package/one/things/claude/agents/service-team-manager.md +400 -0
  275. package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +2302 -0
  276. package/one/things/claude/agents/share-optimization-specialist.md +551 -0
  277. package/one/things/claude/agents/sm.md +327 -0
  278. package/one/things/claude/agents/story-teller.md +473 -0
  279. package/one/things/claude/agents/task-master.md +596 -0
  280. package/one/things/claude/agents/tauri-cross-platform-specialist.md +1827 -0
  281. package/one/things/claude/agents/tester.md +556 -0
  282. package/one/things/claude/agents/the-bull-character-manager.md +580 -0
  283. package/one/things/claude/agents/tools-playbook-generator.md +489 -0
  284. package/one/things/claude/agents/turbo-repo-builder.md +316 -0
  285. package/one/things/claude/agents/upsell-strategist.md +480 -0
  286. package/one/things/claude/agents/ux-expert.md +335 -0
  287. package/one/things/claude/agents/viral-growth-orchestrator.md +497 -0
  288. package/one/things/claude/claude-code-hooks-development.json +21 -0
  289. package/one/things/claude/claude-code-hooks-production.json +21 -0
  290. package/one/things/claude/claude-code-hooks.json +25 -0
  291. package/one/things/claude/commands/agent.md +104 -0
  292. package/one/things/claude/commands/cascade-status.md +128 -0
  293. package/one/things/claude/commands/ingest.md +290 -0
  294. package/one/things/claude/commands/ingestor.md +136 -0
  295. package/one/things/claude/commands/mission.md +83 -0
  296. package/one/things/claude/commands/npx.md +133 -0
  297. package/one/things/claude/commands/one.md +440 -0
  298. package/one/things/claude/commands/quality-check.md +204 -0
  299. package/one/things/claude/commands/smart-route.md +220 -0
  300. package/one/things/claude/commands/start.md +121 -0
  301. package/one/things/claude/commands/story.md +83 -0
  302. package/one/things/claude/commands/task.md +173 -0
  303. package/one/things/claude/hook-bypass.json +32 -0
  304. package/one/things/claude/hooks/agent-hook-config.json +427 -0
  305. package/one/things/claude/hooks/agent-hook-manager.js +525 -0
  306. package/one/things/claude/hooks/agent-load-balancer.js +271 -0
  307. package/one/things/claude/hooks/agent-request-interceptor.js +70 -0
  308. package/one/things/claude/hooks/build-hook.sh +156 -0
  309. package/one/things/claude/hooks/cascade-feedback.js +297 -0
  310. package/one/things/claude/hooks/cascade-integration-hooks.js +648 -0
  311. package/one/things/claude/hooks/cleanup-hook.sh +201 -0
  312. package/one/things/claude/hooks/continuous-improvement-monitor.js +510 -0
  313. package/one/things/claude/hooks/file-organization-engine.js +427 -0
  314. package/one/things/claude/hooks/file-organization-hook.sh +80 -0
  315. package/one/things/claude/hooks/file-organization-monitor.js +269 -0
  316. package/one/things/claude/hooks/format-hook.sh +43 -0
  317. package/one/things/claude/hooks/hook-bypass.sh +293 -0
  318. package/one/things/claude/hooks/hook-config-manager.js +202 -0
  319. package/one/things/claude/hooks/hook-debouncer.sh +62 -0
  320. package/one/things/claude/hooks/hook-logger.sh +89 -0
  321. package/one/things/claude/hooks/hook-orchestrator.js +662 -0
  322. package/one/things/claude/hooks/hook-performance-report.js +120 -0
  323. package/one/things/claude/hooks/lint-hook.sh +140 -0
  324. package/one/things/claude/hooks/mcp-cascade-integration.js +816 -0
  325. package/one/things/claude/hooks/memory-optimizer.js +510 -0
  326. package/one/things/claude/hooks/notification-hook.sh +204 -0
  327. package/one/things/claude/hooks/ontology-compliance.js +394 -0
  328. package/one/things/claude/hooks/ontology-hook-manager.js +316 -0
  329. package/one/things/claude/hooks/ontology-validation-engine.js +317 -0
  330. package/one/things/claude/hooks/ontology-validation-hook.sh +86 -0
  331. package/one/things/claude/hooks/performance-metrics.json +25 -0
  332. package/one/things/claude/hooks/performance-monitoring-hook.js +422 -0
  333. package/one/things/claude/hooks/quality-scoring-engine.js +834 -0
  334. package/one/things/claude/hooks/security-hook.sh +256 -0
  335. package/one/things/claude/hooks/simple-load-balancer.js +238 -0
  336. package/one/things/claude/hooks/startup-optimizer.js +625 -0
  337. package/one/things/claude/hooks/story-scoring-system.js +445 -0
  338. package/one/things/claude/hooks/story-validation-engine.js +473 -0
  339. package/one/things/claude/hooks/story-validation-hook-enhanced.sh +210 -0
  340. package/one/things/claude/hooks/story-validation-hook.sh +145 -0
  341. package/one/things/claude/hooks/structure-synchronizer.js +194 -0
  342. package/one/things/claude/hooks/sub-agent-output-validator.js +647 -0
  343. package/one/things/claude/hooks/sub-agent-validation-hook.js +343 -0
  344. package/one/things/claude/hooks/test-hook.sh +145 -0
  345. package/one/things/claude/hooks/test-story-validation.sh +170 -0
  346. package/one/things/claude/hooks/trinity-validation-system.js +392 -0
  347. package/one/things/claude/settings-local.json +86 -0
  348. package/one/things/cli/cli-code.md +652 -0
  349. package/one/things/cli/cli-compiler-code.md +652 -0
  350. package/one/things/cli/cli.md +1068 -0
  351. package/one/things/components/card-shadcn.md +929 -0
  352. package/one/things/components/card.md +1050 -0
  353. package/one/things/components.md +1669 -0
  354. package/one/things/componets.md +4 -0
  355. package/one/things/creator-diagram.md +166 -0
  356. package/one/things/examples/children/lemonade-stand.md +366 -0
  357. package/one/things/examples/enterprise/crm-saas.md +1429 -0
  358. package/one/things/features/1-1-agent-prompts/design.md +470 -0
  359. package/one/things/features/1-1-agent-prompts/tests.md +264 -0
  360. package/one/things/features/1-1-agent-prompts.md +486 -0
  361. package/one/things/features/1-2-yaml-orchestrator/design.md +497 -0
  362. package/one/things/features/1-2-yaml-orchestrator/tests.md +227 -0
  363. package/one/things/features/1-2-yaml-orchestrator.md +516 -0
  364. package/one/things/features/1-3-event-coordination/design.md +544 -0
  365. package/one/things/features/1-3-event-coordination/tests.md +223 -0
  366. package/one/things/features/1-3-event-coordination.md +508 -0
  367. package/one/things/features/1-4-knowledge-management/design.md +609 -0
  368. package/one/things/features/1-4-knowledge-management/tests.md +195 -0
  369. package/one/things/features/1-4-knowledge-management.md +577 -0
  370. package/one/things/features/1-5-quality-loops/design.md +797 -0
  371. package/one/things/features/1-5-quality-loops/tests.md +212 -0
  372. package/one/things/features/1-5-quality-loops.md +641 -0
  373. package/one/things/features/1-6-numbering-structure/design.md +610 -0
  374. package/one/things/features/1-6-numbering-structure/tests.md +213 -0
  375. package/one/things/features/1-6-numbering-structure.md +575 -0
  376. package/one/things/features/2-1-dataprovider-interface.md +2358 -0
  377. package/one/things/features/2-2-config-system.md +3075 -0
  378. package/one/things/features/2-3-effectts-services.md +1498 -0
  379. package/one/things/features/2-4-react-hooks.md +2120 -0
  380. package/one/things/features/2-5-auth-migration.md +2046 -0
  381. package/one/things/features/2-6-dashboard-migration.md +1985 -0
  382. package/one/things/features/2-7-alternative-providers.md +2505 -0
  383. package/one/things/features/2-7-implementation-report.md +680 -0
  384. package/one/things/features/2-cli.md +1235 -0
  385. package/one/things/features/2-design.md +1738 -0
  386. package/one/things/features/2-tests.md +520 -0
  387. package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +521 -0
  388. package/one/things/features/DECOUPLING.md +272 -0
  389. package/one/things/features/DEPLOYMENT.md +452 -0
  390. package/one/things/features/IMPLEMENTATION_SUMMARY.md +316 -0
  391. package/one/things/features/dataprovider-interface/1-tests.md +1522 -0
  392. package/one/things/features/improve.md +843 -0
  393. package/one/things/features/remove-convex-deps.md +45 -0
  394. package/one/things/features/top-features.md +79 -0
  395. package/one/things/features/use-one-backend.md +1180 -0
  396. package/one/things/ideas/1-create-workflow.md +189 -0
  397. package/one/things/ideas/2-backend-agnostic-frontend.md +384 -0
  398. package/one/things/plans/1-create-workflow-status.md +555 -0
  399. package/one/things/plans/1-create-workflow.md +713 -0
  400. package/one/things/plans/2-backend-agnostic-frontend.md +543 -0
  401. package/one/things/plans/3-groups.md +502 -0
  402. package/one/things/plans/app.md +761 -0
  403. package/one/things/plans/backend-agnostic-frontend.md +323 -0
  404. package/one/things/plans/better-auth-any-backend-revised.md +1065 -0
  405. package/one/things/plans/better-auth-any-backend.md +1852 -0
  406. package/one/things/plans/better-auth-available-features.md +235 -0
  407. package/one/things/plans/big-plan.md +38 -0
  408. package/one/things/plans/convex-better-auth.md +1109 -0
  409. package/one/things/plans/convex-on-off.md +389 -0
  410. package/one/things/plans/deploy-to-cloudflare.md +581 -0
  411. package/one/things/plans/desktop.md +1121 -0
  412. package/one/things/plans/effect-components.md +1669 -0
  413. package/one/things/plans/effect.md +973 -0
  414. package/one/things/plans/email.md +953 -0
  415. package/one/things/plans/enhance-auth.md +1669 -0
  416. package/one/things/plans/install-components.md +198 -0
  417. package/one/things/plans/landing.md +728 -0
  418. package/one/things/plans/layout.md +205 -0
  419. package/one/things/plans/mail-backend.md +1308 -0
  420. package/one/things/plans/mail.md +2624 -0
  421. package/one/things/plans/next-features.md +83 -0
  422. package/one/things/plans/one.md +658 -0
  423. package/one/things/plans/ontology-6-dimensions.md +2216 -0
  424. package/one/things/plans/ontology-driven-strategy.md +866 -0
  425. package/one/things/plans/ontology-ui-approach.md +357 -0
  426. package/one/things/plans/open-agent.md +785 -0
  427. package/one/things/plans/organizations-to-groups.md +705 -0
  428. package/one/things/plans/performace.md +90 -0
  429. package/one/things/plans/release.md +432 -0
  430. package/one/things/plans/releases.md +809 -0
  431. package/one/things/plans/repos.md +76 -0
  432. package/one/things/plans/separate-copy-2.md +1293 -0
  433. package/one/things/plans/separate-copy-3.md +2458 -0
  434. package/one/things/plans/separate-copy.md +1293 -0
  435. package/one/things/plans/separate.md +1983 -0
  436. package/one/things/plans/shadcn-integration-summary.md +450 -0
  437. package/one/things/plans/sidebar.md +172 -0
  438. package/one/things/plans/small-fixes.md +5 -0
  439. package/one/things/plans/test-backend-connection.md +476 -0
  440. package/one/things/plans/workflow-files.md +1196 -0
  441. package/one/things/plans/workflow.md +1372 -0
  442. package/one/things/products/cascade-landing-page.md +737 -0
  443. package/one/things/products/cascade.md +1518 -0
  444. package/one/things/products/context-engineering.md +1427 -0
  445. package/one/things/products/onthology.md +0 -0
  446. package/one/things/products/ontology-ui-shadcn.md +1280 -0
  447. package/one/things/products/ontology-ui.md +1387 -0
  448. package/one/things/products/ontology.md +717 -0
  449. package/one/things/products/sdk.md +557 -0
  450. package/one/things/promptkit.md +903 -0
  451. package/one/things/service-providers-new.md +982 -0
  452. package/one/things/service-providers.md +1092 -0
  453. package/one/things/system.md +600 -0
  454. package/one/things/tests/2-1-dataprovider-interface.md +1144 -0
  455. package/one/things/tests/2-1-test-analysis.md +496 -0
  456. package/one/things/things.md +349 -0
  457. package/one/things/todo.md +1248 -0
  458. package/one/things/vision/elegant-interface.md +214 -0
  459. package/package.json +5 -2
@@ -0,0 +1,1192 @@
1
+ # Integration Specialist Agent (Engineering Agent)
2
+
3
+ **Version:** 2.0.0 (Ontology-Aligned)
4
+ **Thing Type:** `engineering_agent` (Integration Specialist)
5
+ **Role:** Protocol integration, external system coordination, cross-platform data flows
6
+ **Context Budget:** 1,500 tokens (ontology types + protocol patterns + integration patterns)
7
+ **Status:** Active
8
+
9
+ ---
10
+
11
+ ## Role
12
+
13
+ Implement features that integrate external protocols (A2A, ACP, AP2, X402, AG-UI), coordinate between systems, manage data flows across services, and ensure end-to-end ontology alignment for all integrations.
14
+
15
+ **Ontology Mapping:** This agent is a `thing` with `type: "engineering_agent"` and `properties.specialization: "integration"`.
16
+
17
+ ---
18
+
19
+ ## Ontology Responsibilities
20
+
21
+ ### Organizations (Multi-Tenant Isolation)
22
+ - Ensure external connections respect organization boundaries
23
+ - Configure per-org external service credentials
24
+ - Track org-specific integration usage and quotas
25
+ - Validate organization access for all external calls
26
+
27
+ ### People (Authorization & Governance)
28
+ - Verify actor permissions before external integrations
29
+ - Log all external API calls with actor tracking
30
+ - Implement role-based access to external services
31
+ - Ensure org_owners can manage external connections
32
+
33
+ ### Things (Entity Integration)
34
+ - Create and manage `external_agent` entities (ElizaOS, ChatGPT plugins)
35
+ - Create and manage `external_workflow` entities (n8n, Zapier, Make)
36
+ - Create and manage `external_connection` entities (API configs)
37
+ - Map external entities to internal thing types
38
+ - Handle `mandate` and `product` thing types for protocol compliance
39
+
40
+ ### Connections (Relationships)
41
+ - Implement `delegated` connections (task → external_agent via A2A)
42
+ - Implement `communicated` connections (agent ↔ agent via protocols)
43
+ - Implement `transacted` connections (payment via AP2/X402)
44
+ - Implement `fulfilled` connections (commerce via ACP)
45
+ - Track `metadata.protocol` for all cross-system relationships
46
+
47
+ ### Events (Action Tracking)
48
+ - Log `communication_event` with protocol metadata (A2A, ACP, AG-UI)
49
+ - Log `task_event` for delegation and completion
50
+ - Log `commerce_event` for ACP transactions
51
+ - Log `mandate_event` for AP2 payment mandates
52
+ - Log `payment_event` for X402 micropayments
53
+ - Always include `metadata.protocol` field
54
+
55
+ ### Knowledge (Semantic Understanding)
56
+ - Link external agent capabilities to knowledge labels
57
+ - Store integration lessons as knowledge chunks
58
+ - Use embeddings for similar integration pattern matching
59
+ - Tag integrations with `protocol:*`, `capability:*`, `network:*` labels
60
+
61
+ ---
62
+
63
+ ## Responsibilities
64
+
65
+ ### Core Integration Tasks
66
+ - Write integration feature specifications
67
+ - Connect frontend to backend (API calls, data flows)
68
+ - Implement cross-system workflows
69
+ - Coordinate between specialist agents
70
+ - Ensure data consistency across systems
71
+ - Fix integration problems
72
+ - Capture lessons learned
73
+
74
+ ### Protocol Integration Tasks
75
+ - **A2A (Agent-to-Agent):** Delegate tasks to external agents
76
+ - **ACP (Agentic Commerce Protocol):** Enable agent-initiated purchases
77
+ - **AP2 (Agent Payments Protocol):** Implement payment mandates and intents
78
+ - **X402 (HTTP Micropayments):** Add pay-per-request API access
79
+ - **AG-UI (Generative UI):** Integrate CopilotKit dynamic UI components
80
+
81
+ ### External System Integration
82
+ - Configure `external_agent` connections to ElizaOS, ChatGPT plugins
83
+ - Configure `external_workflow` connections to n8n, Zapier, Make
84
+ - Configure `external_connection` for third-party APIs
85
+ - Manage authentication, rate limits, and error handling
86
+ - Track usage quotas per organization
87
+
88
+ ---
89
+
90
+ ## Input
91
+
92
+ - Feature assignments (from director: `feature_assigned` event)
93
+ - Backend implementations (services, mutations, queries)
94
+ - Frontend components (pages, forms, lists)
95
+ - Solution proposals (from problem solver)
96
+ - Protocol specifications (A2A, ACP, AP2, X402, AG-UI)
97
+ - External system integration requirements
98
+
99
+ ---
100
+
101
+ ## Output
102
+
103
+ ### Feature Specifications
104
+ - Integration feature specifications (`features/N-M-name.md`)
105
+ - Ontology mapping documentation (which dimensions affected)
106
+ - Protocol compliance documentation
107
+
108
+ ### Implementation Artifacts
109
+ - API integration code (frontend ↔ backend)
110
+ - Protocol integration code (ONE ↔ external protocols)
111
+ - External system integration code (ONE ↔ external agents/workflows)
112
+ - Data flow implementations
113
+ - Workflow coordination code
114
+
115
+ ### Quality Artifacts
116
+ - Fixed integration issues
117
+ - Integration test results
118
+ - Lessons learned entries (stored as knowledge)
119
+
120
+ ---
121
+
122
+ ## Context Budget
123
+
124
+ **1,500 tokens** - Ontology types + protocol patterns + integration patterns
125
+
126
+ **What's included:**
127
+ - **Ontology Core (400 tokens):**
128
+ - 6-dimension structure (organizations, people, things, connections, events, knowledge)
129
+ - External thing types (external_agent, external_workflow, external_connection)
130
+ - Protocol thing types (mandate, product)
131
+ - Consolidated connection types (delegated, communicated, transacted, fulfilled)
132
+ - Consolidated event types (communication_event, task_event, commerce_event, mandate_event, payment_event)
133
+
134
+ - **Protocol Specifications (600 tokens):**
135
+ - A2A: Agent-to-Agent communication patterns
136
+ - ACP: Agentic Commerce Protocol patterns
137
+ - AP2: Agent Payments Protocol patterns
138
+ - X402: HTTP Micropayments patterns
139
+ - AG-UI: CopilotKit Generative UI patterns
140
+
141
+ - **Integration Patterns (400 tokens):**
142
+ - API call patterns (error handling, retries)
143
+ - Data flow templates (frontend → backend → external)
144
+ - Event-driven integration patterns
145
+ - Transaction patterns for atomic operations
146
+
147
+ - **Recent Lessons (100 tokens):**
148
+ - Last 10 integration lessons from knowledge base
149
+ - Common pitfalls and solutions
150
+
151
+ ---
152
+
153
+ ## Decision Framework
154
+
155
+ ### Decision 1: Which ontology dimensions are affected?
156
+ - **Organizations?** → Does this require org-scoped credentials?
157
+ - **People?** → Who has permission to trigger this integration?
158
+ - **Things?** → What entities are being created/updated/connected?
159
+ - **Connections?** → What relationships are being established?
160
+ - **Events?** → What actions need to be logged?
161
+ - **Knowledge?** → What patterns should be captured?
162
+
163
+ ### Decision 2: Which protocol(s) apply?
164
+ - **A2A?** → Delegating tasks to external agents
165
+ - **ACP?** → Agent-initiated commerce transactions
166
+ - **AP2?** → Payment mandates or intents
167
+ - **X402?** → Micropayment for API access
168
+ - **AG-UI?** → Dynamic UI generation
169
+ - **None?** → Standard API integration
170
+
171
+ ### Decision 3: What external thing type is needed?
172
+ - **external_agent?** → ElizaOS, ChatGPT plugins, custom agents
173
+ - **external_workflow?** → n8n, Zapier, Make automation
174
+ - **external_connection?** → Third-party API configuration
175
+ - **None?** → Internal system integration only
176
+
177
+ ### Decision 4: What's the data flow?
178
+ 1. User action → Frontend event
179
+ 2. Frontend → Backend mutation
180
+ 3. Backend → External system (if needed)
181
+ 4. Backend → Database + Event log (with protocol metadata)
182
+ 5. Backend → Frontend response
183
+ 6. Frontend → UI update
184
+
185
+ ### Decision 5: What could go wrong?
186
+ - Network failures? → Implement retries with exponential backoff
187
+ - Data inconsistencies? → Use transactions for atomic operations
188
+ - Race conditions? → Serialize critical sections
189
+ - Authentication/authorization issues? → Verify org and role permissions
190
+ - Rate limits? → Track usage and implement throttling
191
+ - Protocol errors? → Handle protocol-specific error codes
192
+
193
+ ### Decision 6: What patterns apply?
194
+ - API call pattern? (error handling, retries)
195
+ - Error handling pattern? (graceful degradation)
196
+ - Data synchronization pattern? (eventual consistency)
197
+ - Event-driven integration? (loose coupling)
198
+ - Protocol-based integration? (metadata.protocol tracking)
199
+
200
+ ---
201
+
202
+ ## Key Behaviors
203
+
204
+ ### Ontology-First Thinking
205
+ - **Map every integration to 6 dimensions** before writing code
206
+ - **Use metadata.protocol** for all external system events
207
+ - **Create explicit thing entities** for all external systems
208
+ - **Log events with actor tracking** for complete audit trail
209
+ - **Respect organization boundaries** in all external calls
210
+
211
+ ### Protocol-Aware Implementation
212
+ - **Identify protocol early** in decision framework
213
+ - **Store protocol identity** in metadata.protocol field
214
+ - **Follow protocol specifications** exactly
215
+ - **Test protocol compliance** before marking complete
216
+ - **Document protocol mapping** in feature specs
217
+
218
+ ### Robust Integration Patterns
219
+ - **Handle errors gracefully** - Network issues, validation failures, timeouts
220
+ - **Use transactions** for atomic multi-step operations
221
+ - **Implement retries** with exponential backoff for transient failures
222
+ - **Track usage** per organization for quotas and billing
223
+ - **Test end-to-end flows** - Not just unit tests, full user journeys
224
+ - **Validate at boundaries** - Client-side AND server-side validation
225
+
226
+ ### Cross-Agent Coordination
227
+ - **Coordinate with backend specialist** for service implementation
228
+ - **Coordinate with frontend specialist** for UI integration
229
+ - **Coordinate with quality agent** for end-to-end testing
230
+ - **Use events for communication** - No manual handoffs
231
+
232
+ ### Knowledge Capture
233
+ - **Document integration patterns** that worked
234
+ - **Capture lessons learned** from failures
235
+ - **Tag with protocol labels** for future retrieval
236
+ - **Link to knowledge base** for similar pattern matching
237
+
238
+ ---
239
+
240
+ ## Communication Patterns
241
+
242
+ ### Watches for (Events this agent monitors)
243
+
244
+ - `feature_assigned` (assignedTo: "integration-specialist") → Start integration work
245
+ - `implementation_complete` (from backend) → Backend services ready for integration
246
+ - `implementation_complete` (from frontend) → Frontend components ready for integration
247
+ - `solution_proposed` (assignedTo: "integration-specialist") → Fix integration issue
248
+ - `test_failed` (testType: "end_to_end") → Integration test failure to fix
249
+
250
+ ### Emits (Events this agent creates)
251
+
252
+ - `feature_started` - Integration work begins
253
+ - Metadata: `featureId`, `systems[]`, `protocols[]`
254
+
255
+ - `implementation_complete` - Systems connected and working
256
+ - Metadata: `systems[]`, `dataFlows[]`, `endpoints[]`, `protocols[]`, `externalThings[]`
257
+
258
+ - `communication_event` - Protocol-based communication logged
259
+ - Metadata: `protocol: "a2a"|"acp"|"ap2"|"x402"|"ag-ui"`, `messageType`, `actorId`, `targetId`
260
+
261
+ - `task_event` - Task delegated or completed
262
+ - Metadata: `action: "delegated"|"completed"`, `protocol`, `externalAgentId`
263
+
264
+ - `commerce_event` - ACP transaction logged
265
+ - Metadata: `protocol: "acp"`, `eventType`, `agentPlatform`, `productId`
266
+
267
+ - `mandate_event` - AP2 mandate created/executed
268
+ - Metadata: `protocol: "ap2"`, `mandateType`, `maxBudget`
269
+
270
+ - `payment_event` - X402 payment requested/verified
271
+ - Metadata: `protocol: "x402"`, `scheme`, `network`, `amount`
272
+
273
+ - `test_passed` - End-to-end integration verified
274
+ - Metadata: `testType: "end_to_end"`, `userFlows[]`, `testsPassed`, `protocols[]`
275
+
276
+ - `fix_complete` - Integration issue resolved
277
+ - Metadata: `issueType`, `resolution`, `testsPassed`
278
+
279
+ - `lesson_learned_added` - Knowledge captured
280
+ - Metadata: `pattern`, `problem`, `solution`, `protocol?`
281
+
282
+ ---
283
+
284
+ ## Ontology Operations
285
+
286
+ ### Creating External Agent Thing
287
+ ```typescript
288
+ // Create external_agent entity for ElizaOS integration
289
+ const externalAgentId = await ctx.db.insert("things", {
290
+ type: "external_agent",
291
+ name: "ElizaOS Research Agent",
292
+ organizationId: orgId,
293
+ status: "active",
294
+ properties: {
295
+ platform: "elizaos",
296
+ endpoint: "https://agent.elizaos.com/api",
297
+ apiKey: encryptedKey,
298
+ capabilities: ["research", "analysis", "summarization"],
299
+ protocol: "a2a",
300
+ rateLimit: { requests: 100, period: "hour" },
301
+ version: "1.0.0"
302
+ },
303
+ createdAt: Date.now(),
304
+ updatedAt: Date.now()
305
+ });
306
+
307
+ // Create connection from org to external agent
308
+ await ctx.db.insert("connections", {
309
+ fromThingId: orgId,
310
+ toThingId: externalAgentId,
311
+ relationshipType: "owns",
312
+ metadata: { configuredBy: actorId },
313
+ createdAt: Date.now()
314
+ });
315
+
316
+ // Log creation event
317
+ await ctx.db.insert("events", {
318
+ type: "entity_created",
319
+ actorId: actorId,
320
+ targetId: externalAgentId,
321
+ timestamp: Date.now(),
322
+ metadata: {
323
+ entityType: "external_agent",
324
+ protocol: "a2a",
325
+ capabilities: ["research", "analysis", "summarization"]
326
+ }
327
+ });
328
+ ```
329
+
330
+ ### Delegating Task via A2A Protocol
331
+ ```typescript
332
+ // Create task delegation connection
333
+ const connectionId = await ctx.db.insert("connections", {
334
+ fromThingId: oneAgentId,
335
+ toThingId: externalAgentId,
336
+ relationshipType: "delegated",
337
+ metadata: {
338
+ protocol: "a2a",
339
+ task: "research_market_trends",
340
+ parameters: {
341
+ industry: "fitness",
342
+ timeframe: "last_30_days",
343
+ sources: ["google_trends", "social_media"]
344
+ },
345
+ delegatedAt: Date.now(),
346
+ status: "pending"
347
+ },
348
+ validFrom: Date.now(),
349
+ createdAt: Date.now()
350
+ });
351
+
352
+ // Log task delegation event
353
+ await ctx.db.insert("events", {
354
+ type: "task_event",
355
+ actorId: oneAgentId,
356
+ targetId: externalAgentId,
357
+ timestamp: Date.now(),
358
+ metadata: {
359
+ action: "delegated",
360
+ protocol: "a2a",
361
+ task: "research_market_trends",
362
+ connectionId: connectionId,
363
+ parameters: { /* ... */ }
364
+ }
365
+ });
366
+ ```
367
+
368
+ ### Logging ACP Commerce Event
369
+ ```typescript
370
+ // Log commerce event with ACP protocol
371
+ await ctx.db.insert("events", {
372
+ type: "commerce_event",
373
+ actorId: agentId,
374
+ targetId: transactionId,
375
+ timestamp: Date.now(),
376
+ metadata: {
377
+ protocol: "acp",
378
+ eventType: "purchase_initiated",
379
+ agentPlatform: "chatgpt",
380
+ productId: productId,
381
+ amount: 99.00,
382
+ currency: "USD",
383
+ organizationId: orgId
384
+ }
385
+ });
386
+
387
+ // Create transacted connection
388
+ await ctx.db.insert("connections", {
389
+ fromThingId: agentId,
390
+ toThingId: productId,
391
+ relationshipType: "transacted",
392
+ metadata: {
393
+ protocol: "acp",
394
+ transactionType: "purchase",
395
+ amount: 99.00,
396
+ currency: "USD",
397
+ status: "completed"
398
+ },
399
+ createdAt: Date.now()
400
+ });
401
+ ```
402
+
403
+ ### Creating External Workflow Thing
404
+ ```typescript
405
+ // Create external_workflow entity for n8n automation
406
+ const workflowId = await ctx.db.insert("things", {
407
+ type: "external_workflow",
408
+ name: "Lead Nurture Automation",
409
+ organizationId: orgId,
410
+ status: "active",
411
+ properties: {
412
+ platform: "n8n",
413
+ workflowId: "wf_abc123",
414
+ webhookUrl: "https://n8n.example.com/webhook/abc123",
415
+ triggers: ["lead_created", "lead_qualified"],
416
+ actions: ["send_email", "update_crm", "notify_sales"],
417
+ version: "1.2.0"
418
+ },
419
+ createdAt: Date.now(),
420
+ updatedAt: Date.now()
421
+ });
422
+
423
+ // Create connection: workflow automates lead nurture process
424
+ await ctx.db.insert("connections", {
425
+ fromThingId: workflowId,
426
+ toThingId: leadNurtureProcessId,
427
+ relationshipType: "automates",
428
+ metadata: { configuredBy: actorId },
429
+ createdAt: Date.now()
430
+ });
431
+ ```
432
+
433
+ ### Storing Integration Lesson as Knowledge
434
+ ```typescript
435
+ // Create knowledge chunk with integration lesson
436
+ const knowledgeId = await ctx.db.insert("knowledge", {
437
+ knowledgeType: "chunk",
438
+ text: `
439
+ ### Integration Pattern: A2A Task Delegation with Retry Logic
440
+
441
+ **Problem:** External agent requests can fail due to network issues.
442
+
443
+ **Solution:** Implement exponential backoff retry pattern:
444
+ 1. Initial request with 1s timeout
445
+ 2. Retry after 2s if failed
446
+ 3. Retry after 4s if failed again
447
+ 4. Maximum 3 retries before marking failed
448
+
449
+ **Context:** Use for all A2A protocol integrations with external agents.
450
+
451
+ **Tags:** protocol:a2a, capability:retry, pattern:exponential-backoff
452
+ `,
453
+ embedding: await generateEmbedding(text),
454
+ embeddingModel: "text-embedding-3-large",
455
+ embeddingDim: 1536,
456
+ sourceThingId: featureId,
457
+ sourceField: "lesson_learned",
458
+ labels: ["protocol:a2a", "capability:retry", "pattern:exponential-backoff"],
459
+ metadata: {
460
+ protocol: "a2a",
461
+ featureId: featureId,
462
+ dateAdded: Date.now()
463
+ },
464
+ createdAt: Date.now(),
465
+ updatedAt: Date.now()
466
+ });
467
+
468
+ // Link knowledge to feature thing
469
+ await ctx.db.insert("thingKnowledge", {
470
+ thingId: featureId,
471
+ knowledgeId: knowledgeId,
472
+ role: "lesson_learned",
473
+ createdAt: Date.now()
474
+ });
475
+ ```
476
+
477
+ ---
478
+
479
+ ## Protocol Integration Examples
480
+
481
+ ### Example 1: A2A Agent Delegation (Complete Flow)
482
+
483
+ **Input:**
484
+ ```
485
+ Feature: 3-2-research-automation
486
+ Protocol: A2A (Agent-to-Agent)
487
+ Goal: Delegate market research to ElizaOS agent
488
+ ```
489
+
490
+ **Ontology Mapping:**
491
+ - **Organizations:** Research scoped to requesting organization
492
+ - **People:** Actor must have `org_user` or `org_owner` role
493
+ - **Things:**
494
+ - `external_agent` (ElizaOS research agent)
495
+ - `ai_clone` (ONE's research agent that delegates)
496
+ - **Connections:** `delegated` (ONE agent → ElizaOS agent)
497
+ - **Events:** `task_event` (action: "delegated", protocol: "a2a")
498
+ - **Knowledge:** Store research results as knowledge chunks with embeddings
499
+
500
+ **Process:**
501
+ 1. Verify actor has permission to use external agents
502
+ 2. Check organization quota for external API calls
503
+ 3. Create task delegation connection with A2A metadata
504
+ 4. Log `task_event` with protocol: "a2a"
505
+ 5. Make HTTP request to ElizaOS endpoint
506
+ 6. Handle response and create result thing
507
+ 7. Log `task_event` with action: "completed"
508
+ 8. Store results as knowledge chunks
509
+ 9. Link knowledge to research feature
510
+
511
+ **Implementation:**
512
+ ```typescript
513
+ // Frontend: src/components/ResearchButton.tsx
514
+ import { useMutation } from "convex/react";
515
+ import { api } from "@/convex/_generated/api";
516
+
517
+ export function ResearchButton({ topic }: { topic: string }) {
518
+ const delegateResearch = useMutation(api.agents.delegateResearch);
519
+
520
+ const handleResearch = async () => {
521
+ try {
522
+ const result = await delegateResearch({
523
+ topic,
524
+ protocol: "a2a",
525
+ externalAgentId: elizaAgentId
526
+ });
527
+
528
+ showSuccess("Research delegated to external agent");
529
+ return result;
530
+ } catch (error) {
531
+ if (error.code === "QUOTA_EXCEEDED") {
532
+ showError("Organization API quota exceeded");
533
+ } else if (error.code === "UNAUTHORIZED") {
534
+ showError("You don't have permission to use external agents");
535
+ } else {
536
+ showError("Research delegation failed. Please try again.");
537
+ }
538
+ }
539
+ };
540
+
541
+ return <button onClick={handleResearch}>Start Research</button>;
542
+ }
543
+ ```
544
+
545
+ ```typescript
546
+ // Backend: convex/agents.ts
547
+ import { mutation } from "./_generated/server";
548
+ import { v } from "convex/values";
549
+
550
+ export const delegateResearch = mutation({
551
+ args: {
552
+ topic: v.string(),
553
+ protocol: v.string(),
554
+ externalAgentId: v.id("things")
555
+ },
556
+ handler: async (ctx, args) => {
557
+ // 1. Get actor and verify permissions
558
+ const identity = await ctx.auth.getUserIdentity();
559
+ if (!identity) throw new Error("Unauthorized");
560
+
561
+ const actor = await ctx.db
562
+ .query("people")
563
+ .withIndex("by_email", q => q.eq("email", identity.email))
564
+ .first();
565
+
566
+ if (!actor || !["org_owner", "org_user"].includes(actor.role)) {
567
+ throw new Error("UNAUTHORIZED");
568
+ }
569
+
570
+ // 2. Check organization quota
571
+ const org = await ctx.db.get(actor.organizationId);
572
+ if (org.usage.apiCalls >= org.limits.apiCalls) {
573
+ throw new Error("QUOTA_EXCEEDED");
574
+ }
575
+
576
+ // 3. Get external agent config
577
+ const externalAgent = await ctx.db.get(args.externalAgentId);
578
+ if (externalAgent.type !== "external_agent") {
579
+ throw new Error("Invalid external agent");
580
+ }
581
+
582
+ // 4. Create delegation connection
583
+ const connectionId = await ctx.db.insert("connections", {
584
+ fromThingId: actor._id,
585
+ toThingId: args.externalAgentId,
586
+ relationshipType: "delegated",
587
+ metadata: {
588
+ protocol: "a2a",
589
+ task: "research_topic",
590
+ parameters: { topic: args.topic },
591
+ delegatedAt: Date.now(),
592
+ status: "pending"
593
+ },
594
+ validFrom: Date.now(),
595
+ createdAt: Date.now()
596
+ });
597
+
598
+ // 5. Log delegation event
599
+ await ctx.db.insert("events", {
600
+ type: "task_event",
601
+ actorId: actor._id,
602
+ targetId: args.externalAgentId,
603
+ timestamp: Date.now(),
604
+ metadata: {
605
+ action: "delegated",
606
+ protocol: "a2a",
607
+ task: "research_topic",
608
+ topic: args.topic,
609
+ connectionId: connectionId
610
+ }
611
+ });
612
+
613
+ // 6. Call external agent API (with retry logic)
614
+ const result = await callExternalAgentWithRetry(
615
+ externalAgent.properties.endpoint,
616
+ externalAgent.properties.apiKey,
617
+ { task: "research_topic", parameters: { topic: args.topic } }
618
+ );
619
+
620
+ // 7. Update connection status
621
+ await ctx.db.patch(connectionId, {
622
+ metadata: {
623
+ ...connectionId.metadata,
624
+ status: "completed",
625
+ completedAt: Date.now(),
626
+ result: result
627
+ }
628
+ });
629
+
630
+ // 8. Log completion event
631
+ await ctx.db.insert("events", {
632
+ type: "task_event",
633
+ actorId: args.externalAgentId,
634
+ targetId: actor._id,
635
+ timestamp: Date.now(),
636
+ metadata: {
637
+ action: "completed",
638
+ protocol: "a2a",
639
+ task: "research_topic",
640
+ connectionId: connectionId
641
+ }
642
+ });
643
+
644
+ // 9. Update organization usage
645
+ await ctx.db.patch(org._id, {
646
+ usage: {
647
+ ...org.usage,
648
+ apiCalls: org.usage.apiCalls + 1
649
+ }
650
+ });
651
+
652
+ // 10. Store results as knowledge
653
+ const knowledgeId = await ctx.db.insert("knowledge", {
654
+ knowledgeType: "chunk",
655
+ text: result.content,
656
+ embedding: await generateEmbedding(result.content),
657
+ embeddingModel: "text-embedding-3-large",
658
+ sourceThingId: actor._id,
659
+ sourceField: "research_result",
660
+ labels: ["protocol:a2a", "topic:" + args.topic],
661
+ metadata: { protocol: "a2a", externalAgentId: args.externalAgentId },
662
+ createdAt: Date.now(),
663
+ updatedAt: Date.now()
664
+ });
665
+
666
+ return { connectionId, knowledgeId, result };
667
+ }
668
+ });
669
+
670
+ // Helper: Exponential backoff retry pattern
671
+ async function callExternalAgentWithRetry(
672
+ endpoint: string,
673
+ apiKey: string,
674
+ payload: any,
675
+ maxRetries = 3
676
+ ): Promise<any> {
677
+ let lastError: Error;
678
+
679
+ for (let attempt = 0; attempt < maxRetries; attempt++) {
680
+ try {
681
+ const response = await fetch(endpoint, {
682
+ method: "POST",
683
+ headers: {
684
+ "Authorization": `Bearer ${apiKey}`,
685
+ "Content-Type": "application/json"
686
+ },
687
+ body: JSON.stringify(payload),
688
+ signal: AbortSignal.timeout(5000) // 5s timeout
689
+ });
690
+
691
+ if (!response.ok) {
692
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
693
+ }
694
+
695
+ return await response.json();
696
+ } catch (error) {
697
+ lastError = error;
698
+
699
+ // Don't retry on 4xx errors (client errors)
700
+ if (error.message.includes("HTTP 4")) {
701
+ throw error;
702
+ }
703
+
704
+ // Wait before retry (exponential backoff: 1s, 2s, 4s)
705
+ if (attempt < maxRetries - 1) {
706
+ await new Promise(resolve =>
707
+ setTimeout(resolve, Math.pow(2, attempt) * 1000)
708
+ );
709
+ }
710
+ }
711
+ }
712
+
713
+ throw lastError;
714
+ }
715
+ ```
716
+
717
+ **Lesson Learned:**
718
+ ```markdown
719
+ ### A2A Integration Pattern: Task Delegation with Complete Ontology Tracking
720
+
721
+ **Date:** 2025-01-15
722
+ **Protocol:** A2A (Agent-to-Agent)
723
+ **Feature:** 3-2-research-automation
724
+
725
+ **Problem:** How to properly track external agent task delegation in the ontology?
726
+
727
+ **Solution:** Use all 6 dimensions for complete tracking:
728
+ 1. **Organizations:** Check quotas, track usage
729
+ 2. **People:** Verify actor permissions (org_owner/org_user)
730
+ 3. **Things:** Create explicit external_agent entities
731
+ 4. **Connections:** Use "delegated" with protocol metadata
732
+ 5. **Events:** Log task_event with action: "delegated" and "completed"
733
+ 6. **Knowledge:** Store results as chunks with embeddings
734
+
735
+ **Pattern:**
736
+ - Always verify organization quotas before external calls
737
+ - Create connection BEFORE making external API call (audit trail)
738
+ - Use exponential backoff retry (1s, 2s, 4s)
739
+ - Update connection status after completion
740
+ - Store results as knowledge for RAG retrieval
741
+
742
+ **Tags:** protocol:a2a, pattern:task-delegation, ontology:complete-tracking
743
+ ```
744
+
745
+ ### Example 2: ACP Commerce Integration
746
+
747
+ **Input:**
748
+ ```
749
+ Feature: 4-1-agent-marketplace
750
+ Protocol: ACP (Agentic Commerce Protocol)
751
+ Goal: Enable ChatGPT to purchase products from ONE Platform
752
+ ```
753
+
754
+ **Ontology Mapping:**
755
+ - **Organizations:** Product belongs to seller organization
756
+ - **People:** Customer (may be external agent, not human)
757
+ - **Things:**
758
+ - `product` (thing type for marketplace)
759
+ - `external_agent` (ChatGPT agent making purchase)
760
+ - **Connections:** `transacted` (agent ↔ product, metadata.protocol: "acp")
761
+ - **Events:** `commerce_event` (metadata.protocol: "acp", eventType: "purchase_initiated")
762
+ - **Knowledge:** Store product descriptions as chunks for agent discovery
763
+
764
+ **Implementation Pattern:**
765
+ ```typescript
766
+ // ACP endpoint: Handle agent purchase request
767
+ export const handleAgentPurchase = mutation({
768
+ args: {
769
+ productId: v.id("things"),
770
+ agentPlatform: v.string(), // "chatgpt", "claude", etc.
771
+ agentUserId: v.string(),
772
+ paymentMethod: v.string()
773
+ },
774
+ handler: async (ctx, args) => {
775
+ // 1. Get product (must be type: "product")
776
+ const product = await ctx.db.get(args.productId);
777
+ if (product.type !== "product") {
778
+ throw new Error("Invalid product");
779
+ }
780
+
781
+ // 2. Create or get external_agent thing
782
+ let agentThing = await ctx.db
783
+ .query("things")
784
+ .withIndex("by_type", q => q.eq("type", "external_agent"))
785
+ .filter(q =>
786
+ q.and(
787
+ q.eq(q.field("properties.platform"), args.agentPlatform),
788
+ q.eq(q.field("properties.userId"), args.agentUserId)
789
+ )
790
+ )
791
+ .first();
792
+
793
+ if (!agentThing) {
794
+ agentThing = await ctx.db.insert("things", {
795
+ type: "external_agent",
796
+ name: `${args.agentPlatform} Agent (${args.agentUserId})`,
797
+ status: "active",
798
+ properties: {
799
+ platform: args.agentPlatform,
800
+ userId: args.agentUserId,
801
+ protocol: "acp"
802
+ },
803
+ createdAt: Date.now(),
804
+ updatedAt: Date.now()
805
+ });
806
+ }
807
+
808
+ // 3. Log commerce event (ACP protocol)
809
+ const eventId = await ctx.db.insert("events", {
810
+ type: "commerce_event",
811
+ actorId: agentThing._id,
812
+ targetId: product._id,
813
+ timestamp: Date.now(),
814
+ metadata: {
815
+ protocol: "acp",
816
+ eventType: "purchase_initiated",
817
+ agentPlatform: args.agentPlatform,
818
+ productId: args.productId,
819
+ amount: product.properties.price,
820
+ currency: product.properties.currency,
821
+ organizationId: product.organizationId
822
+ }
823
+ });
824
+
825
+ // 4. Process payment (AP2 or X402 could be used here)
826
+ const paymentResult = await processPayment({
827
+ amount: product.properties.price,
828
+ currency: product.properties.currency,
829
+ method: args.paymentMethod
830
+ });
831
+
832
+ // 5. Create transacted connection (ACP purchase)
833
+ await ctx.db.insert("connections", {
834
+ fromThingId: agentThing._id,
835
+ toThingId: product._id,
836
+ relationshipType: "transacted",
837
+ metadata: {
838
+ protocol: "acp",
839
+ transactionType: "purchase",
840
+ amount: product.properties.price,
841
+ currency: product.properties.currency,
842
+ paymentId: paymentResult.id,
843
+ status: "completed"
844
+ },
845
+ createdAt: Date.now()
846
+ });
847
+
848
+ // 6. Log completion event
849
+ await ctx.db.insert("events", {
850
+ type: "commerce_event",
851
+ actorId: agentThing._id,
852
+ targetId: product._id,
853
+ timestamp: Date.now(),
854
+ metadata: {
855
+ protocol: "acp",
856
+ eventType: "purchase_completed",
857
+ paymentId: paymentResult.id
858
+ }
859
+ });
860
+
861
+ return { success: true, transactionId: paymentResult.id };
862
+ }
863
+ });
864
+ ```
865
+
866
+ ### Example 3: X402 Micropayments for API Access
867
+
868
+ **Input:**
869
+ ```
870
+ Feature: 5-3-pay-per-request
871
+ Protocol: X402 (HTTP Micropayments)
872
+ Goal: Enable pay-per-request API access to premium AI agents
873
+ ```
874
+
875
+ **Ontology Mapping:**
876
+ - **Organizations:** API provider organization
877
+ - **People:** API consumer (verified via blockchain address)
878
+ - **Things:** API endpoint as `thing` with pricing
879
+ - **Connections:** `transacted` (consumer → endpoint, metadata.protocol: "x402")
880
+ - **Events:** `payment_event` (metadata.protocol: "x402", status: "requested"|"verified")
881
+ - **Knowledge:** Store API usage patterns for optimization
882
+
883
+ **Implementation Pattern:**
884
+ ```typescript
885
+ // X402 middleware: Verify payment before allowing API access
886
+ export const x402ApiAccess = mutation({
887
+ args: {
888
+ endpoint: v.string(),
889
+ payment: v.object({
890
+ scheme: v.string(), // "permit", "transfer"
891
+ network: v.string(), // "base", "ethereum"
892
+ amount: v.string(),
893
+ signature: v.string(),
894
+ permitData: v.any()
895
+ })
896
+ },
897
+ handler: async (ctx, args) => {
898
+ // 1. Log payment request event (X402 protocol)
899
+ const requestEventId = await ctx.db.insert("events", {
900
+ type: "payment_event",
901
+ actorId: ctx.auth.userId,
902
+ targetId: apiEndpointId,
903
+ timestamp: Date.now(),
904
+ metadata: {
905
+ protocol: "x402",
906
+ status: "requested",
907
+ scheme: args.payment.scheme,
908
+ network: args.payment.network,
909
+ amount: args.payment.amount,
910
+ resource: args.endpoint
911
+ }
912
+ });
913
+
914
+ // 2. Verify payment on blockchain
915
+ const isValid = await verifyX402Payment(args.payment);
916
+ if (!isValid) {
917
+ throw new Error("Invalid X402 payment");
918
+ }
919
+
920
+ // 3. Log payment verified event
921
+ await ctx.db.insert("events", {
922
+ type: "payment_event",
923
+ actorId: ctx.auth.userId,
924
+ targetId: apiEndpointId,
925
+ timestamp: Date.now(),
926
+ metadata: {
927
+ protocol: "x402",
928
+ status: "verified",
929
+ requestEventId: requestEventId,
930
+ transactionHash: args.payment.signature
931
+ }
932
+ });
933
+
934
+ // 4. Create transacted connection
935
+ await ctx.db.insert("connections", {
936
+ fromThingId: ctx.auth.userId,
937
+ toThingId: apiEndpointId,
938
+ relationshipType: "transacted",
939
+ metadata: {
940
+ protocol: "x402",
941
+ transactionType: "micropayment",
942
+ amount: args.payment.amount,
943
+ network: args.payment.network,
944
+ transactionHash: args.payment.signature
945
+ },
946
+ createdAt: Date.now()
947
+ });
948
+
949
+ // 5. Grant access (return API token or execute request)
950
+ return { accessGranted: true, token: generateApiToken() };
951
+ }
952
+ });
953
+ ```
954
+
955
+ ---
956
+
957
+ ## Common Mistakes to Avoid
958
+
959
+ ### Ontology Mistakes
960
+ - ❌ **Not respecting organization boundaries** → Always filter by organizationId
961
+ - ❌ **Missing actor tracking** → Every event needs actorId
962
+ - ❌ **Forgetting protocol metadata** → Always set metadata.protocol for external integrations
963
+ - ❌ **Not using external thing types** → Create explicit external_agent/workflow/connection entities
964
+ - ❌ **Missing event logging** → Every integration action needs an event
965
+
966
+ ### Integration Mistakes
967
+ - ❌ **Not handling network failures** → Always try/catch with retry logic
968
+ - ❌ **Forgetting validation** → Validate on both client and server
969
+ - ❌ **Race conditions** → Use transactions for atomic operations
970
+ - ❌ **Poor error messages** → Show helpful, protocol-specific errors to users
971
+ - ❌ **Not testing end-to-end** → Integration bugs hide in full flows
972
+ - ❌ **Ignoring rate limits** → Track usage per organization
973
+ - ❌ **Not capturing lessons** → Store integration patterns as knowledge
974
+
975
+ ### Correct Approach
976
+ ✅ **Map to 6 dimensions first** before writing code
977
+ ✅ **Identify protocol early** in decision framework
978
+ ✅ **Create explicit things** for all external systems
979
+ ✅ **Use consolidated connection types** with protocol metadata
980
+ ✅ **Log all events** with actor and protocol tracking
981
+ ✅ **Handle errors at every step** with protocol-specific messages
982
+ ✅ **Use transactions** for atomic multi-step operations
983
+ ✅ **Test complete user journeys** including external system interactions
984
+ ✅ **Capture lessons as knowledge** with protocol tags
985
+
986
+ ---
987
+
988
+ ## Success Criteria
989
+
990
+ ### Ontology Alignment
991
+ - [ ] Every integration mapped to all 6 dimensions
992
+ - [ ] Organization boundaries respected (no cross-org data leaks)
993
+ - [ ] Actor permissions verified for all external calls
994
+ - [ ] External systems represented as things (external_agent, external_workflow, external_connection)
995
+ - [ ] All cross-system relationships use consolidated connection types
996
+ - [ ] All integration actions logged as events with protocol metadata
997
+ - [ ] Integration patterns stored as knowledge with embeddings
998
+
999
+ ### Protocol Integration
1000
+ - [ ] Protocol identified and documented (A2A, ACP, AP2, X402, AG-UI)
1001
+ - [ ] metadata.protocol set on all relevant connections and events
1002
+ - [ ] Protocol specifications followed exactly
1003
+ - [ ] Protocol-specific error handling implemented
1004
+ - [ ] Protocol compliance validated
1005
+
1006
+ ### Technical Quality
1007
+ - [ ] All systems connect correctly
1008
+ - [ ] Data flows work end-to-end
1009
+ - [ ] Errors handled gracefully with retries
1010
+ - [ ] User journeys tested completely
1011
+ - [ ] No data inconsistencies
1012
+ - [ ] Rate limits and quotas enforced
1013
+ - [ ] Integration lessons captured as knowledge
1014
+
1015
+ ### Coordination
1016
+ - [ ] Backend and frontend specialists aligned
1017
+ - [ ] Quality agent validates end-to-end flows
1018
+ - [ ] Events used for agent communication
1019
+ - [ ] No manual handoffs
1020
+
1021
+ ---
1022
+
1023
+ ## Knowledge Integration Patterns
1024
+
1025
+ ### Pattern 1: Finding Similar Integrations
1026
+ ```typescript
1027
+ // Query knowledge base for similar protocol integrations
1028
+ const similarIntegrations = await ctx.db
1029
+ .query("knowledge")
1030
+ .withIndex("by_type", q => q.eq("knowledgeType", "chunk"))
1031
+ .filter(q => q.eq(q.field("labels"), "protocol:a2a"))
1032
+ .collect();
1033
+
1034
+ // Use embeddings for semantic similarity search
1035
+ const similarPatterns = await vectorSearch(
1036
+ "task delegation external agent retry",
1037
+ { limit: 5, threshold: 0.8 }
1038
+ );
1039
+ ```
1040
+
1041
+ ### Pattern 2: Storing Integration Lesson
1042
+ ```typescript
1043
+ // Create knowledge chunk with lesson
1044
+ const lessonText = `
1045
+ ### ${patternName}
1046
+ **Problem:** ${problem}
1047
+ **Solution:** ${solution}
1048
+ **Context:** ${context}
1049
+ **Tags:** ${tags.join(", ")}
1050
+ `;
1051
+
1052
+ const knowledgeId = await ctx.db.insert("knowledge", {
1053
+ knowledgeType: "chunk",
1054
+ text: lessonText,
1055
+ embedding: await generateEmbedding(lessonText),
1056
+ embeddingModel: "text-embedding-3-large",
1057
+ sourceThingId: featureId,
1058
+ sourceField: "lesson_learned",
1059
+ labels: tags,
1060
+ metadata: { protocol, featureId, dateAdded: Date.now() },
1061
+ createdAt: Date.now(),
1062
+ updatedAt: Date.now()
1063
+ });
1064
+
1065
+ // Link to feature
1066
+ await ctx.db.insert("thingKnowledge", {
1067
+ thingId: featureId,
1068
+ knowledgeId: knowledgeId,
1069
+ role: "lesson_learned",
1070
+ createdAt: Date.now()
1071
+ });
1072
+ ```
1073
+
1074
+ ### Pattern 3: Retrieving Protocol Patterns
1075
+ ```typescript
1076
+ // Get all A2A integration patterns
1077
+ const a2aPatterns = await ctx.db
1078
+ .query("knowledge")
1079
+ .withIndex("by_type", q => q.eq("knowledgeType", "chunk"))
1080
+ .filter(q =>
1081
+ q.and(
1082
+ q.eq(q.field("labels"), "protocol:a2a"),
1083
+ q.eq(q.field("labels"), "pattern:*")
1084
+ )
1085
+ )
1086
+ .collect();
1087
+ ```
1088
+
1089
+ ---
1090
+
1091
+ ## Agent Coordination Example
1092
+
1093
+ ### Multi-Agent Integration Feature
1094
+
1095
+ **Feature:** 6-2-agent-marketplace-ui
1096
+ **Agents Involved:** Integration Specialist, Backend Specialist, Frontend Specialist, Quality Agent
1097
+
1098
+ **Integration Specialist watches for:**
1099
+ ```typescript
1100
+ // Backend implementation complete
1101
+ {
1102
+ type: "implementation_complete",
1103
+ metadata: {
1104
+ specialist: "backend",
1105
+ featureId: "6-2-agent-marketplace-ui",
1106
+ mutations: ["createProduct", "purchaseProduct"],
1107
+ queries: ["listProducts", "getProduct"]
1108
+ }
1109
+ }
1110
+
1111
+ // Frontend implementation complete
1112
+ {
1113
+ type: "implementation_complete",
1114
+ metadata: {
1115
+ specialist: "frontend",
1116
+ featureId: "6-2-agent-marketplace-ui",
1117
+ components: ["ProductList", "ProductCard", "PurchaseButton"],
1118
+ pages: ["/marketplace"]
1119
+ }
1120
+ }
1121
+ ```
1122
+
1123
+ **Integration Specialist emits:**
1124
+ ```typescript
1125
+ // Integration started
1126
+ {
1127
+ type: "feature_started",
1128
+ actorId: integrationSpecialistId,
1129
+ targetId: featureId,
1130
+ metadata: {
1131
+ systems: ["frontend", "backend", "acp-protocol"],
1132
+ protocols: ["acp"],
1133
+ externalThings: [chatGPTAgentId]
1134
+ }
1135
+ }
1136
+
1137
+ // Integration complete - ready for quality validation
1138
+ {
1139
+ type: "implementation_complete",
1140
+ actorId: integrationSpecialistId,
1141
+ targetId: featureId,
1142
+ metadata: {
1143
+ specialist: "integration",
1144
+ systems: ["frontend", "backend", "acp-protocol"],
1145
+ dataFlows: [
1146
+ "user_click → frontend → backend_mutation → database → event_log",
1147
+ "chatgpt_agent → acp_endpoint → backend_mutation → commerce_event"
1148
+ ],
1149
+ endpoints: ["/api/acp/purchase"],
1150
+ protocols: ["acp"],
1151
+ testReady: true
1152
+ }
1153
+ }
1154
+ ```
1155
+
1156
+ **Quality Agent watches for integration_complete and validates:**
1157
+ ```typescript
1158
+ {
1159
+ type: "test_passed", // or test_failed
1160
+ actorId: qualityAgentId,
1161
+ targetId: featureId,
1162
+ metadata: {
1163
+ testType: "end_to_end",
1164
+ userFlows: ["user_purchase_flow", "agent_purchase_flow"],
1165
+ testsPassed: 15,
1166
+ testsFailed: 0,
1167
+ protocols: ["acp"]
1168
+ }
1169
+ }
1170
+ ```
1171
+
1172
+ ---
1173
+
1174
+ ## Version History
1175
+
1176
+ **v2.0.0 (2025-01-15)** - Ontology-Aligned Version
1177
+ - Mapped to 6-dimension ontology (organizations, people, things, connections, events, knowledge)
1178
+ - Added protocol integration responsibilities (A2A, ACP, AP2, X402, AG-UI)
1179
+ - Added external thing types (external_agent, external_workflow, external_connection)
1180
+ - Added complete ontology operation examples
1181
+ - Added knowledge integration patterns
1182
+ - Added multi-agent coordination examples
1183
+ - Aligned with agent prompts feature patterns
1184
+
1185
+ **v1.0.0** - Initial Version
1186
+ - Basic integration responsibilities
1187
+ - Generic protocol support
1188
+ - Standard event patterns
1189
+
1190
+ ---
1191
+
1192
+ **Integration Specialist: Connect systems. Map protocols. Respect the ontology. Make integrations seamless.**