An isolated dev database starts empty, which makes any list- or thread-shaped UI impossible to look at without hand-writing fixtures. `dev:seed` copies the newest threads and their projects out of the shared home into the worktree's own database. Projections only — `orchestration_events` is never copied. The projector cursor is exclusive, so an empty event log means bootstrap streams nothing and leaves the copied rows alone; a partial event range is the real hazard, since the projector would replay a tail whose creating events are missing. Details that matter for a usable copy: - writes all nine projection_state rows, or computeSnapshotSequence reports 0 for every shell snapshot - forces sessions to stopped with no active turn, since a copied "running" session has no agent behind it and the reaper skips anything with an active turn - zeroes pending approval/input counts, as approvals are not copied - copies the intersection of columns, because the two databases are routinely on different migrations - refuses to write to the shared home Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
5.3 KiB
5.3 KiB
AGENTS.md
Task Completion Requirements
- Keep local verification focused on the files and packages changed. Run the smallest relevant test set; do not run the full workspace test suite as a routine completion step.
- Use
vp test run <test-files>for focused built-in Vite+ tests. Usevp run testonly when the affected package specifically requires itstestscript. - Backend changes must include and run focused tests for the changed behavior.
- Run targeted formatting, lint, and type checks for the affected scope when available.
- Use
- Do not run repo-wide
vp check,vp run typecheck,vp run test, or equivalent full-suite commands locally unless the user explicitly requests them. CI is responsible for the full verification suite. - After frontend feature development or any user-visible frontend behavior change, the primary agent must run one integrated verification pass for each affected client surface after integrating the work:
- Web: use the
test-t3-appskill. Launch one isolated environment, authenticate through the printed pairing URL, and verify the affected flow in the controlled browser. - Mobile: use the
test-t3-mobileskill. Connect one representative iOS Simulator or Android Emulator available on the host to one isolated environment and verify the affected flow. On compatible macOS hosts, prefer iOS for cross-platform changes and stream it through serve-sim in the T3 Code in-app browser or another available agent browser; use Android when it is the affected or viable platform. - Subagents must not independently launch dev servers or repeat integrated client verification unless their delegated task explicitly requires it.
- Stop dev servers, watchers, and other long-running verification processes when the focused verification is complete.
- Web: use the
Dev Servers
- Start the web stack with
bun run dev(equivalentlyvp run dev). Never runvp devfrom the repo root — that starts a bare Vite with no backend. - Ports are derived from the worktree path, so a worktree prefers the same pair every run instead of everyone racing for the default. They still shift when something already holds them, so read the actual values from the
[dev-runner] …line rather than assuming them.--dry-runprints them without starting anything. - To let the user try a change on their own device, use
bun run dev:share. It publishes the web port on the tailnet and logs a pairing URL already built against that origin — hand them that URL as-is. Details and troubleshooting live in thetest-t3-appskill. - Dev is single-origin: Vite proxies
/api,/ws,/oauth, and/.well-knownto the backend. Do not setVITE_HTTP_URL/VITE_WS_URLfordev/dev:web— they compile absolute localhost URLs into the bundle and break every non-localhost origin. - Need a pairing URL for a server that is already running?
bun run dev:pair. It finds the server itself; no ports or flags to get wrong. - In a worktree, dev state goes to that worktree's own gitignored
.t3— never the shared~/.t3the user's installed app runs against. Do not point a dev server at~/.t3, and do not "fix" an ambientT3CODE_HOMEby passing it through. - That database starts empty.
bun run dev:seedcopies recent projects and threads from the shared home into it, so list and thread UI has something real to render. Stop the dev server first, then restart it.
Package Roles
apps/server: Node.js WebSocket server. Wraps Codex app-server (JSON-RPC over stdio), serves the React web app, and manages provider sessions.apps/web: React/Vite UI. Owns session UX, conversation/event rendering, and client-side state. Connects to the server via WebSocket.packages/contracts: Shared effect/Schema schemas and TypeScript contracts for provider events, WebSocket protocol, and model/session types. Keep this package schema-only — no runtime logic.packages/shared: Shared runtime utilities consumed by both server and client applications. Uses explicit subpath exports (e.g.@t3tools/shared/git) — no barrel index.packages/client-runtime: Shared runtime package for sharing client code across web and mobile.
Reference Repos
- Open-source Codex repo: https://github.com/openai/codex
Use these as implementation references when designing protocol handling, UX flows, and operational safeguards.
Vendored Repositories
This project vendors external repositories under .repos/ as read-only reference material for coding
agents.
- Prefer examples and patterns from the vendored source code over generated guesses or web search results.
- Do not edit files under
.repos/unless explicitly asked. - Do not import from
.repos/; application code must continue importing from normal package dependencies. - Manage vendored subtrees with
vpr sync:repos; usevpr sync:repos --repo <id>to sync one configured repository. - When updating a dependency with a configured vendored subtree, sync that subtree in the same change so
.repos/matches the installed dependency version. - When writing Effect code, read
.repos/effect-smol/LLMS.mdfirst and inspect.repos/effect-smol/for examples of idiomatic usage, tests, module structure, and API design. - When writing relay infrastructure code with Alchemy, inspect
.repos/alchemy-effect/for examples of idiomatic usage, tests, module structure, and API design.