Route Selection
| Route | Trigger | Route File |
|---|---|---|
| HTML (default) | All PDF creation requests | routes/html.md |
| LaTeX | User explicitly requests LaTeX, .tex, or Tectonic | routes/latex.md |
| Process | Work with existing PDFs (extract, merge, fill forms, etc.) | routes/process.md |
Default to HTML. Only use LaTeX route when user explicitly requests it.
Markdown-first report handoff
When Deep Research or another upstream workflow supplies a complete Markdown report, treat that Markdown as the canonical content source and convert it through the HTML route instead of restarting research or rewriting the report. HTML is a presentation-only projection: preserve the report's sections, tables, figures, claims, and source IDs.
Research citations use markers such as [^123^]. If a citation JSONL is supplied with the Markdown, use that exact file; otherwise use /mnt/agents/.store/citation.jsonl. Each JSON object is keyed by id. Match each numeric marker to the same source ID and render citations in the form best suited to the document (for example inline links, superscript citations, footnotes, endnotes, or a References section). The PDF route does not mandate one citation presentation. Citation definition lines in the supplied Markdown are also canonical input: a mapped definition may be replaced by its complete rendered citation, but an unresolved definition and its text must remain visible. Preserve unresolved markers and warn about missing IDs; never fabricate or silently delete a source.
Run route commands from the PDF Skill directory or resolve their paths from that directory. Treat all conversion warnings and errors as actionable feedback: retain their full context, work on a copy, and retry until the requested PDF passes the route checks. Never suppress a failure or present a failed artifact as final.