architecture-placement

Identify architectural homes for domain rules, orchestration, and integration concerns.

Updated May 28, 2026
One-click install
npx skills add https://github.com/haryelramalho/skills --skill architecture-placement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-placement
Source: https://github.com/haryelramalho/skills/tree/main/skills/community/architecture-placement
Command: npx skills add https://github.com/haryelramalho/skills --skill architecture-placement

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you decide where each responsibility belongs in a codebase so domain rules, orchestration, and infrastructure do not get mixed together.

Core Features & Use Cases

  • Responsibility Mapping: Classify behavior into entities, value objects, domain services, use cases, ports, gateways, repositories, readers, adapters, and presentation layers.
  • Architecture Review: Spot boundary violations such as business rules in controllers, formulas in use cases, or foreign DTOs leaking inward.
  • Design and Refactoring Support: Use it while planning new features, reviewing existing code, or reshaping legacy modules toward Clean Architecture, DDD, or Hexagonal patterns.
  • Use Case: A team adding a pricing feature can use this Skill to place eligibility rules in the domain model, orchestration in the use case, and API or database mechanics in adapters.

Quick Start

Ask the architecture-placement skill to identify the correct layer for each responsibility in your feature before you start editing code.

Frequently Asked Questions about architecture-placement

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

FAQPage Schema
How do I decide where to place domain rules and orchestration in Clean Architecture?

To place domain rules and orchestration in Clean Architecture, map responsibilities to specific layers: entities and value objects hold domain rules, use cases handle orchestration, and adapters manage integration mechanics. This separation prevents business logic from leaking into controllers or infrastructure code.

What is responsibility mapping in DDD and Hexagonal Architecture?

Responsibility mapping in DDD and Hexagonal Architecture classifies behavior into entities, value objects, domain services, ports, and adapters. It enforces inward dependencies so domain rules remain isolated from infrastructure concerns like database schemas or API controllers.

How do I spot boundary violations during a code review?

To spot boundary violations during a code review, check for business rules placed in controllers, formulas embedded in use cases, or foreign DTOs leaking inward. Enforce inward dependencies to ensure infrastructure concerns do not pollute the domain model.

Can I use this approach to refactor legacy modules toward Onion Architecture?

Yes, you can use this approach to refactor legacy modules toward Onion Architecture. It supports reshaping existing code by explicitly placing repositories, readers, and gateways while enforcing boundary checks to separate orchestration from domain rules.

When do I need explicit placement of ports and adapters in my codebase?

You need explicit placement of ports and adapters when planning features that require strict separation between domain logic and integration mechanics. This ensures gateways and repositories handle external dependencies while use cases remain focused on orchestration.