HALO Knowledge Docs
Historical / reusable evidence · research/CANONICAL-NUMBERS.md

00 · Canonical numbers

Reconciled counts. Where a lane file disagrees, the lane file is wrong.

Generated from research/CANONICAL-NUMBERS.md · regenerate with node site/scripts/generate-docs.mjs

Canonical numbers — re-verified from source 2026-08-29, repo pinned 347329a

STALE-BASELINE: “Canonical” here means canonical for historical commit 347329a only. Current client commit 83ab4ba has a different route, schema, backend, and domain inventory. Do not use these numbers as current truth.

Seven lanes and the main agent produced conflicting counts. These are the resolved figures, each re-derived immediately before writing. The site and all future agents use these. Where a lane file disagrees, the lane file is wrong.

FactCanonicalHow derivedWrong values seen
Schema tables56grep -cE '^ [a-z]+: defineTable' convex/schema.ts57 — counts the line-1 import { defineSchema, defineTable }
Pages39`find src/pages -name '*.tsx' \wc -l (38 flat + 1 in CreatorOnboarding/`)38
Convex modules36`ls convex/*.ts \grep -v tsconfig \wc -l, excludes _generated/`35, 37
Gamification tables14grep -cE '^ gamification[A-Za-z]*: defineTable'13 (01-domains), 17 (04-lovable)
Supabase importers in src/39`grep -rl 'integrations/supabase/client' src/ \wc -l`43 (01-domains), ~70 (his CLAUDE.md)
…of those, in components/payroll/15same grep scoped to that dir12
api.payroll.* consumers0grep -rn 'api\.payroll' src/— (payroll backend is a genuine orphan)
Public Convex functions221`^export const X = query\mutation\action(` → 73+132+16456 — counted substring query(, matching ctx.db.query(
Internal Convex functions22same, `internalQuery\internalMutation\internalAction` → 8+9+5—
ctx.auth/getUserIdentity in convex/0grep -rc across all modules—
src/ LOC68,706`find src -name '.ts' \xargs wc -l`—
convex/ LOC11,274same for convex/—
Tracked files622`git ls-files \wc -l`—
.collect() calls166`grep -o '\.collect()' convex/*.ts \wc -l`165
Rounding calls in convex/2`grep -c 'Math.round\toFixed' — one in referralDemo.ts, one in paymentLog.ts`—

Settled contradictions

Contract token generation is CORRECT, not broken. 01-domains.md §4 called it broken; 03-security.md and the main agent both read convex/contracts.ts:6-10 and found crypto.getRandomValues over new Uint8Array(20) = 160 bits, unguessable. The security lane is right. Domain #8 maturity is real-and-working, not real, weak crypto.

Plaintext password line reference is convex/socialMediaLogins.ts:13, not :12 (:12 is username). The public query exposing it is :20; the schema field is convex/schema.ts:502. All three are correct as cited in 03-security.md and VERIFIED.

Scope caveat — the 17 domains are ~90% of the app, not 100%

Four clusters (~6.4k LOC) are named by no domain and must be flagged on the hub:

ClusterPathsLOC
Creator directory/profile — the root entity of the CRMCreators.tsx, CreatorProfile.tsx, components/creators/, convex/creators.ts~2.4k
Creators dataCreatorsData.tsx, components/creators-data/, convex/creatorData.ts~3.0k
Account settingsAccountSettings.tsx (413)~0.4k
Shared profilecomponents/profile/~1.2k

Recommendation: promote the creator directory to domain #18. It is the root entity every other domain hangs off, and it currently has the highest raw-LOC-per-unit-of-research in the repo.

Also confirmed absent

repo/.claude/skills/frontend-design — referenced at repo/CLAUDE.md:122 but never committed and not gitignored, so it lived only on Camron's machine. His aesthetic direction is not recoverable from the repo. Reconstructable proxies: the hand-appended brand (banana yellow hsl(54 100% 60%), tied to the gamification currency) and premium (dark purple-blue) palettes at repo/tailwind.config.ts:63-84, plus the four restyled UI primitives (button.tsx, toggle.tsx, LetsPlayButton.tsx, premium-button.tsx) — 15px radii, lift-on-hover, 300ms transitions.

Canonical source remains research/CANONICAL-NUMBERS.md. This HTML is a generated projection; edit the source, then run generate-docs.mjs.