Hacker News new | ask | show | jobs
by brazukadev 62 days ago
> Do you understand the difference between deterministic and probabilistic behavior and why the difference matters a lot when doing technical tasks?

Do you understand that there is nothing deterministic in skills and hooks? it is the same text in -> text out.

2 comments

No, it's not just text in -> text out.

Skills can include scripts, tools, etc.

The entire point of hooks is deterministic responses to signals from the LLM. You run a function in response to some event and the function is given json data that conforms to a specific schema.

Hooks are meant to be 'deterministic' because they are only used for executing scripts on a specific step. So, for instance, you can execute your lint on PostEdit so every time it edits a file in your project, the harness runs your linter.

With that said, part of hooks is you can return a json object to the agent which gives it instructions such as stop, continue, etc but those to my understanding are all very explicit constants rather than loosey-goosey prompts you can pass it.

If this person looked into hooks more, they could write a script that would run their project's tests and then tell Claude to stop if tests end via a non-0 exit code.