The `gt hook` command was failing to persist hooks for beads from different
prefixes (e.g., hooking an hq-* bead from a rig worker). The issue was that
`runHook` used `b.Update()` which always writes to the local beads database,
regardless of the bead's prefix.
Changes:
- Use `beads.ResolveHookDir()` to determine the correct database directory
for the bead being hooked, based on its prefix
- Execute `bd update` with the correct working directory for cross-prefix routing
- Call `updateAgentHookBead()` to set the agent's hook_bead slot, enabling
`gt hook status` to find cross-prefix hooked beads
- Add integration test for cross-prefix hooking scenarios
This matches the pattern already used by `gt sling` for cross-prefix dispatch.
Fixes: gt-rphsv
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>