claude-task-master 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. claude_task_master-0.1.0/PKG-INFO +441 -0
  2. claude_task_master-0.1.0/README.md +401 -0
  3. claude_task_master-0.1.0/bin/claudetm +509 -0
  4. claude_task_master-0.1.0/pyproject.toml +182 -0
  5. claude_task_master-0.1.0/setup.cfg +4 -0
  6. claude_task_master-0.1.0/src/claude_task_master/__init__.py +7 -0
  7. claude_task_master-0.1.0/src/claude_task_master/cli.py +198 -0
  8. claude_task_master-0.1.0/src/claude_task_master/cli_commands/__init__.py +13 -0
  9. claude_task_master-0.1.0/src/claude_task_master/cli_commands/config.py +197 -0
  10. claude_task_master-0.1.0/src/claude_task_master/cli_commands/github.py +162 -0
  11. claude_task_master-0.1.0/src/claude_task_master/cli_commands/info.py +205 -0
  12. claude_task_master-0.1.0/src/claude_task_master/cli_commands/workflow.py +366 -0
  13. claude_task_master-0.1.0/src/claude_task_master/core/__init__.py +330 -0
  14. claude_task_master-0.1.0/src/claude_task_master/core/agent.py +295 -0
  15. claude_task_master-0.1.0/src/claude_task_master/core/agent_exceptions.py +191 -0
  16. claude_task_master-0.1.0/src/claude_task_master/core/agent_message.py +158 -0
  17. claude_task_master-0.1.0/src/claude_task_master/core/agent_models.py +194 -0
  18. claude_task_master-0.1.0/src/claude_task_master/core/agent_phases.py +327 -0
  19. claude_task_master-0.1.0/src/claude_task_master/core/agent_query.py +463 -0
  20. claude_task_master-0.1.0/src/claude_task_master/core/checkpoint.py +238 -0
  21. claude_task_master-0.1.0/src/claude_task_master/core/circuit_breaker.py +411 -0
  22. claude_task_master-0.1.0/src/claude_task_master/core/config.py +263 -0
  23. claude_task_master-0.1.0/src/claude_task_master/core/config_loader.py +537 -0
  24. claude_task_master-0.1.0/src/claude_task_master/core/console.py +126 -0
  25. claude_task_master-0.1.0/src/claude_task_master/core/context_accumulator.py +44 -0
  26. claude_task_master-0.1.0/src/claude_task_master/core/conversation.py +496 -0
  27. claude_task_master-0.1.0/src/claude_task_master/core/credentials.py +340 -0
  28. claude_task_master-0.1.0/src/claude_task_master/core/hooks.py +479 -0
  29. claude_task_master-0.1.0/src/claude_task_master/core/key_listener.py +189 -0
  30. claude_task_master-0.1.0/src/claude_task_master/core/logger.py +242 -0
  31. claude_task_master-0.1.0/src/claude_task_master/core/orchestrator.py +688 -0
  32. claude_task_master-0.1.0/src/claude_task_master/core/parallel.py +456 -0
  33. claude_task_master-0.1.0/src/claude_task_master/core/planner.py +46 -0
  34. claude_task_master-0.1.0/src/claude_task_master/core/pr_context.py +450 -0
  35. claude_task_master-0.1.0/src/claude_task_master/core/progress_tracker.py +363 -0
  36. claude_task_master-0.1.0/src/claude_task_master/core/prompts.py +52 -0
  37. claude_task_master-0.1.0/src/claude_task_master/core/prompts_base.py +80 -0
  38. claude_task_master-0.1.0/src/claude_task_master/core/prompts_planning.py +189 -0
  39. claude_task_master-0.1.0/src/claude_task_master/core/prompts_verification.py +169 -0
  40. claude_task_master-0.1.0/src/claude_task_master/core/prompts_working.py +281 -0
  41. claude_task_master-0.1.0/src/claude_task_master/core/rate_limit.py +140 -0
  42. claude_task_master-0.1.0/src/claude_task_master/core/shutdown.py +324 -0
  43. claude_task_master-0.1.0/src/claude_task_master/core/state.py +593 -0
  44. claude_task_master-0.1.0/src/claude_task_master/core/state_backup.py +158 -0
  45. claude_task_master-0.1.0/src/claude_task_master/core/state_exceptions.py +187 -0
  46. claude_task_master-0.1.0/src/claude_task_master/core/state_file_ops.py +148 -0
  47. claude_task_master-0.1.0/src/claude_task_master/core/state_pr.py +250 -0
  48. claude_task_master-0.1.0/src/claude_task_master/core/state_recovery.py +122 -0
  49. claude_task_master-0.1.0/src/claude_task_master/core/subagents.py +224 -0
  50. claude_task_master-0.1.0/src/claude_task_master/core/task_group.py +337 -0
  51. claude_task_master-0.1.0/src/claude_task_master/core/task_runner.py +498 -0
  52. claude_task_master-0.1.0/src/claude_task_master/core/workflow_stages.py +503 -0
  53. claude_task_master-0.1.0/src/claude_task_master/github/__init__.py +32 -0
  54. claude_task_master-0.1.0/src/claude_task_master/github/client.py +245 -0
  55. claude_task_master-0.1.0/src/claude_task_master/github/client_ci.py +308 -0
  56. claude_task_master-0.1.0/src/claude_task_master/github/client_pr.py +386 -0
  57. claude_task_master-0.1.0/src/claude_task_master/github/exceptions.py +40 -0
  58. claude_task_master-0.1.0/src/claude_task_master/github/pr_cycle.py +132 -0
  59. claude_task_master-0.1.0/src/claude_task_master/mcp/__init__.py +50 -0
  60. claude_task_master-0.1.0/src/claude_task_master/mcp/server.py +345 -0
  61. claude_task_master-0.1.0/src/claude_task_master/mcp/tools.py +559 -0
  62. claude_task_master-0.1.0/src/claude_task_master/utils/__init__.py +0 -0
  63. claude_task_master-0.1.0/src/claude_task_master/utils/debug_claude_md.py +175 -0
  64. claude_task_master-0.1.0/src/claude_task_master/utils/doctor.py +80 -0
  65. claude_task_master-0.1.0/src/claude_task_master/wrapper.py +167 -0
  66. claude_task_master-0.1.0/src/claude_task_master.egg-info/PKG-INFO +441 -0
  67. claude_task_master-0.1.0/src/claude_task_master.egg-info/SOURCES.txt +70 -0
  68. claude_task_master-0.1.0/src/claude_task_master.egg-info/dependency_links.txt +1 -0
  69. claude_task_master-0.1.0/src/claude_task_master.egg-info/entry_points.txt +4 -0
  70. claude_task_master-0.1.0/src/claude_task_master.egg-info/requires.txt +19 -0
  71. claude_task_master-0.1.0/src/claude_task_master.egg-info/top_level.txt +1 -0
  72. claude_task_master-0.1.0/tests/test_wrapper.py +144 -0
