FactoryWager Wiki

Projects Workspace Structure

High-level map of the FactoryWager Enterprise Platform monorepo (factorywager-enterprise).

Remotes: originproject-R-score. cascadecascade-mover-v3 (private git remote; do not default-push there).

Canonical docs

Role Doc
This map STRUCTURE.md
Human hub README.md
AI agents AGENTS.mddocs/AGENTS.md
Coding standards .custom-instructions.md · docs/DEVELOPMENT-STANDARDS.md
Bun install policy docs/UNIFIED.md
Bun token/catalog operate docs/BUN_DOCS_OPERATE.md (bun run docs:refresh)
Projects triage projects/README.md
Path SSOT (code) lib/docs/repo-docs.ts
Wire boundary docs/WIRE_BOUNDARY.md
Harness thesis lopopolo/harness-engineering

Root layout (current)

Projects/
├── .agents/                 # Agent skills (SKILL.md + allowed skill assets; no node_modules)
├── .claude/                 # Claude commands / agents
├── .github/                 # Workflows, templates
├── AGENTS.md                # Agent entrypoint → docs/AGENTS.md + docs/UNIFIED.md
├── .custom-instructions.md  # Coding standards SSOT → docs/DEVELOPMENT-STANDARDS.md
├── README.md                # Human hub
├── STRUCTURE.md             # This file
├── archive/                 # Frozen local experiments (gitignored entire tree)
├── artifacts/               # Releases + local reports (reports/ largely ignored)
├── assets/                  # Logos, charts
├── config/                  # ports.ts, r2-env, registry, ci bunfig
├── dashboard/               # Dashboard servers & UIs
├── docs/                    # Documentation (UNIFIED.md, AGENTS.md, guides)
│   ├── README.md            # Docs index (SSOT navigation)
│   ├── AGENTS.md            # Full agent guide (root AGENTS.md is thin entry)
│   ├── UNIFIED.md · WIRE_BOUNDARY.md · DEVELOPMENT-STANDARDS.md
│   ├── BUN_DOCS_OPERATE.md  # Token/catalog operate (RSS → scrape → catalog)
│   ├── organization/        # Root cleanup history
│   └── packages/            # REGISTRY.md snapshot (regenerate via packages:list tooling)
├── examples/                # Demos & Bun feature showcases (opt-in context)
├── functions/               # Cloudflare Pages edge Functions (/api/* — edge-safe only, see tests/functions-edge-safety.test.ts)
├── functions-bun-only/      # Bun-runtime API modules (DOD review, telegram, catalog — not deployed to Pages edge)
├── Kalshi-bot/              # Nested product submodule (own remote; see .gitmodules)
├── lib/                     # Shared library — README.md inventory + domain/*/README.md indexes
│   └── docs/repo-docs.ts    # CANONICAL_REPO_DOCS path SSOT
├── packages/                # @factorywager/* internal packages (8)
├── plannator/               # Local Plannotator extra skills mirror (thin)
├── projects/
│   ├── README.md            # Triage SSOT — every product leaf + root contract
│   ├── experimental/        # Demos / PoCs (each top-level has README + package.json)
│   ├── archive/             # Tier bucket (+ README); empty until first freeze
│   └── active/              # README.md tier index; categories keep indexes (no flatten)
│       ├── analysis|automation|dashboards|development|enterprise|tools|utilities/
│       │     └── each category README.md lists product leaves (each leaf = install root)
│       ├── factorywager/    # registry umbrella (+ workspace packages)
│       ├── sports-terminal-os/  # root workspace member
│       ├── kimiremote/      # gitignored — own repo
│       ├── f402-openapi/    # gitignored — own tree
│       └── playwriter-skill/
├── public/                  # Static assets + Cloudflare Pages output (project-r-score; SSOT config/r2-env)
├── scratch/                 # Bun playground (curated; archive/scratch has older copies)
├── scripts/                 # Automation, CI, fix-* remediations
├── server/ · tests/ · tools/
├── bunfig.toml · package.json · tsconfig*.json
├── registry.config.json5    # → config/ (symlink)
└── ci.bunfig.toml           # → config/ (symlink)

Not monorepo spine (local / nested only)

These may exist on disk under ~/Projects but are gitignored or separate remotes — do not treat as platform source of truth:

Path Why
Kalshi-bot/ Tracked submoduleKalshi-bot (not spine; own package.json / tests)
Proton-workspace/ Standalone Proton playbook repo
plannotator-upstream/ Full upstream clone; use plannator/ for thin skills
toc-ops/, toc-ops-repo/, toc-ops-repo-wt-* Separate TOC-ops product / worktrees
bet-turnin-sheet/, bradley-terry/ Own nested git projects
projects/active/kimiremote/, …/enterprise/{cascade-mover-v3,bet-ticker-worker-v1.1}/, …/f402-openapi/ Own remotes, nested under active for path convenience
herdr-worktrees/ Empty worktree parking
Root test-binary-*, **/sports-terminal-{before,after} Bun --compile dumps — delete if reappear

projects/experimental/ holds relocated demos (see projects/experimental/README.md). projects/archive/ remains a tier bucket until first freeze.

Key navigation

Root workspaces (authoritative)

From package.json workspaces.packages:

Organization history (condensed)

Detail: docs/organization/HOMEBASE_DISCOVERY.md · docs/organization/BLOAT_SPEED_PASS.md.

Future candidates

Maintained by the platform team. Run bun run dashboard for live views, or use active CLIs under tools/cli/ (e.g. endpoint-status.ts).