Skip to content

docs: add cargo-rdme README generation for sdk-libs and program-libs#2221

Merged
ananas-block merged 1 commit intomainfrom
tilo/token-client-claude-md
Jan 29, 2026
Merged

docs: add cargo-rdme README generation for sdk-libs and program-libs#2221
ananas-block merged 1 commit intomainfrom
tilo/token-client-claude-md

Conversation

@tilo-14
Copy link
Member

@tilo-14 tilo-14 commented Jan 28, 2026

Summary

  • Add //! doc comments to lib.rs for all crates missing them in sdk-libs and program-libs
  • Add .cargo-rdme.toml config to every crate (workspace-project + heading-base-level)
  • Auto-generate README.md from lib.rs doc comments via cargo rdme
  • Add operations reference tables to compressed-token-sdk and token-sdk

Each crate follows the token-client pattern: lib.rs is the source of truth, README.md is generated.

Test plan

  • Verify cargo rdme regenerates identical README.md for each crate
  • Spot-check doc comments render on docs.rs

Summary by CodeRabbit

  • Documentation

    • Added and expanded READMEs and crate-level docs across many libraries with guides, examples, API overviews, and usage notes.
  • New Features

    • Added several public modules, re-exports, a parsing module, new constants, and richer SDK client examples that expose additional capabilities.
  • Chores

    • Added documentation config files and updated crate metadata to enable improved README generation and tooling.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

Adds cargo-rdme configs and README metadata to many crates, inserts readme = "README.md" into multiple Cargo.toml files, introduces crate-level RustDoc headers, and exposes a set of new public modules/constants across several program- and SDK crates. No runtime logic or behavioral changes.

Changes

Cohort / File(s) Summary
Cargo RDME configs
program-libs/*/.cargo-rdme.toml, sdk-libs/*/.cargo-rdme.toml
Added workspace-project and heading-base-level = 0 files across many crates for cargo-rdme.
Cargo manifests
program-libs/*/Cargo.toml, sdk-libs/*/Cargo.toml
Inserted readme = "README.md" into numerous crate [package] sections (metadata-only).
README additions
program-libs/.../README.md, sdk-libs/.../README.md
Added or expanded README content (cargo-rdme annotated blocks) across many program and SDK crates.
Crate docs / lib.rs headers
program-libs/.../src/lib.rs, sdk-libs/.../src/lib.rs
Added crate-level RustDoc headers documenting public API items for many crates (documentation-only changes).
Batched-merkle-tree
program-libs/batched-merkle-tree/src/lib.rs, program-libs/batched-merkle-tree/README.md
Added extensive crate docs and publicly exported modules: errors, initialize_address_tree, initialize_state_tree, merkle_tree, merkle_tree_metadata, queue, queue_batch_metadata, rollover_address_tree, rollover_state_tree.
Compressible
program-libs/compressible/src/lib.rs, program-libs/compressible/README.md
Added public modules registry_instructions, rent and public constant DECOMPRESSED_PDA_DISCRIMINATOR; crate-level docs added.
Merkle-tree-metadata
program-libs/merkle-tree-metadata/src/lib.rs, program-libs/merkle-tree-metadata/README.md
Added crate docs and public modules fee, merkle_tree, queue, rollover, utils; added re-exports from light_compressed_account.
Token-interface
program-libs/token-interface/src/lib.rs, program-libs/token-interface/README.md
Added public modules error, hash_cache, pool_derivation, token_2022_extensions and associated re-exports; crate docs added.
Event parse
sdk-libs/event/src/lib.rs, sdk-libs/event/README.md
Added pub mod parse and crate docs documenting PublicTransactionEvent, BatchPublicTransactionEvent, and parsing utilities.
Token-client root export
sdk-libs/token-client/src/lib.rs, sdk-libs/token-client/README.md
Added crate docs and pub use actions::*; to re-export actions at crate root.
SDK-pinocchio
sdk-libs/sdk-pinocchio/src/lib.rs, sdk-libs/sdk-pinocchio/README.md
Added pub mod instruction;, expanded crate docs and exports.
Indexed-array
program-libs/indexed-array/src/lib.rs, program-libs/indexed-array/README.md
Added crate docs and new public constant HIGHEST_ADDRESS_PLUS_ONE.
Minor docs/typo fixes
program-libs/aligned-sized/src/lib.rs
Fixed a typo in a comment.
Other crates (docs-only)
program-libs/*/src/lib.rs, sdk-libs/*/src/lib.rs, many README.md
Numerous crates received crate-level documentation and README updates; most changes are documentation/metadata only.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

ai-review

Suggested reviewers

  • sergeytimoshin
  • ananas-block

Poem

