Setup guide

Set up DocBot

Install from GitHub Marketplace and DocBot documents the next pull request. Add one configuration file to say which files matter, and trigger a full rebuild or architecture guides when you want the whole repository covered.

500,000 tokens free. No credit card. No per-seat fees.

How it works

Every DocBot commit carries [skip ci], so it never triggers your pipelines.

  1. A pull request opens

    DocBot runs on opened, reopened and synchronize, skipping its own commits.

  2. Inside your token balance

    A pull request that fits your token balance is documented when it opens. Set require_pr_approval to true (any tier) and DocBot posts a token estimate and waits for /docbot-approve first.

  3. Documentation is generated

    Per-file documents, per-directory READMEs and a master index, depending on output_mode, with Mermaid diagrams chosen per directory. Unchanged files are served from a cache and not billed again.

  4. It is committed to _docs/

    Always _docs/; the folder is not configurable. The pull request comment shows files processed, tokens used, percentage of allowance, cache hits and a link to the docs.

Install

  1. Install from GitHub Marketplace

    Install DocBot and grant access to the repositories you want documented.

  2. Start on the free tier

    500,000 tokens with no time limit and no credit card. Paid tiers are launching soon; see pricing.

  3. Add a configuration file (recommended)

    Create .github/wai-docbot.yml from the template below, and set include_extensions and exclude for your project. DocBot works without it.

  4. Open a pull request

    DocBot documents the changed files and commits the docs to the pull request. With require_pr_approval: true, comment /docbot-approve first.

Full rebuilds and architecture guides

Both wait for a cost estimate you approve.

From the portal (easiest)

Sign in to the portal with GitHub, pick a repository, and press Rebuild Docs (every file in the repository) or Generate Guides (architecture guides, available after DocBot has run once). Each creates the trigger branch for you.

From Git

For a documentation rebuild:

Terminal
git checkout -b wai-docs-update
git commit --allow-empty -m "Rebuild docs"
git push origin wai-docs-update

Or add [DOCS-REBUILD] to any pull request title.

For architecture guides:

Terminal
git checkout -b wai-guides-build
git commit --allow-empty -m "Generate guides"
git push origin wai-guides-build

Or add [GUIDES-REBUILD] to any pull request title.

Approving

DocBot posts a cost estimate with your current usage and the projected total. Approve a rebuild with /docbot-rebuild-approve and guides with /docbot-guides-approve. A rebuild approval expires after seven days, and if the work grows by more than ten per cent after approval DocBot asks once more. A rebuild also produces _docs/DEPENDENCIES.md, a dependency catalogue with licence data.

Configuration

One file at .github/wai-docbot.yml. The template is complete and commented; the reference below explains each option.

.github/wai-docbot.yml
# Woden DocBot Configuration
# Place this file at: .github/wai-docbot.yml in your repository

# ============================================================================
# OUTPUT MODE
# ============================================================================
# What kind of documentation to emit per PR.
#   "directory" (recommended): one README per changed directory, summarising
#                              the files and how they relate, with an
#                              auto-selected Mermaid architecture diagram
#   "file":     per-file READMEs (the legacy default — preserved for
#               existing customers whose YAML lacks this field)
#   "both":     emit both. Higher token cost, maximum detail.
output_mode: "directory"

# ============================================================================
# PER-DIRECTORY OVERRIDES
# ============================================================================
# Per-directory tweaks to the defaults. Each entry needs `path`; the other
# fields are optional. Paths are matched exactly — no globs.
#
# directory_overrides:
#   - path: "src/api"
#     diagram_type: "sequence"        # force a diagram type for this dir
#     # diagram_type values: class_hierarchy | state_machine | data_model |
#     # sequence | component_dependency | module_relationship | none | auto
#   - path: "src/legacy"
#     skip_readme: true               # process the directory (the cache is
#                                     # populated) but suppress the README

# ============================================================================
# DOCUMENTATION FOLDER
# ============================================================================
# Where generated documentation will be stored in your repository.
# Always "_docs" in Phase 2; this field is reserved for future customisation.
docs_folder: "_docs"

