mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-07-29 09:26:00 +00:00
Hexagonal inner ring for the feedback bounded context: frozen aggregate with construct-time invariants (rating, reason-tag slugs), technology- neutral ports (typing.Protocol), and the application service with explicit user_id. Guarded by an AST purity test that keeps domain/ free of infrastructure imports.
10 lines
467 B
Python
10 lines
467 B
Python
"""Hexagonal inner ring: domain models, ports, and application services.
|
|
|
|
Every package under this namespace is one bounded context laid out as
|
|
`{model,ports,service}.py`. Code here has zero infrastructure
|
|
dependencies -- no sqlalchemy/fastapi/pydantic, no `app.*`, and no
|
|
harness infrastructure modules (enforced in CI by
|
|
`tests/test_harness_domain_purity.py`). Adapters implementing the ports
|
|
live in `app/infra/`; wiring happens only in `app/gateway/deps.py`.
|
|
"""
|