Files
tanweai__pua/hooks/hooks.json
T
xsser b2c4f913f2 feat(ding): v3.5.0 — 钉味 skill 全面升级 blockquote + 来源标注
- 所有钉味输出从 ▎ Unicode 前缀改为 markdown blockquote(> )语法
  Claude Code 渲染器仅对 > 语法触发 dim ▎ + italic 灰色块样式
- 每条 blockquote 开头标注来源:《置身钉内》或《置身钉外》
- 新增独立 skills/ding/ skill 目录(SKILL.md + references/)
- 新增 commands/ding.md、evidence.md、again.md、done-check.md
- 新增 evals/test-trigger-regex.sh(38 条触发正则测试)
- hooks/session-restore.sh、flavor-helper.sh 同步更新格式
- 版本号 3.4.6 → 3.5.0(plugin.json + 两个 marketplace manifest)
2026-06-12 17:44:35 +08:00

112 lines
3.3 KiB
JSON

{
"description": "PUA v3 hooks: optional context notes, failure-pattern reminders, local state continuity, and cleanup helpers.",
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/frustration-trigger.sh\"",
"timeout": 5
}
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/failure-detector.sh\"",
"timeout": 5
}
]
}
],
"PreCompact": [
{
"matcher": "*",
"hooks": [
{
"type": "prompt",
"prompt": "[PUA PreCompact — Local State Note]\n\nCheck whether PUA was active in this session. If not active, no action is needed.\n\nIf active, save a short local note to ~/.pua/builder-journal.md before context compaction so the next session can continue consistently.\n\nSuggested note format:\n```markdown\n# PUA Builder Journal — Compaction Note\n\n## Timestamp\n{current ISO timestamp}\n\n## Runtime State\n- pressure_level: L{0-4}\n- failure_count: {number}\n- current_flavor: {flavor name}\n\n## Active Task\n{1-2 sentences}\n\n## Tried Approaches\n{approaches and outcomes}\n\n## Next Candidate Action\n{what to try next}\n\n## Key Context\n{paths, commands, errors, decisions}\n```\n\nAfter writing, output: > [PUA Checkpoint] Local state note saved to builder-journal.md."
}
]
}
],
"SessionStart": [
{
"matcher": "compact",
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/heartbeat.sh\"",
"timeout": 2
},
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-restore.sh\"",
"timeout": 5
}
]
},
{
"matcher": "startup|resume",
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/heartbeat.sh\"",
"timeout": 2
},
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-restore.sh\"",
"timeout": 5
}
]
}
],
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/pua-loop-hook.sh\""
},
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/stop-feedback.sh\"",
"timeout": 10
}
]
}
],
"SubagentStop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/subagent-teardown.sh\"",
"timeout": 5
}
]
}
],
"PreToolUse": [
{
"matcher": "Bash|Read|Grep|Glob|Edit|Write|MultiEdit|WebSearch|WebFetch",
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/integrity-guard.sh\"",
"timeout": 5
}
]
}
]
}
}