architecture-design
Architecture Design
Clean-architecture design, refactor sequencing, and explanation — applied to
new work, to a planned move from a tangled state toward cleaner boundaries, or
to teaching a principle against the actual code. Provenance lives in
skill.json; this file is runtime routing only.
Produces: a design-doc.md (target shape + acceptance criteria), a
refactor-runbook.md (reversible step sequence), or an explanation.md
(grounded concept walkthrough), depending on intent.
Core principle
Decide the dependency direction before code sets. Source-code dependencies point inward, toward more abstract code; the cheapest time to place a seam correctly is before anything depends on it crossing the wrong way. Name the good-shaped pattern concretely — a layer diagram, a port signature, an aggregate boundary — rather than restating principles abstractly.