To: Next Agent / Engineer From: Architect Agent Date: 2026-02-03 Status: 馃煛 Mid-Refactoring (Modularization)
We are building Flying Dutchman, a native macOS container engine (OrbStack competitor) using Apple's 2026 Containerization.framework.
Current Architectural State:
- Migration: We just migrated from a standard SPM structure to a Tuist Modular Architecture (TMA).
- Layers:
Projects/Core:Shared,Persistence.Projects/Domain:ContainerKit,NetworkKit,MachineKit(Virtualization),KubeKit.Projects/Product:App,CLI,Engine.
- Build System: Tuist is the source of truth (
tuist generate).Package.swiftexists for legacy/CI compatibility but points to old paths (needs update or ignore).
- Phase 3.1 Completed: Linux Machines are fully functional with SSH (
Citadel), stable MAC addresses, and IP detection (ARPScanner). - Phase 3.2 Kubernetes: Core provisioning works (VM-based k3s).
fd k8s create --vmandkubeconfigare implemented. - Phase 4.1 Menu Bar: Implemented
MenuBarExtraandMenuBarView. - Tuist Migration: Codebase physically moved to
Projects/directory structure.Workspace.swiftcreated.
We have a detailed plan in openspec/plans/feature_extraction.md.
The App (Projects/Product/App) is still a monolith containing all Views.
Action:
- Move
DesignSystemandComponentstoProjects/Core. - Extract features (
Containers,Images,Settings, etc.) intoProjects/Features/. - Update
Project.swiftfiles to wire dependencies.
We haven't run tuist generate or swift build since the massive file move.
Action:
- Run
tuist generate. Fix any circular dependency or path errors. - Fix
Package.swiftif we want to keep it (update paths toProjects/...).
*.k8s.fd.local domain routing is the last item for full Phase 3.2 completion.
- Plan:
openspec/plans/feature_extraction.md(Read this first!) - Architecture:
openspec/TECH_DEBT_REFACTORING.md - Workspace:
Workspace.swift - Logic:
Projects/Domain/ContainerKit/Sources/VirtualizationRuntime.swift(VM Logic)
# Generate project
tuist generate
# Run Engine (Daemon)
swift run --package-path Projects/Product/Engine FlyingDutchmanEngine
# Run CLI
swift run --package-path Projects/Product/CLI FlyingDutchmanCLI- Imports: We moved files. Imports like
import Sharedmight need to change toimport Coreif we renamed the module (we kept itSharedfor now). - Entitlements: VM logic requires
com.apple.security.virtualizationentitlement. Ensure Tuist applies this to the Engine target.
Next Step: Execute the Feature Extraction plan to decouple the UI.