Skip to content

docs(mapgen-studio): redesign workstream — frame, research, audit, target architecture#1603

Merged
mateicanavra merged 5 commits into
mainfrom
design/mapgen-studio-redesign
Jun 12, 2026
Merged

docs(mapgen-studio): redesign workstream — frame, research, audit, target architecture#1603
mateicanavra merged 5 commits into
mainfrom
design/mapgen-studio-redesign

Conversation

@mateicanavra

Copy link
Copy Markdown
Owner

docs(mapgen-studio): redesign workstream — frame, research, audit, target architecture

Open the MapGen Studio redesign initiative: a top-1%, data-driven React 19 rebuild
that decomposes the 3,010-line App.tsx, introduces a native effect-orpc server on
Bun, oRPC-native TanStack Query + Zustand on the client, and full canonical
shadcn/ui + Tailwind v4 — with behavior parity for map-gen, Deck.gl, recipes, and
the live-game control loop.

Artifacts:

  • 00-GOAL.md — framed objective, user decisions, falsifier, parity hard core
  • research/01-orpc-effect-bun.md, research/02-orpc-tanstack-zustand.md
  • audit/03-component-architecture, 04-design-system, 05-server-contracts, 06-typescript-rigor
  • architecture/10-target-architecture.md, 11-slice-plan.md
  • apps/mapgen-studio/system.md — extracted current design language

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

feat(studio-server): A1 — scaffold @civ7/studio-server + oRPC contracts (16 endpoints)

Contract-first oRPC package (zod I/O) covering all 16 current /api endpoints
across civ7., civ7.live., runInGame., mapConfigs., studio.* — the typed corpus
the client will consume. No business logic yet (services/router land in A2/A3).

Parity captured as contract-level invariants: live.status embedded-{error} 200
shape, non-uniform error status codes, runInGame.start .catchall so the
assertNoRawControlFields security scan can still reject raw control keys, and the
status-404 serverInstanceId/serverStartedAt restart-detection echo. App-anchored
outputs (run-in-game status, save/deploy status, setup catalog) reproduced
field-for-field from features/*/status.ts without importing app code.

Verified: bunx turbo run check --filter=@civ7/studio-server — clean (0 errors).

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

docs(mapgen-studio): PAUSE redesign — live-control substrate correction

User correction: no FireTuner reads; consume the actual latest live-control code.
Verified the new effect-oRPC control substrate (control-oRPC router +
Civ7IntelligenceBridge) is NOT in this base (packages/civ7-control-orpc is empty)
— it lives in the 570-branch live-control stack still being consolidated, and the
mapgen-studio Studio link is itself being rebuilt there. Studio reads live state
today via @civ7/direct-control (vite.config.ts:32), the surface being superseded.

Decision: full pause. Re-baseline off main once the consolidated control-oRPC
work merges. Server (Phase A) + data (Phase B) + live-coupled decomposition are
blocked; their server-contract audit (05) and architecture §1 are marked
provisional. Design-system / component-architecture / TS-rigor audits and
client-pattern research remain valid. Resume conditions recorded in 00-GOAL.md.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

docs(mapgen-studio): add post-merge resume prompt for redesign workstream

Self-contained handoff packet (framing-design: objective-framing × audience-export
for a post-compaction recipient). Lets the user re-enter the paused redesign after
the control-oRPC substrate merges to main: read-first docs, confirmed decisions,
realign+re-baseline checklist (consume control-oRPC, no FireTuner), Phase A→G plan,
hard core + falsifier. Includes a guard to STOP if main lacks the substrate.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

docs(mapgen-studio): reframe redesign — normative FRAME, un-pause, design-system-first

  • Add FRAME.md: normative operating model + guardrails (Graphite never-submit,
    design-system-first, OpenSpec-backed slices, live-control seam vs wait-for-merge,
    parity hard core, falsifier).
  • Reset controlling goal in 00-GOAL.md (create-goal fallback record); supersede
    the PAUSED/wait-for-merge sections; ACTIVE status ledger in design-system-first
    phase order (P1 design system → P7 hand over unsubmitted stack).

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

mateicanavra and others added 5 commits June 12, 2026 05:03
…rget architecture

Open the MapGen Studio redesign initiative: a top-1%, data-driven React 19 rebuild
that decomposes the 3,010-line App.tsx, introduces a native effect-orpc server on
Bun, oRPC-native TanStack Query + Zustand on the client, and full canonical
shadcn/ui + Tailwind v4 — with behavior parity for map-gen, Deck.gl, recipes, and
the live-game control loop.

Artifacts:
- 00-GOAL.md — framed objective, user decisions, falsifier, parity hard core
- research/01-orpc-effect-bun.md, research/02-orpc-tanstack-zustand.md
- audit/03-component-architecture, 04-design-system, 05-server-contracts, 06-typescript-rigor
- architecture/10-target-architecture.md, 11-slice-plan.md
- apps/mapgen-studio/system.md — extracted current design language

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ts (16 endpoints)

Contract-first oRPC package (zod I/O) covering all 16 current /api endpoints
across civ7.*, civ7.live.*, runInGame.*, mapConfigs.*, studio.* — the typed corpus
the client will consume. No business logic yet (services/router land in A2/A3).

Parity captured as contract-level invariants: live.status embedded-{error} 200
shape, non-uniform error status codes, runInGame.start .catchall so the
assertNoRawControlFields security scan can still reject raw control keys, and the
status-404 serverInstanceId/serverStartedAt restart-detection echo. App-anchored
outputs (run-in-game status, save/deploy status, setup catalog) reproduced
field-for-field from features/*/status.ts without importing app code.

