Architecture: How does knowledge flow between tiers in the multi-tenant AI...

Documentation for Sessions

🏗️ Architecture: How does knowledge flow between tiers in the multi-tenant AI...

Date: 2026-02-05
Time: 23:04:30 UTC
Session: editor2-92.27
Agent: architecture
Confidence: 90%
Status: ✅ Documented


📋 Decision Context

Question:

How does knowledge flow between tiers in the multi-tenant AI system?

Task: Session 93: Document knowledge flow architecture between tiers


🎯 Decision Made

Chosen:

Bidirectional flow using existing LearnedPattern.visibility field progression. UPWARD: T3 private pattern (5+ uses by same user) → team pattern (5+ T3 users in same space succeed independently, promoted by aggregateSpacePatterns cron) → golden pattern (adopted across 3+ spaces with >90% success, requires T2 opt-in via shareAnonymousPatternsToGlobal) → core rule (manual T1 curation). DOWNWARD: Core rules (always loaded ~20 items) → golden decisions (searchable by T2/T3, read-only) → space team patterns (loaded for all T3 in that space) → user private patterns (loaded only for owning T3 user). T2 controls flow via SpaceAIPreferences: allowGoldenKnowledge, allowPatternPromotion, shareAnonymousPatternsToGlobal, t3LearningEnabled.

Options Considered:


💭 Reasoning

The existing LearnedPattern schema already has visibility ('private'|'team'|'platform'), ownerId, spaceId, promotedToRule, and promotedRuleId fields since Session 51.2 — but they were NEVER QUERIED. The promotion pipeline is not yet built (Phase 4) but the schema supports it. The key design principle: knowledge flows UP through adoption (automatic) and DOWN through distribution (always-loaded core rules + searchable golden decisions). T2 builders have kill switches to isolate their space from global knowledge or prevent their patterns from being promoted. This respects the B2B2C data ownership model where T2 owns T3's data.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation