Skip to content

docs(hook): improve JSON context section - #1360

Merged
max-sixty merged 4 commits into
mainfrom
json
Mar 10, 2026
Merged

max-sixty merged 4 commits into
mainfrom
json

Conversation

@max-sixty

@max-sixty max-sixty commented Mar 8, 2026 •

Copy link
Copy Markdown
Owner

The JSON context section had two issues:

  • It described hook_type and hook_name as extras "plus" the template variables, but they're regular template variables already in the table. Fixed to say "all template variables".
  • It showed a floating Python script without the toml hook definition that calls it. Added the toml entry so the reader sees how JSON stdin gets wired up.

Also trimmed the example (removed bridge text and filename comment) to keep it concise.

This was written by Claude Code on behalf of @max-sixty

The JSON context section showed a floating Python script without showing
the wt.toml hook definition that calls it. Now shows both the toml entry
and the script it invokes, so the reader sees the full picture.

Co-Authored-By: Claude <[email protected]>
# Conflicts:
#	docs/content/hook.md
#	skills/worktrunk/reference/hook.md
#	src/cli/mod.rs
# Conflicts:
#	docs/content/hook.md
#	skills/worktrunk/reference/hook.md
#	src/cli/mod.rs
hook_type and hook_name are regular template variables, not extras —
the old wording "plus hook_type and hook_name" was inaccurate.

Co-Authored-By: Claude <[email protected]>
@max-sixty max-sixty changed the title docs(hook): show how JSON context connects to hook definitions docs(hook): improve JSON context section Mar 10, 2026
@max-sixty
max-sixty merged commit 1389a0b into main Mar 10, 2026
23 checks passed
@max-sixty
max-sixty deleted the json branch March 10, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants