en un clic
ddd-architect
Ensure code follows DDD architecture and DAL separation principles. Triggers: DDD, arch, 架構, 新功能, 新模組, new feature, scaffold, 骨架, domain.
Menu
Ensure code follows DDD architecture and DAL separation principles. Triggers: DDD, arch, 架構, 新功能, 新模組, new feature, scaffold, 骨架, domain.
Use when brainstorming ideas, stuck on a problem, exploring alternatives, or needing creative input - provides structured creativity methods (SCAMPER, Six Hats, Mind Map), Multi-Agent parallel thinking, and concept collision for unexpected sparks. Don't use for mechanical execution tasks
Auto-update CHANGELOG.md following Keep a Changelog format. Triggers: CL, changelog, 變更, 版本, version, 更新日誌, whatsnew.
Proactively detect and execute code refactoring to maintain DDD architecture and code quality. Triggers: RF, refactor, 重構, 拆分, split, 模組化, modularize, 太長, cleanup.
Comprehensive code review checking quality, security, and best practices. Triggers: CR, review, 審查, 檢查, check, 看一下, PR, code review, 品質.
Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布.
Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.
| name | ddd-architect |
| description | Ensure code follows DDD architecture and DAL separation principles. Triggers: DDD, arch, 架構, 新功能, 新模組, new feature, scaffold, 骨架, domain. |
確保程式碼遵循 DDD 架構與 DAL 分離原則。
當建立新功能時,自動生成 DDD 結構:
「新增 Order 領域」
生成:
src/
├── Domain/
│ ├── Entities/Order.py
│ ├── ValueObjects/OrderId.py
│ ├── Aggregates/OrderAggregate.py
│ └── Repositories/IOrderRepository.py
├── Application/
│ ├── UseCases/CreateOrder.py
│ └── DTOs/OrderDTO.py
└── Infrastructure/
└── Persistence/Repositories/OrderRepository.py
偵測並警告:
✅ Presentation → Application → Domain
✅ Infrastructure → Domain (實作介面)
❌ Domain → Infrastructure
❌ Domain → Application
🏗️ DDD 架構檢查
✅ 依賴方向正確
✅ DAL 正確分離
⚠️ 警告:
- src/Domain/Services/UserService.py:15
導入了 Infrastructure 模組
建議:
將資料庫操作移至 Repository