Why
Today's hook surface is narrow: tilth/hooks/ has pre_tool and post_edit, wired through a hand-rolled tools/__init__.py:dispatch(). The contract is "success silent, failures verbose — to the agent" (see docs/deep-dives/).
This issue is the research artifact for whether the hook surface should grow into a more general lifecycle system — no code changes proposed here.
The motivation is two upcoming workstreams:
- v1 worker–evaluator dialogue (
proposals/v1-worker-evaluator-dialogue.md) introduces several natural new lifecycle points:
pre_submit_case — schema-validate the worker's structured case
pre_evaluator — assemble the ledger excerpt, gate on validator pass
post_evaluator — append the verdict to the per-task ledger, emit evaluator_verdict event
pre_halt — check halt eligibility (≥3 similar rejections, or work_arounds claims a seed contradiction)
- v2 richer mechanical checks — Tilth's analog of OpenAI's custom lints inject remediation into agent context. That pattern is exactly "policy at well-defined event points" — which is what a lifecycle is for.
The question to answer
Does the v1+v2 set of new seams cluster into a general lifecycle system worth formalizing (event names, registry, ordering, error propagation), or is each one-off enough that ad-hoc wiring in dispatch()-style helpers stays simpler?
Premature lifecycle is its own complexity sink. The defensible answer is probably "not v1 — formalize alongside v2 custom lints, once we've actually shipped the seams and can see whether they cluster."
Scope of this issue
- Survey the v1 + v2 new event points.
- Sketch what a general lifecycle would look like (event taxonomy, registry, contract).
- Decide whether to formalize now, alongside v2, or never.
What this is not
- Not an implementation issue. No
tilth/hooks/ changes proposed here.
- Not a competing design to the v1 dialogue. The v1 sketch ships on the existing narrow hook surface.
Related
Why
Today's hook surface is narrow:
tilth/hooks/haspre_toolandpost_edit, wired through a hand-rolledtools/__init__.py:dispatch(). The contract is "success silent, failures verbose — to the agent" (seedocs/deep-dives/).This issue is the research artifact for whether the hook surface should grow into a more general lifecycle system — no code changes proposed here.
The motivation is two upcoming workstreams:
proposals/v1-worker-evaluator-dialogue.md) introduces several natural new lifecycle points:pre_submit_case— schema-validate the worker's structured casepre_evaluator— assemble the ledger excerpt, gate on validator passpost_evaluator— append the verdict to the per-task ledger, emitevaluator_verdicteventpre_halt— check halt eligibility (≥3 similar rejections, orwork_aroundsclaims a seed contradiction)The question to answer
Does the v1+v2 set of new seams cluster into a general lifecycle system worth formalizing (event names, registry, ordering, error propagation), or is each one-off enough that ad-hoc wiring in
dispatch()-style helpers stays simpler?Premature lifecycle is its own complexity sink. The defensible answer is probably "not v1 — formalize alongside v2 custom lints, once we've actually shipped the seams and can see whether they cluster."
Scope of this issue
What this is not
tilth/hooks/changes proposed here.Related
proposals/v1-worker-evaluator-dialogue.md— the dialogue proposal that exposed the questiondocs/deep-dives/— current hook contract