Converted rule
Source: legacy Claude rule architecture-boundaries.
Architecture Boundaries
Architecture boundary enforcement is a uniform gate across all tiers (T1–T4). Violations block PRs.
Enforcement Tools
- TypeScript:
dependency-cruiser. Configuration file pattern:.dependency-cruiser.cjs. - .NET (when the backend exists):
NetArchTest.Rules. Test project naming pattern:*.ArchitectureTests.
No-COM Architecture Rules (enforceable assertions)
Production code in this repository must satisfy each of the following assertions. Each assertion is enforced by dependency-cruiser (TypeScript) or NetArchTest.Rules (.NET) where applicable; legacy import utilities, when added, must satisfy the same assertions.
- New runtime code must not reference VSTO APIs (
Microsoft.Office.Tools.*). - New runtime code must not reference Outlook desktop automation APIs (
Microsoft.Office.Interop.Outlook). - New runtime code must not expose COM-visible interfaces (
[ComVisible(true)]attribute is banned in production code). - New runtime code must not use Ribbon extensibility callbacks tied to the desktop object model.
- New runtime code must not depend on local Outlook event streams.
- New runtime code must not depend on Outlook user-defined fields as the primary state store.
- Mailbox data must be accessed only through Office.js or Microsoft Graph.
- Business behavior must be implemented in the backend or in host-neutral domain or application modules.
- Client UI must be implemented as web UI.
- Legacy integration, when required, must be limited to offline data import from files or exported data.
Layer Boundary Assertions (TypeScript)
src/taskpane/andsrc/commands/must not import from backend internals.- Domain modules must not import from Office.js, Microsoft Graph SDK, or any infrastructure adapter.
- Adapters may import from domain; domain must not import from adapters.
Layer Boundary Assertions (.NET, applies once the backend exists)
TaskMaster.Domainmust have zero references to Outlook PIA, VSTO, or Office.js types.TaskMaster.Applicationmay depend onTaskMaster.Domainonly.- Adapter projects may depend on
TaskMaster.DomainandTaskMaster.Application; domain may not depend on adapters.
Enforcement Outcome
Violations of any rule above are PR-blocking findings. CI runs the architecture-boundary stage on every PR; a non-zero violation count fails the stage and prevents merge.