The Four Value Investor Perspectives Integrated in AI Berkshire: Architecture and Implementation

AI Berkshire integrates the investment philosophies of Warren Buffett, Charlie Munger, Duan Yongping, and Li Lu into a multi-agent AI framework where four parallel agents independently score investments and a team-lead synthesizes their conflicting viewpoints into a disciplined final verdict.

The open-source repository xbtlin/ai-berkshire hard-wires these four value investor perspectives into every research request. By systematizing the methodologies of these celebrated investors—each focusing on distinct analytical lenses—the framework generates multiple contradictory signals that force rigorous evaluation beyond what single-master approaches can achieve.

The Four Value Investing Masters Behind AI Berkshire

According to README_EN.md, the repository explicitly “systematizes the methodologies of four value investing masters — Buffett, Munger, Duan Yongping, and Li Lu” into a unified research framework. Each master contributes a unique analytical lens:

Warren Buffett – Financial Valuation

The Buffett agent emphasizes financial valuation through metrics like ex-cash P/E ratios, cash-flow generation, and margin of safety calculations. This perspective relies on exact-precision calculations implemented in tools/financial_rigor.py to ensure quantitative rigor.

Charlie Munger – Inversion and Moat Analysis

The Munger agent applies inversion (asking “how could this fail?”) and evaluates competitive durability through moat analysis. This lens introduces structured anti-bias checks and quick-kill checklists derived from Munger’s mental models.

Duan Yongping – C2M Business Model Strength

The Duan Yongping agent focuses on business-model strengths and C2M (customer-to-manufacturer) capabilities. This perspective prioritizes scalable, hard-to-replicate models that create lasting competitive advantages in the underlying economics.

Li Lu – Long-Term Certainty

The Li Lu agent concentrates on long-term certainty factors including management quality, cultural fit, and ten-year survivability assessments. This viewpoint ensures investments meet high thresholds for durability and alignment beyond financial metrics.

How the Four-Perspective Architecture Works

When a research request is initiated, AI Berkshire spawns four parallel agents—each adopting one of the four value investor perspectives. As visualized in assets/architecture.png, these agents conduct independent research across full web searches and return scores on a 0-5 scale.

A team-lead agent then synthesizes these independent viewpoints. The tension among contradictory scores—such as Buffett’s high valuation marks versus Li Lu’s culture concerns—creates a dialectic process that produces more robust decisions than any single viewpoint could provide.

This architecture delivers three critical advantages:

  1. Multiple contradictory signals that force explicit reconciliation of differences
  2. Parallel research that multiplies coverage (four agents × full web search)
  3. Structured anti-bias checks (e.g., inversion tests, quick-kill checklists) derived directly from the masters’ teachings

Invoking the Four-Master Research Flow

You can trigger the four value investor perspectives analysis through multiple interfaces documented in the codebase.

Using Claude Code (Slash Command)

/investment-research
company: Pinduoduo

This command invokes the skill defined in skills/investment-research.md, spawning four agents that return independent scores and commentary before synthesis.

Using the Codex Skill (CLI)

python3 -m codex.run_skill \
  --skill investment-research \
  --args "company=Pinduoduo"

The Codex wrapper in codex-skills/investment-research/SKILL.md executes the same workflow, returning a JSON response with separate fields for duan, buffett, munger, and li_lu.

Calling an Individual Master (Debugging)

python3 -m codex.run_skill \
  --skill investment-research \
  --master buffett \
  --args "company=Pinduoduo"

This approach isolates a single perspective—useful for comparing individual lens outputs against the full dialectic synthesis generated by the four value investor perspectives.

Inspecting Generated Reports

cat reports/Pinduoduo/analysis.md

The resulting markdown report contains a synthesis table:

| Master | Score | Commentary |
|--------|-------|------------|
| Duan Yongping | 3.7/5 | Great C2M model … |
| Warren Buffett | 4.4/5 | Ex-cash P/E 6.3× … |
| Charlie Munger | 3.5/5 | Moat shallower … |
| Li Lu | 2.0/5 | Management culture concerns … |

Key Implementation Files

The four value investor perspectives are embedded throughout the repository structure:

File Role
README_EN.md Documents the four-master concept and overall architecture
assets/architecture.png Visualizes the parallel-agent layout
skills/investment-research.md Defines the skill that triggers the four-master dialectic
tools/financial_rigor.py Provides exact-precision calculations for Buffett-style valuation
codex-skills/investment-research/SKILL.md Codex wrapper for CLI integration

Summary

  • AI Berkshire hard-wires four distinct value investing philosophies—Buffett (valuation), Munger (inversion/moat), Duan (C2M business model), and Li Lu (long-term certainty)—into every research request.
  • Parallel agent architecture creates constructive tension through independent 0-5 scoring and team-lead synthesis as shown in assets/architecture.png.
  • Multiple invocation methods support both Claude Code slash commands and CLI execution via codex.run_skill.
  • Source files including README_EN.md and skills/investment-research.md explicitly define the four-master framework and dialectic process.

Frequently Asked Questions

How does AI Berkshire handle conflicting opinions between the four investors?

When the four agents return divergent scores—such as high marks from Buffett but low marks from Li Lu—a team-lead agent synthesizes these viewpoints into a final verdict. This dialectic process forces explicit reconciliation of contradictions, creating a more disciplined decision than any single perspective could provide.

Can I run AI Berkshire analysis for just one investor instead of all four?

Yes. The CLI supports --master flags to isolate individual perspectives. For example, adding --master buffett to the codex.run_skill command executes only the Buffett-style valuation, useful for debugging or comparing specific lenses against the full synthesis of the four value investor perspectives.

What scoring scale does AI Berkshire use for investment evaluation?

Each of the four value investor perspectives returns scores on a 0-5 scale. The final report presents these scores in a comparison table alongside qualitative commentary from each master, enabling clear visualization of where the four perspectives agree or diverge.

Where is the four-master architecture documented in the codebase?

The architecture is explicitly defined in README_EN.md where the repository states it “systematizes the methodologies of four value investing masters.” The visual architecture diagram appears in assets/architecture.png, while the implementation details reside in skills/investment-research.md and codex-skills/investment-research/SKILL.md.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →