software-architect

Enforce high cohesion, low coupling, and composition-first design in software architecture.

6|1|Updated Mar 25, 2019
One-click install
npx skills add https://github.com/Stephanvs/dotfiles --skill software-architect-stephanvs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: software-architect
Source: https://github.com/Stephanvs/dotfiles/tree/main/opencode/skills/software-architect
Command: npx skills add https://github.com/Stephanvs/dotfiles --skill software-architect-stephanvs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a philosophy and practical guidelines for designing software with high cohesion, loose coupling, and explicit data contracts. It helps teams avoid over-engineering and ensures codebases evolve predictably.

Core Features & Use Cases

  • High Cohesion: Modules have a single responsibility and clear ownership.
  • Low Coupling: Depend on stable interfaces and explicit data contracts.
  • Composition Over Inheritance: Assemble behavior at the boundary rather than deep type hierarchies.
  • Functional Core, Imperative Shell: Pure domain logic with explicit side effects.
  • Design-by-Defaults: Apply disciplined defaults to safety and clarity.

Quick Start

Review the Architecture Principles and apply them to your project. Start by outlining module boundaries, defining ports/interfaces, and wiring a minimal set of components to realize a concrete use case.

Frequently Asked Questions about software-architect

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

FAQPage Schema
How do I design software with high cohesion and low coupling?

High cohesion means grouping related responsibilities into single modules with clear ownership. Low coupling means depending on stable interfaces and explicit data contracts rather than implementation details. Apply composition over inheritance, use functional-style defaults, and define module boundaries around ports and interfaces to achieve both.

What is the functional core, imperative shell pattern?

Functional core, imperative shell separates pure domain logic—deterministic functions with explicit input/output—from side effects and I/O operations. The core contains immutable data and deterministic functions; the shell handles dependencies, state, and external effects. This structure improves testability and predictability.

When should I refactor existing code for better architecture?

Refactor when modules lack clear ownership, dependencies create circular references, or side effects scatter throughout business logic. Target codebases where testability is low or behavior changes ripple unexpectedly. Start by outlining module boundaries, defining explicit data contracts, and applying dependency injection to stabilize interfaces.

How do I enforce explicit data contracts between modules?

Define clear input and output boundaries for each module using interfaces or data structures that represent the contract. Avoid implicit assumptions; make dependencies and error handling explicit. Use composition to wire modules at boundaries, treating each module as a black box with documented, immutable interfaces.

Can I apply these design principles to legacy codebases?

Yes. Start with a minimal set of components realizing one concrete use case, then incrementally refactor existing code by extracting pure domain logic, introducing dependency injection, and establishing stable interfaces. Focus on reducing coupling and clarifying module responsibilities without a complete rewrite.

What prerequisites do I need before applying software architecture principles?

Understand your domain and business logic, identify module boundaries and responsibilities, and clarify data flowing between components. Define explicit interfaces and contracts, plan dependency injection points, and establish how side effects (I/O, persistence, external calls) will be isolated from pure logic.