From 732df8808991b7b00ef3ad115cb7144f915dadda Mon Sep 17 00:00:00 2001 From: Peter Hurst Date: Sat, 22 Aug 2026 00:39:10 +0100 Subject: [PATCH] =?UTF-8?q?feat(docs):=20907=20=E2=80=94=20host=20an=20llm?= =?UTF-8?q?s.txt=20for=20coding=20agents=20installing=20jarl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Serves the current adopted convention for hosted, agent-facing library instructions: a spec-compliant llms.txt at the docs site root, indexing the existing guides and API reference and calling out what an agent gets wrong without it — the jarl-atoms/jarl-react package names, that v1 was removed, and that jarl-react does not re-export jarl-atoms. Placed in packages/docs/public/ so Vite's static-asset copy ships it verbatim to dist/llms.txt, which the existing S3 sync deploys to https://jarl.randomdev.co.uk/llms.txt with no separate build step. Ticket: 907 --- packages/docs/public/llms.txt | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/docs/public/llms.txt diff --git a/packages/docs/public/llms.txt b/packages/docs/public/llms.txt new file mode 100644 index 0000000..5de7bd8 --- /dev/null +++ b/packages/docs/public/llms.txt @@ -0,0 +1,38 @@ +# JARL: Atomic Routing Library + +> A controlled-component router for React built on jotai atoms: each route is its own atom, +> matching a URL segment and reversible back into a URL. Framework-agnostic core (`jarl-atoms`) +> with lightweight React bindings (`jarl-react`). + +- Install both packages plus their `jotai` peer dependency: `npm install jarl-atoms jarl-react jotai`. + The npm package names are `jarl-atoms` and `jarl-react` — the GitHub repository is + `randomdevpete/jarl`, but the packages kept their pre-rename names; do not guess `jarl` or + `@jarl/*`. +- The current major is v2, built entirely on jotai atoms. The v1 implementation (`RoutingProvider`, + `RouteMap`, React legacy context) was removed from the codebase; v1-era snippets found elsewhere + online do not apply. +- `jarl-react` does not re-export `jarl-atoms`. Import route atoms (`rootAtom`, `staticRouteAtom`, + `paramRouteAtom`, ...) from `jarl-atoms`, and components/hooks (`Route`, `Link`, `Switch`, + `useNavigate`, ...) from `jarl-react`. +- `jarl-react` also peer-depends on React `^18 || ^19`. + +## Guides + +- [Getting started](https://jarl.randomdev.co.uk/docs/getting-started): route atoms, the jotai + `Provider`, `Route` and `Link`, a minimal working app +- [Path variables](https://jarl.randomdev.co.uk/docs/path-variables): dynamic segments, nested + routes, query params +- [Data loading](https://jarl.randomdev.co.uk/docs/data-loading): `resolvedAtom` and + `asyncRouteAtom`, Suspense-based loading + +## API reference + +- [jarl-atoms](https://jarl.randomdev.co.uk/api/jarl-atoms): route atom constructors, redirects, + query atoms +- [jarl-react](https://jarl.randomdev.co.uk/api/jarl-react): `Route`, `Link`, `Switch`, hooks + +## Optional + +- [Changelog](https://jarl.randomdev.co.uk/changelog): version-by-version release notes +- [v1 history](https://jarl.randomdev.co.uk/history): why v1 was replaced — background only, not + current API