claude-dev-env 8.116.0 → 8.116.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/bin/install.prompt-context.test.mjs +5 -6
  2. package/hooks/blocking/final_reply_gate.py +7 -29
  3. package/hooks/blocking/test_final_reply_gate.py +4 -196
  4. package/hooks/features/conduct-gates.md +5 -12
  5. package/hooks/hooks.json +0 -41
  6. package/hooks/hooks_constants/background_silence_prompt_constants.py +2 -0
  7. package/hooks/hooks_constants/resolve_thread_reply_gate_constants.py +0 -8
  8. package/hooks/session/background_silence_prompt.py +1 -1
  9. package/hooks/test_context_budget_hooks.py +0 -1
  10. package/package.json +1 -1
  11. package/scripts/durable_post_lint.py +0 -12
  12. package/scripts/durable_post_lint_config/config/constants.py +1 -2
  13. package/scripts/policy_lint/adapter_configuration.py +0 -2
  14. package/scripts/policy_lint/config/constants.py +0 -2
  15. package/scripts/test_durable_post_lint.py +0 -53
  16. package/scripts/tests/test_adapter_configuration.py +0 -16
  17. package/hooks/blocking/chat_reply_gate.py +0 -260
  18. package/hooks/blocking/reply_length_gate.py +0 -804
  19. package/hooks/blocking/test_chat_reply_gate.py +0 -302
  20. package/hooks/blocking/test_reply_length_gate.py +0 -1324
  21. package/hooks/hooks_constants/chat_reply_gate_constants.py +0 -60
  22. package/hooks/hooks_constants/reply_length_gate_constants.py +0 -203
  23. package/hooks/hooks_constants/test_reply_length_gate_constants.py +0 -81
  24. package/hooks/hooks_constants/test_visual_reply_rules_constants.py +0 -50
  25. package/hooks/hooks_constants/visual_reply_rules_constants.py +0 -106
  26. package/hooks/test_visual_reply_rules.py +0 -362
  27. package/hooks/visual_reply_rules.py +0 -478
  28. package/rules/visual-reply-rules.json +0 -56
