Add modular renderer, PDF output, and session transcript#12
Merged
Conversation
- Renderer now installs only what's needed: docx2pdf for docx jobs, weasyprint for HTML jobs; core packages (docxtpl, pyyaml, jinja2) only - DOCX → PDF conversion attempts docx2pdf first, falls back to LibreOffice headless (soffice), soft-fails with warning if neither available - Orchestrator relays PDF warning and suggests manual conversion when PDF is not produced - Docs updated: quick-rendering, templates reference, introduction, changelog Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After rendering, the Orchestrator now generates a transcript.md in the job folder recording the full interview: questions asked, values collected, which conditional sections were included or skipped, and loop items. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace exist_ok=True with a deduplication loop that appends _2, _3, etc. when a same-named job folder already exists, preventing silent overwrites when the same template is rendered for the same person on the same day. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.docx, Codraft now attempts PDF conversion viadocx2pdf(uses MS Word on macOS/Windows, LibreOffice on Linux) with a LibreOffice headless fallback. Soft-fails with a warning if neither tool is available; the.docxis always delivered.docxtpl,pyyaml,jinja2) are installed upfront;docx2pdfis installed only for docx jobs andweasyprintonly for HTML jobs. No unnecessary packages loaded.transcript.mdin the job folder recording the full interview: values collected, conditional sections included/skipped, and loop items. Works natively in Claude Code and Cowork (both render Markdown)._2,_3, etc. when a same-named folder already exists.codraft-latest.zip, so Cowork users can download without navigating into the install guide.Test plan
codraftontemplates/_examples/Bonterms_Mutual_NDA/(simple docx) — confirmtranscript.mdhas clean table-only sections, no conditional annotationscodraftontemplates/_examples/consulting_agreement/(docx, groups + conditionals + loop) — confirm.docx+.pdfproduced, transcript sections annotated correctly, loop items as**Item N**sub-sectionscodraftontemplates/_examples/event_invitation/(HTML, conditionals + loop) — confirm transcript saved to HTML job folder_2suffix, first job untouchedsofficeand uninstalldocx2pdf— confirm.docxdelivered with warning messagecodraft-latest.zipdownload🤖 Generated with Claude Code