Kami: The Design System That Teaches AI to Typeset Like an Editor

A print-first document engine built on templates, typography constraints, and agent instructions that turn raw text into polished PDFs and slides.

9 min read • View on GitHub • More from tw93

A typesetter’s desk where a messy stack of pages on the left becomes a refined document stack on the right. In the center, a compact control panel of dials suggests font weight, palette, page count, and layout constraints. The scene explains that Kami’s power comes from disciplined rules rather than open-ended styling freedom.
Kami treats document design as a production system. The output looks editorial because the input is forced through constraints that preserve typography, spacing, and print fidelity.

A lightweight, declarative, and composable UI library for building web components.

tw93, Author / Maintainer · tw93/kami GitHub Repository README
Key Takeaways

Most design systems try to help software look consistent. Kami is trying to help documents look authoritative. That difference changes everything, from the palette down to the rendering engine.

The repo reads like a refusal of default web taste. No dashboard gray. No flashy gradients. No loose typography. Instead, Kami pushes every document through a narrow set of choices that make the final PDF feel intentional.

The quiet system that refuses to look like software

Kami is built around a simple bet: if you reduce freedom early, you get better output later. The project is organized around templates, references, scripts, and a skill file that tells an AI agent how to behave like a careful production designer.

A hedcut-style portrait of tw93 based on the verified GitHub avatar. The portrait identifies the project’s maintainer and anchors the article’s attribution to a real person rather than an abstract brand.

The constraint philosophy

Kami’s visual identity is built from restrictions that would feel hostile in a general app framework. The codebase favors solid hex colors, warm neutrals, and a tight typographic system. It avoids the usual web habit of solving every problem with another weight, another shade, or another layer of chrome.

:root {
  --paper: #f5f4ed;
  --ink: #1b365d;
  --olive: #5a6b4f;
  --stone: #8a8476;
  --sand: #c8bfa8;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Newsreader", serif;
}

/* The point is not decoration. The point is restraint. */

Those choices are not cosmetic. They make the output safer for PDF generation and more coherent as a visual language. In other words, the style is a compatibility layer.

Templates as semantic containers

The template system is the project’s spine. Rather than one flexible layout that tries to do everything, Kami ships document archetypes: resume, one-pager, long doc, letter, portfolio, and slides. Each template signals intent before any content is rendered.

Kami turns vague requests into document archetypes before rendering begins. The diagram shows how the system uses routing, validation, and templates to keep AI output disciplined.

That is a small architectural choice with a big effect. A template is not just a layout. It is a promise about length, structure, and audience.

SKILL.md is the real interface

The most modern part of the repo is not the CSS. It is the instruction layer in SKILL.md. That file behaves like an operating manual for AI agents: detect language, map intent, check for missing information, then route the content into the correct document shape.

A close-up branching decision tree that begins with a user request and splits into language detection, intent classification, template selection, gap checking, and rendering. The image explains how Kami guides an AI agent from ambiguity to a validated document pipeline.
SKILL.md is less a prompt and more a production checklist. It tells an agent how to decide, where to route, and when to stop for missing information.

That gap check matters more than it sounds. A lot of AI tools are good at producing text and bad at noticing what is missing. Kami makes omission part of the workflow.

Why the build script is part of the design system

scripts/build.py is not a utility tucked off to the side. It is a quality gate. The repo treats page-count contracts, font checks, token synchronization, and CSS linting as part of the same design promise.

That is the difference between a template pack and a production system. A template pack gives you a starting point. Kami gives you constraints, checks them, and then renders only when the output still fits the rules.

Typography is the product

If you strip away the pipeline, what remains is taste. Kami’s typography leans literary rather than app-like. One dominant serif weight, warm paper tones, and careful spacing do more work than a stack of utility classes ever could.

That is why the documents feel composed. The system does not ask for attention. It earns it through hierarchy that reads like editorial judgment, not interface decoration.

Kami vs the usual ways people make documents

ApproachStrengthWeaknessWhat Kami changes
Google Docs exportsFast and familiarStyle drifts easily and print polish is limitedAdds a stricter visual contract before rendering
Generic design systemsReusable UI patternsOptimized for screens, not editorial outputReorients design around documents and PDFs
Browser print workflowsLow setup costPDF fidelity can be inconsistentUses WeasyPrint and validation to stabilize output
Freeform AI generationFlexible and quickOften produces messy, inconsistent documentsForces AI through templates, checks, and type rules

The point is not that Kami has more features. The point is that it solves a different problem. It is trying to make AI-generated documents look like they came from an editor who cared about margins, not a model that just filled space.

The bigger bet

Kami hints at a larger shift in software: agent instructions becoming part of the design stack. If AI is going to draft documents for us, the important question is not just what it writes. It is what constraints it inherits before the first line lands on the page.

That is the real elegance here. Kami does not trust raw generation. It builds a narrow path that makes good judgment more likely than bad output, then lets the renderer do the rest.