cmux-architecture

Codify scalable architecture guidelines for cmux projects with Swift 6 concurrency rules.

25.8k|2.2k|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/manaflow-ai/cmux --skill cmux-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cmux-architecture
Source: https://github.com/manaflow-ai/cmux/tree/main/skills/cmux-architecture
Command: npx skills add https://github.com/manaflow-ai/cmux --skill cmux-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

cmux architecture has grown complex due to ad-hoc refactors, package migrations, and mixed concurrency practices. This guide provides rules to enforce clean layering, dependency boundaries, and testability when restructuring code or introducing new packages. The outcome is a scalable, well-documented architecture that supports Swift 6 concurrency and sustainable growth.

Core Features & Use Cases

  • Enforces ergonomic public APIs, no dependency cycles, and clear package boundaries.
  • Guides leaf-first extraction and composition-root wiring to keep architecture scalable and maintainable.
  • Defines the five-package-layer model (Core, Services, Domain/State, UI, Executable) and provides migration patterns.

Quick Start

Identify the current package boundaries and begin the leaf-first extraction starting with Core primitives.

Frequently Asked Questions about cmux-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Swift project using a five-package-layer model?

A five-package-layer model structures Swift projects into Core, Services, Domain/State, UI, and Executable layers. This enforces clear package boundaries, dependency inversion, and testability during package refactors.

What is leaf-first extraction when refactoring a Swift package?

Leaf-first extraction is a refactoring approach that starts with Core primitives and progressively extracts dependent packages. It guides composition-root wiring and keeps architecture scalable by enforcing dependency boundaries and preventing cycles.

How do I enforce Swift 6 concurrency patterns during an architectural audit?

Enforce Swift 6 concurrency patterns during an architectural audit by checking for strict concurrency discipline, DAG dependencies, and ergonomic public APIs. This ensures clean layering and dependency inversion across package boundaries.

Why does my Swift package refactor create dependency cycles?

Swift package refactors create dependency cycles when package boundaries are ad-hoc and lack clean layering. Enforcing a five-package-layer model with one-major-type-per-file rules and DAG dependencies prevents these cycles.

Can I use the one-major-type-per-file rule for new package extraction?

Yes, the one-major-type-per-file rule is an enforcement criterion for new package extraction. Combined with ergonomic public APIs and clear package boundaries, it ensures testability and sustainable architectural growth.