Jason Zou
01Stock diligence packClaude plugin · v1.0.4 · 57 files

A full diligence pack on a listed company, from one request

Getting up to speed on a listed company takes a lot of assembly before any real thinking starts. This plugin does that assembly. Give it a company and it builds a linked three-statement DCF, checks the model, and writes the assumptions memo and the report. It doesn't give a view on the company. Spotify is the worked example on this page.

Version
1.0.4 · stock-diligence, a plugin for Claude
Files
57 · 12 skills, 10 agent briefs, 15 scripts, 13 playbooks and 7 configs and references
Outputs
Word and PDF report, DCF workbook, assumptions memo and manifest, plus the companion pack on request
Example
Spotify, valuation date 4 September 2026
Source
Read it in the viewer below. There is no public repository yet.

What a run produces

A full run gives you the report, the workbook, the memo and the manifest. Four companion files come on request. The narrower skills each deliver one piece, plus a manifest.

TICKER_DCF.xlsx
14 tabs

Linked three-statement DCF

One cell picks among the four scenarios, and both terminal methods sit side by side. dcf_build.py writes the workbook from one JSON file and dcf_validate.py tests it. The Street case must pass all 17 checks. Open the Spotify model below.

TICKER_diligence_report.docx · .pdf
13 sections

The report

Thirteen sections follow report_skeleton.json, from the tear sheet to the theses, deciding questions and a pre-mortem. Standard mode targets about 50 pages and fails above 100. Extensive mode has no cap. The report makes no recommendation. See each section.

TICKER_DCF_assumptions_memo.docx

Assumptions memo

Each lever gets a table and three paragraphs headed Anchor, Mechanism and What would change it. Values come from the workbook through memo_data.json. The Spotify memo runs to eight pages. I tried a one-page table, and it was unreadable.

MANIFEST.md

Manifest

The manifest lists the files with their as-of dates and sources, failed tools and data gaps. It also records the defaults the run took instead of asking, open reviewer findings, and suggested tool changes for the user to apply.

Internal two-pager · .docx and .pdf

Internal two-pager

It holds an overview, a numbered sector thesis, five key metrics and numbered risks. two_pager_check.py requires exactly two pages, the second at least 85% full. The price target defaults to the Street-case value, and the document names the case used.

Filings folder · earnings digest · primer · tear sheet

Companion pack (full pack only)

The filings folder holds the annual report, four interims, the proxy, decks and the latest transcript. The earnings digest covers the last four to eight calls, a page each, and the primer shows how money flows through the industry.

work/

The workspace

The work folder keeps the data, filings, research and model beside the deliverables. The model folder holds the workbook, scen.json and memo_data.json. A refresh, a rerun for a new quarter or price, updates only the affected sections.

01.2How a run worksSeven phases · one orchestrator · ten subagents

Who does what in a run

In the current version, one agent, the orchestrator, pulls the data, merges the research and renders the report. Five analyst subagents do the research, and one builds and checks the model. Five reviewer subagents then read the report. Scroll below or click a phase.

SchematicFull diligence run · seven phases
  • Phase 0 · scope confirmed, defaults recorded
  • Phase 1 · filings, decks, transcripts, prices, statements
  • Phase 2 · event_scan, technicals, margin_bridge, build_exhibits
  • Phase 3 · five analyst subagents in parallel
business≤25 fetches or searchesevents≤20 searchesstreet≤15 searchesstatements≤10 fetchesvaluation≤3 build cycles
  • Phase 4 · workbook validated, zero errors, ALL OK
  • Phase 5 · report assembled, rendered, converted to PDF
  • Phase 6 · qa_gates, review panel, fixes, manifest
investment partner · sections 0, 7, 12banking MD · sections 4, 11research partner · sections 5, 6, 7, 9red team · every sectionQA auditor · checklist and qa_gates.py
✓ Checks tab reads ALL OK · files delivered
Phases 0 to 2 · orchestrator

Scope and data

The orchestrator confirms the ticker and latest filing. Where it would otherwise ask, it takes a default and records it. data_pull.py fetches ten years of prices and the statements, and build_exhibits.py writes the numeric exhibits. Gaps go in the manifest.

Phase 3 · five analyst subagents in parallel

The five analysts

Each analyst gets the plugin's non-negotiable rules word for word, reads only its own playbook and inputs, and writes one JSON file with a block per report section. The orchestrator merges those files and ignores the analysts' chat replies.

Business≤25 fetches or searchesEvents≤20 searchesStreet≤15 searchesStatements≤10 fetchesValuation≤3 build cycles
Phases 4 and 5 · valuation analyst, then orchestrator

Validation, assembly and rendering

The valuation analyst builds the workbook, and dcf_validate.py recalculates all four scenarios and looks for formula errors. Once the Street case passes every check, the analyst writes the memo. The orchestrator then assembles the report in Word and PDF.

Phase 6 · five reviewer subagents in parallel

The review panel

The orchestrator writes MANIFEST.md and runs qa_gates.py on the PDF. Five reviewer subagents then read the report. Each is prompted as a different kind of reader, sticks to the sections its brief covers, and returns at most ten findings, ranked and tagged FAIL or IMPROVE. The orchestrator makes the fixes.

Investment partner0 · 7 · 12Banking MD4 · 11Research partner5 · 6 · 7 · 9Red teamallQA auditorchecklist
Delivery

Fixes and delivery

A second review round runs only after a FAIL or more than five fixes, and a third only after another FAIL. Open items and suggested tool changes go in the manifest. The report, workbook, memo and manifest are delivered.

01.3Source viewerstock-diligence v1.0.4 · excerpts

The plugin's source

The viewer holds excerpts from the plugin's files. Click a file in the tree to read it, or step through a full run, a short express run or a refresh of an earlier one in the right-hand pane. The pane shows the current plan, not a recording of a real run. There's no public repository yet.

Source
stock-diligence · excerpts
Walkthrough
Full diligence on TICKER

This shows the current version's phases and call budgets step by step. It is not a recording of a run.

The tree holds the skills, the ten agent briefs, the thirteen playbooks and the fifteen scripts. Long files appear as excerpts and keep the line numbers of the original.

01.4The Spotify modelSPOT_DCF.xlsx · rebuilt from the plugin and recalculated

