|
1 | 1 | # AGENTS.md |
2 | 2 |
|
3 | | -## Cloud-specific instructions |
| 3 | +This file is included in full context for every agent conversation. Keep it |
| 4 | +tiny and stable. |
4 | 5 |
|
5 | | -If you're fixing a bug, always attempt to reproduce it with an automated test or |
6 | | -manually first. This is the only way to be sure you've actually fixed the bug. |
| 6 | +## Editing policy |
7 | 7 |
|
8 | | -### Overview |
| 8 | +- Avoid adding operational details to `AGENTS.md`. |
| 9 | +- Only update `AGENTS.md` to reference other docs/files. |
| 10 | +- Put project callouts and workflow details in `docs/agents/` and link them from |
| 11 | + here. |
9 | 12 |
|
10 | | -This is Kent C. Dodds' personal website (kentcdodds.com) — a React Router v7 app |
11 | | -with Express, SQLite (via Prisma), and extensive MSW mocks for all external |
12 | | -APIs. |
| 13 | +## Agent docs (source of truth) |
13 | 14 |
|
14 | | -### Prerequisites |
| 15 | +- `docs/agents/project-context.md` (setup, commands, project-specific caveats) |
| 16 | +- `docs/agents/code-style.md` |
| 17 | +- `docs/agents/bugfix-workflow.md` |
| 18 | +- `docs/agents/testing-principles.md` |
15 | 19 |
|
16 | | -- **Node.js 24** is required (`engines` field in `package.json`). Install via |
17 | | - `nvm install 24 && nvm alias default 24`. |
18 | | -- The `.npmrc` sets `legacy-peer-deps=true`; `npm install` respects this |
19 | | - automatically. |
20 | | - |
21 | | -### Key commands |
22 | | - |
23 | | -Standard dev commands are documented in `README.md` and `CONTRIBUTING.md`. Quick |
24 | | -reference: |
25 | | - |
26 | | -| Task | Command | |
27 | | -| --------------- | --------------------------------------------------------------------------------- | |
28 | | -| Dev server | `npm run dev` (starts on port 3000 with `MOCKS=true`) | |
29 | | -| Lint | `npm run lint` | |
30 | | -| Typecheck | `npm run typecheck` | |
31 | | -| Unit tests | `npm run test -- --watch=false` | |
32 | | -| E2E tests | `npm run test:e2e:dev` (requires Playwright browsers: `npm run test:e2e:install`) | |
33 | | -| DB reset + seed | `npx prisma@7 migrate reset --force` then `npx tsx other/runfile prisma/seed.ts` | |
34 | | - |
35 | | -### Non-obvious caveats |
36 | | - |
37 | | -- **Dev server is not a TTY**: `server/dev-server.js` detects non-TTY and |
38 | | - disables keyboard shortcuts. This is expected in cloud agent terminals. |
39 | | -- **All external APIs are mocked** via MSW when `MOCKS=true` (the default in |
40 | | - dev). No real API keys are needed for local development — the `.env.example` |
41 | | - values are sufficient. |
42 | | -- **SQLite is file-based**: The database file lives at `prisma/sqlite.db`. No |
43 | | - external database server is required. |
44 | | -- **Cache database**: A separate SQLite cache DB is created at `other/cache.db`. |
45 | | - It's populated on first request or via `npm run prime-cache:mocks`. |
46 | | -- **Patch-package**: Three Remix packages are patched during `postinstall` |
47 | | - (patches in `other/patches/`). If you see patch errors after dependency |
48 | | - changes, check those patches. |
49 | | -- **Content is filesystem-based**: Blog posts are MDX files in `content/blog/`. |
50 | | - Changes to content files are auto-detected by the dev server's file watcher. |
| 20 | +If you discover a new sharp edge, workflow, or non-obvious project behavior, |
| 21 | +update the relevant doc(s) in `docs/agents/` so future agent runs are faster and |
| 22 | +more correct. Keep callouts organized under clear headings and prefer concise, |
| 23 | +project-specific guidance over generic advice. |
0 commit comments