Shelley will execute scripts in a hooks directory at various points in the life cycle.
| Hook | When it runs |
|---|---|
system-prompt |
When a system prompt is built |
new-conversation |
When a conversation is created. |
chat-message |
On every message in the conversation. |
end-of-turn |
When the agent becomes idle. |
slash/<cmd> |
When a user message starts with /<cmd> and a matching executable exists |
status-bar |
Often; think of this like a $PS1 prompt. |
The best way to write these hooks is to ask Shelley to do so.