@@ -35,15 +35,14 @@ test('reinstall drops the retired style reminder and keeps one skill reminder ho
35
35
  mergeHooksIntoSettings(settings, hooksConfig, 'C:/Users/example/.claude', 'python');
36
36
 
37
37
  const userPromptHooks = settings.hooks.UserPromptSubmit.flatMap(eachGroup => eachGroup.hooks);
38
- assert.equal(userPromptHooks.length, 8);
38
+ assert.equal(userPromptHooks.length, 7);
39
39
  assert.equal(userPromptHooks[0].command, userCommand);
40
40
  assert.match(userPromptHooks[1].command, /session\/skill_loaded_reminder\.py$/);
41
41
  assert.match(userPromptHooks[2].command, /lifecycle\/nested_project_hooks\.py$/);
42
- assert.match(userPromptHooks[3].command, /blocking\/chat_reply_gate\.py$/);
43
- assert.match(userPromptHooks[4].command, /session\/tracking_nudge\.py$/);
44
- assert.match(userPromptHooks[5].command, /session\/plugin_change_warning\.py$/);
45
- assert.match(userPromptHooks[6].command, /blocking\/turn_review_gate\.py$/);
46
- assert.match(userPromptHooks[7].command, /session\/background_silence_prompt\.py$/);
42
+ assert.match(userPromptHooks[3].command, /session\/tracking_nudge\.py$/);
43
+ assert.match(userPromptHooks[4].command, /session\/plugin_change_warning\.py$/);
44
+ assert.match(userPromptHooks[5].command, /blocking\/turn_review_gate\.py$/);
45
+ assert.match(userPromptHooks[6].command, /session\/background_silence_prompt\.py$/);
47
46
  assert.ok(userPromptHooks.every(eachHook => !eachHook.command.includes('style_reminder_prompt')));
48
47
 
49
48
  const firstMerge = JSON.stringify(settings);
@@ -1,22 +1,11 @@
1
1
  #!/usr/bin/env python3
2
- """Stop hook that checks the closing chat reply for an unvalidated claim.
2
+ """Stop hook that checks the closing chat reply for a path the terminal garbles.
3
3
 
4
- The reply length gate checks the chat tools. This gate checks the reply the
5
- session ends its turn with, which reaches the user with no tool call::
6
-
7
- flag: My guess is one to two hours.
8
- flag: I didn't confirm this one.
9
- flag: Run 18239174012 passed. (no tool result shows the run)
10
- ok: Run 18239174012 took 39 minutes. (a tool result shows the run)
11
-
12
- It applies the banned words, the unvalidated claim pattern, and the cited
13
- run, job, check, and pull request numbers from ``reply_length_gate.py``. A
14
- pull request link also counts as shown when hook or harness text shows it. The
15
- citation check is skipped when the transcript cannot be read. It also flags
16
- a path outside code whose backslash the terminal drops, such as
17
- ``D:\\Reports\\.claude``. A block sends
18
- the reason back so the model rewrites the reply. Claude Code ends the turn
19
- after eight blocks in a row.
4
+ This gate checks the reply the session ends its turn with, which reaches the
5
+ user with no tool call. It flags a path outside code whose backslash the
6
+ terminal drops, such as ``D:\\Reports\\.claude``. A block sends the reason
7
+ back so the model rewrites the reply. Claude Code ends the turn after eight
8
+ blocks in a row.
20
9
 
21
10
  It also blocks a reply whose last paragraph ends with a question mark, or says a question still stands, when the
22
11
  turn sent no AskUserQuestion, hearthbot decision card, or Codex
@@ -44,12 +33,6 @@ hooks_root_directory = str(Path(__file__).resolve().parent.parent)
44
33
  if hooks_root_directory not in sys.path:
45
34
  sys.path.insert(0, hooks_root_directory)
46
35
 
47
- from reply_length_gate import (
48
- banned_word_violation,
49
- configured_banned_words,
50
- unseen_citation_violation_with_hook_text,
51
- unvalidated_claim_violation,
52
- )
53
36
  from open_tasks_transcript import replayed_transcript
54
37
  from hooks_constants.hook_block_logger import log_hook_block
55
38
  from hooks_constants.pre_tool_use_stdin import read_hook_input_dictionary_from_stdin
@@ -270,12 +253,7 @@ def unbriefed_question_violation(reply_text: str, transcript_path: object) -> st
270
253
 
271
254
  def final_reply_violation(reply_text: str, transcript_path: object) -> str | None:
272
255
  """Return the block reason for the closing reply, or None when it passes."""
273
- return (
274
- banned_word_violation(reply_text, configured_banned_words())
275
- or unvalidated_claim_violation(reply_text)
276
- or unseen_citation_violation_with_hook_text(reply_text, transcript_path)
277
- or windows_path_violation(reply_text)
278
- )
256
+ return windows_path_violation(reply_text)
279
257
 
280
258
 
281
259
  def main() -> int:
@@ -39,205 +39,13 @@ def run_gate(
39
39
  def isolated_home(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
40
40
  monkeypatch.setenv("HOME", str(tmp_path))
41
41
  monkeypatch.setenv("USERPROFILE", str(tmp_path))
42
- monkeypatch.delenv("CLAUDE_REPLY_BANNED_WORDS_PATH", raising=False)
43
42
 
44
43
 
45
- def write_tool_result_transcript(transcript_path: Path, result_text: str) -> Path:
46
- tool_result = {"type": "tool_result", "tool_use_id": "t1", "content": result_text}
47
- transcript_path.write_text(
48
- json.dumps({"type": "user", "message": {"content": [tool_result]}}), encoding="utf-8"
49
- )
50
- return transcript_path
51
-
52
-
53
- @pytest.mark.parametrize(
54
- ("reply_text", "quoted_text"),
55
- [
56
- (GUESSED_REPLY, 'Banned word "guess"'),
57
- (UNCONFIRMED_REPLY, 'No tool validated this: "Merge queue: I didn\u2019t confirm this one."'),
58
- ("It should take about 40 minutes.", "It should take about 40 minutes."),
59
- ],
60
- )
61
- def test_should_block_a_closing_reply_that_guesses(
62
- monkeypatch: pytest.MonkeyPatch,
63
- capsys: pytest.CaptureFixture[str],
64
- reply_text: str,
65
- quoted_text: str,
66
- ) -> None:
67
- exit_code, stdout_text = run_gate(monkeypatch, capsys, reply_text)
68
- decision = json.loads(stdout_text)
69
- assert exit_code == 0
70
- assert decision["decision"] == "block"
71
- assert quoted_text in decision["reason"]
72
- assert decision["reason"].endswith("Rewrite the reply without it.")
73
-
74
-
75
- def test_should_block_a_run_no_tool_result_shows(
76
- monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
77
- ) -> None:
78
- transcript_path = write_tool_result_transcript(tmp_path / "s.jsonl", "run 18239170000 ok")
79
- _, stdout_text = run_gate(monkeypatch, capsys, MEASURED_REPLY, transcript_path)
80
- assert 'cites "run 18239174012"' in json.loads(stdout_text)["reason"]
81
-
82
-
83
- def test_should_allow_a_run_a_tool_result_shows(
84
- monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
85
- ) -> None:
86
- transcript_path = write_tool_result_transcript(tmp_path / "s.jsonl", "run 18239174012 took 39m")
87
- assert run_gate(monkeypatch, capsys, MEASURED_REPLY, transcript_path) == (0, "")
88
-
89
-
90
- CITED_PULL_URL = "https://github.com/acme/widgets/pull/8127"
91
- CITED_PULL_REPLY = f"The control is open as [PR 8127]({CITED_PULL_URL})."
92
- TASK_NOTIFICATION_ENTRY = {
93
- "type": "user",
94
- "message": {
95
- "role": "user",
96
- "content": (
97
- "<task-notification>\n<status>completed</status>\n<result>1. PR "
98
- f"[#8127]({CITED_PULL_URL}) is open. It is not armed.</result>\n</task-notification>"
99
- ),
100
- },
101
- "origin": {"kind": "task-notification", "producer": "session-task"},
102
- "promptSource": "system",
103
- }
104
- OWN_ECHO_FEEDBACK = (
105
- 'Stop hook feedback:\nThe text cites "/pull/8127", and no tool result in this session'
106
- " shows it. Read it yourself or through a subagent first. Rewrite the reply without it."
107
- )
108
-
109
-
110
- def write_transcript_entries(transcript_path: Path, all_entries: list[dict[str, object]]) -> Path:
111
- transcript_path.write_text(
112
- "\n".join(json.dumps(each_entry) for each_entry in all_entries), encoding="utf-8"
113
- )
114
- return transcript_path
115
-
116
-
117
- @pytest.mark.parametrize(
118
- "hook_entry",
119
- [
120
- TASK_NOTIFICATION_ENTRY,
121
- {
122
- "type": "user",
123
- "isMeta": True,
124
- "message": {
125
- "role": "user",
126
- "content": f"Stop hook feedback:\nThese pull requests are still open:\n- {CITED_PULL_URL}",
127
- },
128
- },
129
- {
130
- "type": "attachment",
131
- "attachment": {
132
- "type": "hook_additional_context",
133
- "content": [f"You opened acme/widgets#8127 {CITED_PULL_URL}"],
134
- },
135
- },
136
- {
137
- "type": "attachment",
138
- "attachment": {"type": "hook_system_message", "content": f"Watching {CITED_PULL_URL}"},
139
- },
140
- {
141
- "type": "attachment",
142
- "attachment": {
143
- "type": "queued_command",
144
- "origin": {"kind": "task-notification", "producer": "session-task"},
145
- "prompt": f"<task-notification><result>Opened {CITED_PULL_URL}</result></task-notification>",
146
- },
147
- },
148
- ],
149
- )
150
- def test_should_allow_a_pull_request_link_hook_text_shows(
151
- monkeypatch: pytest.MonkeyPatch,
152
- capsys: pytest.CaptureFixture[str],
153
- tmp_path: Path,
154
- hook_entry: dict[str, object],
155
- ) -> None:
156
- transcript_path = write_transcript_entries(tmp_path / "s.jsonl", [hook_entry])
157
- assert run_gate(monkeypatch, capsys, CITED_PULL_REPLY, transcript_path) == (0, "")
158
-
159
-
160
- def test_should_block_a_pull_request_link_only_the_gate_feedback_echoes(
161
- monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
162
- ) -> None:
163
- feedback_entry = {"type": "user", "isMeta": True, "message": {"role": "user", "content": OWN_ECHO_FEEDBACK}}
164
- blocking_error_entry = {
165
- "type": "attachment",
166
- "attachment": {
167
- "type": "hook_blocking_error",
168
- "blockingError": {"blockingError": OWN_ECHO_FEEDBACK.removeprefix("Stop hook feedback:\n")},
169
- },
170
- }
171
- transcript_path = write_transcript_entries(
172
- tmp_path / "s.jsonl", [feedback_entry, blocking_error_entry]
173
- )
174
- _, stdout_text = run_gate(monkeypatch, capsys, CITED_PULL_REPLY, transcript_path)
175
- assert 'cites "/pull/8127"' in json.loads(stdout_text)["reason"]
176
-
177
-
178
- def test_should_block_a_pull_request_link_the_gate_quotes_in_a_sentence(
179
- monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
180
- ) -> None:
181
- quoting_feedback = (
182
- f'Stop hook feedback:\nNo tool validated this: "{CITED_PULL_REPLY}". Run the check yourself'
183
- " or through a subagent, then state what the run, log line, output, or file and line shows."
184
- " When you cannot run it this turn, report it as `Open: <check> - <next step>`."
185
- f'\nSentence too long: 40 words, limit 35: "Opened {CITED_PULL_URL} and...".'
186
- )
187
- feedback_entry = {"type": "user", "isMeta": True, "message": {"role": "user", "content": quoting_feedback}}
188
- transcript_path = write_transcript_entries(tmp_path / "s.jsonl", [feedback_entry])
189
- _, stdout_text = run_gate(monkeypatch, capsys, CITED_PULL_REPLY, transcript_path)
190
- assert 'cites "/pull/8127"' in json.loads(stdout_text)["reason"]
191
-
192
-
193
- def test_should_block_a_pull_request_link_only_a_typed_queued_prompt_shows(
194
- monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
195
- ) -> None:
196
- typed_entry = {
197
- "type": "attachment",
198
- "attachment": {"type": "queued_command", "origin": {"kind": "human"}, "prompt": f"Is {CITED_PULL_URL} done?"},
199
- }
200
- transcript_path = write_transcript_entries(tmp_path / "s.jsonl", [typed_entry])
201
- _, stdout_text = run_gate(monkeypatch, capsys, CITED_PULL_REPLY, transcript_path)
202
- assert 'cites "/pull/8127"' in json.loads(stdout_text)["reason"]
203
-
204
-
205
- def test_should_block_a_pull_request_link_no_text_shows(
206
- monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
207
- ) -> None:
208
- transcript_path = write_transcript_entries(
209
- tmp_path / "s.jsonl", [{**TASK_NOTIFICATION_ENTRY, "message": {"role": "user", "content": "PR 8126 opened."}}]
210
- )
211
- _, stdout_text = run_gate(monkeypatch, capsys, CITED_PULL_REPLY, transcript_path)
212
- assert 'cites "/pull/8127"' in json.loads(stdout_text)["reason"]
213
-
214
-
215
- def test_should_block_a_run_only_hook_text_shows(
216
- monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], tmp_path: Path
217
- ) -> None:
218
- transcript_path = write_transcript_entries(
219
- tmp_path / "s.jsonl",
220
- [{**TASK_NOTIFICATION_ENTRY, "message": {"role": "user", "content": "run 18239174012 took 39m"}}],
221
- )
222
- _, stdout_text = run_gate(monkeypatch, capsys, MEASURED_REPLY, transcript_path)
223
- assert 'cites "run 18239174012"' in json.loads(stdout_text)["reason"]
224
-
225
-
226
- def test_should_steer_a_skipped_check_to_an_open_line(
227
- monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
228
- ) -> None:
229
- skipped_check_reply = "I have not checked the pivot, reach, or screen 26 captures yet."
230
- _, stdout_text = run_gate(monkeypatch, capsys, skipped_check_reply)
231
- block_reason = json.loads(stdout_text)["reason"]
232
- assert "`Open: <check> - <next step>`" in block_reason
233
- assert "leave the claim out" not in block_reason
234
-
235
-
236
- def test_should_allow_an_open_line_for_a_skipped_check(
237
- monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
44
+ @pytest.mark.parametrize("reply_text", [GUESSED_REPLY, UNCONFIRMED_REPLY, MEASURED_REPLY])
45
+ def test_should_allow_a_closing_reply_the_removed_claim_checks_once_blocked(
46
+ monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str], reply_text: str
238
47
  ) -> None:
239
- open_line = "Open: pivot, reach, and screen 26 checks - the next check-in measures them."
240
- assert run_gate(monkeypatch, capsys, open_line) == (0, "")
48
+ assert run_gate(monkeypatch, capsys, reply_text) == (0, "")
241
49
 
242
50
 
243
51
  def test_should_allow_a_closing_reply_with_no_message(
@@ -4,13 +4,11 @@ This family stops a chat reply, edited message, or tool call when its payload br
4
4
 
5
5
  ## Checks
6
6
 
7
- - `blocking/reply_length_gate.py` caps chat reply length, denies a configured banned word, requires a readable link when the text names a pull request number, and denies a causal claim in a reply that cites no code span, output block, or link. It denies a sentence that guesses, estimates, hedges a duration, or admits a skipped check, such as "I didn't confirm this one." It denies a cited Actions run, pull request, or run, job, or check id that no successful tool result in the transcript shows; a subagent's report is the result of its Agent call. A question card from `AskUserQuestion` gets the banned word check and `unvalidated_claim_violation`, like a decision card. One refusal names every broken rule and every offending sentence, numbered, and ends with "Fix every item above in your next write." With visual reply mode on, it also runs the checks in `visual_reply_rules.py` from the rule list in `rules/visual-reply-rules.json`: no abbreviation or tracker number outside a link, a widget or page before a reply of more than one sentence, and no anchor link inside widget code. The mode is off by default; `~/.claude/visual-reply-mode.json` with `{"enabled": true}` turns the mode checks on. The results-picture check runs with the mode off too. A reply with a markdown table, or more than two figures, needs a picture: an attached `.svg`, `.png`, `.jpg`, `.jpeg`, `.gif`, or `.webp` file, an attached `frame` output such as a published page, or a markdown picture outside code. The check reads the attached name only, so it does not confirm that the file exists. It skips an edit of a posted message, because the edit tool attaches nothing, and the closing reply of a turn, which `blocking/final_reply_gate.py` does not run it on.
8
- - `blocking/final_reply_gate.py` applies the banned words, `unvalidated_claim_violation`, and `unseen_citation_violation_with_hook_text` from the reply gate to the reply a session ends its turn with. In that citation check a `/pull/N` link also counts as shown when hook or harness text shows it: stop-hook feedback, system reminders, a background agent's task notification, and hook additional context, hook system message, and queued task notification attachments. A skill body, or a prompt the user typed while the session worked, does not count. The gate's own feedback, which quotes the reply, does not count. Its `windows_path_violation` blocks a path the terminal would render without one of its backslashes. Its `unbriefed_question_violation` blocks a reply whose last paragraph, with fences, quotes, and code spans left out, ends with a question mark or says a question still stands, when the turn sent no `AskUserQuestion`, hearthbot decision card, or Codex `request_user_input` call; it is skipped when the transcript cannot be read.
7
+ - `blocking/final_reply_gate.py` checks the reply a session ends its turn with. Its `windows_path_violation` blocks a path the terminal would render without one of its backslashes. Its `unbriefed_question_violation` blocks a reply whose last paragraph, with fences, quotes, and code spans left out, ends with a question mark or says a question still stands, when the turn sent no `AskUserQuestion`, hearthbot decision card, or Codex `request_user_input` call; it is skipped when the transcript cannot be read.
9
8
  - `blocking/open_tasks_stop_gate.py` holds the end of a turn once when the prompt that started it asks for work, the turn ran a work tool, and the turn made no tracker call: TaskCreate, TaskUpdate, TodoWrite, the Codex `update_plan`, or the desktop `mcp__ccd_turn__update_plan`. A work tool is any tool but a tracker call, the session title tool, `AskUserQuestion`, a hearthbot decision card, Codex `request_user_input`, `ToolSearch`, `TaskList`, or `TaskGet`. It never reads the reply text. `open_task_asks.is_ask` decides whether a prompt asks for work: a question-only prompt, an acknowledgement such as `thanks!`, an empty prompt, a prompt of only `<system-reminder>` blocks, and an envelope such as `<agent-message>` or `<task-notification>` do not. `blocking/open_tasks_transcript.py` replays the transcript for it: the turn's prompt, its tool calls, and the task list. `session_task_items` merges the task store with the transcript items whose subject the store does not hold, for the session title gate.
10
9
  - `session/tracking_nudge.py` adds one `additionalContext` note to a prompt that asks for work. The note asks for an item in the session's task list tool. It shows on the session's first ask and on the first ask after each compaction, through `once_per_session.py`. When the title shows the red flag or the check mark, it also asks for the hourglass before other work. It never blocks.
11
10
  - `session/background_silence_prompt.py` adds one `additionalContext` note to a background event prompt, one that starts with `<task-notification>` or opens itself or a `<system-reminder>` block with `[SYSTEM NOTIFICATION - NOT USER INPUT]`, while the user asked for silence. The newest user-typed message that sets silence ("silent unless", "stay silent", "silent on updates", "no updates unless") or lifts it ("you can talk again", "updates are fine", "stop being silent") decides. The note quotes the user's "unless" or "except" clause word for word, or the whole message when it has no such clause, and says to end the turn with no text unless that exception applies now. Envelope prompts, compaction summaries, and quoted `>` lines are not the user's words. It never blocks.
12
- - The claim judge is a `prompt` hook in `hooks.json`, with no `model` set, so Claude Code's small default hook model reads each chat message and denies every claim, numbered in one refusal, about how code, a file, a tool, a service, a run, or a process behaves, or why something happened, when nothing in the message shows it: inline code that quotes output or a code line, a file and line, or a link. A pull request link covers what that change does, what it blocks or lets through, and its checks. The author's own actions, a restatement of the user's words, questions, instructions, and a decision card's option consequences pass. It catches the plain claims the causal word list in `blocking/reply_length_gate.py` misses, such as "The code lets any of them rewrite it mid-check." `continueOnBlock` returns the reason to the agent as the tool error, so it can add the source and send again. The installer owns it through the `claude-dev-env: ` prefix on its `statusMessage`. It skips `post_widget`, whose input is SVG or HTML markup.
13
- - `blocking/chat_reply_gate.py` runs the `reply_length_gate.py` reply checks on a plain chat reply, which is no tool call. On the first `UserPromptSubmit` of a session, and on the first one after each compaction, it adds the reply rules as `additionalContext`. On `MessageDisplay` it holds each streamed batch until the message ends. A message that passes shows whole. A message that fails shows as a draft from `claude -p` on Haiku that passes the same checks, and the original shows when two drafts fail. The draft changes only the text on screen, so the next `UserPromptSubmit` tells the agent the text the user saw, and `SessionEnd` deletes the stored draft and the session's once-per-session markers for all three hooks. The [reply arena harness](https://github.com/jl-cmd-projects/claude-dev-env/tree/160349b90f627ea542fc6bc7b2b7f86dcbf98b73/tests/reply_arena) ran the comparison that chose this display path.
11
+ - The claim judge is a `prompt` hook in `hooks.json`, with no `model` set, so Claude Code's small default hook model reads each chat message and denies every claim, numbered in one refusal, about how code, a file, a tool, a service, a run, or a process behaves, or why something happened, when nothing in the message shows it: inline code that quotes output or a code line, a file and line, or a link. A pull request link covers what that change does, what it blocks or lets through, and its checks. The author's own actions, a restatement of the user's words, questions, instructions, and a decision card's option consequences pass. It catches plain claims such as "The code lets any of them rewrite it mid-check." `continueOnBlock` returns the reason to the agent as the tool error, so it can add the source and send again. The installer owns it through the `claude-dev-env: ` prefix on its `statusMessage`. It skips `post_widget`, whose input is SVG or HTML markup.
14
12
  - `blocking/edit_marker_gate.py` rejects strikethrough and edit-note markers in replacement chat text or cards.
15
13
  - `blocking/issue_close_handoff_gate.py` denies an issue comment or issue write that closes the issue and routes a found defect to another issue or epic.
16
14
  - `blocking/session_title_format_gate.py` denies a session title that breaks the `<emoji> <name>` shape or has a name longer than 25 characters.
@@ -19,7 +17,7 @@ This family stops a chat reply, edited message, or tool call when its payload br
19
17
  - `blocking/wakeup_cap_gate.py` keeps a self-wakeup inside the 1-hour prompt cache. A wake over the step-down (57 minutes for `send_later` and Routines, 3480 seconds for `ScheduleWakeup`) and at most 60 minutes away runs with its delay rewritten to the step-down. A wake over 60 minutes away, or a cron with more than 57 minutes between wakes, is denied with a reason that says to stack wakes under the cap. A Routine that starts a fresh session on each firing passes.
20
18
  - `blocking/verify_before_acting.py` blocks a completed mutating call when the agent's reasoning contains an unchecked claim. For an `Agent` or `Task` spawn it adds the same quote as an advisory note and does not block.
21
19
  - `blocking/pr_lifecycle_skill_gate.py` denies a commit, push, pull request action, or merge until the `pr-lifecycle` skill appears in the transcript since the last compaction. Read-only `gh pr` subcommands (`view`, `list`, `checks`, `diff`, `status`) pass without it, unless a later argument names another `gh pr` subcommand.
22
- - `blocking/resolve_thread_reply_gate.py` denies a review thread resolve until the agent's own transcript shows a reply on that same thread that posted after the last user prompt and that no successful resolve of the thread has spent. A resolve is a `resolve_review_thread` call, which names the thread by `threadID`; a `pull_request_review_write` call with method `resolve_thread`, which names it by `threadId`; a shell command with a `gh api graphql` `resolveReviewThread` mutation, which names it by a literal `PRRT_` id; or a shell call to `pulls/<n>/ccr/comments/<id>/resolve`, which names it by a comment id. A graphql resolve that names no `PRRT_` id is denied. A reply is an `add_reply_to_pull_request_comment` call, or a `gh api` call to a comment's `replies` endpoint or to `addPullRequestReviewThreadReply`, which names its thread by `PRRT_` id. A reply and a resolve by comment id match when they name the same comment, or when a successful tool result in the transcript, such as `pull_request_read` `get_review_comments`, lists the comment under the thread by its `discussion_r` anchor or `databaseId`. A reply whose result is an error, such as a refusal from `blocking/reply_length_gate.py`, does not count. With no readable transcript, the resolve passes.
20
+ - `blocking/resolve_thread_reply_gate.py` denies a review thread resolve until the agent's own transcript shows a reply on that same thread that posted after the last user prompt and that no successful resolve of the thread has spent. A resolve is a `resolve_review_thread` call, which names the thread by `threadID`; a `pull_request_review_write` call with method `resolve_thread`, which names it by `threadId`; a shell command with a `gh api graphql` `resolveReviewThread` mutation, which names it by a literal `PRRT_` id; or a shell call to `pulls/<n>/ccr/comments/<id>/resolve`, which names it by a comment id. A graphql resolve that names no `PRRT_` id is denied. A reply is an `add_reply_to_pull_request_comment` call, or a `gh api` call to a comment's `replies` endpoint or to `addPullRequestReviewThreadReply`, which names its thread by `PRRT_` id. A reply and a resolve by comment id match when they name the same comment, or when a successful tool result in the transcript, such as `pull_request_read` `get_review_comments`, lists the comment under the thread by its `discussion_r` anchor or `databaseId`. A reply whose result is an error does not count. With no readable transcript, the resolve passes.
23
21
  - `blocking/verify_before_commit_gate.py` denies a `git commit` in a repository with a `.claude/skills/verify` or `.agents/skills/verify` directory until the `verify` skill loads after the last user prompt, through a Skill call whose result comes back without an error, or the `/verify` command in that prompt. It reads the committed paths from the staged diff, the tracked changes for `-a`, and the paths of each `git add` earlier in the same command, and passes a commit whose paths are all docs, images, test files, or `.json`, `.jsonl`, `.yaml`, `.yml`, or `.csv` files under a `docs` folder.
24
22
  - `blocking/build_eval_before_eval_write_gate.py` denies a write to an eval file until a Skill call named exactly `claude-api` with args `build-eval`, or the `/claude-api build-eval` command, appears in the transcript.
25
23
  - `blocking/merge_review_gate.py` denies an agent's merge until a review pass on the merged head reported zero findings, or ruled out every finding and linked the posted rulings. It reads the receipt `scripts/merge_review_receipt.py` writes, requires the merge, auto-merge or merge-queue entry to be pinned to that head, and skips repositories listed in `CLAUDE_MERGE_REVIEW_EXEMPT_REPOSITORIES`. A `gh pr merge` call whose every merge segment carries `--disable-auto` only turns auto-merge off, so it passes. A segment that also carries `--auto`, gives `--auto` or `--disable-auto` an `=` value, joins short flags such as `-sb`, or holds a bare `--` keeps every check. Its deny reason names the review command `CLAUDE_MERGE_REVIEW_COMMAND` sets. The reason tells the agent to run that command for the first three passes and `/code-review low --fix <number>` for each later pass; the gate itself counts no passes. It also denies a pull request open, through `gh pr create`, `pull_request.py create` or a `create_pull_request` tool, until a pass recorded as `merge_review_receipt.py <owner/name> open <head> 0` covers the head the pull request opens with. An open pass also counts when every finding is ruled out: `merge_review_receipt.py <owner/name> open <head> <count> --ruled-out <count> --rulings <path:line,...>`, with a different `path:line` for each finding, checked against the file at that head when the pass is recorded. A merge pinned to that same head passes on the open receipt only when the pass found zero findings.
@@ -29,13 +27,11 @@ This family stops a chat reply, edited message, or tool call when its payload br
29
27
 
30
28
  ## When it fires
31
29
 
32
- - `blocking/reply_length_gate.py` runs on `PreToolUse`, matcher `mcp__hearthbot__reply|mcp__hearthbot__post_message|mcp__hearthbot__update_message|mcp__hearthbot__ask_decision|AskUserQuestion|mcp__hearthbot__post_widget`, timeout `10` seconds in `hooks.json`.
33
30
  - `blocking/final_reply_gate.py` runs on `Stop`, timeout `10` seconds in `hooks.json`.
34
31
  - `blocking/open_tasks_stop_gate.py` runs on `Stop`, timeout `10` seconds in `hooks.json`. The installer also registers it on Codex `Stop` and as a native Cursor `stop` entry in `~/.cursor/hooks.json`, where a block also returns `followup_message`. A Cursor stop with status `aborted` or `error` passes. A Cursor stop whose `loop_count` is above 0 passes, because a copy Cursor imports from `~/.claude/settings.json` has no follow-up limit.
35
32
  - `session/tracking_nudge.py` runs on `UserPromptSubmit`, matcher empty, timeout `10` seconds in `hooks.json`.
36
33
  - `session/background_silence_prompt.py` runs on `UserPromptSubmit`, matcher empty, timeout `10` seconds in `hooks.json`. It reads the transcript only for a background event prompt.
37
34
  - The claim judge runs on `PreToolUse`, matcher `mcp__hearthbot__reply|mcp__hearthbot__post_message|mcp__hearthbot__update_message|mcp__hearthbot__ask_decision`, timeout `30` seconds in `hooks.json`.
38
- - `blocking/chat_reply_gate.py` runs on `UserPromptSubmit`, matcher empty, timeout `10` seconds, on `MessageDisplay`, timeout `100` seconds, and on `SessionEnd`, timeout `3` seconds, in `hooks.json`.
39
35
  - `blocking/edit_marker_gate.py` runs on `PreToolUse`, matcher `mcp__.*__update_message`, timeout `10` seconds in `hooks.json`.
40
36
  - `blocking/issue_close_handoff_gate.py` runs on `PreToolUse`, matcher `mcp__.*__(add_issue_comment|issue_write|update_issue_comment)`, timeout `10` seconds in `hooks.json`.
41
37
  - `blocking/session_title_format_gate.py` runs on `PreToolUse`, matcher `mcp__.*__set_session_title`, timeout `10` seconds in `hooks.json`.
@@ -58,14 +54,12 @@ Preconditions:
58
54
 
59
55
  - Run each command from the repository root with Python and pytest available. The tests create transcript and payload fixtures.
60
56
 
61
- - **Reply length.** Input is a reply with four sentences, a plain pull request number, an abbreviation, two sentences with no widget this turn, or widget code with an anchor link. Run `python -m pytest packages/claude-dev-env/hooks/blocking/test_reply_length_gate.py -q`. The adjacent test observes a denial and its count, link, or mode reason. Widget code with no flowchart passes with a flowchart reminder in `additionalContext`.
62
57
  - **Resolve reply.** Input is a transcript where a thread reply came back refused, or with no reply, or with one reply already spent on a resolve, or with a reply on another thread, then a resolve call, a `pull_request_review_write` `resolve_thread` call, a graphql `resolveReviewThread` command, or a `ccr/comments/<id>/resolve` call. Run `python -m pytest packages/claude-dev-env/hooks/blocking/test_resolve_thread_reply_gate.py -q`. The adjacent test observes a deny whose reason says to post the reply, confirm it posted, then resolve. A reply that posted before the resolve passes, and an unreadable transcript passes.
63
- - **Final reply.** Input is a closing reply that says "My guess is one to two hours." or cites a run no tool result shows. Run `python -m pytest packages/claude-dev-env/hooks/blocking/test_final_reply_gate.py -q`. The adjacent test observes a `block` decision that quotes the sentence or the citation; a reply that cites a run a tool result shows passes. A reply with a plain-text `D:\Reports\.claude\report.html` is blocked; the same path in backticks or a fenced block passes.
58
+ - **Final reply.** Input is a closing reply. Run `python -m pytest packages/claude-dev-env/hooks/blocking/test_final_reply_gate.py -q`. The adjacent test observes a `block` decision for a path in plain text. A reply with a plain-text `D:\Reports\.claude\report.html` is blocked; the same path in backticks or a fenced block passes.
64
59
  - **Open tasks.** Input is a transcript whose last prompt asks for work and whose turn ran a Bash call and no tracker call. Run `python -m pytest packages/claude-dev-env/hooks/blocking/test_open_tasks_stop_gate.py -q`. The adjacent test observes one `block` decision; the same turn with a TaskCreate, TaskUpdate, TodoWrite, or desktop plan call passes. A question, an acknowledgement, a `<task-notification>` envelope, a tool-free turn, and a held stop pass. The same file covers Codex and Cursor payloads.
65
60
  - **Ask nudge.** Input is a `UserPromptSubmit` payload with a work prompt, a question, and a `<task-notification>` envelope, after a transcript whose title shows the red flag. Run `python -m pytest packages/claude-dev-env/hooks/session/test_tracking_nudge.py -q`. The adjacent test observes a task list note and a title note for the work prompt, and empty stdout for the other two. A second ask in the same session gets no task list note until the transcript records a compaction.
66
61
  - **Background silence.** Input is a `UserPromptSubmit` payload whose prompt is a `<task-notification>` envelope, after a transcript whose user message reads "Silent on updates unless something merges or youre blocked". Run `python -m pytest packages/claude-dev-env/hooks/session/test_background_silence_prompt.py -q`. The adjacent test observes a note that quotes "unless something merges or youre blocked", and empty stdout for a user-typed prompt, after a lift, and with no silence message.
67
62
  - **Claim judge.** Input is a headless `claude -p` session with a stub MCP server named `hearthbot` that exposes `reply` and `ask_decision`, told to send "The code lets any of them rewrite it mid-check." The session settings add the `hooks.json` prompt hook. The stub logs zero bytes sent, and the tool error reads `PreToolUse:mcp__hearthbot__reply hook error: [<the prompt>]: Facts with no source: 1. ...`, numbering every failing claim. The same sentence with a `file:line` in backticks posts. A hook whose `model` Claude Code does not recognize lets every message through, so leave `model` unset. Run `node --test packages/claude-dev-env/bin/install.prompt-hook.test.mjs` for the installer side; it observes one managed prompt hook after two installs and none after uninstall.
68
- - **Chat reply.** Input is a `MessageDisplay` event whose message holds four sentences, the same message split over two batches, and a `UserPromptSubmit` event. Run `python -m pytest packages/claude-dev-env/hooks/blocking/test_chat_reply_gate.py -q`. The adjacent test observes the drafter's text in `displayContent`, an empty first batch, no output for three sentences, the original after two failed drafts, the shown draft in the next `additionalContext`, and the stored draft deleted at session end. A replay of two prompts and a compaction observes the reply rules on the first prompt, no output on the second, and the rules again after the compaction.
69
63
  - **Edit marker.** Input is an update message with strikethrough or an edit note. Run `python -m pytest packages/claude-dev-env/hooks/blocking/test_edit_marker_gate.py -q`. The adjacent test observes a denial; clean replacement text passes.
70
64
  - **Handoff close.** Input is an issue comment that says the issue is closed and that the found defect belongs to another issue. Run `python -m pytest packages/claude-dev-env/hooks/blocking/test_issue_close_handoff_gate.py -q`. The adjacent test observes a denial; a close with a plain cross-reference and a routing comment on an open issue both pass.
71
65
  - **Session title.** Input is a set session title call with no leading emoji or a name over 25 characters. Run `python -m pytest packages/claude-dev-env/hooks/blocking/test_session_title_format_gate.py -q`. The adjacent test observes a denial that names the broken rule; a well-formed title passes.
@@ -90,8 +84,7 @@ Preconditions:
90
84
  - `blocking/step_note_gate.py` is off by default and polls for the transcript record. Subagent calls and unreadable records pass.
91
85
  - `blocking/wakeup_cap_gate.py` lets an `update_trigger` cron change pass, because that input does not say whether the Routine wakes a session. Its step-down values come from fire-time probes: `send_later` rounds its fire time up to the next minute and polls once a minute, so a 1-minute request landed 123 and 158 seconds later. `ScheduleWakeup` rounds its fire time up to the next minute, so requests of 60 and 90 seconds landed 70 and 121 seconds later.
92
86
  - `blocking/verify_before_acting.py` runs after the tool. A block asks the agent to check the claim and undo a contradicted change. A spawn has already started when the hook runs, so a block would stop nothing. The advisory note asks the agent to check the claim before it acts on the spawned agent's result.
93
- - The reply gate counts each nonempty list line as a sentence. Link targets and code spans add no words. Its banned words come from `reply-banned-words.json` in the Claude home, or the file `CLAUDE_REPLY_BANNED_WORDS_PATH` names, with built-in defaults.
94
- - The final reply gate blocks the stop and returns its reason to the model, which rewrites the reply. Claude Code ends the turn anyway after eight blocks in a row. The cited number checks in both gates skip when the transcript cannot be read.
87
+ - The final reply gate blocks the stop and returns its reason to the model, which rewrites the reply. Claude Code ends the turn anyway after eight blocks in a row.
95
88
  - The edit marker gate scans replacement cards as well as the message text.
96
89
  - The handoff close gate reads the `body` and `comment` fields of issue tools only. A `gh issue close --comment` command in Bash and a pull request body that closes the issue with `Closes #N` do not reach it.
97
90
  - The eval write gate reads Write, Edit, MultiEdit, NotebookEdit and apply_patch calls. A Bash or PowerShell command that writes an eval file reaches it without the gate. An apply_patch that will not parse counts as an eval write when any of its words is an eval path. A missing or unreadable transcript denies the write.
package/hooks/hooks.json CHANGED
@@ -187,16 +187,6 @@
187
187
  }
188
188
  ]
189
189
  },
