repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

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.

f44309cc71c97750894cd0819d2cbc557e4679a1

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

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

Changed files (4)

.pi/autoresearch/session.jsonl

Modified
7 7 {"run":16,"commit":"bf8645a","metric":35,"metrics":{},"status":"keep","description":"Iteration 16: Fixed extract-headings.lua to emit a real nested BulletList AST instead of escaped literal Markdown paragraphs. The filter now preserves heading hierarchy, creates actual internal links, handles skipped heading levels, and returns empty output for documents without headings. Verified Markdown list output, HTML nested ul/li output, link hrefs, and 9/9 filters pass.","timestamp":1780158253729,"segment":0,"confidence":null,"asi":{"hypothesis":"Fix existing filter correctness: escaped Markdown output is misleading; agents need real outline links/lists","bug_fixed":"extract-headings produced literal escaped '- [Heading](#id)' paragraphs instead of list/link AST","validation":"nested markdown list, HTML ul/li, internal hrefs, skipped levels, no-heading input, 9/9 filters","changed_file":"references/filters/extract-headings.lua"}}
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 +{"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"}}

README.md

Modified
61 61 | Extension slug | Short explanation | README |
62 62 | ------------------- | ------------------------------------------------------------------------ | ------------------------------------------------ |
63 63 | `angel` | Structured advisor and command guardrail for configured Pi model pairs. | [README](extensions/angel/README.md) |
64 -| `autoresearch` | Benchmark-guided experiment loop with a live browser dashboard. | [README](extensions/autoresearch/README.md) |
64 +| `autoresearch` | Benchmark-guided experiment loop with a Nugu-themed browser dashboard. | [README](extensions/autoresearch/README.md) |
65 65 | `builtin-tools` | Toggle Pi builtin file-search tools. | [README](extensions/builtin-tools/README.md) |
66 66 | `context-size` | Context-window usage telemetry for Pi. | [README](extensions/context-size/README.md) |
67 67 | `cost` | Pi token and spend telemetry. | [README](extensions/cost/README.md) |

skills/pandoc/SKILL.md

Modified
40 40 | Customize PDF/docx styles | §11 Templates | `--reference-doc=template.docx` or `--template=custom.tex` |
41 41 | Extract content from docx | §13 Extraction | `pandoc input.docx --extract-media=./media -t markdown` |
42 42 | Batch convert many files | §15 Pipelines | `pandoc lua scripts/pandoc-batch-convert.lua md html -s` |
43 -| Use reusable defaults | §14 Defaults | `pandoc -d pdf-report doc.md` |
43 +| Use reusable defaults | §14 Defaults | `pandoc -d references/defaults/pdf-report.yaml doc.md` |
44 44 | Debug a conversion problem | §20 Troubleshooting | Check exit codes, inspect AST, verify filters |
45 45 | Diagnose pandoc install | §18 Helper Scripts | `pandoc lua scripts/pandoc-doctor.lua` |
46 46 | Run pandoc Lua one-liner | below | `pandoc lua -e 'print(PANDOC_VERSION)'` |
952 952 ### Markdown → Professional PDF Report
954 954 ```bash
955 -# With defaults file (fastest)
955 +# With this skill's defaults file (from the skill directory)
956 +pandoc -d references/defaults/pdf-report.yaml report.md
958 +# Or install it globally and use by name
956 959 pandoc -d pdf-report report.md
958 961 # Or fully specified
1025 1028 ### Markdown → Standalone HTML Report
1027 1030 ```bash
1028 -# With defaults file
1031 +# With this skill's defaults file (from the skill directory)
1032 +pandoc -d references/defaults/html-report.yaml doc.md
1034 +# Or install it globally and use by name
1029 1035 pandoc -d html-report doc.md
1145 1151 - `pdf-report.yaml` — Polished PDF report with TOC, numbered sections, XeLaTeX
1146 1152 - `html-report.yaml` — Standalone HTML report with TOC, section divs, styled
1154 +Use by path from the skill directory:
1156 +```bash
1157 +pandoc -d references/defaults/html-report.yaml doc.md
1158 +```
1160 +Or copy to Pandoc's user defaults dir for global use by name:
1162 +```text
1163 +$HOME/.local/share/pandoc/defaults/html-report.yaml
1164 +$HOME/.local/share/pandoc/defaults/pdf-report.yaml
1165 +```
1150 1169 ## 19. Sandbox Mode

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
13 +- pdf-report.yaml and html-report.yaml defaults; docs clarify path usage vs global install by name
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