Skip to main content

SDLC automation platform - strategic project management with CI/CD integration and automated bug-fix loops

Project description

now:

img_1.png

before:

img.png

Planfile

Python Version License: Apache-2.0 PyPI version PyPI Downloads CI/CD Code Coverage Code Quality Functions Modules Code style: black Ruff MyPy Pydantic Docker Documentation GitHub Issues GitHub Pull Requests GitHub Stars GitHub Forks Last Commit Release Date Project Status

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • ๐Ÿค– LLM usage: $7.5000 (66 commits)
  • ๐Ÿ‘ค Human dev: ~$2635 (26.4h @ $100/h, 30min dedup)

Generated on 2026-04-16 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.

๐Ÿ“Š Project Metrics

  • 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)

โœจ Features

  • ๐ŸŽฏ 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
  • ๐Ÿ Python Library: Use planfile programmatically in your Python applications
  • ๐ŸŒ REST API: Run as FastAPI server for HTTP access and integrations
  • ๐ŸŽจ 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]


### 1. Create a Strategy

Create a `strategy.yaml` file:

```yaml
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

4. Using Python Library

from planfile import Planfile, quick_ticket

# Auto-discover .planfile/ in your project
pf = Planfile.auto_discover(".")

# Create tickets programmatically
ticket = pf.create_ticket(
    title="Fix authentication bug",
    description="Users cannot login with OAuth",
    priority="high",
    labels=["bug", "backend"]
)

# List and filter tickets
tickets = pf.list_tickets(sprint="current", status="open")

# Quick one-liner for tools
ticket = quick_ticket("Production alert", tool="monitoring", priority="critical")

Start the FastAPI server

uvicorn planfile.api.server:app --reload --port 8000

Use the API

curl "http://localhost:8000/tickets?sprint=current" curl -X POST "http://localhost:8000/tickets"
-H "Content-Type: application/json"
-d '{"title": "API fix", "priority": "high"}'


# 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-docker

๐Ÿ”„ CI/CD Automation

Planfile provides complete automation for the bug-fix lifecycle:

  1. Test Execution: Run your test suite
  2. Bug Detection: Identify failing tests and code issues
  3. AI Analysis: Generate detailed bug reports using LLM
  4. Ticket Creation: Create tickets in your PM system
  5. Auto-Fix: Optionally fix bugs automatically with AI
  6. Verification: Re-run tests to verify fixes
  7. Loop: Repeat until all tests pass

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


## ๐Ÿ“š Documentation

- [CI/CD Integration Guide](docs/CI_CD_INTEGRATION.md)
- [API Reference](docs/API.md)
- [CLI Reference](docs/CLI.md)
- [Examples](examples/)
- [Architecture Overview](docs/summaries/)
- [Migration Guide](MIGRATION_GUIDE.md)
- [Changelog](CHANGELOG.md)

### Strategy Schema (v2)

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

### Example Strategy (v2)

```yaml
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-5.4-mini"
          large: "gpt-4o"

quality_gates:
  - name: "Code Coverage"
    criteria: ["coverage >= 80%"]
    required: true

Backend Configuration

Each 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}

๐Ÿค– AI Integration

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-4o

๐Ÿ“š Examples

Explore 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


### Featured Examples

- **[checkbox-tickets](examples/checkbox-tickets/)** - Native markdown checkbox support (`- [ ]` / `- [x]`)
- **[code2llm](examples/code2llm/)** - Code analysis with LLM integration
- **[bash-generation](examples/bash-generation/)** - Generate bash scripts from strategies  
- **[cli-commands](examples/cli-commands/)** - CLI usage patterns
- **[advanced-usage](examples/advanced-usage/)** - CI/CD integration examples
- **[interactive-tests](examples/interactive-tests/)** - Interactive mode demonstrations
- **[ecosystem](examples/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.

Web Project Strategy

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: 3

Mobile App Strategy

name: "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

Version Control

  • GitHub: Issues, Projects, Actions
  • GitLab: Issues, CI/CD, Merge Requests
  • Bitbucket: Issues, Pipelines

Project Management

  • Jira: Issues, Epics, Sprints
  • Linear: Issues, Projects, Teams
  • ClickUp: Tasks, Lists, Spaces
  • Asana: Tasks, Projects, Portfolios

CI/CD Platforms

  • 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 linting

ruff check src/ tests/ ruff format src/ tests/


### Project Structure

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


## ๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.

## ๐Ÿค Contributing

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.

## ๐Ÿ“ž Support

- ๐Ÿ“– [Documentation](docs/)
- ๐Ÿ› [Issue Tracker](https://github.com/semcod/planfile/issues)
- ๐Ÿ’ฌ [Discussions](https://github.com/semcod/planfile/discussions)

## ๐Ÿ† Acknowledgments

- Built with [Typer](https://typer.tiangolo.com/) for CLI
- Styled with [Rich](https://rich.readthedocs.io/) for terminal output
- Validated with [Pydantic](https://pydantic-docs.helpmanual.io/) for data models

---

**Planfile** - Your strategic partner in SDLC automation. ๐Ÿš€

## License

Licensed under Apache-2.0.
## Status

_Last updated by [taskill](https://github.com/oqlos/taskill) at 2026-04-25 13:42 UTC_

| Metric | Value |
|---|---|
| HEAD | `f7a4f3c` |
| Coverage | โ€” |
| Failing tests | โ€” |
| Commits in last cycle | 50 |

> Introduces a configuration management system across goal, examples, and docs; refactors and extends the code analysis engine and test suite to improve coverage. Includes documentation fixes (markdown output), a fix for code quality metrics, and cleanup removing large generated files.

<!-- taskill:status:end -->

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

planfile-0.1.65.tar.gz (126.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

planfile-0.1.65-py3-none-any.whl (159.9 kB view details)

Uploaded Python 3

File details

Details for the file planfile-0.1.65.tar.gz.

File metadata

  • Download URL: planfile-0.1.65.tar.gz
  • Upload date:
  • Size: 126.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for planfile-0.1.65.tar.gz
Algorithm Hash digest
SHA256 8608510f79290626520143e1790464886e496e5c26307528ef215500ef0d5c2e
MD5 9e908c6d9cd6513d8e3ee38c1e106dff
BLAKE2b-256 59806be9acda92664f526e5d2b331cc92070b0f410a36b435a318413bf5c0601

See more details on using hashes here.

File details

Details for the file planfile-0.1.65-py3-none-any.whl.

File metadata

  • Download URL: planfile-0.1.65-py3-none-any.whl
  • Upload date:
  • Size: 159.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for planfile-0.1.65-py3-none-any.whl
Algorithm Hash digest
SHA256 9884a7a3101869ef5b2d94985767c0ce1534adc78f16b13144d1b9e20f80f908
MD5 a2ac15008831b93be65cf935d40327ae
BLAKE2b-256 bac5b44ed5ed3ff53a33720c83014333a5e550457032440fbb3e94858d2d2544

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page