Verified: bunx turbo run check --filter=@civ7/studio-server — clean (0 errors).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
User correction: no FireTuner reads; consume the actual latest live-control code.
Verified the new effect-oRPC control substrate (control-oRPC router +
Civ7IntelligenceBridge) is NOT in this base (packages/civ7-control-orpc is empty)
— it lives in the 570-branch live-control stack still being consolidated, and the
mapgen-studio Studio link is itself being rebuilt there. Studio reads live state
today via @civ7/direct-control (vite.config.ts:32), the surface being superseded.

Decision: full pause. Re-baseline off `main` once the consolidated control-oRPC
work merges. Server (Phase A) + data (Phase B) + live-coupled decomposition are
blocked; their server-contract audit (05) and architecture §1 are marked
provisional. Design-system / component-architecture / TS-rigor audits and
client-pattern research remain valid. Resume conditions recorded in 00-GOAL.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ream

Self-contained handoff packet (framing-design: objective-framing × audience-export
for a post-compaction recipient). Lets the user re-enter the paused redesign after
the control-oRPC substrate merges to main: read-first docs, confirmed decisions,
realign+re-baseline checklist (consume control-oRPC, no FireTuner), Phase A→G plan,
hard core + falsifier. Includes a guard to STOP if main lacks the substrate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sign-system-first

- Add FRAME.md: normative operating model + guardrails (Graphite never-submit,
  design-system-first, OpenSpec-backed slices, live-control seam vs wait-for-merge,
  parity hard core, falsifier).
- Reset controlling goal in 00-GOAL.md (create-goal fallback record); supersede
  the PAUSED/wait-for-merge sections; ACTIVE status ledger in design-system-first
  phase order (P1 design system → P7 hand over unsubmitted stack).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

Railway preview (MapGen Studio): not provisioned for this PR.

Policy (Graphite stacks): previews are created only for the top-of-stack PR by default.

  • To force a preview for this PR: add label railway-preview
  • To suppress a preview: add label no-railway-preview

Debug: {"isClosed":true,"isFork":false,"suppress":false,"force":false,"isTopOfStack":true,"hasToken":true,"draft":false}

mateicanavra commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

This was referenced Jun 12, 2026
This was referenced Jun 12, 2026
@mateicanavra
mateicanavra merged commit 16d7919 into main Jun 12, 2026
1 of 3 checks passed
@mateicanavra
mateicanavra deleted the design/mapgen-studio-redesign branch June 12, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant