Open History to see the last commit
1# AGENTS.md
2
3## Task Completion Requirements
4
5- `vp check` and `vp run typecheck` must pass before considering tasks completed.
6 - If changing native mobile code, `vp run lint:mobile` must also pass.
7- Use `vp test` for the built-in Vite+ test command and `vp run test` when you specifically need the `test` package script.
8
9## Project Snapshot
10
11T3 Code is a minimal web GUI for using coding agents like Codex and Claude.
12
13This repository is a VERY EARLY WIP. Proposing sweeping changes that improve long-term maintainability is encouraged.
14
15## Core Priorities
16
171. Performance first.
182. Reliability first.
193. Keep behavior predictable under load and during failures (session restarts, reconnects, partial streams).
20
21If a tradeoff is required, choose correctness and robustness over short-term convenience.
22
23## Maintainability
24
25Long term maintainability is a core priority. If you add new functionality, first check if there is shared logic that can be extracted to a separate module. Duplicate logic across multiple files is a code smell and should be avoided. Don't be afraid to change existing code. Don't take shortcuts by just adding local logic to solve a problem.
26
27## Package Roles
28
29- `apps/server`: Node.js WebSocket server. Wraps Codex app-server (JSON-RPC over stdio), serves the React web app, and manages provider sessions.
30- `apps/web`: React/Vite UI. Owns session UX, conversation/event rendering, and client-side state. Connects to the server via WebSocket.
31- `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.
32- `packages/shared`: Shared runtime utilities consumed by both server and client applications. Uses explicit subpath exports (e.g. `@t3tools/shared/git`) — no barrel index.
33- `packages/client-runtime`: Shared runtime package for sharing client code across web and mobile.
34
35## Reference Repos
36
37- Open-source Codex repo: https://github.com/openai/codex
38- Codex-Monitor (Tauri, feature-complete, strong reference implementation): https://github.com/Dimillian/CodexMonitor
39
40Use these as implementation references when designing protocol handling, UX flows, and operational safeguards.
41
42## Vendored Repositories
43
44This project vendors external repositories under `.repos/` as read-only reference material for coding
45agents.
46
47- Prefer examples and patterns from the vendored source code over generated guesses or web search results.
48- Do not edit files under `.repos/` unless explicitly asked.
49- Do not import from `.repos/`; application code must continue importing from normal package dependencies.
50- Manage vendored subtrees with `bun run sync:repos`; use `bun run sync:repos --repo <id>` to sync one
51 configured repository.
52- When updating a dependency with a configured vendored subtree, sync that subtree in the same change so
53 `.repos/` matches the installed dependency version.
54- When writing Effect code, read `.repos/effect-smol/LLMS.md` first and inspect `.repos/effect-smol/` for
55 examples of idiomatic usage, tests, module structure, and API design.
56- When writing relay infrastructure code with Alchemy, inspect `.repos/alchemy-effect/` for examples of
57 idiomatic usage, tests, module structure, and API design.