LearnThatStack Ace your next interview

AI Coding Assistants

Tools and features as of 2026 Checked Sep 2026 9 code snippets

The model

  • An assistant predicts likely code from what it can see. Nothing in that process proves the code is right, so every answer is a draft.
  • Context sets the quality. The model sees only the code, files and rules the tool sends. Missing context makes it guess, and unrelated files hide the details that matter.
  • The four modes are autocomplete, chat, edit and agent. Each step up gives the tool more freedom and more risk, so pick the lowest step that can do the job.
  • Delegate as far as you can check. Hand off work that a compiler or tests can verify. Keep design and costly decisions with people.
  • You own every line you commit. If you can't explain a line or show how you checked it, it isn't ready to merge.
Yougoal and reviewTooleditor or terminalModelpredicts codeCheckscompiler and testsASKprompt + filescontext files, rulesDRAFTdraft a likely guessrun tests agent modefailures try againREVIEWdiff accept or reject
The model sees only what the tool sends it. In agent mode the tool runs the checks and feeds failures back. You review the diff before anything ships.

How assistants work

what they do, and what to hand them

Completion and fill-in-the-middle

prefixmiddlesuffix
at the cursorThe model reads the code on both sides of the cursor, then writes the middle.
prefixsuffixmiddle
in trainingTraining moves the middle to the end, so the model learns to read both sides first.
Tell AI completion from IDE autocompleteAutocomplete offers real symbols. AI drafts new, unchecked code.
Explain fill-in-the-middleThe model reads code on both sides of the cursor and fills the gap.
Say why completion has its own modelChat models misplace inserts. Completion models keep up with typing.

TrapGhost text looks like autocomplete, but nothing checked it. It can call an API that doesn't exist.

Pick a mode

Type code you already have in mindInline autocomplete. Press Tab to accept.
Explain an error or compare designsChat. It changes no files unless you ask.
Make one focused change you can see as a diffEdit mode, on selected code or a few files.
Hand off a clear task that tests can checkAgent mode. It searches, edits files, runs commands and retries.

TipUse autocomplete when you know what to write, and chat when you still need to think it through.

Use agent mode safely

Spot a good task for an agentClear, follows existing patterns and has reliable automated checks.
Spot a risky oneA vague ask, weak tests, or access to production or credentials.
Give the agent its own branch and foldergit worktree add -b agent-task ../agent-task

TipReview its plan, limit its files and commands, and approve risky actions yourself.

TrapPassing tests can hide a wrong guess about the business. Read the diff, not only the test result.

What to hand off

Pick work to hand offWell-known patterns a test can check, like boilerplate and config.
Spot work to keep for yourselfNew architecture, business rules, concurrency, performance tuning.

TipOn novel work, decide the design yourself. Then ask it to list failure modes or compare options.

TrapOn unfamiliar problems it sounds confident and can ignore a key constraint.

Choose tools & models

which tool, which model, and what it costs

Copilot, Cursor or Claude Code

Get editor help tied into GitHubGitHub Copilot. Its cloud agent can turn a task into a pull request.
Work in an AI-focused editorCursor. It's strong at inline edits and repository context.
Run an agent in the terminal, remotely or in CIClaude Code. OpenAI Codex and Gemini CLI are terminal agents too.

TipCompare them on real tasks from your repo, for quality, latency, privacy and total cost.

TrapCursor is a separate editor. Check your team will accept the switch before you compare features.

IDE assistant or terminal agent

Pick an IDE assistantFor quick edits near the cursor, local debugging and visual diffs.
Pick a terminal agentFor command-driven, multi-file or remote work, scripts and CI.

TipMany teams use both, the IDE for interactive edits and the terminal for planned batch work.

TrapA terminal agent's shell can delete files, install packages or push code. Set its permissions first.

Pricing and open-source options

Say how tools charge teamsPer user, sometimes with fees for premium models and heavy agent use.
Look past the seat priceOverage, unused seats, higher tiers for admin controls, review time.
Pick Aider or ContinueWhen you need control of the model and data, or air-gapped use.
Count what open source costsHosting, upgrades, auth and support. Legal protection may be limited.

