Astro 6.2 + Starlight 0.38.4 static site. Dark-mode only. Deployed to Cloudflare Pages.
Each doc page follows a repeatable process. When asked to write a doc page, execute these steps in order.
Read the target markdown stub in src/content/docs/ to get the title and description. Determine the page type:
| Page Type | Directories | Approach |
|---|---|---|
| CLI Reference | cli/ |
Self-serve from screenshots + interview for non-obvious behavior |
| Tutorial | getting-started/ |
Interview-heavy — need the golden path, prerequisites, expected output |
| Guide | guides/ |
Mix — problem statement is self-evident, solution steps need interview |
| Concept | architecture/, security/ |
Interview-heavy — design decisions, rationale, threat models |
| Configuration | configuration/ |
Mix — schema/options from interview, examples from screenshots |
| Integration | channels/ |
Interview-heavy — third-party setup steps, OAuth flows, permissions |
| Operations | deployment/ |
Interview-heavy — runtime requirements, environment variables, health checks |
Before asking the user anything, collect available information:
- Netclaw source repo — Clone
https://github.com/netclaw-dev/netclaw(or locate a local clone). Key paths relative to that repo root:src/Netclaw.Cli/— CLI commands, flags, help textsrc/Netclaw.Configuration/— Config schemas, defaults, validationsrc/Netclaw.Daemon/— Daemon architecture, startup, health checkssrc/Netclaw.Channels.Slack/andNetclaw.Channels.Discord/— Channel integrationssrc/Netclaw.Security/— Security model, ACLs, approval gatessrc/Netclaw.Providers/— Provider abstraction, model routingdocs/spec/— Formal specs (runtime boundaries, session lifecycle, ACL policy, CLI contract, onboarding, model providers, MCP integration, daemon architecture)docs/adr/— Architecture decision records (tool schemas, context discovery, progressive tool disclosure)docs/runbooks/— Operational runbooks (background jobs, behavior debugging, daemon upgrades, memory health, subagents, tool approval gates)docs/spec/configuration.md— Configuration specificationCLAUDE.md,PROJECT_CONTEXT.md,CONTRIBUTING.md— Project context and conventions
- Screenshots — Check
screenshots/output/for assets matching the page topic. Map them to the page. Screenshots are served at/screenshots/output/<filename>. - Landing page —
src/pages/index.astrocontains feature descriptions, architecture overview, and product positioning that inform doc content. - Existing docs — Read related pages that are already written for context and cross-referencing.
- Skill server repo — Clone
https://github.com/netclaw-dev/skill-server(or locate a local clone). May have relevant API docs or README content for skills-related pages.
Read relevant source files and specs BEFORE interviewing. Document what you found and what gaps remain before proceeding to interview.
Ask the user targeted, specific questions to fill the gaps from Step 2. Rules:
- Batch questions — ask 3-7 questions at once, grouped by topic. Don't ask one at a time.
- Show your work — tell the user what you already know (from screenshots/landing page) so they don't repeat themselves.
- Ask for the non-obvious — don't ask "what does
netclaw statusdo?" when you have a screenshot. Ask "what happens when status shows a degraded provider?" or "what's the most common mistake users make here?" - Ask for sequencing — for tutorials/guides, ask "what order should a user do these steps?" and "what should they see at each checkpoint?"
- Ask for failure modes — "what goes wrong?" and "what's the fix?" are often the most valuable content.
- Ask for scope boundaries — "what should this page NOT cover?" prevents scope creep.
- One round preferred — aim to get everything in one interview round. A second round is OK if answers reveal new gaps.
CLI Reference:
- What flags/options aren't visible in the screenshots?
- What's the most common use case vs. advanced use cases?
- Any gotchas or non-obvious behavior?
- What other commands is this typically used with?
Tutorial:
- What are the prerequisites (installed software, accounts, API keys)?
- Walk me through the exact sequence — what does the user type, what do they see?
- Where do users most commonly get stuck?
- What does "success" look like at the end?
Guide:
- What problem is this solving? When would a user need this?
- What's the step-by-step? Any conditional branches (if X, do Y)?
- Are there multiple valid approaches? Which do we recommend and why?
- What are the failure modes and how do you recover?
Concept:
- What's the mental model the user should have?
- What design decisions were made and why?
- What are the boundaries/limitations?
- How does this relate to other parts of the system?
Configuration:
- What's the config file format and location?
- What are all the fields, their types, defaults, and valid ranges?
- What's a minimal config vs. a production config?
- What happens when config is invalid?
Integration:
- What third-party setup is required (apps, bots, tokens, permissions)?
- What's the OAuth/auth flow?
- What permissions/scopes are needed and why?
- How do you verify the integration is working?
Writing principles — less is more:
- Be minimal. Only include what people actually need. If it's obvious, don't explain it.
- Prefer a short page that covers the essentials over a long page that covers everything.
- One sentence that teaches something beats three sentences that elaborate.
- Code examples are worth more than prose. Show, don't tell.
- If the CLI help text already explains a flag well, don't rewrite it — just show the help output.
- No filler paragraphs. No "In this section we will discuss..." No padding.
- Tables over prose for reference material (flags, config fields, alert types).
- Every sentence should either teach something or help the reader do something. Delete the rest.
- Visuals over text — If a screenshot, diagram, or image explains something better than prose, use it. A screenshot of the TUI output is worth more than three paragraphs describing it. Architecture pages should have diagrams. CLI pages should have screenshots. Don't describe what you can show.
Write for a technical audience that's new to netclaw but experienced with their platform (Linux, Docker, Slack, etc.).
---
title: "netclaw <command>"
description: "<one-line description>"
---
<one paragraph: what this command does and when you'd use it>
## Usage
\`\`\`bash
netclaw <command> [options]
\`\`\`
## Options
| Flag | Description | Default |
|------|-------------|---------|
| ... | ... | ... |
## Examples
### <Common use case>
\`\`\`bash
netclaw <command> <args>
\`\`\`

<explain what the screenshot shows>
## Related Commands
- [`netclaw <other>`](/cli/<other>/) — <why it's related>---
title: "<action-oriented title>"
description: "<what the user will accomplish>"
---
<one paragraph: what we're building/doing and why>
## Prerequisites
- <specific requirement with version>
- <account/access requirement>
## Steps
### 1. <First action>
<instruction>
\`\`\`bash
<exact command>
\`\`\`
<what to expect / screenshot>
### 2. <Next action>
...
## Verify It Works
<how to confirm success>
## Next Steps
- [<next logical page>](</path/>) — <why>---
title: "<problem-oriented title>"
description: "<when you'd need this guide>"
---
<one paragraph: the problem this solves>
## Before You Begin
- <prerequisite or assumption>
## <Steps or sections as appropriate>
...
## Troubleshooting
### <Common problem>
<symptoms, cause, fix>---
title: "<topic>"
description: "<one-line summary>"
---
<2-3 paragraph overview: what this is, why it matters, mental model>
## <Key concept sections>
...
## Limitations
- <what this doesn't do or cover>When including screenshots:
- Use
for static screenshots - Prefer
.pngover.gifunless the animation is essential to understanding - Write a caption sentence below each screenshot explaining what it shows
- If a screenshot shows a multi-step flow (like
init), break it into individual step screenshots:init-01-provider-list.png,init-02-security-posture.png, etc.
Available screenshot sets:
init-*— Fullnetclaw initwizard flow (10+ steps)status.*— System status displaydoctor.*— Health check diagnosticsstats.*— Usage statisticsprovider.*/provider-manager.png— Provider managementmodel.*/model-manager.png— Model managementmcp-tools.*/mcp-tools-*.png— MCP tool server managementwebhooks.*/webhooks-list.png— Webhook configurationreminder.*/reminder-list.png— Reminder management
After writing the draft, spawn three review agents in parallel. Pass each the full draft content.
Agent 1 — Technical Accuracy:
- Compare every claim against the source code and specs
- Flag any incorrect flag names, default values, or behavior descriptions
- Verify all code examples would actually work
- Check that command output descriptions match what the screenshots show
Agent 2 — Reader Empathy:
- What would a human reader find missing or confusing?
- Are there prerequisites the page assumes but doesn't state?
- Would a reader know what to do next after finishing this page?
- Identify 2-4 external links that would be useful (official docs for third-party tools, relevant RFCs, related tutorials)
- Flag any jargon that isn't defined on this page or linked to a page that defines it
Agent 3 — Humanizer:
- Does this read like a person wrote it or like a manual was generated?
- Flag robotic phrasing: "It is important to note that...", "This section describes...", "The following table shows..."
- Flag unnecessary hedging: "you may want to", "it is recommended that"
- Prefer direct voice: "Run
netclaw status" not "You can runnetclaw status" - Check for variety in sentence structure — not every paragraph should start the same way
- The tone should be confident and casual-technical, like explaining to a coworker
Run /humanizer on the drafted page. This is mandatory — no page ships without it. The humanizer catches AI writing patterns that slip through manual review: over-explaining, passive voice, hedge words, repetitive structure, and generic filler that makes documentation feel soulless.
Incorporate all critique feedback and humanizer output in a single pass:
- Fix technical inaccuracies
- Add missing context, prerequisites, and "what's next" links
- Insert external resource links where the reader empathy agent identified gaps
- Rewrite robotic or hedging language
- Ensure cross-links to other netclaw docs use correct slugs
Before declaring the page done:
- Frontmatter
titleanddescriptionare set - Page follows the correct template for its type
- All referenced screenshots exist in
screenshots/output/ - No placeholder text ("Content coming soon", "TODO", "TBD")
- Cross-links to related pages use correct slugs
- Code examples are complete and copy-pasteable
- At least 2 external links to relevant resources
- No robotic phrasing or unnecessary hedging
-
npm run buildpasses with no errors
When invoked with a page slug (e.g., cli/status), run the full pipeline without user interaction:
- Skip Step 3 (Interview) — use only source material from Step 2
- If critical information is missing, write the best page you can and leave a
<!-- TODO: needs user input — [specific question] -->comment - Run all critique agents (Step 6) and revise (Step 7)
- Run
npm run buildto verify - Stage and commit the single page with message:
docs: write <section>/<page>
The netclaw source repo is expected at ~/repositories/stannardlabs/netclaw/. If not found, check common locations or skip source-dependent content.
npm run dev -- --host 0.0.0.0 # Dev server with Tailscale access
npm run build # Production build (43 pages)src/
content/docs/ # Markdown documentation pages
pages/ # index.astro (landing page)
components/ # Starlight overrides (Header, Footer, ThemeSelect)
styles/ # custom.css (brand tokens)
assets/ # Logo SVG for Starlight
public/
assets/ # Static assets (images, favicons)
screenshots/ # Copied from repo root at build time
screenshots/ # VHS capture pipeline output (source of truth)