docs/cli: add cli-standard.md and CLAUDE.md pointer#3758
docs/cli: add cli-standard.md and CLAUDE.md pointer#3758juan-malbeclabs wants to merge 3 commits into
Conversation
2fb2f5a to
8d806a7
Compare
d539f1c to
4196e46
Compare
|
The new CLI docs list diagnostic logging as #[arg(long = "log-verbose", action = clap::ArgAction::Count, global = true)]
log_verbosity: u8,The code comment also says this was renamed from |
|
The argument convention says identifiers using pub fn validate_pubkey_or_code(val: &str) -> Result<String, String> {
val.parse::<Pubkey>()
.map(|pubkey| pubkey.to_string())
.or_else(|_| validate_code(val).map_err(|_| "invalid pubkey or code format".to_string()))
}Since |
8d806a7 to
5056078
Compare
4196e46 to
a65bc24
Compare
|
Good catch. The doc overclaimed. Fixed in 9f364e7 by clarifying in three places that
Kept the validator as-is. Pushing resolution into a |
RFC-20 implementation stack
This PR is part of a 9-PR chain delivering RFC-20: CLI standardization. Each PR's diff is only its own contribution; reviewers should consume them in order.
doublezero-cli-corefoundation crate +solana_l1_rpc_url--solana-url+--log-verboseglobal flags + tracing initCliContextbuilt inmain+ centralized error renderingdoublezero_cli→doublezero-serviceability-clilocation getas the async +CliContextreference verbdocs/cli-standard.md+CLAUDE.mdpointerServiceabilityCommandenum + async dispatcher#[command(flatten)]+ collapse binary dispatchThis PR: #3758 — position 6 of 9. Previous: #3757 · Next: #3759
Summary of Changes
docs/cli-standard.md, the contributor-facing summary of RFC-20 (rfcs/rfc20-cli-standardization.md). Covers the module contract, argument and output conventions, the global flag set, the diagnostic-logging facade, the preflightRequirementCheckbitflags, and walks throughsmartcontract/cli/src/location/get.rsas the worked example.CLAUDE.mdwith a CLI-standard section pointing at RFC-20, the new contributor doc, and the reference verb so future contributors land on the standard quickly.Diff Breakdown
Pure documentation: a single new contributor doc plus a short pointer added to
CLAUDE.mdand the CHANGELOG entry recording it.Key files (click to expand)
docs/cli-standard.md- new file. Roughly 240 lines covering the module contract, argument/output conventions, global flags, logging, thelocation getworked example, theRequirementCheckbitflag mapping, authorization rules, and the explicit open follow-ups (Command enum move, geolocation module crate, daemon-control module crate, JSON schema versioning, shell completion).CLAUDE.md- new "CLI Standard (RFC-20)" section between "RFCs and Documentation" and "Style & Terminology" with four bullets pointing at the RFC, the contributor doc, the core crate, and the migration cadence.Testing Verification
make rust-testgreen workspace-wide (no code changes; sanity check that the docs commit does not break anything).docs/cli-standard.mdand the updatedCLAUDE.mdsection for headings, lists, and the code block in the worked example.jo/5-cli-location-get-conforming-verb; the diff shown is only this PR's docs.