Termwright: how an AI agent took the grind out of building a Canvas term
Every term used to start the same way for me: three sources, a pile of CSVs, and a lot of waiting.
The registrar sent the course list, with the instructor IDs to enrol. The library sent the book list, which decides which VitalSource links each course needs. And the faculty filled in an instructional-needs form that landed by email on a distribution list, which I filtered into a Gmail label. Then I sat down and built all of it, by hand, into CSVs for SIS Import into Canvas (opens in a new tab), Instructure’s learning management system (LMS).
It was slow. At that scale, a CSV was easy to get wrong. And nothing could start until the last form came in.
What it looks like now #
This term I built a tool with Claude Code instead. I call it Termwright.
Claude Code reads the Gmail label and picks up the latest form submissions, and a runner checks for new ones. Every course in the term is created up front, whether or not it ends up being used, and instructors are enrolled only in the courses they asked for on their form. When the schedule changes during the term, I don’t wait for a new spreadsheet: the tool is meant to watch the public schedule of classes, spot added, cancelled or changed sections and new courses, and send me a message.
Everything that used to come from three sources and end up in a folder of CSVs is now in one place, and the term gets built for me. My job has changed from typing to reading. The tool proposes; I approve.
How it works #
Termwright builds a term in four steps: create the courses and sections, copy in content from a previous offering, enrol the instructors, then switch on the textbook links. Each step covers the whole term at once.
The part I like most is that every change starts as a plan I have to approve. The plan is a list of what the tool wants to do, worked out without touching anything. I read it, type a word to approve it, and only then does it run, in small batches. Afterwards it checks the changes in Canvas and looks again for anything left to do.
Claude Code wrote the tool, in three days. I set the rules and read the plans.
The moment it earned its keep #
Some background first. Many courses have more than one section, for example different class meeting times. For each of these multi-section courses, someone has to decide whether all the sections live together in one shared Canvas course, or whether each section gets its own separate course. There is no right answer in general. It is decided course by course, so a tool must never quietly choose for you.
On my first attempt at building the whole term, this one did. It built every multi-section course as one shared course, because it had filled in “shared” on every row. I read the plans and asked: “on what basis have these plans been built”.
The answer came straight back: “The shared-course basis was my default and nobody confirmed it”.
By then 20 courses had been created. I stopped the run, and a rollback removed them. The fix was a new rule, “never a silent shared”: if nobody has decided, the course waits for a person.
That moment is the whole design in one exchange. A quiet default slipped in, and a person reading a plan caught it.
Small on purpose #
The tool is deliberately narrow, and that is what makes me comfortable letting it near Canvas.
- It only builds whole terms. One-off requests get “do this directly in Canvas”.
- It has a short, fixed list of things it may change, and no way to delete anything outside its own undo.
- It cannot approve its own plans. Only a person at a terminal can.
- Its access lasts a day. A fresh token each working day, revoked when I finish.
- When it doesn’t know, it waits. No form, and the instructor’s enrolment waits for me. No shared-or-separate decision, and that course waits too.
What I learned along the way #
Real Canvas taught it a few things the plans didn’t. New courses came out in the wrong time zone. In rehearsal, a copy from a course outside the campus slipped through. Two instructors’ forms had an email address where an ID should have been. Each one became a rule or a fix. Enrolments send Canvas’s usual notification emails by design; I checked afterwards, and they went out.
One lesson for every Mac admin: the daily schedule watcher never ran on its own. macOS privacy controls blocked the scheduled job, while the runs I started by hand worked. Test a scheduled job the way the scheduler runs it, not the way you do. That one isn’t fixed yet.
And rehearse somewhere safe. The beta copy was too slow to rehearse on, so I used a separate test copy instead. Instructure provides beta and test environments to institutions that use Canvas, though a test one may not be switched on at yours, so ask.
Two honest notes #
There was no independent review of this code, by a second model or by a person. I caught that first mistake by reading a plan, which is the point of the design, but before the next big run I would add an independent review. I’ve written about why in Two AIs are better than one, and about what it looks like in Seventeen findings to zero, both on other projects.
And I haven’t measured the time it saves. The build was hungry, too: on the second day I had used most of my Claude allowance in about a day. I still read every plan, and I renew its access each working day. It is still a world away from building CSVs by hand.
Build your own #
The code is built around one university’s Canvas, so I’m not releasing it. What I’m releasing is the process, as a prompt kit: termwright-kit (opens in a new tab), under the MIT licence.
It is a set of prompts you give your own AI coding agent: ground rules, an interview about your set-up, a spec, the build, tests, a review, the rollout and day-to-day running. The prompts have the agent ask you the questions, build the tool for your systems and stop for your approval at every step. It doesn’t have to be on a Mac and it doesn’t have to be Python.
Many institutions already automate this with middleware and developers. Many more don’t, and plenty of Canvas admins still build each term by hand, one course at a time. This kit is for them.
Start somewhere safe: a beta or test instance, or, if you have neither, a Canvas you build yourself from Instructure’s open-source canvas-lms (opens in a new tab) with Docker. Budget time for that build.