Hook registry (parameterized, data-only)
Implement the curated hook registry so models can attach behavior as
pure data: (:keyword args...). Generalizes the current
*validation-map* (keyword → function only).
Entry shape: name + parameter schema + factory. Factory closes over parameters and returns a contract-conforming closure.
Two contracts, one registry concept:
- Validation:
(lambda (type-key field-key value user) -> nil | error-string) - Lifecycle:
(lambda (type-key data user &key roles) -> effect)(e.g.:post-create,:pre-delete,:createoverrides)
Surface forms at every hook site (same as README):
(:keyword args...)— registry entry (AI / no-code / hosted)(:shell "script" args...)— compiler-generated adapter(lambda ...)— raw Lisp (expert / self-host only)
MVP first slice: validation path (compile-validations accepts
parameterized forms). Seed entries needed soon: :max-length,
:in-range (ratings 1–5), and keep existing keyword entries
(:required, :email, …) as zero-arg registry entries.
Do not name this "validation registry" or "function registry" — lifecycle hooks use the same mechanism. Name: hook registry.
- Slot
- 17800
- Status
- 60 Done
- Tags
- backend, compiler
- Contributors
- Donnie