190
- {
191
- "matcher": "mcp__hearthbot__reply|mcp__hearthbot__post_message|mcp__hearthbot__update_message|mcp__hearthbot__ask_decision|AskUserQuestion|mcp__hearthbot__post_widget",
192
- "hooks": [
193
- {
194
- "type": "command",
195
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/blocking/reply_length_gate.py",
196
- "timeout": 10
197
- }
198
- ]
199
- },
200
190
  {
201
191
  "matcher": "mcp__hearthbot__reply|mcp__hearthbot__post_message|mcp__hearthbot__update_message|mcp__hearthbot__ask_decision",
202
192
  "hooks": [
@@ -328,16 +318,6 @@
328
318
  "timeout": 15
329
319
  }
330
320
  ]
331
- },
332
- {
333
- "matcher": "Bash|mcp__github__add_issue_comment|mcp__github__update_issue_comment|mcp__github__add_reply_to_pull_request_comment|mcp__github__add_comment_to_pending_review|mcp__github__pull_request_review_write",
334
- "hooks": [
335
- {
336
- "type": "command",
337
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/blocking/reply_length_gate.py",
338
- "timeout": 10
339
- }
340
- ]
341
321
  }
342
322
  ],
343
323
  "UserPromptSubmit": [
@@ -354,11 +334,6 @@
354
334
  "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/lifecycle/nested_project_hooks.py",
355
335
  "timeout": 120
356
336
  },
