OpenCode Capstone Project
Introduction: Building a Complete Project
Welcome to the final lesson of the Foundation course. Over the previous units, you have learned how to install OpenCode, manage sessions, configure the agent's behavior, and leverage its autonomous capabilities. Now it is time to combine everything into a realistic development workflow.
In this lesson, we will take an incomplete todo list application and transform it into polished, production-ready software. You will plan improvements, implement features, refactor messy code, add new modules, and write documentation — all through natural conversation with your AI assistant.
Setting Up Your Workspace
Before we begin coding, we need to ensure OpenCode starts in the correct directory. The agent is context-aware, meaning it automatically reads the file structure of whatever folder you launch it from. Starting in an empty directory means the agent knows nothing about your project. Starting inside your project folder gives it immediate access to your codebase.
Navigate to your project and launch OpenCode:
Once the interface loads, the agent can already see files like app.py, tasks.py, and config.py. You do not need to manually tell it about your project structure — it discovers this automatically.
Planning Before Building
When facing a complex task, rushing to write code often leads to poor decisions. Instead, we will start by switching to the Plan agent to create a strategy. The Plan agent analyzes your code and proposes solutions without modifying any files, giving you a chance to review the approach before committing to it.
Press Tab to switch from Build mode to Plan mode. You will see the status bar change to reflect this. Then ask the agent to review your codebase:
The agent reads your files and produces a structured implementation plan:
This plan becomes your roadmap. You can ask clarifying questions, request adjustments, or approve it as-is before moving forward.
