This quick reference "cheatsheet" summarizes all the commands, files, flows, and feedback loops needed to apply Spec-Driven Development (SDD) in your day-to-day using Google Antigravity as your agentic IDE and Spec Kit as your governance engine.
🛠️ PHASE 0: Global Setup (Only once on your machine)
To install the Spec Kit CLI (specify-cli) ultra-fast using the modern Python package manager (uv), run this in your system terminal:
# Install uv (if you don't have it already)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install the tool globally
uv tool install specify-cli
📂 PHASE 1: Initialize a Project (Once per repository)
Whether for a brand new project or to integrate it into an existing one (brownfield):
1. Terminal commands:
# Navigate to the root directory of your project
cd ~/projects/your-project
# Initialize with the specific Antigravity integration ('agy')
specify init --here --integration agy
(If the folder is not empty and you want to force the scaffolding, add --force to the end of the command).
2. Generated file structure:
- 📂
.specify/: Internal Spec Kit configuration folder. Do not touch. - 📝
.specify/memory/constitution.md: The canonical file where you will draft your architectural and business rules. - 📂
.agents/workflows/: The files that define the slash commands (/speckit.*) so that the Antigravity side chat recognizes them immediately.
⚖️ PHASE 2: The Constitution (Establish Governance)
Before writing code, define the immutable laws of the system.
1. Command in Antigravity Side Chat (Ctrl + L):
Launch the constitution command passing the architectural principles of your project:
/speckit.constitution
Trench Trick: The agent will help you draft the canonical file .specify/memory/constitution.md. Once drafted, create a lightweight file at .agents/rules/00-governance.md that acts as an Adapter for Cursor/Antigravity saying:
\"For any design decision or code refactoring, you must mandatorily read and respect the
@.specify/memory/constitution.mdfile.\"
🎯 PHASE 3: The Daily Cycle per Feature (Single-Shot Rifle and Correction Loops)
Follow this strict flow for each Jira/Agility User Story in a clean, isolated branch. Never mix two features in the same development cycle.
[ 1. CREATE BRANCH (git checkout) ]
│
▼
┌──────────────► 2. SPECIFY (spec.md) ◄─────────────────────────────┐
│ │ │
│ ▼ │
│ 3. CLARIFY (/speckit.clarify) │
│ │ │
│ ▼ │
│ 4. PLAN (plan.md / contracts) ◄──────────────────┐ │ (Refinement or
│ │ │ │ UI Redesign
│ ▼ │ │ Loop)
│ 5. TASKS (tasks.md) ◄──────────────────────────┐ │ │
│ │ │ │ │
│ ▼ │ │ │
│ 6. ANALYZE (/speckit.analyze) │ │ │
│ │ │ │ │
│ ├─► [Constitution Violation] ─────────┼─┴──┘
│ │ │
│ ▼ (Consistency OK) │
│ 7. IMPLEMENT (/speckit.implement) ◄──────────┐ │ (Pending
│ │ │ │ Tasks
│ ▼ │ │ Loop)
└─────────────── 8. CONVERGE (/speckit.converge) │ │
│ │ │
├─► [Missing coverage or test] ─────┼─┘
│ (New tasks added) │
│ │
├─► [Don't like the UI / Rules] ────┘
│ (Modify specification)
│
▼ (Converged OK 🟢)
9. INTEGRATE (git merge)
1. Create branch in your local terminal (Manual):
git checkout -b feature/S-143562_payment-gateway
Note: Spec Kit will automatically detect that you are in this branch and will use its name as the identifier ("slug") to isolate the files in its subfolder without inventing sequential numbers.
2. Specify the "What" (Antigravity Chat or Manual):
/speckit.specify Design the payment gateway to accept credit cards and implement automatic retries if the provider fails.
- What happens? Spec Kit creates the folder
specs/S-143562_payment-gateway/and generates thespec.mdfile inside. - Recommended action ✍️: Open
spec.mdin your editor and take 5 minutes to refine the requirements by hand in EARS format (\"WHEN X occurs, THEN the system SHALL...\"). It's faster than chatting.
3. Clarify logical gaps (Optional - Antigravity Chat):
/speckit.clarify
- What happens? The agent analyzes your spec, detects logical gaps, and asks you 3 or 4 multiple-choice questions. Upon answering them, the agent rewrites and integrates the answers into your
spec.md.
4. Plan the "How" (Antigravity Chat):
/speckit.plan
- What happens? The agent reads your spec and generates the architecture in the feature folder:
- 📂
plan.md: The design of files to create, modify, or delete. - 📂
data-model.md: Definition of database schemas, APIs, and data types. - 📂
research.md: Evaluation of external dependencies and libraries.
5. Break down Atomic Tasks (Antigravity Chat):
/speckit.tasks
- What happens? Translates the technical plan into a sequential checklist with statuses and priorities in:
- 📂
tasks.md: With actual agent execution statuses ([ ]pending,[>]in progress,[x]completed,[!]failed).
6. Validate Consistency (Antigravity Chat):
/speckit.analyze
- What happens? Compares the plan and tasks against your Constitution.
- 🔄 Consistency Failure Loop: If you violate a design standard (e.g., skipping hexagonal architecture or using insecure libraries), it halts the flow and warns you before erroneous code is thrown. You must return to Step 2 (Re-specify) or Step 4 (Re-plan) to resolve the conflict.
7. Isolated Implementation (Antigravity Chat):
/speckit.implement
- What happens? The agent spins up a local Sandbox (isolated Linux container), reads
tasks.md, writes the code in the Sandbox, runs tests, and auto-corrects if there are console errors. When everything is green, it moves the changes to your local repository.
8. Check Convergence and Validation (Antigravity Chat):
/speckit.converge
- What happens? Performs a final audit of the generated code against your original
spec.mdto ensure it covers 100% of the required logic. - 🔄 Missing Coverage Loop: If the AI forgot to implement any test case or validation,
/speckit.convergewill detect it and automatically add new pending tasks to the end of yourtasks.md. You must return to Step 5/7 to re-implement what's missing. - 🔄 Refinement Loop (Don't like the UI): If you visually dislike the frontend component or need to refine styles/business rules, modify the
spec.md(Step 2), update the plan (Step 4), the tasks (Step 5) and implement again (Step 7). The AI will rewrite the code cleanly without leaving patches!
9. Merge and Integration (Local Git Terminal):
git add .
git commit -m "feat: implement payment gateway S-143562"
git push origin feature/S-143562_payment-gateway
Once the Pull Request is approved by humans (and after passing the /speckit.analyze validation in the Continuous Integration pipeline), merge with main and delete the local branch. Ready for the next cycle!
📚 Spec-Driven Development (SDD) Series
- Spec-Driven Development (SDD): AI Agent Governance and the End of 'Vibe Coding'
- The Governance Chassis: Constitution vs. AGENTS.md (And how not to drown in sync debt)
- The SDD Pipeline in Practice: From EARS Syntax to Atomic Tasks
- The Requirements Interview and the 'SpecOps' Loop: How to Use AI Sparring and Rewrite Code Painlessly
- The Challenge of Existing Code (Brownfield) and Managing Multiple Specs with Jira/Git
- Google Antigravity and MCP: Sandboxing, Self-Correction and the Cloud