Effective Aegil: Design Principles
Effective Aegil establishes a set of foundational design principles and architectural idioms—analogous to Effective Dart—that guide developers and AI coding agents toward building reliable, zero-drift, full-stack applications.
The Three Core Pillars
Section titled “The Three Core Pillars”1. Specification is Truth (Zone 1)
Section titled “1. Specification is Truth (Zone 1)”In Aegil, database schemas, API routes, data validation, row-level security, and state machines are never split across multiple config files or handwritten boilerplate. They are declared once in TypeSpec (specs/<feature>/*.tsp).
- If a model needs a new field, add it to the spec.
- If a permission changes, update the spec.
- If an endpoint requires an allowed state transition, specify it on the state machine.
2. Zero-Trust Identity by Construction
Section titled “2. Zero-Trust Identity by Construction”Security bugs almost always occur when developers trust client-provided user IDs or roles. In Effective Aegil:
- Endpoints never accept caller ID or role arguments. Identity is extracted strictly from the authenticated cryptographic server session.
- Row-level authorization is declarative. Common Expression Language (CEL) policies enforce access control in SQL queries, not in fallible imperative application code.
3. Mathematical Verification over Manual Testing
Section titled “3. Mathematical Verification over Manual Testing”You never wonder if a schema migration broke client code, or if an endpoint is missing a security check. aegil verify runs automated hash locking, static analysis, dynamic boundary testing, and real PostgreSQL integration tests before any code reaches production.
The Effective Aegil Guides
Section titled “The Effective Aegil Guides”- Do’s and Don’ts: The essential rules of engagement for developers and AI agents across specs, server hooks, Flutter client, and security.
- Schema Evolution & Migrations: Best practices for evolving your database models safely without downtime or data loss.
- The 3-Step Agent Protocol: Directing autonomous AI coding assistants using compiler Action Manifests.