TipPick a managed product when easy rollout, support and policy controls matter most.

TrapA cheap tool is no bargain if its changes take longer to verify than to write.

Context & prompts

what the model sees, and what you ask for

What the model sees

List what an assistant usually seesYour file, selection, open tabs, attached files and search results.
Choose exactly what it readsMention or attach files, symbols, folders or docs.
Pick what to attachThe interface, one close example, the test, and current library docs.

TrapMore context isn't always better. A whole folder costs tokens and buries what matters.

Work in a big codebase

Find code by meaningA semantic index. It scales, but may return a related, stale snippet.
Find an exact name or stringText search. It works only when you know the term.
Get a compact outline of files and symbolsA repository map. It leaves out the implementation.
Read the code as it is nowAgent exploration. Current, but costs time and tokens.
Keep a long task on trackStart fresh when it gets confused. Keep a handoff document.

TipStart from a map, not a dump. Find the owning module, its tests and one current example.

TrapA bigger context window doesn't fix a repo dump. Relevant, ordered evidence still works better.

Rules files

Give Claude Code, Cursor or Copilot standing rulesCLAUDE.md.cursor/rules/.github/copilot-instructions.md
Decide what goes in oneCommands, layout, required helpers and the definition of done.
Give one subsystem its own rulesPut a scoped rules file next to it, if the tool supports that.
Enforce a limit the agent can't skipIn Claude Code, add a hook or a permission deny rule.

TipWrite direct actions like "use the shared HTTP client", not advice like "write clean code".

TrapA rules file is guidance, not enforcement. The model reads it as context and can still ignore it.

Write a code prompt

Goal and exact signatureAdd parseCsvLine(line: string): string[]ConstraintsNode 22. No new dependencies.An input and its outputa,"b,c" -> ["a", "b,c"]Edge casesAn unclosed quote throws ParseError.Non-goalsDon't change any existing export.A check you can runAdd unit tests for each rule above.
Name the parts of a good code promptGoal, constraints, an example, edge cases, non-goals and a check.
Show the project's stylePaste one existing handler or test for it to copy.
Narrow the possible solutionsAllowed files, the runtime, dependencies, and what must not change.

TipWrite it like a ticket for someone new to the codebase.

Trap"Write a CSV parser" leaves it guessing about quotes, errors and dependencies.

Prompt a tightly scoped edit

Fence in an editAllowed files, fixed behavior, required tests and forbidden actions.
Order the stepsInspect, explain, plan, then edit. Stop if context is missing.
Prompt a bug fixGive a failing test or an exact repro, and ask for the smallest fix.

TipAsk for a summary of changed files and checks run. Tight limits make any drift easy to see.

Coding workflows

test-first, refactors, reading code and commits

Test-first with an assistant

Start the loopOne failing test for one behavior. Check its edge cases yourself.
Get it to passAsk for the smallest code that passes. Run it and read the diff.
Clean up the codeRefactor while the suite stays green.

TipFor important code, review the tests apart from the code, so one wrong assumption can't shape both.

TrapAn agent may weaken or delete a failing test just to finish. Read every test change.

Refactor safely

Protect behavior before you startAdd characterization tests that record what the code does today.
Ask for one change at a timeOne named change, like extracting a function. Same behavior.
Save a checkpoint after each stepgit add -A && git commit -m "checkpoint"

TipHave it list the bugs it spots instead of fixing them inside the refactor.

TrapUnit tests alone can miss a broken boundary. Finish with integration checks.

Learn an unfamiliar codebase

Get a map of a new repoMajor modules first, then one request traced from entry to storage.
Find where a rule is enforcedAsk where it lives, with the files and symbols behind each claim.

TrapModels sometimes describe the design they expect, not the code that exists. Open the files and check.

Big multi-file agent changes

