INNER CODE UNIT · Python
run_claude_fix
panther-labs/panther-analysis · .scripts/claude_review.py:232
def run_claude_fix(prompt):
"""Run Claude to apply fixes. Returns (output, success)."""
stdout, stderr, success = run_claude_with_spinner(
["claude", "-p", "-", "--allowedTools", "Edit,Read", "--permission-mode", "acceptEdits"],
prompt,
"Fixing...",
)
return stdout, success
def check_for_issues(review_output):
"""Determine if the review found issues."""
# Match only the verdict line: **Overall:** PASS or **Overall:** ISSUES FOUND
# Use MULTILINE so ^ anchors to line start, preventing body text matches
if re.search(
r"^\*{0,2}Overall:?\*{0,2}\s*\*{0,2}ISSUES FOUND\*{0,2}",
review_output,
re.IGNORECASE | re.MULTILINE,