Add Cursor Cloud dev environment setup instructions#3
Add Cursor Cloud dev environment setup instructions#3designfailure wants to merge 1 commit intomainfrom
Conversation
- Document key dev commands (install, build, test, dev, start) - Note that tests are self-contained (in-memory SQLite) - Note Docker is not required for local dev - Document Slack credential requirement for app startup - Note dev watch target vs server entry point difference Co-authored-by: #designfailure <designfailure@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request adds a new section to AGENTS.md detailing project layout, key commands, and development 'gotchas' for Cursor Cloud. The review feedback points out a contradiction regarding the purpose of the Docker configuration and suggests improving the development script in the project configuration rather than just documenting its current behavior.
| ### Gotchas | ||
|
|
||
| - **Tests are fully self-contained**: `vitest.setup.ts` sets `INSURCLAW_DB_PATH=:memory:`, so no database file or external service is needed. | ||
| - **No Docker required for dev**: SQLite is the default database. The `docker-compose.yml` at the repo root is for a PostgreSQL/pgvector container that is only used in production (Phase 2 migration path). |
There was a problem hiding this comment.
The description of docker-compose.yml as being "only used in production" contradicts the header in the docker-compose.yml file itself (line 1), which states it is for "local development database". This inconsistency should be resolved to clarify the intended role of Docker in the development workflow.
| - **Tests are fully self-contained**: `vitest.setup.ts` sets `INSURCLAW_DB_PATH=:memory:`, so no database file or external service is needed. | ||
| - **No Docker required for dev**: SQLite is the default database. The `docker-compose.yml` at the repo root is for a PostgreSQL/pgvector container that is only used in production (Phase 2 migration path). | ||
| - **App won't start without Slack credentials**: `main.ts` exits immediately if `SLACK_BOT_TOKEN` or `SLACK_SIGNING_SECRET` are missing. Set these in `runtime/.env` (copy from `.env.example`). | ||
| - **`npm run dev` watches `src/index.ts`** (module exports), not `src/main.ts` (server entry). To dev-test the actual Slack gateway, run `npx tsx watch src/main.ts` instead. |
There was a problem hiding this comment.
Documenting that npm run dev watches the wrong file (src/index.ts instead of src/main.ts) highlights a confusing default in the project configuration. It is recommended to update the dev script in package.json to point to the server entry point (src/main.ts) to align with developer expectations and simplify these instructions.
What
Adds
## Cursor Cloud specific instructionssection toAGENTS.mdwith development environment documentation for future cloud agents.Why
Future cloud agents need durable, non-obvious context about how to work in this codebase without re-discovering setup gotchas each time.
Changes
AGENTS.md: Added a table of key dev commands (npm install,npm run build,npm test, etc.) and documented gotchas:vitest.setup.ts)npm run devwatchessrc/index.ts(exports), notsrc/main.ts(server)punycodedeprecation warning fromtsx watchVerification
All commands verified in the cloud agent environment:
npm install— 389 packages installednpm run db:migrate— SQLite schema creatednpm run build— TypeScript compiles cleanlynpm test— 23/23 tests pass (5 test files)npm start— correctly reports missing Slack credentialsTest output:
test_output.log
To show artifacts inline, enable in settings.