PluginsHooks
How to Choose
Use short decision rules to separate action, pipeline, guard, effect, resolve, and lifecycle runtime
How to Choose
This page answers one question only:
- where should this capability actually live
Start with the shortest version
If you want to:
- explicitly invoke a named capability, use an
action - progressively transform a value, use
pipeline - block before the flow continues, use
guard - keep the main value unchanged and record or sync something, use
effect - get one final authoritative answer, use
resolve - own long-lived state, workers, or connections, use plugin
lifecycle
Common questions
"I want to add default fields to the input"
Use pipeline.
"I want to stop the request immediately if permission is missing"
Use guard.
"I want to write one audit log every time this happens"
Use effect.
"I want to know the user's final role"
Use resolve.
"I want an external caller to trigger a named command"
Use an action.
"I want a long-lived cache, connection pool, or background worker"
Use plugin lifecycle.
Common bad splits
- using
resolvefor multi-plugin enrichment - using
effectas a hidden reliable job queue - using
guardwhile also rewriting values
One practical decomposition pattern
If one capability needs all of these:
- an explicit command entry
- runtime-chain extension
- long-lived state
then the clean split is often:
actionfor explicit invocationpipeline / guard / effect / resolvefor runtime-chain extensionlifecyclefor long-lived state