Set limits before the agent startsAllowed files, invariants, public interfaces and acceptance tests.
Spot files it shouldn't have touchedgit diff --stat main
See every change it made to testsgit diff main -- '*test*'

TipWork in batches a person can review, each checked against one approved example.

TrapAgents make failures vanish by weakening tests, adding packages or changing config. Check all three.

Autocomplete etiquette when pairing

Start a pairing sessionAgree whether suggestions stay on. Ghost text distracts some people.
Take a big suggestion while drivingPause, read it aloud and say why it fits.

TipIn an interview or assessment, ask if AI is allowed and say when you use it.

TrapA suggestion is only a proposal. It shouldn't settle a disagreement.

Your own skills and interviews

Keep doing the thinking yourselfSketch the design first, and do small tasks without AI now and then.
Probe a candidate who says AI writes their codeAsk how they specified, reviewed and tested it, and caught mistakes.
Describe your own AI use in an interviewWhere it helps, where you keep control, and one failure you caught.

TipMature use shows as clear ownership, not a share of generated lines.

TrapIf you can't rebuild, change or run what it produced, you delegated too far.

Review & verify

catch what the model got wrong

Review a generated change

Know what to look for in the diffUnrelated edits, invented APIs, duplicate helpers, changed tests.
Trace more than the happy pathEmpty or bad input, permission errors, a failing external service.
Run the machine checksFormatter, compiler and static checks, then focused tests.

TrapA green suite isn't proof. Generated tests can pass while checking the wrong behavior.

Catch invented APIs and packages

Explain a hallucinated APIA method, option or package the model made up to fit a pattern.
Catch an invented methodCompile, type-check, run tests, and check the docs for your version.
Check a package before you install itnpm view <pkg>Check its repo, maintainers, release history and downloads.
Explain slopsquattingAttackers register package names that models often invent.

TipMake package installs need human approval, and use lockfiles and an approved registry.

TrapTelling the model to check packages isn't a security boundary. Registry controls must block them.

Test generated code

Write tests from the requirementNot from the code. Cover empty, boundary, bad and failing cases.
Try many inputs at onceProperty-based tests.
Find assertions that never catch a bugMutation testing.
Test a change that crosses a service or databaseIntegration or contract tests.

TipFor critical work, have a person write some tests, so one model can't shape code and checks.

TrapRun every test the model says it ran. Read failures yourself instead of letting it explain them away.

Security holes it repeats

Name the flaws AI code repeatsUnsafe queries, weak validation, missing authorization, weak crypto.
Prevent them at scaleSecure templates and approved wrappers for auth, storage and network.
Catch them in CIStatic analysis, dependency scanning and targeted security tests.

TipGive agents least privilege, with approval for network, credential and production commands.

TrapModels copy outdated examples and often write only the happy path, with no safe failure handling.

CI when AI writes most of the code

Add checks for mistakes AI makes oftenDuplicated blocks, unsafe APIs and unexpected test changes.
Send sensitive paths to stronger reviewPath rules like CODEOWNERS for auth, payments and infrastructure.
Stop an agent weakening CIRequire approval before it changes CI rules or snapshots.

TrapPiling on weak checks causes alert fatigue. Give every gate an owner and a clear response.

Review norms and accountability

Review a pull request full of generated codeJudge evidence, not confidence. Ask for a spec, tests and risk notes.
Name who's accountable for an AI-caused outageThe engineering org. Author, reviewers and leaders share it.
Run the postmortemFind which spec, permission, test, review or rollout control failed.

TipSplit a huge generated diff, or redo it as a deterministic codemod.

Trap"The AI wrote it" is no defense. Whoever submits the code must be able to explain every line.

Secrets, IP & policy

what may enter a prompt, and who decides

Keep secrets out of prompts

Say where a pasted secret ends upOn another system, in logs, chat history or backups.
Know what never to pasteKeys, tokens, env files or real customer data. Use placeholders.
Catch a secret before it leavesRun secret scanning in local hooks and in CI.