357
- {
358
- "type": "command",
359
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/blocking/chat_reply_gate.py",
360
- "timeout": 10
361
- },
362
337
  {
363
338
  "type": "command",
364
339
  "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/session/tracking_nudge.py",
@@ -506,11 +481,6 @@
506
481
  "type": "command",
507
482
  "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/session/session_edit_tracker_cleanup.py",
508
483
  "timeout": 3
509
- },
510
- {
511
- "type": "command",
512
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/blocking/chat_reply_gate.py",
513
- "timeout": 3
514
484
  }
515
485
  ]
516
486
  }
@@ -590,17 +560,6 @@
590
560
  }
591
561
  ]
592
562
  }
593
- ],
594
- "MessageDisplay": [
595
- {
596
- "hooks": [
597
- {
598
- "type": "command",
599
- "command": "python3 ${CLAUDE_PLUGIN_ROOT}/hooks/blocking/chat_reply_gate.py",
600
- "timeout": 100
601
- }
602
- ]
603
- }
604
563
  ]
605
564
  }
606
565
  }
@@ -40,3 +40,5 @@ SILENCE_NOTE_WITHOUT_EXCEPTION = (
40
40
  " End this turn with no text at all unless that message names an exception that applies now."
41
41
  ' Tool calls are fine, and a status line such as "No change." counts as text.'
42
42
  )
