oneie 3.6.13 → 3.6.15
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.
- package/.claude/agents/AUDIT-agent-ops-alignment.md +379 -0
- package/.claude/agents/NEWS-QUICKSTART.md +321 -0
- package/.claude/agents/NEWS-README.md +353 -0
- package/.claude/agents/agent-backend.md +1 -1
- package/.claude/agents/agent-builder.md +220 -151
- package/.claude/agents/agent-clean.md +39 -31
- package/.claude/agents/agent-clone.md +107 -54
- package/.claude/agents/agent-designer.md +76 -71
- package/.claude/agents/agent-director.md +170 -7
- package/.claude/agents/agent-documenter.md +169 -132
- package/.claude/agents/agent-frontend.md +442 -446
- package/.claude/agents/agent-integrator.md +30 -23
- package/.claude/agents/agent-lawyer.md +145 -98
- package/.claude/agents/agent-news.md +363 -0
- package/.claude/agents/agent-onboard.md +107 -77
- package/.claude/agents/agent-ontology.md +585 -0
- package/.claude/agents/agent-ops.md +178 -171
- package/.claude/agents/agent-problem-solver.md +132 -115
- package/.claude/agents/agent-quality.md +94 -77
- package/.claude/agents/agent-sales.md +89 -67
- package/.claude/commands/cascade.md +49 -20
- package/.claude/commands/create.md +397 -0
- package/.claude/commands/npx.md +64 -113
- package/.claude/commands/one.md +10 -28
- package/.claude/commands/plan.md +65 -65
- package/.claude/commands/push.md +63 -452
- package/.claude/commands/release.md +26 -393
- package/.claude/hooks/README-knowledge-hooks.md +267 -81
- package/.claude/hooks/README-root-cleanup.md +200 -0
- package/.claude/hooks/README.md +284 -0
- package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
- package/.claude/hooks/check-filenames.py +169 -32
- package/.claude/hooks/clean-post.py +195 -28
- package/.claude/hooks/clean-pre.py +96 -11
- package/.claude/hooks/clean-root-markdown.sh +73 -0
- package/.claude/hooks/done.py +74 -13
- package/.claude/hooks/format-hook.sh +105 -17
- package/.claude/hooks/hook-logger.sh +121 -7
- package/.claude/hooks/knowledge-post.py +136 -32
- package/.claude/hooks/knowledge-pre.py +129 -34
- package/.claude/hooks/notification-hook.sh +184 -17
- package/.claude/hooks/root-cleanup.py +181 -39
- package/.claude/hooks/security-hook.sh +248 -8
- package/.claude/hooks/tag-all-docs.py +175 -49
- package/.claude/hooks/test-validate-ontology.sh +170 -0
- package/.claude/hooks/todo.py +92 -22
- package/.claude/hooks/track-changes.sh +101 -0
- package/.claude/hooks/validate-ontology-structure-summary.md +243 -0
- package/.claude/hooks/validate-ontology-structure.py +83 -20
- package/.claude/skills/ontology/README.md +1 -1
- package/AGENTS.md +60 -245
- package/CLAUDE.md +108 -26
- package/README.md +25 -0
- package/one/README.md +21 -3
- package/one/connections/a2a.md +49 -0
- package/one/connections/acp.md +47 -0
- package/one/connections/acps.md +18 -0
- package/one/connections/agentkit.md +18 -0
- package/one/connections/agui.md +18 -0
- package/one/connections/any-backend.md +39 -21
- package/one/connections/ap2.md +74 -0
- package/one/connections/api/queries-reference.md +18 -0
- package/one/connections/api-docs.md +18 -0
- package/one/connections/api-reference.md +18 -0
- package/one/connections/api.md +18 -0
- package/one/connections/architecture-diagram.md +18 -0
- package/one/connections/communications.md +18 -0
- package/one/connections/connections.md +18 -0
- package/one/connections/copilotkit.md +18 -0
- package/one/connections/cryptonetworks.md +18 -0
- package/one/connections/documentation.md +19 -1
- package/one/connections/effect.md +18 -0
- package/one/connections/elizaos.md +18 -0
- package/one/connections/groups.md +814 -0
- package/one/connections/inference.md +21 -3
- package/one/connections/integration-examples.md +18 -0
- package/one/connections/integration-guide.md +18 -0
- package/one/connections/integration-phase2.md +32 -14
- package/one/connections/kyc.md +18 -0
- package/one/connections/mcp.md +18 -0
- package/one/connections/membership.md +18 -0
- package/one/connections/middleware.md +18 -0
- package/one/connections/multitenant.md +18 -0
- package/one/connections/n8n.md +18 -0
- package/one/connections/patterns.md +18 -0
- package/one/connections/protocols.md +20 -2
- package/one/connections/relationships.md +18 -0
- package/one/connections/schema.md +18 -0
- package/one/connections/service-layer.md +18 -0
- package/one/connections/vectors.md +18 -0
- package/one/connections/wordpress.md +18 -0
- package/one/connections/workflow-copy.md +19 -1
- package/one/connections/workflow-examples.md +18 -0
- package/one/connections/workflow-onboarding.md +102 -84
- package/one/connections/workflow.md +19 -1
- package/one/connections/workflows/delegation.md +18 -0
- package/one/connections/workflows/frontend.md +18 -0
- package/one/connections/workflows/strategy.md +18 -0
- package/one/connections/workflows/tasks.md +18 -0
- package/one/connections/x402-baazar.md +131 -0
- package/one/connections/x402.md +268 -164
- package/one/groups/features.md +26 -0
- package/one/groups/groups.md +112 -68
- package/one/groups/one.md +71 -51
- package/one/groups/{strategy copy.md → strategy-copy.md} +23 -5
- package/one/knowledge/.obsidian/ecommerce-ontology.md +18 -0
- package/one/knowledge/100-inference-quick-reference.md +49 -31
- package/one/knowledge/agent-onboard-usage.md +18 -0
- package/one/knowledge/agentic-commerce.md +146 -0
- package/one/knowledge/ai-agents-vs-memecoins-thesis.md +683 -0
- package/one/knowledge/ai-platform.md +18 -0
- package/one/knowledge/ai-token-crypto-analysis-framework.md +1191 -0
- package/one/knowledge/ai-token-paradigm-shift-2025.md +732 -0
- package/one/knowledge/altcoin-cycle-prediction-ontology.md +884 -0
- package/one/knowledge/altcoin-cycle-trading-strategy.md +642 -0
- package/one/knowledge/architecture-any-backend.md +265 -42
- package/one/knowledge/architecture-diagram.md +404 -94
- package/one/knowledge/architecture-frontend.md +130 -51
- package/one/knowledge/architecture.md +1496 -1831
- package/one/knowledge/{ontology.md.backup → archived/ontology.old.md} +28 -10
- package/one/knowledge/astro-effect-complete-vision.md +2148 -0
- package/one/knowledge/astro-effect-simple-architecture.md +717 -0
- package/one/knowledge/audit-agent-onboard-alignment.md +481 -0
- package/one/knowledge/audit-agent-sales-alignment.md +444 -0
- package/one/knowledge/backend-api-reference.md +18 -0
- package/one/knowledge/cli-claude-handoff.md +54 -36
- package/one/knowledge/context-engineering.md +610 -0
- package/one/knowledge/crypto-analysis-strategy.md +1276 -0
- package/one/knowledge/crypto-cycle-2024-2025-analysis.md +44 -0
- package/one/knowledge/crypto.md +18 -0
- package/one/knowledge/docs.md +627 -0
- package/one/knowledge/dsl.md +18 -0
- package/one/knowledge/event-driven-documentation.md +270 -0
- package/one/knowledge/files.md +18 -0
- package/one/knowledge/frontend.md +18 -0
- package/one/knowledge/hono.md +18 -0
- package/one/knowledge/implementation-examples.md +18 -0
- package/one/knowledge/installation-folders.md +18 -0
- package/one/knowledge/institutional-cycle-paradigm-2025.md +555 -0
- package/one/knowledge/knowledge.md +44 -26
- package/one/knowledge/language.md +18 -0
- package/one/knowledge/lessons-learned.md +18 -0
- package/one/knowledge/lessons-website-building-focus.md +19 -1
- package/one/knowledge/merge-report.md +254 -0
- package/one/knowledge/metadata-system.md +11 -11
- package/one/knowledge/nine-padel-playbook.md +18 -0
- package/one/knowledge/ontology-blog.yaml +42 -26
- package/one/knowledge/ontology-cheatsheet.md +18 -0
- package/one/knowledge/ontology-community.yaml +60 -37
- package/one/knowledge/ontology-core-universal.md +19 -1
- package/one/knowledge/ontology-core.yaml +58 -45
- package/one/knowledge/ontology-courses.yaml +71 -48
- package/one/knowledge/ontology-creator.md +30 -4
- package/one/knowledge/ontology-crypto.md +1603 -0
- package/one/knowledge/ontology-developer-guide.md +18 -0
- package/one/knowledge/ontology-documentation.md +52 -31
- package/one/knowledge/ontology-ecommerce.md +24 -6
- package/one/knowledge/ontology-education.md +18 -0
- package/one/knowledge/ontology-engineering-specification.md +22 -4
- package/one/knowledge/ontology-engineering.md +70 -46
- package/one/knowledge/ontology-files.yaml +525 -0
- package/one/knowledge/ontology-frontend-master.md +2898 -0
- package/one/knowledge/ontology-frontend-specifications.md +57 -49
- package/one/knowledge/ontology-frontend.md +40 -22
- package/one/knowledge/ontology-index.md +18 -0
- package/one/knowledge/ontology-minimal.yaml +18 -16
- package/one/knowledge/ontology-portfolio.yaml +40 -26
- package/one/knowledge/ontology-quickstart.md +18 -0
- package/one/knowledge/ontology-release.md +317 -0
- package/one/knowledge/ontology-shop.yaml +146 -119
- package/one/knowledge/ontology-tokens.yaml +46 -27
- package/one/knowledge/ontology-tutorial.md +18 -0
- package/one/knowledge/ontology-video-script.md +18 -0
- package/one/knowledge/ontology-visual-guide.md +20 -2
- package/one/knowledge/ontology.md +1334 -309
- package/one/knowledge/ontology.yaml +766 -278
- package/one/knowledge/patterns/backend/convex-mutation-pattern.md +48 -18
- package/one/knowledge/patterns/backend/convex-query-pattern.md +78 -23
- package/one/knowledge/patterns/backend/mutation-template.md +28 -10
- package/one/knowledge/patterns/backend/query-template.md +44 -25
- package/one/knowledge/patterns/backend/service-template.md +35 -14
- package/one/knowledge/patterns/design/component-architecture.md +45 -9
- package/one/knowledge/patterns/design/test-driven-design-pattern.md +37 -3
- package/one/knowledge/patterns/design/wireframe-template.md +36 -2
- package/one/knowledge/patterns/frontend/component-template.md +91 -40
- package/one/knowledge/patterns/frontend/form-template.md +131 -59
- package/one/knowledge/patterns/frontend/page-template.md +59 -28
- package/one/knowledge/patterns/frontend/react-component-pattern.md +87 -27
- package/one/knowledge/patterns/test/acceptance-criteria-template.md +28 -10
- package/one/knowledge/patterns/test/technical-test-template.md +48 -26
- package/one/knowledge/patterns/test/test-driven-pattern.md +25 -5
- package/one/knowledge/patterns/test/user-flow-template.md +18 -0
- package/one/knowledge/provider-agnostic-content.md +995 -0
- package/one/knowledge/provider-creation-guide.md +18 -0
- package/one/knowledge/quality-loop.md +18 -0
- package/one/knowledge/readme-architecture.md +158 -0
- package/one/knowledge/readme.md +18 -0
- package/one/knowledge/rules.md +18 -0
- package/one/knowledge/score.md +20 -2
- package/one/knowledge/specifications.md +18 -0
- package/one/knowledge/tags.md +18 -0
- package/one/knowledge/todo-template.md +71 -53
- package/one/knowledge/todo.md +71 -53
- package/one/knowledge/typescript-patterns.md +19 -1
- package/one/knowledge/universal-generation-language.md +827 -0
- package/one/knowledge/x402-research.md +104 -0
- package/one/license.md +18 -0
- package/one/people/anthony-o-connell.md +55 -26
- package/one/people/people.md +55 -32
- package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +401 -0
- package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +588 -0
- package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +461 -0
- package/one/things/CHECKLIST.md +51 -0
- package/one/things/IMPLEMENTATION_STATUS.md +379 -0
- package/one/things/ONE.md +19 -1
- package/one/things/agents/agent-backend.md +202 -102
- package/one/things/agents/agent-builder.md +267 -158
- package/one/things/agents/agent-clean.md +56 -31
- package/one/things/agents/agent-clone.md +33 -50
- package/one/things/agents/agent-deploy.md +65 -17
- package/one/things/agents/agent-designer.md +274 -146
- package/one/things/agents/agent-director.md +20 -2
- package/one/things/agents/agent-documenter.md +126 -46
- package/one/things/agents/agent-frontend.md +104 -22
- package/one/things/agents/agent-integrator.md +153 -76
- package/one/things/agents/agent-lawyer.md +197 -92
- package/one/things/agents/agent-problem-solver.md +302 -224
- package/one/things/agents/agent-quality.md +149 -19
- package/one/things/agents/agent-sales.md +101 -13
- package/one/things/cascade/cascade.yaml +20 -3
- package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +53 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +50 -0
- package/one/things/cascade/docs/examples/1-1-agent-prompts.md +76 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +49 -3
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +45 -0
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +32 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +45 -3
- package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +44 -0
- package/one/things/cascade/docs/examples/1-3-event-coordination.md +40 -1
- package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +81 -25
- package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +41 -0
- package/one/things/cascade/docs/examples/1-4-knowledge-management.md +91 -16
- package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +136 -73
- package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +43 -0
- package/one/things/cascade/docs/examples/1-5-quality-loops.md +88 -4
- package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +52 -3
- package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +44 -1
- package/one/things/cascade/docs/examples/1-6-numbering-structure.md +78 -14
- package/one/things/cascade/docs/examples/readme.md +37 -0
- package/one/things/cascade/docs/getting-started.md +18 -0
- package/one/things/cascade/docs/workflow.md +18 -12
- package/one/things/cascade/readme.md +43 -0
- package/one/things/cascade/templates/feature-template.md +28 -6
- package/one/things/claude/agents/advocacy-activation-manager.md +64 -39
- package/one/things/claude/agents/advocacy-campaign-designer.md +64 -39
- package/one/things/claude/agents/analyst.md +64 -39
- package/one/things/claude/agents/architect.md +64 -39
- package/one/things/claude/agents/brand-identity-specialist.md +64 -39
- package/one/things/claude/agents/bstp-token-strategist.md +48 -25
- package/one/things/claude/agents/builder-repo.md +69 -26
- package/one/things/claude/agents/bullstamp-community-builder.md +48 -25
- package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +48 -25
- package/one/things/claude/agents/bulltilt-platform-growth.md +48 -25
- package/one/things/claude/agents/company-bullstamp-character.md +45 -30
- package/one/things/claude/agents/company-bullstamp-community.md +45 -30
- package/one/things/claude/agents/company-bullstamp-marketing.md +45 -30
- package/one/things/claude/agents/company-bullstamp-token.md +45 -30
- package/one/things/claude/agents/company-bulltilt-growth.md +45 -30
- package/one/things/claude/agents/content-bibliography-formatter.md +48 -25
- package/one/things/claude/agents/content-calendar-planner.md +59 -34
- package/one/things/claude/agents/content-chapter-formatter.md +60 -35
- package/one/things/claude/agents/content-formatter.md +59 -34
- package/one/things/claude/agents/content-hook-specialist.md +54 -31
- package/one/things/claude/agents/content-image-formatter.md +59 -34
- package/one/things/claude/agents/content-introduction-formatter.md +59 -34
- package/one/things/claude/agents/content-multiplication-engine.md +54 -31
- package/one/things/claude/agents/content-playbook-writer.md +60 -35
- package/one/things/claude/agents/content-team-manager.md +59 -34
- package/one/things/claude/agents/content-toc-formatter.md +60 -35
- package/one/things/claude/agents/convex-backend-specialist.md +380 -216
- package/one/things/claude/agents/core-manager.md +59 -34
- package/one/things/claude/agents/core-master.md +55 -32
- package/one/things/claude/agents/cross-functional-manager.md +46 -41
- package/one/things/claude/agents/crypto-airdrop-strategist.md +74 -54
- package/one/things/claude/agents/crypto-analytics-educator.md +73 -30
- package/one/things/claude/agents/crypto-architecture-specialist.md +70 -39
- package/one/things/claude/agents/crypto-community-analyst.md +47 -31
- package/one/things/claude/agents/crypto-community-psychologist.md +68 -31
- package/one/things/claude/agents/crypto-dex-optimization-expert.md +72 -31
- package/one/things/claude/agents/crypto-dex-optimizer.md +45 -30
- package/one/things/claude/agents/crypto-diamond-formation-specialist.md +69 -30
- package/one/things/claude/agents/crypto-diamond-hands.md +45 -30
- package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +73 -30
- package/one/things/claude/agents/crypto-engagement-specialist.md +71 -30
- package/one/things/claude/agents/crypto-market-researcher.md +45 -30
- package/one/things/claude/agents/crypto-marketing-orchestrator.md +74 -34
- package/one/things/claude/agents/crypto-network-effect-amplifier.md +75 -30
- package/one/things/claude/agents/crypto-optimization-analyst.md +73 -30
- package/one/things/claude/agents/crypto-strategic-synthesizer.md +69 -30
- package/one/things/claude/agents/crypto-team-manager.md +45 -40
- package/one/things/claude/agents/crypto-token-analyst.md +66 -25
- package/one/things/claude/agents/crypto-viral-content-creator.md +64 -61
- package/one/things/claude/agents/crypto-wallet-identification-expert.md +61 -51
- package/one/things/claude/agents/crypto-wallet-identifier.md +45 -30
- package/one/things/claude/agents/customer-journey-designer.md +51 -58
- package/one/things/claude/agents/customer-success-manager.md +51 -58
- package/one/things/claude/agents/dev.md +51 -58
- package/one/things/claude/agents/documenter.md +71 -69
- package/one/things/claude/agents/elevate-marketing-orchestrator.md +45 -52
- package/one/things/claude/agents/engagement-specialist.md +45 -52
- package/one/things/claude/agents/engineering-architect.md +54 -54
- package/one/things/claude/agents/engineering-business-analyst.md +46 -56
- package/one/things/claude/agents/engineering-developer.md +51 -52
- package/one/things/claude/agents/engineering-director.md +65 -25
- package/one/things/claude/agents/engineering-ingestor.md +110 -100
- package/one/things/claude/agents/engineering-product-manager.md +43 -55
- package/one/things/claude/agents/engineering-product-owner.md +46 -56
- package/one/things/claude/agents/engineering-project-coordinator.md +44 -56
- package/one/things/claude/agents/engineering-quality-assurance.md +53 -54
- package/one/things/claude/agents/engineering-team-manager.md +46 -43
- package/one/things/claude/agents/engineering-user-experience.md +51 -52
- package/one/things/claude/agents/framework-elevate-manager.md +45 -30
- package/one/things/claude/agents/improver.md +120 -78
- package/one/things/claude/agents/intelligence-team-manager.md +45 -40
- package/one/things/claude/agents/lead-capture-expert.md +45 -52
- package/one/things/claude/agents/lead-magnet-creator.md +45 -52
- package/one/things/claude/agents/market-research-analyst.md +48 -25
- package/one/things/claude/agents/marketing-brand-identity.md +57 -27
- package/one/things/claude/agents/marketing-content-hooks.md +45 -40
- package/one/things/claude/agents/marketing-content-multiplier.md +45 -40
- package/one/things/claude/agents/marketing-content-poster.md +71 -60
- package/one/things/claude/agents/marketing-customer-journey.md +45 -40
- package/one/things/claude/agents/marketing-director.md +46 -41
- package/one/things/claude/agents/marketing-engagement.md +45 -40
- package/one/things/claude/agents/marketing-lead-capture.md +45 -40
- package/one/things/claude/agents/marketing-lead-magnet.md +45 -40
- package/one/things/claude/agents/marketing-network-effects.md +45 -40
- package/one/things/claude/agents/marketing-nurture-campaigns.md +45 -40
- package/one/things/claude/agents/marketing-share-optimizer.md +45 -40
- package/one/things/claude/agents/marketing-team-manager.md +45 -40
- package/one/things/claude/agents/marketing-viral-growth.md +49 -18
- package/one/things/claude/agents/mission-commander.md +45 -40
- package/one/things/claude/agents/network-effect-analyst.md +48 -31
- package/one/things/claude/agents/nextjs-15-specialist.md +210 -123
- package/one/things/claude/agents/npx.md +126 -70
- package/one/things/claude/agents/nurture-campaign-manager.md +48 -25
- package/one/things/claude/agents/one-master.md +48 -25
- package/one/things/claude/agents/one-orchestrator.md +57 -27
- package/one/things/claude/agents/one.md +88 -31
- package/one/things/claude/agents/playbook-generator.md +48 -25
- package/one/things/claude/agents/pm.md +48 -25
- package/one/things/claude/agents/po.md +51 -26
- package/one/things/claude/agents/qa.md +50 -25
- package/one/things/claude/agents/research-foundation-analyst.md +48 -31
- package/one/things/claude/agents/research-intelligence-gatherer.md +59 -32
- package/one/things/claude/agents/research-market-analyst.md +47 -30
- package/one/things/claude/agents/research-team-manager.md +47 -40
- package/one/things/claude/agents/sales-environment-optimizer.md +50 -25
- package/one/things/claude/agents/sales-team-manager.md +47 -40
- package/one/things/claude/agents/sales-upsell-strategist.md +47 -30
- package/one/things/claude/agents/service-advocacy-campaigns.md +47 -30
- package/one/things/claude/agents/service-advocacy-manager.md +47 -30
- package/one/things/claude/agents/service-success-manager.md +47 -30
- package/one/things/claude/agents/service-team-manager.md +45 -40
- package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +85 -30
- package/one/things/claude/agents/share-optimization-specialist.md +50 -25
- package/one/things/claude/agents/sm.md +50 -25
- package/one/things/claude/agents/story-teller.md +51 -26
- package/one/things/claude/agents/task-master.md +52 -27
- package/one/things/claude/agents/tauri-cross-platform-specialist.md +201 -116
- package/one/things/claude/agents/tester.md +85 -46
- package/one/things/claude/agents/the-bull-character-manager.md +48 -25
- package/one/things/claude/agents/tools-playbook-generator.md +43 -40
- package/one/things/claude/agents/turbo-repo-builder.md +57 -27
- package/one/things/claude/agents/upsell-strategist.md +48 -25
- package/one/things/claude/agents/ux-expert.md +50 -25
- package/one/things/claude/agents/viral-growth-orchestrator.md +50 -27
- package/one/things/claude/commands/agent.md +25 -5
- package/one/things/claude/commands/cascade-status.md +33 -8
- package/one/things/claude/commands/ingest.md +64 -11
- package/one/things/claude/commands/ingestor.md +29 -7
- package/one/things/claude/commands/mission.md +24 -4
- package/one/things/claude/commands/npx.md +30 -7
- package/one/things/claude/commands/one.md +114 -68
- package/one/things/claude/commands/quality-check.md +72 -24
- package/one/things/claude/commands/smart-route.md +45 -4
- package/one/things/claude/commands/start.md +22 -4
- package/one/things/claude/commands/story.md +25 -5
- package/one/things/claude/commands/task.md +21 -1
- package/one/things/cli/cli-code.md +244 -219
- package/one/things/cli/cli-compiler-code.md +244 -219
- package/one/things/cli/cli.md +30 -6
- package/one/things/components/card-shadcn.md +252 -228
- package/one/things/components/card.md +315 -324
- package/one/things/components.md +667 -593
- package/one/things/componets.md +16 -1
- package/one/things/creator-diagram.md +23 -5
- package/one/things/demo-accessibility-animations.md +73 -47
- package/one/things/demo-components.md +225 -219
- package/one/things/demo-design-summary.md +95 -32
- package/one/things/demo-design-system.md +184 -130
- package/one/things/demo-page-layouts.md +52 -25
- package/one/things/designs/accessibility-audit.md +153 -66
- package/one/things/designs/component-specifications.md +163 -65
- package/one/things/designs/design-overview.md +81 -22
- package/one/things/designs/design-tokens.md +127 -93
- package/one/things/designs/wireframes-dashboard.md +64 -7
- package/one/things/docs/api-requests.md +75 -11
- package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +18 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +57 -0
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +62 -6
- package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +60 -5
- package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +95 -27
- package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +130 -62
- package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +43 -19
- package/one/things/docs/ecommerce/QUICK-START.md +41 -4
- package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +75 -6
- package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +58 -24
- package/one/things/examples/children/lemonade-stand.md +52 -14
- package/one/things/examples/enterprise/crm-saas.md +66 -51
- package/one/things/features/1-1-agent-prompts.md +76 -0
- package/one/things/features/1-2-yaml-orchestrator.md +32 -0
- package/one/things/features/1-3-event-coordination.md +40 -1
- package/one/things/features/1-4-knowledge-management.md +91 -16
- package/one/things/features/1-5-quality-loops.md +88 -4
- package/one/things/features/1-6-numbering-structure.md +78 -14
- package/one/things/features/2-1-dataprovider-interface.md +317 -92
- package/one/things/features/2-2-config-system.md +307 -140
- package/one/things/features/2-3-effectts-services.md +266 -119
- package/one/things/features/2-4-react-hooks.md +221 -205
- package/one/things/features/2-5-auth-migration.md +406 -308
- package/one/things/features/2-6-dashboard-migration.md +112 -13
- package/one/things/features/2-7-alternative-providers.md +138 -65
- package/one/things/features/2-7-implementation-report.md +68 -24
- package/one/things/features/2-cli.md +91 -79
- package/one/things/features/2-design.md +114 -82
- package/one/things/features/2-tests.md +56 -0
- package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +91 -36
- package/one/things/features/DECOUPLING.md +36 -18
- package/one/things/features/DEPLOYMENT.md +22 -4
- package/one/things/features/IMPLEMENTATION_SUMMARY.md +48 -2
- package/one/things/features/improve.md +47 -29
- package/one/things/features/remove-convex-deps.md +18 -0
- package/one/things/features/top-features.md +28 -20
- package/one/things/features/use-one-backend.md +212 -175
- package/one/things/features-in-english.md +19 -6
- package/one/things/files.yaml +721 -0
- package/one/things/ideas/1-create-workflow.md +18 -0
- package/one/things/ideas/2-backend-agnostic-frontend.md +57 -2
- package/one/things/implementation/backend-guide.md +65 -20
- package/one/things/interface.md +51 -8
- package/one/things/landing-page-implementation.md +455 -0
- package/one/things/legal/README.md +44 -0
- package/one/things/legal/privacy-policy.md +188 -25
- package/one/things/legal/terms-of-service.md +170 -9
- package/one/things/master-workflow-plan.md +806 -0
- package/one/things/plans/0-in-sync.md +136 -0
- package/one/things/plans/0-timeline.md +36 -0
- package/one/things/plans/1-create-workflow.md +19 -0
- package/one/things/plans/QUICK-START-SIMPLIFICATION.md +333 -0
- package/one/things/plans/README-SIMPLIFICATION.md +349 -0
- package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +16 -0
- package/one/things/plans/SIMPLIFICATION-SUMMARY.md +455 -0
- package/one/things/plans/ai-elements.md +28 -9
- package/one/things/plans/ai-integration.md +111 -62
- package/one/things/plans/ai-sdk.md +92 -55
- package/one/things/plans/ai-tools.md +621 -0
- package/one/things/plans/app.md +142 -71
- package/one/things/plans/architecture-summary.md +34 -5
- package/one/things/plans/async-ai-agents.md +19 -1
- package/one/things/plans/backend-agnostic-frontend.md +70 -8
- package/one/things/plans/backend-cleanup-quickstart.md +55 -21
- package/one/things/plans/backend-ontology-conformance.md +150 -91
- package/one/things/plans/backend-status.md +64 -6
- package/one/things/plans/backend-structure.md +103 -55
- package/one/things/plans/backend-target-structure.md +63 -19
- package/one/things/plans/backend.md +61 -19
- package/one/things/plans/better-auth-any-backend-revised.md +325 -287
- package/one/things/plans/better-auth-any-backend.md +576 -532
- package/one/things/plans/better-auth-available-features.md +43 -5
- package/one/things/plans/big-plan.md +20 -6
- package/one/things/plans/cli-updates-required.md +44 -4
- package/one/things/plans/complete-step-by-step.md +223 -116
- package/one/things/plans/components.md +709 -0
- package/one/things/plans/convex-agents.md +87 -58
- package/one/things/plans/convex-better-auth.md +186 -154
- package/one/things/plans/convex-on-off.md +47 -29
- package/one/things/plans/crypto-token-researcher.md +629 -0
- package/one/things/plans/data-quality-metrics.md +745 -0
- package/one/things/plans/deep-researcher-agent.md +466 -0
- package/one/things/plans/deploy-to-cloudflare.md +55 -13
- package/one/things/plans/deployment-architecture.md +54 -11
- package/one/things/plans/desktop.md +21 -3
- package/one/things/plans/development-plan.md +233 -170
- package/one/things/plans/development-workflow-tldr.md +207 -0
- package/one/things/plans/development-workflow.md +959 -0
- package/one/things/plans/effect-components.md +667 -593
- package/one/things/plans/effect-patterns-reference.md +2235 -0
- package/one/things/plans/effect.md +209 -136
- package/one/things/plans/email.md +21 -8
- package/one/things/plans/enhance-auth.md +64 -41
- package/one/things/plans/execution-strategy.md +1291 -0
- package/one/things/plans/existing-infrastructure.md +712 -0
- package/one/things/plans/feature-based-sites.md +124 -51
- package/one/things/plans/frontend-effects.md +1276 -0
- package/one/things/plans/group-folder-multi-tenancy.md +187 -124
- package/one/things/plans/improve-codebase.md +498 -421
- package/one/things/plans/install-components.md +18 -1
- package/one/things/plans/integrate-frontend-and-backend.md +77 -53
- package/one/things/plans/landing.md +92 -0
- package/one/things/plans/layout.md +45 -1
- package/one/things/plans/mail-backend.md +546 -493
- package/one/things/plans/mail.md +379 -326
- package/one/things/plans/mcp-clear-context-prompt.md +21 -0
- package/one/things/plans/mcp-simple.md +20 -0
- package/one/things/plans/multi-ontology-architecture.md +115 -66
- package/one/things/plans/next-features.md +31 -0
- package/one/things/plans/onboarding.md +21 -2
- package/one/things/plans/one.md +18 -0
- package/one/things/plans/ontology-6-dimensions.md +31 -52
- package/one/things/plans/ontology-compliance-audit.md +315 -0
- package/one/things/plans/ontology-driven-strategy.md +19 -3
- package/one/things/plans/ontology-refine.md +586 -0
- package/one/things/plans/ontology-ui-approach.md +18 -0
- package/one/things/plans/open-agent.md +152 -97
- package/one/things/plans/performace.md +32 -0
- package/one/things/plans/phase-1-foundation.md +620 -0
- package/one/things/plans/phase-3-implementation.md +1037 -0
- package/one/things/plans/quick-wins.md +342 -187
- package/one/things/plans/readme-backend-cleanup.md +57 -16
- package/one/things/plans/release.md +55 -2
- package/one/things/plans/repos.md +22 -0
- package/one/things/plans/separate-copy-2.md +127 -71
- package/one/things/plans/separate-copy-3.md +35 -14
- package/one/things/plans/separate-copy.md +127 -71
- package/one/things/plans/separate-demo.md +37 -3
- package/one/things/plans/separate.md +24 -6
- package/one/things/plans/sequence.md +284 -141
- package/one/things/plans/shadcn-integration-summary.md +104 -44
- package/one/things/plans/sidebar.md +44 -10
- package/one/things/plans/skills.md +133 -30
- package/one/things/plans/small-fixes.md +19 -1
- package/one/things/plans/start-new.md +39 -13
- package/one/things/plans/switch-off-auth.md +22 -0
- package/one/things/plans/sync-checklist.md +34 -4
- package/one/things/plans/test-backend-connection.md +38 -0
- package/one/things/plans/unified-implementation-plan.md +145 -63
- package/one/things/plans/update-demos.md +156 -88
- package/one/things/plans/use-our-backend.md +572 -0
- package/one/things/plans/wave1-onboarding-100-inferences.md +1686 -0
- package/one/things/plans/wave1-onboarding-vision.md +744 -0
- package/one/things/plans/wave1-orchestration-summary.md +604 -0
- package/one/things/plans/wave1-specialist-assignments.md +1413 -0
- package/one/things/plans/workflow-files.md +28 -14
- package/one/things/plans/workflow.md +18 -12
- package/one/things/products/cascade-landing-page.md +150 -46
- package/one/things/products/cascade.md +185 -135
- package/one/things/products/context-engineering.md +411 -350
- package/one/things/products/onthology.md +15 -0
- package/one/things/products/ontology-ui-shadcn.md +375 -353
- package/one/things/products/ontology-ui.md +101 -59
- package/one/things/products/ontology.md +92 -20
- package/one/things/products/sdk.md +181 -165
- package/one/things/promptkit.md +70 -43
- package/one/things/repos/all-repos.md +0 -0
- package/one/things/service-providers-new.md +95 -25
- package/one/things/service-providers.md +231 -202
- package/one/things/structure.md +532 -0
- package/one/things/system.md +18 -0
- package/one/things/templates.md +40 -0
- package/one/things/tests/2-1-dataprovider-interface.md +105 -33
- package/one/things/tests/2-1-test-analysis.md +66 -18
- package/one/things/things.md +51 -16
- package/one/things/todo-acp-integration.md +744 -0
- package/one/things/todo-ai.md +933 -0
- package/one/things/todo-api.md +1078 -0
- package/one/things/todo-assignment.md +580 -0
- package/one/things/todo-buy-chatgpt.md +1450 -0
- package/one/things/todo-components.md +1683 -0
- package/one/things/todo-connections.md +278 -0
- package/one/things/todo-ecommerce-frontend.md +1313 -0
- package/one/things/todo-ecommerce.md +569 -0
- package/one/things/todo-effects.md +1075 -0
- package/one/things/todo-frontend-effects.md +977 -0
- package/one/things/todo-landing-page.md +1091 -0
- package/one/things/todo-mail.md +1160 -0
- package/one/things/todo-master-plan.md +490 -0
- package/one/things/todo-onboard.md +666 -0
- package/one/things/todo-one-ie.md +538 -0
- package/one/things/todo-page.md +606 -0
- package/one/things/todo-plans.md +282 -0
- package/one/things/todo-projects.md +241 -0
- package/one/things/todo-refactoring-plan.md +366 -0
- package/one/things/todo-sequence.md +1621 -0
- package/one/things/todo-use-our-backend.md +1908 -0
- package/one/things/todo-workflow.md +626 -0
- package/one/things/todo-x402.md +2047 -0
- package/one/things/todo.md +459 -1075
- package/one/things/video/scripts-crypto.md +835 -0
- package/one/things/video-script-ontology.md +334 -0
- package/package.json +7 -2
- package/.claude/commands/build.md +0 -293
- package/one/.obsidian/app.json +0 -8
- package/one/.obsidian/appearance.json +0 -1
- package/one/.obsidian/community-plugins.json +0 -3
- package/one/.obsidian/core-plugins.json +0 -33
- package/one/.obsidian/plugins/easy-bake/main.js +0 -361
- package/one/.obsidian/plugins/easy-bake/manifest.json +0 -11
- package/one/.obsidian/plugins/easy-bake/styles.css +0 -10
- package/one/.obsidian/workspace.json +0 -240
- package/one/events/2024-10-14-deployment-plan.md +0 -331
- package/one/events/2024-10-14-deployment-success.md +0 -448
- package/one/events/2024-10-14-final-sync-complete.md +0 -251
- package/one/events/2024-10-14-release-v2.0.6.md +0 -415
- package/one/events/2024-10-15-agent-clean-v2-summary.md +0 -496
- package/one/events/2024-10-15-handoff-to-clean.md +0 -348
- package/one/events/2024-10-15-package-manager-tests.md +0 -443
- package/one/events/2024-10-15-release-command-complete.md +0 -417
- package/one/events/2025-10-15-private-files-secured.md +0 -341
- package/one/events/2025-10-15-unignore-public-group-docs.md +0 -280
- package/one/events/API_ROUTES_FIXES_SUMMARY.md +0 -262
- package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +0 -636
- package/one/events/BEFORE_AFTER_COMPARISON.md +0 -960
- package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +0 -354
- package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +0 -412
- package/one/events/CLEANUP-RELEASE-V2.0.8.md +0 -290
- package/one/events/CONNECTIONS_DEMO.md +0 -501
- package/one/events/CREATE-WEBSITE.md +0 -442
- package/one/events/CRITICAL-FIXES-COMPLETE.md +0 -504
- package/one/events/CUSTOM-DOMAIN.md +0 -357
- package/one/events/DELIVERABLES.md +0 -432
- package/one/events/DEMO-GROUPS-PAGE.md +0 -392
- package/one/events/DEMO-TESTING-SUMMARY.md +0 -518
- package/one/events/DEMO_COMPONENTS.md +0 -487
- package/one/events/DEMO_HOOKS_INDEX.md +0 -334
- package/one/events/DEMO_INFRASTRUCTURE.md +0 -905
- package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +0 -570
- package/one/events/DEMO_INTEGRATION_CHECKLIST.md +0 -431
- package/one/events/DEMO_QUICK_REFERENCE.md +0 -441
- package/one/events/DEMO_SETUP.md +0 -476
- package/one/events/DEPLOYMENT copy.md +0 -426
- package/one/events/DEPLOYMENT.md +0 -178
- package/one/events/ECOMMERCE-BEFORE-AFTER.md +0 -251
- package/one/events/ECOMMERCE-DEMO-PLAN.md +0 -225
- package/one/events/ECOMMERCE-ENHANCEMENTS.md +0 -576
- package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +0 -421
- package/one/events/ECOMMERCE-LIVE-DEMO.md +0 -363
- package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +0 -196
- package/one/events/ECOMMERCE-SETUP-SUMMARY.md +0 -396
- package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +0 -735
- package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +0 -923
- package/one/events/EFFECT_TS_API_PATTERN.md +0 -478
- package/one/events/FEATURE-2-4-COMPLETE.md +0 -302
- package/one/events/FEATURE_2_3_COMPLETE.md +0 -575
- package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +0 -223
- package/one/events/GROUPS-MIGRATION.md +0 -625
- package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +0 -414
- package/one/events/HANDOFF.md +0 -313
- package/one/events/HOOKS-DEMO.md +0 -441
- package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +0 -503
- package/one/events/IMPLEMENTATION_SUMMARY.md +0 -529
- package/one/events/INSTALL-TESTS.md +0 -293
- package/one/events/INSTALLATION_FOLDERS.md +0 -516
- package/one/events/INSTALLATION_FOLDERS_FILES.md +0 -205
- package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +0 -419
- package/one/events/INTEGRATION-ARCHITECTURE.md +0 -561
- package/one/events/INTEGRATION-CHECKLIST.md +0 -1234
- package/one/events/INTEGRATION-ORCHESTRATION.md +0 -2623
- package/one/events/INTEGRATION-SUMMARY.md +0 -653
- package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +0 -666
- package/one/events/LANDING-PAGE-IMPLEMENTATION.md +0 -642
- package/one/events/LANDING-PAGE-QUICKSTART.md +0 -407
- package/one/events/LICENSE.md +0 -89
- package/one/events/MCP-CONFIGURATION.md +0 -336
- package/one/events/MCP-SETUP-COMPLETE.md +0 -205
- package/one/events/MIGRATION-REPORT.md +0 -435
- package/one/events/MIGRATION.md +0 -69
- package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +0 -1627
- package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +0 -573
- package/one/events/NODE-UPGRADE.md +0 -111
- package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +0 -398
- package/one/events/ONTOLOGY-HOOKS-README.md +0 -700
- package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +0 -365
- package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +0 -525
- package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +0 -455
- package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +0 -486
- package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +0 -203
- package/one/events/PACKAGE-STRUCTURE.md +0 -310
- package/one/events/PLAYBOOK-SETUP-SUMMARY.md +0 -331
- package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +0 -567
- package/one/events/QA-CHECKLIST.md +0 -674
- package/one/events/QUICK-START-ONTOLOGY.md +0 -408
- package/one/events/README-archived.md +0 -519
- package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +0 -639
- package/one/events/SEARCH_DEMO_DELIVERY.md +0 -415
- package/one/events/SEARCH_DEMO_SUMMARY.md +0 -303
- package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +0 -381
- package/one/events/SECURITY-AUDIT-FIXES.md +0 -376
- package/one/events/SECURITY-SCAN-COMPLETE.md +0 -281
- package/one/events/SHOP-BUILD-STATUS.md +0 -114
- package/one/events/SHOP-PREMIUM-UPDATE.md +0 -149
- package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +0 -262
- package/one/events/SITE-WIDE-GRADIENT-FIX.md +0 -299
- package/one/events/STORE-PRODUCTION-READY-STATUS.md +0 -359
- package/one/events/STRIPE-INTEGRATION.md +0 -414
- package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +0 -429
- package/one/events/STRIPE-SETUP-GUIDE.md +0 -462
- package/one/events/TEST-PLAN-INDEX.md +0 -346
- package/one/events/TEST-PLAN.md +0 -1417
- package/one/events/TEST-SUMMARY.md +0 -393
- package/one/events/TESTING-DELIVERY.txt +0 -372
- package/one/events/TESTS-QUICK-REF.md +0 -262
- package/one/events/TRANSITIONS-QUICK-START.md +0 -141
- package/one/events/TRANSPARENCY-FIXES.md +0 -275
- package/one/events/TYPESCRIPT_FIXES.md +0 -152
- package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +0 -412
- package/one/events/TYPESCRIPT_FIXES_INDEX.md +0 -341
- package/one/events/VIEW-TRANSITIONS.md +0 -428
- package/one/events/agent-director-enhancement-summary.md +0 -386
- package/one/events/agent-onboard-implementation-summary.md +0 -457
- package/one/events/backend-integration-tests.md +0 -606
- package/one/events/backend-structure-diagram.txt +0 -393
- package/one/events/backend-structure-summary.txt +0 -269
- package/one/events/clean-agent-ontology-cleanup-report.md +0 -353
- package/one/events/cloudflare-automation-complete.md +0 -332
- package/one/events/cloudflare-pages-infrastructure-setup.md +0 -264
- package/one/events/contact-page-complete.md +0 -298
- package/one/events/convex-analysis-index.md +0 -304
- package/one/events/convex-structure-analysis.md +0 -700
- package/one/events/deployment-installation-folders.md +0 -160
- package/one/events/deployment-ops-summary.md +0 -368
- package/one/events/deployment-verification.md +0 -348
- package/one/events/design-spec-complete.md +0 -208
- package/one/events/events.md +0 -545
- package/one/events/installation-folders-workflow-integration.md +0 -440
- package/one/events/landing-page-generator.md +0 -458
- package/one/events/legal-assessment-2025-10-16.md +0 -1899
- package/one/events/onboarding-implementation-complete.md +0 -505
- package/one/events/ontology-test-examples.md +0 -562
- package/one/events/phase1-backend-implementation-complete.md +0 -518
- package/one/events/release.md +0 -254
- package/one/events/separate-implementation-status.md +0 -537
- package/one/events/session-summary-2025-10-18.md +0 -348
- package/one/events/skills-complete.md +0 -333
- package/one/events/skills-infer-6-10-summary.md +0 -52
- package/one/events/skills-phase1-complete.md +0 -263
- package/one/events/test-dashboard.md +0 -345
- package/one/events/test-index.md +0 -361
- package/one/events/test-report-ontology.md +0 -582
- package/one/events/testing-summary.md +0 -344
- package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +0 -49
- package/one/knowledge/docs/flow.md +0 -0
- package/one/knowledge/documentation-summary.md +0 -285
- package/one/knowledge/inference-score.md +0 -159
- package/one/knowledge/ontology-frontend-copy-2.md +0 -1492
- package/one/knowledge/ontology-frontend-copy.md +0 -753
- package/one/knowledge/ontology-migration-guide.md +0 -811
- package/one/things/features/0 All Features.md +0 -2
- package/one/things/plans/1-create-workflow-status.md +0 -555
- package/one/things/plans/2-backend-agnostic-frontend.md +0 -546
- package/one/things/plans/2-sites.md +0 -895
- package/one/things/plans/3-groups.md +0 -735
- package/one/things/plans/5-build-frontend.md +0 -0
- package/one/things/plans/5-complete.md +0 -17
- package/one/things/plans/agent-director-100-inference-plans.md +0 -410
- package/one/things/plans/dual-website-strategy.md +0 -612
- package/one/things/plans/releases.md +0 -809
|
@@ -1,8 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Ontology
|
|
3
|
+
dimension: knowledge
|
|
4
|
+
category: ontology.md
|
|
5
|
+
tags: 6-dimensions, ai, architecture, ontology
|
|
6
|
+
related_dimensions: connections, events, groups, 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 knowledge dimension in the ontology.md category.
|
|
13
|
+
Location: one/knowledge/ontology.md
|
|
14
|
+
Purpose: Documents one platform - ontology specification
|
|
15
|
+
Related dimensions: connections, events, groups, people, things
|
|
16
|
+
For AI agents: Read this to understand ontology.
|
|
17
|
+
---
|
|
18
|
+
|
|
1
19
|
# ONE Platform - Ontology Specification
|
|
2
20
|
|
|
3
|
-
**Version:**
|
|
21
|
+
**Version:** 3.0.0 (Reality as DSL - The Universal Code Generation Language)
|
|
4
22
|
**Status:** Complete - Reality-Aware Architecture
|
|
5
|
-
**Design Principle:** This
|
|
23
|
+
**Design Principle:** This isn't just a data model. It's a Domain-Specific Language (DSL) that models reality itself, enabling 98% AI code generation accuracy through compound structure.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Why This Changes Everything
|
|
28
|
+
|
|
29
|
+
### The Breakthrough: Reality as DSL
|
|
30
|
+
|
|
31
|
+
**Most developers think databases model their application.**
|
|
32
|
+
|
|
33
|
+
We flipped this. **The 6-dimension ontology models reality itself**. Applications map to it.
|
|
34
|
+
|
|
35
|
+
This enables:
|
|
36
|
+
|
|
37
|
+
- **98% AI code generation accuracy** (not 30-70%)
|
|
38
|
+
- **Compound structure** (each feature makes the next MORE accurate, not less)
|
|
39
|
+
- **Universal feature import** (clone ANY system into the ontology)
|
|
40
|
+
- **Never breaks** (reality doesn't change, technology does)
|
|
41
|
+
|
|
42
|
+
### What AI Sees
|
|
43
|
+
|
|
44
|
+
**Traditional Codebase (Pattern Divergence):**
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Feature 1: createUser(email) ────────┐
|
|
48
|
+
Feature 2: addProduct(name) ─────────┼─→ 100 patterns
|
|
49
|
+
Feature 3: registerCustomer(data) ───┤ AI confused
|
|
50
|
+
Feature 4: insertOrder(items) ───────┤ Accuracy: 30%
|
|
51
|
+
...each uses different approach
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**ONE Codebase (Pattern Convergence):**
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Feature 1: provider.things.create({ type: "user" }) ────┐
|
|
58
|
+
Feature 2: provider.things.create({ type: "product" }) ─┼─→ 1 pattern
|
|
59
|
+
Feature 3: provider.things.create({ type: "customer" })─┤ AI masters it
|
|
60
|
+
Feature 4: provider.things.create({ type: "order" }) ───┤ Accuracy: 98%
|
|
61
|
+
...all use same pattern
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**The difference:** Traditional codebases teach AI 100 patterns (chaos). ONE teaches AI 1 pattern (mastery).
|
|
65
|
+
|
|
66
|
+
### Why This Never Breaks
|
|
67
|
+
|
|
68
|
+
**Reality is stable. Technology changes.**
|
|
69
|
+
|
|
70
|
+
The 6 dimensions model reality:
|
|
71
|
+
|
|
72
|
+
1. **Groups** - Containers exist (friend circles → governments)
|
|
73
|
+
2. **People** - Actors authorize (who can do what)
|
|
74
|
+
3. **Things** - Entities exist (users, products, courses, agents)
|
|
75
|
+
4. **Connections** - Relationships relate (owns, purchased, enrolled_in)
|
|
76
|
+
5. **Events** - Actions happen (created, updated, purchased)
|
|
77
|
+
6. **Knowledge** - Understanding emerges (embeddings, search, RAG)
|
|
78
|
+
|
|
79
|
+
These dimensions NEVER change because they model reality itself, not any specific technology.
|
|
80
|
+
|
|
81
|
+
**Examples of systems that map perfectly:**
|
|
82
|
+
|
|
83
|
+
- **Shopify** → Products (things), Orders (connections + events), Customers (people)
|
|
84
|
+
- **Moodle** → Courses (things), Enrollments (connections), Completions (events)
|
|
85
|
+
- **Stripe** → Payments (things), Transactions (connections + events), Customers (people)
|
|
86
|
+
- **WordPress** → Posts (things), Authors (people), Categories (knowledge labels)
|
|
87
|
+
|
|
88
|
+
**Every system maps to the same 6 dimensions.** That's why AI agents achieve 98% accuracy.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
6
92
|
## Structure
|
|
7
93
|
|
|
8
94
|
This ontology is organized into 6 dimension files:
|
|
@@ -16,15 +102,17 @@ This ontology is organized into 6 dimension files:
|
|
|
16
102
|
|
|
17
103
|
**Execution Guide:**
|
|
18
104
|
|
|
19
|
-
7. **[todo.md](./todo.md)** - 100-
|
|
105
|
+
7. **[todo.md](./todo.md)** - 100-cycle execution sequence (plan in cycles, not days)
|
|
20
106
|
|
|
21
107
|
**This document (Ontology.md)** contains the complete technical specification. The consolidated files above provide focused summaries and patterns.
|
|
22
108
|
|
|
23
|
-
**Planning Paradigm:** We don't plan in days. We plan in **
|
|
109
|
+
**Planning Paradigm:** We don't plan in days. We plan in **cycle passes** (Cycle 1-100). See [todo.md](./todo.md) for the complete 100-cycle template that guides feature implementation from idea to production.
|
|
24
110
|
|
|
25
111
|
## The 6-Dimension Reality Model
|
|
26
112
|
|
|
27
|
-
|
|
113
|
+
**This is the universal interface.** Every feature in every system maps to these 6 dimensions.
|
|
114
|
+
|
|
115
|
+
**Every single thing in ONE platform exists within one of these 6 dimensions:**
|
|
28
116
|
|
|
29
117
|
```
|
|
30
118
|
┌──────────────────────────────────────────────────────────────┐
|
|
@@ -59,9 +147,339 @@ Every single thing in ONE platform exists within one of these 6 dimensions:
|
|
|
59
147
|
└──────────────────────────────────────────────────────────────┘
|
|
60
148
|
```
|
|
61
149
|
|
|
150
|
+
**The Universal Interface (How Technology Implements the Ontology):**
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
154
|
+
│ LAYER 1: UNIVERSAL INTERFACE │
|
|
155
|
+
│ (The 6-Dimension DSL) │
|
|
156
|
+
├─────────────────────────────────────────────────────────────────────┤
|
|
157
|
+
│ groups → Hierarchical containers (friend circles → governments)│
|
|
158
|
+
│ people → Authorization & governance (who can do what) │
|
|
159
|
+
│ things → All entities (66 types: user, product, course...) │
|
|
160
|
+
│ connections → All relationships (25 types: owns, purchased...) │
|
|
161
|
+
│ events → All actions (67 types: created, updated, logged...) │
|
|
162
|
+
│ knowledge → AI understanding (embeddings, search, RAG) │
|
|
163
|
+
│ │
|
|
164
|
+
│ This layer NEVER changes. It models reality. │
|
|
165
|
+
└──────────────────┬──────────────────────────────────────────────────┘
|
|
166
|
+
│
|
|
167
|
+
↓ Technology changes, ontology stays the same
|
|
168
|
+
|
|
169
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
170
|
+
│ TECHNOLOGY ADAPTERS (swap freely) │
|
|
171
|
+
│ (Convex, Hono, Astro, React, etc.) │
|
|
172
|
+
├─────────────────────────────────────────────────────────────────────┤
|
|
173
|
+
│ Backend: Hono API + Convex Database (implements ontology) │
|
|
174
|
+
│ Frontend: Astro SSR + React Islands (renders ontology) │
|
|
175
|
+
│ Real-time: Convex hooks (live ontology subscriptions) │
|
|
176
|
+
│ Static: Astro Content Collections (ontology as files) │
|
|
177
|
+
│ │
|
|
178
|
+
│ Technology can be swapped. Ontology stays the same. │
|
|
179
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Dimension 1: Groups (Containers)
|
|
183
|
+
|
|
184
|
+
**Purpose:** Partition the system with hierarchical nesting (friend circles → DAOs → governments)
|
|
185
|
+
|
|
186
|
+
**Why it never changes:** Containers always contain things. Whether it's a lemonade stand or a global government, the concept of "container" is universal.
|
|
187
|
+
|
|
188
|
+
**Pattern for AI:**
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
// AI learns: Everything belongs to a group
|
|
192
|
+
provider.things.create({ groupId, type, name, properties });
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Example mappings:**
|
|
196
|
+
|
|
197
|
+
- Shopify Store → group (type: business)
|
|
198
|
+
- Moodle School → group (type: organization)
|
|
199
|
+
- DAO Treasury → group (type: dao)
|
|
200
|
+
- Friend Circle → group (type: friend_circle)
|
|
201
|
+
|
|
202
|
+
### Dimension 2: People (Authorization)
|
|
203
|
+
|
|
204
|
+
**Purpose:** Define who can do what (actors, roles, permissions)
|
|
205
|
+
|
|
206
|
+
**Why it never changes:** Authorization is a universal concept. Someone always performs actions.
|
|
207
|
+
|
|
208
|
+
**Pattern for AI:**
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
// AI learns: Every action has an actor
|
|
212
|
+
events.log({ actorId: personId, type, targetId });
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Example mappings:**
|
|
216
|
+
|
|
217
|
+
- Shopify Admin → person (role: org_owner)
|
|
218
|
+
- Moodle Student → person (role: customer)
|
|
219
|
+
- Platform Owner → person (role: platform_owner)
|
|
220
|
+
- Team Member → person (role: org_user)
|
|
221
|
+
|
|
222
|
+
### Dimension 3: Things (Entities)
|
|
223
|
+
|
|
224
|
+
**Purpose:** All nouns in the system (66 types, infinitely extensible)
|
|
225
|
+
|
|
226
|
+
**Why it never changes:** Entities exist. Users, products, courses, agents—these are all "things" with different types.
|
|
227
|
+
|
|
228
|
+
**Pattern for AI:**
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
// AI learns: One pattern for all entities
|
|
232
|
+
provider.things.create({ type: "product" | "course" | "user" | ..., name, properties })
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Example mappings:**
|
|
236
|
+
|
|
237
|
+
- Shopify Product → thing (type: product)
|
|
238
|
+
- Moodle Course → thing (type: course)
|
|
239
|
+
- Stripe Payment → thing (type: payment)
|
|
240
|
+
- WordPress Post → thing (type: blog_post)
|
|
241
|
+
|
|
242
|
+
**New entity type?** Just add to `properties`. No schema migration needed.
|
|
243
|
+
|
|
244
|
+
### Dimension 4: Connections (Relationships)
|
|
245
|
+
|
|
246
|
+
**Purpose:** How entities relate to each other (25 types + metadata)
|
|
247
|
+
|
|
248
|
+
**Why it never changes:** Relationships are universal. Things connect to other things.
|
|
249
|
+
|
|
250
|
+
**Pattern for AI:**
|
|
251
|
+
|
|
252
|
+
```typescript
|
|
253
|
+
// AI learns: One pattern for all relationships
|
|
254
|
+
provider.connections.create({
|
|
255
|
+
fromThingId,
|
|
256
|
+
toThingId,
|
|
257
|
+
relationshipType,
|
|
258
|
+
metadata,
|
|
259
|
+
});
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Example mappings:**
|
|
263
|
+
|
|
264
|
+
- Shopify Order → connection (type: purchased) + event (type: order_placed)
|
|
265
|
+
- Moodle Enrollment → connection (type: enrolled_in)
|
|
266
|
+
- GitHub Follows → connection (type: following)
|
|
267
|
+
- Token Holdings → connection (type: holds_tokens, metadata: { balance })
|
|
268
|
+
|
|
269
|
+
### Dimension 5: Events (Actions)
|
|
270
|
+
|
|
271
|
+
**Purpose:** Complete audit trail of what happened when (67 types + metadata)
|
|
272
|
+
|
|
273
|
+
**Why it never changes:** Actions happen at specific times. This is universal.
|
|
274
|
+
|
|
275
|
+
**Pattern for AI:**
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
// AI learns: All actions are logged the same way
|
|
279
|
+
provider.events.log({ type, actorId, targetId, timestamp, metadata });
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Example mappings:**
|
|
283
|
+
|
|
284
|
+
- Shopify Checkout → event (type: payment_processed)
|
|
285
|
+
- Moodle Lesson View → event (type: content_viewed)
|
|
286
|
+
- User Login → event (type: user_login)
|
|
287
|
+
- Token Purchase → event (type: tokens_purchased)
|
|
288
|
+
|
|
289
|
+
### Dimension 6: Knowledge (Understanding)
|
|
290
|
+
|
|
291
|
+
**Purpose:** Labels, embeddings, and semantic search for AI
|
|
292
|
+
|
|
293
|
+
**Why it never changes:** Categorization and understanding are universal concepts.
|
|
294
|
+
|
|
295
|
+
**Pattern for AI:**
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
// AI learns: Knowledge is linked to things
|
|
299
|
+
provider.knowledge.create({
|
|
300
|
+
sourceThingId,
|
|
301
|
+
knowledgeType: "label" | "chunk",
|
|
302
|
+
text,
|
|
303
|
+
embedding,
|
|
304
|
+
});
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**Example mappings:**
|
|
308
|
+
|
|
309
|
+
- WordPress Categories → knowledge (type: label)
|
|
310
|
+
- Course Content → knowledge (type: chunk, embedding: [...])
|
|
311
|
+
- Product Tags → knowledge (type: label)
|
|
312
|
+
- Semantic Search → knowledge vector search
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
62
316
|
**Golden Rule:** If you can't map your feature to these 6 dimensions, you're thinking about it wrong.
|
|
63
317
|
|
|
64
|
-
**
|
|
318
|
+
**For AI Agents:** This ontology is your universal language. Learn these 6 patterns and you can generate ANY feature with 98% accuracy.
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Compound Structure Accuracy: Why AI Gets Better Over Time
|
|
323
|
+
|
|
324
|
+
### Traditional AI Code Generation (Pattern Divergence)
|
|
325
|
+
|
|
326
|
+
**The death spiral:**
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
Generation 1: Clean code → 95% accurate
|
|
330
|
+
Generation 2: Slight drift → 90% accurate (-5% - patterns starting to diverge)
|
|
331
|
+
Generation 3: Pattern divergence → 80% accurate (-10% - AI sees multiple patterns)
|
|
332
|
+
Generation 4: Inconsistency → 65% accurate (-15% - AI confused by variations)
|
|
333
|
+
Generation N: Unmaintainable mess → 30% accurate (-20% - complete chaos)
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Why?** Each feature introduces NEW patterns. AI has to guess which pattern to use.
|
|
337
|
+
|
|
338
|
+
### ONE's AI Code Generation (Pattern Convergence)
|
|
339
|
+
|
|
340
|
+
**The virtuous cycle:**
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
Generation 1: Maps to ontology → 85% accurate (learning the ontology)
|
|
344
|
+
Generation 2: Follows patterns → 90% accurate (+5% - recognizing service pattern)
|
|
345
|
+
Generation 3: Reuses services → 93% accurate (+3% - composing existing services)
|
|
346
|
+
Generation 4: Predictable structure → 96% accurate (+3% - mastering Effect.ts patterns)
|
|
347
|
+
Generation N: Perfect consistency → 98%+ accurate (+2% - generalized patterns)
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**Why?** Each feature uses the SAME patterns. AI masters the ontology, then reuses it.
|
|
351
|
+
|
|
352
|
+
### How Agents Learn the Ontology
|
|
353
|
+
|
|
354
|
+
**Generation 1-5: Learning (85% accurate)**
|
|
355
|
+
|
|
356
|
+
```
|
|
357
|
+
Agent thinks:
|
|
358
|
+
"I see things being created with `type` field. Let me check..."
|
|
359
|
+
"All entities are things? Even users, products, courses?"
|
|
360
|
+
"Connections link things together. Got it."
|
|
361
|
+
"Events log actions. People are actors."
|
|
362
|
+
"Pattern emerging: 6 dimensions for everything."
|
|
363
|
+
CONFIDENCE: 85% (still learning)
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Generation 6-20: Recognizing (90% accurate)**
|
|
367
|
+
|
|
368
|
+
```
|
|
369
|
+
Agent thinks:
|
|
370
|
+
"Every create operation uses provider.things.create. 100% of the time."
|
|
371
|
+
"Every service uses Effect.gen. Pattern confirmed."
|
|
372
|
+
"All errors are tagged unions. I can handle exhaustively."
|
|
373
|
+
"Dependencies are injected. I know what's needed."
|
|
374
|
+
CONFIDENCE: 90% (pattern recognized)
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**Generation 21-50: Composing (93% accurate)**
|
|
378
|
+
|
|
379
|
+
```
|
|
380
|
+
Agent thinks:
|
|
381
|
+
"I can reuse existing services:"
|
|
382
|
+
"- createThing service exists"
|
|
383
|
+
"- createConnection service exists"
|
|
384
|
+
"- logEvent service exists"
|
|
385
|
+
"My new feature: compose these three services."
|
|
386
|
+
"No new patterns needed. Just composition."
|
|
387
|
+
CONFIDENCE: 93% (composing existing patterns)
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
**Generation 51-100: Mastering (96% accurate)**
|
|
391
|
+
|
|
392
|
+
```
|
|
393
|
+
Agent thinks:
|
|
394
|
+
"I've generated 50 services. All follow same structure:"
|
|
395
|
+
"1. Get provider from context"
|
|
396
|
+
"2. Call provider operation"
|
|
397
|
+
"3. Handle typed errors"
|
|
398
|
+
"4. Return typed result"
|
|
399
|
+
"Pattern is UNIVERSAL. Works for ANY feature."
|
|
400
|
+
CONFIDENCE: 96% (mastered the structure)
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Generation 100+: Generalizing (98%+ accurate)**
|
|
404
|
+
|
|
405
|
+
```
|
|
406
|
+
Agent thinks:
|
|
407
|
+
"I don't even need to think. The pattern IS the system."
|
|
408
|
+
"New feature request? Map to 6 dimensions."
|
|
409
|
+
"Need validation? Effect.ts service."
|
|
410
|
+
"Need data? Provider interface."
|
|
411
|
+
"Need state? Nanostores."
|
|
412
|
+
"Every decision is deterministic."
|
|
413
|
+
CONFIDENCE: 98%+ (system internalized)
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### What This Means for Development
|
|
417
|
+
|
|
418
|
+
**Feature #1:**
|
|
419
|
+
|
|
420
|
+
- Traditional: 8 hours (70% AI, 30% human)
|
|
421
|
+
- ONE: 8 hours (70% AI, 30% human)
|
|
422
|
+
- **No difference yet**
|
|
423
|
+
|
|
424
|
+
**Feature #10:**
|
|
425
|
+
|
|
426
|
+
- Traditional: 10 hours (60% AI, 40% human - patterns diverging)
|
|
427
|
+
- ONE: 6 hours (85% AI, 15% human - patterns converging)
|
|
428
|
+
- **ONE is 1.7x faster**
|
|
429
|
+
|
|
430
|
+
**Feature #50:**
|
|
431
|
+
|
|
432
|
+
- Traditional: 16 hours (40% AI, 60% human - technical debt)
|
|
433
|
+
- ONE: 3 hours (95% AI, 5% human - pattern mastery)
|
|
434
|
+
- **ONE is 5.3x faster**
|
|
435
|
+
|
|
436
|
+
**Feature #100:**
|
|
437
|
+
|
|
438
|
+
- Traditional: 24 hours (25% AI, 75% human - chaos)
|
|
439
|
+
- ONE: 1.5 hours (98% AI, 2% human - generalized)
|
|
440
|
+
- **ONE is 16x faster**
|
|
441
|
+
|
|
442
|
+
**Cumulative for 100 features:**
|
|
443
|
+
|
|
444
|
+
- Traditional: 1,400 hours
|
|
445
|
+
- ONE: 350 hours
|
|
446
|
+
- **ONE is 4x faster overall**
|
|
447
|
+
- **And the gap keeps growing**
|
|
448
|
+
|
|
449
|
+
### Why Schema Migrations Never Break This
|
|
450
|
+
|
|
451
|
+
**New entity type?**
|
|
452
|
+
|
|
453
|
+
```typescript
|
|
454
|
+
// NO schema migration needed
|
|
455
|
+
{ type: "new_thing", name: "...", properties: { ...custom } }
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
**New field on existing type?**
|
|
459
|
+
|
|
460
|
+
```typescript
|
|
461
|
+
// NO schema migration needed
|
|
462
|
+
{ type: "product", properties: { price, SKU, newField: "value" } }
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
**New relationship?**
|
|
466
|
+
|
|
467
|
+
```typescript
|
|
468
|
+
// NO schema migration needed
|
|
469
|
+
{ relationshipType: "new_connection", metadata: { ...custom } }
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
**New protocol integration?**
|
|
473
|
+
|
|
474
|
+
```typescript
|
|
475
|
+
// NO schema migration needed
|
|
476
|
+
{
|
|
477
|
+
relationshipType: "transacted",
|
|
478
|
+
metadata: { protocol: "new_protocol", ...custom }
|
|
479
|
+
}
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
**Result:** Technology changes (React → Svelte, REST → GraphQL), but the ontology stays the same forever.
|
|
65
483
|
|
|
66
484
|
---
|
|
67
485
|
|
|
@@ -114,6 +532,57 @@ Purpose: Partition the system with perfect isolation and support nested groups (
|
|
|
114
532
|
5. **Privacy Control:** Groups can be public or private with controlled access
|
|
115
533
|
6. **Flexible Scale:** Scales from friend circles to global governments without schema changes
|
|
116
534
|
|
|
535
|
+
### Hierarchical Group Examples by Domain
|
|
536
|
+
|
|
537
|
+
**E-Commerce (Retail Chain):**
|
|
538
|
+
|
|
539
|
+
```
|
|
540
|
+
Corporate Headquarters (group)
|
|
541
|
+
├─ North American Division (child group)
|
|
542
|
+
│ ├─ New York Store (grandchild group)
|
|
543
|
+
│ └─ California Store (grandchild group)
|
|
544
|
+
└─ European Division (child group)
|
|
545
|
+
├─ London Store (grandchild group)
|
|
546
|
+
└─ Paris Store (grandchild group)
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
**Education (University System):**
|
|
550
|
+
|
|
551
|
+
```
|
|
552
|
+
MIT (group)
|
|
553
|
+
├─ School of Engineering (child group)
|
|
554
|
+
│ ├─ Computer Science Dept (grandchild group)
|
|
555
|
+
│ ├─ Electrical Engineering Dept (grandchild group)
|
|
556
|
+
│ └─ Mechanical Engineering Dept (grandchild group)
|
|
557
|
+
├─ School of Science (child group)
|
|
558
|
+
│ ├─ Mathematics Dept (grandchild group)
|
|
559
|
+
│ └─ Physics Dept (grandchild group)
|
|
560
|
+
└─ School of Business (child group)
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
**Creator (Multi-Channel Brand):**
|
|
564
|
+
|
|
565
|
+
```
|
|
566
|
+
Creator Brand (group)
|
|
567
|
+
├─ YouTube Channel (child group)
|
|
568
|
+
│ └─ Content Series 1 (grandchild group)
|
|
569
|
+
├─ Podcast (child group)
|
|
570
|
+
│ └─ Season 2 (grandchild group)
|
|
571
|
+
└─ Community (child group - Discord server with channels)
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
**Crypto (DAO Treasury):**
|
|
575
|
+
|
|
576
|
+
```
|
|
577
|
+
DAO Treasury (group)
|
|
578
|
+
├─ Core Operations (child group)
|
|
579
|
+
│ ├─ Development Fund (grandchild group)
|
|
580
|
+
│ └─ Marketing Fund (grandchild group)
|
|
581
|
+
├─ Investment Committee (child group)
|
|
582
|
+
│ └─ Venture Capital Allocation (grandchild group)
|
|
583
|
+
└─ Community Grants (child group)
|
|
584
|
+
```
|
|
585
|
+
|
|
117
586
|
---
|
|
118
587
|
|
|
119
588
|
## PEOPLE: Authorization & Governance
|
|
@@ -186,6 +655,7 @@ Purpose: Define who can do what. People direct groups, customize AI agents, and
|
|
|
186
655
|
Purpose: unify taxonomy (“tags”) and retrieval‑augmented generation (RAG) under one table. A knowledge item can be a label (former tag), a document wrapper, or a chunk with an embedding.
|
|
187
656
|
|
|
188
657
|
Design principles:
|
|
658
|
+
|
|
189
659
|
- Protocol‑agnostic: store protocol details in `metadata`.
|
|
190
660
|
- Many‑to‑many: link knowledge ⇄ things via `thingKnowledge` with optional context metadata.
|
|
191
661
|
- Scalable: consolidated types minimize index fan‑out; embeddings enable semantic search.
|
|
@@ -194,10 +664,10 @@ Design principles:
|
|
|
194
664
|
|
|
195
665
|
```typescript
|
|
196
666
|
type KnowledgeType =
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
|
|
|
667
|
+
| "label" // replaces legacy "tag"; lightweight categorical marker
|
|
668
|
+
| "document" // wrapper for a source text/blob (pre-chunking)
|
|
669
|
+
| "chunk" // atomic chunk of text with embedding
|
|
670
|
+
| "vector_only"; // embedding without stored text (e.g., privacy)
|
|
201
671
|
```
|
|
202
672
|
|
|
203
673
|
### Knowledge Structure
|
|
@@ -249,9 +719,78 @@ type KnowledgeType =
|
|
|
249
719
|
- `thingKnowledge.by_knowledge` (knowledgeId)
|
|
250
720
|
- Vector index (provider-dependent): `knowledge.by_embedding` for ANN search
|
|
251
721
|
|
|
252
|
-
|
|
722
|
+
### How Domains Apply Knowledge
|
|
723
|
+
|
|
724
|
+
**Education - Learning Objectives & Study Materials:**
|
|
725
|
+
|
|
726
|
+
```typescript
|
|
727
|
+
// Knowledge: Learning objective chunk
|
|
728
|
+
{
|
|
729
|
+
knowledgeType: 'chunk',
|
|
730
|
+
text: 'Students should be able to solve quadratic equations',
|
|
731
|
+
sourceThingId: courseId,
|
|
732
|
+
labels: ['subject:mathematics', 'grade:9-12', 'objective:apply', 'skill:algebra']
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
// Link: Course references this learning objective
|
|
736
|
+
{
|
|
737
|
+
thingId: courseId,
|
|
738
|
+
knowledgeId: knowledgeId,
|
|
739
|
+
role: 'learning_objective'
|
|
740
|
+
}
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
**Creator - Content SEO & Discovery:**
|
|
744
|
+
|
|
745
|
+
```typescript
|
|
746
|
+
// Knowledge: Video description chunk with embedded metadata
|
|
747
|
+
{
|
|
748
|
+
knowledgeType: 'chunk',
|
|
749
|
+
text: 'This video teaches React hooks for beginners...',
|
|
750
|
+
sourceThingId: videoId,
|
|
751
|
+
embedding: [0.1, 0.2, ...],
|
|
752
|
+
labels: ['topic:react', 'difficulty:beginner', 'platform:youtube', 'series:javascript101']
|
|
753
|
+
}
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
**E-Commerce - Product Categorization & Search:**
|
|
757
|
+
|
|
758
|
+
```typescript
|
|
759
|
+
// Knowledge: Product description for semantic search
|
|
760
|
+
{
|
|
761
|
+
knowledgeType: 'document',
|
|
762
|
+
text: 'Blue wireless headphones with 40-hour battery life',
|
|
763
|
+
sourceThingId: productId,
|
|
764
|
+
embedding: [0.5, 0.3, ...],
|
|
765
|
+
labels: ['category:electronics', 'color:blue', 'feature:wireless', 'price_range:premium']
|
|
766
|
+
}
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
**Crypto - Risk Analysis & Token Intelligence:**
|
|
770
|
+
|
|
771
|
+
```typescript
|
|
772
|
+
// Knowledge: Token risk assessment
|
|
773
|
+
{
|
|
774
|
+
knowledgeType: 'chunk',
|
|
775
|
+
text: 'Token has no minting restrictions, moderate holder concentration',
|
|
776
|
+
sourceThingId: tokenId,
|
|
777
|
+
labels: ['risk:medium', 'metric:tvl_trend_up', 'audit:completed', 'governance:none']
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
// Knowledge: Protocol dependency analysis
|
|
781
|
+
{
|
|
782
|
+
knowledgeType: 'label',
|
|
783
|
+
text: 'Depends on Chainlink oracle',
|
|
784
|
+
sourceThingId: protocolId,
|
|
785
|
+
labels: ['dependency:critical', 'type:oracle', 'risk_factor:oracle']
|
|
786
|
+
}
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
**Notes:**
|
|
790
|
+
|
|
253
791
|
- The legacy ThingType `embedding` is deprecated for operational vectors; use the `knowledge` table with `knowledgeType: 'chunk' | 'vector_only'`.
|
|
254
792
|
- Labels (formerly tags) now live in `knowledge.labels` and via `thingKnowledge` relations. Use labels to curate taxonomy without enum churn.
|
|
793
|
+
- Domain-specific labels follow `category:value` pattern for semantic organization (e.g., `subject:math`, `platform:youtube`, `risk:high`).
|
|
255
794
|
|
|
256
795
|
---
|
|
257
796
|
|
|
@@ -271,97 +810,104 @@ Examples:
|
|
|
271
810
|
|
|
272
811
|
### Thing Types
|
|
273
812
|
|
|
813
|
+
**66 Types Organized in 13 Categories:**
|
|
814
|
+
|
|
274
815
|
```typescript
|
|
275
816
|
type ThingType =
|
|
276
|
-
// CORE
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
|
280
|
-
|
|
|
281
|
-
|
|
282
|
-
// BUSINESS AGENTS (10
|
|
283
|
-
|
|
|
284
|
-
|
|
|
285
|
-
|
|
|
286
|
-
|
|
|
287
|
-
|
|
|
288
|
-
|
|
|
289
|
-
|
|
|
290
|
-
|
|
|
291
|
-
|
|
|
292
|
-
|
|
|
293
|
-
|
|
294
|
-
// CONTENT
|
|
295
|
-
|
|
|
296
|
-
|
|
|
297
|
-
|
|
|
298
|
-
|
|
|
299
|
-
|
|
|
300
|
-
|
|
|
301
|
-
|
|
|
302
|
-
|
|
303
|
-
// PRODUCTS
|
|
304
|
-
|
|
|
305
|
-
|
|
|
306
|
-
|
|
|
307
|
-
|
|
|
308
|
-
|
|
309
|
-
// COMMUNITY
|
|
310
|
-
|
|
|
311
|
-
|
|
|
312
|
-
|
|
|
313
|
-
|
|
314
|
-
// TOKEN
|
|
315
|
-
|
|
|
316
|
-
|
|
|
317
|
-
|
|
318
|
-
// KNOWLEDGE
|
|
319
|
-
|
|
|
320
|
-
|
|
|
321
|
-
|
|
322
|
-
// PLATFORM
|
|
323
|
-
|
|
|
324
|
-
|
|
|
325
|
-
|
|
|
326
|
-
|
|
|
327
|
-
|
|
|
328
|
-
|
|
|
329
|
-
|
|
330
|
-
// BUSINESS
|
|
331
|
-
|
|
|
332
|
-
|
|
|
333
|
-
|
|
|
334
|
-
|
|
|
335
|
-
|
|
|
336
|
-
|
|
|
337
|
-
|
|
|
338
|
-
|
|
339
|
-
// AUTHENTICATION & SESSION
|
|
340
|
-
|
|
|
341
|
-
|
|
|
342
|
-
|
|
|
343
|
-
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
//
|
|
349
|
-
|
|
|
350
|
-
|
|
|
351
|
-
|
|
|
352
|
-
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
//
|
|
357
|
-
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
//
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
817
|
+
// CORE (4)
|
|
818
|
+
| "creator" // Human creator (role: platform_owner, org_owner, org_user, customer)
|
|
819
|
+
| "ai_clone" // Digital twin of creator
|
|
820
|
+
| "audience_member" // Fan/user (role: customer)
|
|
821
|
+
| "organization" // Multi-tenant organization
|
|
822
|
+
|
|
823
|
+
// BUSINESS AGENTS (10)
|
|
824
|
+
| "strategy_agent" // Vision, planning, OKRs
|
|
825
|
+
| "research_agent" // Market, trends, competitors
|
|
826
|
+
| "marketing_agent" // Content strategy, SEO, distribution
|
|
827
|
+
| "sales_agent" // Funnels, conversion, follow-up
|
|
828
|
+
| "service_agent" // Support, onboarding, success
|
|
829
|
+
| "design_agent" // Brand, UI/UX, assets
|
|
830
|
+
| "engineering_agent" // Tech, integration, automation
|
|
831
|
+
| "finance_agent" // Revenue, costs, forecasting
|
|
832
|
+
| "legal_agent" // Compliance, contracts, IP
|
|
833
|
+
| "intelligence_agent" // Analytics, insights, predictions
|
|
834
|
+
|
|
835
|
+
// CONTENT (7)
|
|
836
|
+
| "blog_post" // Written content (guides, newsletters, articles)
|
|
837
|
+
| "video" // Video content (lectures, demos, shorts)
|
|
838
|
+
| "podcast" // Audio content (episodes, interviews)
|
|
839
|
+
| "social_post" // Social media post (all platforms)
|
|
840
|
+
| "email" // Email content (campaigns, newsletters)
|
|
841
|
+
| "course" // Educational course (programs, learning paths)
|
|
842
|
+
| "lesson" // Individual lesson (units, modules, segments)
|
|
843
|
+
|
|
844
|
+
// PRODUCTS (4)
|
|
845
|
+
| "digital_product" // Templates, tools, assets
|
|
846
|
+
| "membership" // Tiered membership (Patreon, Substack)
|
|
847
|
+
| "consultation" // 1-on-1 session (coaching, support)
|
|
848
|
+
| "nft" // NFT collectible (governance, utility)
|
|
849
|
+
|
|
850
|
+
// COMMUNITY (3)
|
|
851
|
+
| "community" // Community space (Discord, forums)
|
|
852
|
+
| "conversation" // Thread/discussion (boards, channels)
|
|
853
|
+
| "message" // Individual message (chat, DM)
|
|
854
|
+
|
|
855
|
+
// TOKEN (2)
|
|
856
|
+
| "token" // Actual token instance
|
|
857
|
+
| "token_contract" // Smart contract
|
|
858
|
+
|
|
859
|
+
// KNOWLEDGE (2)
|
|
860
|
+
| "knowledge_item" // Piece of creator knowledge
|
|
861
|
+
| "embedding" // Vector embedding
|
|
862
|
+
|
|
863
|
+
// PLATFORM (6)
|
|
864
|
+
| "website" // Auto-generated creator site
|
|
865
|
+
| "landing_page" // Custom landing pages (campaigns, sales)
|
|
866
|
+
| "template" // Design templates (reusable components)
|
|
867
|
+
| "livestream" // Live broadcast (streaming, webinars)
|
|
868
|
+
| "recording" // Saved livestream content
|
|
869
|
+
| "media_asset" // Images, videos, files
|
|
870
|
+
|
|
871
|
+
// BUSINESS (7)
|
|
872
|
+
| "payment" // Payment transaction
|
|
873
|
+
| "subscription" // Recurring subscription
|
|
874
|
+
| "invoice" // Invoice record
|
|
875
|
+
| "metric" // Tracked metric
|
|
876
|
+
| "insight" // AI-generated insight
|
|
877
|
+
| "prediction" // AI prediction
|
|
878
|
+
| "report" // Analytics report
|
|
879
|
+
|
|
880
|
+
// AUTHENTICATION & SESSION (5)
|
|
881
|
+
| "session" // User session (Better Auth)
|
|
882
|
+
| "oauth_account" // OAuth connection (GitHub, Google)
|
|
883
|
+
| "verification_token" // Email/2FA verification token
|
|
884
|
+
| "password_reset_token" // Password reset token
|
|
885
|
+
| "ui_preferences" // User UI settings (theme, layout)
|
|
886
|
+
|
|
887
|
+
// MARKETING (6)
|
|
888
|
+
| "notification" // System notification
|
|
889
|
+
| "email_campaign" // Email marketing campaign
|
|
890
|
+
| "announcement" // Platform announcement
|
|
891
|
+
| "referral" // Referral record
|
|
892
|
+
| "campaign" // Marketing campaign
|
|
893
|
+
| "lead" // Potential customer/lead
|
|
894
|
+
|
|
895
|
+
// EXTERNAL INTEGRATIONS (3)
|
|
896
|
+
| "external_agent" // External AI agent (ElizaOS)
|
|
897
|
+
| "external_workflow" // External workflow (n8n, Zapier)
|
|
898
|
+
| "external_connection" // Connection config
|
|
899
|
+
|
|
900
|
+
// PROTOCOL ENTITIES (2, protocol-agnostic)
|
|
901
|
+
| "mandate" // Intent/cart (AP2, shopping)
|
|
902
|
+
| "product"; // Sellable product (ACP marketplace)
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
**How Domains Apply These Types:**
|
|
906
|
+
|
|
907
|
+
- **E-Commerce**: Uses `product` (catalog items), `mandate` (shopping carts), `payment` (transactions), `subscription` (auto-renewals), `membership` (loyalty), `notification` (order updates), `email_campaign` (promotional)
|
|
908
|
+
- **Education**: Uses `course` (programs), `lesson` (units), `community` (cohorts), `assignment` (assessments), `conversation` (discussion boards), `metric` (grades), `report` (transcripts)
|
|
909
|
+
- **Creator**: Uses `video` (YouTube/TikTok), `podcast` (episodes), `blog_post` (newsletters), `membership` (tiers), `course` (products), `email_campaign` (outreach), `metric` (engagement), `insight` (analytics)
|
|
910
|
+
- **Crypto**: Uses `token` (holdings), `token_contract` (smart contracts), `metric` (TVL/volume), `payment` (transfers), `knowledge_item` (risk profiles), `report` (protocol analysis)
|
|
365
911
|
|
|
366
912
|
### Thing Structure
|
|
367
913
|
|
|
@@ -852,51 +1398,51 @@ Examples:
|
|
|
852
1398
|
```typescript
|
|
853
1399
|
type ConnectionType =
|
|
854
1400
|
// OWNERSHIP (2)
|
|
855
|
-
|
|
|
856
|
-
|
|
|
1401
|
+
| "owns"
|
|
1402
|
+
| "created_by"
|
|
857
1403
|
|
|
858
1404
|
// AI RELATIONSHIPS (3)
|
|
859
|
-
|
|
|
860
|
-
|
|
|
861
|
-
|
|
|
1405
|
+
| "clone_of"
|
|
1406
|
+
| "trained_on"
|
|
1407
|
+
| "powers"
|
|
862
1408
|
|
|
863
1409
|
// CONTENT RELATIONSHIPS (5)
|
|
864
|
-
|
|
|
865
|
-
|
|
|
866
|
-
|
|
|
867
|
-
|
|
|
868
|
-
|
|
|
1410
|
+
| "authored"
|
|
1411
|
+
| "generated_by"
|
|
1412
|
+
| "published_to"
|
|
1413
|
+
| "part_of"
|
|
1414
|
+
| "references"
|
|
869
1415
|
|
|
870
1416
|
// COMMUNITY RELATIONSHIPS (4)
|
|
871
|
-
|
|
|
872
|
-
|
|
|
873
|
-
|
|
|
874
|
-
|
|
|
1417
|
+
| "member_of"
|
|
1418
|
+
| "following"
|
|
1419
|
+
| "moderates"
|
|
1420
|
+
| "participated_in"
|
|
875
1421
|
|
|
876
1422
|
// BUSINESS RELATIONSHIPS (3)
|
|
877
|
-
|
|
|
878
|
-
|
|
|
879
|
-
|
|
|
1423
|
+
| "manages"
|
|
1424
|
+
| "reports_to"
|
|
1425
|
+
| "collaborates_with"
|
|
880
1426
|
|
|
881
1427
|
// TOKEN RELATIONSHIPS (3)
|
|
882
|
-
|
|
|
883
|
-
|
|
|
884
|
-
|
|
|
1428
|
+
| "holds_tokens"
|
|
1429
|
+
| "staked_in"
|
|
1430
|
+
| "earned_from"
|
|
885
1431
|
|
|
886
1432
|
// PRODUCT RELATIONSHIPS (4)
|
|
887
|
-
|
|
|
888
|
-
|
|
|
889
|
-
|
|
|
890
|
-
|
|
|
1433
|
+
| "purchased"
|
|
1434
|
+
| "enrolled_in"
|
|
1435
|
+
| "completed"
|
|
1436
|
+
| "teaching"
|
|
891
1437
|
|
|
892
1438
|
// CONSOLIDATED TYPES (use metadata for variants + protocol)
|
|
893
|
-
|
|
|
894
|
-
|
|
|
895
|
-
|
|
|
896
|
-
|
|
|
897
|
-
|
|
|
898
|
-
|
|
|
899
|
-
|
|
|
1439
|
+
| "transacted" // Payment/subscription/invoice (metadata.transactionType + protocol)
|
|
1440
|
+
| "notified" // Notifications (metadata.channel + notificationType)
|
|
1441
|
+
| "referred" // Referrals (metadata.referralType)
|
|
1442
|
+
| "communicated" // Agent/protocol communication (metadata.protocol + messageType)
|
|
1443
|
+
| "delegated" // Task/workflow delegation (metadata.protocol + taskType)
|
|
1444
|
+
| "approved" // Approvals (metadata.approvalType + protocol)
|
|
1445
|
+
| "fulfilled"; // Fulfillment (metadata.fulfillmentType + protocol)
|
|
900
1446
|
|
|
901
1447
|
// Total: 25 connection types
|
|
902
1448
|
```
|
|
@@ -939,6 +1485,33 @@ type ConnectionType =
|
|
|
939
1485
|
relationshipType: "owns",
|
|
940
1486
|
createdAt: Date.now()
|
|
941
1487
|
}
|
|
1488
|
+
|
|
1489
|
+
// E-Commerce: Store owns product inventory
|
|
1490
|
+
{
|
|
1491
|
+
fromThingId: groupId, // Store
|
|
1492
|
+
toThingId: productId,
|
|
1493
|
+
relationshipType: "owns",
|
|
1494
|
+
createdAt: Date.now()
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
// Education: Department owns course
|
|
1498
|
+
{
|
|
1499
|
+
fromThingId: departmentGroupId,
|
|
1500
|
+
toThingId: courseId,
|
|
1501
|
+
relationshipType: "owns",
|
|
1502
|
+
createdAt: Date.now()
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
// Crypto: DAO owns treasury tokens
|
|
1506
|
+
{
|
|
1507
|
+
fromThingId: daoGroupId,
|
|
1508
|
+
toThingId: tokenId,
|
|
1509
|
+
relationshipType: "owns",
|
|
1510
|
+
metadata: {
|
|
1511
|
+
balance: 1000000
|
|
1512
|
+
},
|
|
1513
|
+
createdAt: Date.now()
|
|
1514
|
+
}
|
|
942
1515
|
```
|
|
943
1516
|
|
|
944
1517
|
**Pattern: Revenue Split**
|
|
@@ -987,6 +1560,49 @@ type ConnectionType =
|
|
|
987
1560
|
},
|
|
988
1561
|
createdAt: Date.now()
|
|
989
1562
|
}
|
|
1563
|
+
|
|
1564
|
+
// Education: Student enrolled in school with grade level
|
|
1565
|
+
{
|
|
1566
|
+
fromThingId: studentId,
|
|
1567
|
+
toThingId: courseId,
|
|
1568
|
+
relationshipType: "enrolled_in",
|
|
1569
|
+
metadata: {
|
|
1570
|
+
enrollmentType: "credit",
|
|
1571
|
+
progress: 0.65,
|
|
1572
|
+
currentGrade: 92.5,
|
|
1573
|
+
letterGrade: "A",
|
|
1574
|
+
enrolledAt: Date.now()
|
|
1575
|
+
},
|
|
1576
|
+
createdAt: Date.now()
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
// E-Commerce: Customer purchased product
|
|
1580
|
+
{
|
|
1581
|
+
fromThingId: customerId,
|
|
1582
|
+
toThingId: productId,
|
|
1583
|
+
relationshipType: "purchased",
|
|
1584
|
+
metadata: {
|
|
1585
|
+
quantity: 2,
|
|
1586
|
+
price: 49.99,
|
|
1587
|
+
currency: "USD",
|
|
1588
|
+
purchasedAt: Date.now()
|
|
1589
|
+
},
|
|
1590
|
+
createdAt: Date.now()
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
// Creator: Subscriber joined membership tier
|
|
1594
|
+
{
|
|
1595
|
+
fromThingId: subscriberId,
|
|
1596
|
+
toThingId: membershipTierId,
|
|
1597
|
+
relationshipType: "member_of",
|
|
1598
|
+
metadata: {
|
|
1599
|
+
tier: "pro",
|
|
1600
|
+
price: 9.99,
|
|
1601
|
+
interval: "monthly",
|
|
1602
|
+
subscribedAt: Date.now()
|
|
1603
|
+
},
|
|
1604
|
+
createdAt: Date.now()
|
|
1605
|
+
}
|
|
990
1606
|
```
|
|
991
1607
|
|
|
992
1608
|
**Pattern: Group Membership**
|
|
@@ -1114,96 +1730,96 @@ Examples:
|
|
|
1114
1730
|
```typescript
|
|
1115
1731
|
type EventType =
|
|
1116
1732
|
// THING LIFECYCLE (3) - Consolidated with metadata.thingType
|
|
1117
|
-
|
|
|
1118
|
-
|
|
|
1119
|
-
|
|
|
1733
|
+
| "thing_created" // metadata: { thingType: "group" | "user" | "course" | etc. }
|
|
1734
|
+
| "thing_updated" // metadata: { thingType, action: "updated" | "archived" | "restored" }
|
|
1735
|
+
| "thing_deleted" // metadata: { thingType, action: "deleted" | "archived", deletionType: "soft" | "hard" }
|
|
1120
1736
|
|
|
1121
1737
|
// USER EVENTS (5)
|
|
1122
|
-
|
|
|
1123
|
-
|
|
|
1124
|
-
|
|
|
1125
|
-
|
|
|
1126
|
-
|
|
|
1738
|
+
| "user_registered"
|
|
1739
|
+
| "user_verified"
|
|
1740
|
+
| "user_login"
|
|
1741
|
+
| "user_logout"
|
|
1742
|
+
| "profile_updated"
|
|
1127
1743
|
|
|
1128
1744
|
// AUTHENTICATION EVENTS (6)
|
|
1129
|
-
|
|
|
1130
|
-
|
|
|
1131
|
-
|
|
|
1132
|
-
|
|
|
1133
|
-
|
|
|
1134
|
-
|
|
|
1745
|
+
| "password_reset_requested"
|
|
1746
|
+
| "password_reset_completed"
|
|
1747
|
+
| "email_verification_sent"
|
|
1748
|
+
| "email_verified"
|
|
1749
|
+
| "two_factor_enabled"
|
|
1750
|
+
| "two_factor_disabled"
|
|
1135
1751
|
|
|
1136
1752
|
// GROUP-SPECIFIC EVENTS (3) - Not lifecycle events (those use thing_*)
|
|
1137
|
-
|
|
|
1138
|
-
|
|
|
1139
|
-
|
|
|
1753
|
+
| "user_invited_to_group"
|
|
1754
|
+
| "user_joined_group"
|
|
1755
|
+
| "user_removed_from_group"
|
|
1140
1756
|
|
|
1141
1757
|
// DASHBOARD & UI EVENTS (4)
|
|
1142
|
-
|
|
|
1143
|
-
|
|
|
1144
|
-
|
|
|
1145
|
-
|
|
|
1758
|
+
| "dashboard_viewed"
|
|
1759
|
+
| "settings_updated"
|
|
1760
|
+
| "theme_changed"
|
|
1761
|
+
| "preferences_updated"
|
|
1146
1762
|
|
|
1147
1763
|
// AI/CLONE EVENTS (2) - Creation uses thing_created with thingType: "clone"
|
|
1148
|
-
|
|
|
1149
|
-
|
|
|
1764
|
+
| "voice_cloned"
|
|
1765
|
+
| "appearance_cloned"
|
|
1150
1766
|
|
|
1151
1767
|
// AGENT EVENTS (3) - Creation uses thing_created with thingType: "agent"
|
|
1152
|
-
|
|
|
1153
|
-
|
|
|
1154
|
-
|
|
|
1768
|
+
| "agent_executed"
|
|
1769
|
+
| "agent_completed"
|
|
1770
|
+
| "agent_failed"
|
|
1155
1771
|
|
|
1156
1772
|
// TOKEN EVENTS (6) - Creation uses thing_created with thingType: "token"
|
|
1157
|
-
|
|
|
1158
|
-
|
|
|
1159
|
-
|
|
|
1160
|
-
|
|
|
1161
|
-
|
|
|
1162
|
-
|
|
|
1773
|
+
| "token_minted"
|
|
1774
|
+
| "token_burned"
|
|
1775
|
+
| "tokens_purchased"
|
|
1776
|
+
| "tokens_staked"
|
|
1777
|
+
| "tokens_unstaked"
|
|
1778
|
+
| "tokens_transferred"
|
|
1163
1779
|
|
|
1164
1780
|
// COURSE EVENTS (4) - Creation uses thing_created with thingType: "course"
|
|
1165
|
-
|
|
|
1166
|
-
|
|
|
1167
|
-
|
|
|
1168
|
-
|
|
|
1781
|
+
| "course_enrolled"
|
|
1782
|
+
| "lesson_completed"
|
|
1783
|
+
| "course_completed"
|
|
1784
|
+
| "certificate_earned"
|
|
1169
1785
|
|
|
1170
1786
|
// ANALYTICS EVENTS (5)
|
|
1171
|
-
|
|
|
1172
|
-
|
|
|
1173
|
-
|
|
|
1174
|
-
|
|
|
1175
|
-
|
|
|
1787
|
+
| "metric_calculated"
|
|
1788
|
+
| "insight_generated"
|
|
1789
|
+
| "prediction_made"
|
|
1790
|
+
| "optimization_applied"
|
|
1791
|
+
| "report_generated"
|
|
1176
1792
|
|
|
1177
1793
|
// INFERENCE EVENTS (7) - NEW
|
|
1178
|
-
|
|
|
1179
|
-
|
|
|
1180
|
-
|
|
|
1181
|
-
|
|
|
1182
|
-
|
|
|
1183
|
-
|
|
|
1184
|
-
|
|
|
1794
|
+
| "cycle_request" // User requests AI cycle
|
|
1795
|
+
| "cycle_completed" // Cycle result delivered
|
|
1796
|
+
| "cycle_failed" // Cycle failed
|
|
1797
|
+
| "cycle_quota_exceeded" // Monthly limit hit
|
|
1798
|
+
| "cycle_revenue_collected" // Daily revenue sweep
|
|
1799
|
+
| "org_revenue_generated" // Group generates platform revenue
|
|
1800
|
+
| "revenue_share_distributed" // Revenue share paid out
|
|
1185
1801
|
|
|
1186
1802
|
// BLOCKCHAIN EVENTS (5) - NEW
|
|
1187
|
-
|
|
|
1188
|
-
|
|
|
1189
|
-
|
|
|
1190
|
-
|
|
|
1191
|
-
|
|
|
1803
|
+
| "nft_minted" // NFT created on-chain
|
|
1804
|
+
| "nft_transferred" // NFT ownership changed
|
|
1805
|
+
| "tokens_bridged" // Cross-chain bridge
|
|
1806
|
+
| "contract_deployed" // Smart contract deployed
|
|
1807
|
+
| "treasury_withdrawal" // Platform owner withdraws revenue
|
|
1192
1808
|
|
|
1193
1809
|
// CONSOLIDATED EVENTS (use metadata for variants + protocol)
|
|
1194
|
-
|
|
|
1195
|
-
|
|
|
1196
|
-
|
|
|
1197
|
-
|
|
|
1198
|
-
|
|
|
1199
|
-
|
|
|
1200
|
-
|
|
|
1201
|
-
|
|
|
1202
|
-
|
|
|
1203
|
-
|
|
|
1204
|
-
|
|
|
1810
|
+
| "content_event" // metadata.action: created|updated|deleted|viewed|shared|liked
|
|
1811
|
+
| "payment_event" // metadata.status: requested|verified|processed + protocol
|
|
1812
|
+
| "subscription_event" // metadata.action: started|renewed|cancelled
|
|
1813
|
+
| "commerce_event" // metadata.eventType + protocol (ACP, AP2)
|
|
1814
|
+
| "livestream_event" // metadata.status: started|ended + metadata.action: joined|left|chat|donation
|
|
1815
|
+
| "notification_event" // metadata.channel: email|sms|push|in_app + deliveryStatus
|
|
1816
|
+
| "referral_event" // metadata.action: created|completed|rewarded
|
|
1817
|
+
| "communication_event" // metadata.protocol (A2A, ACP, AG-UI) + messageType
|
|
1818
|
+
| "task_event" // metadata.action: delegated|completed|failed + protocol
|
|
1819
|
+
| "mandate_event" // metadata.mandateType: intent|cart + protocol (AP2)
|
|
1820
|
+
| "price_event"; // metadata.action: checked|changed
|
|
1205
1821
|
|
|
1206
|
-
// Total: 52 event types (35 original + 7
|
|
1822
|
+
// Total: 52 event types (35 original + 7 cycle + 5 blockchain + 5 NFT overlap)
|
|
1207
1823
|
```
|
|
1208
1824
|
|
|
1209
1825
|
### Event Structure
|
|
@@ -1329,6 +1945,50 @@ The `metadata` field is flexible JSON that ALWAYS includes `protocol` for protoc
|
|
|
1329
1945
|
source: "feed"
|
|
1330
1946
|
}
|
|
1331
1947
|
}
|
|
1948
|
+
|
|
1949
|
+
// Education: Assignment submitted
|
|
1950
|
+
{
|
|
1951
|
+
type: "content_changed",
|
|
1952
|
+
actorId: studentId,
|
|
1953
|
+
targetId: submissionId,
|
|
1954
|
+
timestamp: Date.now(),
|
|
1955
|
+
metadata: {
|
|
1956
|
+
action: "submitted",
|
|
1957
|
+
contentType: "assignment",
|
|
1958
|
+
assignmentId: assignmentId,
|
|
1959
|
+
courseId: courseId,
|
|
1960
|
+
isLate: false
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
// E-Commerce: Product reviewed
|
|
1965
|
+
{
|
|
1966
|
+
type: "content_interacted",
|
|
1967
|
+
actorId: customerId,
|
|
1968
|
+
targetId: productId,
|
|
1969
|
+
timestamp: Date.now(),
|
|
1970
|
+
metadata: {
|
|
1971
|
+
interactionType: "reviewed",
|
|
1972
|
+
rating: 5,
|
|
1973
|
+
reviewText: "Great product!",
|
|
1974
|
+
verified: true
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
// Creator: Video published
|
|
1979
|
+
{
|
|
1980
|
+
type: "content_changed",
|
|
1981
|
+
actorId: creatorId,
|
|
1982
|
+
targetId: videoId,
|
|
1983
|
+
timestamp: Date.now(),
|
|
1984
|
+
metadata: {
|
|
1985
|
+
action: "published",
|
|
1986
|
+
contentType: "youtube_video",
|
|
1987
|
+
platform: "youtube",
|
|
1988
|
+
viewCount: 0,
|
|
1989
|
+
engagementMetrics: {}
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1332
1992
|
```
|
|
1333
1993
|
|
|
1334
1994
|
**Pattern: Livestream Event (Consolidated)**
|
|
@@ -1560,10 +2220,20 @@ Examples:
|
|
|
1560
2220
|
Pattern: multi‑label entity
|
|
1561
2221
|
|
|
1562
2222
|
```typescript
|
|
1563
|
-
const labels = [
|
|
2223
|
+
const labels = [
|
|
2224
|
+
"industry:fitness",
|
|
2225
|
+
"skill:video-editing",
|
|
2226
|
+
"technology:youtube",
|
|
2227
|
+
"audience:beginners",
|
|
2228
|
+
];
|
|
1564
2229
|
for (const label of labels) {
|
|
1565
2230
|
const kid = await getOrCreateKnowledgeLabel(label);
|
|
1566
|
-
await db.insert(
|
|
2231
|
+
await db.insert("thingKnowledge", {
|
|
2232
|
+
thingId: creatorId,
|
|
2233
|
+
knowledgeId: kid,
|
|
2234
|
+
role: "label",
|
|
2235
|
+
createdAt: Date.now(),
|
|
2236
|
+
});
|
|
1567
2237
|
}
|
|
1568
2238
|
```
|
|
1569
2239
|
|
|
@@ -1571,10 +2241,10 @@ Pattern: semantic search across chunks
|
|
|
1571
2241
|
|
|
1572
2242
|
```typescript
|
|
1573
2243
|
// Given a query embedding, find top-k similar chunks for a group
|
|
1574
|
-
const topK = await vectorSearch(
|
|
1575
|
-
vectorField:
|
|
2244
|
+
const topK = await vectorSearch("knowledge", {
|
|
2245
|
+
vectorField: "embedding",
|
|
1576
2246
|
query: queryEmbedding,
|
|
1577
|
-
filter: {
|
|
2247
|
+
filter: { "sourceThingId.groupId": groupId, knowledgeType: "chunk" },
|
|
1578
2248
|
k: 10,
|
|
1579
2249
|
});
|
|
1580
2250
|
```
|
|
@@ -1671,6 +2341,122 @@ const topK = await vectorSearch('knowledge', {
|
|
|
1671
2341
|
|
|
1672
2342
|
- Status labels (current step)
|
|
1673
2343
|
|
|
2344
|
+
### Domain-Specific Feature Mapping
|
|
2345
|
+
|
|
2346
|
+
**E-Commerce: Shopping Cart Checkout**
|
|
2347
|
+
|
|
2348
|
+
**Things Created/Used:**
|
|
2349
|
+
|
|
2350
|
+
- `mandate` thing (shopping cart)
|
|
2351
|
+
- `product` thing (items in cart)
|
|
2352
|
+
- `payment` thing (transaction record)
|
|
2353
|
+
|
|
2354
|
+
**Connections Created:**
|
|
2355
|
+
|
|
2356
|
+
- customer → mandate (relationship: "owns" or "has_active_cart")
|
|
2357
|
+
- mandate → product items (relationship: "contains")
|
|
2358
|
+
- customer → payment (relationship: "transacted", metadata: { transactionType: "payment" })
|
|
2359
|
+
|
|
2360
|
+
**Events Logged:**
|
|
2361
|
+
|
|
2362
|
+
- `mandate_event` (cart created, items added, checkout started)
|
|
2363
|
+
- `payment_event` (payment processed)
|
|
2364
|
+
- `commerce_event` (order completed)
|
|
2365
|
+
|
|
2366
|
+
**Knowledge Added:**
|
|
2367
|
+
|
|
2368
|
+
- Order items tagged for analytics
|
|
2369
|
+
|
|
2370
|
+
---
|
|
2371
|
+
|
|
2372
|
+
**Education: Course Enrollment & Grading**
|
|
2373
|
+
|
|
2374
|
+
**Things Created/Used:**
|
|
2375
|
+
|
|
2376
|
+
- `course` thing
|
|
2377
|
+
- `lesson` things (modules, assignments)
|
|
2378
|
+
- `submission` thing (student work)
|
|
2379
|
+
- `metric` thing (grades)
|
|
2380
|
+
|
|
2381
|
+
**Connections Created:**
|
|
2382
|
+
|
|
2383
|
+
- student → course (relationship: "enrolled_in", metadata: { progress, grade })
|
|
2384
|
+
- student → submission (relationship: "submitted_for")
|
|
2385
|
+
- submission → lesson (relationship: "part_of")
|
|
2386
|
+
- teacher → submission (relationship: "graded_by")
|
|
2387
|
+
|
|
2388
|
+
**Events Logged:**
|
|
2389
|
+
|
|
2390
|
+
- `course_enrolled` (enrollment)
|
|
2391
|
+
- `content_event` (lesson viewed/completed)
|
|
2392
|
+
- `content_changed` (assignment submitted)
|
|
2393
|
+
- `metric_calculated` (grade calculated)
|
|
2394
|
+
|
|
2395
|
+
**Knowledge Added:**
|
|
2396
|
+
|
|
2397
|
+
- Competency labels (skills demonstrated)
|
|
2398
|
+
- Performance level tags
|
|
2399
|
+
|
|
2400
|
+
---
|
|
2401
|
+
|
|
2402
|
+
**Creator: Multi-Platform Publishing**
|
|
2403
|
+
|
|
2404
|
+
**Things Created/Used:**
|
|
2405
|
+
|
|
2406
|
+
- `video` thing (YouTube upload)
|
|
2407
|
+
- `podcast` thing (episode)
|
|
2408
|
+
- `blog_post` thing (newsletter)
|
|
2409
|
+
- `email_campaign` thing (broadcast)
|
|
2410
|
+
|
|
2411
|
+
**Connections Created:**
|
|
2412
|
+
|
|
2413
|
+
- creator → content (relationship: "authored")
|
|
2414
|
+
- content → platform (relationship: "published_to", metadata: { platform: "youtube" | "spotify" })
|
|
2415
|
+
- audience → content (relationship: "engaged_with")
|
|
2416
|
+
|
|
2417
|
+
**Events Logged:**
|
|
2418
|
+
|
|
2419
|
+
- `content_changed` (published, metadata: { platform, contentType })
|
|
2420
|
+
- `content_interacted` (viewed, listened, shared)
|
|
2421
|
+
- `metric_calculated` (engagement metrics)
|
|
2422
|
+
|
|
2423
|
+
**Knowledge Added:**
|
|
2424
|
+
|
|
2425
|
+
- Topic labels (subject matter)
|
|
2426
|
+
- Platform tags
|
|
2427
|
+
- Performance labels (trending, viral)
|
|
2428
|
+
|
|
2429
|
+
---
|
|
2430
|
+
|
|
2431
|
+
**Crypto: Token Staking & Yield Farming**
|
|
2432
|
+
|
|
2433
|
+
**Things Created/Used:**
|
|
2434
|
+
|
|
2435
|
+
- `token` thing (token instance)
|
|
2436
|
+
- `token_contract` thing (smart contract)
|
|
2437
|
+
- `metric` thing (TVL, APY)
|
|
2438
|
+
- `knowledge_item` thing (risk assessment)
|
|
2439
|
+
|
|
2440
|
+
**Connections Created:**
|
|
2441
|
+
|
|
2442
|
+
- user → token (relationship: "holds_tokens", metadata: { balance })
|
|
2443
|
+
- user → token (relationship: "staked_in", metadata: { amount, duration, earnings })
|
|
2444
|
+
- token → contract (relationship: "defined_by")
|
|
2445
|
+
- contract → dependencies (relationship: "depends_on", metadata: { critical: true })
|
|
2446
|
+
|
|
2447
|
+
**Events Logged:**
|
|
2448
|
+
|
|
2449
|
+
- `token_minted` / `token_burned`
|
|
2450
|
+
- `tokens_staked` / `tokens_unstaked`
|
|
2451
|
+
- `metric_calculated` (TVL, APY updates)
|
|
2452
|
+
- `price_event` (price changes)
|
|
2453
|
+
|
|
2454
|
+
**Knowledge Added:**
|
|
2455
|
+
|
|
2456
|
+
- Risk labels (audit status, vulnerability)
|
|
2457
|
+
- Protocol labels (type, chain)
|
|
2458
|
+
- Market labels (trend, momentum)
|
|
2459
|
+
|
|
1674
2460
|
---
|
|
1675
2461
|
|
|
1676
2462
|
## Querying the Ontology
|
|
@@ -1685,8 +2471,8 @@ const thing = await db.get(thingId);
|
|
|
1685
2471
|
|
|
1686
2472
|
```typescript
|
|
1687
2473
|
const creators = await db
|
|
1688
|
-
.query(
|
|
1689
|
-
.withIndex(
|
|
2474
|
+
.query("things")
|
|
2475
|
+
.withIndex("by_type", (q) => q.eq("type", "creator"))
|
|
1690
2476
|
.collect();
|
|
1691
2477
|
```
|
|
1692
2478
|
|
|
@@ -1695,14 +2481,14 @@ const creators = await db
|
|
|
1695
2481
|
```typescript
|
|
1696
2482
|
// Get all entities this entity owns
|
|
1697
2483
|
const owned = await db
|
|
1698
|
-
.query(
|
|
1699
|
-
.withIndex(
|
|
1700
|
-
q.eq(
|
|
2484
|
+
.query("connections")
|
|
2485
|
+
.withIndex("from_type", (q) =>
|
|
2486
|
+
q.eq("fromThingId", thingId).eq("relationshipType", "owns"),
|
|
1701
2487
|
)
|
|
1702
2488
|
.collect();
|
|
1703
2489
|
|
|
1704
2490
|
const ownedThings = await Promise.all(
|
|
1705
|
-
owned.map((conn) => db.get(conn.toThingId))
|
|
2491
|
+
owned.map((conn) => db.get(conn.toThingId)),
|
|
1706
2492
|
);
|
|
1707
2493
|
```
|
|
1708
2494
|
|
|
@@ -1711,9 +2497,9 @@ const ownedThings = await Promise.all(
|
|
|
1711
2497
|
```typescript
|
|
1712
2498
|
// Get all events for this entity
|
|
1713
2499
|
const history = await db
|
|
1714
|
-
.query(
|
|
1715
|
-
.withIndex(
|
|
1716
|
-
.order(
|
|
2500
|
+
.query("events")
|
|
2501
|
+
.withIndex("thing_type_time", (q) => q.eq("thingId", thingId))
|
|
2502
|
+
.order("desc") // Most recent first
|
|
1717
2503
|
.collect();
|
|
1718
2504
|
```
|
|
1719
2505
|
|
|
@@ -1721,12 +2507,12 @@ const history = await db
|
|
|
1721
2507
|
|
|
1722
2508
|
```typescript
|
|
1723
2509
|
const knowledgeAssocs = await db
|
|
1724
|
-
.query(
|
|
1725
|
-
.withIndex(
|
|
2510
|
+
.query("thingKnowledge")
|
|
2511
|
+
.withIndex("by_thing", (q) => q.eq("thingId", thingId))
|
|
1726
2512
|
.collect();
|
|
1727
2513
|
|
|
1728
2514
|
const knowledgeItems = await Promise.all(
|
|
1729
|
-
knowledgeAssocs.map((assoc) => db.get(assoc.knowledgeId))
|
|
2515
|
+
knowledgeAssocs.map((assoc) => db.get(assoc.knowledgeId)),
|
|
1730
2516
|
);
|
|
1731
2517
|
```
|
|
1732
2518
|
|
|
@@ -1735,14 +2521,14 @@ const knowledgeItems = await Promise.all(
|
|
|
1735
2521
|
```typescript
|
|
1736
2522
|
// Find fitness creators with >10k followers
|
|
1737
2523
|
const creators = await db
|
|
1738
|
-
.query(
|
|
1739
|
-
.withIndex(
|
|
2524
|
+
.query("things")
|
|
2525
|
+
.withIndex("by_type", (q) => q.eq("type", "creator"))
|
|
1740
2526
|
.collect();
|
|
1741
2527
|
|
|
1742
2528
|
const fitnessCreators = creators.filter(
|
|
1743
2529
|
(c) =>
|
|
1744
2530
|
c.properties.totalFollowers > 10000 &&
|
|
1745
|
-
c.properties.niche.includes(
|
|
2531
|
+
c.properties.niche.includes("fitness"),
|
|
1746
2532
|
);
|
|
1747
2533
|
```
|
|
1748
2534
|
|
|
@@ -1884,7 +2670,9 @@ events: -thing_type_time(thingId, eventType, timestamp) -
|
|
|
1884
2670
|
type_time(eventType, timestamp) -
|
|
1885
2671
|
session(sessionId, timestamp);
|
|
1886
2672
|
|
|
1887
|
-
knowledge: -by_type(knowledgeType) -
|
|
2673
|
+
knowledge: -by_type(knowledgeType) -
|
|
2674
|
+
by_source(sourceThingId) -
|
|
2675
|
+
by_created(createdAt);
|
|
1888
2676
|
```
|
|
1889
2677
|
|
|
1890
2678
|
### Query Optimization
|
|
@@ -2093,22 +2881,22 @@ knowledge: -by_type(knowledgeType) - by_source(sourceThingId) - by_created(creat
|
|
|
2093
2881
|
|
|
2094
2882
|
```typescript
|
|
2095
2883
|
const allPayments = await ctx.db
|
|
2096
|
-
.query(
|
|
2097
|
-
.filter((q) => q.eq(q.field(
|
|
2884
|
+
.query("events")
|
|
2885
|
+
.filter((q) => q.eq(q.field("type"), "payment_processed"))
|
|
2098
2886
|
.collect();
|
|
2099
2887
|
```
|
|
2100
2888
|
|
|
2101
2889
|
**Only X402 blockchain payments:**
|
|
2102
2890
|
|
|
2103
2891
|
```typescript
|
|
2104
|
-
const x402Payments = allPayments.filter((e) => e.metadata.protocol ===
|
|
2892
|
+
const x402Payments = allPayments.filter((e) => e.metadata.protocol === "x402");
|
|
2105
2893
|
```
|
|
2106
2894
|
|
|
2107
2895
|
**Total revenue by protocol:**
|
|
2108
2896
|
|
|
2109
2897
|
```typescript
|
|
2110
2898
|
const byProtocol = allPayments.reduce((acc, e) => {
|
|
2111
|
-
const protocol = e.metadata.protocol ||
|
|
2899
|
+
const protocol = e.metadata.protocol || "traditional";
|
|
2112
2900
|
acc[protocol] = (acc[protocol] || 0) + e.metadata.amount;
|
|
2113
2901
|
return acc;
|
|
2114
2902
|
}, {});
|
|
@@ -2194,6 +2982,7 @@ Principle: Users can add to any type without breaking the ontology.
|
|
|
2194
2982
|
**Dimensions:** 6 total (groups, people, things, connections, events, knowledge)
|
|
2195
2983
|
|
|
2196
2984
|
**Thing Types:** 66 total
|
|
2985
|
+
|
|
2197
2986
|
- Core: 4 (creator, ai_clone, audience_member, organization)
|
|
2198
2987
|
- Business Agents: 10
|
|
2199
2988
|
- Content: 7
|
|
@@ -2209,12 +2998,14 @@ Principle: Users can add to any type without breaking the ontology.
|
|
|
2209
2998
|
- Protocol: 2
|
|
2210
2999
|
|
|
2211
3000
|
**Connection Types:** 25 total (Hybrid approach)
|
|
3001
|
+
|
|
2212
3002
|
- 18 specific semantic types
|
|
2213
3003
|
- 7 consolidated types with metadata variants
|
|
2214
3004
|
- Protocol-agnostic via metadata.protocol
|
|
2215
3005
|
- Includes group membership with role-based metadata
|
|
2216
3006
|
|
|
2217
3007
|
**Event Types:** 67 total (Hybrid approach)
|
|
3008
|
+
|
|
2218
3009
|
- 4 Thing lifecycle
|
|
2219
3010
|
- 5 User events
|
|
2220
3011
|
- 6 Authentication events
|
|
@@ -2225,11 +3016,12 @@ Principle: Users can add to any type without breaking the ontology.
|
|
|
2225
3016
|
- 7 Token events
|
|
2226
3017
|
- 5 Course events
|
|
2227
3018
|
- 5 Analytics events
|
|
2228
|
-
- 7
|
|
3019
|
+
- 7 Cycle events
|
|
2229
3020
|
- 5 Blockchain events
|
|
2230
3021
|
- 11 consolidated types with metadata variants
|
|
2231
3022
|
|
|
2232
3023
|
**Design Benefits:**
|
|
3024
|
+
|
|
2233
3025
|
- Six-dimension reality model
|
|
2234
3026
|
- Multi-tenant by design
|
|
2235
3027
|
- Clear ownership & governance
|
|
@@ -2305,7 +3097,7 @@ Policy: Default is free-form, user-extensible knowledge labels for maximum flexi
|
|
|
2305
3097
|
- 7 Token events
|
|
2306
3098
|
- 5 Course events
|
|
2307
3099
|
- 5 Analytics events
|
|
2308
|
-
- **7
|
|
3100
|
+
- **7 Cycle events** (NEW: cycle_request, cycle_completed, revenue_collected, quota_exceeded)
|
|
2309
3101
|
- **5 Blockchain events** (NEW: nft_minted, nft_transferred, tokens_bridged, contract_deployed, treasury_withdrawal)
|
|
2310
3102
|
- 11 consolidated types with metadata variants
|
|
2311
3103
|
- Protocol identification via metadata.protocol + metadata.network
|
|
@@ -2329,9 +3121,13 @@ Policy: Default is free-form, user-extensible knowledge labels for maximum flexi
|
|
|
2329
3121
|
|
|
2330
3122
|
**END OF ONTOLOGY SPECIFICATION**
|
|
2331
3123
|
|
|
2332
|
-
## The Philosophy
|
|
3124
|
+
## The Philosophy: Reality as DSL
|
|
3125
|
+
|
|
3126
|
+
**This isn't a database schema. It's a Domain-Specific Language for reality itself.**
|
|
3127
|
+
|
|
3128
|
+
### The Core Insight
|
|
2333
3129
|
|
|
2334
|
-
**
|
|
3130
|
+
**Most systems model their application. ONE models reality.**
|
|
2335
3131
|
|
|
2336
3132
|
This ontology proves that you don't need hundreds of tables or complex schemas to build a complete AI-native platform. You need:
|
|
2337
3133
|
|
|
@@ -2343,7 +3139,25 @@ This ontology proves that you don't need hundreds of tables or complex schemas t
|
|
|
2343
3139
|
|
|
2344
3140
|
That's it. Everything else is just data.
|
|
2345
3141
|
|
|
2346
|
-
### Why This Works
|
|
3142
|
+
### Why This Works for AI Agents
|
|
3143
|
+
|
|
3144
|
+
**Traditional codebases:**
|
|
3145
|
+
|
|
3146
|
+
- 100 different patterns for the same concept
|
|
3147
|
+
- AI sees chaos, accuracy degrades (95% → 30%)
|
|
3148
|
+
- Technical debt compounds
|
|
3149
|
+
- Each feature makes the next HARDER
|
|
3150
|
+
|
|
3151
|
+
**ONE codebase:**
|
|
3152
|
+
|
|
3153
|
+
- 1 universal pattern for each dimension
|
|
3154
|
+
- AI sees structure, accuracy compounds (85% → 98%)
|
|
3155
|
+
- Technical credit accumulates
|
|
3156
|
+
- Each feature makes the next EASIER
|
|
3157
|
+
|
|
3158
|
+
**The result:** 100x developer productivity. Not hyperbole. Math.
|
|
3159
|
+
|
|
3160
|
+
### Why Schema Migrations Never Happen
|
|
2347
3161
|
|
|
2348
3162
|
**Other systems:**
|
|
2349
3163
|
|
|
@@ -2351,30 +3165,83 @@ That's it. Everything else is just data.
|
|
|
2351
3165
|
- Add protocol-specific columns
|
|
2352
3166
|
- Pollute schema with temporary concepts
|
|
2353
3167
|
- End up with 50+ tables, 200+ columns
|
|
3168
|
+
- Require migrations for every change
|
|
2354
3169
|
- Become unmaintainable nightmares
|
|
2355
3170
|
|
|
2356
3171
|
**ONE's approach:**
|
|
2357
3172
|
|
|
2358
|
-
- Map every feature to 6 dimensions
|
|
2359
|
-
- Groups partition the space (
|
|
2360
|
-
- People authorize and govern
|
|
2361
|
-
- Things
|
|
2362
|
-
-
|
|
3173
|
+
- Map every feature to 6 dimensions (reality model)
|
|
3174
|
+
- Groups partition the space (hierarchical containers)
|
|
3175
|
+
- People authorize and govern (role-based access)
|
|
3176
|
+
- Things exist with flexible properties (no migrations)
|
|
3177
|
+
- Connections relate (metadata for protocols)
|
|
3178
|
+
- Events record (complete audit trail)
|
|
3179
|
+
- Knowledge understands (embeddings + RAG)
|
|
2363
3180
|
- Scale infinitely without schema changes
|
|
2364
3181
|
- Stay simple, clean, beautiful
|
|
2365
3182
|
|
|
2366
|
-
### The
|
|
3183
|
+
### The Economic Impact
|
|
3184
|
+
|
|
3185
|
+
**Traditional Development:**
|
|
3186
|
+
|
|
3187
|
+
- Developer writes 100 lines/day
|
|
3188
|
+
- AI assistance degrades over time
|
|
3189
|
+
- Technical debt compounds
|
|
3190
|
+
- Codebases become unmaintainable
|
|
3191
|
+
- **Cost scales linearly with codebase size**
|
|
3192
|
+
|
|
3193
|
+
**ONE Development:**
|
|
3194
|
+
|
|
3195
|
+
- Agent generates 10,000 lines/day (100x)
|
|
3196
|
+
- AI accuracy improves over time (98%+)
|
|
3197
|
+
- Structure compounds (technical credit)
|
|
3198
|
+
- Codebases become MORE maintainable
|
|
3199
|
+
- **Cost scales sublinearly—larger codebases are cheaper per feature**
|
|
3200
|
+
|
|
3201
|
+
**Result:** 12x cheaper per feature at scale. Feature #100 costs LESS than feature #1.
|
|
3202
|
+
|
|
3203
|
+
### The Universal Language
|
|
3204
|
+
|
|
3205
|
+
A system architecture that:
|
|
3206
|
+
|
|
3207
|
+
- **Scales infinitely** - Lemonade stands to global governments, same schema
|
|
3208
|
+
- **Children can understand** - "I own (group), I'm the boss (person), I sell lemonade (things)"
|
|
3209
|
+
- **Enterprises can rely on** - Multi-tenant isolation, clear governance, infinite scale
|
|
3210
|
+
- **AI agents can master** - 6 patterns, 98% accuracy, compound structure
|
|
3211
|
+
- **Never breaks** - Reality doesn't change, technology does
|
|
3212
|
+
- **Grows more powerful** - Each feature adds structure, making the next feature easier
|
|
3213
|
+
- **Enables feature import** - Clone ANY system into the ontology (Shopify, Moodle, Stripe, etc.)
|
|
3214
|
+
|
|
3215
|
+
### What This Enables
|
|
3216
|
+
|
|
3217
|
+
**1. Compound Velocity**
|
|
2367
3218
|
|
|
2368
|
-
|
|
3219
|
+
- Traditional: Feature #100 takes LONGER than feature #1 (technical debt)
|
|
3220
|
+
- ONE: Feature #100 takes LESS TIME than feature #1 (pattern reuse)
|
|
2369
3221
|
|
|
2370
|
-
|
|
2371
|
-
- Children can understand: "I own (group), I'm the boss (person), I sell lemonade (things)"
|
|
2372
|
-
- Enterprises can rely on: Multi-tenant isolation, clear governance, infinite scale
|
|
2373
|
-
- AI agents can reason about completely
|
|
2374
|
-
- Never needs breaking changes
|
|
2375
|
-
- Grows more powerful as it grows larger
|
|
3222
|
+
**2. Universal Feature Import**
|
|
2376
3223
|
|
|
2377
|
-
|
|
3224
|
+
- Traditional: Want Shopify's checkout? Build from scratch (3 months)
|
|
3225
|
+
- ONE: Point agent-clone at Shopify. Clone checkout feature (20 minutes)
|
|
3226
|
+
|
|
3227
|
+
**3. Backend Agnosticism**
|
|
3228
|
+
|
|
3229
|
+
- Traditional: Migrating from WordPress to custom backend takes months
|
|
3230
|
+
- ONE: Switch `CONTENT_SOURCE` env var. Done in 1 minute.
|
|
3231
|
+
|
|
3232
|
+
**4. AI-Native Development**
|
|
3233
|
+
|
|
3234
|
+
- Traditional: AI is an assistant. Human is the driver (70% human work)
|
|
3235
|
+
- ONE: AI is the primary builder. Human is the architect (2% human work at scale)
|
|
3236
|
+
|
|
3237
|
+
**5. No Breaking Changes**
|
|
3238
|
+
|
|
3239
|
+
- Traditional: Major versions break everything
|
|
3240
|
+
- ONE: Technology changes (React → Svelte), ontology stays the same
|
|
3241
|
+
|
|
3242
|
+
**This is what happens when you design for AI agents first, not humans.**
|
|
3243
|
+
|
|
3244
|
+
The 6-dimension ontology is the **universal code generation language** that enables 98% accuracy by modeling reality itself.
|
|
2378
3245
|
|
|
2379
3246
|
---
|
|
2380
3247
|
|
|
@@ -2430,29 +3297,29 @@ export const requestPasswordReset = mutation({
|
|
|
2430
3297
|
handler: async (ctx, { email }) => {
|
|
2431
3298
|
// 1. Find user entity
|
|
2432
3299
|
const user = await ctx.db
|
|
2433
|
-
.query(
|
|
2434
|
-
.filter((q) => q.eq(q.field(
|
|
3300
|
+
.query("entities")
|
|
3301
|
+
.filter((q) => q.eq(q.field("properties.email"), email))
|
|
2435
3302
|
.first();
|
|
2436
3303
|
|
|
2437
3304
|
if (!user) return { success: true }; // Don't reveal if user exists
|
|
2438
3305
|
|
|
2439
3306
|
// 2. Create password_reset_token entity
|
|
2440
|
-
const tokenId = await ctx.db.insert(
|
|
2441
|
-
type:
|
|
3307
|
+
const tokenId = await ctx.db.insert("entities", {
|
|
3308
|
+
type: "password_reset_token",
|
|
2442
3309
|
name: `Reset token for ${email}`,
|
|
2443
3310
|
properties: {
|
|
2444
3311
|
userId: user._id,
|
|
2445
3312
|
token: hashedToken,
|
|
2446
3313
|
expiresAt: Date.now() + 30 * 60 * 1000,
|
|
2447
3314
|
},
|
|
2448
|
-
status:
|
|
3315
|
+
status: "active",
|
|
2449
3316
|
createdAt: Date.now(),
|
|
2450
3317
|
updatedAt: Date.now(),
|
|
2451
3318
|
});
|
|
2452
3319
|
|
|
2453
3320
|
// 3. Log event
|
|
2454
|
-
await ctx.db.insert(
|
|
2455
|
-
type:
|
|
3321
|
+
await ctx.db.insert("events", {
|
|
3322
|
+
type: "password_reset_requested",
|
|
2456
3323
|
actorId: user._id,
|
|
2457
3324
|
targetId: tokenId,
|
|
2458
3325
|
timestamp: Date.now(),
|
|
@@ -2468,7 +3335,7 @@ export const requestPasswordReset = mutation({
|
|
|
2468
3335
|
});
|
|
2469
3336
|
|
|
2470
3337
|
// Frontend usage
|
|
2471
|
-
import { useMutation } from
|
|
3338
|
+
import { useMutation } from "convex/react";
|
|
2472
3339
|
|
|
2473
3340
|
export function PasswordResetForm() {
|
|
2474
3341
|
const requestReset = useMutation(api.auth.requestPasswordReset);
|
|
@@ -2485,32 +3352,35 @@ export function PasswordResetForm() {
|
|
|
2485
3352
|
```typescript
|
|
2486
3353
|
// Check if user is group_owner (Middleware.md pattern)
|
|
2487
3354
|
export const checkGroupOwner = query({
|
|
2488
|
-
args: { userId: v.id(
|
|
3355
|
+
args: { userId: v.id("things"), groupId: v.id("groups") },
|
|
2489
3356
|
handler: async (ctx, { userId, groupId }) => {
|
|
2490
3357
|
// Query connection with role metadata
|
|
2491
3358
|
const membership = await ctx.db
|
|
2492
|
-
.query(
|
|
2493
|
-
.withIndex(
|
|
3359
|
+
.query("connections")
|
|
3360
|
+
.withIndex("from_type", (q) =>
|
|
2494
3361
|
q
|
|
2495
|
-
.eq(
|
|
2496
|
-
.eq(
|
|
2497
|
-
.eq(
|
|
3362
|
+
.eq("fromThingId", userId)
|
|
3363
|
+
.eq("toThingId", groupId)
|
|
3364
|
+
.eq("relationshipType", "member_of"),
|
|
2498
3365
|
)
|
|
2499
3366
|
.first();
|
|
2500
3367
|
|
|
2501
|
-
return membership?.metadata?.role ===
|
|
3368
|
+
return membership?.metadata?.role === "group_owner";
|
|
2502
3369
|
},
|
|
2503
3370
|
});
|
|
2504
3371
|
|
|
2505
3372
|
// Frontend usage in middleware
|
|
2506
|
-
import { ConvexHttpClient } from
|
|
3373
|
+
import { ConvexHttpClient } from "convex/browser";
|
|
2507
3374
|
|
|
2508
3375
|
export async function checkAccess(userId: string, groupId: string) {
|
|
2509
3376
|
const convex = new ConvexHttpClient(env.CONVEX_URL);
|
|
2510
|
-
const isOwner = await convex.query(api.auth.checkGroupOwner, {
|
|
3377
|
+
const isOwner = await convex.query(api.auth.checkGroupOwner, {
|
|
3378
|
+
userId,
|
|
3379
|
+
groupId,
|
|
3380
|
+
});
|
|
2511
3381
|
|
|
2512
3382
|
if (!isOwner) {
|
|
2513
|
-
throw new Error(
|
|
3383
|
+
throw new Error("Forbidden: Group owner access required");
|
|
2514
3384
|
}
|
|
2515
3385
|
}
|
|
2516
3386
|
```
|
|
@@ -2520,26 +3390,26 @@ export async function checkAccess(userId: string, groupId: string) {
|
|
|
2520
3390
|
```typescript
|
|
2521
3391
|
// Query events for analytics (Dashboard.md pattern)
|
|
2522
3392
|
export const getGroupAnalytics = query({
|
|
2523
|
-
args: { groupId: v.id(
|
|
3393
|
+
args: { groupId: v.id("groups"), days: v.number() },
|
|
2524
3394
|
handler: async (ctx, { groupId, days }) => {
|
|
2525
3395
|
const since = Date.now() - days * 24 * 60 * 60 * 1000;
|
|
2526
3396
|
|
|
2527
3397
|
// Get all dashboard_viewed events for group users
|
|
2528
3398
|
const groupMembers = await ctx.db
|
|
2529
|
-
.query(
|
|
2530
|
-
.withIndex(
|
|
2531
|
-
q.eq(
|
|
3399
|
+
.query("connections")
|
|
3400
|
+
.withIndex("to_type", (q) =>
|
|
3401
|
+
q.eq("toThingId", groupId).eq("relationshipType", "member_of"),
|
|
2532
3402
|
)
|
|
2533
3403
|
.collect();
|
|
2534
3404
|
|
|
2535
3405
|
const memberIds = groupMembers.map((m) => m.fromThingId);
|
|
2536
3406
|
|
|
2537
3407
|
const dashboardViews = await ctx.db
|
|
2538
|
-
.query(
|
|
2539
|
-
.withIndex(
|
|
2540
|
-
q.eq(
|
|
3408
|
+
.query("events")
|
|
3409
|
+
.withIndex("type_time", (q) =>
|
|
3410
|
+
q.eq("type", "dashboard_viewed").gte("timestamp", since),
|
|
2541
3411
|
)
|
|
2542
|
-
.filter((q) => memberIds.includes(q.field(
|
|
3412
|
+
.filter((q) => memberIds.includes(q.field("actorId")))
|
|
2543
3413
|
.collect();
|
|
2544
3414
|
|
|
2545
3415
|
return {
|
|
@@ -2548,7 +3418,7 @@ export const getGroupAnalytics = query({
|
|
|
2548
3418
|
averageSessionDuration:
|
|
2549
3419
|
dashboardViews.reduce(
|
|
2550
3420
|
(sum, e) => sum + (e.metadata.sessionDuration || 0),
|
|
2551
|
-
0
|
|
3421
|
+
0,
|
|
2552
3422
|
) / dashboardViews.length,
|
|
2553
3423
|
};
|
|
2554
3424
|
},
|
|
@@ -2561,44 +3431,44 @@ export const getGroupAnalytics = query({
|
|
|
2561
3431
|
// Update user preferences (creates ui_preferences thing if not exists)
|
|
2562
3432
|
export const updatePreferences = mutation({
|
|
2563
3433
|
args: {
|
|
2564
|
-
userId: v.id(
|
|
3434
|
+
userId: v.id("entities"),
|
|
2565
3435
|
theme: v.optional(
|
|
2566
|
-
v.union(v.literal(
|
|
3436
|
+
v.union(v.literal("light"), v.literal("dark"), v.literal("system")),
|
|
2567
3437
|
),
|
|
2568
3438
|
language: v.optional(v.string()),
|
|
2569
3439
|
},
|
|
2570
3440
|
handler: async (ctx, { userId, theme, language }) => {
|
|
2571
3441
|
// Get or create ui_preferences entity
|
|
2572
3442
|
let prefs = await ctx.db
|
|
2573
|
-
.query(
|
|
2574
|
-
.withIndex(
|
|
2575
|
-
.filter((q) => q.eq(q.field(
|
|
3443
|
+
.query("entities")
|
|
3444
|
+
.withIndex("by_type", (q) => q.eq("type", "ui_preferences"))
|
|
3445
|
+
.filter((q) => q.eq(q.field("properties.userId"), userId))
|
|
2576
3446
|
.first();
|
|
2577
3447
|
|
|
2578
3448
|
if (!prefs) {
|
|
2579
3449
|
// Create new preferences entity
|
|
2580
|
-
const prefsId = await ctx.db.insert(
|
|
2581
|
-
type:
|
|
3450
|
+
const prefsId = await ctx.db.insert("entities", {
|
|
3451
|
+
type: "ui_preferences",
|
|
2582
3452
|
name: `Preferences for user ${userId}`,
|
|
2583
3453
|
properties: {
|
|
2584
3454
|
userId,
|
|
2585
|
-
theme: theme ||
|
|
2586
|
-
language: language ||
|
|
2587
|
-
timezone:
|
|
3455
|
+
theme: theme || "system",
|
|
3456
|
+
language: language || "en",
|
|
3457
|
+
timezone: "UTC",
|
|
2588
3458
|
dashboardLayout: {
|
|
2589
3459
|
sidebarCollapsed: false,
|
|
2590
|
-
defaultView:
|
|
3460
|
+
defaultView: "grid",
|
|
2591
3461
|
itemsPerPage: 20,
|
|
2592
3462
|
},
|
|
2593
3463
|
notifications: { email: true, push: false, sms: false, inApp: true },
|
|
2594
3464
|
accessibility: {
|
|
2595
3465
|
reducedMotion: false,
|
|
2596
3466
|
highContrast: false,
|
|
2597
|
-
fontSize:
|
|
3467
|
+
fontSize: "medium",
|
|
2598
3468
|
},
|
|
2599
3469
|
updatedAt: Date.now(),
|
|
2600
3470
|
},
|
|
2601
|
-
status:
|
|
3471
|
+
status: "active",
|
|
2602
3472
|
createdAt: Date.now(),
|
|
2603
3473
|
updatedAt: Date.now(),
|
|
2604
3474
|
});
|
|
@@ -2619,8 +3489,8 @@ export const updatePreferences = mutation({
|
|
|
2619
3489
|
|
|
2620
3490
|
// Log preferences_updated event
|
|
2621
3491
|
if (theme) {
|
|
2622
|
-
await ctx.db.insert(
|
|
2623
|
-
type:
|
|
3492
|
+
await ctx.db.insert("events", {
|
|
3493
|
+
type: "theme_changed",
|
|
2624
3494
|
actorId: userId,
|
|
2625
3495
|
targetId: prefs._id,
|
|
2626
3496
|
timestamp: Date.now(),
|
|
@@ -2651,11 +3521,11 @@ export function usePreferences(userId: string) {
|
|
|
2651
3521
|
```typescript
|
|
2652
3522
|
// src/content/config.ts
|
|
2653
3523
|
const agentsCollection = defineCollection({
|
|
2654
|
-
type:
|
|
3524
|
+
type: "data",
|
|
2655
3525
|
loader: async () => {
|
|
2656
3526
|
const convex = new ConvexHttpClient(env.CONVEX_URL);
|
|
2657
3527
|
const agents = await convex.query(api.queries.entities.list, {
|
|
2658
|
-
type:
|
|
3528
|
+
type: "strategy_agent",
|
|
2659
3529
|
});
|
|
2660
3530
|
return agents;
|
|
2661
3531
|
},
|
|
@@ -2682,7 +3552,7 @@ export function AdminPanel({ userId, groupId }) {
|
|
|
2682
3552
|
groupId,
|
|
2683
3553
|
});
|
|
2684
3554
|
|
|
2685
|
-
if (membership?.metadata?.role !==
|
|
3555
|
+
if (membership?.metadata?.role !== "group_owner") {
|
|
2686
3556
|
return <div>Access denied</div>;
|
|
2687
3557
|
}
|
|
2688
3558
|
|
|
@@ -2725,22 +3595,154 @@ This demonstrates how the complete ontology (things, connections, events, knowle
|
|
|
2725
3595
|
|
|
2726
3596
|
---
|
|
2727
3597
|
|
|
2728
|
-
## For Implementers
|
|
3598
|
+
## For Implementers: Using the Universal Language
|
|
3599
|
+
|
|
3600
|
+
### AI Agents: The 6-Question Framework
|
|
3601
|
+
|
|
3602
|
+
When implementing ANY feature, ask these 6 questions (maps to 6 dimensions):
|
|
3603
|
+
|
|
3604
|
+
1. **Groups** - Which group owns this? Any parent/child relationships?
|
|
3605
|
+
2. **People** - Who can access/modify this? What role is required?
|
|
3606
|
+
3. **Things** - What entities are involved? Which thing types?
|
|
3607
|
+
4. **Connections** - How do they relate? Which connection types?
|
|
3608
|
+
5. **Events** - What actions need logging? Which event types?
|
|
3609
|
+
6. **Knowledge** - What needs to be learned/searched? Labels? Chunks? Embeddings?
|
|
3610
|
+
|
|
3611
|
+
**Example: User Purchases a Course**
|
|
3612
|
+
|
|
3613
|
+
1. **Groups** - User's organization (groupId scoping)
|
|
3614
|
+
2. **People** - User (role: customer), Creator (role: org_owner)
|
|
3615
|
+
3. **Things** - User thing, Course thing, Payment thing
|
|
3616
|
+
4. **Connections** - User → Course (enrolled_in), User → Payment (transacted)
|
|
3617
|
+
5. **Events** - course_enrolled, payment_processed
|
|
3618
|
+
6. **Knowledge** - Course chunks (RAG), "education" label, "video" label
|
|
3619
|
+
|
|
3620
|
+
**Pattern Learned:** Every feature maps to all 6 dimensions. This is the universal pattern.
|
|
3621
|
+
|
|
3622
|
+
### Humans: Why This Matters
|
|
3623
|
+
|
|
3624
|
+
**You're building the universal code generation language.**
|
|
3625
|
+
|
|
3626
|
+
Your AI agents now have a complete, unambiguous data model. They will generate consistent database operations because they understand the underlying structure.
|
|
3627
|
+
|
|
3628
|
+
**Key insights:**
|
|
3629
|
+
|
|
3630
|
+
- The ontology models reality, not your app (that's why it never breaks)
|
|
3631
|
+
- Each feature AI generates makes the NEXT feature more accurate
|
|
3632
|
+
- You're not managing technical debt—you're accumulating technical credit
|
|
3633
|
+
- 100 features in, your codebase is EASIER to work with, not harder
|
|
3634
|
+
|
|
3635
|
+
### Developers: Pattern Recognition
|
|
3636
|
+
|
|
3637
|
+
**You have a schema that will never need major refactoring.**
|
|
3638
|
+
|
|
3639
|
+
**Adding features:**
|
|
3640
|
+
|
|
3641
|
+
- New entity type? → Add to `properties`, no schema migration
|
|
3642
|
+
- New relationship? → Use existing connection types + metadata
|
|
3643
|
+
- New protocol? → Add `metadata.protocol`, no new tables
|
|
3644
|
+
- New workflow? → Compose existing services via Effect.ts
|
|
3645
|
+
|
|
3646
|
+
**What you DON'T do:**
|
|
3647
|
+
|
|
3648
|
+
- ❌ Create custom tables (map to 6 dimensions instead)
|
|
3649
|
+
- ❌ Add protocol-specific columns (use metadata)
|
|
3650
|
+
- ❌ Schema migrations for new fields (use properties)
|
|
3651
|
+
- ❌ Hardcode patterns (use provider interface)
|
|
3652
|
+
|
|
3653
|
+
**What you DO:**
|
|
3654
|
+
|
|
3655
|
+
- ✅ Map features to 6 dimensions (groups, people, things, connections, events, knowledge)
|
|
3656
|
+
- ✅ Use flexible properties for type-specific data
|
|
3657
|
+
- ✅ Use metadata for protocol identity
|
|
3658
|
+
- ✅ Compose services via Effect.ts
|
|
3659
|
+
- ✅ Log all actions as events (complete audit trail)
|
|
3660
|
+
|
|
3661
|
+
### The Learning Curve
|
|
3662
|
+
|
|
3663
|
+
**Generation 1-10: Learning the ontology (85% accuracy)**
|
|
3664
|
+
|
|
3665
|
+
- You're teaching AI the 6 dimensions
|
|
3666
|
+
- Patterns are being established
|
|
3667
|
+
- Services are being created
|
|
3668
|
+
|
|
3669
|
+
**Generation 11-50: Pattern recognition (90-93% accuracy)**
|
|
3670
|
+
|
|
3671
|
+
- AI recognizes the universal patterns
|
|
3672
|
+
- Services are being reused
|
|
3673
|
+
- Composition is happening
|
|
3674
|
+
|
|
3675
|
+
**Generation 51-100: Pattern mastery (96-98% accuracy)**
|
|
3676
|
+
|
|
3677
|
+
- AI has internalized the structure
|
|
3678
|
+
- Generation is deterministic
|
|
3679
|
+
- You're reviewing, not debugging
|
|
3680
|
+
|
|
3681
|
+
**Generation 100+: Generalized patterns (98%+ accuracy)**
|
|
3682
|
+
|
|
3683
|
+
- AI doesn't need to think
|
|
3684
|
+
- Every decision is pattern-based
|
|
3685
|
+
- You're the architect, AI is the builder
|
|
3686
|
+
|
|
3687
|
+
**This ontology is complete. It's ready for production. It's the foundation for 98% AI code generation accuracy.**
|
|
3688
|
+
|
|
3689
|
+
---
|
|
3690
|
+
|
|
3691
|
+
## Summary: The Universal Code Generation Language
|
|
3692
|
+
|
|
3693
|
+
### What Makes ONE Universal
|
|
3694
|
+
|
|
3695
|
+
1. **6-Dimension Ontology** - Models reality, not technology
|
|
3696
|
+
2. **Compound Structure** - Each feature adds structure (not debt)
|
|
3697
|
+
3. **Pattern Convergence** - 1 pattern per dimension (not 100 patterns)
|
|
3698
|
+
4. **Backend Agnostic** - Swap technology freely (Convex, WordPress, Shopify)
|
|
3699
|
+
5. **Never Breaks** - Reality doesn't change, technology does
|
|
3700
|
+
6. **Infinite Scale** - Lemonade stands to global governments, same schema
|
|
3701
|
+
|
|
3702
|
+
### The Economic Result
|
|
3703
|
+
|
|
3704
|
+
**Traditional Codebases:**
|
|
3705
|
+
|
|
3706
|
+
```
|
|
3707
|
+
100 files → 90% accurate
|
|
3708
|
+
1,000 files → 70% accurate
|
|
3709
|
+
10,000 files → 30% accurate
|
|
3710
|
+
AI becomes a liability
|
|
3711
|
+
```
|
|
3712
|
+
|
|
3713
|
+
**ONE Codebase:**
|
|
3714
|
+
|
|
3715
|
+
```
|
|
3716
|
+
100 files → 85% accurate (learning)
|
|
3717
|
+
1,000 files → 92% accurate (mastering)
|
|
3718
|
+
10,000 files → 98% accurate (generalized)
|
|
3719
|
+
AI becomes more valuable
|
|
3720
|
+
```
|
|
3721
|
+
|
|
3722
|
+
**Why?** The ontology is the language. Patterns converge. Structure compounds.
|
|
3723
|
+
|
|
3724
|
+
### Next Steps for AI Agents
|
|
2729
3725
|
|
|
2730
|
-
**
|
|
3726
|
+
**When implementing ANY feature:**
|
|
2731
3727
|
|
|
2732
|
-
1.
|
|
2733
|
-
2.
|
|
2734
|
-
3.
|
|
2735
|
-
4.
|
|
2736
|
-
5.
|
|
2737
|
-
6.
|
|
3728
|
+
1. Read `/CLAUDE.md` (platform overview)
|
|
3729
|
+
2. Read `/one/knowledge/ontology.md` (this file - understand the 6 dimensions)
|
|
3730
|
+
3. Read `/one/knowledge/architecture.md` (why this enables 98% accuracy)
|
|
3731
|
+
4. Map feature to ontology (groups, people, things, connections, events, knowledge)
|
|
3732
|
+
5. Generate Effect.ts services (composable business logic)
|
|
3733
|
+
6. Generate provider adapters (if needed)
|
|
3734
|
+
7. Generate UI components (shadcn/ui)
|
|
3735
|
+
8. Test with mocked layers
|
|
2738
3736
|
|
|
2739
|
-
**
|
|
3737
|
+
**Remember:**
|
|
2740
3738
|
|
|
2741
|
-
|
|
3739
|
+
- The ontology never changes (it's reality)
|
|
3740
|
+
- Effect.ts is for agents (predictable patterns)
|
|
3741
|
+
- Provider pattern is the universal adapter
|
|
3742
|
+
- Every feature adds structure
|
|
3743
|
+
- Each generation compounds accuracy
|
|
2742
3744
|
|
|
2743
|
-
**This
|
|
3745
|
+
**This is how software should be built.**
|
|
2744
3746
|
|
|
2745
3747
|
---
|
|
2746
3748
|
|
|
@@ -2748,30 +3750,36 @@ This demonstrates how the complete ontology (things, connections, events, knowle
|
|
|
2748
3750
|
|
|
2749
3751
|
Objective: attach vectors to every relevant piece of content to enable high‑quality retrieval, while preserving ontology simplicity.
|
|
2750
3752
|
|
|
2751
|
-
1
|
|
3753
|
+
1. Inventory sources (by thing type)
|
|
3754
|
+
|
|
2752
3755
|
- Text bodies: `blog_post.content`, `social_post.text`, `email.content`, `lesson.content`, `course.description`, `website.page.html (stripped)`
|
|
2753
3756
|
- Transcripts: `video.transcript`, `podcast.transcript`, `livestream.recording.transcript`
|
|
2754
3757
|
- Metadata: titles, summaries, captions
|
|
2755
3758
|
|
|
2756
|
-
2
|
|
3759
|
+
2. Chunking standard
|
|
3760
|
+
|
|
2757
3761
|
- Window: ~800 tokens; overlap: ~200 tokens; language‑aware sentence boundaries when possible.
|
|
2758
3762
|
- Store per‑chunk: `{ index, tokenCount, start, end, overlap }`.
|
|
2759
3763
|
|
|
2760
|
-
3
|
|
3764
|
+
3. Embedding policy
|
|
3765
|
+
|
|
2761
3766
|
- Model: configurable via env (e.g., `text-embedding-3-large`). Store `embeddingModel` + `embeddingDim` per knowledge item.
|
|
2762
3767
|
- PII/Privacy: use `knowledgeType: 'vector_only'` for sensitive texts; omit `text` and keep only embeddings + hashes.
|
|
2763
3768
|
|
|
2764
|
-
4
|
|
3769
|
+
4. Ingestion pipeline
|
|
3770
|
+
|
|
2765
3771
|
- Mutation: `scheduleEmbeddingForThing({ thingId, fields[] })` validates and enqueues work.
|
|
2766
3772
|
- Internal action: `embedText({ text, model })` calls provider and returns `embedding`.
|
|
2767
3773
|
- Internal mutation: `upsertKnowledgeChunks({ thingId, chunks[] })` writes `knowledge` items and links via `thingKnowledge` with role `chunk_of`.
|
|
2768
3774
|
- Event log: `content_changed` on source updates triggers re‑embedding (debounced) via scheduler.
|
|
2769
3775
|
|
|
2770
|
-
5
|
|
3776
|
+
5. Query + retrieval
|
|
3777
|
+
|
|
2771
3778
|
- Vector search over `knowledge` filtered by group, creator, and content type; k‑NN approximate index when available, else provider‑side search.
|
|
2772
3779
|
- Hybrid scoring: combine semantic similarity with lexical signals from `labels` and metadata.
|
|
2773
3780
|
|
|
2774
|
-
6
|
|
3781
|
+
6. Governance + lifecycle
|
|
3782
|
+
|
|
2775
3783
|
- Versioning: keep `metadata.hash` of source; if unchanged, skip.
|
|
2776
3784
|
- Retention: archive old chunks on major edits; GC orphaned knowledge items.
|
|
2777
3785
|
- Quality: track `metadata.qualityScore` and `feedback` for active learning.
|
|
@@ -2784,13 +3792,17 @@ export const embedText = internalAction({
|
|
|
2784
3792
|
args: { text: v.string(), model: v.optional(v.string()) },
|
|
2785
3793
|
handler: async (ctx, { text, model }) => {
|
|
2786
3794
|
const embedding = await callEmbedProvider(text, model);
|
|
2787
|
-
return {
|
|
3795
|
+
return {
|
|
3796
|
+
embedding,
|
|
3797
|
+
model: model || "text-embedding-3-large",
|
|
3798
|
+
dim: embedding.length,
|
|
3799
|
+
};
|
|
2788
3800
|
},
|
|
2789
3801
|
});
|
|
2790
3802
|
|
|
2791
3803
|
// mutation: schedule embedding for a thing
|
|
2792
3804
|
export const scheduleEmbeddingForThing = mutation({
|
|
2793
|
-
args: { id: v.id(
|
|
3805
|
+
args: { id: v.id("things"), fields: v.optional(v.array(v.string())) },
|
|
2794
3806
|
handler: async (ctx, { id, fields }) => {
|
|
2795
3807
|
await ctx.scheduler.runAfter(0, internal.rag.ingestThing, { id, fields });
|
|
2796
3808
|
},
|
|
@@ -2798,21 +3810,34 @@ export const scheduleEmbeddingForThing = mutation({
|
|
|
2798
3810
|
|
|
2799
3811
|
// internal action: ingest a thing into knowledge
|
|
2800
3812
|
export const ingestThing = internalAction({
|
|
2801
|
-
args: { id: v.id(
|
|
3813
|
+
args: { id: v.id("things"), fields: v.optional(v.array(v.string())) },
|
|
2802
3814
|
handler: async (ctx, { id, fields }) => {
|
|
2803
3815
|
const thing = await ctx.runQuery(internal.entities.get, { id });
|
|
2804
3816
|
const texts = extractTexts(thing, fields);
|
|
2805
3817
|
let index = 0;
|
|
2806
3818
|
for (const t of chunk(texts, { size: 800, overlap: 200 })) {
|
|
2807
|
-
const { embedding, model, dim } = await ctx.runAction(
|
|
3819
|
+
const { embedding, model, dim } = await ctx.runAction(
|
|
3820
|
+
internal.rag.embedText,
|
|
3821
|
+
{ text: t.text },
|
|
3822
|
+
);
|
|
2808
3823
|
const knowledgeId = await ctx.runMutation(internal.rag.upsertKnowledge, {
|
|
2809
3824
|
item: {
|
|
2810
|
-
knowledgeType:
|
|
2811
|
-
|
|
3825
|
+
knowledgeType: "chunk",
|
|
3826
|
+
text: t.text,
|
|
3827
|
+
embedding,
|
|
3828
|
+
embeddingModel: model,
|
|
3829
|
+
embeddingDim: dim,
|
|
3830
|
+
sourceThingId: id,
|
|
3831
|
+
sourceField: t.field,
|
|
3832
|
+
chunk: { index, tokenCount: t.tokens, overlap: 200 },
|
|
2812
3833
|
labels: t.labels,
|
|
2813
3834
|
},
|
|
2814
3835
|
});
|
|
2815
|
-
await ctx.runMutation(internal.rag.linkThingKnowledge, {
|
|
3836
|
+
await ctx.runMutation(internal.rag.linkThingKnowledge, {
|
|
3837
|
+
thingId: id,
|
|
3838
|
+
knowledgeId,
|
|
3839
|
+
role: "chunk_of",
|
|
3840
|
+
});
|
|
2816
3841
|
index++;
|
|
2817
3842
|
}
|
|
2818
3843
|
},
|