Docs unfurl like tidy maps,
Cargo TOML seeds the gaps,
Modules listed, constants bright,
READMEs glow in markdown light,
Small changes, big docs — code sleeps tight. 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add cargo-rdme README generation for sdk-libs and program-libs' clearly and concisely describes the primary change: adding cargo-rdme configuration and README generation across two library directories.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tilo/token-client-claude-md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@sdk-libs/token-client/CLAUDE.md`:
- Around line 48-65: Update the "Source layout" section in CLAUDE.md to group
the listed files into the SDK-specific categories: Client Functions, Instruction
Builders, and Types; explicitly map lib.rs and actions/mod.rs and each action
file (create_mint.rs, create_ata.rs, mint_to.rs, transfer.rs,
transfer_checked.rs, transfer_interface.rs, approve.rs, revoke.rs, wrap.rs,
unwrap.rs) to one of those categories (e.g., client-facing functions in
actions/* as Client Functions, builder helpers in transfer_interface.rs and any
*_builder files as Instruction Builders, and TokenMetadata or other data structs
in create_mint.rs as Types), keeping the same filenames but showing the category
headings and short one-line role descriptions for each module to satisfy the SDK
documentation guideline.
- Around line 1-65: Update CLAUDE.md to include the mandated top-level sections:
add a "Summary" with 2–5 short bullet points describing the crate (mention it is
a Rust client for light-token, action structs with async execute, signing model,
and trait bounds like CreateMint::execute requiring R: Rpc + Indexer), add a
"Used in" section listing consumers of this crate or repos that import it, add
"Navigation" instructions that point to main files (e.g., src/lib.rs and
actions/*) and how to quickly find action implementations, and add explicit
high-level subsections "Accounts", "Instructions", and "Source Code Structure"
(you can reuse the existing Source layout block and expand with brief notes on
each action struct such as CreateMint, CreateAta, MintTo, Transfer,
TransferChecked, TransferInterface, Approve, Revoke, Wrap, Unwrap and their
signer expectations); optionally include Config Requirements and Security
Considerations if applicable. Ensure headings match repo standard names and keep
bullets concise.
- Around line 50-65: Update the fenced code block in CLAUDE.md to include a
language identifier (e.g., change ``` to ```text) and ensure the file ends with
a single trailing newline; locate the fenced block containing the src/ tree
listing and add the language token after the opening backticks and append one
final newline at EOF so the file ends with exactly one newline.
- Around line 8-19: The table in CLAUDE.md uses pipes without surrounding spaces
which violates markdownlint MD060; update the table rows and header so every
pipe has a single space before and after it (e.g., "| Struct | Fields |
`execute` signers |") across all rows including entries for CreateMint,
CreateAta, MintTo, Transfer, TransferChecked, TransferInterface, Approve,
Revoke, Wrap, and Unwrap to match the compact style.

Comment on lines +8 to +19
| Struct | Fields | `execute` signers |
|--------|--------|-------------------|
| `CreateMint` | `decimals`, `freeze_authority?`, `token_metadata?`, `seed?` | `payer`, `mint_authority` |
| `CreateAta` | `mint`, `owner`, `idempotent` | `payer` |
| `MintTo` | `mint`, `destination`, `amount` | `payer`, `authority` |
| `Transfer` | `source`, `destination`, `amount` | `payer`, `authority` |
| `TransferChecked` | `source`, `mint`, `destination`, `amount`, `decimals` | `payer`, `authority` |
| `TransferInterface` | `source`, `mint`, `destination`, `amount`, `decimals`, `spl_token_program?`, `restricted` | `payer`, `authority` |
| `Approve` | `token_account`, `delegate`, `amount`, `owner?` | `payer` (or `payer` + `owner`) |
| `Revoke` | `token_account`, `owner?` | `payer` (or `payer` + `owner`) |
| `Wrap` | `source_spl_ata`, `destination`, `mint`, `amount`, `decimals` | `payer`, `authority` |
| `Unwrap` | `source`, `destination_spl_ata`, `mint`, `amount`, `decimals` | `payer`, `authority` |
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix markdown table pipe spacing (MD060).

The table headers/rows don’t follow the configured compact style (missing spaces around pipes). This is flagged by markdownlint.

Suggested fix
-| Struct | Fields | `execute` signers |
-|--------|--------|-------------------|
-| `CreateMint` | `decimals`, `freeze_authority?`, `token_metadata?`, `seed?` | `payer`, `mint_authority` |
+| Struct | Fields | `execute` signers |
+| ------ | ------ | ----------------- |
+| `CreateMint` | `decimals`, `freeze_authority?`, `token_metadata?`, `seed?` | `payer`, `mint_authority` |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Struct | Fields | `execute` signers |
|--------|--------|-------------------|
| `CreateMint` | `decimals`, `freeze_authority?`, `token_metadata?`, `seed?` | `payer`, `mint_authority` |
| `CreateAta` | `mint`, `owner`, `idempotent` | `payer` |
| `MintTo` | `mint`, `destination`, `amount` | `payer`, `authority` |
| `Transfer` | `source`, `destination`, `amount` | `payer`, `authority` |
| `TransferChecked` | `source`, `mint`, `destination`, `amount`, `decimals` | `payer`, `authority` |
| `TransferInterface` | `source`, `mint`, `destination`, `amount`, `decimals`, `spl_token_program?`, `restricted` | `payer`, `authority` |
| `Approve` | `token_account`, `delegate`, `amount`, `owner?` | `payer` (or `payer` + `owner`) |
| `Revoke` | `token_account`, `owner?` | `payer` (or `payer` + `owner`) |
| `Wrap` | `source_spl_ata`, `destination`, `mint`, `amount`, `decimals` | `payer`, `authority` |
| `Unwrap` | `source`, `destination_spl_ata`, `mint`, `amount`, `decimals` | `payer`, `authority` |
| Struct | Fields | `execute` signers |
| ------ | ------ | ----------------- |
| `CreateMint` | `decimals`, `freeze_authority?`, `token_metadata?`, `seed?` | `payer`, `mint_authority` |
| `CreateAta` | `mint`, `owner`, `idempotent` | `payer` |
| `MintTo` | `mint`, `destination`, `amount` | `payer`, `authority` |
| `Transfer` | `source`, `destination`, `amount` | `payer`, `authority` |
| `TransferChecked` | `source`, `mint`, `destination`, `amount`, `decimals` | `payer`, `authority` |
| `TransferInterface` | `source`, `mint`, `destination`, `amount`, `decimals`, `spl_token_program?`, `restricted` | `payer`, `authority` |
| `Approve` | `token_account`, `delegate`, `amount`, `owner?` | `payer` (or `payer` + `owner`) |
| `Revoke` | `token_account`, `owner?` | `payer` (or `payer` + `owner`) |
| `Wrap` | `source_spl_ata`, `destination`, `mint`, `amount`, `decimals` | `payer`, `authority` |
| `Unwrap` | `source`, `destination_spl_ata`, `mint`, `amount`, `decimals` | `payer`, `authority` |
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

9-9: Table column style
Table pipe is missing space to the right for style "compact"

(MD060, table-column-style)


9-9: Table column style
Table pipe is missing space to the left for style "compact"

(MD060, table-column-style)


9-9: Table column style
Table pipe is missing space to the right for style "compact"

(MD060, table-column-style)


9-9: Table column style
Table pipe is missing space to the left for style "compact"

(MD060, table-column-style)


9-9: Table column style
Table pipe is missing space to the right for style "compact"

(MD060, table-column-style)


9-9: Table column style
Table pipe is missing space to the left for style "compact"

(MD060, table-column-style)

🤖 Prompt for AI Agents
In `@sdk-libs/token-client/CLAUDE.md` around lines 8 - 19, The table in CLAUDE.md
uses pipes without surrounding spaces which violates markdownlint MD060; update
the table rows and header so every pipe has a single space before and after it
(e.g., "| Struct | Fields | `execute` signers |") across all rows including
entries for CreateMint, CreateAta, MintTo, Transfer, TransferChecked,
TransferInterface, Approve, Revoke, Wrap, and Unwrap to match the compact style.

@tilo-14 tilo-14 force-pushed the tilo/token-client-claude-md branch from 8583291 to e2d23b1 Compare January 29, 2026 02:11
@tilo-14 tilo-14 changed the title add CLAUDE.md for token-client crate docs: add cargo-rdme README generation for sdk-libs and program-libs Jan 29, 2026
@tilo-14 tilo-14 force-pushed the tilo/token-client-claude-md branch from e2d23b1 to 082b0ff Compare January 29, 2026 02:18
@tilo-14 tilo-14 changed the title docs: add cargo-rdme README generation for sdk-libs and program-libs chore docs: add cargo-rdme README generation for sdk-libs and program-libs Jan 29, 2026
@tilo-14 tilo-14 force-pushed the tilo/token-client-claude-md branch 3 times, most recently from bc6449a to 6cc71a2 Compare January 29, 2026 02:36
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 29

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
sdk-libs/sdk-pinocchio/src/lib.rs (1)

18-20: Track the tree_info TODO with an issue.
This TODO is scoped and useful, but it’s easy to forget; please link it to a tracker or file an issue.

Would you like me to draft the tree_info module skeleton or open an issue template entry?

program-libs/indexed-array/src/lib.rs (1)

17-18: Move this constant to a single canonical location or re-export it through the module dependency chain.

This constant is duplicated in both program-libs/indexed-array/src/lib.rs (line 17) and program-libs/indexed-merkle-tree/src/lib.rs (line 45). Since indexed-merkle-tree depends on indexed-array, it should import and re-export HIGHEST_ADDRESS_PLUS_ONE from the lower-level indexed-array module rather than maintaining a separate definition. Duplicate constant definitions risk divergence and complicate maintenance. Keep the source of truth in indexed-array and have indexed-merkle-tree consume it from there.

🤖 Fix all issues with AI agents
In `@program-libs/aligned-sized/README.md`:
- Around line 10-11: Update the README sentence that currently reads "Ensuring
that the struct is aligned, adding padding fields when neccessary." and correct
the typo by replacing "neccessary" with "necessary" so it reads "Ensuring that
the struct is aligned, adding padding fields when necessary." Ensure the change
is applied in the README.md content where that line appears.

In `@program-libs/batched-merkle-tree/README.md`:
- Around line 3-29: The generated README triggers markdownlint rules
MD041/MD060/MD022 due to incorrect heading level, missing blank lines around
headings, and table spacing; fix the source doc comments in lib.rs (or the
cargo-rdme template/config) so headings start at an appropriate level (e.g., use
"##" only when a top-level "##" is intended), ensure a blank line precedes and
follows each heading and surrounding content, and add a blank line before and
after the pipe table and ensure table rows are separated properly; update the
doc comment blocks that produce the top-of-readme section (the crate-level
comments that generate the heading and the module table) to include the required
blank lines and correct heading level so regenerated README complies with
MD041/MD060/MD022.

In `@program-libs/compressible/README.md`:
- Around line 6-11: Fix the stray leading spaces in the doc comments in lib.rs
that generate the README lines (the doc comment lines producing " bump..." and "
account...") by removing the extra leading whitespace so the rendered text
doesn't have the indents, then run cargo rdme to regenerate
program-libs/compressible/README.md and confirm the MD060 table pipe spacing
warnings are resolved (if not, tidy the table pipe spacing in the regenerated
README). Ensure you edit the doc comment block in lib.rs that documents the
rent-exemption/compression behavior and re-run cargo rdme to produce the
corrected README.

In `@program-libs/compressible/src/lib.rs`:
- Around line 11-21: Remove the orphaned blank crate-level doc comment line that
appears before the table (the lone `//!` line) to avoid the extra blank line in
generated docs; edit the top-level docs in lib.rs where the table references
`CompressionInfo`, `CompressibleConfig`, `CreateAccountsProof`, `RentConfig`,
`compression_info`, `registry_instructions`, and `rent` and delete that single
empty `//!` line so the prose flows directly into the table.
- Around line 4-9: The module-level doc comment in compressible::lib.rs contains
inconsistent leading/trailing whitespace on the second and third comment lines;
remove the extra spaces so each line begins with "///" followed by a single
space and no trailing spaces, ensuring the block comment text is consistently
formatted for cargo rdme (edit the top-of-file doc comment in lib.rs).

In `@program-libs/concurrent-merkle-tree/src/lib.rs`:
- Around line 1-15: The crate-level doc table in lib.rs lists public items but
omits the public modules `copy` and `offset`, making the overview misleading;
update the documentation comment to either add rows for `copy` and `offset` with
brief descriptions (e.g., `copy` | utilities for leaf copying/patching, `offset`
| index/address offset helpers) alongside the existing entries like
`ConcurrentMerkleTree` and `changelog`, or replace the table with a short
disclaimer that the table is a curated subset of public modules so readers
aren’t misled; edit the top-level doc comment in lib.rs accordingly.

In `@program-libs/hash-set/README.md`:
- Around line 1-15: Update the README heading to an H1 by changing "##
light-hash-set" to "# light-hash-set" and normalize the table separator to the
compact style (change the separator row for the Type/Description table from
"|------|-------------|" to a compact form like "|---|---|"), ensuring the rest
of the table rows remain aligned and there are no extra trailing spaces; this
will keep entries like `HashSet`, `HashSetCell`, `HashSetError`,
`HashSetIterator`, and `zero_copy` lint-clean for MD041/MD060.

In `@program-libs/hasher/src/lib.rs`:
- Around line 1-15: Update the top-level documentation table to include the
public utility `zero_indexed_leaf` alongside the other entries; locate the doc
comment block that lists [`Hasher`], [`Poseidon`], [`Keccak`], [`Sha256`],
[`DataHasher`], [`HasherError`], [`hash_chain`], [`hash_to_field_size`], and
[`zero_bytes`] and add a new row for [`zero_indexed_leaf`] with a short
description (e.g., "Precomputed zero-indexed leaf hash utility") so the module
is accurately documented and discoverable.

In `@program-libs/indexed-merkle-tree/src/lib.rs`:
- Around line 1-15: The crate documentation table in lib.rs is missing the
exported module `copy`—add an entry for `copy` to the public-surface summary so
the table matches the actual exports; specifically update the README-like table
in the top-level docs to include a row for [`copy`] with a short description
(e.g., "Copy utilities for indexed trees") next to the other entries like
[`IndexedMerkleTree`], [`IndexedMerkleTree26`], [`array`], [`changelog`],
[`reference`], [`zero_copy`], and [`errors`], ensuring the `pub mod copy;`
export is documented.

In `@program-libs/macros/README.md`:
- Around line 3-15: Change the README heading from "## light-macros" to an H1
("# light-macros") and convert the macro table to the compact Markdown table
style (remove extra padding around pipes and ensure no blank lines inside the
table) so it satisfies MD041/MD060; update the table that lists `pubkey!`,
`pubkey_array!`, `derive_light_cpi_signer!`, `derive_light_cpi_signer_pda!`,
`#[heap_neutral]`, and `#[derive(Noop)]` accordingly.

In `@program-libs/merkle-tree-metadata/README.md`:
- Around line 7-15: The README module table is missing the publicly exported
utils module; update the table in README.md to add a new row documenting utils
(as exported from lib.rs) — include an entry like "| [`utils`] | Utility
functions for conditional option handling |" and optionally mention key helpers
such as if_equals_zero_u64 and if_equals_none so docs match the crate's public
API.

In `@program-libs/merkle-tree-metadata/src/lib.rs`:
- Around line 1-14: The crate documentation table omits the public utils module
declared as pub mod utils;—add an entry for `utils` in the top-level doc comment
table (near the other module rows) with a short description like "Helper
utilities: conversions, helpers, and common types" so the public module `utils`
is discoverable and consistent with the other crates in this PR; update the
table rows in the module doc comment to include [`utils`] and a concise
description.

In `@program-libs/token-interface/README.md`:
- Around line 1-16: Change the README top-level heading from "##
light-token-interface" to an H1 ("# light-token-interface") and adjust the table
separator row to the compact style (e.g., replace "|--------|-------------|"
with a compact separator like "| --- | --- |") so the modules table (rows
listing [`instructions`], [`state`], [`discriminator`], [`hash_cache`],
[`pool_derivation`], [`token_2022_extensions`], [`error`]) conforms to
markdownlint MD041/MD060 rules.

In `@program-libs/verifier/src/lib.rs`:
- Around line 6-9: The doc comment incorrectly says "1–8+" for
verify_inclusion_proof (and similarly for verify_create_addresses_proof) but the
implementation only supports up to 8 leaves; update the documentation table in
lib.rs to tighten the range to "1–8" (remove the plus) for both
[`verify_inclusion_proof`] and [`verify_create_addresses_proof`] so the comment
accurately reflects the supported leaf count.

In `@sdk-libs/client/README.md`:
- Around line 3-12: Change the "Light Client" heading to a top-level H1 (prepend
a single '#') and rewrite the following repeated "For ..." lines into concise
sentences: combine related links into one or two lines (e.g., "For documentation
and examples, see ... and ..."), remove redundant phrasing, and correct the typo
"developement" to "development" (references: the heading text "Light Client" and
the link text "rust client developement" in the README content).

In `@sdk-libs/compressed-token-sdk/src/lib.rs`:
- Line 9: Replace the mistyped doc comment marker `//|` with the proper inner
doc comment `//!` in lib.rs so the line "do not require a rent-exempt balance."
is included in rustdoc/README; locate the comment near the top-level crate
documentation in compressed-token-sdk::lib (the top-of-file docs) and change the
marker to `//!` to ensure it renders as part of the crate-level documentation.

In `@sdk-libs/program-test/README.md`:
- Around line 1-5: The README currently starts with an H2 ("## Light Program
Test") which triggers MD041; change that top-level title to an H1 by replacing
"## Light Program Test" with "# Light Program Test" and shift any subsequent
headings down one level as needed so the file has a single top-level H1; update
the README.md title line in the provided diff accordingly.
- Around line 7-10: The three consecutive sentences in README.md that each start
with "For ..." are repetitive; edit the lines referencing light-sdk,
light-client, Program Examples, and zkcompression.com to vary sentence openings
and improve flow (e.g., use "See", "Use", "Visit", or combine items into a
single sentence), keeping the same links and meanings; specifically update the
sentences that mention `light-sdk`, `light-client`, `Program Examples`, and
`zkcompression.com` so they no longer all begin with "For" while preserving the
target URLs and intent.
- Around line 12-132: The README has missing blank lines around headings and
fenced code blocks (MD022/MD031); update the markdown so there is an empty line
before and after each heading (e.g., "## Features", "### Configuration Options",
"### Prerequisites", "### Prover Server", "### Debugging", "### Examples", "####
V1 Trees", "#### V2 Trees") and ensure fenced blocks (the bash and rust code
fences) have a blank line above and below them; if this file is generated,
adjust the source doc comments that produce these sections so cargo‑rdme emits
the required blank lines around headings and code fences.

In `@sdk-libs/sdk-pinocchio/README.md`:
- Around line 1-16: The generated README triggers markdownlint rules MD041/MD060
due to the doc-table formatting produced by cargo-rdme; fix by editing the table
in lib.rs (the doc comment that cargo-rdme turns into README.md) to use a
Markdown-compatible separator row with spaces between pipes and dashes in the
table header separator (so the table renders as a standard Markdown table), or
alternatively update the markdownlint config to ignore cargo-rdme markers as the
first line; look for the doc-comment that produces the table (in lib.rs) and
either adjust the separator row formatting or add an exception for cargo-rdme in
the markdownlint config.

In `@sdk-libs/sdk-types/README.md`:
- Around line 1-13: Generated README violates markdownlint rules MD041 and MD060
because the top-level heading is a level-2 (##) and table pipes are not spaced;
update the rdme generation template or the crate doc comment that produces the
README so the first heading for the crate name "light-sdk-types" is an H1 (#
light-sdk-types) and ensure table rows use spaced pipes (e.g., "| Type |
Description |") so entries like "RentSponsor", "CpiAccounts", "CpiSigner",
"address", and "constants" render with proper pipe spacing; adjust the rdme
template or lib.rs doc comment formatting accordingly and regenerate the README.

In `@sdk-libs/sdk/README.md`:
- Around line 81-82: The README has a heading that jumps from h2 ("## Features")
to h4 ("#### Example Solana program code to create a compressed account");
change the "#### Example Solana program code to create a compressed account"
heading to a level-3 heading ("###") to restore proper hierarchy and satisfy
MD001 (look for the heading string in README.md and update it).
- Around line 4-7: Reword the awkward phrase "not config accounts which are
often read" in the README line that lists suitable uses for compressed accounts;
locate the bullet containing that exact phrase and replace it with a clearer
sentence such as "not configuration accounts (these are often read-only)," or
"not configuration accounts, which are typically read frequently," so the intent
— that compressed accounts are not appropriate for config accounts because those
are often read — is stated clearly and concisely.
- Around line 29-32: Remove the trailing space after the phrase
"rent-exemption," and collapse the double spaces after the "##" in the markdown
headings (e.g., change "##  Using Compressed Accounts in Solana Programs" to "##
Using Compressed Accounts in Solana Programs" and fix the other heading with the
same "##  ..." pattern near line 46); edit the README heading lines and the
"rent-exemption," occurrence to eliminate the extra spaces so the markdown
linter stops flagging them.

In `@sdk-libs/sdk/src/lib.rs`:
- Around line 24-28: Run rustfmt on sdk/src/lib.rs to fix the formatting error
reported at line 24 and update the top-level docs: change "not config accounts"
to "not for config accounts", convert possessive/plural uses like "Light-PDA's"
and "Compressed PDA's" to plural forms "Light-PDAs" and "Compressed PDAs" (and
any other "PDA's" occurrences) for correct grammar, and re-run the linter to
confirm the doc and formatting issues are resolved.

In `@sdk-libs/token-sdk/README.md`:
- Around line 1-74: The README markdown issues are generated by cargo-rdme from
the crate root docs; fix them in the source doc comments in lib.rs (crate-level
//! comments) rather than editing README.md directly—inspect and correct heading
spacing, list indentation, and table markup in the top-level doc comments in
lib.rs (crate docs, module docs or any doc comments that produce the "Light
Token SDK" section), then re-run cargo rdme to regenerate README.md so the
Markdown formatting (headings, lists, and tables) is emitted correctly.
- Around line 7-34: The README's network availability statements for "Light
Token Accounts", "Light Mints", and "Compressed Token Accounts" are misleading;
update the README.md to explicitly state which networks each feature is deployed
on (Devnet and/or Mainnet) and note any network-specific limitations or behavior
(e.g., rent, compression/decompression, rent sponsorship) so readers aren't led
to believe features are exclusive to one network; reference the existing
headings "Light Token Accounts", "Light Mints", and "Compressed Token Accounts"
and replace the current single-line network claims with clear bullets: (1) exact
networks supported, (2) any differences in behavior or cost per network, and (3)
an explicit note reconciling the "not audited, beta state" disclaimer with the
actual audited/deployed status of Light Protocol programs (indicating audited
status where applicable and keeping any remaining beta warnings).

In `@sdk-libs/token-sdk/src/lib.rs`:
- Line 8: Crate-level doc comment in lib.rs uses the incorrect token "//|"
instead of the Rust crate/doc comment "//!", causing doc/compilation issues;
update the comment starting with "//|" to use "//!", ensuring all crate-level
documentation lines (the one that reads "//| - are functionally equivalent to
SPL token accounts.") are changed to "//! - are functionally equivalent to SPL
token accounts." so the documentation is correctly parsed.

In `@sdk-libs/token-types/README.md`:
- Around line 7-13: Replace the Rust intra-doc links in the generated README
table (e.g., TokenAccountMeta, BatchCompressInstructionData,
CompressedTokenInstructionDataApprove, PackedMerkleContext, DelegatedTransfer)
with GitHub-friendly references: either plain backticked type names (e.g.,
`TokenAccountMeta`) or relative file links to the source file where each type is
defined; update the generator output (cargo-rdme template or lib.rs doc
comments) so the table emits backticked names or relative markdown links instead
of the rustdoc-style links so the README renders correctly on GitHub.

Comment on lines +6 to +11
The program pays the rent exemption for the account. Transaction fee payers
bump a virtual rent balance when writing to the account, which keeps the
account “hot”. “Cold” accounts virtual rent balance below threshold
(eg 24h without write bump) get auto-compressed. The cold account’s state
is cryptographically preserved on the Solana ledger. Users can load a
cold account into hot state in-flight when using the account again.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Whitespace inherited from lib.rs doc comments.

Lines 7-8 have leading spaces ( bump..., account...) that will be fixed when you address the corresponding issue in lib.rs. After running cargo rdme, this README will regenerate with correct formatting.

The MD060 linter warnings about table pipe spacing (line 9 in the hint) may also resolve once regenerated, but verify after the fix.

🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

9-9: Table column style
Table pipe is missing space to the right for style "compact"

(MD060, table-column-style)


9-9: Table column style
Table pipe is missing space to the left for style "compact"

(MD060, table-column-style)


9-9: Table column style
Table pipe is missing space to the right for style "compact"

(MD060, table-column-style)


9-9: Table column style
Table pipe is missing space to the left for style "compact"

(MD060, table-column-style)

🤖 Prompt for AI Agents
In `@program-libs/compressible/README.md` around lines 6 - 11, Fix the stray
leading spaces in the doc comments in lib.rs that generate the README lines (the
doc comment lines producing " bump..." and " account...") by removing the extra
leading whitespace so the rendered text doesn't have the indents, then run cargo
rdme to regenerate program-libs/compressible/README.md and confirm the MD060
table pipe spacing warnings are resolved (if not, tidy the table pipe spacing in
the regenerated README). Ensure you edit the doc comment block in lib.rs that
documents the rent-exemption/compression behavior and re-run cargo rdme to
produce the corrected README.

Comment on lines +4 to +9
//! The program pays the rent exemption for the account. Transaction fee payers
//! bump a virtual rent balance when writing to the account, which keeps the
//! account “hot”. “Cold” accounts virtual rent balance below threshold
//! (eg 24h without write bump) get auto-compressed. The cold account’s state
//! is cryptographically preserved on the Solana ledger. Users can load a
//! cold account into hot state in-flight when using the account again.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix inconsistent whitespace in doc comments to satisfy the linter.

The pipeline flagged a formatting diff at this location. Lines 5-6 have extra leading/trailing spaces that break consistency. This matters because cargo rdme will propagate these to the README verbatim.

📝 Proposed fix for whitespace
 //! Compressible account lifecycle for accounts with sponsored rent-exemption.
 //! The program pays the rent exemption for the account. Transaction fee payers
-//!  bump a virtual rent balance when writing to the account, which keeps the 
-//!  account "hot". "Cold" accounts virtual rent balance below threshold 
+//! bump a virtual rent balance when writing to the account, which keeps the
+//! account "hot". "Cold" accounts virtual rent balance below threshold
 //! (eg 24h without write bump) get auto-compressed. The cold account's state 
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
//! The program pays the rent exemption for the account. Transaction fee payers
//! bump a virtual rent balance when writing to the account, which keeps the
//! account hot”. “Cold accounts virtual rent balance below threshold
//! (eg 24h without write bump) get auto-compressed. The cold accounts state
//! is cryptographically preserved on the Solana ledger. Users can load a
//! cold account into hot state in-flight when using the account again.
//! The program pays the rent exemption for the account. Transaction fee payers
//! bump a virtual rent balance when writing to the account, which keeps the
//! account "hot". "Cold" accounts virtual rent balance below threshold
//! (eg 24h without write bump) get auto-compressed. The cold account's state
//! is cryptographically preserved on the Solana ledger. Users can load a
//! cold account into hot state in-flight when using the account again.
🤖 Prompt for AI Agents
In `@program-libs/compressible/src/lib.rs` around lines 4 - 9, The module-level
doc comment in compressible::lib.rs contains inconsistent leading/trailing
whitespace on the second and third comment lines; remove the extra spaces so
each line begins with "///" followed by a single space and no trailing spaces,
ensuring the block comment text is consistently formatted for cargo rdme (edit
the top-of-file doc comment in lib.rs).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 31

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
program-libs/merkle-tree-metadata/src/lib.rs (1)

5-22: Document the exported utils module in the header table.

The crate doc lists public modules but omits utils, which is exported below. Keeping the header table complete avoids drift between docs and the public surface.

Proposed doc update
 //! | [`rollover`] | Rollover threshold and status tracking |
 //! | [`events`] | Changelog events emitted on tree updates |
 //! | [`errors`] | `MerkleTreeMetadataError` variants |
+//! | [`utils`] | Shared helpers and constants |
program-libs/indexed-merkle-tree/src/lib.rs (1)

362-372: Remove debug println! statements before merging.

Lines 362 and 372 contain debug print statements that should not be in production code. These will pollute logs and may leak internal state information.

🐛 Proposed fix to remove debug statements
-        println!("low_element: {:?}", low_element);
-
         self.patch_elements_and_proof(
             indexed_changelog_index,
             &mut changelog_index,
             &mut new_element,
             &mut low_element,
             &mut low_element_next_value,
             low_leaf_proof,
         )?;
-        println!("patched low_element: {:?}", low_element);
🤖 Fix all issues with AI agents
In `@program-libs/aligned-sized/README.md`:
- Around line 8-12: Fix the typo in the README by replacing the misspelled word
"neccessary" with "necessary" in the Future plans paragraph (README.md) so the
line reads "Ensuring that the struct is aligned, adding padding fields when
necessary." Use the exact phrase replacement to preserve surrounding text and
punctuation.
- Around line 13-25: Add concise relative links in the README that point
directly to the macro definition and public API in the crate source (for example
the aligned_sized! macro and the public functions/types in src/lib.rs),
including the file path and the specific line numbers where those symbols are
defined so readers can jump straight to the implementation; update the
"Motivation" or an adjacent "Usage" section to include these relative links
(e.g., ../src/lib.rs#Lxx-Lyy for aligned_sized! and other public items).
- Around line 1-3: Add a top-level H1 heading to the README so the crate name
appears immediately; prepend a line like "# aligned-sized" (matching the crate
name) at the very top of the file before the existing content that introduces
the `aligned_sized` macro to satisfy tooling and readers.

In `@program-libs/batched-merkle-tree/README.md`:
- Around line 3-20: Change the top-level heading "light-batched-merkle-tree"
from "##" to a single "#" so the document starts with a level-1 heading, and
normalize the table's separator row and cell spacing to conform to markdownlint
(use at least three dashes like "| Module | Description |" followed by "| --- |
--- |" and ensure a single space after/before each pipe), e.g. adjust the
header/separator lines around the "`batch`" table entry to use consistent
spacing and '---' separators.

In `@program-libs/bloom-filter/README.md`:
- Around line 3-9: The generated README violates markdownlint MD041/MD060
because the first heading must be H1 and table separators need padded pipes;
update the cargo-rdme generation settings by ensuring the crate-level doc header
emits an H1 (or set heading-base-level to 1) and render tables with padded
separators (configure the table formatter or template) so the output for the
BloomFilter README uses a leading H1 and properly padded table separators.

In `@program-libs/compressible/src/lib.rs`:
- Around line 3-9: The module-level doc comment in compressible's lib.rs
currently has leading spaces on several lines (the //! comment block at the top)
which rustdoc treats as a code block; remove the extra leading whitespace so
each //! line starts flush (no extra spaces after //!), e.g. edit the //! doc
block in program-libs/compressible/src/lib.rs to left-trim the lines describing
rent bumping, virtual rent balance, and cold account behavior (preserve the same
wording but eliminate leading spaces) so rustdoc renders normal paragraph text
instead of a code block.

In `@program-libs/concurrent-merkle-tree/README.md`:
- Around line 3-10: The generated README violates markdownlint MD041/MD060
because it lacks an H1 at the top and uses unpadded table separators; update the
crate-level doc header (or adjust the cargo-rdme heading-base-level setting in
the generator) so the first line is an H1 and ensure table pipes are padded
(e.g., " | " around cells) for the table that documents ConcurrentMerkleTree;
change the generator template that emits the crate docs (or the crate-level doc
comment) rather than editing the generated README directly.

In `@program-libs/hash-set/README.md`:
- Around line 1-15: Add the missing CLAUDE.md and fix the README heading level:
create program-libs/hash-set/CLAUDE.md following the compressible example with
sections Summary (2–5 bullets), Used in, Navigation, and High-level (Core Types,
Public APIs) and include references to HashSet, HashSetCell, HashSetError,
HashSetIterator and zero_copy; then regenerate or adjust the cargo-rdme settings
so the generated README heading level matches .cargo-rdme.toml (either set
heading-base-level = 1 in .cargo-rdme.toml to produce an H1 "light-hash-set" in
README.md or change the file to heading-base-level = 2 if H2 is intended) and
ensure README.md’s first line is an H1 when the lint requires it.

In `@program-libs/indexed-merkle-tree/README.md`:
- Around line 1-16: The README heading level mismatch: update the cargo-rdme
configuration to generate an H1 (set heading-base-level = 1 -> 0 or adjust to
produce a single leading `#`) or change the README template to use `#
light-indexed-merkle-tree` so the output matches `.cargo-rdme.toml` and
satisfies markdownlint rules, and add a new CLAUDE.md file at the crate root
containing the required project boilerplate; look for the README content for
symbols like `IndexedMerkleTree`, `IndexedMerkleTree26`, and the existing
`.cargo-rdme.toml`/README generation pipeline to make these changes.

In `@program-libs/indexed-merkle-tree/src/lib.rs`:
- Around line 1-14: The crate-level documentation table is missing the public
module `copy`; either add a row for [`copy`] in the top-level doc table
alongside `array`, `changelog`, etc., describing its purpose (e.g., "copy
utilities" or whatever `copy` exports) or, if `copy` is meant to be internal,
change its declaration to `pub(crate) mod copy` so it is not part of the public
API; locate the `copy` module and the crate-level doc table in lib.rs and apply
one of these two fixes to keep docs and visibility consistent.

In `@program-libs/macros/README.md`:
- Around line 9-14: The README table uses rustdoc intra-doc links like
`[pubkey!](pubkey)` which won't render on crates.io/GitHub; update those entries
(for `pubkey!`, `pubkey_array!`, `derive_light_cpi_signer!`,
`derive_light_cpi_signer_pda!`, `#[heap_neutral]`, and `#[derive(Noop)]`) to
either plain descriptive text or full docs.rs URLs (e.g., replace `(pubkey)`
with the appropriate docs.rs path for each item) so the links work both in cargo
doc and on crates.io/GitHub, keeping the same visible labels but using stable
external URLs or removing the link markup where you prefer to only support
rustdoc.

In `@program-libs/merkle-tree-metadata/README.md`:
- Around line 3-15: Add a top-level H1 title and fix table spacing to satisfy
MD041/MD060: insert a leading "# light-merkle-tree-metadata" line above the
existing "## light-merkle-tree-metadata" (or replace the existing H2 with H1)
and ensure there is a blank line before and after the pipe table, with the
header row "Module | Description" and the separator row
"|--------|-------------|" formatted with consistent single spaces around pipes
so the table parses correctly.

In `@program-libs/token-interface/README.md`:
- Around line 1-16: Add a new CLAUDE.md to the token-interface crate containing
a 2–5 bullet point summary, a "Used in" section listing where this crate is
consumed, brief navigation instructions (how to find README.md and modules like
instructions, state, discriminator, hash_cache, pool_derivation,
token_2022_extensions, error), and high-level sections describing purpose and
key modules; ensure the file mirrors the format used by other crates in the repo
and references the specific module names (instructions, state, discriminator,
hash_cache, pool_derivation, token_2022_extensions, error) so readers can
quickly locate relevant types and docs.

In `@program-libs/verifier/README.md`:
- Around line 3-17: Change the top-level heading to H1 (prepend a single '#' to
"light-verifier") and fix the table separator spacing so each separator cell has
surrounding spaces (e.g., "| --- | --- |") for the functions table (refer to the
table rows that list verify_inclusion_proof, verify_create_addresses_proof,
verify_create_addresses_and_inclusion_proof, verify_batch_append_with_proofs,
verify_batch_update, verify_batch_address_update, select_verifying_key, verify)
and then re-run cargo-rdme to regenerate docs and confirm MD041/MD060 are
resolved.

In `@sdk-libs/client/README.md`:
- Line 10: Update the typo in the crate-level doc comment that generates the
README: change "developement" to "development" in the lib.rs doc comment
sentence ("For rust client developement see [`light-client`]..."); after
correcting the doc comment regenerate the README from the source (rebuild
docs/regen step used in the project) so the README.md reflects the fix.
- Around line 8-12: Fix the typo "developement" → "development" and reduce
repetitive sentence starts by restructuring the README lines that begin with
"For" (e.g., the lines containing "For full program examples", "For pinocchio
solana program development", "For rust client developement", "For rust program
testing", and "For local test validator with light system programs");
consolidate related links into an introductory sentence for examples and a short
"For Rust development:" bullet list that groups `light-client`,
`light-program-test`, and `@lightprotocol/zk-compression-cli`, and keep the
`light-sdk-pinocchio` link inline for pinocchio content to improve readability
and flow.

In `@sdk-libs/compressed-token-sdk/README.md`:
- Around line 1-5: The README starts with a level‑2 heading due to generated
docs; update the source documentation so the first rendered heading is H1 by
changing the doc comment in lib.rs (or adjusting the cargo-rdme base level) that
produces "## Light Compressed Token SDK" to use a single # (e.g., "# Light
Compressed Token SDK") before regenerating with cargo‑rdme so the generated
README satisfies MD041.

In `@sdk-libs/compressed-token-sdk/src/lib.rs`:
- Around line 8-10: The crate-level documentation contains a typo in the rustdoc
marker: change the mistaken line starting with "//|" in the doc comment to start
with "///!" (i.e., make it a rustdoc line like the surrounding comments) so the
list item in lib.rs (crate docs) renders correctly; locate the top-level doc
comment in compressed-token-sdk/src/lib.rs and replace the "//|" marker with
"//!".
- Around line 12-14: Replace the hard-coded "cost 5,000 lamports to create"
claim with a reference to the authoritative constant (e.g.,
TOKEN_CREATION_COST_LAMPORTS or DEFAULT_CREATION_COST_LAMPORTS) and/or soften
the wording to "defaults to X lamports" so it reflects configurability; update
the doc comment in lib.rs to either embed a relative link to that constant's
definition within this crate or to state "defaults to <constant name>" so
readers can find the source-of-truth (search for the constant symbol name in the
codebase, e.g., TOKEN_CREATION_COST_LAMPORTS) and avoid drifting numeric claims.

In `@sdk-libs/instruction-decoder-derive/README.md`:
- Around line 1-4: Don't edit README.md directly; instead add a top-level crate
heading to the root documentation comment in src/lib.rs (e.g., prepend a doc
comment like "//! # light-instruction-decoder-derive" followed by a short
description) so cargo-rdme will generate a README with a proper H1; after
updating src/lib.rs regenerate the README with cargo rdme or update CI to run
cargo-rdme; note the README is machine-generated (<!-- cargo-rdme start -->) so
changes in README.md will be overwritten.

In `@sdk-libs/instruction-decoder/README.md`:
- Around line 13-19: The table in README.md must use markdownlint's "compact"
table style to satisfy MD060: remove the extra spaces around cell content and
tighten the pipes (e.g., change rows like "| [`InstructionDecoder`] | Trait for
decoding program instructions |" to a compact form like
"|[`InstructionDecoder`]|Trait for decoding program instructions|"); update the
generated table in README.md and, more importantly, update the original doc
comments or source that produce this table so cargo-rdme will regenerate the
compact table (ensure the rows for InstructionDecoder, DecoderRegistry,
EnhancedLoggingConfig, TransactionFormatter, and instruction_decoder follow the
compact pipe spacing and the header separator uses compact dashes).

In `@sdk-libs/program-test/README.md`:
- Around line 3-131: The README triggers markdownlint rules MD041/MD022/MD031:
change the top-level "## Light Program Test" to an H1 ("# Light Program Test"),
and ensure there is a blank line before and after every heading and fenced code
block (e.g., the bash install block starting with "```bash" and all Rust
examples); update all other headings to have surrounding blank lines and
consistent spacing, or adjust cargo-rdme config if docs are autogenerated, then
regenerate the README so the lint rules (MD041/MD022/MD031) no longer fire.

In `@sdk-libs/sdk-pinocchio/README.md`:
- Around line 1-16: The generated README is failing markdownlint MD041/MD060 due
to a missing top-level heading and compact table separators; update the source
doc comment that produces the README so it emits a proper H1 (e.g.,
"light-sdk-pinocchio") as the first line and ensure the table uses spaced
separators (`| --- | --- |`) instead of compact `|--------|-------------|`;
alternatively add a file-level linter exemption for MD041 in the generated
README. Locate the doc comment that documents the exports (the section listing
derive_light_cpi_signer, LightDiscriminator, LightAccount, address, cpi,
instruction) and apply these changes so regeneration produces a lint-clean
README.

In `@sdk-libs/sdk/.cargo-rdme.toml`:
- Around line 1-2: The cargo-rdme setup is missing the readme metadata in the
package manifest: open sdk-libs/sdk/Cargo.toml and inside the [package] section
add the line readme = "README.md" so cargo-rdme knows where to write the
generated README; this complements the existing workspace-project = "light-sdk"
entry from .cargo-rdme.toml and completes the pattern.

In `@sdk-libs/sdk/README.md`:
- Line 40: The README entry for LightDiscriminator is missing a URL or
inline-code formatting; locate the line containing "LightDiscriminator" in the
README and either replace the empty link with a proper docs.rs (or other
canonical) URL (e.g., docs.rs/...) so it reads like the other linked items, or
convert the bracketed markdown to inline code using backticks
(`LightDiscriminator`) to match the intended style. Ensure the symbol name
"LightDiscriminator" is updated accordingly so the link/formatting is consistent
with the surrounding entries.

In `@sdk-libs/token-client/README.md`:
- Around line 8-19: The README uses Rust intra-doc style references like
`CreateMint`, `CreateAta`, `MintTo`, etc., which don't render as clickable links
on GitHub; append explicit Markdown link reference definitions for each of those
identifiers (e.g., CreateMint, CreateAta, MintTo, Transfer, TransferChecked,
TransferInterface, Approve, Revoke, Wrap, Unwrap) at the bottom of the README
and point them to the appropriate documentation URLs (crate docs, docs.rs, or
the source/lib.rs anchors) so the items become clickable on GitHub while
preserving the existing inline text.

In `@sdk-libs/token-sdk/README.md`:
- Around line 8-33: The README's hard-coded rent figures are inconsistent and
must be replaced with sourced, date-scoped values: remove fixed numbers from
sdk-libs/token-sdk/README.md and either (a) point readers to a maintained
reference doc (new or existing) that contains the rent calculation provenance
and live constants, or (b) annotate each figure with an "as of <date>" note and
a source link to the actual rent calculation logic in
program-libs/compressible/src/rent/config.rs (including the TODO-marked
constants like base_rent and lamports_per_byte) and/or the canonical Solana rent
docs; also update the README text to explain the rent formula (base_rent +
num_bytes * lamports_per_byte) rather than a single fixed epoch number so
readers can reproduce the value from the referenced config.

In `@sdk-libs/token-sdk/src/lib.rs`:
- Line 8: The crate-level documentation in lib.rs contains an incorrect doc
comment marker (`//|`) which breaks rustdoc/cargo-rdme; open lib.rs and replace
the malformed `//|` comment at the top-level crate doc with the proper inner-doc
marker `//!` so the line (the crate-level doc block in lib.rs) is treated as
documentation by rustdoc and cargo-rdme.
- Around line 36-50: The operations reference table at the top of lib.rs is
missing entries present in the "Common Operations" section: add rows for
BurnCheckedCpi and TransferCpi (matching the format used for other rows,
including Docs guide and GitHub example links) or explicitly change the table
header/comment to state it is a subset/recommended list; update the table near
the existing rows for BurnCpi/TransferCheckedCpi/TransferInterfaceCpi so
BurnCheckedCpi and TransferCpi appear with their corresponding links and
examples.
- Around line 11-18: Update the two documentation lines to remove claims of
automatic behavior: change the line referencing "auto-compressed" to state that
accounts become eligible for compression when lamports are insufficient but
compression is performed only via explicit close/compress calls and that the
system prevents compression by applying explicit rent top-ups (see
lamports_per_write). Change the line referencing "in-flight" loading to clarify
that decompression/loading is performed by explicit idempotent calls (e.g.,
prepare_account_for_decompression_idempotent) during transactions rather than
happening implicitly, while keeping the notes about rent_sponsor PDA and
compressed TLV state preservation intact (compressible extension, rent_sponsor
PDA).

In `@sdk-libs/token-types/README.md`:
- Around line 3-13: Change the README header from an H2 to an H1 and fix the
table pipe spacing to match the repository's markdownlint style so MD041/MD060
pass: replace "## light-token-types" with "# light-token-types" and normalize
the table pipes/spacing in the rows for the entries (TokenAccountMeta,
BatchCompressInstructionData, CompressedTokenInstructionDataApprove,
PackedMerkleContext, DelegatedTransfer); then apply the same header and table
formatting to the crate-level doc comment that generates this file and re-run
`cargo rdme` to regenerate the README.

@tilo-14 tilo-14 changed the title chore docs: add cargo-rdme README generation for sdk-libs and program-libs docs: add cargo-rdme README generation for sdk-libs and program-libs Jan 29, 2026
@tilo-14 tilo-14 force-pushed the tilo/token-client-claude-md branch from 6cc71a2 to edf45d1 Compare January 29, 2026 18:40
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
program-libs/indexed-merkle-tree/src/lib.rs (1)

362-372: Remove debug println! statements before merge.

Lines 362 and 372 contain debug print statements that will pollute logs in production:

println!("low_element: {:?}", low_element);
// ...
println!("patched low_element: {:?}", low_element);

These appear to be leftover debugging artifacts from development.

🧹 Proposed fix
         };
-        println!("low_element: {:?}", low_element);
 
         self.patch_elements_and_proof(
             indexed_changelog_index,
             &mut changelog_index,
             &mut new_element,
             &mut low_element,
             &mut low_element_next_value,
             low_leaf_proof,
         )?;
-        println!("patched low_element: {:?}", low_element);
         // Check that the value of `new_element` belongs to the range
🤖 Fix all issues with AI agents
In `@program-libs/account-checks/README.md`:
- Around line 7-14: The generated README's markdown table has inconsistent
separator row spacing (MD060); update the source doc comments that produce this
table so the separator row uses consistent spacing for each column (e.g.,
"|---|---|" or "|:---:|:---:|" style) so modules like AccountInfoTrait,
AccountIterator, AccountError, checks, discriminator, and packed_accounts render
correctly; find the comment block that lists these modules and normalize the
separator row formatting to match one Markdown table style, then regenerate the
README.

In `@program-libs/compressed-account/src/lib.rs`:
- Around line 1-16: The crate-level documentation table is missing the public
modules `constants`, `discriminators`, and `pubkey`; either add those module
entries to the top-level docs table so the public API is accurately documented,
or change the module visibilities from `pub mod constants`, `pub mod
discriminators`, and `pub mod pubkey` to `pub(crate) mod ...` if they are
internal; update the table to include descriptive names and links (e.g.,
[`constants`], [`discriminators`], [`pubkey`]) when keeping them public so docs
reflect the actual public API.

In `@program-libs/heap/README.md`:
- Around line 8-12: The markdown table in README.md violates MD060 spacing;
update the table between the headers and rows so pipes and columns use compact
style (no extra spaces around cell content) for the entries [`BumpAllocator`],
[`HeapError`], and [`bench`]; specifically remove extra spaces inside the cells
and ensure header separator row remains `|------|-------------|` so the rows
align with `|[`BumpAllocator`]|Global bump allocator with `alloc` and
`dealloc`|`, `|[`HeapError`]|Invalid heap position error|`, and `|[`bench`]|Heap
usage benchmarking utilities|`.

In `@program-libs/indexed-merkle-tree/README.md`:
- Around line 8-16: The table's separator row uses compact pipes and triggers
markdownlint MD060; update the separator line between the header and rows to
include spaces around each pipe (make it " | --- | --- | " style) so it matches
the surrounding table rows; edit the separator line that follows the header row
in README (the row currently shown as "|------|-------------|") to use spaced
pipes and dashes to satisfy linting while leaving the rest of the table (the
header labels like "Type" and "Description" and the subsequent rows referencing
IndexedMerkleTree, IndexedMerkleTree26, array, changelog, reference, zero_copy,
errors) unchanged.

In `@program-libs/macros/src/lib.rs`:
- Around line 1-12: Update the rustdoc table links to use explicit
disambiguators so rustdoc links point to the macros/attributes/derives rather
than modules: replace
`pubkey!`/`pubkey_array!`/`derive_light_cpi_signer!`/`derive_light_cpi_signer_pda!`
links with
`macro@pubkey!`/`macro@pubkey_array!`/`macro@derive_light_cpi_signer!`/`macro@derive_light_cpi_signer_pda!`,
replace `#[heap_neutral]` with `attr@heap_neutral` and `#[derive(Noop)]` with
`derive@Noop` in the doc table so each entry unambiguously links to the intended
macro/attribute/derive item.

In `@sdk-libs/client/README.md`:
- Around line 14-25: The README headings and fenced code block need blank lines
before and after to satisfy markdownlint (MD022/MD031): update the crate-level
doc comments that generate the "## Features" and "## Prerequisites" sections to
ensure there is an empty line above each "## ..." heading and an empty line
before and after the ```bash``` fenced block (the generated lines corresponding
to the headings and the npm install block), then re-run cargo rdme to regenerate
sdk-libs/client/README.md so the file contains the required blank lines.

In `@sdk-libs/event/README.md`:
- Around line 7-11: The table separator row in the README table doesn't match
the configured markdown table style (MD060); update the separator line that sits
under the header containing the references to PublicTransactionEvent,
BatchPublicTransactionEvent and event_from_light_transaction so each cell
separator includes a single space after the leading pipe and before the trailing
pipe (e.g., change the current |------|-------------| style to the styled
separator with spaces for each column) to satisfy the linter.

In `@sdk-libs/program-test/README.md`:
- Around line 71-81: The README examples call Keypair::new() but the Keypair
type is not imported; update the lib.rs doc-comment examples to add the missing
import (e.g., include solana_sdk::signer::keypair::Keypair or the appropriate
Keypair path alongside the existing solana_sdk::signer::Signer import), then
regenerate the README so both example blocks (including the one around lines
71-81 and the other at 101-114) compile without errors.

In `@sdk-libs/sdk-pinocchio/src/lib.rs`:
- Around line 5-9: The docs table currently implies LightDiscriminator is a
derive macro; update the crate-level doc (the table in lib.rs) to clearly state
that LightDiscriminator is a trait always re-exported by the crate and that the
derive macro (e.g. #[derive(LightDiscriminator)] or the symbol
derive_light_discriminator) is only available when the "light-account" feature
is enabled; edit the table entry for LightDiscriminator to mention "trait
(always exported)" and add a separate line or parenthetical clarifying "derive
macro available with `light-account` feature" so readers won't assume the macro
is always present.

In `@sdk-libs/sdk/README.md`:
- Around line 5-30: Update the README wording for clarity and consistency:
change "user owned accounts" to "user-owned accounts", "not for config accounts
which are often read" to "not for configuration (read-only) accounts", "not pool
accounts, since compressed accounts cannot be used concurrently" to "not for
pool accounts (compressed accounts are not suitable for concurrent use)", and
"DeFi Usecases" / "Defi Usecases" to "DeFi use cases"; apply similar hyphenation
and capitalization fixes in the crate docs (crate doc comments) and then
regenerate the README so the updated crate docs are reflected.

In `@sdk-libs/token-sdk/README.md`:
- Around line 61-69: The table under "Common Operations" uses invalid GitHub
link targets like instruction::CreateAssociatedTokenAccount; update each cell to
either use inline code (e.g., `CreateAssociatedTokenAccount`) or proper
docs.rs/absolute links to the generated docs for the corresponding symbols
(e.g., point to the crate docs page for CreateAssociatedTokenAccount,
CreateTokenAccount, Transfer, TransferInterface, CloseAccount, CreateMint,
MintTo and their CPI counterparts). Ensure all occurrences of instruction::X and
instruction::XCpi are replaced with the chosen valid format so the README
renders correct link targets for CreateAssociatedTokenAccount,
CreateAssociatedAccountCpi, CreateTokenAccount, CreateTokenAccountCpi, Transfer,
TransferCpi, TransferInterface, TransferInterfaceCpi, CloseAccount,
CloseAccountCpi, CreateMint, CreateMintCpi, MintTo, and MintToCpi.

Comment on lines +7 to +14
| Module | Description |
|--------|-------------|
| [`AccountInfoTrait`] | Trait abstraction over Solana account info types |
| [`AccountIterator`] | Iterates over a slice of accounts by index |
| [`AccountError`] | Error type for account validation failures |
| [`checks`] | Owner, signer, writable, and rent-exempt checks |
| [`discriminator`] | Account discriminator constants and validation |
| [`packed_accounts`] | Packed account struct deserialization |
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix markdownlint MD060 table spacing in the generated README.
Normalize the separator row spacing (preferably in the source doc comments so regeneration stays clean).

🩹 Proposed fix
-|--------|-------------|
+| -------- | ----------- |
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

8-8: Table column style
Table pipe is missing space to the right for style "compact"

(MD060, table-column-style)


8-8: Table column style
Table pipe is missing space to the left for style "compact"

(MD060, table-column-style)


8-8: Table column style
Table pipe is missing space to the right for style "compact"

(MD060, table-column-style)


8-8: Table column style
Table pipe is missing space to the left for style "compact"

(MD060, table-column-style)

🤖 Prompt for AI Agents
In `@program-libs/account-checks/README.md` around lines 7 - 14, The generated
README's markdown table has inconsistent separator row spacing (MD060); update
the source doc comments that produce this table so the separator row uses
consistent spacing for each column (e.g., "|---|---|" or "|:---:|:---:|" style)
so modules like AccountInfoTrait, AccountIterator, AccountError, checks,
discriminator, and packed_accounts render correctly; find the comment block that
lists these modules and normalize the separator row formatting to match one
Markdown table style, then regenerate the README.

@tilo-14 tilo-14 force-pushed the tilo/token-client-claude-md branch from 613287f to 463f60b Compare January 29, 2026 19:10
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
sdk-libs/sdk-pinocchio/src/lib.rs (1)

14-20: TODO comment is a helpful breadcrumb — consider opening a tracking issue.

The TODO on lines 18-20 describes a clear next step for the tree_info module with specific requirements. If this work is planned for a future PR, opening a GitHub issue would help ensure it doesn't get lost.

Would you like me to open an issue to track the tree_info module implementation described in the TODO?

🤖 Fix all issues with AI agents
In `@sdk-libs/program-test/README.md`:
- Around line 7-10: The README has four consecutive sentences beginning with
"For...", causing monotonous flow; update the lib.rs doc comments (the source of
the generated README) to vary sentence openings and phrasing so the generated
README reads more naturally — edit the top-level doc comment in lib.rs to
rephrase lines referencing light-sdk, light-client, Program Examples, and
zkcompression.com (use alternative openings like "See", "Refer to", "Check out",
or start with the target name) while preserving links and meaning so the README
generation produces the varied sentence structure.

In `@sdk-libs/sdk-pinocchio/src/lib.rs`:
- Around line 5-12: The docs exports table is missing the publicly exposed error
module; update the module export table in the crate-level doc comment to include
an entry for `error` (e.g., add a row for `[`error`]` with a short description
like "Error types and helpers") alongside the existing entries
(`derive_light_cpi_signer`, `LightDiscriminator`, `LightAccount`, `address`,
`cpi`, `instruction`) so the `error` module is discoverable in generated docs.

Comment on lines +7 to +10
For Rust and Anchor program development, see [`light-sdk`](https://docs.rs/light-sdk).
For Rust client, see [`light-client`](https://docs.rs/light-client).
For full program examples, see the [Program Examples](https://github.com/Lightprotocol/program-examples).
For detailed documentation, visit [zkcompression.com](https://www.zkcompression.com/).
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Vary sentence openings to improve readability.

Four consecutive sentences start with "For...", creating a monotonous reading experience. Since this README is generated from lib.rs doc comments, update the source to vary the sentence structure.

Example rewording for lib.rs doc comments
-For Rust and Anchor program development, see [`light-sdk`](https://docs.rs/light-sdk).
-For Rust client, see [`light-client`](https://docs.rs/light-client).
-For full program examples, see the [Program Examples](https://github.com/Lightprotocol/program-examples).
-For detailed documentation, visit [zkcompression.com](https://www.zkcompression.com/).
+Rust and Anchor program development: [`light-sdk`](https://docs.rs/light-sdk)  
+Rust client: [`light-client`](https://docs.rs/light-client)  
+Full program examples: [Program Examples](https://github.com/Lightprotocol/program-examples)  
+Detailed documentation: [zkcompression.com](https://www.zkcompression.com/)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
For Rust and Anchor program development, see [`light-sdk`](https://docs.rs/light-sdk).
For Rust client, see [`light-client`](https://docs.rs/light-client).
For full program examples, see the [Program Examples](https://github.com/Lightprotocol/program-examples).
For detailed documentation, visit [zkcompression.com](https://www.zkcompression.com/).
Rust and Anchor program development: [`light-sdk`](https://docs.rs/light-sdk)
Rust client: [`light-client`](https://docs.rs/light-client)
Full program examples: [Program Examples](https://github.com/Lightprotocol/program-examples)
Detailed documentation: [zkcompression.com](https://www.zkcompression.com/)
🧰 Tools
🪛 LanguageTool

[style] ~8-~8: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...client`](https://docs.rs/light-client). For full program examples, see the [Program...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~9-~9: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ub.com/Lightprotocol/program-examples). For detailed documentation, visit [zkcompre...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🤖 Prompt for AI Agents
In `@sdk-libs/program-test/README.md` around lines 7 - 10, The README has four
consecutive sentences beginning with "For...", causing monotonous flow; update
the lib.rs doc comments (the source of the generated README) to vary sentence
openings and phrasing so the generated README reads more naturally — edit the
top-level doc comment in lib.rs to rephrase lines referencing light-sdk,
light-client, Program Examples, and zkcompression.com (use alternative openings
like "See", "Refer to", "Check out", or start with the target name) while
preserving links and meaning so the README generation produces the varied
sentence structure.

Comment on lines +5 to +12
//! | Export | Description |
//! |--------|-------------|
//! | [`derive_light_cpi_signer`] | Derive CPI signer and bump at compile time |
//! | [`LightDiscriminator`] | Discriminator trait; derive macro requires `light-account` feature |
//! | [`LightAccount`] | Compressed account wrapper (requires `light-account` feature) |
//! | [`address`] | Address derivation (v1 and v2) |
//! | [`cpi`] | Light System Program CPI invocation |
//! | [`instruction`] | Instruction types and helpers |
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Documentation table is well-structured; consider adding the error module.

The exports table is clear and accurate. Line 8 now properly clarifies that LightDiscriminator is a trait with the derive macro gated behind the light-account feature — this addresses the prior review feedback nicely.

One small gap: the error module (line 16) is publicly exposed but not listed in the table. If it's intended for external use, adding it to the table improves discoverability.

📝 Optional: Add error module to table
 //! | [`cpi`] | Light System Program CPI invocation |
 //! | [`instruction`] | Instruction types and helpers |
+//! | [`error`] | SDK error types |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
//! | Export | Description |
//! |--------|-------------|
//! | [`derive_light_cpi_signer`] | Derive CPI signer and bump at compile time |
//! | [`LightDiscriminator`] | Discriminator trait; derive macro requires `light-account` feature |
//! | [`LightAccount`] | Compressed account wrapper (requires `light-account` feature) |
//! | [`address`] | Address derivation (v1 and v2) |
//! | [`cpi`] | Light System Program CPI invocation |
//! | [`instruction`] | Instruction types and helpers |
//! | Export | Description |
//! |--------|-------------|
//! | [`derive_light_cpi_signer`] | Derive CPI signer and bump at compile time |
//! | [`LightDiscriminator`] | Discriminator trait; derive macro requires `light-account` feature |
//! | [`LightAccount`] | Compressed account wrapper (requires `light-account` feature) |
//! | [`address`] | Address derivation (v1 and v2) |
//! | [`cpi`] | Light System Program CPI invocation |
//! | [`instruction`] | Instruction types and helpers |
//! | [`error`] | SDK error types |
🤖 Prompt for AI Agents
In `@sdk-libs/sdk-pinocchio/src/lib.rs` around lines 5 - 12, The docs exports
table is missing the publicly exposed error module; update the module export
table in the crate-level doc comment to include an entry for `error` (e.g., add
a row for `[`error`]` with a short description like "Error types and helpers")
alongside the existing entries (`derive_light_cpi_signer`, `LightDiscriminator`,
`LightAccount`, `address`, `cpi`, `instruction`) so the `error` module is
discoverable in generated docs.

@tilo-14 tilo-14 force-pushed the tilo/token-client-claude-md branch from 463f60b to 5f67a00 Compare January 29, 2026 20:04
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 14

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
program-libs/indexed-array/src/lib.rs (1)

17-18: Consider documenting the new public constant.

HIGHEST_ADDRESS_PLUS_ONE is now part of the public API but isn't included in the documentation table above. If this constant is intended for external use (e.g., as a BN254 field boundary for indexed address trees), consider adding a brief doc comment explaining its purpose and adding it to the module table.

📝 Suggested documentation addition
 //! | [`changelog`] | Raw indexed element and changelog entry types |
 //! | [`errors`] | `IndexedArrayError` variants |
+//! | [`HIGHEST_ADDRESS_PLUS_ONE`] | Upper bound constant for address range |
program-libs/token-interface/src/lib.rs (1)

23-25: Consider selective re-exports over glob imports.

Glob re-exports (pub use module::*) can lead to namespace pollution and make it harder to track where symbols originate. For a library crate, explicitly re-exporting specific types often provides better API clarity:

pub use error::TokenInterfaceError;
pub use pool_derivation::{derive_token_pool_pda, /* other specific items */};

