/aimi-engineering:architecture-foundationfrom aimi-engineering
Proposes or audits repository architecture using Clean Architecture dependency rules and DDD tactical patterns (bounded contexts, aggregates, ports/adapters). For greenfield layering decisions or brownfield convention inference.
Ships in aimi-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Condensed, actionable Clean Architecture (Robert C. Martin) and Domain-Driven
Design (Eric Evans) conventions for laying down or auditing a repository's
foundation — greenfield proposals and brownfield convention inference alike.
Full-depth material lives under references/; this file carries everything
needed to make a foundation decision without reading further.
Attribution: The rules below adapt condensed guidance from the
agent-rules-booksproject's Clean Architecture and Domain-Driven Design mini-guides, Copyright (c) 2026 Maciej Ciemborowicz, MIT License. Rewritten here as foundation-story conventions, not reproduced verbatim. SeeNOTICE.md.
implementation.approach must justify a layering, module
boundary, or naming decision.Source-code dependencies point inward. Domain and use-case code never imports frameworks, database drivers, web/HTTP libraries, queue clients, or UI toolkits. Frameworks, databases, transport, and messaging are outer-layer details reached only through an interface the inner layer owns. Inner layers define ports; outer layers implement them; a composition root wires concrete details at the edge. Every other rule below exists to protect this one.
| Layer | Contains | Must | Must not |
|---|---|---|---|
| Domain | entities, invariants, core business rules | be framework-free, persistence-ignorant | import web/db/queue libs, perform I/O |
| Application | use cases, input/output models, ports | depend only on domain abstractions, orchestrate one action per use case | contain controller logic, return framework types |
| Interface Adapters | controllers, presenters, gateway adapters, mappers | translate external formats to/from internal models | own business decisions, bypass use cases |
| Infrastructure | framework bootstrap, DB access, external clients, composition root | implement interfaces owned by inner layers, stay replaceable | define business rules, leak vendor types inward |
Prefer feature/use-case-oriented folder names (orders/place-order/) over
generic technical buckets (services/, helpers/, utils/) — structure
should reveal the domain and its use cases, not the framework.
Apply as PROPOSE-style defaults — recommendations with rationale — when drafting a layering, folder layout, module template, or naming convention. Reweight or skip a rule when a named stack's own ecosystem convention already satisfies it better; never present the reweighting as an open question.
common/
folder that nobody enforces.*Service, utils/, helpers/, or core/ folder becoming an escape
hatch for everything → split by use case or domain concept, restore
ownership.*Service classes that create, fetch, validate, persist, and publish
everything for every use case.utils/, common/, or core/ folders used as architecture escape
hatches instead of named use cases or domain concepts.Before accepting a foundation proposal or a layering change, confirm:
For the full-depth source material behind these condensed rules — additional heuristics, code-generation ordering, refactoring playbooks, and testing detail — read on demand (not auto-loaded):
references/clean-architecture.md — full layering, boundary, and
refactoring detail.references/domain-driven-design.md — full strategic + tactical pattern
detail (Bounded Contexts, context mapping, Aggregates, Repositories,
Specifications, Factories).references/domain-driven-design-distilled.md — the pragmatic "smallest
effective DDD" subset (subdomain classification, integration styles).references/patterns-of-enterprise-application-architecture.md — Service
Layer, Repository/Data Mapper/Active Record tradeoffs, Unit of Work,
Identity Map, session-state patterns for enterprise application shape.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aimi-so/aimi-engineering-plugin --plugin aimi-engineering19 skills in this plugin
/agent-browserBrowser automation using Vercel's agent-browser CLI. Use when you need to interact with web pages, fill forms, take screenshots, or scrape data. Alternative to Playwright MCP - uses Bash commands with ref-based element selection. Triggers on "browse website", "fill form", "click button", "take screenshot", "scrape page", "web automation"./agent-native-architectureBuild applications where agents are first-class citizens. Use this skill when designing autonomous agents, creating MCP tools, implementing self-modifying systems, or building apps where features are outcomes achieved by agents operating in a loop./Other plugins' skills for the same job