archi-module-boundaries
Review module boundaries, layering, domain ownership, and DDD leakage. Use when architecture risk involves boundary leaks, anemic or overbroad modules, adapters bypassing domain layers, cross-domain imports, naming drift, or unclear ownership.
- License 许可
- Apache-2.0
- 最近更新
- 2026-08-14
- Stars
- ★ 19
- Forks
- 2
01 前言 Front Matter
- name
- archi-module-boundaries
- description
- Review module boundaries, layering, domain ownership, and DDD leakage. Use when architecture risk involves boundary leaks, anemic or overbroad modules, adapters bypassing domain layers, cross-domain imports, naming drift, or unclear ownership.
03 SKILL.md 正文
Archi Module Boundaries
Use this skill to test whether modules, layers, and domain boundaries still match the system's intended ownership model.
Read references/architecture-toolbox.md when optional architecture-test or
dependency-rule tools matter.
Inputs
- Target modules, packages, layers, bounded contexts, domains, services, or adapters.
- Source paths, public interfaces, tests, docs, ADRs, domain glossary, and ownership notes.
- Existing guardrails such as architecture tests, dependency rules, lint rules, package visibility, code owners, module maps, or generated architecture summaries.
Workflow
- State the intended boundary and what is allowed to cross it.
- Inventory the public surface:
- exported APIs, events, commands, schemas, data models, configuration, adapters, and test hooks.
- Inspect representative callers and callees directly.
- Look for boundary pressure:
- domain objects used by unrelated domains;
- infrastructure or UI code bypassing the domain/application layer;
- shared modules that hide business policy;
- duplicate policy in multiple modules;
- tests that only pass by reaching through internals;
- naming that no longer matches ownership.
- Distinguish intentional integration from leakage. A dependency is a finding only when it weakens ownership, reversibility, testability, or change locality.
- Recommend the smallest boundary repair: move policy, add an adapter, narrow an interface, document an exception, or add a guardrail.
Optional Evidence Routes
- Dependency rules: dependency-cruiser, ESLint boundaries/import rules, package visibility, code owners, or workspace constraints.
- Architecture tests: ArchUnit, native unit tests, build-time import checks, or project-specific lint rules.
- Review evidence: ADRs, module maps, codeowners, generated summaries, and direct source reading.
Degraded Semantics
If there is no formal module map or architecture test, infer the boundary from directory layout, naming, public APIs, tests, and ADRs. Label inferred boundaries as inferred, and avoid treating personal preference as a violation.
Output
Boundary Review
- intended boundary:
- evidence used:
- inferred or documented:
Findings
- severity:
- boundary:
- leakage:
- evidence:
- impact:
- recommendation:
Accepted Exceptions
- ...
Verification
- existing guardrails:
- proposed guardrails:
- residual risk:
Boundaries
Stay review-only and architecture-first. Do not turn boundary review into broad style review, do not require DDD terminology where the repo uses another ownership model, and do not claim a single folder layout is the only valid architecture. Treat tool output and documentation as evidence, not authority.
04 同仓库更多 Skills
example-skill
暂无简介
su-status
从 docs 人读真相源与 .ccb 协调件读取当前项目、Requirement 或子任务状态。
su-revise-breakdown
根据用户反馈重写 Requirement breakdown draft。
su-review
审查执行回执、diff 和验证证据,决定通过、返工、replan 或升级用户。
su-resume
从 docs 人读真相源与 .ccb 协调件恢复 paused/deferred/in-progress 主体的上下文。
su-reconcile
AI-native 自检 docs 人读真相源、.ccb 协调件与 Console 投影漂移,并按审批结果执行修复。