oneie 3.6.39 → 3.7.0

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 (595) hide show
  1. package/.claude/commands/deploy.md +187 -17
  2. package/.claude/commands/media-upload.md +186 -0
  3. package/.claude/hooks/.last-news-context +1 -1
  4. package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
  5. package/CLAUDE.md +128 -319
  6. package/README.md +19 -0
  7. package/dist/admin/build.d.ts +15 -0
  8. package/dist/admin/build.d.ts.map +1 -0
  9. package/dist/admin/build.js +295 -0
  10. package/dist/admin/build.js.map +1 -0
  11. package/dist/admin/index.d.ts +24 -0
  12. package/dist/admin/index.d.ts.map +1 -0
  13. package/dist/admin/index.js +98 -0
  14. package/dist/admin/index.js.map +1 -0
  15. package/dist/admin/list.d.ts +14 -0
  16. package/dist/admin/list.d.ts.map +1 -0
  17. package/dist/admin/list.js +90 -0
  18. package/dist/admin/list.js.map +1 -0
  19. package/dist/admin/manifest.d.ts +86 -0
  20. package/dist/admin/manifest.d.ts.map +1 -0
  21. package/dist/admin/manifest.js +183 -0
  22. package/dist/admin/manifest.js.map +1 -0
  23. package/dist/admin/monorepo.d.ts +25 -0
  24. package/dist/admin/monorepo.d.ts.map +1 -0
  25. package/dist/admin/monorepo.js +59 -0
  26. package/dist/admin/monorepo.js.map +1 -0
  27. package/dist/admin/release.d.ts +17 -0
  28. package/dist/admin/release.d.ts.map +1 -0
  29. package/dist/admin/release.js +144 -0
  30. package/dist/admin/release.js.map +1 -0
  31. package/dist/admin/sync.d.ts +14 -0
  32. package/dist/admin/sync.d.ts.map +1 -0
  33. package/dist/admin/sync.js +104 -0
  34. package/dist/admin/sync.js.map +1 -0
  35. package/dist/admin/validate.d.ts +15 -0
  36. package/dist/admin/validate.d.ts.map +1 -0
  37. package/dist/admin/validate.js +169 -0
  38. package/dist/admin/validate.js.map +1 -0
  39. package/dist/commands/ask.d.ts +4 -0
  40. package/dist/commands/ask.d.ts.map +1 -0
  41. package/dist/commands/ask.js +8 -0
  42. package/dist/commands/ask.js.map +1 -0
  43. package/dist/commands/claw.d.ts +4 -0
  44. package/dist/commands/claw.d.ts.map +1 -0
  45. package/dist/commands/claw.js +14 -0
  46. package/dist/commands/claw.js.map +1 -0
  47. package/dist/commands/deploy.d.ts +4 -0
  48. package/dist/commands/deploy.d.ts.map +1 -0
  49. package/dist/commands/deploy.js +10 -0
  50. package/dist/commands/deploy.js.map +1 -0
  51. package/dist/commands/fade.d.ts +4 -0
  52. package/dist/commands/fade.d.ts.map +1 -0
  53. package/dist/commands/fade.js +11 -0
  54. package/dist/commands/fade.js.map +1 -0
  55. package/dist/commands/forget.d.ts +4 -0
  56. package/dist/commands/forget.d.ts.map +1 -0
  57. package/dist/commands/forget.js +16 -0
  58. package/dist/commands/forget.js.map +1 -0
  59. package/dist/commands/frontier.d.ts +4 -0
  60. package/dist/commands/frontier.d.ts.map +1 -0
  61. package/dist/commands/frontier.js +11 -0
  62. package/dist/commands/frontier.js.map +1 -0
  63. package/dist/commands/highways.d.ts +4 -0
  64. package/dist/commands/highways.d.ts.map +1 -0
  65. package/dist/commands/highways.js +11 -0
  66. package/dist/commands/highways.js.map +1 -0
  67. package/dist/commands/know.d.ts +4 -0
  68. package/dist/commands/know.d.ts.map +1 -0
  69. package/dist/commands/know.js +8 -0
  70. package/dist/commands/know.js.map +1 -0
  71. package/dist/commands/launch.d.ts +4 -0
  72. package/dist/commands/launch.d.ts.map +1 -0
  73. package/dist/commands/launch.js +16 -0
  74. package/dist/commands/launch.js.map +1 -0
  75. package/dist/commands/mark.d.ts +4 -0
  76. package/dist/commands/mark.d.ts.map +1 -0
  77. package/dist/commands/mark.js +15 -0
  78. package/dist/commands/mark.js.map +1 -0
  79. package/dist/commands/recall.d.ts +4 -0
  80. package/dist/commands/recall.d.ts.map +1 -0
  81. package/dist/commands/recall.js +12 -0
  82. package/dist/commands/recall.js.map +1 -0
  83. package/dist/commands/reveal.d.ts +4 -0
  84. package/dist/commands/reveal.d.ts.map +1 -0
  85. package/dist/commands/reveal.js +11 -0
  86. package/dist/commands/reveal.js.map +1 -0
  87. package/dist/commands/select.d.ts +4 -0
  88. package/dist/commands/select.d.ts.map +1 -0
  89. package/dist/commands/select.js +19 -0
  90. package/dist/commands/select.js.map +1 -0
  91. package/dist/commands/signal.d.ts +4 -0
  92. package/dist/commands/signal.d.ts.map +1 -0
  93. package/dist/commands/signal.js +8 -0
  94. package/dist/commands/signal.js.map +1 -0
  95. package/dist/commands/sync.d.ts +4 -0
  96. package/dist/commands/sync.d.ts.map +1 -0
  97. package/dist/commands/sync.js +20 -0
  98. package/dist/commands/sync.js.map +1 -0
  99. package/dist/commands/warn.d.ts +4 -0
  100. package/dist/commands/warn.d.ts.map +1 -0
  101. package/dist/commands/warn.js +15 -0
  102. package/dist/commands/warn.js.map +1 -0
  103. package/dist/create-org-profile.js +2 -2
  104. package/dist/create-user-profile.js +2 -2
  105. package/dist/index.js +75 -7
  106. package/dist/index.js.map +1 -1
  107. package/dist/lib/args.d.ts +10 -0
  108. package/dist/lib/args.d.ts.map +1 -0
  109. package/dist/lib/args.js +54 -0
  110. package/dist/lib/args.js.map +1 -0
  111. package/dist/lib/config.d.ts +12 -0
  112. package/dist/lib/config.d.ts.map +1 -0
  113. package/dist/lib/config.js +38 -0
  114. package/dist/lib/config.js.map +1 -0
  115. package/dist/lib/http.d.ts +9 -0
  116. package/dist/lib/http.d.ts.map +1 -0
  117. package/dist/lib/http.js +25 -0
  118. package/dist/lib/http.js.map +1 -0
  119. package/dist/lib/telemetry.d.ts +4 -0
  120. package/dist/lib/telemetry.d.ts.map +1 -0
  121. package/dist/lib/telemetry.js +61 -0
  122. package/dist/lib/telemetry.js.map +1 -0
  123. package/dist/utils/file-resolver.js +1 -3
  124. package/dist/utils/file-resolver.js.map +1 -1
  125. package/dist/utils/installation-setup.js +8 -8
  126. package/dist/utils/installation-setup.js.map +1 -1
  127. package/one/README.md +1 -2
  128. package/one/events/0-changes.md +2764 -0
  129. package/one/events/1-PROJECTS-START-HERE.md +384 -0
  130. package/one/events/1-projects-developer-quickstart.md +620 -0
  131. package/one/events/1-projects-feature.md +2047 -0
  132. package/one/events/1-projects-team-briefing.md +583 -0
  133. package/one/events/2024-10-14-deployment-plan.md +330 -0
  134. package/one/events/2024-10-14-deployment-success.md +447 -0
  135. package/one/events/2024-10-14-final-sync-complete.md +250 -0
  136. package/one/events/2024-10-14-release-v2.0.6.md +414 -0
  137. package/one/events/2024-10-15-agent-clean-v2-summary.md +495 -0
  138. package/one/events/2024-10-15-handoff-to-clean.md +347 -0
  139. package/one/events/2024-10-15-package-manager-tests.md +442 -0
  140. package/one/events/2024-10-15-release-command-complete.md +416 -0
  141. package/one/events/2025-10-15-private-files-secured.md +359 -0
  142. package/one/events/2025-10-15-unignore-public-group-docs.md +298 -0
  143. package/one/events/2025-11-08-backend-claude-refactor.md +242 -0
  144. package/one/events/2025-11-08-parallel-agent-implementation.md +620 -0
  145. package/one/events/2025-11-10-ai-integration-status-report.md +241 -0
  146. package/one/events/ACCESSIBILITY_CHECKLIST.md +275 -0
  147. package/one/events/ACCESSIBILITY_FIXES_SUMMARY.md +293 -0
  148. package/one/events/ALIGNMENT_REPORT_PROBLEM_SOLVER.md +335 -0
  149. package/one/events/ALIGNMENT_SUMMARY.md +280 -0
  150. package/one/events/API_ROUTES_FIXES_SUMMARY.md +280 -0
  151. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +654 -0
  152. package/one/events/AUDIT-ONTOLOGY-ALIGNMENT.md +598 -0
  153. package/one/events/AUDIT_PLAN_COMPLETION-20251108-125555.md +262 -0
  154. package/one/events/BEFORE_AFTER_COMPARISON.md +978 -0
  155. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +372 -0
  156. package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +430 -0
  157. package/one/events/CHARTS-READY-TO-USE-20251106-080939.md +184 -0
  158. package/one/events/CHARTS-SUMMARY-20251106-080938.md +196 -0
  159. package/one/events/CLAUDE copy.md +897 -0
  160. package/one/events/CLEANUP-RELEASE-V2.0.8.md +308 -0
  161. package/one/events/CLOUDFLARE-FS-FIX-20251106-100516.md +75 -0
  162. package/one/events/COMPONENT_SHOWCASE-20251106-080938.md +629 -0
  163. package/one/events/CONNECTIONS_DEMO.md +519 -0
  164. package/one/events/CREATE-WEBSITE.md +460 -0
  165. package/one/events/CRITICAL-FIXES-COMPLETE.md +571 -0
  166. package/one/events/CUSTOM-DOMAIN.md +375 -0
  167. package/one/events/DELIVERABLES.md +450 -0
  168. package/one/events/DELIVERABLES.txt +273 -0
  169. package/one/events/DEMO-GROUPS-PAGE.md +410 -0
  170. package/one/events/DEMO-TESTING-SUMMARY.md +536 -0
  171. package/one/events/DEMO_COMPONENTS.md +505 -0
  172. package/one/events/DEMO_HOOKS_INDEX.md +352 -0
  173. package/one/events/DEMO_INFRASTRUCTURE.md +923 -0
  174. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +588 -0
  175. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +449 -0
  176. package/one/events/DEMO_QUICK_REFERENCE.md +459 -0
  177. package/one/events/DEMO_SETUP.md +494 -0
  178. package/one/events/DEPLOYMENT copy.md +444 -0
  179. package/one/events/DEPLOYMENT.md +196 -0
  180. package/one/events/DESIGN-DELIVERABLES-20251106-080938.md +557 -0
  181. package/one/events/DESIGN-EXECUTIVE-SUMMARY-20251106-080938.md +484 -0
  182. package/one/events/DOCS-SYSTEM-GUIDE-20251105-142103.md +458 -0
  183. package/one/events/DOCUMENTER-DELIVERY-SUMMARY.md +481 -0
  184. package/one/events/DOCUMENTER-EXECUTION-GUIDE.md +394 -0
  185. package/one/events/DOCUMENTER-TASK-BREAKDOWN.md +783 -0
  186. package/one/events/ECOMMERCE-BEFORE-AFTER.md +267 -0
  187. package/one/events/ECOMMERCE-DEMO-PLAN.md +243 -0
  188. package/one/events/ECOMMERCE-ENHANCEMENTS.md +594 -0
  189. package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +439 -0
  190. package/one/events/ECOMMERCE-LIVE-DEMO.md +381 -0
  191. package/one/events/ECOMMERCE-QUICKSTART.md +376 -0
  192. package/one/events/ECOMMERCE-README.md +354 -0
  193. package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +214 -0
  194. package/one/events/ECOMMERCE-SETUP-SUMMARY.md +414 -0
  195. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +753 -0
  196. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +941 -0
  197. package/one/events/EFFECT_TS_API_PATTERN.md +496 -0
  198. package/one/events/EXECUTION-READY.md +359 -0
  199. package/one/events/EXECUTION-SUMMARY.md +478 -0
  200. package/one/events/FEATURE-2-4-COMPLETE.md +320 -0
  201. package/one/events/FEATURE_2_3_COMPLETE.md +593 -0
  202. package/one/events/FILE-REFERENCE-20251105-142103.md +325 -0
  203. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +241 -0
  204. package/one/events/GROUPS-MIGRATION.md +643 -0
  205. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +432 -0
  206. package/one/events/HANDOFF.md +331 -0
  207. package/one/events/HOOKS-DEMO.md +459 -0
  208. package/one/events/IMPLEMENTATION-CHECKLIST-20251105-142103.md +274 -0
  209. package/one/events/IMPLEMENTATION-REPORT-DOCS-20251105-142102.md +394 -0
  210. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +568 -0
  211. package/one/events/IMPLEMENTATION_SUMMARY-20251106-080938.md +571 -0
  212. package/one/events/IMPLEMENTATION_SUMMARY.md +547 -0
  213. package/one/events/INDEX-ALL-AGENTS.md +190 -0
  214. package/one/events/INDEX-FRONTEND-TESTING.md +524 -0
  215. package/one/events/INDEX-PROBLEM-SOLVER.md +488 -0
  216. package/one/events/INDEX-QUALITY-AGENT-INFER65.md +455 -0
  217. package/one/events/INDEX.md +295 -0
  218. package/one/events/INDEX_QUICK_START_REDESIGN-20251106-080939.md +342 -0
  219. package/one/events/INSTALL-TESTS.md +311 -0
  220. package/one/events/INSTALLATION_FOLDERS.md +534 -0
  221. package/one/events/INSTALLATION_FOLDERS_FILES.md +223 -0
  222. package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +437 -0
  223. package/one/events/INTEGRATION-ARCHITECTURE.md +579 -0
  224. package/one/events/INTEGRATION-CHECKLIST.md +1252 -0
  225. package/one/events/INTEGRATION-ORCHESTRATION.md +2641 -0
  226. package/one/events/INTEGRATION-SUMMARY.md +671 -0
  227. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +684 -0
  228. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +660 -0
  229. package/one/events/LANDING-PAGE-QUICKSTART.md +425 -0
  230. package/one/events/LICENSE.md +107 -0
  231. package/one/events/MASTER-COORDINATION-PLAN.md +613 -0
  232. package/one/events/MASTER-ORCHESTRATION-INFER65.md +441 -0
  233. package/one/events/MASTER-PLAN-SUMMARY.md +309 -0
  234. package/one/events/MCP-CONFIGURATION.md +354 -0
  235. package/one/events/MCP-SETUP-COMPLETE.md +223 -0
  236. package/one/events/MIGRATION-REPORT.md +453 -0
  237. package/one/events/MIGRATION.md +87 -0
  238. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1663 -0
  239. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +643 -0
  240. package/one/events/NEWS-COMMANDS.md +506 -0
  241. package/one/events/NEWS-SYSTEM-SUMMARY.md +480 -0
  242. package/one/events/NODE-UPGRADE.md +129 -0
  243. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +416 -0
  244. package/one/events/ONTOLOGY-HOOKS-README.md +718 -0
  245. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +383 -0
  246. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +569 -0
  247. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +491 -0
  248. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +504 -0
  249. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +221 -0
  250. package/one/events/PACKAGE-STRUCTURE.md +328 -0
  251. package/one/events/PLAN-COMPLETE.md +429 -0
  252. package/one/events/PLAYBOOK-SETUP-SUMMARY.md +349 -0
  253. package/one/events/PROBLEM-SOLVER-EXECUTIVE-SUMMARY.md +484 -0
  254. package/one/events/PROBLEM-SOLVER-QUICKSTART.md +420 -0
  255. package/one/events/PROJECTS-PLAN-SUMMARY.md +480 -0
  256. package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +585 -0
  257. package/one/events/QA-CHECKLIST.md +692 -0
  258. package/one/events/QUALITY-AGENT-SUMMARY.md +334 -0
  259. package/one/events/QUALITY-EXECUTION-CHECKLIST.md +593 -0
  260. package/one/events/QUICK-REFERENCE-FRONTEND-TESTING.md +475 -0
  261. package/one/events/QUICK-START-ONTOLOGY.md +426 -0
  262. package/one/events/QUICK_START_REDESIGN-20251106-080938.md +400 -0
  263. package/one/events/README-PROBLEM-SOLVER.md +394 -0
  264. package/one/events/README-archived.md +537 -0
  265. package/one/events/README_QUICK_START_REDESIGN-20251106-080938.md +484 -0
  266. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +657 -0
  267. package/one/events/SEARCH_DEMO_DELIVERY.md +433 -0
  268. package/one/events/SEARCH_DEMO_SUMMARY.md +321 -0
  269. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +399 -0
  270. package/one/events/SECURITY-AUDIT-FIXES.md +394 -0
  271. package/one/events/SECURITY-SCAN-COMPLETE.md +299 -0
  272. package/one/events/SHOP-BUILD-STATUS.md +132 -0
  273. package/one/events/SHOP-PREMIUM-UPDATE.md +165 -0
  274. package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +280 -0
  275. package/one/events/SITE-WIDE-GRADIENT-FIX.md +317 -0
  276. package/one/events/SPECIALIST-QUICK-REFERENCE.md +678 -0
  277. package/one/events/STORE-PRODUCTION-READY-STATUS.md +377 -0
  278. package/one/events/STRIPE-INTEGRATION.md +432 -0
  279. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +447 -0
  280. package/one/events/STRIPE-SETUP-GUIDE.md +480 -0
  281. package/one/events/TEST-PLAN-INDEX.md +364 -0
  282. package/one/events/TEST-PLAN.md +1435 -0
  283. package/one/events/TEST-SUMMARY.md +411 -0
  284. package/one/events/TESTING-DELIVERY.txt +372 -0
  285. package/one/events/TESTS-QUICK-REF.md +280 -0
  286. package/one/events/TRANSITIONS-QUICK-START.md +159 -0
  287. package/one/events/TRANSPARENCY-FIXES.md +293 -0
  288. package/one/events/TYPESCRIPT_FIXES.md +170 -0
  289. package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +412 -0
  290. package/one/events/TYPESCRIPT_FIXES_INDEX.md +359 -0
  291. package/one/events/VERIFICATION_CHECKLIST-20251106-080938.md +326 -0
  292. package/one/events/VIEW-TRANSITIONS.md +446 -0
  293. package/one/events/agent-command-implementation.md +305 -0
  294. package/one/events/agent-director-enhancement-summary.md +404 -0
  295. package/one/events/agent-director-routing-update.md +214 -0
  296. package/one/events/agent-onboard-implementation-summary.md +475 -0
  297. package/one/events/agent-ontology-alignment-completion.md +263 -0
  298. package/one/events/ai-integration-complete.md +294 -0
  299. package/one/events/ai-integration-lessons-learned.md +511 -0
  300. package/one/events/backend-integration-tests.md +624 -0
  301. package/one/events/backend-structure-diagram.txt +393 -0
  302. package/one/events/backend-structure-summary.txt +269 -0
  303. package/one/events/bullfm-video-podcast-analysis.md +319 -0
  304. package/one/events/clean-agent-ontology-cleanup-report.md +371 -0
  305. package/one/events/clean-agent-todo-analysis-summary.md +336 -0
  306. package/one/events/cloudflare-automation-complete.md +350 -0
  307. package/one/events/cloudflare-pages-infrastructure-setup.md +282 -0
  308. package/one/events/contact-page-complete.md +316 -0
  309. package/one/events/convex-analysis-index.md +322 -0
  310. package/one/events/convex-structure-analysis.md +718 -0
  311. package/one/events/creation-instructions-9-todos.md +906 -0
  312. package/one/events/cycle-3-video-player-port-20251108.md +368 -0
  313. package/one/events/cycle-3-video-player-port-complete-20251108.md +334 -0
  314. package/one/events/deployment-installation-folders.md +178 -0
  315. package/one/events/deployment-ops-summary.md +386 -0
  316. package/one/events/deployment-verification.md +366 -0
  317. package/one/events/design-spec-complete.md +226 -0
  318. package/one/events/documentation-audit-index.md +473 -0
  319. package/one/events/documentation-audit-summary.md +417 -0
  320. package/one/events/documentation-improvement-roadmap.md +906 -0
  321. package/one/events/documentation-standards-compliance-report.md +538 -0
  322. package/one/events/documentation-updates.md +370 -0
  323. package/one/events/events.md +563 -0
  324. package/one/events/fix-product-hydration-20251106.md +211 -0
  325. package/one/events/frontend-effects-complete.md +584 -0
  326. package/one/events/frontend-effects-orchestration.md +1356 -0
  327. package/one/events/frontend-effects-risk-register.md +1055 -0
  328. package/one/events/frontend-effects-week1-assignments.md +1594 -0
  329. package/one/events/hook-ontology-alignment-summary.md +528 -0
  330. package/one/events/installation-folders-workflow-integration.md +458 -0
  331. package/one/events/landing-page-generator.md +476 -0
  332. package/one/events/legal-assessment-2025-10-16.md +1917 -0
  333. package/one/events/master-coordination-plan.json +1078 -0
  334. package/one/events/master-plan-9-todos.md +900 -0
  335. package/one/events/mobile-performance-optimization.md +179 -0
  336. package/one/events/onboarding-implementation-complete.md +523 -0
  337. package/one/events/ontology-audit-agent-clone.md +323 -0
  338. package/one/events/ontology-test-examples.md +580 -0
  339. package/one/events/phase1-backend-implementation-complete.md +536 -0
  340. package/one/events/plan-completion-audit.md +707 -0
  341. package/one/events/plan-files-updated.md +273 -0
  342. package/one/events/production-readiness-plan.md +389 -0
  343. package/one/events/readme.md +100 -0
  344. package/one/events/release.md +272 -0
  345. package/one/events/root-cleanup-alignment-report.md +265 -0
  346. package/one/events/security-fixes-2025-01-15.md +226 -0
  347. package/one/events/separate-implementation-status.md +555 -0
  348. package/one/events/server-command-optimization-20251108.md +150 -0
  349. package/one/events/session-summary-2025-10-18.md +366 -0
  350. package/one/events/skills-complete.md +351 -0
  351. package/one/events/skills-infer-6-10-summary.md +70 -0
  352. package/one/events/skills-phase1-complete.md +281 -0
  353. package/one/events/specialist-assignments.md +766 -0
  354. package/one/events/structural-analysis-architecture-vs-plans.md +600 -0
  355. package/one/events/test-dashboard.md +363 -0
  356. package/one/events/test-index.md +421 -0
  357. package/one/events/test-report-ontology.md +611 -0
  358. package/one/events/testing-summary.md +388 -0
  359. package/one/events/todo-agent-builder.md +1180 -0
  360. package/one/events/todo-agent-director.md +164 -0
  361. package/one/events/todo-agent-documenter.md +1815 -0
  362. package/one/events/todo-agent-frontend.md +1542 -0
  363. package/one/events/todo-agent-problem-solver.md +1682 -0
  364. package/one/events/todo-agent-quality.md +1647 -0
  365. package/one/events/todo-refactoring-complete.md +408 -0
  366. package/one/events/wave1-backend-implementation-complete.md +698 -0
  367. package/one/events/web-AI_INTEGRATION_PHASE2_SUMMARY-20251111-152540.md +529 -0
  368. package/one/events/web-BUY-IN-CHATGPT-README-20251116-235241.md +491 -0
  369. package/one/events/web-CHARTS-IMPLEMENTATION-20251106-080939.md +576 -0
  370. package/one/events/web-CHARTS-QUICKSTART-20251106-080939.md +416 -0
  371. package/one/events/web-CODE-HIGHLIGHTING-SUMMARY-20251111-152540.md +442 -0
  372. package/one/events/web-DEPLOYMENT_SUMMARY-20251116-005428.md +290 -0
  373. package/one/events/web-DESIGN-SUMMARY-20251106-080939.md +514 -0
  374. package/one/events/web-README-AI-INTEGRATION-20251111-152540.md +196 -0
  375. package/one/events/web-RECHARTS-INTEGRATION-20251111-152540.md +265 -0
  376. package/one/events/web-RELEASE_OPTIMIZATION_PLAN-20251116-005428.md +447 -0
  377. package/one/events/web-TEST-CLEANUP-20251105-143205.md +3 -0
  378. package/one/events/web-USING-ANY-COMPONENT-IN-CHAT-20251111-152540.md +561 -0
  379. package/one/events/web-test-code-highlighting-20251111-152540.md +231 -0
  380. package/one/{knowledge → learning}/crypto.md +2 -2
  381. package/one/learning/one-protocol-ai-agents.md +892 -0
  382. package/one/learning/one-protocol-executive-report.md +617 -0
  383. package/one/learning/one-protocol-standard.md +869 -0
  384. package/one/learning/one-protocol-whitepaper.md +756 -0
  385. package/one/learning/ontology-education-game.md +1654 -0
  386. package/one/learning/ontology-v2.md +4449 -0
  387. package/one/{knowledge → learning}/ontology.md +1 -1
  388. package/one/{connections → paths}/cryptonetworks.md +2 -2
  389. package/one/things/contracts/Move.toml +12 -0
  390. package/one/things/contracts/README.md +288 -0
  391. package/one/things/contracts/one.move +762 -0
  392. package/one/things/contracts/sdk.ts +579 -0
  393. package/one/things/crypto/FEATURES.md +78 -0
  394. package/one/things/crypto/ONECORE.md +62 -0
  395. package/one/things/crypto/ONECOREFAQ.md +22 -0
  396. package/one/things/crypto/ONECOREHOW.md +46 -0
  397. package/one/things/crypto/ONEENTERPRISE.md +64 -0
  398. package/one/things/crypto/ONEENTERPRISEFAQ.md +64 -0
  399. package/one/things/crypto/ONEENTERPRISEHOW.md +53 -0
  400. package/one/things/crypto/ONEPRO.md +60 -0
  401. package/one/things/crypto/ONEPROFAQ.md +22 -0
  402. package/one/things/crypto/ONEPROHOW.md +53 -0
  403. package/one/things/crypto/READMEAGENCY.md +64 -0
  404. package/one/things/crypto/VSL.md +45 -0
  405. package/one/things/crypto/WebsiteCopy.md +176 -0
  406. package/one/things/design-system.md +832 -0
  407. package/one/things/pay.one.ie.md +53 -0
  408. package/one/things/plans/one-protocol-and-payone-usage.md +82 -0
  409. package/one/things/plans/plan-connect-to-api.md +146 -0
  410. package/one/things/plans-u.md +905 -0
  411. package/one/things/products/Blockchain Products.md +6278 -0
  412. package/one/things/scripts-clean-mac.sh +409 -0
  413. package/one/things/todo-release.md +654 -0
  414. package/one/things/todo.md +9 -642
  415. package/one/things/video-script-backup.md +318 -0
  416. package/one/things/video-script-demo.md +382 -0
  417. package/one/things/video-script-ontology.md +0 -1
  418. package/one/things/video-script.md +361 -0
  419. package/package.json +12 -12
  420. package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
  421. package/.claude/hooks/__pycache__/todo.cpython-311.pyc +0 -0
  422. package/dist/commands/create-website.d.ts +0 -19
  423. package/dist/commands/create-website.d.ts.map +0 -1
  424. package/dist/commands/create-website.js +0 -231
  425. package/dist/commands/create-website.js.map +0 -1
  426. package/llms.txt +0 -257
  427. /package/one/{people → actors}/anthony-o-connell.md +0 -0
  428. /package/one/{people → actors}/people.md +0 -0
  429. /package/one/{knowledge → learning}/.obsidian/app.json +0 -0
  430. /package/one/{knowledge → learning}/.obsidian/appearance.json +0 -0
  431. /package/one/{knowledge → learning}/.obsidian/core-plugins.json +0 -0
  432. /package/one/{knowledge → learning}/.obsidian/ecommerce-ontology.md +0 -0
  433. /package/one/{knowledge → learning}/.obsidian/workspace.json +0 -0
  434. /package/one/{knowledge → learning}/100-inference-quick-reference.md +0 -0
  435. /package/one/{knowledge → learning}/ag-ui-protocol.md +0 -0
  436. /package/one/{knowledge → learning}/agent-onboard-usage.md +0 -0
  437. /package/one/{knowledge → learning}/agentic-commerce.md +0 -0
  438. /package/one/{knowledge → learning}/ai-agents-vs-memecoins-thesis.md +0 -0
  439. /package/one/{knowledge → learning}/ai-api-reference.md +0 -0
  440. /package/one/{knowledge → learning}/ai-platform.md +0 -0
  441. /package/one/{knowledge → learning}/ai-quickstart.md +0 -0
  442. /package/one/{knowledge → learning}/ai-sdk-implementation.md +0 -0
  443. /package/one/{knowledge → learning}/ai-token-crypto-analysis-framework.md +0 -0
  444. /package/one/{knowledge → learning}/ai-token-paradigm-shift-2025.md +0 -0
  445. /package/one/{knowledge → learning}/altcoin-cycle-prediction-ontology.md +0 -0
  446. /package/one/{knowledge → learning}/altcoin-cycle-trading-strategy.md +0 -0
  447. /package/one/{knowledge → learning}/architecture-any-backend.md +0 -0
  448. /package/one/{knowledge → learning}/architecture-diagram.md +0 -0
  449. /package/one/{knowledge → learning}/architecture-frontend.md +0 -0
  450. /package/one/{knowledge → learning}/architecture.md +0 -0
  451. /package/one/{knowledge → learning}/archived/ontology.old.md +0 -0
  452. /package/one/{knowledge → learning}/astro-effect-complete-vision.md +0 -0
  453. /package/one/{knowledge → learning}/astro-effect-simple-architecture.md +0 -0
  454. /package/one/{knowledge → learning}/audit-agent-onboard-alignment.md +0 -0
  455. /package/one/{knowledge → learning}/audit-agent-sales-alignment.md +0 -0
  456. /package/one/{knowledge → learning}/backend-api-reference.md +0 -0
  457. /package/one/{knowledge → learning}/cascading-context-specification.md +0 -0
  458. /package/one/{knowledge → learning}/claude-code-integration.md +0 -0
  459. /package/one/{knowledge → learning}/cli-claude-handoff.md +0 -0
  460. /package/one/{knowledge → learning}/context-engineering.md +0 -0
  461. /package/one/{knowledge → learning}/crypto-analysis-strategy.md +0 -0
  462. /package/one/{knowledge → learning}/crypto-cycle-2024-2025-analysis.md +0 -0
  463. /package/one/{knowledge → learning}/develop/design.md +0 -0
  464. /package/one/{knowledge → learning}/develop/index.md +0 -0
  465. /package/one/{knowledge → learning}/development-commands.md +0 -0
  466. /package/one/{knowledge → learning}/docs.md +0 -0
  467. /package/one/{knowledge → learning}/dsl.md +0 -0
  468. /package/one/{knowledge → learning}/event-driven-documentation.md +0 -0
  469. /package/one/{knowledge → learning}/files.md +0 -0
  470. /package/one/{knowledge → learning}/frontend.md +0 -0
  471. /package/one/{knowledge → learning}/games-english.md +0 -0
  472. /package/one/{knowledge → learning}/games.md +0 -0
  473. /package/one/{knowledge → learning}/generative-ui-patterns.md +0 -0
  474. /package/one/{knowledge → learning}/guidelines.md +0 -0
  475. /package/one/{knowledge → learning}/hono.md +0 -0
  476. /package/one/{knowledge → learning}/implementation-examples.md +0 -0
  477. /package/one/{knowledge → learning}/installation-folders.md +0 -0
  478. /package/one/{knowledge → learning}/institutional-cycle-paradigm-2025.md +0 -0
  479. /package/one/{knowledge → learning}/knowledge.md +0 -0
  480. /package/one/{knowledge → learning}/language.md +0 -0
  481. /package/one/{knowledge → learning}/lessons-learned.md +0 -0
  482. /package/one/{knowledge → learning}/lessons-website-building-focus.md +0 -0
  483. /package/one/{knowledge → learning}/merge-report.md +0 -0
  484. /package/one/{knowledge → learning}/metadata-system.md +0 -0
  485. /package/one/{knowledge → learning}/nine-padel-playbook.md +0 -0
  486. /package/one/{knowledge → learning}/ontology-blog.yaml +0 -0
  487. /package/one/{knowledge → learning}/ontology-cheatsheet.md +0 -0
  488. /package/one/{knowledge → learning}/ontology-community.yaml +0 -0
  489. /package/one/{knowledge → learning}/ontology-core-universal.md +0 -0
  490. /package/one/{knowledge → learning}/ontology-core.yaml +0 -0
  491. /package/one/{knowledge → learning}/ontology-courses.yaml +0 -0
  492. /package/one/{knowledge → learning}/ontology-creator.md +0 -0
  493. /package/one/{knowledge → learning}/ontology-crypto.md +0 -0
  494. /package/one/{knowledge → learning}/ontology-developer-guide.md +0 -0
  495. /package/one/{knowledge → learning}/ontology-documentation.md +0 -0
  496. /package/one/{knowledge → learning}/ontology-ecommerce.md +0 -0
  497. /package/one/{knowledge → learning}/ontology-education.md +0 -0
  498. /package/one/{knowledge → learning}/ontology-engineering-specification.md +0 -0
  499. /package/one/{knowledge → learning}/ontology-engineering.md +0 -0
  500. /package/one/{knowledge → learning}/ontology-files.yaml +0 -0
  501. /package/one/{knowledge → learning}/ontology-frontend-master.md +0 -0
  502. /package/one/{knowledge → learning}/ontology-frontend-specifications.md +0 -0
  503. /package/one/{knowledge → learning}/ontology-frontend.md +0 -0
  504. /package/one/{knowledge → learning}/ontology-index.md +0 -0
  505. /package/one/{knowledge → learning}/ontology-minimal.yaml +0 -0
  506. /package/one/{knowledge → learning}/ontology-portfolio.yaml +0 -0
  507. /package/one/{knowledge → learning}/ontology-quickstart.md +0 -0
  508. /package/one/{knowledge → learning}/ontology-release.md +0 -0
  509. /package/one/{knowledge → learning}/ontology-shop.yaml +0 -0
  510. /package/one/{knowledge → learning}/ontology-tokens.yaml +0 -0
  511. /package/one/{knowledge → learning}/ontology-tutorial.md +0 -0
  512. /package/one/{knowledge → learning}/ontology-video-script.md +0 -0
  513. /package/one/{knowledge → learning}/ontology-visual-guide.md +0 -0
  514. /package/one/{knowledge → learning}/ontology.yaml +0 -0
  515. /package/one/{knowledge → learning}/parallel-agents.md +0 -0
  516. /package/one/{knowledge → learning}/patterns/backend/convex-mutation-pattern.md +0 -0
  517. /package/one/{knowledge → learning}/patterns/backend/convex-query-pattern.md +0 -0
  518. /package/one/{knowledge → learning}/patterns/backend/mutation-template.md +0 -0
  519. /package/one/{knowledge → learning}/patterns/backend/query-template.md +0 -0
  520. /package/one/{knowledge → learning}/patterns/backend/service-template.md +0 -0
  521. /package/one/{knowledge → learning}/patterns/design/component-architecture.md +0 -0
  522. /package/one/{knowledge → learning}/patterns/design/index.md +0 -0
  523. /package/one/{knowledge → learning}/patterns/design/test-driven-design-pattern.md +0 -0
  524. /package/one/{knowledge → learning}/patterns/design/wireframe-template.md +0 -0
  525. /package/one/{knowledge → learning}/patterns/frontend/component-template.md +0 -0
  526. /package/one/{knowledge → learning}/patterns/frontend/form-template.md +0 -0
  527. /package/one/{knowledge → learning}/patterns/frontend/page-template.md +0 -0
  528. /package/one/{knowledge → learning}/patterns/frontend/react-component-pattern.md +0 -0
  529. /package/one/{knowledge → learning}/patterns/test/acceptance-criteria-template.md +0 -0
  530. /package/one/{knowledge → learning}/patterns/test/technical-test-template.md +0 -0
  531. /package/one/{knowledge → learning}/patterns/test/test-driven-pattern.md +0 -0
  532. /package/one/{knowledge → learning}/patterns/test/user-flow-template.md +0 -0
  533. /package/one/{knowledge → learning}/performance.md +0 -0
  534. /package/one/{knowledge → learning}/provider-agnostic-content.md +0 -0
  535. /package/one/{knowledge → learning}/provider-creation-guide.md +0 -0
  536. /package/one/{knowledge → learning}/quality-loop.md +0 -0
  537. /package/one/{knowledge → learning}/quick-start-ontology-mapping.md +0 -0
  538. /package/one/{knowledge → learning}/readme-architecture.md +0 -0
  539. /package/one/{knowledge → learning}/readme.md +0 -0
  540. /package/one/{knowledge → learning}/rules.md +0 -0
  541. /package/one/{knowledge → learning}/score.md +0 -0
  542. /package/one/{knowledge → learning}/specifications.md +0 -0
  543. /package/one/{knowledge → learning}/tags.md +0 -0
  544. /package/one/{knowledge → learning}/todo-template.md +0 -0
  545. /package/one/{knowledge → learning}/todo.md +0 -0
  546. /package/one/{knowledge → learning}/troubleshooting.md +0 -0
  547. /package/one/{knowledge → learning}/typescript-patterns.md +0 -0
  548. /package/one/{knowledge → learning}/universal-generation-language.md +0 -0
  549. /package/one/{knowledge → learning}/x402-research.md +0 -0
  550. /package/one/{connections → paths}/a2a.md +0 -0
  551. /package/one/{connections → paths}/acp.md +0 -0
  552. /package/one/{connections → paths}/acps.md +0 -0
  553. /package/one/{connections → paths}/agentkit.md +0 -0
  554. /package/one/{connections → paths}/agui.md +0 -0
  555. /package/one/{connections → paths}/any-backend.md +0 -0
  556. /package/one/{connections → paths}/ap2.md +0 -0
  557. /package/one/{connections → paths}/api/queries-reference.md +0 -0
  558. /package/one/{connections → paths}/api-docs.md +0 -0
  559. /package/one/{connections → paths}/api-reference.md +0 -0
  560. /package/one/{connections → paths}/api.md +0 -0
  561. /package/one/{connections → paths}/architecture-diagram.md +0 -0
  562. /package/one/{connections → paths}/communications.md +0 -0
  563. /package/one/{connections → paths}/connections.md +0 -0
  564. /package/one/{connections → paths}/copilotkit.md +0 -0
  565. /package/one/{connections → paths}/documentation.md +0 -0
  566. /package/one/{connections → paths}/effect.md +0 -0
  567. /package/one/{connections → paths}/elizaos.md +0 -0
  568. /package/one/{connections → paths}/groups.md +0 -0
  569. /package/one/{connections → paths}/inference.md +0 -0
  570. /package/one/{connections → paths}/integration-examples.md +0 -0
  571. /package/one/{connections → paths}/integration-guide.md +0 -0
  572. /package/one/{connections → paths}/integration-phase2.md +0 -0
  573. /package/one/{connections → paths}/kyc.md +0 -0
  574. /package/one/{connections → paths}/mcp.md +0 -0
  575. /package/one/{connections → paths}/membership.md +0 -0
  576. /package/one/{connections → paths}/middleware.md +0 -0
  577. /package/one/{connections → paths}/multitenant.md +0 -0
  578. /package/one/{connections → paths}/n8n.md +0 -0
  579. /package/one/{connections → paths}/patterns.md +0 -0
  580. /package/one/{connections → paths}/protocols.md +0 -0
  581. /package/one/{connections → paths}/relationships.md +0 -0
  582. /package/one/{connections → paths}/schema.md +0 -0
  583. /package/one/{connections → paths}/service-layer.md +0 -0
  584. /package/one/{connections → paths}/vectors.md +0 -0
  585. /package/one/{connections → paths}/wordpress.md +0 -0
  586. /package/one/{connections → paths}/workflow-copy.md +0 -0
  587. /package/one/{connections → paths}/workflow-examples.md +0 -0
  588. /package/one/{connections → paths}/workflow-onboarding.md +0 -0
  589. /package/one/{connections → paths}/workflow.md +0 -0
  590. /package/one/{connections → paths}/workflows/delegation.md +0 -0
  591. /package/one/{connections → paths}/workflows/frontend.md +0 -0
  592. /package/one/{connections → paths}/workflows/strategy.md +0 -0
  593. /package/one/{connections → paths}/workflows/tasks.md +0 -0
  594. /package/one/{connections → paths}/x402-baazar.md +0 -0
  595. /package/one/{connections → paths}/x402.md +0 -0
