task-decomposition
Hybrid task decomposition strategy for teamwork projects. Covers plan-based and semantic decomposition, granularity rules, role assignment, dependency management, and complexity assessment.
What this skill does
# Task Decomposition Strategy
This skill provides comprehensive guidelines for breaking down project goals into actionable tasks. Use this when planning teamwork projects to ensure optimal task granularity, proper role assignment, and appropriate complexity assessment.
---
## Hybrid Decomposition Strategy
Use a combination of plan-based (Strategy A) and semantic (Strategy B) decomposition:
### Strategy A: Plan Document Based
Use when `plans` option is provided with detailed implementation documents.
1. **Extract Steps**: Parse plan documents for Markdown headers (## Step N, ### Phase N)
2. **Map to Tasks**: Each header section becomes a task candidate
3. **Sub-decompose**: If a step mentions multiple files (>3), split into sub-tasks
4. **Verify Atomicity**: Each task should be completable in one worker session
Example transformation:
```
Plan: "03.impl-workspace-setup.md"
|- Step 1: Root workspace -> Task: "Initialize pnpm monorepo workspace"
|- Step 2.1: Database package -> Task: "Create database package structure"
|- Step 2.2: items schema -> Task: "Implement items.schema.ts"
|- Step 2.3: item-features schema -> Task: "Implement item-features.schema.ts with pgvector"
+- Step 3: Docker -> Task: "Configure Docker Compose for dev environment"
```
### Strategy B: Semantic Decomposition
Use when no plan documents provided, or as sub-decomposition within Strategy A.
1. **File-based**: New file creation = separate task
2. **Complexity-based**: Complex file with multiple classes -> split by class
3. **Dependency-based**: Interface and implementation = separate tasks
4. **Test-based**: Each independently testable unit = candidate task
---
## Granularity Rules
- 1 task = 1-3 files changed (recommended)
- 1 task = 10-30 minutes work (recommended)
- 1 task = independently testable/verifiable
### Anti-patterns (Avoid)
- "Setup entire workspace" (too broad)
- "Implement backend" (too vague)
- "Create all schemas" (bundles multiple files)
### Good patterns (Recommended)
- "Create items.schema.ts with Item table"
- "Add SearchUseCase with keyword search"
- "Configure Docker Compose for PostgreSQL"
---
## Task Creation with Native API
Create tasks using the native `TaskCreate` API:
```python
# Create a task
TaskCreate(
subject="Implement items.schema.ts",
description="Create PostgreSQL schema for items table with id, name, description, price columns. Include proper indexes.",
activeForm="Implementing items schema"
) # Returns task with auto-assigned ID
```
### Setting Dependencies
Use `TaskUpdate` with `addBlockedBy` to define task dependencies:
```python
# Task 1: no dependencies (can start immediately)
TaskCreate(subject="Setup database schema", description="...") # -> task 1
# Task 2: depends on task 1
TaskCreate(subject="Implement auth middleware", description="...") # -> task 2
TaskUpdate(taskId="2", addBlockedBy=["1"])
# Task 3: depends on task 2
TaskCreate(subject="Create login/signup UI", description="...") # -> task 3
TaskUpdate(taskId="3", addBlockedBy=["2"])
# Task 4: depends on both task 1 and task 2
TaskCreate(subject="Write integration tests", description="...") # -> task 4
TaskUpdate(taskId="4", addBlockedBy=["1", "2"])
```
### Dependency Rules
- **Minimize dependencies**: Maximize parallelism by only adding necessary `blockedBy` links
- **No circular dependencies**: Task A blocks B blocks A is invalid
- **Blocked tasks auto-unblock**: When all `blockedBy` tasks complete, the task becomes available for workers
- **Independent tasks have no blockedBy**: They can be picked up by any idle worker immediately
### Example: Full Task Creation
```python
# Foundation tasks (no dependencies)
TaskCreate(subject="Initialize project structure", description="...") # -> task 1
TaskCreate(subject="Configure TypeScript and ESLint", description="...") # -> task 2
# Core implementation (depends on foundation)
TaskCreate(subject="Create database models", description="...") # -> task 3
TaskUpdate(taskId="3", addBlockedBy=["1"])
TaskCreate(subject="Implement REST API endpoints", description="...") # -> task 4
TaskUpdate(taskId="4", addBlockedBy=["1", "3"])
TaskCreate(subject="Build React components", description="...") # -> task 5
TaskUpdate(taskId="5", addBlockedBy=["2"])
# Integration (depends on both API and UI)
TaskCreate(subject="Connect frontend to API", description="...") # -> task 6
TaskUpdate(taskId="6", addBlockedBy=["4", "5"])
# Testing (depends on integration)
TaskCreate(subject="Write E2E tests", description="...") # -> task 7
TaskUpdate(taskId="7", addBlockedBy=["6"])
```
This creates a natural execution order where independent tasks run in parallel and dependent tasks wait for their prerequisites.
---
## Role Assignment
Assign each task to the appropriate role based on its primary focus:
| Role | When to Use |
| ---------- | ------------------------------------------ |
| `frontend` | UI, components, styling, user interactions |
| `backend` | API, services, database, business logic |
| `test` | Tests, fixtures, mocks |
| `devops` | CI/CD, deployment, infrastructure |
| `docs` | Documentation, README, examples |
| `security` | Auth, permissions, input validation |
| `review` | Code review, refactoring |
| `general` | Miscellaneous, cross-cutting |
---
## Complexity Assessment
Workers use different models based on task complexity. Assign complexity to optimize resource usage:
| Complexity | Model | Criteria | Examples |
| ---------- | ----- | -------- | -------- |
| `simple` | haiku | Single file, <10 lines, minor changes | Config updates, typo fixes, simple docs |
| `standard` | sonnet | 1-3 files, typical CRUD, straightforward | API endpoints, UI components, tests |
| `complex` | opus | 5+ files, architecture, security-critical | Auth systems, DB migrations, major refactors |
### Guidelines for Complexity Assessment
- **simple**: Task is obvious, minimal thinking required, low risk
- **standard**: Task requires moderate planning, some decision-making
- **complex**: Task requires deep analysis, multiple considerations, high impact
### Decision Rules
**Default to `standard`** when uncertain. Upgrade to `complex` if:
- Task involves authentication/authorization
- Task touches database schema
- Task spans 5+ files
- Task has architectural implications
- Task is security-sensitive
---
## Structured Description Convention
Tasks should use structured descriptions with markdown sections to provide clear guidance to workers.
### Description Template
```markdown
## Description
What needs to be done (clear, actionable explanation)
## Approach
standard | tdd
## Success Criteria
- Criterion 1
- Criterion 2
- Criterion 3
## Verification Commands
command1
command2
```
### Section Definitions
| Section | Required | Default | Purpose |
|---------|----------|---------|---------|
| `## Description` | Yes | - | What needs to be done |
| `## Approach` | No | standard | `standard` or `tdd` workflow |
| `## Success Criteria` | Recommended | General evidence | Checklist for verification |
| `## Verification Commands` | Recommended | Skip | Commands workers run to verify |
### Approach Selection
| Task Type | Recommended Approach | Rationale |
|-----------|---------------------|-----------|
| New feature with clear spec | tdd | Test-first ensures spec compliance |
| Bug fix | tdd | Test reproduces bug first |
| Refactoring | standard | Existing tests cover behavior |
| Configuration/docs | standard | Not testable |
| Security-critical code | tdd | Security tests first |
| API endpoints | tdd | Contract-driven development |
| Database schema | standard | Migrations not test-driven |
| UI components | standard | Visual testing preferred |
### Success Criteria Guidelines
**Good criteria are:**
- **Specific**: "TestRelated in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.