Implement the following plan: Plan: Rewrite README.md Installation and Usage Sections…
- User
Implement the following plan:
Plan: Rewrite README.md Installation and Usage Sections
Context
The current README has a minimal "Usage" section (lines 63-90) that only lists
cargocommands and a brief Python extension example. It lacks prerequisites, configuration, environment variables, risk config setup, agent setup, simulation mode, TUI keybindings, and platform support — all of which are important for someone setting up the project.The architecture diagram on line 13 also says "PyO3" for the agent connection, but agents actually communicate via JSON-lines over stdin/stdout pipes. PyO3 is a separate feature for using Rust types from Python directly.
Changes
File:
README.mdReplace the "Usage" section (lines 63-90) and fix the architecture diagram. Keep the title, description, and project structure sections unchanged.
New content outline
-
Fix architecture diagram (line 11): Change
PyO3label toJSON-linesorstdiosince agents communicate via pipes, not PyO3. Add a note that PyO3 is available as a separate feature. -
Prerequisites section:
- Rust (stable, edition 2024)
- Python 3.12+ and
uv(for agents) - macOS (ARM64), Linux (x86_64), or Windows (x86_64)
-
Configuration section:
- Environment variables table:
KRAKEN_API_KEY,KRAKEN_API_SECRET,KRAKEN_WEBSOCKET_URL,LEESON_SIMULATION - Note: credentials can also be entered at runtime via the TUI (
akey) or stored in macOS Keychain risk.json— must exist in working directory, explain its purpose and format
- Environment variables table:
-
Building and Running section:
cargo build/cargo run- Simulation mode:
LEESON_SIMULATION=true cargo run - Agent spawning happens automatically from the TUI
-
TUI Key Bindings section:
- Table of key bindings for navigation, agents, overlays
-
Python Extension section (keep but improve):
maturin develop --releasewith feature explanation
-
Assistant
I'll start by reading the current README.md and gathering details from the codebase to ensure accuracy.
Assistant
Now let me check the actual
risk.jsonfile to use the real content in the example.Assistant
Now I have everything I need. Let me update the README.
Assistant
Now replace the Usage section and everything after the project structure with the new content.
Assistant
Let me verify the final result.
Assistant
The README looks good. All sections are in place, the architecture diagram is corrected, and the content is accurate. Here's a summary of the changes:
Architecture diagram — Changed
PyO3label toJSON-lines (stdin/stdout)to reflect how agents actually communicate.Description — Updated to mention JSON-lines over stdin/stdout instead of PyO3.
New sections added:
- Prerequisites — Rust 1.85+, Python 3.12+ with uv, supported platforms
- Configuration — Environment variables table (7 vars),
risk.jsonformat with example,agent_risk.jsonformat with example - Building and Running — Build commands including simulation mode, agent spawning explanation
- TUI Key Bindings — Organized by context (Global, Agent Tab Normal/Insert, Trading Pair Tab, Confirm Overlay)
- Python Extension — Improved with
--featuresflags,from decimal import Decimal, and feature flag explanations - Development — Test, lint, format, and check commands