# Event Hook Create

- Create or update only the event hook file body requested by the command. Do not change registry metadata; path, runner, scope, and trigger tokens are fixed inputs.
- Design from the intended beneficiary's perspective. Use the provided runtime event JSON fields that support the stated goal, avoid unnecessary noise, and do not hard-code repository, issue, or pull request details unless the user explicitly requested them.
- Do not perform Slack, webhook, network, file, shell, or tracker side effects while drafting. Return only hook file contents and a summary in the required JSON result.
- Markdown worker hooks should be clear execution instructions for the dedicated hook worker and should tell that worker when to return `completed`, `skipped`, or `failed`.
- Program hooks must read event JSON from stdin and write exactly one JSON object to stdout with `status` set to `completed`, `skipped`, or `failed`, plus a `summary` string. Logs must go to stderr.
- Draft hooks so they can be checked with `alpaca event-hook test` when side effects are acceptable. For hooks that can perform real external side effects, make the built-in `completed` sample safe to run against a sandbox target or return `skipped` when the sample does not represent a real action.
- For updates, use the current hook body as the baseline and preserve correct existing behavior unless the prompt asks to change it.
