docs: full re-audit of the agent doc graph and knowledge base - #908
Conversation
There was a problem hiding this comment.
Code Review
This pull request performs a comprehensive documentation update across the entire repository, synchronizing AGENTS.md, CLAUDE.md, and other design documents in the docs/ directory with recent architectural changes. Key updates reflect the integration of the client-side credit subsystem, the mobile SDK facade, the WASM build target, protocol version negotiation, and various refactorings such as the transition from lib/scripts to lib/arkscript. I have no further feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Fix the highest-traffic doc: the Quick Commands table referenced a nonexistent 'make itest' target (integration tests run under 'make systest'); the Critical Rules and Code Generation sections pointed at db/queries/ and db/schema/ instead of the real db/sqlc/queries/ and db/sqlc/migrations/; and the style summary cited a .editorconfig that does not exist in this repo.
Add per-package CLAUDE.md/AGENTS.md for packages that had no agent doc (credit, coinselect, chainfees, rpcauth, chainbackends/lndsubmitter, internal/sqlbase, sdk/walletdk/mobile, cmd/walletdk-wasm, and the generated proto/sqlc stubs). Slot the substantive packages into the ARCHITECTURE.md layer tables; generated stubs stay covered by the existing rpc/mailbox rollup rows.
Sweep every existing per-package CLAUDE.md/AGENTS.md against current source: correct drifted types, message directions, and dependency edges; restore load-bearing invariants that an over-eager tightening had cut (notably the oor session deadlock, dedup, and lineage-bound rules); and strip leaked tool-output artifacts from a prior automated sweep.
Verify concrete claims across the docs/ knowledge base against current source and fix the drift; add the two orphaned design docs to the index and neutralize cross-repo relative links that cannot resolve.
Overview
The client side of the same doc sweep. A lot has changed recently, the
per-package agent docs and the
docs/knowledge base had drifted, andmake doc-checkwas failing (divergedCLAUDE.md/AGENTS.mdpairs and twodocs missing from the index). This PR does one full-repo sweep: re-audit every
doc against current source, document the packages that had none, and get the
whole graph accurate and green.
This supersedes the stale nightly sweep in #898, which can be closed.
Docs-only. No
.gofiles change.What's in here
Four commits, each a self-contained concern:
make itesttarget (integration tests run undermake systest), pointed atdb/queries//db/schema/instead ofdb/sqlc/queries//db/sqlc/migrations/,and cited a
.editorconfigthat does not exist in this repo.(
credit,coinselect,chainfees,rpcauth,chainbackends/lndsubmitter,internal/sqlbase,sdk/walletdk/mobile,cmd/walletdk-wasm, and the generated proto/sqlc stubs). Substantivepackages are slotted into the
ARCHITECTURE.mdlayer tables; generatedstubs stay under the existing rpc/mailbox rollup rows.
CLAUDE.md/AGENTS.mdwas checkedagainst source: drifted types, message directions, and dependency edges
corrected, and a leaked tool-output artifact from a prior automated sweep
stripped out. This pass also restored a set of load-bearing
oorinvariants(the session-actor deadlock rule, dedup/commit-race semantics, and the
lineage/ancestry bounds) that an over-eager tightening had cut and that
lived nowhere else.
docs/verified againstsource and fixed, the two orphaned design docs added to the index, and
cross-repo relative links that cannot resolve neutralized to plain text.
How it was done
The re-audit ran as a parallel Sonnet fan-out (one worker per small batch of
packages), each grounding its edits in
go docand actual source. Shared files(
ARCHITECTURE.md,docs/index.md, rootCLAUDE.md) were reconciledcentrally so parallel workers never collided, and
make doc-checkgates thefour cross-link invariants.
A final independent review pass (a stronger model reading the whole diff)
verified claims against source and flagged eight corrections, every one folded
in after re-confirming it against the code (for example:
internal/sqlbaseisa single
<prefix>_kvtable withparent_idnesting, not a table-per-bucketscheme;
SendOnChainStatusisSubmitted/Preview, notDryRun; and thechainbackendsPackageSubmitterLND fallback tolndsubmitter.New).make doc-checkpasses.Known follow-ups (out of scope for a docs-only PR)
.godoc-comments the sweep noticed but did not touch(
sdk/walletdk/mobile/doc.goreferences astub.gothat does not exist;arkrpc/treeconvis currently dead code).status rewrite:
canonical_activity_log_design.md(issue swapwallet: canonical append-only activity record with stable cross-restart ids #774 largelylanded),
swap_system.md(a third forfeit RPC and the CREDIT/MIXEDsettlement types), and
fee-change-model.md.