Study Notes v3.0 — Professional Agentic Architect (PAA) Sec 2 (17%)

Vibe Coding &
Swarm Prototyping

The definitive engineering guide to AI-assisted development — from conversational code generation (Vibe Coding) and parallel multi-agent exploration (Swarm Prototyping) to enterprise Secure Coding Sandboxes (Antigravity, Cloud Workstations, Agent Sandbox on GKE) and autonomous PoC-verified vulnerability remediation (CodeMender & Google AI Threat Defense).

Updated: 2026 (v3.0)
Category: Foundation
Reading Time: ~22 min
Author: Michaël Bettan
Test Yourself: Vibe Coding Practice Quiz (32 Questions) →
01

What is Vibe Coding?

Vibe Coding is an AI-assisted development approach where the developer describes what they want in natural language, and an AI coding assistant generates the implementation. Coined by Andrej Karpathy (co-founder of OpenAI) in early 2025, the term captures a paradigm shift: instead of writing code character by character, you converse with an AI to produce working software.

The developer's role shifts from typing code to describing intent, reviewing output, and iterating through dialogue. You "vibe" with the AI — expressing what you want, accepting suggestions, nudging direction, and occasionally correcting course.

10×
Faster Prototyping
70%
Less Boilerplate
2025
Term Coined
∞
Use Cases

Core Principles of Vibe Coding

Key Insight

Vibe coding doesn't mean "no coding knowledge needed." The best vibe coders are experienced developers who leverage AI to amplify their expertise — they know what to ask for, how to evaluate the output, and when to intervene manually.

02

The Vibe Coding Spectrum

Vibe coding isn't binary — it exists on a spectrum from fully AI-driven to human-led with AI assistance. Understanding where you sit on this spectrum determines your workflow, risks, and tooling choices.

Full Autopilot

AI generates everything. Developer barely reads the code. Maximum speed, maximum risk.

  • Throwaway prototypes
  • Hackathon demos
  • Personal scripts
  • Risk: Very high

Collaborative Mode

Developer and AI co-create. Human reviews every block, steers architecture.

  • Feature development
  • Internal tools
  • MVPs for startups
  • Risk: Moderate

Human-Led + AI Assist

Developer writes core logic, AI handles boilerplate, tests, and docs.

  • Production systems
  • Security-critical code
  • Regulated industries
  • Risk: Low

Karpathy's Own Warning

Even Andrej Karpathy cautioned that vibe coding "is not for production systems" in its purest form. The more you move toward autopilot, the more you accumulate technical debt and hidden bugs you don't understand.

STEP 1

Describe

Write a natural language prompt describing what you want to build

STEP 2

Generate

AI produces code, architecture, or a full working component

STEP 3

Review

Developer reads, tests, and evaluates the generated output

STEP 4

Refine

Provide follow-up prompts to fix issues, add features, or refactor

STEP 5

Ship

Integrate into project, add tests, document, and deploy

03

What is Swarm Prototyping?

Swarm Prototyping takes vibe coding to the next level by deploying multiple AI agents simultaneously to build different variants, components, or approaches in parallel. Instead of one human conversing with one AI, you orchestrate a swarm of agents — each tackling a different aspect of the problem — and then select, merge, or compose the best results.

Think of it as A/B testing during development: spawn 5 agents to build 5 different implementations of the same feature, evaluate them all, and ship the winner. Or assign each agent a different service in a microservices architecture and build the entire backend simultaneously.

Key Characteristics of Swarm Prototyping

When to Use Swarm Prototyping

  • Exploring multiple architectural approaches
  • Building proof-of-concepts under time pressure
  • Hackathons and innovation sprints
  • Generating UI/UX design variants
  • Testing different algorithm implementations
  • Building microservices in parallel

When NOT to Use It

  • Tightly coupled systems requiring sequential design
  • Regulated/compliance-critical software
  • When integration costs exceed generation savings
  • Projects requiring deep domain expertise the AI lacks
  • When you can't evaluate quality of outputs
  • Production systems without human code review
04

Multi-Agent Architecture

