docs: add developer quickstart, tutorials, cookbook, and architecture#90
docs: add developer quickstart, tutorials, cookbook, and architecture#90ADWilkinson wants to merge 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Heads up: |
Field Report
✅ All clear — no findings across any operative. Field report by oneshot-bot — 5 specialist operatives, cross-validated by arbiter |
Field Report
🟡 3 minor findings
Field report by oneshot-bot — 5 specialist operatives, cross-validated by arbiter |
ADWilkinson
left a comment
There was a problem hiding this comment.
[PAPERCLIP-CHANGES-REQUESTED]
Blocking: PR has no linked GitHub issue. Every Paperclip PR must reference a spec issue in the body with Closes #<n> (or Fixes/Resolves) so the review has an acceptance contract to verify against.
This is a non-trivial blocker here specifically because of the scale:
- +2,692 / -35 lines
- 15 new pages across
developer/quickstart.md,developer/architecture.md,developer/use-cases.md, 3 tutorials underdeveloper/tutorials/, and 10 recipes underdeveloper/cookbook/ - Material sidebar restructure in
developer-sidebars.js(adds Quickstart, Architecture, Use Cases, Integration Guides, Tutorials, Cookbook, SDK Reference sections)
Without a spec issue I cannot validate:
- Which of the 15 pages the lead actually scoped vs. which are scope creep
- Whether the sidebar taxonomy (Quickstart / Tutorials / Cookbook / Integration Guides / SDK Reference) was agreed with DocsLead or invented by the author
- Whether the code samples in the tutorials/cookbook were meant to be verified runnable vs. illustrative
- Acceptance criteria for "done" — the PR body's Test plan is literally
Not run, which is not acceptable for 2,600+ lines of TypeScript code samples
Secondary issue (non-blocking but mentioning so it gets fixed in the same pass):
.oneshot-pr-body.txtand.oneshot-pr-title.txtare committed in this PR. These look like Oneshot runner metadata (they get regenerated on every oneshot dispatch and contain the PR title/body text). They should not be tracked — please add.oneshot-pr-*.txt(or the broader.oneshot/pattern) to.gitignoreand remove these files from the diff. Leaving them in causes churn on every future oneshot run against this repo.
Next steps for the responsible lead (DocsLead):
- File a spec issue in
zkp2p/docsdescribing the developer-docs expansion. It should list the target pages (or categories), the sidebar restructure, explicit non-goals (e.g. "not re-writing existing SDK reference"), and acceptance criteria for the code samples (compile? match current SDK surface? link-check passes?). - Add
Closes #<n>to the PR body. - Remove the
.oneshot-pr-*.txtfiles and add them to.gitignore. - Re-request review. I'll do the full technical + content pass against the spec on the next round.
Fix on this branch — do not dispatch a new oneshot.
ADWilkinson
left a comment
There was a problem hiding this comment.
[PAPERCLIP-CHANGES-REQUESTED]
Requesting changes. The fix: address review findings commit (aa8f873) tightened several examples but three blockers remain.
-
PR has no linked GitHub spec issue. The body has no
Closes #<n>/Fixes #<n>/Resolves #<n>. Every Paperclip PR must reference a spec issue so the review contract is explicit (see prior docs PRs #87, #89 for the convention). Create a developer-docs spec issue inzkp2p/docsdescribing the 15 pages, acceptance criteria, and sidebar layout, then addCloses zkp2p/docs#<n>to the body and re-request review. -
Scaffold artifacts
.oneshot-pr-body.txtand.oneshot-pr-title.txtare still in the diff and Andrew already asked for this to be dropped (see his 2026-04-29 comment on this PR, same issue aszkp2p/support#18). The fix commit actually made this worse — it rewrote both scaffold files with the PR description. Fix:- Revert both files to
origin/maincontents:git checkout origin/main -- .oneshot-pr-body.txt .oneshot-pr-title.txt && git commit - Add
.oneshot-pr-*.txtto.gitignoreso this does not recur. - Only the
developer/anddeveloper-sidebars.jschanges should be in the merge diff.
- Revert both files to
-
developer/cookbook/oracle-rates.md:86-95still teaches unsafe TypeScript. The batch example uses non-null assertions onusdOracle!/eurOracle!even thoughgetSpreadOracleConfig('USD' | 'EUR')returnsT | undefined. The single-pair example 16 lines above correctly guards withif (!oracle) throw new Error(...); the batch example must do the same. Suggested replacement for lines 74-98:const usdOracle = getSpreadOracleConfig('USD'); const eurOracle = getSpreadOracleConfig('EUR'); if (!usdOracle || !eurOracle) { throw new Error('Missing bundled oracle config for USD or EUR'); } await client.setOracleRateConfigBatch({ depositId: 42n, paymentMethods: [paymentMethodHash], currencies: [[ resolveFiatCurrencyBytes32('USD'), resolveFiatCurrencyBytes32('EUR'), ]], configs: [[ { adapter: usdOracle.adapter, adapterConfig: usdOracle.adapterConfig, spreadBps: -50, maxStaleness: usdOracle.maxStaleness, }, { adapter: eurOracle.adapter, adapterConfig: eurOracle.adapterConfig, spreadBps: 0, maxStaleness: eurOracle.maxStaleness, }, ]], });
developer/cookbook/batch-operations.md:56-71has the same smell —usdOracleis referenced without any guard or definition in scope. Either add thegetSpreadOracleConfig('USD')+ null-check lines at the top of the snippet, or restructure so the reader can see where the variable comes from.
All three items must be resolved before approval. The actual docs content (quickstart, tutorials, cookbook) and SDK symbol references check out against packages/sdk/src/ — Zkp2pClient, peerExtensionSdk, useGetTakerTier, setOracleRateConfig, setOracleRateConfigBatch, setVaultMinRatesBatch, updateCurrencyConfigBatch, deactivateCurrenciesBatch, useVaultDelegation, pruneExpiredIntents, getExpiredIntents, getFulfilledIntentEvents, etc. are all real. Sidebar IDs match the id: frontmatter of every referenced file. Vercel preview is green. Scope and quality are otherwise good — just fix the three items above.
ADWilkinson
left a comment
There was a problem hiding this comment.
[PAPERCLIP-CHANGES-REQUESTED]
Requesting changes. The fix: address review findings commit (aa8f873) tightened several examples but three blockers remain.
-
PR has no linked GitHub spec issue. The body has no
Closes #<n>/Fixes #<n>/Resolves #<n>. Every Paperclip PR must reference a spec issue so the review contract is explicit (see prior docs PRs #87, #89 for the convention). Create a developer-docs spec issue inzkp2p/docsdescribing the 15 pages, acceptance criteria, and sidebar layout, then addCloses zkp2p/docs#<n>to the body and re-request review. -
Scaffold artifacts
.oneshot-pr-body.txtand.oneshot-pr-title.txtare still in the diff and Andrew already asked for this to be dropped (see his 2026-04-29 comment on this PR, same issue aszkp2p/support#18). The fix commit actually made this worse — it rewrote both scaffold files with the PR description. Fix:- Revert both files to
origin/maincontents:git checkout origin/main -- .oneshot-pr-body.txt .oneshot-pr-title.txt && git commit. - Add
.oneshot-pr-*.txtto.gitignoreso this does not recur. - Only the
developer/anddeveloper-sidebars.jschanges should be in the merge diff.
- Revert both files to
-
developer/cookbook/oracle-rates.md:86-95still teaches unsafe TypeScript. The batch example uses non-null assertions onusdOracle!/eurOracle!even thoughgetSpreadOracleConfig('USD' | 'EUR')returnsT | undefined. The single-pair example 16 lines above correctly guards withif (!oracle) throw new Error(...); the batch example must do the same. Suggested replacement for lines 74-98:const usdOracle = getSpreadOracleConfig('USD'); const eurOracle = getSpreadOracleConfig('EUR'); if (!usdOracle || !eurOracle) { throw new Error('Missing bundled oracle config for USD or EUR'); } await client.setOracleRateConfigBatch({ depositId: 42n, paymentMethods: [paymentMethodHash], currencies: [[ resolveFiatCurrencyBytes32('USD'), resolveFiatCurrencyBytes32('EUR'), ]], configs: [[ { adapter: usdOracle.adapter, adapterConfig: usdOracle.adapterConfig, spreadBps: -50, maxStaleness: usdOracle.maxStaleness, }, { adapter: eurOracle.adapter, adapterConfig: eurOracle.adapterConfig, spreadBps: 0, maxStaleness: eurOracle.maxStaleness, }, ]], });
developer/cookbook/batch-operations.md:56-71has the same smell —usdOracleis referenced without any guard or definition in scope. Either add thegetSpreadOracleConfig('USD')+ null-check lines at the top of the snippet, or restructure so the reader can see where the variable comes from.
All three items must be resolved before approval. The actual docs content (quickstart, tutorials, cookbook) and SDK symbol references check out against packages/sdk/src/ — Zkp2pClient, peerExtensionSdk, useGetTakerTier, setOracleRateConfig, setOracleRateConfigBatch, setVaultMinRatesBatch, updateCurrencyConfigBatch, deactivateCurrenciesBatch, useVaultDelegation, pruneExpiredIntents, getExpiredIntents, getFulfilledIntentEvents, etc. are all real. Sidebar IDs match the id: frontmatter of every referenced file. Vercel preview is green. Scope and quality are otherwise good — just fix the three items above.
ADWilkinson
left a comment
There was a problem hiding this comment.
[PAPERCLIP-CHANGES-REQUESTED]
This PR has no linked GitHub issue. Every Paperclip PR must reference a spec issue in the body with Closes #<n>, Fixes #<n>, or Resolves #<n>. The spec issue is the review contract — without it I cannot verify scope, acceptance criteria, or whether the shipped content matches what was requested.
This is a ~2,700-line addition across 22 files spanning quickstart, three tutorials, ten cookbook recipes, architecture, a use-cases page, and sidebar reorg. That surface area especially needs a spec so the scope of what belongs in this PR is auditable.
Required before re-review:
DocsLeadcreates a spec issue inzkp2p/docsthat enumerates the exact pages/sections expected, target audiences, and acceptance criteria (e.g. "external dev can go from zero tosignalIntent()in 15 minutes using only the quickstart").- PR body is updated to reference it:
Closes #<n>. - Re-request review.
One secondary note for the re-review pass: the PR body's "Test plan" is Not run. For a docs-only change, acceptable test plans include: pnpm build / docusaurus build passes locally, sidebar renders without broken IDs, every internal link in new pages resolves. Please fill that in when re-requesting so I can validate link hygiene against the build output.
All items must be resolved before approval. I will do the full content-quality review (SDK signature accuracy, link hygiene, style) on the re-review once a spec is attached.
Summary
developer-sidebars.jswith Quickstart, Tutorials, Cookbook, and Integration Guides categories while preserving all existing reference docsWhy
The developer docs had solid SDK reference material but no pathway from "I want to build on ZKP2P" to a working app. External developers had to reverse-engineer method signatures from the SDK source. This closes the gap with a 15-minute quickstart, three complete tutorials (onramp widget, maker bot, vault dashboard), and cookbook recipes for every major SDK surface area.
Changes
New pages:
developer/quickstart.md— Node.js and React examples frombun inittosignalIntent()developer/architecture.md— system diagram and data flow for onramp and maker flowsdeveloper/use-cases.md— "What Can You Build?" ecosystem overview with starting-doc pointersdeveloper/tutorials/onramp-widget.md— React widget usingpeerExtensionSdkanduseGetTakerTier()developer/tutorials/maker-bot.md— Node.js bot for deposit creation, intent monitoring, and lifecycle managementdeveloper/tutorials/vault-dashboard.md— React dashboard using indexer vault and delegation APIsCookbook recipes (10):
Expanded reference:
developer/sdk/client-reference.md— added oracle rate config, batch currency ops, and deactivation method tables with field-level documentationSidebar:
developer-sidebars.js— reorganized into Quickstart, Architecture, Use Cases, Integration Guides, Tutorials, Cookbook, and SDK Reference sectionsTest plan
Not run