# ============================================================================
# BRANCH FILTERING
# ============================================================================
# Control which target branches trigger documentation generation
# DocBot only processes PRs targeting these branches
# Supports wildcard patterns (e.g., release/* matches release/1.0.0, release/v2.0)
allowed_base_branches:
  - "main"           # Primary branch
  - "master"         # Alternative primary branch
  - "develop"        # Development branch
  - "release/*"      # Matches: release/1.0.0, release/v2.0, etc.
  - "hotfix/*"       # Matches: hotfix/critical-bug, hotfix/security-patch
  - "staging"        # Pre-production environment
  - "wai-docs-update"  # Special branch name that triggers full repository rebuilds

# ============================================================================
# DOCUMENTATION PREFERENCES
# ============================================================================
preferences:
  include_code_links: true       # Include links to source code line numbers
  include_examples: true         # Include usage examples in documentation
  require_pr_approval: false     # Auto-generate (false) or require approval (true)
  document_root_files: true      # Create separate README for root-level files

# ============================================================================
# GUIDE GENERATION - Architecture Guides
# ============================================================================
# Generate comprehensive architecture guides that document your project's
# structure, workflows, and key components
guide_projects:
  - name: architecture
    path: "."  # Root documentation folder - includes all docs
    purpose: "Document the overall architecture, workflows, and key components of the project"
    patterns: []  # Empty patterns = intelligently includes all relevant documentation

# ============================================================================
# FILE EXTENSION INCLUSION LIST
# ============================================================================
# ONLY files with these extensions will be documented
# Add or remove extensions based on your project's needs
include_extensions:
  # Python
  - ".py"

  # JavaScript/TypeScript
  - ".js"
  - ".jsx"
  - ".ts"
  - ".tsx"
  - ".mjs"
  - ".cjs"

  # Web
  - ".html"

  # C/C++
  - ".c"
  - ".cpp"
  - ".cc"
  - ".cxx"
  - ".h"
  - ".hpp"
  - ".hxx"

  # C#/.NET
  - ".cs"
  - ".vb"
  - ".fs"

  # Java/Kotlin
  - ".java"
  - ".kt"
  - ".kts"

  # Go
  - ".go"

  # Rust
  - ".rs"

  # Ruby
  - ".rb"

  # PHP
  - ".php"

  # Swift
  - ".swift"

  # Shell scripts
  - ".sh"
  - ".bash"
  - ".zsh"
  - ".fish"

  # PowerShell
  - ".ps1"
  - ".psm1"
  - ".psd1"

  # SQL
  - ".sql"

  # R
  - ".r"
  - ".R"

  # Scala
  - ".scala"

  # Dart
  - ".dart"

  # Lua
  - ".lua"

  # Infrastructure as Code
  - ".tf"    # Terraform
  - ".yaml"  # YAML (for Kubernetes, etc.)
  - ".yml"   # YAML (for Kubernetes, etc.)
  - ".bicep" # Bicep