The Spotify model

dcf_build.py wrote this Spotify workbook from the plugin's input file, and LibreOffice recalculated it with zero errors. The gain on the notes is entered net, at €154m, not the gross €184m in the shipped file. The 52-week range is blank because price history isn't bundled.

XLSXSPOT_DCF.xlsx · 14 tabs · valuation date 4 September 2026
Case (Cover!B4)
Value per share$515.03−5.2% vs $543.17 on 4 Sep 2026ALL OK
Cover!B4fx1
Click a cell to see its formula and follow its references.
Loading the workbook…

Colours follow banking convention, with yellow for key levers and outputs. The Bear case's one CHECK flag is allowed, and consensus is Yahoo Finance's from 4 September 2026.

How the model is built

The build has fourteen steps, set out in dcf-build-process.md and carried out by dcf_build.py. The builder reads one input file and writes formulas, not values.

  1. Inputs and config. All company-specific values live in one JSON config file. They go on the Inputs tab as blue cells with source notes. The projection sheets share one column layout, five actual years then ten forecast, so cross-sheet references need no offset.
  2. Revenue build. Revenue uses drivers suited to the business and ties exactly to the last actual year. The shipped Drivers block handles subscribers × ARPU plus advertising. The playbook adds retail and SaaS builds and skips the DCF for banks and insurers.
  3. Margins and operating costs. Operating income comes from segment gross margins and opex lines as a percentage of revenue, with SBC shown separately within opex. Years one and two are anchored to consensus, year five to management's targets, and the path fades from there.
  4. Working capital. Receivables follow revenue, payables and accruals follow cost of revenue, and deferred revenue follows subscription revenue, all at the last actual year's ratios. The change in net working capital comes off the balance sheet, so no balancing figure is needed.
  5. Capex, D&A and fixed assets. Capex and D&A are set as a percentage of revenue, and PP&E, right-of-use assets and intangibles roll forward by capex less D&A. The playbook allows the percentage-of-revenue shortcut only for asset-light companies and asks for a full PP&E roll-forward otherwise.
  6. Debt schedule. Each instrument gets a block from opening to closing balance, with interest charged on the opening balance, and the schedule feeds all three statements. The shipped builder has blocks for exchangeable notes and leases, with a note to add revolvers, term loans and bonds.
  7. Tax and the three-statement links. Tax is the cash tax rate times pre-tax income, floored at zero. Finance income is earned on opening cash, so there's no circularity. Cash ties to the cash-flow statement, equity rolls forward, and operating cash flow reverses non-cash gains.
  1. Unlevered free cash flow and timing. UFCF is EBIT after cash tax, plus D&A, less capex and the working-capital increase. SBC is added back only if toggled on, and interest income is left out. The first forecast year is a stub, and mid-year discounting is optional.
  2. WACC. CAPM sets the cost of equity, using a Blume-adjusted beta and the 10-year government yield in the cash-flow currency. Debt is costed from bonds or the lease rate. A strip shows cost of equity at betas from 1.0 to 1.8.
  3. Terminal value, both methods. Gordon and EV/EBIT exit values sit side by side, and a toggle makes Gordon, exit or their average the headline. The DCF tab also shows the terminal value's share of EV, the implied exit multiple and growth, and implied ROIC.
  4. EV-to-equity bridge. It adds cash and investments to EV and deducts leases, debt and minority interests. Equity value is rolled to the valuation date, then divided by today's diluted shares (treasury-stock method) at spot FX. EPS uses a projected count, labelled approximate.
  5. Scenarios and toggles. All 14 drivers have Street, management, bull and bear rows, picked by one Cover cell. Toggles cover the terminal method, mid-year convention, SBC add-back, litigation contingency, roll-forward and Blume beta. dcf_validate.py runs all four scenarios and three toggles in LibreOffice.
  6. Sensitivities and the market-implied block. Two closed-form grids run WACC against terminal growth and the exit multiple, and a simplified third runs revenue CAGR against year-ten EBIT margin. The DCF tab also solves for the market-implied growth and exit multiple. See the reverse DCF page.
  7. Checks and validation. Of the Checks tab's 17 tests, eleven can FAIL the model and six plausibility bands raise a CHECK flag. I also reconcile the first forecast year line by line. None of this tests whether a copied figure matches its filing.
01.5Case study · SpotifySPOT · $543.17 on 4 September 2026

The Spotify test case

Spotify was the test company. When a run turned up a mistake, I fixed the tool as well, so the next run would not repeat it. The figures below come from the Spotify test runs and the rebuilt workbook, at a share price of $543.17 on 4 September 2026.

$515.03Street-case value per share, perpetuity growth method
$654.11The same case with an 18x EV/EBIT exit multiple. That multiple implies 5.6% perpetual growth against the 3.0% assumed, so the two methods disagree by 27%. The perpetuity growth value is the headline because 3.0% is the stated assumption.
$601.83Management case, built from the May 2026 Investor Day targets
$290–$721Range across the bear and bull cases, perpetuity growth method
3.6%Perpetuity growth the price implies on the Street cash flows
12.5xExit EV/EBIT the price implies in year ten
11.3xExit EV/EBIT implied by the model's own terminal value, a cross-check on the 18x
€81.0bnStreet-case enterprise value, 59% of it in the terminal value

What Spotify's price implies

On the workbook's simplified revenue and margin grid, the $543 price needs about 12% revenue growth for ten years and a terminal operating margin of 23 to 24%. The Street DCF sits below the price, the management case above. The tool's scenario weights are illustrative.

The report turns this into a dashboard of seven KPIs to watch. Each one shows its Street-case path and the level at which the bear case would become the base case.

Model against consensus · Street caseConsensus · Yahoo Finance, 4 Sep 2026
How close the Street case sits to consensus
ModelConsensusGap
FY2026E revenue, €m19,53219,5380.0%
FY2027E revenue, €m22,22822,309−0.4%
FY2026E diluted EPS, €12.1412.30−1.3%
FY2027E diluted EPS, €14.6215.51−5.7%
Cost of equity10.3%
RuleRevenue within ±1% and EPS within about ±5% of consensus before any other case is written; FY2027E EPS sits just outside that band. Residual EPS gaps usually come from finance income, tax or share count rather than operations. NoteThe FY2026E EPS of 12.14 is the model's figure with the notes gain entered net of FX, as the workbook section explains. Consensus is Yahoo Finance's as of 4 September 2026. Open the Consensus tab.

