This guide sets shared conventions for documentation and examples in this
repository: the README, CONTRIBUTING.md, and everything under docs/. It
exists so that contributor-facing docs stay consistent, safe, and easy to
maintain as more of them are added. Follow it for new documentation and when
editing existing docs.
This project targets Stellar testnet only; it is not production- or mainnet-ready. Say so explicitly and consistently:
- Refer to the network as testnet (lowercase, one word), matching the
soroban network add --global testnet/stellar network lsusage elsewhere in this repo. - When a doc discusses deployment, invocation, or funding, state that the instructions are for testnet unless the section is explicitly about a different environment (e.g. local development).
- Don't imply mainnet support exists or is close. If mainnet is relevant, describe it as a future target, not a current capability — see Avoiding production claims.
- Point readers to docs/deployment-environments.md for the canonical RPC URL, network passphrase, and Friendbot details instead of restating them; if a doc needs to show them inline for a worked example, keep them consistent with that document.
Docs must not overstate what the contract does or how safe it is to use with real funds.
- Do not describe the contract as production-ready, audited, or safe for mainnet use. If a doc discusses limitations, security, or deployment, add or keep a clear statement such as "this contract is for educational and testnet use," matching the wording already used in the README's Security Considerations section.
- Be precise about custody: this contract currently tracks balances
internally and does not transfer or hold real XLM, SAC assets, or other
tokens. Do not describe
depositorwithdrawas moving real funds. See the README's Deposit and custody limitation section for the wording to reuse. - When describing a feature that does not exist yet (e.g. upgrades, pausing, admin recovery), say so plainly and link to the relevant research doc (for example docs/upgrade-strategy.md or docs/pause-design.md) instead of describing planned behavior as if it were implemented.
- If in doubt about a claim's accuracy, prefer the more conservative wording and flag it for maintainer review in the pull request description.
Use clearly fake, self-explanatory placeholder values in examples so nobody mistakes them for real data. See docs/placeholders.md for the canonical placeholder names (contract ID, user address, admin address, and timestamp) to use in new or edited docs.
- Use
UPPER_SNAKE_CASEplaceholders such asYOUR_CONTRACT_ID,YOUR_ADDRESS, orYOUR-USERNAME, matching existing usage in the README andCONTRIBUTING.md. - Never use real contract IDs, secret keys, seed phrases, RPC credentials, or
other values captured from an actual deployment. Use placeholders or
clearly synthetic example values instead, per the
Security-sensitive contributions
section of
CONTRIBUTING.md. - Named CLI identities in examples should use generic names already used in
this repo, such as
deployer, rather than a name tied to a real account. - When showing example command output (not a command to run), make that explicit — for instance by introducing it as "example output" — so readers don't copy it as-is. See docs/deployment-output-example.md for the pattern to follow.
- Put every runnable command in a fenced code block with the
bashlanguage tag; usetextfor non-runnable example output. - One logical command (or a short, clearly related sequence) per code block.
Don't mix commentary prose into a code block beyond short
#comments. - Use the CLI commands and flags already used elsewhere in this repo
(
cargo build --target wasm32-unknown-unknown,cargo test,cargo fmt --check,cargo clippy --tests -- -D warnings,soroban ...) rather than introducing new equivalent forms. - This repository's examples use the
sorobanCLI. If a doc needs to mention the newerstellarCLI, follow the pattern in docs/troubleshooting.md: note it as an alternative and keep the primary examples onsorobanunless maintainers update the README to switch. - Show file paths as they would actually appear (e.g.
target/wasm32-unknown-unknown/release/savings_vault.wasm), not abbreviated or guessed paths.
- Prefer linking to an existing doc over duplicating its content. If two docs would otherwise repeat the same explanation (e.g. custody limitations, network configuration), link to the single source of truth instead.
- Use relative Markdown links (
docs/foo.mdfrom the README,foo.mdor../README.md#sectionfrom withindocs/) so links keep working when the repository is cloned or viewed on a fork. - When adding a new document under
docs/, add it to the README's Documentation list and to the Project Structure tree if it's the kind of doc a new contributor would look for. - Keep section anchors stable where practical, since other docs link to them
by heading (e.g.
README.md#known-limitations); if you rename a heading that other docs link to, update those links in the same pull request.
This guide covers wording and formatting conventions for documentation. It is
not a grammar or tone-of-voice policy beyond what's written above, and it does
not cover Rust doc comments (///, //!) in contract source, which follow
normal Rust conventions instead.