init — Initialize OKF Knowledge Base
Creates a minimal set of OKF files so claude-mega-brain can start injecting context at the next session. No dedicated folder required — files can live anywhere in the project.
What to create
Two files are enough to get started:
index.md — the knowledge map (put it at the project root or in docs/):
---
type: Index
title: <Project Name> Knowledge Base
description: Central reference for all project knowledge.
timestamp: <today ISO 8601>
---
# <Project Name>
## Tables / Data
<!-- [orders](docs/orders.md) — one-liner -->
## Metrics
<!-- [wau](docs/wau.md) — one-liner -->
## APIs
<!-- [auth](docs/auth.md) — one-liner -->
## Services
<!-- [payments](docs/payments.md) — one-liner -->
log.md — append-only changelog (same location as index.md):
---
type: Log
---
<today ISO date> — initialized OKF knowledge base
Steps
- Check if OKF files already exist — look for any
.mdwithtype:frontmatter, or an existingindex.md/log.md. If found, tell the user and stop. - Detect project type (
package.json,pyproject.toml,go.mod, etc.) to personalize the index template. - Ask the user where they want the files — suggest project root or
docs/as default. If.mega-brain.jsonhas adirfield, use that subdirectory instead. - Write
index.mdandlog.mdin the chosen location. - Tell the user:
- What was created and where
- Start a new Claude Code session for context injection to activate
- Add concepts with
/mega-brain:ingestor create.mdfiles withtype:frontmatter anywhere in the project - Run
/mega-brain:migrateto auto-populate from existing schemas and docs