That said, this is a stylistic preference—the current approach works fine and is common for error types.

sdk-libs/sdk/src/lib.rs (1)

38-38: Clarify that LightDiscriminator is both a trait and a derive macro.

The documentation describes LightDiscriminator only as a derive macro, but examining lines 212 and 218-221 reveals it's also exported as a trait (aliased from light_account_checks::discriminator::Discriminator). This dual nature should be clarified to help developers understand:

  1. LightDiscriminator is a trait that provides the 8-byte account discriminator
  2. The derive macro auto-implements this trait for account structs
  3. Manual implementation is also possible if needed

Based on learnings: The Discriminator trait provides LIGHT_DISCRIMINATOR constant and LIGHT_DISCRIMINATOR_SLICE reference for account type identification.

📚 Suggested documentation clarification
-    - [`LightDiscriminator`] - DeriveMacro to derive a compressed account discriminator.
+    - [`LightDiscriminator`] - Trait providing 8-byte discriminator; use derive macro to auto-implement for account types.
🤖 Fix all issues with AI agents
In `@program-libs/array-map/README.md`:
- Around line 1-14: Create a new CLAUDE.md at the crate root containing: a
Summary section with 2–5 bullet points describing the crate (generic
array-backed map, fixed capacity, O(n) lookup, insertion-order
tracking/last-updated index), a "Used in" section noting usage by
light-token-interface, a Navigation section explaining that README is generated
from lib.rs doc comments and how to read it, and a "Source Code Structure"
section that documents the main types ArrayMap and ArrayMapError and the
pubkey_eq optimization function with references to their definitions in lib.rs
so maintainers can locate them.

