This document describes how to bootstrap the development environment for this project.
- Python 3.12 or higher (from python.org, not Microsoft Store)
- Git for Windows
- PowerShell 7 (recommended) or Windows PowerShell
cd C:\dev\projects
git clone <repository-url> <project-folder>
cd <project-folder># Create virtual environment
py -m venv .venv
# Activate it
.\.venv\Scripts\Activate.ps1
# Alternative (without activation): Always use .\.venv\Scripts\python.exe directly# Using requirements-dev.txt
python -m pip install -r requirements-dev.txt
# Or install individually
python -m pip install ruff pytest# Check Python environment
python -c "import sys; print(sys.executable)"
# Run linting
python -m ruff check .
# Run tests
python -m pytest tests/Use the project's quality gate script:
.\scripts\check.ps1For fixing linting issues:
.\scripts\fix.ps1This project implements a structured Cline workflow:
- Branch per task:
git checkout -b feature/<name>orfix/<name> - Baseline check: Always run
.\scripts\check.ps1before Cline work - Plan Mode: Create numbered plan (max 10 steps) with affected files
- Act Mode: Implement one step at a time, run
.\scripts\check.ps1after each - Commit discipline: Small, logical commits with clear messages (
feat:,fix:,test:,chore:) - PR preparation: When green, create PR with motivation, changes, tests, risks
# Run all tests
.\.venv\Scripts\python.exe -m pytest tests/
# Run specific test file
.\.venv\Scripts\python.exe -m pytest tests/test_smoke.py
# Run with verbose output
.\.venv\Scripts\python.exe -m pytest tests/ -vpython-cline-template/
├── .venv/ # Python virtual environment (gitignored)
├── devproj/ # Main package
│ ├── __init__.py # Package metadata
│ └── main.py # Main module with add() and greet()
├── tests/ # Test suite
│ ├── test_greeting.py # Tests for greeting functionality
│ └── test_smoke.py # Smoke tests
├── pyproject.toml # Central tool configuration
├── requirements.txt # Runtime dependencies
├── requirements-dev.txt # Development dependencies
├── README.md # Project documentation
├── DEVELOPMENT.md # Project Contract (Cline rules)
└── BOOTSTRAP.md # This file
Disable App Execution Aliases:
- Windows Settings → Apps → App Execution Aliases
- Turn off
python.exeandpython3.exe
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserAlways use explicit path:
.\.venv\Scripts\python.exe -m pip --version
.\.venv\Scripts\python.exe -m pytest tests/This setup ensures reproducible development:
- Isolated environment:
.venv/per project - Version control: All configuration in
pyproject.toml - Quality gates: Consistent linting and testing
- Documentation: Clear bootstrap process
The project is now ready for development with VS Code, Cline, or any other Python IDE.