An "AI-Spec-Driven" workflow for complex tasks, triggered ONLY when explicitly requested...
This skill implements an AI-Spec-Driven Development workflow that emulates "Antigravity Planning Mode". Ideally suited for complex, multi-step engineering tasks, it drastically reduces "hallucinated" solutions by forcing a structured "Think, Plan, then Act" lifecycle.
IMPORTANT: This skill is ONLY triggered when the AI model is explicitly requested by the user (e.g., "Use spec-driven-development", "Activate planning mode", "Create a spec for this").
The workflow isolates its artifacts in a hidden directory to keep the workspace clean.
<PROJECT_ROOT>/
├── .spec-driven-development-tasks/ # Hidden directory for all tasks
│ ├── {YYYYMMDD}-{TASK_TITLE}/ # Specific task folder
│ │ ├── spec.md # "The WHAT": Requirements, Context, Scope
│ │ ├── implementation.md # "The HOW": Architecture, File Changes, Steps
│ │ ├── task.md # "The WHEN": Real-time checklist & logs
│ │ └── walk-through.md # "The SUMMARY": Verification Guide, Handover
│ └── ...
├── .gitignore # Excludes .spec-driven-development-tasks
└── ...
graph TD
Start((Start)) -->|User Request| Phase1[1. Initialization Phase<br/>Run init_task.sh]
Phase1 -->|AUTO-PROCEED| Phase2[2. Research & Planning Phase<br/>Analyze, Scan Code, Draft Docs]
Phase2 --> Docs[Drafted Docs:<br/>spec.md, implementation.md, task.md]
Docs -->|STOP & REPORT| Review{User Review}
Review -->|2.1 Direct Execute| Phase3[3. Execution Phase<br/>Implement & Update task.md]
Review -->|2.2 Adjust & Execute| AdjustDirect[Adjust Docs]
AdjustDirect -->|AUTO-PROCEED| Phase3
Review -->|2.3 Adjust & Review| AdjustConfirm[Adjust Docs]
AdjustConfirm -->|STOP & REPORT| Review
Phase3 --> AllDone{All Tasks Done?}
AllDone -->|No: Continue Work| Phase3
AllDone -->|Yes: AUTO-PROCEED| Phase4[4. Completion Phase<br/>Write walk-through.md]
Phase4 -->|STOP & REPORT| End((Task Complete))
End -.->|New Requirements| Phase2
Input: The user's natural language request (e.g., "Help me refactor the authentication module"). The user does not provide a specific task title; the Agent must analyze the request to generate one.
Process:
refactor-auth-module).skills/spec-driven-development/scripts/init_task.sh <TASK_TITLE>..spec-driven-development-tasks exists and is added to .gitignore..gitignore and files within ignored directories.{YYYYMMDD}-{TASK_TITLE} directory with 4 empty template files.Output: A clean, isolated workspace for the task.
Transition: AUTO-PROCEED to Phase 2. Do not stop to report "Initialization Complete".
Input: The initialized workspace and user requirements.
Process:
spec.md: Context, Requirements, Scope (from templates/spec-template.md).implementation.md: Architecture, Implementation Steps (from templates/implementation-template.md).task.md: TODO Checklist (from templates/task-template.md).Output: Drafted specification and planning documents.
Transition: STOP & REPORT. Present the plan to the user with exactly these 3 options:
Input: Approved spec.md, implementation.md, task.md.
Process:
implementation.md.task.md as [x] immediately upon completion.task.md are checked.Output: Completed implementation and updated task.md.
Transition: AUTO-PROCEED to Phase 4 immediately after all tasks are done. Do not stop to ask "Ready for next phase?".
Input: Finished code and completed task.md.
Process:
walk-through.md using templates/walk-through-template.md.Output: Final project summary.
Transition: STOP & REPORT. Inform the user the task is fully complete and present the walk-through.md.