In `@program-libs/batched-merkle-tree/src/lib.rs`:
- Around line 16-28: The crate docs table is missing the exported constants
module; add an entry for `constants` to the module table in the top-level lib.rs
doc comment so the table reflects `pub mod constants`, and ensure the
description mentions exported values like `ADDRESS_TREE_INIT_ROOT_40` (so
references later in the docs resolve). Locate the module table near the existing
entries (`batch`, `merkle_tree`, `queue`, etc.) in the lib.rs doc comment and
insert a row for `[`constants`]` with a short description such as "Common
constant values (e.g. ADDRESS_TREE_INIT_ROOT_40)".

In `@program-libs/compressed-account/README.md`:
- Around line 1-19: Regenerate the README using cargo rdme to sync docs with the
crate's lib.rs: run cargo rdme after finalizing the doc comments in the
compressed_account crate (src/lib.rs) so the README reflects current items like
CompressedAccountError, QueueType, TreeType, CpiSigner, address,
compressed_account, instruction_data, nullifier, and tx_hash; also fix the
markdown table separator in the source doc comment (replace the current
|------|-------------| with the lint-compliant | ------ | ----------- |) before
regenerating to satisfy MD060 and prevent CI failures.

In `@program-libs/compressible/src/lib.rs`:
- Around line 1-21: Update the crate-level doc comment in lib.rs where the
hot/cold description reads "(eg 24h without write bump)" to use the standard
abbreviation and punctuation "(e.g., 24h without write bump)"; locate the
top-of-file module doc comment (the crate docs near the opening //! comments)
and replace that substring so generated README/docs pick up the corrected
grammar.

In `@program-libs/concurrent-merkle-tree/README.md`:
- Around line 1-18: The README is out of sync with lib.rs and the markdown table
separator is malformed causing MD060; re-run cargo rdme to regenerate
program-libs/concurrent-merkle-tree/README.md after fixing the table separator
in the lib.rs doc comment (ensure the table header uses a proper separator like
|------|-----------|), then commit the regenerated README so CI passes; look for
references to ConcurrentMerkleTree, ConcurrentMerkleTree26 and the table block
in lib.rs and update them before running cargo rdme.

In `@program-libs/hasher/README.md`:
- Around line 1-19: The README was not regenerated from the crate-level doc
comments and the table separator differs from the compact style; update the
crate doc comments in lib.rs to use the compact table separator `| ------ |
----------- |` for the Types table (entries like Hasher, Poseidon, Keccak,
Sha256, DataHasher, HasherError, hash_chain, hash_to_field_size, zero_bytes),
then run `cargo rdme` to regenerate program-libs/hasher/README.md so it matches
the source and resolves the CI lint failure.

In `@program-libs/heap/README.md`:
- Around line 1-14: The README.md is out of sync with src/lib.rs; update
documentation in src/lib.rs (adjust crate-level doc comments and any docs for
symbols like BumpAllocator, HeapError, bench) and then run cargo rdme to
regenerate README.md so it matches lib.rs; do not edit README.md directly
because it is generated.

In `@program-libs/indexed-array/README.md`:
- Around line 1-15: The README is out of sync with crate-level docs in lib.rs;
run cargo rdme --workspace-project light-indexed-array to regenerate
program-libs/indexed-array/README.md so it matches the //! documentation in
lib.rs, and if you want HIGHEST_ADDRESS_PLUS_ONE documented add that constant to
the crate doc table in lib.rs (alongside array::IndexedElement,
array::IndexedArray, changelog, errors) before running the command so the
regenerated README includes it.

In `@sdk-libs/compressed-token-sdk/README.md`:
- Around line 1-59: The README.md is out of sync with lib.rs; regenerate the
README from the crate's source docs by running cargo rdme in the crate (to
update README.md from lib.rs), verify the updated README reflects the lib.rs
docs, then stage and commit the regenerated README.md so CI passes.

