Tristan578

docs

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.

Tristan578 9 1 Updated 1w ago
GitHub

Install

npx skillscat add tristan578/project-forge/docs

Install via the SkillsCat registry.

SKILL.md

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:

  1. Complete beginners — "I want to make a game but I've never coded"
  2. Experienced developers — "How is this better than Unity/Godot?"
  3. 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.19 wgpu 29, 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.127 Pinned — must match Cargo.lock
bevy_rapier3d/2d 0.35 Physics
bevy_hanabi 0.19 GPU particles (WebGPU only)
bevy_panorbit_camera 0.35 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: Workflow rules change, new libraries added, an architecture rule shifts.
  • Never add: A project-status or phase summary. It is always-loaded context that goes stale the week it is written — milestone status belongs on the taskboard, shipped capabilities in README.md.

.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

  1. Before writing: Read the actual code to verify current state
  2. After writing: Confirm every claim can be verified by running the code
  3. Stale docs are worse than no docs: They teach users and agents wrong things
  4. Date every document: Use > **Last updated:** YYYY-MM-DD at the top

Validation Tools

Run these after documentation changes:

# Documentation integrity check (required files, rules, manifest sync, version refs)
bash .claude/tools/validate-docs.sh

# MCP manifest sync check
bash .claude/tools/validate-mcp.sh sync

# Full project validation
bash .claude/tools/validate-all.sh

Quality Bar

Before declaring documentation work complete:

  1. bash .claude/tools/validate-docs.sh — all checks pass
  2. Every claim verified against actual code
  3. All code examples tested or verified compilable
  4. Version numbers match Cargo.toml / package.json
  5. Grammar and spelling checked
  6. Scannable in 30 seconds (headers, tables, bullet points)
  7. 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.