refactor(agentic): generalize agentic predictors via DomainConfig#1
Merged
Conversation
Pin the behaviour the domain-agnostic refactor must preserve: - AdaptiveSkillStore save/load/render/backup contract and the confirmation_threshold store parameter (shared-lib test with a minimal concrete state). - WtiStrategyState.build_markdown() renders the committed wti-strategy-trained artifact byte-identically (snapshot), plus the default oil skill name/title. - The five strategy mutation tools' evidence governance: observation/ hypothesis lifecycle, the graduation threshold guard, and the narrative-update rationale requirement. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ainConfig Promote the shared agentic engine so a new target series can be configured without touching oil code, and drive the oil prompts/config from a single `DomainConfig`. Pure refactor: no new features, no study driver. Promoted to aieng/forecasting/methods/agentic/: - strategy_state.py: generic `StrategyState` (+ Observation/Hypothesis/ CalibrationCorrection/VersionEntry). Markdown title, default skill name, and frontmatter description are ClassVar params. Oil `WtiStrategyState` becomes a thin subclass pinning the WTI strings — committed SKILL.md renders identically. - adaptive_skill_tools.py: `build_skill_tools(strategy_dir, state_type, ...)` generic over any StrategyState subclass. No import-time singletons. Oil skill_tools.py delegates and re-exports the sub-models; STORE/WTI_SKILL_TOOLS removed (unused outside docstrings). - history.py: `compress_history` (was analyst_agent/agent.py); oil re-exports it. - outputs.py: generic `ScenarioCard` / `ScenarioAgentForecastOutput` with the scenario-card numeric fields parameterized via `scenario_card_template_extra`. Oil `tasks.py` subclasses them, preserving `wti_range_60d`/`point_estimate_60d` and modality="discrete". - domain.py: `DomainConfig` (identity, data/target, context-retrieval, strategy skill, skill dirs, vol-regime bands, tool bounds) plus render_* instruction templates and `build_analyst_config` / `build_adaptive_config`. Oil implementation: - energy_oil_forecasting/domain.py defines `OIL_DOMAIN`. - analyst/adaptive/starter agent instructions now render from OIL_DOMAIN; the `build_wti_*` factories are thin delegating wrappers. Rendered oil prompts are byte-identical to the originals (verified against captured goldens). Curriculum: `_vol_regime` vol bands extracted to a `bands` parameter with the 15/30/50 thresholds as `DEFAULT_VOL_REGIME_BANDS`. Invariants held: oil agent.name / predictor_id strings unchanged; committed skill artifacts render identically; nb05/nb06 import surfaces resolve. Regenerated the concierge catalog/artifacts to index the new modules. __init__ re-exports the promoted names; old oil import paths preserved. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New PYSEC-2026 advisories against the locked versions fail CI's pip-audit step on every branch (main last passed 2026-07-07, before publication). Full test suite re-verified after the bump: 489 passed, 7 skipped. Co-Authored-By: Claude Fable 5 <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.
Fork-side landing of upstream PR VectorInstitute#170 (CI-green there; full description and invariant verification in that PR). This fork is the home of the workshop-paper + live-evaluation work; the generalization merges here first and is promoted upstream after the bootcamp build phase.
🤖 Generated with Claude Code