Building Harnesses for Scientific Reporting
2026-07-13
The first principle I propose is that our Mission, as users and creators of software for data analysis, is to enable the best and most thorough exploration of data possible.
Exploration is our mission; we and those who use our software want to find new paths to understand the data and the underlying processes.
This is the second principle: the computations and the software for data analysis should be trustworthy: they should do what they claim, and be seen to do so.
Three territories of the reporting workflow, each solving a distinct problem.
B1 Manipulation — Raw data arrives in the shape of its source, not of our question; ./manipulation is where we reshape it and earn a trustworthy rectangle.
B2 Analysis — Data does not speak on its own; ./analysis is where we compose and catalogue the artifacts created during interrogation.
B3 Frontend — Some reports will never face external readers; ./_frontend-N is where we decide what to show, to whom, and how.
./manipulationThe rectangle we need is never the rectangle we are given. Manipulation is where we earn it.
Representative challenges:
Grain confusion — two tables joined at different levels of aggregation silently inflate counts; always state the unit before the join
Universe filters — some questions are asked only of a subset; applying analysis to the full sample treats non-answers as implicit responses
Naming drift — the same concept is spelled differently across sources or vintages; a rename script quietly forks the schema
Label–value mismatch — factor labels in the codebook do not match the stored codes; recoding from memory rather than the codebook corrupts the variable
Territory in this project
./manipulation/
├── 0-extract-dictionary/
│ └── 0-extract-dictionary.py
├── 0-extract-metadata.R harvest SPSS labels
├── 1-ferry.R .sav ──► cchs-1.sqlite
├── 2-ellis.R ──► cchs_analytic.parquet
├── 3-test-ellis-cache.R 24 assertions
├── pipeline.md execution + diagnostics
├── pipeline-project-spec.md cohort contract
└── pipeline-validation.dcf declares the target
./data-public/metadata/
├── INPUT-manifest.md what arrived
└── CACHE-manifest.md what is served
./
flow.R runs the lanes in order
config.yml where the sources liveHow data is refined into a worthy rectangle
./analysisA clean rectangle is silent. Analysis is where we build the instruments that make it speak.
Key concepts:
Scope discipline — one folder holds one monothematic engagement, not a drawer of everything
Provenance — every derived table and figure traces back to a documented source column, not to memory
Variation is evidence — alternate cuts of the same question are siblings, not replacements; the discarded view stays part of the record
A scratch pad is not a report — report exists when publication layer renders.
Genre shapes expectation — each engagement belongs to a recognizable form: exploratory (EDA), inferential (model estimation), or presentational (report)
Territory in this project
analysis/
├── README.md the index of what exists
├── data-primer-1/ validated, canonical reference
├── eda-5/ outcome — decompose the 8 LOP parts
├── eda-61/ exposure — chronic conditions
├── eda-62/ predisposing — who the worker is
├── eda-63/ facilitating — access and behaviour
├── eda-64/ needs — perceived health, ADL
├── eda-65/ missingness
├── eda-71/ outcome — distribution shapes
└── eda-72/ predisposing × outcome groups
analysis/eda-61/ one engagement, in full
├── report-contract.prompt.md
├── eda-61.R laboratory
├── eda-61.qmd publication layer
├── prints/ 8.5 × 5.5 in @ 300 dpi
├── figure-png-iso/
└── data-local/How one engagement moves
_frontend-*A repository is not an argument. The frontend is where we choose the reader, and answer for the choice.
Typical areas of concern:
Privacy — private paths, credentials, and working notes must not survive the trip to a public artifact
Register — what is meaningful to engineers may be noise to external readers; the site must speak to its audience, not to its authors
Custody — a document copied verbatim must arrive unedited, or the site must say plainly that it did not
Assembly — many independently authored reports must appear under one coherent navigation without being rewritten
Self-containment — a published page owns its own assets, or it rots the moment the source repository moves
Territory in this project
_frontend-1/
├── publishing-contract.prompt.md the editorial spec
├── _quarto.yml the navbar is the offer
├── content/ EDITED
│ ├── index.qmd COMPOSED
│ ├── site-map.qmd COMPOSED
│ ├── project/
│ │ └── project-proposal.qmd ADAPTED
│ ├── pipeline/
│ │ ├── pipeline-guide.qmd ADAPTED
│ │ ├── cache-manifest.qmd VERBATIM
│ │ └── input-manifest.qmd VERBATIM
│ ├── data-primer/ ADAPTED + REDIRECT
│ ├── analysis/ 7 × REDIRECT
│ └── images/
├── scripts/
│ ├── copy-contract-assets.R pre-render
│ ├── copy-analysis-html.R post-render
│ └── audit-fidelity.R the gate
├── FIDELITY_REPORT.md protocol honoured?
├── TRANSFORM_LOG.md what was changed, and why
├── BUILD_REPORT.md did every page arrive?
└── _site/ PRINTEDHow the protocols move content
Pipeline Orchestra
Engineering: raw data → trustworthy rectangle
Agent @pipeline-engineer
Writes to manipulation/
Flow source → ferry → ellis → served
Governs transport, transformation, and validation of incoming data
Accountability INPUT-manifest records what arrived; CACHE-manifest records what is served
Composing Orchestra
Reporting: clean data → analytical artifact
Agent @report-composer
Writes to analysis/
Flow contract → .R laboratory → .qmd publication
Governs monothematic engagement: one question, one folder, one artifact family
Accountability report-contract anchors scope; artifacts are numbered and inventoried
Publishing Orchestra
Publishing: existing artifacts → curated site
Agents @interviewer + @writer
Writes to _frontend-N/
Flow RAW → EDITED (content/) → PRINTED (_site/)
Governs editorial selection, audience register, and protocol fidelity
Accountability TRANSFORM_LOG records every change; fidelity report is the gate
Procedures and conventions for extracting, transporting, and transforming raw data.
General form could be expressed as:
But specific implementation will reflect the complexity of each project
Pipeline architecture in absent-from-chronic
Project-agnostic harness
.github/
├── pipeline-orchestra.md
├── agents/
│ └── pipeline-engineer.agent.md
├── copilot/
│ └── pipeline-orchestra-SKILL.md
├── hooks/
│ ├── ellis-validation-reminder.json
│ └── scripts/
│ └── check-ellis-validation.ps1
├── instructions/
│ └── pipeline-scripts.instructions.md
├── prompts/
│ ├── pipeline-bootstrap.prompt.md
│ ├── pipeline-ellis.prompt.md
│ ├── pipeline-validate.prompt.md
│ ├── pipeline-audit.prompt.md
│ └── pipeline-diagram.prompt.md
├── skills/
│ └── validate-cache-manifest/
└── templates/
└── pipeline-diagram-template.mmdGoverns preparation of data source into analysis-ready rectangles
Rules and practices for composing monothematic narratives of data engagement.
One question → one graph family. Artifacts nest as thought unfolds.
Project-agnostic harness
.github/
├── composing-orchestra.md
├── agents/
│ └── report-composer.agent.md
├── copilot/
│ └── composing-orchestra-SKILL.md
├── instructions/
│ ├── artifact-naming.instructions.md
│ └── report-composition.instructions.md
├── prompts/
│ └── composing-new.prompt.md
└── templates/
├── composing-contract-template.md
├── composing-template.R
├── composing-template.qmd
├── data-primer-template.qmd
└── report-audit-checklist.mdEditorial, organizational, and aesthetic choices for delivering a customized communication.
Governs publication of a customized frontend.
Project-agnostic harness
.github/
├── publishing-orchestra.md
├── agents/
│ ├── publishing-interviewer.agent.md
│ └── publishing-writer.agent.md
├── copilot/
│ └── publishing-orchestra-SKILL.md
├── hooks/
│ ├── publishing-validation-reminder.json
│ └── scripts/
│ └── check-publishing-validation.ps1
├── instructions/
│ └── publishing-rules.instructions.md
├── prompts/
│ ├── publishing-new.prompt.md
│ ├── publishing-validate.prompt.md
│ └── publishing-write.prompt.md
├── skills/
│ └── publishing-fidelity-audit/
│ └── SKILL.md
└── templates/
├── audit-fidelity-template.R
└── publishing-contract-template.mdAs we approach designing harnesses for scientific reporting, let us consider principles that could/should guide our thinking.
D1 The harness we build is an expression of the objectives we perceive.
D2 Agent exists to help you pay attention, to guide your focus.
D3 Knowledge is a conversation about data.
D1 The harness we build is an expression of the objectives we perceive.
Reflection — skills and templates will be shaped by our mental models and cognitive habits, intended or not
Expression — skills and templates should therefore be built to express opinions, not merely to execute tasks
Each script is unique, but united by a common structure.

Genres, styles, compositional conventions and techniques
Generic fugal structure — composerfocus.com
D2 Agent exists to help you pay attention, to guide your focus.
Ramifications of this principle for harness design:
D3 Knowledge is a conversation about data.


Andriy Koval | Minding the Agents | BBMC OUHSC | 2026-07-13