# Documentation automation

GitBook reads from `docs/gitbook`, configured by the root `.gitbook.yaml` file.

```yaml
root: ./docs/gitbook
```

Hand-authored pages live directly under `docs/gitbook`. Generated pages live under `docs/gitbook/generated` and should not be edited manually.

## Commands

```sh
npm run docs:generate
npm run docs:check
```

`docs:generate` refreshes `agents/index.json`, rebuilds the GitBook summary, and regenerates agent/reference pages from manifests.

`docs:check` runs the generator and fails if the checked-in docs are stale.

## GitHub Action

The documentation workflow runs on commits to `main` that touch app, package, agent, docs, or workflow files. If generated docs change, the workflow opens a pull request instead of pushing directly to `main`.

That keeps the docs self-updating while preserving human review.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.openadminos.com/developers/documentation-automation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
