From ef55ca97c82783a4519f17c7276864f42ccd2e7d Mon Sep 17 00:00:00 2001 From: Mayukha Vadari Date: Thu, 10 Sep 2026 11:18:15 -0400 Subject: [PATCH] docs: Drop redundant repo-level AGENTS.md pointers, shorten Build section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The harness auto-loads every ancestor AGENTS.md (including root), so a nested file telling an agent to "see the repo-level AGENTS.md" is pure overhead — it can trigger a re-load/duplication-check/discard cycle, and some models just retain the duplicate content in context. Drop that pointer from every nested AGENTS.md; keep pointers to things that are NOT auto-loaded (README.md, docs/consensus.md, non-ancestor AGENTS.md like tx/ -> rpc/). - Root AGENTS.md's Build section is now a short index pointer to BUILD.md and docs/build/nix.md instead of restating Nix setup steps, per review feedback that AGENTS.md should mostly index other docs rather than duplicate them. Addresses PR review comments: https://github.com/XRPLF/rippled/pull/8198#discussion_r3979325914 https://github.com/XRPLF/rippled/pull/8198#discussion_r3979424992 --- AGENTS.md | 8 +------- include/xrpl/consensus/AGENTS.md | 2 +- include/xrpl/nodestore/AGENTS.md | 2 +- include/xrpl/shamap/AGENTS.md | 2 +- src/libxrpl/ledger/helpers/AGENTS.md | 2 -- src/libxrpl/tx/AGENTS.md | 2 -- src/libxrpl/tx/transactors/AGENTS.md | 2 -- src/test/AGENTS.md | 2 +- src/xrpld/app/consensus/AGENTS.md | 2 +- src/xrpld/app/ledger/AGENTS.md | 2 +- src/xrpld/overlay/AGENTS.md | 2 +- src/xrpld/peerfinder/AGENTS.md | 2 +- src/xrpld/rpc/AGENTS.md | 2 +- 13 files changed, 10 insertions(+), 22 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 668381828c..0839fd01a2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,13 +4,7 @@ This file provides guidance to AI coding agents (Claude Code, and other AGENTS.m ## Build -Recommended on Linux/macOS: the Nix devshell sets up the compiler, Conan, ccache, and (optionally) Rust automatically. - -```bash -nix develop -``` - -Not required — contributors can use their own toolchain/build flow instead. For alternate devshell variants (specific compiler, no-compiler, coverage), see [docs/build/nix.md](./docs/build/nix.md). For manual (non-Nix) build steps, CMake options, and protocol codegen commands, see [BUILD.md](./BUILD.md) (`## Steps`, `## Options`, `## Code generation`). +For the build steps, CMake options, and protocol codegen commands, see [BUILD.md](./BUILD.md) (`## Steps`, `## Options`, `## Code generation`). Nix development shells are available in the repo (not required) — see [docs/build/nix.md](./docs/build/nix.md) for setup and variants. Rust crate tests (independent of the CMake build): `cargo test --manifest-path crates/Cargo.toml --workspace` (CI uses `cargo nextest`). diff --git a/include/xrpl/consensus/AGENTS.md b/include/xrpl/consensus/AGENTS.md index bd7f082b18..553c7953bc 100644 --- a/include/xrpl/consensus/AGENTS.md +++ b/include/xrpl/consensus/AGENTS.md @@ -1,3 +1,3 @@ # AGENTS.md — consensus -See the repo-level [AGENTS.md](../../../AGENTS.md) for general guidance. See [README.md](./README.md) for a short pointer, and [docs/consensus.md](../../../docs/consensus.md) for the full consensus design. +See [README.md](./README.md) for a short pointer, and [docs/consensus.md](../../../docs/consensus.md) for the full consensus design. diff --git a/include/xrpl/nodestore/AGENTS.md b/include/xrpl/nodestore/AGENTS.md index 61e3818c34..f941557f83 100644 --- a/include/xrpl/nodestore/AGENTS.md +++ b/include/xrpl/nodestore/AGENTS.md @@ -1,3 +1,3 @@ # AGENTS.md — nodestore -See the repo-level [AGENTS.md](../../../AGENTS.md) for general guidance and [README.md](./README.md) for backend and benchmark design. +See [README.md](./README.md) for backend and benchmark design. diff --git a/include/xrpl/shamap/AGENTS.md b/include/xrpl/shamap/AGENTS.md index 2acbb84fc1..355032f3fa 100644 --- a/include/xrpl/shamap/AGENTS.md +++ b/include/xrpl/shamap/AGENTS.md @@ -1,3 +1,3 @@ # AGENTS.md — shamap -See the repo-level [AGENTS.md](../../../AGENTS.md) for general guidance and [README.md](./README.md) for the SHAMap design. +See [README.md](./README.md) for the SHAMap design. diff --git a/src/libxrpl/ledger/helpers/AGENTS.md b/src/libxrpl/ledger/helpers/AGENTS.md index 03bb46f752..951b097556 100644 --- a/src/libxrpl/ledger/helpers/AGENTS.md +++ b/src/libxrpl/ledger/helpers/AGENTS.md @@ -1,7 +1,5 @@ # AGENTS.md — ledger/helpers -See the repo-level [AGENTS.md](../../../../AGENTS.md) for general guidance. - A helper that takes an `SLE`/`std::shared_ptr` should `XRPL_ASSERT` that it's non-null and of the expected ledger-entry type at entry, and keep a real runtime check/error-return alongside the assert (asserts compile out in release builds) — the established idiom in this directory is `std::expected<..., TER>`, returning `std::unexpected(tec*)` on failure. Don't invent a new error-handling idiom for this. Prefer a single amendment-enabled block and a single disabled block over scattering `rules.enabled(...)` checks through a function, even if the two blocks are similar. When a file or function checks more than one amendment, name local enablement booleans per-amendment (e.g. `fix340Enabled` for `fixCleanup3_4_0`), not a generic `fixEnabled`. diff --git a/src/libxrpl/tx/AGENTS.md b/src/libxrpl/tx/AGENTS.md index b3a55734c6..b95d34b1a8 100644 --- a/src/libxrpl/tx/AGENTS.md +++ b/src/libxrpl/tx/AGENTS.md @@ -1,7 +1,5 @@ # AGENTS.md — tx -See the repo-level [AGENTS.md](../../../AGENTS.md) for general build/test/style guidance. - ## When an amendment is required A change needs an amendment if it affects transaction processing, ledger objects, or anything else about the binary format or hash of the ledger. An amendment is optional if a change only affects what transactions get proposed for consensus (e.g. fee escalation). Otherwise, don't use one. diff --git a/src/libxrpl/tx/transactors/AGENTS.md b/src/libxrpl/tx/transactors/AGENTS.md index 02a253c8ea..75218aceb0 100644 --- a/src/libxrpl/tx/transactors/AGENTS.md +++ b/src/libxrpl/tx/transactors/AGENTS.md @@ -1,7 +1,5 @@ # AGENTS.md — transactors -See [tx/AGENTS.md](../AGENTS.md) for amendment-gating conventions that apply to all transactors, and the repo-level [AGENTS.md](../../../../AGENTS.md) for general guidance. - Prefer a single object-level invariant over duplicating the same delta/balance check in every transactor that touches an object — e.g. one invariant asserting a Vault's pseudo-account balance and `assetsAvailable` always move together, rather than repeating that check in `VaultDeposit`, `VaultWithdraw`, `VaultClawback`, `LoanSet`, etc. ## Gating amendment-dependent code diff --git a/src/test/AGENTS.md b/src/test/AGENTS.md index 2aae286fc0..2743e428aa 100644 --- a/src/test/AGENTS.md +++ b/src/test/AGENTS.md @@ -1,5 +1,5 @@ # AGENTS.md — test -See the repo-level [AGENTS.md](../../AGENTS.md) for general build/test/style guidance, and [README.md](./README.md) for basic `--unittest` invocation. +See [README.md](./README.md) for basic `--unittest` invocation. Shared test setup/helper code used by more than one test file belongs in `jtx/`, not copy-pasted across test files. diff --git a/src/xrpld/app/consensus/AGENTS.md b/src/xrpld/app/consensus/AGENTS.md index 98e7de4f67..292de6b67a 100644 --- a/src/xrpld/app/consensus/AGENTS.md +++ b/src/xrpld/app/consensus/AGENTS.md @@ -1,3 +1,3 @@ # AGENTS.md — consensus -See the repo-level [AGENTS.md](../../../../AGENTS.md) for general guidance. See [README.md](./README.md) for a short pointer, and [docs/consensus.md](../../../../docs/consensus.md) for the full consensus design. +See [README.md](./README.md) for a short pointer, and [docs/consensus.md](../../../../docs/consensus.md) for the full consensus design. diff --git a/src/xrpld/app/ledger/AGENTS.md b/src/xrpld/app/ledger/AGENTS.md index 89d7e46573..7f9125f61f 100644 --- a/src/xrpld/app/ledger/AGENTS.md +++ b/src/xrpld/app/ledger/AGENTS.md @@ -1,3 +1,3 @@ # AGENTS.md — ledger -See the repo-level [AGENTS.md](../../../../AGENTS.md) for general guidance and [README.md](./README.md) for ledger lifecycle and fetch-pack design. +See [README.md](./README.md) for ledger lifecycle and fetch-pack design. diff --git a/src/xrpld/overlay/AGENTS.md b/src/xrpld/overlay/AGENTS.md index 65df22cf86..c4566819be 100644 --- a/src/xrpld/overlay/AGENTS.md +++ b/src/xrpld/overlay/AGENTS.md @@ -1,3 +1,3 @@ # AGENTS.md — overlay -See the repo-level [AGENTS.md](../../../AGENTS.md) for general guidance and [README.md](./README.md) for the peer-protocol handshake, clustering, gossip, and monitoring design. +See [README.md](./README.md) for the peer-protocol handshake, clustering, gossip, and monitoring design. diff --git a/src/xrpld/peerfinder/AGENTS.md b/src/xrpld/peerfinder/AGENTS.md index f7c5d443b0..d53d8f1e77 100644 --- a/src/xrpld/peerfinder/AGENTS.md +++ b/src/xrpld/peerfinder/AGENTS.md @@ -1,3 +1,3 @@ # AGENTS.md — peerfinder -See the repo-level [AGENTS.md](../../../AGENTS.md) for general guidance and [README.md](./README.md) for the peer-discovery design. +See [README.md](./README.md) for the peer-discovery design. diff --git a/src/xrpld/rpc/AGENTS.md b/src/xrpld/rpc/AGENTS.md index 177faffafa..5934e5ed42 100644 --- a/src/xrpld/rpc/AGENTS.md +++ b/src/xrpld/rpc/AGENTS.md @@ -1,5 +1,5 @@ # AGENTS.md — rpc -See the repo-level [AGENTS.md](../../../AGENTS.md) for general build/test/style guidance, and [README.md](./README.md) for the RPC subsystem design. +See [README.md](./README.md) for the RPC subsystem design. Any change to publicly-visible API behavior — RPC/WebSocket fields, parameters, or error conditions, or transaction/signing behavior surfaced through the API even from outside this directory — needs an entry in [`API-CHANGELOG.md`](../../../API-CHANGELOG.md) under `## Unreleased` (`### Additions`, `### Deprecations`, etc. as appropriate).