ASPAI Starter Package
Automation Hooks

13 Hooks for Automated Safety & Quality

Automation hooks that run before, during, and after every AI agent task. They enforce code quality, protect your codebase, sync memory, and prevent mistakes — without you lifting a finger.

3
Pre-Task
3 hooks
3
Post-Edit
3 hooks
3
Post-Task
3 hooks
4
Safety
4 hooks
Pre-Task Hooks
01

Skill Auto-Injection

Pre-TaskAuto

Automatically searches and loads relevant SKILL.md files before any task starts. 61 domain mappings ensure the right skills are loaded for every task type.

02

Context Loader

Pre-TaskAuto

Reads memory.md and knowledge-base.md before task execution. Ensures the agent starts every task with full project context and learned patterns.

03

Agent Router

Pre-TaskAuto

Routes tasks to the correct specialist agent based on task type. Coder, reviewer, tester, researcher — the right agent handles each job.

Post-Edit Hooks
04

Format Enforcer

Post-EditAuto

Auto-formats code after every edit using Prettier and ESLint. Consistent style across your entire codebase without manual intervention.

05

Type Checker

Post-EditAuto

Runs TypeScript type checking after file changes. Catches type errors immediately — before they compound into larger issues.

06

Test Runner

Post-EditAuto

Runs affected tests after code modifications. Validates that changes work and existing functionality remains intact.

Post-Task Hooks
07

Memory Writer

Post-TaskAuto

Updates memory.md with task results and learnings after every completed task. Persistent context that carries across sessions.

08

Knowledge Promoter

Post-TaskAuto

Extracts reusable patterns from completed work and promotes them to knowledge-base.md. The brain gets smarter with every task.

09

Quality Logger

Post-TaskAuto

Logs quality scores and metrics per task — correctness, completeness, efficiency, security. Tracks performance over time.

Safety Hooks
10

Context Health Monitor

SafetyAuto

Saves state before auto-compaction triggers. Prevents context loss during long sessions by checkpointing memory automatically.

11

Branch Protector

SafetyAuto

Prevents accidental commits to the main branch. Forces feature branch workflow to keep production deployments safe.

12

Secret Scanner

SafetyAuto

Blocks commits containing API keys, tokens, or credentials. Scans staged files before every commit to prevent secret leaks.

13

Doom Loop Detector

SafetyManual

Detects retry loops and escalates after 3 consecutive failures. Stops the agent from wasting tokens on the same error.

All 13 hooks. Pre-configured. Ready to run.

Every hook comes pre-installed in the AI Brain Pro package. No setup, no configuration — they activate automatically and protect your workflow from day one.

Part of the AI Starter Package ecosystem

View Full Ecosystem Map