Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
cb4291b
Add documentation authoring workflow to CLAUDE.md
Aaronontheweb May 3, 2026
242ca22
Add doc authoring pipeline and restructure sidebar
Aaronontheweb May 3, 2026
8dbd00a
docs: write observability/operational-alerts
Aaronontheweb May 3, 2026
afb5ca7
docs: mark observability/operational-alerts as done
Aaronontheweb May 3, 2026
5616282
Add OpenProse doc writing workflow with visual verification
Aaronontheweb May 3, 2026
2779f4e
Add animated CLI screenshots and gitignore local settings
Aaronontheweb May 3, 2026
9e7de79
docs: write cli/overview
Aaronontheweb May 3, 2026
a622278
Fix write-docs.sh exiting after first page
Aaronontheweb May 3, 2026
bd0574b
docs: write cli/init
Aaronontheweb May 3, 2026
819c708
docs: write cli/chat
Aaronontheweb May 3, 2026
e57342b
docs: write cli/sessions
Aaronontheweb May 3, 2026
9e03a76
docs: write cli/status
Aaronontheweb May 3, 2026
3dbdba7
docs: write cli/doctor
Aaronontheweb May 3, 2026
cf8d122
Fix screenshot script hanging: add 60s timeout and dynamic port
Aaronontheweb May 3, 2026
7d8ae44
Switch visual verification from screenshot script to Playwright MCP
Aaronontheweb May 3, 2026
5da9701
docs: write cli/doctor
Aaronontheweb May 3, 2026
295ea8f
docs: write cli/stats
Aaronontheweb May 3, 2026
9917943
docs: write cli/provider
Aaronontheweb May 3, 2026
1613585
docs: write cli/provider
Aaronontheweb May 3, 2026
34012f5
docs: write cli/mcp-tools
Aaronontheweb May 3, 2026
a60b912
docs: write cli/webhooks
Aaronontheweb May 3, 2026
07d14bb
docs: write cli/skill
Aaronontheweb May 3, 2026
1dbdb76
docs: write cli/skill
Aaronontheweb May 3, 2026
28c96a8
docs: write cli/secrets
Aaronontheweb May 3, 2026
16aa576
docs: write security/security-model
Aaronontheweb May 3, 2026
72b3719
docs: write security/hardening
Aaronontheweb May 3, 2026
3b2bb1c
docs: write security/hardening
Aaronontheweb May 3, 2026
091280e
docs: write security/secrets
Aaronontheweb May 3, 2026
e4267ed
docs: write security/secrets
Aaronontheweb May 3, 2026
1788f05
docs: write configuration/managed-providers
Aaronontheweb May 3, 2026
23e11ab
docs: write configuration/self-hosted-providers
Aaronontheweb May 3, 2026
75b9302
docs: write configuration/models
Aaronontheweb May 3, 2026
525e7e4
docs: write configuration/mcp-servers
Aaronontheweb May 4, 2026
b774413
docs: write configuration/webhooks
Aaronontheweb May 4, 2026
bc70884
docs: write configuration/reminders
Aaronontheweb May 4, 2026
e170336
docs: write channels/troubleshooting
Aaronontheweb May 4, 2026
a828789
docs: write deployment/docker
Aaronontheweb May 4, 2026
1a438e5
docs: write deployment/systemd
Aaronontheweb May 4, 2026
6886735
docs: write deployment/systemd
Aaronontheweb May 4, 2026
0a2a451
docs: write deployment/exposure-modes
Aaronontheweb May 4, 2026
98b7e82
docs: write architecture/overview
Aaronontheweb May 4, 2026
632c379
docs: write architecture/security-model
Aaronontheweb May 4, 2026
a87e982
docs: write channels/slack
Aaronontheweb May 4, 2026
9ba129b
docs: write channels/discord
Aaronontheweb May 4, 2026
718f388
docs: write skills/overview
Aaronontheweb May 4, 2026
9dc7eac
docs: write skills/external-skills
Aaronontheweb May 4, 2026
ae52156
docs: write skills/external-skills
Aaronontheweb May 4, 2026
092051f
docs: write guides/connecting-slack
Aaronontheweb May 4, 2026
5997f25
docs: write guides/mcp-tool-permissions
Aaronontheweb May 4, 2026
2533fd1
docs: write guides/mcp-tool-permissions
Aaronontheweb May 4, 2026
5eff545
docs: write guides/pairing-remote-devices
Aaronontheweb May 4, 2026
73e09b7
docs: final queue updates and page revisions from pipeline
Aaronontheweb May 4, 2026
1636194
docs: fix contradictions and broken links across 5 pages
Aaronontheweb May 4, 2026
2d52a62
docs: fix incorrect default provider claim in cli/init
Aaronontheweb May 4, 2026
6a9f752
docs: write getting-started pages, update Slack/Discord with screenshots
Aaronontheweb May 4, 2026
202a492
docs: write skills/skill-server and skills/skill-feeds pages
Aaronontheweb May 5, 2026
e9e1380
docs: add health checks page, fix webhooks/secrets pages
Aaronontheweb May 5, 2026
f26e7e6
Add PR validation workflow with link-validator
Aaronontheweb May 5, 2026
73ec6b0
fix: remove white background rect from Starlight logo SVG
Aaronontheweb May 5, 2026
1fad72f
Add Mermaid support, fix security docs, remove skill feed auth
Aaronontheweb May 5, 2026
9602fc9
docs: remove unnecessary prerequisites section from reminders page
Aaronontheweb May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: pr_validation

