CKVD Codebase Research
Research the crypto-kline-vision-data codebase to answer questions about: $ARGUMENTS
Research Focus
Key Areas to Investigate
FCP Implementation (src/ckvd/core/sync/crypto_kline_vision_data.py )
-
How failover decisions are made
-
Cache → Vision → REST priority
Provider Implementations (src/ckvd/core/providers/binance/ )
-
Vision API client
-
REST API client
-
Cache manager
Utilities (src/ckvd/utils/ )
-
Market constraints and validation
-
Timestamp handling
-
DataFrame utilities
Streaming Implementation (src/ckvd/core/streaming/ )
-
KlineStream class and stream lifecycle
-
KlineUpdate dataclass structure
-
StreamConfig configuration options
-
WebSocket client connection handling
-
Async message loop patterns
Research Instructions
-
Use Glob to find relevant files
-
Use Grep to search for specific patterns
-
Read key files to understand implementation
-
Summarize findings with specific file:line references
Expected Output
Provide:
-
Summary: Brief answer to the research question
-
Key Files: Files most relevant to the topic
-
Code References: Specific file:line references
-
Related Topics: Other areas worth investigating
TodoWrite Task Templates
Template A: Investigate FCP Flow
- Read src/ckvd/core/sync/crypto_kline_vision_data.py get_data() method
- Trace cache check logic (get_cache_lazyframes in ckvd_cache_utils)
- Trace Vision fetch logic (_fetch_from_vision)
- Trace REST fallback logic (_fetch_from_rest)
- Document FCP decision points with file:line references
Template B: Trace Data Source
- Identify the data source module (Vision, REST, Cache)
- Read the provider client implementation
- Trace data flow from API call to DataFrame return
- Document error handling and retry logic
- Summarize with file:line references
Template C: Map Exception Handling
- Read rest_exceptions.py and vision_exceptions.py
- Grep for exception catch/raise patterns in core/
- Map which exceptions trigger FCP fallback
- Identify any silent failures or bare excepts
- Document exception flow with file:line references
Template D: Investigate Streaming Architecture
- Read src/ckvd/core/streaming/kline_stream.py (KlineStream class)
- Understand stream lifecycle: create → subscribe → iterate → close
- Research KlineUpdate dataclass (fields: open_time, close, open, high, low, volume, symbol, interval, is_closed)
- Trace async context manager patterns (aenter, aexit)
- Study WebSocket client initialization and message handling
- Document stream state management and error handling
- Summarize async patterns with file:line references
Post-Change Checklist
After modifying this skill:
-
Key areas to investigate still match actual file paths
-
Research instructions reference available tools
-
Append changes to references/evolution-log.md
References
- @references/evolution-log.md - Skill change history