@@ -0,0 +1,441 @@
1
+ Metadata-Version: 2.4
2
+ Name: claude-task-master
3
+ Version: 0.1.0
4
+ Summary: Autonomous task orchestration system that keeps Claude working until a goal is achieved
5
+ Author: Claude Task Master Team
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/developerz-ai/claude-task-master
8
+ Project-URL: Documentation, https://github.com/developerz-ai/claude-task-master#readme
9
+ Project-URL: Repository, https://github.com/developerz-ai/claude-task-master
10
+ Project-URL: Issues, https://github.com/developerz-ai/claude-task-master/issues
11
+ Project-URL: Changelog, https://github.com/developerz-ai/claude-task-master/blob/main/CHANGELOG.md
12
+ Keywords: claude,agent,autonomous,task,orchestration,ai,automation
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: claude-agent-sdk>=0.1.0
25
+ Requires-Dist: typer>=0.12.0
26
+ Requires-Dist: pydantic>=2.0.0
27
+ Requires-Dist: rich>=13.0.0
28
+ Requires-Dist: httpx>=0.27.0
29
+ Provides-Extra: mcp
30
+ Requires-Dist: mcp>=1.0.0; extra == "mcp"
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
33
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
34
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
35
+ Requires-Dist: pytest-timeout>=2.4.0; extra == "dev"
36
+ Requires-Dist: ruff>=0.3.0; extra == "dev"
37
+ Requires-Dist: mypy>=1.9.0; extra == "dev"
38
+ Provides-Extra: all
39
+ Requires-Dist: claude-task-master[dev,mcp]; extra == "all"
40
+
41
+ # Claude Task Master
42
+
43
+ [![CI](https://github.com/developerz-ai/claude-task-master/actions/workflows/ci.yml/badge.svg)](https://github.com/developerz-ai/claude-task-master/actions/workflows/ci.yml)
44
+ [![codecov](https://codecov.io/gh/developerz-ai/claude-task-master/graph/badge.svg)](https://codecov.io/gh/developerz-ai/claude-task-master)
45
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
46
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
47
+ [![PyPI version](https://badge.fury.io/py/claude-task-master.svg)](https://badge.fury.io/py/claude-task-master)
48
+
49
+ Autonomous task orchestration system that keeps Claude working until a goal is achieved.
50
+
51
+ ## Quick Start
52
+
53
+ ```bash
54
+ # Install
55
+ pip install claude-task-master
56
+
57
+ # Verify setup
58
+ claudetm doctor
59
+
60
+ # Run a task
61
+ cd your-project
62
+ claudetm start "Add user authentication with tests"
63
+ ```
64
+
65
+ ## Overview
66
+
67
+ Claude Task Master uses the Claude Agent SDK to autonomously work on complex tasks. Give it a goal, and it will:
68
+
69
+ 1. **Plan** - Analyze codebase and create a task list organized by PRs
70
+ 2. **Execute** - Work through each task, committing and pushing changes
71
+ 3. **Create PRs** - All work is pushed and submitted as pull requests
72
+ 4. **Handle CI** - Wait for checks, fix failures, address review comments
73
+ 5. **Merge** - Auto-merge when approved (configurable)
74
+ 6. **Verify** - Confirm all success criteria are met
75
+
76
+ **Core Philosophy**: Claude is smart enough to do the work AND verify it. Task Master keeps the loop going and persists state between sessions.
77
+
78
+ ## Workflow
79
+
80
+ ```
81
+ ┌─────────────────────────────────────────────────────────────────┐
82
+ │ PLANNING │
83
+ │ Read codebase → Create task list → Define success criteria │
84
+ └─────────────────────────────────────────────────────────────────┘
85
+
86
+ ┌─────────────────────────────────────────────────────────────────┐
87
+ │ WORKING (per task) │
88
+ │ Make changes → Run tests → Commit → Push → Create PR │
89
+ └─────────────────────────────────────────────────────────────────┘
90
+
91
+ ┌─────────────────────────────────────────────────────────────────┐
92
+ │ PR LIFECYCLE │
93
+ │ Wait for CI → Fix failures → Address reviews → Merge │
94
+ └─────────────────────────────────────────────────────────────────┘
95
+
96
+ ┌─────────────────────────────────────────────────────────────────┐
97
+ │ VERIFICATION │
98
+ │ Run tests → Check lint → Verify criteria → Done │
99
+ └─────────────────────────────────────────────────────────────────┘
100
+ ```
101
+
102
+ ### Work Completion Requirements
103
+
104
+ Every task must be:
105
+ - **Committed** with a descriptive message
106
+ - **Pushed** to remote (`git push -u origin HEAD`)
107
+ - **In a PR** (`gh pr create ...`)
108
+
109
+ Work is NOT complete until it's pushed and in a pull request.
110
+
111
+ ## Installation
112
+
113
+ ### Prerequisites
114
+
115
+ 1. **Python 3.10+** - [Install Python](https://www.python.org/downloads/)
116
+ 2. **Claude CLI** - [Install Claude](https://github.com/anthropics/anthropic-sdk-python) and run `claude` to authenticate
117
+ 3. **GitHub CLI** - [Install gh](https://cli.github.com/) and run `gh auth login`
118
+
119
+ ### Install Claude Task Master
120
+
121
+ **Option 1: Using uv (recommended)**
122
+
123
+ ```bash
124
+ # Install uv if you haven't already
125
+ curl https://astral.sh/uv/install.sh | sh
126
+
127
+ # Install Claude Task Master
128
+ uv sync
129
+
130
+ # Verify installation
131
+ uv run claudetm doctor
132
+ ```
133
+
134
+ **Option 2: Using pip**
135
+
136
+ ```bash
137
+ # Install from PyPI
138
+ pip install claude-task-master
139
+
140
+ # Verify installation
141
+ claudetm doctor
142
+ ```
143
+
144
+ **Option 3: Development installation**
145
+
146
+ ```bash
147
+ # Clone the repository
148
+ git clone https://github.com/developerz-ai/claude-task-master
149
+ cd claude-task-master
150
+
151
+ # Install with development dependencies
152
+ pip install -e ".[dev]"
153
+
154
+ # Run tests
155
+ pytest
156
+ ```
157
+
158
+ ### Initial Setup
159
+
160
+ Run the doctor command to verify everything is configured:
161
+
162
+ ```bash
163
+ claudetm doctor
164
+ ```
165
+
166
+ This checks for:
167
+ - ✓ Claude CLI credentials at `~/.claude/.credentials.json`
168
+ - ✓ GitHub CLI authentication
169
+ - ✓ Git configuration
170
+ - ✓ Python version compatibility
171
+
172
+ ## Usage
173
+
174
+ ### CLI Commands
175
+
176
+ | Command | Description |
177
+ |---------|-------------|
178
+ | `claudetm start "goal"` | Start a new task |
179
+ | `claudetm resume` | Resume a paused task |
180
+ | `claudetm status` | Show current status |
181
+ | `claudetm plan` | View task list |
182
+ | `claudetm progress` | View progress summary |
183
+ | `claudetm context` | View accumulated learnings |
184
+ | `claudetm logs` | View session logs |
185
+ | `claudetm pr` | Show PR status and CI checks |
186
+ | `claudetm comments` | Show review comments |
187
+ | `claudetm clean` | Clean up task state |
188
+ | `claudetm doctor` | Verify system setup |
189
+
190
+ ### Start Options
191
+
192
+ ```bash
193
+ claudetm start "Your goal here" [OPTIONS]
194
+ ```
195
+
196
+ | Option | Description | Default |
197
+ |--------|-------------|---------|
198
+ | `--model` | Model to use (sonnet, opus, haiku) | sonnet |
199
+ | `--auto-merge/--no-auto-merge` | Auto-merge PRs when ready | True |
200
+ | `--max-sessions` | Limit number of sessions | unlimited |
201
+ | `--pause-on-pr` | Pause after creating PR | False |
202
+
203
+ ### Common Workflows
204
+
205
+ ```bash
206
+ # Simple task with auto-merge
207
+ claudetm start "Add factorial function to utils.py with tests"
208
+
209
+ # Complex task with manual review
210
+ claudetm start "Refactor auth system" --model opus --no-auto-merge
211
+
212
+ # Limited sessions to prevent runaway
213
+ claudetm start "Fix bug in parser" --max-sessions 5
214
+
215
+ # Monitor progress
216
+ watch -n 5 'claudetm status'
217
+ ```
218
+
219
+ ## Examples & Use Cases
220
+
221
+ Check the [examples/](./examples/) directory for detailed walkthroughs:
222
+
223
+ ### Quick Examples
224
+
225
+ ```bash
226
+ # Add a simple function
227
+ claudetm start "Add a factorial function to utils.py with tests"
228
+
229
+ # Fix a bug
230
+ claudetm start "Fix authentication timeout in login.py" --no-auto-merge
231
+
232
+ # Feature development
233
+ claudetm start "Add dark mode toggle to settings" --model opus
234
+
235
+ # Refactoring
236
+ claudetm start "Refactor API client to use async/await" --max-sessions 5
237
+
238
+ # Documentation
239
+ claudetm start "Add API documentation and examples"
240
+ ```
241
+
242
+ ### Available Guides
243
+
244
+ 1. **[Basic Usage](./examples/01-basic-usage.md)** - Simple tasks and fundamentals
245
+ 2. **[Feature Development](./examples/02-feature-development.md)** - Building complete features
246
+ 3. **[Bug Fixing](./examples/03-bug-fixing.md)** - Debugging and fixing issues
247
+ 4. **[Code Refactoring](./examples/04-refactoring.md)** - Improving code structure
248
+ 5. **[Testing](./examples/05-testing.md)** - Adding test coverage
249
+ 6. **[Documentation](./examples/06-documentation.md)** - Documentation and examples
250
+ 7. **[CI/CD Integration](./examples/07-cicd.md)** - GitHub Actions workflows
251
+ 8. **[Advanced Workflows](./examples/08-advanced-workflows.md)** - Complex scenarios
252
+
253
+ ## Troubleshooting
254
+
255
+ ### Credentials & Setup
256
+
257
+ #### "Claude CLI credentials not found"
258
+ ```bash
259
+ # Run the Claude CLI to authenticate
260
+ claude
261
+
262
+ # Verify credentials were saved
263
+ ls -la ~/.claude/.credentials.json
264
+
265
+ # Run doctor to check setup
266
+ claudetm doctor
267
+ ```
268
+
269
+ #### "GitHub CLI not authenticated"
270
+ ```bash
271
+ # Authenticate with GitHub
272
+ gh auth login
273
+
274
+ # Verify authentication
275
+ gh auth status
276
+ ```
277
+
278
+ ### Common Issues
279
+
280
+ #### Task appears stuck or not progressing
281
+
282
+ ```bash
283
+ # Check current status
284
+ claudetm status
285
+
286
+ # View detailed logs
287
+ claudetm logs -n 100
288
+
289
+ # If truly stuck, you can interrupt and resume
290
+ # Press Ctrl+C, then:
291
+ claudetm resume
292
+ ```
293
+
294
+ #### PR creation fails
295
+
296
+ ```bash
297
+ # Verify you're in a git repository
298
+ git status
299
+
300
+ # Verify remote is set up
301
+ git remote -v
302
+
303
+ # Check if a PR already exists
304
+ gh pr list
305
+
306
+ # Run doctor to diagnose
307
+ claudetm doctor
308
+ ```
309
+
310
+ #### Tests or linting failures
311
+
312
+ The system will handle failures and retry. To debug:
313
+
314
+ ```bash
315
+ # Check the latest logs
316
+ claudetm logs
317
+
318
+ # View progress summary
319
+ claudetm progress
320
+
321
+ # See what Claude learned from errors
322
+ claudetm context
323
+ ```
324
+
325
+ #### Clean up and restart
326
+
327
+ ```bash
328
+ # Safe cleanup - removes state but keeps logs
329
+ claudetm clean
330
+
331
+ # Force cleanup without confirmation
332
+ claudetm clean -f
333
+
334
+ # Start fresh task
335
+ claudetm start "Your new goal"
336
+ ```
337
+
338
+ ### Performance Tips
339
+
340
+ 1. **Use the right model**:
341
+ - `opus` for complex tasks (default)
342
+ - `sonnet` for balanced speed/quality
343
+ - `haiku` for simple tasks
344
+
345
+ 2. **Limit sessions to prevent infinite loops**:
346
+ ```bash
347
+ claudetm start "Task" --max-sessions 10
348
+ ```
349
+
350
+ 3. **Manual review for critical changes**:
351
+ ```bash
352
+ claudetm start "Task" --no-auto-merge
353
+ ```
354
+
355
+ 4. **Monitor in another terminal**:
356
+ ```bash
357
+ watch -n 5 'claudetm status'
358
+ ```
359
+
360
+ ### Debug Mode
361
+
362
+ View detailed execution information:
363
+
364
+ ```bash
365
+ # Show recent log entries
366
+ claudetm logs -n 200
367
+
368
+ # View current plan and progress
369
+ claudetm plan
370
+ claudetm progress
371
+
372
+ # See accumulated context from previous sessions
373
+ claudetm context
374
+ ```
375
+
376
+ ## Architecture
377
+
378
+ The system follows SOLID principles with strict Single Responsibility:
379
+
380
+ ### Core Components
381
+
382
+ | Component | Responsibility |
383
+ |-----------|----------------|
384
+ | **Credential Manager** | OAuth credential loading from `~/.claude/.credentials.json` |
385
+ | **State Manager** | Persistence to `.claude-task-master/` directory |
386
+ | **Agent Wrapper** | Claude Agent SDK interactions with streaming output |
387
+ | **Planner** | Planning phase with read-only tools (Read, Glob, Grep, Bash) |
388
+ | **Orchestrator** | Main execution loop and workflow stage management |
389
+ | **GitHub Client** | PR creation, CI monitoring, comment handling |
390
+ | **PR Cycle Manager** | Full PR lifecycle (create → CI → reviews → merge) |
391
+ | **Context Accumulator** | Builds learnings across sessions |
392
+
393
+ ### Workflow Stages
394
+
395
+ ```
396
+ working → pr_created → waiting_ci → ci_failed → waiting_reviews → addressing_reviews → ready_to_merge → merged
397
+ ```
398
+
399
+ Each stage has specific handlers that determine when to transition to the next stage.
400
+
401
+ ## State Directory
402
+
403
+ ```
404
+ .claude-task-master/
405
+ ├── goal.txt # Original user goal
406
+ ├── criteria.txt # Success criteria
407
+ ├── plan.md # Task list with checkboxes
408
+ ├── state.json # Machine-readable state
409
+ ├── progress.md # Progress summary
410
+ ├── context.md # Accumulated learnings
411
+ └── logs/
412
+ └── run-{timestamp}.txt # Full log (kept on success)
413
+ ```
414
+
415
+ ## Exit Codes
416
+
417
+ - **0 (Success)**: All tasks completed, criteria met. State cleaned up, logs preserved.
418
+ - **1 (Blocked)**: Task cannot proceed, needs human intervention or error occurred.
419
+ - **2 (Interrupted)**: User pressed Ctrl+C, state preserved for resume.
420
+
421
+ ## Development
422
+
423
+ ### Testing
424
+
425
+ ```bash
426
+ pytest # Run all tests
427
+ pytest -v # Verbose output
428
+ pytest -k "test_name" # Run specific tests
429
+ ```
430
+
431
+ ### Linting & Formatting
432
+
433
+ ```bash
434
+ ruff check . # Lint
435
+ ruff format . # Format
436
+ mypy . # Type check
437
+ ```
438
+
439
+ ## License
440
+
441
+ MIT