What the validation caught

A recalculation with zero errors only proves that the formulas evaluate. I found these four problems by reading the values back and reconciling them line by line.

01

A €154m balance-sheet break. A fair-value gain on the exchangeable notes, €184m less €30m of FX, sat in net income with nothing reversing it in operating cash flow. I traced it back to the line instead of plugging the difference. Replay it in the Checks tab.

02

A patch applied to the wrong builder file, so the buyback inputs never changed. Since then a fix counts only once its value has been read back, and a clean recalculation on its own is not enough.

03

Yahoo's free-cash-flow field was off by about 2.5x. It showed $1.5bn, while the company's own TTM figure was €3.3bn, about $3.8bn. FCF yield is now worked out from the company's figures.

04

Date inputs stored as strings. LibreOffice converted them on the fly and the model still evaluated, but Excel would have been fragile. Dates are now stored as real dates.

Fixes made after the runs

  • Check the earnings calendar before searching the news. One pass through the calendar confirmed 11 of the 15 largest moves over five years as earnings days.
  • Pick the benchmark for the episode. Spotify fell about 19% from 3 to 5 February 2026. The regression, with a 0.4 software beta, called it company-specific, but the news called it an AI-driven software selloff. The report reconciles both, and the playbook now names this case.
  • Label the basis on every table. A standardised data provider showed FY2023 operating income of −€199m, while the company reported −€446m.
  • Look for a mechanism before calling a miss a demand signal. In Spotify's case a payroll tax that moves with the share price explained two guidance misses and two beats.
  • Keep the pages portrait. The ten-column landscape tables for events and the product ledger became a five-column table plus cards. The eight-column quarterly tables now run the quarters as rows.
  • Write the summary and the tear sheet last, once the numbers are final.

How the tool developed

  • Spotify runsTwo runs on Spotify shaped the tool, a 56-page standard run and a 174-page extensive run with three audit rounds. The extensive run is now the reference for extensive mode, and the example report builder in the plugin comes from it.
  • Rebuilt so repeated work sits in scriptsThe numeric exhibits moved into scripts, the report got a fixed skeleton, and the DCF runs from one input file with one-command validation. The roles became ten subagents with call budgets, and express and refresh modes were added.
  • Split into twelve skillsAny component can now be called on its own, the internal two-pager included, and all of them share the rules, scripts and QA gates that sit under the main skill.

Estimating undisclosed figures

Some of the figures an investment case needs are not disclosed in the filings. The tool estimates one of these only when an identity links it to numbers that are disclosed. Estimates are labelled "(est.)" and the method is written up in an appendix.

estimation-methods.md · six steps, Appendix G
1 identity net adds = gross adds − churn × base
2 anchors every disclosed data point, old ones included
3 ranges low / most likely / high, each sourced
4 propagate Monte Carlo, 20,000 triangular draws; the band is the width of the assumed churn range, not an observed distribution
5 calibrate against a disclosed total
6 sensitivity which assumption dominates

For Spotify the tool assumed monthly churn of 2.5% to 5.0%, most likely 3.5%, and ran 20,000 draws to size gross subscriber additions and acquisition cost. Each such figure is labelled (est.) and carries its 10th to 90th percentile range.

01.6Inside the pack10 subagents · 15 scripts · 13 playbooks · 12 skills

Inside the plugin

The plugin is mostly briefs and rules. The blocks below are taken from the files. They cover the subagent briefs, the scripts and their checks, and the playbooks that set how a section is analysed. Most are folded, so open the ones you want.

ReferenceThe ten subagentswhat each reads and writes, and its budget

The ten subagents

Five analysts write the research, and one of them builds the model. The analysts get the plugin's non-negotiable rules and return a file path with a five-line summary. Five reviewers read the rendered report, each as a different kind of reader, and return findings only.

agents/business-analyst.md

Business analyst

Writes Section 1. That covers the industry's money flows, the company's eras, the product and monetisation ledger, unit economics, cost structure, the moat table, governance, KPIs, the deciding debates and the insight ledger.

Reads
business-understanding.md, the moat and unit-economics parts of analyst-craft.md, and estimation-methods.md when a figure it needs is not disclosed. Inputs come from work/filings, work/transcripts and work/data.
Writes
work/research/business.json, with blocks under the report-section keys 1, 2 and C (the glossary)
Limit
25 fetches or searches
agents/events-analyst.md

Events analyst

Confirms which of the largest moves fell on earnings days and records the EPS surprise for each, before anything else. It then traces the largest moves, runs and drawdowns to primary sources, picks the sector and theme benchmarks to compare them against, and drafts the chapters, the catalyst calendar and the risks.

Reads
event-attribution.md only. Its data comes from work/events (events.csv, runs.csv, drawdowns.csv) and work/data/earnings_dates.csv, plus the filings and releases for each date.
Writes
work/research/events.json, with blocks under the section keys 10 and 10.chapters
Limit
20 searches. It does not force a cause, so a move it cannot verify is marked unattributed.
agents/statements-analyst.md

Statements analyst

Reconciles the standardised figures with the as-reported ones and writes a reading for each quality-of-earnings check. It also writes up what changed and why, keeps the ledger of guidance given against results delivered, and gives its readings on the latest quarter.

