Part VI: AI Agents, Skills, and Configuration
The Technical Heart of Spec-Driven Development
In Spec-Driven Development, specifications define what to build. Constraints define what must never happen. But who transforms specifications into code? AI agents are the engines that execute this transformation. They read specifications, apply constraints, and produce implementations. Without well-configured agents, even perfect specifications produce mediocre results.
This part is the technical heart of SDD. It teaches you to build, configure, and orchestrate the AI toolchain that makes spec-driven development possible.
Why Agent Configuration Matters
An AI coding agent without configuration is like a brilliant engineer without project context. It can write code—often excellent code—but it doesn't know your architecture, your conventions, your testing philosophy, or your team's preferences. It will make plausible but wrong choices: the wrong abstraction layer, the wrong error handling pattern, the wrong naming convention.
Configuration bridges this gap. It teaches agents:
- What your project expects (conventions, patterns, standards)
- When to apply specific knowledge (file types, task types)
- How to perform specialized tasks (skills for spec-writing, code review, test generation)
Three configuration mechanisms work together:
| Mechanism | Purpose | Loading |
|---|---|---|
| AGENTS.md | Project-level instruction manual | Always loaded with every prompt |
| Cursor Rules | Granular, file-scoped conventions | Conditional (always, intelligent, file-specific, manual) |
| SKILL.md | Task-specific, reusable capabilities | On-demand when agent deems relevant |
What You Will Learn
Chapter 15: AI Agent Architecture
You will understand what an AI coding agent is—not autocomplete, but autonomous implementers that read context, plan, execute, and validate. You will learn the five agent types in SDD: Specification Agent, Architecture Agent, Coding Agent, Testing Agent, and Review Agent. You will trace the agent loop (Read → Plan → Execute → Validate → Iterate), understand single-agent vs. multi-agent workflows, and see how Cursor, Claude Code, Gemini CLI, and Codex operate as agents. A hands-on tutorial guides you through setting up a multi-step agent workflow that takes a spec from planning to implementation. You will also learn agent limitations—context window, hallucination, implicit assumptions—and when to use which agent for which task.
Chapter 16: SKILL.md — Building Reusable AI Skills
Skills are packaged, reusable capabilities that extend what AI agents can do. You will learn the Agent Skills Standard—an open standard supported by Cursor, Claude Code, Codex, Gemini CLI, and VS Code. You will master SKILL.md anatomy: YAML frontmatter (name, description, version, compatibility, allowed-tools), markdown body (instructions, when-to-use, process steps, examples), and skill directory structure. You will understand skill discovery directories and progressive loading (Discovery → Activation → Execution). Two complete tutorials: create a "spec-writer" skill that produces SDD-compliant specifications, and a "code-reviewer" skill that reviews code against specifications. You will learn the Skill vs Rule decision framework, how to install community skills, and best practices for keeping skills under 5000 tokens and referencing files instead of inlining.
Chapter 17: AGENTS.md and Cursor Rules
AGENTS.md is the project-level instruction manual—always loaded, simple, and comprehensive. Cursor Rules provide granular, file-scoped, conditional guidance. You will learn AGENTS.md structure (dos/don'ts, conventions, file patterns), hierarchy in monorepos, and how it differs from rules and skills. You will master the four Cursor Rules activation modes: Always Apply, Apply Intelligently, Apply to Specific Files, and Apply Manually. You will create .mdc rules with YAML frontmatter (description, globs, alwaysApply) and organize rules for TypeScript, testing, and API patterns. A complete tutorial walks you through creating an AI configuration: AGENTS.md plus .cursor/rules/ for a real project. You will learn when to use AGENTS.md vs rules vs skills, and best practices for keeping rules under 500 lines.
Chapter 18: Building Custom Agents and Subagents
Skills handle 2–4 decisions with human guidance. Subagents handle 5+ decisions autonomously. You will learn the P+Q+P pattern: Persona (who the agent is), Questions (what it asks before acting), and Principles (rules it follows). You will design subagents for specification writing, code review, and test generation. You will understand multi-agent coordination—how agents pass context to each other—and slash commands. A complete tutorial guides you through building an SDD subagent that reads a feature description, asks clarifying questions, generates a specification, creates an implementation plan, and produces a task list. You will learn when to promote a skill to a subagent and the intelligence acceleration effect: each skill and subagent compounds future productivity.
The Connection
The four chapters form a progression:
- Chapter 15 establishes the foundation—what agents are, how they work, and their capabilities and limitations.
- Chapter 16 teaches you to extend agents with reusable skills—packaged capabilities that agents invoke on demand.
- Chapter 17 teaches you to configure agents at the project level—AGENTS.md and Cursor Rules that shape every interaction.
- Chapter 18 teaches you to design custom agents and subagents—autonomous workflows that orchestrate multiple steps.
Together, they give you the complete AI configuration toolkit. By the end of Part VI, you will be able to configure agents for your project, build reusable skills, set up rules and AGENTS.md, and design subagents that transform specifications into production-ready implementations.