Summary
Extend the template system from decks only to documents: ship a templates/ set for recurring document types (board meeting minutes, proposal, report, meeting notes) and add a "New from template…" entry in the Home screen and Quick Switcher that creates a docx from a chosen template.
Motivation
- HermesOffice already has a polished deck-template pipeline (
templates/deck-*.pptx, tools/gen-templates.py). Documents have no equivalent — every docx starts blank.
- Recurring docs (the user produces board minutes, proposals, reports weekly) are exactly where templates remove friction and enforce house style.
- Template files are plain OOXML in the repo → community can contribute new ones with zero code knowledge.
Proposed UX
- Home: "New" button gets a second action New document from template… → modal with template cards (name, preview thumbnail, tags).
- Quick Switcher (once it exists) also lists templates when query matches
template:.
- Template picker shows: built-in set (from the repo
templates/) — the app loads them read-only; "Use" duplicates the file to a chosen location (or the active project) and opens it in a new tab.
- v1 scope: docx templates only (pptx already covered by the deck flow; xlsx later).
Implementation notes
- Where templates live: extend the existing
templates/ directory in the repo (currently deck-base.pptx, deck-nocturne.pptx, deck-blue-white.pptx, deck-mocha.pptx). Add doc-board-minutes.docx, doc-proposal.docx, doc-report.docx, doc-meeting-notes.docx — built with python-pptx-equivalent tooling (python-docx) via an extension of tools/gen-templates.py so they're regenerable, not hand-edited binaries. Keep the same "regenerate from source" convention.
- App loading: the installed app must bundle the templates (check how the deck templates are shipped today — via the MCP connector
/tmp/genoffice/templates/ or embedded in the shell); mirror that mechanism so templates/ in the repo is the single source of truth.
- Creation flow: "Use template" = copy file to target path +
HOME_CHANNELS.openPath on it (existing open flow). Optionally fill placeholders ({{TITLE}}, {{DATE}}) — v1: leave placeholders in the text, show a hint bar "Replace placeholders" (or let the AI panel do it on request — natural first AI integration: "fill this template").
- Home UI:
apps/shell/src/renderer/src/Home.tsx new-doc menu; template metadata as a small templates/manifest.json (name, type, tags, thumbnail path) so the picker is data-driven.
Acceptance criteria
Out of scope
- Placeholder auto-fill engine (v1 leaves
{{…}} tokens; AI fill is a follow-up).
- xlsx/slides template picker (slides keep the existing patch-from-template flow).
- User-created template library (community contributions land in the repo
templates/ for now).
Summary
Extend the template system from decks only to documents: ship a
templates/set for recurring document types (board meeting minutes, proposal, report, meeting notes) and add a "New from template…" entry in the Home screen and Quick Switcher that creates a docx from a chosen template.Motivation
templates/deck-*.pptx,tools/gen-templates.py). Documents have no equivalent — every docx starts blank.Proposed UX
template:.templates/) — the app loads them read-only; "Use" duplicates the file to a chosen location (or the active project) and opens it in a new tab.Implementation notes
templates/directory in the repo (currentlydeck-base.pptx,deck-nocturne.pptx,deck-blue-white.pptx,deck-mocha.pptx). Adddoc-board-minutes.docx,doc-proposal.docx,doc-report.docx,doc-meeting-notes.docx— built with python-pptx-equivalent tooling (python-docx) via an extension oftools/gen-templates.pyso they're regenerable, not hand-edited binaries. Keep the same "regenerate from source" convention./tmp/genoffice/templates/or embedded in the shell); mirror that mechanism sotemplates/in the repo is the single source of truth.HOME_CHANNELS.openPathon it (existing open flow). Optionally fill placeholders ({{TITLE}},{{DATE}}) — v1: leave placeholders in the text, show a hint bar "Replace placeholders" (or let the AI panel do it on request — natural first AI integration: "fill this template").apps/shell/src/renderer/src/Home.tsxnew-doc menu; template metadata as a smalltemplates/manifest.json(name, type, tags, thumbnail path) so the picker is data-driven.Acceptance criteria
tools/gen-templates.py.manifest.json(adding a template = adding files + manifest entry).Out of scope
{{…}}tokens; AI fill is a follow-up).templates/for now).