SRS: UC_4.8.3 — The Desk Manager (SIM Overview)
| Field | Value |
|---|---|
| BA in Charge | Trang Nguyen |
| Date Created | 2026-08-10 |
| Version | v1 |
| Document References | RFQ_ Website and Dashboard Implementation V7.pdf (§Part C: Trader Dashboard Implementation, Key Features — The Desk Manager) · RFQ_ Stack Trading Prop Tech V7.pdf (§3.2 GEKKO_CHATTER event, §3.2.1 The Desk Manager — LLM Commentary Engine, §The Desk Manager Delivery, §3.1.14 CME_Instrument_Details, §Enforce Overnight Margin) ·docs/BA/UC_4.1-4.17/dashboard_sim/UC_4.8.3/QnA_init_docs.md (A-01..A-10) |
UC_4.8.3 — The Desk Manager
1. Overview
| Field | Content |
|---|---|
| ID | UC_4.8.3 |
| Use Case | The Desk Manager |
| Description | An optional, LLM-driven "Chatter" widget on the SIM Overview screen — a stateless commentary engine (Google Gemini 1.5 Flash 8B, "Gordon Gekko" persona) reacts to 14 trigger events with rate-limited (10/hour/user) commentary, rendered as stacked UI cards tagged "Discipline pass" or "Discipline fail". Delivered asynchronously over theGEKKO_CHATTER WebSocket channel — never blocks trade execution confirmation. |
| Zapier Flow | — |
| Zapier Table | — |
| 3rd Party | Google Gemini 1.5 Flash 8B (LLM commentary generation) |
References/Wireframe/Stage 2/Dashboard/Dashboard.png The Desk Manager panel, populated — exactly 2 commentary cards visible (Ref: BR_4.8.3.3).
References/Wireframe/Stage 2/Dashboard/Dashboard - Day 0.png The Desk Manager panel, empty state — "No data available" placeholder (Ref: BR_4.8.3.3).
References/Wireframe/Stage 2/Dashboard/Dashboard - Turn of AI chat.png The Desk Manager panel when the AI Chat feature is turned off — "Disabled in settings" placeholder (Ref: BR_4.8.3.3).
2. Trigger
A GEKKO_CHATTER WebSocket event arrives while the user is on the Overview screen (Ref: BR_4.8.3.1).
3. Pre-conditions
- User is on the Overview screen (Ref: UC_4.1.1 §1 Overview) with an active SIM account.
- The account is not locked (no Hard Breach/Frosted Glass) and the account's data has not been archived (Ref: BR_4.8.3.3).
4. Post-conditions
- The widget continues to render new commentary cards as
GEKKO_CHATTERevents arrive, for as long as the pre-conditions in Section 3 hold and the AI Chat feature is enabled.
5. Basic Flow
- Backend evaluates trader actions against 14 trigger events —
SESSION_START,LOSS_EVENT,PROMOTION,STOP_HIT,NEWS_HOLD,ORDER_CANCELLED,PAPER_HANDS,TRADE_CLOSED,STAGNATION,THE_WHALE,REVENGE_TRADE,THE_CLOCK_WATCHER,SCALP_HUNTER,COMMUNITY_LIVE(Ref: BR_4.8.3.1, BR_4.8.3.5). - [If the trader's Token Bucket has remaining quota] backend's async worker sends the Master Prompt Payload to the Gemini 1.5 Flash 8B API and, on response, pushes
{text, vibe, event_type}over theGEKKO_CHATTERWebSocket channel (Ref: BR_4.8.3.1, BR_4.8.3.2, BR_4.8.3.5). - [If the Token Bucket is exhausted] no commentary is generated or sent for this trigger — no UI feedback of any kind (Ref: BR_4.8.3.2).
- Frontend receives the
GEKKO_CHATTERpayload and renders a new stacked card, styled per thevibe→ style-group mapping (Ref: UC_4.8.3 §8 Screen Description, row 3). - The new card is added to the top of the stack; only the 2 most recent cards are visible in the viewport without scrolling — older cards remain in the stack and are reachable by scrolling (Ref: BR_4.8.3.3).
6. Exceptional Flow
- Token Bucket exhausted (rate limit hit): no commentary is generated for that trigger and no UI feedback of any kind is shown — no toast, no message, no placeholder card (Ref: BR_4.8.3.2).
- Account becomes locked, or its data is archived: the widget stops displaying/updating (Ref: BR_4.8.3.3).
- AI Chat feature turned off: the widget shows a
"Disabled in settings"placeholder instead of the card stack, and the existing commentary history is discarded — turning the feature back on restarts the widget from its empty state (Ref: BR_4.8.3.3). - No commentary generated yet (Day 0): the widget shows a
"No data available"placeholder (Ref: BR_4.8.3.3). - LLM response delayed or fails: the backend never blocks trade execution confirmation while waiting for the LLM response (Ref: BR_4.8.3.4); if the LLM call ultimately fails, no card is rendered for that trigger (no error card, no retry described in source).
7. Business Rules
BR_4.8.3.1: Engine, Event Filtering, and Delivery
The Desk Manager is a stateless LLM commentary engine (Google Gemini 1.5 Flash 8B API, async worker), triggered by 14 event types in SIM, each evaluated against a persona-driven Master Prompt Payload (Ref: BR_4.8.3.5) (Source: RFQ_ Stack Trading Prop Tech V7.pdf §3.2.1). The resulting commentary is delivered asynchronously over the GEKKO_CHATTER WebSocket channel — payload {text: string, vibe: string, event_type: string} (Source: RFQ_ Stack Trading Prop Tech V7.pdf §3.2).
Event set for SIM (Source: BA confirmation, 2026-08-10/2026-08-11, 2026-08-13, and 2026-08-14 correction, QnA_init_docs.md; RFQ_ Stack Trading Prop Tech V7.pdf §3.2.1 "Event Filtering"): SESSION_START, LOSS_EVENT, PROMOTION, STOP_HIT, NEWS_HOLD, ORDER_CANCELLED, PAPER_HANDS, TRADE_CLOSED, STAGNATION, THE_WHALE, REVENGE_TRADE, THE_CLOCK_WATCHER, SCALP_HUNTER, COMMUNITY_LIVE. DEFENSE_TRIGGERED and POD_DYNAMICS are excluded from this SIM UC — per BA confirmation (2026-08-13), both are LIVE-only events, not present in SIM.
BR_4.8.3.2: Rate Limiting — Token Bucket, 10/Hour/User, No UI on Exhaustion
A Token Bucket algorithm limits commentary generation to 10 critiques per hour per user. The window is a rolling 60-minute window (not a fixed clock hour) (Source: BA confirmation, 2026-08-21, QnA_init_docs.md A-06).
When the bucket is exhausted, no commentary is generated for that trigger and no UI feedback of any kind is shown (no toast, no message, no placeholder card) — the feature silently declines to comment (Source: BA confirmation, 2026-08-10, QnA_init_docs.md A-02).
BR_4.8.3.3: Widget Visibility and Empty/Disabled States
The Desk Manager widget continues to display and receive new commentary as long as (1) the trader's account is not locked (not in a Hard Breach/Frosted Glass state) and (2) the account's data has not been archived/lost (Ref: UC_4.9.2; References/QnA from clients/03_STAGE2_DASHBOARD_EVALUATION/QnA_STAGE2_DASHBOARD_EVALUATION.md STAGE2-020/STAGE2-022 — trade history archived at Failure + Discount_Code_Duration_Days) (Source: BA confirmation, 2026-08-10, QnA_init_docs.md A-05).
The card area itself has 2 distinct placeholder states, per wireframe (Section 1):
- No commentary generated yet (Day 0):
"No data available"placeholder. - AI Chat feature turned off (toggle owned by UC_4.6.4 — Controls (AI chat & Reduce motion), Ref: UC_4.6.4 BR_4.6.4.6): the widget keeps its header and replaces the card stack with the
"Disabled in settings"placeholder.
Commentary history is discarded when the feature is turned off. Every card in the stack is cleared at switch-off — the placeholder is not an overlay on top of a preserved stack. When the trader turns the feature back on, the widget returns to the "No data available" empty state above and repopulates from scratch as new GEKKO_CHATTER events arrive; the discarded cards cannot be restored (Source: BA instruction, 2026-08-12 — Ref: UC_4.6.4 BR_4.6.4.6).
BR_4.8.3.4: Non-Blocking Delivery
The backend must never wait for the LLM response before confirming a trade execution — commentary delivery is fully decoupled and asynchronous from the trade execution path (Source: RFQ_ Stack Trading Prop Tech V7.pdf, "The Desk Manager Delivery").
BR_4.8.3.5: Per-Event Trigger and Prompt Mapping
The Master Prompt Payload sent to Gemini combines a fixed System Instruction with 18 numbered logic constraints (Source: RFQ_ Stack Trading Prop Tech V7.pdf §3.2.1, "Implementation Specification: The Master Prompt Payload"), extended by 5 additional constraints (19-23) covering the events the RFQ left unmapped — 19-22 supplied 2026-08-14, and 23 (STAGNATION) supplied 2026-08-15 (Source: Client-provided update, 2026-08-14 and 2026-08-15). This rule maps only the constraints tied to one specific event_type, scoped to the 14-event SIM set defined in BR_4.8.3.1 — constraint 4 (DEFENSE_TRIGGERED) and constraint 8 (POD_DYNAMICS) are LIVE-only and excluded from this table (Source: BA confirmation, 2026-08-13). For the System Instruction's context role and the constraints that apply regardless of event_type, see BR_4.8.3.6.
| Event | Trigger | Content / Prompt Rule | Note |
|---|---|---|---|
SESSION_START | First dashboard login of the day (UTC 00:00 reset). | 19:"If event_type is SESSION_START, demand focus for the new day. Tell them money never sleeps and not to waste your bandwidth today." | — |
LOSS_EVENT | A single loss exceeding 1% of virtual equity, or a third consecutive losing trade in a session. | 20:"If event_type is LOSS_EVENT, give a biting critique about them donating your liquidity to the smart money." | — |
PROMOTION | Profit target reached or Level promotion. | 21:"If event_type is PROMOTION, give a backhanded compliment. Acknowledge they survived, but tell them not to get cocky because the real sharks are waiting at the next level." | — |
STOP_HIT | When a Daily Stop or absolute Level Stop is reached (Trader is "Fired"). | 3:"If event_type is STOP_HIT, be the Executioner. Tell them to get off your floor." | — |
NEWS_HOLD | Holding a position during a High-Impact News event (Red Folder), regardless of whether a rule breach occurred. | 2:"If event_type is NEWS_HOLD, ask why they are gambling with your liquidity during red folders." | — |
ORDER_CANCELLED | A streak of 5+ cancelled orders within a 10-minute window (The Hesitation Check). | 22:"If event_type is ORDER_CANCELLED, mock their 'paralysis by analysis.' Tell them scared money doesn't make money and to either pull the trigger or step away from the terminal." | Counter reset rule (client verbatim, 2026-08-15): Fires once when the 5th cancellation is recorded within the current 10-minute rolling window; the counter then resets. A new cycle needs 5 fresh cancellations within a new 10-minute rolling window to fire again — cancellations 6+ recorded before the reset do not fire additional events. |
PAPER_HANDS | Closing a winning trade where less than 10% of the level's Profit Target was realized (Lack of conviction). | 5:"If event_type is PAPER_HANDS, mock their lack of conviction and 'poverty mindset.'" | — |
TRADE_CLOSED | Fired upon a standard trade closure when the position does not trigger any of the specialized behavioral filters (such asPAPER_HANDS, REVENGE_TRADE, THE_WHALE, or SCALP_HUNTER). | Driven directly by 9:"P&L: For wins, provide backhanded, cynical compliments. For losses, be biting but brief." | — |
STAGNATION | 72 hours of zero trading activity during an active Associate Track challenge. | 23:"If event_type is STAGNATION, mock their fear of the market. Tell them time is money, and if they are going to freeze up for three days, they need to return your capital to someone who actually has the nerve to trade." | — |
THE_WHALE | Opening a position size that utilizes more than 80% of the allowed margin for the current account level. | 6:"If event_type is THE_WHALE, mock their arrogance for over-leveraging your capital." | Trigger formula (client verbatim, 2026-08-15): Futures — Contract_Count > 0.8 × Max_Contracts (Table B, per level). Forex — Notional > 0.8 × Max_Forex_Notional (Table A, per level). Lookup level by environment: SIM = track purchased (fixed at purchase), not necessarily live current_level: Associate Track → Level 1, Accelerated Track → Level 2, Advanced Track → Level 5. LIVE = current_level (follows promotions) (Source: BA confirmation, 2026-08-21, QnA_init_docs.md A-09; cross-ref UC_4.12.3). |
REVENGE_TRADE | Immediate re-entry (within 60s) following a loss, specifically if the position size is increased. | 7:"If event_type is REVENGE_TRADE, call out their emotional instability and gambling." | — |
THE_CLOCK_WATCHER | Closing a trade within 60 seconds of the market close or overnight session break. | 12:"If event_type is THE_CLOCK_WATCHER, mock them for being terrified of the overnight session." | Anchor source (client verbatim, 2026-08-15): Futures — Node.js middleware reads Official_Close_UTC and Halt_Start_UTC from CME_Instrument_Details per asset category; the 60s window anchors to whichever timestamp is approaching next. Forex — anchors to the 16:00 CT institutional rollover (DST-aware per UC_4.2.1 BR_4.2.1.1 — 5:00 PM ET, shifts 21:00/22:00 UTC — not a hardcoded UTC offset). Reuses existing per-asset-class timekeeper infrastructure; no new time source introduced. |
SCALP_HUNTER | Executing 10+ round turns within a 5-minute window (Over-trading check). | 13:"If event_type is SCALP_HUNTER, ask if they're trying to set a record for commissions or actually trade." | Counter reset rule (BA confirmation, 2026-08-15 — same reset principle as ORDER_CANCELLED, applied to this event's own threshold/window): Fires once when the 10th round turn is recorded within the current 5-minute rolling window; the counter then resets. A new cycle needs 10 fresh round turns within a new rolling window to fire again — round turns 11+ recorded before the reset do not fire additional events. |
COMMUNITY_LIVE | Triggered globally via webhook when the official Stack Trading YouTube stream goes live. | 17:"If event_type is COMMUNITY_LIVE, cynically order them to navigate to the Community Page to watch the live stream so they can finally learn how to trade properly." | — |
BR_4.8.3.6: Master Prompt Context Specification
AI context role (System Instruction, verbatim):
"You are Gordon Gekko, a ruthless, cynical 1980s Wall Street raider. You are analyzing the trades of a junior trader using YOUR capital. Incompetence is a personal insult. Remind the trader this is real capital and a professional firm, not a casino video game. Critique the move in under 30 words using 80s jargon like pal, rookie, or liquidated. [...] Return ONLY the raw string of the commentary."
(Source: RFQ_ Stack Trading Prop Tech V7.pdf §3.2.1, "Implementation Specification: The Master Prompt Payload" — "System Instruction:" block)
This defines the AI's context role in full: persona (Gordon Gekko, a 1980s Wall Street raider), stance toward the trader (owner of the capital being risked, treating incompetence as a personal insult), tone (80s Wall Street jargon — "pal", "rookie", "liquidated"), output constraint (critique under 30 words), and output format (return only the raw commentary string — no JSON wrapper, no explanation). The [...] marks where the source interleaves the numbered logic constraints inside the same System Instruction block — the original RFQ source defines 18 (Source: RFQ_ Stack Trading Prop Tech V7.pdf §3.2.1), extended by 4 more (19-22) supplied by the client on 2026-08-14 to cover the previously-unmapped SESSION_START, LOSS_EVENT, PROMOTION, and ORDER_CANCELLED events (Source: Client-provided update, 2026-08-14). This System Instruction excludes any instruction tied to a specific event_type — those are already mapped per-event in the table in BR_4.8.3.5. The constraints below sit alongside the System Instruction and apply on top of it regardless of event_type:
- 1 — Respect Scale: "Levels 1-5 get maximum disdain. Respect increases from Level 6 (W2) up to Level 24 (peer respect)."
- 9 — P&L tone: "For wins, provide backhanded, cynical compliments. For losses, be biting but brief." (the primary driver for
TRADE_CLOSED, see BR_4.8.3.5) - 10 — Discipline priority: "If pulse_score < 50, prioritize attacking their lack of discipline (averaging down) over P&L."
- 11 — Variability: uses
variability_seed+ Temperature 0.9 so no two responses are identical. - 14 — Repeat losses: "If consecutive_losses > 3, mock their inability to walk away and tell them they are funding your yacht."
- 15 — Hold time: "If hold_time_seconds < 15 on a loss, mock their panic and weak execution. If hold_time_seconds > 3600 on a loss, mock them for 'marrying' a bad position."
- 16 — Stop proximity: "If distance_to_daily_stop_pct < 10%, adopt the 'Executioner' vibe. Warn them that you have your finger on the liquidation button."
- 18 — Asset class: "If asset_class is FOREX, cynically refer to them as a retail pip-chaser or currency tourist. If FUTURES, mock them for getting crushed by the real institutional order book."
JSON context structure (data fed alongside the System Instruction on every call):
(Source: RFQ_ Stack Trading Prop Tech V7.pdf §3.2.1, "Implementation Specification: The Master Prompt Payload" — "JSON Context Structure:" block)
{
"user_context": {
"first_name": "string",
"current_level": "integer (0-24)",
"pod_role": "ENUM [LEADER, MEMBER, NONE]",
"asset_class": "ENUM [FUTURES, FOREX]",
"days_remaining": "integer"
},
"trade_context": {
"event_type": "ENUM [TRADE_CLOSED, NEWS_HOLD, ORDER_CANCELLED, SESSION_START, DEFENSE_TRIGGERED, STOP_HIT, PAPER_HANDS, STAGNATION, THE_WHALE, REVENGE_TRADE, THE_CLOCK_WATCHER, SCALP_HUNTER, COMMUNITY_LIVE]",
"symbol": "string",
"side": "ENUM [LONG, SHORT, NONE]",
"pnl": "float",
"hold_time_seconds": "integer",
"consecutive_losses": "integer"
},
"risk_state": {
"pulse_score": "integer (0-100)",
"distance_to_daily_stop_pct": "float",
"distance_to_max_drawdown_pct": "float"
},
"widget_metrics": {
"sharpe_ratio": "float",
"win_rate": "float"
},
"system": {
"variability_seed": "random_64bit_int"
}
}pod_role is dynamically evaluated by the Middleware Hub at runtime, not stored directly on the user record: if pod_leader_id is populated on the user's record → MEMBER; if the user's own ID exists in the Pod_Leader_Registry → LEADER; otherwise → NONE (Source: RFQ_ Stack Trading Prop Tech V7.pdf §3.2.1, note following the JSON Context Structure).
8. Screen Description
| No. | Field Name | Field Type | Displaying rule / Behaviour rule |
|---|---|---|---|
| 1 | Commentary card stack | Label | Displaying rule:- Stacked cards, 2 visible without scrolling; older cards reachable by scroll. Empty state: "No data available". Disabled state: "Disabled in settings". Overflow: Wrap text for card body. Ref: BR_4.8.3.3.Behaviour rule:- Read-only. New cards prepend to the stack as GEKKO_CHATTER events arrive. Widget stops updating when the visibility condition in BR_4.8.3.3 is no longer met. |
| 2 | Card text | Label | Displaying rule:- LLM-generated commentary text (text field), per-event trigger/prompt mapping in BR_4.8.3.5. Overflow: Wrap text. Ref: BR_4.8.3.1. |
| 3 | Card style tag | Badge | Displaying rule:- One of 2 possible values: "Discipline pass" / "Discipline fail", derived from the vibe field — vibe carries no fixed enum, it maps to exactly one of these 2 style groups rather than matching each event_type individually (Source: BA confirmation, 2026-08-10, QnA_init_docs.md A-03). |