Exploring how Python developers can integrate AI tools into their workflow while maintaining engineering discipline, with practical frameworks and examples.
AI-First Software Delivery: Balancing Innovation with Proven Python Development Practices
The Python ecosystem is rapidly evolving with the integration of AI tools into the development workflow. As Wes Reisz, Technical Principal at Thoughtworks, explains in his recent presentation at QCon AI, "AI-first software delivery is not a one-size-fits-all solution." This approach requires careful consideration of code longevity, automated verification, and maintaining engineering discipline even as we leverage AI capabilities.
Understanding the AI-First Approach for Python Development
When working with Python, the temptation is to jump into fully autonomous AI-driven development. However, Reisz's experience shows that a more nuanced approach is often necessary. "On the team that I'm working on now, we're specifically focused on supervised coding agents," he explains. "Why? Because three months ago, I put this team together. We came to a client to solve a particular problem. We know very little about the domain."
For Python developers, this means starting with supervised AI assistance—using tools like Claude Sonnet 4.5 with Cursor or similar IDEs that integrate AI—while building domain knowledge. As the team gains experience, they can gradually move toward more unsupervised approaches.
The Two-by-Two Model for AI-Assisted Python Development
Reisz presents a helpful two-by-two model to determine the appropriate approach for AI-assisted Python development:
- Y-axis: Code Longevity - How long will the Python code remain in production or be maintained?
- X-axis: Degree of Automated Verification - Can you verify the Python code being generated?
This model helps Python teams decide when to use different AI approaches:
Exploratory Development (Bottom Left):
- Short-lived Python scripts for quick experiments
- Human-centric approach where the developer leads
- Perfect for prototyping Python libraries or testing new approaches
- Example: Using an LLM to generate a quick script to analyze data or test an API
Domain Sensing (Bottom Right):
- Using deep research agents to understand Python codebases
- High degree of automated verification
- Helpful when joining a new Python project or working with legacy code
- Example: Using AI to analyze a large Python monorepo and identify patterns
Supervised Coding Agents (Top Left):
- Long-lived Python code facing customers
- Limited automated verification due to new domain knowledge
- Developer pairs with AI to generate and review Python code
- Example: Building a new Python microservice with AI assistance
Unsupervised Coding Agents (Top Right):
- Long-lived Python production code
- High degree of automated verification
- AI works more autonomously with minimal human oversight
- Example: Automated refactoring of well-understood Python modules
RIPER-5: A Framework for AI-Assisted Python Development
For Python teams adopting AI-first development, Reisz introduces the RIPER-5 framework: Research, Innovate, Plan, Execute, and Review. This structured approach helps maintain engineering discipline while leveraging AI capabilities.
Implementing RIPER-5 in Python Projects
Research Phase:
- Use AI to gather context about the Python codebase
- Ask clarifying questions about requirements
- For Python projects, this might involve analyzing existing code patterns, dependencies, and architecture
- Set clear boundaries: "Your goal is to gather context right now, read files, but don't code."
Innovate Phase:
- Generate multiple implementation options for the Python feature
- Evaluate trade-offs between different approaches
- Example: For a new Python API endpoint, consider different frameworks (FastAPI, Flask, Django)
- Set boundaries: "Give me three options. How might I go about implementing this?"
Plan Phase:
- Break down Python development tasks into manageable pieces
- Create specifications that serve as contracts between developer and AI
- For Python projects, this might involve setting up virtual environments, defining package dependencies, and outlining test cases
- Set boundaries: "Forbidden to implement code at this stage"
Execute Phase:
- Generate Python code based on the plan
- For Python development, this might involve creating modules, classes, functions, and tests
- Set boundaries: "Forbidden to deviate from the plan"
Review Phase:
- Validate generated Python code against specifications
- Check for drift from the original plan
- Ensure Python code follows team conventions and best practices
- Set boundaries: "Forbidden from skipping checks"
Practical Example: Implementing an MCP Server in Python
Reisz provides a concrete example of implementing a Model Context Protocol (MCP) server in Python using the RIPER-5 framework. This example demonstrates how the approach works in practice.
The Project
The goal was to create an MCP server that could retrieve information about QCon conference talks and answer questions about them. This involved:
- Setting up a Python project with appropriate dependencies
- Creating an MCP server implementation
- Adding endpoints for retrieving conference information
- Implementing testing and documentation
Applying RIPER-5 to the Python Project
Research Phase:
- Analyzed existing MCP server implementations in Python
- Studied the QCon API structure
- Determined necessary dependencies and project structure
Innovate Phase:
- Explored different approaches to implementing the MCP server
- Considered various Python web frameworks (FastAPI, Flask)
- Selected the approach that best fit the project requirements
Plan Phase:
- Created a detailed specification in Markdown format
- Broke down the implementation into tasks:
- Project setup and virtual environment
- API configuration
- MCP server implementation
- Testing infrastructure
- Documentation
Execute Phase:
- Implemented the Python MCP server following the plan
- Generated approximately 5-6 Python files with about 50 lines each
- Created tests and documentation
Review Phase:
- Validated the implementation against the original specification
- Ensured Python code followed best practices
- Confirmed all requirements were met
Key Insight: The 10:1 Ratio of Planning to Code
Reisz notes an important observation: "It's about 10 to 1 on the amount of things that were specification and planning versus the amount of code that's generated." This highlights that AI-assisted Python development isn't about generating code quickly—it's about thoughtful planning and specification.
For Python developers, this means investing time in clear requirements, architecture decisions, and test specifications before generating code. The AI then becomes a tool for implementing well-thought-out plans rather than a magic code generator.
Maintaining Engineering Discipline in AI-Assisted Python Development
As Reisz emphasizes, "AI doesn't replace engineering discipline, it amplifies your practices. If you have bad underlying foundations, AI will absolutely amplify those. If you have good ones, it'll amplify those as well."
Essential Practices for Python Teams
For Python teams adopting AI-first development, these practices remain crucial:
Pair Programming:
- "The LLM is your pair. No, the LLM generates output based on the average of what it's trained on."
- Human reviewers catch issues that AI might miss
- Particularly important for Python code that needs to maintain quality standards
Continuous Integration:
- Automated testing of Python code
- Ensures AI-generated code integrates well with existing codebase
- Tools like GitHub Actions, GitLab CI, or Jenkins remain essential
Trunk-Based Development:
- Regular small commits to main branch
- Reduces integration issues with AI-generated Python code
- Maintains code quality through frequent feedback
Test-Driven Development:
- Writing tests before generating Python code
- Ensures AI-generated code meets requirements
- Particularly important for critical Python modules
Python-Specific Tools and Approaches
When implementing AI-first Python development, several tools and approaches can enhance the process:
IDE Integration
Modern Python IDEs are increasingly incorporating AI capabilities:
- Cursor: Provides AI-powered code completion and generation with RIPER-5 integration
- Windsurf: Another IDE with AI assistance capabilities
- VS Code with Python extensions: Various AI-powered extensions available
Python-Specific AI Tools
Several tools cater specifically to Python development:
- Claude Code: AI assistant specifically for Python development
- Python-specific LLM fine-tunes: Models trained on Python codebases
- Static analysis tools: Tools like pylint, flake8, and mypy remain crucial for validating AI-generated Python code
Package Management and Dependencies
AI can assist with Python package management:
- Generating requirements.txt or pyproject.toml files
- Identifying appropriate dependencies for Python projects
- Suggesting updates to existing dependencies
The Future of AI-First Python Development
As Python teams gain experience with AI-assisted development, they can gradually move along the continuum from supervised to unsupervised approaches:
- Initial Phase: Supervised agents with human oversight for critical Python components
- Intermediate Phase: Mix of supervised and unsupervised agents, with AI handling routine tasks
- Advanced Phase: Unsupervised agents handling well-understood Python modules, with humans focusing on complex features
For Python developers, this means starting with structured approaches like RIPER-5 while building domain knowledge, then gradually increasing autonomy as the team becomes more comfortable with the tools and processes.
Conclusion
AI-first software delivery for Python development isn't about replacing developers with AI—it's about enhancing human capabilities with AI tools while maintaining engineering discipline. As Reisz demonstrates, the key is to choose the right approach based on code longevity and verification capabilities, use structured frameworks like RIPER-5 to maintain quality, and never lose sight of essential engineering practices.
For Python teams, this means starting with supervised AI assistance while building domain knowledge, gradually increasing autonomy as expertise grows, and always maintaining focus on code quality, testing, and maintainability. The future of Python development isn't human versus AI—it's human augmented by AI, with thoughtful processes guiding the way.
For more information on AI-first software delivery approaches, check out the original presentation on the QCon AI website and explore resources on AI-assisted development from Thoughtworks.

Comments
Please log in or register to join the discussion