Uploaded September 2026 | Updated November 2026, 2 hours ago
In this episode I start building Common Cartridge import support for Tsugi.
I already have a working Common Cartridge export path, so now the problem flips around: how should Tsugi import a cartridge without accidentally duplicating content every time the same package is imported again?
That immediately turns into a data-modeling problem.
Before writing code, I work through questions like:
How do we record that a page, file, quiz, or other object came from a Common Cartridge?
How do we detect a true duplicate?
What happens if an imported object is edited locally and the original cartridge is imported again?
Should Common Cartridge provenance live in the main Tsugi content tables, or in separate import-history tables?
How much of the original cartridge metadata should be preserved for debugging and future reconciliation?
The key design choice is to keep import provenance separate from the live content model rather than polluting every core table with Common Cartridge-specific columns.
Once that model starts to settle down, Cursor begins building the schema and service layer, along with unit tests for duplicate detection and cartridge parsing.
Later in the session, I feed it a real Canvas Common Cartridge export and we start seeing the first actual imports appear: files, lessons, links, and quizzes. The first pass isn't perfect — the quiz itself imports correctly, but one of the lesson links is rendered with the wrong course context — which gives us the next bug to fix.
By the end, this is starting to look like a real minimum viable Common Cartridge importer.
The broader theme of the episode is the workflow I keep coming back to when coding with AI:
brainstorm the problem → design the data model → build services → build tests → build UI → iterate.
The closer you get the data model to correct at the beginning, the less code you have to tear apart later.
In this episode I start building Common Cartridge import support for Tsugi.
I already have a working Common Cartridge export path, so now the problem flips around: how should Tsugi import a cartridge without accidentally duplicating content every time the same package is imported again?
That immediately turns into a data-modeling problem.
Before writing code, I work through questions like:
How do we record that a page, file, quiz, or other object came from a Common Cartridge?
How do we detect a true duplicate?
What happens if an imported object is edited locally and the original cartridge is imported again?
Should Common Cartridge provenance live in the main Tsugi content tables, or in separate import-history tables?
How much of the original cartridge metadata should be preserved for debugging and future reconciliation?
The key design choice is to keep import provenance separate from the live content model rather than polluting every core table with Common Cartridge-specific columns.
Once that model starts to settle down, Cursor begins building the schema and service layer, along with unit tests for duplicate detection and cartridge parsing.
Later in the session, I feed it a real Canvas Common Cartridge export and we start seeing the first actual imports appear: files, lessons, links, and quizzes. The first pass isn't perfect — the quiz itself imports correctly, but one of the lesson links is rendered with the wrong course context — which gives us the next bug to fix.
By the end, this is starting to look like a real minimum viable Common Cartridge importer.
The broader theme of the episode is the workflow I keep coming back to when coding with AI:
brainstorm the problem → design the data model → build services → build tests → build UI → iterate.
The closer you get the data model to correct at the beginning, the less code you have to tear apart later.










