Defined in hooks/hooks.json
{
"Stop": [
{
"hooks": [
{
"type": "prompt",
"prompt": "## GHE: Transcribe Response (If Issue Is Active)\n\n**FIRST**: Check if transcription is active:\n\n```bash\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/auto-transcribe.sh get-issue\n```\n\n**IF NO ISSUE SET**: Skip transcription. End your response normally.\n\n**IF AN ISSUE IS SET**: Before this response ends, you MUST:\n\n1. **Summarize your response** (key points, decisions, code changes)\n2. **Determine agent identity** based on work done:\n - Code/implementation -> Hephaestus\n - Testing/debugging -> Artemis \n - Review/evaluation -> Hera\n - Planning/coordination -> Athena\n - General -> Athena\n\n3. **Post to GitHub**:\n\n```bash\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/auto-transcribe.sh assistant \"<RESPONSE_SUMMARY>\" \"<AGENT_NAME>\"\n```\n\n### Response Summary Format\n\nInclude:\n- What was discussed/decided\n- What actions were taken\n- What code was written/modified\n- What issues were identified\n- Next steps (if any)\n\n### Agent Selection Guide\n\n| Work Type | Agent |\n|-----------|-------|\n| Writing code, implementing features | Hephaestus |\n| Running tests, fixing bugs | Artemis |\n| Reviewing, evaluating, feedback | Hera |\n| Planning, coordinating, explaining | Athena |\n| Routing messages, communication | Hermes |\n| Moderation, policy | Ares |"
}
]
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "prompt",
"prompt": "If this bash command will make significant changes (git commit, file creation, deployment), note it for the session transcript (if transcription is active)."
}
],
"matcher": "Bash"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/auto-transcribe.sh check",
"timeout": 10
},
{
"type": "command",
"command": "bash -c 'ISSUE=$(cat /tmp/ghe_current_issue.txt 2>/dev/null || echo \"\"); if [[ -n \"$ISSUE\" ]]; then bash ${CLAUDE_PLUGIN_ROOT}/scripts/recall-elements.sh --issue \"$ISSUE\" --recover 2>/dev/null || echo \"Element recall not available\"; fi'",
"timeout": 30
},
{
"type": "prompt",
"prompt": "## GHE Auto-Transcribe System Loaded\n\n**STATUS**: Auto-transcription is available but **NOT ACTIVE YET**.\n\n### How It Works\n\n1. **NO transcription happens** until you explicitly choose an issue to work on\n2. Once an issue is chosen, ALL conversation exchanges are posted to that GitHub issue\n3. Every comment includes element classification badges\n\n### Element-Based Memory Recall\n\nIf you need to recall specific information from a tracked issue, use:\n\n```bash\n# Recall CODE/IMPLEMENTATIONS\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/recall-elements.sh --issue NUM --type action\n\n# Recall REQUIREMENTS/SPECS/DESIGN\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/recall-elements.sh --issue NUM --type knowledge\n\n# Recall BUGS/ISSUES/FEEDBACK\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/recall-elements.sh --issue NUM --type judgement\n\n# Smart recovery (all context)\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/recall-elements.sh --issue NUM --recover\n\n# Search within element type\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/recall-elements.sh --issue NUM --type action --search \"jwt\"\n```\n\n### To Start Transcribing\n\n**Option 1: Explicitly choose an issue**\n```bash\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/auto-transcribe.sh set-issue <NUMBER>\n```\n\n**Option 2: Use pattern in conversation** - Say:\n- \"Let's work on issue #123\"\n- \"Claim #45\"\n- \"Working on issue #99\"\n\n**Option 3: Let the system find or create an issue** (on first transcribe call)\n\n### Check Current Issue\n\n```bash\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/auto-transcribe.sh get-issue\n```\n\n### IMPORTANT: No Transcription Until Issue Is Set\n\n**DO NOT post to GitHub until an issue number is confirmed.** Wait for user to specify which issue to work on, or explicitly ask them.\n\n### Element Classification (Once Active)\n\n| Badge | Semantic Index | When to Apply |\n|-------|----------------|---------------|\n|  | KNOWLEDGE | Specs, requirements, design, algorithms, documentation |\n|  | ACTION | Code, implementations, file changes, assets |\n|  | JUDGEMENT | Reviews, feedback, bug reports, evaluations |\n\n### Recall Decision Guide\n\n| User Wants to Recall | Element Type | Command |\n|---------------------|--------------|----------|\n| Code we wrote | ACTION | `--type action` |\n| Requirements/specs | KNOWLEDGE | `--type knowledge` |\n| Bugs/issues found | JUDGEMENT | `--type judgement` |\n| Design decisions | KNOWLEDGE | `--type knowledge` |\n| Test failures | JUDGEMENT | `--type judgement` |\n| Full context | ALL | `--recover` |"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/check-issue-set.sh",
"timeout": 5
},
{
"type": "prompt",
"prompt": "## GHE: Check If Transcription Is Active\n\n**FIRST**: Check if an issue is set for transcription:\n\n```bash\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/auto-transcribe.sh get-issue\n```\n\n**IF NO ISSUE IS SET**: Do NOT transcribe. Process the user's request normally.\n\n**IF AN ISSUE IS SET**: After reading the user's message:\n\n1. **Redact sensitive data** from the user's message\n2. **Post to GitHub** using:\n\n```bash\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/auto-transcribe.sh user \"<REDACTED_USER_MESSAGE>\"\n```\n\n3. **Then process** the user's request normally\n\n### Quick Redaction\n- API keys (sk-ant-*, sk-*, ghp_*, gho_*) -> [REDACTED_KEY]\n- Passwords/secrets -> [REDACTED]\n- /Users/username/ -> /Users/[USER]/\n- emails -> [REDACTED_EMAIL] (except @noreply.github.com)\n\n### Issue Detection Patterns\n\nIf the user's message contains one of these patterns, FIRST set the issue:\n- `[Currently discussing issue n.123]`\n- `Let's work on issue #123` or `working on #123`\n- `Claim #45`\n\nExtract the number and run:\n```bash\nbash ${CLAUDE_PLUGIN_ROOT}/scripts/auto-transcribe.sh set-issue <NUMBER>\n```"
}
]
}
]
}{
"riskFlags": {
"touchesBash": true,
"matchAllTools": false,
"touchesFileWrites": false
},
"typeStats": {
"prompt": 4,
"command": 3
},
"eventStats": {
"Stop": 1,
"PreToolUse": 1,
"SessionStart": 3,
"UserPromptSubmit": 2
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 3,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}