Autonomous AI development loop for Claude Code with intelligent exit detection
This report summarizes scanner evidence for frankbria/ralph-claude-code, a Shell project with 9,677 GitHub stars. SynthScan examined 31,414 lines of code across 87 source files, recording 231 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 14.4 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 139 finding(s).
Are imports declared and package/API names verified? 1 finding(s).
Are wrappers, guards, and repeated structures necessary? 91 finding(s).
Which changes need focused human review? 231 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 231 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | ralph_enable.sh | 36 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 38 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 53 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 55 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 113 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 115 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 185 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 187 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 266 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 268 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 349 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 351 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 403 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 405 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 477 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 479 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 552 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable.sh | 554 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_import.sh | 65 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_import.sh | 67 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_import.sh | 248 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_import.sh | 250 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_loop.sh | 1115 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_loop.sh | 1117 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_loop.sh | 1434 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_loop.sh | 1436 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 44 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 46 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 63 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 65 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 126 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 128 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 223 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 225 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 278 | # ============================================================================= | COMMENT |
| MEDIUM | ralph_enable_ci.sh | 280 | # ============================================================================= | COMMENT |
| MEDIUM | tests/helpers/fixtures.bash | 389 | # ============================================================================= | COMMENT |
| MEDIUM | tests/helpers/fixtures.bash | 391 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 6 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 8 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 141 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 143 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 291 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 293 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 400 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 402 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 514 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 516 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 595 | # ============================================================================= | COMMENT |
| MEDIUM | lib/task_sources.sh | 597 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 14 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 16 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 161 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 163 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 369 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 371 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 462 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 464 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 495 | # ============================================================================= | COMMENT |
| MEDIUM | lib/wizard_utils.sh | 497 | # ============================================================================= | COMMENT |
| 20 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ralph_queue.sh | 1 | #!/bin/bash | COMMENT |
| LOW | migrate_to_ralph_folder.sh | 1 | #!/bin/bash | COMMENT |
| LOW | ralph_enable.sh | 1 | #!/bin/bash | COMMENT |
| LOW | ralph_import.sh | 61 | COMMENT | |
| LOW | ralph_import.sh | 101 | if command -v jq &>/dev/null && jq empty "$output_file" 2>/dev/null; then | COMMENT |
| LOW | ralph_import.sh | 121 | # PARSED_HAS_ERRORS - "true"/"false" indicating errors | COMMENT |
| LOW | ralph_import.sh | 181 | } | COMMENT |
| LOW | ralph_import.sh | 281 | } | COMMENT |
| LOW | ralph_import.sh | 561 | COMMENT | |
| LOW | ralph_import.sh | 661 | if [[ "$match_count" -eq 0 ]]; then | COMMENT |
| LOW | ralph_import.sh | 841 | # $1 (json_file) - File containing issue JSON from fetch_github_issue | COMMENT |
| LOW | ralph_import.sh | 1021 | COMMENT | |
| LOW | ralph_loop.sh | 1 | #!/bin/bash | COMMENT |
| LOW | ralph_loop.sh | 281 | # | COMMENT |
| LOW | ralph_loop.sh | 1341 | local age_hours=$((age_seconds / 3600)) | COMMENT |
| LOW | ralph_loop.sh | 1841 | # wrap_claude_command_for_sandbox - Route CLAUDE_CMD_ARGS through the sandbox (Issues #74/#75) | COMMENT |
| LOW | ralph_loop.sh | 1961 | fi | COMMENT |
| LOW | ralph_enable_ci.sh | 1 | #!/bin/bash | COMMENT |
| LOW | tools/inspect-allowed-tools.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | tests/test_error_detection.sh | 1 | #!/bin/bash | COMMENT |
| LOW | tests/test_stuck_loop_detection.sh | 1 | #!/bin/bash | COMMENT |
| LOW | tests/e2e/helpers/e2e_helper.bash | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | .github/workflows/docker-publish.yml | 1 | # Publish the default ralph-sandbox image to GHCR (Issue #298) | COMMENT |
| LOW | .github/workflows/triage-incoming-issues.lock.yml | 1 | # gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"a52f9dd3f548b72d0f16ca928d98958867378af0afe8f9b540d1ea6725e | COMMENT |
| LOW | .github/workflows/triage-incoming-issues.lock.yml | 21 | # Not all edits will cause changes to this file. | COMMENT |
| LOW | .github/workflows/triage-incoming-issues.lock.yml | 781 | # - Edit | COMMENT |
| LOW | .github/workflows/triage-incoming-issues.lock.yml | 801 | # - Write(/tmp/gh-aw/agent/*) | COMMENT |
| LOW | .github/workflows/triage-incoming-issues.lock.yml | 821 | # - mcp__github__get_release_by_tag | COMMENT |
| LOW | .github/workflows/triage-incoming-issues.lock.yml | 841 | # - mcp__github__list_starred_repositories | COMMENT |
| LOW | .github/workflows/triage-incoming-issues.lock.yml | 1321 | run: npm install -g @anthropic-ai/claude-code@2.1.156 | COMMENT |
| LOW | lib/task_sources.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | lib/task_sources.sh | 21 | COMMENT | |
| LOW | lib/task_sources.sh | 141 | # ============================================================================= | COMMENT |
| LOW | lib/task_sources.sh | 161 | COMMENT | |
| LOW | lib/task_sources.sh | 181 | # 0 - Success | COMMENT |
| LOW | lib/task_sources.sh | 281 | # Newline-separated list of label names | COMMENT |
| LOW | lib/task_sources.sh | 361 | } | COMMENT |
| LOW | lib/task_sources.sh | 401 | # TASK NORMALIZATION | COMMENT |
| LOW | lib/task_sources.sh | 521 | # $1 (sources) - Space-separated list of sources: beads, github, prd | COMMENT |
| LOW | lib/issue_analyzer.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | lib/issue_analyzer.sh | 21 | # +15 Implementation guidance keywords (implement/architecture/steps/...) | COMMENT |
| LOW | lib/queue_manager.sh | 1 | #!/bin/bash | COMMENT |
| LOW | lib/github_lifecycle.sh | 1 | #!/bin/bash | COMMENT |
| LOW | lib/wizard_utils.sh | 21 | # $1 (prompt) - The question to ask | COMMENT |
| LOW | lib/wizard_utils.sh | 61 | echo -e "${WIZARD_YELLOW}Please answer yes (y) or no (n)${WIZARD_NC}" >&2 | COMMENT |
| LOW | lib/wizard_utils.sh | 101 | # | COMMENT |
| LOW | lib/wizard_utils.sh | 161 | # ============================================================================= | COMMENT |
| LOW | lib/wizard_utils.sh | 221 | # | COMMENT |
| LOW | lib/sync.sh | 1 | #!/bin/bash | COMMENT |
| LOW | lib/sync.sh | 21 | # | COMMENT |
| LOW | lib/response_analyzer.sh | 81 | # `Bash(mvn *)`. So `mvn clean compile 2>&1 | tail -40` is denied even when | COMMENT |
| LOW | lib/response_analyzer.sh | 101 | COMMENT | |
| LOW | lib/response_analyzer.sh | 141 | return 0 | COMMENT |
| LOW | lib/response_analyzer.sh | 301 | # ---RALPH_STATUS--- | COMMENT |
| LOW | lib/response_analyzer.sh | 741 | fi | COMMENT |
| LOW | lib/response_analyzer.sh | 1121 | # ============================================================================= | COMMENT |
| LOW | lib/sandbox_docker.sh | 1 | #!/bin/bash | COMMENT |
| LOW | lib/sandbox_docker.sh | 21 | # logged). Without an API key, the host's ~/.claude/.credentials.json is | COMMENT |
| LOW | lib/sandbox_docker.sh | 201 | rm -f "$tmp" | COMMENT |
| LOW | lib/enable_core.sh | 61 | # ============================================================================= | COMMENT |
| 12 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | migrate_to_ralph_folder.sh | 41 | # Check if project is already migrated | COMMENT |
| LOW⚡ | migrate_to_ralph_folder.sh | 45 | # Check if .ralph/ directory exists with key files | COMMENT |
| LOW⚡ | migrate_to_ralph_folder.sh | 55 | # Check if project needs migration (has old-style structure) | COMMENT |
| LOW | migrate_to_ralph_folder.sh | 284 | # Check if already migrated | COMMENT |
| LOW | migrate_to_ralph_folder.sh | 290 | # Check if needs migration | COMMENT |
| LOW | uninstall.sh | 38 | # Check if Ralph is installed by verifying commands or home directory exist | COMMENT |
| LOW | ralph_import.sh | 89 | # Check if file starts with { or [ (JSON indicators) | COMMENT |
| LOW | ralph_import.sh | 138 | # Check if jq is available | COMMENT |
| LOW | ralph_loop.sh | 505 | # Check if tmux is available | COMMENT |
| LOW | ralph_loop.sh | 892 | # Check if we can make another call | COMMENT |
| LOW | ralph_loop.sh | 1000 | # Check if we should gracefully exit | COMMENT |
| LOW | ralph_loop.sh | 1376 | # Check if session has expired | COMMENT |
| LOW | ralph_loop.sh | 1651 | # Check if prompt file exists | COMMENT |
| LOW | ralph_loop.sh | 2360 | # Check if commits were made (HEAD changed) | COMMENT |
| LOW | ralph_loop.sh | 2722 | # Check if this is a Ralph project directory | COMMENT |
| LOW | ralph_loop.sh | 2727 | # Check if this looks like a partial Ralph project | COMMENT |
| LOW | create_files.sh | 114 | # Check if we can make another call | COMMENT |
| LOW | create_files.sh | 170 | # Check if we should gracefully exit | COMMENT |
| LOW | create_files.sh | 267 | # Check if prompt file exists | COMMENT |
| LOW | lib/circuit_breaker.sh | 38 | # Check if state file exists and is valid JSON | COMMENT |
| LOW | lib/circuit_breaker.sh | 140 | # Check if circuit breaker allows execution | COMMENT |
| LOW | lib/circuit_breaker.sh | 196 | # Check if Claude reported files modified (may differ from git diff if already committed) | COMMENT |
| LOW | lib/circuit_breaker.sh | 217 | # Check if Claude is asking questions (Issue #190 Bug 2) | COMMENT |
| LOW | lib/circuit_breaker.sh | 449 | # Check if loop should halt (used in main loop) | COMMENT |
| LOW | lib/task_sources.sh | 22 | # Check if bd command exists | COMMENT |
| LOW | lib/task_sources.sh | 49 | # Check if beads is available | COMMENT |
| LOW | lib/task_sources.sh | 157 | # Check if authenticated | COMMENT |
| LOW | lib/task_sources.sh | 162 | # Check if in a git repo with GitHub remote | COMMENT |
| LOW | lib/task_sources.sh | 197 | # Check if GitHub is available | COMMENT |
| LOW | lib/task_sources.sh | 388 | # Check if ralph-import is available for full conversion | COMMENT |
| LOW | lib/response_analyzer.sh | 189 | # Check if file starts with { or [ (JSON indicators) | COMMENT |
| LOW | lib/response_analyzer.sh | 244 | # Check if JSON is an array (Claude CLI array format) | COMMENT |
| LOW | lib/response_analyzer.sh | 660 | # Check if commits were made (HEAD changed). | COMMENT |
| LOW | lib/response_analyzer.sh | 874 | # Check if commits were made (HEAD changed). | COMMENT |
| LOW | lib/response_analyzer.sh | 1095 | # Check if same errors appear in all recent outputs | COMMENT |
| LOW | lib/response_analyzer.sh | 1210 | # Check if the stored session should be resumed | COMMENT |
| LOW | lib/response_analyzer.sh | 1256 | # Check if session is still valid (less than expiration time) | COMMENT |
| LOW | lib/enable_core.sh | 403 | # Check if in git repo | COMMENT |
| LOW | lib/enable_core.sh | 410 | # Check if GitHub | COMMENT |
| LOW | lib/timeout_utils.sh | 52 | # Check if a timeout command is available on this system | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | CLAUDE.md | 44 | - **github_lifecycle.sh** — GitHub issue lifecycle management backing `ralph --github-issue` (Issue #73). `parse_issue_r | CODE |
| MEDIUM⚡ | CLAUDE.md | 45 | - **sandbox_docker.sh** — Docker sandbox execution backing `ralph --sandbox docker` (Issue #74). Containerizes only the | CODE |
| MEDIUM⚡ | CLAUDE.md | 46 | - **sandbox_e2b.sh** + **e2b_helper.py** — E2B cloud sandbox execution backing `ralph --sandbox e2b` (Issue #75). Same h | CODE |
| MEDIUM | lib/github_lifecycle.sh | 16 | # permission) is logged and returns non-zero, but the orchestration helpers | COMMENT |
| MEDIUM | lib/github_lifecycle.sh | 343 | # --- orchestration (always returns 0: graceful degradation) ----------------- | COMMENT |
| MEDIUM | lib/sandbox_docker.sh | 5 | # on the host. Ralph's orchestration (loop control, rate limiting, circuit | COMMENT |
| MEDIUM | lib/sandbox_e2b.sh | 5 | # the host. Ralph's orchestration (loop control, rate limiting, circuit | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | install.sh | 138 | # Create the main ralph command | COMMENT |
| MEDIUM | ralph_loop.sh | 141 | CREATE_PR="${CREATE_PR:-false}" # Create a PR on completion | CODE |
| MEDIUM | ralph_loop.sh | 143 | DRAFT_PR="${DRAFT_PR:-false}" # Create the PR as a draft | CODE |
| MEDIUM | create_files.sh | 13 | # Create main scripts | COMMENT |
| MEDIUM | tests/e2e/helpers/e2e_helper.bash | 36 | # Create a complete temp Ralph project + mock claude CLI, and cd into it. | COMMENT |
| MEDIUM | lib/queue_manager.sh | 47 | # Create the queue file if absent (idempotent); recreate it if corrupt. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lib/e2b_helper.py | 63 | except Exception as exc: | CODE |
| LOW | lib/e2b_helper.py | 81 | except Exception as exc: | CODE |
| LOW | lib/e2b_helper.py | 97 | except Exception as exc: | CODE |
| LOW | lib/e2b_helper.py | 114 | except Exception as exc: | CODE |
| LOW | lib/e2b_helper.py | 154 | except Exception as exc: | CODE |
| LOW | lib/e2b_helper.py | 179 | except Exception as exc: | CODE |
| LOW | lib/e2b_helper.py | 212 | except Exception as exc: | CODE |
| LOW | lib/e2b_helper.py | 229 | except Exception as exc: | CODE |
| LOW | lib/e2b_helper.py | 245 | except Exception as exc: | CODE |
| LOW | lib/e2b_helper.py | 255 | except Exception as exc: | CODE |
| MEDIUM | lib/e2b_helper.py | 60 | def _connect(sandbox_id): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/e2e/helpers/e2e_helper.bash | 4 | # Unlike unit/integration tests (which source functions), this harness runs | COMMENT |
| MEDIUM | tests/e2e/helpers/e2e_helper.bash | 25 | # (Linux: `timeout`; macOS: `gtimeout` from Homebrew coreutils). The harness | COMMENT |
| MEDIUM | .github/workflows/test.yml | 127 | # Run all unit tests under kcov for comprehensive coverage | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/user-guide/01-quick-start.md | 11 | ## Step 1: Create Your Project | COMMENT |
| LOW | docs/user-guide/01-quick-start.md | 22 | ## Step 2: Enable Ralph | COMMENT |
| LOW | docs/user-guide/01-quick-start.md | 65 | ## Step 3: Customize Your Requirements | COMMENT |
| LOW | docs/user-guide/01-quick-start.md | 89 | ## Step 4: Define Your Tasks | COMMENT |
| LOW | docs/user-guide/01-quick-start.md | 113 | ## Step 5: Start Ralph | COMMENT |
| LOW | docs/user-guide/01-quick-start.md | 139 | ## Step 6: Review the Results | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 493 | GitHub issues vary widely in detail. During import, Ralph scores the issue 0–100 for implementation readiness (acceptanc | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lib/e2b_helper.py | 226 | sandbox.commands.run("touch %s && rm -f %s %s %s" % ( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ralph_enable.sh | 6 | # Usage: | COMMENT |
| LOW | ralph_enable_ci.sh | 6 | # Usage: | COMMENT |
| LOW | tools/inspect-allowed-tools.sh | 11 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | install.sh | 355 | echo "⚠️ Don't forget to add $INSTALL_DIR to your PATH (see above)" | CODE |