24 lines
1.6 KiB
JSON
24 lines
1.6 KiB
JSON
{
|
|
"version": 1,
|
|
"hooks": {
|
|
"sessionStart": [
|
|
{
|
|
"command": "powershell -ExecutionPolicy Bypass -File .cursor/hooks/session-init.ps1",
|
|
"timeout": 5
|
|
}
|
|
],
|
|
"stop": [
|
|
{
|
|
"type": "prompt",
|
|
"prompt": "You are a changelog compliance checker. Return ONLY valid JSON, nothing else.\n\nSTEP 1 — EXEMPTION CHECK (if ANY condition is true, return {} immediately):\n- The conversation is in Debug mode, debug-mode, or any debugging/troubleshooting context\n- The agent's recent actions were ONLY: reading files, running shell commands, adding log/debug statements, or modifying .cursor/ files\n- The agent did NOT use Write or StrReplace tools on files outside .cursor/ directory\n- The agent was acknowledging a previous hook reminder\n- There is a CURSOR_SKIP_CHANGELOG environment variable set\n\nIf ANY exemption matches → return: {}\n\nSTEP 2 — Only if NO exemption matched:\nCheck if the agent used Write or StrReplace on source files (*.py, *.tsx, *.ts, *.css, *.json outside .cursor/) AND did NOT also write to all three: .cursor/changelog/changelog-full.md, changelog-recent.md, changelog-headlines.md.\n\nIf changelog writes were missed → return: {\"followup_message\":\"Changelog not synced. Run dev-changelog Skill operation A to write all three changelog layers.\"}\n\nOtherwise → return: {}\n\nHere is the hook input: $ARGUMENTS",
|
|
"timeout": 15,
|
|
"loop_limit": 1
|
|
},
|
|
{
|
|
"command": "powershell -ExecutionPolicy Bypass -File .cursor/hooks/check-changelog.ps1",
|
|
"timeout": 10
|
|
}
|
|
]
|
|
}
|
|
}
|