My5t3r10us/cesizen / .agents/skills/apex
apex
VerifiedSystematic implementation using APEX methodology (Analyze-Plan-Execute-eXamine) with optional parallel subagents, self-validation, and adversarial review. Use when implementing features, fixing bugs, or making code changes that benefit from structured workflow.
steps/step-02b-tasks.md
View on GitHub---
name: step-02b-tasks
description: Generate task breakdown with dependencies from the implementation plan
prev_step: steps/step-02-plan.md
next_step: steps/step-03-execute.md
---
# Step 2b: Task Breakdown
## MANDATORY EXECUTION RULES (READ FIRST):
- π NEVER start implementing - that's step 3
- π NEVER write or modify code in this step
- β
ALWAYS create individual task files with clear structure
- β
ALWAYS include dependencies between tasks
- β
ALWAYS create a README.md explaining the task graph
- π YOU ARE A TASK ARCHITECT, not an implementer
- π¬ FOCUS on breaking down the plan into executable tasks
- π« FORBIDDEN to use Edit, Write (except for task files), or Bash tools
## EXECUTION PROTOCOLS:
- π― Analyze the plan from step-02 before creating tasks
- πΎ Create `tasks/` folder inside output directory (if save_mode)
- π Reference the implementation plan structure
- π« FORBIDDEN to proceed until all tasks are created
## CONTEXT BOUNDARIES:
- Context from step-01 (analysis) and step-02 (plan) is available
- Implementation has NOT started
- Tasks should map directly to plan sections
- Each task is self-contained with all context needed
## YOUR TASK:
Transform the implementation plan into individual task files with clear dependencies, enabling parallel execution where possible.
---
<available_state>
From previous steps:
| Variable | Description |
|----------|-------------|
| `{task_description}` | What to implement |
| `{task_id}` | Kebab-case identifier |
| `{acceptance_criteria}` | Success criteria from step-01 |
| `{auto_mode}` | Skip confirmations |
| `{save_mode}` | Save outputs to files |
| `{tasks_mode}` | Generate task breakdown (should be true) |
| `{output_dir}` | Path to output (if save_mode) |
| Plan | Full implementation plan from step-02 |
</available_state>
---
## EXECUTION SEQUENCE:
### 1. Create Tasks Directory
**If `{save_mode}` = true:**
```bash
mkdir -p {output_dir}/tasks
```
### 2. Analyze Plan and Identify Tasks
From the implementation plan, identify:
- **Independent tasks** - Can run in parallel (no dependencies)
- **Sequential tasks** - Must wait for other tasks to complete
- **File-grouped tasks** - Changes to same file that could be combined
**Task sizing guidelines:**
- Each task should be completable in one focused session
- Tasks should modify 1-3 files maximum
- Complex file changes can be split into multiple tasks
### 3. Create Individual Task Files
For each task, create a file: `{output_dir}/tasks/task-NN-{name}.md`
**Task file structure:**
```markdown
---
id: task-NN
name: {short-descriptive-name}
status: pending
priority: {high|medium|low}
depends_on: [task-XX, task-YY] # Empty array if no dependencies
blocks: [task-ZZ] # Tasks waiting for this one
estimated_files:
- path/to/file1.ts
- path/to/file2.ts
---
# Task NN: {Descriptive Title}
## Objective
{One sentence describing what this task accomplishes}
## Context
{2-3 sentences providing background needed to complete the task}
## Plan
{Specific implementation steps, referencing line numbers and patterns}
1. Step one
2. Step two
3. Step three
## Files to Modify
| File | Action | Changes |
|------|--------|---------|
| `path/to/file.ts` | Modify | Add function X, update Y |
## Acceptance Criteria
- [ ] AC1: {Specific testable criterion}
- [ ] AC2: {Specific testable criterion}
## Dependencies
**Depends on:**
- `task-XX`: {Why this dependency exists}
**Blocks:**
- `task-ZZ`: {Why this blocks other tasks}
## Notes
{Any additional context, gotchas, or considerations}
```
### 4. Build Dependency Graph
Analyze task relationships:
```
task-01 βββ¬βββΊ task-02 βββΊ task-04
β
ββββΊ task-03 βββΊ task-05
β²
β
task-06 ββββββββββββββ
```
Identify:
- **Critical path** - Longest chain of dependencies
- **Parallel groups** - Tasks that can run simultaneously
- **Bottlenecks** - Tasks blocking many others
### 5. Create README.md
Create `{output_dir}/tasks/README.md`:
```markdown
# Task Breakdown: {task_description}
**Generated:** {timestamp}
**Total Tasks:** {count}
**Parallel Groups:** {count}
## Overview
{1-2 sentences summarizing the task breakdown}
## Dependency Graph
```
[Visual representation of task dependencies]
```
## Task Summary
| ID | Name | Status | Depends On | Priority |
|----|------|--------|------------|----------|
| 01 | {name} | pending | - | high |
| 02 | {name} | pending | 01 | medium |
## Parallel Execution Groups
**Group 1 (Start immediately):**
- task-01: {name}
- task-06: {name}
**Group 2 (After Group 1):**
- task-02: {name} (after task-01)
- task-03: {name} (after task-01, task-06)
**Group 3 (After Group 2):**
- task-04: {name} (after task-02)
- task-05: {name} (after task-03)
## Critical Path
task-01 β task-02 β task-04
## Notes
{Any additional context about the task breakdown}
```
### 6. Validate Task Breakdown
Checklist:
- [ ] All plan sections have corresponding tasks
- [ ] No circular dependencies
- [ ] Each task has clear acceptance criteria
- [ ] Dependencies are logical and minimal
- [ ] Parallel opportunities maximized
- [ ] README accurately describes the graph
### 7. Present Summary
```
**Task Breakdown Complete**
**Total tasks:** {count}
**Independent (can start now):** {count}
**Sequential chains:** {count}
**Files created:**
- tasks/README.md
- tasks/task-01-{name}.md
- tasks/task-02-{name}.md
- ...
```
**If `{auto_mode}` = true:**
β Skip confirmation, proceed to execution
**If `{auto_mode}` = false:**
```yaml
questions:
- header: "Tasks"
question: "Task breakdown complete. Ready to proceed to implementation?"
options:
- label: "Continue to execution (Recommended)"
description: "Start implementing tasks in order"
- label: "Review tasks first"
description: "I want to examine the task files"
- label: "Adjust breakdown"
description: "Modify the task structure"
multiSelect: false
```
---
## SUCCESS METRICS:
β
Tasks directory created with all task files
β
Each task has clear dependencies documented
β
README.md provides complete overview
β
Dependency graph has no cycles
β
Parallel groups identified
β
Critical path documented
β
NO code written or modified
## FAILURE MODES:
β Creating tasks without clear dependencies
β Missing README.md
β Circular dependencies in graph
β Tasks too large or too granular
β Starting to write code (that's step 3!)
β **CRITICAL**: Not using AskUserQuestion for confirmation
## TASK BREAKDOWN PROTOCOLS:
- Each task must be self-contained with all needed context
- Dependencies should be minimal and justified
- Maximize parallel execution opportunities
- Task files follow consistent structure
- README provides birds-eye view
---
## NEXT STEP:
After user confirms via AskUserQuestion (or auto-proceed):
**If `{teams_mode}` = true:**
β Load `./step-03-execute-teams.md` for Agent Team parallel execution
**Otherwise:**
β Load `./step-03-execute.md` to start implementation
<critical>
Remember: This step ONLY creates task documentation - save all implementation for step-03!
The tasks folder gives a clear roadmap of what to implement and in what order.
</critical>
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why β repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" β or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself β your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |