Plan layer structure and task groupings from PRD analysis. Called by /breakdown skill during Phase 3.
You are planning how to organize implementation tasks into layers.
The calling skill will provide the PRD analysis JSON from the analyze-prd phase.
Organize tasks into layers based on project type:
0-setup) - Greenfield OnlyInclude this layer ONLY if tech_stack.type === "greenfield"
Organize remaining tasks into these 4 layers:
1-foundation)2-backend)3-frontend)4-integration)Create a layer plan that:
Return a JSON object with this structure:
{
"project_type": "greenfield",
"layers": [
{
"id": "0-setup",
"name": "Setup",
"description": "Initialize project from template",
"skip_if_brownfield": true,
"tasks": [
{
"id": "L0-001",
"name": "Copy template to target",
"description": "Copy webapps/backends/python template to target directory",
"files": [],
"depends_on": [],
"provides": ["Project directory with template files"]
},
{
"id": "L0-002",
"name": "Initialize git and environment",
"description": "Git init, create venv, install dependencies",
"files": [],
"depends_on": ["L0-001"],
"provides": ["Git repo", "Virtual environment", "Installed dependencies"]
},
{
"id": "L0-003",
"name": "Configure and migrate database",
"description": "Set up .env and run initial migrations",
"files": [".env"],
"depends_on": ["L0-002"],
"provides": ["Database connection", "Initial schema"]
},
{
"id": "L0-004",
"name": "Verify setup",
"description": "Start dev server and verify template works",
"files": [],
"depends_on": ["L0-003"],
"provides": ["Working development environment"]
}
]
},
{
"id": "1-foundation",
"name": "Foundation",
"description": "Database models and core setup",
"tasks": [
{
"id": "L1-001",
"name": "Create Project model",
"description": "SQLAlchemy model for PRD projects",
"files": [
"app/models/project.py",
"app/migrations/versions/001_create_projects.py"
],
"depends_on": ["L0-004"],
"provides": ["Project model", "ProjectStatus enum"]
},
{
"id": "L1-002",
"name": "Create Conversation model",
"description": "SQLAlchemy model for chat conversations per persona",
"files": [
"app/models/conversation.py",
"app/migrations/versions/002_create_conversations.py"
],
"depends_on": ["L1-001"],
"provides": ["Conversation model", "Persona enum"]
}
]
},
{
"id": "2-backend",
"name": "Backend",
"description": "API endpoints and business logic",
"tasks": [
{
"id": "L2-001",
"name": "Project CRUD API",
"description": "REST endpoints for project management",
"files": [
"app/api/projects.py",
"app/schemas/project.py"
],
"depends_on": ["L1-001"],
"provides": ["GET/POST/PUT /api/projects endpoints"]
}
]
},
{
"id": "3-frontend",
"name": "Frontend",
"description": "React components and state",
"tasks": [
{
"id": "L3-001",
"name": "Dashboard page",
"description": "Main dashboard showing project list",
"files": [
"src/pages/Dashboard.tsx",
"src/components/ProjectCard.tsx"
],
"depends_on": [],
"provides": ["Dashboard component", "ProjectCard component"]
}
]
},
{
"id": "4-integration",
"name": "Integration",
"description": "Wiring and polish",
"tasks": [
{
"id": "L4-001",
"name": "Wire Dashboard to API",
"description": "Connect Dashboard to project API with loading states",
"files": [
"src/pages/Dashboard.tsx",
"src/hooks/useProjects.ts"
],
"depends_on": ["L2-001", "L3-001"],
"provides": ["Working dashboard with real data"]
}
]
}
],
"dependency_graph": {
"L1-001": [],
"L1-002": ["L1-001"],
"L2-001": ["L1-001"],
"L3-001": [],
"L4-001": ["L2-001", "L3-001"]
},
"summary": {
"total_tasks": 5,
"by_layer": {
"1-foundation": 2,
"2-backend": 1,
"3-frontend": 1,
"4-integration": 1
}
}
}
If a feature maps to many tasks:
Feature: "Tabbed Persona Chat" might become:
If template exists:
Greenfield (tech_stack.type === "greenfield"):
Brownfield (tech_stack.type === "brownfield"):
skip_if_brownfield: true layer excluded)tech_stack.project_path as base for all file pathsReturn the complete layer plan JSON.