Archive: SYSLUME's earlier technical-decision work. Current focus: AI agents for SME back-office work → Order Intake

Fictional worked example · synthetic code

A boundary violation you can reproduce.

Question: can Billing read Workflow storage directly while the agreed architecture requires public module interfaces?

The decision in one minute

Keep the modular monolith and repair the module boundary. In this synthetic example, a private import violates a declared rule. That finding alone does not justify a network service, a separate database or a rewrite.

EvidenceInterpretationLimit
Billing imports workflow.repository.load_orderARCH-001 is violated in the supplied sourceDoes not establish runtime impact
Corrected Billing imports workflow.api.order_totalThe selected import boundary check passesBehaviour equivalence needs separate tests
Independent deployment is not established by this exampleService extraction is not supported by this evidence aloneA verified isolation requirement could change the decision

1. Inspect the intentional violation

# demo/before/billing/invoice.py
from workflow.repository import load_order

ARCH-001 allows cross-module imports through api or contracts. Storage implementation belongs to its owning module.

2. Run the check

python scripts/check_architecture.py demo/before
# Expected: FAIL, ARCH-001, exit code 1

python scripts/check_architecture.py demo/after
# Expected: PASS, three files checked, exit code 0

python scripts/test_architecture_checks.py
# Negative and positive controls, including empty/invalid scope

Requires Python 3.10 or later. The checker uses the standard library and parses source; it does not execute the inspected application.

3. Inspect the correction

# demo/after/billing/invoice.py
from workflow.api import order_total

# demo/after/workflow/api.py
from workflow.repository import load_order

The storage import now stays inside Workflow. The supplied test suite also checks private import aliases, same-module imports, syntax failures, dynamic import mechanisms and empty scope.

4. Challenge the recommendation

If Billing needs verified independent release ownership or regulatory isolation, revisit the ADR and public contract. A local import rule cannot settle that broader decision. Do not disable a failing gate to avoid discussing the changed requirement.

What this does not prove

This Python-layout-specific static check does not validate SQL writes, re-export safety, runtime dependencies, API compatibility, deployment topology or security. The CI workflow is provided for reuse; the current evidence is a local run, not a hosted CI certification.

From an example to your decision

A scoped review starts with your constraints and evidence. The check shown here is a demonstration; applying equivalent controls to another repository or language needs an agreed adapter and acceptance criteria.