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,903 @@
1
+ # Strategic Planning Workflow
2
+
3
+ **Version:** 1.0.0
4
+ **Purpose:** Define how the director agent plans, executes, and tracks strategic initiatives using OKRs
5
+
6
+ ---
7
+
8
+ ## Overview
9
+
10
+ The strategic planning workflow enables the director agent to:
11
+ 1. Set organizational vision and goals
12
+ 2. Create OKRs (Objectives & Key Results)
13
+ 3. Break down OKRs into actionable tasks
14
+ 4. Allocate resources across initiatives
15
+ 5. Track progress and adjust strategy
16
+ 6. Optimize based on intelligence insights
17
+
18
+ **Key Principle:** Strategy flows from vision → OKRs → tasks → execution, with continuous feedback loops for optimization.
19
+
20
+ ---
21
+
22
+ ## Strategic Hierarchy
23
+
24
+ ```
25
+ ┌─────────────────────────────────────────┐
26
+ │ VISION & MISSION │
27
+ │ Long-term direction (3-5 years) │
28
+ └────────────────┬─────────────────────────┘
29
+ ↓
30
+ ┌─────────────────────────────────────────┐
31
+ │ STRATEGIC OBJECTIVES │
32
+ │ Quarterly goals (OKRs) │
33
+ └────────────────┬─────────────────────────┘
34
+ ↓
35
+ ┌─────────────────────────────────────────┐
36
+ │ KEY RESULTS │
37
+ │ Measurable outcomes │
38
+ └────────────────┬─────────────────────────┘
39
+ ↓
40
+ ┌─────────────────────────────────────────┐
41
+ │ INITIATIVES │
42
+ │ Projects and campaigns │
43
+ └────────────────┬─────────────────────────┘
44
+ ↓
45
+ ┌─────────────────────────────────────────┐
46
+ │ TASKS │
47
+ │ Individual agent work items │
48
+ └──────────────────────────────────────────┘
49
+ ```
50
+
51
+ ---
52
+
53
+ ## OKR Thing Structure
54
+
55
+ ### Thing Type: `okr` (Objective & Key Results)
56
+
57
+ ```typescript
58
+ {
59
+ _id: Id<"things">,
60
+ type: "okr",
61
+ name: string, // Objective title
62
+ properties: {
63
+ objective: string, // What we want to achieve
64
+ description: string, // Why this matters
65
+ period: {
66
+ quarter: "Q1" | "Q2" | "Q3" | "Q4",
67
+ year: number,
68
+ startDate: number,
69
+ endDate: number,
70
+ },
71
+ keyResults: [
72
+ {
73
+ id: string,
74
+ description: string, // What we'll measure
75
+ metric: string, // Metric name
76
+ target: number, // Target value
77
+ current: number, // Current value
78
+ unit: string, // Unit (%, $, users, etc.)
79
+ progress: number, // 0-100
80
+ status: "on_track" | "at_risk" | "off_track" | "completed",
81
+ owner: Id<"things">, // Which agent owns this KR
82
+ }
83
+ ],
84
+ priority: "low" | "medium" | "high" | "critical",
85
+ status: "draft" | "active" | "completed" | "abandoned",
86
+ confidence: number, // 0.0-1.0 confidence in achieving
87
+ riskLevel: "low" | "medium" | "high",
88
+ dependencies: Id<"things">[], // Other OKRs this depends on
89
+ blockers: {
90
+ blocked: boolean,
91
+ reason?: string,
92
+ blockedBy?: Id<"things">,
93
+ },
94
+ organizationId: Id<"things">,
95
+ createdBy: Id<"things">, // Director agent or user
96
+ },
97
+ status: "active" | "archived",
98
+ createdAt: number,
99
+ updatedAt: number,
100
+ }
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Director Agent Strategy Process
106
+
107
+ ### Phase 1: Vision Definition
108
+
109
+ **Input:** Organization goals, market context, available resources
110
+ **Output:** Strategic vision and quarterly objectives
111
+
112
+ ```typescript
113
+ // convex/services/agents/director.ts
114
+ export class DirectorService extends Effect.Service<DirectorService>()(
115
+ "DirectorService",
116
+ {
117
+ effect: Effect.gen(function* () {
118
+ const db = yield* ConvexDatabase;
119
+ const strategyAgent = yield* StrategyAgentService;
120
+
121
+ return {
122
+ createVision: (args: CreateVisionArgs) =>
123
+ Effect.gen(function* () {
124
+ // 1. Analyze organization context
125
+ const context = yield* analyzeOrganizationContext(args.organizationId);
126
+
127
+ // 2. Delegate vision creation to strategy agent
128
+ const visionTask = yield* delegateTask({
129
+ taskType: "strategy",
130
+ description: "Define organizational vision and mission",
131
+ parameters: {
132
+ organizationId: args.organizationId,
133
+ context,
134
+ timeframe: "3-5 years",
135
+ },
136
+ });
137
+
138
+ // 3. Wait for strategy agent to complete
139
+ const vision = yield* waitForTaskResult(visionTask.taskId);
140
+
141
+ // 4. Store vision as organization property
142
+ yield* Effect.tryPromise(() =>
143
+ db.patch(args.organizationId, {
144
+ properties: {
145
+ ...org.properties,
146
+ vision: vision.data.vision,
147
+ mission: vision.data.mission,
148
+ values: vision.data.values,
149
+ },
150
+ updatedAt: Date.now(),
151
+ })
152
+ );
153
+
154
+ return { success: true, vision };
155
+ }),
156
+ };
157
+ }),
158
+ dependencies: [ConvexDatabase.Default, StrategyAgentService.Default],
159
+ }
160
+ ) {}
161
+ ```
162
+
163
+ ### Phase 2: OKR Creation
164
+
165
+ **Input:** Vision, quarterly goals, available resources
166
+ **Output:** Structured OKRs with key results
167
+
168
+ ```typescript
169
+ createOKR: (args: CreateOKRArgs) =>
170
+ Effect.gen(function* () {
171
+ // 1. Delegate OKR creation to strategy agent
172
+ const okrTask = yield* delegateTask({
173
+ taskType: "strategy",
174
+ description: `Create ${args.period.quarter} ${args.period.year} OKRs`,
175
+ parameters: {
176
+ organizationId: args.organizationId,
177
+ vision: args.vision,
178
+ constraints: {
179
+ budget: args.budget,
180
+ team: args.teamSize,
181
+ timeframe: "90 days",
182
+ },
183
+ focus: args.focus, // e.g., ["growth", "revenue", "community"]
184
+ },
185
+ });
186
+
187
+ // 2. Wait for OKR design
188
+ const okrDesign = yield* waitForTaskResult(okrTask.taskId);
189
+
190
+ // 3. Create OKR entity
191
+ const okrId = yield* Effect.tryPromise(() =>
192
+ db.insert("things", {
193
+ type: "okr",
194
+ name: okrDesign.data.objective,
195
+ properties: {
196
+ objective: okrDesign.data.objective,
197
+ description: okrDesign.data.description,
198
+ period: args.period,
199
+ keyResults: okrDesign.data.keyResults.map((kr, i) => ({
200
+ id: `kr_${i}`,
201
+ description: kr.description,
202
+ metric: kr.metric,
203
+ target: kr.target,
204
+ current: 0,
205
+ unit: kr.unit,
206
+ progress: 0,
207
+ status: "on_track",
208
+ owner: selectOwnerAgent(kr.metric), // Assign to appropriate agent
209
+ })),
210
+ priority: args.priority || "high",
211
+ status: "active",
212
+ confidence: okrDesign.data.confidence,
213
+ riskLevel: okrDesign.data.riskLevel,
214
+ dependencies: [],
215
+ blockers: { blocked: false },
216
+ organizationId: args.organizationId,
217
+ createdBy: args.directorId,
218
+ },
219
+ status: "active",
220
+ createdAt: Date.now(),
221
+ updatedAt: Date.now(),
222
+ })
223
+ );
224
+
225
+ // 4. Log creation event
226
+ yield* Effect.tryPromise(() =>
227
+ db.insert("events", {
228
+ type: "entity_created",
229
+ actorId: args.directorId,
230
+ targetId: okrId,
231
+ timestamp: Date.now(),
232
+ metadata: {
233
+ entityType: "okr",
234
+ period: `${args.period.quarter} ${args.period.year}`,
235
+ objective: okrDesign.data.objective,
236
+ },
237
+ })
238
+ );
239
+
240
+ return { success: true, okrId };
241
+ }),
242
+ ```
243
+
244
+ ### Phase 3: Initiative Planning
245
+
246
+ **Input:** OKRs
247
+ **Output:** Initiatives (projects/campaigns) to achieve key results
248
+
249
+ ```typescript
250
+ planInitiatives: (args: PlanInitiativesArgs) =>
251
+ Effect.gen(function* () {
252
+ // 1. Get OKR
253
+ const okr = yield* Effect.tryPromise(() => db.get(args.okrId));
254
+
255
+ // 2. For each key result, delegate initiative planning
256
+ const initiatives = yield* Effect.all(
257
+ okr.properties.keyResults.map((kr) =>
258
+ Effect.gen(function* () {
259
+ // Delegate to owner agent
260
+ const initiativeTask = yield* delegateTask({
261
+ taskType: getAgentType(kr.owner),
262
+ description: `Plan initiative for: ${kr.description}`,
263
+ parameters: {
264
+ keyResult: kr,
265
+ budget: args.budget / okr.properties.keyResults.length,
266
+ duration: 90, // days
267
+ },
268
+ });
269
+
270
+ const initiative = yield* waitForTaskResult(initiativeTask.taskId);
271
+
272
+ // Create initiative entity
273
+ const initiativeId = yield* Effect.tryPromise(() =>
274
+ db.insert("things", {
275
+ type: "initiative",
276
+ name: initiative.data.name,
277
+ properties: {
278
+ description: initiative.data.description,
279
+ keyResultId: kr.id,
280
+ okrId: args.okrId,
281
+ owner: kr.owner,
282
+ tactics: initiative.data.tactics,
283
+ milestones: initiative.data.milestones,
284
+ budget: initiative.data.budget,
285
+ status: "planned",
286
+ organizationId: okr.properties.organizationId,
287
+ },
288
+ status: "active",
289
+ createdAt: Date.now(),
290
+ updatedAt: Date.now(),
291
+ })
292
+ );
293
+
294
+ // Link initiative to OKR
295
+ yield* Effect.tryPromise(() =>
296
+ db.insert("connections", {
297
+ fromThingId: initiativeId,
298
+ toThingId: args.okrId,
299
+ relationshipType: "part_of",
300
+ metadata: { keyResultId: kr.id },
301
+ createdAt: Date.now(),
302
+ })
303
+ );
304
+
305
+ return { initiativeId, keyResultId: kr.id };
306
+ })
307
+ )
308
+ );
309
+
310
+ return { success: true, initiatives };
311
+ }),
312
+ ```
313
+
314
+ ### Phase 4: Task Breakdown
315
+
316
+ **Input:** Initiatives
317
+ **Output:** Actionable tasks assigned to agents
318
+
319
+ ```typescript
320
+ breakdownInitiative: (args: BreakdownInitiativeArgs) =>
321
+ Effect.gen(function* () {
322
+ // 1. Get initiative
323
+ const initiative = yield* Effect.tryPromise(() => db.get(args.initiativeId));
324
+
325
+ // 2. Delegate task breakdown to owner agent
326
+ const breakdownTask = yield* delegateTask({
327
+ taskType: getAgentType(initiative.properties.owner),
328
+ description: `Break down initiative: ${initiative.name}`,
329
+ parameters: {
330
+ initiative: initiative.properties,
331
+ maxTasks: 20,
332
+ timeframe: 90,
333
+ },
334
+ });
335
+
336
+ const breakdown = yield* waitForTaskResult(breakdownTask.taskId);
337
+
338
+ // 3. Create task entities
339
+ const tasks = yield* Effect.all(
340
+ breakdown.data.tasks.map((taskSpec) =>
341
+ Effect.gen(function* () {
342
+ const taskId = yield* Effect.tryPromise(() =>
343
+ db.insert("things", {
344
+ type: "task",
345
+ name: taskSpec.title,
346
+ properties: {
347
+ taskType: taskSpec.taskType,
348
+ description: taskSpec.description,
349
+ priority: taskSpec.priority,
350
+ status: "pending",
351
+ deadline: taskSpec.deadline,
352
+ estimatedDuration: taskSpec.estimatedDuration,
353
+ parameters: taskSpec.parameters,
354
+ organizationId: initiative.properties.organizationId,
355
+ creatorId: args.directorId,
356
+ },
357
+ status: "active",
358
+ createdAt: Date.now(),
359
+ updatedAt: Date.now(),
360
+ })
361
+ );
362
+
363
+ // Link task to initiative
364
+ yield* Effect.tryPromise(() =>
365
+ db.insert("connections", {
366
+ fromThingId: taskId,
367
+ toThingId: args.initiativeId,
368
+ relationshipType: "part_of",
369
+ createdAt: Date.now(),
370
+ })
371
+ );
372
+
373
+ // Delegate task to agent
374
+ yield* delegateTask({
375
+ taskType: taskSpec.taskType,
376
+ taskId,
377
+ assignee: selectAgentForTask(taskSpec.taskType),
378
+ });
379
+
380
+ return taskId;
381
+ })
382
+ )
383
+ );
384
+
385
+ return { success: true, taskIds: tasks };
386
+ }),
387
+ ```
388
+
389
+ ---
390
+
391
+ ## Progress Tracking
392
+
393
+ ### Track Key Result Progress
394
+
395
+ ```typescript
396
+ updateKeyResultProgress: (args: UpdateKeyResultArgs) =>
397
+ Effect.gen(function* () {
398
+ // 1. Get OKR
399
+ const okr = yield* Effect.tryPromise(() => db.get(args.okrId));
400
+
401
+ // 2. Find key result
402
+ const kr = okr.properties.keyResults.find((k) => k.id === args.keyResultId);
403
+ if (!kr) return yield* Effect.fail(new KeyResultNotFoundError());
404
+
405
+ // 3. Update progress
406
+ const newProgress = (args.current / kr.target) * 100;
407
+ const updatedKR = {
408
+ ...kr,
409
+ current: args.current,
410
+ progress: Math.min(newProgress, 100),
411
+ status: calculateStatus(newProgress, args.daysRemaining),
412
+ };
413
+
414
+ // 4. Update OKR
415
+ const updatedKeyResults = okr.properties.keyResults.map((k) =>
416
+ k.id === args.keyResultId ? updatedKR : k
417
+ );
418
+
419
+ yield* Effect.tryPromise(() =>
420
+ db.patch(args.okrId, {
421
+ properties: {
422
+ ...okr.properties,
423
+ keyResults: updatedKeyResults,
424
+ },
425
+ updatedAt: Date.now(),
426
+ })
427
+ );
428
+
429
+ // 5. Log progress event
430
+ yield* Effect.tryPromise(() =>
431
+ db.insert("events", {
432
+ type: "entity_updated",
433
+ actorId: args.actorId,
434
+ targetId: args.okrId,
435
+ timestamp: Date.now(),
436
+ metadata: {
437
+ entityType: "okr",
438
+ keyResultId: args.keyResultId,
439
+ oldValue: kr.current,
440
+ newValue: args.current,
441
+ progress: newProgress,
442
+ status: updatedKR.status,
443
+ },
444
+ })
445
+ );
446
+
447
+ // 6. If status changed to "at_risk" or "off_track", alert director
448
+ if (
449
+ updatedKR.status !== kr.status &&
450
+ (updatedKR.status === "at_risk" || updatedKR.status === "off_track")
451
+ ) {
452
+ yield* alertDirector({
453
+ okrId: args.okrId,
454
+ keyResultId: args.keyResultId,
455
+ status: updatedKR.status,
456
+ message: `Key result "${kr.description}" is now ${updatedKR.status}`,
457
+ });
458
+ }
459
+
460
+ return { success: true, updatedKR };
461
+ }),
462
+
463
+ // Helper: Calculate KR status based on progress and time
464
+ function calculateStatus(progress: number, daysRemaining: number): string {
465
+ const expectedProgress = ((90 - daysRemaining) / 90) * 100;
466
+
467
+ if (progress >= 100) return "completed";
468
+ if (progress >= expectedProgress - 10) return "on_track";
469
+ if (progress >= expectedProgress - 25) return "at_risk";
470
+ return "off_track";
471
+ }
472
+ ```
473
+
474
+ ### Weekly OKR Review
475
+
476
+ ```typescript
477
+ weeklyOKRReview: (args: WeeklyReviewArgs) =>
478
+ Effect.gen(function* () {
479
+ // 1. Get all active OKRs for organization
480
+ const okrs = yield* Effect.tryPromise(() =>
481
+ db
482
+ .query("things")
483
+ .withIndex("by_type", (q) => q.eq("type", "okr"))
484
+ .filter((q) =>
485
+ q
486
+ .eq(q.field("properties.organizationId"), args.organizationId)
487
+ .eq(q.field("properties.status"), "active")
488
+ )
489
+ .collect()
490
+ );
491
+
492
+ // 2. Delegate analysis to intelligence agent
493
+ const analysisTask = yield* delegateTask({
494
+ taskType: "intelligence",
495
+ description: "Analyze weekly OKR progress",
496
+ parameters: {
497
+ okrs: okrs.map((okr) => ({
498
+ id: okr._id,
499
+ objective: okr.properties.objective,
500
+ keyResults: okr.properties.keyResults,
501
+ })),
502
+ period: "7 days",
503
+ },
504
+ });
505
+
506
+ const analysis = yield* waitForTaskResult(analysisTask.taskId);
507
+
508
+ // 3. Generate insights
509
+ const insights = analysis.data.insights; // Array of insights
510
+
511
+ // 4. If critical issues, delegate strategy adjustment
512
+ const criticalIssues = insights.filter((i) => i.severity === "critical");
513
+
514
+ if (criticalIssues.length > 0) {
515
+ yield* delegateTask({
516
+ taskType: "strategy",
517
+ description: "Adjust strategy based on OKR review",
518
+ parameters: {
519
+ issues: criticalIssues,
520
+ okrs,
521
+ recommendations: analysis.data.recommendations,
522
+ },
523
+ });
524
+ }
525
+
526
+ // 5. Create report entity
527
+ const reportId = yield* Effect.tryPromise(() =>
528
+ db.insert("things", {
529
+ type: "report",
530
+ name: `Weekly OKR Review - Week ${args.weekNumber}`,
531
+ properties: {
532
+ reportType: "okr_review",
533
+ period: "weekly",
534
+ weekNumber: args.weekNumber,
535
+ organizationId: args.organizationId,
536
+ insights,
537
+ recommendations: analysis.data.recommendations,
538
+ generatedAt: Date.now(),
539
+ },
540
+ status: "active",
541
+ createdAt: Date.now(),
542
+ updatedAt: Date.now(),
543
+ })
544
+ );
545
+
546
+ return { success: true, reportId, insights };
547
+ }),
548
+ ```
549
+
550
+ ---
551
+
552
+ ## Resource Allocation
553
+
554
+ ### Allocate Budget Across Initiatives
555
+
556
+ ```typescript
557
+ allocateResources: (args: AllocateResourcesArgs) =>
558
+ Effect.gen(function* () {
559
+ // 1. Get all initiatives for OKR
560
+ const initiatives = yield* Effect.tryPromise(() =>
561
+ db
562
+ .query("connections")
563
+ .withIndex("to_type", (q) =>
564
+ q.eq("toThingId", args.okrId).eq("relationshipType", "part_of")
565
+ )
566
+ .collect()
567
+ );
568
+
569
+ const initiativeEntities = yield* Effect.all(
570
+ initiatives.map((conn) =>
571
+ Effect.tryPromise(() => db.get(conn.fromThingId))
572
+ )
573
+ );
574
+
575
+ // 2. Delegate resource allocation to finance agent
576
+ const allocationTask = yield* delegateTask({
577
+ taskType: "finance",
578
+ description: "Allocate budget across initiatives",
579
+ parameters: {
580
+ totalBudget: args.totalBudget,
581
+ initiatives: initiativeEntities.map((i) => ({
582
+ id: i._id,
583
+ name: i.name,
584
+ estimatedBudget: i.properties.budget,
585
+ priority: i.properties.priority,
586
+ expectedImpact: i.properties.expectedImpact,
587
+ })),
588
+ },
589
+ });
590
+
591
+ const allocation = yield* waitForTaskResult(allocationTask.taskId);
592
+
593
+ // 3. Update initiative budgets
594
+ yield* Effect.all(
595
+ allocation.data.allocations.map((a) =>
596
+ Effect.tryPromise(() =>
597
+ db.patch(a.initiativeId, {
598
+ properties: {
599
+ ...initiative.properties,
600
+ allocatedBudget: a.amount,
601
+ },
602
+ updatedAt: Date.now(),
603
+ })
604
+ )
605
+ )
606
+ );
607
+
608
+ // 4. Log allocation event
609
+ yield* Effect.tryPromise(() =>
610
+ db.insert("events", {
611
+ type: "entity_updated",
612
+ actorId: args.directorId,
613
+ targetId: args.okrId,
614
+ timestamp: Date.now(),
615
+ metadata: {
616
+ action: "budget_allocated",
617
+ totalBudget: args.totalBudget,
618
+ allocations: allocation.data.allocations,
619
+ },
620
+ })
621
+ );
622
+
623
+ return { success: true, allocations: allocation.data.allocations };
624
+ }),
625
+ ```
626
+
627
+ ---
628
+
629
+ ## Strategy Adjustment
630
+
631
+ ### Adjust Strategy Based on Results
632
+
633
+ ```typescript
634
+ adjustStrategy: (args: AdjustStrategyArgs) =>
635
+ Effect.gen(function* () {
636
+ // 1. Get intelligence analysis
637
+ const intelligenceTask = yield* delegateTask({
638
+ taskType: "intelligence",
639
+ description: "Analyze OKR performance and identify issues",
640
+ parameters: {
641
+ okrId: args.okrId,
642
+ period: "30 days",
643
+ },
644
+ });
645
+
646
+ const analysis = yield* waitForTaskResult(intelligenceTask.taskId);
647
+
648
+ // 2. Delegate strategy adjustment to strategy agent
649
+ const adjustmentTask = yield* delegateTask({
650
+ taskType: "strategy",
651
+ description: "Adjust strategy based on performance analysis",
652
+ parameters: {
653
+ okrId: args.okrId,
654
+ analysis: analysis.data,
655
+ constraints: args.constraints,
656
+ },
657
+ });
658
+
659
+ const adjustments = yield* waitForTaskResult(adjustmentTask.taskId);
660
+
661
+ // 3. Apply adjustments
662
+ if (adjustments.data.keyResultUpdates) {
663
+ yield* updateKeyResults(args.okrId, adjustments.data.keyResultUpdates);
664
+ }
665
+
666
+ if (adjustments.data.initiativeChanges) {
667
+ yield* applyInitiativeChanges(adjustments.data.initiativeChanges);
668
+ }
669
+
670
+ if (adjustments.data.resourceReallocation) {
671
+ yield* reallocateResources(args.okrId, adjustments.data.resourceReallocation);
672
+ }
673
+
674
+ // 4. Log adjustment event
675
+ yield* Effect.tryPromise(() =>
676
+ db.insert("events", {
677
+ type: "entity_updated",
678
+ actorId: args.directorId,
679
+ targetId: args.okrId,
680
+ timestamp: Date.now(),
681
+ metadata: {
682
+ action: "strategy_adjusted",
683
+ reason: analysis.data.issues,
684
+ adjustments: adjustments.data,
685
+ },
686
+ })
687
+ );
688
+
689
+ return { success: true, adjustments };
690
+ }),
691
+ ```
692
+
693
+ ---
694
+
695
+ ## Example: Complete Strategic Workflow
696
+
697
+ ### Q1 2025 Creator Growth Strategy
698
+
699
+ ```typescript
700
+ // Step 1: Director defines vision (via Strategy Agent)
701
+ const vision = await directorService.createVision({
702
+ organizationId: "org_123",
703
+ directorId: "director_789",
704
+ });
705
+
706
+ // Step 2: Create Q1 2025 OKR
707
+ const okr = await directorService.createOKR({
708
+ organizationId: "org_123",
709
+ directorId: "director_789",
710
+ period: {
711
+ quarter: "Q1",
712
+ year: 2025,
713
+ startDate: Date.parse("2025-01-01"),
714
+ endDate: Date.parse("2025-03-31"),
715
+ },
716
+ vision: vision.vision,
717
+ focus: ["growth", "revenue", "community"],
718
+ budget: 100000,
719
+ teamSize: 10,
720
+ priority: "critical",
721
+ });
722
+
723
+ // OKR created:
724
+ // Objective: "10x creator reach and double revenue"
725
+ // Key Results:
726
+ // 1. Grow YouTube subscribers from 50K to 150K (+200%)
727
+ // 2. Launch token with 5,000+ holders
728
+ // 3. Launch AI-powered course with 500+ enrollments
729
+ // 4. Increase MRR from $5K to $10K (+100%)
730
+
731
+ // Step 3: Plan initiatives for each key result
732
+ const initiatives = await directorService.planInitiatives({
733
+ okrId: okr.okrId,
734
+ directorId: "director_789",
735
+ budget: 100000,
736
+ });
737
+
738
+ // Initiatives created:
739
+ // 1. YouTube Growth Campaign (Marketing Agent)
740
+ // 2. Token Launch Project (Engineering + Finance)
741
+ // 3. Course Creation & Launch (Marketing + Design + Engineering)
742
+ // 4. Revenue Optimization (Sales + Intelligence)
743
+
744
+ // Step 4: Break down initiatives into tasks
745
+ for (const initiative of initiatives.initiatives) {
746
+ await directorService.breakdownInitiative({
747
+ initiativeId: initiative.initiativeId,
748
+ directorId: "director_789",
749
+ });
750
+ }
751
+
752
+ // Tasks delegated to agents:
753
+ // - Research agent: Market analysis, competitor research
754
+ // - Marketing agent: Content calendar, campaign execution
755
+ // - Design agent: Brand assets, course design
756
+ // - Engineering agent: Platform build, integrations
757
+ // - Finance agent: Revenue tracking, forecasting
758
+ // - Intelligence agent: Performance analysis, insights
759
+
760
+ // Step 5: Weekly reviews
761
+ setInterval(async () => {
762
+ await directorService.weeklyOKRReview({
763
+ organizationId: "org_123",
764
+ directorId: "director_789",
765
+ weekNumber: getCurrentWeek(),
766
+ });
767
+ }, 7 * 24 * 60 * 60 * 1000); // Every 7 days
768
+
769
+ // Step 6: Adjust strategy if needed
770
+ // Intelligence agent identifies issue: YouTube growth slow
771
+ // Director adjusts strategy
772
+ await directorService.adjustStrategy({
773
+ okrId: okr.okrId,
774
+ directorId: "director_789",
775
+ constraints: { budget: 100000 },
776
+ });
777
+
778
+ // Adjustments applied:
779
+ // - Reallocate $10K from token marketing to YouTube ads
780
+ // - Increase content frequency from 2x/week to 3x/week
781
+ // - Launch collaboration campaign with 5 creators
782
+ ```
783
+
784
+ ---
785
+
786
+ ## Querying Strategic Data
787
+
788
+ ### Get Organization's Current OKRs
789
+
790
+ ```typescript
791
+ export const getCurrentOKRs = confect.query({
792
+ args: { organizationId: v.id("things") },
793
+ handler: async (ctx, args) => {
794
+ const okrs = await ctx.db
795
+ .query("things")
796
+ .withIndex("by_type", (q) => q.eq("type", "okr"))
797
+ .filter((q) =>
798
+ q
799
+ .eq(q.field("properties.organizationId"), args.organizationId)
800
+ .eq(q.field("properties.status"), "active")
801
+ )
802
+ .collect();
803
+
804
+ return okrs;
805
+ },
806
+ });
807
+ ```
808
+
809
+ ### Get OKR Progress Dashboard
810
+
811
+ ```typescript
812
+ export const getOKRDashboard = confect.query({
813
+ args: { okrId: v.id("things") },
814
+ handler: async (ctx, args) => {
815
+ const okr = await ctx.db.get(args.okrId);
816
+
817
+ // Get initiatives
818
+ const initiativeConnections = await ctx.db
819
+ .query("connections")
820
+ .withIndex("to_type", (q) =>
821
+ q.eq("toThingId", args.okrId).eq("relationshipType", "part_of")
822
+ )
823
+ .collect();
824
+
825
+ const initiatives = await Promise.all(
826
+ initiativeConnections.map((conn) => ctx.db.get(conn.fromThingId))
827
+ );
828
+
829
+ // Get tasks for each initiative
830
+ const tasks = await Promise.all(
831
+ initiatives.map(async (initiative) => {
832
+ const taskConnections = await ctx.db
833
+ .query("connections")
834
+ .withIndex("to_type", (q) =>
835
+ q
836
+ .eq("toThingId", initiative._id)
837
+ .eq("relationshipType", "part_of")
838
+ )
839
+ .collect();
840
+
841
+ return Promise.all(
842
+ taskConnections.map((conn) => ctx.db.get(conn.fromThingId))
843
+ );
844
+ })
845
+ );
846
+
847
+ return {
848
+ okr,
849
+ initiatives,
850
+ tasks: tasks.flat(),
851
+ overallProgress:
852
+ okr.properties.keyResults.reduce((sum, kr) => sum + kr.progress, 0) /
853
+ okr.properties.keyResults.length,
854
+ };
855
+ },
856
+ });
857
+ ```
858
+
859
+ ---
860
+
861
+ ## Best Practices
862
+
863
+ ### 1. SMART Key Results
864
+ - **S**pecific: Clear, unambiguous targets
865
+ - **M**easurable: Quantifiable metrics
866
+ - **A**chievable: Realistic with resources
867
+ - **R**elevant: Aligned with vision
868
+ - **T**ime-bound: Deadline-driven
869
+
870
+ ### 2. Regular Reviews
871
+ - Weekly: Progress tracking
872
+ - Monthly: Deep analysis
873
+ - Quarterly: Strategic adjustments
874
+
875
+ ### 3. Data-Driven Decisions
876
+ - Use intelligence agent for insights
877
+ - Track all metrics in real-time
878
+ - Adjust based on evidence
879
+
880
+ ### 4. Transparent Communication
881
+ - All stakeholders see OKR progress
882
+ - Blockers surfaced immediately
883
+ - Celebrate wins publicly
884
+
885
+ ### 5. Continuous Learning
886
+ - Post-mortem on completed OKRs
887
+ - Document lessons learned
888
+ - Apply insights to next quarter
889
+
890
+ ---
891
+
892
+ ## Summary
893
+
894
+ The strategic planning workflow provides:
895
+
896
+ 1. **Vision-driven** - Strategy flows from long-term vision
897
+ 2. **OKR framework** - Structured goal-setting methodology
898
+ 3. **Multi-agent execution** - Specialized agents own key results
899
+ 4. **Real-time tracking** - Progress visible at all times
900
+ 5. **Adaptive strategy** - Adjust based on intelligence insights
901
+ 6. **Ontology-aligned** - OKRs, initiatives, and tasks are all things
902
+
903
+ **This creates a self-optimizing system where strategy is continuously refined based on execution results, with the director orchestrating work across specialized agents to achieve organizational goals.**