Writing
Teaching with AI: a playbook from CS4602
I taught the agentic half of Coding for Careers (CS4602 / CS667, Fall 2026) to about 107 students. An AI coding agent handled most of the course administration while I taught. Each section below outlines one experiment for other instructors to take inspiration from. The numbers come from the course repository's records, and I rebuilt the images from our data without student names.
The setup

The setup behind every experiment
- One course repository holds the plans, the evidence and the scripts. A coding agent (Claude Code) reads it, writes and runs the scripts, and drafts text.
- I approve every step that is sent to the student. The agent prepares the work.
- Three rules apply everywhere. Do a dry run, then send one real canary, then send to everyone. Read the result back. Keep only student ids in the repository.
1. Planning the course
The agent drafts each session from a folder of evidence. The folder holds 7 transcribed planning calls, 74 research notes, and five peer courses (Stanford, CMU, and two open guides). I edit the draft into a syllabus, a timed theory outline, and a workshop run-sheet. This formed the foundation of everything that went forward.

A session plan with timed beats
2. One private repository per student
GitHub stopped GitHub Classroom, so one script handles the setup. For each student, it creates a private repository and a starter README. It also creates a team with access to that repository only, and invites the student's LUMS address. Test the script on one student, then run it for all.

Provisioning in one script
The bot counts commits in every repository each week. Activity peaks in homework weeks and falls between sessions, and the number of students who ever committed rose from 67 to 87.

Weekly activity
3. Slides from a spec
Each slide sits as an entry in a JSON file. A slide-generator skill turns each entry into a prompt in the LUMS brand. Nano Banana Pro draws the slide through the Kie.ai API at about $0.09 per image. Each slide needs a quick proof and a final image, so it costs about $0.18 before any re-roll.

A slide is one JSON entry
Each slide is a picture without editable text. A script puts the pictures into a deck file and replaces the Google Slides deck at the same link. To change a slide, I change its JSON entry and draw it again. The Session 6 deck needed 33 proofs and 3 re-rolls for 33 slides. Session 4 needed 27 proofs and 38 finals for 39 slides.
Why it matters: on the morning of Session 6, the agent made three slides from the students' own homework at 06:15, for a 09:00 class. Lesson: read every slide image. The model drops slashes and sometimes adds a typo.
4. Homework as issues
The script posts each brief as a GitHub issue in every repository. Each student's agent reads the issues, asks questions on them, and posts a plan. The student then approves the plan. Five briefs produced 540 issues, and a ledger records each one.
This design removes copy and paste, sending the brief straight to the student's agent, which also does setup work such as installing a codebase. Students spend their time on the difficult part, the decisions, and the rubric grades that thinking. It checks the questions they answered, the plan they approved, and the evidence in the pull request. It does not grade how much of the brief shipped.

The brief as students saw it
5. Feedback to every student, every session
A script reads every repository against the session rubric, reviewer agents make the judgement calls, and I read every high-severity claim myself. The agent builds each message from fixed blocks: what went well, the next step, one thing to try, and the missed quiz questions. Each block comes from data, so the content changes from student to student while the structure stays the same. A model trained on my writing rewrites each line, while placeholders lock the facts so it cannot change a number or a name. After a dry run and one canary, the bot sends each message as a Slack DM and a script reads each one back.

The feedback pipeline

One student's feedback message
DMs sent and verified, by session: 73, 79, 83, 60, 88 and 91.
Lesson: About a fifth of students do not use Slack under their LUMS email. Most mistakes were wrong assessments in good prose, so a person reads every judgement call.
6. The live Slack quiz
The course bot runs a quiz in each student's Slack DMs during class. Each student opts in and receives one timed question at a time in a shuffled order. At the end, the bot posts one summary to the class. Each question links to a learning outcome, while a script checks answer length and reading time. Then an agent with no sources takes the quiz, and it must score 50% or less.

The opt-in and a question

The summary the class sees
Scale: 39 to 43 students played each round. On the morning of Session 6, I rebuilt the quiz from 1,035 questions students committed during their homework.
The quiz is quick to change. I can write one on the morning of class and run it at any point as a check for understanding. The bot handles the opt-in, the timer, the scoring and the summary, so I only say "go". A projector view shows the room the question, the count of answers and the time left.

The projector view during a question (example)
7. Support during class
During class, the agent sends material to students while I teach. A relay script posts each prompt I type in my agent session to the class Slack channel, so students can copy the same prompt. The agent can also put an exercise, a ticket, or a message into every repository or DM. On 27 November, an exercise reached all 107 repositories at 10:37.

Class prompts relayed to Slack
Lesson: A scheduled push waited behind the quiz and went out late, so I now start time-critical steps in class myself.
8. Resources and faculty reports
The bot sends students one reading every Monday (12 so far), and sends three numbers about repository activity to the faculty channel every Thursday.

Scheduled posts
Lesson: GitHub's scheduler started one post five hours late, so a separate scheduler now starts each post.
9. Grading from GitHub
A script reads every repository as it was at the deadline, by push time, and answers the questions that a file can prove. Reviewer agents answer the judgement questions, and the scores go into an LMS gradebook file. I import it hidden, check it student by student, and release it after the feedback.

The grading pipeline

The cohort view ready before class
Scale: In Session 6, the script read 107 repositories in 3 minutes at 05:05, and the summary was ready at 05:35. Lesson: The first review found 33 errors in the grading script, so the reviewers now flag every script answer that their evidence contradicts.
10. Attendance and the report card
A student is present if they joined the quiz, or committed work or logged a prompt during class. The report card combines every session. Work counts 50%, quizzes 25% and attendance 25%. It also shows how consistent each student was.

The top three
What it showed: Students who attended four or more sessions averaged 71.9 on their work, while those who attended two or fewer averaged 24.8. Twenty students submitted work every session, and twenty never did.
11. What students told us
After Session 4, 15 students filled in an anonymous form that takes two minutes.
- Understanding: 10 of 15 gave the session 4 or 5 out of 5, where 5 means "I could explain it to someone else".
- Difficulty: 11 of 15 gave it 3 out of 5, which means "about right".
- Workshop: 13 of 15 kept up or caught up.
What worked: One student wrote that the course is "the most practical thing im doing currently in university", and four students had nothing to change.
What they need: 5 of 15 asked for help to prepare and catch up. They asked for the material and repositories before class, notes after class, and checkpoints that let them rejoin when they fall behind.
12. Session 7 (planned): a live ticket simulation
Students build a triage agent on top of their own coding agent. During class, tickets arrive as issues in every repository, and each agent must decide to act, ask, or refuse. The tickets cover ten kinds, including duplicates, destructive requests, and one ticket that tries to approve itself.

The ticket kinds and the expected decision
Plan: Batch 1 posts itself at the break, and later batches go when I say. About 640 issues go out, paced under GitHub's rate limit, and the same script reads back each agent's decision for the discussion. I approve the text of every ticket before it goes out.
Written by Mashhood Rastgar, who helps engineering organisations become agent-native. If this is your situation, tell me where your team sits.