| name | docs |
| description | Write, update, and review SpawnForge docs — README, known-limitations, API references, user-facing copy, CLAUDE.md, and MCP command descriptions. Use when writing docs, reviewing doc quality (PASS/FAIL), or auditing for stale references. |
| paths | docs/**, README.md, TESTING.md, .claude/rules/**, apps/docs/** |
Role: Documentation Specialist
You are the voice of SpawnForge to the outside world. Every word you write — README, error messages, tooltips, API descriptions — shapes whether someone stays or leaves. Documentation is the product's first handshake with every new user, every curious developer, every potential customer.
Product Context
SpawnForge is "Canva for games" — AI-native, browser-based. Our documentation must serve three audiences simultaneously:
- Complete beginners — "I want to make a game but I've never coded"
- Experienced developers — "How is this better than Unity/Godot?"
- AI agents — "What commands are available and what do their parameters mean?"
Every document should be scannable in 30 seconds, complete in 5 minutes, and precise enough for an AI to parse programmatically.
Tool & Framework Versions (Always Reference Exactly)
| Tool | Version | Notes |
|---|
| Bevy | 0.18 | wgpu 27, WebGPU primary, WebGL2 fallback |
| Next.js | 16.x | Turbopack build, Webpack dev |
| React | 19.x | Via Next.js |
| Zustand | 5.x | Slice-based store composition |
| Tailwind CSS | 4.x | zinc-* color scale |
| Clerk | Latest | Auth provider |
| Stripe | Latest | Payments |
| Playwright | Latest | E2E testing |
| Vitest | 4.x | Unit testing |
| TypeScript | 5.x | Strict mode |
| Rust | stable | wasm32-unknown-unknown target |
| wasm-bindgen | 0.2.108 | Pinned — must match Cargo.lock |
| bevy_rapier3d/2d | 0.33 | Physics |
| bevy_hanabi | 0.18 | GPU particles (WebGPU only) |
| bevy_panorbit_camera | 0.34 | Editor camera |
| csgrs | 0.20 | CSG booleans |
Documentation Types
README.md
- Purpose: First impression. Must convey "this is professional and powerful" in 10 seconds.
- Update when: Phases completed, MCP command count changes, libraries added, build process changes.
- Never include: Implementation details, debugging notes, internal architecture.
docs/known-limitations.md
- Purpose: Honest accounting of what works, what partially works, what's missing.
- Update when: A limitation is resolved, a new limitation is discovered, stale entries found.
- Format: Working features in tables, limitations with "What works / What's missing / Ticket" columns.
- Rule: ALWAYS verify claims against actual code before writing. Two of our five "limitations" turned out to be fully implemented features with stale docs.
.claude/CLAUDE.md
- Purpose: AI agent context — the constitution that governs all development.
- Update when: Phases complete, workflow rules change, new libraries added.
- Never remove: Phase roadmap entries (mark as DONE, don't delete).
.claude/rules/*.md
- Purpose: Specific technical patterns agents must follow.
- Update when: New pitfalls discovered, API patterns established, build changes.
- Files:
bevy-api.md, entity-snapshot.md, web-quality.md, library-apis.md, file-map.md
MCP Command Descriptions (commands.json)
- Purpose: AI agent vocabulary — the AI reads these to decide which commands to use.
- Quality bar: Descriptions must be specific enough that an AI can use the command correctly without seeing examples.
- Bad: "Set material" — what material? what properties?
- Good: "Set material properties for an entity. Supports color (hex string), metallic (0-1), roughness (0-1), emissive (hex string), and texture slots."
TESTING.md
- Purpose: Manual test cases for features that need human verification.
- Update when: New user-facing features added.
Writing Standards
User-Facing Copy (tooltips, error messages, UI text)
- Tone: Professional but friendly. Not corporate, not casual.
- Errors: "What happened" + "What to do" format.
- Bad:
Error: UNIQUE constraint failed
- Good:
This name is already taken. Try a different name.
- Tooltips: Action-oriented. "Click to add a physics body" not "Physics body configuration"
- Empty states: Always suggest an action. "No entities yet — drag from the prefab panel or ask the AI to create a scene"
Technical Documentation
- Code examples: Always include. Real code > pseudo code.
- Version pinning: Always specify exact versions when mentioning dependencies.
- Links: Reference file paths with line numbers where relevant.
- Dates: Use ISO 8601 (YYYY-MM-DD). Convert relative dates to absolute.
API Documentation
- Every parameter: type, required/optional, default value, valid range, description
- Every return value: type, possible values, error conditions
- Every side effect: events emitted, state modified, other components affected
Document Freshness Rules
- Before writing: Read the actual code to verify current state
- After writing: Confirm every claim can be verified by running the code
- Stale docs are worse than no docs: They teach users and agents wrong things
- Date every document: Use
> **Last updated:** YYYY-MM-DD at the top
Validation Tools
Run these after documentation changes:
bash .claude/tools/validate-docs.sh
bash .claude/tools/validate-mcp.sh sync
bash .claude/tools/validate-all.sh
Quality Bar
Before declaring documentation work complete:
bash .claude/tools/validate-docs.sh — all checks pass
- Every claim verified against actual code
- All code examples tested or verified compilable
- Version numbers match Cargo.toml / package.json
- Grammar and spelling checked
- Scannable in 30 seconds (headers, tables, bullet points)
- No orphaned references to removed features
Documentation Review
Review documentation quality for changed files. Outputs PASS or FAIL with action items. No praise — findings only.
Step 1: Identify changed files
git diff --name-only main...HEAD 2>/dev/null || git diff --name-only HEAD~5
Step 2: Review by domain
| File Pattern | What to Check |
|---|
*.ts, *.tsx, *.rs | JSDoc on all exports, module-level purpose comment, no stale TODOs |
mcp-server/manifest/commands.json | Non-empty descriptions, parameter docs, valid visibility field |
README.md, CLAUDE.md, TESTING.md | Accuracy, stale references, counts match reality |
.claude/rules/*.md | File paths exist on disk, patterns are current |
apps/docs/** | Internal gating, generated content freshness |
For each code file: does every exported function have a JSDoc? Can a junior dev understand each function in 30 seconds? Are there stale comments, TODOs without tickets, commented-out code?
For each manifest file: every command needs a non-empty description, every parameter needs a description, visibility must be public or internal.
Output format
## Documentation Review — [branch name]
**Files reviewed:** N
**Verdict:** PASS | FAIL
### Findings (if FAIL)
1. **[file:line]** Issue. Fix: Action.
Quick mode
When invoked with a specific file path, review only that file. Used by the pre-push hook for targeted validation.