Skip to content

feat(poiesis-doc): scaffold Pandoc backend module, AST serializer, Lua filter stubs (B-012) - #4365

Merged
forkwright merged 2 commits into
mainfrom
feat/poiesis-b012-pandoc-backend
May 30, 2026
Merged

feat(poiesis-doc): scaffold Pandoc backend module, AST serializer, Lua filter stubs (B-012)#4365
forkwright merged 2 commits into
mainfrom
feat/poiesis-b012-pandoc-backend

Conversation

@forkwright

Copy link
Copy Markdown
Owner

Summary

  • Adds crates/poiesis/doc/src/pandoc/{mod,ast,error}.rsPandocRunner subprocess wrapper, Document→Pandoc JSON AST serializer, PandocError enum, OutputFormat enum, DocOpts struct, render_doc() dispatch (PDF→Typst fast-lane; others→Pandoc subprocess)
  • Adds crates/poiesis/filters/{apx-cite,apx-figure,apx-theme}.lua — identity stub Lua filters with TODO contracts; full bodies blocked on Q3/Q4 in ESCALATION.md
  • Adds ESCALATION.md — four design questions; Q1 + Q2 resolved (B-001 landed at 0cb2bd3b); Q3 (apx-cite sidecar schema) and Q4 (apx-figure/B-005 chart integration) need operator sign-off before filter logic lands

Gate-Passed: see commit trailer.

Merge order: B-013 (#4354) → B-014 (#4361) → this PR. B-012 modifies poiesis-doc/src/lib.rs and Cargo.toml — will need rebase after B-013 lands (both branches touch the same files).

What this PR ships without escalation answers

Item Status
PandocRunner struct (bin path + version probe) Shipped
PandocError enum Shipped
OutputFormat enum (docx, odt, pdf, md, latex, html, epub) Shipped
DocOpts struct (format + optional pdf_engine override) Shipped
render_doc() dispatch skeleton (Typst for PDF; Pandoc for others) Shipped
apx-cite.lua stub (identity, no-op) Shipped
apx-figure.lua stub (identity, no-op) Shipped
apx-theme.lua stub (identity, no-op) Shipped
GPL-clean boundary comment (no pandoc crate dep) Shipped
Unit tests for dispatch routing Shipped

Items blocked on ESCALATION.md answers

Item Blocked on
Full Document → Pandoc JSON AST serialization Q1 (B-001 types upgrade)
Content-trigger LaTeX routing Q2 (B-001 Block variants — closed default)
apx-cite.lua factbase resolution Q3 (sidecar schema)
apx-figure.lua chart baking Q4 (B-005 SVG API + subprocess contract)

Test plan

  • cargo test -p poiesis-doc passes (9 tests including dispatch routing)
  • cargo clippy -p poiesis-doc clean
  • Lua filters load without error under pandoc --lua-filter (manual spot-check after B-014 adds pandoc to flake)
  • ESCALATION.md reviewed by operator for Q3/Q4 answers

…a filter stubs (B-012)

Add the mechanical scaffold for the B-012 Pandoc backend:
- crates/poiesis/doc/src/pandoc/{mod,ast,error}.rs — PandocRunner subprocess
  wrapper, Document→Pandoc JSON AST serializer, PandocError enum, OutputFormat
  enum, DocOpts struct, render_doc() dispatch (PDF→Typst fast-lane; others→Pandoc)
- crates/poiesis/filters/{apx-cite,apx-figure,apx-theme}.lua — stub Lua filters
  with TODO contracts; full impl unblocked by B-001/B-005 answers in ESCALATION.md
- ESCALATION.md — four design questions for the operator (B-001 dep, content-trigger
  routing, apx-cite sidecar schema, apx-figure chart integration)

All 9 poiesis-doc tests pass. Dispatch routing, AST emission, and PandocRunner
probe are wired; Lua filter bodies are identity stubs pending design sign-off.
@forkwright
forkwright force-pushed the feat/poiesis-b012-pandoc-backend branch from aa3208d to ed9818b Compare May 30, 2026 03:33
@forkwright
forkwright force-pushed the feat/poiesis-b012-pandoc-backend branch from ed9818b to 3136e9a Compare May 30, 2026 03:34
@sonarqubecloud

Copy link
Copy Markdown

@forkwright
forkwright merged commit 23dbe91 into main May 30, 2026
9 checks passed
@forkwright
forkwright deleted the feat/poiesis-b012-pandoc-backend branch May 30, 2026 03:37
forkwright pushed a commit that referenced this pull request May 30, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.30.0](v0.29.0...v0.30.0)
(2026-05-30)


