◆ AI · build

Build a feature with an AI agent

Describe the feature, let the agent write the code, then you read every line before it ships.

4heights
8tasks
8roles do it

AI prompts

do it · improve it · decide · become
AExecute — “help me do it”You are a senior engineer. I want to add [feature: e.g. email/password login with sessions] to…+
You are a senior engineer. I want to add [feature: e.g. email/password login with sessions] to my app. Stack: [React + Node/Express + Postgres]. Do this in order: 1) Ask me up to 5 questions if anything is unclear, then wait. 2) List the files you'll create or change, one line each. 3) Write the code for each file in full, with the filename above it. 4) Show the exact commands to install any new packages and run migrations. 5) Give me a manual test I can run to prove it works. 6) Flag anything I still need to do by hand (env vars, secrets, config). Don't skip error handling.
when the reply comes backPush once: ask it to sharpen the weakest part, and to say what it assumed.
BImprove — “do it better”Here's my working feature code: [paste code]. It works but it's rough. Do three things and…+
Here's my working feature code: [paste code]. It works but it's rough. Do three things and nothing else: 1) Point out any bug or edge case that will break in production, with the line. 2) Show where I'm not handling errors, empty states, or bad input. 3) Rewrite only the parts that need it, and tell me why each change matters. Keep my structure and naming unless it's actively wrong. No style-only nitpicks.
when the reply comes backPush once: ask it to sharpen the weakest part, and to say what it assumed.
CDecide — “help me choose”I need to add [feature] and I'm choosing between [option A: e.g. build it myself with X] and…+
I need to add [feature] and I'm choosing between [option A: e.g. build it myself with X] and [option B: e.g. use library Y]. My constraints: [team size, deadline, how long this app needs to live, how comfortable I am with the tech]. Compare them on: setup effort, long-term maintenance, how hard it is to debug when it breaks, and lock-in. Show the reasoning, then give me your pick for MY situation and the one case where I'd want the other.
when the reply comes backPush once: ask it to sharpen the weakest part, and to say what it assumed.
DBecome — “help me grow”You just helped me build [feature]. Now teach me to do this alone next time. Using the code we…+
You just helped me build [feature]. Now teach me to do this alone next time. Using the code we wrote as the example: 1) Explain the shape of the solution — why these files, why this order. 2) Point out the 2-3 decisions that mattered most and how you made them. 3) Give me a checklist I can follow for any feature like this. 4) Ask me two questions to check I actually understood, and correct me. Talk to me like I'm learning, not like I already know.
when the reply comes backPush once: ask it to sharpen the weakest part, and to say what it assumed.

The real tasks

8 of them
I have to add a login flow to an existing app
I have to build a CRUD API by Friday
I have to wire up a payment webhook I've never touched
I have to add search to a page that doesn't have it
I have to ship an MVP feature this weekend alone
I have to refactor a messy component while adding a button
I have to add tests to code I just wrote fast
I have to build something in a framework I barely know

Who does this

8 roles
Software EngineerFull-Stack DeveloperFrontend DeveloperBackend DeveloperStartup FounderIndie HackerDevOps EngineerJunior Developer

Questions people actually ask

with the jobs and tasks they touch

Give it the full context up front — your stack, the existing files it touches, and what 'done' looks like. Vague ask, vague code.

  1. Tell it your exact stack and versions
  2. Paste the existing files the feature connects to
  3. Describe the feature as a user story, not a vibe
  4. Ask it to list files before writing any code
  5. Have it write full files, not fragments

Copilot's agent mode and chat can do multi-file work if you point it at the right files and describe the goal. Don't just sit and hit tab.

  1. Open the files the feature will touch so Copilot sees them
  2. Use the chat, not inline — describe the full feature
  3. Ask it to plan the change across files first
  4. Accept in chunks and read each one
  5. Run and test before you accept the next chunk

Ask right after the feature is done, while the context is fresh. Tell it which test runner you use or it'll pick one you don't have.

  1. Name your test framework (Jest, Vitest, pytest, etc.)
  2. Point at the feature code you want covered
  3. Ask for happy path plus the edge cases that break
  4. Have it show the command to run the tests
  5. Run them yourself and check they actually fail when they should

