بنقرة واحدة
doc-tester
// Agent for validating Hex1b documentation against actual library behavior. Use when auditing documentation accuracy, testing interactive examples, or identifying discrepancies between documentation and implementation.
// Agent for validating Hex1b documentation against actual library behavior. Use when auditing documentation accuracy, testing interactive examples, or identifying discrepancies between documentation and implementation.
Guidelines for reviewing API design in the Hex1b codebase. Use when evaluating public APIs, reviewing accessibility modifiers, or assessing whether new APIs follow project conventions.
Step-by-step guide for creating new widgets in the Hex1b TUI library. Use when implementing new widgets from scratch, including widget records, nodes, extension methods, theming, reconciliation, and tests.
Agent for diagnosing and fixing flaky terminal UI tests in the Hex1b test suite. Use when tests pass locally but fail in CI, or when tests exhibit timing-sensitive behavior.
Guidelines for producing accurate and maintainable documentation for the Hex1b TUI library. Use when writing XML API documentation comments, creating end-user guides, or updating existing documentation.
Guidelines for writing unit tests in the Hex1b TUI library. Use when creating new tests for widgets, nodes, or terminal functionality.
Guidelines for running and interpreting Surface API performance benchmarks. Use when modifying code in src/Hex1b/Surfaces/ to ensure performance is not regressed.
| name | doc-tester |
| description | Agent for validating Hex1b documentation against actual library behavior. Use when auditing documentation accuracy, testing interactive examples, or identifying discrepancies between documentation and implementation. |
This skill provides guidelines for AI agents to systematically validate the Hex1b documentation site against the actual behavior of the Hex1b library. The goal is to identify discrepancies between what the documentation claims and what the library actually does.
You are testing the documentation as if you were a new user learning Hex1b.
❌ DO NOT:
src/Hex1b/*.cs files to understand widget behavior✅ DO:
If documentation is insufficient to proceed:
This is valuable feedback! Gaps in documentation are exactly what we're trying to find.
Can someone learn Hex1b from these docs alone?
Does the documentation match reality?
The doc-tester uses a local development environment for fast iteration:
This allows testing documentation changes before they go live.
The Hex1b workspace uses .NET Aspire to orchestrate local services. The app model in apphost.cs defines:
| Resource | Type | Purpose |
|---|---|---|
website | CSharpApp | WebSocket backend for interactive demos (src/Hex1b.Website) |
content | ViteApp | VitePress documentation site (src/content) |
The content resource serves the documentation. Use mcp_aspire_list_resources to get the current URL.
⚠️ CRITICAL: Terminal Isolation
Aspire must run in an isolated background process to avoid interference with other terminal commands. When running commands in the same terminal session as Aspire, the terminal may send signals that stop Aspire unexpectedly.
Recommended approach - run Aspire with nohup:
# Start Aspire in background (won't be interrupted by other commands)
cd /path/to/hex1b
nohup aspire run > /tmp/aspire.log 2>&1 &
# Wait a few seconds for startup, then check logs
sleep 10 && head -15 /tmp/aspire.log
Alternative - use isBackground: true:
When using the run_in_terminal tool, set isBackground: true for the Aspire command, then run all subsequent commands in separate terminal invocations.
Use the Aspire MCP tools to get the content URL:
# Call the MCP tool
mcp_aspire_list_resources
# Look for the content resource endpoint_urls
# Example output: http://content-hex1b.dev.localhost:1189
The URL format is typically http://content-hex1b.dev.localhost:1189 but always verify with mcp_aspire_list_resources as ports can vary.
IMPORTANT: Use the local content URL for all testing, not https://hex1b.dev
To test code examples accurately, build and use local Hex1b packages:
# Run the build-local-package script in this skill directory
./.github/skills/doc-tester/build-local-package.sh
This script:
src/Hex1b into a local NuGet package.doc-tester-packages/NuGet.config for test projectsSee Local Package Testing for detailed workflow.
The doc-tester agent produces actionable feedback that can:
| Area | Description |
|---|---|
| Conceptual accuracy | Do explanations match actual implementation? |
| Code examples | Do code samples compile and run as described? |
| Interactive demos | Do live terminal demos behave as documented? |
| API references | Are parameter names, types, and behaviors accurate? |
| Navigation & links | Do internal links work? Are pages accessible? |
| Feature coverage | Are all significant features documented? |
The documentation site (served by Aspire's content resource) includes:
/ # Landing page with feature overview
/guide/getting-started # Getting started tutorial
/guide/first-app # Quick start guide
/guide/widgets-and-nodes # Core architecture concepts
/guide/layout # Layout system
/guide/input # Input handling
/guide/testing # Testing guide
/guide/theming # Theming system
/guide/widgets/ # Per-widget documentation
text
button
textbox
list
stacks
containers
navigator
...
/deep-dives/ # Advanced topics
reconciliation
...
/api/ # API reference
/gallery # Examples showcase
All testing uses Playwright MCP tools to interact with the documentation site.
aspire run from the repository rootmcp_aspire_list_resources to find the content endpoint.github/skills/doc-tester/build-local-package.sh1.0.0-local.20260105120000)Use Playwright MCP tools to browse the documentation:
# Take an accessibility snapshot to read page content
mcp_playwright_browser_snapshot
# Navigate to a page
mcp_playwright_browser_click with element="Getting Started link"
# Read interactive demos
mcp_playwright_browser_snapshot
For each documentation page:
For each code example shown in the documentation:
Use the .doc-tester-workspace/ directory in the repository root (this is gitignored):
# Create test project in the workspace (not /tmp!)
cd /path/to/hex1b
mkdir -p .doc-tester-workspace
cd .doc-tester-workspace
dotnet new console -n DocTest --force
cp ../.doc-tester-packages/NuGet.config DocTest/
cd DocTest
dotnet add package Hex1b --version 1.0.0-local.XXXXXX
# Paste the code example into Program.cs and build
dotnet build
⚠️ CRITICAL: Use an interactive shell, not direct command execution
After building successfully, use TerminalMcp with an interactive shell to run and validate:
# 1. Activate terminal tools
activate_terminal_session_control_tools
activate_terminal_interaction_tools
# 2. Start an interactive bash shell (use start_pwsh_terminal on Windows)
mcp_terminal-mcp_start_bash_terminal workingDirectory="/path/to/hex1b"
# 3. Wait for shell prompt
mcp_terminal-mcp_wait_for_terminal_text text="$" timeoutSeconds=5
# 4. Navigate to the test project
mcp_terminal-mcp_send_terminal_input text="cd .doc-tester-workspace/DocTest"
mcp_terminal-mcp_send_terminal_key key="Enter"
mcp_terminal-mcp_wait_for_terminal_text text="$" timeoutSeconds=5
# 5. Run the TUI application
mcp_terminal-mcp_send_terminal_input text="dotnet run"
mcp_terminal-mcp_send_terminal_key key="Enter"
# 6. Wait for the TUI to render
mcp_terminal-mcp_wait_for_terminal_text text="Expected UI text" timeoutSeconds=15
# 7. Capture and verify the visual output (ALWAYS use both)
mcp_terminal-mcp_capture_terminal_text # For text-based verification
mcp_terminal-mcp_capture_terminal_screenshot savePath="/path/to/hex1b/.doc-tester-workspace/screenshots/test-name-step1.svg"
# 8. Interact with the TUI (type, navigate, etc.)
mcp_terminal-mcp_send_terminal_input text="Hello"
mcp_terminal-mcp_send_terminal_key key="Tab"
mcp_terminal-mcp_send_terminal_key key="Enter"
# 9. Verify the result after interaction (ALWAYS use both)
mcp_terminal-mcp_capture_terminal_text # Text verification
mcp_terminal-mcp_capture_terminal_screenshot savePath="/path/to/hex1b/.doc-tester-workspace/screenshots/test-name-step2.svg"
# 10. Exit the TUI (Ctrl+C) and clean up
mcp_terminal-mcp_send_terminal_key key="c" modifiers=["Ctrl"]
mcp_terminal-mcp_stop_terminal sessionId="..."
mcp_terminal-mcp_remove_session sessionId="..."
Why TerminalMcp? Standard dotnet run cannot capture TUI visual output. TerminalMcp provides a virtual terminal that captures the screen buffer, allowing you to verify:
capture_terminal_screenshot for visual analysis)capture_terminal_text for verification)⚠️ CRITICAL: Always use BOTH capture_terminal_text AND capture_terminal_screenshot when testing TUI apps. Text capture verifies content, but screenshots reveal visual elements (colors, borders, focus indicators) that text alone cannot assess.
Why interactive shell? Starting dotnet run directly can fail because the PTY isn't properly initialized. Starting a shell first ensures proper environment and terminal setup.
Interactive demos have a "Run in browser" button. Test them:
# Click the demo button
mcp_playwright_browser_click with element="Run in browser"
# Wait for terminal to appear
mcp_playwright_browser_wait_for with text="..."
# Take snapshot to see the demo
mcp_playwright_browser_snapshot
# Interact with the demo
mcp_playwright_browser_type with text="test input"
mcp_playwright_browser_press with key="Tab"
mcp_playwright_browser_press with key="Enter"
# Snapshot again to see results
mcp_playwright_browser_snapshot
Verify:
As you navigate, evaluate:
When you get stuck:
When given a focus area, use these templates to guide testing:
## Widget: [WidgetName]
### Page: /guide/widgets/[widget-name]
#### Navigation (Playwright)
- [ ] Page loads successfully
- [ ] All sections visible in snapshot
- [ ] Code examples readable
#### Content Clarity
- [ ] Widget purpose is clear
- [ ] When to use this widget is explained
- [ ] Basic usage example is complete and runnable
#### Code Example Testing
- [ ] Example 1: Compiles and runs as described
- [ ] Example 2: Compiles and runs as described
- [ ] (etc.)
#### Live Demo Testing (Playwright)
- [ ] **"Run in browser" button exists** for at least one code example
- [ ] Demo loads when clicked (no 500 errors)
- [ ] Initial state matches description
- [ ] Interactions work as documented
- [ ] Demo matches the code example shown
⚠️ **CRITICAL: If "Run in browser" button is MISSING for interactive widgets, report this as a Critical bug.** Every interactive widget (buttons, inputs, lists, etc.) MUST have at least one working interactive demo. Missing demos indicate incomplete documentation.
#### Cross-Reference
- [ ] Matches `src/Hex1b/Widgets/[WidgetName]Widget.cs`
- [ ] Matches `src/Hex1b/Nodes/[WidgetName]Node.cs`
- [ ] Extension methods accurate
- [ ] Theme elements documented
## Guide: [Page Title]
### Page: /guide/[page-name]
#### Content Verification
- [ ] Conceptual explanations accurate
- [ ] Terminology consistent with codebase
- [ ] Architecture diagrams current
- [ ] Example code compiles
#### Code Examples
For each example:
- [ ] Example [N]: Compiles successfully
- [ ] Example [N]: Runs as described
- [ ] Example [N]: Output matches documentation
#### Links
- [ ] All internal links work
- [ ] External links accessible
- [ ] "Next Steps" links valid
## API: [Type/Namespace]
### Page: /api/[path]
#### Completeness
- [ ] All public types documented
- [ ] All public members documented
- [ ] Parameter descriptions accurate
- [ ] Return value descriptions accurate
#### Accuracy
- [ ] Type signatures match source
- [ ] Default values documented correctly
- [ ] Exceptions documented
- [ ] Examples work as shown
After testing a focus area, produce a structured report:
# Documentation Test Report
**Focus Area:** [Description]
**Date:** [ISO Date]
**Tester:** doc-tester agent
## Summary
| Category | Passed | Failed | Warnings |
|----------|--------|--------|----------|
| Content Accuracy | X | Y | Z |
| Code Examples | X | Y | Z |
| Interactive Demos | X | Y | Z |
| Links | X | Y | Z |
## Critical Issues
Issues that make documentation misleading or incorrect.
### Issue 1: [Brief Title]
**Location:** [Page URL and section]
**Type:** [Content/Example/Demo/Link]
**Severity:** Critical
**What the documentation says:**
> [Quote from documentation]
**What actually happens:**
> [Description of actual behavior]
**Evidence:**
[Code snippet, error message, or screenshot description]
**Recommended Action:**
- [ ] Update documentation to match behavior
- [ ] Fix implementation to match documentation
- [ ] Add clarifying note
---
## Warnings
Issues that may confuse readers but aren't strictly incorrect.
### Warning 1: [Brief Title]
**Location:** [Page URL and section]
**Issue:** [Description]
**Suggestion:** [How to improve]
---
## Passed Checks
[List of items that passed validation - brief summary]
## Recommendations
1. **Priority fixes:** [List critical issues to address first]
2. **Documentation gaps:** [Missing documentation to add]
3. **Product issues:** [Implementation bugs discovered]
Testing code examples requires running them against the current Hex1b source, not the published NuGet package. This ensures documentation matches the actual behavior of the code in the repository.
The build-local-package.sh script in this skill directory handles package creation:
./.github/skills/doc-tester/build-local-package.sh
What it does:
dotnet pack on src/Hex1b/Hex1b.csproj0.35.0-local.20260105120000).doc-tester-packages/ in the repo rootNuGet.config that prioritizes the local feedOutput:
✓ Built Hex1b 0.35.0-local.20260105120000
✓ Package: /path/to/hex1b/.doc-tester-packages/Hex1b.0.35.0-local.20260105120000.nupkg
✓ NuGet config: /path/to/hex1b/.doc-tester-packages/NuGet.config
When validating code examples from documentation:
Test projects are created in .doc-tester-workspace/ within the hex1b repository. This directory is gitignored.
# Navigate to the hex1b repo root
cd /path/to/hex1b
# Create test project directory (name it descriptively for the test)
mkdir -p .doc-tester-workspace/DocTest
cd .doc-tester-workspace/DocTest
# Create new console project
dotnet new console --force
# Copy the local NuGet.config (contains absolute path to packages)
cp ../../.doc-tester-packages/NuGet.config .
# Add the local Hex1b package (use version from build script output)
# The NuGet.config uses an absolute path, so no need to copy the .nupkg file
dotnet add package Hex1b --version 1.0.0-local.20260105120000
# Replace Program.cs with the documentation code sample
cat > Program.cs << 'EOF'
// Paste code example from documentation here
EOF
# Build to verify it compiles
dotnet build
Hex1b applications are TUI (Terminal User Interface) apps that take over the terminal. Use the TerminalMcp server with an interactive shell:
# Start an interactive shell (use start_pwsh_terminal on Windows)
start_bash_terminal workingDirectory="/path/to/hex1b"
# Wait for shell prompt
wait_for_terminal_text text="$" timeoutSeconds=5
# Navigate to test project and run
send_terminal_input text="cd .doc-tester-workspace/DocTest && dotnet run\n"
# Wait for the TUI to render
wait_for_terminal_text text="Expected text" timeoutSeconds=10
# Capture and verify output (ALWAYS use both for TUI apps)
capture_terminal_text # Text-based verification
capture_terminal_screenshot savePath="/path/to/hex1b/.doc-tester-workspace/screenshots/example-name.svg"
# Interact with the TUI if needed
send_terminal_key key="Tab"
send_terminal_input text="test"
# Exit the TUI (Ctrl+C or Escape depending on the app)
send_terminal_key key="Escape"
# Clean up the session
remove_session sessionId="..."
See the TerminalMcp Server section for full details.
For testing multiple examples efficiently, use this pattern:
#!/bin/bash
# test-examples.sh
REPO_ROOT="$(cd "$(dirname "$0")" && pwd)"
EXAMPLES_DIR="$1"
PACKAGE_VERSION="$2"
NUGET_CONFIG="$REPO_ROOT/.doc-tester-packages/NuGet.config"
WORKSPACE="$REPO_ROOT/.doc-tester-workspace"
# Ensure workspace exists
mkdir -p "$WORKSPACE"
for example in "$EXAMPLES_DIR"/*.cs; do
name=$(basename "$example" .cs)
test_dir="$WORKSPACE/test-$name"
echo "Testing: $name"
# Clean up any previous test
rm -rf "$test_dir"
mkdir -p "$test_dir"
cd "$test_dir"
dotnet new console --force > /dev/null
cp "$NUGET_CONFIG" .
dotnet add package Hex1b --version "$PACKAGE_VERSION" > /dev/null 2>&1
cp "$example" Program.cs
if dotnet build > /dev/null 2>&1; then
echo " ✓ $name: Compiles"
else
echo " ✗ $name: Build failed"
fi
done
echo "Test projects preserved in $WORKSPACE for inspection"
The build script creates a NuGet.config with an absolute path to the package directory:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="doc-tester-local" value="/absolute/path/to/hex1b/.doc-tester-packages" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="doc-tester-local">
<package pattern="Hex1b" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
This ensures:
.nupkg file to the test project directoryAfter testing, clean up:
# Remove local packages
rm -rf .doc-tester-packages/
# Or run the build script with --clean
./.github/skills/doc-tester/build-local-package.sh --clean
The doc-tester uses Aspire to run the documentation site locally. This enables testing against the latest changes before deploying.
aspire run
If prompted about an existing instance, allow it to stop the previous one.
Use the Aspire MCP tools to discover service endpoints:
# List all resources and their status
list_resources
# Expected output includes:
# - content (ViteApp) → http://localhost:1189
# - website (CSharpApp) → http://localhost:XXXXX
The content resource URL is the documentation site. Use this URL for all testing instead of https://hex1b.dev.
Use Aspire diagnostic tools to debug issues:
| Tool | Purpose |
|---|---|
list_console_logs | View stdout/stderr from resources |
list_structured_logs | Query structured log entries |
list_traces | View distributed traces |
execute_resource_command | Restart resources if needed |
# 1. Start environment
aspire run
# 2. Build local packages (in another terminal)
./.github/skills/doc-tester/build-local-package.sh
# 3. Use MCP tools to get content URL
# list_resources → find content endpoint
# 4. Fetch pages and test
# fetch_webpage with local URLs
# 5. Test code examples
# Create temp projects with local packages
# 6. Check for errors
# list_console_logs for website resource
Interactive demos connect to the website resource via WebSocket. When testing demos:
website resource URL from list_resources/ws/example/{example-id}list_console_logs for the website resource if demos failBefore testing, verify resources are healthy:
list_resources
Look for:
Running state for both content and websiteWaiting or Failed, check logs with list_console_logsThe TerminalMcp server provides tools for running and observing terminal applications. This is essential for testing Hex1b code examples that produce TUI (Terminal User Interface) output, since standard command-line execution cannot capture the visual output of TUI apps.
Use TerminalMcp when you need to:
TerminalMcp solves the limitation that TUI apps take over the terminal and can't be easily observed through standard tooling.
TerminalMcp works by starting an interactive shell and then sending commands to it like a user would. The supported shells are:
| Shell | OS | Preferred For |
|---|---|---|
bash | Linux, macOS | Linux and macOS systems |
pwsh (PowerShell) | Windows, Linux, macOS | Windows systems |
Detecting Available Shells:
Before starting a terminal session, check which shells are available:
# On Linux/macOS - check for bash
which bash
# Check for PowerShell (cross-platform)
which pwsh
Use bash on Linux/macOS and pwsh on Windows.
| Tool | Purpose |
|---|---|
start_bash_terminal | Start a new bash shell session (Linux/macOS) |
start_pwsh_terminal | Start a new PowerShell session (Windows or cross-platform) |
stop_terminal | Kill the process (session remains for inspection) |
remove_session | Fully dispose and clean up a session |
list_terminals | List all active terminal sessions |
send_terminal_input | Send text input (commands) to the shell |
send_terminal_key | Send special keys (Enter, Tab, arrows, F1-F12) |
resize_terminal | Resize the terminal dimensions |
capture_terminal_text | Get the screen buffer as plain text |
capture_terminal_screenshot | Save the screen as SVG and PNG (requires savePath) |
wait_for_terminal_text | Wait for specific text to appear |
⚠️ IMPORTANT: Start a shell, then send commands interactively
Do NOT try to run dotnet run directly as the command. Instead, start an interactive shell and send commands to it like a user would:
# 1. Start an interactive bash shell (use start_pwsh_terminal on Windows)
mcp_terminal-mcp_start_bash_terminal workingDirectory="/path/to/hex1b"
# 2. Wait for the shell prompt to appear
mcp_terminal-mcp_wait_for_terminal_text text="$" timeoutSeconds=5
# 3. Send a command by typing it + pressing Enter
mcp_terminal-mcp_send_terminal_input text="cd .doc-tester-workspace/DocTest"
mcp_terminal-mcp_send_terminal_key key="Enter"
# 4. Wait for the command to complete (shell prompt returns)
mcp_terminal-mcp_wait_for_terminal_text text="$" timeoutSeconds=5
# 5. Run the TUI application
mcp_terminal-mcp_send_terminal_input text="dotnet run"
mcp_terminal-mcp_send_terminal_key key="Enter"
# 6. Wait for the TUI to render
mcp_terminal-mcp_wait_for_terminal_text text="TextBox Widget Demo" timeoutSeconds=15
# 7. Capture and verify output
mcp_terminal-mcp_capture_terminal_text
# 8. Interact with the TUI (type, Tab, etc.)
mcp_terminal-mcp_send_terminal_input text="Hello World"
mcp_terminal-mcp_send_terminal_key key="Tab"
# 9. Exit the TUI (Ctrl+C)
mcp_terminal-mcp_send_terminal_key key="c" modifiers=["Ctrl"]
# 10. Clean up
mcp_terminal-mcp_stop_terminal sessionId="..."
mcp_terminal-mcp_remove_session sessionId="..."
The dedicated shell tools (start_bash_terminal, start_pwsh_terminal) ensure:
For Hex1b TUI applications:
run_in_terminal (standard terminal)cd commanddotnet run by sending the command + Enterwait_for_terminal_textcapture_terminal_text AND capture_terminal_screenshotAll terminal screenshots should be saved to .doc-tester-workspace/screenshots/ with descriptive filenames:
.doc-tester-workspace/
├── screenshots/
│ ├── button-basic-initial.svg
│ ├── button-basic-initial.png
│ ├── button-basic-after-click.svg
│ ├── button-basic-after-click.png
│ ├── textbox-typing.svg
│ ├── textbox-typing.png
│ └── ...
└── DocTest/
└── ...
Use filenames that identify the test and step, e.g., widget-example-step.svg. Both SVG and PNG files are generated automatically.
When documentation shows expected output:
capture_terminal_text for text-based verificationcapture_terminal_screenshot with savePath to save for inspection (e.g., savePath=".doc-tester-workspace/screenshots/test-name.svg")⚠️ IMPORTANT: TUI apps have visual elements (colors, borders, styling) that cannot be assessed from plain text alone. Always save the screenshot for inspection. Screenshots are preserved (not deleted) so you can review them after testing.
stop_terminal then remove_sessionThese are the primary tools for testing. Use these instead of reading source files.
| Tool | Purpose |
|---|---|
mcp_playwright_browser_snapshot | Get accessibility tree of current page (read content) |
mcp_playwright_browser_click | Click links, buttons, demos |
mcp_playwright_browser_navigate | Go to a specific URL |
mcp_playwright_browser_type | Type into text fields |
mcp_playwright_browser_press | Press keyboard keys (Tab, Enter, etc.) |
# Navigate to the docs
mcp_playwright_browser_navigate url="http://content-hex1b.dev.localhost:1189/guide/widgets/text"
# Read the page content
mcp_playwright_browser_snapshot
The snapshot returns an accessibility tree showing all text content, links, buttons, and interactive elements.
Accessibility snapshots cannot verify visual correctness. Snapshots show DOM structure and text content, but NOT:
For visual verification, use screenshots:
# Take a screenshot to verify visual output
mcp_playwright_browser_take_screenshot
# Or screenshot a specific element
mcp_playwright_browser_take_screenshot element="Terminal demo output" ref="e123"
When to use screenshots:
# Find and click the demo button
mcp_playwright_browser_click element="Run in browser"
# Wait for demo to load
mcp_playwright_browser_wait_for text="some expected text"
# Interact
mcp_playwright_browser_press key="Tab"
mcp_playwright_browser_type text="Hello"
mcp_playwright_browser_press key="Enter"
# See results
mcp_playwright_browser_snapshot
The interactive terminal demos use WebSocket connections. When you click "Run in browser":
Use mcp_playwright_browser_press to send keyboard input to the terminal.
When documentation issues are found, create actionable items for the doc-writer skill:
## Doc-Writer Task: [Issue Title]
**Source:** doc-tester report [date]
**Priority:** [Critical/High/Medium/Low]
**Page URL:** [URL from Playwright navigation]
**Issue:**
[What's wrong or missing - based on what you saw in the browser]
**User Impact:**
[How this affects someone trying to learn from the docs]
**Suggested fix:**
[What information should be added or corrected]
If documentation is insufficient to complete a task:
## Documentation Gap: [Title]
**What I was trying to do:**
[Task or goal]
**Where I got stuck:**
[Page URL and section]
**What information was missing:**
[What the docs should have told me]
**Questions a user would have:**
1. [Question 1]
2. [Question 2]
**Recommendation:**
Add [specific content] to [specific location]
This is valuable feedback! Gaps that block a user are high-priority fixes.
When the docs are correct but the library doesn't work as documented:
## Bug Report: [Issue Title]
**Discovered via:** Documentation testing
**Affected documentation:** [URL]
**Expected behavior (per docs):**
[What documentation says should happen]
**Actual behavior:**
[What actually happens when running the code]
**Code example from docs:**
[The exact code you copied from the documentation]
**Recommendation:**
- [ ] Fix implementation to match documented behavior
- [ ] Update documentation if current behavior is intentional
using statementsWhen testing documentation, verify that code examples follow these style conventions. Violations of these rules should be reported as bugs.
Prefer synchronous callbacks for Hex1bApp unless the example specifically requires async behavior:
✅ Correct - Use the synchronous overload:
var app = new Hex1bApp(ctx => ctx.VStack(v => [
v.Text("Hello"),
v.Button("Click me")
]));
❌ Incorrect - Don't use Task.FromResult unless async is required:
var app = new Hex1bApp(ctx => Task.FromResult<Hex1bWidget>(
ctx.VStack(v => [
v.Text("Hello"),
v.Button("Click me")
])
));
When async IS required:
await something| Rule | Correct | Incorrect |
|---|---|---|
| Use collection expressions | v => [v.Text("A"), v.Text("B")] | v => new[] { v.Text("A"), v.Text("B") } |
Prefer var | var app = new Hex1bApp(...) | Hex1bApp app = new Hex1bApp(...) |
Include required using statements | Always show imports | Omit imports |
| Use file-scoped classes for state | class MyState { ... } at end | Inline anonymous types |
When a code example violates style rules:
Example report entry:
### Bug: Style Violation - Unnecessary async callback
**Location:** /guide/widgets/button - Basic Usage example
**Rule:** Prefer synchronous Hex1bApp callbacks
**Current:**
\`\`\`csharp
var app = new Hex1bApp(ctx => Task.FromResult<Hex1bWidget>(ctx.Button("Click")));
\`\`\`
**Should be:**
\`\`\`csharp
var app = new Hex1bApp(ctx => ctx.Button("Click"));
\`\`\`
This skill will evolve based on testing experience. When you discover:
Track skill evolution in git history for this file.