agentleFS
gronxbgronxb/codex-relay/AGENTS.md

codex-relay

AGENTS.md733 starsChanged 2 months agoApache-2.0View on GitHub

This pnpm monorepo contains a mobile Codex client backed by a local server. apps/mobile is the Expo React Native app, with routes in src/app, UI in src/components, state in src/state, API helpers in src/lib, and assets in assets. packages/codex-relay contains the Hono Node server in src, Vitest tests in test, and shared Zod API contracts in src/api-schema.ts. Treat dogfood-output* as generated artifacts. Use TypeScript throughout. Formatting is owned by oxfmt; do not hand-format around it. The current style uses two-space…

The file

We split this AGENTS.md into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Prefer established UI primitives over hand-rolling fragile React Native layouts.

    line 25
  2. Very specific:

    Do not create ad hoc Modal + dimmer + nested Pressable sheet structures in feature components.

    line 28
  3. Very specific:

    Do not position bottom sheet row text with absolute.

    line 29
  4. Distinctive:

    Put spacing, safe-area padding, dimmer behavior, accessibility roles, and iOS layout fixes inside reusable primitives rather than …

    line 30
  5. Distinctive:

    If a new screen needs a layout pattern that is likely to recur, add or extend a UI primitive first, then compose the feature screen from …

    line 31
  6. Distinctive:

    After changing mobile UI primitives or their callers, capture the affected screen in the iOS simulator or device when practical, especially …

    line 32
  7. Very specific:

    Do not commit local secrets, device-specific URLs, or generated native build output.

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Repository Guidelines

Project Structure & Module Organization

This pnpm monorepo contains a mobile Codex client backed by a local server. apps/mobile is the Expo React Native app, with routes in src/app, UI in src/components, state in src/state, API helpers in src/lib, and assets in assets. packages/codex-relay contains the Hono Node server in src, Vitest tests in test, and shared Zod API contracts in src/api-schema.ts. Treat dogfood-output* as generated artifacts.

Build, Test, and Development Commands

  • pnpm install: install workspace dependencies with pnpm 10.
  • pnpm dev: run the local server with tsx watch; it listens on port 8787.
  • pnpm dev:server: run the local server with tsx watch; it listens on port 8787.
  • pnpm dev:mobile: start Expo Metro for a development client.
  • pnpm dev:mobile:ios / pnpm dev:mobile:android: build and run the native dev client.
  • pnpm lint: run oxlint plus oxfmt checks across apps and packages.
  • pnpm lint:fix: apply oxlint fixes and format the repo.
  • pnpm typecheck: run tsc --noEmit in every package.
  • pnpm test: run the server Vitest suite.

Coding Style & Naming Conventions

Use TypeScript throughout. Formatting is owned by oxfmt; do not hand-format around it. The current style uses two-space indentation, double quotes, trailing commas where added, and ESM imports. React components use PascalCase file and export names, hooks use use-* file names and useX functions, and helpers use camelCase. Keep shared API shapes in packages/codex-relay/src/api-schema.ts.

Mobile UI Primitives

Prefer established UI primitives over hand-rolling fragile React Native layouts.

  • For any mobile bottom sheet, use AppBottomSheet and SheetActionRow from apps/mobile/src/components/ui/bottom-sheet.tsx.
  • Do not create ad hoc Modal + dimmer + nested Pressable sheet structures in feature components.
  • Do not position bottom sheet row text with absolute; keep rows as icon/text/trailing columns through SheetActionRow.
  • Put spacing, safe-area padding, dimmer behavior, accessibility roles, and iOS layout fixes inside reusable primitives rather than duplicating them per screen.
  • If a new screen needs a layout pattern that is likely to recur, add or extend a UI primitive first, then compose the feature screen from that primitive.
  • After changing mobile UI primitives or their callers, capture the affected screen in the iOS simulator or device when practical, especially for modals, bottom sheets, keyboard-adjacent UI, and compact controls.

Testing Guidelines

Server tests use Vitest and live in packages/codex-relay/test with *.test.ts names. Add focused route or schema coverage when changing API behavior, validation, streaming, or thread state. Run pnpm test, then pnpm typecheck and pnpm lint before handing off broader changes. Mobile code currently relies on typechecking and manual/dev-client verification; document any device or simulator checks in the PR.

Commit & Pull Request Guidelines

The short Git history uses simple Conventional Commit-style messages such as chore: oxlint, oxfmt; prefer feat:, fix:, chore:, or test: with an imperative summary. PRs should include a brief description, validation commands run, linked issue if applicable, and screenshots or screen recordings for mobile UI changes. Mention configuration changes such as EXPO_PUBLIC_CODEX_RELAY_SERVER_URL or CODEX_RELAY_WORKSPACE_PATH.

Security & Configuration Tips

Do not commit local secrets, device-specific URLs, or generated native build output. Physical devices usually need EXPO_PUBLIC_CODEX_RELAY_SERVER_URL=http://<host-lan-ip>:8787; simulators and web can use the default 127.0.0.1 value.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.