Swarm prototyping relies on multi-agent systems (MAS) — architectures where independent AI agents collaborate, compete, or work in parallel. The design of the agent swarm determines the quality, speed, and reliability of the output.

Swarm Prototyping Architecture

Human
Orchestrator
→

Coordinator
Agent
→

Task
Decomposition
→

Agent Swarm
N workers
→

Merge &
Evaluate
Orchestrator Agent
The central coordinator that decomposes tasks, assigns work to specialized agents, and merges results. Can be human or AI.
Worker Agents
Specialized agents that execute specific tasks — e.g., one writes frontend, another writes backend, another writes tests.
Critic / Evaluator Agent
Reviews output from worker agents, scores quality, detects bugs, and recommends the best variant to proceed with.
Merger Agent
Combines outputs from multiple agents into a cohesive codebase, resolving conflicts and ensuring integration.

Swarm Patterns

05

Vibe Coding vs Swarm Prototyping

Vibe Coding

  • One human + one AI agent
  • Conversational, iterative
  • Sequential development
  • Human maintains full context
  • Low overhead, fast start
  • Best for focused tasks
  • Output: single implementation
vs

Swarm Prototyping

  • One human + many AI agents
  • Parallel, orchestrated
  • Concurrent development
  • Context split across agents
  • Higher overhead, needs setup
  • Best for exploration & scale
  • Output: multiple variants
Dimension Vibe Coding Swarm Prototyping
Agents Single AI assistant Multiple coordinated agents
Speed Fast for single tasks Faster for complex, multi-part projects
Exploration One path at a time Many paths simultaneously
Complexity Low setup, easy to start Requires orchestration infrastructure
Cost Low (one LLM session) Higher (N concurrent agents)
Integration Code is naturally coherent Requires merge/integration step
Best For Features, bug fixes, scripts Prototypes, architecture exploration, hackathons

They're Complementary, Not Competing

In practice, most teams use both: Vibe Coding for day-to-day development and Swarm Prototyping for exploration phases, design sprints, or when faced with ambiguous requirements where multiple approaches need to be evaluated quickly.

06

Tools & Ecosystem (2026 Landscape)

Vibe Coding & Agentic IDEs

  • Google Antigravity: Agent-first IDE & CLI with Mission Control, Plan Artifacts, subagent worktrees (Workspace="branch"), and Terminal Sandbox
  • Claude Code (Anthropic): Agentic CLI & IDE assistant with Sandboxed Bash, Git worktrees (-w), hooks, and Vertex AI routing (CLAUDE_CODE_USE_VERTEX=1)
  • Gemini Code Assist: Google Cloud's enterprise AI coding assistant with codebase indexing and VPC-SC governance
  • Cursor: AI-native IDE with inline chat, background agents, and multi-file context
  • GitHub Copilot: Inline suggestions and coding agent integrated across VS Code, JetBrains, and Neovim
  • Windsurf: AI IDE with "Cascade" flows for multi-step coding tasks
  • Aider: Open-source CLI pair programmer for git-tracked projects
  • Replit Agent: Full-stack cloud agent that builds and deploys apps from prompts

Swarm / Multi-Agent Frameworks

  • Google ADK (Agent Development Kit): Code-first Python/TS/Go/Java framework with deterministic ParallelAgent, SequentialAgent, and LoopAgent workflows
  • Vertex AI Agent Builder / Google Agent Platform: Managed enterprise runtime, Agent Registry, Evaluation Service, and Agent Sandbox integrations
  • Claude Agent SDK: Production runtime for spawning isolated coding subagents with scoped tools and hooks
  • LangGraph: Stateful graph-based multi-agent orchestration with checkpointing
  • CrewAI: Role-based multi-agent framework for structured team workflows
  • AutoGen (Microsoft): Multi-agent conversations with customizable agent roles
  • OpenAI Swarm / Agents SDK: Lightweight framework for multi-agent handoffs
  • MetaGPT: Multi-agent framework simulating a software company (PM, architect, engineer)
  • Amazon Bedrock Agents: AWS managed multi-step agent orchestration
Python — Isolated Worktree Tournament
# Swarm Prototyping — Tournament Pattern in Isolated Git Worktrees
from swarm import Orchestrator, Agent, Evaluator

