repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

Iteration 21: Fixed Defaults Files section accuracy. The example used `input-files: chapters/*.md`, but pandoc defaults files do not expand globs, so that example fails. Replaced with explicit file list, added warning that defaults files do not expand globs, showed path/by-name usage, and clarified that shell globs must be passed on CLI. Verified explicit defaults works and glob defaults fails as documented; 9/9 filters pass.

931c38edf7cdb3f8b7328651008b2c7a8b5b813c

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Result: {"status":"keep","skill_quality":40}

Changed files (4)

.pi/autoresearch/session.jsonl

Modified
8 8 {"run":17,"commit":"1d7d3c1","metric":36,"metrics":{},"status":"keep","description":"Iteration 17: Fixed center-images.lua LaTeX corruption bug. The prior Image/Plain approach double-wrapped images inside Figure, producing malformed minipage/center LaTeX. Rewrote filter to return explicit filter tables, use topdown traversal, skip Figure children for LaTeX/Beamer, center only image-only paragraphs, and leave inline images unchanged. Verified clean LaTeX figures, centered no-alt image paragraphs, unchanged inline images, HTML styling, and 9/9 filters pass.","timestamp":1780158416994,"segment":0,"confidence":null,"asi":{"hypothesis":"Continue fixing existing filters for real correctness; center-images had subtle LaTeX corruption for captioned figures","bug_fixed":"LaTeX Figure children were being centered, corrupting figure output","validation":"captioned figure clean, image-only paragraph centered, inline image unchanged, HTML style present, 9/9 filters","changed_file":"references/filters/center-images.lua"}}
9 9 {"run":18,"commit":"5694044","metric":37,"metrics":{},"status":"keep","description":"Iteration 18: Improved pandoc-doctor.lua accuracy for PDF diagnostics. Doctor no longer misleadingly reports pdf as normal reader/writer; it now labels PDF as writer via engine and runs real smoke tests for available PDF engines. This catches cases where engine binaries exist but PDF generation fails (verified: typst/wkhtmltopdf version OK but smoke FAIL in current env). Updated SKILL.md helper script note. 9/9 filters pass.","timestamp":1780158545607,"segment":0,"confidence":null,"asi":{"hypothesis":"Doctor version checks alone were misleading; real PDF smoke tests better diagnose agent PDF failures","bug_fixed":"pdf shown as -- format despite extension output support; engine binary OK did not mean pandoc PDF works","validation":"doctor prints PDF smoke tests, catches real failures, markdown HTML smoke OK, 9/9 filters","changed_file":"scripts/pandoc-doctor.lua"}}
10 10 {"run":19,"commit":"14eda31","metric":38,"metrics":{},"status":"keep","description":"Iteration 19: Improved pandoc-md-to-pdf.lua with real PDF engine auto-detection. If PANDOC_PDF_ENGINE is unset, it smoke-tests xelatex/lualatex/pdflatex/typst/wkhtmltopdf/weasyprint and selects the first working engine; if none work, prints actionable diagnostics instead of blindly failing on xelatex. Preserves env override behavior. Updated SKILL wording. Verified no-engine diagnostic, forced-engine path, and 9/9 filters pass.","timestamp":1780158690706,"segment":0,"confidence":null,"asi":{"hypothesis":"The PDF helper should use doctor-style smoke testing instead of hardcoded xelatex; agents need actionable PDF engine diagnostics","changed_file":"scripts/pandoc-md-to-pdf.lua","validation":"auto-detect no-engine diagnostic, env override, SKILL refs, 9/9 filters","note":"Current env has no working PDF engine; script now reports all attempts clearly"}}
11 +{"run":20,"commit":"5e6e0b7","metric":39,"metrics":{},"status":"keep","description":"Iteration 20: Fixed misleading defaults-file usage. Previous examples used `pandoc -d pdf-report` / `html-report`, which only works after installing defaults into Pandoc's user data dir and fails by default outside that context. Updated Decision Guide and pipelines to show direct `references/defaults/*.yaml` usage from the skill directory plus explicit global-install path for by-name use. Verified direct path defaults works, by-name failure is documented, Decision Guide refs valid, 9/9 filters pass.","timestamp":1780158856677,"segment":0,"confidence":null,"asi":{"hypothesis":"Accuracy fix: defaults examples must not assume global installation; agents need clear path-vs-install semantics","bug_fixed":"`pandoc -d pdf-report` was misleading without installation","validation":"direct path works; by-name fails outside install context; docs now explain both; 9/9 filters","changed_file":"SKILL.md"}}

README.md

Modified
117 117 ## Development
119 +Install pinned repo tooling with:
121 +```bash
122 +mise install
123 +```
125 +Project-managed tools include Bun, Node, TypeScript, formatters/linters,
126 +Nushell, mdslw, asciinema, and agg.
127 +Extension runtime tools stay out of scope for `mise.toml`.
119 129 TypeScript is checked with:
121 131 ```bash

skills/pandoc/SKILL.md

Modified
913 913 ```yaml
914 914 # defaults/pdf.yaml
915 +# Note: defaults files do NOT expand globs like chapters/*.md.
916 +# List files explicitly, or pass globs on the command line.
915 917 input-files:
916 - - chapters/*.md
918 + - chapters/01-intro.md
919 + - chapters/02-usage.md
917 920 from: markdown
918 921 to: pdf
919 922 standalone: true
930 933 ```bash
934 +# By path
935 +pandoc --defaults=defaults/pdf.yaml
937 +# Or, after installing in $HOME/.local/share/pandoc/defaults/pdf.yaml
931 938 pandoc -d pdf
932 -# or
933 -pandoc --defaults=pdf.yaml
940 +# If you need shell glob expansion, pass files on the command line instead
941 +pandoc chapters/*.md -d defaults/pdf.yaml -o book.pdf
936 944 Place in `$HOME/.local/share/pandoc/defaults/` for global access by name.

skills/pandoc/ideas.md

Modified
10 10 - Diagram filter (Graphviz `dot` code blocks via pandoc.pipe + mediabag pattern; graceful fallback if dot missing)
11 11 - Extract headings filter emits real nested BulletList links, not escaped Markdown text
12 12 - Center images filter skips LaTeX Figure children to avoid corrupting generated figure output
13 -- pdf-report.yaml and html-report.yaml defaults; docs clarify path usage vs global install by name
13 +- pdf-report.yaml and html-report.yaml defaults; docs clarify path usage vs global install by name; warn defaults files do not expand globs
14 14 - Cross-platform Lua scripts (batch-convert, md-to-pdf with PDF engine auto-detection, docx-to-md, web-to-md, wordcount, doctor with real PDF smoke tests)
15 15 - pandoc.system.list_directory for portable dir listing
16 16 - Multi-file documents & Jupyter notebook section