Skip to content

docs(finance/order-book): add walkthrough-script style guide#71

Closed
mikemaccana wants to merge 1 commit into
mainfrom
claude/order-book-skill-audit-U8lX3
Closed

docs(finance/order-book): add walkthrough-script style guide#71
mikemaccana wants to merge 1 commit into
mainfrom
claude/order-book-skill-audit-U8lX3

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

Adds finance/order-book/docs/walkthrough-script-style.md — a style guide for narrating a Solana program's full lifecycle in tutorial/video scripts and README walkthroughs.

Why

Distilled from review feedback while editing the order-book tutorial script. Several conventions needed multiple rounds to land correctly; this captures them so the next walkthrough starts from the right defaults.

What it covers

  • Per-handler account snapshots — one ADDED/UPDATED block per account, full fields shown, changes marked old -> new (no consolidating multiple accounts under one heading, no deltas-only blocks).
  • on-curve vs off-curve labelling, verified against code — the gotchas that bit us: token vaults created via Anchor init + token::authority with no seeds are on-curve keypairs (only their authority is a PDA); large zero-copy accounts are client keypairs, not PDAs; ATAs are off-curve PDAs even though their owning wallet is on-curve.
  • TOKEN MOVEMENT FROM/TO blocks wherever tokens move, annotated by kind (lock / fee sweep / payout / refund), and none on counter-only steps.
  • Fee-accounting rules to state precisely (where generated, accrued vs swept, who pays, rounding direction, what generates no fee).
  • Narrative conventions (protagonist first, bids highest-first, maker sets fill price, limit price stored on the order, partial vs full fill resting behaviour).
  • Terminology — critbit is depth-bounded by key width, not "balanced"; bits zero-indexed from the right.

Note: this is currently a holding spot under the order-book example. It's intended for the quicknode/solana-claude-skill repo; happy to relocate or drop it from this repo if preferred.

Verification

Docs-only change; no code touched.

https://claude.ai/code/session_01G6iaAjzg8aoFwe8ZWWG9VR


Generated by Claude Code

Distilled from review feedback while editing the order-book tutorial
script. Captures conventions for narrating a Solana program's full
lifecycle: per-handler account snapshots (one block per account, full
fields, old->new deltas), on/off-curve labelling verified against code,
TOKEN MOVEMENT FROM/TO blocks, and fee-accounting rules.

Holding spot for content destined for quicknode/solana-claude-skill.

https://claude.ai/code/session_01G6iaAjzg8aoFwe8ZWWG9VR
@mikemaccana

Copy link
Copy Markdown
Collaborator Author

Wrong repo, bot.

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