{"name":"stat","helper":"rui_stat","complexity":"simple","param_count":10,"slot_count":3,"form_builder":false,"standalone":true,"ai_score":7,"human_score":8,"token_estimate":105,"slots":{"icon":{"type":"renders_one","component":"lambda","example":"component.with_icon"},"sparkline":{"type":"renders_one","component":null,"example":"component.with_sparkline"},"footer":{"type":"renders_one","component":null,"example":"component.with_footer"}},"gotchas":[{"id":"stat_change_direction_has_no_visual_effect","severity":"high","component":"rui_stat","summary":"change_direction: is computed, stored, and tested but does not currently drive any rendered output — no up/down arrow icon exists in the template","params":["change_direction","change_color"],"behavior":"change_direction is auto-detected from the +/- prefix on change: (or set explicitly) and exposed via attr_reader — component.html.erb only renders the change badge with change: as its text and change_color: as its color; change_direction is never read by the template or by Stat::Styles. Setting change_direction: :down (or getting it auto-detected) changes nothing a user can see beyond whatever change_color: already produces — there is no directional arrow/chevron icon anywhere in Stat's current rendering.","wrong":"\u003c%= rui_stat(\"Refunds\", \"7\", change: \"7 new\", change_direction: :down, change_color: :red) %\u003e  \u003c%# developer expects a down-arrow icon on the badge because they explicitly set change_direction: :down — none renders %\u003e","right":"\u003c%# If you need a visible directional indicator, add your own icon via change: text (e.g. \"↓ 7 new\") or the with_icon slot — change_direction: alone will not add one %\u003e\u003c%= rui_stat(\"Refunds\", \"7\", change: \"down 7 new\", change_color: :red) %\u003e","notes":"component.change_direction is a real, tested public method (test/components/stat/basic_test.rb asserts :up/:down/nil detection) — this is not a param that silently no-ops due to a typo, it genuinely computes the right value and then nothing consumes it visually. Do not assume a red/green badge implies direction was rendered as an icon; only change_color: affects what's visible.","detection":"Scan for rui_stat calls passing change_direction: explicitly, or relying on auto-detection, where the intent (per surrounding copy/design) is a visible arrow — the badge alone won't provide it.","recovery":"No param fixes this today. Either accept that only change_color: is visible, or build the directional icon into change: text yourself until Stat's template renders one."}],"families":[{"tree":"progress_display","question":"What kind of progress/metric display?","use_case":"Metric card with optional progress","notes":"Card-style metric display. Optional change badge, progress bar, icon slot, footer slot. Composes rui_text + rui_badge + rui_progress."}],"compositions":[{"name":"stat_card","description":"Metric label + large value + optional change badge/progress — used in dashboards","components":["rui_stat"]}],"relationships":{}}