Writing code with AI
The forms AI coding tools take and what each suits; how to use a project instructions file so it understands your project; and a dependable workflow: set acceptance criteria first, change things in small steps, and judge whether it's done by tests rather than by the AI's own account.
Lessons
- 01The forms AI coding tools take
Completion, chat, in-editor agents and command-line agents are roughly the four kinds of AI coding tool. What each does, what tasks it suits, and how to control which parts of your computer an agent can touch.
30 minutes · Beginner - 02Helping AI understand your project: context and rules files
AI coding tools start from zero every time, with no idea how your tests run or what the house rules are. What files like AGENTS.md and CLAUDE.md should and shouldn't contain, and why they can't replace real limits.
35 minutes · Beginner - 03A dependable AI coding workflow
Write the acceptance criteria and tests first, then let the AI get to work, and judge whether it's done by the test results rather than the AI's own account. We run the process on a real small task, then cover how to review AI-written code and when not to use AI.
40 minutes · Intermediate
In the previous modules you've been building AI applications. This module takes a different angle: using AI to help you write code.
AI coding tools change very fast; today's popular products and features may look different in six months. So this module doesn't teach every button of a particular product. It covers what still holds when you switch tools: the forms these tools take, how to give them your project's background, and how to judge whether they got it right. Wherever specific products come up, they're described as of September 2026, and the official documentation takes precedence.
This module echoes much of what came before: an AI coding tool is itself an agent (Module 05), a rules file is context engineering (Module 05, Lesson 5), and "accept it by testing" is evaluation (Module 06). By now you should be able to see what these tools are doing, not just how to use them.
You're done when
- You can say what kinds of task completion, chat, in-editor agents and command-line agents each suit.
- You can write a short, specific, checkable project instructions file for your own project, and know it can't replace permission limits.
- Before making a change, you can write acceptance criteria (ideally tests), and afterwards judge whether it's done by the test results rather than the AI's own account.
- You can say what to focus on when reviewing AI-written code, and when not to use AI.
Code for this module
Code and program output are shown exactly as they ran, so comments and printed output are in Chinese.