now:
before:
- π€ LLM usage: $7.5000 (53 commits)
- π€ Human dev: ~$1681 (16.8h @ $100/h, 30min dedup)
Generated on 2026-03-29 using openrouter/qwen/qwen3-coder-next
Planfile is an SDLC automation platform that provides strategic project management with CI/CD integration and automated bug-fix loops. It manages sprints and strategies across external ticket systems like GitHub, Jira, and GitLab.
- 56 modules with 395 functions
- Cyclomatic Complexity: CCΜ=4.1 (improved from 4.2)
- Critical functions: 15 (target: β€4)
- Zero circular dependencies
- Languages: Python (53), Shell (17), JavaScript (3)
- π― Strategy Modeling: Define strategies and sprints in YAML with task patterns
- π Automated CI/CD Loop: Test β Ticket β Fix β Retest automation
- π Multi-Backend Support: Integrates with GitHub Issues, Jira, GitLab, and generic HTTP APIs
- π€ LLM-Powered: AI-driven bug reports and auto-fix capabilities
- π Progress Tracking: Review strategy execution with detailed metrics
- π CLI Tool: Easy-to-use command-line interface for applying and reviewing strategies
- π¨ Rich Output: Beautiful terminal output with progress bars and tables
- π³ Docker Support: Containerized deployment with Ollama integration
- π§ Extensible: Easy to add new backends and custom integrations
- π Code Analysis: Integration with external tools (code2llm, vallm, redup)
- π MCP Server: Model Context Protocol server integration
- π€ LLX Integration: Advanced code analysis and model selection
- π Proxy Routing: Smart model routing via Proxym API
- π Metrics-Driven: Project metrics analysis for informed planning
# Basic installation
pip install planfile
# With all backend integrations
pip install planfile[all]
# Or with specific backends
pip install planfile[github,jira]
pip install planfile[gitlab]Create a strategy.yaml file:
name: "My Project Strategy"
project_type: "web"
domain: "fintech"
goal: "Launch a secure payment processing platform"
sprints:
- id: 1
name: "Core Infrastructure"
length_days: 14
objectives:
- Set up project structure
- Implement authentication
tasks:
- type: "feature"
title: "Setup project structure"
description: "Create basic project layout and configuration"
estimate: 2
priority: "high"
- id: 2
name: "Payment Processing"
length_days: 21
objectives:
- Implement payment gateway
- Add security measures
tasks:
- type: "feature"
title: "Payment gateway integration"
description: "Integrate with payment provider API"
estimate: 5
priority: "critical"# GitHub
export GITHUB_TOKEN=your_token
export GITHUB_REPO=owner/repo
# Jira
export JIRA_URL=https://company.atlassian.net
export JIRA_EMAIL=your@email.com
export JIRA_TOKEN=your_token
export JIRA_PROJECT=PROJ
# GitLab
export GITLAB_TOKEN=your_token
export GITLAB_PROJECT_ID=123# Run automated bug-fix loop
planfile auto loop \
--strategy ./strategy.yaml \
--project . \
--backend github \
--max-iterations 5 \
--auto-fix
# Check CI status
planfile auto ci-status
# Review strategy progress
planfile strategy review \
--strategy ./strategy.yaml \
--project . \
--backend github# Run CI loop with strategy
make ci-loop STRATEGY=strategy.yaml BACKENDS=github MAX_ITERATIONS=5
# Run examples
make example-github
make example-jira
# Full pipeline
make pipeline-dockerPlanfile provides complete automation for the bug-fix lifecycle:
- Test Execution: Run your test suite
- Bug Detection: Identify failing tests and code issues
- AI Analysis: Generate detailed bug reports using LLM
- Ticket Creation: Create tickets in your PM system
- Auto-Fix: Optionally fix bugs automatically with AI
- Verification: Re-run tests to verify fixes
- Loop: Repeat until all tests pass
# Build Docker image
make docker-build
# Run with Docker Compose
docker-compose up -d
# Run auto-loop in container
docker-compose exec sprintstrat-runner planfile auto loop \
--strategy /app/strategy.yaml \
--project /workspace \
--backend github \
--max-iterations 5- CI/CD Integration Guide
- API Reference
- CLI Reference
- Examples
- Architecture Overview
- Migration Guide
- Changelog
The strategy.yaml file supports:
- Sprints: Time-boxed development periods with embedded tasks
- Goals: Project objectives with success criteria
- Quality Gates: Definition of done criteria
- Model Hints: AI model suggestions for different phases
name: "My Project Strategy"
project_type: "web"
domain: "fintech"
goal:
title: "Launch secure payment platform"
description: "Build and deploy a secure payment processing system"
success_metrics:
- "99.9% uptime"
- "<100ms response time"
sprints:
- id: 1
name: "Core Infrastructure"
length_days: 14
objectives: ["Set up project structure", "Implement authentication"]
tasks:
- type: "feature"
title: "Setup project structure"
description: "Create basic project layout and configuration"
estimate: 2
priority: "high"
model_hints:
small: "gpt-4o-mini"
large: "gpt-4o"
quality_gates:
- name: "Code Coverage"
criteria: ["coverage >= 80%"]
required: trueEach backend requires specific configuration:
# GitHub backend
github:
token: ${GITHUB_TOKEN}
repo: ${GITHUB_REPO}
# Jira backend
jira:
url: ${JIRA_URL}
email: ${JIRA_EMAIL}
token: ${JIRA_TOKEN}
project: ${JIRA_PROJECT}Planfile integrates with multiple LLM services:
- Multiple Providers: OpenAI, Anthropic, LiteLLM, Local LLMs
- Smart Routing: Automatic model selection via Proxym proxy
- Code Analysis: LLX integration for advanced metrics
- Auto-Fix: Automatic code generation for bug fixes
- Strategy Generation: AI-powered strategy creation
# Enable AI features
export OPENAI_API_KEY=your_key
export ANTHROPIC_API_KEY=your_key
export PROXY_API_URL=http://localhost:9999
# Run with auto-fix
planfile auto loop --strategy strategy.yaml --auto-fix
# Generate strategy with AI
planfile strategy generate ./my-project --model gpt-4oExplore the examples/ directory for comprehensive use cases:
# List all available examples
planfile examples list
# Run a specific example
planfile examples run code2llm
# Run all examples (with timeout protection)
planfile examples run --all- checkbox-tickets - Native markdown checkbox support (
- [ ]/- [x]) - code2llm - Code analysis with LLM integration
- bash-generation - Generate bash scripts from strategies
- cli-commands - CLI usage patterns
- advanced-usage - CI/CD integration examples
- interactive-tests - Interactive mode demonstrations
- ecosystem - MCP, LLX, and proxy routing integrations
# examples/quick-start.yaml
name: "Quick Start Demo"
project_type: "web"
domain: "demo"
goal: "Demonstrate planfile capabilities"
sprints:
- id: 1
name: "Setup"
length_days: 7
tasks:
- type: "feature"
title: "Initialize project"
description: "Create basic project structure"
estimate: 1
priority: "high"For more examples, see the examples directory.
name: "E-commerce MVP"
project_type: "web"
domain: "ecommerce"
goal: "Launch minimum viable e-commerce platform"
sprints:
- id: 1
name: "Foundation"
length_days: 10
tasks:
- type: "feature"
title: "Setup project structure"
estimate: 1
- type: "feature"
title: "Database schema"
estimate: 3name: "Mobile App MVP"
project_type: "mobile"
domain: "healthcare"
goal: "Launch health tracking mobile app"
sprints:
- id: 1
name: "Core Features"
length_days: 14
tasks:
- type: "feature"
title: "User authentication"
estimate: 3
- type: "feature"
title: "Health data tracking"
estimate: 5- GitHub: Issues, Projects, Actions
- GitLab: Issues, CI/CD, Merge Requests
- Bitbucket: Issues, Pipelines
- Jira: Issues, Epics, Sprints
- Linear: Issues, Projects, Teams
- ClickUp: Tasks, Lists, Spaces
- Asana: Tasks, Projects, Portfolios
- GitHub Actions: Workflow automation
- GitLab CI: Pipeline integration
- Jenkins: Build automation
- Azure DevOps: Release management
# Clone repository
git clone https://github.com/semcod/planfile
cd strategy
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Run linting
ruff check src/ tests/
ruff format src/ tests/planfile/
βββ planfile/ # Main package
β βββ analysis/ # Code analysis components
β β βββ external_tools.py # External tool integrations
β β βββ generator.py # Strategy generation
β β βββ file_analyzer.py # File analysis
β β βββ sprint_generator.py # Sprint generation
β β βββ parsers/ # YAML/JSON/Toon parsers
β β βββ generators/ # Metrics extractors
β βββ cli/ # CLI commands
β β βββ cmd/ # Core commands (init, generate, apply, etc.)
β β βββ auto_loop.py # CI/CD automation
β β βββ extra_commands.py # Additional utilities
β βββ integrations/ # Backend integrations
β β βββ github.py # GitHub Issues
β β βββ jira.py # Jira
β β βββ gitlab.py # GitLab
β β βββ generic.py # Generic HTTP API
β βββ llm/ # LLM integrations
β β βββ adapters.py # Multiple LLM adapters
β β βββ client.py # LLM client
β β βββ generator.py # Strategy generation
β βββ loaders/ # Data loaders
β β βββ yaml_loader.py # YAML loading/saving
β β βββ cli_loader.py # JSON/Markdown export
β βββ models.py # Core data models
β βββ models_v2.py # Simplified models
β βββ runner.py # Strategy execution
β βββ ci_runner.py # CI/CD automation
β βββ executor_standalone.py # Standalone executor
βββ examples/ # Usage examples
β βββ quick-start/ # Basic examples
β βββ ecosystem/ # Integration examples
β βββ advanced-usage/ # Advanced features
βββ tests/ # Test suite
βββ docs/ # Documentation
βββ project/ # Project analysis output
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- π Documentation
- π Issue Tracker
- π¬ Discussions
- Built with Typer for CLI
- Styled with Rich for terminal output
- Validated with Pydantic for data models
Planfile - Your strategic partner in SDLC automation. π
Licensed under Apache-2.0.
Tom Sapletta