Have the agent read the existing code first and explain it back to you before it changes anything. If its explanation is wrong, you caught a problem early.

  1. Paste the relevant existing files
  2. Ask it to explain what the code does in plain words
  3. Confirm or correct its understanding
  4. Then describe the feature you're adding
  5. Ask what it might break in the current behavior
see alsoJunior Developer →Software Engineer →

Fence it in. Tell it exactly which files it may touch and that everything else stays untouched. Agents love to 'improve' things you didn't ask about.

  1. Name the specific files it's allowed to change
  2. Say explicitly: don't touch anything else
  3. Ask for the smallest change that works
  4. Have it show a diff, not full rewrites
  5. Reject any change outside your scope

Autocomplete finishes the line you're typing. An agent takes a goal, plans across files, writes code, and can run commands. Different jobs, different trust levels.

  • Autocomplete: reactive, one spot, you drive
  • Agent: proactive, whole feature, it drives and you check
  • Autocomplete rarely breaks other files; agents can
  • Agents need clear scope or they wander
  • Agents save more time but demand more review
  • Use autocomplete when you know the code, agent when you don't

It's predicting plausible code, not executing it. It'll invent function names, use an old API, or assume a package version you don't have. Confident and wrong is its default failure mode.

The context window is how much code and conversation the agent can hold at once. Feed it too much and it forgets the start; feed it too little and it guesses.

  • It's the model's short-term memory, measured in tokens
  • Big codebases don't fit — you pick what to show it
  • Show only the files the feature actually touches
  • When it starts forgetting your rules, the window's full
  • Start a fresh chat for a new feature to clear noise
  • More context isn't always better — relevant beats big

Good instinct — payments are where confident-wrong code costs real money. Before you ship, have the agent walk you through every failure case: what happens on a duplicate event, a failed charge, a retry.

Then test those cases yourself with the provider's test tools. Don't trust that it handled idempotency just because it said it did.

It touched something it shouldn't have, or changed shared code. Paste the failing test output back to it and ask what its change did to that code path.

Then decide if you trust its fix or want to revert and try again with a tighter scope. This is exactly why you commit before letting an agent loose — so you can undo.

Yes for speed, but read what it writes. An MVP built by an agent you don't understand becomes a codebase you can't debug at 2am when a user hits a bug.

Let it build fast, but make it explain the tricky parts as it goes. You're not just shipping — you're the one who maintains this next week.

see alsoStartup Founder →Indie Hacker →

They overlap but fit different setups. Pick by where you work and how much autonomy you want the agent to have.

ToolBest forThe catch
OpenAI CodexDelegating whole tasks in a sandboxYou review async, less line-by-line control
GitHub CopilotLiving inside VS Code with an existing repoBest in Microsoft's ecosystem, subscription
OpenCodeTerminal-first, open-source, model-agnosticRougher edges, you configure more yourself
see alsoSoftware Engineer →Indie Hacker →

More autonomy means more speed and more ways to break things. Match it to how much you trust yourself to catch mistakes.

ApproachGood whenRisk
Suggests code onlyYou want to review every changeSlower, more manual work
Runs commands itselfRepetitive or well-scoped tasksCan delete or break things fast
Sandboxed autonomyBigger tasks you'll review afterYou may not notice bad decisions early

Because someone has to know if the feature is right, not just working. The agent has no idea what your users actually need, why the last dev made a weird choice, or what breaks the business when it fails.

It writes code faster than you. You decide what to build, catch the confident mistakes, and own it when it ships. That job isn't going anywhere — but the person who only copy-pastes without reading is.

see alsoJunior Developer →Software Engineer →

Trust the speed, verify the logic. It'll nail boilerplate and get the shape right, but it will also quietly skip a security check or handle the wrong error. Read every line before it goes near production.

Treat it like a fast junior who never admits they're unsure. Great output, zero accountability — that part stays yours. Commit before it runs, test the failure cases yourself, and never ship what you haven't read.