### Features

* **aletheia:** faithful import consumer for
[#4163](#4163) (PR3/4)
([#4357](#4357))
([4e49dbe](4e49dbe))
* **aletheia:** populate working_state + typed knowledge in export
([#4163](#4163) PR2/4)
([#4351](#4351))
([702129e](702129e))
* **diaporeia:** wire memory.* MCP tools to organon executor
([#4117](#4117))
([#4352](#4352))
([7f2e243](7f2e243))
* **graphe:** portability raw entry points for
[#4163](#4163) (PR1/4)
([#4349](#4349))
([f267fe5](f267fe5))
* **poiesis-charts:** implement column + bar SVG emitters (B-005)
([#4368](#4368))
([3559002](3559002))
* **poiesis-charts:** implement line + area SVG emitters (B-005)
([#4372](#4372))
([2ca94ac](2ca94ac))
* **poiesis-charts:** implement pie + doughnut SVG emitters (B-005)
([#4371](#4371))
([996dbf3](996dbf3))
* **poiesis-charts:** implement scatter SVG emitter (B-005)
([#4369](#4369))
([6261c8b](6261c8b))
* **poiesis-charts:** implement stat KPI SVG emitter (B-005)
([#4374](#4374))
([1416fa0](1416fa0))
* **poiesis-charts:** implement Vega-Lite shell-out emitter (B-005)
([#4373](#4373))
([e6c9b70](e6c9b70))
* **poiesis-charts:** scaffold new crate per B-005
([#4318](#4318))
([fa2e374](fa2e374))
* **poiesis-core:** land B-001 envelope + factbase + open component
registry ([#4350](#4350))
([0cb2bd3](0cb2bd3))
* **poiesis-doc:** pandoc availability probe + flake.nix pin (B-014)
([#4361](#4361))
([d5efe1d](d5efe1d))
* **poiesis-doc:** scaffold Pandoc backend module, AST serializer, Lua
filter stubs (B-012)
([#4365](#4365))
([23dbe91](23dbe91))
* **poiesis-sheet:** wire B-007 workbook feature flag, error type, and
module declarations
([#4353](#4353))
([f6e574d](f6e574d))
* **poiesis-theme:** B-002 foundation — CSS byte-parity, OOXML
clrScheme+fontScheme, doc-vars, extended summus tokens
([#4370](#4370))
([b0c4319](b0c4319))
* **poiesis-theme:** base PPTX sink (B-002-B)
([#4378](#4378))
([f072bfe](f072bfe))
* **poiesis-theme:** LaTeX template sink (B-002-C)
([#4380](#4380))
([8cc683d](8cc683d))
* **poiesis-theme:** reference.docx sink (B-002-D)
([#4381](#4381))
([520a9b3](520a9b3))
* **poiesis-theme:** Typst template sink (B-002-C)
([#4379](#4379))
([cf48d61](cf48d61))
* **poiesis:** add chromium CDP printer for HTML-to-PDF conversion
([#4377](#4377))
([bd4e29e](bd4e29e))
* **poiesis:** add deck-layout solver and deck HTML/CSS renderer
([#4360](#4360))
([5aa1472](5aa1472))
* **poiesis:** add image-text, timeline, comparison, blank component
packs ([#4367](#4367))
([457efd7](457efd7))
* **poiesis:** add stat, quote, chart, table, image-full component packs
([#4366](#4366))
([4a3df26](4a3df26))
* **poiesis:** add title, section, bullet, two-col component packs
([#4356](#4356))
([dde8451](dde8451))
* **poiesis:** retire poiesis-text; migrate callers to poiesis-doc/typst
(B-013) ([#4354](#4354))
([f13df45](f13df45))


### Documentation

* **instance:** refresh stale v0.13.x version references to v0.29.0+
line ([#4347](#4347))
([01bc922](01bc922))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant