{
  "version": "2.1",
  "source_of_truth": "behavioral_intelligence.PITFALL_DEFS / GOOD_BEHAVIOR_DEFS",
  "pitfall_count": 21,
  "good_behavior_count": 20,
  "total_patterns": 41,
  "pitfalls": [
    {
      "id": 1,
      "key": "no_stop_loss",
      "label": "No Stop Loss",
      "type": "pitfall",
      "bucket": "tis",
      "severity": "critical",
      "weight": -6,
      "detection_layers": [
        "post_trade_single",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "Post-trade: stop_loss <= 0 on the closed trade. Pre-trade: incoming ticket has stop_loss <= 0 with entry_price > 0.",
      "thresholds": {
        "post": "stop_loss <= 0",
        "pre_trade_risk_score": 0.85
      },
      "window": "single trade",
      "exclusions": "",
      "communication": "Critical 'No Stop Loss' signal card with detail; lowers the TIS bucket.",
      "proactive_action": "Pre-trade signature fires at risk score 0.85 (Cool Down tier) demanding a defined stop before entry.",
      "prevention_mapping": "no_stop_loss (0.85)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 2,
      "key": "sl_moved_against",
      "label": "Moved SL Against Trade",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "high",
      "weight": -8,
      "detection_layers": [
        "post_trade_single",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "Post-trade: sl_move_direction == 'widened' (final stop farther from entry than the original stop). Pre-trade: sl_reconciliations shows >= 3 widenings in 30 days or >= 2 in 7 days.",
      "thresholds": {
        "pre_trade_risk_score": "0.60; 0.78 at >=3/7d or >=5/30d; 0.88 at >=4/7d or >=7/30d"
      },
      "window": "single trade (post); 7/30-day widening log (pre)",
      "exclusions": "",
      "communication": "'Moved SL Against Trade' emotion signal showing original -> new stop.",
      "proactive_action": "Stop-Loss Widening Pattern coaching card; escalates with repetition.",
      "prevention_mapping": "sl_widening_pattern (0.60-0.88)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 3,
      "key": "no_position_sizing",
      "label": "No Position Sizing",
      "type": "pitfall",
      "bucket": "tis",
      "severity": "high",
      "weight": -5,
      "detection_layers": [
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "Pre-trade: quantity <= 0 while entry_price > 0 \u2014 no explicit sizing decision recorded on the ticket.",
      "thresholds": {
        "pre_trade_risk_score": 0.7
      },
      "window": "incoming ticket",
      "exclusions": "",
      "communication": "Pre-trade coaching card: Size = (Account risk %) / (Distance to stop-loss).",
      "proactive_action": "Coach-tier card before submit.",
      "prevention_mapping": "no_position_sizing (0.70)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "PREVENTION_ONLY",
      "status_note": "Detected pre-trade by the Prevention Engine. The post-trade score weight is reserved: it applies only if a post-trade signal is emitted, which does not occur automatically today."
    },
    {
      "id": 4,
      "key": "over_concentration",
      "label": "Over-Concentration",
      "type": "pitfall",
      "bucket": "tis",
      "severity": "medium",
      "weight": -4,
      "detection_layers": [
        "pre_trade_prevention"
      ],
      "detection_rule_type": "CONFIGURATION_THRESHOLD",
      "detection_rule": "Pre-trade: projected single-ticker share of total open exposure >= 0.35 after this entry.",
      "thresholds": {
        "concentration_cap": 0.35,
        "pre_trade_risk_score": "0.55 + min(0.30, share - 0.35)"
      },
      "window": "current open positions + incoming ticket",
      "exclusions": "",
      "communication": "Pre-trade card naming the ticker and its projected share of the book.",
      "proactive_action": "Coach tier at 35%, escalating as concentration rises.",
      "prevention_mapping": "over_concentration (0.55-0.85)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "PREVENTION_ONLY",
      "status_note": "Detected pre-trade by the Prevention Engine. Post-trade score weight reserved (see #3)."
    },
    {
      "id": 5,
      "key": "overleveraging",
      "label": "Overleveraging",
      "type": "pitfall",
      "bucket": "tis",
      "severity": "high",
      "weight": -6,
      "detection_layers": [
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DERIVED_CALCULATION",
      "detection_rule": "Pre-trade: position value >= 2.0x the user's own 90th-percentile position value from the last 30 closed trades (requires >= 10 sized trades).",
      "thresholds": {
        "p90_multiple": 2.0,
        "min_history": 10,
        "pre_trade_risk_score": "0.65 + min(0.20, (ratio-2.0)x0.10), cap 0.90"
      },
      "window": "last 30 closed trades",
      "exclusions": "",
      "communication": "'Overleveraged Entry' card citing the multiple of your own P90 size.",
      "proactive_action": "Coach -> Cool Down as the multiple grows.",
      "prevention_mapping": "overleveraging (0.65-0.90)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "PREVENTION_ONLY",
      "status_note": "Detected pre-trade by the Prevention Engine. Post-trade score weight reserved (see #3)."
    },
    {
      "id": 6,
      "key": "averaging_down",
      "label": "Averaging Down into Losers",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "high",
      "weight": -10,
      "detection_layers": [
        "post_trade_pattern",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "Post-trade: a new trade in a symbol while an existing open position in that symbol has profit_loss < 0. Pre-trade: an open same-direction lot exists and the new entry price is worse (long: lower; short: higher).",
      "thresholds": {
        "pre_trade_risk_score": 0.88
      },
      "window": "current open positions",
      "exclusions": "",
      "communication": "'Averaging Down' emotion signal naming the losing symbol.",
      "proactive_action": "Fires at 0.88 (Cool Down tier) before the add is placed.",
      "prevention_mapping": "averaging_down (0.88)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 7,
      "key": "no_daily_loss_cap",
      "label": "No Daily Loss Cap",
      "type": "pitfall",
      "bucket": "profile",
      "severity": "medium",
      "weight": -5,
      "detection_layers": [
        "post_trade_pattern",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "CONFIGURATION_THRESHOLD",
      "detection_rule": "Post-trade: >= 3 losing closes in one UTC calendar day. Pre-trade: no daily_loss_cap configured in prevention preferences.",
      "thresholds": {
        "daily_losing_closes": 3,
        "pre_trade_risk_score": 0.4
      },
      "window": "current UTC day",
      "exclusions": "",
      "communication": "'No Daily Loss Cap' profile card suggesting a stop for the day / cap setup.",
      "proactive_action": "Aware-tier nudge to configure a cap; a breached cap hard-locks Trade Builder (Blocked, policy).",
      "prevention_mapping": "no_daily_loss_cap (0.40); daily-cap breach -> Blocked (policy)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 8,
      "key": "cutting_winners_short",
      "label": "Cutting Winners Short",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "medium",
      "weight": -5,
      "detection_layers": [
        "post_trade_single",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DERIVED_CALCULATION",
      "detection_rule": "Post-trade: pnl > 0, exit classified manual_profit, and captured move < 0.6x the entry->TP1 distance. Pre-trade pattern-repeat: >= 3 winners exited before TP1 in the last 30 closed trades.",
      "thresholds": {
        "tp1_capture_floor": 0.6,
        "repeat_min": 3,
        "pre_trade_risk_score": "ramp 0.35-0.70"
      },
      "window": "single trade (post); last 30 closed (pre)",
      "exclusions": "",
      "communication": "Card showing the % of TP1 distance captured.",
      "proactive_action": "Pattern-repeat warning (Aware at 3, Coach at 5+ recurrences).",
      "prevention_mapping": "cutting_winners_short (0.35-0.70)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 9,
      "key": "letting_losers_run",
      "label": "Letting Losers Run",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "high",
      "weight": -8,
      "detection_layers": [
        "post_trade_single",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DERIVED_CALCULATION",
      "detection_rule": "Post-trade: exit classified held_past_sl (realized loss > 1.2x planned stop distance). Pre-trade pattern-repeat: >= 3 recent losses exceeded the planned stop by >= 30%.",
      "thresholds": {
        "post_overrun": 1.2,
        "pre_overrun": 1.3,
        "repeat_min": 3
      },
      "window": "single trade (post); last 30 closed (pre)",
      "exclusions": "",
      "communication": "'Letting Losers Run' emotion card.",
      "proactive_action": "Pattern-repeat warning ramp 0.35-0.70.",
      "prevention_mapping": "letting_losers_run (0.35-0.70)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 10,
      "key": "ignoring_trailing_stop",
      "label": "Ignoring Trailing Stops",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "medium",
      "weight": -5,
      "detection_layers": [
        "post_trade_single",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "Post-trade (long positions): high_water_mark >= TP1 but exit < 0.95x TP1 \u2014 a reached target was given back. Pre-trade pattern-repeat: >= 3 trades hit TP1 without a trailing stop engaged.",
      "thresholds": {
        "giveback_floor": 0.95,
        "repeat_min": 3
      },
      "window": "single trade (post); last 30 closed (pre)",
      "exclusions": "Post-trade check requires a recorded high-water mark and is currently implemented for long-direction trades.",
      "communication": "Card citing high-water vs exit prices.",
      "proactive_action": "Suggests engaging the adaptive trailing stop; pattern-repeat ramp.",
      "prevention_mapping": "ignoring_trailing_stop (0.35-0.70)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 11,
      "key": "random_exit",
      "label": "Random/Emotional Exit",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "medium",
      "weight": -6,
      "detection_layers": [
        "post_trade_single",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "Post-trade: manual exit with both SL and TP1 set, matching neither planned level. Pre-trade pattern-repeat: >= 3 exits landed neither within 5% of stop/target nor within 2% of entry, with no plan-based exit reason.",
      "thresholds": {
        "level_tolerance": 0.05,
        "breakeven_tolerance": 0.02,
        "repeat_min": 3
      },
      "window": "single trade (post); last 30 closed (pre)",
      "exclusions": "",
      "communication": "'Random/Emotional Exit' card noting the exit matched no plan level.",
      "proactive_action": "Prompt to pre-commit exit levels; pattern-repeat ramp.",
      "prevention_mapping": "random_exit (0.35-0.70)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 12,
      "key": "breakeven_obsession",
      "label": "Break-Even Obsession",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "low",
      "weight": -3,
      "detection_layers": [
        "post_trade_single",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "CONFIGURATION_THRESHOLD",
      "detection_rule": "Post-trade: breakeven exit after holding > 48 hours. Pre-trade pattern-repeat: >= 3 recent trades closed within 2% of entry with |pnl| < 2% of entry.",
      "thresholds": {
        "hold_hours": 48,
        "entry_drift": 0.02,
        "repeat_min": 3
      },
      "window": "single trade (post); last 30 closed (pre)",
      "exclusions": "",
      "communication": "Card with the hold time / scratch count.",
      "proactive_action": "Aware-tier nudge about opportunity cost; pattern-repeat ramp.",
      "prevention_mapping": "breakeven_obsession (0.35-0.70)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 15,
      "key": "ignoring_decision_support",
      "label": "Ignoring Decision Support",
      "type": "pitfall",
      "bucket": "tis",
      "severity": "medium",
      "weight": -4,
      "detection_layers": [
        "post_trade_single",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "CONFIGURATION_THRESHOLD",
      "detection_rule": "Post-trade: trade taken with Decision Score < 45. Pre-trade: incoming ticket has Decision Score < 60.",
      "thresholds": {
        "post_score": 45,
        "pre_score": 60,
        "pre_trade_risk_score": "0.55 + min(0.25, (60-score)x0.01)"
      },
      "window": "single trade",
      "exclusions": "",
      "communication": "Card showing the low score and the weak factors.",
      "proactive_action": "Coach card before submit; asks for a written override thesis.",
      "prevention_mapping": "ignoring_decision_support (0.55-0.80)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 17,
      "key": "trading_outside_horizon",
      "label": "Trading Outside Horizon",
      "type": "pitfall",
      "bucket": "profile",
      "severity": "medium",
      "weight": -4,
      "detection_layers": [
        "post_trade_single",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "CONFIGURATION_THRESHOLD",
      "detection_rule": "Post-trade: day-horizon trade held > 8h, or swing-horizon trade closed < 2h. Pre-trade: declared ticket horizon differs from the profile's preferred horizon.",
      "thresholds": {
        "day_max_hours": 8,
        "swing_min_hours": 2,
        "pre_trade_risk_score": 0.55
      },
      "window": "single trade",
      "exclusions": "",
      "communication": "Card comparing hold time to declared horizon.",
      "proactive_action": "Coach-tier style-drift nudge.",
      "prevention_mapping": "trading_outside_horizon (0.55)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 18,
      "key": "revenge_trading",
      "label": "Revenge Trading",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "critical",
      "weight": -12,
      "detection_layers": [
        "post_trade_pattern",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "Post-trade: new trade opened 0 < gap < 15 minutes after closing a losing trade. Pre-trade: last close was a loss < 30 minutes ago -> base 0.55; +0.20 if entry >= 1.25x median size; +0.15 if same ticker; capped 0.95; personal-sequence uplift may apply.",
      "thresholds": {
        "post_window_min": 15,
        "pre_window_min": 30,
        "oversize_multiple": 1.25,
        "pre_trade_risk_score": "0.55-0.95"
      },
      "window": "rolling 30-day / 100-trade history (post); last 30 closed (pre)",
      "exclusions": "",
      "communication": "Critical 'Revenge Trading' signal \u2014 the heaviest penalty (-12); explicit warning in the Emotion Score panel.",
      "proactive_action": "Coach at 0.55; Cool Down at 0.75+; Justify at 0.90 (e.g. fresh loss + oversized + same ticker = 0.55+0.20+0.15 = 0.90).",
      "prevention_mapping": "revenge_trading (0.55-0.95)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 19,
      "key": "overtrading",
      "label": "Overtrading",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "high",
      "weight": -8,
      "detection_layers": [
        "post_trade_pattern",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "Post-trade: trades today > limit (5 for day horizon, else 3). Pre-trade: >= 5 trades opened today -> 0.60 + 0.05 per extra trade (max +0.25), +0.15 if today's win rate < 40%, capped 0.92.",
      "thresholds": {
        "day_limit": 5,
        "other_limit": 3,
        "pre_min_today": 5,
        "pre_trade_risk_score": "0.60-0.92"
      },
      "window": "current UTC day (broker-imported rows without an entry date excluded)",
      "exclusions": "",
      "communication": "'Overtrading' card showing today's count vs your limit.",
      "proactive_action": "Coach at 5 trades, escalating toward Justify with count and losing session.",
      "prevention_mapping": "overtrading (0.60-0.92)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 20,
      "key": "overconfidence_sizing",
      "label": "Overconfidence After Wins",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "high",
      "weight": -8,
      "detection_layers": [
        "post_trade_pattern",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "Post-trade: last 3 closed trades are all wins AND new position value > 1.5x the average of those 3. Pre-trade: 3 consecutive recent wins AND entry >= 1.5x median recent size -> 0.72.",
      "thresholds": {
        "win_streak": 3,
        "size_multiple": 1.5,
        "pre_trade_risk_score": 0.72
      },
      "window": "last 3-4 closed trades",
      "exclusions": "",
      "communication": "Card quantifying the size multiple vs your average.",
      "proactive_action": "Coach-tier streak-aware sizing nudge at 0.72.",
      "prevention_mapping": "overconfidence_sizing (0.72)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 21,
      "key": "fear_paralysis",
      "label": "Fear Paralysis",
      "type": "pitfall",
      "bucket": "emotion",
      "severity": "medium",
      "weight": -5,
      "detection_layers": [
        "post_trade_pattern",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "Post-trade: 3 consecutive losses followed by >= 5 days with no trades. Pre-trade: last 2 closes were losses and the gap since the last close is >= 5 days -> 0.40.",
      "thresholds": {
        "post_loss_streak": 3,
        "pre_loss_streak": 2,
        "gap_days": 5,
        "pre_trade_risk_score": 0.4
      },
      "window": "recent closed trades + calendar gap",
      "exclusions": "",
      "communication": "Card acknowledging the pause after a losing streak.",
      "proactive_action": "Aware-tier supportive re-entry coaching (half-size plan).",
      "prevention_mapping": "fear_paralysis (0.40)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 28,
      "key": "strategy_hopping",
      "label": "Strategy Hopping",
      "type": "pitfall",
      "bucket": "profile",
      "severity": "medium",
      "weight": -4,
      "detection_layers": [
        "post_trade_pattern",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "Post-trade: >= 4 distinct strategies across the last 10 trades. Pre-trade: >= 4 distinct strategies across the last 30 closed trades (including the proposed one) -> 0.55.",
      "thresholds": {
        "distinct_strategies": 4,
        "post_window_trades": 10,
        "pre_trade_risk_score": 0.55
      },
      "window": "last 10 trades (post); last 30 closed (pre)",
      "exclusions": "",
      "communication": "Card counting the distinct strategies used.",
      "proactive_action": "Coach-tier 30-day strategy-commitment nudge.",
      "prevention_mapping": "strategy_hopping (0.55)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 29,
      "key": "no_trade_journal",
      "label": "No Trade Journal",
      "type": "pitfall",
      "bucket": "profile",
      "severity": "low",
      "weight": -3,
      "detection_layers": [
        "post_trade_pattern",
        "pre_trade_prevention"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "Post-trade: 0 journal notes/lessons across the last >= 10 closed trades (window of 20). Pre-trade pattern-repeat: >= 3 recent closed trades without a journal entry.",
      "thresholds": {
        "post_min_closed": 10,
        "repeat_min": 3
      },
      "window": "last 20 closed (post); last 30 closed (pre)",
      "exclusions": "",
      "communication": "Card prompting a quick post-trade note.",
      "proactive_action": "Aware-tier journaling prompt (ramp 0.35-0.70).",
      "prevention_mapping": "no_trade_journal (0.35-0.70)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes. Pre-trade events are logged with proceeded/reconsidered outcomes (pre_trade_events), closing the coaching loop.",
      "implementation_status": "IMPLEMENTED",
      "status_note": ""
    },
    {
      "id": 30,
      "key": "ignoring_backtested_rules",
      "label": "Ignoring Backtested Rules",
      "type": "pitfall",
      "bucket": "tis",
      "severity": "medium",
      "weight": -4,
      "detection_layers": [
        "pre_trade_prevention"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "Pre-trade: the proposed strategy was used >= 3 times in the last 30 closed trades with 0 backtests of that strategy in the last 90 days -> 0.40.",
      "thresholds": {
        "recent_uses": 3,
        "backtest_lookback_days": 90,
        "pre_trade_risk_score": 0.4
      },
      "window": "last 30 closed trades + 90-day backtest log",
      "exclusions": "",
      "communication": "'Trading Un-Backtested Rules' card.",
      "proactive_action": "Aware-tier nudge to run a >= 20-sample backtest first.",
      "prevention_mapping": "ignoring_backtested_rules (0.40)",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "PREVENTION_ONLY",
      "status_note": "Detected pre-trade by the Prevention Engine. Post-trade score weight reserved (see #3)."
    }
  ],
  "good_behaviors": [
    {
      "id": "D1",
      "key": "consistent_sl_usage",
      "label": "Consistent Stop Loss Usage",
      "type": "good_behavior",
      "bucket": "tis",
      "severity": "positive",
      "weight": 2,
      "detection_layers": [
        "post_trade_single"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "stop_loss > 0 was set on the trade.",
      "thresholds": {},
      "communication": "Green 'Consistent Stop Loss Usage' signal; lifts the TIS bucket.",
      "proactive_action": "Trade Builder keeps pre-filling a stop by default.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D2",
      "key": "proper_position_sizing",
      "label": "Proper Position Sizing",
      "type": "good_behavior",
      "bucket": "tis",
      "severity": "positive",
      "weight": 3,
      "detection_layers": [],
      "detection_rule_type": "NOT_IMPLEMENTED",
      "detection_rule": "Registry-defined. No automated detector currently emits this signal; the weight applies only when a signal is emitted, which does not occur automatically today.",
      "thresholds": {},
      "communication": "\u2014",
      "proactive_action": "\u2014",
      "ml_pathway": "\u2014",
      "implementation_status": "REGISTRY_ONLY"
    },
    {
      "id": "D3",
      "key": "diversified_portfolio",
      "label": "Diversified Portfolio",
      "type": "good_behavior",
      "bucket": "tis",
      "severity": "positive",
      "weight": 3,
      "detection_layers": [],
      "detection_rule_type": "NOT_IMPLEMENTED",
      "detection_rule": "Registry-defined. No automated detector currently emits this signal; the weight applies only when a signal is emitted, which does not occur automatically today.",
      "thresholds": {},
      "communication": "\u2014",
      "proactive_action": "\u2014",
      "ml_pathway": "\u2014",
      "implementation_status": "REGISTRY_ONLY"
    },
    {
      "id": "D4",
      "key": "following_tp1",
      "label": "Following TP1 Exits",
      "type": "good_behavior",
      "bucket": "tis",
      "severity": "positive",
      "weight": 4,
      "detection_layers": [
        "post_trade_single"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "exit_vs_plan == 'hit_tp1' (exit within 5% of Target 1).",
      "thresholds": {},
      "communication": "Green 'Following TP1 Exits' card.",
      "proactive_action": "Rule-based first-target exits reinforced on future tickets.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D5",
      "key": "trailing_stop_discipline",
      "label": "Trailing Stop Discipline",
      "type": "good_behavior",
      "bucket": "emotion",
      "severity": "positive",
      "weight": 5,
      "detection_layers": [
        "post_trade_single"
      ],
      "detection_rule_type": "DERIVED_CALCULATION",
      "detection_rule": "exit_vs_plan == 'trailing_stop' (profitable exit capturing > 0.8x of the TP1 move beyond planned levels).",
      "thresholds": {},
      "communication": "Green 'Trailing Stop Discipline' card.",
      "proactive_action": "Adaptive trailing offered proactively on trending setups.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D6",
      "key": "letting_winners_run",
      "label": "Letting Winners Run to TP2",
      "type": "good_behavior",
      "bucket": "emotion",
      "severity": "positive",
      "weight": 7,
      "detection_layers": [
        "post_trade_single"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "exit_vs_plan == 'hit_tp2' (exit within 5% of Target 2).",
      "thresholds": {},
      "communication": "Green 'Letting Winners Run' card; Emotion Score rises (+7).",
      "proactive_action": "Winner-extension guidance surfaced before similar setups.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D7",
      "key": "cutting_losses_quickly",
      "label": "Cutting Losses Quickly",
      "type": "good_behavior",
      "bucket": "emotion",
      "severity": "positive",
      "weight": 6,
      "detection_layers": [
        "post_trade_single"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "exit_vs_plan == 'hit_sl' with pnl < 0 (the stop was honored).",
      "thresholds": {},
      "communication": "Green 'Cutting Losses Quickly' card.",
      "proactive_action": "Honoring stops reinforced; discourages holding past invalidation.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D8",
      "key": "respecting_decision",
      "label": "Respecting Decision Support",
      "type": "good_behavior",
      "bucket": "tis",
      "severity": "positive",
      "weight": 3,
      "detection_layers": [
        "post_trade_single"
      ],
      "detection_rule_type": "CONFIGURATION_THRESHOLD",
      "detection_rule": "Trade taken with Decision Score >= 55.",
      "thresholds": {
        "decision_score": 55
      },
      "communication": "Green card with the score.",
      "proactive_action": "High-score setups surfaced first in Market Intelligence.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D9",
      "key": "trading_within_horizon",
      "label": "Trading Within Horizon",
      "type": "good_behavior",
      "bucket": "profile",
      "severity": "positive",
      "weight": 4,
      "detection_layers": [
        "post_trade_single"
      ],
      "detection_rule_type": "CONFIGURATION_THRESHOLD",
      "detection_rule": "Hold time matches declared horizon (day <= 8h; swing 2h-720h).",
      "thresholds": {
        "day_max_hours": 8,
        "swing_range_hours": "2-720"
      },
      "communication": "Green 'Trading Within Horizon' card.",
      "proactive_action": "Timeframe suggestions aligned to your stated style.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D10",
      "key": "consistent_strategy",
      "label": "Consistent Strategy",
      "type": "good_behavior",
      "bucket": "profile",
      "severity": "positive",
      "weight": 4,
      "detection_layers": [
        "post_trade_pattern"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "<= 3 distinct strategies across the last 10 trades (with >= 5 trades).",
      "thresholds": {
        "max_strategies": 3,
        "min_trades": 5
      },
      "communication": "Green 'Consistent Strategy' card.",
      "proactive_action": "Sticking with a tested edge reinforced across variance.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D11",
      "key": "post_trade_review",
      "label": "Post-Trade Review",
      "type": "good_behavior",
      "bucket": "profile",
      "severity": "positive",
      "weight": 3,
      "detection_layers": [
        "post_trade_single"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "Journal notes or a 'biggest lesson' recorded on the trade.",
      "thresholds": {},
      "communication": "Green 'Post-Trade Review' card.",
      "proactive_action": "Post-close prompt to capture one lesson.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D12",
      "key": "controlled_recovery",
      "label": "Recovery After Loss Streak",
      "type": "good_behavior",
      "bucket": "emotion",
      "severity": "positive",
      "weight": 8,
      "detection_layers": [
        "post_trade_pattern"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "After 3 consecutive losses, the next position value <= 1.1x the average of those losses' sizes (no size revenge).",
      "thresholds": {
        "loss_streak": 3,
        "size_cap_multiple": 1.1
      },
      "communication": "Green 'Recovery After Loss Streak' card \u2014 highest positive weight (+8).",
      "proactive_action": "Supportive re-entry with controlled size after drawdowns.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D13",
      "key": "controlled_frequency",
      "label": "Controlled Trade Frequency",
      "type": "good_behavior",
      "bucket": "emotion",
      "severity": "positive",
      "weight": 4,
      "detection_layers": [
        "post_trade_pattern"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "Trades today <= limit (5 day-horizon / 3 otherwise).",
      "thresholds": {
        "day_limit": 5,
        "other_limit": 3
      },
      "communication": "Green 'Controlled Trade Frequency' card.",
      "proactive_action": "Sustainable pacing reinforced.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D14",
      "key": "improving_win_rate",
      "label": "Improving Win Rate",
      "type": "good_behavior",
      "bucket": "tis",
      "severity": "positive",
      "weight": 5,
      "detection_layers": [
        "post_trade_pattern"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "Win rate of the last 10 closed trades exceeds the prior 10 by > 5 percentage points (requires >= 20 closed).",
      "thresholds": {
        "improvement_pts": 5,
        "min_closed": 20
      },
      "communication": "Green 'Improving Win Rate' card with the trend.",
      "proactive_action": "Momentum acknowledged in digest framing.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D15",
      "key": "improving_rr",
      "label": "Improving R:R Trend",
      "type": "good_behavior",
      "bucket": "tis",
      "severity": "positive",
      "weight": 5,
      "detection_layers": [],
      "detection_rule_type": "NOT_IMPLEMENTED",
      "detection_rule": "Registry-defined. No automated detector currently emits this signal; the weight applies only when a signal is emitted, which does not occur automatically today.",
      "thresholds": {},
      "communication": "\u2014",
      "proactive_action": "\u2014",
      "ml_pathway": "\u2014",
      "implementation_status": "REGISTRY_ONLY"
    },
    {
      "id": "D16",
      "key": "accepting_small_losses",
      "label": "Accepting Small Losses",
      "type": "good_behavior",
      "bucket": "emotion",
      "severity": "positive",
      "weight": 5,
      "detection_layers": [
        "post_trade_single"
      ],
      "detection_rule_type": "DERIVED_CALCULATION",
      "detection_rule": "Realized per-share loss <= 1.15x the planned stop distance (loss contained near plan).",
      "thresholds": {
        "containment_multiple": 1.15
      },
      "communication": "Green 'Accepting Small Losses' card.",
      "proactive_action": "Taking the planned small loss reinforced.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D17",
      "key": "using_platform_signals",
      "label": "Using Platform Signals",
      "type": "good_behavior",
      "bucket": "tis",
      "severity": "positive",
      "weight": 3,
      "detection_layers": [
        "post_trade_pattern"
      ],
      "detection_rule_type": "DIRECT_CODE_RULE",
      "detection_rule": "Trade source is one of: quick_signals, strategy_detector, ai_insights, quick_setups, market_intelligence.",
      "thresholds": {},
      "communication": "Green 'Using Platform Signals' card.",
      "proactive_action": "Analytics-led setups encouraged over impulse entries.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D18",
      "key": "score_improving",
      "label": "Behavioral Score Improving",
      "type": "good_behavior",
      "bucket": "emotion",
      "severity": "positive",
      "weight": 3,
      "detection_layers": [],
      "detection_rule_type": "NOT_IMPLEMENTED",
      "detection_rule": "Registry-defined. No automated detector currently emits this signal; the weight applies only when a signal is emitted, which does not occur automatically today.",
      "thresholds": {},
      "communication": "\u2014",
      "proactive_action": "\u2014",
      "ml_pathway": "\u2014",
      "implementation_status": "REGISTRY_ONLY"
    },
    {
      "id": "D19",
      "key": "respecting_daily_limits",
      "label": "Respecting Daily Loss Limits",
      "type": "good_behavior",
      "bucket": "emotion",
      "severity": "positive",
      "weight": 5,
      "detection_layers": [
        "post_trade_pattern"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "0 losing closes on a UTC day that had at least one close.",
      "thresholds": {},
      "communication": "Green 'Respecting Daily Loss Limits' card \u2014 clean session.",
      "proactive_action": "Stopping while ahead reinforced; supports the daily-cap habit.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    },
    {
      "id": "D20",
      "key": "patience_waiting",
      "label": "Patience \u2014 Waiting for Setups",
      "type": "good_behavior",
      "bucket": "emotion",
      "severity": "positive",
      "weight": 4,
      "detection_layers": [
        "post_trade_pattern"
      ],
      "detection_rule_type": "MULTI_TRADE_SEQUENCE_RULE",
      "detection_rule": "Average gap between trades >= 1h (day horizon) or >= 12h (swing), across >= 5 recent trades.",
      "thresholds": {
        "day_gap_hours": 1,
        "swing_gap_hours": 12,
        "min_trades": 5
      },
      "communication": "Green 'Patience \u2014 Waiting for Setups' card.",
      "proactive_action": "Quality-over-quantity framing surfaced before forcing a trade.",
      "ml_pathway": "Realized outcomes of trades carrying this signal enter the optimization dataset; learned confidence-factor weights shift with observed outcomes.",
      "implementation_status": "IMPLEMENTED"
    }
  ],
  "prevention_extensions": [
    {
      "id": "fomo_chase",
      "reserved_pitfall_id": 22,
      "note": "Prevention-only extension signature (reserved ID 22, not one of the 21 registry pitfalls; it carries no score weight). Fires only with behavioural evidence: first-ever trade on a ticker counts only with >= 6 recent trades of history, plus oversized entry (>= 1.25x median) and/or an explicit chase hint."
    }
  ],
  "prevention_ladder": [
    {
      "range": "< 0.30",
      "tier": "calm",
      "lower": 0.0,
      "upper_excl": 0.3,
      "label": "Calm",
      "action": "none"
    },
    {
      "range": "0.30 - 0.54",
      "tier": "aware",
      "lower": 0.3,
      "upper_excl": 0.55,
      "label": "Aware",
      "action": "passive_awareness"
    },
    {
      "range": "0.55 - 0.74",
      "tier": "coach",
      "lower": 0.55,
      "upper_excl": 0.75,
      "label": "Coach",
      "action": "inline_coaching_card"
    },
    {
      "range": "0.75 - 0.89",
      "tier": "cool_down",
      "lower": 0.75,
      "upper_excl": 0.9,
      "label": "Cool Down",
      "action": "cool_down_timer"
    },
    {
      "range": ">= 0.90",
      "tier": "justify",
      "lower": 0.9,
      "upper_excl": 1.01,
      "label": "Justify",
      "action": "justification_gate"
    },
    {
      "range": "policy",
      "tier": "blocked",
      "label": "Blocked",
      "action": "hard_block",
      "note": "Not score-driven: triggered by policy (daily loss cap breached or an active 60-minute cool-down lock)."
    }
  ],
  "tier_mechanics": {
    "cool_down_timer_seconds": 30,
    "justify_min_chars": 20,
    "justification_persisted": true
  },
  "score_aggregation": {
    "emotion_score": {
      "window_days": 7,
      "adjustment": "clamp(net emotion-bucket weights + self-report adj, -25, +25)",
      "cap": 25,
      "base": 75,
      "clamp": "0-100",
      "bands": {
        "low_risk": ">= 75",
        "moderate": "50-74",
        "high_bias": "< 50"
      }
    },
    "tis": {
      "window_days": 30,
      "component": "50 + clamp(net TIS-bucket weights, -30, +30)",
      "cap": 30,
      "blend": "0.50 x legacy TIS + 0.30 x behavioural component + 0.20 x self-report quality",
      "behavioral_composite": "4-signal composite (consistency 0.30, overconfidence 0.20, discipline decay 0.25, mistake repeat 0.25) blended at 20% when >= 5 trades have data"
    },
    "stacking": "One trade may emit several independent signals (intentional design); the aggregate effect is bounded by the +/-25 Emotion cap and the +/-30 TIS component clamp."
  },
  "ml_parameters": {
    "algorithm": "gradient descent on MSE between confidence score and realized outcome",
    "learning_rate": 0.01,
    "max_iterations": 100,
    "convergence_threshold": 0.001,
    "min_weight": 0.05,
    "max_weight": 0.5,
    "weight_sum_target": 1.0,
    "min_trades_for_training": 50,
    "train_test_split": 0.8,
    "max_weight_change_per_update": 0.05,
    "rollback_threshold": 0.1,
    "retraining_schedule_hours": 168,
    "retraining_note": "A 168-hour (weekly) schedule parameter governs when retraining is due; optimization runs execute via the platform's ML optimization service and every run is recorded with train/test metrics.",
    "factors": [
      "trend_alignment",
      "volatility_alignment",
      "indicator_confirmation",
      "historical_performance",
      "entry_timing"
    ],
    "default_weights": {
      "trend_alignment": 0.3,
      "volatility_alignment": 0.25,
      "indicator_confirmation": 0.2,
      "historical_performance": 0.15,
      "entry_timing": 0.1
    }
  }
}