claude-devkit-cli 1.2.2 → 1.2.4
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/package.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"use strict";
|
|
12
12
|
|
|
13
13
|
const fs = require("fs");
|
|
14
|
+
const path = require("path");
|
|
14
15
|
|
|
15
16
|
// Patterns that indicate lazy placeholder comments (case-insensitive)
|
|
16
17
|
const PLACEHOLDER_PATTERNS = [
|
|
@@ -63,6 +64,10 @@ function main() {
|
|
|
63
64
|
process.exit(0);
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
// Skip files outside the project directory (e.g. ~/.claude/plans/)
|
|
68
|
+
const filePath = payload.tool_input?.file_path;
|
|
69
|
+
if (filePath && !path.resolve(filePath).startsWith(process.cwd())) process.exit(0);
|
|
70
|
+
|
|
66
71
|
const oldStr = payload.tool_input?.old_string;
|
|
67
72
|
const newStr = payload.tool_input?.new_string;
|
|
68
73
|
|
|
@@ -59,6 +59,10 @@ function main() {
|
|
|
59
59
|
const filePath = payload.tool_input?.file_path;
|
|
60
60
|
if (!filePath) process.exit(0);
|
|
61
61
|
|
|
62
|
+
// Skip files outside the project directory (e.g. ~/.claude/plans/)
|
|
63
|
+
const projectDir = process.cwd();
|
|
64
|
+
if (!path.resolve(filePath).startsWith(projectDir)) process.exit(0);
|
|
65
|
+
|
|
62
66
|
// Skip excluded patterns
|
|
63
67
|
if (matchesExclude(filePath)) process.exit(0);
|
|
64
68
|
|
|
@@ -21,9 +21,6 @@ cat > /dev/null 2>&1 || true
|
|
|
21
21
|
cat <<'REVIEW_JSON'
|
|
22
22
|
{
|
|
23
23
|
"continue": true,
|
|
24
|
-
"
|
|
25
|
-
"hookEventName": "Stop",
|
|
26
|
-
"additionalContext": "Self-review before finishing:\n1. Did you leave any TODO/FIXME comments that should be resolved now?\n2. Did you create mock or fake implementations just to pass tests?\n3. Did you replace real code with placeholder comments like '// ... existing code'?\n4. Do all changed files compile and typecheck cleanly?\n5. Did you run the full test suite, not just the new tests?\n6. Are there any files you modified but forgot to include in the summary?"
|
|
27
|
-
}
|
|
24
|
+
"systemMessage": "Self-review before finishing:\n1. Did you leave any TODO/FIXME comments that should be resolved now?\n2. Did you create mock or fake implementations just to pass tests?\n3. Did you replace real code with placeholder comments like '// ... existing code'?\n4. Do all changed files compile and typecheck cleanly?\n5. Did you run the full test suite, not just the new tests?\n6. Are there any files you modified but forgot to include in the summary?"
|
|
28
25
|
}
|
|
29
26
|
REVIEW_JSON
|