# How the `/earnings-team` Skill Converts Quarterly Earnings Analysis into Publish-Ready Articles

> Discover how the /earnings-team skill transforms quarterly earnings data into publish-ready articles through an advanced four-stage agentic pipeline, ensuring synthesized analysis and automated checks.

- Repository: [Xbt Lin/ai-berkshire](https://github.com/xbtlin/ai-berkshire)
- Tags: how-to-guide
- Published: 2026-06-26

---

**The `/earnings-team` skill deploys a four-stage agentic pipeline that parallelizes research across four master agents, synthesizes consensus-driven analysis, and enforces automated editorial and audit checks to deliver WeChat-ready public articles from raw quarterly earnings data.**

The `xbtlin/ai-berkshire` repository implements a sophisticated multi-agent system for financial content generation. The `/earnings-team` skill transforms unstructured quarterly earnings filings into rigorously validated public articles through systematic collaboration between specialized research agents and automated quality assurance tools.

## Stage 1: Parallel Research by Four Master Agents

As defined in [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md) (lines 55-57), the skill launches four parallel **Agent** instances simultaneously, each embodying a distinct investment philosophy:

- **段永平**: Analyzes revenue structure and competitive positioning
- **巴菲特**: Validates cash flow patterns and capital allocation  
- **芒格**: Examines industry trends and competitive moats
- **李录**: Assesses management tone and risk signals

Each agent executes a domain-specific checklist against primary sources including SEC filings, earnings call transcripts, and quantitative datasets. Agents annotate source reliability (A/B/C grades) and validate quantitative claims using the **Financial Rigor Toolkit** ([`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py)). For example, the 巴菲特 agent invokes cross-source validation (lines 110-113) via:

```bash
python3 ~/ai-berkshire/tools/financial_rigor.py cross-validate \
  --metric "revenue" --values {值1} {值2} --sources "来源1" "来源2"

```

## Stage 2: Team Lead Synthesis

After the research agents complete, the **Team Lead** consolidates outputs as specified in lines 44-48 of [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md). This synthesis process:

- Identifies consensus viewpoints across the four masters
- Surfaces contradictions requiring resolution  
- Flags omitted analytical angles

The result is a structured markdown research report (template defined in lines 52-84) containing a one-sentence headline, three key changes, a four-master scoring table, core data tables, and actionable investment implications ("what each master would do").

## Stage 3: Editorial Production and Review

The pipeline splits into two parallel publication tracks defined in [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md) (lines 91-174):

**Editor Agent (Agent 5)** rewrites the research report into reader-friendly content applying:

- **倒金字塔** (inverted pyramid) narrative structure
- Concise, WeChat-compatible formatting
- Preservation of all data citations and master quotes

**Reader Review Agent (Agent 6)** evaluates the draft against four criteria:

- Readability and information density
- Credibility of sources
- Actionable guidance for investors
- Mandatory compliance checks

The Team Lead incorporates mandatory edits from the Reader Review before proceeding to final validation.

## Stage 4: Automated Quality Gate and Publication

Before marking the article **【准出】** (approved for release), the skill executes rigorous validation through [`tools/report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/report_audit.py) (lines 14-23 of [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md)):

```bash
python3 ~/ai-berkshire/tools/report_audit.py extract \
  --report reports/{公司名}/{公司名}-earnings-{期间}.md

python3 ~/ai-berkshire/tools/report_audit.py verdict \
  --results '<填好的JSON>' \
  --report {报告文件名}

```

The audit leverages the **Financial Rigor Toolkit** to perform market capitalization verification, cross-source validation, Benford's law analysis for numerical authenticity, and exact calculation checks. Only when all sanity checks pass does the article receive final publication approval and output to `reports/{company}/{company}-earnings-{period}.md`.

## Key Implementation Files

| File | Function |
|------|----------|
| [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md) | Orchestrates the four-stage pipeline and agent coordination (lines 44-174) |
| [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) | Provides command-line validation for financial metrics and cross-source checks |
| [`tools/report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/report_audit.py) | Performs final extraction and automated quality verification (lines 14-23) |
| `reports/{company}/{company}-earnings-{period}.md` | Destination path for publish-ready articles |

## Summary

- The `/earnings-team` skill implements a **four-stage pipeline** (Research, Synthesis, Publication, Quality Gate) to transform raw earnings data into public articles.
- **Four parallel master agents** (段永平, 巴菲特, 芒格, 李录) conduct specialized quarterly earnings analysis simultaneously, each following domain-specific checklists defined in [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md) (lines 55-57).
- The **Team Lead** synthesizes multi-perspective analysis into a structured markdown report (lines 52-84), identifying consensus and contradictions.
- **Dual publication agents** (Editor and Reader Review) enforce reader-centric formatting and quality standards (lines 91-174) before the final audit.
- **Automated validation** via [`tools/report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/report_audit.py) and [`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py) ensures numerical accuracy and source reliability before marking content **【准出】**.

## Frequently Asked Questions

### What are the four master agents in the research stage?

The research stage deploys four parallel agents embodying distinct investment philosophies: **段永平** (revenue structure analysis), **巴菲特** (cash flow validation), **芒格** (competitive trend assessment), and **李录** (management tone and risk signal detection). Each agent operates according to a specialized checklist defined in [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md) (lines 55-57), pulling from primary sources like SEC filings and earnings call transcripts.

### How does the skill ensure numerical accuracy before publication?

Numerical accuracy is enforced through the **Financial Rigor Toolkit** ([`tools/financial_rigor.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/financial_rigor.py)) and the final **Quality Gate**. The system runs [`tools/report_audit.py`](https://github.com/xbtlin/ai-berkshire/blob/main/tools/report_audit.py) (lines 14-23) to execute market-cap verification, cross-source validation using the `cross-validate` function, Benford's law checks for data authenticity, and exact calculation verification. Only articles passing all automated audits receive the **【准出】** designation.

### What editorial standards does the publication stage enforce?

The **Editor Agent** applies **倒金字塔** (inverted pyramid) structure, ensuring critical information appears first with concise headings and WeChat-compatible formatting. The **Reader Review Agent** subsequently evaluates readability, information value, credibility, and actionable guidance. The Team Lead must resolve all mandatory edits flagged by the Reader Review before the article proceeds to the audit phase.

### How does the Team Lead resolve contradictions between agent analyses?

During the **Synthesis** stage (lines 44-48 of [`skills/earnings-team.md`](https://github.com/xbtlin/ai-berkshire/blob/main/skills/earnings-team.md)), the Team Lead programmatically merges the four master outputs to identify consensus viewpoints, highlight contradictions, and detect omitted angles. This structured reconciliation produces a unified research report that acknowledges divergent perspectives while prioritizing data-backed consensus, mirroring human research team deliberation workflows.