# ============================================================================
# FILE/FOLDER EXCLUSION LIST
# ============================================================================
# Glob patterns for files and directories to EXCLUDE from documentation
# Customize by adding your own patterns or removing defaults that don't apply
exclude:
  # Custom exclusions for this project (uncomment and modify as needed)
  # - "iac/**"  # Infrastructure as code

  ## STANDARD EXCLUSIONS ##

  # Dependencies and package managers
  - "node_modules/**"
  - "vendor/**"
  - "**/package-lock.json"
  - "**/yarn.lock"
  - "**/pnpm-lock.yaml"
  - "**/composer.lock"
  - "**/Gemfile.lock"
  - "**/Pipfile.lock"
  - "**/poetry.lock"
  - "**/__pycache__/**"
  - "**/*.pyc"
  - "**/*.pyo"
  - "**/*.pyd"
  - ".venv/**"
  - "env/**"

  # Build outputs and generated files
  - "dist/**"
  - "build/**"
  - "**/build/**"
  - "**/bin/**"
  - "**/obj/**"
  - "**/out/**"
  - "**/target/**"
  - "**/.next/**"
  - "**/coverage/**"
  - "**/.cache/**"
  - "**/.parcel-cache/**"
  - "**/.webpack/**"
  - "**/.turbo/**"

  # Minified and bundled files
  - "**/*.min.js"
  - "**/*.min.css"
  - "**/*.bundle.js"
  - "**/*.bundle.css"
  - "**/*.map"
  - "**/*.chunk.js"

  # IDE and editor files
  - ".git/**"
  - ".gitignore"
  - "**/.gitignore"
  - ".gitattributes"
  - "**/.gitattributes"
  - "**/.idea/**"
  - "**/.vscode/**"
  - "**/.vs/**"
  - "**/.DS_Store"
  - "**/.history/**"
  - "**/.settings/**"
  - "**/.classpath"
  - "**/.project"
  - "**/*.swp"
  - "**/*.swo"
  - "**/*~"

  # Test coverage and cache
  - "**/.pytest_cache/**"
  - "**/.mypy_cache/**"
  - "**/.ruff_cache/**"
  - "**/__snapshots__/**"
  - "**/htmlcov/**"
  - "**/.nyc_output/**"

  # Environment and secrets
  - "**/.env"
  - "**/.env.*"
  - "**/local.settings.json"
  - "**/credential.json"
  - "**/*.pem"
  - "**/*.key"
  - "**/*.p12"
  - "**/*.crt"
  - "**/*.cer"
  - "**/secrets/**"
  - "**/*.secret"

  # Existing documentation (prevents circular documentation)
  - "**/*.md"
  - "**/*.mdx"
  - "_docs/**"
  - "_docs_/**"
  - "**/README"
  - "**/CHANGELOG"
  - "**/LICENSE"

  # Interface and model definitions
  - "**/*.idl"
  - "**/*.proto"
  - "**/*.thrift"
  - "**/*.avdl"
  - "**/*.avpr"
  - "**/*.avsc"
  - "**/Interfaces/**"
  - "**/Interface/**"
  - "**/Models/**"

  # Style sheets and lint configuration files
  - "**/.eslintrc"
  - "**/.eslintrc.js"
  - "**/.eslintrc.json"
  - "**/.prettierrc"
  - "**/*.css"
  - "**/*.scss"
  - "**/*.less"
  - "**/tailwind.config.js"
  - "**/postcss.config.js"

  # Temporary and log files
  - "**/*.log"
  - "**/*.tmp"
  - "**/*.temp"
  - "**/tmp/**"
  - "**/temp/**"
  - "**/*.bak"
  - "**/*.backup"

Options

output_mode

"file", "directory" or "both". Recommended: "directory", one README per changed directory with a file index, architecture notes and an auto-selected Mermaid diagram. "file" is the legacy default and is preserved when the field is absent from an existing customer's YAML. "both" emits both at higher token cost. A master index at _docs/README.md links to every generated document whatever the mode. An internal cache (_docs/.docbot-cache.json) reuses descriptions for files that have not changed.

directory_overrides

Per-directory tweaks. Each entry needs path (matched exactly, no globs). diagram_type forces a diagram: class_hierarchy, state_machine, data_model, sequence, component_dependency, module_relationship, none or auto. skip_readme: true still processes the directory (so the cache is populated) but emits no README, which suits legacy or generated folders.

allowed_base_branches

