diff --git a/plugins/aidd-context/hooks/hooks.json b/plugins/aidd-context/hooks/hooks.json index 76b2fb90b..bf03b4c98 100644 --- a/plugins/aidd-context/hooks/hooks.json +++ b/plugins/aidd-context/hooks/hooks.json @@ -5,7 +5,8 @@ "hooks": [ { "type": "command", - "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/update_memory.js" + "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/update_memory.js", + "statusMessage": "AIDD Context: sync project memory" } ] } diff --git a/plugins/aidd-context/skills/08-hook-generate/actions/02-write-hook.md b/plugins/aidd-context/skills/08-hook-generate/actions/02-write-hook.md index fbddc89c1..f506b6f48 100644 --- a/plugins/aidd-context/skills/08-hook-generate/actions/02-write-hook.md +++ b/plugins/aidd-context/skills/08-hook-generate/actions/02-write-hook.md @@ -15,6 +15,7 @@ The updated target file per tool, any script written, and the list of paths touc 1. **Script.** If the action needs a backing script ([hook-authoring.md](../references/hook-authoring.md)): copy [hook-script-template.sh](../assets/hook-script-template.sh), fill the logic, place it in the scope's script directory ([tool-paths.md](../references/tool-paths.md)), and make it executable. One script can back every tool. 2. **Entry.** Per confirmed tool, fill [hook-template.json](../assets/hook-template.json) from [tool-paths.md](../references/tool-paths.md), using that tool's shape and stripping the scaffold. - Point the handler at the script by absolute path or an approved `${VAR}`. + - For each Claude Code or Codex handler, add a concise, nonempty `statusMessage` describing its action. Codex also uses it to identify the hook during review. Do not add this field to other tool formats without confirmed support. 3. **Merge.** For each tool, read the target file and append the entry to the moment's list under the right key for the scope ([tool-paths.md](../references/tool-paths.md)). Preserve every sibling, never overwrite. 4. **Validate.** Run the merge check and write-target validation ([tool-paths.md](../references/tool-paths.md)). @@ -23,3 +24,4 @@ The updated target file per tool, any script written, and the list of paths touc - Each target file is valid after the merge. - The new entry is present in each, and every prior sibling survives. - A script-backed handler's script exists at its path and is executable. +- Each new Claude Code or Codex handler has a nonempty, action-specific `statusMessage`. diff --git a/plugins/aidd-context/skills/08-hook-generate/actions/03-validate.md b/plugins/aidd-context/skills/08-hook-generate/actions/03-validate.md index ac660ec00..156371eb6 100644 --- a/plugins/aidd-context/skills/08-hook-generate/actions/03-validate.md +++ b/plugins/aidd-context/skills/08-hook-generate/actions/03-validate.md @@ -16,8 +16,10 @@ A short pass or fail line per tool, plus the script. 2. **Moment.** Confirm the event name is the right one for that tool's moment, and the matcher is well-formed ([tool-paths.md](../references/tool-paths.md)). 3. **Blocking.** If the hook blocks, confirm the moment can block on that tool ([tool-paths.md](../references/tool-paths.md)). 4. **Script.** For a script-backed handler, confirm the script exists, is executable, and reads stdin and signals per the contract. +5. **Name.** Confirm each new Claude Code or Codex handler has a nonempty `statusMessage` describing its action. ## Test - Each target file parses with the entry under the correct key. - Each event name matches the tool's moment, and any blocking hook sits on a moment that can block. +- Each new Claude Code or Codex handler has a nonempty, action-specific `statusMessage`. diff --git a/plugins/aidd-context/skills/08-hook-generate/references/tool-paths.md b/plugins/aidd-context/skills/08-hook-generate/references/tool-paths.md index 9de4db3db..f74d8f8d6 100644 --- a/plugins/aidd-context/skills/08-hook-generate/references/tool-paths.md +++ b/plugins/aidd-context/skills/08-hook-generate/references/tool-paths.md @@ -44,6 +44,8 @@ Each tool exposes more moments than these. For the full list, read the tool's do A Claude `settings.json` and a plugin or standalone `hooks/hooks.json` both wrap the event map under a top-level `hooks` key, so the file is `{ "hooks": { "": [ ... ] } }`. A Codex `config.toml` uses a `[hooks]` table instead. +Set `statusMessage` on each Claude Code or Codex handler. It describes the action while the hook runs, and Codex uses it as the review-list title. Use a concise, specific message. This field is not documented for Cursor or Copilot hooks; omit it from their own formats unless confirmed. Sources: [Claude Code hooks](https://code.claude.com/docs/en/hooks), [Codex hooks](https://learn.chatgpt.com/docs/hooks), [Cursor hooks](https://cursor.com/docs/hooks), [Copilot hooks](https://docs.github.com/en/copilot/reference/hooks-reference). + ## Scopes per tool Ask the user which scope, then write the matching file. A `-` means the tool has no such scope. diff --git a/plugins/aidd-telemetry/hooks/hooks.json b/plugins/aidd-telemetry/hooks/hooks.json index c2554092e..2e1e9144e 100644 --- a/plugins/aidd-telemetry/hooks/hooks.json +++ b/plugins/aidd-telemetry/hooks/hooks.json @@ -6,6 +6,7 @@ { "type": "command", "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/session-start.cjs", + "statusMessage": "AIDD Telemetry: carry Claude session task", "timeout": 10 } ] @@ -15,6 +16,7 @@ { "type": "command", "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/catch-up.cjs", + "statusMessage": "AIDD Telemetry: update measurement ledger", "async": true, "timeout": 120 } @@ -27,6 +29,7 @@ { "type": "command", "command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/prompt-gate.cjs", + "statusMessage": "AIDD Telemetry: check task declaration", "timeout": 30 } ]