Skip to content

Instantly share code, notes, and snippets.

@stevenc81
Created August 29, 2025 02:31
Show Gist options
  • Select an option

  • Save stevenc81/1542e399ef542591c90cf963028e9c51 to your computer and use it in GitHub Desktop.

Select an option

Save stevenc81/1542e399ef542591c90cf963028e9c51 to your computer and use it in GitHub Desktop.
Investment Analysis Workflow

Investment Analysis Workflow

Overview

Claude Code orchestrates specialized agents to analyze US public companies per ME.md investment principles.

PHASE 1: SCREENING

Pre-check: List existing directories in analyses/ to identify previously analyzed companies Action: Invoke screener agent to identify top 3 NEW companies (excluding any tickers already in analyses/)

Task: {
  subagent_type: "screener",
  description: "Screen US stocks",
  prompt: "First check analyses/ directory for existing tickers to exclude. Review ME.md investment criteria. Return top 3 US public companies NOT previously analyzed as: Company | Ticker | Rationale"
}

Output: List of 3 new companies with tickers

PHASE 2: SPECIALIST ANALYSIS

Action: Create directories and launch 6 parallel analyses (2 per company)

For each company from Phase 1:

// Quantitative
Task: {
  subagent_type: "quantitative",
  description: "Analyze [TICKER] financials",
  prompt: "Analyze [Company] ([TICKER]) 5-year SEC filings (10-K, 10-Q). Focus on revenue, margins, cash flow, ROIC, debt, valuation. Apply ME.md principles. Output to analyses/[TICKER]/quantitative_report.md"
}

// Qualitative
Task: {
  subagent_type: "qualitative",  
  description: "Analyze [TICKER] narratives",
  prompt: "Analyze [Company] ([TICKER]) 5-year SEC narratives (10-K, 10-Q, 8-K). Focus on management consistency, risks, positioning, red flags. Apply ME.md principles. Output to analyses/[TICKER]/qualitative_report.md"
}

PHASE 3: SYNTHESIS

Action: After verifying all 6 reports exist, invoke analyst

Task: {
  subagent_type: "analyst",
  description: "Synthesize recommendations",
  prompt: "Read all reports in analyses/. For each company: synthesize findings, apply ME.md criteria, create final_recommendation.md in analyses/[TICKER]/."
}

OUTPUT STRUCTURE

analyses/
  [TICKER]/
    quantitative_report.md
    qualitative_report.md
    final_recommendation.md

EXECUTION FLOW

  1. Read ME.md → Invoke screener → Parse output
  2. Create directories → Launch 6 parallel agents → Verify reports
  3. Invoke analyst → Verify final outputs

ERROR HANDLING

  • Missing reports: Create placeholder, proceed with available data
  • Agent timeout: Note incomplete analysis, continue workflow
  • File verification: Check existence before phase transitions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment