Concepts/Definition

ADPS Agent Systems · Engineering Concept

Hook Composition

Compose orchestration, governance, observation, and recovery at lifecycle events.

Application context: one hook label can hide four responsibilities

A team starts a coding agent after requirements close, pauses before a dangerous tool call, records a trace after execution, and saves a checkpoint on failure. All four can be implemented as hooks, yet they belong to orchestration, governance, observation, and recovery. When callbacks are scattered across configuration and plugins, the real control flow disappears from the main design.

Definition

Hook Composition treats deterministic trigger points as an ordered, stateful control chain. Each hook declares its event, condition, read and write set, priority, idempotency key, failure semantics, and emitted event. The composition layer resolves order and conflicts.

Engineering mechanism

DutyExampleFailure semantics
OrchestrationStart coding after specification acceptanceDo not create the same job twice
GovernanceWait for approval before production writeBlock and preserve a resume point
ObservationRecord request, verdict, and receiptBlock or degrade according to risk
RecoveryCheckpoint and release leasesRetry idempotently

The composition manifest should produce a readable control graph and enter version control and regression testing.

Boundary

A hook is a mechanism, not automatically a collaboration topology. If one hook manager invokes participants under a complete plan, the design remains orchestration. Choreography requires control to reside in the local rules of event participants.

Proposal and provenance

Initial source within ADPS
Initial problem and practice: Wei Wang; classification formalized by ADPS
ADPS editorial work
ADPS separated orchestration, governance, observation, and recovery duties and added ordering, idempotency, and failure semantics.
Current standing
Cross-module concept

Definition source: ADPS White Paper workshops and pattern development.

Concept index · Workshops · CC BY 4.0

Chronicle

Recorded source
ADPS White Paper workshops and pattern development.
First published on ADPS

View in the ADPS Chronicle