task = "Build a REST API for user authentication with JWT"

# Spawn 3 agents in isolated worktree branches (no .git/index.lock collisions)
agents = [
    Agent(name="flask-agent",   style="Flask + SQLAlchemy",  workspace="branch"),
    Agent(name="fastapi-agent", style="FastAPI + Pydantic", workspace="branch"),
    Agent(name="express-agent", style="Express.js + Passport", workspace="branch"),
]

# All agents work in parallel inside sandboxed environments
results = Orchestrator.fan_out(task, agents)

# Evaluator agent scores each implementation against deterministic tests
best = Evaluator.rank(results, criteria=[
    "security", "code_quality", "test_coverage"
])

print(f"Winner: {best.name} — Score: {best.score}")
07

Risks, Limitations & Best Practices

Risks & Anti-Patterns

  • Cargo Cult Coding: Accepting AI output without understanding it — code works but you can't debug or extend it
  • Hidden Technical Debt: AI generates "good enough" code that accumulates complexity silently
  • Security Blind Spots: AI may introduce vulnerabilities (SQL injection, XSS, hardcoded secrets)
  • Hallucinated APIs: AI invents function calls or library methods that don't exist
  • Context Window Overflow: Large projects exceed AI context limits, causing incoherent outputs
  • Skill Atrophy: Over-reliance on AI may erode fundamental programming skills over time

Best Practices

  • Always Review: Read every line of generated code before committing — treat AI output as a draft
  • Test First: Write or generate tests before/alongside code — AI excels at test generation
  • Constrain Context: Provide clear, scoped prompts with architecture constraints
  • Version Everything: Git commit frequently — easy to rollback AI-generated changes
  • Security Scanning: Run SAST/DAST tools on all AI-generated code
  • Document Intent: Capture why you asked the AI for something, not just what it produced

The "It Works" Trap

The most dangerous outcome of vibe coding is code that appears to work perfectly but contains subtle logical errors, edge case failures, or security vulnerabilities that only manifest in production. Always ask: "Does it work, or does it seem to work?"

Production Readiness Checklist

08

Secure Coding Sandboxes: Antigravity, Cloud Workstations & GKE

Autonomous coding agents and parallel swarms execute shell commands, install third-party packages, run test suites, and synthesize untrusted code. Running an unrestrained agent directly on a developer laptop with ambient cloud credentials and .env secrets exposes the workspace to prompt injection, credential exfiltration, and filesystem corruption. Enterprise Agentic Software Engineering (PAA Section 2) enforces three progressive isolation tiers.

ENTERPRISE CODING & EXECUTION SANDBOX BOUNDARIES TIER 1 · LOCAL OS & WORKTREE Antigravity & Claude Code • Seatbelt (macOS) / bubblewrap (Linux) • Blocks ~/.ssh, .env & unauthorized egress • Precedence: Deny > Ask > Allow • Git worktrees: Workspace="branch" / -w App presets: Sandbox OFF until enabled! TIER 2 · REGULATED CLOUD IDE Cloud Workstations + VPC-SC • Zero source code on developer laptops • Zero public IP + Private PSC cluster • VPC Service Controls blocks exfiltration • CLAUDE_CODE_USE_VERTEX=1 (IAM, no keys) idleAction=SUSPEND + keep_alive.sh TIER 3 · UNTRUSTED EXECUTION Agent Sandbox on GKE • gVisor user-space kernel isolation • CRDs: Sandbox, SandboxClaim, Template • SandboxWarmPool -> <1s pod claim • Admission blocks hostNetwork & hostPath Substrate = Actors · Sandbox = Untrusted Code
Sandbox Tier / Runtime Isolation Boundary Key Controls & Exam Gotchas Best Fit Scenario
Antigravity Terminal Sandbox OS-level process sandbox (macOS Seatbelt / Linux bubblewrap) Off by default in App Secure-Mode presets (even "Full machine") until explicitly enabled via enableTerminalSandbox; auto-enabled in CLI auto mode (--sandbox). Blocks .env reads & arbitrary egress; enforces Deny > Ask > Allow. Local vibe coding & subagent execution on developer workstations
Claude Code Sandboxed Bash + Vertex AI Seatbelt / bubblewrap + GCP IAM / VPC-SC Isolates filesystem writes to working dir/worktree (claude -w). Set CLAUDE_CODE_USE_VERTEX=1 to route via Vertex AI IAM, Cloud Audit Logs & CMEK with zero static Anthropic API keys. Enterprise Claude Code deployments inside Google Cloud governance
Google Cloud Workstations Dedicated ephemeral cloud VM inside private VPC Disable public IPs + deploy Private PSC cluster inside VPC Service Controls. Configure idleAction=SUSPEND + invoke /google/scripts/keep_alive.sh during active multi-hour agent test runs. Regulated finance/healthcare teams banning source code on laptops
Agent Sandbox on GKE Pod-level gVisor user-space kernel per claim Kubernetes CRDs (Sandbox, SandboxClaim, SandboxTemplate, SandboxWarmPool) deliver <1s warm-pool claim latency; Validating Admission Policy blocks hostNetwork & hostPath. Multi-tenant untrusted LLM code execution needing custom images or VPC access
Agent Platform Code Execution vs. Agent Substrate Managed 14-day Python sandbox vs. GKE actor runtime Code Execution = zero-ops stateful Python sandbox (no custom Docker/VPC). Agent Substrate on GKE = stateful distributed actor framework for orchestrators, not a kernel sandbox for untrusted code. Managed Python data analysis vs. high-scale stateful GKE agent actors

