Prompt to make Claude more autonomous in web dev
4 points
18 hours ago
| 1 comment
| HN
Tell your Claude to put this in MEMORY.md file for much more autonomous development sessions.

It's made my Claude work 2x easier in the last week. So many times it'd build something then I'd find a bug. Now it finds the bugs on its own and reiterates until it's sure everything works perfectly. It's so simple but it brings it to the next level in terms of autonomy.

Prompt:

"Add this to your MEMORY.md file (or adapt the following to match our project best):

## Critical Rules

### Always test before delivering

- NEVER tell the user something works without verifying it yourself first

- After every code change: rebuild, restart server, then test the actual page/API response

- After rebuilding Next.js: ALWAYS restart the server — stale JS chunks from old builds cause client-side errors

- Test through the public URL, not just localhost

- Check both server-side rendering (curl the HTML) AND client-side (verify JS chunks load)

- *USE PLAYWRIGHT FOR UI TESTING* — don't just curl pages. Use Playwright with headless Chrome to actually render pages, click buttons, fill forms, and take screenshots. This is the ONLY way to catch client-side JS errors, broken layouts, and UX issues.

- Screenshots go to `/tmp/playwright-screenshots/` — read them to visually verify the UI

- Do NOT ask the user to test. Find the bugs yourself before delivering."

honzabroski
14 hours ago
[-]
Just implemented Boris Cherny's (engineer behind Claude Code) CLAUDE.md workflow in my project. Game changer.

Key rules that made the biggest difference:

1. Plan Mode Default — enter plan mode for any task with 3+ steps. If something goes sideways, STOP and re-plan instead of pushing forward.

2. Self-Improvement Loop — after ANY correction, CC updates tasks/lessons.md with the pattern. It stops making the same mistake twice.

3. Verification Before Done — never mark complete without proving it works. "Would a staff engineer approve this?"

6. Autonomous Bug Fixing — when given a bug report, just fix it. Don't ask for hand-holding. Zero context switching from the user.

Before this, CC would ask permission for everything and repeat mistakes across sessions. Now it plans first, fixes autonomously, and learns from corrections.

The CLAUDE.md file persists across sessions — it's basically giving CC a working memory and engineering standards in one file.

reply