# How to Prompt Cursor, Windsurf & Copilot to Get Reliable Output <!-- ref: @content/youtube/yifan-bth/how-to-prompt-cursor-windsurf-copilot-to-get-reliable-output tags: [AI coding assistants, prompt specificity, task sizing, context management, typed languages, planning with reasoning models] version: 2 updated_at: 2026-11-24T07:23:13.921Z --> **[Watch on YouTube](https://www.youtube.com/watch?v=z_7CLMYKwGs)** # How to Prompt Cursor, Windsurf & Copilot to Get Reliable Output *Synthesized from Yifan on Beyond the Hype, 2024-12-23.* A solo presenter offers an iterative framework for prompting AI code editors such as Cursor and Windsurf so that output stays reliable as a codebase grows. ## Core Thesis Yifan argues that AI coding output degrades as a codebase grows, because more constraints must fit into the same context window. The fix is to match prompt specificity and task size to codebase complexity, keep sessions short, and use a typed language so the model receives structure for free. ## Key Insights - **Prompt detail must scale with the codebase.** Prototypes tolerate vague prompts; a mature codebase needs explicit libraries, storage types and auth providers. The host's example: name the database (Supabase) and the Google-only login rather than saying "add auth". - **Aim for one or two iterations.** If a feature needs more than two rounds, Yifan treats it as a sign the spec or the task is wrong, and suggests rewriting the prompt until it works in one shot. - **Task size is a triangle.** Plot task complexity against codebase complexity; the more complex the codebase, the smaller the task should be. Smaller diffs are also easier to review as if reviewing a pull request. - **Plan with a reasoning model.** Yifan uses o1 inside VS Code with codebase context to draft a plan, then tweaks it. The cited prices: a $10 VS Code subscription that Yifan says includes roughly 100 free prompts a day, versus about 40 cents per query in Cursor. Windsurf did not offer o1 at the time. - **Start a new session.** After about three failed follow-ups, Yifan starts a new composer or Cascade session rather than adding error output to a polluted context. Small follow-up tweaks can stay in the same session. - **Typed languages are free context.** Types describe data structure at the function interfaces, and Cursor's lint feedback lets the model fix its own type errors within one generation. Yifan picks TypeScript for production work and recommends explicit types on critical function returns. - **Looking ahead.** For autonomous agents such as Devin, Yifan expects the skill to shift from writing task-level prompts to defining goals and guardrails. ## Actionable Takeaways 1. Rewrite a prompt that needed several rounds and retry it in one shot, to sharpen the spec. 2. Keep each AI task to a midsize feature on a mature codebase, and review the diff before running tests. 3. Start a new session after roughly three failed follow-ups instead of continuing the same thread. 4. Draft feature plans with a reasoning model, then edit the plan before handing it to the coding assistant. 5. Use TypeScript and explicit types on critical interfaces so the editor's type checks can catch the model's errors. ## Notable Quotes > "I want to aim to get AI to get the coding assistant to do things within at most two iterations" — Yifan > "use a well-known typed language for your production projects" — Yifan --- *Related: `@content/youtube/yifan-bth/cursor-windsurf-settings-to-5x-ais-output-quality-works-with-vs-code-too` · `@content/youtube/yifan-bth/windsurf-vs-cursor-in-depth-ai-code-editor-comparison` · `@content/youtube/yifan-bth/the-complete-claude-code-workflow-90-skip-this` · `@content/youtube/steph-france/i-build-ai-agents-for-4-businesses-none-of-them-use-teams` · `@content/youtube/cole-medin/11-more-tiny-coding-agent-fixes-with-a-stupid-amount-of-payoff-learn-these-now`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*