====== Agentic Coding ====== Agentic coding is the emerging software development paradigm where AI agents autonomously write, edit, test, and refactor code while developers shift into supervisory and architectural roles. Rather than using AI as an autocomplete tool, agentic coding treats AI as an autonomous collaborator that executes multi-step engineering tasks — from implementing features to resolving GitHub issues — with human oversight at key decision points. ===== The Paradigm Shift ===== | **Aspect** | **Traditional Coding** | **Agentic Coding** | | Task handling | Synchronous, human-led | Asynchronous, agent-led with parallel execution | | Supervision | Full manual control | Human-in-the-loop gates, specs, and reviews | | Environment | Local IDE | Sandboxed, reproducible containers | | Iteration speed | Limited by typing speed | Limited by review speed | | Parallelism | One task at a time | Multiple agents working simultaneously | ===== How Developers Work with Agents ===== The agentic workflow follows a delegation and review cycle: - **Specify** — Developer writes a task description, spec file, or points to a GitHub issue - **Delegate** — Agent analyzes the codebase, plans implementation, and begins coding in a sandboxed environment - **Monitor** — Developer observes progress through dashboards or terminal output - **Review** — Agent presents changes for approval; developer reviews diffs and provides feedback - **Iterate** — Agent incorporates feedback and continues until the task passes tests and review ===== Spec-Driven Development ===== Agents perform best with clear behavioral contracts. Teams use spec files to define agent behavior: # Example: requirements.md that guides an agent REQUIREMENTS = """ ## Task: Add user authentication ### Constraints - Use existing database models, do not create new tables - Follow the repository's existing patterns for middleware - All endpoints must require authentication except /health and /login - Write tests for each new endpoint ### Acceptance Criteria - [ ] POST /login returns JWT token - [ ] Protected routes return 401 without valid token - [ ] Tests cover happy path and error cases - [ ] No existing tests are broken ### Anti-patterns to avoid - Do not hardcode secrets - Do not use deprecated auth libraries - Do not modify unrelated files """ # Agent reads this spec and implements accordingly # Developer reviews the resulting PR Files like ''AGENTS.md'', ''requirements.md'', or ''tasks.md'' serve as durable contracts that prevent agent drift and ensure consistent behavior across sessions. ===== Pair Programming with AI ===== Agentic coding evolves pair programming from real-time collaboration to a supervisory model: * **Developer provides** — High-level intent, architectural decisions, edge case awareness, domain knowledge * **Agent provides** — Implementation speed, codebase exploration, test writing, boilerplate handling * **Shared responsibility** — Code quality, correctness, and maintainability The developer's role shifts from writing every line to reviewing, guiding, and making judgment calls that agents cannot reliably make — architecture decisions, trade-off analysis, and user experience design. ===== Autonomous Coding Workflows ===== Advanced workflows run agents asynchronously, often overnight: * **Issue-to-PR pipelines** — Agent picks up a GitHub issue, implements the fix, runs tests, and opens a pull request * **Multi-agent orchestration** — Specialized agents handle different subtasks (frontend, backend, tests) with a coordinator managing conflicts * **Background agents** — Cursor and GitHub Copilot support agents that work in the background while developers focus on other tasks * **Overnight runs** — Developers assign tasks at end-of-day and review agent output the next morning ===== Vibe Coding ===== Vibe coding describes informal, intuition-driven sessions where developers rapidly build features through natural language conversation with an agent, without rigid specifications. Useful for prototyping and simple features, but professional workflows favor spec-driven approaches for production code to avoid regressions and maintain quality in large codebases. ===== Tools and Infrastructure ===== | **Tool** | **Approach** | **Key Feature** | | [[https://www.anthropic.com/claude-code|Claude Code]] | Terminal-based agent | Multi-agent spawning, 200k context, git integration | | [[https://cursor.com|Cursor]] | AI-native IDE | Background agents, inline edits, fast iteration | | [[https://github.com/features/copilot|GitHub Copilot Agent Mode]] | IDE extension | Issue-to-PR automation, broad IDE support | | [[https://github.com/openai/codex|OpenAI Codex]] | Cloud sandboxes | Parallel async agents, auto-deployment | | [[https://aider.chat|Aider]] | CLI tool | Git-integrated, local-first, open-source | ===== Model Context Protocol (MCP) ===== The [[https://modelcontextprotocol.io|Model Context Protocol]], donated to the Linux Foundation, standardizes how agents connect to tools and data sources. MCP enables agents to integrate with GitHub, databases, APIs, and other services through a universal protocol, allowing seamless swaps between providers without custom integration code. ===== Safety and Review ===== * **Sandboxed execution** — Agents run in devcontainers or Docker to prevent unintended system changes * **Approval gates** — Destructive actions (file deletion, deployment, database changes) require human confirmation * **Audit trails** — Complete logs of agent reasoning and actions for post-hoc review * **Prompt injection defense** — Agents operating on untrusted input must be isolated from sensitive operations ===== References ===== * [[https://redmonk.com/kholterhoff/2025/12/22/10-things-developers-want-from-their-agentic-ides-in-2025/|RedMonk - What Developers Want from Agentic IDEs]] * [[https://lucumr.pocoo.org/2025/6/12/agentic-coding/|Armin Ronacher - Agentic Coding]] * [[https://resources.anthropic.com/hubfs/2026%20Agentic%20Coding%20Trends%20Report.pdf|Anthropic - 2026 Agentic Coding Trends Report]] ===== See Also ===== * [[code_generation_agents]] — Specific code agent tools and benchmarks * [[agent_safety]] — Safety practices for code-executing agents * [[agent_debugging]] — Debugging agent-generated code * [[prompt_engineering]] — Writing effective prompts for coding agents