Problem
word-builder-swift 0.9.0 (#71) shipped a fluent Swift API for .docx generation using a struct-serialization model (Document(sections: [...]) builder calls). Per ooxml-edit-isomorphism-foundation ADR-008, this model must migrate to a lens-model architecture to fit the macdoc OOXML toolchain's architectural foundation (Word↔Swift edit-isomorphism, fully faithful functor).
Type
refactor (architectural migration)
Priority
P2 — non-blocking for current downstream work, but needed before word-builder-swift can participate in the Edit-algebra contract.
Context
See ooxml-edit-isomorphism-foundation design.md ADR-008 for the deferred migration documentation:
Migration path (from ADR-008)
- Add a
LensDocument type alongside existing Document (coexistence period)
- Migrate
Packer.toFile() callers in che-word-mcp and macdoc convert to optionally use LensDocument
- Deprecate the struct-serialization
Document API
- Remove deprecated paths in word-builder-swift 1.0.0
Expected
A dedicated Spectra change opens within ~3 months that:
- Implements LensDocument as alternative to Document
- Migrates downstream callers atomically
- Maintains backward compatibility during transition
Strategy
Related
Refs #99
Current Status
Phase: verified
Last updated: 2026-05-25 by /idd-diagnose
Problem
word-builder-swift0.9.0 (#71) shipped a fluent Swift API for.docxgeneration using a struct-serialization model (Document(sections: [...])builder calls). Perooxml-edit-isomorphism-foundationADR-008, this model must migrate to a lens-model architecture to fit the macdoc OOXML toolchain's architectural foundation (Word↔Swift edit-isomorphism, fully faithful functor).Type
refactor (architectural migration)
Priority
P2 — non-blocking for current downstream work, but needed before
word-builder-swiftcan participate in the Edit-algebra contract.Context
See
ooxml-edit-isomorphism-foundationdesign.md ADR-008 for the deferred migration documentation:idd/chain-99-feat-architecture-radical-translation-oo)Migration path (from ADR-008)
LensDocumenttype alongside existingDocument(coexistence period)Packer.toFile()callers inche-word-mcpandmacdoc convertto optionally useLensDocumentDocumentAPIExpected
A dedicated Spectra change opens within ~3 months that:
Strategy
word-builder-swift-lens-migrationciting this issue + ADR-008Related
word-aligned-state-syncSpectra change (v1.0.0 cleanup window)Refs #99
Current Status
Phase: verified
Last updated: 2026-05-25 by /idd-diagnose