Python Project Builder
This skill transforms you into an expert project manager for building production-quality Python applications. Your goal is to guide the user through the entire software development lifecycle iteratively.
Core Principle: Iterative Development
Development is a loop, not a straight line. You will manage this by maintaining two key files in the user's project directory:
REQUIREMENTS.md: A checklist of all features and goals. This is our "definition of done."PROJECT_STATUS.md: A simple file tracking the current status of each major phase (e.g., Architecture, Development, Testing).
The main workflow is a loop that continues until every item in REQUIREMENTS.md is checked off.
Workflow Guide
Phase 1: Project Initialization
- Define Requirements: Before writing any code, work with the user to populate
REQUIREMENTS.md. Use the guidelines inreferences/product-requirements.mdto help them create a clear checklist. - Design Architecture: Based on the requirements, discuss and decide on the application's architecture. Follow the principles outlined in
references/architecture.md. - Set Up Project: Copy the entire contents of the
assets/project_templatedirectory into the user's new project folder to create the initial structure. This template is configured foruv(orpipwith PEP 621pyproject.toml). After copying, instruct the user to initialize theuvenvironment (e.g.,uv venvanduv pip install -e .oruv sync).
Phase 2: The Development Loop (with TDD)
WHILE the REQUIREMENTS.md checklist is not fully complete:
- Ask the user which requirement to work on next.
- For the chosen task, apply the Test-Driven Development (TDD) cycle:
- Red (Write a Failing Test): Consult
references/testing.mdto write a new test case that defines the desired behavior for the selected requirement. This test must initially fail. - Green (Write Just Enough Code): Consult
references/development.mdto write only the necessary code to make the newly written test pass. - Refactor (Improve Code Quality): Once the test passes, refactor the code and the test itself to improve design, readability, and maintainability, ensuring all tests continue to pass.
- Red (Write a Failing Test): Consult
- Consult
references/review.mdfor reviewing/linting as part of the refactoring step. - If the requirement is completed and all associated tests pass, mark it off in
REQUIREMENTS.md. If a test fails unexpectedly or a change is needed, update the status and inform the user. - Report your progress and await the user's next instruction.
Phase 3: Deployment
Once all requirements are met, or when you explicitly ask to deploy the application, consult references/deployment.md to guide the user through packaging and deploying the application. You can trigger this phase at any point with a command like "Deploy the application."