docs: Drop redundant repo-level AGENTS.md pointers, shorten Build section

- 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
This commit is contained in:
Mayukha Vadari
2026-09-10 11:18:15 -04:00
parent 6dc958c136
commit ef55ca97c8
13 changed files with 10 additions and 22 deletions

View File

@@ -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`).

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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<SLE const>` 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`.

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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).