Skip to main content
Every kiwifs init template except blank ships a few agent-facing files beside your pages. An agent loads them with one call to kiwi_context and knows the layout, the frontmatter conventions, and the house rules before it writes anything.

The files

kiwifs init copies the template’s playbook to .kiwi/playbook.md, which is the copy kiwi_context serves. .kiwi/playbook.md and .kiwi/rules.md are the only .kiwi/ files reachable through the file API.

Load context in one call

Call kiwi_context with no arguments. It returns the schema, playbook, index, and rules as one document. Agents should call it first when they connect.The schema alone is also available as the read-only resource kiwi://schema.

Typical operations

Each template’s playbook spells out its own sequences. These are the common shapes.

Rules

.kiwi/rules.md holds rules that apply to every agent, such as “search before creating a page” or “never store secrets”. kiwi_context includes it, so MCP agents get it automatically. For agents that read rules from their own config, export it.
Terminal
Formats are cursor, claude, agents, openclaw, and skill. sync needs --output for every format except skill. Add --remote http://host:3333 to read the rules from a running server instead of the local file. Over REST, GET /api/kiwi/rules reads the rules (add format= for an export) and PUT /api/kiwi/rules replaces them. See Utilities API.

Provenance on writes

Record which run produced a page. KiwiFS appends an entry to its derived-from frontmatter.

MCP

Client setup and the full tool reference.

Episodic memory

Episodes, consolidation, and coverage reports.

Schemas

Validate frontmatter on every write.

Templates

What each kiwifs init template ships.
Last modified on October 19, 2026