Skip to main content
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.
kiwifs init --template <name> --root <dir>

Available templates

TemplateBest forKey features
kbGoverned knowledge basesArticle schema, verification workflow, FAQ/guides/reference structure
wikiTeam wikisOnboarding, ADRs, processes, page templates
memoryAgent episodic memoryEpisodes directory, consolidation log, memory report
tasksTask trackingJSON Schema validation, Kanban workflow, claims
dataStructured data collectionsDQL dashboards, charts, import connectors
cmsHeadless CMSBlog, docs, pages, editorial workflow, feeds
runbookOps and incident responseSeverity frontmatter, execution staleness, checklists
adrArchitecture decision recordsMADR format, supersession chains, status workflow
promptPrompt managementSystem/task prompts, rubrics, eval metrics
researchResearch and literaturePapers, reading workflow, notes, BibTeX citations
logAppend-only event logDaily partitioning, sequence numbers, immutable writes
blankEmpty starting point.kiwi/config.toml only
In the web UI and cloud dashboard, templates are also available when creating a new workspace or space.
Every template (except blank) includes two agent-facing documents:
  • SCHEMA.md — directory layout, frontmatter fields, and naming conventions. Agents read this via kiwi_context or kiwi://schema.
  • playbook.md — step-by-step MCP tool sequences for standard operations, with a cost table to minimize unnecessary calls.
Export harness-specific rules for your agent tool:
kiwifs rules export --format cursor
kiwifs rules export --format claude
kiwifs rules export --format agents

kb

The kb (knowledge base) template is designed for governed, high-quality knowledge bases with article verification workflows.

Directory structure

kb/
├── SCHEMA.md
├── index.md
├── faq/
├── getting-started/
├── guides/
├── reference/
├── troubleshooting/
├── playbook.md
└── .kiwi/
    ├── config.toml
    ├── schemas/
    │   └── article.json
    └── workflows/
        └── kb.json          # draft → review → verified → stale → archived
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

wiki/
├── SCHEMA.md
├── index.md
├── welcome.md
├── architecture.md
├── how-we-work.md
├── decisions/
│   ├── index.md
│   └── adr-001-example.md
├── onboarding/
│   └── index.md
├── processes/
│   ├── index.md
│   ├── deployment.md
│   ├── dev-setup.md
│   └── incident-response.md
├── reference/
│   ├── index.md
│   ├── faq.md
│   └── glossary.md
└── .kiwi/
    ├── config.toml
    ├── playbook.md
    ├── rules.md
    └── templates/
        ├── decision.md
        ├── meeting-notes.md
        ├── onboarding.md
        ├── product-spec.md
        └── sop.md
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

The memory template implements the episodic/semantic memory pattern. Agents write short-lived observations to episodes/ and periodically consolidate them into durable pages.

Directory structure

memory/
├── SCHEMA.md
├── index.md
├── log.md                     # Append-only change log
├── pages/                     # Durable semantic pages
├── episodes/                  # Short-lived episodic notes
├── playbook.md
└── .kiwi/
    └── config.toml
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

tasks/
├── SCHEMA.md
├── WORKFLOW.md
├── index.md
├── tasks/
│   ├── example-task.md
│   └── blocked-example.md
├── playbook.md
└── .kiwi/
    ├── config.toml
    └── schemas/
        └── task.json
Each task file uses structured frontmatter validated by .kiwi/schemas/task.json:
---
title: "Implement auth flow"
status: "in_progress"
assignee: "agent:eng-bot"
priority: "high"
workflow: "default"
state: "in_progress"
---
The status field drives Kanban board grouping. The workflow and state fields enable state-machine transitions via Workflows.
The 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
[schema]
enforce = true
See Schemas.
With the workflow configured, the web UI renders tasks as a Kanban board grouped by state. Use the API to advance tasks programmatically:
curl -X POST 'http://localhost:3333/api/kiwi/workflow/advance' \
  -H 'Content-Type: application/json' \
  -d '{"path":"tasks/example-task.md","target_state":"done","actor":"agent:bot"}'

data

Structured data collections with DQL dashboards and import connectors.

Directory structure

data/
├── SCHEMA.md
├── index.md
├── collections/               # One directory per data collection
├── dashboards/                # DQL-powered summary views
├── imports/                   # Import connection configs
├── playbook.md
└── .kiwi/
    ├── config.toml
    └── schemas/
        └── record.json
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

cms/
├── SCHEMA.md
├── index.md
├── blog/                      # Blog posts with slug, author, published_at
├── docs/                      # Documentation pages
├── pages/                     # Static pages
├── authors/                   # Author profiles
├── playbook.md
└── .kiwi/
    ├── config.toml
    ├── schemas/
    │   └── blog-post.json
    └── workflows/
        └── editorial.json     # Editorial publishing states
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

runbook/
├── SCHEMA.md
├── index.md
├── example-high-cpu.md        # Sample runbook with severity + services
├── playbook.md
└── .kiwi/
    ├── config.toml
    └── schemas/
        └── runbook.json
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

adr/
├── SCHEMA.md
├── index.md
├── decisions/
│   └── ADR-001-example.md
├── playbook.md
└── .kiwi/
    ├── config.toml
    ├── schemas/
    │   └── adr.json
    └── workflows/
        └── adr.json           # proposed → accepted → deprecated → superseded
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/
├── SCHEMA.md
├── index.md
├── system-prompts/            # System-level prompts
├── task-prompts/              # Task-specific prompts
├── evaluation/                # Rubrics and eval results
├── playbook.md
└── .kiwi/
    ├── config.toml
    └── schemas/
        ├── prompt.json
        └── rubric.json
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

research/
├── SCHEMA.md
├── index.md
├── papers/                    # Literature entries with BibTeX metadata
├── notes/                     # Synthesis notes
├── reviews/                   # Paper reviews
├── playbook.md
└── .kiwi/
    ├── config.toml
    ├── schemas/
    │   └── paper.json
    └── workflows/
        └── reading.json       # Reading pipeline states
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

log/
├── SCHEMA.md
├── index.md
├── events/                    # Daily event files
├── playbook.md
└── .kiwi/
    ├── config.toml
    └── schemas/
        └── event.json         # type: daily-log, append_only, entry_count, date
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

# Self-hosted
curl http://localhost:3333/api/init-templates

# Cloud
curl https://api.kiwifs.com/api/workspaces/init-templates \
  -H "Authorization: Bearer $KIWI_API_KEY"
Returns an array of template objects with id, name, and description.

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.
Last modified on June 25, 2026