From 0faf27ed2e7b64aecf286d787ee7061e7f86aef9 Mon Sep 17 00:00:00 2001 From: Diego Colombo Date: Wed, 28 Jan 2026 16:47:35 +0000 Subject: [PATCH] docs: add encapsulation violation to module anti-patterns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add bullet to 'In Module Development' anti-patterns about bypassing public interfaces to access internal state. Motivated by microsoft/amplifier-app-cli#70. 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com> --- docs/DESIGN_PHILOSOPHY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/DESIGN_PHILOSOPHY.md b/docs/DESIGN_PHILOSOPHY.md index a1a696c..fec3b66 100644 --- a/docs/DESIGN_PHILOSOPHY.md +++ b/docs/DESIGN_PHILOSOPHY.md @@ -286,6 +286,7 @@ When faced with implementation decisions, ask: ### In Module Development ❌ Depending on kernel internals (use protocols only) +❌ Bypassing public interfaces to access internal state (extend the interface instead) ❌ Inventing ad-hoc event names (use canonical taxonomy) ❌ Private log files (write via `context.log` only) ❌ Failing to emit events for observable actions