Guided self-interview that generates portable AI context files for Claude Code, Codex, Cursor, Kiro, and ChatGPT.
Stop re-explaining your workflow. Generate concise, editable context files once, then reuse them everywhere.
Unlike broad memory systems, Selfdoc focuses on one narrow job: turning human preferences and workflows into portable instruction files. Local-first. Markdown-first. No cloud account. No API key required.
In an internal 120-call Claude API evaluation across four behavioral tests (name compliance, boundary enforcement, source restrictions, communication style), Selfdoc standard scored higher than a verbose soul.md-style context while using fewer words:
| Approach | Compliance | Words | Efficiency |
|---|---|---|---|
| Selfdoc standard | 0.93 | 167 | 5.6/kw |
| soul.md style | 0.83 | 224 | 3.7/kw |
| Selfdoc minimal | 0.81 | 80 | 10.1/kw |
| No context | 0.32 | 0 | — |
The full benchmark harness is not yet included in the package — treat these numbers as directional product evidence, not an independent academic benchmark.
Design principle: split individual rules with brief reasoning (e.g., NEVER: ... (these are personal projects, separate from work)) outperform both verbose personality dumps and bare commands. Aligns with ETH Zurich (arXiv:2602.11988) and JAWs 2026 (arXiv:2601.20404).
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%/Claude/claude_desktop_config.json (Windows):
{
"mcpServers": {
"selfdoc": {
"command": "npx",
"args": ["-y", "selfdoc-mcp-server"]
}
}
}claude mcp add --transport stdio selfdoc -- npx -y selfdoc-mcp-serverAdd .cursor/mcp.json:
{
"mcpServers": {
"selfdoc": {
"command": "npx",
"args": ["-y", "selfdoc-mcp-server"]
}
}
}| Tool | What it does |
|---|---|
selfdoc_interview |
8-phase guided self-documentation (identity → boundaries) |
selfdoc_generate |
Creates identity.md, knowledge.md, workflows.md, learnings.md |
selfdoc_export |
Exports to CLAUDE.md, AGENTS.md, .cursorrules, .mdc, ChatGPT, Kiro (all 3 files) |
selfdoc_learn |
Appends timestamped learning to journal |
selfdoc_recall |
Searches across your self-documentation |
selfdoc_delete_profile |
Permanently deletes all selfdoc data after exact confirmation |
Per ETH Zurich research, verbose context files can reduce coding agent performance. Selfdoc supports three sizes:
| Size | Lines | Use case |
|---|---|---|
minimal |
5–7 | Coding agents (Claude Code, Codex). Only your top rules. |
standard |
~15 | General use. Role, stack, quality criteria, boundaries. |
full |
~25 | Personal reference. Everything from your interview. |
- Overwrite protection: Selfdoc never overwrites your existing project files such as CLAUDE.md or AGENTS.md. Generated Selfdoc export files use a
.selfdocsuffix, and previous Selfdoc exports are backed up before replacement. - Redaction: Selfdoc applies basic local redaction to export files for common emails, GitHub tokens (classic + PAT), OpenAI/Anthropic
sk-keys, AWS access keys, Slack tokens, and US/Korean phone patterns. Raw interview data under~/.selfdoc/is stored as provided. Review all files manually before sharing. - Local only: All data stored at
~/.selfdoc/. Nothing leaves your machine.
~/.selfdoc/
├── identity.md # Who you are
├── knowledge.md # What you know
├── workflows.md # How you work
├── learnings.md # What you discovered (append-only)
├── .interview-data.json # Raw answers
├── exports/ # Tool-specific output files
└── backups/ # Previous export versions
Selfdoc generates all three Kiro steering files per Kiro docs:
kiro-product.md— role, quality criteria, contextkiro-tech.md— stack, AI toolskiro-structure.md— rules, boundaries
Copy and rename to .kiro/steering/ in your project:
cp ~/.selfdoc/exports/kiro-product.md .kiro/steering/product.md
cp ~/.selfdoc/exports/kiro-tech.md .kiro/steering/tech.md
cp ~/.selfdoc/exports/kiro-structure.md .kiro/steering/structure.mdgit clone https://github.com/testofschool/selfdoc-mcp-server.git
cd selfdoc-mcp-server
npm install
npm run build
node dist/index.js # runs on stdioMIT