Skip to content

Refresh droid-wiki: reorganize and add docs#15

Merged
wtfsayo merged 2 commits into
mainfrom
develop
May 20, 2026
Merged

Refresh droid-wiki: reorganize and add docs#15
wtfsayo merged 2 commits into
mainfrom
develop

Conversation

@wtfsayo
Copy link
Copy Markdown
Contributor

@wtfsayo wtfsayo commented May 20, 2026

Summary

Restructure and expand the droid-wiki/ documentation to match the current CLI architecture (v0.11.0+).

What changed

62 files touched across the wiki — +2,883 / −1,882 lines.

New pages (22 added)

Section Pages
Features orders, transfers, subaccounts, api-wallets, account-and-portfolio, staking-vaults-borrowlend, builder-and-referrals, agent-output-contract, dry-run, schema-discovery, raw-payload, setup-wizard, feedback, execution
Systems signing-and-wallets, error-and-output, watch-and-streaming, update-and-release, input-hardening
Background design-decisions, pitfalls
Other applications/install-script, reference/exit-codes, lore, fun-facts

Removed pages (10 deleted)

Legacy pages whose content was folded into the new structure:
agent-first-contracts, ows-migration, accounts-and-transfers, orders-and-trading, wallets-and-signing, vaults-staking-and-defi, watch-and-subscribe, configuration-and-storage, output-rendering, signing-and-auth, maintainers

Updated pages

  • applications/cli.md — dispatch flow diagram, global flags table, command groups with cross-links
  • overview/architecture.md — updated component map and data-flow diagrams
  • overview/glossary.md — expanded with selector classes and agent/output terminology
  • reference/ — reworked configuration, data-models, and dependencies pages
  • how-to-contribute/ — updated workflow, testing, tooling, conventions, debugging
  • security.md — rewritten as threat-model summary with key defenses
  • deployment.md — updated release packaging and self-update flow
  • .wiki-meta.json — reflects new page ordering (pageCount 35 → 47)

Notes

  • Docs-only change; no Rust source modifications
  • .factory/settings.json added (empty plugin config)

Restructure and expand the droid-wiki: add many feature pages (orders, transfers, subaccounts, API wallets, account-and-portfolio, staking/vaults, schema-discovery, setup-wizard, feedback, raw-payload, etc.), new background pages (design-decisions, pitfalls), installer docs (applications/install-script.md), and systems pages (signing-and-wallets, error-and-output, watch-and-streaming, update-and-release, input-hardening, and exit-codes). Update CLI documentation (applications/cli.md) with detailed dispatch, flags, command groups and runtime guidance; adjust applications/index.md and deployment.md to reference the installer and release flows. Update meta (.wiki-meta.json) to reflect new page ordering and increased pageCount, and add .factory/settings.json. Remove obsolete pages (agent-first-contracts.md, ows-migration.md, accounts-and-transfers.md, maintainers.md, and several legacy feature/system pages) as content was folded into the new pages. Also apply smaller edits across overview, reference, by-the-numbers, how-to-contribute, security and systems index files to reflect the reorganization and policy/architecture notes.
Copilot AI review requested due to automatic review settings May 20, 2026 04:13
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 20, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
hyperliquid-feedback 2436da0 May 20 2026, 05:05 AM

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refreshes and reorganizes the droid-wiki/ documentation set to better match the current CLI architecture and agent-focused contracts, adding many new subsystem/feature pages while removing legacy pages that were folded into the new structure.

Changes:

  • Added/expanded subsystem documentation (signing/wallets, error+output, watch+streaming, update+release, input hardening) and updated system indexes.
  • Added/expanded feature documentation (orders, transfers, subaccounts, staking/vaults/borrowlend, schemas, raw payloads, dry-run, agent output contract, setup wizard, feedback, execution).
  • Updated overview/reference/contributing/deployment/security pages and refreshed wiki metadata/orderings.

Reviewed changes

