Author the ten bundled template boards

The pathfinder's catalog transcribed verbatim as real board folders —
lane titles, icons, palette colors, board icons, and blurbs read
straight from its BoardTemplate.all, every color already in the
palette, no invented fields, no starter cards it never had. Basic had
drifted from the source in the engine card's version: it carried
icon/iconColor keys the pathfinder's key-less Basic never wrote
(visually identical via the fallback, byte-level wrong) and a
rewritten blurb — both restored. Orders run 100 to 1000 in inventory
order, Basic first; fresh lane UUIDs, gapped ranks, one consistent
timestamp; the discovery test now pins all ten slugs, lane counts,
Basic's primacy, and distinct ascending orders through the real
loader.

Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
2026-07-28 19:00:45 -04:00
parent b6f559375b
commit e7b48d2d53
52 changed files with 492 additions and 5 deletions
+32 -2
View File
@@ -26,7 +26,33 @@ struct BoardTemplateTests {
Issue.record("bundled template \(folder.lastPathComponent) failed to load: \(error.description)")
}
}
#expect(TemplateEngine.bundledTemplates().count == folders.count)
let templates = TemplateEngine.bundledTemplates()
#expect(templates.count == folders.count)
// 09-templates.md Inventory: all ten pathfinder templates, each carrying over its own lane
// count the definitive check that the bundle is the full set, not just "some folders load".
let expectedLaneCounts: [String: Int] = [
"basic": 2,
"classic-kanban": 3,
"software-project": 5,
"content-pipeline": 5,
"job-hunt": 5,
"sales-pipeline": 5,
"weekly-planner": 4,
"roadmap": 4,
"event-planning": 5,
"bug-tracker": 5,
]
#expect(Set(templates.map(\.slug)) == Set(expectedLaneCounts.keys), "all ten bundled slugs are present")
for template in templates {
#expect(template.lanes.count == expectedLaneCounts[template.slug], "\(template.slug) lane count")
}
#expect(templates.first?.slug == "basic", "Basic carries the lowest template.order")
let orders = templates.compactMap(\.order)
#expect(orders.count == templates.count, "every bundled template carries a template.order")
#expect(Set(orders).count == orders.count, "bundled template.order values are distinct")
#expect(orders == orders.sorted(), "bundledTemplates() lists templates in ascending template.order")
}
@Test("Basic is bundled, first, and the plain To Do / Done scaffold")
@@ -47,9 +73,13 @@ struct BoardTemplateTests {
#expect(basic.name == basic.model.title.value)
#expect(!basic.blurb.isEmpty, "the body is the picker blurb and the new board's description")
#expect(basic.blurb == basic.model.document.body.trimmingCharacters(in: .whitespacesAndNewlines))
#expect(basic.icon == basic.model.icon.value)
#expect(basic.iconColor == basic.model.iconColor.value)
#expect(basic.order == 100, "template: {order: 100} is the chooser position")
// Basic carries no icon key at all the pathfinder's plain scaffold, inherited verbatim
// so the pass-through half of this check needs a template that actually sets one.
let classicKanban = try #require(TemplateEngine.bundledTemplates().first { $0.slug == "classic-kanban" })
#expect(classicKanban.icon == classicKanban.model.icon.value)
}
@Test("An icon the running system cannot draw falls back to the board default")