docs: Update AGENT.md
- commit
- 147217db9113ee957aea88cc8265b76d1f56a8c8
- author
- brice · · 2026-01-27 05:56 UTC
- parent
- 44f3625
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +32 -0
A AGENT.md +32 -0
| @@ -0,0 +1,32 @@ | |||
| 1 | + | # Clean Architecture | |
| 2 | + | ||
| 3 | + | ## Layers | |
| 4 | + | ||
| 5 | + | | Layer | Contains | Depends On | | |
| 6 | + | |-------|----------|------------| | |
| 7 | + | | `app/` | Entry points, CLI/TUI, request handling | usecase | | |
| 8 | + | | `usecase/` | Business logic, orchestration | domain, boundaries | | |
| 9 | + | | `domain/` | Entities, value objects, utils | nothing | | |
| 10 | + | | `boundaries/in` | Inbound interfaces (services) | domain | | |
| 11 | + | | `boundaries/out` | Outbound interfaces (repos, clients) | domain | | |
| 12 | + | | `adapters/` | Interface implementations | boundaries, domain | | |
| 13 | + | ||
| 14 | + | ## Rules | |
| 15 | + | ||
| 16 | + | - **app**: Parse input, call usecase, format output. No business logic. | |
| 17 | + | - **usecase**: All business logic. Use boundaries for I/O. | |
| 18 | + | - **domain**: Pure functions only. No I/O. | |
| 19 | + | - **boundaries**: Interfaces only. Mock with `mockery generate`. | |
| 20 | + | ||
| 21 | + | ## Anti-patterns | |
| 22 | + | ||
| 23 | + | ``` | |
| 24 | + | ❌ app doing business logic | |
| 25 | + | ❌ app calling adapters directly | |
| 26 | + | ❌ usecase importing adapters | |
| 27 | + | ❌ domain importing anything | |
| 28 | + | ``` | |
| 29 | + | ||
| 30 | + | ## Commands | |
| 31 | + | ||
| 32 | + | ||
| @@ -0,0 +1,32 @@ | |||||
| 1 | + | # Clean Architecture | |||
| 2 | + | ||||
| 3 | + | ## Layers | |||
| 4 | + | ||||
| 5 | + | | Layer | Contains | Depends On | | |||
| 6 | + | |-------|----------|------------| | |||
| 7 | + | | `app/` | Entry points, CLI/TUI, request handling | usecase | | |||
| 8 | + | | `usecase/` | Business logic, orchestration | domain, boundaries | | |||
| 9 | + | | `domain/` | Entities, value objects, utils | nothing | | |||
| 10 | + | | `boundaries/in` | Inbound interfaces (services) | domain | | |||
| 11 | + | | `boundaries/out` | Outbound interfaces (repos, clients) | domain | | |||
| 12 | + | | `adapters/` | Interface implementations | boundaries, domain | | |||
| 13 | + | ||||
| 14 | + | ## Rules | |||
| 15 | + | ||||
| 16 | + | - **app**: Parse input, call usecase, format output. No business logic. | |||
| 17 | + | - **usecase**: All business logic. Use boundaries for I/O. | |||
| 18 | + | - **domain**: Pure functions only. No I/O. | |||
| 19 | + | - **boundaries**: Interfaces only. Mock with `mockery generate`. | |||
| 20 | + | ||||
| 21 | + | ## Anti-patterns | |||
| 22 | + | ||||
| 23 | + | ``` | |||
| 24 | + | ❌ app doing business logic | |||
| 25 | + | ❌ app calling adapters directly | |||
| 26 | + | ❌ usecase importing adapters | |||
| 27 | + | ❌ domain importing anything | |||
| 28 | + | ``` | |||
| 29 | + | ||||
| 30 | + | ## Commands | |||
| 31 | + | ||||
| 32 | + | ||||