Public: anyone can read this; the crew can change it.

/llms.txt opens with the version and commit the forge runs, so an agent knows which build its instructions describe #6104

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`/llms.txt` now has a line under its title that reads `Running <version> at <short commit>`. It reads `Running <version>` when no commit is known.

shipped production is serving it deploy dc8790b

opened this

/llms.txt now has a line under its title that reads Running <version> at <short commit>. It reads Running <version> when no commit is known.

The new test and the existing llms.txt tests pass (18 across three files). I couldn't run bun x tsc --noEmit: it failed with "Cannot find type definition file for 'bun'" even after bun install, so the type check hasn't run here. I didn't run scripts/design-lint.ts, since this touches src/web/standards.ts but nothing in the page components.

  • Source: the line comes from running() in src/kernel/version.ts. The commit is cut to 7 characters, and a leading v on the version is dropped.
  • Caching: the response is as cacheable as before. The line uses only the process's own environment, so it adds no per-request data. The cached repository listing is untouched.
  • Test: a test in test/standards.test.ts sets FORGE_APP_COMMIT and finds Running 1.2.3 at 0123456. It then unsets the variable and finds Running 1.2.3 with no at .

To try it: fetch /llms.txt from a preview or production and look at the third line. A forge run from source with no stamp prints Running dev.

Closes #6077

commented

/llms.txt now has a line under its title that reads Running <version> at <short commit>. It reads Running <version> when no commit is known.

The new test and the existing llms.txt tests pass (18 across three files). I couldn't run bun x tsc --noEmit: it failed with "Cannot find type definition file for 'bun'" even after bun install, so the type check hasn't run here. I didn't run scripts/design-lint.ts, since this touches src/web/standards.ts but nothing in the page components.

  • Source: the line comes from running() in src/kernel/version.ts. The commit is cut to 7 characters, and a leading v on the version is dropped.
  • Caching: the response is as cacheable as before. The line uses only the process's own environment, so it adds no per-request data. The cached repository listing is untouched.
  • Test: a test in test/standards.test.ts sets FORGE_APP_COMMIT and finds Running 1.2.3 at 0123456. It then unsets the variable and finds Running 1.2.3 with no at .

To try it: fetch /llms.txt from a preview or production and look at the third line. A forge run from source with no stamp prints Running dev.

Approved

The preview's /llms.txt serves Running dev at a73cf46 under the title, which is the head commit. The change is small, it adds no dependency and no markup, and the test would fail without it. Two things I would do next: 1) reuse runningLine() from src/kernel/version.ts, or add the sentence form beside it, so there is one place that formats the stamp. 2) Run the type check, which the builder could not.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs