The Machine Action Manifest
The Action Manifest (.aegil/manifest.json) is the machine-readable contract emitted by aegil build --agent. It specifies exact target files, class names, interface types, and cryptographic file checksums for autonomous AI agents and verification harnesses.
Why AI agents need structured manifests
Section titled “Why AI agents need structured manifests”When AI coding assistants (Claude Code, Cursor, Windsurf, Antigravity) are instructed with vague prompts, they often guess file paths, write broken import paths, or duplicate authentication and transaction logic.
Aegil eliminates guessing by compiling a deterministic JSON Action Manifest whenever aegil build --agent is executed.
Manifest structure (.aegil/manifest.json)
Section titled “Manifest structure (.aegil/manifest.json)”{ "status": "PENDING_IMPLEMENTATION", "project": "helpdesk", "agentTasks": [ { "taskId": "escalateTicket", "targetFile": "hooks/escalate_ticket_hook.dart", "expectedClassName": "EscalateTicketHook", "implementsInterface": "EscalateTicketHandler", "contract": { "preconditionsGuaranteedByCompiler": [ "Caller identity and role verified from cryptographic session", "Database transaction active and managed", "Ticket entity pre-fetched and validated", "CEL row-level security policy checked", "Allowed state machine transition to 'Escalated' verified" ], "postconditionsRequiredFromAgent": [ "Assign assignedAgentId from input", "Transition ticket status to Escalated", "Persist updated entity using transaction", "Return updated Ticket model" ] } } ], "writableZones": [ "specs/**", "hooks/**", "client/lib/**", "migrations/**" ], "generatedFileChecksums": { ".aegil/server/lib/src/generated/ticket.dart": "sha256-hash-checksum-locked" }}Understanding the Contract
Section titled “Understanding the Contract”Each task in agentTasks contains an explicit mathematical contract:
1. preconditionsGuaranteedByCompiler
Section titled “1. preconditionsGuaranteedByCompiler”These are checks already enforced before the hook is executed:
- Authentication: The caller is proven to be signed in.
- Transaction: A database transaction is open and managed.
- Prefetching: Target entities are loaded into memory.
- Access Control: CEL
@policyrules are confirmed. - State Transition: The state transition is confirmed valid.
[!IMPORTANT] The agent must not re-check these preconditions. Doing so adds redundant database queries and bloats the code.
2. postconditionsRequiredFromAgent
Section titled “2. postconditionsRequiredFromAgent”These are the strict requirements the agent must fulfill in the hook’s handle() method. If the agent fails to perform a required state transition or save changes, aegil verify will fail during the integration test suite.
Listing tasks with aegil tasks
Section titled “Listing tasks with aegil tasks”Developers and agents can inspect pending hook implementations at any time using aegil tasks:
aegil tasksOutput:
Pending Hook Tasks (1):- escalateTicket -> hooks/escalate_ticket_hook.dart (Implements EscalateTicketHandler)In agent mode:
aegil tasks --agentReturns structured JSON that agents can parse directly to plan their implementation steps.
Next steps
Section titled “Next steps”- Learn the complete 3-step loop in The 3-Step Agent Protocol.
- Explore compact context extraction in Agent Context & Tooling.
- Review Verification & Invariant Testing.