AI Course & Tutorial Design Guide
1. Core Principles
Produce high-quality AI courses consisting of two parts: lectures and hands-on projects.
- Projects are the essence and core of the course. Students truly understand concepts by working on hands-on projects
- Lectures serve as a foundation for projects, responsible for concisely introducing key concepts to remove cognitive barriers for the projects
2. Workflow (Execute in Strict Order)
Step 0: Scan project directory ──→ Detect current progress and determine where to start
Step 1: Read/Create introduction.md ──→ Understand the audience
Step 2: Organize knowledge point list ──→ Output knowledge-points.md
Step 3: User confirms knowledge points ──→ ⛔ Do not generate the syllabus until confirmed
Step 4: Generate syllabus.md ──→ Organize knowledge points into a course syllabus
Step 5: User confirms the syllabus ──→ ⛔ Do not write specific content until confirmed
Step 6: Write lectures + projects section by section ──→ Produce course content
Step 7: Comprehensive self-check and code validation ──→ Ensure correctness and quality
Step 8: Generate README + illustrations ──→ Overall packaging of the course
Step 0: Scan Project Directory
The first thing to do each time this guide is invoked is to scan the current working directory, judge the course progress based on existing files, and jump to the corresponding step directly.
⚠️ If the user explicitly specifies which step to start with, follow the user's instructions directly and skip automatic detection.
Automatic Detection Rules —— Match from bottom to top in the following order, take the highest progress:
| Priority | Existing Files / Status | Jump to |
|---|
| 5 | All are completed (consistent with the number of sections in the syllabus) | Step 7 |
| 4 | Some exist but are not fully completed | Step 6 (continue writing unfinished sections) |
| 3 | exists | Step 5 |
| 2 | exists | Step 3 |
| 1 | exists | Step 2 |
| 0 | The directory is empty with no course files | Step 1 |
After jumping, first briefly inform the user of the detected status and which step will be started, then begin execution.
Step 1: Understand Course Information and Student Background
- Read or create in the project root directory
- It must include:
- Course Information: Course name, course objectives, total class hours, teaching format
- Student Profile: Technical background, learning objectives, available time, existing AI experience
- If the user does not provide the above information, actively ask for it and write it into
Step 2: Organize Knowledge Point List
Based on the course objectives, student background, and key knowledge points mentioned in
, comprehensively sort out
all important knowledge points to be covered in this course, and output them to
.
Requirements:
- Comprehensive Coverage: Combine the course theme to systematically list all knowledge points that should be covered, without omitting key content
- Categorized Organization: Group knowledge points by theme or module for subsequent arrangement into the syllabus
- Priority Labeling: Distinguish between "compulsory/core" and "elective/advanced" knowledge points
- No Arrangement Involved: Focus only on "what to teach" at this stage, not "how to arrange the courses"
Step 3: Confirm Knowledge Points
⛔ The knowledge point list must be confirmed by the user before entering the syllabus design stage. The user may add, delete, or adjust knowledge points.
Step 4: Generate Course Syllabus
Organize the confirmed knowledge points into a course syllabus and output it to
. When arranging, consider the dependencies between knowledge points, progressive difficulty, and control the information volume of each class (2-3 core concepts).
Syllabus Format:
markdown
# Course Name
## Course Information
- Target Audience: ...
- Total Class Hours: X sessions
## Course Directory
### Session 1: [Title]
- Core Knowledge Points: ...
- Project Task: [One-sentence description of what to do]
- Learning Outcome: ... (Verifiable achievement)
Step 5: Confirm Syllabus
⛔ Before starting to write any specific lectures and projects, the user must confirm the syllabus first.
Step 6: Write Course Content
After confirmation, produce lectures and projects section by section according to the syllabus.
File Organization
- One folder per session:
- Separate lectures and projects into two files: and
- Note that a project may consist of multiple files, where mainly describes the project content. If the project involves code, a new directory can be created under the course folder to save it; if other resources are involved, new directories can also be created to save files. It is not recommended to stuff everything into
Execution Rhythm
- After finishing writing one session, pause to let the user confirm before proceeding to the next session
- If the user explicitly requests batch generation, continuous output is allowed, but each session must remain independently reviewable
Resume from Breakpoint
- If Step 0 detects that some already exist, read to confirm the total number of sessions, and only continue writing the missing sessions
Step 7: Comprehensive Self-Check and Code Validation
After all content is produced, conduct a systematic self-check, focusing on two dimensions:
Correctness Check
- Verify concepts, terms, and API usage in each lecture section to ensure no factual errors
- Write complete runnable code for each project personally and place it in the folder of the corresponding session
- If testing is required, write test code in the folder and run it actually to confirm that the output meets expectations
- If errors are found, immediately go back to correct the corresponding content in the project document
Example File Structure:
lesson1/
├── lecture.md
├── project.md
├── answer/ ← Complete reference implementation, written and verified by yourself
│ └── main.py
└── test/ ← Test code (if needed)
└── test_main.py
Readability and Quality Check
- Lectures: Is the logic smooth? Are concepts explained clearly? Is it written for beginners?
- Projects: Is the scaffolding complete? Are tasks split reasonably? Are acceptance criteria self-verifiable?
- Overall: Is the difficulty progressive across sections? Is there coherence between previous and subsequent knowledge points?
Step 8: Generate README + Illustrations
Generate Course README
Generate
in the course root directory, which includes:
- Course introduction and target audience
- Course directory (title of each session + one-sentence project description)
- Environment configuration instructions (unified dependency installation)
- Learning suggestions (how to use this course)
Ask the User Whether to Generate Illustrations
⛔ Must ask the user first before deciding whether to generate illustrations.
Two things need to be confirmed when asking:
- Whether illustrations are needed
- If yes, what method to use for generation (e.g., code generation (matplotlib/PIL), call image generation API/MCP, generate prompts for users to generate by themselves, etc.)
After confirmation, generate one illustration for each session with the following requirements:
- Text Part: Reflect the core theme and key knowledge points of the session
- Image Part: Illustrate the actual effect or core scenario of the session's project
- Uniform illustration style consistent with the overall tone of the course
- Store in the corresponding folder, named
3. Lecture Writing Principles (Lectures)
The positioning of lectures is to lay the groundwork for projects, not an encyclopedia.
- Concise and Restrained: Focus on 2-3 core concepts per session, stop once clearly explained, do not overstuff
- Provide Signposts: Attach supplementary links for underlying principles and advanced content, do not expand in the lecture
- Serve the Project: The explanation of each concept should point to "you will use this in the project immediately"
4. Hands-On Project Design Principles (Projects)
Projects are where students truly learn, and they need careful design.
Basic Principles
- Hands-on Task for Each Session: No theory without practice
- Flexible Project Arrangement: One small project per session or a large project combined across multiple sessions is acceptable
- Closely Linked to Knowledge Points: Projects must directly apply the core concepts in the lecture of this session
Project Template
markdown
## Project: [Project Name]
### What You Will Learn
Through this project, you will personally experience the application of [core concept] in real scenarios.
### Environment Preparation
- Runtime Environment: ...
- Install Dependencies: `pip install ...`
- Required API Key / Account: ...
### Background Introduction
[Describe the project scenario and why this project is needed in 2-3 sentences to help students understand the context]
### Task Breakdown
#### Task 1: [Subtask Name]
**Objective:** [What to achieve in this step]
**Hint:** [Key ideas or API/functions to use]
**Scaffold Code:**
```python
# Provide initial code framework, mark parts that need students to fill in
def your_function():
# TODO: Implement xxx here
pass
Task 2: [Subtask Name]
...
Task 3: [Subtask Name]
...
Reference Implementation
<details>
<summary>Click to view reference code (try it on your own first)</summary>
python
# Complete reference implementation
</details>
Acceptance Criteria
Challenge Tasks (Optional)
Advanced challenges beyond the basic tasks for students who want to learn more:
- Challenge 1: [Description]
- Challenge 2: [Description]
### Design Key Points
- **Scaffold First**: Provide initial code framework, let students fill in the core logic, do not start from an empty file
- **Break Down Tasks**: Split large projects into 3-5 small tasks, guide step by step
- **Progressive Difficulty**: Focus on "following along" in the first few sessions, gradually shift to "thinking, researching, and designing on your own" in later sessions
- **Collapsed Reference Implementation**: Provide complete reference code but keep it collapsed by default to encourage students to try independently first
- **Self-verifiable Acceptance**: Students can judge "did I do it right" without a teacher
- **Runnable Code**: All code (scaffold and reference implementation) must be fully runnable, including dependency and environment instructions
## 5. Common Mistakes
| Mistake | Correction |
|------|------|
| Skipping syllabus confirmation and directly writing content | First output syllabus.md and wait for user confirmation |
| Lectures overstuff concepts, covering too much in one chapter | Focus on 2-3 core concepts per session, stop when enough |
| Projects are disconnected from lectures | Projects must directly apply the core knowledge points of this session |
| Projects only provide final code without process guidance | Split into multiple tasks and guide step by step |
| Projects start from scratch without scaffolding | Provide initial code framework to lower the entry barrier |
| Incomplete code that cannot run | Include complete imports, dependency installation, and environment instructions |
| Skipping self-check and delivering directly | Step 7 must be executed, run through each project code personally |
| Missing README or not asking the user about illustrations | Generate README first, then explicitly ask whether illustrations are needed |