Files
magnus919_agent-skills/documents/templates/pdf-template.md
T
Magnus HedemarkGitHubfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
c49666e29a feat(skill): add documents family skill (PDF / Word / Excel / PowerPoint) (#262)
* feat(skill): add documents family skill (PDF / Word / Excel / PowerPoint)

One family skill for PDF, Word (.docx), Excel (.xlsx), and PowerPoint
(.pptx) per the family-skill rule (epub precedent): shared workflow in
SKILL.md (scope, content model, template, render, validate, deliver) with
per-format load-on-demand references, generation templates per format, a
stdlib validation script (--json, structural sanity + render check with
graceful degradation), one fixture per format, a unittest suite, six
output-quality eval cases spanning all four formats, a human README, the
README.md index entry, and regenerated catalogs.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix(skill): dispatch PDF renderer args per binary in documents validation

The render check passed pdftoppm-only flags (-png/-r/-f/-l) to mutool and
ghostscript, which reject them, so a machine with only mutool or gs would
false-FAIL valid PDFs. Dispatch per-renderer argument sets (pdftoppm -png;
mutool draw -o; gs -sDEVICE=png16m) and cover the dispatch with a unit test.
Also: count PDF pages via the /Count page-tree fallback (page objects can
hide in compressed ObjStm streams), drop the stale "unsupported input" exit-2
claim from the docstring, and stop labeling skipped files with a FAIL check.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* style(skill): drop redundant local tempfile import in renderer dispatch test

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

---------

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-08-03 17:36:00 -04:00

53 lines
1.7 KiB
Markdown

# PDF Generation Template
Fill every `[fill: ...]` marker with content from the content model, then
render to PDF (print-ready HTML/CSS or LaTeX). Delete this instruction block
after filling.
## Document metadata
- **Title:** _[fill: document title]_
- **Author / owner:** _[fill: author or team]_
- **Audience:** _[fill: who reads this and what decision it supports]_
- **Date:** _[fill: YYYY-MM-DD]_
- **Version:** _[fill: 1.0]_
## Scope contract
- **Purpose:** _[fill: one sentence on what this PDF is for]_
- **Page budget:** _[fill: expected page count / upper bound]_
- **Layout engine:** _[fill: print HTML/CSS (WeasyPrint or headless Chromium), LaTeX, or direct PDF]_
- **Source of truth:** _[fill: path to the content model this is generated from]_
## Content outline
### Section 1 — _[fill: section title]_
- **Body:** _[fill: paragraph or bullet content]_
- **Layout notes:** _[fill: fonts, spacing, page-break constraints]_
### Section 2 — _[fill: section title]_
- **Body:** _[fill: paragraph or bullet content]_
- **Layout notes:** _[fill: fonts, spacing, page-break constraints]_
### Section N — _[fill: section title]_
- **Body:** _[fill: paragraph or bullet content]_
- **Layout notes:** _[fill: fonts, spacing, page-break constraints]_
## Assets
- **Images/figures:** _[fill: image paths and placement]_
- **Fonts:** _[fill: font names; confirm they will be embedded]_
## Validation gate
```bash
python3 scripts/validate-documents.py --render-check --json output.pdf
```
- **Structure passed:** _[fill: script exit code and status]_
- **Render check:** _[fill: ok or unavailable, with renderer used]_
- **Page count observed:** _[fill: matches scope?]_