AI pair programming becomes much more valuable when it goes beyond asking an AI assistant to generate an entire application from a single prompt. A better approach is to treat AI as a development partner that works alongside you throughout the engineering process, from understanding requirements and planning the solution to implementation, testing, refactoring, and documentation.
That's the approach explored in this AI Pair Programming with IBM Bob tutorial. Instead of relying on one-shot code generation, the tutorial demonstrates a structured workflow for building a FastAPI To-Do API while keeping the developer involved in important decisions and validation.
Start with Requirements, Not Code
Before generating anything, the workflow begins by defining what the application should actually do. Clear requirements give Bob the context needed to understand the intended functionality instead of making assumptions about the solution.
This is an important shift in AI-assisted development. The goal isn't to write the longest prompt possible. The goal is to give the AI enough relevant context to understand the problem and expected outcome.
Plan Before You Implement
Once the requirements are established, Plan mode can be used to turn them into a structured implementation approach.
This gives the developer an opportunity to review the proposed direction before code is generated. Missing requirements, assumptions, or architectural decisions can be identified and refined while they are still part of the plan rather than after they have become implementation.
AI makes implementation faster, but that makes good planning even more valuable.
Move from Plan to Working Code
After reviewing the plan, Agent mode can help translate that plan into an implementation.
In the tutorial, this process is used to build the FastAPI application. But generated code isn't treated as the final result. The developer remains part of the loop by reviewing the implementation and validating whether the application matches the original requirements.
The workflow looks like this:
Developer defines intent
↓
Bob creates a plan
↓
Developer reviews decisions
↓
Bob implements
↓
Developer and Bob validate
That's much closer to pair programming than simply asking an AI tool to "build this for me."
Keep the Context Focused
Another important lesson from the tutorial is context management.
Long AI conversations can accumulate requirements, experiments, failed approaches, code snippets, and unrelated information. Eventually, all of that context can begin influencing later work.
Using fresh context windows for focused stages of development helps keep the implementation aligned with the current objective.
For larger projects, this becomes increasingly important. Good AI pair programming isn't only about providing more context. It's about providing the right context at the right time.
Refactor Instead of Stopping at "It Works"
Getting an application to run is only one stage of software engineering.
Once the initial implementation is working, IBM Bob can assist with reviewing and refactoring the code to improve its structure and overall quality.
AI-generated code shouldn't automatically be considered finished simply because it executes successfully. Just like human-written software, it should be reviewed, improved, tested, and validated before being treated as complete.
Generate Tests and Validate the Application
Testing becomes another part of the collaborative workflow.
The tutorial demonstrates using Bob to generate unit tests and validate application behavior. Rather than separating testing from implementation, testing becomes part of the same development cycle.
The workflow therefore evolves naturally from generation into verification:
Generate → Review → Refactor → Test → Validate
This helps shift AI-assisted development away from pure code generation and toward complete engineering outcomes.
Document What You Built
Documentation is frequently postponed until the end of a project or skipped entirely.
With an AI pair-programming workflow, documentation can become part of the development process itself. After the implementation stabilizes, Bob can help create technical documentation based on the completed work.
That means future developers receive more than a repository full of code. They also gain context around what was built and how the application is structured.
Take the Application to Docker
The tutorial completes the journey by building and running the application with Docker.
This demonstrates that AI pair programming doesn't need to end when the source code has been generated. The workflow can continue through testing, documentation, packaging, and running the application.
The Complete AI Pair-Programming Workflow
Requirements
↓
Plan
↓
Review
↓
Generate Code
↓
Validate
↓
Refactor
↓
Test
↓
Document
What I like about this workflow is its structure.
The developer doesn't disappear from the process, and Bob isn't treated as a one-click code generator. Instead, both contribute differently. The developer provides requirements, intent, judgment, feedback, and validation, while Bob helps accelerate the implementation-heavy parts of the process.
That's ultimately what makes AI pair programming different from simple AI code generation.
The most effective workflow isn't necessarily the one that generates the most code from the fewest prompts. It's the one that helps you move from an idea to a well-planned, reviewed, tested, and documented implementation while staying in control of the engineering decisions.
Learn More
📖 Follow the complete tutorial:
AI Pair Programming with IBM Bob
⤵️ Use IBM Bob for free and explore the workflow yourself:
Get started with IBM Bob
Top comments (0)