claude-dev-env 8.32.2 → 8.33.0
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.
- package/hooks/advisory/pr_done_reminder.py +16 -75
- package/hooks/advisory/test_pr_done_reminder.py +19 -0
- package/hooks/blocking/test_verify_before_acting.py +655 -0
- package/hooks/blocking/verify_before_acting.py +323 -0
- package/hooks/hooks.json +10 -0
- package/hooks/hooks_constants/piped_pytest_blocker_constants.py +78 -6
- package/hooks/hooks_constants/pr_done_reminder_constants.py +0 -8
- package/hooks/hooks_constants/pytest_invocation.py +60 -22
- package/hooks/hooks_constants/shell_command_mutation.py +202 -0
- package/hooks/hooks_constants/shell_command_segments.py +39 -0
- package/hooks/hooks_constants/shell_command_wrappers.py +68 -0
- package/hooks/hooks_constants/test_pr_done_reminder_constants.py +0 -11
- package/hooks/hooks_constants/test_pytest_invocation.py +6 -0
- package/hooks/hooks_constants/test_shell_command_mutation.py +37 -0
- package/hooks/hooks_constants/test_shell_command_segments.py +29 -0
- package/hooks/hooks_constants/test_shell_command_wrappers.py +61 -0
- package/hooks/hooks_constants/verify_before_acting_constants.py +170 -0
- package/package.json +1 -1
- package/scripts/policy_lint/adapter_configuration.py +4 -0
- package/scripts/policy_lint/config/constants.py +1 -0
- package/scripts/tests/test_adapter_configuration.py +8 -0
|
@@ -130,6 +130,7 @@ def _names_exempt_registration_path(registered_string: str) -> bool:
|
|
|
130
130
|
hooks/blocking/step_note_gate.py -> exempt
|
|
131
131
|
hooks/blocking/reply_length_gate.py -> exempt
|
|
132
132
|
hooks/blocking/edit_marker_gate.py -> exempt
|
|
133
|
+
hooks/blocking/verify_before_acting.py -> exempt
|
|
133
134
|
hooks/blocking/some_new_blocker.py -> flagged
|
|
134
135
|
|
|
135
136
|
The Bash PreToolUse dispatcher sits under ``blocking/`` for layout reasons
|
|
@@ -145,6 +146,9 @@ def _names_exempt_registration_path(registered_string: str) -> bool:
|
|
|
145
146
|
The edit marker gate keeps strikethrough and edit notes out of an edited
|
|
146
147
|
chat message. It decides the shape of prose and no code or safety policy.
|
|
147
148
|
|
|
149
|
+
The verify-before-acting hook runs after a mutating call has finished. It
|
|
150
|
+
asks the model to check a hedged claim, and the call it reads stays in place.
|
|
151
|
+
|
|
148
152
|
Args:
|
|
149
153
|
registered_string: One command, path, script, or entrypoint string.
|
|
150
154
|
"""
|
|
@@ -66,6 +66,7 @@ ALL_ACTION_BOUNDARY_EXEMPT_REGISTRATION_PATHS = (
|
|
|
66
66
|
"blocking/step_note_gate.py",
|
|
67
67
|
"blocking/reply_length_gate.py",
|
|
68
68
|
"blocking/edit_marker_gate.py",
|
|
69
|
+
"blocking/verify_before_acting.py",
|
|
69
70
|
)
|
|
70
71
|
ALL_TEST_DIRECTORY_NAMES = frozenset({"tests"})
|
|
71
72
|
ALL_TEST_FILE_PREFIXES = ("test_",)
|
|
@@ -74,6 +74,14 @@ def test_new_edit_marker_gate_registration_is_clean(tmp_path: Path) -> None:
|
|
|
74
74
|
assert adapters.hook_configuration_diagnostics(current_document, tmp_path) == ()
|
|
75
75
|
|
|
76
76
|
|
|
77
|
+
def test_new_verify_before_acting_registration_is_clean(tmp_path: Path) -> None:
|
|
78
|
+
current_document = _hook_document(
|
|
79
|
+
["hooks/blocking/verify_before_acting.py"],
|
|
80
|
+
'{"hooks": {}}',
|
|
81
|
+
)
|
|
82
|
+
assert adapters.hook_configuration_diagnostics(current_document, tmp_path) == ()
|
|
83
|
+
|
|
84
|
+
|
|
77
85
|
def test_new_blocker_in_staged_change_is_rejected(tmp_path: Path) -> None:
|
|
78
86
|
current_document = _hook_document(
|
|
79
87
|
["hooks/blocking/new.py"],
|