Welcome to this course! In previous courses, you learned to make individual changes to existing projects—one file at a time, or structural reorganizations. You focused on writing clear prompts for each change.
Now, you'll learn to build complete features that require coordination across multiple files working together. This is how production-ready features are built.
Suppose you want to add a created_at timestamp to your Task model in a Django app. This lesson demonstrates how to use Codex to build a complete, production-ready feature by giving clear, practical prompts. The focus is on communicating with Codex to coordinate changes across multiple files and steps. While Django is used as an example, these techniques apply to any multi-file project or framework.
When adding a new feature, start by asking Codex to outline the necessary changes. This helps you see the big picture and ensures you don’t miss any steps.
Codex responds with a plan, listing which files and components will be affected (for example: models, views, templates, migrations). Review Codex’s plan and adjust it if needed before proceeding. This step uses Codex as your project navigator.
Codex works best with clear, targeted instructions. Instead of vague requests, specify the file, the location, and the exact change you want.
If you’re not sure about the file or location, ask Codex to help you find it first:
Codex generates the code and often explains its reasoning. This approach works for any language or framework—always tell Codex exactly where and what to change.
After making a change, prompt Codex for what to do next, or ask it to explain the impact of a change. This keeps your workflow moving and helps you understand the process.
Codex responds with the necessary commands or steps (like running migrations, restarting services, or updating dependencies), and can explain why each step is needed.
For features that touch multiple files, keep prompting Codex for each part. For example, after updating a model, move to the view, then the template, then tests. Each time, be explicit:
You can also ask Codex to generate or update tests as part of the workflow:
Codex will generate the code for each file and explain any framework-specific details (like formatting or ordering).
Codex can help you verify your changes and debug issues. Ask it how to test a new feature, or what to do if you hit an error.
If you encounter a problem, describe it directly:
Codex will suggest solutions, explain error messages, or walk you through fixes.
- Be specific: Always mention file names, function names, and the exact change.
- Work step by step: Use Codex to plan, then implement, then test.
- Ask for explanations: If you’re unsure, have Codex explain its reasoning or the impact of a change.
- Iterate: If Codex’s answer isn’t quite right, clarify your prompt or ask for a revision.
- Summarize progress: Occasionally ask Codex to recap what’s been changed so far to keep track.
In this lesson, you learned how to use Codex to build complete features by coordinating changes across multiple files. You discovered how to plan features by asking Codex to outline necessary changes, use precise file-specific prompts for each component, ask for next steps and explanations to keep the workflow moving, guide Codex through multi-file features step by step, and use Codex for testing and troubleshooting. You also learned effective prompting strategies for complete features: being specific, working step by step, asking for explanations, iterating, and summarizing progress.
Next, you'll get hands-on practice building complete features with the Django task tracker project. You'll add a created_at timestamp feature that requires changes across models, migrations, views, templates, and URLs—all working together to create a complete, working feature.
Move on to the practice exercises to start applying these techniques to real features!
