Skip to content

docs: full re-audit of the agent doc graph and knowledge base - #908

Merged
Roasbeef merged 4 commits into
mainfrom
doc-sweep-full
Jul 10, 2026
Merged

docs: full re-audit of the agent doc graph and knowledge base#908
Roasbeef merged 4 commits into
mainfrom
doc-sweep-full

Conversation

@Roasbeef

@Roasbeef Roasbeef commented Jul 9, 2026

Copy link
Copy Markdown
Member

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, and
make doc-check was failing (diverged CLAUDE.md/AGENTS.md pairs and two
docs 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 .go files change.

What's in here

Four commits, each a self-contained concern:

  1. Root guide fixes. The highest-traffic doc referenced a nonexistent
    make itest target (integration tests run under make systest), pointed at
    db/queries//db/schema/ instead of db/sqlc/queries//db/sqlc/migrations/,
    and cited a .editorconfig that does not exist in this repo.
  2. Sixteen new package docs. Packages that had no agent doc now have one
    (credit, coinselect, chainfees, rpcauth,
    chainbackends/lndsubmitter, internal/sqlbase, sdk/walletdk/mobile,
    cmd/walletdk-wasm, and the generated proto/sqlc stubs). Substantive
    packages are slotted into the ARCHITECTURE.md layer tables; generated
    stubs stay under the existing rpc/mailbox rollup rows.
  3. Per-package re-audit. Every existing CLAUDE.md/AGENTS.md was checked
    against 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 oor invariants
    (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.
  4. Knowledge-base tighten. Concrete claims across docs/ verified against
    source 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 doc and actual source. Shared files
(ARCHITECTURE.md, docs/index.md, root CLAUDE.md) were reconciled
centrally so parallel workers never collided, and make doc-check gates the
four 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/sqlbase is
a single <prefix>_kv table with parent_id nesting, not a table-per-bucket
scheme; SendOnChainStatus is Submitted/Preview, not DryRun; and the
chainbackends PackageSubmitter LND fallback to lndsubmitter.New).

make doc-check passes.

Known follow-ups (out of scope for a docs-only PR)

  • A couple of stale .go doc-comments the sweep noticed but did not touch
    (sdk/walletdk/mobile/doc.go references a stub.go that does not exist;
    arkrpc/treeconv is currently dead code).
  • Three design docs describe work that has since shipped and want a dedicated
    status rewrite: canonical_activity_log_design.md (issue swapwallet: canonical append-only activity record with stable cross-restart ids #774 largely
    landed), swap_system.md (a third forfeit RPC and the CREDIT/MIXED
    settlement types), and fee-change-model.md.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Roasbeef added 4 commits July 9, 2026 17:13
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.
@Roasbeef
Roasbeef merged commit 9019444 into main Jul 10, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant