> For the complete documentation index, see [llms.txt](https://luadoc.edgetx.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://luadoc.edgetx.org/readme.md).

# EdgeTX Lua Reference Guide

This repository contains the EdgeTX Lua documentation site.

The live documentation source for the current site is in [website](https://github.com/EdgeTX/lua-reference-guide/tree/edgetx_2.12/website/README.md).

## Repo Layout

* `website/`: MkDocs content, theme assets, and navigation for the current docs site
* `docs-system/`: extraction contracts, overlays, generated artifacts, and pipeline notes
* `tools/`: local build and generation helpers

## Local Preview

```sh
uv run mkdocs serve -a 127.0.0.1:8014
```

This uses `mkdocs.yml`, the public/production config. It excludes the Migration section, the API Review Dashboard, and the per-module extraction dashboards, matching what actually ships on the published site.

## Internal Preview (Migration docs + Review Workbench)

To see the Migration section, the per-module dashboards, and the API review pages, serve the internal config instead:

```sh
uv run mkdocs serve -f mkdocs.dev.yml -a 127.0.0.1:8014
```

`mkdocs.dev.yml` inherits from `mkdocs.yml` and un-excludes everything dropped from the public build. Keep only one preview server active on `8014` at a time — switch configs by stopping one and starting the other.

## Review Workbench

For live API review pages with saved type decisions, run the local decision server in a second terminal:

```sh
uv run python3 tools/review_decision_server.py
```

Then open the internal preview (see above) at `http://127.0.0.1:8014/` and use the API review dashboard under the site navigation.

## Contributing

* Edit the current docs under `website/`
* Keep generated or pipeline-specific notes under `docs-system/`
* Use the internal preview at `http://127.0.0.1:8014/` for review during local work


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://luadoc.edgetx.org/readme.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
