report-render
Skill0 starsChanged 37 days agoMITView on GitHub
Turn a test runner's raw log into a Markdown report plus a structured JSON summary. Embeds the failure classification so a reader can see the failing tests, the run summary, and the failure-class counts on one page.
In this repository11 other files it gives its agents.
- drift-checkSkill
- drillSkill
- failure-classifySkill
- init-loopSkill
- report-renderSkill
- test-loop-bootstrapSkill
- drift-checkSkill
- drillSkill
- failure-classifySkill
- init-loopSkill
- test-loop-bootstrapSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
After every test run, whether green or red.
- Very specific: line 51
Collect (
--collect): read the existing date-based log.txt without running the command. - Distinctive: line 71
Classify: if not already classified (call failure-classify on the log).
- Very specific: line 110
When run with a failing test injected, the report gains a Failures by class section with the ASSERTION_FAILURE bucket populated.
- Very specific: line 120
Renaming
summary.jsonper run: Keep the schema stable across days.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
report-render
Render a test run into something a human wants to read.
When to use
- After every test run, whether green or red.
- From CI, with the report and summary uploaded as artifacts.
- Manually, to investigate a flake or to attach a report to a bug.
Inputs
| Name | Required | Default | Description | |
repo_root | yes | . | Path to the project root. The script writes outputs under docs/reports/<YYYY-MM-DD>/. | |
log_path | yes | none | Raw test runner output. Usually the file produced by `swift test 2>&1 | tee log.txt` or its equivalent. |
classify_json | no | (none) | If failure-classify has already been run, pass its JSON output path to embed the classification. The render script calls the classifier itself if this is omitted. | |
collect_only | no | false | When true, skip running the test runner; render only from the existing log. Use to re-render a report after editing a summary template. |
Output
Three artifacts under docs/reports/<YYYY-MM-DD>/:
| File | Purpose |
log.txt | The raw test runner output, byte-for-byte. |
summary.json | Structured facts: total, passed, failed, report exit_code (see below), run_line, plus the merged failures_by_class and failures_grouped when classification is available. |
report.md | A human-readable summary when rendering completes. Contains a Failures by class section only when there is at least one failure. |
Exit status and verdict
The preview at bin/render_report.sh uses the same report status for its
process exit code, summary.json.exit_code, and Markdown PASS/FAIL verdict:
- Live: preserve a nonzero test-command exit code. If the command exits
0but parsed failures are present, use1; otherwise use0. - Collect (
--collect): read the existing date-basedlog.txtwithout running the command. Use1when parsed failures are present, else0. This cannot recover the original runner exit code.
These rules describe a completed render. An unsupported --language value
or a missing collect log exits 2 before a new summary or report is written.
A zero status or zero test count is not proof that tests ran or passed;
compare the raw log and original runner result. Classification names such
as EXPECTED_FAILURE do not override the report status.
Algorithm
- Capture the test runner's stdout and stderr to
log.txt. Useteerather than>so the same output appears in the user's terminal. - Count results using the selected language's log patterns, and
extract the run summary. Swift uses
✔and✘lines; the other runners use their own result lines or summaries. See "Runner differences" below. - List the failing test names, deduplicated.
- Classify if not already classified (call failure-classify on the log).
- Render the Markdown. Use a
✅ PASS/❌ FAILindicator on the first line, then counts, then the run summary, then failing tests, then the failure-class breakdown, then a list of artifact paths.
Runner differences
Result extraction and run-summary formats are runner-specific. The
working preview supports --language swift|python|go|rust and recognises:
| Runner | Summary line shape |
| Swift Testing | Test run with N tests passed after X.XXX seconds. |
| pytest | N passed in X.XXs |
| go test | ok <package> X.XXXs or FAIL per package |
| cargo test | test result: ok. N passed; M failed; ... |
An unsupported --language value is rejected, including when a custom
--test-command is supplied. For a supported language whose log has no
recognized summary, the report still renders with run_line set to
(no summary line found). This fallback alone does not change the status;
the live-command status and parsed failures still determine the verdict.
Worked example (Swift, end-to-end)
bash scripts/render_report.shProduces, in docs/reports/2026-06-02/:
log.txt # full swift test output
summary.json # 83 / 85 / 0, exit 0, run_line="Test run with 83 tests..."
report.md # 10-line markdown summaryWhen run with a failing test injected, the report gains a Failures by
class section with the ASSERTION_FAILURE bucket populated.
Anti-patterns
- Treating the Markdown report as a primary source of truth. It is
a view.
summary.jsonis the structured fact. Build downstream tools offsummary.json. - Committing
docs/reports/to source control. It is a run output, not a design artifact. Adddocs/reports/to.gitignore. - Renaming
summary.jsonper run. Keep the schema stable across days. Triage tools that consume it should not need to be told which day a report came from.
Cross-references
- failure-classify — invoked by this
skill when no
classify_jsonis supplied. - init-loop — installs the render script into a fresh project.
- drift-check — the corresponding pre-test step in the loop.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