Copilot reviewed 62 out of 62 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
droid-wiki/systems/watch-and-streaming.md New subsystem page describing snapshot watch + WebSocket subscribe flows and bounds.
droid-wiki/systems/update-and-release.md New subsystem page describing passive update checks, self-update, and installer/release packaging.
droid-wiki/systems/signing-and-wallets.md New subsystem page describing signer resolution, OWS vault, and encrypted local account storage.
droid-wiki/systems/signing-and-auth.md Removed legacy signing/auth page (content folded into signing-and-wallets + other pages).
droid-wiki/systems/output-rendering.md Removed legacy output-rendering page (replaced by error-and-output + other pages).
droid-wiki/systems/input-hardening.md New subsystem page describing file/path/JSON limits and policies.
droid-wiki/systems/index.md Updated systems index to new set of subsystem pages and key files.
droid-wiki/systems/error-and-output.md New subsystem page describing CliError, exit codes, rendering, and sanitization boundary.
droid-wiki/systems/configuration-and-storage.md Removed legacy configuration/storage page (content redistributed).
droid-wiki/systems/command-registry.md Expanded command registry page: purpose, rollout policy, schema discovery guidance.
droid-wiki/security.md Rewritten security page into threat model summary + key defenses + links.
droid-wiki/reference/index.md Updated reference index layout and added exit-codes link.
droid-wiki/reference/exit-codes.md New exit-code reference page mapping CliError variants to structured codes.
droid-wiki/reference/dependencies.md Reworked dependency reference: grouped, updated versions, dual-Alloy rationale.
droid-wiki/reference/data-models.md Reworked data-models reference: grouped by subsystem/types and pointers.
droid-wiki/reference/configuration.md Reworked configuration reference: precedence, env var table, paths, format precedence.
droid-wiki/overview/index.md Updated overview positioning around agent loop, safety gates, and new quick links.
droid-wiki/overview/glossary.md Expanded glossary with selector classes, protocol terms, and agent/output terminology.
droid-wiki/overview/getting-started.md Expanded getting-started with install paths, dev loop, first commands, env vars.
droid-wiki/overview/architecture.md Expanded architecture overview with updated diagrams, component map, data flows.
droid-wiki/maintainers.md Removed maintainers page.
droid-wiki/lore.md New “lore” history page summarizing repo evolution and key eras.
droid-wiki/how-to-contribute/tooling.md Updated tooling page: Taskfile targets, QA scripts, CI workflows, build.rs defaults.
droid-wiki/how-to-contribute/testing.md Updated testing page: test layers, helpers, mocking patterns, fixture regen guidance.
droid-wiki/how-to-contribute/patterns-and-conventions.md Updated conventions summary: decimals, exit codes, selector semantics, rollout policy.
droid-wiki/how-to-contribute/index.md Updated contribute index and PR checklist.
droid-wiki/how-to-contribute/development-workflow.md Updated workflow: standard cycle, branch model, editable surfaces, release process.
droid-wiki/how-to-contribute/debugging.md Updated debugging page: exit-code-first approach, JSON error routing, common fixes.
droid-wiki/fun-facts.md New “fun facts” page with interesting codebase details.
droid-wiki/features/watch-and-subscribe.md Removed legacy watch/subscribe feature page (replaced by systems/watch-and-streaming).
droid-wiki/features/wallets-and-signing.md Removed legacy wallets/signing feature page (replaced by systems/signing-and-wallets + others).
droid-wiki/features/vaults-staking-and-defi.md Removed legacy DeFi feature page (replaced by staking-vaults-borrowlend).
droid-wiki/features/transfers.md New transfers feature page describing commands, selector rules, dry-run shape, routing.
droid-wiki/features/subaccounts.md New subaccounts feature page describing commands, selector semantics, and dry-run shape.
droid-wiki/features/staking-vaults-borrowlend.md New DeFi feature page describing staking/vault/borrowlend families and shapes.
droid-wiki/features/setup-wizard.md New setup wizard page describing interactive + unattended flow and boundaries.
droid-wiki/features/schema-discovery.md New schema discovery page describing hyperliquid schema and authoritative fields.
droid-wiki/features/raw-payload.md New raw-payload submission page describing flags, policy, and file limits.
droid-wiki/features/orders.md New orders feature page describing command surface, safety notes, dry-run shapes.
droid-wiki/features/agent-output-contract.md New agent output contract page: precedence, error envelope, bounds, NDJSON behavior.
droid-wiki/features/feedback.md New feedback page describing scenario submission, rate limits, and input hardening.
droid-wiki/features/execution.md New execution strategies page describing parent-order engine command family.
droid-wiki/features/dry-run.md New dry-run page describing envelope contract and policies.
droid-wiki/features/builder-and-referrals.md New builder/referrals page describing commands and packaged defaults behavior.
droid-wiki/features/api-wallets.md New API/agent wallets page describing delegation model and one-time secret reveal.
droid-wiki/features/account-and-portfolio.md New account/portfolio page describing public reads + wallet lifecycle entry points.
droid-wiki/features/market-data.md Updated market-data page: consolidated command list, asset parsing, HIP-3 notes, watch.
droid-wiki/features/index.md Updated features index structure and links to new feature/agent-surface pages.
droid-wiki/features/orders-and-trading.md Removed legacy orders-and-trading feature page (replaced by features/orders).
droid-wiki/features/accounts-and-transfers.md Removed legacy accounts-and-transfers feature page (replaced by account-and-portfolio + transfers).
droid-wiki/deployment.md Updated deployment page: release packaging, pre-release gate, self-update, install locations.
droid-wiki/by-the-numbers.md Refreshed metrics snapshot, largest files chart/table, activity section.
droid-wiki/background/pitfalls.md New pitfalls page highlighting common bug classes (selectors, acting-as, HIP-3 margin, etc.).
droid-wiki/background/index.md Updated background index to new pages (design-decisions, pitfalls).
droid-wiki/background/design-decisions.md New design-decisions page capturing key architectural/security policy choices.
droid-wiki/background/ows-migration.md Removed legacy OWS migration page.
droid-wiki/background/agent-first-contracts.md Removed legacy agent-first contracts page (replaced by agent-output-contract + design-decisions).
droid-wiki/applications/install-script.md New install script page documenting install.sh behavior, overrides, and failure modes.
droid-wiki/applications/index.md Updated applications index to include installer script docs.
droid-wiki/applications/cli.md Updated CLI app page: dispatch flow diagram, global flags, command groups, format resolution.
droid-wiki/.wiki-meta.json Updated wiki metadata: generatedAt, pageCount, section/order list.
.factory/settings.json Added factory settings file.
Comments suppressed due to low confidence (2)