In `@sdk-libs/compressed-token-sdk/src/lib.rs`:
- Around line 30-41: Update the operation docs table in the module doc comment
that currently links every operation to "create-compressed-token-accounts":
replace the link target for Mint rows to "how-to-mint-compressed-tokens", for
Transfer to "transfer-compressed-tokens", for Approve and Revoke to "delegate",
and for Compress and Decompress to "how-to-compress-and-decompress-spl-tokens";
for Merge token accounts and Create token pool either point their Docs guide
cell to the general "/guides" index or remove the guide link until a dedicated
guide exists. Ensure you edit the doc comment table entries that reference
"create-compressed-token-accounts" so the GitHub example columns remain
unchanged.

In `@sdk-libs/event/README.md`:
- Around line 1-3: The README starts with the HTML marker "<!-- cargo-rdme start
-->" which triggers markdownlint MD041 (first line must be a top‑level heading);
fix by adding a file‑level disable directive for MD041 before that marker (e.g.,
an HTML or Markdown comment recognized by your linter) or by moving the marker
below a top-level heading — update README.md so the MD041 rule is either
explicitly disabled at the top or a "# light-event" heading appears before "<!--
cargo-rdme start -->".
- Around line 1-13: The README is out of sync with the crate docs; regenerate it
using cargo‑rdme and commit the updated file so CI passes. Run `cargo rdme` in
the light-event crate to refresh the README so its generated sections (covering
PublicTransactionEvent, BatchPublicTransactionEvent, and
event_from_light_transaction) match the current doc comments in lib.rs, then add
and commit the regenerated README.md.

