Skip to content

feat(generator): multi-section manual assembly — ordered sections, per-section numbering restart #100

@thewrz

Description

@thewrz

Context

ADR-017 D1. The generator renders one section per call; the project model holds an ordered TOC. A project manual needs all sections in one document with per-section numbering.

Scope

Create:

  • generateManual(projectId) v1: iterate ordered TOC, reuse existing per-section emitters, OOXML section breaks, per-section numbering instances (distinct abstractNum per section — the known sharp edge, see ADR-017 Consequences), w:sdt anchors preserved
  • POST /projects/:id/generate streaming the single DOCX buffer

Acceptance

  • Two-section fixture: both sections present, numbering restarts at PART 1 in each
  • Every paragraph still wrapped in its UUID anchor
  • Single DOCX buffer streams from the endpoint

Out of scope

Cover/TOC page (follow-up), issuance/addenda (follow-up), PDF (ADR-019).

Note: draft mode renders from existing project_specs — no Phase 2d dependency for v1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions