oneie 3.6.14 → 3.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/agent-director.md +6 -6
- package/.claude/agents/agent-onboard.md +8 -8
- package/.claude/commands/cascade.md +49 -20
- package/.claude/commands/create.md +397 -0
- package/.claude/commands/npx.md +64 -113
- package/.claude/commands/one.md +10 -28
- package/.claude/commands/plan.md +65 -65
- package/.claude/commands/push.md +63 -452
- package/.claude/commands/release.md +26 -395
- package/.claude/hooks/README-knowledge-hooks.md +4 -4
- package/.claude/hooks/README.md +13 -13
- package/.claude/hooks/clean-root-markdown.sh +73 -0
- package/.claude/hooks/track-changes.sh +101 -0
- package/.claude/skills/ontology/README.md +1 -1
- package/CLAUDE.md +38 -25
- package/one/README.md +3 -3
- package/one/connections/documentation.md +1 -1
- package/one/connections/inference.md +9 -9
- package/one/connections/workflow-copy.md +1 -1
- package/one/connections/workflow-onboarding.md +85 -85
- package/one/connections/workflow.md +1 -1
- package/one/groups/groups.md +31 -31
- package/one/groups/one.md +26 -26
- package/one/knowledge/100-inference-quick-reference.md +38 -38
- package/one/knowledge/ai-token-crypto-analysis-framework.md +15 -15
- package/one/knowledge/archived/ontology.old.md +11 -11
- package/one/knowledge/audit-agent-onboard-alignment.md +1 -1
- package/one/knowledge/cli-claude-handoff.md +36 -36
- package/one/knowledge/crypto-analysis-strategy.md +8 -8
- package/one/knowledge/event-driven-documentation.md +270 -0
- package/one/knowledge/knowledge.md +28 -28
- package/one/knowledge/lessons-website-building-focus.md +1 -1
- package/one/knowledge/metadata-system.md +11 -11
- package/one/knowledge/ontology-crypto.md +19 -19
- package/one/knowledge/ontology-documentation.md +7 -7
- package/one/knowledge/ontology-engineering.md +3 -3
- package/one/knowledge/ontology-files.yaml +3 -3
- package/one/knowledge/ontology-release.md +3 -3
- package/one/knowledge/ontology.md +10 -10
- package/one/knowledge/ontology.yaml +7 -7
- package/one/knowledge/score.md +4 -4
- package/one/knowledge/todo-template.md +55 -55
- package/one/knowledge/todo.md +55 -55
- package/one/knowledge/typescript-patterns.md +1 -1
- package/one/knowledge/x402-research.md +1 -1
- package/one/people/anthony-o-connell.md +19 -19
- package/one/people/people.md +1 -1
- package/one/things/IMPLEMENTATION_STATUS.md +12 -12
- package/one/things/agents/agent-backend.md +4 -4
- package/one/things/agents/agent-clean.md +16 -16
- package/one/things/agents/agent-deploy.md +6 -6
- package/one/things/agents/agent-sales.md +6 -6
- package/one/things/claude/agents/nextjs-15-specialist.md +1 -1
- package/one/things/demo-design-summary.md +6 -6
- package/one/things/examples/enterprise/crm-saas.md +24 -24
- package/one/things/features/2-1-dataprovider-interface.md +6 -6
- package/one/things/features/2-3-effectts-services.md +7 -7
- package/one/things/features/2-4-react-hooks.md +4 -4
- package/one/things/features/2-cli.md +3 -3
- package/one/things/features/2-design.md +2 -2
- package/one/things/features/use-one-backend.md +2 -2
- package/one/things/files.yaml +3 -3
- package/one/things/implementation/backend-guide.md +1 -1
- package/one/things/interface.md +8 -8
- package/one/things/landing-page-implementation.md +10 -10
- package/one/things/legal/privacy-policy.md +2 -2
- package/one/things/legal/terms-of-service.md +6 -6
- package/one/things/master-workflow-plan.md +16 -16
- package/one/things/plans/0-in-sync.md +136 -0
- package/one/things/plans/SIMPLIFICATION-SUMMARY.md +4 -4
- package/one/things/plans/ai-elements.md +7 -7
- package/one/things/plans/ai-integration.md +3 -3
- package/one/things/plans/ai-sdk.md +8 -8
- package/one/things/plans/backend-cleanup-quickstart.md +3 -3
- package/one/things/plans/backend-ontology-conformance.md +40 -40
- package/one/things/plans/backend-status.md +6 -6
- package/one/things/plans/backend-target-structure.md +2 -2
- package/one/things/plans/backend.md +1 -1
- package/one/things/plans/better-auth-any-backend.md +1 -1
- package/one/things/plans/components.md +32 -32
- package/one/things/plans/convex-agents.md +8 -8
- package/one/things/plans/deep-researcher-agent.md +1 -1
- package/one/things/plans/development-plan.md +49 -49
- package/one/things/plans/development-workflow.md +1 -1
- package/one/things/plans/effect.md +6 -6
- package/one/things/plans/execution-strategy.md +61 -61
- package/one/things/plans/existing-infrastructure.md +1 -1
- package/one/things/plans/frontend-effects.md +10 -10
- package/one/things/plans/group-folder-multi-tenancy.md +95 -95
- package/one/things/plans/integrate-frontend-and-backend.md +9 -9
- package/one/things/plans/onboarding.md +2 -2
- package/one/things/plans/ontology-6-dimensions.md +7 -7
- package/one/things/plans/ontology-compliance-audit.md +1 -1
- package/one/things/plans/phase-1-foundation.md +12 -12
- package/one/things/plans/readme-backend-cleanup.md +3 -3
- package/one/things/plans/sequence.md +129 -129
- package/one/things/plans/skills.md +30 -30
- package/one/things/plans/start-new.md +5 -5
- package/one/things/plans/sync-checklist.md +4 -4
- package/one/things/plans/unified-implementation-plan.md +1 -1
- package/one/things/plans/update-demos.md +53 -53
- package/one/things/plans/use-our-backend.md +30 -30
- package/one/things/plans/wave1-onboarding-100-inferences.md +152 -152
- package/one/things/plans/wave1-onboarding-vision.md +7 -7
- package/one/things/plans/wave1-orchestration-summary.md +67 -67
- package/one/things/plans/wave1-specialist-assignments.md +121 -121
- package/one/things/products/ontology.md +2 -2
- package/one/things/repos/all-repos.md +0 -0
- package/one/things/structure.md +2 -2
- package/one/things/tests/2-1-dataprovider-interface.md +2 -2
- package/one/things/tests/2-1-test-analysis.md +1 -1
- package/one/things/things.md +3 -3
- package/one/things/todo-acp-integration.md +33 -33
- package/one/things/todo-ai.md +37 -37
- package/one/things/todo-api.md +114 -114
- package/one/things/todo-assignment.md +39 -39
- package/one/things/todo-buy-chatgpt.md +113 -113
- package/one/things/todo-components.md +211 -211
- package/one/things/todo-ecommerce-frontend.md +82 -82
- package/one/things/todo-ecommerce.md +36 -36
- package/one/things/todo-effects.md +36 -36
- package/one/things/todo-frontend-effects.md +25 -25
- package/one/things/todo-landing-page.md +63 -63
- package/one/things/todo-mail.md +73 -73
- package/one/things/todo-master-plan.md +32 -32
- package/one/things/todo-onboard.md +48 -48
- package/one/things/todo-one-ie.md +48 -48
- package/one/things/todo-page.md +42 -42
- package/one/things/todo-plans.md +48 -48
- package/one/things/todo-refactoring-plan.md +5 -5
- package/one/things/todo-sequence.md +98 -98
- package/one/things/todo-use-our-backend.md +219 -219
- package/one/things/todo-x402.md +116 -116
- package/one/things/video-script-ontology.md +20 -20
- package/package.json +7 -2
- package/.claude/commands/build.md +0 -293
- package/one/.claude/settings.local.json +0 -11
- package/one/.obsidian/app.json +0 -8
- package/one/.obsidian/appearance.json +0 -1
- package/one/.obsidian/community-plugins.json +0 -5
- package/one/.obsidian/core-plugins.json +0 -33
- package/one/.obsidian/plugins/easy-bake/main.js +0 -361
- package/one/.obsidian/plugins/easy-bake/manifest.json +0 -11
- package/one/.obsidian/plugins/easy-bake/styles.css +0 -10
- package/one/.obsidian/plugins/editing-toolbar/data.json +0 -328
- package/one/.obsidian/plugins/editing-toolbar/main.js +0 -12
- package/one/.obsidian/plugins/editing-toolbar/manifest.json +0 -10
- package/one/.obsidian/plugins/editing-toolbar/styles.css +0 -1338
- package/one/.obsidian/plugins/terminal/data.json +0 -154
- package/one/.obsidian/plugins/terminal/main.js +0 -197
- package/one/.obsidian/plugins/terminal/manifest.json +0 -14
- package/one/.obsidian/plugins/terminal/styles.css +0 -32
- package/one/.obsidian/workspace.json +0 -266
- 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/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/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/CLAUDE copy.md +0 -897
- package/one/events/CLEANUP-RELEASE-V2.0.8.md +0 -308
- package/one/events/CONNECTIONS_DEMO.md +0 -519
- package/one/events/CREATE-WEBSITE.md +0 -460
- package/one/events/CRITICAL-FIXES-COMPLETE.md +0 -522
- package/one/events/CUSTOM-DOMAIN.md +0 -375
- package/one/events/DELIVERABLES.md +0 -450
- 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/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-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/FEATURE-2-4-COMPLETE.md +0 -320
- package/one/events/FEATURE_2_3_COMPLETE.md +0 -593
- 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-SUMMARY-FINAL.md +0 -521
- package/one/events/IMPLEMENTATION_SUMMARY.md +0 -547
- 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/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 -1645
- package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +0 -591
- 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 -543
- package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +0 -473
- 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/PLAYBOOK-SETUP-SUMMARY.md +0 -349
- package/one/events/PROMPT_FIX_FRONTEND_ONLY.md +0 -585
- package/one/events/QA-CHECKLIST.md +0 -692
- package/one/events/QUICK-START-ONTOLOGY.md +0 -426
- package/one/events/README-archived.md +0 -537
- 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/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/VIEW-TRANSITIONS.md +0 -446
- package/one/events/agent-director-enhancement-summary.md +0 -404
- package/one/events/agent-onboard-implementation-summary.md +0 -475
- package/one/events/agent-ontology-alignment-completion.md +0 -263
- 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/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/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/events.md +0 -563
- 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/onboarding-implementation-complete.md +0 -523
- package/one/events/ontology-test-examples.md +0 -580
- package/one/events/phase1-backend-implementation-complete.md +0 -536
- package/one/events/release.md +0 -272
- package/one/events/root-cleanup-alignment-report.md +0 -265
- package/one/events/separate-implementation-status.md +0 -555
- 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/structural-analysis-architecture-vs-plans.md +0 -559
- package/one/events/test-dashboard.md +0 -363
- package/one/events/test-index.md +0 -379
- package/one/events/test-report-ontology.md +0 -600
- package/one/events/testing-summary.md +0 -362
- package/one/events/todo-refactoring-complete.md +0 -408
- package/one/events/wave1-backend-implementation-complete.md +0 -698
|
@@ -353,24 +353,24 @@ export function CreateCourseForm() {
|
|
|
353
353
|
|
|
354
354
|
---
|
|
355
355
|
|
|
356
|
-
## Lessons Learned (
|
|
356
|
+
## Lessons Learned (Cycle 1-40)
|
|
357
357
|
|
|
358
|
-
✅ **
|
|
359
|
-
✅ **
|
|
360
|
-
✅ **
|
|
358
|
+
✅ **Cycle 011-020:** DataProvider interface design is elegant and enforces ontology
|
|
359
|
+
✅ **Cycle 021-030:** Effect.ts services are composable and type-safe
|
|
360
|
+
✅ **Cycle 031-040:** React hooks integrate seamlessly with Effect programs
|
|
361
361
|
|
|
362
362
|
---
|
|
363
363
|
|
|
364
364
|
## Timeline
|
|
365
365
|
|
|
366
|
-
- **Day 1-5:** ✅ DataProvider + ConvexProvider (
|
|
367
|
-
- **Day 5-12:** ✅ Services Layer + React Hooks (
|
|
368
|
-
- **Day 10-13:** ⏳ Astro Integration (
|
|
369
|
-
- **Day 14-28:** ⏳ Component Migration (
|
|
370
|
-
- **Day 14-28:** ⏳ Testing & Validation (
|
|
371
|
-
- **Day 21-28:** ⏳ Error Handling & Resilience (
|
|
372
|
-
- **Day 14-28:** ⏳ Documentation (
|
|
373
|
-
- **Day 28-35:** ⏳ Performance & Deployment (
|
|
366
|
+
- **Day 1-5:** ✅ DataProvider + ConvexProvider (Cycle 011-020)
|
|
367
|
+
- **Day 5-12:** ✅ Services Layer + React Hooks (Cycle 021-040)
|
|
368
|
+
- **Day 10-13:** ⏳ Astro Integration (Cycle 041-050)
|
|
369
|
+
- **Day 14-28:** ⏳ Component Migration (Cycle 051-070)
|
|
370
|
+
- **Day 14-28:** ⏳ Testing & Validation (Cycle 071-080)
|
|
371
|
+
- **Day 21-28:** ⏳ Error Handling & Resilience (Cycle 081-085)
|
|
372
|
+
- **Day 14-28:** ⏳ Documentation (Cycle 086-095)
|
|
373
|
+
- **Day 28-35:** ⏳ Performance & Deployment (Cycle 096-100)
|
|
374
374
|
|
|
375
375
|
---
|
|
376
376
|
|
|
@@ -451,8 +451,8 @@ export const logEvent = mutation({
|
|
|
451
451
|
// Analytics events
|
|
452
452
|
"metric_calculated" | "insight_generated" | "prediction_made"
|
|
453
453
|
|
|
454
|
-
//
|
|
455
|
-
"
|
|
454
|
+
// Cycle events
|
|
455
|
+
"cycle_request" | "cycle_completed" | "cycle_failed"
|
|
456
456
|
|
|
457
457
|
// Consolidated events (with metadata.protocol)
|
|
458
458
|
"content_event" | "payment_event" | "subscription_event" |
|
|
@@ -565,7 +565,7 @@ Implement Convex backend infrastructure that powers the 6-dimension ontology: sc
|
|
|
565
565
|
|
|
566
566
|
- Create organization (with plan, limits, billing)
|
|
567
567
|
- Update organization settings
|
|
568
|
-
- Track usage (users, storage, API calls,
|
|
568
|
+
- Track usage (users, storage, API calls, cycle)
|
|
569
569
|
- Enforce resource quotas
|
|
570
570
|
|
|
571
571
|
**People:**
|
|
@@ -670,7 +670,7 @@ Ontology Types:
|
|
|
670
670
|
Events:
|
|
671
671
|
- entity_created: actorId, targetId, metadata.entityType
|
|
672
672
|
- course_enrolled: actorId (student), targetId (course)
|
|
673
|
-
-
|
|
673
|
+
- cycle_request: actorId (user), metadata.prompt, metadata.tokens
|
|
674
674
|
|
|
675
675
|
Backend Patterns:
|
|
676
676
|
- Schema evolution (add fields without migration)
|
|
@@ -716,9 +716,9 @@ await ctx.db.insert("connections", {
|
|
|
716
716
|
|
|
717
717
|
## Infrastructure Hooks (NEW - v2.0)
|
|
718
718
|
|
|
719
|
-
Clean Agent now integrates directly into the
|
|
719
|
+
Clean Agent now integrates directly into the cycle workflow via two automated hooks that run before and after every cycle.
|
|
720
720
|
|
|
721
|
-
### Pre-
|
|
721
|
+
### Pre-Cycle Hook (`clean-pre.py`)
|
|
722
722
|
|
|
723
723
|
**Runs:** Before UserPromptSubmit (automatic)
|
|
724
724
|
**Purpose:** Validate cleanliness before starting work
|
|
@@ -753,9 +753,9 @@ Clean Agent now integrates directly into the inference workflow via two automate
|
|
|
753
753
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
754
754
|
```
|
|
755
755
|
|
|
756
|
-
### Post-
|
|
756
|
+
### Post-Cycle Hook (`clean-post.py`)
|
|
757
757
|
|
|
758
|
-
**Runs:** After
|
|
758
|
+
**Runs:** After cycle completion (automatic)
|
|
759
759
|
**Purpose:** Clean up and organize after work
|
|
760
760
|
|
|
761
761
|
**Actions Performed:**
|
|
@@ -772,7 +772,7 @@ Clean Agent now integrates directly into the inference workflow via two automate
|
|
|
772
772
|
|
|
773
773
|
```
|
|
774
774
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
775
|
-
🧹 CLEANUP COMPLETE - Agent Clean Post-
|
|
775
|
+
🧹 CLEANUP COMPLETE - Agent Clean Post-Cycle
|
|
776
776
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
777
777
|
|
|
778
778
|
📊 CLEANUP METRICS:
|
|
@@ -813,7 +813,7 @@ Clean Agent now integrates directly into the inference workflow via two automate
|
|
|
813
813
|
|
|
814
814
|
**5x Faster Execution:**
|
|
815
815
|
|
|
816
|
-
- Clean environment = faster
|
|
816
|
+
- Clean environment = faster cycle
|
|
817
817
|
- No time wasted on orphaned files
|
|
818
818
|
- Automatic organization saves manual work
|
|
819
819
|
|
|
@@ -891,7 +891,7 @@ status: published
|
|
|
891
891
|
owner: Platform Team
|
|
892
892
|
specialist: quality
|
|
893
893
|
ontology_entities: [intelligence_agent, report, knowledge]
|
|
894
|
-
|
|
894
|
+
cycle_usage: [61, 62, 63, 64, 65, 66, 67, 68, 69, 70]
|
|
895
895
|
ai_context: |
|
|
896
896
|
Specifies the Clean Agent responsible for code quality and refactoring.
|
|
897
897
|
Reads code, detects smells, applies patterns, removes technical debt.
|
|
@@ -934,7 +934,7 @@ python3 .claude/hooks/metadata-report.py
|
|
|
934
934
|
- 🧭 **Navigation**: Find relevant documents in <100ms
|
|
935
935
|
- 🧠 **Context**: Understand purpose without reading full content
|
|
936
936
|
- 🔗 **Relationships**: Build knowledge graphs connecting concepts
|
|
937
|
-
- 📊 **
|
|
937
|
+
- 📊 **Cycle**: Make better decisions with rich context
|
|
938
938
|
- 🎯 **Targeting**: Load only relevant docs into limited context windows
|
|
939
939
|
|
|
940
940
|
**For Human Developers:**
|
|
@@ -996,9 +996,9 @@ Clean Agent learns from every cleanup cycle.
|
|
|
996
996
|
|
|
997
997
|
### Learning Loop
|
|
998
998
|
|
|
999
|
-
1. **Pre-
|
|
1000
|
-
2. **
|
|
1001
|
-
3. **Post-
|
|
999
|
+
1. **Pre-Cycle**: Identify cleanliness issues
|
|
1000
|
+
2. **Cycle**: Execute cleanup or refactoring
|
|
1001
|
+
3. **Post-Cycle**: Document what was cleaned and why
|
|
1002
1002
|
4. **Knowledge Update**: Store patterns in knowledge base
|
|
1003
1003
|
5. **Next Cycle**: Apply learned patterns automatically
|
|
1004
1004
|
|
|
@@ -1022,7 +1022,7 @@ Track improvement over time:
|
|
|
1022
1022
|
avgCleanlinessScore: 94, // Up from 78 in week 1
|
|
1023
1023
|
filesAutoTagged: 3250,
|
|
1024
1024
|
patternsLearned: 47,
|
|
1025
|
-
cleanupTimeReduced: "73%", // From 15min to 4min per
|
|
1025
|
+
cleanupTimeReduced: "73%", // From 15min to 4min per cycle
|
|
1026
1026
|
technicalDebtReduced: "42%"
|
|
1027
1027
|
}
|
|
1028
1028
|
```
|
|
@@ -1062,10 +1062,10 @@ one/
|
|
|
1062
1062
|
|
|
1063
1063
|
```
|
|
1064
1064
|
.claude/hooks/
|
|
1065
|
-
├── clean-pre.py # Pre-
|
|
1066
|
-
├── clean-post.py # Post-
|
|
1067
|
-
├── todo.py #
|
|
1068
|
-
├── done.py #
|
|
1065
|
+
├── clean-pre.py # Pre-cycle cleanliness validation
|
|
1066
|
+
├── clean-post.py # Post-cycle cleanup
|
|
1067
|
+
├── todo.py # Cycle context injection
|
|
1068
|
+
├── done.py # Cycle completion
|
|
1069
1069
|
├── tag-all-docs.py # Metadata tagging automation
|
|
1070
1070
|
└── validate-metadata.py # Metadata validation
|
|
1071
1071
|
```
|
|
@@ -496,7 +496,7 @@ await ctx.db.insert("events", {
|
|
|
496
496
|
|
|
497
497
|
Deploy Agent orchestrates the complete release workflow defined in `scripts/release.sh`:
|
|
498
498
|
|
|
499
|
-
### Steps 0-3: Validation & Core Repos (
|
|
499
|
+
### Steps 0-3: Validation & Core Repos (Cycle 81-82)
|
|
500
500
|
|
|
501
501
|
**Step 0: Pre-Flight Validation**
|
|
502
502
|
|
|
@@ -511,7 +511,7 @@ Deploy Agent orchestrates the complete release workflow defined in `scripts/rele
|
|
|
511
511
|
- Push /web → one-ie/web
|
|
512
512
|
- Push /backend → one-ie/backend
|
|
513
513
|
|
|
514
|
-
### Steps 4-6: Sync & Version (
|
|
514
|
+
### Steps 4-6: Sync & Version (Cycle 83-84)
|
|
515
515
|
|
|
516
516
|
**Step 4: Sync via folders.yaml**
|
|
517
517
|
|
|
@@ -530,7 +530,7 @@ Deploy Agent orchestrates the complete release workflow defined in `scripts/rele
|
|
|
530
530
|
- Bump apps/one/package.json
|
|
531
531
|
- Update cli/folders.yaml version
|
|
532
532
|
|
|
533
|
-
### Steps 7-9: Assembly & Status (
|
|
533
|
+
### Steps 7-9: Assembly & Status (Cycle 85-86)
|
|
534
534
|
|
|
535
535
|
**Step 7: Update Submodules**
|
|
536
536
|
|
|
@@ -548,7 +548,7 @@ Deploy Agent orchestrates the complete release workflow defined in `scripts/rele
|
|
|
548
548
|
- Show changes in cli/
|
|
549
549
|
- Show changes in apps/one/
|
|
550
550
|
|
|
551
|
-
### Steps 10-11: Commit & Push (
|
|
551
|
+
### Steps 10-11: Commit & Push (Cycle 87-88)
|
|
552
552
|
|
|
553
553
|
**Step 10: Commit & Push CLI**
|
|
554
554
|
|
|
@@ -562,7 +562,7 @@ Deploy Agent orchestrates the complete release workflow defined in `scripts/rele
|
|
|
562
562
|
- Push to one-ie/one (with submodules)
|
|
563
563
|
- Create and push git tag (if version bumped)
|
|
564
564
|
|
|
565
|
-
### Steps 12-13: Publish & Deploy (
|
|
565
|
+
### Steps 12-13: Publish & Deploy (Cycle 89-90)
|
|
566
566
|
|
|
567
567
|
**Step 12: Publish to npm** (manual approval required)
|
|
568
568
|
|
|
@@ -854,7 +854,7 @@ await ctx.db.insert("connections", {
|
|
|
854
854
|
|
|
855
855
|
## Release Integration
|
|
856
856
|
|
|
857
|
-
Deploy Agent integrates with the
|
|
857
|
+
Deploy Agent integrates with the cycle workflow via hooks and scheduled releases.
|
|
858
858
|
|
|
859
859
|
### Pre-Release Validation (via Hooks)
|
|
860
860
|
|
|
@@ -213,7 +213,7 @@ Autonomous sales agent that qualifies leads, guides org owner onboarding, assist
|
|
|
213
213
|
- **Segment outreach** - Tailor messages by industry, company size, use case
|
|
214
214
|
- **Time interventions** - Send reminders at optimal times based on timezone
|
|
215
215
|
- **Escalate blockers** - Flag KYC issues or technical problems to service agent
|
|
216
|
-
- **Celebrate wins** - Send congratulations on milestones (first
|
|
216
|
+
- **Celebrate wins** - Send congratulations on milestones (first cycle, team member invited)
|
|
217
217
|
|
|
218
218
|
---
|
|
219
219
|
|
|
@@ -277,13 +277,13 @@ Autonomous sales agent that qualifies leads, guides org owner onboarding, assist
|
|
|
277
277
|
|
|
278
278
|
```typescript
|
|
279
279
|
{
|
|
280
|
-
type: "
|
|
280
|
+
type: "cycle_request",
|
|
281
281
|
actorId: userId,
|
|
282
282
|
metadata: { organizationId: orgId, model: "gpt-4" }
|
|
283
283
|
}
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
**Action:** Update engagement score, celebrate first
|
|
286
|
+
**Action:** Update engagement score, celebrate first cycle, monitor usage patterns
|
|
287
287
|
|
|
288
288
|
#### Trial Expiry Events
|
|
289
289
|
|
|
@@ -549,7 +549,7 @@ const orgEvents = await ctx.db
|
|
|
549
549
|
|
|
550
550
|
// Step 2: Calculate engagement score
|
|
551
551
|
const engagementScore = calculateEngagement({
|
|
552
|
-
|
|
552
|
+
cyclesUsed: org.usage.cycle,
|
|
553
553
|
usersInvited: org.usage.users,
|
|
554
554
|
featuresExplored: countUniqueFeatures(orgEvents),
|
|
555
555
|
daysActive: countActiveDays(orgEvents),
|
|
@@ -748,7 +748,7 @@ await ctx.db.patch(orgId, {
|
|
|
748
748
|
limits: {
|
|
749
749
|
...org.limits,
|
|
750
750
|
// Unlock full trial limits
|
|
751
|
-
|
|
751
|
+
cycle: 10000, // Increased from restricted 100
|
|
752
752
|
},
|
|
753
753
|
updatedAt: Date.now(),
|
|
754
754
|
});
|
|
@@ -765,7 +765,7 @@ await sendEmail({
|
|
|
765
765
|
Next steps to maximize your trial:
|
|
766
766
|
1. Create your first AI agent
|
|
767
767
|
2. Invite team members
|
|
768
|
-
3. Run your first
|
|
768
|
+
3. Run your first cycle
|
|
769
769
|
|
|
770
770
|
Need help? Reply to this email or chat with me in-app.
|
|
771
771
|
`,
|
|
@@ -1123,7 +1123,7 @@ typescript_config:
|
|
|
1123
1123
|
type_checking: "noImplicitAny, noImplicitReturns, strictNullChecks"
|
|
1124
1124
|
|
|
1125
1125
|
advanced_patterns:
|
|
1126
|
-
generic_components: "Reusable components with proper type
|
|
1126
|
+
generic_components: "Reusable components with proper type cycle"
|
|
1127
1127
|
discriminated_unions: "Type-safe state management and API responses"
|
|
1128
1128
|
template_literals: "Type-safe routing and dynamic strings"
|
|
1129
1129
|
conditional_types: "Advanced type transformations and utilities"
|
|
@@ -20,7 +20,7 @@ ai_context: |
|
|
|
20
20
|
|
|
21
21
|
## Version 1.0.0 - Complete Design Specification Index
|
|
22
22
|
|
|
23
|
-
**Design Phase:**
|
|
23
|
+
**Design Phase:** Cycle 15-20 (Design & Wireframes)
|
|
24
24
|
**Status:** Ready for Frontend Implementation
|
|
25
25
|
**Target:** Lighthouse 95+ • WCAG 2.1 AA • Zero Accessibility Issues
|
|
26
26
|
|
|
@@ -352,7 +352,7 @@ import { DemoPlayground } from "@/components/demo/DemoPlayground";
|
|
|
352
352
|
|
|
353
353
|
## Implementation Timeline
|
|
354
354
|
|
|
355
|
-
### Phase 1: Setup (
|
|
355
|
+
### Phase 1: Setup (Cycle 21)
|
|
356
356
|
|
|
357
357
|
- [ ] Create `/web/src/pages/ontology/` directory
|
|
358
358
|
- [ ] Create `/web/src/components/demo/` directory
|
|
@@ -361,7 +361,7 @@ import { DemoPlayground } from "@/components/demo/DemoPlayground";
|
|
|
361
361
|
|
|
362
362
|
**Deliverable:** Directory structure ready
|
|
363
363
|
|
|
364
|
-
### Phase 2: Components (
|
|
364
|
+
### Phase 2: Components (Cycle 22-23)
|
|
365
365
|
|
|
366
366
|
- [ ] Implement `DemoContainer` wrapper
|
|
367
367
|
- [ ] Implement `DemoHero` component
|
|
@@ -372,7 +372,7 @@ import { DemoPlayground } from "@/components/demo/DemoPlayground";
|
|
|
372
372
|
|
|
373
373
|
**Deliverable:** All 9 demo components working
|
|
374
374
|
|
|
375
|
-
### Phase 3: Pages (
|
|
375
|
+
### Phase 3: Pages (Cycle 24-25)
|
|
376
376
|
|
|
377
377
|
- [ ] Implement `/ontology/` landing page (overview)
|
|
378
378
|
- [ ] Implement `/ontology/groups` demo page
|
|
@@ -384,7 +384,7 @@ import { DemoPlayground } from "@/components/demo/DemoPlayground";
|
|
|
384
384
|
|
|
385
385
|
**Deliverable:** All 7 dimension pages functional
|
|
386
386
|
|
|
387
|
-
### Phase 4: Polish (
|
|
387
|
+
### Phase 4: Polish (Cycle 26)
|
|
388
388
|
|
|
389
389
|
- [ ] Add animations and transitions
|
|
390
390
|
- [ ] Implement relationship graph visualization
|
|
@@ -395,7 +395,7 @@ import { DemoPlayground } from "@/components/demo/DemoPlayground";
|
|
|
395
395
|
|
|
396
396
|
**Deliverable:** Production-ready, fully accessible
|
|
397
397
|
|
|
398
|
-
### Phase 5: Testing (
|
|
398
|
+
### Phase 5: Testing (Cycle 27-28)
|
|
399
399
|
|
|
400
400
|
- [ ] Cross-browser testing (Chrome, Firefox, Safari, Edge)
|
|
401
401
|
- [ ] Mobile device testing (iOS, Android)
|
|
@@ -65,7 +65,7 @@ interface Organization {
|
|
|
65
65
|
users: number; // Max users in organization
|
|
66
66
|
storage: number; // GB
|
|
67
67
|
apiCalls: number; // Per month
|
|
68
|
-
|
|
68
|
+
cycle: number; // LLM calls per month
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
// Current Usage
|
|
@@ -73,7 +73,7 @@ interface Organization {
|
|
|
73
73
|
users: number;
|
|
74
74
|
storage: number;
|
|
75
75
|
apiCalls: number;
|
|
76
|
-
|
|
76
|
+
cycle: number;
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
// Billing Integration
|
|
@@ -210,7 +210,7 @@ Events record every action in the system, providing compliance, analytics, and d
|
|
|
210
210
|
- `deal_stage_changed` - Opportunity progressed
|
|
211
211
|
- `task_completed` - Task marked done
|
|
212
212
|
- `content_viewed` - User viewed content
|
|
213
|
-
- `
|
|
213
|
+
- `cycle_request` - AI agent invoked
|
|
214
214
|
|
|
215
215
|
### 6. Knowledge - Intelligence Layer
|
|
216
216
|
|
|
@@ -248,13 +248,13 @@ export const createOrganization = mutation({
|
|
|
248
248
|
handler: async (ctx, args) => {
|
|
249
249
|
// Define plan limits
|
|
250
250
|
const planLimits = {
|
|
251
|
-
starter: { users: 5, storage: 10, apiCalls: 10000,
|
|
252
|
-
pro: { users: 25, storage: 100, apiCalls: 100000,
|
|
251
|
+
starter: { users: 5, storage: 10, apiCalls: 10000, cycle: 5000 },
|
|
252
|
+
pro: { users: 25, storage: 100, apiCalls: 100000, cycle: 50000 },
|
|
253
253
|
enterprise: {
|
|
254
254
|
users: 1000,
|
|
255
255
|
storage: 1000,
|
|
256
256
|
apiCalls: 1000000,
|
|
257
|
-
|
|
257
|
+
cycle: 500000,
|
|
258
258
|
},
|
|
259
259
|
};
|
|
260
260
|
|
|
@@ -268,7 +268,7 @@ export const createOrganization = mutation({
|
|
|
268
268
|
status: "trial",
|
|
269
269
|
plan,
|
|
270
270
|
limits: planLimits[plan],
|
|
271
|
-
usage: { users: 0, storage: 0, apiCalls: 0,
|
|
271
|
+
usage: { users: 0, storage: 0, apiCalls: 0, cycle: 0 },
|
|
272
272
|
billing: { billingEmail: args.ownerEmail },
|
|
273
273
|
settings: {
|
|
274
274
|
allowSignups: true,
|
|
@@ -322,7 +322,7 @@ export const createOrganization = mutation({
|
|
|
322
322
|
|
|
323
323
|
// Increment usage
|
|
324
324
|
await ctx.db.patch(orgId, {
|
|
325
|
-
usage: { users: 1, storage: 0, apiCalls: 0,
|
|
325
|
+
usage: { users: 1, storage: 0, apiCalls: 0, cycle: 0 },
|
|
326
326
|
});
|
|
327
327
|
|
|
328
328
|
return { orgId, ownerId };
|
|
@@ -573,8 +573,8 @@ export const sendAIOutreach = mutation({
|
|
|
573
573
|
timestamp: Date.now(),
|
|
574
574
|
});
|
|
575
575
|
|
|
576
|
-
// Update
|
|
577
|
-
await incrementUsage(ctx, args.orgId, "
|
|
576
|
+
// Update cycle usage
|
|
577
|
+
await incrementUsage(ctx, args.orgId, "cycle", 1);
|
|
578
578
|
|
|
579
579
|
return { emailId, emailContent };
|
|
580
580
|
},
|
|
@@ -835,7 +835,7 @@ Each organization has independent quotas and billing.
|
|
|
835
835
|
export const checkQuota = async (
|
|
836
836
|
ctx: any,
|
|
837
837
|
orgId: Id<"organizations">,
|
|
838
|
-
resourceType: "users" | "storage" | "apiCalls" | "
|
|
838
|
+
resourceType: "users" | "storage" | "apiCalls" | "cycle",
|
|
839
839
|
) => {
|
|
840
840
|
const org = await ctx.db.get(orgId);
|
|
841
841
|
|
|
@@ -863,7 +863,7 @@ export const checkQuota = async (
|
|
|
863
863
|
export const incrementUsage = async (
|
|
864
864
|
ctx: any,
|
|
865
865
|
orgId: Id<"organizations">,
|
|
866
|
-
resourceType: "users" | "storage" | "apiCalls" | "
|
|
866
|
+
resourceType: "users" | "storage" | "apiCalls" | "cycle",
|
|
867
867
|
amount: number = 1,
|
|
868
868
|
) => {
|
|
869
869
|
const org = await ctx.db.get(orgId);
|
|
@@ -1013,24 +1013,24 @@ export const calculateRevenue = query({
|
|
|
1013
1013
|
revenueByPlan[org.plan].mrr += planPricing[org.plan];
|
|
1014
1014
|
});
|
|
1015
1015
|
|
|
1016
|
-
// Calculate
|
|
1017
|
-
const
|
|
1018
|
-
(sum, org) => sum + org.usage.
|
|
1016
|
+
// Calculate cycle costs
|
|
1017
|
+
const totalCycleCalls = orgs.reduce(
|
|
1018
|
+
(sum, org) => sum + org.usage.cycle,
|
|
1019
1019
|
0,
|
|
1020
1020
|
);
|
|
1021
1021
|
|
|
1022
|
-
const
|
|
1023
|
-
const
|
|
1022
|
+
const costPerCycle = 0.01; // $0.01 per call
|
|
1023
|
+
const cycleCosts = totalCycleCalls * costPerCycle;
|
|
1024
1024
|
|
|
1025
|
-
// Platform revenue = subscription fees +
|
|
1025
|
+
// Platform revenue = subscription fees + cycle markup
|
|
1026
1026
|
const subscriptionRevenue = Object.values(revenueByPlan).reduce(
|
|
1027
1027
|
(sum, plan) => sum + plan.mrr,
|
|
1028
1028
|
0,
|
|
1029
1029
|
);
|
|
1030
1030
|
|
|
1031
|
-
const
|
|
1031
|
+
const cycleRevenue = cycleCosts * 0.3; // 30% markup
|
|
1032
1032
|
|
|
1033
|
-
const totalRevenue = subscriptionRevenue +
|
|
1033
|
+
const totalRevenue = subscriptionRevenue + cycleRevenue;
|
|
1034
1034
|
|
|
1035
1035
|
return {
|
|
1036
1036
|
period: { startDate: args.startDate, endDate: args.endDate },
|
|
@@ -1040,13 +1040,13 @@ export const calculateRevenue = query({
|
|
|
1040
1040
|
},
|
|
1041
1041
|
revenue: {
|
|
1042
1042
|
subscriptions: subscriptionRevenue,
|
|
1043
|
-
|
|
1043
|
+
cycle: cycleRevenue,
|
|
1044
1044
|
total: totalRevenue,
|
|
1045
1045
|
},
|
|
1046
1046
|
costs: {
|
|
1047
|
-
|
|
1047
|
+
cycle: cycleCosts,
|
|
1048
1048
|
},
|
|
1049
|
-
profit: totalRevenue -
|
|
1049
|
+
profit: totalRevenue - cycleCosts,
|
|
1050
1050
|
};
|
|
1051
1051
|
},
|
|
1052
1052
|
});
|
|
@@ -1055,7 +1055,7 @@ export const calculateRevenue = query({
|
|
|
1055
1055
|
**Benefits:**
|
|
1056
1056
|
|
|
1057
1057
|
- Clear revenue attribution per organization
|
|
1058
|
-
- Track costs (
|
|
1058
|
+
- Track costs (cycle, storage, API calls)
|
|
1059
1059
|
- Revenue sharing between platform and org owners
|
|
1060
1060
|
- Financial analytics for business decisions
|
|
1061
1061
|
|
|
@@ -359,13 +359,13 @@ export interface Organization {
|
|
|
359
359
|
users: number;
|
|
360
360
|
storage: number;
|
|
361
361
|
apiCalls: number;
|
|
362
|
-
|
|
362
|
+
cycle: number;
|
|
363
363
|
};
|
|
364
364
|
usage: {
|
|
365
365
|
users: number;
|
|
366
366
|
storage: number;
|
|
367
367
|
apiCalls: number;
|
|
368
|
-
|
|
368
|
+
cycle: number;
|
|
369
369
|
};
|
|
370
370
|
createdAt: number;
|
|
371
371
|
updatedAt: number;
|
|
@@ -390,7 +390,7 @@ export interface OrganizationUsage {
|
|
|
390
390
|
users: number;
|
|
391
391
|
storage: number;
|
|
392
392
|
apiCalls: number;
|
|
393
|
-
|
|
393
|
+
cycle: number;
|
|
394
394
|
period: { start: number; end: number };
|
|
395
395
|
}
|
|
396
396
|
|
|
@@ -1341,7 +1341,7 @@ export const getUsage = query({
|
|
|
1341
1341
|
users: org.usage.users,
|
|
1342
1342
|
storage: org.usage.storage,
|
|
1343
1343
|
apiCalls: org.usage.apiCalls,
|
|
1344
|
-
|
|
1344
|
+
cycle: org.usage.cycle,
|
|
1345
1345
|
period: { start: Date.now() - 30 * 24 * 60 * 60 * 1000, end: Date.now() },
|
|
1346
1346
|
};
|
|
1347
1347
|
},
|
|
@@ -1478,8 +1478,8 @@ export const create = mutation({
|
|
|
1478
1478
|
slug: args.slug,
|
|
1479
1479
|
plan: args.plan as any,
|
|
1480
1480
|
status: "trial",
|
|
1481
|
-
limits: { users: 5, storage: 1, apiCalls: 1000,
|
|
1482
|
-
usage: { users: 1, storage: 0, apiCalls: 0,
|
|
1481
|
+
limits: { users: 5, storage: 1, apiCalls: 1000, cycle: 100 },
|
|
1482
|
+
usage: { users: 1, storage: 0, apiCalls: 0, cycle: 0 },
|
|
1483
1483
|
createdAt: Date.now(),
|
|
1484
1484
|
updatedAt: Date.now(),
|
|
1485
1485
|
});
|
|
@@ -53,7 +53,7 @@ This layer ensures:
|
|
|
53
53
|
**Responsibilities:**
|
|
54
54
|
|
|
55
55
|
- Create/update organizations with default limits
|
|
56
|
-
- Enforce resource quotas (users, storage, API calls,
|
|
56
|
+
- Enforce resource quotas (users, storage, API calls, cycle)
|
|
57
57
|
- Track usage metrics (increment/decrement counters)
|
|
58
58
|
- Validate plan eligibility (starter/pro/enterprise)
|
|
59
59
|
- Manage billing relationships (Stripe integration)
|
|
@@ -402,12 +402,12 @@ traverseGraph(startId: string, maxDepth: number, types?: string[]): Effect<Graph
|
|
|
402
402
|
"optimization_applied",
|
|
403
403
|
"report_generated");
|
|
404
404
|
|
|
405
|
-
//
|
|
406
|
-
("
|
|
407
|
-
"
|
|
408
|
-
"
|
|
409
|
-
"
|
|
410
|
-
"
|
|
405
|
+
// Cycle Events (7)
|
|
406
|
+
("cycle_request",
|
|
407
|
+
"cycle_completed",
|
|
408
|
+
"cycle_failed",
|
|
409
|
+
"cycle_quota_exceeded",
|
|
410
|
+
"cycle_revenue_collected",
|
|
411
411
|
"org_revenue_generated",
|
|
412
412
|
"revenue_share_distributed");
|
|
413
413
|
|
|
@@ -120,10 +120,10 @@ const {
|
|
|
120
120
|
|
|
121
121
|
### Type Safety
|
|
122
122
|
|
|
123
|
-
Full TypeScript
|
|
123
|
+
Full TypeScript cycle throughout:
|
|
124
124
|
|
|
125
125
|
```typescript
|
|
126
|
-
// Type
|
|
126
|
+
// Type cycle from arguments
|
|
127
127
|
const { data: courses } = useThings({ type: "course" });
|
|
128
128
|
// courses: Thing[] | null
|
|
129
129
|
|
|
@@ -1477,7 +1477,7 @@ describe("Optimistic updates", () => {
|
|
|
1477
1477
|
|
|
1478
1478
|
- [x] Hooks match Convex API ergonomics (useQuery, useMutation patterns)
|
|
1479
1479
|
- [x] Work with any DataProvider implementation
|
|
1480
|
-
- [x] Type-safe with full TypeScript
|
|
1480
|
+
- [x] Type-safe with full TypeScript cycle
|
|
1481
1481
|
- [x] Loading/error states work correctly
|
|
1482
1482
|
- [x] Real-time subscriptions functional
|
|
1483
1483
|
- [x] Optimistic updates with rollback
|
|
@@ -2008,7 +2008,7 @@ function CourseList() {
|
|
|
2008
2008
|
|
|
2009
2009
|
- [x] Hooks match Convex API ergonomics (familiar patterns)
|
|
2010
2010
|
- [x] Work with any DataProvider (ConvexProvider, SupabaseProvider, etc.)
|
|
2011
|
-
- [x] Type-safe with full TypeScript
|
|
2011
|
+
- [x] Type-safe with full TypeScript cycle
|
|
2012
2012
|
- [x] Loading/error states work correctly
|
|
2013
2013
|
- [x] Real-time subscriptions functional
|
|
2014
2014
|
- [x] Optimistic updates with automatic rollback
|
|
@@ -718,13 +718,13 @@ ${profile.parentGroupSlug ? `- **Parent Group:** ${profile.parentGroupSlug}` : "
|
|
|
718
718
|
users: 1000,
|
|
719
719
|
storage: 100000,
|
|
720
720
|
apiCalls: -1, // Unlimited
|
|
721
|
-
|
|
721
|
+
cycles: -1, // Unlimited
|
|
722
722
|
},
|
|
723
723
|
usage: {
|
|
724
724
|
users: 0,
|
|
725
725
|
storage: 0,
|
|
726
726
|
apiCalls: 0,
|
|
727
|
-
|
|
727
|
+
cycles: 0,
|
|
728
728
|
},
|
|
729
729
|
|
|
730
730
|
// Settings
|
|
@@ -732,7 +732,7 @@ ${profile.parentGroupSlug ? `- **Parent Group:** ${profile.parentGroupSlug}` : "
|
|
|
732
732
|
allowSignups: true,
|
|
733
733
|
requireEmailVerification: true,
|
|
734
734
|
enableTwoFactor: true,
|
|
735
|
-
|
|
735
|
+
cycleEnabled: true,
|
|
736
736
|
},
|
|
737
737
|
|
|
738
738
|
// Public info
|
|
@@ -289,7 +289,7 @@ font-family:
|
|
|
289
289
|
**Core Principles:**
|
|
290
290
|
|
|
291
291
|
1. **Familiar** - Match Convex hook ergonomics
|
|
292
|
-
2. **Type-Safe** - Full TypeScript
|
|
292
|
+
2. **Type-Safe** - Full TypeScript cycle
|
|
293
293
|
3. **Consistent** - Same pattern everywhere
|
|
294
294
|
4. **Predictable** - Loading/error states identical
|
|
295
295
|
5. **Discoverable** - IntelliSense provides great suggestions
|
|
@@ -403,7 +403,7 @@ useThings({
|
|
|
403
403
|
});
|
|
404
404
|
```
|
|
405
405
|
|
|
406
|
-
**Type
|
|
406
|
+
**Type Cycle on Results:**
|
|
407
407
|
|
|
408
408
|
```typescript
|
|
409
409
|
// TypeScript infers correct type from filter
|
|
@@ -178,7 +178,7 @@ Dashboard toggle:
|
|
|
178
178
|
users: 100,
|
|
179
179
|
apiCalls: 10000,
|
|
180
180
|
storage: 1000000, // 1 GB
|
|
181
|
-
|
|
181
|
+
cycle: 100 // AI queries
|
|
182
182
|
},
|
|
183
183
|
settings: {
|
|
184
184
|
allowSignups: true,
|
|
@@ -853,7 +853,7 @@ export const OneBackendProvider = (config: {
|
|
|
853
853
|
users: 100, // Max 100 people
|
|
854
854
|
|
|
855
855
|
// AI
|
|
856
|
-
|
|
856
|
+
cycleTokens: 100000, // 100K tokens/month
|
|
857
857
|
embeddingTokens: 500000 // 500K tokens/month
|
|
858
858
|
}
|
|
859
859
|
}
|
package/one/things/files.yaml
CHANGED
|
@@ -149,7 +149,7 @@ ontology:
|
|
|
149
149
|
|
|
150
150
|
- "todo.md":
|
|
151
151
|
size: "150 KB"
|
|
152
|
-
purpose: "100-
|
|
152
|
+
purpose: "100-cycle release plan (P0, P1, P2 tasks)"
|
|
153
153
|
critical: true
|
|
154
154
|
|
|
155
155
|
- "strategy.md":
|
|
@@ -212,8 +212,8 @@ ontology:
|
|
|
212
212
|
- "dashboard.md":
|
|
213
213
|
purpose: "Multi-tenant UI architecture"
|
|
214
214
|
|
|
215
|
-
- "
|
|
216
|
-
purpose: "
|
|
215
|
+
- "cycle.md":
|
|
216
|
+
purpose: "Cycle-based planning system"
|
|
217
217
|
|
|
218
218
|
events:
|
|
219
219
|
path: "one/events/"
|