Files
le-mystere-professeur-zacus/frontend-v3/CLAUDE.md
T
L'électron rare d7e4e52fd3 chore: hard cutover frontend-scratch-v2
V2 was the legacy single-app Vite playground. Per the
2026-05-01 atelier design brainstorm, V3 is the sole
authoring target going forward. MediaManager and
NetworkPanel features explicitly retired (no porting).

Removed:
- frontend-scratch-v2/ entirely (50 files, ~11k LOC)

Retargeted to frontend-v3 + pnpm:
- Makefile: FRONTEND_DIR, frontend-typecheck/test/build
  (renamed from frontend-lint as eslint not yet wired in V3)
- tools/dev/zacus.sh: FRONTEND_ROOT, action commands
- tools/dev/zacus_tui.py: action_frontend_tests + build cwd
- .github/workflows/validate.yml: pnpm/action-setup,
  cache: pnpm, --frozen-lockfile, typecheck step added

Documentation cleanup:
- Root CLAUDE.md: Architecture, Where to Look, Nested
  Guidance lines purged of V2; pointer to atelier design
  doc added
- frontend-v3/CLAUDE.md: V2 vs V3 section removed; editor
  description points to fusion design doc
- desktop/CLAUDE.md: V2 anti-pattern removed
- specs/CLAUDE.md: cross-stack pair example updated to
  packages/scenario-engine

Archive: tag archive/frontend-scratch-v2-final on the
commit immediately preceding deletion preserves the last
state where V2 still worked.

Acceptance:
- rg "frontend-scratch-v2" in code paths -> 0 hits
- make frontend-test -> 11/11 green (3 skipped)
- make frontend-build -> 6/6 green
2026-05-02 21:51:23 +02:00

1.6 KiB

Frontend V3 (Monorepo)

pnpm + turbo monorepo. Three apps + three shared packages. Node ≥20, pnpm ≥9.

Layout

apps/
  dashboard/         # Live game-master dashboard (analytics, control)
  editor/            # Scenario editor (will fuse with simulation into atelier — see docs/superpowers/specs/2026-05-01-v3-fusion-atelier-design.md)
  simulation/        # Runtime simulator / playtest UI
packages/
  scenario-engine/   # Runtime 3 IR + execution (shared core)
  shared/            # Cross-app utilities, types, constants
  ui/                # Shared component library

Commands

pnpm install            # Bootstrap workspace
pnpm dev                # turbo run dev (all apps)
pnpm --filter dashboard dev   # Single app
pnpm build              # turbo run build
pnpm test               # turbo run test
pnpm typecheck          # turbo run typecheck
pnpm lint               # turbo run lint

Patterns

  • scenario-engine is the canonical TS Runtime 3 implementation. New apps consume it; do not fork the IR.
  • All cross-app types live in packages/shared — never copy-paste types between apps.
  • Components shared across ≥2 apps move to packages/ui. Keep app-local components in apps/<app>/src/components.
  • Turbo cache keys: ensure inputs in turbo.json cover all source paths; missing globs cause stale cache.

Anti-Patterns

  • Adding deps to root package.json (use the relevant app/package)
  • Bypassing turbo with manual tsc invocations — breaks cache invalidation
  • Circular dependencies between packages (turbo will warn; fix immediately)
  • Publishing packages/* to npm — they're internal workspace-only