Configuration reference

docsbot reads its configuration from a YAML file. Every key is optional, and flags on the command line override the file.

Where docsbot looks

docsbot uses the first file it finds:

  1. the file given with -c or --config
  2. docsbot.yml, docsbot.yaml or .docsbot.yml in the current folder
  3. the same names in the SOURCE folder (or the folder of a SOURCE file)

File paths inside the configuration (vocabulary, check.schema, audit.tasks, audit.query_log) are relative to the configuration file.

docsbot.example.yml is a commented copy to start from.

Durations use Go syntax: 100ms, 20s, 5m, 6h.

Top-level keys

Key Type Default Description
base_url string live site for a local repo. Absolute links to it count as internal, and agent-ready check runs AFDocs against it. Flag: --base-url
content_dir string auto-detect content root inside the repo (content/en, content, docs …). Flag: --content-dir
static_dirs list extra folders searched for images and downloads, for example [static, public]
nav_file string auto-detect navigation source: mkdocs.yml, SUMMARY.md, sidebars.json or a YAML list, relative to the repo root
anchor_style string from the generator heading anchor style: github, mkdocs, sphinx, kramdown
mdx_link_props list [href, to] JSX props that hold link targets in MDX
vocabulary string controlled vocabulary and alias file (format), used by check, graph, audit and draft
include list [] globs of pages to keep, relative to the content root. Flag: --include (added to the list)
exclude list [] globs of pages to skip. Flag: --exclude (added to the list)
max_pages int 2000 stop after this many pages. Flag: --max-pages
follow bool true live sites: also crawl links beyond llms.txt and the sitemap. Flag: --no-follow
concurrency int 8 maximum concurrent HTTP requests. Flag: --concurrency
delay duration 100ms minimum gap between requests to one host. Flag: --delay
timeout duration 20s per-request timeout. Flag: --timeout
user_agent string docsbot/0.1 (+docs link checker) User-Agent header for HTTP requests
cache_dir string <user cache dir>/docsbot HTTP cache folder
cache_ttl duration 6h how long cached responses are reused. Flag: --no-cache turns the cache off

Settings for link checking, used by check, links and wherever links are resolved.

Key Type Default Description
links.external bool true check external URLs. false is the same as --offline every time
links.exclude_urls list of regex URLs never fetched, for example ^https://(www\.)?linkedin\.com/
links.ignore_hrefs list of regex raw hrefs to skip entirely, for example render-hook shorthands such as ^g$
links.external_anchors bool false also verify #fragments on external pages. Flag: --external-anchors
links.max_redirects int 10 redirects followed before giving up
links.fail_on list [broken, broken-anchor] accepted, but not used by any command at present. Use check.fail_level and check.rules
links.external_per_host int 2 accepted, but not used by any command at present

check

Key Type Default Description
check.fail_level string error lowest severity that exits 1: error, warning, info, off. Flag: --fail-level
check.rules map rule ID to severity (error, warning, info, off). See the rules reference. Flag: --rule
check.schema string JSON Schema (in JSON or YAML) that front matter must match
check.todo_patterns list of regex TODO, FIXME, TBD, XXX, lorem ipsum, [PLACEHOLDER], [INSERT …] patterns for content-todo. Replaces the defaults. Inline code and code blocks are not searched
check.entry_pages list page routes allowed to have no inbound links, for example [/]
check:
  fail_level: error
  rules:
    page-orphan: warning
    content-todo: off
  schema: frontmatter.schema.json
  todo_patterns: ['\bTODO\b', '\bTBD\b']
  entry_pages: [/, /changelog]

audit

Settings for audit (structure and findability) and agent-ready check.

Structure and findability

Key Type Default Description
audit.tasks string reader tasks file (format). Flag: --tasks
audit.query_log string search query log, CSV (format). Flag: --query-log
audit.required_metadata list [title, description] front matter every page must have
audit.recommended_metadata list [tags, owner] front matter every page should have
audit.max_clicks int 3 most clicks from the entry page before a page counts as hard to reach
audit.search_top_k int 3 a search succeeds when an expected page is in the top K results
audit.stale_days int 365 pages not changed in this many days count as stale
audit.max_nav_children int 15 most entries in one navigation menu
audit.max_nav_levels int 3 deepest navigation level
audit.short_words int 100 pages under this many words are short (landing pages excepted)
audit.long_words int 3000 pages over this many words are long
audit.max_section_words int 600 sections over this many words need a subheading
audit.templates map see below content type to template. Replaces the default for each type given
audit.weights map see below dimension to weight. Merged with the defaults

