kiwifs init scaffolds a knowledge directory from a built-in template. Each template provides a directory layout, sample files, a .kiwi/config.toml, a SCHEMA.md, a playbook.md, and optional workflows or JSON Schemas.
Available templates
| Template | Best for | Key features |
|---|---|---|
kb | Governed knowledge bases | Article schema, verification workflow, FAQ/guides/reference structure |
wiki | Team wikis | Onboarding, ADRs, processes, page templates |
memory | Agent episodic memory | Episodes directory, consolidation log, memory report |
tasks | Task tracking | JSON Schema validation, Kanban workflow, claims |
data | Structured data collections | DQL dashboards, charts, import connectors |
cms | Headless CMS | Blog, docs, pages, editorial workflow, feeds |
runbook | Ops and incident response | Severity frontmatter, execution staleness, checklists |
adr | Architecture decision records | MADR format, supersession chains, status workflow |
prompt | Prompt management | System/task prompts, rubrics, eval metrics |
research | Research and literature | Papers, reading workflow, notes, BibTeX citations |
log | Append-only event log | Daily partitioning, sequence numbers, immutable writes |
blank | Empty starting point | .kiwi/config.toml only |
blank) includes two agent-facing documents:
SCHEMA.md— directory layout, frontmatter fields, and naming conventions. Agents read this viakiwi_contextorkiwi://schema.playbook.md— step-by-step MCP tool sequences for standard operations, with a cost table to minimize unnecessary calls.
kb
Thekb (knowledge base) template is designed for governed, high-quality knowledge bases with article verification workflows.
Directory structure
Verification workflow
Verification workflow
Articles follow a
draft → review → verified → stale → archived lifecycle. The janitor flags verified articles past their review_date as stale. Enable schema enforcement to require title, type, and status on every article.wiki
A structured team wiki with decision records, onboarding guides, and process documentation.Directory structure
Page templates
Page templates
The wiki template includes slash-command templates in
.kiwi/templates/ for common page types: architectural decision records, meeting notes, onboarding checklists, product specs, and standard operating procedures. These appear in the web UI’s “new page” menu.memory
Thememory template implements the episodic/semantic memory pattern. Agents write short-lived observations to episodes/ and periodically consolidate them into durable pages.
Directory structure
Memory lifecycle
Memory lifecycle
Episodes use
memory_kind: episodic frontmatter with optional expires, scope, and validity fields. Use kiwi_memory_report to find episodes ready for consolidation, then merge them into durable pages with merged-from provenance tracking. See Episodic memory.tasks
Task tracking template with a pre-configured workflow, JSON Schema validation, and Kanban-ready frontmatter.Directory structure
Task frontmatter
Task frontmatter
Each task file uses structured frontmatter validated by The
.kiwi/schemas/task.json:status field drives Kanban board grouping. The workflow and state fields enable state-machine transitions via Workflows.JSON Schema validation
JSON Schema validation
The See Schemas.
task.json schema in .kiwi/schemas/ validates that required fields (title, status) are present and that status is one of the allowed values. Enable enforcement with:.kiwi/config.toml
Kanban visualization
Kanban visualization
With the workflow configured, the web UI renders tasks as a Kanban board grouped by state. Use the API to advance tasks programmatically:
data
Structured data collections with DQL dashboards and import connectors.Directory structure
DQL dashboards
DQL dashboards
Dashboard pages use
kiwi-view: true and kiwi-query frontmatter to auto-generate tables and charts from collection data. Pair with kiwi-chart fenced blocks for visual summaries. See DQL.cms
Git-native headless CMS with an editorial workflow, Atom/JSON feeds, and a published reader at/p/*.
Directory structure
Publishing and feeds
Publishing and feeds
Publish pages to the reader at
/p/{path} and subscribe via GET /api/kiwi/feed.xml (Atom) or GET /api/kiwi/feed.json (JSON Feed). The editorial workflow manages content through review stages before publication. See Publishing.runbook
Operations-focused template with incident response procedures and execution staleness tracking.Directory structure
Execution staleness
Execution staleness
Each runbook uses
severity (P1-P4), services, trigger, and last_executed frontmatter. The janitor flags runbooks that have not been executed within a configurable staleness window. Schema validation ensures required fields are present.adr
Architecture Decision Records using the MADR format with supersession chains and contradiction detection.Directory structure
Supersession and contradiction
Supersession and contradiction
ADRs track
supersedes and contradicts typed links in frontmatter. The graph view highlights contradiction edges. The workflow enforces valid status transitions. Use adr_number for sequential numbering with auto-increment via [sequences] config.prompt
Versioned prompt management with rubrics and evaluation metrics.Directory structure
Prompt versioning
Prompt versioning
Each prompt file includes
version, model, and temperature frontmatter. Rubric files define scoring criteria. Use kiwi_eval to benchmark search quality against rubrics. Git versioning provides a full history of prompt iterations.research
Research template with structured note-taking, reading workflows, and citation tracking.Directory structure
Reading workflow
Reading workflow
Paper files track
authors, year, doi, bibtex, and reading status via the reading workflow. Use kiwi_cite to generate citations. The graph view visualizes citation networks between papers.log
Append-only event log with daily partitioning and sequence number validation.Directory structure
Append-only guarantees
Append-only guarantees
The log template configures
validate_write guards to enforce append-only semantics. Sequence numbers (<!-- seq:N --> markers) are validated by the kiwifs check CLI to detect gaps or reordering. Daily files partition events by date with FLATTEN support in DQL queries.blank
Minimal template — creates only.kiwi/config.toml. Use this when you want to start from scratch or bring your own directory structure.
Listing templates via API
id, name, and description.
Related
Agent playbook
How agents onboard using SCHEMA.md and playbook.md.
Workflows
State machines that drive Kanban boards and editorial pipelines.
Schemas
JSON Schema validation on writes.
Configuration
Full .kiwi/config.toml reference.
Episodic memory
The episode/consolidation pattern used by the memory template.
Quickstart
Install and run KiwiFS in 60 seconds.