droid-wiki/reference/configuration.md:63

  • This page hard-codes ~/.config/hyperliquid/config.json and ~/.config/hyperliquid/version.json, but the code uses dirs::config_dir() for platform-specific config locations (macOS/Windows differ). Consider describing these as “platform config directory” paths (and optionally listing per-OS examples) to avoid misleading non-Linux users.
    droid-wiki/systems/watch-and-streaming.md:44
  • Subscribe streams can also be bounded via the HYPERLIQUID_SUBSCRIBE_MAX_EVENTS env var (used in src/watch.rs and enforced by src/cli_runtime.rs). Consider documenting it alongside --max-events / --idle-timeout-ms so the bounds list is complete.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +20 to +28
| `HYPERLIQUID_FORMAT` | `src/output/mod.rs` | Default output format (`pretty`/`table`/`json`) |
| `HYPERLIQUID_AGENT` | `src/output/mod.rs`, `src/update_check.rs` | When `=1`, default to JSON and suppress prompts/update notices |
| `HYPERLIQUID_NO_UPDATE_CHECK` | `src/update_check.rs` | Disable passive update notices |
| `HYPERLIQUID_WATCH_MAX_TICKS` | `src/watch.rs` | Cap snapshot watch ticks |
| `HYPERLIQUID_OWS_VAULT_PATH` | `src/ows.rs` | Override OWS vault path (default `~/.hyperliquid`) |
| `OWS_PASSPHRASE` | `src/ows.rs` | Unattended unlock passphrase for the OWS vault |
| `HYPERLIQUID_ACCOUNT_KEY_PASSPHRASE` | `src/db.rs` | Passphrase-derived key material for the encrypted SQLite account DB (tests/headless) |
| `HYPERLIQUID_ACCOUNT_KEYCHAIN_DISABLED` | `src/db.rs` | Disable OS keychain backend for account-DB key material |
| `HYPERLIQUID_ACCOUNT_KEY_STORE_DIR` | `src/db.rs` | Legacy test directory for key material |
Comment on lines +19 to +23
- Reads `LATEST_RELEASE_URL` (`https://api.github.com/repos/hypurrclaw/hyperliquid-cli/releases/latest`).
- Caches the latest tag for `UPDATE_CHECK_INTERVAL` (20 hours) in a `version.json` file under the config directory.
- Skips entirely when `HYPERLIQUID_NO_UPDATE_CHECK=1` or `HYPERLIQUID_AGENT=1` is set, or when stdout is not a TTY.
- Surfaces a single line to stderr if a newer release is available.

Comment on lines +16 to +18
- Pretty/table output: alternate screen is entered; the snapshot is re-drawn every `WATCH_REFRESH_INTERVAL` (2 s) until the user presses `q` / `Ctrl-C` or the tick cap is reached.
- JSON output: NDJSON is emitted to stdout; one JSON object per refresh.