TipExclude sensitive paths in the tool's settings, and keep credentials in a secret manager.

TrapA secret that reached a prompt is compromised. Rotate it, then record the incident.

Licensing and IP

Name the licensing riskOutput can match licensed code, with attribution or copyleft duties.
Block matches to public codeTurn on the public-code filter, and run your usual license scans.
Check the vendor's termsOutput ownership, training use, retention and any indemnity.

TipSome customer or regulated projects require you to disclose AI code, or ban it. Check the contract.

Vet a vendor before it sees your code

Check the data termsNo training on your code, retention, data location, subprocessors.
Check the admin controlsSSO, account removal, role policies, audit logs, model controls.
Check the agent featuresThey need their own command permissions and sandboxing.

TrapTest each control per feature. Copilot's content exclusion hasn't covered Chat's Edit and Agent modes.

Write an AI usage policy

Decide what the policy approvesTools, accounts, models, and which data classes may enter a prompt.
Cover agents on their ownAllowed commands, network and production access, approval gates.
Set expectations for peopleHuman ownership, review, testing, disclosure and incident reporting.

TrapA document alone won't stop an unsafe extension or an overpowered agent. Add technical controls.

Controls across a large org

Decide who owns the controlsA central layer owns vendors, identity, data policy and logging.
Match tools to data sensitivityClassify repos, and map each class to allowed models and features.
Enforce the rulesManaged settings, endpoint controls and CI, not only a document.

TrapBlock normal work without a safe path, and engineers route around you. Pair controls with support.

Rollout & metrics

adopt it, measure it, keep the codebase healthy

Measure impact with DORA

Name DORA's throughput metricsChange lead time, deployment frequency and failed deployment recovery time.
Name its instability metricsChange fail rate and deployment rework rate.
Say why you track bothDORA 2025 linked AI adoption to more throughput but less stability.

TipRecord a baseline, compare similar work, and look at distributions. Gains are rarely uniform.

TrapDon't credit the tool for every change in a broad metric. Teams, projects and release processes differ.

Avoid vanity metrics

Spot a vanity metricLines of code, commits, PR and suggestion counts. AI inflates them.
Measure outcomes insteadLead time, review delay, rework, change failures and incidents.
Use suggestion acceptance rateOnly as a tool-health signal. A low rate can mean poor context.

TrapNever rank engineers or set acceptance targets. People game the number and trust drops.

Roll out to fifty engineers

Prepare before anyone gets a seatClassify repos, approve vendors, and set up identity and audit.
Run a pilotA small, mixed group. Record a baseline, then train them.
Decide whether to expandCheck defects, rework, lead time and feedback, then grow in stages.

TipRemove inactive seats and publish what you learn. Keep usage visible without watching individuals.

TrapStop or narrow the rollout if the quality or security evidence gets worse.

Run a bake-off

Pick the test tasksReal, repeatable work, including a multi-file and a security task.
Keep it fairSame repo state, prompts and model tier. Define success up front.
Score each runSuccess, defects, review time, latency, cost, developer experience.

TipReview the enterprise controls apart from the task runs. A good demo doesn't prove they're safe.

TrapOne developer's taste skews the result. Use several, and record where each tool failed.

Team workflows as agents grow

Say how the work shiftsFrom typing code to specifying, constraining and verifying changes.
Get a team ready for more agentsAcceptance criteria, reliable tests, isolated least-privilege agents.

TipRoles change, but people still own priorities, architecture, risk and the call to release.

TrapMore agents in parallel only help if verification keeps pace with generation.

Found this useful? Pass it on.
Pro · $10/mo

This sheet stays free. With Pro, you can:

  • Every answer on this sheet. Read the full answer to all 51 questions it links, not just the 7 free ones.
  • My sheet. The cards you star and the ones you miss in Quiz me, from every sheet, on one page to quiz and print.
  • PDFs. Download this sheet and My sheet, laid out for A4, with every question a link to its answer.
  • The rest of Pro. Every answer in the question library, and 1,000 AI credits a month.