diff --git a/.cursorrules b/.cursorrules index 10a164341..f3b356017 100644 --- a/.cursorrules +++ b/.cursorrules @@ -328,6 +328,29 @@ npx wrangler deploy **Important:** Always use `npx wrangler deploy` without any `--env` flags. The deployment uses the default configuration from `wrangler.jsonc` with route `agents.nicholai.work`. Update `wrangler.jsonc` with new env vars in the top-level `vars` section. +### Deployment Checklist (must be followed exactly): + +1. **Never use npm.** Always run commands with pnpm (e.g. `pnpm install`, `pnpm dev`, `pnpm build`). + +2. **Before every deploy, run the Cloudflare build step:** + ```bash + npx @opennextjs/cloudflare build + ``` + If this fails, fix the error before proceeding—Wrangler deploys without this step will push stale assets. + +3. **Deploy only after a successful OpenNext build using:** + ```bash + npx wrangler deploy + ``` + **Do NOT use `--env` flags.** The deployment uses the default configuration from `wrangler.jsonc`. + +**Troubleshooting:** +- "No updated asset files to upload": you skipped the Cloudflare build; rerun step 2. +- ESLint config errors during build: they're informational—build still succeeds, but you should address them separately. +- Viewport metadata warning: move viewport values from metadata to generateViewport per Next.js docs. + +**No deploy is compliant unless each step above is completed and verified.** + ## Debugging Tips ### Check Agent Configuration