In `@sdk-libs/instruction-decoder/README.md`:
- Around line 1-23: The README is out of sync with lib.rs; regenerate it so the
crate docs (including the H1 heading) match lib.rs by running the documentation
generator for the instruction-decoder crate (use the crate’s README generation
command, e.g., run cargo rdme in the sdk-libs/instruction-decoder directory) and
commit the updated README.md; ensure the cargo-rdme start/end markers remain
intact so the MD041 lint false positive is preserved.

In `@sdk-libs/token-client/src/lib.rs`:
- Around line 6-7: The table separator in the module doc comment within lib.rs
currently has no spaces and fails markdownlint; update the table separator line
in the doc comment (the second line of the table under the module-level docs in
lib.rs) so the pipe/dash separators include spaces (matching the header and
cells) so the generated README passes lint; keep lib.rs as the source-of-truth
change.

Comment on lines +1 to +14
<!-- cargo-rdme start -->

# light-array-map

Generic array-backed map with O(n) lookup for small collections.
Built on `tinyvec::ArrayVec`. Tracks insertion order and last updated index.

| Type | Description |
|------|-------------|
| [`ArrayMap`] | Fixed-capacity map keyed by `K` with O(n) scan |
| [`ArrayMapError`] | Capacity exceeded or index out of bounds |
| [`pubkey_eq`] | Compares two `[u8; 32]` keys via 4x `u64` reads |

