Decompose Linear todos into actionable, testifiable chunks with rationale, as-is/to-be analysis, expected outputs, and risk assessment for effective project management
Intelligent task decomposition engine that breaks high-level Linear tasks into actionable, testable subtasks with comprehensive analysis, dependency tracking, and AI/human assignment recommendations.
Transform complex tasks into structured deliverables optimized for team efficiency, testability, and risk management. Integrates with Linear API for seamless project management workflows.
| Script | Purpose | Lines |
|--------|---------|-------|
| analyze_task.py | Main decomposition engine | 728 |
| linear_integration.py | Linear API client | 330 |
| assignment_metrics.py | Assignment analytics | 352 |
| constants.py | Centralized config | 331 |
Total: 1,741 lines of Python
# Python 3.8 or higher
python3 --version
# Required packages
pip install requests pyyaml
export LINEAR_API_KEY="your_key_here"
Or create a .env file:
LINEAR_API_KEY=your_key_here
cd scripts
# Analyze and decompose a task
python3 analyze_task.py "Add dark mode toggle to application" --project frontend
# Output to file
python3 analyze_task.py "Implement user authentication" \
--project backend \
--output task-breakdown.md
# Specify number of subtasks
python3 analyze_task.py "Refactor database layer" \
--project backend \
--subtasks 5
# Export to Linear (creates actual issues)
python3 analyze_task.py "Build REST API" \
--project backend \
--export-linear \
--team-id "TEAM-123"
# Dry-run mode (preview without creating)
python3 analyze_task.py "Add logging system" \
--export-linear \
--team-id "TEAM-123" \
--dry-run
# View assignment distribution
python3 assignment_metrics.py
# Generate detailed report
python3 assignment_metrics.py --report
# Analyze specific project
python3 assignment_metrics.py --project "Mobile App Refactor"
# Task Decomposition: Add dark mode toggle to application
## Rationale
Task decomposed into 3 subtasks to enable parallel work...
## State Analysis
**As-Is (Current State):** No dark mode functionality
**To-Be (Desired State):** System will have dark mode toggle
**Gap Analysis:** Need to implement, test, and integrate
## Subtasks
### 1. Analyze requirements and design approach
**Priority:** P0 (Critical Path)
**Estimate:** 2.0 hours
🔄 **Assignee:** either
**Labels:** planning, research
**Acceptance Criteria:**
- [ ] Requirements documented
- [ ] Technical approach defined
- [ ] Architecture diagram created
**Testing:**
- [ ] Review with stakeholders
- [ ] Validate approach with team
**Expected Outputs:**
- Requirements document
- Architecture diagram
### 2. Implement core functionality
**Priority:** P0 (Critical Path)
**Estimate:** 4.0 hours
🤖 **Assignee:** agent
**Labels:** frontend
**Dependencies:** #1
...
[*] Analyzing task: Add dark mode toggle to application
[*] 📊 Task Analysis Complete
Subtasks Generated: 3
Total Estimated Time: 8.0 hours
Critical Path Items: 2
[✓] Decomposition saved to: task-breakdown.md
Detected by keywords:
automate, script, test, lint, formatgenerate, compile, build, deployrefactor, optimize, fix bugupdate dependency, add test, documentationDetected by keywords:
design, architecture, decision, strategyreview, approve, ux, uicustomer, stakeholder, meetingsecurity review, compliance, legal# Required for Linear integration
LINEAR_API_KEY="lin_api_..."
# Optional: Default team ID
LINEAR_TEAM_ID="TEAM-123"
# Optional: Default project name
LINEAR_PROJECT="Backend Services"
Customize behavior via scripts/constants.py:
# Modify assignment keywords
AGENT_KEYWORDS = [
'automate', 'script', 'test', ...
]
HUMAN_KEYWORDS = [
'design', 'architecture', 'decision', ...
]
# Adjust default estimates
DEFAULT_SUBTASK_ESTIMATE = 2.0 # hours
# Modify priority levels
LINEAR_PRIORITY = {
'urgent': 1,
'high': 2,
'normal': 3,
'low': 4
}
python3 analyze_task.py \
"Implement rate limiting middleware" \
--project "API Gateway" \
--subtasks 4 \
--output rate-limiting.md
Output: 4 subtasks with Redis integration, configuration, testing, and documentation
python3 analyze_task.py \
"Build data table component with sorting and filtering" \
--project "React Dashboard" \
--export-linear \
--team-id "FE-TEAM"
Result: Creates Linear issues with proper dependencies and labels
python3 analyze_task.py \
"Set up CI/CD pipeline with automated testing" \
--project "DevOps" \
--subtasks 5 \
--dry-run
Output: Preview of 5 subtasks covering pipeline setup, test integration, deployment, monitoring, and documentation
Problem: "Linear API key not found"
# Solution: Set environment variable
export LINEAR_API_KEY="lin_api_..."
Problem: "Team not found"
# List available teams
python3 linear_integration.py --list-teams
Problem: Task assigned to wrong category
Solution: Add custom keywords to constants.py:
# For your domain-specific terms
AGENT_KEYWORDS.append('custom-automation-term')
HUMAN_KEYWORDS.append('custom-strategy-term')
Problem: Markdown formatting broken
Solution: Ensure output directory exists:
mkdir -p output
python3 analyze_task.py "Task" --output output/task.md
task-decomposer/
├── SKILL.md # Skill definition
├── README.md # This file
├── scripts/
│ ├── analyze_task.py # Main decomposition engine
│ ├── linear_integration.py # Linear API client
│ ├── assignment_metrics.py # Analytics and reporting
│ └── constants.py # Configuration and constants
└── examples/
└── sample-output.md # Example decomposition
# Test basic decomposition
python3 analyze_task.py "Test task" --dry-run
# Test Linear integration (dry-run, no actual issues created)
python3 analyze_task.py "Test task" \
--export-linear \
--team-id "TEST" \
--dry-run
# Test assignment analytics
python3 assignment_metrics.py
Add custom decomposition strategies:
# In analyze_task.py
def custom_decomposition_strategy(task_description: str) -> List[Subtask]:
"""Implement your custom logic"""
# Analyze task
# Generate subtasks
# Return structured output
pass
Date: 2025-11-11 Changes: Refactored to eliminate code duplication and standardize logging
import os in analyze_task.pySee: /tmp/qa-refactor/TASK_DECOMPOSER_REFACTORING_SUMMARY.md
Apache-2.0
SKILL.md for detailed instructionsexamples/ directory../shared/README.md for Logger and base utilitiesLast Updated: 2025-11-11 Version: 2.0.0 (Post-refactoring)
Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks OpenClaw to add a note, list notes, search notes, or manage note folders.
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.
Use when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
Manage Trello boards, lists, and cards via the Trello REST API.
Category:productivity