The Problem:
While generative AI coding assistants accelerate code generation, unstructured “vibe coding” causes severe engineering failures. Ad-hoc prompts produce non-deterministic, disposable code, architectural drift, and compounding technical debt. As agent working memory fills with conversational dialogue, models suffer context decay, leading to hallucinated APIs, broken logic, and heavy cognitive review debt for developers tracking unmanaged AI outputs.
The Approach:
The course implements Spec-Driven Development (SDD) to build “AgentClinic,” a full-stack Next.js and TypeScript application, using WebStorm and Claude Code CLI via the Agent Client Protocol (ACP). SDD decouples architectural intent from code generation through a two-tiered specification hierarchy: a global Project Constitution (mission.md, tech-stack.md, roadmap.md) and branch-isolated feature cycles (plan.md, requirements.md, validation.md). Development enforces context flushing via /clear, micro-task grouping with atomic Git commits, adversarial sub-agent audits, and custom Agent Skills paired with CLI utilities (Context7) to optimize token budgets.
The Results:
The project achieved deterministic delivery of the functional AgentClinic MVP, managing agent appointments, ailments, and treatments. SDD established downstream amplification, where concise spec modifications governed hundreds of lines of code and database migrations. The workflow proved resilient across greenfield builds and brownfield legacy modernizations, preventing architectural drift while ensuring vendor-agnostic portability across Claude Code, OpenAI Codex, and OpenCode without workflow refactoring.