Skip to content
Menu
The portfolio analysis case

Portfolio analysis · system map

A monthly analysis, under the hood

Explore how one new month of sales data for a European parcel operator becomes a workbook, a summary, a deck and an offline view, and what has to agree before any of them ships. Play the tour, pick one of the 8 journeys, or select any part to see what it does.

Checked against the project’s documentation, October 2026

Journeys8 journeys through the system

MONTHLY FILESnever editedREAD THREE TIMESthree separate waysRULESrows to customersONE NUMBERS FILEthe single sourceOUTPUTSrebuilt from scratchCHECKS AND GUARDFOLLOW-ON: MONTHLY CHURNMonthly exportsFull exportsMarket dataConfigMain readerSQL check pathThird re-readProduct groupsCustomer matchingPseudonymisationCustomer baseNumbers fileSingle sourceFeeds all four outputsNothing typed by handWorkbookSummaryDeckOffline viewRunnerClaim checksRun reportNarrative guardCell checksZero error cellsQuality flagsSHA-256Byte-identical rerunAI-assisted buildAIAnalystChurn report

Overview

A new month arrives. Follow it from one added file, read three ways, into one numbers file and out to four outputs and the checks: 28 parts and 37 connections.

Mapped from the project’s documentation and script headers, with no client data. Parts carry generic names, and the client stays anonymous.Checked against the project’s documentation

By the numbers

monthly files, read fresh on every run
32
isolated steps, each its own process
~26
checks over about 1,800 summary cells
23
quoted figures recalculated
563
cells compared in the backtest
806,179
error cells after recalculation
0
tests behind the churn report
14
per monthly update
<30 min

Counted from the run protocol, the check suite and the run logs. The client stays anonymous.

How each number was counted
32 monthly files, read fresh on every run
The run protocol; there were 29 at launch, October 2026.
~26 isolated steps, each its own process
The runner’s step list, October 2026.
23 checks over about 1,800 summary cells
The check suite, October 2026.
563 quoted figures recalculated
The claim check, from raw rows and in SQL, October 2026.
806,179 cells compared in the backtest
The backtest report, on the earlier 11-sheet workbook: 806,173 matched, and the 6 differences were explained, 10 September 2026.
0 error cells after recalculation
The run report, October 2026.
14 tests behind the churn report
The churn report’s test suite, on synthetic data, October 2026.
<30 min per monthly update
The run logs: the two logged monthly runs took 17 and 22 minutes, October 2026.

The journeys, step by step

The same 8 journeys the map plays, written out. Each step names the parts it connects.

01A new month arrivesMonthly files · 8 steps
  1. 1The analyst adds one new file and runs one command.Monthly exports → Runner
  2. 2A missing month is built from the full export, and the newest market quarter is read straight from its folder.Full exports → Runner; Market data → Runner
  3. 3The window widens by itself. Nothing is typed by hand.Config → Runner
  4. 4Every raw file is read three separate ways: the main reader, a SQL check path in DuckDB and a third re-read of the service mix.Runner → Main reader; Runner → SQL check path; Runner → Third re-read
  5. 5The rules turn rows into one numbers file: product groups, customers matched across the format change, private persons masked, one record per customer.Main reader → Product groups; Product groups → Customer matching; Customer matching → Pseudonymisation; Customer matching → Customer base; Customer base → Numbers file
  6. 6The workbook, the summary, the deck and the offline view are all rebuilt from scratch.Numbers file → Workbook; Numbers file → Summary; Numbers file → Deck; Numbers file → Offline view
  7. 7The delivered files are downloaded back and hashed with SHA-256.Workbook → SHA-256; Deck → SHA-256
  8. 8The analyst reads one report.Cell checks → Run report
02The read paths must agreeRead three times · 4 steps
  1. 1The main reader feeds the numbers file.Main reader → Numbers file
  2. 2The SQL path, loaded separately, recomputes the same claims.SQL check path → Claim checks
  3. 3The third re-read sums the service mix again. Any mismatched cell stops the run.Third re-read → Runner
  4. 4All 563 quoted figures must match: 563 of 563.Claim checks → Run report
03A contradicted sentenceChecks and guard · 4 steps
  1. 1Each written conclusion is tested against the new figures.Numbers file → Narrative guard
  2. 2One no longer holds. The deck refuses to save and lists the sentence.Narrative guard → Deck
  3. 3The analyst rewrites it.Analyst → Deck
  4. 4A rerun reports finished.Deck → Run report
04A failed check stops publishingChecks and guard · 4 steps
  1. 1Each sheet is recomputed independently, and one cell disagrees.Workbook → Cell checks
  2. 2The runner exits.Cell checks → Runner
  3. 3An error cell after recalculation, or a quality flag over its limit, stops it the same way.Zero error cells → Runner; Quality flags → Runner
  4. 4The report says stopped and names the step. Nothing is written to the deliverables.Runner → Run report
05The backtestChecks and guard · 3 steps
  1. 1On 10 September 2026, before the first presentation, the same files were run again on the earlier 11-sheet workbook.Monthly exports → Runner
  2. 2806,179 filled cells were compared and 806,173 matched. All 6 differences were explained: 2 random tie-breaks, now fixed, and 4 sentences now generated from the data.Workbook → Byte-identical rerun
  3. 3Empty text loaded as NULL in the SQL path had dropped a line. It is now normalised.SQL check path → Claim checks
06Forward testsChecks and guard · 6 steps
  1. 1Test A removes the last month. The window shrinks by itself.Config → Runner
  2. 2All checks pass.Cell checks → Run report; Claim checks → Run report
  3. 3The guard flags one sentence.Numbers file → Narrative guard
  4. 4Test B adds a synthetic extra month.Monthly exports → Runner
  5. 5The totals match to the cent.Cell checks → Run report
  6. 6The guard flags the sentence about existing versus new customers.Narrative guard → Deck
07Monthly churnFollow-on · 3 steps
  1. 1A monthly churn report is built from the same numbers: a 4-sheet workbook with custom charts.Numbers file → Churn report
  2. 2Two calculation paths compute it, and they must report zero mismatches.Numbers file → Churn report
  3. 314 tests on synthetic data run, and a verifier checks the workbook.Numbers file → Churn report
08Where AI was usedAI · 3 steps
  1. 1Claude helped build and review the scripts, including the independent re-reads.AI-assisted build → Runner
  2. 2The monthly run happens in a Claude session, with the analyst reading the report.Analyst → Runner
  3. 3No model runs inside the pipeline: only deterministic scripts and checks produce the files.Runner → Workbook

Have a monthly report you rebuild by hand?

Tell us what it answers and who reads it. We'll reply within two business days with a first view of what we'd build.