Menu

1 / 2

Stop Writing Architecture Rules in Confluence

DEV Community·Lars Moelleken·6 months ago
#o4sJXDz9
#php#architecture#llm#code#rule
Reading 0:00
15s threshold

Implementation of the idea of the blog post:

https://github.com/voku/itp-context/

Use PHP attributes when the rule belongs to the code

Every serious codebase has rules.

Not formatting rules. Those are easy. Let PHP-CS-Fixer, PHP_CodeSniffer, Rector, PHPStan, and your IDE handle the boring whitespace police work.

I mean the rules that decide whether the system survives:

external APIs must stay behind adapters

domain code must not know HTTP clients

persistence must go through repositories

legacy compatibility must stay isolated

security validation must happen before data crosses a boundary

These rules exist in every real project.

The problem is where they live.

Usually, they live in someone’s head, an old ticket, a forgotten ADR, or a Confluence page that looks official and is already wrong.

That is documentation theater.

Everyone pretends the architecture is documented.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.