diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3babed3..e2efe51 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,11 +6,13 @@ on: paths: - 'docs/**' - 'docs.json' + - 'llms.txt' pull_request: branches: [ "main" ] paths: - 'docs/**' - 'docs.json' + - 'llms.txt' jobs: validate: @@ -25,6 +27,17 @@ jobs: - name: Install docs.page CLI run: npm install -g @docs.page/cli + + - name: Verify llms.txt static redirect + run: | + test -s llms.txt || { + echo "llms.txt is missing or empty." + exit 1 + } + grep -q '^redirect: https://raw.githubusercontent.com/btwld/ack/main/llms.txt$' docs/llms.txt.mdx || { + echo "docs/llms.txt.mdx must redirect to the canonical raw llms.txt URL." + exit 1 + } - name: Validate documentation run: npx @docs.page/cli check diff --git a/README.md b/README.md index c97056c..63ac6f2 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ Ack is a schema validation library for Dart and Flutter that helps you validate data with a simple, fluent API. Ack is short for "acknowledge". +For AI agents: start at [`/llms.txt`](https://docs.page/btwld/ack/llms.txt). + ## Why Use Ack? - **Simplify Validation**: Easily handle complex data validation logic @@ -114,7 +116,10 @@ if (result.isOk) { ## Documentation -Detailed documentation is available at [docs.page/btwld/ack](https://docs.page/btwld/ack). +Documentation endpoints: +- Human docs: [docs.page/btwld/ack](https://docs.page/btwld/ack) +- AI agent index (stable URL): [docs.page/btwld/ack/llms.txt](https://docs.page/btwld/ack/llms.txt) +- Canonical plaintext source: [raw.githubusercontent.com/btwld/ack/main/llms.txt](https://raw.githubusercontent.com/btwld/ack/main/llms.txt) ## Development diff --git a/docs/index.mdx b/docs/index.mdx index 29a7b40..aad13a9 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -3,6 +3,12 @@ title: Overview --- Ack is a schema validation library for Dart and Flutter that helps you validate data with a simple, fluent API. Ack is short for "acknowledgment". +## LLM Context + +For AI agents, start with the project index at: + +- [llms.txt](/llms.txt) (redirects to canonical static text) + ## Why Use Ack? - **Simplify Validation**: Easily handle complex data validation logic. diff --git a/docs/llms.txt.mdx b/docs/llms.txt.mdx new file mode 100644 index 0000000..dc8cb83 --- /dev/null +++ b/docs/llms.txt.mdx @@ -0,0 +1,6 @@ +--- +title: llms.txt +redirect: https://raw.githubusercontent.com/btwld/ack/main/llms.txt +--- + +This route redirects to the canonical static `llms.txt` file.