| name | document-feature |
| description | Create user-facing feature documentation for the docs VitePress docs site. Analyzes the codebase and produces an index.en.md in the correct docs directory. Use when user says 'document this feature', 'write feature docs', 'create docs for X', 'add feature to docs site', or 'user-facing documentation for'. Takes feature name as argument. Do NOT use for ADRs (use /document-decision) or syncing existing docs (use /update-doc). |
| allowed-tools | Read, Grep, Glob, Write |
Document Feature - Create User-Facing VitePress Documentation
Create user-facing documentation for feature "$ARGUMENTS" on the Swiss AI Hub VitePress docs site. Analyzes the
codebase, then produces an index.en.md file for end users.
Before You Start
Read these existing feature docs to understand the tone and structure:
- MCP:
docs/docs/2_platform/19_mcp/index.en.md — standards-based integration doc with capabilities breakdown
- Memory:
docs/docs/2_platform/15_memory/index.en.md — conversational style with "why it matters", "how it works",
"two types" sections
- Cost Control:
docs/docs/2_platform/14_cost_control/index.en.md — uses ::: details containers organically,
includes comparison tables
Real docs use natural, conversational section headers — NOT a rigid template. Match the style you see.
Step 1: Research the Feature
Search for the feature across scopes (packages/core, packages/agent, packages/api, packages/pipeline,
packages/process, packages/web). Understand what it does, how users interact with it, and what makes it valuable.
Step 2: Choose the Docs Location
Feature docs live under docs/docs/. Determine where based on audience:
- Platform features (user-facing: UI, chat, admin):
docs/docs/2_platform/{N}_{topic}/index.en.md
- SDK features (developer-facing: building agents, pipelines, processes):
docs/docs/3_sdk/6_feature_overview/
Directory naming uses a numeric prefix for sidebar ordering (e.g., 19_mcp/, 15_memory/). Check existing
directories to pick the next available number:
ls -d docs/docs/2_platform/*/
ls -d docs/docs/3_sdk/*/
Step 3: Create the Documentation File
Create index.en.md (NOT index.md) in the new directory.
Front matter — only title is required. Ordering comes from the directory prefix, not frontmatter:
---
title: Feature Title
---
Writing conventions (from docs/CLAUDE.md):
- User-facing perspective, present tense, jargon-free language
- VitePress containers:
::: info, ::: warning, ::: details — use organically, not as rigid template
- No code blocks that will drift out of sync — reference file paths instead
- Focus on what the feature does for users, not internal architecture
Step 4: Handle Translation
After creating the English file:
- Never create
index.de.md manually — it is auto-generated by pnpm run docs:translate
- The translation pipeline uses SHA-256 hashes to detect changes (
source_sha in .de.md frontmatter)
- German translations must be committed to git (CI doesn't run translation)
Step 5: Verify
ls docs/docs/2_platform/*_{topic}/index.en.md
head -5 docs/docs/2_platform/*_{topic}/index.en.md
cd docs && pnpm run docs:dev
Compare your doc with the exemplars from "Before You Start" — it should match their tone and depth.
Troubleshooting
| Problem | Solution |
|---|
| Unsure if platform or SDK feature | UI/chat interaction = platform (2_platform/); code/API = SDK (3_sdk/) |
| Feature spans many scopes | Focus on user-visible behavior, not internal architecture |
| Feature not yet fully implemented | Use ::: warning boxes to note incomplete sections |
Don't create docs in 6_code_deep_dive/ | That directory is auto-synced from READMEs via sync-docs.sh |
Done When
index.en.md created in the correct docs/docs/ subdirectory
- Front matter has
title field
- Style matches existing feature docs (MCP, Memory, Cost Control)
- No
index.de.md created manually (translation pipeline handles this)