audit.templates. Each content type (tutorial, how-to, reference, explanation, landing) can require:

Key Type Description
required_headings list of regex headings that must be present, matched case-insensitively
steps bool a numbered list or step headings
structured bool a table, definition list or code block
min_links int at least this many links to other pages

The defaults:

audit:
  templates:
    how-to: {steps: true}
    tutorial:
      steps: true
      required_headings: ["prerequisites|before you (begin|start)|requirements|what you('ll)? need"]
    reference: {structured: true}
    landing: {min_links: 3}

audit.weights. Defaults:

Part Dimension: weight
Structure content-types: 1, templates: 1.5, titles-headings: 1, page-shape: 1, metadata: 1.5, duplication: 1, terminology: 1, navigation: 1, ownership-freshness: 0.5, urls: 0.5
Findability click-paths: 1.5, search: 2, query-log: 1, discovery-metadata: 1, cross-linking: 1

Set a weight to 0 to leave a dimension out of the score.

Agent readiness

Key Type Default Description
audit.afdocs string auto run AFDocs: auto (when npx is available), on, off. Flag: --afdocs
audit.afdocs_cmd string npx -y afdocs@0.23 command that runs AFDocs
audit.afdocs_weight float 0.6 share of the overall score that comes from AFDocs, 0 to 1
audit.fail_under int 0 exit 1 when the overall score is lower. Flag: --fail-under
audit.max_page_chars int 50000 pages longer than this are flagged as too large for agents
audit.max_depth int 4 most clicks from the entry page for docsbot’s click-depth check

graph

Key Type Default Description
graph.db string docsbot-graph.db SQLite file for the graph. Flag: --db
graph.repository string the repo folder name repository name in the graph
graph.commands list detected from code blocks your product’s command-line names, for example [lumen]
graph.content_types map glob to content type, when front matter and the heuristics are wrong
graph.similarity bool true add inferred related-to and overlaps-with edges
graph.related_threshold float 0.35 TF-IDF cosine similarity for related-to
graph.overlap_threshold float 0.5 share of five-word sequences shared with another page for overlaps-with
graph.max_related int 3 related-to edges per page

draft

Settings for draft write and the model used by agent run and agent eval.

Key Type Default Description
draft.template string built-in Markdown template (format). Flag: --template
draft.provider string none none, ollama, openai (any OpenAI-compatible server) or anthropic. Flag: --provider
draft.model string model name. Required for ollama and openai; anthropic defaults to claude-opus-5-5. Flag: --model
draft.endpoint string http://localhost:11434 for ollama base URL. Required for openai, for example http://localhost:8080/v1. Flag: --endpoint
draft.api_key_env string environment variable holding the API key. For anthropic, the SDK falls back to ANTHROPIC_API_KEY
draft.allow_remote bool false must be true to send source passages to an endpoint off this machine. Always needed for anthropic. Flag: --allow-remote
draft.timeout duration 5m per request to the model

agent

Settings for agent run, agent eval and agent approve. The model is the draft section’s provider.

Key Type Default Description
agent.out string drafts/agent run folder; never inside the docs. Flag: --out
agent.max_drafts int 3 groups drafted per run, highest priority first. Flag: --max-drafts
agent.min_score int 80 evaluation gate, 0–100. Flag: --min-score
agent.judge bool false also score drafts with the model. Flag: --judge
agent.min_judge int 3 lowest judge score allowed per criterion, 1–5
agent.mcp list [] MCP servers for product context; see below

agent.mcp

Each entry is one server, either stdio (command) or Streamable HTTP (url).

Key Type Default Description
name string name used in citations
command list stdio server: program and arguments
url string Streamable HTTP server
tool string first tool whose name contains search tool to call
query_arg string query argument that takes the query
args map fixed arguments sent with every call
env map extra environment variables for a stdio server
header_env map HTTP header name to the environment variable that holds its value
allow_remote bool false needed for a server off this machine, because queries name your product’s flags and settings
max_results int 5 passages kept per query
agent:
  mcp:
    - name: product-kb
      command: [docsbot, mcp, serve, --no-repo, --kb, ../product-kb]
    - name: api-catalog
      url: https://mcp.example.com/mcp
      allow_remote: true
      header_env: {Authorization: CATALOG_TOKEN}
      tool: search
      query_arg: query
      max_results: 5