feat: add --describe flag to strategy-builder CLI#2552
Open
hardyjosh wants to merge 8 commits intotemplate-fallbackfrom
Open
feat: add --describe flag to strategy-builder CLI#2552hardyjosh wants to merge 8 commits intotemplate-fallbackfrom
hardyjosh wants to merge 8 commits intotemplate-fallbackfrom
Conversation
added 8 commits
April 15, 2026 22:06
Emits a full markdown dump of a registry: strategies, their deployments, fields (with presets and defaults), select-tokens, deposits, plus usage documentation and the address:calldata output format. Intended use: an AI agent or human can run once to learn everything needed to construct a non-interactive deploy command for the registry. The output includes example commands for each deployment with all required flags filled in as placeholders.
Extend the usage section with: - cast send pipe example for signing without the stox CLI - Explicit note that approvals only appear when depositing - Explanation of how to pick token addresses (block explorer / token list) since these are not in the registry itself - Clarification that --owner must be a signing address Goal: minimize the upfront context a calling agent needs before running --describe. Most of what a user would otherwise need to explain in the prompt is now emitted by the tool itself.
Each deployment with select-tokens now includes a code block showing how to fetch the actual valid token addresses for that deployment via raindex strategy-builder --tokens. Avoids inlining hundreds of token entries in describe output.
- Mark each field as (required) or (optional, default: X) - Add a units convention note to the usage section - Add a build-once guidance section (run binary directly, avoid the npm install noise from the nix develop shellHook) - Label calldata stdout lines with # comment headers describing each tx - Update the cast-send pipe example to skip # comment lines and blank lines - Document the # comment convention in the output format section The # comment lines are safe for any submitter that skips lines not matching <address>:<hex> — cast-loop example shows the idiom. The stox submit parser will be updated in a follow-up PR to do the same.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Caution
Stacks on #2551. Merge that first.
The registry-side companion work that uses the template-fallback operator (#2551) to produce readable
--describeoutput for existing strategies is in ST0x-Technology/st0x.registry#9 — describe works fine without it, but strategy field names will contain raw${...}placeholders until that PR lands.Motivation
CLI users and AI agents need a way to learn a registry's full configuration without reading the underlying
.rainYAML files or running the interactive wizard. That discovery loop is currently:curlthe registry file → resolve the settings URL →curleach strategy → parse the YAML by hand. Every agent we tested (6/6) burned 4+ tool calls just discovering token addresses.Solution
Add
--describe— emits a full markdown dump of the registry: every strategy, its deployments, required/optional fields (with presets and defaults), select-tokens, deposits, plus usage documentation and theaddress:calldataoutput format.Intended as a self-generating skill. An agent can run once against a registry and have everything it needs to construct non-interactive deploy commands from a natural-language request. Each deployment includes an Example command with the exact flags and placeholders pre-filled.
Also bundled in this PR (small polish items):
(required)or(optional, default: X)so it is obvious which flags are mandatorystrategy-builderstdout lines are now labelled with#comment headers describing what each transaction does (approve / deploy / meta emission). Safe forcast sendpipelines (with a one-line skip) and forstox submit(updated in feat: skip # comment lines in cli submit input ST0x-Technology/st0x.liquidity#578)#comment convention, the--tokenscompanion, the cast-send pipe idiom (with comment-skip), the units convention (human-readable decimal), and the build-once guidance for running the binary directly withoutnix developnoiseChecks
Summary by CodeRabbit
New Features
strategy-builderCLI command with interactive, describe, and tokens modes for deploying order strategies from registry configurations.Bug Fixes
logoURIfield optional in remote token configurations.Documentation
gui:sections withbuilder:throughout codebase.