Swarm Worktree Isolation (Workspace="branch")

Never run parallel swarm agents against the same checkout directory — concurrent edits corrupt uncommitted files and trigger .git/index.lock race conditions. Spawn each worker with Workspace="branch" (or "share") in Antigravity or claude --worktree (-w) in Claude Code so every agent compiles and tests on an isolated Git branch before human or evaluator merge.

Cloud Workstations Cost & Keep-Alive Pattern

Disabling idle timeouts burns 24/7 VM budget, while default short idle timers kill background agent test suites when browser tabs close. Pair idleAction=SUSPEND (preserving memory/disk state while halting compute billing when idle) with wrapper hooks calling /google/scripts/keep_alive.sh only while an agent build or eval loop is actively running.

09

Autonomous Vulnerability Remediation: CodeMender & AI Threat Defense

Traditional SAST scanners flood engineering teams with high false-positive rates while AI-assisted coding accelerates commit velocity. Google Cloud addresses this through Google AI Threat Defense — a four-stage cloud-to-code security lifecycle powered by CodeMender, Google DeepMind's autonomous vulnerability verification and root-cause patching agent.

GOOGLE AI THREAT DEFENSE (4 STAGES) & CODEMENDER PIPELINE 1. PREPARE IAM least privilege, VPC-SC, Agent Registry & Sandbox policies 2. SCAN & PRIORITIZE SAST + Wiz Security Graph + SCC Rank by live internet/IAM exposure 3. REMEDIATE (CODEMENDER) PoC exploit check + root-cause patch + critic + human PR review 4. MONITOR Audit Logs (is_agentic=true), Model Armor & SCC Threat Detection CODEMENDER (`cm` LOCAL SANDBOXED CLIENT + GOOGLE-HOSTED REASONING SERVICE) cm find / cm report import AI scan OR ingest external SAST/Wiz SARIF reports (scan.extensions.include) cm verify (PoC Exploit Gate) Compiles & runs real PoC exploit in sandbox -> eliminates false positives cm fix -> Human PR Review Root-cause patch + PoC neutralized + full test suite + LLM critic -> PR
Bash — CodeMender Sandboxed Triage & Patch Pipeline
# 1. Ingest third-party SAST / Wiz SARIF report (or run `cm find --sandbox`)
cm report import --input sast-findings.sarif --config codemender.yaml

# 2. Synthesize & execute a sandboxed Proof-of-Concept (PoC) exploit to filter false positives
cm verify --sandbox --report imported

# 3. Generate root-cause patch, re-run PoC + unit tests + LLM critic, and open human PR
cm fix --sandbox --verified-only --create-pr

