Skip to content

EXPERIMENTAL: T3 Code fork migration#10

Draft
josephmqiu wants to merge 4 commits intomainfrom
feat/t3-fork-migration
Draft

EXPERIMENTAL: T3 Code fork migration#10
josephmqiu wants to merge 4 commits intomainfrom
feat/t3-fork-migration

Conversation

@josephmqiu
Copy link
Owner

Summary

EXPERIMENTAL — Do not merge. This is the T3 Code fork migration branch.

  • Fork T3 Code backend as monorepo server layer (Effect-TS, CQRS, SQLite, WebSocket)
  • Strip code-editor features (terminal, git, checkpointing, file picker, diffs)
  • Port game-theory domain services (entity graph, analysis orchestrator, revalidation, MCP tools)
  • Add analysis CQRS aggregate (11 commands, rollback, loopback/convergence)
  • Add SQLite write-through persistence for entities
  • Replace SSE/HTTP transport with WebSocket
  • Add prompt config system (pluggable analysis methodologies)
  • Canonicalize domain types in packages/contracts

Status

  • Build: 4/4 pass
  • Typecheck: 5/5 pass
  • Tests: 686/698 pass (12 pre-existing from T3 strip)
  • App launches and renders

Remaining work

  • Entity graph as Effect Service (currently module singleton)
  • Orchestrator as Effect Service (currently module singleton)
  • Remaining 12 server test failures
  • Integration tests + acceptance matrix
  • Full Electron identity migration (T3CODE_* env vars)

🧪 This branch is experimental. It validates the T3 fork approach before committing to the full migration.

🤖 Generated with Claude Code

josephmqiu and others added 4 commits March 24, 2026 23:23
…s pipeline

Fork T3 Code backend as the server layer, restructure into Bun workspaces
monorepo (apps/desktop, apps/server, apps/web, packages/contracts, packages/shared),
and integrate the game theory domain with T3's orchestration engine.

Server integration:
- Wire analysis CQRS aggregate (11 commands) into OrchestrationEngine
- Start AnalysisReactor in server layers for entity graph side effects
- Add SQLite write-through persistence for entities (survives restart)
- Unstub MCP control tools (start_analysis, abort, rerun call orchestrator)
- Add 11 typed analysis events to contracts OrchestrationEvent union
- Strip code-editor features (terminal, git, checkpointing, file picker, diffs)
- Strip editor RPCs from WebSocket server
- Kill revision-diff-stub placeholder success (now throws)

Frontend migration:
- Replace SSE/HTTP transport with WebSocket (analysis-rpc.ts, ws-client.ts)
- Wire editor-layout, chat-panel, entity-overlay to WebSocket transport
- Remove legacy analysis-client imports (zero remaining)
- Delete context-optimizer.ts (no manual token management)
- Remove trimChatHistory, buildPriorContext, editQueue pattern

Domain canonicalization:
- Move entity/methodology/event types to packages/contracts
- Both apps re-export from @t3tools/contracts (single source of truth)
- Add prompt config system (manifest.yaml, instructions/, phase-prompts/)
- Update architecture contract for CQRS tool-call model

Build infrastructure:
- Add packageManager field, turbo.json, tsconfig.base.json
- Create script stubs for T3-specific build dependencies
- Typecheck passes 5/5, build passes 4/4

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix server test harness: remove checkpoint/git service refs, add AnalysisReactor
- Wire initTransportLayer() in editor-layout useEffect for WS connection
- Delete legacy SSE analysis-client.ts and its tests (zero SSE imports remain)
- Rename product identity: T3 Code → Game Theory Analyzer in launcher + package
- Fix turbo task refs: t3#build → @gta/server#build
- Delete root server/ and src/ directories (superseded by apps/)
- Add GTA_* env vars alongside T3CODE_* in turbo.json

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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