How the AI Berkshire Investment Team Skill Simulates a Professional Investment Research Team
The AI Berkshire investment team skill orchestrates a nine-stage multi-agent workflow that mirrors institutional research teams by assigning specialized analyst roles, embedding master-investor mental models, and enforcing rigorous data validation through automated financial tooling and mandatory audit gates.
The investment-team skill in the xbtlin/ai-berkshire repository transforms a single company query into a comprehensive, parallelized research operation. By leveraging the AI Berkshire investment team skill, the system autonomously creates a virtual team of analyst agents, assigns master-investor frameworks, and enforces institutional-grade data verification. This approach faithfully replicates the division of labor and rigorous compliance standards found in professional investment research houses.
The 9-Stage Investment Research Pipeline
The simulation follows a strict pipeline defined in skills/investment-team.md, progressing from team definition to final audit. Each stage maps to real-world research workflows found in institutional asset management firms.
Stage 1: Team Definition and Framework Selection
The skill establishes a five-role analytical framework comprising the team-lead, business-analyst, financial-analyst, industry-researcher, and risk-assessor. Each analyst role maps to a specific master-investor's perspective—段永平 (Duan Yongping), 巴菲特 (Buffett), 芒格 (Munger), and 李录 (Li Lu)—ensuring multi-dimensional coverage of the investment thesis.
Stage 2: Information Richness Assessment
Before data collection begins, the system evaluates the target company's "information richness" (信息丰富度) and assigns an A/B/C rating. This determines analysis depth, with A-level targets receiving full quantitative rigor while restricting speculative conclusions for data-scarce entities.
Stage 3: Team Creation
The skill invokes the TeamCreate tool to instantiate a named team (e.g., meituan-research) with the team-lead agent type. This establishes the orchestration layer that will manage the parallel workflow.
Stage 4: Parallel Task Generation
Four concurrent TaskCreate jobs are generated, one per analyst role (excluding the team-lead). Each task includes a detailed subject, description, and activeForm that embeds the assigned master-investor's analytical framework and strategic questions.
Stage 5: Concurrent Agent Execution
All four tasks are dispatched in a single message with run_in_background = true, launching general-purpose sub-agents simultaneously. This parallelism mirrors the real-world efficiency of research teams working asynchronously on different aspects of the same coverage universe.
Stage 6: Data Gathering and Financial Validation
Each sub-agent executes WebSearch calls to retrieve filings, news, and market data. Critically, all quantitative data passes through the Financial-Rigor Toolkit (tools/financial_rigor.py) for exact-decimal verification of market capitalization, valuation multiples, and cross-source consistency.
Stage 7: Progress Monitoring
The team-lead aggregates real-time progress updates, displaying which agents have completed their analysis and highlighting key takeaways from each stream. This simulates the stand-up meetings and status updates common in research departments.
Stage 8: Synthesis and Master Report Compilation
Upon completion of all four reports, the team-lead issues a shutdown_request to terminate the agents, then compiles a master report. This document fuses the four perspectives, adds a one-sentence investment conclusion, generates a rating table, and includes a detailed checklist.
Stage 9: Data Audit and Compliance Verification
The final markdown file undergoes the "准出" (approval/exit) flow through tools/report_audit.py. This extracts a random sample of data points, re-fetches them from defined sources, and verifies that every figure is within 1% of the source value before publication.
Financial Rigor and Data Validation
Unlike standard LLM analysis prone to arithmetic hallucinations, the AI Berkshire investment team skill integrates the tools/financial_rigor.py toolkit for exact decimal arithmetic. This command-line utility performs verification of market capitalization, valuation multiples, and cross-source consistency using Python's Decimal type to eliminate floating-point errors.
python3 tools/financial_rigor.py verify-market-cap \
--price 510 --shares 9.11e9 --reported 4.65e12 --currency HKD
The tool outputs a detailed breakdown, flags any deviation exceeding 5%, and returns a Boolean that the skill inserts into the final report. This eliminates "LLM mental-math" errors that plague ad-hoc analysis.
Additionally, the toolkit supports Benford's Law checks, three-scenario valuation modeling, and dual-source verification policies defined in skills/financial-data.md for US, HK, and A-share markets.
The Audit and Compliance Gate
Before any report reaches the user, it must pass the data-audit (准出) flow implemented in tools/report_audit.py. This secondary verification process performs three critical functions:
- Extracts a random sample of quantitative data points from the generated markdown
- Re-fetches the underlying data from primary sources (macrotrends, stockanalysis, aastocks, 东方财富, 巨潮资讯)
- Verifies that every figure is within 1% of the source value
This compliance layer ensures the AI Berkshire investment team skill meets institutional standards for data accuracy, comparable to the review processes at professional research houses.
Key Implementation Files
The simulation relies on these specific components within the xbtlin/ai-berkshire repository:
skills/investment-team.md— Master prompt defining the team architecture, role-specific prompts, and orchestration flow viaTeamCreateandTaskCreatetools.tools/financial_rigor.py— Command-line toolkit for exact decimal verification, Benford checks, and three-scenario valuation analysis.tools/report_audit.py— Implements the post-generation "准出" workflow for secondary data verification and quality gates.skills/investment-research.md— High-level framework specifying data-source rules, audit steps, and research methodologies that invoke the team skill.skills/financial-data.md— Defines dual-source collection policies for US, HK, and A-share markets.
Summary
The AI Berkshire investment team skill replicates professional investment research through these key mechanisms:
- Division of labor across four specialized analytical roles (business, financial, industry, risk), each adopting the mental models of master investors like Buffett and Munger.
- Parallel execution via concurrent
TaskCreatecalls that minimize latency while maintaining specialized focus. - Rigorous data validation using exact
Decimalarithmetic intools/financial_rigor.pyto eliminate computational errors. - Compliance auditing through the
tools/report_audit.py"准出" gate, enforcing ≤1% deviation tolerance before publication. - Master-investor frameworks embedded in prompt templates to ensure multi-dimensional coverage of business quality, moats, management, and valuation.
Frequently Asked Questions
How does the AI Berkshire investment team skill handle data accuracy?
The skill enforces a two-layer validation system. First, tools/financial_rigor.py verifies all calculations using exact decimal arithmetic and cross-source consistency checks during analysis. Second, tools/report_audit.py performs a post-generation audit that re-fetches a random sample of data points to verify they are within 1% of source values before the report is delivered.
What are the four analytical roles in the investment team simulation?
The simulation creates four specialized analyst agents: the business-analyst (focusing on business quality and moats), the financial-analyst (examining financial statements and valuation), the industry-researcher (assessing competitive positioning and trends), and the risk-assessor (identifying downside scenarios). A fifth team-lead agent orchestrates the workflow and synthesizes findings without executing a parallel task.
Which master investors' frameworks does the skill utilize?
The prompt templates embed the analytical frameworks of four legendary investors: Warren Buffett (business moats and management quality), Charlie Munger (risk assessment and mental models), Duan Yongping (business quality and network effects), and Li Lu (civilization-level trends and industry structure).
How does the parallel execution work technically?
The skill generates four TaskCreate calls with run_in_background = true and dispatches them in a single message. This launches four general-purpose sub-agents concurrently, each executing web searches and analysis independently while the team-lead monitors progress. This architecture mimics how human research teams work asynchronously on different aspects of the same coverage stock.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →