Create content with kapi as the checker
Goal: when you are authoring new content — there is no frozen source to edit, you are writing the document — use kapi as the checker. You write; kapi parses what you wrote, holds it to the brand voice and terminology, and tells you what to fix. No AI provider is involved. This is the author → parse → check loop — the create-side counterpart of Edit content, where the source is fixed and you edit existing blocks.
A short walkthrough drafting a Markdown page, parsing it back with kapi inspect as the first check, running a brand-and-terminology gate, and landing a content fix and the approved term behind it in one kapi apply.
- Desktop
- Agent (Claude)
- CLI
Write in your own editor; the desktop is the checker beside it.
- Track the draft. Add the file to a project collection (or push it through a quick tool for a one-off) — the collection card shows the format kapi detected for it.
- Parse it as the first check. Open it: Preview renders the document as the engine reads it; Blocks lists what you actually wrote, block by block. A missing or merged block means the source needs fixing.
- Gate on brand and terminology. The Checks view runs the project's bound rules — each finding names its rule and block, with the suggested wording.
- Revise and re-run until the findings clear. A clean check, not a saved file, is the finish line.
With kapi connected, the assistant is the author and kapi stays the checker:
Draft a release-notes page for the export feature — on brand, using our approved terms.
It loads the voice and wording first (kapi brand guide, kapi terms lookup) so the first draft is already close, then loops check_file → revise until the gate is green. When a check flags a new term, it proposes the close-the-loop change-set — the content fix and the term rule in one apply.
Author in a generative format — one kapi can produce from content alone (Markdown, HTML, JSON, YAML, …):
kapi formats list --json | jq -r '.formats[] | select(.generative) | .name'
Binary office formats (.docx, .pptx, .xlsx) are editable but not generative — start from an existing file and edit it in place instead. Parse the draft back as the first verification that it is well-formed and says what you intend, then gate it:
kapi stats draft.md --json # size and structure survey
kapi inspect draft.md --jsonl # block by block, as a reader sees it
kapi check draft.md --profile-file brand.yaml # one-off; exit 0 pass, 3 gate failed
kapi check --ship # in a project: every bound gate
Load the voice and approved wording before writing so the first draft is already close:
kapi brand guide # the voice to follow (no flag inside a project)
kapi terms lookup "dashboard" -t en # the approved term
Fix what the check flags — edit the source directly, or route the fix through kapi apply when you want the round-trip and drift guards (Edit content) — and re-check until green.
Close the loop: fix the content and the rule together
When a check flags a term, the durable fix is two changes: correct this draft and record the rule so future drafts are checked against it. Both are typed entries in one kapi apply change-set (requires a .kapi project), landing atomically through the single write verb:
{"kind":"content","file":"draft.md","id":"p4","content_hash":"a1b2…","text":"Open the dashboard."}
{"kind":"term","op":"upsert","term":"dashboard","locale":"en","status":"preferred","replaces":"control panel"}
kapi apply changeset.jsonl
The content entry rewrites the block through the faithful round-trip, drift-guarded by content_hash; the term entry is written into the committed terms source the recipe binds with defaults.terms_source (a .terms.json bundle) and compiled into the project terms store (.kapi/terms.db). git diff shows the one new term; the next kapi check enforces it. apply is idempotent, and also accepts tm, brand, and recipe asset kinds — see Keep source on brand for the brand entry.
Next
- Edit content — the edit-existing loop and the full
content-entry shape with its guards. - Keep source on brand — the brand check and the vocabulary-rule entry.
- Checks — the
kapi.check/v1report model and the gate exit codes.