on:
pull_request:
branches:
- dev

jobs:
build-site:
name: "Build Astro"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build site
run: npm run build

link-validation:
name: "Link and URL Validation"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build site
run: npm run build

- name: Install link-validator
run: |
INSTALL_DIR="${GITHUB_WORKSPACE}/link-validator-bin"
mkdir -p "$INSTALL_DIR"

echo "Downloading link-validator v0.1.1..."
curl -L https://github.com/Aaronontheweb/link-validator/releases/download/v0.1.1/link-validator-linux-x64.tar.gz -o link-validator.tar.gz
tar -xzf link-validator.tar.gz -C "$INSTALL_DIR"
chmod +x "$INSTALL_DIR/link-validator"

"$INSTALL_DIR/link-validator" --version
echo "LINK_VALIDATOR_PATH=$INSTALL_DIR/link-validator" >> $GITHUB_ENV

- name: Serve site and validate links
run: |
# Start Astro preview server in background
npx astro preview --port 4321 &
SERVER_PID=$!

# Wait for server to be ready
echo "Waiting for Astro preview server to start..."
for i in $(seq 1 30); do
if curl -sf http://localhost:4321 > /dev/null 2>&1; then
echo "Server is ready."
break
fi
sleep 1
done

if ! curl -sf http://localhost:4321 > /dev/null 2>&1; then
echo "Failed to start preview server"
kill $SERVER_PID 2>/dev/null
exit 1
fi

# Run link validator
echo "Running link validator..."
$LINK_VALIDATOR_PATH --url http://localhost:4321 \
--output link-validation-report.md \
--max-external-retries 3 || VALIDATION_EXIT_CODE=$?

# Display report
echo "Link validation report:"
cat link-validation-report.md

# Cleanup
kill $SERVER_PID 2>/dev/null

exit ${VALIDATION_EXIT_CODE:-0}

- name: Upload link validation report
uses: actions/upload-artifact@v4
if: always()
with:
name: link-validation-report
path: link-validation-report.md
retention-days: 30
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,15 @@ public/screenshots/output/
# Screenshot pipeline temp
screenshots/.netclaw-screenshot-home/

# Doc writing pipeline logs and screenshots
docs-logs/

# OpenProse runtime state
.prose/runs/
.prose/agents/

# Local Claude settings and skills
.claude/

# OS files
.DS_Store
214 changes: 214 additions & 0 deletions .prose/write-doc-page.prose
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
# Write Documentation Page
# Full pipeline: research → draft → parallel critique → humanizer → revise → visual verify → commit
#
# Usage:
# prose run .prose/write-doc-page.prose PAGE=cli/status
# prose run .prose/write-doc-page.prose PAGE=observability/opentelemetry

input PAGE: "Documentation page slug (e.g. cli/status, observability/opentelemetry)"

# --- Agents ---

agent researcher:
model: sonnet
prompt: "You are a source code researcher. You read code, specs, and docs to extract facts. Be thorough — report file paths, line numbers, and exact values. No speculation."

agent writer:
model: opus
prompt: """
You are a technical documentation writer for netclaw.dev.
Writing principles — less is more:
- Be minimal. Only include what people actually need.
- One sentence that teaches something beats three that elaborate.
- Code examples are worth more than prose. Show, don't tell.
- Tables over prose for reference material.
- Visuals over text — if a screenshot explains it better, use it.
- No filler paragraphs. No padding. No hedging.
- Every sentence should teach something or help the reader do something. Delete the rest.
- Tone: confident, casual-technical, like explaining to a coworker.
"""

agent critic:
model: sonnet
prompt: "You are a documentation reviewer. Be specific and actionable. Report findings as bullet lists with exact text to change."

agent visual-reviewer:
model: sonnet
prompt: "You are a visual design reviewer for documentation pages. Check rendered screenshots for layout issues, broken elements, missing content, and readability problems."

# --- Stage 1: Gather Source Material ---

let source = session: researcher
prompt: """
Gather all source material for the netclaw documentation page: **{PAGE}**

Read CLAUDE.md for the full authoring workflow, page type classification, and templates.

Then collect from the netclaw source repo (expected at ~/repositories/stannardlabs/netclaw/):
1. Source code relevant to this page topic (CLI commands, config schemas, services, handlers)
2. Specs in docs/spec/ that cover this topic
3. ADRs in docs/adr/ if relevant
4. Runbooks in docs/runbooks/ if relevant
5. PROJECT_CONTEXT.md and CONTRIBUTING.md for overall context

Also collect from this repo:
6. The page stub in src/content/docs/{PAGE}.md (title, description)
7. Screenshots in screenshots/output/ matching this topic
8. Landing page src/pages/index.astro for product positioning
9. Any already-written docs that should be cross-referenced

Report:
- What you found (with file paths and key details)
- What screenshots are available
- What gaps remain that can't be filled from source material
"""

