Skip to content

chain: feat(architecture): radical translation OOXML library — Word↔Swift edit-isomorphism#106

Merged
kiki830621 merged 4 commits into
mainfrom
idd/chain-99-feat-architecture-radical-translation-oo
May 25, 2026
Merged

chain: feat(architecture): radical translation OOXML library — Word↔Swift edit-isomorphism#106
kiki830621 merged 4 commits into
mainfrom
idd/chain-99-feat-architecture-radical-translation-oo

Conversation

@kiki830621
Copy link
Copy Markdown
Collaborator

Refs #99

Summary

Cluster of 1 root issue solved as one chain (root #99) via /idd-all-chain (v2.55+).

Architectural foundation: pins Word↔Swift edit-isomorphism (fully faithful functor) as the macdoc OOXML toolchain's core architectural contract via:

  • New capability spec ooxml-edit-algebra (8 normative Requirements with Scenarios + SBE Examples)
  • design.md with 9 ADRs (canonical-identity round-trip, Edit-as-first-class, two-layer algebra, module split, operation naming, Word UI ground truth, conformance suite, deferred lens migration, downstream rerouting) — each with rationale + alternatives considered
  • 4 canonical CD diagrams in ADR-002 Worked Examples (insertParagraph, setBold, insertHyperlink, applyBold range-crossing)
  • Cross-reference section added to active word-aligned-state-sync Spectra change
  • PR template at .github/PULL_REQUEST_TEMPLATE.md requiring CD diagram for EditAlgebra/ PRs
  • CD discipline README at docs/edit-algebra-cd-discipline.md
  • 2 docs cross-references (docs/lossless-conversion.md, docs/structural-editing-paradigm.md)

Apply scope is Hybrid: decision-pinning + 11 mechanical apply tasks (§8 follow-up issue creation, §9 PR template + README, §10 docs cross-refs + spectra validate). Swift implementation (23 tasks: Edit protocol, OOXMLEdit/WordEdit enums, Document.apply, property tests, CD diagrams per Edit case) is DEFERRED to Phase 2 Spectra change ooxml-edit-algebra-implementation (tracking issue #105) for proper TDD + audit discipline + human review at API surface decisions.

Cluster overview

# root_id Spawn source Phase PR commit
#99 99 root verified 4cd3dd0

Per-issue details

#99 — feat(architecture): radical translation OOXML library — Word↔Swift edit-isomorphism (fully faithful functor) as core contract

See issue #99 for diagnose / verify / commit history.

Diagnosis: #99 (comment)
Verify report: #99 (comment) (6-AI ensemble PASS after P1 inline fixes)

Follow-up issues opened during apply (§8 of tasks.md):

Commits (4):

  • fb6e952 — spectra: propose ooxml-edit-isomorphism-foundation
  • 619efc9 — spectra: apply ooxml-edit-isomorphism-foundation (mechanical tasks §8-§10)
  • 0ec37b4 — spectra: relocate EditAlgebra README to docs/
  • 4cd3dd0 — spectra: fix verify P1 findings (Worked Examples, ADR alternatives, proposal Hybrid scope, tasks §9.2 path)

Review status


🤖 Generated by /idd-all-chain. Do NOT add GitHub close trailers (Closes/Fixes/Resolves) — IDD discipline requires manual /idd-close #99 after merge to enforce checklist gate + per-issue closing summary.

Pins the Word↔Swift edit-isomorphism contract as the macdoc OOXML
toolchain's core architectural contract via:
- New capability spec 'ooxml-edit-algebra' (8 Requirements)
- design.md with 9 ADRs (canonical-identity, Edit-as-first-class,
  two-layer algebra, module split, naming, Word UI ground truth,
  conformance suite, lens migration path deferred, downstream rerouting)
- tasks.md with hybrid scope: Edit type elevation + property-based
  functor tests on 3-5 representative OOXMLEdit cases only;
  downstream migrations explicitly deferred to follow-up Spectra changes

Cross-references active 'word-aligned-state-sync' change in design.md
Relationship section. Coordinates downstream PRs #94/#95/#96/#97/#98
that 6-AI verify identified as blocked on spec ambiguity — they will
be reframed as front-ends to this foundation per ADR-009.

Refs #99
…-§10)

Shipped (apply phase, 11/35 tasks):
- §8.1 Cross-reference to ooxml-edit-isomorphism-foundation in
  word-aligned-state-sync/design.md Relationship section
- §8.2 Follow-up issue #101 (word-builder-swift lens migration)
- §8.3 Follow-up issue PsychQuant/che-word-mcp#162 (MCP boundary refactor)
- §8.4 Follow-up issue #102 (PR #94 dxedit re-frame)
- §8.5 Follow-up issue #103 (PR #96 R-wordbuilder re-frame)
- §8.6 Follow-up issue #104 (PR #95 pptx-mcp re-frame)
- §9.1 .github/PULL_REQUEST_TEMPLATE.md with CD-diagram requirement
- §9.2 EditAlgebra/README.md documenting CD discipline + worked examples
- §10.1 spectra validate green
- §10.3 docs/structural-editing-paradigm.md cross-reference
- §10.4 docs/lossless-conversion.md cross-reference

Deferred to Phase 2 Spectra change (§1-§7 + §10.2 Swift implementation,
23/35 tasks): Edit protocol code, OOXMLEdit/WordEdit enums, Document.apply
API, property-based functor tests. Deferral rationale documented in
tasks.md ASSUMPTION block; new follow-up Spectra change
'ooxml-edit-algebra-implementation' opens after this foundation archives.

Decision-pinning (this change) + runtime implementation (Phase 2) serve
different review modes and benefit from being separate changes.

Refs #99
The Phase 2 implementation Spectra change can copy this README into
packages/ooxml-swift/Sources/OOXMLSwift/EditAlgebra/ when the actual
Swift code lands. Keeping it in docs/ for this change since the
package directory is not tracked in the monorepo.

Refs #99
…proposal Hybrid scope, tasks §9.2 path

Addresses verify-cycle findings (#99 verify report):

P1.1 — design.md ADR-002: add #### Worked Examples subsection with 4
canonical CD diagrams (insertParagraph body-level, setBold run-level,
insertHyperlink dual-part atomic, applyBold range-crossing). Resolves
4 dangling cross-references from PR template / EditAlgebra README /
tasks.md §3.1/§3.2/§4.2/§9.2.

P1.2 — design.md ADR-005 through ADR-009: add Alternatives Considered
sections so all 9 ADRs uniformly carry decision/alternatives/rationale.

P1.3 — proposal.md: reflect Hybrid scope explicitly. Apply scope is
decision-pinning + mechanical artifacts ONLY; Swift implementation
(Edit type + OOXMLEdit + WordEdit + property tests) deferred to
Phase 2 Spectra change ooxml-edit-algebra-implementation (#105).
Impact list marks Swift files as Deferred.

P1.4 — tasks.md §9.2: correct README location (shipped at
docs/edit-algebra-cd-discipline.md, NOT packages/...EditAlgebra/README.md;
packages/ is gitignored). Phase 2 change relocates when actual Swift
code lands.

P1.5 — Open Phase 2 implementation tracking issue #105
('Spectra: ooxml-edit-algebra-implementation') so deferred Swift work
has visible tracker (was previously only mentioned in ASSUMPTION block).

Not fixing (DA flagged as out-of-scope for this change):
- word-aligned-state-sync Decision 3 reframe: design.md Relationship
  section documents the reframe intent for v1.0.0 archival window;
  unilaterally rewriting their normative Decision 3 here would violate
  cross-change author consent (per DA Angle 4)

Refs #99
@kiki830621 kiki830621 merged commit 648e5a5 into main May 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(architecture): radical translation OOXML library — Word↔Swift edit-isomorphism (fully faithful functor) as core contract

1 participant