.glyph/hooks/. They are similar in spirit to Git hooks, but they receive Glyph-specific context such as work context, destination realm, and publication mode.
Events
Prototype 0 recognizes publish-oriented hook events:| Event | When to use it |
|---|---|
pre-publish | Validate a work context before publication. |
post-publish | Run local follow-up automation after publication. |
List Hooks
Run A Hook
| Flag | Meaning |
|---|---|
--work | Work context name passed to the hook. |
--to | Destination realm. Defaults to public. |
--mode | Publication mode. Defaults to squash. |
installed: false. If an installed hook exits non-zero, publication-oriented commands should treat that as a failed check.
Suggested Hook Uses
- Run tests before publishing.
- Enforce formatting.
- Check generated docs.
- Prevent accidental publication of private paths.
- Record audit events for local agent runs.