<!-- cargo-rdme end -->
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Check the structure of program-libs/array-map
echo "=== Crate structure ==="
find program-libs/array-map -type f -name "*.rs" -o -name "*.md" -o -name "*.toml" | head -20

echo ""
echo "=== Check for CLAUDE.md ==="
ls -la program-libs/array-map/ | grep -i claude

echo ""
echo "=== Check for cargo-rdme config ==="
ls -la program-libs/array-map/ | grep rdme
if [ -f program-libs/array-map/.cargo-rdme.toml ]; then
    cat program-libs/array-map/.cargo-rdme.toml
fi

echo ""
echo "=== lib.rs crate-level documentation ==="
head -50 program-libs/array-map/src/lib.rs

Repository: Lightprotocol/light-protocol

Length of output: 1800


🏁 Script executed:

#!/bin/bash

# Double-check by comparing lib.rs docs with README directly
echo "=== Extract lib.rs doc comments ==="
sed -n '1,10p' program-libs/array-map/src/lib.rs | grep -E '^//!'

echo ""
echo "=== Extract README content ==="
sed -n '3,10p' program-libs/array-map/README.md

echo ""
echo "=== Check what CLAUDE.md should contain per standards ==="
echo "Looking for examples in other program-libs crates:"
find program-libs -maxdepth 2 -name "CLAUDE.md" | head -3

Repository: Lightprotocol/light-protocol

Length of output: 1065


🏁 Script executed:

#!/bin/bash

# Check an existing CLAUDE.md file to understand expected structure
echo "=== Example: program-libs/account-checks/CLAUDE.md ==="
cat program-libs/account-checks/CLAUDE.md

echo ""
echo "=== Check: program-libs/CLAUDE.md ==="
cat program-libs/CLAUDE.md

Repository: Lightprotocol/light-protocol

Length of output: 7591


Add missing CLAUDE.md file to document the crate.

This crate lacks a required CLAUDE.md file at its root. Create one following the standard structure:

  • Summary: 2–5 bullet points describing the crate's purpose (e.g., generic array-backed map, O(n) lookup, insertion order tracking)
  • Used in: Document that this crate is used by light-token-interface
  • Navigation: Explain how to use the README and point to the source code structure
  • Source Code Structure: Document the main types (ArrayMap, ArrayMapError) and the pubkey_eq optimization function with references to src/lib.rs

The README itself is correctly generated from the lib.rs doc comments and requires no changes.

🧰 Tools
🪛 GitHub Actions: lint

[error] 1-1: README is not up to date. Please update README files for crates (e.g., run 'cargo readme' or similar tooling) to ensure documentation matches the codebase.

🪛 markdownlint-cli2 (0.20.0)

3-3: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🤖 Prompt for AI Agents
In `@program-libs/array-map/README.md` around lines 1 - 14, Create a new CLAUDE.md
at the crate root containing: a Summary section with 2–5 bullet points
describing the crate (generic array-backed map, fixed capacity, O(n) lookup,
insertion-order tracking/last-updated index), a "Used in" section noting usage
by light-token-interface, a Navigation section explaining that README is
generated from lib.rs doc comments and how to read it, and a "Source Code
Structure" section that documents the main types ArrayMap and ArrayMapError and
the pubkey_eq optimization function with references to their definitions in
lib.rs so maintainers can locate them.

Comment on lines +16 to +28
//! | Module | Description |
//! |--------|-------------|
//! | [`batch`] | Batch append and update operations |
//! | [`merkle_tree`] | Batched Merkle tree account struct |
//! | [`queue`] | Queue account for batched leaves |
//! | [`queue_batch_metadata`] | Metadata for queue batches |
//! | [`initialize_state_tree`] | Initialize a batched state tree |
//! | [`initialize_address_tree`] | Initialize a batched address tree |
//! | [`rollover_state_tree`] | Roll over a full state tree |
//! | [`rollover_address_tree`] | Roll over a full address tree |
//! | [`merkle_tree_metadata`] | Tree and queue metadata structs |
//! | [`errors`] | Error types for batch operations |
//!
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Add constants module to the documentation table.

The module table lists 10 modules but the crate publicly exports 11 (line 174 declares pub mod constants). The constants module contains important values like ADDRESS_TREE_INIT_ROOT_40 referenced later in the docs (line 133).

📝 Proposed addition to the module table
 //! | Module | Description |
 //! |--------|-------------|
 //! | [`batch`] | Batch append and update operations |
+//! | [`constants`] | Default configuration values and tree init roots |
 //! | [`merkle_tree`] | Batched Merkle tree account struct |
🤖 Prompt for AI Agents
In `@program-libs/batched-merkle-tree/src/lib.rs` around lines 16 - 28, The crate
docs table is missing the exported constants module; add an entry for
`constants` to the module table in the top-level lib.rs doc comment so the table
reflects `pub mod constants`, and ensure the description mentions exported
values like `ADDRESS_TREE_INIT_ROOT_40` (so references later in the docs
resolve). Locate the module table near the existing entries (`batch`,
`merkle_tree`, `queue`, etc.) in the lib.rs doc comment and insert a row for
`[`constants`]` with a short description such as "Common constant values (e.g.
ADDRESS_TREE_INIT_ROOT_40)".

Comment on lines +1 to +19
<!-- cargo-rdme start -->

# light-compressed-account

Compressed account struct and utility types for Light Protocol.

| Type | Description |
|------|-------------|
| [`CompressedAccountError`] | Error codes 12001–12025 for account operations |
| [`QueueType`] | Nullifier, address, and state queue variants |
| [`TreeType`] | State and address tree version variants |
| [`CpiSigner`] | Program ID, CPI signer pubkey, and bump |
| [`address`] | Address derivation and seed structs |
| [`compressed_account`] | Core compressed account struct |
| [`instruction_data`] | Instruction data types and proof structs |
| [`nullifier`] | Nullifier computation |
| [`tx_hash`] | Transaction hash computation |

<!-- cargo-rdme end -->
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Regenerate README with cargo rdme to sync with lib.rs and fix CI.

The pipeline reports this README is out of date. Run cargo rdme after finalizing the doc comments in program-libs/compressed-account/src/lib.rs.

Also update the table separator formatting in the source doc comment from |------|-------------| to | ------ | ----------- | (line 8 context) to satisfy the MD060 lint rule.

🧰 Tools
🪛 GitHub Actions: lint

[error] 1-1: README is not up to date. Please update README files for crates (e.g., run 'cargo readme' or similar tooling) to ensure documentation matches the codebase.

🪛 markdownlint-cli2 (0.20.0)

8-8: Table column style
Table pipe is missing space to the right for style "compact"

(MD060, table-column-style)


8-8: Table column style
Table pipe is missing space to the left for style "compact"

(MD060, table-column-style)


8-8: Table column style
Table pipe is missing space to the right for style "compact"

(MD060, table-column-style)


8-8: Table column style
Table pipe is missing space to the left for style "compact"

(MD060, table-column-style)

🤖 Prompt for AI Agents
In `@program-libs/compressed-account/README.md` around lines 1 - 19, Regenerate
the README using cargo rdme to sync docs with the crate's lib.rs: run cargo rdme
after finalizing the doc comments in the compressed_account crate (src/lib.rs)
so the README reflects current items like CompressedAccountError, QueueType,
TreeType, CpiSigner, address, compressed_account, instruction_data, nullifier,
and tx_hash; also fix the markdown table separator in the source doc comment
(replace the current |------|-------------| with the lint-compliant | ------ |
----------- |) before regenerating to satisfy MD060 and prevent CI failures.

Comment on lines +1 to +21
//! # light-compressible
//!
//! Compressible account lifecycle for accounts with sponsored rent-exemption.
//! The program pays the rent exemption for the account. Transaction fee payers
//! bump a virtual rent balance when writing to the account, which keeps the
//! account "hot". "Cold" accounts virtual rent balance below threshold
//! (eg 24h without write bump) get auto-compressed. The cold account's state
//! is cryptographically preserved on the Solana ledger. Users can load a
//! cold account into hot state in-flight when using the account again.

//!
//! | Type | Description |
//! |------|-------------|
//! | [`CompressionInfo`](compression_info::CompressionInfo) | Rent state, authorities, and compression config per account |
//! | [`CompressibleConfig`](config::CompressibleConfig) | Program-level config: rent sponsor, authorities, address space |
//! | [`CreateAccountsProof`] | Validity proof and tree info for account init |
//! | [`RentConfig`](rent::RentConfig) | Rent function parameters for compression eligibility |
//! | [`compression_info`] | `is_compressible`, `claim`, and top-up logic |
//! | [`registry_instructions`] | Instructions for the compression registry |
//! | [`rent`] | Epoch-based rent calculation and claim amounts |

Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Doc comments look good; minor grammar nit.

