What Is the Mirror Test in Investment Research? The AI Berkshire Sanity Check Explained
The mirror test in investment research is a strict five-sentence validation gate that requires analysts to articulate their complete investment thesis—including business understanding, competitive moat, management quality, valuation, and downside risk—before any capital can be committed.
The xbtlin/ai-berkshire open-source framework embeds the mirror test (镜子测试) as the final checkpoint after its six-gate "Buffett Checklist." According to the repository's README.md, if an analyst cannot produce five complete sentences summarizing the investment rationale, the opportunity is automatically discarded regardless of other metrics.
The Five-Sentence Structure of the Mirror Test
As defined in skills/investment-checklist.md, the mirror test requires a specific narrative structure. Each sentence addresses a critical component of value investing:
1. Business Model Comprehension
The first sentence must summarize the underlying business in a single statement and explicitly confirm the analyst's understanding. This eliminates investments in companies with overly complex or opaque operations.
2. Competitive Moat Assessment
The second sentence describes the company's economic moat—whether derived from brand loyalty, network effects, or cost advantages—and specifies whether that moat is widening or narrowing.
3. Management Trustworthiness
The third sentence evaluates the quality and integrity of the leadership team. According to the framework's logic in skills/investment-research.md, management must be "trustworthy" and aligned with shareholder interests.
4. Price-to-Value Comparison
The fourth sentence quantifies the current market price relative to intrinsic value, expressed as a discount or premium. This ensures a margin of safety is explicitly acknowledged.
5. Downside Risk Argument
The fifth and final sentence identifies specific risks if the thesis proves wrong and argues why those risks are limited. This guards against optimistic bias by forcing acknowledgment of failure scenarios.
Enforcement: The No-Exception Rule
The README.md (lines 73–75) establishes a binary enforcement mechanism:
"5句话说不完整 = 不买。没有例外。"
Translation: "Five sentences incomplete equals do not buy. No exceptions."
If any of the five required elements are missing or incomplete, the system outputs ❌ 未通过镜子测试 (Mirror Test Not Passed) and terminates the investment process. This hard stop prevents "half-baked" ideas from consuming additional research resources.
How to Implement the Mirror Test
The AI Berkshire framework provides two primary methods for executing the mirror test: through the automated skill or via manual composition.
Using the Investment-Checklist Skill
The investment-checklist skill automatically generates the mirror test after evaluating the six-gate checklist. Invoke it using:
/investment-checklist 腾讯, 美团, 拼多多
For each ticker passing the initial gates, the skill outputs a formatted mirror test paragraph following the five-sentence template:
"我以 380 港元 买入 腾讯,因为:
1️⃣ 这门生意的本质是 社交网络 + 数字内容平台,我理解它;
2️⃣ 护城河是 12 亿用户的社交关系链,且在变宽;
3️⃣ 管理层 Pony Ma 低调务实、资本配置优秀,值得信赖;
4️⃣ 当前价格相当于内在价值的 8 折,有安全边际;
5️⃣ 即使我错了,下行风险可控,因为 账上净现金 > 2000 亿元、游戏现金流强劲。"
If validation fails, the output contains:
❌ 未通过镜子测试 – 5 句话说不完整。
Manual Implementation in Python
For custom research scripts, implement the validation logic using the mirror_test function pattern found in the codebase:
def mirror_test(company, price, business, moat, mgmt, discount, downside):
"""
Generate a five-sentence Mirror Test statement.
"""
return f"""我以 {price} 买入 {company},因为:
1️⃣ 这门生意的本质是 {business},我理解它;
2️⃣ 护城河是 {moat},且在变宽/变窄;
3️⃣ 管理层 {mgmt},值得/不值得信赖;
4️⃣ 当前价格相当于内在价值的 {discount} 折,有/无足够安全边际;
5️⃣ 即使我错了,下行风险 {downside}。"""
# Example execution
result = mirror_test(
"美团",
"120 港元",
"本地生活服务平台",
"双边网络效应",
"王兴战略眼光出色",
"10 折",
"可控(现金流正)"
)
This function enforces the five-sentence structure required by the framework's validation layer.
Source Code Architecture
The mirror test is implemented across three key files in the xbtlin/ai-berkshire repository:
README.md: Defines the philosophical rationale and the strict "no exception" rule (lines 73–75).skills/investment-checklist.md: Contains the template generation logic and automatic validation that rejects incomplete theses.skills/investment-research.md: Integrates the mirror test as the final gate in the broader investment research pipeline.
Summary
The mirror test in investment research acts as a final sanity check within the AI Berkshire framework:
- Requires five complete sentences covering business, moat, management, valuation, and risk.
- Enforces automatic rejection if any component is missing, with no exceptions permitted.
- Prevents overconfidence by forcing analysts to articulate verbalizable investment edges.
- Generates executive summaries that serve as transparent records for stakeholders and compliance review.
Frequently Asked Questions
What happens if I cannot complete all five sentences of the mirror test?
According to the README.md source code, the investment is immediately rejected with the status ❌ 未通过镜子测试. The framework treats incomplete theses as insufficient research, preventing capital allocation regardless of other favorable metrics.
Does the mirror test replace the six-gate Buffett Checklist?
No. The mirror test operates as a final validation gate that runs only after a company passes the six-gate Buffett Checklist. As implemented in skills/investment-research.md, it serves as the last step before confirming an investment decision.
Can the mirror test be used outside of the AI Berkshire framework?
Yes. While the investment-checklist skill provides automated generation, the underlying five-sentence structure can be implemented manually in any investment process. The mirror_test Python function demonstrates how to enforce this discipline in custom research workflows.
Why does the mirror test require exactly five sentences?
The five-sentence constraint forces concise articulation of a complete investment thesis. According to the repository's design, if an analyst cannot summarize the business, moat, management, valuation, and risk in this compact format, the underlying research likely lacks clarity or depth, signaling potential overconfidence or analysis gaps.
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 →