Units of Work: Shoe Choo

Decomposition Strategy

Deployment Model: Single monolithic macOS application (.app bundle) Unit Strategy: Logical modules within a single Xcode target, organized by feature domain Rationale: Desktop macOS app has no microservice boundary — units represent development phases aligned with feature priority and dependency order


Unit Definitions

Unit 1: Core Editor Engine

Priority: Critical — Foundation for all other units Scope: Markdown parsing, intermediate model, rendering pipeline, TextKit 2 editor surface

Component Role in Unit
C-05 MarkdownParser Parse Markdown to AST
C-06 EditorNodeModel Intermediate block model
C-07 MarkdownRenderer AST → NSAttributedString
C-08 WYSIWYGTextView TextKit 2 editing surface

Deliverables:

Stories: 1.1–1.10 (Epic 1: WYSIWYG Editing)


Unit 2: Document Management

Priority: High — Required for file operations, depends on Unit 1 for editor integration Scope: NSDocument lifecycle, app entry point, editor settings

Component Role in Unit
C-01 ShoechooApp App lifecycle, DocumentGroup scene
C-02 MarkdownDocument NSDocument file I/O, auto-save
C-03 EditorViewModel Per-document state management
C-04 EditorSettings App-wide preferences
C-09 EditorView SwiftUI editor + toolbar composition
C-13 FileService File utilities

Deliverables:

Stories: 3.1–3.5 (Epic 3: Document Management), 8.1 (Epic 8: Typography)


Unit 3: Focus & Immersion

Priority: High — Core differentiator (“集中”), depends on Unit 1 editor surface Scope: Focus mode, typewriter scrolling, full-screen

Component Role in Unit
C-08 WYSIWYGTextView Focus dimming + typewriter scroll implementation
C-03 EditorViewModel Focus/typewriter state management
C-04 EditorSettings Persistence of preferences

Deliverables:

Stories: 2.1–2.3 (Epic 2: Focus & Typewriter), 7.1 (Epic 7: Full-Screen)


Unit 4: Image & Media

Priority: Medium — Enhances editing experience, depends on Unit 1 + Unit 2 Scope: Image drag & drop, clipboard paste, asset management

Component Role in Unit
C-12 ImageService Image import and asset management
C-13 FileService Assets directory management
C-08 WYSIWYGTextView Drag & drop handling
C-03 EditorViewModel Image reference insertion

Deliverables:

Stories: 6.1–6.2 (Epic 6: Image Support)


Unit 5: Export & Polish

Priority: Medium — Final MVP features, depends on Unit 1 + Unit 2 Scope: HTML/PDF export, sidebar, dark mode

Component Role in Unit
C-11 ExportService HTML and PDF generation
C-10 SidebarView Recent files sidebar
C-09 EditorView Dark mode adaptation

Deliverables:

Stories: 4.1–4.2 (Epic 4: Export), 5.1 (Epic 5: Sidebar), 7.2 (Epic 7: Dark Mode)


Code Organization

shoechoo/
+-- shoechoo.xcodeproj
+-- shoechoo/
|   +-- App/                          # Unit 2
|   |   +-- ShoechooApp.swift
|   |   +-- MarkdownDocument.swift
|   +-- Models/                        # Unit 1 + Unit 2
|   |   +-- EditorViewModel.swift
|   |   +-- EditorSettings.swift
|   |   +-- EditorNodeModel.swift
|   |   +-- EditorNode.swift
|   +-- Parser/                        # Unit 1
|   |   +-- MarkdownParser.swift
|   +-- Renderer/                      # Unit 1
|   |   +-- MarkdownRenderer.swift
|   +-- Editor/                        # Unit 1 + Unit 3
|   |   +-- WYSIWYGTextView.swift
|   |   +-- ShoechooTextView.swift
|   |   +-- FocusMode.swift
|   |   +-- TypewriterScroll.swift
|   +-- Views/                         # Unit 2 + Unit 5
|   |   +-- EditorView.swift
|   |   +-- SidebarView.swift
|   |   +-- PreferencesView.swift
|   +-- Services/                      # Unit 4 + Unit 5
|   |   +-- ExportService.swift
|   |   +-- ImageService.swift
|   |   +-- FileService.swift
|   +-- Extensions/
|   +-- Resources/
|       +-- Assets.xcassets
+-- shoechooTests/                     # Mirrors source structure
+-- shoechooUITests/
+-- docs/                              # GitHub Pages
+-- aidlc-docs/                        # AI-DLC docs
+-- README.md
+-- README-ja.md

Implementation Order & Timeline

Week 1-2: Unit 1 (Core Editor Engine)
    |
    v
Week 2-3: Unit 2 (Document Management)
    |
    +---> Week 3-4: Unit 3 (Focus & Immersion) [parallel possible]
    |
    +---> Week 4:   Unit 4 (Image & Media)     [parallel possible]
    |
    v
Week 4-5: Unit 5 (Export & Polish)
    |
    v
Week 5:   Integration Testing + Build + Notarization