Implementation Planning Skill
Create comprehensive implementation plans for any software project.
When to Use
- - User asks to build an app, feature, or project
- User wants a plan before coding
- User asks "how would you build X"
- User mentions a problem that needs a solution
Clarifying Questions
If platform OR stack OR new/existing is not mentioned, ask before planning:
- - What platform? (iOS, web, Android, CLI, API)
- New project or existing codebase?
- Any stack preferences or constraints?
- Timeline or complexity level?
Plan Levels
Quick (5 min)
- - Overview + main files + key steps
- For simple features or prototypes
- Skip risks, API tables, and detailed testing
Detailed (15+ min)
- - Full architecture + all files + testing + deployment
- For production apps or complex features
- Includes: Dependencies, API design, testing, risks
ALWAYS ask before generating: "Quick plan or detailed plan?"
Implementation Plan Template
Level 1: Quick Plan
CODEBLOCK0
Level 2: Detailed Plan
# [Project Name] Implementation Plan
## Overview
[1-2 sentence description]
## Architecture
- Frontend: [framework/libraries]
- Backend: [if needed]
- Data: [storage]
## Files to Create
### Core
1. **App.swift** - Entry point
2. **MainView.swift** - Root view
3. **Model.swift** - Data models
### Features
4. **FeatureXView.swift** - UI
5. **FeatureXModel.swift** - Logic
## Step-by-Step
### Phase 1: Foundation
**Step 1: Setup**
- What: Create project, add deps
- Code: [snippet]
**Step 2: Models**
- What: Define data structures
- Code: [snippet]
### Phase 2: Core Features
### Phase 3: Polish
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| [name] | [v] | [why] |
## API Design (if backend)
| Endpoint | Method | Params | Response |
|----------|--------|--------|----------|
| /users | GET | - | User[] |
## Testing Strategy
- Unit: [what to test]
- Integration: [what to test]
## Risks & Mitigations
| Risk | Likelihood | Impact | Mitigation |
|------|------------|--------|------------|
| [X] | Low | High | [Y] |
## Running
bash
[command]
## Next Steps
1. [Immediate action]
2. [After that]
## Plan Principles
1. **Ask level first** — ALWAYS ask "Quick plan or detailed plan?"
2. **Architecture before files** — Know the stack
3. **Files drive steps** — List files, then implement in order
4. **Dependencies first** — What must exist before X
5. **Code snippets, not dumps** — Show minimal working snippets for critical paths (e.g., key model, one core view), not full implementations
6. **Be specific** — Not "UI" but "LoginView with email/password fields"
7. **Include paths** — Sources/App/LoginView.swift
## Decision Criteria
Choose stack based on:
- **Mobile**: SwiftUI (iOS), Jetpack Compose (Android)
- **Web**: React, Vue, or server-side Swift
- **Backend**: Vapor, FastAPI, Express
- **Database**: SQLite (local), PostgreSQL (prod), Firebase (quick)
**If user just says "app" with no platform: ASK — do NOT assume mobile or web.**
If user context is iOS/macOS-heavy, you MAY suggest SwiftUI/Vapor/SQLite first, but still ASK before committing.
## Refinement Requests
- If user says "expand [phase]" → regenerate that phase in full detail
- If user says "redo with [X]" → re-emit only affected sections
- If user says "more details" → upgrade to Detailed plan
## Example Output (Quick Plan)
User: "Build me a todo app for iOS"
markdown
Todo App - Quick Plan
What
A simple iOS todo list app with add, complete, and delete features.
Stack
- - Frontend: SwiftUI
- Backend: None (local storage)
- Data: UserDefaults
Files
- - TodoApp.swift: App entry point
- ContentView.swift: Main list view
- Todo.swift: Data model
- TodoStore.swift: State management
Steps
- 1. Create SwiftUI project with XcodeGen
- Define Todo model (id, title, isCompleted)
- Build ContentView with List and TextField
- Add/remove/toggle todo functionality
- Persist to UserDefaults
```
实施计划技能
为任何软件项目创建全面的实施计划。
使用时机
- - 用户要求构建应用、功能或项目
- 用户在编码前想要一个计划
- 用户询问你会如何构建X
- 用户提到需要解决方案的问题
澄清问题
如果未提及平台、技术栈或新项目/现有项目,请在制定计划前询问:
- - 什么平台?(iOS、Web、Android、CLI、API)
- 新项目还是现有代码库?
- 是否有技术栈偏好或限制?
- 时间线或复杂程度?
计划级别
快速计划(5分钟)
- - 概述 + 主要文件 + 关键步骤
- 适用于简单功能或原型
- 跳过风险、API表和详细测试
详细计划(15分钟以上)
- - 完整架构 + 所有文件 + 测试 + 部署
- 适用于生产应用或复杂功能
- 包括:依赖项、API设计、测试、风险
在生成前务必询问:快速计划还是详细计划?
实施计划模板
级别1:快速计划
markdown
[项目] - 快速计划
概述
[一句话描述]
技术栈
文件
- - [file1.swift]:[用途]
- [file2.swift]:[用途]
步骤
- 1. [步骤1]
- [步骤2]
- [步骤3]
级别2:详细计划
markdown
[项目名称] 实施计划
概述
[1-2句话描述]
架构
- - 前端:[框架/库]
- 后端:[如需要]
- 数据:[存储方式]
需创建的文件
核心
- 1. App.swift - 入口点
- MainView.swift - 根视图
- Model.swift - 数据模型
功能
- 4. FeatureXView.swift - 用户界面
- FeatureXModel.swift - 逻辑
分步实施
阶段1:基础搭建
步骤1:环境搭建
步骤2:模型
阶段2:核心功能
阶段3:优化完善
依赖项
API设计(如需要后端)
测试策略
风险与应对措施
运行方式
bash
[命令]
后续步骤
- 1. [立即行动]
- [后续行动]
计划原则
- 1. 先问级别 — 务必询问快速计划还是详细计划?
- 先架构后文件 — 了解技术栈
- 文件驱动步骤 — 列出文件,然后按顺序实施
- 依赖优先 — 在X之前必须存在什么
- 代码片段而非转储 — 展示关键路径的最小工作代码片段(如关键模型、一个核心视图),而非完整实现
- 具体明确 — 不是用户界面而是带邮箱/密码字段的登录视图
- 包含路径 — Sources/App/LoginView.swift
决策标准
根据以下因素选择技术栈:
- - 移动端:SwiftUI(iOS)、Jetpack Compose(Android)
- Web端:React、Vue 或服务端 Swift
- 后端:Vapor、FastAPI、Express
- 数据库:SQLite(本地)、PostgreSQL(生产)、Firebase(快速)
如果用户只说应用而未指定平台:请询问 — 不要假设是移动端或Web端。
如果用户上下文以iOS/macOS为主,你可以优先建议SwiftUI/Vapor/SQLite,但在确定前仍需询问。
优化请求
- - 如果用户说展开[阶段] → 重新生成该阶段的完整细节
- 如果用户说用[X]重做 → 仅重新输出受影响的部分
- 如果用户说更多细节 → 升级为详细计划
示例输出(快速计划)
用户:为我构建一个iOS待办事项应用
markdown
待办事项应用 - 快速计划
概述
一个简单的iOS待办事项列表应用,支持添加、完成和删除功能。
技术栈
- - 前端:SwiftUI
- 后端:无(本地存储)
- 数据:UserDefaults
文件
- - TodoApp.swift:应用入口点
- ContentView.swift:主列表视图
- Todo.swift:数据模型
- TodoStore.swift:状态管理
步骤
- 1. 使用XcodeGen创建SwiftUI项目
- 定义Todo模型(id、标题、isCompleted)
- 使用List和TextField构建ContentView
- 实现添加/删除/切换待办事项功能
- 持久化到UserDefaults