Counterfactual Supervisory Agent & Self-Healing SFT
post-veto price action auditing & autonomous prompt correction
Published: 2026-07-27 | Project: BayesianPivot | Discipline: Cognitive AI & Multi-Agent Swarms
Author: Nicholas Alexander MacAskill — Founder & CTO, Flocano Labs | Canonical: https://www.nicholasmacaskill.com/dossier/bp-supervisory-agent
1. The False-Negative Problem
In autonomous signal validation, AI models often err on the side of caution—vetoing high-probability setups (score < 5.5). Without a supervisory loop, these "False Negatives" disappear into database logs without feedback, leaving the model stuck in overly conservative rejection loops.
2. Autonomous Counterfactual Audit (`scripts/audit_missed_opportunities.py`)
We engineered a background Supervisory Agent running via a dedicated macOS LaunchAgent (com.sovereign.supervisor, 30m interval): 1. Ledger Audit: Scans signed_ledger for all rejected, expired, or pending signals older than 4 hours. 2. Price Action Reconstruction: Pulls 5-minute price data 4 hours post-veto to evaluate if the rejected trade would have reached Take Profit (+3.0R) cleanly without hitting Stop Loss. 3. Self-Healing SFT Injection: When an overly cautious veto is confirmed, the supervisor automatically formats the exact setup context into a corrective instruction pair and appends it to few_shot_examples.json. On the next scan cycle, the validator reads the corrected rule, preventing the LLM from repeating the rejection.