runbook or decision, and KiwiFS checks the frontmatter of every page of that type before the write lands. Agents and people get an immediate error instead of leaving half-filled pages behind.
How it works
- A page declares its type in a discriminator field,
typeby default. - KiwiFS looks for
.kiwi/schemas/{value}.json. - If that schema exists, the page’s frontmatter is validated against it.
- Pages with no discriminator, or with a type that has no schema, are never checked.
Turn on enforcement
.kiwi/config.toml
Write a schema
Schemas are standard JSON Schema files, one per type. The filename without.json is the type value.
.kiwi
schemas
runbook.json
decision.json
- REST
- File on disk
Terminal
runbooks/db-failover.md
runbook, tasks, data, adr, and other kiwifs init templates ship with schemas in .kiwi/schemas/. Enforcement stays off until you turn it on.
Validation errors
Withenforce_level = "reject", an invalid write returns 422 Unprocessable Entity and nothing is written. The message names the type and each violation:
422 Unprocessable Entity
List and read schemas
Terminal
Related
Schemas REST API
List, read, and save schemas.
Configuration
The
[schema] section.Templates
Init templates that include schemas.
Files as truth
Frontmatter as structured data.