Bun-native monorepo — shared harness in lib/ and packages/; apps under projects/active/. Each project may own its own workspace.
Wiki navigation: full index · docs index · harness JIT
| Role | Doc |
|---|---|
| This hub | Home |
| AI agents | AGENTS.md → docs/AGENTS.md |
| Workspace map | STRUCTURE.md |
| Coding standards | docs/DEVELOPMENT-STANDARDS.md · full custom-instructions.md (repo) |
| Bun install policy | docs/UNIFIED.md |
| Import boundaries | docs/IMPORT_BOUNDARIES.md |
| Wire boundary (parse once) | docs/WIRE_BOUNDARY.md |
| Portal foundation | docs/portal-foundation.md |
| Harness JIT index | docs/harness/ · bun run harness:status |
| Projects triage | projects/README.md (repo) |
| Docs index | docs/ |
| Path SSOT (code) | lib/docs/repo-docs.ts (CANONICAL_REPO_DOCS) |
| Harness thesis | lopopolo/harness-engineering (domain types; prefer artifact over codebase) |
| Wiki (live) | wiki.factory-wager.com — GitHub Pages from this repo |
| Wiki index | wiki-index.md — full tenant + portal navigation |
| Registry index | registry-index.md — registry bake + portal consumer map |
Remotes: origin → project-R-score. cascade → cascade-mover-v3 (private git remote; do not default-push there).
| Surface | URL | Role |
|---|---|---|
| Wiki (this site) | wiki.factory-wager.com | GitHub Pages · README.md · docs/ · AGENTS.md |
| Portal hub | score.factory-wager.com/portal/ | Static boards + baked registry embeds (Cloudflare Pages) |
| Registry bake | score.factory-wager.com/registry/ | ops:snapshot JSON (ops-summary, handshake, compliance, …) |
| Monitoring | score.factory-wager.com/monitoring/ | Routing · env · compliance tile · proof status |
| Portal weave | registry/portal-weave.json | Cross-links + operator scripts (machine SSOT) |
Routing: docs/platform-routing.md · edge verify: bun run verify:pages-edge · local hot reload: bun run serve:public:hot
| Board | Pages path | Harness doc |
|---|---|---|
| Portal home | /portal/ |
docs/portal-foundation.md |
| Ops (C4/C5 · loop) | /portal/ops/ |
docs/harness/tenants/ops-loop-throughput.md |
| TOC Ops | /portal/toc/ |
docs/harness/tenants/toc-ops.md |
| Compliance (MA/NJ) | /portal/compliance/ |
docs/harness/tenants/compliance-portal.md |
| Partner limits | /portal/limits/ |
docs/harness/tenants/partner-limits.md · ops:limits:demo · ops:limits:capture · ops:limits:predict |
| Dashboard | /portal/dashboard/ |
KPIs · TOC · compliance plane |
| Health / Env | /portal/health/ · /portal/env/ |
/api/health schema v1 · env checklist |
| Doctor | /portal/doctor/ |
bun run portal:doctor · bake:doctor · bunfig/catalog/linker groups · docs/UNIFIED.md |
| DOD queue | /portal/dod/ |
docs/harness/tenants/public-plane.md |
| Skills catalog | /portal/skills/ |
docs/harness/tenants/public-plane.md |
| Seat capital desk | registry/seat-capital-desk.json |
docs/harness/tenants/seat-capital-desk.md |
| Telegram handshake | registry/telegram-handshake.json |
docs/harness/tenants/partner-package-group-handshake.md |
Bake: bun run ops:snapshot (full) · bun run compliance:bake (compliance only) · verify: bun run verify:portal:static · bun run compliance:verify
| Artifact | Path | Notes |
|---|---|---|
| Ops summary | /registry/ops-summary.json |
Liquidity · tree · compliance slice |
| Compliance board | /registry/compliance-board.json |
MA/NJ shadow matrix · HMAC |
| Monitoring | /registry/monitoring.json |
Routing proof · DOD · compliance tile |
| TOC Ops | /registry/toc-ops.json |
Fixture board bake |
| Proof taxonomy | /registry/proof-taxonomy-audit.json |
Cross-proof contracts |
Full weave list: portal-weave.ts (repo) · baked at portal-weave.json
bun run harness:status # ratchets + proof posture
bun run portal:doctor # unified health gate (linker · bakes · catalog · bunfig · runtime)
bun run portal:doctor --group bunfig --verbose
bun run portal:doctor:runtime:check # native .env / bunfig loading proof + value-free runtime state
bun run bake:doctor # → /registry/doctor-state.json · /portal/doctor/
bun run ops:snapshot --no-seed # rebake registry + portal embeds
bun run compliance:verify # compliance board + portal tests
bun run telegram:handshake:readiness --deep # 23/23 lanes per partner
bun run test:seat-desk # seat desk + handshake snapshot
bun run verify:portal:static # public plane gate
PAGES_VERIFY_BASE=https://project-r-score.pages.dev bun run verify:pages-edge
Deploy (Pages): bun run proton:inject:factorywager:reasonix → bun run proton:deploy:pages · vault map: docs/harness/tenants/proton-integration.md
When a decision is unresolved, read one owner in docs/harness/README.md — not the full standards stack.
| Lane | Entry |
|---|---|
| Identity / auth (Phase 0–2b) | lib/identity/README.md · lockout · anomaly · geo · password · JIT |
| Compliance portal (MA/NJ) | docs/harness/tenants/compliance-portal.md · bun run compliance:verify |
| State regulation / play gate | docs/harness/tenants/compliance-portal.md · bun run test:state-compliance |
| Factory Telegram | docs/harness/tenants/telegram-factory.md · bun run telegram:verify |
| Package-group handshake | docs/harness/tenants/partner-package-group-handshake.md · bun run telegram:handshake:readiness --deep |
| Seat capital desk | docs/harness/tenants/seat-capital-desk.md · bun run test:seat-desk |
| Partner onboard package | docs/harness/tenants/partner-onboarding-package.md · bun tools/onboard-partner-package.ts |
| Ops snapshot / registry bake | docs/harness/tenants/ops-snapshot.md · bun run ops:snapshot |
| Ops loop / outbox | docs/harness/tenants/ops-loop-throughput.md |
| Public plane (portal audit) | docs/harness/tenants/public-plane.md · bun run public:audit:verify |
| Proton / vault deploy | docs/harness/tenants/proton-integration.md · bun run proton:inject:factorywager:reasonix |
| Cloudflare Pages | docs/harness/tenants/cloudflare-pages.md · bun run cloudflare:env |
| Branded IDs | lib/types/branded/README.md · bun run check:brands:all |
Agent entry (full table): AGENTS.md
bun run install:all # isolated linker + global store (bun.com/docs/pm/global-store)
bun run install:verify # sanity-check cache dir, links/, and no ./~ drift
bun run help # Categorized commands (SSOT; optional: bun run cli:docs)
bun run type-check # Day-loop check (tsconfig.check.json)
bun run build:affected # Changed packages only (bun --filter ...)
bun run packages:list # Browse all packages with version/registry/triage
Install policy detail: docs/UNIFIED.md.
packages/ @factorywager/* — 8 internal packages (root workspace)
lib/ Shared harness (brands, security, scan, console-depth)
projects/active/factorywager/ Registry platform (+ workspace packages)
projects/active/sports-terminal-os/ Sports Terminal OS (root workspace member)
projects/active/kimiremote/ Sports proxy — own repo (gitignored here)
projects/active/enterprise/ Nested products (cascade/bet-ticker own repos, gitignored)
projects/active/* Independent apps by category — see projects/README.md
Triage tiers experimental/ / archive/ are documented under projects/; only active/ is populated today. Full map: STRUCTURE.md. Agent scope (what not to load): projects/README.md.
| Command | Description |
|---|---|
bun run help |
Interactive categorized commands (--verbose for all) |
bun run cli:docs |
Regenerate docs/CLI.md |
bun run type-check |
Day-loop typecheck (tsconfig.check.json) |
bun run build:affected / test:affected |
Changed packages only (--filter) |
bun run packages:list |
List packages (scaffolds hidden; --include-scaffolds / --paths) |
bun run validate:workspaces |
Validate workspace coverage |
bun run lint |
ESLint on lib/ |
bun run lint:harness |
Harness ESLint config (lib, scripts, packages, server, config, tools) |
bun run format:core |
Prettier harness format (format:harness) |
bun run check:brands:all |
Branded ID gates (manifest + smart + types) |
bun run fix:console-log |
Bulk replace console.log → console.info |
bun run fix:scan-any-types |
Scan for any types |
bun run dev |
Start platform server |
bun run deployment:readiness |
Deployment readiness matrix |
bun run ops:snapshot |
Rebake public/registry/* + portal embeds |
bun run compliance:bake |
Compliance board (MA/NJ shadow matrix) |
bun run compliance:verify |
Compliance bake + portal tests |
bun run telegram:handshake:readiness |
Package-group handshake gates (--deep) |
bun run test:seat-desk |
Seat capital desk + handshake snapshot tests |
bun run harness:status |
Day-loop ratchets + proof status |
bun run ops:limits:check |
Partner limit freshness / CLV alerts |
bun run public:audit:verify |
Public plane discovery + portal static gate |
bun run proton:deploy:pages |
Cloudflare Pages deploy (after Proton inject) |
See bun run help --verbose (regenerate long docs/CLI.md with bun run cli:docs only when needed).
Antipattern remediation (after major refactors). Conventions: docs/DEVELOPMENT-STANDARDS.md.
bun run fix:console-log — console.log → console.infobun run fix:scan-any-types — : any / as any → unknown or real typesbun run fix:scan-default-exports — default export candidatesbun run fix:scan-non-null-assertions — ! assertions to safe accessImplementations: scripts/fix-*.ts (e.g. scripts/fix-console-log.ts).
config/ports.ts — Port defaults (DOCS_SERVER=3000, P2P_PROXY=3002, DASHBOARD=3456, …); env-overridableconfig/r2-env.ts — Cloudflare/R2/Pages SSOT (CLOUDFLARE_DEFAULTS, requireR2Config).env.example — identity + secret placeholders + Pages build pinsbun run cloudflare:env · secrets: CLOUDFLARE_API_TOKEN, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEYCORS_ALLOWED_ORIGINS (comma-separated; empty = allow all)SERVER_HOST (default localhost)
docs/DEVELOPMENT-STANDARDS.md · full custom-instructions.md (repo)docs/WIRE_BOUNDARY.md (parse once; no interior unknown / decodeUnknown*)docs/IMPORT_BOUNDARIES.mdSTRUCTURE.md · homebase: docs/organization/HOMEBASE_DISCOVERY.mdbun run validate:workspaceslib/types/branded/README.md · console depth → lib/console-depth.tsconsole.log; no any; named exports only; no non-null !; no empty catch; no hardcoded secrets--filter patterns · build:affected / test:affected