an ai coding unit for middle school
Updated
A strong middle school AI coding unit runs about six weeks: how AI works, prompting as a specification, build-test-iterate, reading the AI's code, ethics and privacy, then a showcase. Launch, an AI coding platform for kids ages 5 and up, gives grades 6–8 real code, a teacher dashboard, and a free start with no credit card.
Why a unit, not a one-off lesson
A single AI lesson shows students that an AI can write code. A unit teaches them to direct it: to say exactly what they want, check whether they got it, and explain what the code does. Those habits take repetition, and grades 6–8 are a good age for it, because students can write a clear spec, test on a real user and handle a project that lasts a few weeks.
The outline below assumes two or three class periods a week. Each week has one big idea, one build activity and one thing students hand in, so you always have evidence of learning, not just a finished app.
Weeks 1–3: understand, specify, build
Week 1, what AI is and isn't. Start unplugged: students sort everyday tools into "uses AI" and "doesn't," then discuss how an AI that writes code produces an answer and why it can be confidently wrong. If you want a framework for this week, the AI4K12 initiative, sponsored by AAAI and CSTA, organizes AI literacy into Five Big Ideas: Perception, Representation & Reasoning, Learning, Natural Interaction, and Societal Impact. Hand-in: a one-paragraph explanation, in the student's own words, of what happens when you give an AI an instruction.
Week 2, prompting as specification. Treat a prompt like an engineering spec. Students write a spec for a small game or tool: who it is for, what it does, the rules, how you win or finish, and one constraint. Pairs swap specs and mark every place the reader had to guess. Hand-in: a revised spec with the guesses removed.
Week 3, build, test, iterate. Students build from their spec on Launch, where the AI builds in real HTML, CSS, JavaScript and React. A classmate tests it while the builder watches without helping and logs where the tester got stuck. Students then rewrite the prompt to fix one problem at a time. Hand-in: a change log with each prompt, what changed, and whether it fixed the problem.
Weeks 4–6: read the code, weigh the impact, show it
Week 4, reading the AI's code. On each build, the AI on Launch first says what it is about to make or change and explains one coding idea in words that fit the student's age. Use that as a starting point, then have students find the code behind one behavior, such as the variable that sets speed or the function that adds to the score. They predict what a change would do, ask the AI for exactly that change, and check the prediction. Hand-in: an annotated screenshot or printout explaining three parts of their own code.
Week 5, ethics and privacy. Discuss who an app could help or harm, what personal information an app should never ask for, and what it means to share work publicly. Connect it to the tools in the room: COPPA sets requirements for online services directed to children under 13, and FERPA protects the privacy of student education records. Hand-in: a short "privacy and fairness review" of their own project. Week 6, showcase: students finish, polish and present, explaining one problem they hit and how they solved it.
How to assess it
Grade the thinking, not just the app. A simple four-part rubric works: the spec (clear, specific, testable), the testing (real user, real notes, problems named), the iteration (each prompt change tied to a problem, with evidence it worked), and the explanation (the student can say what parts of the code do and why the AI built it that way).
The weekly hand-ins give you most of the evidence. Add a short exit ticket after weeks 1, 4 and 5, and use the showcase as the summative piece: a two-minute demo plus one question from the audience that the student answers without the AI.
Where Launch fits
Launch is built for kids ages 5 and up, and every kid gets the same real workspace, with the AI pitching its explanations to their age. For a middle school unit, that means students describe what they want, and the AI builds it with real code they can read. It runs in a web browser on a laptop, Chromebook, desktop or iPad, with nothing to install.
Teachers get a dashboard to manage students and track their progress, and every kid account is linked to the teacher who manages it, who can see and open the kid's projects. Launch is built around COPPA and FERPA: kids' stored names, and any email addresses, are replaced before their code and messages reach the coding AI, kids' typed messages are scrubbed for personal details like phone numbers, and there is no chat between kids. For the showcase, a project can be published to a shareable link after it clears a review for personal details and content unsuitable for kids.
Teachers can start for free with no credit card. School plans are billed per organization and include the teacher dashboard.
Adapting the unit
Short on time? Compress it to three weeks: weeks 1 and 2 together, week 3, then weeks 4–6 as one week of reading code, a privacy review and a short showcase. Have more time? Make week 6 a project for the school, like a quiz game for a younger class or a tracker for a school recycling drive, so students test with real users outside their own class.
Teaching younger grades too? Launch's free K–5 lesson plan uses the same plan, test and rewrite loop over 3–5 class periods, with a printable Prompt Blueprint and tester table.
questions parents and teachers ask
- How long should a middle school AI coding unit be?
- About six weeks at two or three periods a week covers AI basics, prompting as a spec, build-test-iterate, reading code, ethics and privacy, and a showcase. It also compresses to three weeks.
- Do students need coding experience?
- No. On Launch there is no setup and no prerequisites. Students start by describing an idea in their own words, and the unit builds the habits of specifying, testing and reading code from there.
- Is Launch aligned to CSTA or AI4K12 standards?
- Launch does not claim alignment to those standards. The AI4K12 Five Big Ideas are a useful public framework for planning the AI literacy part of a unit, and you can map your own lessons to them.
- How do I grade an AI coding project?
- Grade the spec, the testing, the iteration and the student's explanation of the code, not only whether the app works. Weekly hand-ins like a change log and annotated code give you the evidence.
- Is Launch built for student privacy?
- Yes. Launch is built around COPPA and FERPA. Kids' stored names, and any email addresses, are replaced before their code and messages reach the coding AI, there is no chat between kids, and there are no ads, data sales or tracking.
try it with launch
Launch is the AI coding platform where kids ages 5 and up describe what they want to make and build it with real code, alongside an AI set up for kids.
sources
- AI4K12: Five Big Ideas in AI (checked )
- FTC: Children's Online Privacy Protection Rule (COPPA) (checked )
- U.S. Department of Education: FERPA (checked )
- Launch: Free K–5 AI lesson plan for teachers (checked )