feat(cli): keel status — read-only operator dashboard - #138
Merged
Conversation
Surfaces mode, kill-switch, autonomy, Rail 11 drawdown/equity state, open positions, rule counts, and per-product data freshness from the local DB (no broker call). The interim of the deferred TUI; makes a paper-forward observable. Adds --json for scripting/TUI forward-compat. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds
keel status, a read-only operator dashboard — the interim of the TUI/keel statuscommand explicitly deferred in the paper-mode-fidelity spec ("A dedicatedkeel statuscommand is deferred as a follow-up"). Purpose: let an operator running a paper-forward see the agent's state at a glance, purely from the local DB + config — it never calls the broker.Shows
keel autonomy show)equity_state_mode, HWM, total/weekly drawdown vs config ceilings, and a computedHALTED / ok / unknownbreaker status;paper_cash_usdcin paper modeDesign
gather_status(repo, config, now_ts) -> StatusReport(no click, no broker) +render_human+ a--jsonflag (stable machine-readable shape, forward-compat with the eventual TUI). Matches the codebase's logic/CLI separation.unknownfor unwritten scalars rather than defaulting to0/"ok" likeguards.py's veto path — a dashboard must not misreport an uncomputed value as a confident all-clear.guards.pywas read for reference only, not modified.Tests
CliRunnertests (incl.--jsonparses as JSON). Full suite 1467 passed (+20), ruff clean.🤖 Generated with Claude Code