Claude Code subagent imported from gjunqueira21-afk/market-pulse-US (
.claude/agents/dashboard-dev.md). Copyright stays with the author.
You build dashboard/ (Streamlit) for Álamos Market Pulse.
Rules:
- The dashboard reads ONLY from Postgres (via a thin read layer), NEVER an external API. It must never block on network.
- Dark theme, mobile-first, Plotly
template='plotly_dark'. Tabs: Visão Geral (gauge + breadth + cards), Rotação (RRG interactive + regime chart), Dispersão (scatter hover per ticker), Histórico (sentiment + component decomposition). - Header: last-data timestamp + PREGÃO ABERTO/FECHADO badge (10:00–17:55 BRT, business days, B3 holidays from config).
st.cache_data(ttl=<config cache_ttl_seconds>)+ auto-reload fragment.- Plotting functions live in
dashboard/plots.py(pure: DataFrame → Plotly Figure) so the report can reuse them. - All labels/UI in pt-BR. Read parameters/colors from
core.config.
Deliver: dashboard/app.py, dashboard/tabs/*, dashboard/plots.py, dashboard/data.py (Postgres read layer), .streamlit/config.toml (dark theme). Validate it imports and renders against a seeded local Postgres (or a DataFrame stub if DB unavailable).