Task automation from markdown specs via Claude CLI
Project description
spec-runner
Task automation from markdown specs via Claude CLI. Execute tasks from a structured tasks.md file with automatic retries, code review, and Git integration.
Installation
pip install spec-runner
Or for development:
pip install -e ".[dev]"
Requirements:
- Python 3.10+
- Claude CLI (
claudecommand available) - Git (for branch management)
Quick Start
# Execute next ready task
spec-runner run
# Execute specific task
spec-runner run --task=TASK-001
# Execute all ready tasks
spec-runner run --all
# Create tasks interactively
spec-runner plan "add user authentication"
Usage as Library
from spec_runner import Task, ExecutorConfig, parse_tasks, get_next_tasks
from pathlib import Path
tasks = parse_tasks(Path("spec/tasks.md"))
ready = get_next_tasks(tasks)
for task in ready:
print(f"{task.id}: {task.name} ({task.priority})")
Features
- Task-based execution — reads tasks from
spec/tasks.mdwith priorities, checklists, and dependencies - Specification traceability — links tasks to requirements (REQ-XXX) and design (DESIGN-XXX)
- Automatic retries — configurable retry policy with error context passed to next attempt
- Code review — multi-agent review after task completion
- Git integration — automatic branch creation, commits, and merges
- Progress logging — timestamped progress file for monitoring
- Interactive planning — create tasks through dialogue with Claude
Task File Format
Tasks are defined in spec/tasks.md:
## Milestone 1: MVP
### TASK-001: Implement user login
🔴 P0 | ⬜ TODO | Est: 2d
**Checklist:**
- [ ] Create login endpoint
- [ ] Add JWT token generation
- [ ] Write unit tests
**Depends on:** —
**Blocks:** [TASK-002], [TASK-003]
CLI Commands
spec-runner
spec-runner run # Execute next ready task
spec-runner run --task=TASK-001 # Execute specific task
spec-runner run --all # Execute all ready tasks
spec-runner status # Show execution status
spec-runner retry TASK-001 # Retry failed task
spec-runner logs TASK-001 # View task logs
spec-runner reset # Reset state
spec-runner plan "feature" # Interactive task creation
spec-task
spec-task list # List all tasks
spec-task list --status=todo # Filter by status
spec-task show TASK-001 # Task details
spec-task start TASK-001 # Mark as in_progress
spec-task done TASK-001 # Mark as done
spec-task stats # Statistics
spec-task next # Show next ready tasks
spec-task graph # Dependency graph
Configuration
Configuration file: executor.config.yaml
executor:
max_retries: 3
task_timeout_minutes: 30
claude_command: "claude"
hooks:
pre_start:
create_git_branch: true
post_done:
run_tests: true
run_lint: true
auto_commit: true
run_review: true
commands:
test: "pytest tests/ -v"
lint: "ruff check ."
Project Structure
project/
├── pyproject.toml
├── executor.config.yaml
├── src/
│ └── spec_runner/
│ ├── __init__.py
│ ├── executor.py
│ └── task.py
└── spec/
├── tasks.md
├── requirements.md
├── design.md
└── prompts/
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spec_runner-0.1.0.tar.gz.
File metadata
- Download URL: spec_runner-0.1.0.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c02d7b42a60acaa48740977f82428bc7b6c9ac74bfe77ca393a99525eb412cc1
|
|
| MD5 |
3e65a3f22e7882320faec3b5aa5477e1
|
|
| BLAKE2b-256 |
187ef0df746ce8e8dfec7e8b5b05da77d797d69f176c26d4f5c7d74719269500
|
File details
Details for the file spec_runner-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spec_runner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0a945a2edc1f69ade2b12b58e170d00616180b39552ad7fe6a8785391f7dea1
|
|
| MD5 |
8a98b2d1c3e4927c191538a52ac9f4ec
|
|
| BLAKE2b-256 |
e3d91460ff95bf538cd023d5329540c78b10c43519ed897c38c9a0ff4299c6b9
|