Comment on lines +74 to +79
| `Unavailable(String)` | 12 | Network/API unreachable |
| `Timeout(String)` | 12 | Exceeded a bound |
| `Unsupported(String)` | 13 | Bad asset/DEX/parameter |
| `AssetNotFound { suggestions }` | 13 | Unknown asset with close matches |
| `AssetNotFoundNoSuggestion` | 13 | Unknown asset with no matches |
| `StaleData(String)` | 14 | Cached data expired |
Comment on lines +41 to +49
Flags[CLI flags] --> Resolve
Env[Env vars<br/>HYPERLIQUID_PRIVATE_KEY, OWS_PASSPHRASE] --> Resolve
Config[Config file<br/>~/.config/hyperliquid/config.json] --> Resolve
Resolve{resolvers::resolve_selected_signer} -->|--ows-signer| Ows[OWS vault<br/>~/.hyperliquid]
Resolve -->|--private-key| Raw[PrivateKeySigner from hex]
Resolve -->|--keystore + password| Keystore[alloy-signer-local keystore]
Resolve -->|--account ALIAS| Db[SQLite account store]
Resolve -->|none| Default[Default OWS wallet<br/>or stored default account]
Ows --> Selected[SelectedSigner]
Comment thread droid-wiki/features/orders.md Outdated
| `orders modify` | Modify an existing order | supported | required unless `-y` |
| `orders twap-create` | Time-weighted-average-price slice schedule | supported | required unless `-y` |
| `orders twap-cancel` | Cancel an active TWAP | supported | required unless `-y` |
| `orders schedule-cancel` | Server-side dead-man's switch (sets a ScheduleCancel action) | supported | prompt-gated on mainnet for `cancel-all` flavor, even with `-y`? See safety note below |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Authorial uncertainty leaked into published docs — the trailing ? reads as "I'm not sure about this behavior."

The Mainnet schedule cancel-all section below clarifies the actual policy, but the table entry itself should state the behavior definitively. If the prompt gate applies even when -y is passed, rephrase to something like:

prompt-gated on mainnet for cancel-all flavor (even with -y). See safety note below

If -y bypasses it, rephrase accordingly.

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented May 20, 2026

Code Review Summary

Status: All Previous Issues Resolved | 4 Out-of-Diff Observations Remain

Incremental Update (commit 1aa04b7..HEAD)

All 6 inline issues from the previous review have been fixed:

File Fix
droid-wiki/features/orders.md:29 Question mark replaced with period — authorial uncertainty removed
droid-wiki/reference/configuration.md:24 HYPERLIQUID_SUBSCRIBE_MAX_EVENTS env var added to table
droid-wiki/systems/error-and-output.md:77 AssetNotFound now shows { asset, suggestions } fields
droid-wiki/systems/signing-and-wallets.md:43 Config path made platform-agnostic (platform config dir + ...)
droid-wiki/systems/update-and-release.md:21 TTY check corrected from stdout to stderr
droid-wiki/systems/watch-and-streaming.md:16 TTY/non-TTY watch behavior fully documented

No new issues found in the incremental diff.

Remaining Out-of-Diff Observations (not in diff)

Issues in unchanged code that cannot receive inline comments:

Category Issue
Missing docs positions commands undocumented. The old orders-and-trading.md documented positions list, positions update-leverage, and positions update-margin. No new page covers these commands. If they still exist in the CLI, they need a feature page or a section in orders.md.
Missing docs prio (priority auction) commands undocumented. The old vaults-staking-and-defi.md documented prio status and prio bid --max <HYPE> --ip <IP> [--slot 0-4]. No new page covers these.
Missing docs Several staking/vault/borrowlend commands dropped. Old docs listed staking link initiate --user <ADDR>, staking link finalize --user <ADDR>, vault search <QUERY>, vault positions <ADDR>, borrowlend rates, borrowlend get <TOKEN>, borrowlend user <ADDR>. New staking-vaults-borrowlend.md omits all of these.
Consistency configuration.md:7 still hardcodes ~/.config/hyperliquid/config.json while signing-and-wallets.md:43 was updated to platform config dir + hyperliquid/config.json. Consider making configuration.md platform-agnostic too for consistency.
Files Reviewed (62 files)

Incrementally reviewed (6 files):

  • droid-wiki/features/orders.md — 1 previous issue, now fixed
  • droid-wiki/reference/configuration.md — 1 previous issue, now fixed
  • droid-wiki/systems/error-and-output.md — 1 previous issue, now fixed
  • droid-wiki/systems/signing-and-wallets.md — 1 previous issue, now fixed
  • droid-wiki/systems/update-and-release.md — 1 previous issue, now fixed
  • droid-wiki/systems/watch-and-streaming.md — 1 previous issue, now fixed

Previously reviewed (56 files): carried forward without changes.

Fix these issues in Kilo Cloud


Reviewed by glm-5.1 · 123,438 tokens

- Fix schedule-cancel confirmation description (prompt-gated unless -y, not uncertain)
- Add HYPERLIQUID_SUBSCRIBE_MAX_EVENTS to env var reference
- Fix update check TTY detection (stderr, not stdout)
- Clarify watch non-TTY fallback to NDJSON
- Fix AssetNotFound variant signature (asset + suggestions)
- Use platform-agnostic config path in signing diagram

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@wtfsayo wtfsayo merged commit a969223 into main May 20, 2026
3 of 4 checks passed
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