# --- Stage 2: Write Draft ---

session: writer
prompt: """
Write the documentation page for **{PAGE}** on the netclaw.dev site.

Follow the Documentation Authoring Workflow in CLAUDE.md exactly:
- Identify the page type (Step 1)
- Use the correct template for that page type (Step 4)
- Integrate screenshots where they exist (Step 5)
- Write to the file: src/content/docs/{PAGE}.md

Source material from the research phase is in your context. Use it.

Skip the interview step — this is autonomous. If critical info is missing,
leave a <!-- TODO: needs user input — [specific question] --> comment.

Remember: less is more. Minimal. Show don't tell. Visuals over text. No filler.
"""
context: source

# --- Stage 3: Parallel Critique ---

parallel:
technical = session: critic
prompt: """
**Technical Accuracy Review** for src/content/docs/{PAGE}.md

Read the drafted page and compare every claim against the netclaw source code
at ~/repositories/stannardlabs/netclaw/.

Check:
- Are flag names, default values, and behavior descriptions correct?
- Do code examples actually work?
- Do command output descriptions match what screenshots show?
- Are there any claims not supported by the source?
- Is anything technically wrong or misleading?

Report findings as a bullet list. Be specific — include what's wrong and what's correct.
"""
context: source

empathy = session: critic
prompt: """
**Reader Empathy Review** for src/content/docs/{PAGE}.md

Read the drafted page as a sysadmin or developer who just installed netclaw.

Check:
- What would a reader find missing or confusing?
- Are there unstated prerequisites?
- Would a reader know what to do next?
- Identify 2-4 external links that would genuinely help (official docs for third-party tools, relevant guides)
- Flag any jargon not defined or linked
- Are there unanswered questions a reader would have?

Report findings as a bullet list with specific, actionable suggestions.
"""
context: source

humanizer = session: critic
prompt: """
**Humanizer Review** for src/content/docs/{PAGE}.md

Read the drafted page and flag AI writing patterns:
- Robotic phrasing: "It is important to note...", "This section describes..."
- Unnecessary hedging: "you may want to", "it is recommended that"
- Passive voice where active is better
- Over-explaining the obvious
- Repetitive sentence structure
- Generic filler that teaches nothing
- AI vocabulary: ensure, leverage, utilize, comprehensive, robust, seamless
- Rule of three overuse, em dash overuse
- Inline-header vertical lists (bold word + colon pattern)

The tone should be confident and casual-technical, like explaining to a coworker.

For each finding, include the exact text and a suggested rewrite.
"""

# --- Stage 4: Revise ---

let revised = session: writer
prompt: """
Revise src/content/docs/{PAGE}.md incorporating ALL feedback from the three reviewers.

In a single pass:
1. Fix every technical inaccuracy flagged
2. Add missing context, prerequisites, and external links the empathy reviewer identified
3. Rewrite every robotic or hedging phrase the humanizer flagged
4. Ensure cross-links to other netclaw docs use correct slugs
5. Verify the page still follows its template from CLAUDE.md

Then do a final anti-AI pass: read the page aloud in your head. Does it sound like
a person wrote it? If not, fix what's off.

Write the final version to src/content/docs/{PAGE}.md.
"""
context: [technical, empathy, humanizer, source]

# --- Stage 5: Visual Verification ---

let visual = session: visual-reviewer
prompt: """
Verify the rendered documentation page for **{PAGE}** looks correct.

Steps:
1. Run: npm run build
2. If build fails, fix the issue in src/content/docs/{PAGE}.md and rebuild.
3. Use Playwright MCP tools (browser_navigate, browser_screenshot) to verify the page:
a. Navigate to http://localhost:4321/{PAGE}/
b. Take a screenshot
c. Check the rendered page:
- Does it render correctly? No broken layout, missing sections, or garbled text?
- Do tables render properly?
- Are screenshots/images displaying?
- Is the content readable against the dark background?
- Does the sidebar show the correct section highlighted?
4. If there are visual issues, fix them and re-check.

If the dev server isn't running or Playwright MCP isn't available, skip visual
verification — the build check is sufficient. Do not hang or wait.

Report what you see. If everything looks good, say so.
"""
context: revised

# --- Stage 6: Commit ---

session: writer
prompt: """
Final steps for **{PAGE}**:

1. Run npm run build one final time to confirm no errors.
2. Run through the quality checklist from CLAUDE.md Step 9:
- Frontmatter title and description set
- Correct template for page type
- All referenced screenshots exist
- No placeholder text (Content coming soon, TODO, TBD)
- Cross-links use correct slugs
- Code examples are complete and copy-pasteable
- At least 2 external links
- No robotic phrasing or hedging
3. Stage ONLY the documentation page: git add src/content/docs/{PAGE}.md
4. Commit: git commit -m "docs: write {PAGE}"

If any checklist item fails, fix it before committing.
"""
context: visual
Loading
Loading