feat(cli): composable analyze run command with --modules flag#14
Merged
ShuhaoQing merged 5 commits intomainfrom Apr 7, 2026
Merged
feat(cli): composable analyze run command with --modules flag#14ShuhaoQing merged 5 commits intomainfrom
ShuhaoQing merged 5 commits intomainfrom
Conversation
…_shared.py Move _ensure_prices_cached (with gap-fill logic) to analysis/cache.py as a shared function. Extract _init_db and _fetch_current_prices to cli/_shared.py. Update all CLI modules and tests to use the shared imports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New `analyze run <symbol> --modules fundamental,technical,risk,...` command that composes analysis modules in a single CLI call. Supports: - Module selection via --modules (default: all) - Batch mode with comma-separated symbols - JSON output with --json - Checklist post-processing from fundamental + risk + signals Also adds analysis/registry.py (module registry), section_header() formatter, and compute_checklist_from_parts() in report.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- test_analysis_cache: gap-fill, skip-when-cached, fetch-when-empty - test_analysis_registry: parse_modules, max_lookback, needs_prices, module count - test_cli/test_analyze_run: module selection, JSON output, batch mode, checklist with/without deps, technical module Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update workflows 1, 3, 4 to use composable `analyze run` instead of multiple individual commands. Add `analyze run` to command reference. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CLAUDE.md: add cache.py, registry.py, _shared.py, guardrails.py to structure - README.md: add composable analysis feature, analyze run examples Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
analyze run <symbol> --modules fundamental,risk,peer,...command that runs multiple analysis modules in a single CLI call (replaces 6+ separate invocations)analysis/cache.py,cli/_shared.py) to eliminate code duplication across 6 CLI modulesanalysis/registry.py) with 7 pluggable modules: fundamental, technical, risk, volume, signals, peer, checklistTest plan
analyze runcommand (module selection, JSON output, batch mode, checklist with/without deps, technical module)pytest -m "not integration")uv run haoinvest analyze run 600519with live APIuv run haoinvest analyze run 600519 --modules fundamental,risk --json🤖 Generated with Claude Code