Development & CLI
Fast Preflight Checks (aegil check)
This guide shows how to run instant, in-memory preflight validation on your Aegil project using aegil check.
Use preflight checks to validate configuration files, TypeSpec syntax, and build freshness without writing files to disk or requiring a running Docker daemon.
When to use preflight checks
Section titled “When to use preflight checks”Run aegil check:
- In Git pre-commit hooks to block invalid specs before committing.
- Inside IDE file watchers or editor diagnostics.
- As the fast-failing initial stage in CI/CD pipelines before heavy test matrices.
- To confirm your workspace is fresh before running
aegil verify.
What aegil check validates
Section titled “What aegil check validates”When you run:
aegil checkAegil performs the following checks purely in memory:
-
Project Configuration (
aegil.yaml):- Validates project name, reverse-DNS ID, and namespace.
- Verifies pinned toolchain versions (Dart SDK, Flutter SDK, Serverpod).
-
TypeSpec AST & Semantic Analysis:
- Parses all files under
specs/**/*.tsp. - Confirms the feature folder boundary rule: domain specs must reside in
specs/<feature>/*.tsp(flagsERR_SPEC_MISPLACED). - Validates model entities, primary keys (
@pk), relation targets, and foreign keys. - Enforces CEL policy syntax and ensures
@publicis not applied to protected entities. - Validates finite state machine transitions and initial states.
- Parses all files under
-
Ownership Plan & Freshness:
- Computes what
aegil buildwould generate and compares it against current.aegil/output. - Detects if specifications or hooks have changed since the last build (
ERR_STALE_BUILD).
- Computes what
Machine-Readable Agent Output
Section titled “Machine-Readable Agent Output”In --agent or --json mode:
aegil check --agentOutput on success:
{ "status": "VALID", "project": "notes", "features": ["notes"], "models": ["Note"], "operations": ["listNotes", "addNote"]}Output on syntax or configuration failure:
{ "status": "ERROR", "code": "ERR_SPEC_MISPLACED", "message": "Domain spec 'specs/notes.tsp' must be inside a feature folder: specs/notes/notes.tsp", "file": "specs/notes.tsp"}Next steps
Section titled “Next steps”- Launch your full-stack environment with Running Locally (aegil run).
- Run the full verification suite with The 5-Stage Verification Pipeline.