Report Workflow
繁體中文說明 → README.zh-TW.md
Give your AI the files you already have and one sentence about what you need. Get back a Word document you can hand in.
If the AI writes a number that is not in your files, that number does not reach the document. Same for a quote it reworded, or a paper it cited that does not exist. It gets stopped, and you are told which sentence and why.
You bring: a spreadsheet of measurements, a Word handout, a page of notes — whatever you already have. Plus one sentence, like "write a lab report on this".
You get: a .docx with a table of contents, page numbers, real Word tables,
and charts drawn from your own numbers. It can follow your department's or your
company's template. Chinese or English.
Two lines to install. No API key. Nothing to configure.
Look before you install
Here is a document it made, and the note that comes with it. Both are in this repository, so you can see the output before you run anything:
examples/output/report.docx— the file you would hand in: contents page, page numbers, a real Word table, a chart drawn from the source spreadsheetexamples/output/client_readable_qa_note.md— every sentence that made a factual point, and the row of your data it came from
Use it
In Claude Code:
/plugin marketplace add 0Smallcat0/report-workflow
Then /plugin install report-workflow@report-workflow. Using something else
that speaks MCP (Codex, Cursor, your own setup)? One command instead:
claude mcp add report-workflow -- uvx --from "report-workflow[mcp,render]" report-workflow-mcp
Then just ask, in your own words:
Use report-workflow to turn the files in ./data into a business report for the operations manager: what changed, what it costs, whether to adopt it.
Seven kinds of document: lab report, academic paper, business report, proposal, two admissions formats, and a general one. The maths a marker looks for — how close your measurements came to theory, an R², a budget total — is worked out by the tool from your own data, so the AI never has to make a number up. Formats, Chinese documents, and using your own Word template: docs/OUTPUT.md.
What it cannot do
It cannot read meaning. It checks whether the numbers, quotes and references in the text really appear in your files. It cannot tell whether the AI understood your data. If the AI writes a smooth sentence that gets your result backwards, that sentence goes through.
We measured that limit instead of talking around it: 69 hand-checked attempts to sneak something false past it, plus 10,000 test pairs from a public dataset nobody here wrote. The cases it still misses are kept in the test set on purpose — docs/EVIDENCE.md.
It does not write. Your AI writes; this decides what stays. So you need an AI agent to use it.
Does it actually help?
That is the question worth asking about a writing tool, and for a while the honest answer here was no. Someone ran a real 16 KB Chinese market report through the whole pipeline and compared the delivered document against the one they had written by hand: 37 source links became 0, 24 rows of tables became 0, and every citation marker was deleted at render. The gates worked. The document was worse.
Worse still, the strictest gate had a 100% false-positive rate on Chinese. It bound each number to the characters following it, and Chinese has no spaces, so a claim passed only if it repeated the source's exact character sequence — one particle (的) was enough to block a true statement. The gate was rewarding transcription and punishing the synthesis a report exists to do.
Those findings are what the current version was built from. The fixes are in the history; the evidence they worked is checked in:
| Before | After | |
|---|---|---|
| Correct Chinese claims blocked by the FE gate | 3 of 3 | 0 of 3 |
| Hallucination catch rate (69 adversarial cases) | 86.4% | 88.6% |
| Honest claims wrongly blocked | 0% | 0% |
| Source tables reaching the delivered document | 0 of 4 | 4 of 4 |
| Sources the document cites, reaching the bibliography | 0 of 6 | 6 of 6 |
| Chart recommendations dropped without a word | 3 of 4 | 0 |
The comparison against writing without the tool is a benchmark you can rerun:
python scripts/run_report_quality_benchmark.py --check
Same source, same prompt, two arms, one scorer, both arms in the repository. The harness wins 6 of 8 dimensions. It loses 2, and those are reported rather than tuned away — one of them because the metric itself rewards vagueness, which is worth knowing about the metric. See the summary.
Other ways to run it
Just the checker, on any two pieces of text — no setup, same answer every time, fine to put in a test suite:
from report_workflow import verify
verify("The error rate fell to 0.2% [1].",
{"1": "The error rate fell to 3.5% under the structured workflow."})
# publishable: False — 0.2% is nowhere in the source; the source says 3.5%
pip install "report-workflow[render]" gets you the command-line version and
the Word renderer (it comes with the wheel; without it, tables and templates
come out worse). pip install ships the package, not the examples — clone the
repository for those and the test data. Or try it with nothing installed:
If the report-workflow command does nothing — usually an old
report-workflow.exe left on your PATH on Windows — run
python -m report_workflow instead.
Where to go next
- What comes out, formats, templates, checks → docs/OUTPUT.md
- What it catches, and what it misses → docs/EVIDENCE.md
- Why it is built this way → docs/DESIGN.md
- The MCP tools → docs/mcp.md
- Driving it from an agent → skills/report-workflow/SKILL.md
- Working on this repository → AGENTS.md
- Reporting a bug → CONTRIBUTING.md
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file report_workflow-4.39.0.tar.gz.
File metadata
- Download URL: report_workflow-4.39.0.tar.gz
- Upload date:
- Size: 696.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d4ca535b780f8a0c1952ee6896d1637a9ec3d850a796531038fe73cfdc434a3
|
|
| MD5 |
9907d202ef55bb8d1f4aa0a2848de344
|
|
| BLAKE2b-256 |
ebe275f8c200bb36486fbb21d623d9425a1514403384ec90c464e45d2a5387b8
|
Provenance
The following attestation bundles were made for report_workflow-4.39.0.tar.gz:
Publisher:
release.yml on 0Smallcat0/report-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
report_workflow-4.39.0.tar.gz -
Subject digest:
1d4ca535b780f8a0c1952ee6896d1637a9ec3d850a796531038fe73cfdc434a3 - Sigstore transparency entry: 2376426840
- Sigstore integration time:
-
Permalink:
0Smallcat0/report-workflow@814b7d29b2835e2554f5c8dfe2b6952b84e25806 -
Branch / Tag:
refs/tags/v4.39.0 - Owner: https://github.com/0Smallcat0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@814b7d29b2835e2554f5c8dfe2b6952b84e25806 -
Trigger Event:
push
-
Statement type:
File details
Details for the file report_workflow-4.39.0-py3-none-any.whl.
File metadata
- Download URL: report_workflow-4.39.0-py3-none-any.whl
- Upload date:
- Size: 495.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2d17a1c69e72c1cb21206a4e462137c4b9e74becaf6f40e9beb453d7190dccc
|
|
| MD5 |
279b65a9748f017fdeb27380842e45a7
|
|
| BLAKE2b-256 |
b95d7158378db3445fe48c5841fae566948c1fb38937539e84fd3d303c3d01ab
|
Provenance
The following attestation bundles were made for report_workflow-4.39.0-py3-none-any.whl:
Publisher:
release.yml on 0Smallcat0/report-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
report_workflow-4.39.0-py3-none-any.whl -
Subject digest:
e2d17a1c69e72c1cb21206a4e462137c4b9e74becaf6f40e9beb453d7190dccc - Sigstore transparency entry: 2376427105
- Sigstore integration time:
-
Permalink:
0Smallcat0/report-workflow@814b7d29b2835e2554f5c8dfe2b6952b84e25806 -
Branch / Tag:
refs/tags/v4.39.0 - Owner: https://github.com/0Smallcat0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@814b7d29b2835e2554f5c8dfe2b6952b84e25806 -
Trigger Event:
push
-
Statement type: