Skip to content

feat(cli): keel status — read-only operator dashboard - #138

Merged
eaitbrahim merged 1 commit into
mainfrom
feat/keel-status
Jul 24, 2026
Merged

feat(cli): keel status — read-only operator dashboard#138
eaitbrahim merged 1 commit into
mainfrom
feat/keel-status

Conversation

@eaitbrahim

Copy link
Copy Markdown
Contributor

What

Adds keel status, a read-only operator dashboard — the interim of the TUI/keel status command explicitly deferred in the paper-mode-fidelity spec ("A dedicated keel status command 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

  • mode (paper/confirm) · kill-switch (engaged/clear, fail-closed) · autonomy (mirrors keel autonomy show)
  • Rail 11: equity_state_mode, HWM, total/weekly drawdown vs config ceilings, and a computed HALTED / ok / unknown breaker status; paper_cash_usdc in paper mode
  • open positions · rule counts by status (+ live rules) · per-product data freshness (finest granularity, age)
  • subscription/allowance (rail 14) when any venue is attested

Design

  • Pure gather_status(repo, config, now_ts) -> StatusReport (no click, no broker) + render_human + a --json flag (stable machine-readable shape, forward-compat with the eventual TUI). Matches the codebase's logic/CLI separation.
  • Rail 11 display deliberately shows unknown for unwritten scalars rather than defaulting to 0/"ok" like guards.py's veto path — a dashboard must not misreport an uncomputed value as a confident all-clear. guards.py was read for reference only, not modified.

Tests

  • 18 pure-function tests + 2 CliRunner tests (incl. --json parses as JSON). Full suite 1467 passed (+20), ruff clean.

🤖 Generated with Claude Code

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>
@eaitbrahim
eaitbrahim merged commit 95353b4 into main Jul 24, 2026
1 check passed
@eaitbrahim
eaitbrahim deleted the feat/keel-status branch July 24, 2026 03:58
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.

1 participant