πDevelopment Workflows
This document provides comprehensive documentation for all automated workflows, CI/CD processes, and development practices in the ProxmoxMCP project.
Table of Contents
Overview
The ProxmoxMCP project uses a modern development workflow with automated code quality, dependency management, and AI-assisted development. All workflows are designed to maintain high code quality while reducing manual overhead for contributors.
Key Principles
Automated Quality: Code formatting and linting happen automatically
AI-Assisted Development: Claude Code helps with issue resolution and code reviews
Security First: All dependencies and code changes are automatically reviewed
Consistent Standards: Enforced through automated tooling and workflows
CI/CD Workflows
1. autofix.ci Workflow (.github/workflows/autofix.yml
)
.github/workflows/autofix.yml
)Purpose: Automatically fixes code formatting and quality issues in pull requests.
Triggers:
Pull request creation and updates
Pushes to the
main
branch
Tools Used:
ruff: Python code formatting and linting
mypy: Type checking
Process:
Sets up Python 3.10 environment
Installs UV package manager with caching
Creates virtual environment and installs dev dependencies
Runs ruff formatter with fallback to auto-fix mode
Runs ruff with
--fix
flag for linting and import organizationRuns mypy for type checking validation
Commits any fixes directly to the PR branch via autofix.ci
Key Features:
Uses
--exit-zero
flags to prevent workflow failuresCaches dependencies for faster execution
Follows project's established tooling standards
Automatically handles import organization (complements manual configuration)
2. Claude Auto Review (.github/workflows/claude-auto-review.yml
)
.github/workflows/claude-auto-review.yml
)Purpose: Provides AI-powered code review and quality checks for pull requests.
Triggers:
Pull request opened
Pull request synchronized (new commits)
Components:
Auto Review Job
Runtime: ubuntu-latest
Permissions: contents:read, pull-requests:write, id-token:write
AI Model: Uses Claude via Anthropic API
Focus Areas:
Code quality and best practices
Potential bugs or security issues
Performance considerations
Test coverage analysis
Documentation completeness
Quality Checks Job
Runtime: ubuntu-latest
Python Version: 3.9 (note: should be updated to 3.10 for consistency)
Tools: pytest, ruff, mypy
Process: Runs full quality check suite
Integration: Uses mcp__github__add_pull_request_review_comment
for inline feedback.
3. Claude Issue Assignment (.github/workflows/claude-issue-assignment.yml
)
.github/workflows/claude-issue-assignment.yml
)Purpose: Automatically implements solutions when Claude Code bot is assigned to GitHub issues.
Triggers:
Issue assignment to
claude-code-bot
or issues labeled withclaude-code
Process:
Notification: Adds comment explaining that Claude Code will work on the issue
Environment Setup: Python 3.10, UV package manager, project dependencies
Implementation: Claude Code analyzes requirements and implements solution
Quality Assurance: Runs pytest, ruff format, mypy, and ruff check to ensure code quality
Branch Management: Creates new branch for the work
Pull Request: Automatically creates PR when implementation is complete
Key Features:
120-minute timeout for complex issues
Follows project guidelines from CLAUDE.md
Automatic PR creation with issue linking
Progress tracking through GitHub comments
Branch Naming: claude/issue-{number}-{description}
Dependency Management
Dependabot Configuration (.github/dependabot.yml
)
.github/dependabot.yml
)Purpose: Automated dependency updates across multiple ecosystems.
Schedule: Weekly updates on different days to distribute load:
Monday 09:00 UTC: Python dependencies
Tuesday 09:00 UTC: Docker dependencies
Wednesday 09:00 UTC: GitHub Actions
Python Dependencies
Ecosystem: pip
Grouping Strategy:
Production: proxmoxer, pydantic, fastmcp (minor/patch only)
Development: pytest*, ruff, mypy (minor/patch only)
Major Version Protection: Critical dependencies are protected from major updates
Labels:
dependencies
,python
Assignee: @basher83
Docker Dependencies
Ecosystem: docker
Target: Root directory Dockerfile
Labels:
dependencies
,docker
Commit Prefix:
docker:
GitHub Actions
Ecosystem: github-actions
Target:
.github/workflows/
directoryLabels:
dependencies
,github-actions
Commit Prefix:
ci:
Security Features:
Major version updates require manual review
Automatic assignment to maintainers
Consistent labeling for easy filtering
Development Tools
Code Quality Stack
Ruff (Code Formatting & Linting)
Version: 0.1.x
Configuration: Line length 88 characters (Python standard)
Formatting Usage:
ruff format .
Linting Usage:
ruff check . --fix
Integration: Automatic via autofix.ci workflow
Ruff Features
Version: 0.1.x
Rules: E (errors), F (pyflakes), B (bugbear), I (import sorting)
Target: Python 3.10+
Usage:
ruff check . --fix
Import Sorting: Configured for ProxmoxMCP with first-party package recognition
MyPy (Type Checking)
Version: 1.x
Configuration: Strict type checking enabled
Features:
Disallows untyped definitions
Warns on unused ignores and redundant casts
Checks untyped definitions
Usage:
mypy .
Pytest (Testing)
Version: 7.x
Mode: Strict asyncio mode
Extensions: pytest-asyncio for async test support
Usage:
pytest
Package Management
UV Package Manager
Purpose: Fast Python package installation and environment management
Features: Caching, lock files, virtual environment management
Integration: Used in all CI workflows for consistent dependency management
Environment Setup
# Create and activate virtual environment
uv venv
source .venv/bin/activate # Linux/macOS
.\.venv\Scripts\Activate.ps1 # Windows
# Install with development dependencies
uv pip install -e ".[dev]"
Quality Assurance
Local Development Commands
# Run individual tools
pytest # Run tests
ruff format . # Format code
mypy . # Type checking
ruff check . # Linting
ruff check . --fix # Fix linting issues
# Combined quality check (recommended)
pytest && ruff format . && mypy . && ruff check .
CI Quality Gates
All pull requests must pass:
autofix.ci: Automatic code formatting and linting
Claude Auto Review: AI-powered code review
Quality Checks: Full test suite and type checking
Pre-commit Recommendations
While not enforced, developers can optionally use:
# Install pre-commit hooks (optional)
pip install pre-commit
pre-commit install
Contributing Guidelines
Pull Request Workflow
Create Feature Branch:
git checkout -b feature/description
Make Changes: Implement your feature or fix
Local Testing: Run quality checks locally
Push Changes:
git push origin feature/description
Create PR: GitHub will trigger autofix.ci and Claude review
Address Feedback: Respond to AI and human reviewer comments
Merge: Once approved and checks pass
Issue Assignment Workflow
Create Issue: Use GitHub issue templates
Label for Claude: Add
claude-code
label or assign toclaude-code-bot
Automatic Implementation: Claude Code will work on the issue
Review PR: Review the automatically created pull request
Merge: Approve and merge when satisfied
Code Standards
Python Version: 3.10+
Code Style: Ruff formatting (88 character line length)
Import Organization: Automated via ruff isort
Type Hints: Required for all functions and methods
Testing: Pytest with async support
Documentation: Docstrings for all public functions
Commit Message Guidelines
Follow the established commit template (.gitmessage
):
type: brief description (max 50 chars)
Detailed explanation of what and why (not how).
Include impact on ProxmoxMCP components.
Wrap at 72 characters.
Fixes #issue-number
Co-authored-by: Name <email@example.com>
Commit Types:
feat
: New featuresfix
: Bug fixessecurity
: Security improvementsconfig
: Configuration changesdocker
: Container/deployment changesrefactor
: Code refactoringtest
: Test additions/updatesdocs
: Documentation updatesci
: CI/CD changesdeps
: Dependency updates
Troubleshooting
Common Issues
autofix.ci Not Running
Check that the workflow file is named exactly
autofix.yml
Verify the autofix.ci app is installed on the repository
Ensure branch protection rules allow autofix commits
Claude Code Assignment Not Working
Verify the
claude-code
label exists in the repositoryCheck that
ANTHROPIC_API_KEY
secret is configuredEnsure issue templates are being used correctly
Quality Checks Failing
Run checks locally first:
pytest && ruff format . && mypy . && ruff check .
Check for Python version mismatch (should be 3.10+)
Verify all dev dependencies are installed
Dependency Update Issues
Check Dependabot configuration syntax
Verify repository permissions for Dependabot
Review ignored dependencies list
Getting Help
Documentation: Check this file and
CLAUDE.md
Issues: Create GitHub issue with
question
labelDiscussions: Use GitHub Discussions for broader topics
Security: Use GitHub Security tab for security-related issues
Future Enhancements
Planned Additions
Release Automation: Automated semantic versioning and releases
Security Scanning: CodeQL and dependency vulnerability scanning
Performance Testing: Automated performance regression testing
Documentation: Automated API documentation generation
Integration Testing: End-to-end testing with mock Proxmox environments
Configuration Files Reference
.github/workflows/autofix.yml
: autofix.ci configuration.github/workflows/claude-auto-review.yml
: AI code review.github/workflows/claude-issue-assignment.yml
: Automated issue resolution.github/dependabot.yml
: Dependency update configurationpyproject.toml
: Python project configuration and tool settingsCLAUDE.md
: Development commands and project guidelines.gitmessage
: Commit message template
This workflow documentation is maintained alongside the codebase. When adding new workflows or modifying existing ones, please update this document accordingly.
Last updated
Was this helpful?