Repository navigation
feat: add llms.txt, which tells agents what fctl is and how to drive it - #267
Merged
kalaspuff merged 5 commits intoOct 24, 2026
Merged
Conversation
docs/llms.txt sums fctl up for agents: what it is, its words, roles, the session lifecycle, how agents work with GitHub, how to drive the CLI safely, recipes and what to avoid, with links to every doc. docs/agents.md and docs/api.md hold the details. The CLI reference now says which commands keep following, how they read stdin, exit codes, --confirm for deletions without a terminal, and the flags it lacked.
The web app's build emits docs/llms.txt as /llms.txt, and Vite serves it in development, so app.fctl.sh and self-hosted instances answer agents with it. robots.txt lets crawlers fetch it while the app stays out of their indexes. The standalone image copies the file for its web build.
Links between docs, to their headings, to files of the repository and to fctl.sh's Markdown pages must resolve, and llms.txt keeps the shape llmstxt.org asks for, with absolute links only.
kalaspuff
approved these changes
Oct 24, 2026
kalaspuff
deleted the
fctl/266-let-s-create-an-llms-txt-that-should-be
branch
October 24, 2026 22:26
This was referenced Oct 24, 2026
The CLI can't set a project's secrets, members or agent settings, nor share or archive sessions
#266
Closed
kalaspuff
pushed a commit
that referenced
this pull request
Oct 24, 2026
## Summary Since #267, app.fctl.sh serves `/llms.txt` as `text/plain` without a charset. Cloudflare's static assets declare none for `.txt`, unlike `wrangler dev` and the standalone server, which add `charset=utf-8`. The file has UTF-8 characters (→, …, ⌘), and clients that read text without a charset as Latin-1 garble them: browsers often do, and so does Python's `requests` (`response.text`). A rule in `web/public/_headers` now declares `text/plain; charset=utf-8` for it. Cloudflare's docs say `_headers` rules override the headers it ordinarily sends. Verified: `curl -sI https://app.fctl.sh/llms.txt` says `content-type: text/plain` today. Under `wrangler dev` the built assets answer `/llms.txt` with a single `text/plain; charset=utf-8`, and a scratch rule with a distinct value replaced the default rather than being joined to it. `npm run check` and `npm test` pass for the web app. hyperstructure/fctl-site#58 does the same for fctl.sh's `/llms.txt`, `/llms-full.txt` and Markdown pages: - hyperstructure/fctl-site#58 [fctl session](https://app.fctl.sh/s/ses_01M5QX2QPKNQY8VJ8YYY0K547J) Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
kalaspuff
pushed a commit
to hyperstructure/fctl-site
that referenced
this pull request
Oct 24, 2026
## Summary Serves fctl's guide for agents and its docs in the forms agents read best ([llms.txt](https://llmstxt.org)): - `/llms.txt`: fctl's new `docs/llms.txt`, copied as it is. - `/docs/<slug>.md`: each docs page as Markdown (the overview at `/docs/index.md`), with every link made absolute: to the other pages' Markdown, or to the file on GitHub. Each HTML page links its Markdown as an alternate. - `/llms-full.txt`: `llms.txt` followed by every page, each with its address. `_headers` declares these files UTF-8: Cloudflare sends `.txt` and `.md` without a charset (app.fctl.sh's `/llms.txt` does today), and clients that then read them as Latin-1 garble their →, … and —. fctl's two new pages, **For agents** and **HTTP API**, join the navigation after the CLI. Heading ids now drop apostrophes as GitHub's do. Before, "Confirming it's you" got `confirming-it-39-s-you`, so links to `architecture.md#confirming-its-you` missed it. The page mapping and link rewriting moved to `scripts/pages.mjs`, with tests. The deploy's smoke test also fetches `/llms.txt` and a Markdown page. hyperstructure/fctl#267 is merged and fctl's CI pinned it (`fctl-docs.ref` at 45e0368), which this branch now has from `main`, so the build finds the new pages. Verified at that commit: `npm run build` renders 11 pages, their Markdown (all links absolute) and `llms-full.txt`. Under `wrangler dev`, `/llms.txt` and `/llms-full.txt` answer as `text/plain; charset=utf-8` and `/docs/*.md` as `text/markdown; charset=utf-8`, and HTML pages are unchanged. `npm run check` reports only the two `!important` warnings that `main` has, and `npm test` passes all 18 tests. - hyperstructure/fctl#267 - hyperstructure/fctl#268 ## Screenshots The new pages, built from fctl's branch, served by `wrangler dev`: **For agents** in the light theme and **HTTP API** in the dark one, at 1440 px; **HTTP API**'s session table at 390 px.    ## Worth confirming - **Decision:** The Markdown pages' links point at the other pages' Markdown (`https://fctl.sh/docs/cli.md`), not their HTML, so an agent that follows them keeps reading Markdown. - **Decision:** `/docs/cli.md` and the like now serve Markdown where they used to give the 404 page's "Did you mean /docs/cli/?". [fctl session](https://app.fctl.sh/s/ses_01M5QX2QPKNQY8VJ8YYY0K547J) --------- Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/llms.txt, a guide for agents in the llms.txt format. It covers what fctl is, its vocabulary (instance, workspace, project, session, runner, host, sandbox, schedule, memory…) and roles. It also covers the session lifecycle, how agents work with GitHub (branches, pull requests, follow-ups for comments, failed checks and conflicts, review agents) and Claude credentials. Then it says how to drive the CLI and the API safely from another agent or program, gives 14 recipes (delegating and waiting, fan-out, starting agents from any tool, schedules, review agents, Linear, project and host setup, reports) and lists what to avoid, with links to every doc. Every instance now serves it at/llms.txt: the web app's build emits it, and the standalone image copies it in. fctl.sh serves it once the fctl-site pull request below merges.The details it links to are in two new docs:
docs/agents.md(tokens, which commands return, waiting for a turn, reading transcripts, pitfalls, full recipes, what agents do in their sandbox) anddocs/api.md(the HTTP API's conventions and the endpoints programs use).docs/cli.mdnow covers the CLI behaviors the task's notes listed, each checked against the source and a running stack.fctl runwithout-d,fctl attachandfctl logs -fkeep following after a session stops. Without text,runandsendwait for stdin to close.fctl logs --jsonprints one event per line, and usage errors exit with 2.--envvalues aren't secret. It also documents the flags it lacked (--confirmfor deletions without a terminal,schedules add --paused,projects create --slug,host install --nameand--image, and others). A new xtask test checks that every link indocs/resolves: files, headings, and fctl.sh's Markdown pages.Verified with
cargo xtask check --quickand againstcargo xtask dev: the documented wait loops (CLI and API), idempotent sends withclient_id, a when-asked schedule run by a token with context, and the transcript filters. A production web build served by workerd answers/llms.txtastext/plain; charset=utf-8.Refs #266, which records what the CLI can't do yet (project secrets, members, sharing and archiving sessions, a project's model, effort and instructions); the docs send people to the web app or the API for those.
Worth confirming
docs/llms.txtrather than at the repository's root. That way CI pins it to fctl.sh with the other docs, and the standalone image's build copies it from there; the README links to it.robots.txtnow allows/llms.txtand still disallows the rest of the app, so fetchers that honor robots.txt can read it.llms.txtpoint at fctl.sh's Markdown pages (https://fctl.sh/docs/<page>.md,/llms-full.txt). Those exist only after the fctl-site pull request merges, which waits for this one to be merged and pinned.automation.mdalready does for two endpoints.docs/api.mddescribes today's routes and bodies.fctl session