Commit graph

14 commits

Author SHA1 Message Date
oho
34b9c0cbf5 chore: remove project-level memory, using ~/.claude/MEMORY.md instead 2026-02-06 13:44:58 +01:00
oho
5fde9cd4ed feat: add persistent Claude session memory file
This file serves as cross-session memory for Claude Code.
Updated at end of each session with discoveries, status, and next steps.
2026-02-06 12:47:14 +01:00
oho
49ca7d3fd6 docs: CRITICAL - integration reality check reveals fundamental issues
Deep analysis uncovered "unknown unknowns" that surface API coverage missed:

CRITICAL ISSUES:
1. Token ID truncated to 8 chars in LLM prompt (src/agent/llm.py:182)
   - LLM cannot know full token_id, orders will fail on Polymarket

2. Web UI trading is COMMENTED OUT (src/web/app.py:301-302)
   - "Start Trading" sets state but runs no actual trading code

3. Multi-agent coordinator has CORRECT token_id handling
   - But it's not wired to CLI or web UI - sophisticated but unused

4. Silent error handling masks all failures
   - Orders fail, get logged to console, execution continues

5. Zero integration tests against actual Polymarket API

ROOT CAUSE: This appears to be an incomplete prototype, not production code.

RECOMMENDATION: Do NOT attempt live trading until unified and tested.
2026-01-15 19:10:40 +01:00
oho
a605c1e984 docs: add comprehensive Polymarket API integration analysis
Deep research comparing Alpha Arena with Polymarket's official
agent framework and API ecosystem:

- Gamma API: 30% coverage (missing events, tags, search)
- CLOB API: 70% coverage (good via py-clob-client)
- Data API: 40% coverage (missing leaderboards, P&L timeseries)
- WebSocket: 0% coverage (CRITICAL GAP)

Key findings:
- WebSocket integration is the biggest opportunity
- Alpha Arena has unique strengths (multi-agent, backtesting, resilience)
- Official polymarket-apis package could simplify integration
- Recommended 5-week implementation roadmap included
2026-01-15 18:43:17 +01:00
oho
b05e5f67fd feat: production hardening + backtesting enhancements + novel
Production Hardening:
- Add circuit breaker pattern (src/core/resilience.py)
- Add timeout protection for CLOB operations in broker
- Enhance health checks with liveness/readiness probes
- Improve kill switch audit logging with stack traces
- Add response caching and health checker utilities

Backtesting Enhancements:
- Add multi-strategy comparison framework (comparison.py)
- Add parameter optimization with grid/random search (optimizer.py)
- Add Monte Carlo simulation analysis (monte_carlo.py)
- Add walk-forward analysis with date-based windows (walk_forward.py)
- Support anchored vs rolling window modes
- Add overfitting detection and consistency scoring

Documentation:
- Add THE_ALPHA_CHRONICLES.md - 25-page novel about using Alpha Arena
- Educational narrative covering prediction markets, Kelly Criterion,
  multi-agent systems, risk management, and the Polymarket ecosystem
- Includes practical amateur's guide and sci-fi glimpse of 2031

All 328 tests passing.
2026-01-14 13:09:34 +01:00
oho
435e09f732 docs: update TESTING.md with new test files and integration tests
- Add test_integration.py, test_debate.py, test_signals.py, test_llm_providers.py to structure
- Add Integration Tests section documenting multi-agent testing
- Update test count to 328+
2026-01-13 14:27:45 +01:00
oho
b627b4319a test: add comprehensive integration tests for trading system
Add 14 integration tests covering:
- Full agent coordination flow (Research -> Risk -> Debate -> Execution)
- Multi-agent debate system with multiple personas
- Confidence calibration tracking
- Signal aggregation from multiple sources
- Event calendar integration
- End-to-end trading cycle with mocked broker
- Risk rejection scenarios
- Error handling with LLM failures
- Performance and latency tracking

