HHE Tier Refactor (5→3)

Ask Zuzu Access Control Migration
Consolidating 5 tiers to 3 — resolving 3 confirmed user access bugs, eliminating a dead tier, and simplifying the system for all stakeholders.
4 Amy Decisions Blocking
6 System Layers to Update
~17K Chunks to Remap

Amy — Your Input Needed

Four decisions that gate the entire migration. Each has a recommended path. Estimated time: 3 minutes.

A. Which products qualify as “Certified” tier?
✓ Recommended: HHP Portal + HHE Educator Certification (2 products)
Confirmed: HHP Portal (2148756329), HHE Educator Cert (2148721952)
Needs your call: TNC Certification (492485), Holistic Health Coaching (341533), Product 2148679039
Why it matters: If TNC/HHC are Certified, their 7,821+ chunks gate behind the highest tier. If Student, any paid user can access them.
B. Any paid products that should NOT be Student tier?
✓ Recommended: No exceptions — all paid = Student
Simplest model. Resolves all 3 existing access mismatches automatically. Adding exceptions recreates the complexity we’re eliminating.
C. Should FLY (Neuro Wellness) stay FREE or become Student?
✓ Recommended: Member (free) — 30 members already enrolled at no cost
FLY is Product 2149250013 (Neuro Wellness, 30 free members). Changing to paid would disrupt existing access. Lamonte’s agentic UX project depends on this remaining accessible.
D. Keep segment boosts within Student tier?
✓ Recommended: Keep all 4 boosts as-is
Segments (aoscan 1.15x, coach 1.15x, educator 1.15x, practitioner 1.20x) are orthogonal to tiers — they boost content relevance within a tier, they don’t gate access. No change needed.

Interactive form available: We’ve prepared a fillable decision form that captures your responses and posts them to Slack. Takes ~3 minutes.

Why This Refactor Is Needed

The 5-tier system has a dead tier, 3 confirmed mismatches, and unnecessary complexity.

3
Active Access Bugs

Real users blocked from content they paid for, or accessing content they shouldn’t.

1
Dead Tier (level-3)

Supabase view never emits level-3. It exists in config but not in production.

41
Unmapped Products

Paid products with no course context in RAG. Tier refactor simplifies future tagging.

Confirmed Mismatches

CourseChromaDB TierConfig TierChunksImpact
tnc-hhccertifiedlevel-27,821level-2 users BLOCKED from content they should access
autoimmunelevel-1level-2915level-1 users ACCESS content they shouldn’t
10-stepslevel-2level-1470level-1 users BLOCKED from their content

All 3 mismatches resolve automatically under the new model. All three courses become Student tier — any paid user can access them.

The 3-Tier Model

Member → Student → Certified. Simple, consistent, and immediately actionable.

New TierReplacesRuleProducts
MemberguestFree / no purchase37 free products
Studentlevel-1 + level-2 + level-3Any paid product or bundle~66 paid products
CertifiedcertifiedCertification product ownership2-3 products (pending Amy)

Key design decision: Collapsing level-1/level-2/level-3 into Student means any paid user sees ALL paid content. This eliminates the source of all 3 existing mismatches and removes the “dead” level-3 tier.

6-Layer Migration Sequence

Amy’s decisions flow through 6 system layers. Each layer must update before the next.

Tier Refactor Migration Pipeline
ChromaDB~17K chunksApplication Codetier-service.js + 3 moreConfigcourse-mapping-v2.jsonSQL Viewsv_course_tier_accessSupabasev_user_tier_calculationAmy (HHE)Tier DecisionsChromaDB~17K chunksApplication Codetier-service.js + 3 moreConfigcourse-mapping-v2.jsonSQL Viewsv_course_tier_accessSupabasev_user_tier_calculationAmy (HHE)Tier DecisionsCASE: certified / student / memberReplaces: certified / level-2 / level-1 / guestTIERS = [member, student, certified]guest to member, level-1/2/3 to studentFix 3 mismatches in same passDecisions A-D confirmedNew tier names propagatetier_definitions updatedDeploy together (atomic)Bulk remetadata (can lag)

Atomic Code Deployment

These 4 files must deploy together — partial deployment breaks tier calculation.

Atomic Deploy — 4 Files Together
context-builder.jschroma-client.jssupabase-sync.jstier-service.jscontext-builder.jschroma-client.jssupabase-sync.jstier-service.jsATOMIC DEPLOY — all 4 files togetherTIERS = [member, student, certified]calculateTier(): any paid = student2+ bundles OR cert product = certifiedbundleOfferMap: level-3 to studentqueryWithAccess() — auto-inheritsfrom tier-service updategetMembershipContext(): new display stringsbuildUpsellGuidance(): 3-tier checks
FileKey Change
tier-service.jsTIERS array → [member, student, certified]; rewrite calculateTier() and getTierDisplayName()
supabase-sync.jsbundleOfferMap: all level-3 entries → student
chroma-client.jsqueryWithAccess() auto-inherits from tier-service update
context-builder.jsgetMembershipContext() display strings; buildUpsellGuidance() 3-tier checks

ChromaDB Bulk Remetadata

~17,000 chunks need access_tier remapped. Can lag behind code deploy.

ChromaDB Chunk Distribution by New Tier
57%25%19%ChromaDB Chunk Distribution by New Tiercertified (unchanged)student (from level-1/2/3)member (from guest)
Old ValueNew ValueEstimated Chunks
guestmember~4,400
level-1student~1,800
level-2student~1,500
level-3studentminimal
certifiedcertified (unchanged)~10,000

Execution Timeline

~2-3 days of engineering after Amy’s decisions are confirmed. Layers execute sequentially.

HHE Tier Refactor — Execution Timeline
2026-03-012026-03-022026-03-032026-03-042026-03-052026-03-062026-03-072026-03-082026-03-092026-03-10Amy decisions (A-D) v_user_tier_calculation rewrite Dependent views audit v_course_tier_access rebuild course-mapping-v2.json update tier-service.js + 4 files Bulk remetadata (~17K chunks) Tier distribution check Client InputLayer 1 - SupabaseLayer 2 - SQL ViewsLayer 3 - ConfigLayer 4 - CodeLayer 5 - ChromaDBVerificationHHE Tier Refactor (5 to 3) — Execution Timeline
Amy’s Decisions Gate Everything
Phase 6Docs UpdatePhase 5ChromaDB RemapPhase 4Code DeployPhase 3Config JSONPhase 2SQL ViewsPhase 1Supabase ViewAmy (HHE)4 DecisionsPhase 6Docs UpdatePhase 5ChromaDB RemapPhase 4Code DeployPhase 3Config JSONPhase 2SQL ViewsPhase 1Supabase ViewAmy (HHE)4 DecisionsTotal execution: ~2-3 days after Amy confirmsA: Certified productsB: Student exceptionsC: FLY tierD: Segment boostsTier names propagateViews match configConfig matches codeCode drives remapRemap drives docs

Downstream impact: The G-Drive ingestion pipeline (CSA Handoff #2) depends on this refactor completing. New ingested content needs the 3-tier metadata schema to be live before it can be tagged correctly.