Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Agentic Software Construction

This section lives at the agentic level, the newest layer of software practice, where AI models aren’t just tools you use but collaborators you direct. Agentic software construction is the discipline of building software with and through AI agents: systems that can read code, propose changes, run commands, and iterate toward an outcome under human guidance.

The patterns here range from foundational concepts (what is a model, a prompt, a context window) to workflow patterns (plan mode, verification loops, thread-per-task) to execution patterns (compaction, progress logs, parallelization). Together they describe a way of working that’s already changing how software gets built, not by replacing human judgment, but by shifting where human judgment is most needed.

For patterns about controlling, evaluating, and steering agents, see Agent Governance and Feedback.

If the earlier sections of this book describe what to build and how to structure it, this section describes how to direct an AI agent to do that building effectively. The principles from every prior section still apply: agents need clear requirements, good separation of concerns, and honest testing. What changes is the workflow: you spend less time typing code and more time thinking, reviewing, and steering.

This section contains the following patterns:

  • Model — The underlying inference engine that generates language, code, plans, or tool calls.
  • Prompt — The instruction set given to a model to steer its behavior.
  • Context Window — The bounded working memory available to the model.
  • Context Engineering — Deliberate management of what the model sees, in what order.
  • Agent — A model in a loop that can inspect state, use tools, and iterate toward an outcome.
  • Harness (Agentic) — The software layer around a model that makes it practically usable.
  • Tool — A callable capability exposed to an agent.
  • MCP (Model Context Protocol) — A protocol for connecting agents to external tools and data sources.
  • Plan Mode — A read-first workflow: explore, gather context, propose a plan before changing.
  • Verification Loop — The cycle of change, test, inspect, iterate.
  • Subagent — A specialized agent delegated a narrower role.
  • Skill — A reusable packaged workflow or expertise unit.
  • Hook — Automation that fires at a lifecycle point.
  • Instruction File — Durable, project-scoped guidance for an agent.
  • Memory — Persisted information for cross-session consistency.
  • Thread-per-Task — Each coherent unit of work in its own conversation thread.
  • Worktree Isolation — Separate agents get separate checkouts.
  • Compaction — Summarization of prior context to continue without exhausting the context window.
  • Progress Log — A durable record of what has been attempted, succeeded, and failed.
  • Checkpoint — A gate in a workflow where the agent pauses, verifies conditions, and proceeds only if they pass.
  • Externalized State — Storing an agent’s plan, progress, and intermediate results in inspectable files.
  • Parallelization — Running multiple agents at the same time on bounded work.
  • Ralph Wiggum Loop — A shell loop that restarts an agent with fresh context after each unit of work, using a plan file as the coordination mechanism.
  • Agent Teams — Multiple agents that coordinate with each other through shared task lists and peer messaging.