| name | document-report |
| short | Create verified document artifacts from agent findings. |
| description | Generate report-ready Markdown, Typst, PDF, DOCX, or presentation artifacts through harn-documents helpers and explicit renderer preflights. |
| when-to-use | Use when the user asks for a PDF report, DOCX, Google Docs-ready draft, PowerPoint/Slides outline, or durable file artifact from agent findings. |
| allowed-tools | ["*"] |
Document report
Use harn-documents for the deterministic middle of a document workflow:
- Normalize findings into
{title, subtitle, summary, sections, findings}.
- Render Markdown with
render_markdown_report(report) and Typst source with
render_typst_report(report).
- Write the rendered source to explicit workspace artifact paths after the user
has approved the destination.
- Preflight external renderers before invoking them. Use
typst_compile_command(...) for PDF and pandoc_docx_command(...) for
DOCX instead of rebuilding renderer arguments.
- Verify produced files with available deterministic tools such as
stat,
sha256, pdftotext, Poppler rendering, or package-specific checks.
- Build file references with
file_artifact_spec(...), then collect them with
artifact_manifest(...).
- Emit each file with
artifact_emit("file", spec, options) and emit the
complete manifest with artifact_emit("artifact_manifest", manifest, options). Harn validates, records, and projects both artifact kinds to the
active agent protocol.
Do not embed PDF/DOCX bytes in transcripts. Keep binary payloads on disk or in an
artifact store, and pass file://, artifact://, harn-artifact://, or urn:
references with MIME type, size, and SHA-256 metadata when available.