Skip to main content

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 voice profile 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.

Walkthrough videoPending recording

A short walkthrough drafting a Markdown page, parsing it back with kapi inspect as the first check, running a voice-and-terminology gate, and landing a content fix and the approved term behind it in one kapi apply.

View scene script ↗

Write in your own editor; the desktop is the checker beside it.

  1. 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.
  2. 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.
  3. Gate on voice and terminology. The Checks view runs the project's bound rules; each finding names its rule and block, with the suggested wording.
  4. Revise and re-run until the findings clear. A clean check is the finish line.

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 store's terms tables. git diff shows the one new term; the next kapi check enforces it. apply is idempotent, and also accepts memory, voice, and recipe asset kinds; see Keep source on brand for the voice entry.

Next

  • Edit content: the edit-existing loop and the full content-entry shape with its guards.
  • Keep source on brand: the voice check and the vocabulary-rule entry.
  • Checks: the kapi.check/v1 report model and the gate exit codes.