Skip to content

feat: add --describe flag to strategy-builder CLI#2552

Open
hardyjosh wants to merge 1 commit into
template-fallbackfrom
describe-registry-v2
Open

feat: add --describe flag to strategy-builder CLI#2552
hardyjosh wants to merge 1 commit into
template-fallbackfrom
describe-registry-v2

Conversation

@hardyjosh
Copy link
Copy Markdown
Contributor

@hardyjosh hardyjosh commented Apr 16, 2026

Caution

The registry-side companion work that uses the template-fallback operator (#2551) to produce readable --describe output 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 .rain YAML files or running the interactive wizard. That discovery loop is currently: curl the registry file → resolve the settings URL → curl each 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 the address:calldata output 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):

  • Each field tagged (required) or (optional, default: X) so it is obvious which flags are mandatory
  • strategy-builder stdout lines are now labelled with # comment headers describing what each transaction does (approve / deploy / meta emission). Safe for cast send pipelines (with a one-line skip) and for stox submit (updated in feat: skip # comment lines in cli submit input ST0x-Technology/st0x.liquidity#578)
  • Usage section documents the # comment convention, the --tokens companion, the cast-send pipe idiom (with comment-skip), the units convention (human-readable decimal), and the build-once guidance for running the binary directly without nix develop noise

Checks

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • New Features

    • Added strategy-builder CLI command with interactive, describe, and tokens modes for deploying order strategies from registry configurations.
  • Bug Fixes

    • Made token logoURI field optional in remote token configurations.
  • Documentation

    • Updated YAML configuration: replaced gui: sections with builder: throughout codebase.
    • Renamed public APIs from GUI-centric to builder-centric terminology across CLI, SDK, and UI components.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: aa8d4541-66e9-40f5-bbee-9d8136c1359c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch describe-registry-v2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor Author

hardyjosh commented Apr 16, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label Raindex-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Copy Markdown
Contributor Author

hardyjosh commented May 11, 2026

Merge activity

@graphite-app graphite-app Bot force-pushed the template-fallback branch from b205a51 to 3065b16 Compare May 11, 2026 10:05
graphite-app Bot pushed a commit that referenced this pull request May 11, 2026
> [!CAUTION]
>
> The registry-side companion work that uses the template-fallback operator (#2551) to produce readable `--describe` output 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 `.rain` YAML files or running the interactive wizard. That discovery loop is currently: `curl` the registry file → resolve the settings URL → `curl` each 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 the `address:calldata` output 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):

- Each field tagged `(required)` or `(optional, default: X)` so it is obvious which flags are mandatory
- `strategy-builder` stdout lines are now labelled with `#` comment headers describing what each transaction does (approve / deploy / meta emission). Safe for `cast send` pipelines (with a one-line skip) and for `stox submit` (updated in ST0x-Technology/st0x.liquidity#578)
- Usage section documents the `#` comment convention, the `--tokens` companion, the cast-send pipe idiom (with comment-skip), the units convention (human-readable decimal), and the build-once guidance for running the binary directly without `nix develop` noise

## Checks

- [x] made this PR as small as possible
- [x] unit-tested any new functionality
- [x] linked any relevant issues or PRs
- [ ] included screenshots (if this involves a front-end change)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Added `strategy-builder` CLI command with interactive, describe, and tokens modes for deploying order strategies from registry configurations.

* **Bug Fixes**
  * Made token `logoURI` field optional in remote token configurations.

* **Documentation**
  * Updated YAML configuration: replaced `gui:` sections with `builder:` throughout codebase.
  * Renamed public APIs from GUI-centric to builder-centric terminology across CLI, SDK, and UI components.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app Bot force-pushed the describe-registry-v2 branch from e9f600b to 15c9e2b Compare May 11, 2026 10:06
@graphite-app graphite-app Bot force-pushed the template-fallback branch from 3065b16 to 9e4531a Compare May 11, 2026 12:29
graphite-app Bot pushed a commit that referenced this pull request May 11, 2026
> [!CAUTION]
>
> The registry-side companion work that uses the template-fallback operator (#2551) to produce readable `--describe` output 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 `.rain` YAML files or running the interactive wizard. That discovery loop is currently: `curl` the registry file → resolve the settings URL → `curl` each 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 the `address:calldata` output 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):

- Each field tagged `(required)` or `(optional, default: X)` so it is obvious which flags are mandatory
- `strategy-builder` stdout lines are now labelled with `#` comment headers describing what each transaction does (approve / deploy / meta emission). Safe for `cast send` pipelines (with a one-line skip) and for `stox submit` (updated in ST0x-Technology/st0x.liquidity#578)
- Usage section documents the `#` comment convention, the `--tokens` companion, the cast-send pipe idiom (with comment-skip), the units convention (human-readable decimal), and the build-once guidance for running the binary directly without `nix develop` noise

## Checks

- [x] made this PR as small as possible
- [x] unit-tested any new functionality
- [x] linked any relevant issues or PRs
- [ ] included screenshots (if this involves a front-end change)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Added `strategy-builder` CLI command with interactive, describe, and tokens modes for deploying order strategies from registry configurations.

* **Bug Fixes**
  * Made token `logoURI` field optional in remote token configurations.

* **Documentation**
  * Updated YAML configuration: replaced `gui:` sections with `builder:` throughout codebase.
  * Renamed public APIs from GUI-centric to builder-centric terminology across CLI, SDK, and UI components.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app Bot force-pushed the describe-registry-v2 branch from 15c9e2b to f7cfad7 Compare May 11, 2026 12:29
> [!CAUTION]
>
> The registry-side companion work that uses the template-fallback operator (#2551) to produce readable `--describe` output 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 `.rain` YAML files or running the interactive wizard. That discovery loop is currently: `curl` the registry file → resolve the settings URL → `curl` each 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 the `address:calldata` output 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):

- Each field tagged `(required)` or `(optional, default: X)` so it is obvious which flags are mandatory
- `strategy-builder` stdout lines are now labelled with `#` comment headers describing what each transaction does (approve / deploy / meta emission). Safe for `cast send` pipelines (with a one-line skip) and for `stox submit` (updated in ST0x-Technology/st0x.liquidity#578)
- Usage section documents the `#` comment convention, the `--tokens` companion, the cast-send pipe idiom (with comment-skip), the units convention (human-readable decimal), and the build-once guidance for running the binary directly without `nix develop` noise

## Checks

- [x] made this PR as small as possible
- [x] unit-tested any new functionality
- [x] linked any relevant issues or PRs
- [ ] included screenshots (if this involves a front-end change)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Added `strategy-builder` CLI command with interactive, describe, and tokens modes for deploying order strategies from registry configurations.

* **Bug Fixes**
  * Made token `logoURI` field optional in remote token configurations.

* **Documentation**
  * Updated YAML configuration: replaced `gui:` sections with `builder:` throughout codebase.
  * Renamed public APIs from GUI-centric to builder-centric terminology across CLI, SDK, and UI components.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app Bot force-pushed the template-fallback branch from 9e4531a to d8d142d Compare May 11, 2026 12:33
@graphite-app graphite-app Bot force-pushed the describe-registry-v2 branch from f7cfad7 to 6149cdd Compare May 11, 2026 12:33
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