Claude Code invented one endpoint shape. A 3-line rule fixed it #Shorts
Watch on YouTube · Demo repo (notes-api)
Claude Code invented one endpoint shape without a rule; a three-line CLAUDE.md rule made it ask first and write zero lines. Demo repo (agentshipped/notes-api): https://github.com/agentshipped/notes-api I give the agent the same note-search task twice on a demo API. Without the rule it silently picks a route, a parameter name and a response shape, then I check the diff and discard it. With the rule (ask before choosing any API shape, list assumptions as questions, write no code until I answer) it stops and asks about route, parameter and response format. Copy the three lines into your own CLAUDE.md and count your agent's guesses. Not just JavaScript: the rule is plain text, so put the same three lines in AGENTS.md for Codex-style agents or in .cursorrules for Cursor. Tools: Claude Code, CLAUDE.md, AGENTS.md, .cursorrules