The crate-level documentation clearly explains the hot/cold account lifecycle and the table provides a helpful quick reference for the public API.

One small suggestion: on line 7, (eg 24h without write bump) should be (e.g., 24h without write bump) for proper English abbreviation. This will propagate to the README when regenerated.

📝 Optional grammar fix
-//! (eg 24h without write bump) get auto-compressed. The cold account's state
+//! (e.g., 24h without write bump) get auto-compressed. The cold account's state
🤖 Prompt for AI Agents
In `@program-libs/compressible/src/lib.rs` around lines 1 - 21, Update the
crate-level doc comment in lib.rs where the hot/cold description reads "(eg 24h
without write bump)" to use the standard abbreviation and punctuation "(e.g.,
24h without write bump)"; locate the top-of-file module doc comment (the crate
docs near the opening //! comments) and replace that substring so generated
README/docs pick up the corrected grammar.

Comment on lines +30 to +41
//! | Operation | Docs guide | GitHub example |
//! |-----------|-----------|----------------|
//! | Create mint | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/create-mint.ts) |
//! | Mint to | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/mint-to.ts) |
//! | Transfer | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/transfer.ts) |
//! | Approve | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/approve.ts) |
//! | Revoke | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/revoke.ts) |
//! | Compress | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/compress.ts) |
//! | Compress SPL account | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/compress-spl-account.ts) |
//! | Decompress | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/decompress.ts) |
//! | Merge token accounts | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/merge-token-accounts.ts) |
//! | Create token pool | [create-compressed-token-accounts](https://www.zkcompression.com/compressed-tokens/guides/create-compressed-token-accounts) | [example](https://github.com/Lightprotocol/examples-zk-compression/blob/main/compressed-token-cookbook/actions/create-token-pool.ts) |
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

site:zkcompression.com compressed-tokens guides operations documentation

💡 Result:

Here are the most relevant zkcompression.com docs pages for Compressed Tokens (guides/operations/docs), based on your site query:

  • Compressed Tokens – Overview (concepts, install, and entry points) [1]
  • Compressed Tokens – Guides index (links to all core “how-to” operations) [2]
  • Mint Compressed Tokens (mintTo()) [3]
  • Transfer / Move Compressed Tokens (listed in guides; start from the guides index) [2]
  • Compress & Decompress SPL Tokens (compress(), decompress(), plus best-practice notes) [4]
  • Create Compressed Token Accounts (what they are and when they’re created) [5]
  • Approve / Revoke Delegate Authority, Merge Compressed Accounts, Create Token Pools / Create Mint with Token Pool (all listed under guides) [2]
  • Advanced: Add Wallet Support for Compressed Tokens (wallet integration, balance display, end-to-end guide) [6]
  • Developer page: Add compressed token support to your wallet (integration steps) [7]
  • Client Library – Client Guide (TypeScript/Rust clients, proof/packing flow) [8]

Sources: [1]–[8].


🌐 Web query:

site:zkcompression.com/compressed-tokens/guides transfer approve revoke mint decompress

💡 Result:

Relevant guides on zkcompression.com for those operations:

  • MintMint Compressed Tokens (uses mintTo(); only mint authority can mint; requires an SPL mint with a token pool for compression). [1]
  • TransferTransfer Compressed Tokens (uses transfer(); consumes sender input compressed accounts and creates new output accounts; also shows delegated transfer via approve() + transferDelegated()). [2]
  • Approve / RevokeApprove and Revoke Delegate Authority (uses approve() to grant a delegate an allowance; uses revoke() to remove delegation, typically after fetching delegated accounts via getCompressedTokenAccountsByDelegate). [3]
  • Decompress / (Re-)CompressCompress and Decompress SPL Tokens (uses compress() and decompress() to convert between regular SPL tokens and compressed tokens). [4]
  • Index pageGuides (table of all compressed-token cookbook guides, including Mint/Transfer/Decompress/Delegate). [5]

Sources:
[1] (zkcompression.com)
[2] (zkcompression.com)
[3] (zkcompression.com)
[4] (zkcompression.com)
[5] (zkcompression.com)

Citations:


Update operation guide links to point to dedicated guides instead of the generic "create-compressed-token-accounts" page.

The documentation links are currently incorrect. Dedicated guides exist for most operations:

  • Minthow-to-mint-compressed-tokens
  • Transfertransfer-compressed-tokens
  • Approve / Revokedelegate
  • Compress / Decompresshow-to-compress-and-decompress-spl-tokens

For operations without dedicated guides (Merge, Create token pool), link to the /guides index or omit links until those guides are published.

🤖 Prompt for AI Agents
In `@sdk-libs/compressed-token-sdk/src/lib.rs` around lines 30 - 41, Update the
operation docs table in the module doc comment that currently links every
operation to "create-compressed-token-accounts": replace the link target for
Mint rows to "how-to-mint-compressed-tokens", for Transfer to
"transfer-compressed-tokens", for Approve and Revoke to "delegate", and for
Compress and Decompress to "how-to-compress-and-decompress-spl-tokens"; for
Merge token accounts and Create token pool either point their Docs guide cell to
the general "/guides" index or remove the guide link until a dedicated guide
exists. Ensure you edit the doc comment table entries that reference
"create-compressed-token-accounts" so the GitHub example columns remain
unchanged.

Comment on lines +1 to +3
<!-- cargo-rdme start -->

# light-event
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix markdownlint MD041 (first line must be a top‑level heading).
<!-- cargo-rdme start --> on Line 1 triggers MD041; either disable MD041 for this file or add a file‑level disable comment before the marker.

🔧 Suggested fix
+<!-- markdownlint-disable MD041 -->
 <!-- cargo-rdme start -->
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<!-- cargo-rdme start -->
# light-event
<!-- markdownlint-disable MD041 -->
<!-- cargo-rdme start -->
# light-event
🧰 Tools
🪛 GitHub Actions: lint

[error] 1-1: README is not up to date. Please update README files for crates (e.g., run 'cargo readme' or similar tooling) to ensure documentation matches the codebase.

🪛 markdownlint-cli2 (0.20.0)

3-3: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🤖 Prompt for AI Agents
In `@sdk-libs/event/README.md` around lines 1 - 3, The README starts with the HTML
marker "<!-- cargo-rdme start -->" which triggers markdownlint MD041 (first line
must be a top‑level heading); fix by adding a file‑level disable directive for
MD041 before that marker (e.g., an HTML or Markdown comment recognized by your
linter) or by moving the marker below a top-level heading — update README.md so
the MD041 rule is either explicitly disabled at the top or a "# light-event"
heading appears before "<!-- cargo-rdme start -->".

@tilo-14 tilo-14 force-pushed the tilo/token-client-claude-md branch from 5f67a00 to 730d65d Compare January 29, 2026 20:29
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
program-libs/concurrent-merkle-tree/src/lib.rs (1)

45-47: Fix typos in public docs (“modyfing”, “leaft”, “sigling”).
These are visible in generated README/docs and should be corrected.

✏️ Proposed fixes
-/// of the requests invalid, as long as they are not modyfing the same leaf.
+/// of the requests invalid, as long as they are not modifying the same leaf.
@@
-    ///    rightmost leaft and stores the Merkle proof as the new rightmost
+    ///    rightmost leaf and stores the Merkle proof as the new rightmost
@@
-                    // * The sigling on the left is a "filled subtree".
+                    // * The sibling on the left is a "filled subtree".

Also applies to: 419-419, 622-622

sdk-libs/program-test/src/lib.rs (1)

19-21: Crate-level attributes split the doc comment block.

The #![allow(...)] attributes at lines 19-20 are sandwiched between two sections of //! doc comments. While this compiles, it breaks the logical flow of documentation and may cause unexpected behavior with cargo-rdme generation. Consider moving these attributes either before all doc comments or after the complete doc comment block.

Suggested restructure
+#![allow(deprecated)]
+#![allow(clippy::result_large_err)]
 //! # Light Program Test
 //!
 //! A fast local test environment for Solana programs using compressed accounts and tokens.
 ...
 //! - Prover server via [Light CLI](https://www.npmjs.com/package/@lightprotocol/zk-compression-cli)
-
-#![allow(deprecated)]
-#![allow(clippy::result_large_err)]
 //!
 //! **Use `light-program-test` when:**
program-libs/indexed-merkle-tree/src/lib.rs (1)

362-372: Remove debug println! statements before merging.

These debug prints will clutter logs in production and degrade performance. They appear to be leftover debugging artifacts.

-        println!("low_element: {:?}", low_element);
-
         self.patch_elements_and_proof(
             indexed_changelog_index,
             &mut changelog_index,
@@ -370,7 +368,6 @@
             &mut low_element_next_value,
             low_leaf_proof,
         )?;
-        println!("patched low_element: {:?}", low_element);
🤖 Fix all issues with AI agents
In `@program-libs/array-map/README.md`:
- Around line 8-12: The table header spacing in README.md violates MD060; update
the table rows (the header line containing "Type | Description" and the
separator "|------|-------------|") to use compact spacing with a single space
around each pipe so the header and separator follow the markdownlint config
(e.g., "Type | Description" and matching separator columns) ensuring consistent
single-space padding across the table entries like the ArrayMap, ArrayMapError,
and pubkey_eq lines.

In `@program-libs/verifier/src/lib.rs`:
- Line 9: The crate-level documentation for verify_create_addresses_proof
incorrectly states the supported address counts as "1–8"; update the doc comment
referencing verify_create_addresses_proof to list the exact supported counts (1,
2, 3, 4, and 8) so callers know 5–7 are not supported; locate the comment that
currently reads something like "`Verify non-inclusion for 1–8 addresses`" and
replace it with a precise phrase such as "`Verify non-inclusion for 1, 2, 3, 4,
or 8 addresses`".

In `@sdk-libs/compressed-token-sdk/README.md`:
- Around line 31-48: Tables in README.md violate MD060 compact-style by lacking
spaces around pipe characters; update the Markdown table rows (the header and
each data row in both operation and toolkit guides) to include a single space
before and after each '|' delimiter, then update the source docs in lib.rs
accordingly and re-run cargo rdme to regenerate README so the spacing changes
are propagated.
- Around line 10-18: Add blank lines before and after each Markdown heading to
satisfy MD022: update the module doc comments in lib.rs that generate the README
(specifically the sections titled "## Compressed Token Accounts" and "##
Difference to Light-Token") so each heading is preceded and followed by an empty
line, then regenerate the README using cargo rdme; ensure the source comments
producing those headings follow the same blank-line convention so the
regenerated README includes the required spacing.

In `@sdk-libs/token-client/src/lib.rs`:
- Around line 18-19: There are two consecutive empty crate-level doc-comment
lines (`//!`) producing an extra blank line in the generated README; delete one
of the duplicate `//!` lines so only a single blank doc-comment line remains
before the end of the doc block (i.e., remove one of the empty `//!` entries in
the top-of-file doc comments).

In `@sdk-libs/token-sdk/.cargo-rdme.toml`:
- Around line 1-2: Add a missing CLAUDE.md at the root of the token-sdk crate
(sdk-libs/token-sdk/) — create a markdown file named CLAUDE.md containing: a 2–5
bullet "Summary" describing the crate, a "Used in" section listing where the SDK
is consumed, a "Navigation" section explaining how to explore the crate, and a
"Source Code Structure" section that documents the src/ layout (explicitly call
out Client Functions, Instruction Builders, and Types as present modules); model
the content and headings after sdk-libs/instruction-decoder-derive/CLAUDE.md or
sdk-libs/macros/CLAUDE.md to match repository conventions.

@ananas-block ananas-block merged commit e35eb65 into main Jan 29, 2026
33 checks passed
@ananas-block ananas-block deleted the tilo/token-client-claude-md branch January 29, 2026 22:52
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.

2 participants