Target branches DocBot processes pull requests for; others are skipped with a comment. Default: ["main", "master", "develop", "release/*", "wai-docs-update"]. Wildcards are supported, so release/* and hotfix/* work. wai-docs-update is the full-rebuild branch.

excluded_branch_prefixes

Head-branch prefixes to ignore entirely, for example dependency-update bots.

include_extensions

Only files with these extensions are processed. Common sets: Python .py; JavaScript and TypeScript .js, .jsx, .ts, .tsx, .mjs, .cjs; web .html, .css, .scss; C and C++ .c, .cpp, .h, .hpp; .NET .cs, .vb, .fs; Java and Kotlin .java, .kt, .kts; Go .go; Rust .rs; shell .sh, .bash, .ps1; infrastructure .tf, .yaml, .yml, .bicep. Start with your primary language and add more as needed.

exclude

Glob patterns to skip. Common: node_modules/**, dist/**, build/** (build output); **/*.test.*, **/__tests__/** (tests); .venv/**, venv/**, __pycache__/** (Python environments); .git/**, .github/**.

preferences.require_pr_approval

Default false: DocBot documents a pull request when it opens, if it fits your token balance. Set true to get an approval request with a token estimate on each pull request; DocBot then waits for /docbot-approve. Available on every tier.

preferences.include_code_links, preferences.include_examples

Both default true: links to source line numbers in GitHub, and usage examples in function documentation where they apply.

preferences.document_root_files

Default true: a separate document for files in the repository root (for example setup.py, main.py), linked from the master index.

guide_projects and guide_exclude

Which parts of the codebase to analyse for architecture guides. Each entry creates one consolidated Architecture and Process Overview (system architecture, workflows, data models, component dependencies, integrations, with Mermaid diagrams) in _docs/guides/. Each entry has name, path ("" for the whole docs folder), an optional purpose, and patterns, keywords to narrow which documentation files are included; leave it [] to include all. Use one entry for a single project and several for a monorepo. guide_exclude lists paths guides should ignore.

Example: a monorepo
guide_projects:
  - name: backend-api
    path: "src/backend"
    purpose: "REST API and webhook handlers"
    patterns: ["api", "endpoint", "webhook"]
  - name: frontend
    path: "src/frontend"
    purpose: "React web application"
    patterns: []

Day to day

Automatic processing

Once installed, documentation is generated when pull requests are opened. No commands are needed beyond the approval.

Re-runs

Made a quick change and want fresh docs? Comment /docbot-rerun on the pull request. It regenerates documentation for the changed files straight away. /docbot-feedback sends us a note about the output.

Pull request comment
/docbot-rerun

The free tier

Every account gets 500,000 tokens to explore the full product with no time limit, plus a share of a monthly pool shared by all free accounts so the service stays available for everyone. The free tier includes every feature: pull request processing, full rebuilds and re-runs.

Pricing

One price per account. No per-seat fees. Tokens are the only thing that changes between tiers.

DocBot tiers and monthly token allowances
PlanPriceTokensAvailability
Free$0500,000 lifetime, plus a share of a 250,000,000 monthly pool shared by all free accountsLive
Entry$10 / month500,000 per monthLaunching soon
Small$50 / month3,000,000 per monthLaunching soon
Medium$150 / month10,000,000 per month, plus full rebuildLaunching soon
Enterprise$500 / month50,000,000 per month, plus full rebuildLaunching soon
  • No per-seat fees. One price per account, however many people work in the repositories.
  • 14-day Marketplace trial on paid tiers, once per account. It drops back to Free at expiry. (The Service Desk trial is 7 days; the two are separate.)
  • Paid tiers are launching soon. They wait on GitHub Marketplace verification. The prices above are what they will be. Billing is managed in GitHub, not in the portal.
  • Every comment shows the balance. Files processed, tokens used, percentage of allowance and cache hits, so the free tier is never a surprise. Roughly 80 to 100 files of documentation fit in the free allowance.
  • Cancel any time; access runs to the end of the period. See the refund policy.

Give your AI coding agents the docs too

DocBot's output is current, structured context for GitHub Copilot, Cursor, Claude Code and other agents.

Add the following to the top of your .github/copilot-instructions.md (or the equivalent file for your agent) so it discovers and uses the _docs/ folder.

.github/copilot-instructions.md
## 📚 AI-Generated Code Documentation

**The `_docs/` folder contains comprehensive, AI-generated documentation for the entire codebase.**

This documentation is automatically generated by DocBot and mirrors the repository structure, providing:

- **Detailed function-level documentation** - Parameters, return values, and function relationships
- **File overviews** - Purpose and functionality of each module
- **Directory indexes** - Organized navigation by folder structure
- **Direct source code links** - Line number references to actual code

**When assisting with development:**
- Consult `_docs/` for accurate, up-to-date information about modules and functions
- Use the directory indexes to understand component organization
- Reference individual file documentation for detailed function APIs

**Documentation structure:**
- `_docs/README.md` - Main documentation index
- `_docs/src/` - Source code documentation
- Additional folders mirror your repository structure

Troubleshooting

The app is not responding to pull requests

Verify repository access is granted in GitHub Settings, Applications, AI Document Creator, and that the target branch is in allowed_base_branches.

Documentation was not generated

Read the pull request comment for the reason. Common causes: an invalid configuration file, the token allowance is used up, or every changed file was excluded.

The configuration is not recognised

The file must be named exactly .github/wai-docbot.yml and be valid YAML.

Something else went wrong

When DocBot hits an error it posts a comment with a pre-filled support email containing the error, the repository and pull request, and a configuration snapshot. Send it, or raise a ticket on our service desk.