Establish Your Code Guardrails
Start from a clean commit and make the project feedback explicit: strict types where supported, a linter, deterministic formatting checks, focused tests, and documented commands that both humans and agents can run.
Give Cursor reliable feedback loops before asking it to repair code: establish types, linting, formatting, and focused tests, let the agent reproduce a failure, then inspect the diff and rerun the same checks plus a reusable branch review.


Source episode · 09:00
How I AI: Lee Robinson's Workflows for Resilient Code with Cursor and Sharper Writing with ChatGPTwith Claire Vo
Lee explains how types, linting, formatting, and tests give Cursor feedback it can act on, demonstrates an agent fixing lint errors and rerunning the command, and shows a reusable branch-review command.
A small, explained code change that fixes the reproduced failure, passes the relevant checks, and survives a branch-level review for behavior the narrow command may miss.
AI-first code editor
Step by step
Follow the sequence once, then adapt the prompts, checks, and handoffs to your own setup.
3 steps
Start from a clean commit and make the project feedback explicit: strict types where supported, a linter, deterministic formatting checks, focused tests, and documented commands that both humans and agents can run.
Give Cursor the failing command and a narrow repair boundary. Require it to reproduce the issue, explain the cause, show the planned files, make the smallest fix, and rerun the checks.
Run [failing command] and reproduce the issue. Explain the root cause and list the files you expect to change. Make the smallest fix within [scope]. Do not disable rules, weaken types, delete tests, or change unrelated behavior. Rerun [focused checks] and summarize the diff.
Create a reusable review command for the branch diff. Check loading and offline states, error handling, security-sensitive code, data changes, test coverage, and accidental scope, then inspect each finding before making another edit.
Review the current branch diff against [base]. Look for correctness regressions, unsafe type or lint suppressions, missing error and loading states, offline or retry issues, security and privacy risks, data migration concerns, and missing tests. Cite files and lines. Do not modify code until I select a finding.
Treat every review finding as a hypothesis. Confirm it in the referenced code or with a focused test before changing the branch.
Turn an idea into a PRD, user stories, and a plan.
After the steps
How to recover when the loop fails and where human judgment helps.
Recover
Keep building

Log your workouts effortlessly without ever opening a spreadsheet. This workflow uses the Claude mobile app to parse a simple voice note and automatically update your workout tracking spreadsheet in the background.

Create a custom email management interface within Claude to read, triage, and draft replies without opening the Gmail tab. This workflow helps you reclaim focus and compound your learnings by training your AI on every interaction.

Build a fully automated system in Claude to generate personalized, interactive HTML proposals and client onboarding materials, saving hours on administrative work and creating a high-touch experience.
Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.