Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
id: rust-no-transport-in-domain
language: rust
severity: error
message: Domain modules must not reference transport types (axum, http) — response mapping belongs in inbound adapters.
note: |-
Hexagonal architecture (cloud-storage-hexagonal-architecture skill): the
domain layer must not know HTTP. Move IntoResponse impls and status-code
mapping into the crate's inbound module (see chat's
inbound/error_response.rs). Tests in domain test.rs files are exempt.
files:
- crates/**/src/domain/**
- services/**/src/domain/**
ignores:
- '**/test.rs'
- '**/tests.rs'
- '**/test/**'
- '**/tests/**'
# agent_egress is a credential-stamping HTTP proxy: its domain's subject
# matter IS the http request passing through, so `http` (the I/O-free
# vocabulary crate axum and reqwest both speak) is its domain language,
# not transport leakage. What this rule exists to catch — IntoResponse
# impls and status-code mapping — stays in that crate's inbound adapter.
- 'crates/agent_egress/src/domain/**'
# pipedream_mcp's Connect proxy port relays an HTTP request to a connected
# app and hands back its status and headers: that request is the port's
# subject matter, so `http` is its domain language here too.
- 'crates/pipedream_mcp/src/domain/**'
rule:
any:
- kind: scoped_identifier
regex: ^(axum|http)\b
not:
inside:
kind: scoped_identifier
- kind: scoped_type_identifier
regex: ^(axum|http)\b
- kind: use_declaration
regex: ^use (axum|http)\b