home
›
cheatsheets
›
ai_assisted_development
›
agentic_coding
Free to read Every card and diagram, and Quiz me
2
Free account Star cards. Your Quiz me marks are kept, so next time you drill just what you missed
3
Pro All 51 answers on this sheet, My sheet across every topic, and PDFs
A free account keeps your stars and Quiz me marks. Pro adds all 51 answers on this sheet, My sheet across every topic, and PDFs.
/
Read
Quiz me
Risky only
Comfortable
Compact
My misses 0
Click a command to copy it
Done 0 /0
To review 0
Safe
Changes files, git can undo
Can lose work, no easy undo
On this sheet
The model
01 What an agent is02 Spec & size the task03 Plan & supervise a run04 Permissions & sandboxes05 Worktrees, branches & merges06 Cloud & CI agents07 Review & verify08 Fix a run gone wrong09 Cost & team policy
The model An agent takes a goal and works in a loop. It reads the repo, edits files, runs commands, checks the output and tries again. Autocomplete only suggests text at your cursor. An agent stops when its checks pass , not when the goal is met. Its summary is a claim. The diff and the test output are the evidence. You write the spec and do the review . The person who submits a change owns every line of it, even the lines an agent wrote. Permissions and a sandbox limit what a bad run can do. Prompt rules don't, because a model can misread them or obey hostile text in the repo.Give an agent more autonomy only where a failure is small, easy to spot and easy to undo. The agent repeats the ACT steps until its checks pass. You approve the plan, read the evidence and merge. The agent never merges its own work.
What an agent is the loop, the kinds of agent, and your new job Agent or autocomplete Say what makes a coding tool an agent It takes a goal and loops. It edits files, runs commands and retries on failure.
Say what autocomplete does It predicts text near your cursor. Nothing changes until you accept it.
Say what vibe coding is Accepting AI code without reading it. Andrej Karpathy coined the term in 2025.
Tell vibe coding and agentic coding apart Vibe coding is about skipping review. Agentic coding is about autonomy.
Tip Vibe coding suits a throwaway prototype. Keep it away from production code, private data and money.
Trap An agent run whose diff nobody reads is still vibe coding.
Five kinds of coding agent Name the agent that works in your editor An IDE agent, like the one in Cursor or GitHub Copilot.
Name the agent that works in your shell A terminal agent, like Claude Code or Aider.
Name the agent you hand a task to and check on later A cloud agent, like OpenAI Codex cloud or Google Jules.
Name the agent that turns an issue into a PR An issue-to-PR agent, like GitHub Copilot cloud agent.
Name the agent that runs on an event or a timer A CI or scheduled agent, like the Claude Code GitHub Action.
Tip One product often covers several kinds. Compare where it runs, what it may touch and how much supervision it needs.
How your job changes Say where a developer's time goes now Less typing. More writing specs, reviewing plans and diffs, and designing checks.
Keep your skills sharp Code and debug by hand now and then. Explain agent code without the agent's help.
Tip Keep tasks that teach juniors the basics. Don't hand every small task to a model.
Trap You still need to read code well. You can't catch a wrong API or a weak test you don't understand.
Spec & size the task tell the agent what done means Write a task spec GOAL Rate-limit POST /login ACCEPT 11th try in 60s gets a 429 VERIFY npm test test/login.test.js FILES src/routes/login.js only FOLLOW the pattern in signup.js NON-GOALS new dependencies, other routes IF UNSURE stop and ask
List what a spec holds The outcome, key files, edge cases, limits, non-goals and the checks to pass.
Show the code style you want Point to a current example in the repo instead of listing rules.
Trap Leave out non-goals and the agent may refactor code you never asked it to touch.
Acceptance criteria Say what acceptance criteria are Observable conditions that must hold at the end. They tell the agent when to stop.
Make a criterion the agent can check Tie it to a command, a test or an output it can inspect.
Rewrite "improve the parser" "Reject an unterminated quote and keep quoted commas."
Add negative criteria No new dependency, no schema change, no change to the public API.
Tip The agent gathers the evidence. A person still judges whether the work is complete and safe.
Trap "Clean" and "fast" can't be checked. Give a threshold the agent can measure.
Size the task Size a task for one agent run One outcome, a few files, and a check that runs in one session.
Split a multi-day project Settle the design with people, then split along stable interfaces.
Keep a task for yourself When requirements are open, you can't check success, or it needs human judgment.
Trap "Modernize the platform" is too big. Run a discovery task first, then delegate the pieces.
Plan & supervise a run approve the plan, then watch and steer Plan, act, review Name the three steps of the loop Plan the work, act on one bounded step, review the result against the criteria.
Start Claude Code in plan mode claude --permission-mode plan It reads and proposes, but edits nothing.
Say what a good plan covers Assumptions, interfaces, risks, files to change, checks and rollback.
Fix a plan before you approve it Make the product calls yourself. Correct the scope and cut unsafe steps.
Tip Keep plans light for small tasks. Add detail as the impact and the risk grow.
Trap An approved plan can still be wrong. Check each result against it as the run goes.
Supervise and steer Say what supervising an agent means Watching its direction and evidence, not only its last message.
Say what needs your attention Writes, network calls, new dependencies, destructive commands and design calls.
Know when to stop a run When it repeats a failure or leaves its scope. Press Esc in Claude Code.
Correct it mid-task without losing progress Pause at a stable point. Say what's wrong, and have it restate the plan.
Tip Progress is the verified state of the repo, not the length of the chat.
Trap "Try again" changes nothing. Give it concrete evidence or a corrected constraint.
Permissions & sandboxes limit what an agent can touch Approval gates and permission modes Say what an approval gate does It pauses the agent and shows the exact action and what it can affect.
Name actions that always need a gate Out-of-scope writes, installs, network, secrets, prod and destructive commands.
Accept file edits without asking claude --permission-mode acceptEdits
Run Claude Code in YOLO mode claude --dangerously-skip-permissions No approval prompts at all.
Let Codex edit files, ask before leaving the sandbox codex --sandbox workspace-write --ask-for-approval on-request
Turn off Codex's sandbox and prompts codex --yolo
Tip Too many prompts train people to click yes. Let low-risk actions run without asking.
Trap Use YOLO mode only in a throwaway container with no real credentials and little network access.
Allowlist in .claude/settings.json {"permissions": { "allow": ["Bash(npm run test *)"], "ask": ["Bash(npm install *)"], "deny": ["Bash(git push *)", "Read(./.env)"] }}
Say which rule Claude Code checks first deny, then ask, then allow. Anything unmatched asks you, except reads and searches.
Allow tools for one headless run claude -p "fix the test" --allowedTools "Bash(npm run test *)" "Edit"
Keep out of every allowlist Shells, interpreters, network tools, installers, secrets and prod commands.
Trap A rule that looks narrow can leak. Allow bash or python and the agent can run anything.
Sandbox the agent Name the ways to sandbox an agent A container, a VM, or an OS sandbox like Seatbelt on macOS or bubblewrap on Linux.
List what a sandbox should limit Files, processes, network, environment variables, CPU, memory and run time.
Say what prompt injection is Hostile text in code, issues, docs or tool output that tries to steer the agent.
Contain a prompt injection Treat what the agent reads as data. Enforce permissions outside the model.
Tip Limit the network too. Without that, a hijacked agent can send out files like your SSH keys.
Trap A sandbox limits the damage. It doesn't make the code correct, so the diff still needs review.
Worktrees, branches & merges run agents side by side and merge their work One worktree per agent .git ../auth ../cart ../docs agent/auth agent/cart agent/docs worktrees One .git holds every commit. Each agent gets its own folder, on its own branch.Give an agent its own folder and branch git worktree add ../auth -b agent/auth
Remove a worktree after the merge git worktree remove ../auth
Remove one that has uncommitted edits git worktree remove --force ../auth
Tip Git won't check out a branch that another worktree already has, so two agents can't share one.
Trap Agents in separate worktrees still share ports, databases, caches and credentials. Give each its own.
Branches and commits Start a task branch from a known base git switch -c agent/issue-42 origin/main
Save a checkpoint before a risky step git add -A git commit -m "checkpoint: tests pass"
Squash checkpoints before review git rebase -i origin/main
Write the commit message Explain what the change is for, as in any other commit.
Trap Look for unrelated cleanup, generated files or dependency bumps hidden in one big commit.
Merge parallel work Split work so agents don't collide One module per agent, a shared base commit and agreed interfaces.
Pick the merge order Foundation first. Then rebase the others and rerun their checks.
Resolve a semantic conflict Go back to the spec. Don't just keep both versions.
Run several agents on one problem Only for independent tasks with clear outputs. One coordinator merges the results.
Tip Tightly coupled work is often faster done in sequence than by parallel agents and a hard merge.
Trap Separately correct branches can break each other. Run integration tests after each merge.
Cloud & CI agents hand off a task and review what comes back Issue to pull request Say what a background agent is It runs in an isolated environment and returns a branch or PR.
Hand an issue to Copilot cloud agent Assign it to Copilot. It pushes to a copilot/ branch and opens a draft PR.
Ask Copilot for changes Mention @copilot in a PR comment.
Run CI on Copilot's PR By default, someone with write access must approve the workflow runs.
Tip The issue is the spec. Give it a clear description and acceptance criteria.
Trap The agent never merges its own PR. Branch protection and code owners still apply.
Cloud agents Use a cloud agent day to day Hand off a bounded task and review it later.
Say what Codex cloud and Devin hand back Codex cloud returns a diff to open as a PR. Devin leaves a draft PR.
Say how Google Jules starts a task It shows a plan to approve before it changes code.
Trap Treat its PR like one from an outside contributor. Read every change and rerun trusted checks.
Agents in CI and on a schedule Cap the spend of a headless run claude -p "<task>" --max-budget-usd 5
Run Codex without its interactive UI codex exec "<task>"
Pick jobs for a scheduled agent Dependency bumps, flaky tests and doc checks.
Lock down each run Short-lived tokens, limited network, cost caps.
Trap Keep scheduled agents off production fixes and vague features. A human reviews before any merge.
Review & verify check the work, not the agent's summary Review an agent's PR Say what green CI proves Only that the configured checks passed. They may miss what you asked for.
List the files the agent changed git diff --stat main...HEAD
Check an API you don't recognize Look it up in the official docs. Invented names look plausible.
Know who answers for the code The person who submits it. You can't question the agent like a colleague.
Trap An agent can weaken a test or update a snapshot to turn CI green. Review test changes with extra care.
Catch fake success Say what reward hacking is Passing the check without reaching the goal.
Spot the usual tricks Deleted tests, weaker assertions, hard-coded outputs, edited CI config.
Diff only the test files git diff main...HEAD -- '*test*'
Search the code for skipped tests and TODOs git grep -nF -e '.skip(' -e '.only(' -e TODO
Decide if the work is really done Check it against your own list of files, tests and behavior, not its summary.
Trap Telling the model not to cheat barely works. In METR's tests it hardly changed how often models did it.
Tests as guardrails Start from tests a human reviewed Cover the expected behavior, the boundaries and the failures.
Stop the agent editing the tests Make test files read-only for the task. Gate snapshot and CI changes.
Check the tests catch real bugs npx stryker run Mutation testing breaks the code on purpose. Good tests fail.
Trap A test guards nothing if the agent can edit, skip or delete it without approval.
Verify beyond the tests Run the real path Use it as a user would. Check the logs, the data and the API responses.
Add checks for a risky change Static analysis, dependency review, security tests and a preview environment.
Spot a plausible-but-wrong fix It checks identity but not permission, or treats a timeout as an empty result.
Catch one before it merges Reproduce the bug and write a failing test before the fix.
Trap Plausible-but-wrong fixes compile and pass tests but solve a different problem. Polish lowers your guard.
Fix a run gone wrong loops, scope creep and long tasks Stuck repeating a fix Say why an agent loops A wrong hypothesis it won't drop, an error lost in a long context, or missing facts.
Break the loop Stop it. Say what failed and why, then ask for hypotheses and a test to pick one.
Drop its edits since the checkpoint git reset --hard <checkpoint>
Stop the next loop sooner Set retry and cost limits, so a loop ends on its own.
Trap More retries add cost and confusion, not progress. A polluted session needs a fresh start.
Scope creep Say what scope creep is The agent changes more than the task needs, like refactors or dependency bumps.
Prevent scope creep Allowed files, explicit non-goals, a small diff budget and a reviewed plan.
Undo its edits to one file git restore --source=main -- <file>
Trap Useful extras still make the change harder to review. Have it list side issues, not fix them.
Long tasks and handoffs GOAL rate-limit POST /login DONE middleware and tests, a1b2c3d DECIDED in-memory store, no Redis REJECTED per-IP limit, breaks on proxy VERIFY npm test test/login.test.js NEXT add the Retry-After header
Say why agents degrade on long tasks The context fills with logs and failed attempts, so it forgets constraints.
Say what context compaction does It swaps the history for a short summary. Exact errors and reasons can get lost.
Say where the handoff goes In a file outside the chat, with the work committed.
Start the next session Have it read the note, check the repo and restate the constraints.
Tip The repo and its tests are the source of truth. A summary only points to them.
Trap Write down the approaches that failed, or the next session will try them again.
Cost & team policy budgets, autonomy, review load and incidents Cost and payoff Pick the model for a task Fast and cheap for routine edits. Strong for hard planning and debugging.
Cut the cost of each run Narrow tasks, lean rules files, filtered tool output and capped retries.
Say when delegation pays off When the task is costly by hand, easy to specify and cheap to verify.
Measure the payoff Pilot on comparable work. Count spec, review and rework time, not lines generated.
Trap A cheap model that fails again and again can cost more than one careful run on a strong one.
Match autonomy to risk Score a task's risk Impact, reversibility, visibility, data sensitivity, novelty and test strength.
Run a low-risk task The agent edits and runs checks on its own, in a sandbox.
Run a medium-risk task You approve its plan, it writes only in scope, and you review the PR.
Run a high-risk task The agent only researches or drafts. People build and release it.
Set a team's default permissions Read-only, then scoped writes in a sandbox. Named people approve risky actions.
Trap Raise autonomy only after repeated success on similar tasks. No model earns trust everywhere.
Review at team scale Label agent-written PRs Where policy asks or it helps reviewers. The label never lowers the bar.
Prove more by machine Strong types, focused tests, static analysis and codemods for repeated edits.
Use a review bot An independent check for risky code and missing tests. People still approve.
Measure agent quality across a team Rerun a versioned set of real tasks. Track defects, retries, cost and review time.
Trap Scaling review doesn't mean skimming faster. Let agents produce only what reviewers can clear.
Repo, pipeline and incidents Give agents the house rules Put build, test and lint commands in AGENTS.md or CLAUDE.md.
Make a repo agent-ready Clear module names, typed interfaces, fast tests and no dead examples to copy.
Name the stages of a delegation pipeline Intake, execution, review and release, tuned from rework and incident data.
Run a post-mortem on an agent's change Blameless, like any incident. Ask why each control let it through.
Trap The model is never the root cause. Fix the spec, permissions, tests or review that missed it.
Nothing matches. Try a shorter word, or clear the search.
Practice Guided practice One question at a time, with the ones you miss coming back.
Practice 51 interview questions Full answers, from beginner to expert.
Found this useful? Pass it on.
Share on LinkedIn
Share on X
Copy link
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.