# 2025-02-06_Add_Pass2_Strategic_Corrections

## Overview
Added Pass 2 strategic correction blocks (`TEXTBOOK COUNTERFEIT RISK CORRECTION` and `SEASONAL HIGH-RANK CORRECTION`) to Mentor Advice and Mentor Chat prompts to ensure consistency across all AI evaluations. 

## Investigation Answers
* **Are Mentor Advice and Mentor Chat built from the same prompt builder function, or do they have separate prompt assembly logic?**
  They have separate prompt assembly logic. Mentor Advice is generated by `generate_ava_advice` in `keepa_deals/ava_advisor.py`, whereas Mentor Chat is handled directly in the `/api/mentor-chat` endpoint in `wsgi_handler.py`.
* **Is there a shared "system prompt" or "strategy context" section that both consume? If so, that's the cleanest place to inject the corrections.**
  Both functions fetch strategy context via `load_strategies()` from `keepa_deals/ava_advisor.py`, but they construct their final prompts independently. The cleanest place to store the correction text is as module-level constants in `keepa_deals/ava_advisor.py` which can be imported and injected by both functions.
* **Are the 4 Mentor Chat personas each built with their own prompt, or do they share a base prompt with persona-specific overrides?**
  They share a single base prompt with persona-specific values (name, tone, focus, style guide) dynamically injected into it from `get_mentor_config`.
* **Does Pass 2's prompt assemble the corrections as inline string concatenation, or does it pull from a shared constant?**
  Pass 2's prompt uses inline string concatenation directly within `prime_picks_task.py`.

## Challenges & Solutions
To prevent duplicating long strings and missing future updates, I extracted the corrections into module-level constants (`STRATEGIC_CORRECTIONS`) within `keepa_deals/ava_advisor.py`, and injected them into both prompt bodies. This preserves all existing persona formatting while ensuring consistent strategic alignment.

## Status
Success
