Created: 2025-12-14 Status: Implementation Complete (Phase 1) Related: ascii-guard reference implementation
This document assesses the gap between ascii-guard's modern Python development workflow and todo.ai's current setup. ascii-guard uses modern tooling (uv, pre-commit framework, GitHub Actions CI/CD) while todo.ai previously relied on manual scripts and traditional approaches. This assessment identifies gaps and provides a roadmap to achieve process parity.
Note: Phase 1 (Foundation) has been implemented. See implementation status in section 9.
This document assesses the gap between ascii-guard's modern Python development workflow and todo.ai's current setup. ascii-guard uses modern tooling (uv, pre-commit framework, GitHub Actions CI/CD) while todo.ai previously relied on manual scripts and traditional approaches. This assessment identifies gaps and provides a roadmap to achieve process parity.
Status: Phase 1 (Foundation) implementation is complete. The project now has modern CI/CD infrastructure matching ascii-guard's setup.
Current Implementation:
- Uses
uvas the primary package manager - Has
uv.lockfile for reproducible builds - One-step setup:
./setup.shcreates venv, installs deps, configures hooks - Fast dependency resolution and installation
- Zero-dependency Python 3.11+, minimal deps for 3.10
Key Features:
uv tool installfor global tool installationuv add --devfor development dependencies- Automatic lock file generation
- Fast, reliable dependency resolution
Current Implementation:
- Uses
.pre-commit-config.yamlfor hook configuration - Integrates with pre-commit framework (not custom scripts)
- Hooks run automatically on commit
- Can run manually:
pre-commit run --all-files - Supports local hooks and remote repositories
Typical Setup:
repos:
- repo: local
hooks:
- id: ruff
name: ruff
entry: ruff check
language: python
types: [python]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixerCurrent Implementation:
- GitHub Actions workflows in
.github/workflows/ - Automated testing on push/PR
- Multiple Python versions tested
- Automated releases
- Code coverage reporting
- Type checking (mypy)
- Linting (ruff)
Typical Workflow Structure:
- Test matrix across Python versions
- Lint and type check steps
- Test execution with coverage
- Artifact uploads
- Release automation
Current Implementation:
- pytest for test framework
- Comprehensive test coverage
- Test fixtures and helpers
- Integration and unit tests
- Coverage reporting (codecov)
Current Implementation:
- Automated version bumping
- GitHub Actions for release creation
- PyPI publishing automation
- Release notes generation
- Tag management
Current State:
pyproject.tomlexists with dependencies- No
uv.lockfile - missing lock file for reproducibility - No
uvintegration - uses traditional pip/venv - Manual dependency installation required
- No one-step setup script
Gap: Missing modern dependency management with uv
Current State:
- Custom shell script:
scripts/pre-commit-hook.sh - Manual installation via
scripts/setup-git-hooks.sh - Not using pre-commit framework
- Checks for Python tests but requires manual venv setup
- Checks for markdownlint, yamllint, jq but no automatic installation
Gap: Not using pre-commit framework, manual hook management
Current State:
- No GitHub Actions workflows -
.github/workflows/directory missing - No automated testing in CI
- No automated linting/type checking in CI
- No automated releases
- Manual release process via
release/release.sh
Gap: Complete absence of CI/CD automation
Current State:
- pytest configured in
pyproject.toml - Test files exist:
tests/unit/,tests/integration/,tests/e2e/ conftest.pywith fixtures- No automated test execution in CI
- Manual test execution only
Gap: Tests exist but not automated in CI
Current State:
- Manual release script:
release/release.sh - Manual PyPI publishing:
release/publish_pypi.sh - Requires manual execution
- No automated version bumping
- No automated GitHub release creation
Gap: Manual process, not automated
-
No CI/CD Pipeline
- Missing GitHub Actions workflows
- No automated testing on commits/PRs
- No automated linting/type checking
- No automated releases
-
No uv Integration
- Missing
uv.lockfile - No
uvusage for dependency management - No one-step setup script
- Manual dependency management
- Missing
-
Pre-commit Framework Not Used
- Custom shell script instead of framework
- Manual hook installation
- No automatic tool installation
- Inconsistent developer experience
-
No Development Dependencies in pyproject.toml
- Missing dev dependencies (pytest, ruff, mypy, etc.)
- Tools must be installed manually
- No standardized development environment
-
No Automated Release Process
- Manual release execution
- No automated version bumping
- No automated PyPI publishing
- No automated GitHub release creation
-
No Code Quality Automation
- No automated ruff/mypy in CI
- No coverage reporting
- No automated code quality checks
-
No Test Coverage Reporting
- No codecov integration
- No coverage badges
- No coverage thresholds
-
No Multi-Python Version Testing
- Only tests current Python version
- No matrix testing across Python versions
-
No Automated Documentation
- No automated doc generation
- No automated API docs
- Install
uv(if not present) - Create
uv.lockfile:uv lock - Update
pyproject.tomlwith dev dependencies - Create one-step setup script:
setup.sh - Document uv usage in README
Files to Create/Modify:
pyproject.toml- Add[project.optional-dependencies]for dev depsuv.lock- Generate viauv locksetup.sh- One-step setup scriptdocs/development/SETUP.md- Setup documentation
- Create
.pre-commit-config.yaml - Configure hooks: ruff, mypy, trailing-whitespace, end-of-file-fixer
- Remove custom
scripts/pre-commit-hook.sh(or keep as fallback) - Update
scripts/setup-git-hooks.shto use pre-commit - Document migration
Files to Create/Modify:
.pre-commit-config.yaml- New pre-commit configscripts/setup-git-hooks.sh- Update to use pre-commitdocs/development/CONTRIBUTING.md- Update setup instructions
- Create
.github/workflows/ci.ymlfor continuous integration - Create
.github/workflows/release.ymlfor automated releases - Configure test matrix (Python 3.8-3.12)
- Add linting and type checking steps
- Add test execution with coverage
Files to Create:
.github/workflows/ci.yml- CI workflow.github/workflows/release.yml- Release workflow.github/workflows/test.yml- Test workflow (optional, can be in ci.yml)
- Add to
pyproject.toml:[project.optional-dependencies] dev = [ "pytest>=7.0.0", "pytest-cov>=4.0.0", "ruff>=0.1.0", "mypy>=1.0.0", "pre-commit>=3.0.0", ]
- Add
[tool.ruff]section topyproject.toml - Add
[tool.mypy]section topyproject.toml - Add
[tool.pytest.ini_options](already exists, enhance) - Configure coverage settings
Files to Modify:
pyproject.toml- Add tool configurations
- Enhance
release/release.shor create GitHub Actions workflow - Automate version bumping
- Automate PyPI publishing
- Automate GitHub release creation
- Add release notes generation
Files to Create/Modify:
.github/workflows/release.yml- Automated release workflowrelease/release.sh- Enhance or replace with workflow
- Add codecov integration
- Add coverage badges to README
- Set coverage thresholds
- Expand test matrix to all supported Python versions
- Test on multiple OS (Ubuntu, macOS, Windows)
- Automated API documentation generation
- Automated example updates
# Install uv (if not present)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create lock file
uv lock
# Install dependencies
uv syncrepos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
additional_dependencies: [types-all]
- repo: local
hooks:
- id: pytest
name: pytest
entry: uv run pytest
language: system
types: [python]
pass_filenames: false
always_run: true.github/workflows/ci.yml:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- name: Install dependencies
run: uv sync
- name: Run tests
run: uv run pytest
- name: Run linting
run: uv run ruff check .
- name: Run type checking
run: uv run mypy todo_ai#!/bin/bash
set -e
echo "🚀 Setting up todo.ai development environment..."
# Install uv if not present
if ! command -v uv &> /dev/null; then
echo "📦 Installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
# Sync dependencies
echo "📦 Installing dependencies..."
uv sync
# Install pre-commit hooks
echo "🔧 Installing pre-commit hooks..."
uv run pre-commit install
echo "✅ Setup complete!"- ✅
uv.lockfile exists and is committed - ✅
.pre-commit-config.yamlexists and hooks work - ✅ GitHub Actions CI runs on every push/PR
- ✅ Tests pass in CI
- ✅ Linting and type checking run in CI
- ✅ Dev dependencies in
pyproject.toml - ✅ Code quality tools configured
- ✅ Automated releases work
- ✅ PyPI publishing automated
- ✅ Code coverage reporting active
- ✅ Multi-Python version testing
- ✅ Documentation automation
- Developers must install
uv(or use provided setup script) - Pre-commit hooks will run automatically (can be skipped with
--no-verify) - CI will block PRs if tests/linting fail
- Existing manual processes can remain as fallback
- Shell script hooks can be kept for reference
- Manual release process can coexist with automated
- One-step setup:
./setup.sh - Consistent environment via
uv.lock - Automatic quality checks via pre-commit
- Fast feedback via CI
-
Phase 1 (Foundation): 4-6 hours - uv setup: 1 hour - Pre-commit migration: 2 hours - CI/CD setup: 2-3 hours
-
Phase 2 (Enhancement): 3-4 hours - Dev dependencies: 1 hour - Code quality config: 1 hour - Release automation: 2 hours
-
Phase 3 (Polish): 2-3 hours - Coverage setup: 1 hour - Multi-version testing: 1 hour - Documentation: 1 hour
Total: 9-13 hours for complete parity
Completed: 2025-12-14
All Phase 1 requirements have been implemented:
-
✅ 1.1 Add uv Dependency Management
uv.lockfile created and committedpyproject.tomlupdated with dev dependencies (including build, twine)setup.shscript created with correct PATH handling ($HOME/.local/bin)- Documentation created in
docs/development/SETUP.md
-
✅ 1.2 Migrate to Pre-commit Framework
.pre-commit-config.yamlcreated with ruff, mypy, and standard hooksscripts/setup-git-hooks.shupdated to use pre-commit framework- Hooks configured and tested
-
✅ 1.3 Create GitHub Actions CI/CD
.github/workflows/ci.ymlcreated (tests on Python 3.10, 3.11, 3.12).github/workflows/release.ymlcreated (automated PyPI publishing)- Both workflows use uv for dependency management
- ✅ 2.1 Add Development Dependencies - Complete (done in Phase 1)
- ✅ 2.2 Configure Code Quality Tools - Complete (ruff, mypy configured in Phase 1)
- ⏳ 2.3 Automated Release Process - Workflow created, needs integration with existing
release/release.sh
- ⏳ Code coverage reporting (codecov integration)
- ⏳ Multi-OS testing (macOS, Windows)
- ⏳ Documentation automation
- ✅ Phase 1 complete - CI/CD infrastructure in place
- Integrate automated release workflow with existing
release/release.shprocess - Add code coverage reporting (codecov integration)
- Expand test matrix to include macOS and Windows
- Consider Phase 3 enhancements as needed
- uv documentation
- pre-commit documentation
- GitHub Actions documentation
- ascii-guard repository (reference implementation)