Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion plugins/aidd-context/hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)).

Expand All @@ -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`.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Original file line number Diff line number Diff line change
Expand Up @@ -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": { "<Event>": [ ... ] } }`. 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.
Expand Down
3 changes: 3 additions & 0 deletions plugins/aidd-telemetry/hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/session-start.cjs",
"statusMessage": "AIDD Telemetry: carry Claude session task",
"timeout": 10
}
]
Expand All @@ -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
}
Expand All @@ -27,6 +29,7 @@
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/hooks/prompt-gate.cjs",
"statusMessage": "AIDD Telemetry: check task declaration",
"timeout": 30
}
]
Expand Down
Loading