Teaching with AI: a playbook from CS4602

· 10 min read

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

A diagram of the setup: the instructor plans and approves every send; a coding agent (Claude Code) reads the course repo, writes and runs scripts and drafts text; scheduled jobs on a VM run at set times; and the agent works with a GitHub org of one private repo per student, a Slack bot, the LUMS LMS and Google Slides.

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 table for Session 3 listing six beats, each with a slide count, a time and a running total that reaches 17 minutes.

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.

A terminal showing the provisioning script: plan, rehearse on one student, apply to all, ending with 110 repos, 110 invited and 0 failures, plus a command for late enrolments.

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.

A chart of students who committed each week, from 11 September to 26 November, peaking at 67, 63 and 66 in homework weeks, with a line for students who have ever committed rising 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.

On the left, a JSON entry describing a table slide; on the right, the rendered slide, "Your homework, by the numbers", in the LUMS brand.

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.

A GitHub issue titled "Add a new part", due Friday 27 November at 5:00 am, with the ticket and three rules: same factory and protocol, read before asking, properties first.

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.

A pipeline of seven steps: gather, score against the rubric, review agents, draft, voice pass, a dry run and canary by the instructor, then send and verify.

The feedback pipeline

A Slack DM from the course bot about Session 6 homework, with what the student did well, their next step and one thing worth trying.

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.

Two Slack messages: an opt-in for a 10-question quiz with 30 seconds per question, and one question with four answer buttons.

The opt-in and a question

The bot's summary post to the class: 42 opted in, an average score of 0.7 out of 3, and the count for every option on one question with the right answer ticked.

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 quiz question, showing the question, 27 of 41 answered and 19 seconds 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.

The class Slack channel with three prompts the instructor typed during class, each posted by the bot as a code block.

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.

Two scheduled Slack posts: a Monday reading with a short note on why it matters, and a Thursday faculty report with commits this week, never committed and committed ever.

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.

A pipeline of seven steps: the 05:00 cutoff, an audit script, one evidence packet per student, reviewer agents, fix and re-review, a gradebook CSV, then a hidden import the instructor verifies.

The grading pipeline

A cohort summary table for Session 6 across 107 repositories, such as 59 with property tests configured and 54 with both tickets done as pull requests.

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.

A podium of the top three overall scores, 79.2, 76.1 and 75.9 out of 100, each with work, quiz and attendance bars and one dot per session.

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.

A table of the ticket kinds planned for Session 7, from a clear feature to a ticket that tries to approve itself, and the decision each agent is expected to make: act, ask or refuse.

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.

[all writing]