Why CodeMender Eliminates Alert Fatigue

CodeMender uses a hybrid architecture: deep Gemini reasoning runs on Google-hosted infrastructure while the cm CLI builds, tests, and executes PoCs locally inside an isolated process sandbox (--sandbox, scoped via scan.extensions.include). Because cm report import accepts external SAST/Wiz reports and cm verify requires a working sandboxed PoC exploit before escalating, security teams only review confirmed, regression-tested root-cause PRs — never auto-merged without a human sign-off.

10

Key Takeaways & Self-Assessment

Key Takeaways

Audio Deep Dive & Study Downloads

Listen to the 61-minute Vibe Coding audio deep dive, open the study guide PDF, 21-slide deck, and sketchnote infographic in the Hub Viewer, or drill scenario-based questions on the vibe coding spectrum, isolated git worktree swarms, Claude Code/Antigravity/Cloud Workstations/GKE sandboxes, and PoC-verified security remediation.

Vibe Coding (Video Walkthrough)
Vibe Coding to Enterprise Production: Swarms, Sandboxes & Remediation (Podcast)
Open Study Notes, Slide Deck & Infographic in Hub Viewer Launch Interactive Vibe Coding Practice Quiz →

Self-Assessment Questions

Q1. Who coined the term "Vibe Coding" and in what year?

Andrej Karpathy, co-founder of OpenAI, coined the term in early 2025 to describe the practice of conversational AI-assisted code generation.

Q2. What is the key difference between Vibe Coding and Swarm Prototyping?

Vibe Coding involves one human working with one AI agent conversationally. Swarm Prototyping orchestrates multiple AI agents working in parallel to explore different solutions or build different components simultaneously.

Q3. Name three swarm patterns and describe when you'd use each.

1) Fan-Out/Fan-In: Split a large task among agents, merge results — for decomposable projects. 2) Tournament: Agents compete on the same task, evaluator picks the best — for algorithm selection. 3) Specialization Grid: Each agent owns a domain (UI, API, DB) — for microservice architectures.

Q4. What is the "It Works" trap, and how do you mitigate it?

The "It Works" trap is when AI-generated code appears functional but contains hidden bugs, security vulnerabilities, or edge case failures. Mitigate by always reading every line, writing comprehensive tests, running security scans, and verifying all dependencies actually exist.

Q5. On the Vibe Coding spectrum, what are the three modes and their appropriate use cases?

1) Full Autopilot: Throwaway prototypes, hackathons, personal scripts (high risk). 2) Collaborative Mode: Feature development, MVPs, internal tools (moderate risk). 3) Human-Led + AI Assist: Production systems, security-critical code, regulated industries (low risk).

Q6. When do you choose Agent Sandbox on GKE over Antigravity's local Terminal Sandbox or Cloud Workstations?

Use Agent Sandbox on GKE when a production multi-tenant agent executes untrusted LLM-generated code requiring kernel isolation (gVisor), sub-second startup (SandboxWarmPool), custom containers, and Kubernetes admission controls blocking hostNetwork/hostPath.

Q7. How does CodeMender eliminate SAST false positives before proposing a security patch?

After discovering or importing findings (cm find / cm report import), cm verify compiles and runs a concrete Proof-of-Concept (PoC) exploit in an isolated sandbox; cm fix then proves the root-cause patch neutralizes the PoC, passes unit tests, and clears an LLM critic before opening a human-reviewed PR.
Study Progress — Vibe Coding, Swarms, Sandboxes & CodeMender 100%

Related Study Guides

Instruction-Driven Dev (IDD) →
SKILL.md progressive disclosure & agents-cli
Google Antigravity →
Mission Control, sandboxes & worktrees
Claude Code & SDK →
Sandboxed Bash, hooks & Vertex AI routing
Google Agent Platform →
Agent Sandbox on GKE & Code Execution

Practice (32 Scenario Questions)

Drill scenario-based questions on the vibe coding spectrum, swarm prototyping patterns, Git worktree isolation, Antigravity/Cloud Workstations/GKE sandboxes, and CodeMender autonomous remediation.

Back to the Hub Take the 32-question quiz: Vibe Coding →