43
+
44
+ ADDITIONAL_CONTEXT_KEY = "additionalContext"
@@ -2,11 +2,6 @@
2
2
 
3
3
  import re
4
4
 
5
- from hooks_constants.reply_length_gate_constants import (
6
- MAXIMUM_SENTENCE_COUNT,
7
- MAXIMUM_WORDS_PER_SENTENCE,
8
- )
9
-
10
5
  RESOLVE_TOOL_NAME_PATTERN = re.compile(r"^mcp__.+__resolve_review_thread$")
11
6
  REVIEW_WRITE_TOOL_NAME_PATTERN = re.compile(r"^mcp__.+__pull_request_review_write$")
12
7
  REVIEW_WRITE_METHOD_KEY = "method"
@@ -31,7 +26,4 @@ MISSING_REPLY_REASON = (
31
26
  " or with gh api graphql addPullRequestReviewThreadReply and the thread's PRRT_ id, confirm its"
32
27
  " result came back without an error, then resolve the thread by its PRRT_ id or by the comment id the reply answered. A comment id"
33
28
  " ties to a thread only through a pull_request_read get_review_comments result in this session."
34
- " A reply that a hook refused did not post; shorten it to"
35
- f" at most {MAXIMUM_SENTENCE_COUNT} sentences of at most {MAXIMUM_WORDS_PER_SENTENCE} words each,"
36
- " footer included, and send it again."
37
29
  )
