oneie 3.7.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/commands/agent.d.ts +2 -0
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +44 -0
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/bounty.d.ts +4 -0
- package/dist/commands/bounty.d.ts.map +1 -0
- package/dist/commands/bounty.js +24 -0
- package/dist/commands/bounty.js.map +1 -0
- package/dist/commands/capabilities.d.ts +4 -0
- package/dist/commands/capabilities.d.ts.map +1 -0
- package/dist/commands/capabilities.js +18 -0
- package/dist/commands/capabilities.js.map +1 -0
- package/dist/commands/commend.d.ts +4 -0
- package/dist/commands/commend.d.ts.map +1 -0
- package/dist/commands/commend.js +13 -0
- package/dist/commands/commend.js.map +1 -0
- package/dist/commands/completion.d.ts +4 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +49 -0
- package/dist/commands/completion.js.map +1 -0
- package/dist/commands/config.d.ts +4 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +78 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/doctor.d.ts +4 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +72 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/export.d.ts +4 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +15 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/fade.d.ts.map +1 -1
- package/dist/commands/fade.js +8 -4
- package/dist/commands/fade.js.map +1 -1
- package/dist/commands/flag.d.ts +4 -0
- package/dist/commands/flag.d.ts.map +1 -0
- package/dist/commands/flag.js +13 -0
- package/dist/commands/flag.js.map +1 -0
- package/dist/commands/health.d.ts +4 -0
- package/dist/commands/health.d.ts.map +1 -0
- package/dist/commands/health.js +11 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/highways.d.ts.map +1 -1
- package/dist/commands/highways.js +7 -4
- package/dist/commands/highways.js.map +1 -1
- package/dist/commands/hire.d.ts +4 -0
- package/dist/commands/hire.d.ts.map +1 -0
- package/dist/commands/hire.js +16 -0
- package/dist/commands/hire.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +69 -42
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mark.d.ts.map +1 -1
- package/dist/commands/mark.js +7 -7
- package/dist/commands/mark.js.map +1 -1
- package/dist/commands/pay.d.ts +4 -0
- package/dist/commands/pay.d.ts.map +1 -0
- package/dist/commands/pay.js +21 -0
- package/dist/commands/pay.js.map +1 -0
- package/dist/commands/pipe.d.ts +4 -0
- package/dist/commands/pipe.d.ts.map +1 -0
- package/dist/commands/pipe.js +35 -0
- package/dist/commands/pipe.js.map +1 -0
- package/dist/commands/publish.d.ts +4 -0
- package/dist/commands/publish.d.ts.map +1 -0
- package/dist/commands/publish.js +23 -0
- package/dist/commands/publish.js.map +1 -0
- package/dist/commands/repl.d.ts +4 -0
- package/dist/commands/repl.d.ts.map +1 -0
- package/dist/commands/repl.js +56 -0
- package/dist/commands/repl.js.map +1 -0
- package/dist/commands/revenue.d.ts +4 -0
- package/dist/commands/revenue.d.ts.map +1 -0
- package/dist/commands/revenue.js +11 -0
- package/dist/commands/revenue.js.map +1 -0
- package/dist/commands/stats.d.ts +4 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +11 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/status.d.ts +4 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +18 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/tail.d.ts +4 -0
- package/dist/commands/tail.d.ts.map +1 -0
- package/dist/commands/tail.js +51 -0
- package/dist/commands/tail.js.map +1 -0
- package/dist/commands/warn.d.ts.map +1 -1
- package/dist/commands/warn.js +6 -6
- package/dist/commands/warn.js.map +1 -1
- package/dist/index.js +61 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/args.d.ts +1 -0
- package/dist/lib/args.d.ts.map +1 -1
- package/dist/lib/args.js +3 -0
- package/dist/lib/args.js.map +1 -1
- package/dist/lib/output.d.ts +5 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +32 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/sdk.d.ts +10 -0
- package/dist/lib/sdk.d.ts.map +1 -0
- package/dist/lib/sdk.js +22 -0
- package/dist/lib/sdk.js.map +1 -0
- package/dist/utils/installation-setup.d.ts +15 -0
- package/dist/utils/installation-setup.d.ts.map +1 -1
- package/dist/utils/installation-setup.js +63 -0
- package/dist/utils/installation-setup.js.map +1 -1
- package/package.json +3 -18
- package/.claude/agents/TROUBLESHOOTING.md +0 -530
- package/.claude/agents/agent-backend.md +0 -574
- package/.claude/agents/agent-builder.md +0 -911
- package/.claude/agents/agent-claude.md +0 -645
- package/.claude/agents/agent-clean.md +0 -477
- package/.claude/agents/agent-clone.md +0 -554
- package/.claude/agents/agent-designer.md +0 -1080
- package/.claude/agents/agent-director.md +0 -2254
- package/.claude/agents/agent-documenter.md +0 -688
- package/.claude/agents/agent-frontend.md +0 -1199
- package/.claude/agents/agent-integrator.md +0 -670
- package/.claude/agents/agent-lawyer.md +0 -1320
- package/.claude/agents/agent-news.md +0 -363
- package/.claude/agents/agent-onboard.md +0 -613
- package/.claude/agents/agent-ontology.md +0 -585
- package/.claude/agents/agent-ops.md +0 -1275
- package/.claude/agents/agent-problem-solver.md +0 -669
- package/.claude/agents/agent-quality.md +0 -1042
- package/.claude/agents/agent-sales.md +0 -507
- package/.claude/agents/agent-writer.md +0 -1068
- package/.claude/commands/cascade.md +0 -742
- package/.claude/commands/chat.md +0 -728
- package/.claude/commands/commit.md +0 -95
- package/.claude/commands/create.md +0 -544
- package/.claude/commands/deploy.md +0 -309
- package/.claude/commands/fast.md +0 -636
- package/.claude/commands/mcp-on.md +0 -191
- package/.claude/commands/media-upload.md +0 -186
- package/.claude/commands/news.md +0 -274
- package/.claude/commands/onboard.md +0 -440
- package/.claude/commands/one.md +0 -398
- package/.claude/commands/optimize.md +0 -74
- package/.claude/commands/plan.md +0 -719
- package/.claude/commands/push.md +0 -214
- package/.claude/commands/release.md +0 -105
- package/.claude/commands/review.md +0 -99
- package/.claude/commands/server.md +0 -487
- package/.claude/commands/start.md +0 -227
- package/.claude/commands/test.md +0 -197
- package/.claude/commands/validate.md +0 -140
- package/.claude/hooks/.last-news-context +0 -1
- package/.claude/hooks/PULL-BEFORE-PUSH-GUIDE.md +0 -473
- package/.claude/hooks/README-knowledge-hooks.md +0 -451
- package/.claude/hooks/README-news-generation.md +0 -364
- package/.claude/hooks/README-root-cleanup.md +0 -200
- package/.claude/hooks/README.md +0 -284
- package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
- package/.claude/hooks/auto-format.sh +0 -106
- package/.claude/hooks/check-filenames.py +0 -177
- package/.claude/hooks/clean-post.py +0 -468
- package/.claude/hooks/clean-pre.py +0 -393
- package/.claude/hooks/clean-root-markdown.sh +0 -73
- package/.claude/hooks/commit-push.sh +0 -95
- package/.claude/hooks/done.py +0 -236
- package/.claude/hooks/format-hook.sh +0 -163
- package/.claude/hooks/formatting.py +0 -187
- package/.claude/hooks/hook-logger.sh +0 -173
- package/.claude/hooks/knowledge-post.py +0 -355
- package/.claude/hooks/knowledge-pre.py +0 -245
- package/.claude/hooks/mcp-on.sh +0 -134
- package/.claude/hooks/notification-hook.sh +0 -279
- package/.claude/hooks/ontology-validation.py +0 -255
- package/.claude/hooks/push.sh +0 -153
- package/.claude/hooks/release-cli.sh +0 -205
- package/.claude/hooks/root-cleanup.py +0 -217
- package/.claude/hooks/security-hook.sh +0 -397
- package/.claude/hooks/tag-all-docs.py +0 -464
- package/.claude/hooks/test-validate-ontology.sh +0 -170
- package/.claude/hooks/todo.py +0 -368
- package/.claude/hooks/track-changes.sh +0 -101
- package/.claude/hooks/validate-imports.py +0 -182
- package/.claude/hooks/validate-ontology-structure-summary.md +0 -243
- package/.claude/hooks/validate-ontology-structure.py +0 -558
- package/.claude/hooks/validate-ontology-structure.py.backup +0 -518
- package/.claude/hooks/validate-ontology.py +0 -140
- package/.claude/hooks/write-news.sh +0 -194
- package/.claude/skills/INDEX.md +0 -523
- package/.claude/skills/REGISTRY.md +0 -529
- package/.claude/skills/agent-backend-create-mutation.md +0 -319
- package/.claude/skills/agent-designer-create-wireframe.md +0 -341
- package/.claude/skills/agent-frontend-create-page.md +0 -413
- package/.claude/skills/agents/README.md +0 -238
- package/.claude/skills/astro/add-content-collection.md +0 -30
- package/.claude/skills/astro/check-build.md +0 -29
- package/.claude/skills/astro/create-component.md +0 -29
- package/.claude/skills/astro/create-page.md +0 -30
- package/.claude/skills/astro/optimize-performance.md +0 -21
- package/.claude/skills/convex/check-deployment.md +0 -46
- package/.claude/skills/convex/create-mutation.md +0 -405
- package/.claude/skills/convex/create-query.md +0 -52
- package/.claude/skills/convex/read-schema.md +0 -373
- package/.claude/skills/convex/test-function.md +0 -50
- package/.claude/skills/deployment/check-deployment-health.md +0 -20
- package/.claude/skills/deployment/create-release.md +0 -21
- package/.claude/skills/deployment/deploy-cloudflare.md +0 -31
- package/.claude/skills/deployment/deploy-convex.md +0 -30
- package/.claude/skills/deployment/sync-repositories.md +0 -19
- package/.claude/skills/design/check-accessibility.md +0 -21
- package/.claude/skills/design/create-component-spec.md +0 -27
- package/.claude/skills/design/generate-design-tokens.md +0 -24
- package/.claude/skills/design/generate-wireframe.md +0 -30
- package/.claude/skills/documentation/create-migration-guide.md +0 -20
- package/.claude/skills/documentation/generate-api-docs.md +0 -27
- package/.claude/skills/documentation/generate-readme.md +0 -22
- package/.claude/skills/documentation/update-knowledge.md +0 -20
- package/.claude/skills/integration/connect-external-system.md +0 -21
- package/.claude/skills/integration/implement-a2a.md +0 -20
- package/.claude/skills/integration/implement-acp.md +0 -20
- package/.claude/skills/integration/verify-integration.md +0 -20
- package/.claude/skills/ontology/README.md +0 -255
- package/.claude/skills/ontology/check-dimension.md +0 -307
- package/.claude/skills/ontology/generate-entity-type.md +0 -339
- package/.claude/skills/ontology/validate-schema.md +0 -229
- package/.claude/skills/ontology/verify-relationships.md +0 -310
- package/.claude/skills/problem-solving/analyze-test-failure.md +0 -21
- package/.claude/skills/problem-solving/identify-root-cause.md +0 -20
- package/.claude/skills/problem-solving/propose-solution.md +0 -29
- package/.claude/skills/problem-solving/verify-fix.md +0 -21
- package/.claude/skills/sales/generate-demo-script.md +0 -21
- package/.claude/skills/sales/qualify-lead.md +0 -30
- package/.claude/skills/sales/track-trial.md +0 -20
- package/.claude/skills/sales/verify-kyc.md +0 -20
- package/.claude/skills/testing/analyze-coverage.md +0 -24
- package/.claude/skills/testing/generate-tests.md +0 -24
- package/.claude/skills/testing/run-tests.md +0 -27
- package/.claude/skills/testing/validate-e2e.md +0 -25
- package/AGENTS.md +0 -60
- package/CLAUDE.md +0 -130
- package/CREATE-WEBSITE.md +0 -458
- package/SECURITY.md +0 -31
- package/folders.yaml +0 -92
- package/one/README.md +0 -760
- package/one/actors/anthony-o-connell.md +0 -469
- package/one/actors/people.md +0 -590
- package/one/events/0-changes.md +0 -2764
- package/one/events/1-PROJECTS-START-HERE.md +0 -384
- package/one/events/1-projects-developer-quickstart.md +0 -620
- package/one/events/1-projects-feature.md +0 -2047
- package/one/events/1-projects-team-briefing.md +0 -583
- package/one/events/2024-10-14-deployment-plan.md +0 -330
- package/one/events/2024-10-14-deployment-success.md +0 -447
- package/one/events/2024-10-14-final-sync-complete.md +0 -250
- package/one/events/2024-10-14-release-v2.0.6.md +0 -414
- package/one/events/2024-10-15-agent-clean-v2-summary.md +0 -495
- package/one/events/2024-10-15-handoff-to-clean.md +0 -347
- package/one/events/2024-10-15-package-manager-tests.md +0 -442
- package/one/events/2024-10-15-release-command-complete.md +0 -416
- package/one/events/2025-10-15-private-files-secured.md +0 -359
- package/one/events/2025-10-15-unignore-public-group-docs.md +0 -298
- package/one/events/2025-11-08-backend-claude-refactor.md +0 -242
- package/one/events/2025-11-08-parallel-agent-implementation.md +0 -620
- package/one/events/2025-11-10-ai-integration-status-report.md +0 -241
- package/one/events/ACCESSIBILITY_CHECKLIST.md +0 -275
- package/one/events/ACCESSIBILITY_FIXES_SUMMARY.md +0 -293
- package/one/events/ALIGNMENT_REPORT_PROBLEM_SOLVER.md +0 -335
- package/one/events/ALIGNMENT_SUMMARY.md +0 -280
- package/one/events/API_ROUTES_FIXES_SUMMARY.md +0 -280
- package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +0 -654
- package/one/events/AUDIT-ONTOLOGY-ALIGNMENT.md +0 -598
- package/one/events/AUDIT_PLAN_COMPLETION-20251108-125555.md +0 -262
- package/one/events/BEFORE_AFTER_COMPARISON.md +0 -978
- package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +0 -372
- package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +0 -430
- package/one/events/CHARTS-READY-TO-USE-20251106-080939.md +0 -184
- package/one/events/CHARTS-SUMMARY-20251106-080938.md +0 -196
- package/one/events/CLAUDE copy.md +0 -897
- package/one/events/CLEANUP-RELEASE-V2.0.8.md +0 -308
- package/one/events/CLOUDFLARE-FS-FIX-20251106-100516.md +0 -75
- package/one/events/COMPONENT_SHOWCASE-20251106-080938.md +0 -629
- package/one/events/CONNECTIONS_DEMO.md +0 -519
- package/one/events/CREATE-WEBSITE.md +0 -460
- package/one/events/CRITICAL-FIXES-COMPLETE.md +0 -571
- package/one/events/CUSTOM-DOMAIN.md +0 -375
- package/one/events/DELIVERABLES.md +0 -450
- package/one/events/DELIVERABLES.txt +0 -273
- package/one/events/DEMO-GROUPS-PAGE.md +0 -410
- package/one/events/DEMO-TESTING-SUMMARY.md +0 -536
- package/one/events/DEMO_COMPONENTS.md +0 -505
- package/one/events/DEMO_HOOKS_INDEX.md +0 -352
- package/one/events/DEMO_INFRASTRUCTURE.md +0 -923
- package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +0 -588
- package/one/events/DEMO_INTEGRATION_CHECKLIST.md +0 -449
- package/one/events/DEMO_QUICK_REFERENCE.md +0 -459
- package/one/events/DEMO_SETUP.md +0 -494
- package/one/events/DEPLOYMENT copy.md +0 -444
- package/one/events/DEPLOYMENT.md +0 -196
- package/one/events/DESIGN-DELIVERABLES-20251106-080938.md +0 -557
- package/one/events/DESIGN-EXECUTIVE-SUMMARY-20251106-080938.md +0 -484
- package/one/events/DOCS-SYSTEM-GUIDE-20251105-142103.md +0 -458
- package/one/events/DOCUMENTER-DELIVERY-SUMMARY.md +0 -481
- package/one/events/DOCUMENTER-EXECUTION-GUIDE.md +0 -394
- package/one/events/DOCUMENTER-TASK-BREAKDOWN.md +0 -783
- package/one/events/ECOMMERCE-BEFORE-AFTER.md +0 -267
- package/one/events/ECOMMERCE-DEMO-PLAN.md +0 -243
- package/one/events/ECOMMERCE-ENHANCEMENTS.md +0 -594
- package/one/events/ECOMMERCE-HIGH-CONVERTING-ELEMENTS.md +0 -439
- package/one/events/ECOMMERCE-LIVE-DEMO.md +0 -381
- package/one/events/ECOMMERCE-QUICKSTART.md +0 -376
- package/one/events/ECOMMERCE-README.md +0 -354
- package/one/events/ECOMMERCE-REFACTOR-SUMMARY.md +0 -214
- package/one/events/ECOMMERCE-SETUP-SUMMARY.md +0 -414
- package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +0 -753
- package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +0 -941
- package/one/events/EFFECT_TS_API_PATTERN.md +0 -496
- package/one/events/EXECUTION-READY.md +0 -359
- package/one/events/EXECUTION-SUMMARY.md +0 -478
- package/one/events/FEATURE-2-4-COMPLETE.md +0 -320
- package/one/events/FEATURE_2_3_COMPLETE.md +0 -593
- package/one/events/FILE-REFERENCE-20251105-142103.md +0 -325
- package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +0 -241
- package/one/events/GROUPS-MIGRATION.md +0 -643
- package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +0 -432
- package/one/events/HANDOFF.md +0 -331
- package/one/events/HOOKS-DEMO.md +0 -459
- package/one/events/IMPLEMENTATION-CHECKLIST-20251105-142103.md +0 -274
- package/one/events/IMPLEMENTATION-REPORT-DOCS-20251105-142102.md +0 -394
- package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +0 -568
- package/one/events/IMPLEMENTATION_SUMMARY-20251106-080938.md +0 -571
- package/one/events/IMPLEMENTATION_SUMMARY.md +0 -547
- package/one/events/INDEX-ALL-AGENTS.md +0 -190
- package/one/events/INDEX-FRONTEND-TESTING.md +0 -524
- package/one/events/INDEX-PROBLEM-SOLVER.md +0 -488
- package/one/events/INDEX-QUALITY-AGENT-INFER65.md +0 -455
- package/one/events/INDEX.md +0 -295
- package/one/events/INDEX_QUICK_START_REDESIGN-20251106-080939.md +0 -342
- package/one/events/INSTALL-TESTS.md +0 -311
- package/one/events/INSTALLATION_FOLDERS.md +0 -534
- package/one/events/INSTALLATION_FOLDERS_FILES.md +0 -223
- package/one/events/INSTALLATION_FOLDERS_SUMMARY.md +0 -437
- package/one/events/INTEGRATION-ARCHITECTURE.md +0 -579
- package/one/events/INTEGRATION-CHECKLIST.md +0 -1252
- package/one/events/INTEGRATION-ORCHESTRATION.md +0 -2641
- package/one/events/INTEGRATION-SUMMARY.md +0 -671
- package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +0 -684
- package/one/events/LANDING-PAGE-IMPLEMENTATION.md +0 -660
- package/one/events/LANDING-PAGE-QUICKSTART.md +0 -425
- package/one/events/LICENSE.md +0 -107
- package/one/events/MASTER-COORDINATION-PLAN.md +0 -613
- package/one/events/MASTER-ORCHESTRATION-INFER65.md +0 -441
- package/one/events/MASTER-PLAN-SUMMARY.md +0 -309
- package/one/events/MCP-CONFIGURATION.md +0 -354
- package/one/events/MCP-SETUP-COMPLETE.md +0 -223
- package/one/events/MIGRATION-REPORT.md +0 -453
- package/one/events/MIGRATION.md +0 -87
- package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +0 -1663
- package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +0 -643
- package/one/events/NEWS-COMMANDS.md +0 -506
- package/one/events/NEWS-SYSTEM-SUMMARY.md +0 -480
- package/one/events/NODE-UPGRADE.md +0 -129
- package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +0 -416
- package/one/events/ONTOLOGY-HOOKS-README.md +0 -718
- package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +0 -383
- package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +0 -569
- package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +0 -491
- package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +0 -504
- package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +0 -221
- package/one/events/PACKAGE-STRUCTURE.md +0 -328
- package/one/events/PLAN-COMPLETE.md +0 -429
- package/one/events/PLAYBOOK-SETUP-SUMMARY.md +0 -349
- package/one/events/PROBLEM-SOLVER-EXECUTIVE-SUMMARY.md +0 -484
- package/one/events/PROBLEM-SOLVER-QUICKSTART.md +0 -420
- package/one/events/PROJECTS-PLAN-SUMMARY.md +0 -480
- package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +0 -585
- package/one/events/QA-CHECKLIST.md +0 -692
- package/one/events/QUALITY-AGENT-SUMMARY.md +0 -334
- package/one/events/QUALITY-EXECUTION-CHECKLIST.md +0 -593
- package/one/events/QUICK-REFERENCE-FRONTEND-TESTING.md +0 -475
- package/one/events/QUICK-START-ONTOLOGY.md +0 -426
- package/one/events/QUICK_START_REDESIGN-20251106-080938.md +0 -400
- package/one/events/README-PROBLEM-SOLVER.md +0 -394
- package/one/events/README-archived.md +0 -537
- package/one/events/README_QUICK_START_REDESIGN-20251106-080938.md +0 -484
- package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +0 -657
- package/one/events/SEARCH_DEMO_DELIVERY.md +0 -433
- package/one/events/SEARCH_DEMO_SUMMARY.md +0 -321
- package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +0 -399
- package/one/events/SECURITY-AUDIT-FIXES.md +0 -394
- package/one/events/SECURITY-SCAN-COMPLETE.md +0 -299
- package/one/events/SHOP-BUILD-STATUS.md +0 -132
- package/one/events/SHOP-PREMIUM-UPDATE.md +0 -165
- package/one/events/SIMPLE_FIX_FRONTEND_ONLY.md +0 -280
- package/one/events/SITE-WIDE-GRADIENT-FIX.md +0 -317
- package/one/events/SPECIALIST-QUICK-REFERENCE.md +0 -678
- package/one/events/STORE-PRODUCTION-READY-STATUS.md +0 -377
- package/one/events/STRIPE-INTEGRATION.md +0 -432
- package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +0 -447
- package/one/events/STRIPE-SETUP-GUIDE.md +0 -480
- package/one/events/TEST-PLAN-INDEX.md +0 -364
- package/one/events/TEST-PLAN.md +0 -1435
- package/one/events/TEST-SUMMARY.md +0 -411
- package/one/events/TESTING-DELIVERY.txt +0 -372
- package/one/events/TESTS-QUICK-REF.md +0 -280
- package/one/events/TRANSITIONS-QUICK-START.md +0 -159
- package/one/events/TRANSPARENCY-FIXES.md +0 -293
- package/one/events/TYPESCRIPT_FIXES.md +0 -170
- package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +0 -412
- package/one/events/TYPESCRIPT_FIXES_INDEX.md +0 -359
- package/one/events/VERIFICATION_CHECKLIST-20251106-080938.md +0 -326
- package/one/events/VIEW-TRANSITIONS.md +0 -446
- package/one/events/agent-command-implementation.md +0 -305
- package/one/events/agent-director-enhancement-summary.md +0 -404
- package/one/events/agent-director-routing-update.md +0 -214
- package/one/events/agent-onboard-implementation-summary.md +0 -475
- package/one/events/agent-ontology-alignment-completion.md +0 -263
- package/one/events/ai-integration-complete.md +0 -294
- package/one/events/ai-integration-lessons-learned.md +0 -511
- package/one/events/backend-integration-tests.md +0 -624
- package/one/events/backend-structure-diagram.txt +0 -393
- package/one/events/backend-structure-summary.txt +0 -269
- package/one/events/bullfm-video-podcast-analysis.md +0 -319
- package/one/events/clean-agent-ontology-cleanup-report.md +0 -371
- package/one/events/clean-agent-todo-analysis-summary.md +0 -336
- package/one/events/cloudflare-automation-complete.md +0 -350
- package/one/events/cloudflare-pages-infrastructure-setup.md +0 -282
- package/one/events/contact-page-complete.md +0 -316
- package/one/events/convex-analysis-index.md +0 -322
- package/one/events/convex-structure-analysis.md +0 -718
- package/one/events/creation-instructions-9-todos.md +0 -906
- package/one/events/cycle-3-video-player-port-20251108.md +0 -368
- package/one/events/cycle-3-video-player-port-complete-20251108.md +0 -334
- package/one/events/deployment-installation-folders.md +0 -178
- package/one/events/deployment-ops-summary.md +0 -386
- package/one/events/deployment-verification.md +0 -366
- package/one/events/design-spec-complete.md +0 -226
- package/one/events/documentation-audit-index.md +0 -473
- package/one/events/documentation-audit-summary.md +0 -417
- package/one/events/documentation-improvement-roadmap.md +0 -906
- package/one/events/documentation-standards-compliance-report.md +0 -538
- package/one/events/documentation-updates.md +0 -370
- package/one/events/events.md +0 -563
- package/one/events/fix-product-hydration-20251106.md +0 -211
- package/one/events/frontend-effects-complete.md +0 -584
- package/one/events/frontend-effects-orchestration.md +0 -1356
- package/one/events/frontend-effects-risk-register.md +0 -1055
- package/one/events/frontend-effects-week1-assignments.md +0 -1594
- package/one/events/hook-ontology-alignment-summary.md +0 -528
- package/one/events/installation-folders-workflow-integration.md +0 -458
- package/one/events/landing-page-generator.md +0 -476
- package/one/events/legal-assessment-2025-10-16.md +0 -1917
- package/one/events/master-coordination-plan.json +0 -1078
- package/one/events/master-plan-9-todos.md +0 -900
- package/one/events/mobile-performance-optimization.md +0 -179
- package/one/events/onboarding-implementation-complete.md +0 -523
- package/one/events/ontology-audit-agent-clone.md +0 -323
- package/one/events/ontology-test-examples.md +0 -580
- package/one/events/phase1-backend-implementation-complete.md +0 -536
- package/one/events/plan-completion-audit.md +0 -707
- package/one/events/plan-files-updated.md +0 -273
- package/one/events/production-readiness-plan.md +0 -389
- package/one/events/readme.md +0 -100
- package/one/events/release.md +0 -272
- package/one/events/root-cleanup-alignment-report.md +0 -265
- package/one/events/security-fixes-2025-01-15.md +0 -226
- package/one/events/separate-implementation-status.md +0 -555
- package/one/events/server-command-optimization-20251108.md +0 -150
- package/one/events/session-summary-2025-10-18.md +0 -366
- package/one/events/skills-complete.md +0 -351
- package/one/events/skills-infer-6-10-summary.md +0 -70
- package/one/events/skills-phase1-complete.md +0 -281
- package/one/events/specialist-assignments.md +0 -766
- package/one/events/structural-analysis-architecture-vs-plans.md +0 -600
- package/one/events/test-dashboard.md +0 -363
- package/one/events/test-index.md +0 -421
- package/one/events/test-report-ontology.md +0 -611
- package/one/events/testing-summary.md +0 -388
- package/one/events/todo-agent-builder.md +0 -1180
- package/one/events/todo-agent-director.md +0 -164
- package/one/events/todo-agent-documenter.md +0 -1815
- package/one/events/todo-agent-frontend.md +0 -1542
- package/one/events/todo-agent-problem-solver.md +0 -1682
- package/one/events/todo-agent-quality.md +0 -1647
- package/one/events/todo-refactoring-complete.md +0 -408
- package/one/events/wave1-backend-implementation-complete.md +0 -698
- package/one/events/web-AI_INTEGRATION_PHASE2_SUMMARY-20251111-152540.md +0 -529
- package/one/events/web-BUY-IN-CHATGPT-README-20251116-235241.md +0 -491
- package/one/events/web-CHARTS-IMPLEMENTATION-20251106-080939.md +0 -576
- package/one/events/web-CHARTS-QUICKSTART-20251106-080939.md +0 -416
- package/one/events/web-CODE-HIGHLIGHTING-SUMMARY-20251111-152540.md +0 -442
- package/one/events/web-DEPLOYMENT_SUMMARY-20251116-005428.md +0 -290
- package/one/events/web-DESIGN-SUMMARY-20251106-080939.md +0 -514
- package/one/events/web-README-AI-INTEGRATION-20251111-152540.md +0 -196
- package/one/events/web-RECHARTS-INTEGRATION-20251111-152540.md +0 -265
- package/one/events/web-RELEASE_OPTIMIZATION_PLAN-20251116-005428.md +0 -447
- package/one/events/web-TEST-CLEANUP-20251105-143205.md +0 -3
- package/one/events/web-USING-ANY-COMPONENT-IN-CHAT-20251111-152540.md +0 -561
- package/one/events/web-test-code-highlighting-20251111-152540.md +0 -231
- package/one/groups/features.md +0 -2904
- package/one/groups/groups.md +0 -587
- package/one/groups/one.md +0 -619
- package/one/groups/strategy-copy.md +0 -887
- package/one/learning/.obsidian/app.json +0 -1
- package/one/learning/.obsidian/appearance.json +0 -1
- package/one/learning/.obsidian/core-plugins.json +0 -33
- package/one/learning/.obsidian/ecommerce-ontology.md +0 -210
- package/one/learning/.obsidian/workspace.json +0 -211
- package/one/learning/100-inference-quick-reference.md +0 -449
- package/one/learning/ag-ui-protocol.md +0 -613
- package/one/learning/agent-onboard-usage.md +0 -630
- package/one/learning/agentic-commerce.md +0 -146
- package/one/learning/ai-agents-vs-memecoins-thesis.md +0 -683
- package/one/learning/ai-api-reference.md +0 -715
- package/one/learning/ai-platform.md +0 -323
- package/one/learning/ai-quickstart.md +0 -355
- package/one/learning/ai-sdk-implementation.md +0 -436
- package/one/learning/ai-token-crypto-analysis-framework.md +0 -1191
- package/one/learning/ai-token-paradigm-shift-2025.md +0 -732
- package/one/learning/altcoin-cycle-prediction-ontology.md +0 -884
- package/one/learning/altcoin-cycle-trading-strategy.md +0 -642
- package/one/learning/architecture-any-backend.md +0 -1589
- package/one/learning/architecture-diagram.md +0 -404
- package/one/learning/architecture-frontend.md +0 -1014
- package/one/learning/architecture.md +0 -1742
- package/one/learning/archived/ontology.old.md +0 -2840
- package/one/learning/astro-effect-complete-vision.md +0 -2148
- package/one/learning/astro-effect-simple-architecture.md +0 -750
- package/one/learning/audit-agent-onboard-alignment.md +0 -481
- package/one/learning/audit-agent-sales-alignment.md +0 -444
- package/one/learning/backend-api-reference.md +0 -728
- package/one/learning/cascading-context-specification.md +0 -1617
- package/one/learning/claude-code-integration.md +0 -1293
- package/one/learning/cli-claude-handoff.md +0 -736
- package/one/learning/context-engineering.md +0 -610
- package/one/learning/crypto-analysis-strategy.md +0 -1276
- package/one/learning/crypto-cycle-2024-2025-analysis.md +0 -44
- package/one/learning/crypto.md +0 -978
- package/one/learning/develop/design.md +0 -364
- package/one/learning/develop/index.md +0 -145
- package/one/learning/development-commands.md +0 -251
- package/one/learning/docs.md +0 -627
- package/one/learning/dsl.md +0 -1678
- package/one/learning/event-driven-documentation.md +0 -270
- package/one/learning/files.md +0 -2489
- package/one/learning/frontend.md +0 -1056
- package/one/learning/games-english.md +0 -691
- package/one/learning/games.md +0 -1082
- package/one/learning/generative-ui-patterns.md +0 -559
- package/one/learning/guidelines.md +0 -314
- package/one/learning/hono.md +0 -2127
- package/one/learning/implementation-examples.md +0 -2554
- package/one/learning/installation-folders.md +0 -366
- package/one/learning/institutional-cycle-paradigm-2025.md +0 -555
- package/one/learning/knowledge.md +0 -660
- package/one/learning/language.md +0 -998
- package/one/learning/lessons-learned.md +0 -378
- package/one/learning/lessons-website-building-focus.md +0 -382
- package/one/learning/merge-report.md +0 -254
- package/one/learning/metadata-system.md +0 -504
- package/one/learning/nine-padel-playbook.md +0 -229
- package/one/learning/one-protocol-ai-agents.md +0 -892
- package/one/learning/one-protocol-executive-report.md +0 -617
- package/one/learning/one-protocol-standard.md +0 -869
- package/one/learning/one-protocol-whitepaper.md +0 -756
- package/one/learning/ontology-blog.yaml +0 -47
- package/one/learning/ontology-cheatsheet.md +0 -617
- package/one/learning/ontology-community.yaml +0 -65
- package/one/learning/ontology-core-universal.md +0 -740
- package/one/learning/ontology-core.yaml +0 -63
- package/one/learning/ontology-courses.yaml +0 -76
- package/one/learning/ontology-creator.md +0 -402
- package/one/learning/ontology-crypto.md +0 -1603
- package/one/learning/ontology-developer-guide.md +0 -814
- package/one/learning/ontology-documentation.md +0 -377
- package/one/learning/ontology-ecommerce.md +0 -269
- package/one/learning/ontology-education-game.md +0 -1654
- package/one/learning/ontology-education.md +0 -938
- package/one/learning/ontology-engineering-specification.md +0 -1310
- package/one/learning/ontology-engineering.md +0 -1676
- package/one/learning/ontology-files.yaml +0 -525
- package/one/learning/ontology-frontend-master.md +0 -2898
- package/one/learning/ontology-frontend-specifications.md +0 -2196
- package/one/learning/ontology-frontend.md +0 -2475
- package/one/learning/ontology-index.md +0 -397
- package/one/learning/ontology-minimal.yaml +0 -301
- package/one/learning/ontology-portfolio.yaml +0 -45
- package/one/learning/ontology-quickstart.md +0 -602
- package/one/learning/ontology-release.md +0 -317
- package/one/learning/ontology-shop.yaml +0 -148
- package/one/learning/ontology-tokens.yaml +0 -51
- package/one/learning/ontology-tutorial.md +0 -455
- package/one/learning/ontology-v2.md +0 -4449
- package/one/learning/ontology-video-script.md +0 -939
- package/one/learning/ontology-visual-guide.md +0 -378
- package/one/learning/ontology.md +0 -3847
- package/one/learning/ontology.yaml +0 -1653
- package/one/learning/parallel-agents.md +0 -932
- package/one/learning/patterns/backend/convex-mutation-pattern.md +0 -130
- package/one/learning/patterns/backend/convex-query-pattern.md +0 -143
- package/one/learning/patterns/backend/mutation-template.md +0 -249
- package/one/learning/patterns/backend/query-template.md +0 -286
- package/one/learning/patterns/backend/service-template.md +0 -258
- package/one/learning/patterns/design/component-architecture.md +0 -435
- package/one/learning/patterns/design/index.md +0 -160
- package/one/learning/patterns/design/test-driven-design-pattern.md +0 -196
- package/one/learning/patterns/design/wireframe-template.md +0 -250
- package/one/learning/patterns/frontend/component-template.md +0 -246
- package/one/learning/patterns/frontend/form-template.md +0 -348
- package/one/learning/patterns/frontend/page-template.md +0 -209
- package/one/learning/patterns/frontend/react-component-pattern.md +0 -188
- package/one/learning/patterns/test/acceptance-criteria-template.md +0 -396
- package/one/learning/patterns/test/technical-test-template.md +0 -566
- package/one/learning/patterns/test/test-driven-pattern.md +0 -160
- package/one/learning/patterns/test/user-flow-template.md +0 -272
- package/one/learning/performance.md +0 -459
- package/one/learning/provider-agnostic-content.md +0 -995
- package/one/learning/provider-creation-guide.md +0 -1082
- package/one/learning/quality-loop.md +0 -419
- package/one/learning/quick-start-ontology-mapping.md +0 -773
- package/one/learning/readme-architecture.md +0 -158
- package/one/learning/readme.md +0 -149
- package/one/learning/rules.md +0 -644
- package/one/learning/score.md +0 -85
- package/one/learning/specifications.md +0 -873
- package/one/learning/tags.md +0 -148
- package/one/learning/todo-template.md +0 -269
- package/one/learning/todo.md +0 -269
- package/one/learning/troubleshooting.md +0 -434
- package/one/learning/typescript-patterns.md +0 -321
- package/one/learning/universal-generation-language.md +0 -827
- package/one/learning/x402-research.md +0 -104
- package/one/license.md +0 -107
- package/one/paths/a2a.md +0 -600
- package/one/paths/acp.md +0 -808
- package/one/paths/acps.md +0 -749
- package/one/paths/agentkit.md +0 -367
- package/one/paths/agui.md +0 -785
- package/one/paths/any-backend.md +0 -1720
- package/one/paths/ap2.md +0 -1072
- package/one/paths/api/queries-reference.md +0 -860
- package/one/paths/api-docs.md +0 -1909
- package/one/paths/api-reference.md +0 -1029
- package/one/paths/api.md +0 -2208
- package/one/paths/architecture-diagram.md +0 -112
- package/one/paths/communications.md +0 -467
- package/one/paths/connections.md +0 -357
- package/one/paths/copilotkit.md +0 -1577
- package/one/paths/cryptonetworks.md +0 -799
- package/one/paths/documentation.md +0 -1138
- package/one/paths/effect.md +0 -297
- package/one/paths/elizaos.md +0 -1308
- package/one/paths/groups.md +0 -814
- package/one/paths/inference.md +0 -76
- package/one/paths/integration-examples.md +0 -893
- package/one/paths/integration-guide.md +0 -887
- package/one/paths/integration-phase2.md +0 -754
- package/one/paths/kyc.md +0 -650
- package/one/paths/mcp.md +0 -860
- package/one/paths/membership.md +0 -1170
- package/one/paths/middleware.md +0 -1085
- package/one/paths/multitenant.md +0 -1359
- package/one/paths/n8n.md +0 -1033
- package/one/paths/patterns.md +0 -107
- package/one/paths/protocols.md +0 -297
- package/one/paths/relationships.md +0 -125
- package/one/paths/schema.md +0 -605
- package/one/paths/service-layer.md +0 -568
- package/one/paths/vectors.md +0 -225
- package/one/paths/wordpress.md +0 -1320
- package/one/paths/workflow-copy.md +0 -923
- package/one/paths/workflow-examples.md +0 -759
- package/one/paths/workflow-onboarding.md +0 -701
- package/one/paths/workflow.md +0 -923
- package/one/paths/workflows/delegation.md +0 -903
- package/one/paths/workflows/frontend.md +0 -1055
- package/one/paths/workflows/strategy.md +0 -921
- package/one/paths/workflows/tasks.md +0 -716
- package/one/paths/x402-baazar.md +0 -131
- package/one/paths/x402.md +0 -1353
- package/one/things/ALIGNMENT_AUDIT_QUALITY_AGENT.md +0 -401
- package/one/things/AUDIT_AGENT_INTEGRATOR_ALIGNMENT.md +0 -588
- package/one/things/AUDIT_REPORT_AGENT_CLEAN.md +0 -461
- package/one/things/CHECKLIST.md +0 -407
- package/one/things/IMPLEMENTATION_STATUS.md +0 -379
- package/one/things/ONE.md +0 -529
- package/one/things/agents/agent-backend.md +0 -1501
- package/one/things/agents/agent-builder.md +0 -1064
- package/one/things/agents/agent-clean.md +0 -1112
- package/one/things/agents/agent-clone.md +0 -1324
- package/one/things/agents/agent-deploy.md +0 -986
- package/one/things/agents/agent-designer.md +0 -2305
- package/one/things/agents/agent-director.md +0 -1526
- package/one/things/agents/agent-documenter.md +0 -1129
- package/one/things/agents/agent-frontend.md +0 -1201
- package/one/things/agents/agent-integrator.md +0 -1269
- package/one/things/agents/agent-lawyer.md +0 -1371
- package/one/things/agents/agent-problem-solver.md +0 -1457
- package/one/things/agents/agent-quality.md +0 -1483
- package/one/things/agents/agent-sales.md +0 -1074
- package/one/things/cascade/cascade.yaml +0 -481
- package/one/things/cascade/docs/examples/1-1-agent-prompts/design.md +0 -523
- package/one/things/cascade/docs/examples/1-1-agent-prompts/tests.md +0 -314
- package/one/things/cascade/docs/examples/1-1-agent-prompts.md +0 -562
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/design.md +0 -543
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator/tests.md +0 -272
- package/one/things/cascade/docs/examples/1-2-yaml-orchestrator.md +0 -548
- package/one/things/cascade/docs/examples/1-3-event-coordination/design.md +0 -586
- package/one/things/cascade/docs/examples/1-3-event-coordination/tests.md +0 -267
- package/one/things/cascade/docs/examples/1-3-event-coordination.md +0 -547
- package/one/things/cascade/docs/examples/1-4-knowledge-management/design.md +0 -665
- package/one/things/cascade/docs/examples/1-4-knowledge-management/tests.md +0 -236
- package/one/things/cascade/docs/examples/1-4-knowledge-management.md +0 -652
- package/one/things/cascade/docs/examples/1-5-quality-loops/design.md +0 -860
- package/one/things/cascade/docs/examples/1-5-quality-loops/tests.md +0 -255
- package/one/things/cascade/docs/examples/1-5-quality-loops.md +0 -725
- package/one/things/cascade/docs/examples/1-6-numbering-structure/design.md +0 -659
- package/one/things/cascade/docs/examples/1-6-numbering-structure/tests.md +0 -256
- package/one/things/cascade/docs/examples/1-6-numbering-structure.md +0 -639
- package/one/things/cascade/docs/examples/readme.md +0 -259
- package/one/things/cascade/docs/getting-started.md +0 -533
- package/one/things/cascade/docs/workflow.md +0 -1378
- package/one/things/cascade/readme.md +0 -379
- package/one/things/cascade/templates/feature-template.md +0 -289
- package/one/things/claude/agents/advocacy-activation-manager.md +0 -710
- package/one/things/claude/agents/advocacy-campaign-designer.md +0 -688
- package/one/things/claude/agents/analyst.md +0 -508
- package/one/things/claude/agents/architect.md +0 -505
- package/one/things/claude/agents/brand-identity-specialist.md +0 -538
- package/one/things/claude/agents/bstp-token-strategist.md +0 -690
- package/one/things/claude/agents/builder-repo.md +0 -532
- package/one/things/claude/agents/bullstamp-community-builder.md +0 -597
- package/one/things/claude/agents/bullstamp-marketing-orchestrator.md +0 -529
- package/one/things/claude/agents/bulltilt-platform-growth.md +0 -590
- package/one/things/claude/agents/company-bullstamp-character.md +0 -602
- package/one/things/claude/agents/company-bullstamp-community.md +0 -307
- package/one/things/claude/agents/company-bullstamp-marketing.md +0 -307
- package/one/things/claude/agents/company-bullstamp-token.md +0 -307
- package/one/things/claude/agents/company-bulltilt-growth.md +0 -307
- package/one/things/claude/agents/content-bibliography-formatter.md +0 -404
- package/one/things/claude/agents/content-calendar-planner.md +0 -473
- package/one/things/claude/agents/content-chapter-formatter.md +0 -513
- package/one/things/claude/agents/content-formatter.md +0 -571
- package/one/things/claude/agents/content-hook-specialist.md +0 -485
- package/one/things/claude/agents/content-image-formatter.md +0 -560
- package/one/things/claude/agents/content-introduction-formatter.md +0 -510
- package/one/things/claude/agents/content-multiplication-engine.md +0 -579
- package/one/things/claude/agents/content-playbook-writer.md +0 -473
- package/one/things/claude/agents/content-team-manager.md +0 -647
- package/one/things/claude/agents/content-toc-formatter.md +0 -547
- package/one/things/claude/agents/convex-backend-specialist.md +0 -2725
- package/one/things/claude/agents/core-manager.md +0 -607
- package/one/things/claude/agents/core-master.md +0 -426
- package/one/things/claude/agents/cross-functional-manager.md +0 -476
- package/one/things/claude/agents/crypto-airdrop-strategist.md +0 -622
- package/one/things/claude/agents/crypto-analytics-educator.md +0 -596
- package/one/things/claude/agents/crypto-architecture-specialist.md +0 -497
- package/one/things/claude/agents/crypto-community-analyst.md +0 -314
- package/one/things/claude/agents/crypto-community-psychologist.md +0 -546
- package/one/things/claude/agents/crypto-dex-optimization-expert.md +0 -579
- package/one/things/claude/agents/crypto-dex-optimizer.md +0 -307
- package/one/things/claude/agents/crypto-diamond-formation-specialist.md +0 -552
- package/one/things/claude/agents/crypto-diamond-hands.md +0 -307
- package/one/things/claude/agents/crypto-ecosystem-expansion-manager.md +0 -597
- package/one/things/claude/agents/crypto-engagement-specialist.md +0 -581
- package/one/things/claude/agents/crypto-market-researcher.md +0 -307
- package/one/things/claude/agents/crypto-marketing-orchestrator.md +0 -563
- package/one/things/claude/agents/crypto-network-effect-amplifier.md +0 -614
- package/one/things/claude/agents/crypto-optimization-analyst.md +0 -597
- package/one/things/claude/agents/crypto-strategic-synthesizer.md +0 -556
- package/one/things/claude/agents/crypto-team-manager.md +0 -392
- package/one/things/claude/agents/crypto-token-analyst.md +0 -319
- package/one/things/claude/agents/crypto-viral-content-creator.md +0 -549
- package/one/things/claude/agents/crypto-wallet-identification-expert.md +0 -527
- package/one/things/claude/agents/crypto-wallet-identifier.md +0 -307
- package/one/things/claude/agents/customer-journey-designer.md +0 -474
- package/one/things/claude/agents/customer-success-manager.md +0 -574
- package/one/things/claude/agents/dev.md +0 -406
- package/one/things/claude/agents/documenter.md +0 -548
- package/one/things/claude/agents/elevate-marketing-orchestrator.md +0 -403
- package/one/things/claude/agents/engagement-specialist.md +0 -502
- package/one/things/claude/agents/engineering-architect.md +0 -387
- package/one/things/claude/agents/engineering-business-analyst.md +0 -527
- package/one/things/claude/agents/engineering-developer.md +0 -386
- package/one/things/claude/agents/engineering-director.md +0 -322
- package/one/things/claude/agents/engineering-ingestor.md +0 -659
- package/one/things/claude/agents/engineering-product-manager.md +0 -525
- package/one/things/claude/agents/engineering-product-owner.md +0 -527
- package/one/things/claude/agents/engineering-project-coordinator.md +0 -525
- package/one/things/claude/agents/engineering-quality-assurance.md +0 -392
- package/one/things/claude/agents/engineering-team-manager.md +0 -515
- package/one/things/claude/agents/engineering-user-experience.md +0 -386
- package/one/things/claude/agents/framework-elevate-manager.md +0 -309
- package/one/things/claude/agents/improver.md +0 -805
- package/one/things/claude/agents/intelligence-team-manager.md +0 -390
- package/one/things/claude/agents/lead-capture-expert.md +0 -459
- package/one/things/claude/agents/lead-magnet-creator.md +0 -446
- package/one/things/claude/agents/market-research-analyst.md +0 -435
- package/one/things/claude/agents/marketing-brand-identity.md +0 -344
- package/one/things/claude/agents/marketing-content-hooks.md +0 -455
- package/one/things/claude/agents/marketing-content-multiplier.md +0 -331
- package/one/things/claude/agents/marketing-content-poster.md +0 -372
- package/one/things/claude/agents/marketing-customer-journey.md +0 -331
- package/one/things/claude/agents/marketing-director.md +0 -402
- package/one/things/claude/agents/marketing-engagement.md +0 -331
- package/one/things/claude/agents/marketing-lead-capture.md +0 -331
- package/one/things/claude/agents/marketing-lead-magnet.md +0 -331
- package/one/things/claude/agents/marketing-network-effects.md +0 -331
- package/one/things/claude/agents/marketing-nurture-campaigns.md +0 -331
- package/one/things/claude/agents/marketing-share-optimizer.md +0 -331
- package/one/things/claude/agents/marketing-team-manager.md +0 -451
- package/one/things/claude/agents/marketing-viral-growth.md +0 -232
- package/one/things/claude/agents/mission-commander.md +0 -378
- package/one/things/claude/agents/network-effect-analyst.md +0 -604
- package/one/things/claude/agents/nextjs-15-specialist.md +0 -1634
- package/one/things/claude/agents/npx.md +0 -946
- package/one/things/claude/agents/nurture-campaign-manager.md +0 -554
- package/one/things/claude/agents/one-master.md +0 -378
- package/one/things/claude/agents/one-orchestrator.md +0 -345
- package/one/things/claude/agents/one.md +0 -658
- package/one/things/claude/agents/playbook-generator.md +0 -526
- package/one/things/claude/agents/pm.md +0 -349
- package/one/things/claude/agents/po.md +0 -370
- package/one/things/claude/agents/qa.md +0 -361
- package/one/things/claude/agents/research-foundation-analyst.md +0 -324
- package/one/things/claude/agents/research-intelligence-gatherer.md +0 -435
- package/one/things/claude/agents/research-market-analyst.md +0 -324
- package/one/things/claude/agents/research-team-manager.md +0 -489
- package/one/things/claude/agents/sales-environment-optimizer.md +0 -519
- package/one/things/claude/agents/sales-team-manager.md +0 -407
- package/one/things/claude/agents/sales-upsell-strategist.md +0 -324
- package/one/things/claude/agents/service-advocacy-campaigns.md +0 -324
- package/one/things/claude/agents/service-advocacy-manager.md +0 -324
- package/one/things/claude/agents/service-success-manager.md +0 -324
- package/one/things/claude/agents/service-team-manager.md +0 -405
- package/one/things/claude/agents/shadcn-ui-design-system-specialist.md +0 -2357
- package/one/things/claude/agents/share-optimization-specialist.md +0 -576
- package/one/things/claude/agents/sm.md +0 -352
- package/one/things/claude/agents/story-teller.md +0 -498
- package/one/things/claude/agents/task-master.md +0 -621
- package/one/things/claude/agents/tauri-cross-platform-specialist.md +0 -1912
- package/one/things/claude/agents/tester.md +0 -595
- package/one/things/claude/agents/the-bull-character-manager.md +0 -603
- package/one/things/claude/agents/tools-playbook-generator.md +0 -492
- package/one/things/claude/agents/turbo-repo-builder.md +0 -346
- package/one/things/claude/agents/upsell-strategist.md +0 -503
- package/one/things/claude/agents/ux-expert.md +0 -360
- package/one/things/claude/agents/viral-growth-orchestrator.md +0 -520
- package/one/things/claude/claude-code-hooks-development.json +0 -21
- package/one/things/claude/claude-code-hooks-production.json +0 -21
- package/one/things/claude/claude-code-hooks.json +0 -25
- package/one/things/claude/commands/agent.md +0 -124
- package/one/things/claude/commands/cascade-status.md +0 -153
- package/one/things/claude/commands/ingest.md +0 -343
- package/one/things/claude/commands/ingestor.md +0 -158
- package/one/things/claude/commands/mission.md +0 -103
- package/one/things/claude/commands/npx.md +0 -156
- package/one/things/claude/commands/one.md +0 -486
- package/one/things/claude/commands/quality-check.md +0 -252
- package/one/things/claude/commands/smart-route.md +0 -261
- package/one/things/claude/commands/start.md +0 -139
- package/one/things/claude/commands/story.md +0 -103
- package/one/things/claude/commands/task.md +0 -193
- package/one/things/claude/hook-bypass.json +0 -32
- package/one/things/claude/hooks/agent-hook-config.json +0 -427
- package/one/things/claude/hooks/build-hook.sh +0 -156
- package/one/things/claude/hooks/cleanup-hook.sh +0 -201
- package/one/things/claude/hooks/file-organization-hook.sh +0 -80
- package/one/things/claude/hooks/format-hook.sh +0 -43
- package/one/things/claude/hooks/hook-bypass.sh +0 -293
- package/one/things/claude/hooks/hook-debouncer.sh +0 -62
- package/one/things/claude/hooks/hook-logger.sh +0 -89
- package/one/things/claude/hooks/lint-hook.sh +0 -140
- package/one/things/claude/hooks/notification-hook.sh +0 -204
- package/one/things/claude/hooks/ontology-validation-hook.sh +0 -86
- package/one/things/claude/hooks/performance-metrics.json +0 -25
- package/one/things/claude/hooks/security-hook.sh +0 -256
- package/one/things/claude/hooks/story-validation-hook-enhanced.sh +0 -210
- package/one/things/claude/hooks/story-validation-hook.sh +0 -145
- package/one/things/claude/hooks/test-hook.sh +0 -145
- package/one/things/claude/hooks/test-story-validation.sh +0 -170
- package/one/things/claude/settings-local.json +0 -86
- package/one/things/cli/cli-code.md +0 -677
- package/one/things/cli/cli-compiler-code.md +0 -677
- package/one/things/cli/cli.md +0 -871
- package/one/things/components/card-shadcn.md +0 -953
- package/one/things/components/card.md +0 -1041
- package/one/things/components.md +0 -1743
- package/one/things/componets.md +0 -19
- package/one/things/contracts/Move.toml +0 -12
- package/one/things/contracts/README.md +0 -288
- package/one/things/contracts/one.move +0 -762
- package/one/things/contracts/sdk.ts +0 -579
- package/one/things/creator-diagram.md +0 -184
- package/one/things/crypto/FEATURES.md +0 -78
- package/one/things/crypto/ONECORE.md +0 -62
- package/one/things/crypto/ONECOREFAQ.md +0 -22
- package/one/things/crypto/ONECOREHOW.md +0 -46
- package/one/things/crypto/ONEENTERPRISE.md +0 -64
- package/one/things/crypto/ONEENTERPRISEFAQ.md +0 -64
- package/one/things/crypto/ONEENTERPRISEHOW.md +0 -53
- package/one/things/crypto/ONEPRO.md +0 -60
- package/one/things/crypto/ONEPROFAQ.md +0 -22
- package/one/things/crypto/ONEPROHOW.md +0 -53
- package/one/things/crypto/READMEAGENCY.md +0 -64
- package/one/things/crypto/VSL.md +0 -45
- package/one/things/crypto/WebsiteCopy.md +0 -176
- package/one/things/demo-accessibility-animations.md +0 -1025
- package/one/things/demo-components.md +0 -1310
- package/one/things/demo-design-summary.md +0 -692
- package/one/things/demo-design-system.md +0 -973
- package/one/things/demo-page-layouts.md +0 -1016
- package/one/things/design-system.md +0 -832
- package/one/things/designs/accessibility-audit.md +0 -877
- package/one/things/designs/component-specifications.md +0 -855
- package/one/things/designs/design-overview.md +0 -377
- package/one/things/designs/design-tokens.md +0 -448
- package/one/things/designs/wireframes-dashboard.md +0 -710
- package/one/things/docs/api-requests.md +0 -987
- package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +0 -485
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +0 -465
- package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +0 -425
- package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +0 -451
- package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +0 -536
- package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +0 -650
- package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +0 -473
- package/one/things/docs/ecommerce/QUICK-START.md +0 -405
- package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +0 -567
- package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +0 -271
- package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +0 -171
- package/one/things/docs/ecommerce/demo.astro +0 -309
- package/one/things/examples/children/lemonade-stand.md +0 -404
- package/one/things/examples/enterprise/crm-saas.md +0 -1444
- package/one/things/features/1-1-agent-prompts.md +0 -562
- package/one/things/features/1-2-yaml-orchestrator.md +0 -548
- package/one/things/features/1-3-event-coordination.md +0 -547
- package/one/things/features/1-4-knowledge-management.md +0 -652
- package/one/things/features/1-5-quality-loops.md +0 -725
- package/one/things/features/1-6-numbering-structure.md +0 -639
- package/one/things/features/2-1-dataprovider-interface.md +0 -2583
- package/one/things/features/2-2-config-system.md +0 -3242
- package/one/things/features/2-3-effectts-services.md +0 -1645
- package/one/things/features/2-4-react-hooks.md +0 -2136
- package/one/things/features/2-5-auth-migration.md +0 -2144
- package/one/things/features/2-6-dashboard-migration.md +0 -2084
- package/one/things/features/2-7-alternative-providers.md +0 -2578
- package/one/things/features/2-7-implementation-report.md +0 -724
- package/one/things/features/2-cli.md +0 -1720
- package/one/things/features/2-design.md +0 -1770
- package/one/things/features/2-tests.md +0 -576
- package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +0 -576
- package/one/things/features/DECOUPLING.md +0 -290
- package/one/things/features/DEPLOYMENT.md +0 -470
- package/one/things/features/IMPLEMENTATION_SUMMARY.md +0 -362
- package/one/things/features/improve.md +0 -861
- package/one/things/features/remove-convex-deps.md +0 -63
- package/one/things/features/top-features.md +0 -87
- package/one/things/features/use-one-backend.md +0 -1217
- package/one/things/features-in-english.md +0 -200
- package/one/things/files.yaml +0 -721
- package/one/things/ideas/1-create-workflow.md +0 -207
- package/one/things/ideas/2-backend-agnostic-frontend.md +0 -439
- package/one/things/implementation/backend-guide.md +0 -457
- package/one/things/interface.md +0 -257
- package/one/things/landing-page-implementation.md +0 -455
- package/one/things/legal/README.md +0 -234
- package/one/things/legal/privacy-policy.md +0 -1227
- package/one/things/legal/terms-of-service.md +0 -1432
- package/one/things/master-workflow-plan.md +0 -806
- package/one/things/pay.one.ie.md +0 -53
- package/one/things/plans/0-in-sync.md +0 -136
- package/one/things/plans/0-timeline.md +0 -36
- package/one/things/plans/1-create-workflow.md +0 -732
- package/one/things/plans/QUICK-START-SIMPLIFICATION.md +0 -333
- package/one/things/plans/README-SIMPLIFICATION.md +0 -349
- package/one/things/plans/SIMPLIFICATION-EXAMPLES.md +0 -16
- package/one/things/plans/SIMPLIFICATION-SUMMARY.md +0 -455
- package/one/things/plans/ai-elements-integration.md +0 -483
- package/one/things/plans/ai-elements.md +0 -1278
- package/one/things/plans/ai-integration-plan.md +0 -263
- package/one/things/plans/ai-integration.md +0 -996
- package/one/things/plans/ai-sdk.md +0 -798
- package/one/things/plans/ai-tools.md +0 -621
- package/one/things/plans/app.md +0 -832
- package/one/things/plans/architecture-summary.md +0 -312
- package/one/things/plans/async-ai-agents.md +0 -233
- package/one/things/plans/backend-agnostic-frontend.md +0 -390
- package/one/things/plans/backend-cleanup-quickstart.md +0 -380
- package/one/things/plans/backend-ontology-conformance.md +0 -475
- package/one/things/plans/backend-status.md +0 -599
- package/one/things/plans/backend-structure.md +0 -847
- package/one/things/plans/backend-target-structure.md +0 -482
- package/one/things/plans/backend.md +0 -1175
- package/one/things/plans/better-auth-any-backend-revised.md +0 -1103
- package/one/things/plans/better-auth-any-backend.md +0 -1896
- package/one/things/plans/better-auth-available-features.md +0 -273
- package/one/things/plans/big-plan.md +0 -52
- package/one/things/plans/cli-updates-required.md +0 -320
- package/one/things/plans/complete-step-by-step.md +0 -1409
- package/one/things/plans/components.md +0 -709
- package/one/things/plans/convex-agents.md +0 -1034
- package/one/things/plans/convex-better-auth.md +0 -1141
- package/one/things/plans/convex-on-off.md +0 -407
- package/one/things/plans/crypto-token-researcher.md +0 -629
- package/one/things/plans/data-quality-metrics.md +0 -745
- package/one/things/plans/deep-researcher-agent.md +0 -466
- package/one/things/plans/deploy-to-cloudflare.md +0 -623
- package/one/things/plans/deployment-architecture.md +0 -469
- package/one/things/plans/desktop.md +0 -1139
- package/one/things/plans/development-plan.md +0 -1283
- package/one/things/plans/development-workflow-tldr.md +0 -207
- package/one/things/plans/development-workflow.md +0 -959
- package/one/things/plans/dsl-claude-code.md +0 -1011
- package/one/things/plans/effect-components.md +0 -1743
- package/one/things/plans/effect-patterns-reference.md +0 -2235
- package/one/things/plans/effect.md +0 -1806
- package/one/things/plans/email.md +0 -966
- package/one/things/plans/enhance-auth.md +0 -1692
- package/one/things/plans/execution-strategy.md +0 -1291
- package/one/things/plans/existing-infrastructure.md +0 -712
- package/one/things/plans/feature-based-sites.md +0 -894
- package/one/things/plans/frontend-effects.md +0 -1276
- package/one/things/plans/group-folder-multi-tenancy.md +0 -893
- package/one/things/plans/improve-codebase.md +0 -1811
- package/one/things/plans/install-components.md +0 -215
- package/one/things/plans/integrate-frontend-and-backend.md +0 -603
- package/one/things/plans/landing.md +0 -820
- package/one/things/plans/layout.md +0 -249
- package/one/things/plans/mail-backend.md +0 -1361
- package/one/things/plans/mail.md +0 -2677
- package/one/things/plans/mcp-clear-context-prompt.md +0 -81
- package/one/things/plans/mcp-simple.md +0 -248
- package/one/things/plans/multi-ontology-architecture.md +0 -885
- package/one/things/plans/next-features.md +0 -114
- package/one/things/plans/npx-agent-safety.md +0 -785
- package/one/things/plans/npx-agent.md +0 -1089
- package/one/things/plans/onboarding.md +0 -51
- package/one/things/plans/one-protocol-and-payone-usage.md +0 -82
- package/one/things/plans/one.md +0 -677
- package/one/things/plans/ontology-6-dimensions.md +0 -2201
- package/one/things/plans/ontology-compliance-audit.md +0 -342
- package/one/things/plans/ontology-driven-strategy.md +0 -882
- package/one/things/plans/ontology-refine.md +0 -586
- package/one/things/plans/ontology-ui-approach.md +0 -375
- package/one/things/plans/open-agent.md +0 -840
- package/one/things/plans/performace.md +0 -122
- package/one/things/plans/phase-1-foundation.md +0 -620
- package/one/things/plans/phase-3-implementation.md +0 -1037
- package/one/things/plans/plan-connect-to-api.md +0 -146
- package/one/things/plans/quick-wins.md +0 -1428
- package/one/things/plans/r2.md +0 -777
- package/one/things/plans/readme-backend-cleanup.md +0 -402
- package/one/things/plans/release.md +0 -507
- package/one/things/plans/remove-backend-development-from-agents.md +0 -1331
- package/one/things/plans/repos.md +0 -98
- package/one/things/plans/separate-copy-2.md +0 -1349
- package/one/things/plans/separate-copy-3.md +0 -2479
- package/one/things/plans/separate-copy.md +0 -1349
- package/one/things/plans/separate-demo.md +0 -864
- package/one/things/plans/separate.md +0 -1999
- package/one/things/plans/sequence.md +0 -2040
- package/one/things/plans/shadcn-integration-summary.md +0 -510
- package/one/things/plans/sidebar.md +0 -206
- package/one/things/plans/skills.md +0 -709
- package/one/things/plans/small-fixes.md +0 -23
- package/one/things/plans/start-new.md +0 -764
- package/one/things/plans/switch-off-auth.md +0 -42
- package/one/things/plans/sync-checklist.md +0 -351
- package/one/things/plans/test-backend-connection.md +0 -514
- package/one/things/plans/unified-implementation-plan.md +0 -934
- package/one/things/plans/update-demos.md +0 -581
- package/one/things/plans/use-our-backend.md +0 -572
- package/one/things/plans/video-backend.md +0 -638
- package/one/things/plans/video-frontend.md +0 -490
- package/one/things/plans/video-old-archived.md +0 -656
- package/one/things/plans/wave1-onboarding-100-inferences.md +0 -1686
- package/one/things/plans/wave1-onboarding-vision.md +0 -744
- package/one/things/plans/wave1-orchestration-summary.md +0 -604
- package/one/things/plans/wave1-specialist-assignments.md +0 -1413
- package/one/things/plans/workflow-files.md +0 -1210
- package/one/things/plans/workflow.md +0 -1378
- package/one/things/plans-u.md +0 -905
- package/one/things/products/Blockchain Products.md +0 -6278
- package/one/things/products/cascade-landing-page.md +0 -841
- package/one/things/products/cascade.md +0 -1568
- package/one/things/products/context-engineering.md +0 -1488
- package/one/things/products/onthology.md +0 -15
- package/one/things/products/ontology-ui-shadcn.md +0 -1302
- package/one/things/products/ontology-ui.md +0 -1429
- package/one/things/products/ontology.md +0 -789
- package/one/things/products/sdk.md +0 -573
- package/one/things/promptkit.md +0 -930
- package/one/things/repos/all-repos.md +0 -0
- package/one/things/scripts-clean-mac.sh +0 -409
- package/one/things/service-providers-new.md +0 -1052
- package/one/things/service-providers.md +0 -1121
- package/one/things/structure.md +0 -532
- package/one/things/system.md +0 -618
- package/one/things/templates.md +0 -294
- package/one/things/tests/2-1-dataprovider-interface.md +0 -1216
- package/one/things/tests/2-1-test-analysis.md +0 -544
- package/one/things/things.md +0 -384
- package/one/things/todo-acp-integration.md +0 -744
- package/one/things/todo-ai.md +0 -933
- package/one/things/todo-api.md +0 -1078
- package/one/things/todo-assignment.md +0 -580
- package/one/things/todo-buy-chatgpt.md +0 -1450
- package/one/things/todo-components.md +0 -1683
- package/one/things/todo-connections.md +0 -278
- package/one/things/todo-ecommerce-frontend.md +0 -1313
- package/one/things/todo-ecommerce.md +0 -569
- package/one/things/todo-effects.md +0 -1075
- package/one/things/todo-frontend-effects.md +0 -977
- package/one/things/todo-landing-page.md +0 -1091
- package/one/things/todo-mail.md +0 -1160
- package/one/things/todo-master-plan.md +0 -490
- package/one/things/todo-onboard.md +0 -666
- package/one/things/todo-one-ie.md +0 -538
- package/one/things/todo-page.md +0 -606
- package/one/things/todo-plans.md +0 -282
- package/one/things/todo-projects.md +0 -241
- package/one/things/todo-refactoring-plan.md +0 -366
- package/one/things/todo-release.md +0 -654
- package/one/things/todo-sequence.md +0 -1621
- package/one/things/todo-use-our-backend.md +0 -1908
- package/one/things/todo-workflow.md +0 -626
- package/one/things/todo-x402.md +0 -2047
- package/one/things/todo.md +0 -21
- package/one/things/video/scripts-crypto.md +0 -835
- package/one/things/video-script-backup.md +0 -318
- package/one/things/video-script-demo.md +0 -382
- package/one/things/video-script-ontology.md +0 -333
- package/one/things/video-script.md +0 -361
|
@@ -1,1310 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Ontology Engineering Specification
|
|
3
|
-
dimension: knowledge
|
|
4
|
-
category: ontology-engineering-specification.md
|
|
5
|
-
tags: 6-dimensions, agent, ai, architecture, backend, frontend, ontology
|
|
6
|
-
related_dimensions: connections, events, 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-engineering-specification.md category.
|
|
13
|
-
Location: one/knowledge/ontology-engineering-specification.md
|
|
14
|
-
Purpose: Documents one ontology engineering
|
|
15
|
-
Related dimensions: connections, events, people, things
|
|
16
|
-
For AI agents: Read this to understand ontology engineering specification.
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# ONE Ontology Engineering
|
|
20
|
-
|
|
21
|
-
**Version:** 1.0.0
|
|
22
|
-
**Purpose:** Context Engineering, Agent Architecture, and Dynamic Website Generation
|
|
23
|
-
**Philosophy:** Minimal Context, Maximum Intelligence
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Table of Contents
|
|
28
|
-
|
|
29
|
-
1. [Context Engineering Strategy](#context-engineering-strategy)
|
|
30
|
-
2. [Specialist AI Agent Architecture](#specialist-ai-agent-architecture)
|
|
31
|
-
3. [Frontend/Backend Implementation](#frontendbackend-implementation)
|
|
32
|
-
4. [Dynamic Website Generation](#dynamic-website-generation)
|
|
33
|
-
5. [Code Generation Patterns](#code-generation-patterns)
|
|
34
|
-
6. [Performance Optimization](#performance-optimization)
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Context Engineering Strategy
|
|
39
|
-
|
|
40
|
-
### The Problem: Context Window Explosion
|
|
41
|
-
|
|
42
|
-
**Traditional Approach (❌ Bad):**
|
|
43
|
-
```
|
|
44
|
-
AI reads entire codebase → 100k+ tokens → expensive, slow, hallucinations
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
**ONE Approach (✅ Good):**
|
|
48
|
-
```
|
|
49
|
-
AI queries ontology → focused retrieval → <5k tokens → fast, accurate, cheap
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Principle 1: Ontology as Context Compression
|
|
53
|
-
|
|
54
|
-
The 6-dimension ontology IS our context compression:
|
|
55
|
-
|
|
56
|
-
```typescript
|
|
57
|
-
// Instead of loading 50 files (30k tokens):
|
|
58
|
-
const allUsers = readFiles(['users.ts', 'auth.ts', 'sessions.ts', ...])
|
|
59
|
-
|
|
60
|
-
// Query the ontology (500 tokens):
|
|
61
|
-
const context = {
|
|
62
|
-
things: ['creator', 'audience_member'],
|
|
63
|
-
connections: ['member_of'],
|
|
64
|
-
events: ['user_login', 'user_registered']
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**Result:** 98% context reduction with full semantic fidelity.
|
|
69
|
-
|
|
70
|
-
### Principle 2: Just-In-Time Context Loading
|
|
71
|
-
|
|
72
|
-
**Strategy:** Load context ONLY when needed, not upfront.
|
|
73
|
-
|
|
74
|
-
```typescript
|
|
75
|
-
// ❌ BAD: Load everything
|
|
76
|
-
const fullOntology = await loadOntology() // 15k tokens
|
|
77
|
-
|
|
78
|
-
// ✅ GOOD: Load on demand
|
|
79
|
-
async function getRelevantContext(userIntent: string) {
|
|
80
|
-
const embedding = await embed(userIntent)
|
|
81
|
-
const relevantChunks = await vectorSearch(embedding, { k: 3 }) // 800 tokens
|
|
82
|
-
const relevantThings = await getThingsByType(extractTypes(relevantChunks)) // 300 tokens
|
|
83
|
-
|
|
84
|
-
return { chunks: relevantChunks, things: relevantThings } // Total: 1,100 tokens
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Principle 3: Query-First Architecture
|
|
89
|
-
|
|
90
|
-
**Pattern:** Every operation starts with a focused query.
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
// User request: "Show me all fitness creators"
|
|
94
|
-
|
|
95
|
-
// Step 1: Parse intent
|
|
96
|
-
const intent = {
|
|
97
|
-
thingType: 'creator',
|
|
98
|
-
filter: { niche: 'fitness' },
|
|
99
|
-
connections: undefined,
|
|
100
|
-
events: undefined
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Step 2: Focused query (only what's needed)
|
|
104
|
-
const creators = await db
|
|
105
|
-
.query('things')
|
|
106
|
-
.withIndex('by_type', q => q.eq('type', 'creator'))
|
|
107
|
-
.filter(q => q.field('properties.niche').includes('fitness'))
|
|
108
|
-
.take(10) // ALWAYS LIMIT
|
|
109
|
-
|
|
110
|
-
// Step 3: Load related data IF NEEDED
|
|
111
|
-
if (needsStats) {
|
|
112
|
-
const stats = await getCreatorStats(creators.map(c => c._id))
|
|
113
|
-
}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Context Used:**
|
|
117
|
-
- Intent parsing: ~200 tokens
|
|
118
|
-
- Query: ~50 tokens
|
|
119
|
-
- Results: ~500 tokens
|
|
120
|
-
- **Total: ~750 tokens** (vs 10k+ for full creator records)
|
|
121
|
-
|
|
122
|
-
### Principle 4: Contextual Caching
|
|
123
|
-
|
|
124
|
-
**Strategy:** Cache frequently accessed ontology patterns.
|
|
125
|
-
|
|
126
|
-
```typescript
|
|
127
|
-
// Cache structure
|
|
128
|
-
const ontologyCache = {
|
|
129
|
-
// Thing type definitions (rarely change)
|
|
130
|
-
thingTypes: Map<ThingType, ThingDefinition>, // ~2k tokens
|
|
131
|
-
|
|
132
|
-
// Connection patterns (rarely change)
|
|
133
|
-
connectionTypes: Map<ConnectionType, ConnectionDefinition>, // ~1k tokens
|
|
134
|
-
|
|
135
|
-
// Event types (rarely change)
|
|
136
|
-
eventTypes: Map<EventType, EventDefinition>, // ~1k tokens
|
|
137
|
-
|
|
138
|
-
// Organization-specific (cache per org, TTL: 5 min)
|
|
139
|
-
orgSchema: Map<OrgId, OrgContext>, // ~500 tokens per org
|
|
140
|
-
|
|
141
|
-
// User-specific (cache per session, TTL: 1 hour)
|
|
142
|
-
userContext: Map<UserId, UserContext>, // ~300 tokens per user
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Total cold start: ~5k tokens
|
|
146
|
-
// Total warm (per request): ~800 tokens
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Principle 5: Semantic Compression via Knowledge
|
|
150
|
-
|
|
151
|
-
**Strategy:** Use knowledge embeddings to compress semantic meaning.
|
|
152
|
-
|
|
153
|
-
```typescript
|
|
154
|
-
// Instead of passing full documentation (5k tokens):
|
|
155
|
-
const docs = `
|
|
156
|
-
The creator entity represents a human creator...
|
|
157
|
-
Properties include email, username, niche...
|
|
158
|
-
Creators can own ai_clones and create content...
|
|
159
|
-
[3000+ more words]
|
|
160
|
-
`
|
|
161
|
-
|
|
162
|
-
// Pass compressed reference (50 tokens + retrieval):
|
|
163
|
-
const creatorContext = {
|
|
164
|
-
thingType: 'creator',
|
|
165
|
-
knowledgeRef: 'knowledge_item_creator_docs', // Vector retrieval when needed
|
|
166
|
-
quickRef: 'Human creator with email, username, niche. Owns clones & content.'
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// AI retrieves detailed docs ONLY if needed
|
|
170
|
-
if (needsDetail) {
|
|
171
|
-
const detailedDocs = await retrieveKnowledge('knowledge_item_creator_docs')
|
|
172
|
-
}
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## Specialist AI Agent Architecture
|
|
178
|
-
|
|
179
|
-
### Agent Design Philosophy
|
|
180
|
-
|
|
181
|
-
**Traditional Monolithic Agent (❌ Bad):**
|
|
182
|
-
```
|
|
183
|
-
One agent tries to do everything → 50k token context → slow, expensive, confused
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
**ONE Specialist Agents (✅ Good):**
|
|
187
|
-
```
|
|
188
|
-
10 specialist agents, each expert in one domain → 3k tokens each → fast, cheap, accurate
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Core Agent Types
|
|
192
|
-
|
|
193
|
-
#### 1. **Ontology Agent** - The Router
|
|
194
|
-
|
|
195
|
-
**Purpose:** Parse user intent and route to specialist agents.
|
|
196
|
-
|
|
197
|
-
**Context Budget:** 2k tokens max
|
|
198
|
-
|
|
199
|
-
**Capabilities:**
|
|
200
|
-
- Intent classification
|
|
201
|
-
- Entity/connection/event identification
|
|
202
|
-
- Agent routing
|
|
203
|
-
|
|
204
|
-
```typescript
|
|
205
|
-
interface OntologyAgent {
|
|
206
|
-
parseIntent(userInput: string): Intent
|
|
207
|
-
routeToAgent(intent: Intent): SpecialistAgent
|
|
208
|
-
|
|
209
|
-
context: {
|
|
210
|
-
ontologyTypes: ThingType[] // Cached
|
|
211
|
-
connectionTypes: ConnectionType[] // Cached
|
|
212
|
-
eventTypes: EventType[] // Cached
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// Example
|
|
217
|
-
const intent = await ontologyAgent.parseIntent("Create a fitness course")
|
|
218
|
-
// Returns: { action: 'create', thingType: 'course', metadata: { niche: 'fitness' } }
|
|
219
|
-
|
|
220
|
-
const agent = ontologyAgent.routeToAgent(intent)
|
|
221
|
-
// Returns: ContentCreationAgent
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
#### 2. **Schema Agent** - Database Structure Expert
|
|
225
|
-
|
|
226
|
-
**Purpose:** Generate Convex schemas, indexes, and migrations.
|
|
227
|
-
|
|
228
|
-
**Context Budget:** 3k tokens max
|
|
229
|
-
|
|
230
|
-
**Capabilities:**
|
|
231
|
-
- Schema generation
|
|
232
|
-
- Index optimization
|
|
233
|
-
- Migration planning
|
|
234
|
-
|
|
235
|
-
```typescript
|
|
236
|
-
interface SchemaAgent {
|
|
237
|
-
generateSchema(thingTypes: ThingType[]): ConvexSchema
|
|
238
|
-
optimizeIndexes(queryPatterns: QueryPattern[]): IndexDefinition[]
|
|
239
|
-
planMigration(from: Schema, to: Schema): MigrationPlan
|
|
240
|
-
|
|
241
|
-
context: {
|
|
242
|
-
ontologySpec: OntologyReference // Links to detailed docs
|
|
243
|
-
indexPatterns: IndexPattern[] // Common patterns
|
|
244
|
-
validationRules: ValidationRule[]
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// Example
|
|
249
|
-
const schema = await schemaAgent.generateSchema(['creator', 'course', 'lesson'])
|
|
250
|
-
// Returns optimized Convex schema with indexes
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
#### 3. **Query Agent** - Database Query Expert
|
|
254
|
-
|
|
255
|
-
**Purpose:** Generate optimized Convex queries.
|
|
256
|
-
|
|
257
|
-
**Context Budget:** 2k tokens max
|
|
258
|
-
|
|
259
|
-
**Capabilities:**
|
|
260
|
-
- Query generation
|
|
261
|
-
- Query optimization
|
|
262
|
-
- Index selection
|
|
263
|
-
|
|
264
|
-
```typescript
|
|
265
|
-
interface QueryAgent {
|
|
266
|
-
generateQuery(intent: QueryIntent): ConvexQuery
|
|
267
|
-
optimizeQuery(query: ConvexQuery): ConvexQuery
|
|
268
|
-
explainQuery(query: ConvexQuery): QueryExplanation
|
|
269
|
-
|
|
270
|
-
context: {
|
|
271
|
-
availableIndexes: Index[] // Current DB indexes
|
|
272
|
-
queryPatterns: QueryPattern[] // Common patterns
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
// Example
|
|
277
|
-
const query = await queryAgent.generateQuery({
|
|
278
|
-
thingType: 'creator',
|
|
279
|
-
filter: { niche: 'fitness', totalFollowers: { $gt: 10000 } },
|
|
280
|
-
limit: 10
|
|
281
|
-
})
|
|
282
|
-
// Returns optimized Convex query with correct index usage
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
#### 4. **Mutation Agent** - Database Write Expert
|
|
286
|
-
|
|
287
|
-
**Purpose:** Generate Convex mutations with proper validation and events.
|
|
288
|
-
|
|
289
|
-
**Context Budget:** 3k tokens max
|
|
290
|
-
|
|
291
|
-
**Capabilities:**
|
|
292
|
-
- Mutation generation
|
|
293
|
-
- Validation logic
|
|
294
|
-
- Event logging
|
|
295
|
-
- Transaction handling
|
|
296
|
-
|
|
297
|
-
```typescript
|
|
298
|
-
interface MutationAgent {
|
|
299
|
-
generateMutation(action: MutationIntent): ConvexMutation
|
|
300
|
-
addValidation(mutation: ConvexMutation): ConvexMutation
|
|
301
|
-
logEvents(mutation: ConvexMutation): ConvexMutation
|
|
302
|
-
|
|
303
|
-
context: {
|
|
304
|
-
validationRules: ValidationRule[]
|
|
305
|
-
eventTypes: EventType[]
|
|
306
|
-
transactionPatterns: TransactionPattern[]
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// Example
|
|
311
|
-
const mutation = await mutationAgent.generateMutation({
|
|
312
|
-
action: 'create',
|
|
313
|
-
thingType: 'course',
|
|
314
|
-
properties: { title: 'Fitness 101', niche: 'fitness' },
|
|
315
|
-
connections: [{ type: 'owns', fromId: creatorId }]
|
|
316
|
-
})
|
|
317
|
-
// Returns mutation with validation + event logging + connection creation
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
#### 5. **Frontend Component Agent** - UI Generator
|
|
321
|
-
|
|
322
|
-
**Purpose:** Generate Astro/React components from ontology.
|
|
323
|
-
|
|
324
|
-
**Context Budget:** 4k tokens max
|
|
325
|
-
|
|
326
|
-
**Capabilities:**
|
|
327
|
-
- Component generation
|
|
328
|
-
- Type-safe props
|
|
329
|
-
- Convex integration
|
|
330
|
-
- Styling with Tailwind
|
|
331
|
-
|
|
332
|
-
```typescript
|
|
333
|
-
interface FrontendAgent {
|
|
334
|
-
generateComponent(spec: ComponentSpec): AstroComponent
|
|
335
|
-
generatePage(spec: PageSpec): AstroPage
|
|
336
|
-
generateAPI(spec: APISpec): HonoRoute
|
|
337
|
-
|
|
338
|
-
context: {
|
|
339
|
-
componentPatterns: ComponentPattern[] // Reusable patterns
|
|
340
|
-
designSystem: DesignTokens // Colors, spacing, etc.
|
|
341
|
-
ontologyTypes: ThingType[] // For type generation
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// Example
|
|
346
|
-
const component = await frontendAgent.generateComponent({
|
|
347
|
-
name: 'CourseCard',
|
|
348
|
-
thingType: 'course',
|
|
349
|
-
fields: ['title', 'description', 'price'],
|
|
350
|
-
actions: ['enroll', 'view']
|
|
351
|
-
})
|
|
352
|
-
// Returns fully typed Astro component with Convex hooks
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
#### 6. **Backend Logic Agent** - Business Logic Expert
|
|
356
|
-
|
|
357
|
-
**Purpose:** Generate Convex actions and complex business logic.
|
|
358
|
-
|
|
359
|
-
**Context Budget:** 4k tokens max
|
|
360
|
-
|
|
361
|
-
**Capabilities:**
|
|
362
|
-
- Action generation
|
|
363
|
-
- External API integration
|
|
364
|
-
- Workflow orchestration
|
|
365
|
-
- Error handling
|
|
366
|
-
|
|
367
|
-
```typescript
|
|
368
|
-
interface BackendAgent {
|
|
369
|
-
generateAction(spec: ActionSpec): ConvexAction
|
|
370
|
-
orchestrateWorkflow(steps: WorkflowStep[]): WorkflowAction
|
|
371
|
-
handleErrors(action: ConvexAction): ConvexAction
|
|
372
|
-
|
|
373
|
-
context: {
|
|
374
|
-
workflowPatterns: WorkflowPattern[]
|
|
375
|
-
integrationPatterns: IntegrationPattern[]
|
|
376
|
-
errorPatterns: ErrorPattern[]
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// Example
|
|
381
|
-
const action = await backendAgent.generateAction({
|
|
382
|
-
name: 'createCourseWithAI',
|
|
383
|
-
steps: [
|
|
384
|
-
'generateContent',
|
|
385
|
-
'createCourse',
|
|
386
|
-
'embedContent',
|
|
387
|
-
'notifyCreator'
|
|
388
|
-
]
|
|
389
|
-
})
|
|
390
|
-
// Returns orchestrated Convex action with error handling
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
#### 7. **Knowledge Agent** - RAG & Embeddings Expert
|
|
394
|
-
|
|
395
|
-
**Purpose:** Manage knowledge embeddings and semantic search.
|
|
396
|
-
|
|
397
|
-
**Context Budget:** 3k tokens max
|
|
398
|
-
|
|
399
|
-
**Capabilities:**
|
|
400
|
-
- Embedding generation
|
|
401
|
-
- Vector search
|
|
402
|
-
- Chunk optimization
|
|
403
|
-
- Label management
|
|
404
|
-
|
|
405
|
-
```typescript
|
|
406
|
-
interface KnowledgeAgent {
|
|
407
|
-
embedContent(thing: Thing, fields: string[]): Knowledge[]
|
|
408
|
-
semanticSearch(query: string, filters: Filter): Knowledge[]
|
|
409
|
-
optimizeChunks(text: string): Chunk[]
|
|
410
|
-
manageLabels(thing: Thing): Label[]
|
|
411
|
-
|
|
412
|
-
context: {
|
|
413
|
-
embeddingModel: 'text-embedding-3-large'
|
|
414
|
-
chunkStrategy: ChunkStrategy
|
|
415
|
-
labelTaxonomy: LabelCategory[]
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
// Example
|
|
420
|
-
const chunks = await knowledgeAgent.embedContent(course, ['title', 'description', 'content'])
|
|
421
|
-
// Returns knowledge chunks with embeddings + links via thingKnowledge
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
#### 8. **Organization Agent** - Multi-Tenant Expert
|
|
425
|
-
|
|
426
|
-
**Purpose:** Manage organization scope, permissions, quotas.
|
|
427
|
-
|
|
428
|
-
**Context Budget:** 2k tokens max
|
|
429
|
-
|
|
430
|
-
**Capabilities:**
|
|
431
|
-
- Scope enforcement
|
|
432
|
-
- Permission checks
|
|
433
|
-
- Quota tracking
|
|
434
|
-
- Billing logic
|
|
435
|
-
|
|
436
|
-
```typescript
|
|
437
|
-
interface OrganizationAgent {
|
|
438
|
-
enforceScope(query: Query, orgId: OrgId): Query
|
|
439
|
-
checkPermissions(userId: UserId, action: Action): boolean
|
|
440
|
-
trackUsage(orgId: OrgId, resource: Resource): Usage
|
|
441
|
-
|
|
442
|
-
context: {
|
|
443
|
-
orgPlans: Plan[] // starter, pro, enterprise
|
|
444
|
-
quotaLimits: QuotaLimit[]
|
|
445
|
-
permissionMatrix: Permission[][]
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
// Example
|
|
450
|
-
const scopedQuery = await orgAgent.enforceScope(rawQuery, orgId)
|
|
451
|
-
// Returns query filtered to org's data only
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
#### 9. **Analytics Agent** - Metrics & Insights Expert
|
|
455
|
-
|
|
456
|
-
**Purpose:** Generate analytics from events and metrics.
|
|
457
|
-
|
|
458
|
-
**Context Budget:** 3k tokens max
|
|
459
|
-
|
|
460
|
-
**Capabilities:**
|
|
461
|
-
- Metric calculation
|
|
462
|
-
- Insight generation
|
|
463
|
-
- Prediction models
|
|
464
|
-
- Report generation
|
|
465
|
-
|
|
466
|
-
```typescript
|
|
467
|
-
interface AnalyticsAgent {
|
|
468
|
-
calculateMetrics(orgId: OrgId, period: Period): Metrics
|
|
469
|
-
generateInsights(metrics: Metrics): Insight[]
|
|
470
|
-
predictTrends(history: Metrics[]): Prediction[]
|
|
471
|
-
|
|
472
|
-
context: {
|
|
473
|
-
metricDefinitions: MetricDef[]
|
|
474
|
-
insightPatterns: InsightPattern[]
|
|
475
|
-
predictionModels: Model[]
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
// Example
|
|
480
|
-
const insights = await analyticsAgent.generateInsights(metrics)
|
|
481
|
-
// Returns actionable insights with confidence scores
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
#### 10. **Protocol Agent** - Cross-Protocol Expert
|
|
485
|
-
|
|
486
|
-
**Purpose:** Handle A2A, ACP, AP2, X402, AG-UI integrations.
|
|
487
|
-
|
|
488
|
-
**Context Budget:** 4k tokens max
|
|
489
|
-
|
|
490
|
-
**Capabilities:**
|
|
491
|
-
- Protocol detection
|
|
492
|
-
- Message formatting
|
|
493
|
-
- Transaction handling
|
|
494
|
-
- Cross-chain bridges
|
|
495
|
-
|
|
496
|
-
```typescript
|
|
497
|
-
interface ProtocolAgent {
|
|
498
|
-
detectProtocol(request: Request): Protocol
|
|
499
|
-
formatMessage(data: any, protocol: Protocol): Message
|
|
500
|
-
handleTransaction(tx: Transaction, protocol: Protocol): Event
|
|
501
|
-
|
|
502
|
-
context: {
|
|
503
|
-
protocolSpecs: ProtocolSpec[] // A2A, ACP, AP2, X402, AG-UI
|
|
504
|
-
networkConfigs: NetworkConfig[] // Base, Sui, Solana
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
// Example
|
|
509
|
-
const message = await protocolAgent.formatMessage(purchase, 'acp')
|
|
510
|
-
// Returns ACP-formatted commerce message
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
---
|
|
514
|
-
|
|
515
|
-
## Agent Orchestration Pattern
|
|
516
|
-
|
|
517
|
-
### Sequential Coordination
|
|
518
|
-
|
|
519
|
-
```typescript
|
|
520
|
-
// User: "Create a fitness course and publish it to my website"
|
|
521
|
-
|
|
522
|
-
// 1. Ontology Agent routes
|
|
523
|
-
const intent = await ontologyAgent.parse("Create fitness course...")
|
|
524
|
-
// → { actions: ['create_course', 'publish_website'] }
|
|
525
|
-
|
|
526
|
-
// 2. Mutation Agent creates course
|
|
527
|
-
const course = await mutationAgent.create({
|
|
528
|
-
thingType: 'course',
|
|
529
|
-
properties: { title: '...', niche: 'fitness' }
|
|
530
|
-
})
|
|
531
|
-
|
|
532
|
-
// 3. Knowledge Agent embeds content
|
|
533
|
-
await knowledgeAgent.embed(course, ['title', 'description', 'modules'])
|
|
534
|
-
|
|
535
|
-
// 4. Frontend Agent generates page
|
|
536
|
-
const page = await frontendAgent.generatePage({
|
|
537
|
-
thingType: 'course',
|
|
538
|
-
thingId: course._id
|
|
539
|
-
})
|
|
540
|
-
|
|
541
|
-
// 5. Backend Agent deploys
|
|
542
|
-
await backendAgent.deploy(page, { domain: creator.properties.domain })
|
|
543
|
-
|
|
544
|
-
// Total context: 2k + 3k + 3k + 4k + 4k = 16k tokens
|
|
545
|
-
// vs Monolithic: 80k+ tokens
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
### Parallel Execution
|
|
549
|
-
|
|
550
|
-
```typescript
|
|
551
|
-
// User: "Analyze my creator platform performance"
|
|
552
|
-
|
|
553
|
-
// Ontology Agent routes to multiple specialists
|
|
554
|
-
const [metrics, insights, predictions] = await Promise.all([
|
|
555
|
-
analyticsAgent.calculateMetrics(orgId, '30d'),
|
|
556
|
-
analyticsAgent.generateInsights(/* ... */),
|
|
557
|
-
analyticsAgent.predictTrends(/* ... */)
|
|
558
|
-
])
|
|
559
|
-
|
|
560
|
-
// Each agent runs in parallel with own context
|
|
561
|
-
// Total context: max(3k, 3k, 3k) = 3k tokens (not additive!)
|
|
562
|
-
```
|
|
563
|
-
|
|
564
|
-
---
|
|
565
|
-
|
|
566
|
-
## Frontend/Backend Implementation
|
|
567
|
-
|
|
568
|
-
### Architecture Overview
|
|
569
|
-
|
|
570
|
-
```
|
|
571
|
-
┌─────────────────────────────────────────────────────────┐
|
|
572
|
-
│ FRONTEND (Astro) │
|
|
573
|
-
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
|
|
574
|
-
│ │ Pages │ │ Components │ │ API │ │
|
|
575
|
-
│ │ (SSR/SSG) │ │ (React) │ │ (Hono) │ │
|
|
576
|
-
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
|
|
577
|
-
│ │ │ │ │
|
|
578
|
-
│ └─────────────────┴─────────────────┘ │
|
|
579
|
-
│ ↓ │
|
|
580
|
-
│ ConvexHttpClient │
|
|
581
|
-
└────────────────────────────┬────────────────────────────┘
|
|
582
|
-
↓
|
|
583
|
-
┌─────────────────────────────────────────────────────────┐
|
|
584
|
-
│ BACKEND (Convex) │
|
|
585
|
-
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐│
|
|
586
|
-
│ │ Queries │ │Mutations │ │ Actions │ │Scheduler││
|
|
587
|
-
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬────┘│
|
|
588
|
-
│ │ │ │ │ │
|
|
589
|
-
│ └─────────────┴──────────────┴──────────────┘ │
|
|
590
|
-
│ ↓ │
|
|
591
|
-
│ ┌────────────────────────┐ │
|
|
592
|
-
│ │ 6-Dimension Ontology │ │
|
|
593
|
-
│ │ things │ connections │ │ │
|
|
594
|
-
│ │ events │ knowledge │ │ │
|
|
595
|
-
│ └────────────────────────┘ │
|
|
596
|
-
└─────────────────────────────────────────────────────────┘
|
|
597
|
-
```
|
|
598
|
-
|
|
599
|
-
### Context-Aware Query Pattern
|
|
600
|
-
|
|
601
|
-
**Traditional (❌ Bad):**
|
|
602
|
-
```typescript
|
|
603
|
-
// Load everything, filter in memory
|
|
604
|
-
const allThings = await db.query('things').collect() // 50k records
|
|
605
|
-
const filtered = allThings.filter(t => t.type === 'course')
|
|
606
|
-
```
|
|
607
|
-
|
|
608
|
-
**Context-Optimized (✅ Good):**
|
|
609
|
-
```typescript
|
|
610
|
-
// Query with index, limit results
|
|
611
|
-
const courses = await db
|
|
612
|
-
.query('things')
|
|
613
|
-
.withIndex('by_type', q => q.eq('type', 'course'))
|
|
614
|
-
.take(20) // ALWAYS PAGINATE
|
|
615
|
-
|
|
616
|
-
// Load related data ONLY if needed
|
|
617
|
-
if (needsCreators) {
|
|
618
|
-
const creatorIds = [...new Set(courses.map(c => c.properties.creatorId))]
|
|
619
|
-
const creators = await db.getMany(creatorIds) // Batch fetch
|
|
620
|
-
}
|
|
621
|
-
```
|
|
622
|
-
|
|
623
|
-
### Dynamic Component Generation
|
|
624
|
-
|
|
625
|
-
**Pattern:** Generate components from ontology at build time.
|
|
626
|
-
|
|
627
|
-
```typescript
|
|
628
|
-
// scripts/generate-components.ts
|
|
629
|
-
|
|
630
|
-
import { ontology } from './ontology'
|
|
631
|
-
import { FrontendAgent } from './agents/frontend'
|
|
632
|
-
|
|
633
|
-
// Generate component for each thing type
|
|
634
|
-
for (const thingType of ontology.thingTypes) {
|
|
635
|
-
// Generate card component
|
|
636
|
-
const card = await frontendAgent.generateComponent({
|
|
637
|
-
name: `${thingType}Card`,
|
|
638
|
-
thingType,
|
|
639
|
-
fields: ontology.getDisplayFields(thingType),
|
|
640
|
-
variant: 'card'
|
|
641
|
-
})
|
|
642
|
-
|
|
643
|
-
await writeFile(`src/components/cards/${thingType}Card.tsx`, card)
|
|
644
|
-
|
|
645
|
-
// Generate list component
|
|
646
|
-
const list = await frontendAgent.generateComponent({
|
|
647
|
-
name: `${thingType}List`,
|
|
648
|
-
thingType,
|
|
649
|
-
variant: 'list',
|
|
650
|
-
pagination: true
|
|
651
|
-
})
|
|
652
|
-
|
|
653
|
-
await writeFile(`src/components/lists/${thingType}List.tsx`, list)
|
|
654
|
-
|
|
655
|
-
// Generate detail page
|
|
656
|
-
const page = await frontendAgent.generatePage({
|
|
657
|
-
name: `${thingType}Detail`,
|
|
658
|
-
thingType,
|
|
659
|
-
sections: ['header', 'properties', 'connections', 'events']
|
|
660
|
-
})
|
|
661
|
-
|
|
662
|
-
await writeFile(`src/pages/${thingType}/[id].astro`, page)
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
// Result: 66 thing types × 3 components = 198 auto-generated components
|
|
666
|
-
```
|
|
667
|
-
|
|
668
|
-
### Backend Query Optimization
|
|
669
|
-
|
|
670
|
-
**Pattern:** Use indexes and batching to minimize context.
|
|
671
|
-
|
|
672
|
-
```typescript
|
|
673
|
-
// Convex query with index optimization
|
|
674
|
-
export const getCourseWithRelations = query({
|
|
675
|
-
args: { courseId: v.id('things') },
|
|
676
|
-
handler: async (ctx, { courseId }) => {
|
|
677
|
-
// 1. Get course (1 read)
|
|
678
|
-
const course = await ctx.db.get(courseId)
|
|
679
|
-
if (!course) return null
|
|
680
|
-
|
|
681
|
-
// 2. Get creator via connection (index scan, not full table)
|
|
682
|
-
const ownerConn = await ctx.db
|
|
683
|
-
.query('connections')
|
|
684
|
-
.withIndex('to_type', q =>
|
|
685
|
-
q.eq('toThingId', courseId).eq('relationshipType', 'owns')
|
|
686
|
-
)
|
|
687
|
-
.first()
|
|
688
|
-
|
|
689
|
-
// 3. Get creator (1 read)
|
|
690
|
-
const creator = ownerConn ? await ctx.db.get(ownerConn.fromThingId) : null
|
|
691
|
-
|
|
692
|
-
// 4. Get lessons via connection (index scan)
|
|
693
|
-
const lessonConns = await ctx.db
|
|
694
|
-
.query('connections')
|
|
695
|
-
.withIndex('from_type', q =>
|
|
696
|
-
q.eq('fromThingId', courseId).eq('relationshipType', 'part_of')
|
|
697
|
-
)
|
|
698
|
-
.collect()
|
|
699
|
-
|
|
700
|
-
// 5. Batch fetch lessons (N reads in parallel)
|
|
701
|
-
const lessons = await Promise.all(
|
|
702
|
-
lessonConns.map(c => ctx.db.get(c.toThingId))
|
|
703
|
-
)
|
|
704
|
-
|
|
705
|
-
// Total: 3 + N reads (vs full table scans)
|
|
706
|
-
return { course, creator, lessons }
|
|
707
|
-
}
|
|
708
|
-
})
|
|
709
|
-
```
|
|
710
|
-
|
|
711
|
-
---
|
|
712
|
-
|
|
713
|
-
## Dynamic Website Generation
|
|
714
|
-
|
|
715
|
-
### Concept: Organizations Create Custom Websites
|
|
716
|
-
|
|
717
|
-
**Flow:**
|
|
718
|
-
```
|
|
719
|
-
1. Organization creates account
|
|
720
|
-
2. Chooses template (minimal, showcase, portfolio)
|
|
721
|
-
3. Customizes branding (colors, logo, domain)
|
|
722
|
-
4. Creates content (courses, blog posts, products)
|
|
723
|
-
5. ONE auto-generates website at org.one.ie
|
|
724
|
-
```
|
|
725
|
-
|
|
726
|
-
### Implementation Strategy
|
|
727
|
-
|
|
728
|
-
#### 1. Template System
|
|
729
|
-
|
|
730
|
-
**Static Templates** (pre-built):
|
|
731
|
-
```typescript
|
|
732
|
-
// templates/minimal.ts
|
|
733
|
-
export const minimalTemplate: Template = {
|
|
734
|
-
name: 'minimal',
|
|
735
|
-
sections: ['hero', 'about', 'content', 'footer'],
|
|
736
|
-
thingTypes: ['creator', 'blog_post', 'course'],
|
|
737
|
-
colors: {
|
|
738
|
-
primary: 'blue-600',
|
|
739
|
-
secondary: 'gray-800',
|
|
740
|
-
accent: 'green-500'
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
```
|
|
744
|
-
|
|
745
|
-
**Dynamic Generation**:
|
|
746
|
-
```typescript
|
|
747
|
-
// Generate website for organization
|
|
748
|
-
export async function generateWebsite(orgId: Id<'things'>) {
|
|
749
|
-
// 1. Get org preferences
|
|
750
|
-
const org = await db.get(orgId)
|
|
751
|
-
const template = templates[org.properties.template || 'minimal']
|
|
752
|
-
|
|
753
|
-
// 2. Get org's things
|
|
754
|
-
const things = await db
|
|
755
|
-
.query('things')
|
|
756
|
-
.filter(q => q.eq(q.field('groupId'), orgId))
|
|
757
|
-
.collect()
|
|
758
|
-
|
|
759
|
-
// 3. Generate pages
|
|
760
|
-
const pages = []
|
|
761
|
-
|
|
762
|
-
// Homepage
|
|
763
|
-
pages.push(await frontendAgent.generatePage({
|
|
764
|
-
template: 'homepage',
|
|
765
|
-
sections: template.sections,
|
|
766
|
-
data: { org, creators: things.filter(t => t.type === 'creator') }
|
|
767
|
-
}))
|
|
768
|
-
|
|
769
|
-
// Content pages (one per thing)
|
|
770
|
-
for (const thing of things) {
|
|
771
|
-
pages.push(await frontendAgent.generatePage({
|
|
772
|
-
template: 'detail',
|
|
773
|
-
thingType: thing.type,
|
|
774
|
-
data: thing
|
|
775
|
-
}))
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
// 4. Deploy to org.one.ie
|
|
779
|
-
await deploy(pages, { domain: `${org.properties.slug}.one.ie` })
|
|
780
|
-
}
|
|
781
|
-
```
|
|
782
|
-
|
|
783
|
-
#### 2. Component-Based Pages
|
|
784
|
-
|
|
785
|
-
**Pattern:** Pages are composed of thing-based components.
|
|
786
|
-
|
|
787
|
-
```astro
|
|
788
|
-
---
|
|
789
|
-
// [orgSlug]/index.astro (auto-generated)
|
|
790
|
-
import { ConvexHttpClient } from 'convex/browser'
|
|
791
|
-
import Hero from '@/components/Hero.astro'
|
|
792
|
-
import CreatorCard from '@/components/cards/CreatorCard.tsx'
|
|
793
|
-
import CourseList from '@/components/lists/CourseList.tsx'
|
|
794
|
-
|
|
795
|
-
const convex = new ConvexHttpClient(import.meta.env.PUBLIC_CONVEX_URL)
|
|
796
|
-
|
|
797
|
-
// Get org
|
|
798
|
-
const org = await convex.query(api.queries.orgs.getBySlug, {
|
|
799
|
-
slug: Astro.params.orgSlug
|
|
800
|
-
})
|
|
801
|
-
|
|
802
|
-
// Get creators
|
|
803
|
-
const creators = await convex.query(api.queries.things.list, {
|
|
804
|
-
type: 'creator',
|
|
805
|
-
groupId: org._id
|
|
806
|
-
})
|
|
807
|
-
|
|
808
|
-
// Get courses
|
|
809
|
-
const courses = await convex.query(api.queries.things.list, {
|
|
810
|
-
type: 'course',
|
|
811
|
-
groupId: org._id,
|
|
812
|
-
limit: 6
|
|
813
|
-
})
|
|
814
|
-
---
|
|
815
|
-
|
|
816
|
-
<Layout title={org.name}>
|
|
817
|
-
<Hero
|
|
818
|
-
title={org.name}
|
|
819
|
-
subtitle={org.properties.description}
|
|
820
|
-
cta="Explore Courses"
|
|
821
|
-
/>
|
|
822
|
-
|
|
823
|
-
<section class="creators">
|
|
824
|
-
<h2>Our Creators</h2>
|
|
825
|
-
<div class="grid">
|
|
826
|
-
{creators.map(creator => (
|
|
827
|
-
<CreatorCard client:load creator={creator} />
|
|
828
|
-
))}
|
|
829
|
-
</div>
|
|
830
|
-
</section>
|
|
831
|
-
|
|
832
|
-
<section class="courses">
|
|
833
|
-
<h2>Featured Courses</h2>
|
|
834
|
-
<CourseList client:load courses={courses} />
|
|
835
|
-
</section>
|
|
836
|
-
</Layout>
|
|
837
|
-
```
|
|
838
|
-
|
|
839
|
-
#### 3. Real-Time Updates
|
|
840
|
-
|
|
841
|
-
**Pattern:** Components subscribe to changes.
|
|
842
|
-
|
|
843
|
-
```tsx
|
|
844
|
-
// components/cards/CourseCard.tsx
|
|
845
|
-
import { useQuery } from 'convex/react'
|
|
846
|
-
import { api } from '@/convex/_generated/api'
|
|
847
|
-
|
|
848
|
-
export function CourseCard({ courseId }: { courseId: Id<'things'> }) {
|
|
849
|
-
// Real-time subscription
|
|
850
|
-
const course = useQuery(api.queries.things.get, { id: courseId })
|
|
851
|
-
|
|
852
|
-
if (!course) return <Skeleton />
|
|
853
|
-
|
|
854
|
-
return (
|
|
855
|
-
<div class="card">
|
|
856
|
-
<img src={course.properties.thumbnail} alt={course.properties.title} />
|
|
857
|
-
<h3>{course.properties.title}</h3>
|
|
858
|
-
<p>{course.properties.description}</p>
|
|
859
|
-
<span>${course.properties.price}</span>
|
|
860
|
-
<button>Enroll Now</button>
|
|
861
|
-
</div>
|
|
862
|
-
)
|
|
863
|
-
}
|
|
864
|
-
```
|
|
865
|
-
|
|
866
|
-
**When creator updates course → Component auto-updates on all visitors' screens**
|
|
867
|
-
|
|
868
|
-
#### 4. Multi-Tenant Routing
|
|
869
|
-
|
|
870
|
-
**Pattern:** Route to correct org's website.
|
|
871
|
-
|
|
872
|
-
```typescript
|
|
873
|
-
// middleware/tenant.ts
|
|
874
|
-
export async function onRequest(context, next) {
|
|
875
|
-
const url = new URL(context.request.url)
|
|
876
|
-
|
|
877
|
-
// Extract org slug from subdomain
|
|
878
|
-
const hostname = url.hostname // creator.one.ie
|
|
879
|
-
const orgSlug = hostname.split('.')[0]
|
|
880
|
-
|
|
881
|
-
// Load org context
|
|
882
|
-
const org = await convex.query(api.queries.orgs.getBySlug, { slug: orgSlug })
|
|
883
|
-
|
|
884
|
-
if (!org) {
|
|
885
|
-
return new Response('Organization not found', { status: 404 })
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
// Inject org context into request
|
|
889
|
-
context.locals.org = org
|
|
890
|
-
context.locals.orgId = org._id
|
|
891
|
-
|
|
892
|
-
return next()
|
|
893
|
-
}
|
|
894
|
-
```
|
|
895
|
-
|
|
896
|
-
---
|
|
897
|
-
|
|
898
|
-
## Code Generation Patterns
|
|
899
|
-
|
|
900
|
-
### 1. Thing → CRUD Components
|
|
901
|
-
|
|
902
|
-
**Input:** Thing type definition
|
|
903
|
-
|
|
904
|
-
**Output:** Full CRUD components
|
|
905
|
-
|
|
906
|
-
```typescript
|
|
907
|
-
async function generateCRUD(thingType: ThingType) {
|
|
908
|
-
const definition = ontology.getDefinition(thingType)
|
|
909
|
-
|
|
910
|
-
// Generate list component
|
|
911
|
-
const list = `
|
|
912
|
-
import { useQuery } from 'convex/react'
|
|
913
|
-
import { api } from '@/convex/_generated/api'
|
|
914
|
-
|
|
915
|
-
export function ${pascalCase(thingType)}List({ orgId }) {
|
|
916
|
-
const items = useQuery(api.queries.${thingType}.list, { orgId })
|
|
917
|
-
|
|
918
|
-
return (
|
|
919
|
-
<div class="grid gap-4">
|
|
920
|
-
{items?.map(item => (
|
|
921
|
-
<${pascalCase(thingType)}Card key={item._id} item={item} />
|
|
922
|
-
))}
|
|
923
|
-
</div>
|
|
924
|
-
)
|
|
925
|
-
}
|
|
926
|
-
`
|
|
927
|
-
|
|
928
|
-
// Generate create form
|
|
929
|
-
const form = `
|
|
930
|
-
import { useMutation } from 'convex/react'
|
|
931
|
-
import { api } from '@/convex/_generated/api'
|
|
932
|
-
|
|
933
|
-
export function Create${pascalCase(thingType)}() {
|
|
934
|
-
const create = useMutation(api.mutations.${thingType}.create)
|
|
935
|
-
|
|
936
|
-
return (
|
|
937
|
-
<form onSubmit={async (e) => {
|
|
938
|
-
e.preventDefault()
|
|
939
|
-
const formData = new FormData(e.currentTarget)
|
|
940
|
-
await create({
|
|
941
|
-
${definition.fields.map(f => `${f.name}: formData.get('${f.name}')`).join(',\n ')}
|
|
942
|
-
})
|
|
943
|
-
}}>
|
|
944
|
-
${definition.fields.map(f => `
|
|
945
|
-
<label>
|
|
946
|
-
${f.label}
|
|
947
|
-
<input name="${f.name}" type="${f.inputType}" required={${f.required}} />
|
|
948
|
-
</label>
|
|
949
|
-
`).join('\n')}
|
|
950
|
-
<button type="submit">Create</button>
|
|
951
|
-
</form>
|
|
952
|
-
)
|
|
953
|
-
}
|
|
954
|
-
`
|
|
955
|
-
|
|
956
|
-
// Generate backend mutations
|
|
957
|
-
const mutations = `
|
|
958
|
-
import { v } from 'convex/values'
|
|
959
|
-
import { mutation } from './_generated/server'
|
|
960
|
-
|
|
961
|
-
export const create = mutation({
|
|
962
|
-
args: {
|
|
963
|
-
${definition.fields.map(f => `${f.name}: v.${f.vType}()`).join(',\n ')}
|
|
964
|
-
},
|
|
965
|
-
handler: async (ctx, args) => {
|
|
966
|
-
// Create thing
|
|
967
|
-
const id = await ctx.db.insert('things', {
|
|
968
|
-
type: '${thingType}',
|
|
969
|
-
name: args.${definition.nameField || 'name'},
|
|
970
|
-
properties: args,
|
|
971
|
-
status: 'active',
|
|
972
|
-
createdAt: Date.now(),
|
|
973
|
-
updatedAt: Date.now()
|
|
974
|
-
})
|
|
975
|
-
|
|
976
|
-
// Log event
|
|
977
|
-
await ctx.db.insert('events', {
|
|
978
|
-
type: 'entity_created',
|
|
979
|
-
actorId: ctx.auth.userId,
|
|
980
|
-
targetId: id,
|
|
981
|
-
timestamp: Date.now(),
|
|
982
|
-
metadata: { thingType: '${thingType}' }
|
|
983
|
-
})
|
|
984
|
-
|
|
985
|
-
return id
|
|
986
|
-
}
|
|
987
|
-
})
|
|
988
|
-
`
|
|
989
|
-
|
|
990
|
-
return { list, form, mutations }
|
|
991
|
-
}
|
|
992
|
-
```
|
|
993
|
-
|
|
994
|
-
### 2. Connection → Relationship Components
|
|
995
|
-
|
|
996
|
-
**Input:** Connection type definition
|
|
997
|
-
|
|
998
|
-
**Output:** Relationship management UI
|
|
999
|
-
|
|
1000
|
-
```typescript
|
|
1001
|
-
async function generateRelationshipUI(connectionType: ConnectionType) {
|
|
1002
|
-
// Generate "Add Connection" button
|
|
1003
|
-
const addButton = `
|
|
1004
|
-
export function Add${pascalCase(connectionType)}({ fromId, toType }) {
|
|
1005
|
-
const [open, setOpen] = useState(false)
|
|
1006
|
-
const createConnection = useMutation(api.mutations.connections.create)
|
|
1007
|
-
|
|
1008
|
-
return (
|
|
1009
|
-
<>
|
|
1010
|
-
<button onClick={() => setOpen(true)}>
|
|
1011
|
-
Add {connectionType}
|
|
1012
|
-
</button>
|
|
1013
|
-
|
|
1014
|
-
<Dialog open={open} onClose={() => setOpen(false)}>
|
|
1015
|
-
<ThingPicker
|
|
1016
|
-
type={toType}
|
|
1017
|
-
onSelect={async (toId) => {
|
|
1018
|
-
await createConnection({
|
|
1019
|
-
fromThingId: fromId,
|
|
1020
|
-
toThingId: toId,
|
|
1021
|
-
relationshipType: '${connectionType}'
|
|
1022
|
-
})
|
|
1023
|
-
setOpen(false)
|
|
1024
|
-
}}
|
|
1025
|
-
/>
|
|
1026
|
-
</Dialog>
|
|
1027
|
-
</>
|
|
1028
|
-
)
|
|
1029
|
-
}
|
|
1030
|
-
`
|
|
1031
|
-
|
|
1032
|
-
// Generate "Show Connections" list
|
|
1033
|
-
const list = `
|
|
1034
|
-
export function ${pascalCase(connectionType)}List({ thingId }) {
|
|
1035
|
-
const connections = useQuery(api.queries.connections.list, {
|
|
1036
|
-
fromThingId: thingId,
|
|
1037
|
-
relationshipType: '${connectionType}'
|
|
1038
|
-
})
|
|
1039
|
-
|
|
1040
|
-
return (
|
|
1041
|
-
<div>
|
|
1042
|
-
<h3>{connectionType}s</h3>
|
|
1043
|
-
{connections?.map(conn => (
|
|
1044
|
-
<ConnectionCard key={conn._id} connection={conn} />
|
|
1045
|
-
))}
|
|
1046
|
-
</div>
|
|
1047
|
-
)
|
|
1048
|
-
}
|
|
1049
|
-
`
|
|
1050
|
-
|
|
1051
|
-
return { addButton, list }
|
|
1052
|
-
}
|
|
1053
|
-
```
|
|
1054
|
-
|
|
1055
|
-
### 3. Event → Analytics Dashboard
|
|
1056
|
-
|
|
1057
|
-
**Input:** Event types for org
|
|
1058
|
-
|
|
1059
|
-
**Output:** Analytics dashboard
|
|
1060
|
-
|
|
1061
|
-
```typescript
|
|
1062
|
-
async function generateAnalyticsDashboard(orgId: Id<'things'>) {
|
|
1063
|
-
// Get all event types used by this org
|
|
1064
|
-
const eventTypes = await db
|
|
1065
|
-
.query('events')
|
|
1066
|
-
.filter(q => q.eq(q.field('groupId'), orgId))
|
|
1067
|
-
.collect()
|
|
1068
|
-
.then(events => [...new Set(events.map(e => e.type))])
|
|
1069
|
-
|
|
1070
|
-
// Generate metrics for each event type
|
|
1071
|
-
const dashboard = `
|
|
1072
|
-
export function AnalyticsDashboard({ orgId }) {
|
|
1073
|
-
${eventTypes.map(type => `
|
|
1074
|
-
const ${camelCase(type)}Count = useQuery(api.queries.analytics.count, {
|
|
1075
|
-
orgId,
|
|
1076
|
-
eventType: '${type}',
|
|
1077
|
-
period: '30d'
|
|
1078
|
-
})
|
|
1079
|
-
`).join('\n')}
|
|
1080
|
-
|
|
1081
|
-
return (
|
|
1082
|
-
<div class="dashboard">
|
|
1083
|
-
${eventTypes.map(type => `
|
|
1084
|
-
<MetricCard
|
|
1085
|
-
title="${titleCase(type)}"
|
|
1086
|
-
value={${camelCase(type)}Count}
|
|
1087
|
-
change={calculateChange(${camelCase(type)}Count)}
|
|
1088
|
-
/>
|
|
1089
|
-
`).join('\n')}
|
|
1090
|
-
</div>
|
|
1091
|
-
)
|
|
1092
|
-
}
|
|
1093
|
-
`
|
|
1094
|
-
|
|
1095
|
-
return dashboard
|
|
1096
|
-
}
|
|
1097
|
-
```
|
|
1098
|
-
|
|
1099
|
-
---
|
|
1100
|
-
|
|
1101
|
-
## Performance Optimization
|
|
1102
|
-
|
|
1103
|
-
### 1. Context Budget Management
|
|
1104
|
-
|
|
1105
|
-
**Rule:** Every agent has a max context budget.
|
|
1106
|
-
|
|
1107
|
-
```typescript
|
|
1108
|
-
class Agent {
|
|
1109
|
-
maxContextTokens = 5000
|
|
1110
|
-
currentContext: any[] = []
|
|
1111
|
-
|
|
1112
|
-
async addContext(item: any) {
|
|
1113
|
-
const tokens = estimateTokens(item)
|
|
1114
|
-
|
|
1115
|
-
if (this.totalTokens() + tokens > this.maxContextTokens) {
|
|
1116
|
-
// Evict least recently used context
|
|
1117
|
-
this.evictLRU()
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
this.currentContext.push({ item, tokens, lastUsed: Date.now() })
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
totalTokens() {
|
|
1124
|
-
return this.currentContext.reduce((sum, c) => sum + c.tokens, 0)
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
evictLRU() {
|
|
1128
|
-
this.currentContext.sort((a, b) => a.lastUsed - b.lastUsed)
|
|
1129
|
-
this.currentContext.shift()
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
```
|
|
1133
|
-
|
|
1134
|
-
### 2. Query Result Caching
|
|
1135
|
-
|
|
1136
|
-
**Pattern:** Cache query results to avoid redundant DB reads.
|
|
1137
|
-
|
|
1138
|
-
```typescript
|
|
1139
|
-
// Convex query with caching
|
|
1140
|
-
export const getCourseWithRelations = query({
|
|
1141
|
-
args: { courseId: v.id('things') },
|
|
1142
|
-
handler: async (ctx, { courseId }) => {
|
|
1143
|
-
// Check cache first
|
|
1144
|
-
const cacheKey = `course:${courseId}`
|
|
1145
|
-
const cached = await ctx.db.get(/* cache table */)
|
|
1146
|
-
|
|
1147
|
-
if (cached && Date.now() - cached.timestamp < 5 * 60 * 1000) {
|
|
1148
|
-
return cached.data
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
// Fetch from DB
|
|
1152
|
-
const data = await fetchCourseWithRelations(ctx, courseId)
|
|
1153
|
-
|
|
1154
|
-
// Cache result
|
|
1155
|
-
await ctx.db.insert('cache', {
|
|
1156
|
-
key: cacheKey,
|
|
1157
|
-
data,
|
|
1158
|
-
timestamp: Date.now(),
|
|
1159
|
-
ttl: 5 * 60 * 1000
|
|
1160
|
-
})
|
|
1161
|
-
|
|
1162
|
-
return data
|
|
1163
|
-
}
|
|
1164
|
-
})
|
|
1165
|
-
```
|
|
1166
|
-
|
|
1167
|
-
### 3. Lazy Loading
|
|
1168
|
-
|
|
1169
|
-
**Pattern:** Load data only when visible.
|
|
1170
|
-
|
|
1171
|
-
```tsx
|
|
1172
|
-
export function ThingGrid({ things }: { things: Thing[] }) {
|
|
1173
|
-
return (
|
|
1174
|
-
<div class="grid">
|
|
1175
|
-
{things.map(thing => (
|
|
1176
|
-
<LazyLoad key={thing._id} offset={100}>
|
|
1177
|
-
<ThingCard thingId={thing._id} />
|
|
1178
|
-
</LazyLoad>
|
|
1179
|
-
))}
|
|
1180
|
-
</div>
|
|
1181
|
-
)
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
function ThingCard({ thingId }: { thingId: Id<'things'> }) {
|
|
1185
|
-
// Only queries when visible
|
|
1186
|
-
const thing = useQuery(api.queries.things.get, { id: thingId })
|
|
1187
|
-
|
|
1188
|
-
if (!thing) return <Skeleton />
|
|
1189
|
-
return <Card {...thing} />
|
|
1190
|
-
}
|
|
1191
|
-
```
|
|
1192
|
-
|
|
1193
|
-
### 4. Batch Operations
|
|
1194
|
-
|
|
1195
|
-
**Pattern:** Batch creates/updates to reduce mutations.
|
|
1196
|
-
|
|
1197
|
-
```typescript
|
|
1198
|
-
// Instead of N mutations
|
|
1199
|
-
for (const lesson of lessons) {
|
|
1200
|
-
await createLesson(lesson) // N calls
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
// Batch into 1 mutation
|
|
1204
|
-
export const createLessonsBatch = mutation({
|
|
1205
|
-
args: { lessons: v.array(v.any()) },
|
|
1206
|
-
handler: async (ctx, { lessons }) => {
|
|
1207
|
-
const ids = []
|
|
1208
|
-
|
|
1209
|
-
for (const lesson of lessons) {
|
|
1210
|
-
const id = await ctx.db.insert('things', {
|
|
1211
|
-
type: 'lesson',
|
|
1212
|
-
name: lesson.title,
|
|
1213
|
-
properties: lesson,
|
|
1214
|
-
status: 'active',
|
|
1215
|
-
createdAt: Date.now(),
|
|
1216
|
-
updatedAt: Date.now()
|
|
1217
|
-
})
|
|
1218
|
-
ids.push(id)
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
// Single event for batch
|
|
1222
|
-
await ctx.db.insert('events', {
|
|
1223
|
-
type: 'entity_created',
|
|
1224
|
-
actorId: ctx.auth.userId,
|
|
1225
|
-
timestamp: Date.now(),
|
|
1226
|
-
metadata: {
|
|
1227
|
-
thingType: 'lesson',
|
|
1228
|
-
batchSize: lessons.length,
|
|
1229
|
-
ids
|
|
1230
|
-
}
|
|
1231
|
-
})
|
|
1232
|
-
|
|
1233
|
-
return ids
|
|
1234
|
-
}
|
|
1235
|
-
})
|
|
1236
|
-
```
|
|
1237
|
-
|
|
1238
|
-
---
|
|
1239
|
-
|
|
1240
|
-
## Summary: Engineering Principles
|
|
1241
|
-
|
|
1242
|
-
### 1. **Minimal Context is Beautiful**
|
|
1243
|
-
- Never load full ontology
|
|
1244
|
-
- Query-first, load-on-demand
|
|
1245
|
-
- Cache frequently used patterns
|
|
1246
|
-
- Evict stale context aggressively
|
|
1247
|
-
|
|
1248
|
-
### 2. **Specialist Agents Win**
|
|
1249
|
-
- 10 small experts beat 1 generalist
|
|
1250
|
-
- Each agent has focused context
|
|
1251
|
-
- Agents compose via orchestration
|
|
1252
|
-
- Parallel execution when possible
|
|
1253
|
-
|
|
1254
|
-
### 3. **Ontology Drives Everything**
|
|
1255
|
-
- Schema generation from ontology
|
|
1256
|
-
- Component generation from thing types
|
|
1257
|
-
- Query optimization from indexes
|
|
1258
|
-
- Analytics from event types
|
|
1259
|
-
|
|
1260
|
-
### 4. **Dynamic is Better Than Static**
|
|
1261
|
-
- Generate components at build time
|
|
1262
|
-
- Generate pages from org content
|
|
1263
|
-
- Real-time updates via subscriptions
|
|
1264
|
-
- Multi-tenant routing
|
|
1265
|
-
|
|
1266
|
-
### 5. **Performance Through Design**
|
|
1267
|
-
- Index-first queries
|
|
1268
|
-
- Batch operations
|
|
1269
|
-
- Lazy loading
|
|
1270
|
-
- Result caching
|
|
1271
|
-
|
|
1272
|
-
---
|
|
1273
|
-
|
|
1274
|
-
## Next Steps
|
|
1275
|
-
|
|
1276
|
-
1. **Implement Core Agents**
|
|
1277
|
-
- Start with Ontology Agent (router)
|
|
1278
|
-
- Add Query Agent (most used)
|
|
1279
|
-
- Add Mutation Agent (critical path)
|
|
1280
|
-
|
|
1281
|
-
2. **Build Code Generators**
|
|
1282
|
-
- Thing → CRUD components
|
|
1283
|
-
- Connection → Relationship UI
|
|
1284
|
-
- Event → Analytics dashboards
|
|
1285
|
-
|
|
1286
|
-
3. **Create Template System**
|
|
1287
|
-
- 3 base templates (minimal, showcase, portfolio)
|
|
1288
|
-
- Component library
|
|
1289
|
-
- Deployment pipeline
|
|
1290
|
-
|
|
1291
|
-
4. **Optimize Context Usage**
|
|
1292
|
-
- Measure token usage per operation
|
|
1293
|
-
- Set budgets per agent
|
|
1294
|
-
- Monitor and optimize
|
|
1295
|
-
|
|
1296
|
-
5. **Scale Testing**
|
|
1297
|
-
- 100 orgs × 1000 things each
|
|
1298
|
-
- Context usage under load
|
|
1299
|
-
- Query performance
|
|
1300
|
-
- Real-time subscription limits
|
|
1301
|
-
|
|
1302
|
-
---
|
|
1303
|
-
|
|
1304
|
-
**Philosophy:** Context is expensive. Intelligence is cheap when focused. The ontology is our compression algorithm.
|
|
1305
|
-
|
|
1306
|
-
**Result:** Build infinitely complex systems with minimal context by leveraging specialist agents and dynamic generation from a stable 6-dimension ontology.
|
|
1307
|
-
|
|
1308
|
-
---
|
|
1309
|
-
|
|
1310
|
-
**END OF ONTOLOGY ENGINEERING SPECIFICATION**
|