How botv99/scheme-intel works
Scheme Intel monitors Indian renewable-energy and bioenergy policy and company developments, maps evidence to listed companies, evaluates swing-trade setups, tracks outcomes, and delivers Telegram intelligence. Its principal workflow runs from source ingestion and catalyst analysis through market/risk assessment, persistence, and alerting; a separate Telegram query path serves prebuilt intelligence or queues deep research. Relationships reflect the README and sampled orchestration, routing, and storage code; several subsystems are documented but their internal wiring was not sampled.
Main entry points: pipeline.py Stage 2 pipeline · worker.py Research worker · ingest.py Snapshot ingestion · orchestration.py Stage 1 pipeline
Components 30
Evidence collection
- Snapshot ingestion
src/scheme_intel/ingest.py - Exchange activity
src/scheme_intel/ingestion/exchanges.py - News ingestion
src/scheme_intel/ingestion/media.py - Price ingestion
src/scheme_intel/ingestion/price.py
Catalyst and market analysis
- Unified entry point
src/scheme_intel/main.py - Stage 1 pipeline
src/scheme_intel/pipeline/orchestration.py - Stage 1 analysis
src/scheme_intel/pipeline/stage1.py - Catalyst intelligence
src/scheme_intel/intelligence
Trade decisions and tracking
- Stage 2 pipeline
src/scheme_intel/stage2/pipeline.py - Market snapshots
src/scheme_intel/stage2/market.py - Setup candidates
src/scheme_intel/stage2/candidate.py - Agent debate
src/scheme_intel/stage2/debate.py - LLM failover
src/scheme_intel/stage2/providers/manager.py - Risk and waiting
src/scheme_intel/stage2/risk.py - Outcome tracking
src/scheme_intel/stage2/tracker.py - Alert delivery
src/scheme_intel/delivery/service.py
Telegram intelligence
- Snapshot retrieval
src/scheme_intel/intelligence_memory/retrieval.py - Snapshot store
src/scheme_intel/intelligence_memory/store.py - Message router
src/scheme_intel/delivery/telegram_router.py - Research queue
src/scheme_intel/research/queue.py - Research worker
src/scheme_intel/research/worker.py - Research executor
src/scheme_intel/research/executor.py
Persistence and analytics
- SQLite history
src/scheme_intel/stage2/storage.py - Performance analytics
src/scheme_intel/stage2/performance.py
Other components
- Monitor operator
- Official sources
- Company and media feeds
- Market data feeds
- Telegram user
- Telegram service
Connections 35
- Monitor operator → Unified entry point: runs scan
- Monitor operator → Snapshot ingestion: refreshes data
- Official sources → Exchange activity: provides disclosures
- Company and media feeds → News ingestion: provides news
- Market data feeds → Price ingestion: provides prices
- Snapshot ingestion → Exchange activity: collects activity
- Snapshot ingestion → News ingestion: collects news
- Snapshot ingestion → Price ingestion: collects prices
- Unified entry point → Stage 1 pipeline: runs Stage 1
- Unified entry point → Stage 2 pipeline: runs Stage 2
- Stage 1 pipeline → Stage 1 analysis: orchestrates analysis
- Stage 1 analysis → Catalyst intelligence: evaluates catalysts
- Exchange activity → Stage 1 pipeline: supplies activity
- News ingestion → Stage 1 pipeline: supplies news
- Price ingestion → Stage 2 pipeline: supplies snapshots
- Stage 2 pipeline → Market snapshots: builds market data
- Stage 2 pipeline → Setup candidates: finds setups
- Stage 2 pipeline → Agent debate: requests debate
- Agent debate → LLM failover: generates analysis
- Stage 2 pipeline → Risk and waiting: applies risk checks
- Stage 2 pipeline → SQLite history: persists setups
- Outcome tracking → SQLite history: stores outcomes
- Performance analytics → SQLite history: reads history
- Stage 2 pipeline → Outcome tracking: updates outcomes
- Stage 2 pipeline → Performance analytics: summarizes performance
- Stage 2 pipeline → Alert delivery: dispatches report
- Alert delivery → Telegram service: sends alerts
- Telegram user → Message router: sends query
- Message router → Snapshot retrieval: queries memory
- Snapshot retrieval → Snapshot store: loads snapshot
- Message router → Research queue: enqueues research
- Research worker → Research queue: claims jobs
- Research worker → Research executor: executes job
- Research worker → Research queue: saves result
- Research worker → Telegram service: sends findings