@@ -35,6 +35,7 @@ if blocking_directory not in sys.path:
35
35
  sys.path.insert(0, blocking_directory)
36
36
 
37
37
  from hooks_constants.background_silence_prompt_constants import (
38
+ ADDITIONAL_CONTEXT_KEY,
38
39
  ALL_LIFT_PATTERNS,
39
40
  ALL_SET_PATTERNS,
40
41
  BACKGROUND_EVENT_PATTERN,
@@ -63,7 +64,6 @@ from hooks_constants.open_tasks_stop_gate_constants import (
63
64
  TRANSCRIPT_PATH_KEY,
64
65
  )
65
66
  from hooks_constants.pre_tool_use_stdin import read_hook_input_dictionary_from_stdin
66
- from hooks_constants.reply_length_gate_constants import ADDITIONAL_CONTEXT_KEY
67
67
  from hooks_constants.spawn_readiness_hook_constants import (
68
68
  ALL_HARNESS_ENVELOPE_MARKERS,
69
69
  HUMAN_SENDER_MARKER,
@@ -24,7 +24,6 @@ CONTEXT_OUTPUT_PATTERN = re.compile(r"additionalContext|ADDITIONAL_CONTEXT|addit
24
24
  UNMEASURED_REASON_BY_SCRIPT = {
25
25
  "blocking/pre_tool_use_dispatcher.py": "relays its hosted hooks' output",
26
26
  "blocking/bash_pre_tool_use_dispatcher.py": "relays its hosted hooks' output",
27
- "blocking/reply_length_gate.py": "advises only on a widget while visual reply mode is on",
28
27
  "lifecycle/nested_project_hooks.py": "relays a nested project's own hooks",
29
28
  "routing/thread_spawn_pace_hook.py": "quotes a usage reading capped by its own constant",
30
29
  "session/issue_tracker_session_starter.py": "emits only for a repository the user's "
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-env",
3
- "version": "8.116.0",
3
+ "version": "8.116.1",
4
4
  "description": "Claude Code development standards — rules, hooks, agents, commands, and skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,6 @@ from dev_env_scripts_constants.private_term_constants import (
18
18
  PRIVATE_TERM_MESSAGE_TEMPLATE,
19
19
  )
20
20
  from durable_post_lint_config.config.constants import (
21
- ACTION_GITHUB_MCP_COMMENT,
22
21
  ACTION_PR_CREATE,
23
22
  ACTION_PR_EDIT,
24
23
  ALL_BARE_VOLATILE_PATH_MARKERS,
@@ -33,7 +32,6 @@ from durable_post_lint_config.config.constants import (
33
32
  BODY_MUST_NOT_BE_EMPTY_MESSAGE,
34
33
  BODY_REQUIRED_MESSAGE,
35
34
  CLEAN_EXIT_CODE,
36
- COMMENT_LENGTH_FINDING_CODE,
37
35
  CONTENT_FINDING_EXIT_CODE,
38
36
  CONVENTIONAL_TITLE_PATTERN,
39
37
  EDIT_INPUT_REQUIRED_MESSAGE,
@@ -73,7 +71,6 @@ from blocking.pull_request_proof import (
73
71
  missing_proof_reason,
74
72
  what_this_does_section,
75
73
  )
76
- from blocking.reply_length_gate import comment_length_violation
77
74
 
78
75
 
79
76
  class DurablePostUsageError(ValueError):
@@ -211,13 +208,6 @@ def _pull_request_proof_findings(
211
208
  ]
212
209
 
213
210
 
214
- def _comment_length_findings(body_text: str) -> list[DurablePostFinding]:
215
- violation = comment_length_violation(body_text)
216
- if violation is None:
217
- return []
218
- return [DurablePostFinding(code=COMMENT_LENGTH_FINDING_CODE, message=violation)]
219
-
220
-
221
211
  def _contrast_framing_findings(text: str) -> list[DurablePostFinding]:
222
212
  all_lines = text.splitlines()
223
213
  return [
@@ -307,8 +297,6 @@ def _body_findings(
307
297
  if action in (ACTION_PR_CREATE, ACTION_PR_EDIT):
308
298
  all_findings.extend(_description_flowchart_findings(body_text)
309
299
  )
310
- if action == ACTION_GITHUB_MCP_COMMENT:
311
- all_findings.extend(_comment_length_findings(body_text))
312
300
  all_findings.extend(_contrast_framing_findings(body_text))
313
301
  if find_volatile_path_marker(body_text) is not None:
314
302
  all_findings.append(
@@ -109,5 +109,4 @@ REWRITTEN_RELEASE_BODY_MESSAGE = (
109
109
  )
110
110
  REPOSITORY_OWNER_SEPARATOR = "/"
111
111
  PROOF_GATE_CREATE_TOOL_NAME = "mcp__github__create_pull_request"
112
- PULL_REQUEST_PROOF_FINDING_CODE = "pull-request-proof-section"
113
- COMMENT_LENGTH_FINDING_CODE = "github-comment-length"
112
+ PULL_REQUEST_PROOF_FINDING_CODE = "pull-request-proof-section"
@@ -130,8 +130,6 @@ def _names_exempt_registration_path(registered_string: str) -> bool:
130
130
  hooks/blocking/pr_lifecycle_skill_gate.py -> exempt
131
131
  hooks/blocking/verify_before_commit_gate.py -> exempt
132
132
  hooks/blocking/step_note_gate.py -> exempt
133
- hooks/blocking/reply_length_gate.py -> exempt
134
- hooks/blocking/chat_reply_gate.py -> exempt
135
133
  hooks/blocking/edit_marker_gate.py -> exempt
136
134
  hooks/blocking/issue_close_handoff_gate.py -> exempt
137
135
  hooks/blocking/verify_before_acting.py -> exempt
@@ -67,8 +67,6 @@ ALL_ACTION_BOUNDARY_EXEMPT_REGISTRATION_PATHS = (
67
67
  "blocking/verify_before_commit_gate.py",
68
68
  "blocking/merge_review_gate.py",
69
69
  "blocking/step_note_gate.py",
70
- "blocking/reply_length_gate.py",
71
- "blocking/chat_reply_gate.py",
72
70
  "blocking/edit_marker_gate.py",
73
71
  "blocking/issue_close_handoff_gate.py",
74
72
  "blocking/verify_before_acting.py",