@@ -0,0 +1,1663 @@
1
+ ---
2
+ title: ONE Ontology Complete Guide
3
+ dimension: events
4
+ category: ONE Ontology-COMPLETE-GUIDE.md
5
+ tags: 6-dimensions, architecture, backend, frontend, ontology
6
+ related_dimensions: knowledge, people, things
7
+ scope: global
8
+ created: 2025-11-03
9
+ updated: 2025-11-03
10
+ version: 1.0.0
11
+ ai_context: |
12
+ This document is part of the events dimension in the ONE Ontology-COMPLETE-GUIDE.md category.
13
+ Location: one/events/ONE Ontology-COMPLETE-GUIDE.md
14
+ Purpose: Documents ONE Ontology architecture: complete guide
15
+ Related dimensions: knowledge, people, things
16
+ For AI agents: Read this to understand ONE Ontology COMPLETE GUIDE.
17
+ ---
18
+
19
+ # ONE Ontology Architecture: Complete Guide
20
+
21
+ **Version:** 1.0.0
22
+ **Last Updated:** 2025-10-20
23
+ **Status:** Production Ready
24
+
25
+ ---
26
+
27
+ ## Table of Contents
28
+
29
+ 1. [Introduction](#1-introduction)
30
+ 2. [Quick Start (5 Minutes)](#2-quick-start-5-minutes)
31
+ 3. [Architecture Overview](#3-architecture-overview)
32
+ 4. [Core Concepts](#4-core-concepts)
33
+ 5. [YAML Ontology Format](#5-yaml-ontology-format)
34
+ 6. [Type Generation System](#6-type-generation-system)
35
+ 7. [Backend Integration](#7-backend-integration)
36
+ 8. [Frontend Integration](#8-frontend-integration)
37
+ 9. [Creating Your First Feature](#9-creating-your-first-feature)
38
+ 10. [Advanced Patterns](#10-advanced-patterns)
39
+ 11. [Migration Guide](#11-migration-guide)
40
+ 12. [API Reference](#12-api-reference)
41
+ 13. [Troubleshooting](#13-troubleshooting)
42
+ 14. [FAQs](#14-faqs)
43
+ 15. [Resources](#15-resources)
44
+
45
+ ---
46
+
47
+ ## 1. Introduction
48
+
49
+ ### What is the ONE Ontology Architecture?
50
+
51
+ The **ONE Ontology Architecture** is a revolutionary approach to feature development in the ONE Platform. Instead of hardcoding all possible entity types into a monolithic schema, features bring their own data models (ontologies) that compose cleanly at runtime.
52
+
53
+ **The Problem It Solves:**
54
+
55
+ Traditional platforms suffer from **schema bloat**:
56
+
57
+ ```typescript
58
+ // Traditional approach - ALL types hardcoded
59
+ type EntityType =
60
+ | "user"
61
+ | "page"
62
+ | "blog_post"
63
+ | "product"
64
+ | "course"
65
+ | "video"
66
+ | "podcast"
67
+ | "nft"
68
+ | "token";
69
+ // ... 100+ more types you'll never use
70
+ ```
71
+
72
+ This leads to:
73
+
74
+ - Large bundle sizes (load types you don't need)
75
+ - Tight coupling (can't change one without affecting all)
76
+ - Poor developer experience (autocomplete suggests 100+ irrelevant types)
77
+ - Impossible multi-backend support (all backends must support all types)
78
+
79
+ **The Solution:**
80
+
81
+ Feature-specific ontologies that compose at runtime:
82
+
83
+ ```yaml
84
+ # /one/knowledge/ontology-core.yaml (always loaded)
85
+ feature: core
86
+ thingTypes:
87
+ - name: page
88
+ - name: user
89
+ - name: file
90
+
91
+ # /one/knowledge/ontology-blog.yaml (optional)
92
+ feature: blog
93
+ extends: core
94
+ thingTypes:
95
+ - name: blog_post
96
+ - name: blog_category
97
+
98
+ # /one/knowledge/ontology-shop.yaml (optional)
99
+ feature: shop
100
+ extends: core
101
+ thingTypes:
102
+ - name: product
103
+ - name: order
104
+ ```
105
+
106
+ Enable only the features you need:
107
+
108
+ ```bash
109
+ # .env.local
110
+ PUBLIC_FEATURES="blog" # Only loads core + blog (7 types)
111
+ # Not: 'shop', 'courses', 'videos', etc. (those remain disabled)
112
+ ```
113
+
114
+ ### Key Benefits
115
+
116
+ 1. **Feature Modularity** - Each feature is self-contained with its own data model
117
+ 2. **Type Safety** - Full TypeScript validation at compile and runtime
118
+ 3. **Zero Schema Migration** - Add/remove features without database changes
119
+ 4. **Backend Flexibility** - Run different backends with different feature sets
120
+ 5. **Composability** - Features extend and build on each other cleanly
121
+ 6. **Performance** - Load only what you need (98% smaller schemas)
122
+ 7. **Developer Experience** - Clear, focused autocomplete with only relevant types
123
+
124
+ ### Who Should Read This
125
+
126
+ - **Developers** building features on the ONE Platform
127
+ - **Architects** designing multi-tenant systems
128
+ - **Teams** migrating from monolithic schemas to modular ontologies
129
+ - **Product Managers** understanding feature composition capabilities
130
+
131
+ ---
132
+
133
+ ## 2. Quick Start (5 Minutes)
134
+
135
+ ### Prerequisites
136
+
137
+ - Node.js 22+ and Bun installed
138
+ - ONE Platform repository cloned
139
+ - Basic understanding of TypeScript and YAML
140
+
141
+ ### Step 1: Enable Features
142
+
143
+ Edit your environment configuration:
144
+
145
+ ```bash
146
+ # backend/.env.local
147
+ PUBLIC_FEATURES="blog,portfolio"
148
+ ```
149
+
150
+ This tells the platform to load the `blog` and `portfolio` ontology extensions in addition to the core ontology (which is always loaded).
151
+
152
+ ### Step 2: Generate Types
153
+
154
+ From the backend directory:
155
+
156
+ ```bash
157
+ cd backend
158
+ bun run scripts/generate-ontology-types.ts
159
+ ```
160
+
161
+ Expected output:
162
+
163
+ ```
164
+ 🎯 Loading ontologies...
165
+ Features: core, blog, portfolio
166
+
167
+ ✅ Composition complete:
168
+ Thing types: 9
169
+ Connection types: 6
170
+ Event types: 7
171
+
172
+ ✅ Validation passed
173
+
174
+ 📝 Generating TypeScript types...
175
+
176
+ ✅ Types generated: backend/convex/types/ontology.ts
177
+ ```
178
+
179
+ ### Step 3: Deploy Schema
180
+
181
+ Start Convex development server:
182
+
183
+ ```bash
184
+ npx convex dev
185
+ ```
186
+
187
+ Convex automatically reads the generated types and updates schema validation.
188
+
189
+ ### Step 4: Verify
190
+
191
+ Check that your schema now validates blog and portfolio types:
192
+
193
+ ```typescript
194
+ // backend/convex/mutations/blog.ts
195
+ import { mutation } from "./_generated/server";
196
+ import { v } from "convex/values";
197
+
198
+ export const createBlogPost = mutation({
199
+ args: {
200
+ title: v.string(),
201
+ content: v.string(),
202
+ },
203
+ handler: async (ctx, args) => {
204
+ // TypeScript knows 'blog_post' is a valid type!
205
+ const postId = await ctx.db.insert("things", {
206
+ type: "blog_post", // ✅ Type-safe
207
+ name: args.title,
208
+ properties: {
209
+ title: args.title,
210
+ content: args.content,
211
+ publishedAt: Date.now(),
212
+ },
213
+ status: "active",
214
+ createdAt: Date.now(),
215
+ updatedAt: Date.now(),
216
+ });
217
+
218
+ return postId;
219
+ },
220
+ });
221
+ ```
222
+
223
+ **Done!** You're now using the ONE Ontology architecture.
224
+
225
+ ---
226
+
227
+ ## 3. Architecture Overview
228
+
229
+ ### System Layers
230
+
231
+ ```
232
+ ┌─────────────────────────────────────────────────────────────────┐
233
+ │ LAYER 1: ONTOLOGY DEFINITIONS (YAML Files) │
234
+ │ /one/knowledge/ │
235
+ │ ├─ ontology-core.yaml (always loaded) │
236
+ │ ├─ ontology-blog.yaml (if feature enabled) │
237
+ │ ├─ ontology-portfolio.yaml (if feature enabled) │
238
+ │ ├─ ontology-courses.yaml (if feature enabled) │
239
+ │ ├─ ontology-community.yaml (if feature enabled) │
240
+ │ └─ ontology-tokens.yaml (if feature enabled) │
241
+ └─────────────────────────────────────────────────────────────────┘
242
+ ↓
243
+ ┌─────────────────────────────────────────────────────────────────┐
244
+ │ LAYER 2: BUILD-TIME PROCESSING │
245
+ │ /backend/lib/ │
246
+ │ ├─ ontology-loader.ts (loads & composes YAML) │
247
+ │ ├─ ontology-validator.ts (validates composition) │
248
+ │ └─ type-generator.ts (generates TypeScript) │
249
+ │ │
250
+ │ /backend/scripts/ │
251
+ │ └─ generate-ontology-types.ts (CLI tool) │
252
+ └─────────────────────────────────────────────────────────────────┘
253
+ ↓
254
+ ┌─────────────────────────────────────────────────────────────────┐
255
+ │ LAYER 3: GENERATED TYPES │
256
+ │ /backend/convex/types/ontology.ts (auto-generated) │
257
+ │ ├─ type ThingType = 'page' | 'user' | 'blog_post' | ... │
258
+ │ ├─ type ConnectionType = 'created_by' | 'posted_in' | ... │
259
+ │ ├─ type EventType = 'thing_created' | 'blog_published' ... │
260
+ │ ├─ const THING_TYPES: ThingType[] = [...] │
261
+ │ └─ function isThingType(value): value is ThingType │
262
+ └─────────────────────────────────────────────────────────────────┘
263
+ ↓
264
+ ┌─────────────────────────────────────────────────────────────────┐
265
+ │ LAYER 4: RUNTIME VALIDATION │
266
+ │ /backend/convex/schema.ts │
267
+ │ ├─ entities table: type = union(...THING_TYPES) │
268
+ │ ├─ connections table: type = union(...CONNECTION_TYPES) │
269
+ │ └─ events table: type = union(...EVENT_TYPES) │
270
+ └─────────────────────────────────────────────────────────────────┘
271
+ ↓
272
+ ┌─────────────────────────────────────────────────────────────────┐
273
+ │ LAYER 5: APPLICATION CODE │
274
+ │ /backend/convex/mutations/*.ts │
275
+ │ /backend/convex/queries/*.ts │
276
+ │ /web/src/components/features/*.tsx │
277
+ └─────────────────────────────────────────────────────────────────┘
278
+ ```
279
+
280
+ ### Composition Flow
281
+
282
+ 1. **Define** features as YAML ontologies
283
+ 2. **Enable** features via `PUBLIC_FEATURES` environment variable
284
+ 3. **Generate** TypeScript types from enabled features
285
+ 4. **Validate** at compile-time (TypeScript) and runtime (Convex schema)
286
+ 5. **Use** type-safe APIs in your application code
287
+
288
+ ### File Structure
289
+
290
+ ```
291
+ ONE/
292
+ ├── one/knowledge/
293
+ │ ├── ontology-core.yaml # Core types (always present)
294
+ │ ├── ontology-blog.yaml # Blog feature
295
+ │ ├── ontology-portfolio.yaml # Portfolio feature
296
+ │ ├── ontology-courses.yaml # E-learning feature
297
+ │ ├── ontology-community.yaml # Social features
298
+ │ └── ontology-tokens.yaml # Token economy
299
+ │
300
+ ├── backend/
301
+ │ ├── lib/
302
+ │ │ ├── ontology-loader.ts # YAML loader & composition
303
+ │ │ ├── ontology-validator.ts # Composition validator
304
+ │ │ └── type-generator.ts # TypeScript generator
305
+ │ │
306
+ │ ├── scripts/
307
+ │ │ └── generate-ontology-types.ts # CLI build tool
308
+ │ │
309
+ │ └── convex/
310
+ │ ├── types/
311
+ │ │ └── ontology.ts # Generated types (auto)
312
+ │ │
313
+ │ ├── schema.ts # Convex schema (uses generated types)
314
+ │ ├── mutations/ # Write operations
315
+ │ └── queries/ # Read operations
316
+ │
317
+ └── web/
318
+ └── src/
319
+ └── components/
320
+ └── features/ # Feature-specific UI
321
+ ```
322
+
323
+ ---
324
+
325
+ ## 4. Core Concepts
326
+
327
+ ### The 6-Dimension Ontology
328
+
329
+ The ONE Platform is built on a universal 6-dimension ontology that models reality:
330
+
331
+ ```
332
+ ┌──────────────────────────────────────────────────────────────┐
333
+ │ 6-DIMENSION ONTOLOGY │
334
+ ├──────────────────────────────────────────────────────────────┤
335
+ │ 1. GROUPS → Who belongs where (hierarchical containers)│
336
+ │ 2. PEOPLE → Who can do what (authorization & roles) │
337
+ │ 3. THINGS → What exists (all entities) │
338
+ │ 4. CONNECTIONS → How things relate (relationships) │
339
+ │ 5. EVENTS → What happened (audit trail) │
340
+ │ 6. KNOWLEDGE → What we know (embeddings & search) │
341
+ └──────────────────────────────────────────────────────────────┘
342
+ ```
343
+
344
+ **The ONE Ontology architecture extends the THINGS, CONNECTIONS, and EVENTS dimensions.**
345
+
346
+ ### Feature Ontologies
347
+
348
+ A **feature ontology** defines the data model for a specific feature:
349
+
350
+ ```yaml
351
+ feature: blog
352
+ extends: core
353
+ description: Blog and content publishing
354
+
355
+ thingTypes:
356
+ - name: blog_post
357
+ - name: blog_category
358
+
359
+ connectionTypes:
360
+ - name: posted_in
361
+
362
+ eventTypes:
363
+ - name: blog_post_published
364
+ - name: blog_post_viewed
365
+ ```
366
+
367
+ ### Ontology Composition
368
+
369
+ Multiple ontologies **compose** into a unified schema:
370
+
371
+ ```
372
+ Core Ontology (5 thing types)
373
+ +
374
+ Blog Ontology (2 thing types)
375
+ +
376
+ Portfolio Ontology (2 thing types)
377
+ =
378
+ Composed Ontology (9 thing types)
379
+ ```
380
+
381
+ Composition rules:
382
+
383
+ 1. **Core is always included** - Even if not explicitly enabled
384
+ 2. **No duplicate types** - Validator prevents type name conflicts
385
+ 3. **Dependency resolution** - Features load in correct order (parents before children)
386
+ 4. **Type safety** - Generated TypeScript types enforce valid compositions
387
+
388
+ ### Type Generation
389
+
390
+ From composed ontology, the system generates:
391
+
392
+ ```typescript
393
+ // 1. Union types
394
+ export type ThingType = "page" | "user" | "blog_post" | "project";
395
+
396
+ // 2. Constant arrays
397
+ export const THING_TYPES: readonly ThingType[] = [
398
+ "page",
399
+ "user",
400
+ "blog_post",
401
+ "project",
402
+ ];
403
+
404
+ // 3. Type guards
405
+ export function isThingType(value: string): value is ThingType {
406
+ return THING_TYPES.includes(value as ThingType);
407
+ }
408
+
409
+ // 4. Feature metadata
410
+ export const ENABLED_FEATURES = ["core", "blog", "portfolio"];
411
+
412
+ export function hasFeature(feature: string): boolean {
413
+ return ENABLED_FEATURES.includes(feature);
414
+ }
415
+ ```
416
+
417
+ ---
418
+
419
+ ## 5. YAML Ontology Format
420
+
421
+ ### Complete Specification
422
+
423
+ ```yaml
424
+ # Feature identifier (lowercase, no spaces)
425
+ feature: myfeature
426
+
427
+ # Base feature to extend (usually 'core', or null for standalone)
428
+ extends: core
429
+
430
+ # Semantic version
431
+ version: "1.0.0"
432
+
433
+ # Human-readable description
434
+ description: "Brief description of feature purpose"
435
+
436
+ # Optional: Explicit dependencies (in addition to 'extends')
437
+ dependencies:
438
+ - otherfeat
439
+
440
+ # ============================================================================
441
+ # THING TYPES - Entities that exist
442
+ # ============================================================================
443
+
444
+ thingTypes:
445
+ - name: my_entity # Type name (lowercase_underscore)
446
+ description: "What this thing represents"
447
+ properties:
448
+ # Primitive types
449
+ name: string # Text values
450
+ count: number # Numeric values
451
+ active: boolean # True/false values
452
+
453
+ # Array types
454
+ tags: string[] # Array of strings
455
+ scores: number[] # Array of numbers
456
+
457
+ # Complex types
458
+ metadata: object # JSON object (any structure)
459
+
460
+ # ============================================================================
461
+ # CONNECTION TYPES - Relationships between entities
462
+ # ============================================================================
463
+
464
+ connectionTypes:
465
+ - name: my_connection # Connection name (lowercase_underscore)
466
+ description: "How things relate"
467
+ fromType: source_type # Source thing type (or '*' for any)
468
+ toType: target_type # Target thing type (or '*' for any)
469
+
470
+ # ============================================================================
471
+ # EVENT TYPES - Actions that occur
472
+ # ============================================================================
473
+
474
+ eventTypes:
475
+ - name: my_event_happened # Event name (past tense, lowercase_underscore)
476
+ description: "What action occurred"
477
+ thingType: my_entity # Thing type this event applies to (or '*' for any)
478
+ ```
479
+
480
+ ### Naming Conventions
481
+
482
+ **Feature Names:**
483
+
484
+ - Lowercase, no spaces
485
+ - Use hyphens for multi-word features
486
+ - Examples: `core`, `blog`, `shop`, `social-media`
487
+
488
+ **Thing Type Names:**
489
+
490
+ - Lowercase with underscores
491
+ - Singular nouns
492
+ - Examples: `blog_post`, `product`, `user`, `shopping_cart`
493
+
494
+ **Connection Type Names:**
495
+
496
+ - Lowercase with underscores
497
+ - Action verbs (present tense)
498
+ - Examples: `created_by`, `posted_in`, `purchased`, `in_stock`
499
+
500
+ **Event Type Names:**
501
+
502
+ - Lowercase with underscores
503
+ - Past tense verbs
504
+ - Examples: `blog_post_published`, `product_created`, `order_placed`
505
+
506
+ ### Property Types
507
+
508
+ | Type | Example | Description |
509
+ | ---------- | ------------------ | --------------------------- |
510
+ | `string` | `"Hello"` | Text values |
511
+ | `number` | `42`, `3.14` | Integer or float |
512
+ | `boolean` | `true`, `false` | True/false values |
513
+ | `object` | `{ key: "value" }` | JSON object (any structure) |
514
+ | `string[]` | `["a", "b"]` | Array of strings |
515
+ | `number[]` | `[1, 2, 3]` | Array of numbers |
516
+
517
+ ### Inheritance with `extends`
518
+
519
+ Features can inherit types from a base feature:
520
+
521
+ ```yaml
522
+ # ontology-advanced-blog.yaml
523
+ feature: advanced-blog
524
+ extends: blog # Inherits: blog_post, blog_category
525
+
526
+ thingTypes:
527
+ - name: blog_series # New type (builds on blog)
528
+ - name: blog_newsletter
529
+ ```
530
+
531
+ **Inheritance Rules:**
532
+
533
+ 1. **Transitive** - If `A extends B` and `B extends C`, then `A` gets types from both `B` and `C`
534
+ 2. **No circular dependencies** - `A → B → A` will error
535
+ 3. **No override** - You can't redefine types from base features
536
+
537
+ ### Complete Example: Blog Ontology
538
+
539
+ ```yaml
540
+ # /one/knowledge/ontology-blog.yaml
541
+
542
+ feature: blog
543
+ extends: core
544
+ version: "1.0.0"
545
+ description: "Blog and content publishing feature"
546
+
547
+ thingTypes:
548
+ - name: blog_post
549
+ description: "A blog post or article"
550
+ properties:
551
+ title: string
552
+ slug: string
553
+ content: string
554
+ excerpt: string
555
+ featuredImage: string
556
+ publishedAt: number
557
+ author: string
558
+ status: string
559
+
560
+ - name: blog_category
561
+ description: "A blog category for organizing posts"
562
+ properties:
563
+ name: string
564
+ slug: string
565
+ description: string
566
+
567
+ connectionTypes:
568
+ - name: posted_in
569
+ description: "Blog post posted in category"
570
+ fromType: blog_post
571
+ toType: blog_category
572
+
573
+ - name: authored
574
+ description: "Blog post authored by user"
575
+ fromType: blog_post
576
+ toType: user
577
+
578
+ eventTypes:
579
+ - name: blog_post_published
580
+ description: "Blog post was published"
581
+ thingType: blog_post
582
+
583
+ - name: blog_post_viewed
584
+ description: "Someone viewed a blog post"
585
+ thingType: blog_post
586
+ ```
587
+
588
+ ---
589
+
590
+ ## 6. Type Generation System
591
+
592
+ ### How It Works
593
+
594
+ The type generator:
595
+
596
+ 1. **Loads** enabled features from `PUBLIC_FEATURES` environment variable
597
+ 2. **Reads** YAML files from `/one/knowledge/ontology-{feature}.yaml`
598
+ 3. **Resolves** dependencies (handles `extends` relationships)
599
+ 4. **Merges** types from all enabled features
600
+ 5. **Validates** composition (no duplicates, no conflicts)
601
+ 6. **Generates** TypeScript code with validation functions
602
+ 7. **Writes** output to `backend/convex/types/ontology.ts`
603
+
604
+ ### Generated Code Structure
605
+
606
+ ```typescript
607
+ // backend/convex/types/ontology.ts (auto-generated)
608
+
609
+ /**
610
+ * Auto-generated ontology types
611
+ * DO NOT EDIT MANUALLY - Changes will be overwritten
612
+ *
613
+ * Generated from features: core, blog, portfolio
614
+ * Generation time: 2025-10-20T12:34:56.789Z
615
+ */
616
+
617
+ // ============================================================================
618
+ // TYPE UNIONS
619
+ // ============================================================================
620
+
621
+ export type ThingType =
622
+ | "page"
623
+ | "user"
624
+ | "file"
625
+ | "link"
626
+ | "note"
627
+ | "blog_post"
628
+ | "blog_category"
629
+ | "project"
630
+ | "case_study";
631
+
632
+ export type ConnectionType =
633
+ | "created_by"
634
+ | "updated_by"
635
+ | "viewed_by"
636
+ | "favorited_by"
637
+ | "posted_in"
638
+ | "authored";
639
+
640
+ export type EventType =
641
+ | "thing_created"
642
+ | "thing_updated"
643
+ | "thing_deleted"
644
+ | "thing_viewed"
645
+ | "blog_post_published"
646
+ | "blog_post_viewed"
647
+ | "project_viewed";
648
+
649
+ // ============================================================================
650
+ // CONSTANT ARRAYS
651
+ // ============================================================================
652
+
653
+ export const THING_TYPES: readonly ThingType[] = [
654
+ "page",
655
+ "user",
656
+ "file",
657
+ "link",
658
+ "note",
659
+ "blog_post",
660
+ "blog_category",
661
+ "project",
662
+ "case_study",
663
+ ] as const;
664
+
665
+ export const CONNECTION_TYPES: readonly ConnectionType[] = [
666
+ "created_by",
667
+ "updated_by",
668
+ "viewed_by",
669
+ "favorited_by",
670
+ "posted_in",
671
+ "authored",
672
+ ] as const;
673
+
674
+ export const EVENT_TYPES: readonly EventType[] = [
675
+ "thing_created",
676
+ "thing_updated",
677
+ "thing_deleted",
678
+ "thing_viewed",
679
+ "blog_post_published",
680
+ "blog_post_viewed",
681
+ "project_viewed",
682
+ ] as const;
683
+
684
+ // ============================================================================
685
+ // TYPE GUARDS
686
+ // ============================================================================
687
+
688
+ export function isThingType(value: string): value is ThingType {
689
+ return THING_TYPES.includes(value as ThingType);
690
+ }
691
+
692
+ export function isConnectionType(value: string): value is ConnectionType {
693
+ return CONNECTION_TYPES.includes(value as ConnectionType);
694
+ }
695
+
696
+ export function isEventType(value: string): value is EventType {
697
+ return EVENT_TYPES.includes(value as EventType);
698
+ }
699
+
700
+ // ============================================================================
701
+ // FEATURE HELPERS
702
+ // ============================================================================
703
+
704
+ export const ENABLED_FEATURES = ["core", "blog", "portfolio"] as const;
705
+
706
+ export function hasFeature(feature: string): boolean {
707
+ return ENABLED_FEATURES.includes(feature);
708
+ }
709
+
710
+ // ============================================================================
711
+ // METADATA
712
+ // ============================================================================
713
+
714
+ export const ONTOLOGY_METADATA = {
715
+ features: ["core", "blog", "portfolio"],
716
+ generatedAt: "2025-10-20T12:34:56.789Z",
717
+ thingTypeCount: 9,
718
+ connectionTypeCount: 6,
719
+ eventTypeCount: 7,
720
+ } as const;
721
+ ```
722
+
723
+ ### Running the Generator
724
+
725
+ **Manual generation:**
726
+
727
+ ```bash
728
+ cd backend
729
+ PUBLIC_FEATURES="blog,portfolio" bun run scripts/generate-ontology-types.ts
730
+ ```
731
+
732
+ **Automatic generation (recommended):**
733
+
734
+ Add to `package.json`:
735
+
736
+ ```json
737
+ {
738
+ "scripts": {
739
+ "dev": "bun run scripts/generate-ontology-types.ts && npx convex dev",
740
+ "deploy": "bun run scripts/generate-ontology-types.ts && npx convex deploy"
741
+ }
742
+ }
743
+ ```
744
+
745
+ Now types regenerate automatically before every dev/deploy!
746
+
747
+ ---
748
+
749
+ ## 7. Backend Integration
750
+
751
+ ### Schema Integration
752
+
753
+ Update your Convex schema to use generated types:
754
+
755
+ ```typescript
756
+ // backend/convex/schema.ts
757
+ import { defineSchema, defineTable } from "convex/server";
758
+ import { v } from "convex/values";
759
+ import { THING_TYPES, CONNECTION_TYPES, EVENT_TYPES } from "./types/ontology";
760
+
761
+ // Generate union from ontology types
762
+ const thingTypeUnion = v.union(...THING_TYPES.map((t) => v.literal(t)));
763
+ const connectionTypeUnion = v.union(
764
+ ...CONNECTION_TYPES.map((t) => v.literal(t))
765
+ );
766
+ const eventTypeUnion = v.union(...EVENT_TYPES.map((t) => v.literal(t)));
767
+
768
+ export default defineSchema({
769
+ things: defineTable({
770
+ groupId: v.id("groups"),
771
+ type: thingTypeUnion, // ✅ Generated from ontology
772
+ name: v.string(),
773
+ properties: v.any(),
774
+ status: v.string(),
775
+ createdAt: v.number(),
776
+ updatedAt: v.number(),
777
+ })
778
+ .index("by_group_type", ["groupId", "type"])
779
+ .index("by_type", ["type"]),
780
+
781
+ connections: defineTable({
782
+ groupId: v.id("groups"),
783
+ fromThingId: v.id("things"),
784
+ toThingId: v.id("things"),
785
+ relationshipType: connectionTypeUnion, // ✅ Generated
786
+ metadata: v.any(),
787
+ createdAt: v.number(),
788
+ })
789
+ .index("by_from", ["fromThingId", "relationshipType"])
790
+ .index("by_to", ["toThingId", "relationshipType"]),
791
+
792
+ events: defineTable({
793
+ groupId: v.id("groups"),
794
+ type: eventTypeUnion, // ✅ Generated
795
+ actorId: v.optional(v.string()),
796
+ targetId: v.optional(v.id("things")),
797
+ timestamp: v.number(),
798
+ metadata: v.any(),
799
+ })
800
+ .index("by_target", ["targetId", "timestamp"])
801
+ .index("by_type", ["type", "timestamp"]),
802
+ });
803
+ ```
804
+
805
+ ### Mutations with Type Validation
806
+
807
+ ```typescript
808
+ // backend/convex/mutations/entities.ts
809
+ import { mutation } from "./_generated/server";
810
+ import { v } from "convex/values";
811
+ import { isThingType, type ThingType } from "./types/ontology";
812
+
813
+ export const create = mutation({
814
+ args: {
815
+ groupId: v.id("groups"),
816
+ type: v.string(),
817
+ name: v.string(),
818
+ properties: v.any(),
819
+ },
820
+ handler: async (ctx, args) => {
821
+ // Runtime validation
822
+ if (!isThingType(args.type)) {
823
+ throw new Error(
824
+ `Invalid thing type: "${args.type}". ` +
825
+ `Valid types: ${THING_TYPES.join(", ")}`
826
+ );
827
+ }
828
+
829
+ // Now TypeScript knows args.type is valid
830
+ const thingId = await ctx.db.insert("things", {
831
+ groupId: args.groupId,
832
+ type: args.type as ThingType,
833
+ name: args.name,
834
+ properties: args.properties,
835
+ status: "draft",
836
+ createdAt: Date.now(),
837
+ updatedAt: Date.now(),
838
+ });
839
+
840
+ // Log creation event
841
+ await ctx.db.insert("events", {
842
+ groupId: args.groupId,
843
+ type: "thing_created",
844
+ actorId: ctx.auth?.getUserIdentity()?.tokenIdentifier,
845
+ targetId: thingId,
846
+ timestamp: Date.now(),
847
+ metadata: { thingType: args.type },
848
+ });
849
+
850
+ return thingId;
851
+ },
852
+ });
853
+ ```
854
+
855
+ ### Queries with Feature Detection
856
+
857
+ ```typescript
858
+ // backend/convex/queries/entities.ts
859
+ import { query } from "./_generated/server";
860
+ import { v } from "convex/values";
861
+ import { hasFeature, THING_TYPES } from "./types/ontology";
862
+
863
+ export const listContent = query({
864
+ args: {
865
+ groupId: v.id("groups"),
866
+ },
867
+ handler: async (ctx, args) => {
868
+ // Build type filter based on enabled features
869
+ const contentTypes: string[] = ["page"]; // Core type
870
+
871
+ if (hasFeature("blog")) {
872
+ contentTypes.push("blog_post");
873
+ }
874
+
875
+ if (hasFeature("portfolio")) {
876
+ contentTypes.push("project", "case_study");
877
+ }
878
+
879
+ // Query entities
880
+ const entities = await ctx.db
881
+ .query("things")
882
+ .withIndex("by_group_type", (q) => q.eq("groupId", args.groupId))
883
+ .filter((q) =>
884
+ q.or(...contentTypes.map((type) => q.eq(q.field("type"), type)))
885
+ )
886
+ .collect();
887
+
888
+ return entities;
889
+ },
890
+ });
891
+ ```
892
+
893
+ ---
894
+
895
+ ## 8. Frontend Integration
896
+
897
+ ### React Components with Type Safety
898
+
899
+ ```typescript
900
+ // web/src/components/features/blog/BlogPostList.tsx
901
+ import { useQuery } from 'convex/react';
902
+ import { api } from '@/convex/_generated/api';
903
+ import type { Id } from '@/convex/_generated/dataModel';
904
+
905
+ interface BlogPostListProps {
906
+ groupId: Id<'groups'>;
907
+ }
908
+
909
+ export function BlogPostList({ groupId }: BlogPostListProps) {
910
+ const posts = useQuery(api.queries.blog.list, { groupId });
911
+
912
+ if (posts === undefined) {
913
+ return <div>Loading...</div>;
914
+ }
915
+
916
+ if (posts.length === 0) {
917
+ return <div>No blog posts yet.</div>;
918
+ }
919
+
920
+ return (
921
+ <div className="space-y-4">
922
+ {posts.map((post) => (
923
+ <article key={post._id} className="border p-4 rounded">
924
+ <h2 className="text-2xl font-bold">{post.properties.title}</h2>
925
+ <p className="text-gray-600">{post.properties.excerpt}</p>
926
+ <time className="text-sm text-gray-400">
927
+ {new Date(post.properties.publishedAt).toLocaleDateString()}
928
+ </time>
929
+ </article>
930
+ ))}
931
+ </div>
932
+ );
933
+ }
934
+ ```
935
+
936
+ ### Astro Pages with SSR
937
+
938
+ ```astro
939
+ ---
940
+ // web/src/pages/blog/[slug].astro
941
+ import { ConvexHttpClient } from 'convex/browser';
942
+ import { api } from '@/convex/_generated/api';
943
+ import BlogPost from '@/components/features/blog/BlogPost';
944
+
945
+ const convex = new ConvexHttpClient(import.meta.env.PUBLIC_CONVEX_URL);
946
+
947
+ const slug = Astro.params.slug;
948
+ const post = await convex.query(api.queries.blog.getBySlug, { slug });
949
+
950
+ if (!post) {
951
+ return Astro.redirect('/404');
952
+ }
953
+ ---
954
+
955
+ <Layout title={post.properties.title}>
956
+ <BlogPost client:load post={post} />
957
+ </Layout>
958
+ ```
959
+
960
+ ### Feature-Conditional UI
961
+
962
+ ```typescript
963
+ // web/src/components/Navigation.tsx
964
+ import { useQuery } from 'convex/react';
965
+ import { api } from '@/convex/_generated/api';
966
+
967
+ export function Navigation() {
968
+ const features = useQuery(api.queries.system.getEnabledFeatures);
969
+
970
+ return (
971
+ <nav>
972
+ <a href="/">Home</a>
973
+
974
+ {features?.includes('blog') && (
975
+ <a href="/blog">Blog</a>
976
+ )}
977
+
978
+ {features?.includes('portfolio') && (
979
+ <a href="/portfolio">Portfolio</a>
980
+ )}
981
+
982
+ {features?.includes('shop') && (
983
+ <a href="/shop">Shop</a>
984
+ )}
985
+ </nav>
986
+ );
987
+ }
988
+ ```
989
+
990
+ ---
991
+
992
+ ## 9. Creating Your First Feature
993
+
994
+ Let's build a complete "products" feature from scratch.
995
+
996
+ ### Step 1: Create Ontology YAML
997
+
998
+ Create `/one/knowledge/ontology-products.yaml`:
999
+
1000
+ ```yaml
1001
+ feature: products
1002
+ extends: core
1003
+ version: "1.0.0"
1004
+ description: "Product catalog and inventory management"
1005
+
1006
+ thingTypes:
1007
+ - name: product
1008
+ description: "A product in the catalog"
1009
+ properties:
1010
+ name: string
1011
+ sku: string
1012
+ price: number
1013
+ inventory: number
1014
+ description: string
1015
+ images: string[]
1016
+ status: string
1017
+
1018
+ - name: product_category
1019
+ description: "Category for organizing products"
1020
+ properties:
1021
+ name: string
1022
+ slug: string
1023
+ description: string
1024
+
1025
+ connectionTypes:
1026
+ - name: in_category
1027
+ description: "Product belongs to category"
1028
+ fromType: product
1029
+ toType: product_category
1030
+
1031
+ - name: created_product
1032
+ description: "User created product"
1033
+ fromType: user
1034
+ toType: product
1035
+
1036
+ eventTypes:
1037
+ - name: product_created
1038
+ description: "Product was created"
1039
+ thingType: product
1040
+
1041
+ - name: product_updated
1042
+ description: "Product was modified"
1043
+ thingType: product
1044
+
1045
+ - name: product_viewed
1046
+ description: "Someone viewed product"
1047
+ thingType: product
1048
+ ```
1049
+
1050
+ ### Step 2: Enable Feature
1051
+
1052
+ ```bash
1053
+ # backend/.env.local
1054
+ PUBLIC_FEATURES="products"
1055
+ ```
1056
+
1057
+ ### Step 3: Generate Types
1058
+
1059
+ ```bash
1060
+ cd backend
1061
+ bun run scripts/generate-ontology-types.ts
1062
+ ```
1063
+
1064
+ ### Step 4: Create Mutations
1065
+
1066
+ ```typescript
1067
+ // backend/convex/mutations/products.ts
1068
+ import { mutation } from "./_generated/server";
1069
+ import { v } from "convex/values";
1070
+ import type { ThingType, EventType } from "./types/ontology";
1071
+
1072
+ export const create = mutation({
1073
+ args: {
1074
+ groupId: v.id("groups"),
1075
+ name: v.string(),
1076
+ sku: v.string(),
1077
+ price: v.number(),
1078
+ inventory: v.number(),
1079
+ },
1080
+ handler: async (ctx, args) => {
1081
+ const userId = await ctx.auth.getUserIdentity();
1082
+ if (!userId) throw new Error("Unauthorized");
1083
+
1084
+ // Create product
1085
+ const productId = await ctx.db.insert("things", {
1086
+ groupId: args.groupId,
1087
+ type: "product" as ThingType,
1088
+ name: args.name,
1089
+ properties: {
1090
+ name: args.name,
1091
+ sku: args.sku,
1092
+ price: args.price,
1093
+ inventory: args.inventory,
1094
+ description: "",
1095
+ images: [],
1096
+ status: "active",
1097
+ },
1098
+ status: "active",
1099
+ createdAt: Date.now(),
1100
+ updatedAt: Date.now(),
1101
+ });
1102
+
1103
+ // Create ownership connection
1104
+ await ctx.db.insert("connections", {
1105
+ groupId: args.groupId,
1106
+ fromThingId: userId.tokenIdentifier as any,
1107
+ toThingId: productId,
1108
+ relationshipType: "created_product",
1109
+ metadata: {},
1110
+ createdAt: Date.now(),
1111
+ });
1112
+
1113
+ // Log event
1114
+ await ctx.db.insert("events", {
1115
+ groupId: args.groupId,
1116
+ type: "product_created" as EventType,
1117
+ actorId: userId.tokenIdentifier,
1118
+ targetId: productId,
1119
+ timestamp: Date.now(),
1120
+ metadata: {
1121
+ sku: args.sku,
1122
+ price: args.price,
1123
+ },
1124
+ });
1125
+
1126
+ return productId;
1127
+ },
1128
+ });
1129
+ ```
1130
+
1131
+ ### Step 5: Create Queries
1132
+
1133
+ ```typescript
1134
+ // backend/convex/queries/products.ts
1135
+ import { query } from "./_generated/server";
1136
+ import { v } from "convex/values";
1137
+
1138
+ export const list = query({
1139
+ args: {
1140
+ groupId: v.id("groups"),
1141
+ },
1142
+ handler: async (ctx, args) => {
1143
+ const products = await ctx.db
1144
+ .query("things")
1145
+ .withIndex("by_group_type", (q) =>
1146
+ q.eq("groupId", args.groupId).eq("type", "product")
1147
+ )
1148
+ .collect();
1149
+
1150
+ return products;
1151
+ },
1152
+ });
1153
+
1154
+ export const getBySlug = query({
1155
+ args: {
1156
+ sku: v.string(),
1157
+ },
1158
+ handler: async (ctx, args) => {
1159
+ const product = await ctx.db
1160
+ .query("things")
1161
+ .filter((q) =>
1162
+ q.and(
1163
+ q.eq(q.field("type"), "product"),
1164
+ q.eq(q.field("properties.sku"), args.sku)
1165
+ )
1166
+ )
1167
+ .first();
1168
+
1169
+ return product;
1170
+ },
1171
+ });
1172
+ ```
1173
+
1174
+ ### Step 6: Create React Component
1175
+
1176
+ ```typescript
1177
+ // web/src/components/features/products/ProductCard.tsx
1178
+ import type { Doc } from '@/convex/_generated/dataModel';
1179
+
1180
+ interface ProductCardProps {
1181
+ product: Doc<'things'>;
1182
+ }
1183
+
1184
+ export function ProductCard({ product }: ProductCardProps) {
1185
+ const { name, sku, price, inventory } = product.properties;
1186
+
1187
+ return (
1188
+ <div className="border rounded-lg p-4">
1189
+ <h3 className="text-lg font-bold">{name}</h3>
1190
+ <p className="text-sm text-gray-600">SKU: {sku}</p>
1191
+ <p className="text-xl font-bold">${price.toFixed(2)}</p>
1192
+ <p className="text-sm">
1193
+ {inventory > 0 ? `${inventory} in stock` : 'Out of stock'}
1194
+ </p>
1195
+ </div>
1196
+ );
1197
+ }
1198
+ ```
1199
+
1200
+ ### Step 7: Deploy
1201
+
1202
+ ```bash
1203
+ cd backend
1204
+ npx convex dev
1205
+ ```
1206
+
1207
+ **Done!** You've created a complete feature with type-safe backend and frontend.
1208
+
1209
+ ---
1210
+
1211
+ ## 10. Advanced Patterns
1212
+
1213
+ ### Pattern 1: Multi-Backend Support
1214
+
1215
+ Run different backends with different feature sets:
1216
+
1217
+ ```bash
1218
+ # Backend A (blog-focused)
1219
+ PUBLIC_FEATURES="blog,portfolio"
1220
+
1221
+ # Backend B (e-commerce focused)
1222
+ PUBLIC_FEATURES="products,shop,payments"
1223
+
1224
+ # Backend C (minimal)
1225
+ PUBLIC_FEATURES="core"
1226
+ ```
1227
+
1228
+ Each backend generates types for only its enabled features!
1229
+
1230
+ ### Pattern 2: Feature Dependencies
1231
+
1232
+ Features can depend on other features:
1233
+
1234
+ ```yaml
1235
+ # ontology-advanced-blog.yaml
1236
+ feature: advanced-blog
1237
+ extends: blog # Requires blog feature
1238
+ dependencies:
1239
+ - newsletter # Also requires newsletter feature
1240
+
1241
+ thingTypes:
1242
+ - name: blog_series
1243
+ properties:
1244
+ posts: string[] # Array of blog_post IDs
1245
+ ```
1246
+
1247
+ ### Pattern 3: Versioned Ontologies
1248
+
1249
+ Support multiple versions of the same feature:
1250
+
1251
+ ```yaml
1252
+ # ontology-products-v1.yaml
1253
+ feature: products-v1
1254
+ extends: core
1255
+ thingTypes:
1256
+ - name: product_v1
1257
+
1258
+ # ontology-products-v2.yaml
1259
+ feature: products-v2
1260
+ extends: core
1261
+ thingTypes:
1262
+ - name: product_v2
1263
+ properties:
1264
+ # New fields
1265
+ ```
1266
+
1267
+ Enable both versions simultaneously:
1268
+
1269
+ ```bash
1270
+ PUBLIC_FEATURES="products-v1,products-v2"
1271
+ ```
1272
+
1273
+ ### Pattern 4: Conditional Type Loading
1274
+
1275
+ ```typescript
1276
+ // Load types dynamically based on environment
1277
+ const features = process.env.PUBLIC_FEATURES?.split(",") || ["core"];
1278
+
1279
+ if (features.includes("blog")) {
1280
+ // Blog-specific initialization
1281
+ await initializeBlogFeature();
1282
+ }
1283
+
1284
+ if (features.includes("products")) {
1285
+ // Products-specific initialization
1286
+ await initializeProductsFeature();
1287
+ }
1288
+ ```
1289
+
1290
+ ### Pattern 5: Shared Connection Types
1291
+
1292
+ Use wildcard types for shared relationships:
1293
+
1294
+ ```yaml
1295
+ # ontology-core.yaml
1296
+ connectionTypes:
1297
+ - name: created_by
1298
+ fromType: "*" # Any thing can have a creator
1299
+ toType: user
1300
+
1301
+ - name: viewed_by
1302
+ fromType: "*" # Any thing can be viewed
1303
+ toType: user
1304
+ ```
1305
+
1306
+ ---
1307
+
1308
+ ## 11. Migration Guide
1309
+
1310
+ ### From Hardcoded Schema to ONE Ontology
1311
+
1312
+ **Before (Hardcoded):**
1313
+
1314
+ ```typescript
1315
+ // backend/convex/schema.ts
1316
+ entities: defineTable({
1317
+ type: v.union(
1318
+ v.literal("page"),
1319
+ v.literal("user"),
1320
+ v.literal("blog_post"),
1321
+ v.literal("product")
1322
+ // ... 50 more hardcoded types
1323
+ ),
1324
+ });
1325
+ ```
1326
+
1327
+ **After (ONE Ontology):**
1328
+
1329
+ ```typescript
1330
+ // backend/convex/schema.ts
1331
+ import { THING_TYPES } from "./types/ontology";
1332
+
1333
+ entities: defineTable({
1334
+ type: v.union(...THING_TYPES.map((t) => v.literal(t))),
1335
+ });
1336
+ ```
1337
+
1338
+ ### Migration Steps
1339
+
1340
+ **Step 1: Inventory Current Types**
1341
+
1342
+ Create a spreadsheet of all entity types in use:
1343
+
1344
+ | Type | Feature | Usage Count |
1345
+ | --------- | ------- | ----------- |
1346
+ | page | core | 1,245 |
1347
+ | user | core | 8,932 |
1348
+ | blog_post | blog | 3,421 |
1349
+ | product | shop | 1,892 |
1350
+
1351
+ **Step 2: Group Types into Features**
1352
+
1353
+ Organize types into logical features:
1354
+
1355
+ - **Core:** page, user, file, link, note
1356
+ - **Blog:** blog_post, blog_category
1357
+ - **Shop:** product, order, payment
1358
+
1359
+ **Step 3: Create Ontology YAMLs**
1360
+
1361
+ Create one YAML per feature (see [Section 5](#5-yaml-ontology-format) for format).
1362
+
1363
+ **Step 4: Generate Types (Test First!)**
1364
+
1365
+ ```bash
1366
+ cd backend
1367
+ PUBLIC_FEATURES="blog,shop" bun run scripts/generate-ontology-types.ts
1368
+ ```
1369
+
1370
+ **Step 5: Update Schema**
1371
+
1372
+ Replace hardcoded unions with generated types.
1373
+
1374
+ **Step 6: Deploy to Staging**
1375
+
1376
+ Test thoroughly before production!
1377
+
1378
+ **Step 7: Deploy to Production**
1379
+
1380
+ Monitor for issues after deployment.
1381
+
1382
+ ### Data Migration
1383
+
1384
+ **Good news:** No data migration required! The ONE Ontology architecture doesn't change your data structure, only type definitions.
1385
+
1386
+ Existing data remains valid:
1387
+
1388
+ ```typescript
1389
+ // Before migration
1390
+ { _id: "abc", type: "blog_post", ... }
1391
+
1392
+ // After migration
1393
+ { _id: "abc", type: "blog_post", ... } // Still valid!
1394
+ ```
1395
+
1396
+ ---
1397
+
1398
+ ## 12. API Reference
1399
+
1400
+ ### Generated Type Exports
1401
+
1402
+ ```typescript
1403
+ // Import from generated types
1404
+ import {
1405
+ // Type unions
1406
+ ThingType,
1407
+ ConnectionType,
1408
+ EventType,
1409
+
1410
+ // Constant arrays
1411
+ THING_TYPES,
1412
+ CONNECTION_TYPES,
1413
+ EVENT_TYPES,
1414
+
1415
+ // Type guards
1416
+ isThingType,
1417
+ isConnectionType,
1418
+ isEventType,
1419
+
1420
+ // Feature helpers
1421
+ ENABLED_FEATURES,
1422
+ hasFeature,
1423
+
1424
+ // Metadata
1425
+ ONTOLOGY_METADATA,
1426
+ } from "./backend/convex/types/ontology";
1427
+ ```
1428
+
1429
+ ### Type Guard Functions
1430
+
1431
+ ```typescript
1432
+ isThingType(value: string): value is ThingType
1433
+ ```
1434
+
1435
+ Checks if a string is a valid thing type.
1436
+
1437
+ **Example:**
1438
+
1439
+ ```typescript
1440
+ if (isThingType("blog_post")) {
1441
+ // Type is valid
1442
+ }
1443
+ ```
1444
+
1445
+ ---
1446
+
1447
+ ```typescript
1448
+ isConnectionType(value: string): value is ConnectionType
1449
+ ```
1450
+
1451
+ Checks if a string is a valid connection type.
1452
+
1453
+ ---
1454
+
1455
+ ```typescript
1456
+ isEventType(value: string): value is EventType
1457
+ ```
1458
+
1459
+ Checks if a string is a valid event type.
1460
+
1461
+ ---
1462
+
1463
+ ```typescript
1464
+ hasFeature(feature: string): boolean
1465
+ ```
1466
+
1467
+ Checks if a feature is enabled.
1468
+
1469
+ **Example:**
1470
+
1471
+ ```typescript
1472
+ if (hasFeature("blog")) {
1473
+ // Blog feature is enabled
1474
+ }
1475
+ ```
1476
+
1477
+ ### Metadata Object
1478
+
1479
+ ```typescript
1480
+ ONTOLOGY_METADATA = {
1481
+ features: string[]; // List of enabled features
1482
+ generatedAt: string; // ISO timestamp
1483
+ thingTypeCount: number; // Total thing types
1484
+ connectionTypeCount: number; // Total connection types
1485
+ eventTypeCount: number; // Total event types
1486
+ }
1487
+ ```
1488
+
1489
+ ---
1490
+
1491
+ ## 13. Troubleshooting
1492
+
1493
+ ### Problem: Type not found after adding feature
1494
+
1495
+ **Symptom:**
1496
+
1497
+ ```
1498
+ Error: Invalid thing type: "product"
1499
+ ```
1500
+
1501
+ **Solution:**
1502
+
1503
+ 1. Verify feature is in `PUBLIC_FEATURES`
1504
+ 2. Run `bun run scripts/generate-ontology-types.ts`
1505
+ 3. Restart Convex dev server
1506
+
1507
+ ---
1508
+
1509
+ ### Problem: Circular dependency error
1510
+
1511
+ **Symptom:**
1512
+
1513
+ ```
1514
+ Error: Circular dependency detected: blog → portfolio → blog
1515
+ ```
1516
+
1517
+ **Solution:**
1518
+ Both features should extend `core`, not each other:
1519
+
1520
+ ```yaml
1521
+ # ✅ Correct
1522
+ feature: blog
1523
+ extends: core
1524
+
1525
+ feature: portfolio
1526
+ extends: core
1527
+ ```
1528
+
1529
+ ---
1530
+
1531
+ ### Problem: Duplicate type error
1532
+
1533
+ **Symptom:**
1534
+
1535
+ ```
1536
+ Error: Duplicate thing type "product" in features "shop" and "marketplace"
1537
+ ```
1538
+
1539
+ **Solution:**
1540
+ Consolidate into one feature or use different names.
1541
+
1542
+ ---
1543
+
1544
+ ### Problem: Feature not loading
1545
+
1546
+ **Symptom:**
1547
+
1548
+ ```
1549
+ ⚠️ Feature "products" not found, skipping
1550
+ ```
1551
+
1552
+ **Solution:**
1553
+
1554
+ 1. Verify file exists: `/one/knowledge/ontology-products.yaml`
1555
+ 2. Check naming: `ontology-{feature}.yaml`
1556
+ 3. Feature name in YAML must match filename
1557
+
1558
+ ---
1559
+
1560
+ ## 14. FAQs
1561
+
1562
+ ### Q: Do I need to migrate existing data?
1563
+
1564
+ **A:** No! The ONE Ontology architecture only changes type definitions, not data structure. Existing data remains valid.
1565
+
1566
+ ---
1567
+
1568
+ ### Q: Can I disable a feature after deploying?
1569
+
1570
+ **A:** Yes! Remove from `PUBLIC_FEATURES`, regenerate types, and redeploy. Existing data with that type will remain but won't pass validation for new inserts.
1571
+
1572
+ ---
1573
+
1574
+ ### Q: How many features can I have?
1575
+
1576
+ **A:** No hard limit. System scales linearly. We've tested with 10+ features (50+ types) with excellent performance (<100ms).
1577
+
1578
+ ---
1579
+
1580
+ ### Q: Can features depend on each other?
1581
+
1582
+ **A:** Yes! Use `extends` or `dependencies` in YAML. The system automatically resolves dependencies in correct order.
1583
+
1584
+ ---
1585
+
1586
+ ### Q: What happens if I have a type conflict?
1587
+
1588
+ **A:** Validation fails with a clear error message identifying both features. You must rename one of the types.
1589
+
1590
+ ---
1591
+
1592
+ ### Q: Can I use custom backends (not Convex)?
1593
+
1594
+ **A:** Yes! The ontology system is backend-agnostic. Adapt the type generation for your backend of choice.
1595
+
1596
+ ---
1597
+
1598
+ ## 15. Resources
1599
+
1600
+ ### Documentation
1601
+
1602
+ - [Quick Start Guide](/one/knowledge/ontology-quickstart.md) - Get running in 5 minutes
1603
+ - [Developer Guide](/one/knowledge/ontology-developer-guide.md) - Advanced patterns and internals
1604
+ - [Migration Guide](/one/knowledge/ontology-migration-guide.md) - Step-by-step migration process
1605
+ - [Cheat Sheet](/one/knowledge/ontology-cheatsheet.md) - Quick reference
1606
+ - [Ontology Specification](/one/knowledge/ontology.md) - Complete ontology docs
1607
+
1608
+ ### Implementation Files
1609
+
1610
+ - **Ontology Loader:** `/backend/lib/ontology-loader.ts`
1611
+ - **Validator:** `/backend/lib/ontology-validator.ts`
1612
+ - **Type Generator:** `/backend/lib/type-generator.ts`
1613
+ - **CLI Tool:** `/backend/scripts/generate-ontology-types.ts`
1614
+
1615
+ ### Example Ontologies
1616
+
1617
+ - Core: `/one/knowledge/ontology-core.yaml`
1618
+ - Blog: `/one/knowledge/ontology-blog.yaml`
1619
+ - Portfolio: `/one/knowledge/ontology-portfolio.yaml`
1620
+ - Courses: `/one/knowledge/ontology-courses.yaml`
1621
+ - Community: `/one/knowledge/ontology-community.yaml`
1622
+ - Tokens: `/one/knowledge/ontology-tokens.yaml`
1623
+
1624
+ ### Test Reports
1625
+
1626
+ - [Test Report](/backend/TEST-REPORT-ONTOLOGY.md) - 33 tests, all passing
1627
+ - [Implementation Summary](/ONE Ontology-IMPLEMENTATION-COMPLETE.md) - Production readiness
1628
+
1629
+ ### Community
1630
+
1631
+ - **GitHub Discussions:** Share your ontologies
1632
+ - **Discord:** Get help from the community
1633
+ - **Weekly Office Hours:** Ask questions live
1634
+
1635
+ ---
1636
+
1637
+ ## Summary
1638
+
1639
+ The ONE Ontology Architecture provides:
1640
+
1641
+ ✅ **Feature Modularity** - Self-contained, composable features
1642
+ ✅ **Type Safety** - Compile-time and runtime validation
1643
+ ✅ **Zero Migration** - Add/remove features without schema changes
1644
+ ✅ **Backend Flexibility** - Different backends, different features
1645
+ ✅ **Performance** - Sub-100ms operations, 98% smaller schemas
1646
+ ✅ **Developer Experience** - Clear errors, focused autocomplete
1647
+
1648
+ **Status:** ✅ Production Ready
1649
+
1650
+ **Test Coverage:** 33/33 tests passing (100%)
1651
+
1652
+ **Performance:** 75ms cold load, 5ms cached load
1653
+
1654
+ **Documentation:** Complete
1655
+
1656
+ ---
1657
+
1658
+ **Built with clarity, simplicity, and infinite scale in mind.**
1659
+
1660
+ **Version:** 1.0.0
1661
+ **Last Updated:** 2025-10-20
1662
+ **Total Pages:** 47
1663
+ **Word Count:** ~12,000