What Is the Mirror Test in Investment Checklists? AI Berkshire’s 5-Sentence Rule Explained

The mirror test is a decisive final gate that forces analysts to articulate five concise statements—covering business essence, moat, management, valuation safety margin, and downside risk—before any capital is allocated; if any statement is incomplete or ambiguous, the investment is automatically rejected.

The mirror test (镜子测试) is a core discipline implemented in the xbtlin/ai-berkshire open-source investment framework. As the seventh and final checkpoint in the systematic checklist workflow, it operationalizes Warren Buffett’s principle that an investment thesis must be transparent and defensible enough to fit into five sentences.

What Is the Mirror Test?

The mirror test serves as a "hardened gate" that follows six preliminary evaluations: ability-circle, good-business, moat, management, safety-margin, and discipline. According to the repository’s README.md (lines 83-84), the test requires the analyst to generate a mirror-image of the investment thesis—five specific statements that together capture the complete rationale for buying the security.

The system enforces a strict binary outcome: if the five sentences are incomplete or incoherent, the checklist automatically fails the company (❌ 未通过). As documented in skills/investment-checklist.md (lines 75-86), the rule is absolute: "5句话说不完整 = 不买。没有例外。" (Five sentences incomplete = do not buy. No exceptions.)

The Five Mandatory Statements

To pass the mirror test in the AI Berkshire framework, the analyst must produce exactly five clauses, each addressing a critical pillar of value investing.

1. Business Essence

A one-sentence description of what the company makes and confirmation that the analyst understands it. This eliminates investments in obscure or overly complex business models.

2. Moat Assessment

Identification of the core competitive advantage and a judgment on whether that moat is widening or narrowing. The statement must articulate why competitors cannot easily replicate the advantage.

3. Management Evaluation

A clear verdict on the credibility and trustworthiness of the leadership team. This typically references capital allocation discipline and alignment with shareholder interests.

4. Valuation Safety Margin

The purchase price expressed as a fraction of intrinsic value (e.g., "80% of fair value"). This data is often calculated by tools/financial_rigor.py, which provides the precise valuation metrics feeding this clause.

5. Downside Risk

A concrete statement confirming whether the downside is controllable and why. This aligns with Buffett’s "first rule is never lose money" by forcing explicit acknowledgment of worst-case scenarios before capital commitment.

How the Mirror Test Is Evaluated

The evaluation process combines automated generation with human judgment, implemented across several files in the repository.

  1. Generate the five-sentence block: The system automatically inserts placeholders for price, moat description, and risk factors based on data processed in scripts/sync-codex-skills.py, which generates the executable Codex skill for the /investment-checklist command.

  2. Human review: The analyst reads the generated block; any missing or ambiguous clause triggers an immediate "fail" status.

  3. Binary outcome: The system outputs a clear marker—✅ 通过镜子测试 (Pass) or ❌ 未通过镜子测试 (Fail).

  4. Workflow integration: If the mirror test fails, the final output marks the entire checklist as 未通过, and the company is barred from proceeding to deeper research stages.

Implementation in Source Code

The mirror test logic is distributed across three key files in the xbtlin/ai-berkshire repository:

  • README.md (lines 83-84): Contains the high-level philosophy and the strict enforcement rule ("no exceptions").
  • skills/investment-checklist.md (lines 75-86): Defines the step-by-step format for the five sentences and the pass/fail criteria.
  • tools/financial_rigor.py: Supplies the valuation calculations that populate the "price vs intrinsic value" statement.

These files ensure the mirror test is not merely advisory but a technical gate that blocks incomplete theses from advancing.

Practical Usage Examples

Below are runnable examples demonstrating how the mirror test appears in the AI Berkshire workflow.


# Run the checklist for a single ticker

/investment-checklist 腾讯

Expected mirror test output:

#### 镜子测试

"我以 380 港元 买入 腾讯,因为:
1. 这门生意的本质是 **社交网络 + 数字内容平台**,我理解它;
2. 护城河是 **12 亿用户的社交关系链**,且在变宽;
3. 管理层 **马化腾低调务实、资本配置优秀**,值得信赖;
4. 当前价格相当于内在价值的 **80%**,有足够安全边际;
5. 即使我错了,下行风险可控,因为 **账上净现金>2000 亿、游戏现金流强劲**。"
✅ 通过镜子测试

For batch analysis:


# Compare multiple companies

/investment-checklist 腾讯, 茅台, 拼多多

The output generates individual mirror test blocks for each ticker. Any company missing a complete five-sentence block displays ❌ 未通过镜子测试 and receives a "未通过 Checklist" marker in the final comparison table, preventing further capital allocation analysis.

Summary

  • The mirror test is the final gate in the AI Berkshire investment checklist, requiring exactly five concise statements.
  • The five statements must cover business essence, moat, management, valuation safety margin, and downside risk.
  • Incomplete articulation results in automatic rejection, enforcing strict discipline regardless of other attractive metrics.
  • Evaluation combines automated data population via tools/financial_rigor.py with mandatory human review of the five-sentence block.
  • Source definitions reside in README.md and skills/investment-checklist.md, making the rule transparent and auditable.

Frequently Asked Questions

What happens if I cannot complete all five sentences?

If any of the five required statements are missing or vague, the checklist automatically marks the investment as failed (❌ 未通过镜子测试). According to the repository documentation, there are no exceptions—even if other metrics appear favorable, the company is rejected from deeper research stages until a complete, coherent five-sentence thesis can be articulated.

Is the mirror test automated or manual?

The process is hybrid. scripts/sync-codex-skills.py generates the executable skill and populates placeholders with financial data from tools/financial_rigor.py, but the final evaluation requires human review to confirm the five statements are complete, accurate, and coherent before the ✅ 通过镜子测试 marker is applied.

Which file contains the mirror test logic?

The primary definition and enforcement rules are located in skills/investment-checklist.md (lines 75-86), with the high-level philosophy and strict "no exceptions" rule documented in README.md (lines 83-84). The valuation data feeding the safety-margin statement is calculated by tools/financial_rigor.py.

How does the mirror test relate to Warren Buffett's investment principles?

The mirror test operationalizes Buffett’s dictum that the first rule is never lose money and that an investor should never purchase what they cannot explain simply. By forcing a five-sentence limit that explicitly addresses downside risk and business understanding, the test ensures capital is only allocated to transparent, defensible theses that the analyst truly comprehends.

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 →