# Revision: Cheat Sheet and Self-Check — Coding Agents & AI-Assisted Development

Source: https://www.geekswithgeeks.com/en/coding-agents/z-revision

> Review the key ideas of the whole course.

## Cheat sheet

**What**: a coding agent = model + harness + tools + context + permissions, running a loop (observe, decide, act, check) until checks pass or a limit hits. Environments: editor, terminal, cloud sandbox, CI; more autonomy needs more isolation. **Tools**: search/read (repo map, line ranges), edit (exact-match search/replace, unified diff; verify applied), run (timeouts, concise test observations), git (clean tree, dedicated branch, small commits, PR hand-off). **Context**: a budget; pack the relevant files; instruction file with exact commands, conventions, don'ts, definition of done; plan files, compaction, fresh starts; sub-agents for noisy research. **Workflow**: precise task (goal, where to look, constraints, how to verify, scope); plan first; tests as the target (review test changes strictly); small reviewable steps with human checkpoints; parallel agents in separate worktrees, limited by review capacity. **Reliability**: failure modes (wrong understanding, hallucinated APIs/packages, overreach, faking success, loops, stale context, unsafe actions); step/cost caps and repetition detection; patch gates and secret scans; same checks in CI; least privilege and approval for risky actions. **Measure**: public benchmarks have limits, build an internal one; runs vary so use success rate and pass@k with a verifier; cost grows faster than steps (caching, concise outputs); judge value by lead time, rework and defects. **People**: stage the rollout, server-side controls, human accountability, licensing and confidentiality awareness, keep learning fundamentals.

**Quiz:** An agent reports "all tests pass" but you did not see the output. What should you do?

- [ ] Merge immediately
- [x] Run the tests yourself or check CI; the claim is not evidence
- [ ] Ask the agent to say it again
- [ ] Delete the tests

*Answer:* Run the tests yourself or check CI; the claim is not evidence. Verification must be independent of the agent's self-report.

**Quiz:** You want to run three agents at once on different bug fixes. What is the right setup?

- [ ] One shared uncommitted working tree
- [ ] All three editing the same folder
- [ ] All three pushing directly to main
- [x] A separate branch and working directory (for example a git worktree) for each, reviewed one by one

*Answer:* A separate branch and working directory (for example a git worktree) for each, reviewed one by one. Isolation prevents agents overwriting each other, and review is the real limit.

**Quiz:** A task run costs far more than expected. Which two causes are most likely?

- [x] A long run where context grows each step, and a stuck loop without caps
- [ ] Tokens became free
- [ ] The branch name was too short
- [ ] Tests were too fast

*Answer:* A long run where context grows each step, and a stuck loop without caps. Cap steps and cost, detect repetition, keep outputs concise and use caching.