All tests use MockLLMProvider matching the real LLMResponse interface.
Total test count: 328 passed, 2 skipped.
2026-01-13 14:24:15 +01:00
oho
78f9ed7c0c docs: add Xcode requirements and build troubleshooting
- Add "Requires: macOS 13.0+, Xcode 15.0+" to README
- Add "Build Won't Complete" troubleshooting section to MACOS_APP_MANUAL
- Document xcodebuild not found and Command Line Tools issues
2026-01-13 08:45:07 +01:00
oho
db76d64db9 fix(macos-app): add LLMProviderState.swift to Xcode project
The file existed in the Models folder but was not referenced
in the Xcode project, causing build failures with "cannot find
LLMProviderType in scope" errors.

Added file reference to:
- PBXBuildFile section
- PBXFileReference section
- Models group
- Sources build phase
2026-01-13 08:42:25 +01:00
oho
be7d27f663 docs: consolidate documentation and fix redundancies
- Add MACOS_APP_MANUAL.md reference to docs/index.md
- Streamline QUICKSTART.md macOS section (reference full manual)
- Update USER_MANUAL.md Quick Start to use ./alpha workflow
- Clarify that python cli.py is for advanced usage
- Fix venv naming consistency (.venv throughout)
2026-01-13 08:17:35 +01:00
oho
1c66f3b254 docs: Add comprehensive macOS menu bar app documentation
- Create docs/MACOS_APP_MANUAL.md with full documentation:
  - Installation and build instructions
  - Menu bar interface guide with keyboard shortcuts
  - Preferences configuration (General, LLM, Network, Notifications)
  - Real-time updates via WebSocket
  - Network modes (localhost vs LAN)
  - Troubleshooting section
  - Development guide with project structure
  - FAQ section

- Update README.md:
  - Add native macOS app to "What You Get" section
  - Update architecture diagram to show menu bar app
  - Add macOS app manual to documentation table
  - Update project structure to include macos-app directory
2026-01-12 23:32:57 +01:00
oho
081772387b feat: Add Phase 2 Multi-Agent Debate System
Implement a comprehensive debate framework for improved trading decisions:

- Add 6 debate personas: Optimist, Pessimist, Fundamentalist, Technician,
  Devil's Advocate, and Neutral
- Implement structured debate rounds with position-taking and rebuttals
- Add weighted consensus mechanism for aggregating agent opinions
- Add confidence calibration tracking to improve accuracy over time
- Include comprehensive test suite (38 tests)

New components:
- src/agents/debate.py - Complete debate system implementation
  - DebateAgent: Individual agent with persona-specific prompts
  - DebateOrchestrator: Coordinates multi-agent debates
  - ConfidenceCalibrator: Tracks prediction accuracy
- tests/test_debate.py - Full test coverage

The debate system helps avoid groupthink by having agents with different
analytical biases challenge each other's positions before reaching consensus.
2026-01-12 23:23:50 +01:00
oho
32df398846 feat: Add Phase 1 Alpha Signal Enhancement module
- Add event calendar with FOMC, jobs reports, CPI release tracking
- Add news provider with multi-source aggregation (News API, Twitter, RSS)
- Add Grok integration for Twitter/X sentiment analysis
- Add signal aggregator combining technical, news, event, orderbook, and LLM signals
- Include comprehensive test suite (66 tests)

New modules:
- src/signals/events.py - Market-moving event detection and calendar
- src/signals/news.py - News fetching and sentiment analysis
- src/signals/aggregator.py - Multi-source signal aggregation and scoring
- tests/test_signals.py - Complete test coverage
2026-01-12 23:15:16 +01:00
oho
774f8b3f61 Initial commit: Alpha Arena - Polymarket Autonomous Trading Harness
A comprehensive autonomous trading system for Polymarket prediction markets
featuring multi-LLM provider support, a native macOS menu bar app, and a
web-based control dashboard.

Key features:
- Multi-agent trading system (Research, Risk, Execution, Reflection agents)
- LLM provider flexibility (Anthropic, OpenAI, Google, xAI, Local models)
- Automatic provider fallback chain for resilience
- Native Swift/SwiftUI macOS menu bar application
- FastAPI web dashboard with real-time WebSocket updates
- Risk management with kill switch
- Technical indicators and market analysis
2026-01-12 23:04:58 +01:00