diff --git a/README.md b/README.md index d3067b9..d909c62 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,15 @@ PYTHONPATH=src python3 -m revoice generate \ --output examples/ai-code-guardrails/AI-Code-Guardrails.shadow.dave.md ``` +Preflight the generated Markdown for PDF export (auto-fix Mermaid + lint): + +```bash +PYTHONPATH=src python3 -m revoice preflight \ + --style if.dave.v1.2 \ + --input examples/ai-code-guardrails/AI-Code-Guardrails.shadow.dave.md \ + --source examples/ai-code-guardrails/AI-Code-Guardrails.pdf +``` + Or install the CLI locally: ```bash diff --git a/docs/APP_SPEC.md b/docs/APP_SPEC.md index 39e537e..cd4f84b 100644 --- a/docs/APP_SPEC.md +++ b/docs/APP_SPEC.md @@ -74,6 +74,16 @@ Run a deterministic linter per bible: If lint fails: auto-repair pass (LLM) or return “needs revision” with lint report. +### 5b) Mermaid preflight (PDF export reliability) + +If the output includes Mermaid diagrams, run a preflight pass before PDF export: +- auto-heal Mermaid blocks (quote labels, normalize headers, balance `subgraph/end`) +- validate Mermaid rendering in the same runtime used by the PDF exporter + +In `re-voice`, this is exposed as: + +`revoice preflight --style