/generate-word
Brand-compliant Word document generation. Three target variants:
technical— engineering-internal deliverable (technical spec, runbook, ADR-style doc) — voice: internalcustomer-summary— customer-bound engagement summary — voice: pack-resolved (customer-facing tier), gatedtransparency-note— AI-feature transparency note — voice: pack-resolved (customer-facing tier), gated, includes honest-limitations check
Renders .docx via a Node library under the hood.
Prerequisites
This skill produces .docx via a Node library — docxtemplater
for filling brand .docx templates, or docx for programmatic
generation. If neither is installed, set one up first (e.g. npm i docxtemplater pizzip).
Graceful degradation if it cannot be installed (no Node toolchain / offline): fall back to
/li:make-pdf from a markdown draft, or emit the document as markdown. Do not silently produce
nothing — state which path you took.
When to use
- Customer engagement summary deliverable
- Technical spec / architecture doc with the active pack's brand identity
- AI-feature transparency note (compliance artifact, if the active pack requires one)
When NOT to use
- Quick markdown note — use direct editing
- Slide content — use
/generate-ppt - Multi-page wiki/site — use
/generate-web
Inputs
- Required
--brief <path|inline>— content brief or source markdown OR--from-pipeline <dir>(shared pipeline mode) - Required
--target <technical|customer-summary|transparency-note>— variant - Optional
--template <name>— explicit template (default:<target>.docxfrom brand) - Optional
--audience <text>— primary audience - Optional
--voice— voice tier override (default per target) - Optional
--use-defaults— force in-repo default templates - Optional
--ignore-stale-brand <reason>— bypass staleness-warn
From-pipeline mode (v3.5 Phase 2 — generate-pipeline integration)
If invoked with --from-pipeline <run-dir> instead of --brief:
Read shared pipeline-output:
<run-dir>/content.md— sections with H1/H2/H3 hierarchy + bodies + voice-annotations<run-dir>/design-spec.json— readper_format.word.sectionsfor heading-levels + slot-mappings
Replace brief-parsing logic with direct-read of content.md (per target-variant):
technical: headings + paragraphs + code blocks + tablescustomer-summary: narrative paragraphs + key findings + next stepstransparency-note: capabilities + limitations + data + decisions + appeals
Apply format-specific design-pass via design_pass_hook:
- Reads
per_format.word.sections[N].design_pass_hook(canonical: WordTechnicalEditor) - Invokes agent for a Word-specific fidelity-pass (heading-style consistency, technical-tone, tables-formatting)
- Per Reviewer Concern #7: WordTechnicalEditor stays word-specific
- Reads
CLI stays backward-compat: existing
--brief-flag invocations work unchanged.--from-pipelineis additive.4-gate pipeline runs as usual (voice + brand + honest-limitations if transparency-note + provenance).
Workflow
Preflight gates (same as /generate-ppt) — brand template present, staleness check, the active pack's compliance gates for customer-facing variants
Read brief + parse into target-shape:
- technical: headings + paragraphs + code blocks + tables → matched to technical template
- customer-summary: narrative paragraphs + key findings + next steps → matched to customer template
- transparency-note: capabilities + limitations + data + decisions + appeals → matched to transparency template
Invoke target-specific agent:
- technical →
WordTechnicalEditoragent for structure + accuracy review - customer-summary →
WordTechnicalEditorfor structure; voice gate Gate 1 handles voice - transparency-note → both
WordTechnicalEditorand explicit honest-limitations check
- technical →
Generate via docxtemplater:
- Load template
- Substitute placeholders with brief-derived content
- Insert formatted blocks (tables, code, lists)
- Embed asset references where appropriate
4-gate quality pipeline (per /generate-ppt):
- Gate 1: voice gate (per voice-tier)
- Gate 2: brand-conformance
- Gate 3: honest-limitations (active only for transparency-note variant)
- Gate 4: provenance record
On all 4 PASS: move from
~/.lintel/draft/→--outpath.
Report format
Generate Word: case-analysis-ai-transparency-note
Target: transparency-note
Template: transparency-note.docx (~/.lintel/brand/word-templates/, brand version 2026-Q2)
Voice tier: internal (pack-resolved)
## Structure (from brief)
- Overview: 1 paragraph
- Capabilities: 6 items
- Limitations: 7 items (ratio 7/6 — honest ✓)
- Data inventory: 4 categories
- Decision impact: medium (informational with human-in-loop)
- Appeals + feedback: documented
## Generation (docxtemplater)
Produced ~/.lintel/draft/case-analysis-ai-transparency-note.docx (47 KB)
## 4-Gate pipeline
Gate 1 (voice): ✓ PASS — score 88/100
Gate 2 (brand): ✓ PASS — template + heading styles + footer per brand 2026-Q2
Gate 3 (honest): ✓ PASS — limitations ratio 7/6 ≥ capabilities−2
Gate 4 (proven): ✓ PASS — PROV-8b2c4 recorded
## Status
ALL GATES PASS. Moving from draft → ./case-analysis-ai-transparency-note.docx.
For customer distribution: confirm the recorded provenance reference PROV-8b2c4.
Compliance integration
- 4-gate pipeline is the customer-bound enforcement path; the specific gates are pack-configurable (
resolve_pack_field compliance.hooks; none by default) - transparency-note variant invokes the honest-limitations gate (mandatory)
- Customer-data in brief → BLOCK
- Distribution gated by the active pack's deploy/release gate (if any) reading provenance + voice status
Failure modes
- docxtemplater placeholder mismatch (template + brief don't align) — surface diff, allow operator to align brief or pick different template
- Honest-limitations fails (limitations < capabilities − 2) — REJECT for transparency-note; force operator to expand limitations
- Voice gate fails after regen — same as /generate-ppt
- Brand template absent — fall back to default-word-template.json OR refuse if
--use-defaultsnot set
Examples
Technical spec:
> /generate-word --brief docs/spec/auth-rewrite.md --target technical
[Uses technical voice tier; no voice gate; brand gate active]
✓ ./auth-rewrite.docx
Customer summary:
> /generate-word --brief engagement-notes.md --target customer-summary --audience "Customer A finserv CISO"
[Customer-facing voice tier; full 4-gate]
✓ ./engagement-summary.docx — PROV-9a3.
Transparency note:
> /generate-word --brief case-analysis-design.md --target transparency-note
[Honest-limitations gate active; cross-references the active pack's impact-assessment gates if present]
✓ ./case-analysis-ai-transparency-note.docx — PROV-8b2c4.
See also
BRAND-INTEGRATION.mdWordTechnicalEditoragent- The active pack's compliance gates (
resolve_pack_field compliance.hooks; none by default) /generate-ppt,/generate-web