Add agent guidelines and static llms.txt#2525
Conversation
Add AGENTS.md, CLAUDE.md, and serve a static llms.txt in the Next.js public folder. Also add an HTML head discovery tag for llms-txt.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
palfrey
left a comment
There was a problem hiding this comment.
It's an interesting idea, but has the problem that there's a lot of things here we'd have to keep manually up-to-date and will inevitably drift otherwise, and in that case it'd be better for the LLMs to refer to the up-to-date docs, not this file.
If you can make the various items I've flagged here generated rather than hardcoded, this becomes significantly more useful!
|
|
||
| ## Supported build systems | ||
|
|
||
| NativeLink speaks the standard Remote Execution API, so it works with any REAPI client: |
There was a problem hiding this comment.
| NativeLink speaks the standard Remote Execution API, so it works with any REAPI client: | |
| NativeLink speaks the standard Remote Execution API, so it works with any REAPI client, including: |
| - [Developing with Cargo](https://docs.nativelink.com/contribute/cargo): Pure Cargo workflow for contributors who'd rather not run Bazel. | ||
| - [Develop with Nix](https://docs.nativelink.com/contribute/nix): The official dev shell — hermetic by construction, identical to CI. | ||
|
|
||
| ## Recent changelog highlights |
There was a problem hiding this comment.
web/apps/docs/scripts/gen-changelog.mjs shows how we've done existing changelog generation. Worth cribbing from there.
| - To revise an open PR, use `git commit --amend` + `git push -f` rather than stacking `fixup` commits. | ||
| - Only commit or push when the user asks. | ||
|
|
||
| ## Documentation site |
There was a problem hiding this comment.
This should really just refer to web/README.md as that's the canonical info on this
There was a problem hiding this comment.
the whole agents.md or just these lines?
There was a problem hiding this comment.
The set of items under Documentation site
|
@palfrey let me have a check and will get back to you very soon on automatic updates for llms.txt rather than hardcode, i agree would be tiring to maintain it lol |
|
@palfrey @MarcusSorealheis folks i am working on automating it via these:
Why store-specs.json is committed: the store list can only be extracted from the Rust StoreSpec enum by compiling it (cargo run --bin build-schema), which needs the Nix dev shell but the docs site builds on Vercel/CI, where there's no Rust toolchain. If the snapshot weren't committed, every docs build would have to compile a Rust crate, which Vercel simply can't do i think. So we commit the snapshot as a build input: it's regenerated occasionally in the Nix shell (gen:llms-txt -- --schema, only when StoreSpec changes), and consumed on every toolchain-free web build. |
|
store-spec.json is only complied using (--schema header below) That's the only path that compiles the nativelink-config crate (build-schema) and re-derives the list from StoreSpec. It's a manual step, requires the Nix dev shell + cargo, and isn't triggered by ordinary repo changes. And can go stale If someone adds or edits a store in StoreSpec and doesn't run --schema..so i was think to Add a CI check in the Nix lane ? |
The way we've done ones like this before is demoed as Something like this at the end should do it: # Regenerate store-spec.json for llms-txt
generate-store-spec = {
enable = true;
entry = let
script = pkgs.writeShellScriptBin "generate-store-spec" ''
set -eu
${pkgs.nodejs}/bin/node web/apps/docs/scripts/gen-llms-txt.mjs --schema
'';
in "${script}/bin/generate-store-spec";
name = "generate-store-spec";
files = "nativelink-config/src/stores.rs|web/apps/docs/lib/store-specs.json";
pass_filenames = false;
}; |
palfrey
left a comment
There was a problem hiding this comment.
Like the improvements, this is looking good, but needs a few more things
|
|
||
| ## What this project is | ||
|
|
||
| NativeLink is a high-performance remote build cache and remote execution (RBE) platform implementing the Remote Execution API (REAPI) over gRPC. It is a Rust workspace (edition 2024, MSRV `1.93.1`, current version `1.6.0`), built with Bazel (the source of truth for CI), Cargo, and a Nix dev shell. See [llms.txt](web/apps/docs/public/llms.txt) for a full product/docs map and https://docs.nativelink.com for documentation. |
There was a problem hiding this comment.
The version and MSRV here are hardcoded and that should be fixed.
There was a problem hiding this comment.
agents.md is usually hardcoded with info though. it doesnt have to be autoupdated like llms.txt as far as i have seen. else we can remove version and MSRV from it then
|
oh just saw pre commit failing, folks let me get back on how to fix this. |
|
pre-commit was failing due to network issues. I've just redone things to run this via Bazel which I think will help |
a670b4a to
11ac86d
Compare
11ac86d to
e150e2f
Compare
e150e2f to
f79993a
Compare
f79993a to
763b669
Compare
763b669 to
e10f625
Compare
|
This is a pretty tricky one. So the pre-commit environment under nix doesn't permit any downloads, so bazelisk breaks. To fix this, we need the nix bazel 9, but that's not present in our current nixpkgs. #2537 will fix that though, so just need to go through review of that. |
|
okay sounds good. I have been trying to understand lol but wasn't able to figure it out lol :) |
Add AGENTS.md, CLAUDE.md, and serve a static llms.txt in the Next.js public folder. Also add an HTML head discovery tag for llms-txt.
Description
This PR introduces tooling guidelines and discovery configs for AI coding assistants working in the repository:
AGENTS.mdandCLAUDE.mdto establish development rules (such as enforcingnativelink-util::taskwrappers, signed commits, and formatting conventions).llms.txt: Added a curated static/llms.txtfile inside the Next.js docs public folder containing a high-level overview, architecture mappings, JSON5 configurations, and recent changelog highlights.<link rel="llms-txt" href="/llms.txt" />tag to the global Next.js page layout to allow automated AI crawlers to discover the context file.Fixes #2508
Type of change
How Has This Been Tested?
pre-commit run -ainside thenix developenvironment. All formatting, coding structure, and Vale spelling/spelling-exclusion checks passed successfully./llms.txtfile and discovery header metadata are compiled and served correctly by Next.js.Checklist
bazel test //...passes locallygit amendThis change is