Reads
Sections 4 to 6 of report-frame.md and the quality-of-earnings table in analyst-craft.md. Data comes from work/data/*.csv and work/bridge, from the as-reported statements and MD&A in work/filings, and from the company's decks.
Writes
work/research/statements.json, with blocks under the section keys 4, 4.bridges, 5, 6, A and 0.capital. It also writes the tear sheet's balance-sheet lines, taken from the latest filing.
Limit
10 fetches. The numeric exhibits come from build_exhibits.py, and this agent only writes the readings around them.
agents/street-analyst.md

Street analyst

Compiles consensus against actuals, the spread of price targets, the trend in estimate revisions, the named brokers with the assumptions they disclosed, and the set-up going into the next earnings print. It also writes the long and short theses, each with the KPIs that must hold for it to work and the questions that would decide it.

Reads
Sections 9 and 12 of report-frame.md and the expectations lens in analyst-craft.md. Data comes from work/data/estimates.json and from broker coverage found by search.
Writes
work/research/street.json, with blocks under the section keys 9 and 12. Each thesis is written as three paragraphs.
Limit
15 searches. Value Investors Club is read only through Claude in Chrome, with the user signed in.
agents/valuation-analyst.md

Valuation analyst

Writes the config, the workbook's one input file, then builds and checks the workbook. It writes the memo from the checked figures and builds the comps. The Street case, calibrated to consensus, comes first, and the others depart from it.

Reads
dcf-build-process.md (section 17 covers the config), assumptions-memo.md and comps-multiples.md. The Spotify config is the template.
Writes
work/model (the workbook, scen.json and the memo), plus work/research/valuation.json with blocks under the section keys 7, 7.history, 7.peers, 11.buybacks and G
Limit
At most three rounds of build and check. It adapts the workbook's Drivers block only when the revenue model is something other than subscription plus advertising.
agents/audit-investment-partner.md

Investment partner

Checks whether an investor could decide on a position from the report alone.

Prompted as
An investment partner deciding on a position. It checks what the price implies, probability-weighted value, skew, monitoring dashboard, pre-mortem and liquidity. It says whether each fix is company-specific or general.
Reads
Sections 0, 7 and 12 of the report, and the audit-panel section of analyst-craft.md
Writes
work/research/audit_pm.md
Limit
At most ten findings, ranked and tagged FAIL or IMPROVE. It fixes nothing itself.
agents/audit-banking-md.md

Banking managing director

Checks the capital structure, the capacity for capital allocation and for more debt, and any change-of-control constraints.

Prompted as
An investment banking managing director. It looks for the capital structure, the capacity for capital allocation and for debt, change-of-control constraints and strategic options, and for an equity story stated in one paragraph.
Reads
Sections 4 and 11 of the report, and the audit-panel section of analyst-craft.md
Writes
work/research/audit_ibmd.md
Limit
At most ten findings, ranked and tagged FAIL or IMPROVE. It fixes nothing itself.
agents/audit-research-partner.md

Equity research partner

Checks whether the estimates hold up and whether the set-up for the next earnings print is right.

Prompted as
The research partner who owns the estimates. It checks the model against consensus line by line, then the guidance ledger, KPI definitions, currency and the basis of each multiple.
Reads
Sections 5, 6, 7 and 9 of the report, and the audit-panel section of analyst-craft.md
Writes
work/research/audit_er.md
Limit
At most ten findings, ranked and tagged FAIL or IMPROVE. It fixes nothing itself.
agents/audit-red-team.md

Red team

Reads the whole report looking for anything that is wrong or overconfident.

Prompted as
A reader told to attack the report. It hunts for claims with no mechanism, unlabelled figures, benchmarks that contradict the story, inconsistent discount rates and estimates without a range.
Reads
The whole document and the audit-panel section of analyst-craft.md
Writes
work/research/audit_redteam.md
Limit
At most ten findings, ranked and tagged FAIL or IMPROVE. It fixes nothing itself.
agents/audit-qa.md

QA auditor

Checks the rendered report against the Report QA checklist and runs qa_gates.py on the PDF.

Prompted as
The QA auditor. It hunts for numbers that disagree across prose, tables and workbook, leftover placeholders, unsourced events, risks not tied to the model and breaches of the style rules.
Reads
The whole document, work/model/scen.json and the Report QA checklist in report-frame.md
Writes
work/research/audit.md, with the page, section and fix for each finding
Limit
At most ten findings, ranked and tagged FAIL or IMPROVE. It fixes nothing itself.
ReferenceThe fifteen scriptswhat each does and what it checks

The fifteen scripts

Twelve are written in Python and three in JavaScript, and all of them live under the main skill's scripts/ folder. Each one is listed with the checks it carries, taken from its header and its code.

ScriptWhat it doesWhat it checks
data_pull.pyPulls prices, statements, estimates, earnings history, insider and holder data, short interest, peer data and FX from yfinance, ten years by default.Each pull is wrapped so a failure is printed and recorded instead of stopping the run. Statement values are scaled to millions, FX is pulled only when the reporting currency differs from the trading currency, and its header lists yfinance's known defects.
event_scan.pyFlags the price moves that need attribution and splits each daily move into a sector component and an idiosyncratic residual.The 15 largest absolute daily moves by default; runs are three or more same-direction days totalling more than 10%, drawdowns are falls of more than 15% from the running peak; the idiosyncratic return uses a trailing 250-day beta to the sector ETF; volume against the prior 20-day average and forward one-month and three-month returns are recorded.
technicals.pyMeasures where the stock sits against its own history on each metric, with a z-score and percentile for each.Returns over 1, 3, 6 and 12 months; Bollinger (20,2) %B and bandwidth; distance to the 50-day and 200-day averages and recent crosses; RSI(14), 12-1 momentum, 30-day and 90-day realised volatility; the monthly MACD (12,26,9) regime.
margin_bridge.pyBuilds the margin bridges (each cost line shown as the share of gross profit or operating income it takes) and a waterfall chart for each period.Exits unless it finds revenue, gross profit and operating income rows; shows each line as a share of revenue, of gross profit, of operating income and of the profit line above it.
build_exhibits.pyBuilds the report's 36 numeric exhibits and the charts from the data folder, with no language model involved, in the renderer's block format.Every exhibit carries a source note; a missing input skips the exhibit and is listed in exhibits_gaps.json. Growth shows n/m when the base or the result is negative and missing values show n/d; the quarterly table carries the note that trailing twelve-month revenue at fiscal year-end must equal the fiscal-year total, a tie the QA auditor checks.
flow_diagram.pyDraws the industry money-flow diagram for Section 1 from a JSON spec, in a fixed three-column layout of payers, company and payees, so nothing is placed by hand.One horizontal arrow per flow, each label in its own box on its own lane, never over a node; return flows in red on a separate lane; node text wraps at a fixed width; 170 dpi.
dcf_build.pyWrites the 14-tab linked three-statement workbook from one JSON config with openpyxl. Everything company-specific lives in the config except the Drivers block, which implements the subscription-plus-advertising revenue build.Writes the 17-row Checks tab, whose overall status reads ALL OK, REVIEW CHECK ITEMS or FAIL; charges interest on opening balances, so there are no circular references; builds the grids as SUMPRODUCT formulas rather than data tables; colours cells as it writes them, then runs one style pass over every sheet.
dcf_validate.pyRecalculates the workbook in LibreOffice, runs all four scenarios and three toggles, writes a static scenario snapshot onto the Cover and saves scen.json.Stops on any formula error in the base recalculation and asserts zero errors in every scenario and toggle run; asserts that the exit toggle equals the side-by-side exit value within $0.05; resets the selector to the Street case and recalculates once more before saving.
dcf_builder_template.pyThe Spotify reference builder with its inputs written into the code, kept as the annotated original and read only when adapting the Drivers block to a new revenue model.Carries the same scaffold, 17 checks, sensitivity engine and style pass as dcf_build.py; its header lists the adaptation steps, which replace the scenario dictionary, the Drivers formulas, the history, the bridge items and the market data and keep everything else.
dcf_memo_builder.jsRenders the assumptions memo to Word from values read out of the recalculated workbook. The shipped file is the Spotify instance, so the prose is rewritten for each company and the structure kept.Keeps a fixed eight-section structure, from what the model concludes to the sources, and gives each lever a five-column values table followed by Anchor, Mechanism and What would change it.
assemble_report.pyMerges the script exhibits and every research block into one report spec, in the order fixed by report_skeleton.json, with a contents block first and a page break before every H1.Skips any exhibit or research key that does not exist and lists it as missing; merges blocks for the same section key across research files instead of overwriting them; prints the block count.
report_renderer.jsTurns the JSON report spec into a portrait Word document with numbered exhibits, a contents field, a header line and page numbers, and applies the table rules.Portrait only, ignoring landscape markers in the spec; splits any table wider than six columns into parts (a) and (b); right-aligns a column when at least 60% of its cells look numeric; starts every H1 on a new page and gives every exhibit a numbered title and an italic note.
qa_gates.pyRuns mechanical checks on the rendered PDF and prints a table for the manifest, with exit code 1 on any FAIL.Fails a standard report above 100 pages, any em dash, the label strings "Claim:", "Must be true:", "Evidence:" and "Deciding question:", landscape pages, and (est.) figures with no Appendix G. Warns outside 30 to 70 pages, when a section runs past 1.5 times its budget, and on placeholders such as [NEED and research pending.
two_pager_builder.jsBuilds the internal two-pager in its fixed format from a JSON spec with company, sector, ticker, price, date, price target, analyst, overview, thesis, metrics, risks and an optional logo.Garamond 11pt at 1.4 line spacing, left-aligned, 0.9-inch side margins; theses and risks as decimal-numbered items with lettered sub-points; key metrics as a two-row table between rules.
two_pager_check.pyChecks the rendered two-pager's length and how full its last page is, with exit code 1 on failure.Passes only with exactly two pages and the second page at least 85% filled.
ReferenceThe thirteen playbooksthe rules each one sets

The thirteen playbooks

A playbook is a reference file that fixes how one part of the report is analysed and written. Each analyst reads only the playbooks its brief names, so every company gets the same rules. Three or four rules from each are listed here.

analyst-craft.md

Analyst craft

The standards every section of the report is held to.

  • Start from the price. Work out the growth, terminal margin and horizon it implies before judging any forecast.
  • Any claim made in the narrative has to show up as a number in Section 4, 5 or 7, and any forecast line needs a mechanism behind it in Section 1.
  • There are fifteen quality-of-earnings checks, each with a formula and a threshold. A check is flagged when it is breached two years running.
  • A moat claim with no evidence behind it is labelled "asserted, not evidenced".
report-frame.md

Report frame

The playbook for the report itself, section by section from Section 0 to Section 12, plus the appendices.

  • Standard mode gives each section a page budget. When a section has to be compressed, the detail moves to the companion files instead of being dropped.
  • Standardised figures go in the body of the report and as-reported figures in Appendix A. Where the two differ by more than 2%, the difference is reconciled.
  • Section 0 carries a probability-weighted value at illustrative weights, the weight on the management case needed to reach the price, and the return skew. It also carries a monitoring dashboard, whose break levels are the bear-case inputs.
  • Section 12 writes each thesis as three paragraphs and ends with the deciding questions and a pre-mortem. It makes no recommendation.
dcf-build-process.md

DCF build process

The workbook's acceptance criteria, its architecture and modelling rules, the build-and-check loop, and the schema of the config file. All of it was written from a completed build.

  • The workbook ships only when it recalculates with zero errors, the checks read ALL OK in the Street case (the case built on consensus), each projection row uses a single formula, and every input carries a source note.
  • Interest is calculated on opening balances, SBC is treated as a real cost by default, and the share count is today's diluted count under the treasury stock method.
  • The Street case is calibrated first, with revenue within ±1% and EPS within about ±5% of consensus. Only then are the other cases written, each as a departure from it with a one-line reason.
  • A balance-sheet difference is traced to the exact line that causes it and is never plugged. The build, recalculate and fix loop runs at most three times.
cowork-orchestration.md

Orchestration

The plan for a run. It covers which roles run together in each wave, the prompt each role gets, the review rounds, and the fallback order when everything has to run as a single agent.

  • The analysts and reviewers run in parallel as separate model passes, each with its own brief. The orchestrator pulls the data and renders the report, and only the valuation analyst builds the model, so each number has one source.
  • Each subagent gets a budget of tool calls and a list of what it may read. It writes to a fixed path and returns that path with a five-line summary.
  • Research is written as JSON blocks, one per report section. Subagents do not write numeric exhibits, which come from the scripts.
  • Express mode, the short form of a run, uses three analysts and the QA auditor. Refresh mode, which brings an earlier run up to date, reruns only the analysts whose sections the new data touches.
data-sources.md

Data sources

Which sources rank above which, the known defects of each, and where each section of the report looks first.

  • SEC EDGAR and the company's own investor relations pages come first, then yfinance, then reputable secondary sources such as StockAnalysis, Trading Economics and the trade press.
  • The LSEG connector is not used. A probe on 5 September 2026 came back with entitlement errors for every data family.
  • The risk-free rate is the 10-year government yield in the model's currency on the valuation date. That means the Bund for a euro model and Treasuries for a dollar one.
  • The free cash flow field in yfinance is treated as unreliable. Its enterprise values for ADRs and its trailing P/E are flagged as known defects.
assumptions-memo.md

Assumptions memo

How the prose memo that ships with each DCF is structured, and the rules it follows.

  • Eight sections, starting with what the model concludes and ending with the sources.
  • Each operating lever gets a five-column table of values and three short paragraphs, headed Anchor, Mechanism and What would change it.
  • The memo's values are read out of the recalculated workbook, not typed in by hand.
  • Any management claim the model does not include is listed as excluded.
business-understanding.md

Business understanding

How to explain a business well enough that a reader could write an investment idea without further research.

  • A product and monetisation ledger lists each product or lever, who pays for it, and whether the money shows up in revenue, as an offset to cost of revenue, or in opex.
  • Any claim that something is "underappreciated" has to come with the arithmetic behind it and a reason it is underappreciated.
  • Three deciding debates, each posed as a question, with the KPI that would settle it and the date by which the answer should be known.
  • An insight ledger of 10 to 20 rows. Each row gives the evidence, a source and the section of the report that develops the point.
comps-multiples.md

Comps and multiple history

How to choose the multiple, build the peer set, explain where each peer trades and work out a peer-implied price.

  • Eight multiples are each compared with their own ten-year history. For each one the table gives the current value, mean, median, standard deviation, z-score and percentile.
  • Asset-light businesses are valued on EV/EBIT and P/FCF. Capex-heavy or content-heavy ones use EV/EBIT or EV/(EBITDA − capex). Where SBC is heavy, the playbook requires GAAP or IFRS EBIT and rules out any adjusted EBITDA that adds SBC back.
  • Four to six peers, including a named fade anchor (where the company's multiple drifts if the bear case is right) and an aspiration anchor (what the bull case prices in). Each peer's multiple is explained by its drivers, not adjectives.
  • The peer-implied price applies the peers' median primary multiple, the one chosen for the business model, to the company's FY1 figure, and the peers' median forward P/E to its FY2 EPS.
event-attribution.md

Event attribution

How each large price move is explained, or marked unattributed when no cause can be confirmed.

  • Before any web search, each large move is checked against the earnings-date history to confirm whether it fell on an earnings day.
  • Causes are looked for in a fixed order. First a company disclosure within one trading day of the move, then a web search, then analyst actions, sector news and finally macro news. Each cause is checked against the primary document.
  • When a move is part of a wider theme, the theme index is added as a benchmark. If the regression against that index and the news disagree about the cause, the two readings are reconciled in writing.
  • There are nine tags for causes. The playbook does not allow a cause to be forced, and a move left unattributed lists the checks that were run.
insider-buybacks.md

Insiders and buybacks

What to collect on insider trades and share buybacks, and how to read it.

  • The ledger covers 12 to 24 months of Form 4 and Form 144 transactions. Each one is flagged as plan-based or discretionary, and as part of a cluster or not.
  • Sales of identical share counts on a regular schedule, paired with same-day option exercises at the same strike, are plan-based sales and carry no signal. A discretionary sale right after a guidance cut does carry one.
  • A buyback is netted against SBC before the playbook calls it shareholder-friendly, and the average repurchase price is compared with the current share price.
  • Voting control changes what insider selling means. A founder with voting control can sell down economic exposure without losing control of the company.
estimation-methods.md

Estimation methods

When and how to estimate a figure the filings do not give, and how to label it. The methods are written up in Appendix G of the report.

  • A figure is estimated only if the investment idea needs it and an accounting or flow identity links it to disclosed data.
  • The method has six steps. Write the identity, choose the anchors, set a range for each assumption, propagate the ranges, calibrate to a disclosed total, and finish with sensitivity and refresh.
  • Propagation is a Monte Carlo simulation. It takes 20,000 draws from triangular distributions and reports the median with the 10th and 90th percentiles.
  • An estimate is marked "(est.)" wherever it appears, with its method in Appendix G. The rule is that an estimate is never shown as if it were a disclosed number.
presentation-standards.md

Presentation standards

The rules for pages, tables, diagrams and layout that the report renderer enforces, and the mistakes they are there to prevent.

  • Pages are portrait only and US Letter, with 1-inch margins and Arial 10 for body text.
  • Tables put periods in columns and metrics in rows, with at most six period columns, and no cell holds a sentence.
  • Each exhibit has a numbered title above it and a source note below.
  • Theses are written as prose. The compressed "Claim / Must be true" format is not allowed.
technicals.md

Technicals

What each technical metric says, and how to write the summary reading at the end.

  • An RSI above 70 or below 30 counts as stretched for most stocks, but the reading is judged against the stock's own history.
  • A narrow Bollinger band width often comes before a large move.
  • The reading is three or four sentences. It says where the stock sits on each time horizon, names the one or two metrics that disagree, and links to the event chapters.
  • The section gives no trading recommendation.
ReferenceThe report, section by sectionpage budgets, exhibits and who writes what

The report, section by section

The file report_skeleton.json fixes the section order, so every report has the same shape. The report is built around what the price already assumes and what evidence would change that. Open a section to see what scripts compute and what the agents write.

  • Each figure carries its basis, its source and its as-of date. Where a standardised figure from a data provider and the company's as-reported figure differ by more than 2%, the difference is reconciled.
  • Estimates are labelled and shown with a range. When the filings do not give a figure, it is built from an accounting identity and calibrated to a disclosed total. It is then reported with the 10th to 90th percentile range from a Monte Carlo simulation.
  • Theses are written as arguments. Each one sets out the case and its evidence, then what must be true for it to work and which line of the model that touches. It ends with the deciding question and what would refute the thesis.
  • The report makes no recommendation. It ends with the deciding questions and a pre-mortem, written as if looking back from two years ahead.
TOCSection order from report_skeleton.json, page budgets from qa_gates.py
exhibit, computed by a scriptresearch block, written by an analyst agent or the orchestrator

The page figures are standard-mode budgets, not Spotify page counts. qa_gates.py warns when a section exceeds 1.5 times its budget and fails a standard report over 100 pages.

ReferenceThe analysis rulesmultiples, earnings quality, margin bridges, price moves, insiders and scenario weights

Analysis rules in the playbooks

The playbooks are the reference files that fix how each section of the report is analysed. Here are a few of the tables they carry, which is how each run applies the same thresholds.

Choice of multiples

BusinessPrimary multiples
Asset-light, trivial D&AEV/EBIT, P/FCF
Capex or content heavyEV/EBIT or EV/(EBITDA − capex)
Heavy stock-based compGAAP or IFRS EBIT; never adjusted EBITDA that adds SBC back
Different gross margins from peersEV/Gross profit next to EV/Sales
Negative earningsEV/Sales and EV/GP, adjusted for growth
Banks and insurersP/TBV and P/E with ROTE; P/BV with ROE
REITsP/FFO and implied cap rate
CyclicalsEV/normalised EBIT and P/B at mid-cycle

Quality of earnings

CheckFlag when
CFO / net income< 1.0 two years running
Accruals, (NI − CFO) / assets> 5% or rising
Receivables vs revenue growthgap > 10 pts
Deferred vs subscription revenue growthgap < −10 pts
Capex / D&A< 0.7, or > 2 without growth
Effective vs statutory tax rategap > 10 pts, unexplained
"Non-recurring" itemsin 3 of 5 years
Goodwill / total assets> 30%
EBIT / interest< 3x
Net debt / EBITDA> 3x, or rising into a downturn

Margin bridges

The bridge divides income statement lines by revenue, operating lines by gross profit, below-the-line items by operating income and each profit line by the one above. A waterfall chart draws it, and the largest margin drag is expressed in currency.

Explaining price moves

The scan covers the 15 largest daily moves over five years, runs of three or more days above 10% and drawdowns deeper than 15%. Daily moves are split into sector and stock-specific parts. Moves with no verified cause stay unattributed.

Insiders and buybacks

The buyback record covers the authorisations, execution by quarter set against the share price, and a bridge of the share count net of SBC. On the insider side, sales of identical share counts on a schedule, paired with same-day option exercises, are flagged as 10b5-1 plan sales and carry no signal.

Scenario weighting and monitoring

The report gives a probability-weighted value at illustrative weights, the management-case weight needed to reach the price, the return skew and twelve-month roll-forwards. It also carries a capital-allocation block and a monitoring dashboard, whose break levels are the bear-case inputs.

stock-diligence-report
The full pack, with report, workbook, memo and manifest; the companion pack on request"Full diligence on SPOT" · "extensive full report on SPOT" · "express diligence on SPOT"↵ open SKILL.md in the source viewer above
dcf-only
Workbook, assumptions memo and comps tab, no report; spawns only the valuation analyst"Build a Street DCF for SPOT with the assumptions memo"↵ open SKILL.md in the source viewer above
event-attribution
Five years of large moves, each tied to a primary source, with chapters, a catalyst calendar and risks"Why did SPOT fall in February 2026?"↵ open SKILL.md in the source viewer above
technicals-check
Positioning against ten years of the stock's own history, with a plain reading of where it stands and no trading instruction"Is SPOT stretched technically?"↵ open SKILL.md in the source viewer above
comps-valuation
The peer multiple chosen for the business model, own-history statistics, the peer-implied value"Comps for SPOT, which multiple should I use?"↵ open SKILL.md in the source viewer above
insider-buyback-check
Buybacks, Form 4 ledger with plan signals, holders, short interest, capacity"Are Spotify insiders selling? What about the buyback?"↵ open SKILL.md in the source viewer above
business-understanding
How the company makes money, the product ledger, margin levers, moat and insight ledger"How does Spotify actually make money and what is underappreciated?"↵ open SKILL.md in the source viewer above
statements-analysis
Five years and eight quarters of statements, margin bridges, quality of earnings, guidance ledger"Margin bridge and quality of earnings for SPOT"↵ open SKILL.md in the source viewer above
street-view
Consensus, targets, revisions, named brokers, long and short theses with deciding questions"What does the Street assume for SPOT?"↵ open SKILL.md in the source viewer above
audit-panel
The five reviewers on any existing report or memo, merged into one ranked list"Audit this memo"↵ open SKILL.md in the source viewer above
refresh-diligence
Roll a workspace forward for a new quarter or price; rebuild only what changed"Refresh the SPOT diligence for Q3"↵ open SKILL.md in the source viewer above
internal-two-pager
Two-page write-up from the package, or asks for each input"Write a two-pager on MU"↵ open SKILL.md in the source viewer above
No skill matches that. Try "dcf", "audit" or "insider".

Running one part on its own

Most questions don't need the full pack. The plugin's twelve skills are folders of instructions and scripts that Claude can run separately. They share the same rules, scripts and QA gates (automated report checks), and reuse the company's work folder if one exists.

ModeWhat changes
StandardAbout 50 pages, per-section page budgets, hard cap of 100
ExtensiveNo page cap. Covers every product, broker, price move and period
ExpressThree analysts and the QA auditor only; report, workbook, memo, manifest
RefreshReuses the work folder, reruns data and exhibits, rebuilds only affected sections and the workbook

The first two are length modes for the report, the last two run modes. Express mode merges the events and Street analysts into one agent with a 25-search budget, and the statements and valuation analysts into another.

ReferenceEvals and data sourcesthe three test prompts and the data source order

The three test prompts

The file evals/evals.json holds three test prompts for the main skill, each with the output it should produce. The Spotify prompt is the one behind the worked example on this site.

EvalRequestExpected output
01Full diligence on Spotify (SPOT) with the complete pack, meaning the long Word report, the linked DCF with sensitivities and the assumptions memo, the filings pack, earnings digest, industry primer and tear sheet.An output folder with a 50 to 100 page report structured by report-frame.md, a workbook with zero recalculation errors and ALL OK checks, the multi-page memo, the companion files and MANIFEST.md.
02Why Netflix (NFLX) fell so hard in 2022 and what its biggest moves of the last five years were, each attributed.event_scan.py run on NFLX, each flagged move attributed in the prescribed order with sector and idiosyncratic components, tags and primary sources, a chapters narrative, and unattributed moves left unattributed.
03A DCF for Steel Dynamics (STLD) with bull, base and bear cases and every assumption explained.An adapted builder with a price × volume × spread revenue build and an EV/EBIT or EV/(EBITDA − capex) exit, a validated workbook in the house conventions, the multi-page memo, and comps chosen by the multiple-selection rules.

Data sources

This is the order of preference set in data-sources.md. When a filing disagrees with an investor deck or a standardised data feed, the filing wins. A gap is recorded in the manifest, the file that lists every source and gap, and is left unfilled.

SourceUsed forRank or rule
SEC EDGAR and company investor relations10-K, 10-Q, 8-K, 20-F and 6-K filings, proxies, Forms 4 and 144, 13F, XBRL as-reported figures, decks, releases and transcriptsFirst, the primary source; a filing wins any conflict with a deck or a standardised feed
Company IR sitesDecks, transcripts and releases that EDGAR lacks, and filings for non-SEC filersSecond
yfinance, through data_pull.pyPrices, four to five years of annual and four to five quarters of statements, FY1 and FY2 revenue and EPS estimates, price targets, recommendations, peer data, earnings dates with EPS surprise, Form 4 rows, the top ten 13F holders and short interestThird; free cash flow treated as unreliable, ADR enterprise values and trailing P/E flagged as defects
StockAnalysisS&P Global standardised annual statements, with an as-reported toggleFourth, reputable secondary; its quarterly views are JavaScript-rendered, so a fetch returns annual data only
Trading EconomicsThe 10-year government yield in the model currency, for the risk-free rateFourth, reputable secondary
Trade press and MacrotrendsBroker targets, stated theses and results summaries with guidance-versus-actual detailFourth, reputable secondary
IR site, Motley Fool and Investing.comEarnings-call transcriptsNamed in the Phase 1 pull order
Notes to the latest interim filingOptions, RSUs, share counts, the lease incremental borrowing rate, contingencies and minimum guaranteesNamed lookup for the model's bridge and share count
Investor Day materialsManagement's long-term targets, which anchor year five of the forecastNamed lookup
Value Investors Club and other paywalled researchInvestor thesesOnly through Claude in Chrome with the user signed in; summarised and attributed, never reproduced; credentials never entered
LSEG connectorNothingNot used; every data family returned an entitlement error when probed on 5 September 2026

Who does what

The tool

  • Pulling filings, prices, statements, estimates, earnings dates, insider transactions, holders and FX
  • Building the numeric exhibits and charts by script, with the analyst agents writing the few filing-based tables, such as buyback execution, and sourcing every figure
  • Building the linked model from one input file, recalculating it, and running four scenarios and three toggles (the model's switches) through the checks, which test that the model balances, ties out and stays inside plausible bands
  • Drafting how each scenario departs from the Street case, the case built on consensus, and adapting the revenue build when a business does not fit the subscription template (the valuation analyst)
  • Drafting the sections in parallel, merging them from files, rendering the report and running the QA gates on the PDF
  • Reviewing the report through the five reviewer agents before delivery, with findings ranked and tagged FAIL or IMPROVE

You

  • Forming the view on the company, since the pack makes no recommendation
  • Choosing the scenario weights and any price target, since the tool's own weights are marked illustrative and the two-pager's target defaults to the Street-case value
  • Judging whether the scenario inputs, any adapted revenue build and the explanation of the gap between the DCF value and the share price are believable
  • Deciding which of the reviewers' open items matter, and which of the tool changes suggested in the manifest (the run's record of sources, gaps and open items) to make
  • Checking that a figure copied from a filing is the right one, since the model checks only test that the model agrees with itself
01.7Notes

Notes

These notes are for the careful reader. They cover how the plugin was built, the workbook on this page, where the data comes from, what the checks test, and the limits of the current version.

Authorship

I built the plugin with Claude instead of writing it line by line. I decide what it computes and how, such as treating SBC as a real cost. Then I run it on a listed company and fix what breaks.

The workbook

The workbook was rebuilt from the plugin's Spotify input file with dcf_build.py and recalculated in LibreOffice. Values come from that file, formulas from dcf_build.py itself. Only the €154m notes gain and the blank 52-week range differ from the shipped file.

The rebuilt workbook reproduces the figures on this page, with $515.03 a share in the Street case, $601.83 in the management case, $721.44 bull, $290.21 bear and $654.11 on the exit-multiple method, from 1,984 formulas and zero errors.

Data

SEC EDGAR and investor relations material come first, then yfinance via data_pull.py and then secondary sources. The LSEG connector isn't used, since it returned entitlement errors on 5 September 2026. Spotify's consensus is Yahoo Finance's as of 4 September 2026.

Each figure is labelled with its basis, its source and its as-of date. Gaps are recorded in the manifest, the file that lists the run's sources and gaps, and are left unfilled.

Checks

The workbook's Checks tab tests the accounting identities and plausibility ranges. The validator script then recalculates four scenarios and three toggles and requires zero errors. Last, the first forecast year is reconciled line by line and checked for sense.

None of this tests whether a figure copied from a filing is the right one, which is why every input carries a source note. On Spotify the loop caught four problems, among them a €154m balance-sheet break and a data field wrong by 2.5x.

The rebuild

The Spotify test runs used one agent taking each role in turn. The rebuild moved numeric exhibits into scripts and split the roles into ten subagents. It added express mode for short runs and refresh mode to update earlier runs.

Limitations

The workbook builder still carries Spotify-specific lines, such as the FY2026 to FY2035 columns, that need adapting for the next company. Consensus in the Street case is the aggregate figure, not individual broker models. This site shows only the workbook, and every recalculation so far has run in LibreOffice, none in Excel.

In the Spotify model the peer multiples were trailing figures taken from Yahoo, and the comps tab is a prototype. FX was not forecast, and a payroll tax that moves with the share price was assumed to be neutral.

Recommendations

The pack makes no recommendation. The report ends with deciding questions and a pre-mortem, the scenario weights are marked illustrative, and the two-pager's price target defaults to the Street case and says so. Nothing on this page is investment advice.

Source and contact

There is no public repository for the plugin yet, so the viewer above is the place to read the source. The reverse DCF page works through the valuation engine that sits inside the plugin.