feat(agent_schemas): RegimeLiteral to 3-class (v0.42.0) — Phase 1A#86
Merged
Conversation
Caution-regime retirement Phase 1A — lib chokepoint. Plan doc: alpha-engine-docs/private/caution-regime-retirement-260528.md. The 4-class taxonomy (bull/neutral/bear/caution) double-counted the rule-based macro-agent "caution" override: VIX, HY OAS, and SPY 30d return are already weighted into the continuous regime_intensity_z META_FEATURE consumed by the predictor L2 Ridge and the executor's Stage D' Wire 1/2/3/4/5 sites. Discretizing those signals into a 4th regime category was the band-aid; the continuous SOTA path is already running. Portfolio-protective hysteresis (risk_on/caution/risk_off) is a separate institutional pattern emitted by the predictor drawdown leg (alpha-engine-predictor/regime/drawdown.py); consumers compose the two axes via most-protective override at decision time. The arc Phase 2 separates drawdown_tier from market_regime in the type system to prevent the vocabulary collision that today aliases the drawdown leg's "caution" into the macro-regime label. Changes: - RegimeLiteral: Literal["bull","neutral","bear","caution"] → Literal["bull","neutral","bear"] with docstring naming the 3-class Ang-Bekaert anchor + the separate drawdown_tier axis. - Version bump 0.41.0 → 0.42.0 (pyproject + __init__). - New tests pin caution rejection on MacroEconomistRawOutput + MacroCriticOutput.suggested_regime, and accept-all-3-classes smoke for forward-compat. Suite: 901 → 903 passing. Composes with feedback_no_bandaids_go_big_or_home (architectural fix, not config-block band-aid), feedback_sota_institutional_default_no_shortcuts (3-class Ang-Bekaert is the institutional baseline), and feedback_lift_invariants_to_chokepoint_after_second_recurrence (lib RegimeLiteral is the chokepoint for the cross-repo cascade). Sequencing: Phases 1B-1D (research + data + config) consume this v0.42.0 tag via pin-bump; Phases 2A-2D ship together with Phase 1 to avoid drawdown-leg type-mismatch crash on the first SF. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Caution-regime retirement Phase 1A — lib chokepoint. Plan doc:
alpha-engine-docs/private/caution-regime-retirement-260528.md.RegimeLiteral:Literal["bull","neutral","bear","caution"]→Literal["bull","neutral","bear"](3-class Ang-Bekaert taxonomy)0.41.0→0.42.0MacroEconomistRawOutput+MacroCriticOutput.suggested_regimeWhy
The 4-class taxonomy double-counted the rule-based macro-agent
cautionoverride: VIX, HY OAS, and SPY 30d return are already weighted intoregime_intensity_z(META_FEATURE 13) consumed by the predictor L2 Ridge and the executor's Stage D' wires. Portfolio-protective hysteresis (risk_on/caution/risk_off) is a separate institutional pattern emitted by the predictor drawdown leg — Phases 2A-2D separatedrawdown_tierfrommarket_regimein the type system.Today's trigger: L1019
FOCUS_LIST_GATING_ENABLEDflip was blocked by 5/24 SF logs showingWARNING [focus_list] no factor scores computed for regime=caution — focus_list_by_team emptyacross all 6 sector teams. Root cause:alpha-engine-research/config.py:125hardcoded{bull,bear,neutral}dropped the (absent) caution YAML block, leaving the agent with zero tickers on caution-regime cycles.Composes with
feedback_no_bandaids_go_big_or_home(architectural fix vs config-block band-aid)feedback_sota_institutional_default_no_shortcuts(3-class Ang-Bekaert is the institutional baseline)feedback_lift_invariants_to_chokepoint_after_second_recurrence(libRegimeLiteralis the chokepoint)Phasing
RegimeLiteralto 3-classdrawdown_tier≠market_regime)Phase 1 + Phase 2 MUST ship together to avoid drawdown-leg type-mismatch crash on the first SF after Phase 1.
Test plan
pytest tests/test_agent_schemas.py— 50 passing (was 48; +2 new pins)🤖 Generated with Claude Code