- The skill told agents both to never put a pairing URL in a response and
to hand the shared one to the user. State the rule and its single
exception explicitly: give the URL to the person who asked for access,
never put it anywhere durable.
- A failed `tailscale serve` left the port unshared, because the stale-
mapping clear had already run. The clear is still required (old
mappings carry path routes that serving "/" would not replace), so say
so in the error instead of letting an operator assume the previous
mapping survived.
- Worktree-derived ports were described as collision-free. They are a
preferred offset, not a guarantee — hashes can collide and occupied
ports shift both values. Qualified in AGENTS.md, the skill, and
docs/reference/scripts.md.
CodeRabbit also asked for tests around the pairing-url command; those
landed in 0555604de, which it had not yet seen.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
4.8 KiB
4.8 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.
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.