
guarding-architecture
A change crosses module boundaries, adds a dependency direction between modules
by riekeltFree
Description
guarding-architecture is an agent skill from the riekelt/principal-engineer collection, listed on skills.sh. It is used when a change crosses module boundaries, adds a dependency direction between modules, touches a critical path or conflicts with a stated principle. The skill's premise is that structural invariants are load-bearing contracts, and violating one produces a class of bugs rather than a single defect. An invariant that matters gets a name, a written rationale and a mechanical guard, and an invariant without a guard is only a wish. Invariants are numbered and citable, each with a technology-neutral statement, a rationale told as a concrete failure narrative from an incident, and its implications. The stable principles are kept apart from the volatile realization, which names owners, guards and reference designs and changes with the code. Every enforceable invariant gets an architecture test that fails the build, covering dependency directions, package boundaries, layering rules and forbidden imports. A design that violates a named invariant is redesigned rather than justified, and a genuine exception must be proposed as an amendment that names the invariant and the boundary of the bend. Specs must show, per invariant, how a design upholds it. Unexplained guard exclusions count as violations hidden from the build. The listing shows the skill as free, and its audits all show Pass results.…
Highlights
- Numbered, citable architecture invariants
- Architecture tests that fail the build
- Violations mean redesign, not exceptions
- Specs show conformance per invariant
Ratings & Reviews
No ratings yet
Be the first to rate guarding-architecture.
People also visit

clean-architecture
Structure software around the Dependency Rule: source code dependencies point

principle-boundary-discipline
Apply when wiring validation, error handling, or framework adapters

human-architect-mindset
Systematic architectural thinking for irreplaceable human capabilities
guarding-architecture FAQ
What does the guarding-architecture skill do?
It helps an AI agent keep module boundaries and structural invariants intact when a change touches them.
How do I install it?
Run: npx skills add https://github.com/riekelt/principal-engineer --skill guarding-architecture
What is an invariant here?
A named, citable structural rule with a statement, a rationale from an incident and its implications.
How are invariants enforced?
With architecture tests that fail the build, or with a named review check where the build cannot enforce them.
What happens when a design breaks an invariant?
The skill says to redesign it. Exceptions must be proposed as amendments.
What do the security audits say?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best guarding-architecture alternatives?
Popular alternatives to guarding-architecture include clean-architecture, principle-boundary-discipline and gateguard. See all guarding-architecture alternatives










