Commit Graph

166 Commits

Author SHA1 Message Date
agentson
05e8986ff5 refactor: split CLAUDE.md into focused documentation structure
Some checks failed
CI / test (pull_request) Has been cancelled
- Restructure docs into topic-specific files to minimize context
- Create docs/workflow.md (Git + Agent workflow)
- Create docs/commands.md (Common failures + build commands)
- Create docs/architecture.md (System design + data flow)
- Create docs/testing.md (Test structure + guidelines)
- Rewrite CLAUDE.md as concise hub with links to detailed docs
- Update .gitignore to exclude data/ directory

Benefits:
- Reduced context size for AI assistants
- Faster reference lookups
- Better maintainability
- Topic-focused documentation

Closes #13

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 10:13:48 +09:00
3c676c2b8d Merge pull request 'docs: add common command failures and solutions' (#12) from feature/issue-11-command-failures into main
Some checks failed
CI / test (push) Has been cancelled
Reviewed-on: #12
2026-02-04 10:03:29 +09:00
agentson
3dd222bd3b docs: add common command failures and solutions
Some checks failed
CI / test (pull_request) Has been cancelled
- Document tea CLI TTY errors and YES="" workaround
- Record wrong parameter names (--body vs --description)
- Add Gitea API hostname corrections
- Include Git configuration errors
- Document Python/pytest common issues

Each failure includes:
-  Failing command
- 💡 Failure reason
-  Working solution
- 📝 Additional notes

Closes #11

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 10:02:41 +09:00
f4e6b609a4 Merge pull request 'docs: add agent workflow and parallel execution strategy' (#10) from feature/issue-9-agent-workflow into main
Some checks failed
CI / test (push) Has been cancelled
Reviewed-on: #10
2026-02-04 09:51:01 +09:00
agentson
9c5bd254b5 docs: add agent workflow and parallel execution strategy
Some checks failed
CI / test (pull_request) Has been cancelled
- Document modern AI development workflow using specialized agents
- Add guidelines for when to use git worktree/subagents vs main conversation
- Define agent roles: ticket mgmt, design, code, test, docs, review
- Include implementation examples with Task tool
- Update test count (35 → 54) with new market_schedule tests

Closes #9

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 09:47:14 +09:00
5c9261ce5b Merge pull request 'feat: implement timezone-based global market auto-selection' (#7) from feature/issue-5-global-market-auto-selection into main
Some checks failed
CI / test (push) Has been cancelled
Reviewed-on: #7
2026-02-04 09:33:39 +09:00
ef4305cfc3 Merge pull request 'docs: add Git workflow policy to CLAUDE.md' (#6) from feature/issue-4-add-git-workflow-policy into main
Some checks failed
CI / test (push) Has been cancelled
Reviewed-on: #6
2026-02-04 09:33:16 +09:00
agentson
b26ff0c1b8 feat: implement timezone-based global market auto-selection
Some checks failed
CI / test (pull_request) Has been cancelled
Implement comprehensive multi-market trading system with automatic
market selection based on timezone and trading hours.

## New Features
- Market schedule module with 10 global markets (KR, US, JP, HK, CN, VN)
- Overseas broker for KIS API international stock trading
- Automatic market detection based on current time and timezone
- Next market open waiting logic when all markets closed
- ConnectionError retry with exponential backoff (max 3 attempts)

## Architecture Changes
- Market-aware trading cycle with domestic/overseas broker routing
- Market context in AI prompts for better decision making
- Database schema extended with market and exchange_code columns
- Config setting ENABLED_MARKETS for market selection

## Testing
- 19 new tests for market schedule (timezone, DST, lunch breaks)
- All 54 tests passing
- Lint fixes with ruff

## Files Added
- src/markets/schedule.py - Market schedule and timezone logic
- src/broker/overseas.py - KIS overseas stock API client
- tests/test_market_schedule.py - Market schedule test suite

## Files Modified
- src/main.py - Multi-market main loop with retry logic
- src/config.py - ENABLED_MARKETS setting
- src/db.py - market/exchange_code columns with migration
- src/brain/gemini_client.py - Dynamic market context in prompts

Resolves #5

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 09:29:25 +09:00
agentson
1d46cb31fb docs: add Git workflow policy to CLAUDE.md
Some checks failed
CI / test (pull_request) Has been cancelled
Add comprehensive Git workflow policy section to ensure all code
changes follow proper process: issue creation, feature branch,
PR, and merge. Explicitly prohibit direct pushes to main branch.

Resolves #4

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 08:50:46 +09:00
2e63ac4a29 Merge pull request 'docs: add CLAUDE.md for AI assistant context' (#3) from feature/issue-2-add-claude-md into main
Some checks failed
CI / test (push) Has been cancelled
Reviewed-on: #3
2026-02-04 03:29:34 +09:00
9bb7e3ec85 docs: add CLAUDE.md for AI assistant context
Some checks failed
CI / test (pull_request) Has been cancelled
- Add build & test commands reference
- Document architecture and component interactions
- Include key constraints from docs/agents.md
- Provide configuration and test structure overview

Closes #2

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 03:23:43 +09:00
006aaed46a Fix SSL hostname mismatch for KIS VTS paper trading endpoint
Some checks failed
CI / test (push) Has been cancelled
The KIS virtual trading server (openapivts.koreainvestment.com) serves a
certificate with a hostname mismatch. Disable SSL hostname verification
only for the VTS endpoint via a custom TCPConnector; production endpoints
remain fully verified.

Closes #1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 03:10:32 +09:00
e025136047 Fix Docker runtime errors: migrate to google-genai SDK and fix SQLite permissions
Some checks failed
CI / test (push) Has been cancelled
Migrate from deprecated google-generativeai to google-genai (>=1.0) using the
new Client-based API, and fix SQLite "unable to open database file" in Docker
by chowning the data directory to appuser before switching users.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:56:31 +09:00
03c6b2b942 Update README.md with Korean documentation
Some checks failed
CI / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:11:06 +09:00
d1750af80f Add complete Ouroboros trading system with TDD test suite
Some checks failed
CI / test (push) Has been cancelled
Implement the full autonomous trading agent architecture:
- KIS broker with async API, token refresh, leaky bucket rate limiter, and hash key signing
- Gemini-powered decision engine with JSON parsing and confidence threshold enforcement
- Risk manager with circuit breaker (-3% P&L) and fat finger protection (30% cap)
- Evolution engine for self-improving strategy generation via failure analysis
- 35 passing tests written TDD-first covering risk, broker, and brain modules
- CI/CD pipeline, Docker multi-stage build, and AI agent context docs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:08:48 +09:00
9d9945822a Initial commit 2026-02-04 00:22:48 +09:00