Conformist Pattern
debt(d7/e7/b7/t5)
Closest to 'only careful code review or runtime testing' (d7). While deptrac is listed as a tool, it cannot automatically detect whether a Conformist relationship is appropriate vs when an ACL should be used — this requires architectural judgment through code review. The detection hint explicitly states automated=no. Recognizing 'complex ACL translating external model when the upstream model is actually good enough' requires human analysis of domain fit.
Closest to 'cross-cutting refactor across the codebase' (e7). The quick_fix describes a strategic choice, not a one-line fix. When Conformist is misapplied (e.g., with a poorly designed upstream), the upstream model permeates throughout the downstream context. Remediation requires introducing an ACL layer and refactoring all code that absorbed the upstream model — a cross-cutting change that touches many components.
Closest to 'strong gravitational pull' (b7). The Conformist pattern is a strategic design choice that applies across web/cli contexts. Once adopted, the upstream model's naming and structure shapes the entire downstream bounded context. As why_it_matters states: 'future changes to the upstream cascade through the entire downstream codebase.' Every future change must work within the constraints of the external model.
Closest to 'notable trap' (t5). The misconception field reveals a documented gotcha: developers often believe 'Conformist is always a bad choice' when it's actually pragmatic for well-designed upstream APIs. The reverse trap also exists — common_mistakes lists 'Conformist by accident' where developers don't realize they have a choice. These are learnable gotchas rather than catastrophic traps.
Also Known As
TL;DR
Explanation
In a Conformist relationship, the downstream bounded context simply uses the upstream model directly, without an Anti-Corruption Layer. This makes sense when: the upstream model is well-designed and fits the downstream needs, the translation overhead outweighs the benefit, or the downstream team lacks the leverage to negotiate a better interface. The risk: the downstream context becomes polluted with upstream concepts that don't fit naturally, and any upstream model change forces downstream changes.
Common Misconception
Why It Matters
Common Mistakes
- Conformist with a poorly designed upstream — importing a bad model makes both contexts worse.
- Conformist by accident — not realising you have a choice; always make the relationship explicit.
- Gradual ACL creep — starting conformist, then adding translation in random places without a clean layer.
- Not documenting the relationship — future developers don't know why the naming looks foreign.
Code Examples
// Conformist to a poorly named legacy API:
// Downstream adopts all upstream naming:
class ACCT_REC_PROC { // Legacy upstream name adopted
public string $CUST_NO; // Every developer must learn this vocabulary
public string $AMT_DUE; // No translation — tight coupling
public string $STAT_CD;
}
// Conformist to a well-designed upstream (appropriate):
// Stripe's API is well-designed — conformist is fine
use Stripe\PaymentIntent; // Adopt Stripe's model directly
class CheckoutService {
public function charge(Money $amount): PaymentIntent {
return PaymentIntent::create([
'amount' => $amount->cents(),
'currency' => $amount->currency(),
]);
}
// No translation needed — Stripe's model is clear
}