AI Manual

File ownership map

Which file is authoritative for which feature. When a feature breaks, look here to find the source of truth — don't grep blindly across all three repos.

By feature

FeatureAuthoritative file(s)
Strategist allocatorslabtrack/backend/services/strategist/allocator.js
Strategist commitslabtrack/backend/routes/curator.routes.js/strategist/commit handler
Lot building (city/team/player/set)slabtrack/backend/services/strategist/lot-builder.js
Channel scoring (which channel wins)slabtrack/backend/services/channel-scoring/index.js
Channel registry + adaptersslabtrack/backend/services/channels/registry.js + per-channel files
Sale-locks (cross-channel)slabtrack/backend/services/sale-lock-service.js
Drift reconciliationslabtrack/backend/services/sync-reconciler.js
City→team mappingslabtrack/backend/services/strategist/team-cities.js
SCPro pricingslabtrack/backend/services/pricing/sportscardspro.js
eBay scrapingslabtrack/backend/services/pricing/ebay-scraper.js
PSA cert lookupslabtrack/backend/routes/psa.routes.js
AI vision card IDslabtrack/backend/services/scan/
Lot Builder UIslabtrack/frontend/src/pages/LotBuilder.jsx
Triage UIslabtrack/frontend/src/pages/Triage.jsx
Strategist UI (full)slabtrack/frontend/src/pages/Strategist.jsx
Command Bridge UIslabtrack/frontend/src/pages/CommandBridge.jsx
Sync Center UIslabtrack/frontend/src/pages/SyncCommandCenter.jsx
Ecosystem Command Center (tile grid)slabtrack/frontend/src/pages/EcosystemCommandCenter.jsx + config/platforms.js

ToT-specific

FeatureAuthoritative file(s)
Stripe singletonthisorthat/src/lib/stripe.ts
Flip game logicthisorthat/src/lib/games/flip.ts
Pull game logicthisorthat/src/lib/games/pull.ts
Pull commit + reveal APIthisorthat/src/app/api/play/pull/route.ts
Flip commit + reveal APIthisorthat/src/app/api/play/flip/route.ts
Payment intent (manual capture)thisorthat/src/app/api/payment/route.ts
Stripe webhookthisorthat/src/app/api/stripe/webhook/route.ts
Solana anchoringthisorthat/src/lib/blockchain/solana.ts
SlabTrack ingest webhook (auto-publish)thisorthat/src/app/api/webhook/ingest/route.ts
Shipping (label print)thisorthat/src/app/api/shipping/route.ts
Browse filter railthisorthat/src/components/marketplace/FilterRail.tsx
Search comboboxthisorthat/src/components/marketplace/SearchCombobox.tsx
Card detail slide-overthisorthat/src/components/marketplace/CardDetailDrawer.tsx
Pull tray drawerthisorthat/src/components/pull/PullTrayDrawer.tsx
Cart store (Flip)thisorthat/src/lib/cart-store.ts
Pull storethisorthat/src/lib/pull-store.ts
Cmd+K palettethisorthat/src/components/CommandPalette.tsx
Sale-lock clientthisorthat/src/lib/sale-lock.ts
Stripe fees passthroughthisorthat/src/lib/stripe-fees.ts
Order managementthisorthat/src/app/api/orders/route.ts
Refund flowthisorthat/src/app/api/orders/route.ts — action refund

Storefront-specific

FeatureAuthoritative file(s)
Theme system (resolver, presets, palettes)slabtrack-storefront/src/lib/storefront-theme.ts
Theme provider (React context)slabtrack-storefront/src/components/StorefrontThemeProvider.tsx
Theme Studio UIslabtrack-storefront/src/app/dashboard/[slug]/theme/ThemeStudio.tsx
Theme PUT APIslabtrack-storefront/src/app/api/storefronts/[slug]/theme/route.ts
Public storefront pageslabtrack-storefront/src/app/[slug]/page.tsx
Shop browser (faceted)slabtrack-storefront/src/components/ShopBrowser.tsx
Shop filter railslabtrack-storefront/src/components/ShopFilterRail.tsx
Card detail slide-overslabtrack-storefront/src/components/ShopCardDrawer.tsx
Hero spotlight (rotating)slabtrack-storefront/src/components/HeroSpotlight.tsx
Featured carouselslabtrack-storefront/src/components/FeaturedCarousel.tsx
Sticky cart barslabtrack-storefront/src/components/StickyCartBar.tsx
Logo with fallbackslabtrack-storefront/src/components/ShopLogo.tsx
Cart storeslabtrack-storefront/src/lib/cart-store.ts
Wishlist storeslabtrack-storefront/src/lib/wishlist-store.ts
Saved searches storeslabtrack-storefront/src/lib/saved-searches-store.ts
Stripe Checkout creationslabtrack-storefront/src/app/api/stripe/checkout/route.ts
Stripe webhookslabtrack-storefront/src/app/api/stripe/webhook/route.ts
Stripe Connect onboardingslabtrack-storefront/src/app/api/stripe/connect/onboard/route.ts
Refund flowslabtrack-storefront/src/app/api/stripe/refund/[orderId]/route.ts
Shippo label printslabtrack-storefront/src/app/api/shippo/buy-label/[orderId]/route.ts
Cross-channel feedslabtrack-storefront/src/lib/cross-channel.ts
Sale-lock clientslabtrack-storefront/src/lib/sale-lock.ts
Card snapshot helpers (price, image, etc.)slabtrack-storefront/src/lib/snapshot.ts

The docs themselves

WhatLives where
Source of truth (deployed)slabtrack/frontend/public/docs/
Mirror copy (legacy, repo root)slabtrack/docs/ — keep .md files; HTML is duplicated
Sidebar nav configslabtrack/frontend/public/docs/assets/sidebar.js — single NAV constant
Shared styleslabtrack/frontend/public/docs/assets/style.css
Shared JS (copy buttons, sidebar)slabtrack/frontend/public/docs/assets/manual.js + sidebar.js