Chapters
Every chapter, grouped by Part. Use the card metadata to calibrate how much trust to place in a chapter's specific claims.
Part 0
Part 1
-
The agent mental model
What every CLI-agent actually is — an agent loop with three durable properties and four engineering principles that apply regardless of which tool you use. The foundation the rest of the book builds on.
claude-codegemini-clicodex-cli -
Context as Currency
Context is a finite, decaying resource. This chapter explains why context degrades non-linearly, gives you a vocabulary for managing it across three CLI agents, and tracks where practices have converged and where they diverge.
claude-codegemini-clicodex-cli -
Prompting as specification
Prompts are specifications — the input side of a stateful loop. Five levers shape how the agent interprets a prompt — precision, scope, structure, depth, and cost. This chapter treats prompting as an engineering activity, not a conversational art.
claude-codegemini-clicodex-cli
Part 2
-
The session loop
The atomic unit of agentic work is the session loop — prompt, observe, refine, commit. Each phase has a purpose; skipping any produces a specific failure mode. This chapter makes the rhythm explicit.
claude-codegemini-clicodex-cli -
The edit-test-commit loop
AI-generated code's defining failure mode — it *looks* correct. The edit-test-commit loop exists to catch the subtle bugs the agent cannot catch on its own. Verification is not a quality gate; it is the single highest-leverage practice in agentic coding.
claude-codegemini-clicodex-cli -
Thinking together
The shift from configure-delegate-verify to think-together-discover-build-better. How to use an agent as a thinking partner rather than a configurable tool — structuring collaboration to counteract sycophancy, surface hidden assumptions, and produce better decisions than either party alone.
claude-codegemini-clicodex-cli
Part 3
-
Briefing documents
CLAUDE.md / GEMINI.md / AGENTS.md — the industry has converged on a project-root briefing doc the agent re-reads on every turn. This chapter is about what goes in it, what doesn't, and how to structure it so every token has leverage.
claude-codegemini-clicodex-cli -
Extending agents
Commands, skills, hooks, MCP — the four axes by which an agent becomes more than the defaults it ships with. This is the most divergent surface in the category; get the mental model right and the command names become secondary.
claude-codegemini-clicodex-cli -
Delegation and parallelism
The fix for context rot is not a bigger window — it is more, shorter conversations. This chapter is about the two mechanics that make horizontal scaling practical: subagent delegation within a session, and parallel sessions across worktrees. Go wide, not deep.
claude-codegemini-clicodex-cli
Part 4
-
Starting and refactoring projects
Projects have lifecycles. Agent collaboration works differently on a week-old greenfield repo than on a five-year-old brownfield codebase. This chapter is the protocols — day-one bootstrap for new projects, characterization-first onboarding for existing ones, incremental refactoring for anything mid-life.
claude-codegemini-clicodex-cli -
Anti-patterns and recovery
Every tool has characteristic misuse patterns. This chapter catalogs eight of them with concrete recovery procedures, and introduces a four-layer diagnostic framework for when the agent keeps failing — so you fix the right layer instead of the wrong one.
claude-codegemini-clicodex-cli -
Automation and pipelines
Headless agent runs, CI integration, and scheduled pipelines take the interactive session loop and remove the human from it. That removal changes everything — permissions, observability, failure modes, cost. This chapter covers the design patterns that make unattended agents safe and the failure modes that make them dangerous.
claude-codegemini-clicodex-cli -
Team patterns and governance
An agent used by one person is a productivity tool. An agent used by a team is shared infrastructure — which means shared context, shared norms, shared failure modes. This chapter covers the team patterns that survive scale: shared briefing docs, skill registries, agent-assisted review, and the governance that keeps shared agents from becoming shared liabilities.
claude-codegemini-clicodex-cli -
Enterprise deployment
Enterprise deployment of agentic tools adds constraints that personal and team use never surface: regulatory compliance, data residency, audit logging, air-gapped networks, procurement risk. This chapter covers the architectural patterns that make CLI agents acceptable to enterprise constraints — and the design choices that become load-bearing when they do.
claude-codegemini-clicodex-cli
Part 5
-
How agentic practices evolve
Agentic-coding practice is a moving target — tools ship quarterly, conventions shift, claims that were true six months ago are now wrong. This chapter is the meta-discipline that keeps your practice current: source tiering, volatility classification, convergence tracking.
claude-codegemini-clicodex-cli -
Auditing your own practice
Ch 15 covered how to keep a book or a team's playbook current. This chapter is the same discipline applied to the single highest-leverage artifact most practitioners own: their own daily practice. Your workflows quietly rot. Commands you rely on get renamed. Habits ossify into superstitions. The audit discipline that catches field drift applies, scaled down, to the practitioner's own routine.
claude-codegemini-clicodex-cli
Appendices
-
Appendix A — Claude Code companion
A deep reference for Claude Code specifically. Organized around the book's concepts rather than as a feature catalogue: how the primitives the book discusses (briefing docs, plan mode, skills, hooks, subagents, MCP) actually map to Claude Code's surfaces, with their current flags and file paths. Where the main chapters kept Claude-specific detail bounded for comparative fairness, this appendix lets it flow.
claude-code -
Appendix B — Gemini CLI companion
What's different about Gemini CLI: the parts of its surface that diverge from the Claude-centric defaults in the body chapters. Kept brief on purpose — comparative pedagogy, not exhaustive documentation. Where Gemini is genuinely the better fit, that is named.
gemini-cli -
Appendix C — Codex CLI companion
What's different about Codex CLI: the parts of its surface that diverge from the Claude-centric defaults in the body chapters. Focus on its distinctive approval-mode permission model, sandbox defaults, and the OpenAI/Azure deployment path. Where Codex is genuinely the better fit, that is named.
codex-cli -
Appendix D — Source archive index
The canonical index of every external source cited in the book. Each entry renders with title, author, publish date, capture date, trust tier, and (when available) a Perma.cc archival link. The full Playwright capture of each source lives in the repo's gitignored local cache for drift detection; only the metadata below is public.
cross-tool -
Appendix E — Glossary
A cross-tool vocabulary. Each entry names a concept the book uses, gives a tool-agnostic definition, then maps the concept to the specific surface each of the three tools exposes it as. The glossary is the translation layer: if a body chapter talks about briefing docs and you only know GEMINI.md, the entry tells you they are the same thing.
claude-codegemini-clicodex-cli -
Appendix F — Maturity model
A five-level maturity model for agentic coding practice, across six dimensions. The model is diagnostic rather than prescriptive — most teams do not and should not aim for the highest level on every dimension. The right level depends on your team's risk surface, team size, and regulatory context. The value of the model is in self-locating (*where are we?*) and in roadmap sequencing (*what's the next natural move?*).
cross-tool