Skip to content

Latest commit

 

History

History
170 lines (121 loc) · 6.21 KB

README.md

File metadata and controls

170 lines (121 loc) · 6.21 KB

Development Documentation

This directory contains guides for developers working on OptionsCommander (formerly RH2MAS).

Quick Navigation

Core References

  1. Codebase Structure

    • Project layout and module organization
    • Import conventions and patterns
    • Where to find specific functionality
    • Start here if you're new to the codebase
  2. Project Status & Roadmap

    • Current implementation status
    • Completed features and known issues
    • Open issues and priorities
    • Sprint planning and milestones
    • Check this to understand what's being worked on
  3. CLI Trade Assistant

    • Architecture of the interactive CLI
    • How human-in-the-loop trading works
    • Integration with trading cycle
    • Reference this for CLI-related changes
  4. Cache Developer Guide

    • SQLite caching system internals
    • API usage and examples
    • Performance tuning
    • Read this if working with market data or cache
  5. Automation Setup

    • Pre-commit hooks configuration
    • GitHub Actions setup
    • Auto-formatting and linting
    • Use this to set up your development environment
  6. Code Quality & Maintenance

    • Linting standards and configuration
    • Active code quality issues
    • Technical debt tracking
    • Import consolidation history
    • Reference this for code quality improvements

Additional Guides

CLI Integration

Feature Implementation


Related Documentation

For architecture decisions, see docs/05_decisions/

For feature documentation, see docs/06_features/

For testing, see docs/07_testing/


Common Tasks

Adding a New Feature

  1. Read 01_codebase_structure.md for where to place code
  2. Check docs/05_decisions/ for relevant architectural patterns
  3. Update 02_project_status.md to track your work
  4. Create tests in tests/ following existing patterns
  5. Document in docs/06_features/ when ready for users

Fixing a Bug

  1. Create a GitHub issue (if not already created)
  2. Check 02_project_status.md for related issues
  3. Write tests that reproduce the bug
  4. Fix the bug
  5. Update 02_project_status.md when complete
  6. Reference the issue in your commit message

Improving Performance

  1. Profile the code to identify bottlenecks
  2. Check 04_cache_developer_guide.md for caching strategies
  3. Review docs/05_decisions/03_api_caching_patterns.md
  4. Implement improvements with tests
  5. Document in commit message and relevant docs

Understanding How Something Works

  1. Start with 01_codebase_structure.md to find the files
  2. Read code comments and docstrings
  3. Check related ADRs in docs/05_decisions/
  4. Look at tests in tests/ for usage examples
  5. Ask in GitHub issues if stuck

Code Quality Standards

All code must follow standards documented in:

Decision Records (docs/05_decisions/):

  • 01_code_organization.md - Directory structure and imports
  • 02_error_handling_logging.md - Error handling patterns
  • 03_api_caching_patterns.md - Cache implementation
  • 04_agent_singleton_patterns.md - Agent lifecycle

Code Quality Guide (06_code_quality.md):

  • Linting configuration (Ruff, Black, isort, MyPy)
  • Import conventions and patterns
  • Type hint guidelines
  • Active code quality issues (#409-#413)

Pre-commit hooks enforce:

  • Ruff formatting (ruff format, Black-compatible)
  • Ruff linting, including import order (rule I)
  • Trailing whitespace removal
  • Security scanning (Bandit)

Architecture Decisions

Significant design decisions are documented as ADRs. Before making architectural changes, check docs/05_decisions/.


Testing Strategy

See docs/07_testing/ for:

  • Unit testing guidelines
  • Integration testing approach
  • Forward testing protocol
  • How to run tests safely (never run tests that place orders)

Questions?

  1. Where do I put this code? → 01_codebase_structure.md
  2. How does the CLI work? → 03_cli_trade_assistant.md
  3. How's the cache implemented? → 04_cache_developer_guide.md
  4. What's the project status? → 02_project_status.md
  5. How should I design this? → docs/05_decisions/
  6. What are the code quality standards? → 06_code_quality.md