Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
User reported that the old prompt could emit 'sell' on backward-looking
capitulation ('Kevin sold after a 20% drop') — exactly the false signal
to avoid. v2 reframes every per-ticker field as forward-looking and
adds an explicit expected_move enum for the trading bot to weight.
Changes:
- New ExpectedMove enum (up_strong/up_mild/sideways/down_mild/
down_strong/unknown) in shared/schemas + shared/models, with
matching kevin_expected_move Postgres enum + column on
kevin_stock_mentions (migration e5f6a7b8c9d0). NOT NULL with
server_default 'unknown' so existing rows backfill cleanly.
- SYSTEM_PROMPT rewritten: action semantics now require a FORWARD
view; reactive sells get downgraded to 'watch' or skipped; the
rationale_quote must contain forward reasoning. Quality
checklist updated.
- _ANALYSIS_TOOL JSON schema gains expected_move (required).
- prompt_version v1 → v2 in config + infra + ad-hoc CLI default.
- pipeline.py persists ticker.expected_move into the new column.
Migration safety: the column is NOT NULL DEFAULT 'unknown' so 96
existing mentions auto-fill with 'unknown' (no forward call known
for backward analyses) without breaking any reads.
Cost to backfill the 27 existing analyses with v2 prompt: ~$3 LLM
spend. A follow-up reanalyze script will replay them after this
ships.
32 lines
1 KiB
Python
32 lines
1 KiB
Python
"""Configuration for the Meet Kevin watcher service."""
|
|
|
|
from shared.config import BaseConfig
|
|
|
|
|
|
class MeetKevinWatcherConfig(BaseConfig):
|
|
"""Meet Kevin watcher settings.
|
|
|
|
Extends :class:`BaseConfig` with YouTube channel monitoring,
|
|
caption fetching, and LLM analysis settings. All settings can be
|
|
overridden via environment variables prefixed with ``TRADING_``.
|
|
"""
|
|
|
|
# YouTube settings
|
|
meet_kevin_channel_id: str = "UCUvvj5lwue7PspotMDjk5UA"
|
|
meet_kevin_poll_interval_seconds: int = 10800
|
|
meet_kevin_max_caption_retries: int = 5
|
|
|
|
# LLM analysis settings
|
|
meet_kevin_max_llm_retries: int = 3
|
|
meet_kevin_llm_model: str = "claude-sonnet-4-5"
|
|
meet_kevin_prompt_version: str = "v2"
|
|
meet_kevin_daily_cost_cap_usd: float = 5.0
|
|
meet_kevin_inter_video_sleep_seconds: int = 30
|
|
|
|
# API credentials
|
|
anthropic_oauth_token: str = ""
|
|
|
|
# Runtime settings
|
|
meet_kevin_workdir: str = "/tmp/meet_kevin_captions"
|
|
otel_service_name: str = "meet-kevin-watcher"
|
|
otel_metrics_port: int = 9097
|