Lifecycle Hooks

Lifecycle hooks are supporting AI steps that run around normal task execution. They let OpenVibely prepare context, recall memory, select skills, and learn from completed work without turning every task into a manual setup process.

The important rule: hooks support the task. They do not replace the user's prompt, selected model, assigned agent, review workflow, or worktree boundary.

The Hook Path

route_task
-> before_run
-> normal task execution
-> after_complete
HookWhen It RunsUser Impact
route_taskBefore the main task startsSelects relevant standalone or agent-owned skills for the run.
before_runImmediately before executionAdds hook-provided context such as recalled project memory.
Normal executionThe primary task runRuns the user's prompt with the selected model and, when chosen, the assigned agent.
after_completeAfter a terminal resultLets Memory Curator update durable project memory and Skill Curator improve relevant skills.
scheduledOn a scheduleRuns visible system maintenance such as memory consolidation or skill library upkeep.

What Users See

UI AreaWhat It Shows
Task lifecycle activitySupporting steps that ran before or after the task.
Selected skillsWhich reusable skills were prepared for the run.
Memory behaviorRelevant project memory may appear as background context for future tasks.
Scheduled system tasksMaintenance work is visible instead of hidden.
Task resultThe primary output remains the normal task execution result.

Memory Hook Behavior

Memory Curator owns memory recall, update, and consolidation. Before a task, it can recall a compact set of relevant project facts. After completed work, it can create or update durable memory when there is something worth keeping. On schedule, it can consolidate the memory library so it stays useful.

Memory is for durable project knowledge, not raw transcripts, secrets, or one-off temporary context.

Skill Hook Behavior

Skill Curator owns skill routing and learning. Before a task, it can select reusable skills that fit the prompt and execution scope. After a task, it can decide whether completed work taught OpenVibely a repeatable procedure worth saving.

Skill scope matters. No-agent tasks route standalone skills. Assigned-agent tasks route only that agent's skills. Project skills can override global skills with the same key.

Boundaries

Examples

ScenarioHook Value
A project has a repeated testing conventionSkill routing can prepare the relevant testing skill before execution.
A user previously explained a repo-specific deployment ruleMemory recall can provide that rule as background context.
A completed task uncovered a durable architecture decisionMemory update can preserve it for later tasks.
Several completed tasks reveal a reusable review checklistSkill learning can improve a scoped skill.
Memory files become duplicated or staleScheduled consolidation can clean them up.
PageWhy It Matters
Task LifecycleShows where hooks fit in the larger status flow.
MemoryExplains recall, update, and consolidation.
Skill CurationExplains routing, learning, and scoped skill updates.
Scheduled Task RunsScheduled hooks run as visible maintenance work.
Agents OverviewAgents can define reusable behavior and lifecycle participation.