Why
The submittal register endpoint compiles products × required submittal types × datasheet
associations into structured JSON with findings — but the register's real-world destination is a
document deliverable issued alongside a package. Today every client that needs that document must
rebuild document rendering on its own, while SpecR's generator already owns DOCX output and CSI
styling. Rendering the register server-side keeps "one source of truth, many renders" true for
reports, not just specs.
What
- Generator module:
SubmittalRegister → DOCX — a titled table document (grouped by section:
product, required submittal types, datasheet references), with an optional findings appendix.
- Surface:
format=docx content negotiation on the existing register route, or a sibling
/submittal-register/generate — follow whichever pattern /specs/{id}/generate established;
decide in review.
- Reuse generator infrastructure (dolanmiu/docx, existing style plumbing); no new styling system.
- Markdown render of the register via the shared renderer contract if cheap — keeps parity with
how other artifacts render.
- MCP: follow the existing
generate_docx tool pattern (or MCP_UNEXPOSED with rationale if
binary payload doesn't fit the tool surface); contract-map.ts entry either way.
Tasks
Acceptance criteria
- One call produces a well-formed DOCX register for a project (optionally scoped to a package),
grouped by section, consistent with the JSON endpoint's rows.
- JSON and DOCX renders never disagree on content (same query underneath).
Why
The submittal register endpoint compiles products × required submittal types × datasheet
associations into structured JSON with findings — but the register's real-world destination is a
document deliverable issued alongside a package. Today every client that needs that document must
rebuild document rendering on its own, while SpecR's generator already owns DOCX output and CSI
styling. Rendering the register server-side keeps "one source of truth, many renders" true for
reports, not just specs.
What
SubmittalRegister→ DOCX — a titled table document (grouped by section:product, required submittal types, datasheet references), with an optional findings appendix.
format=docxcontent negotiation on the existing register route, or a sibling/submittal-register/generate— follow whichever pattern/specs/{id}/generateestablished;decide in review.
how other artifacts render.
generate_docxtool pattern (orMCP_UNEXPOSEDwith rationale ifbinary payload doesn't fit the tool surface);
contract-map.tsentry either way.Tasks
src/generator/: register→DOCX module (table layout, findings appendix)src/api/: route/param +openapi.yamlsame PRsrc/mcp/: tool or explicitMCP_UNEXPOSEDentryAcceptance criteria
grouped by section, consistent with the JSON endpoint's rows.