/marathon-ralph:update-statefrom marathon-ralph
Updates marathon-ralph state file via deterministic jq commands instead of manual JSON edits. Handles issue completion, phase changes, and marathon status.
Ships in marathon-ralph. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill provides deterministic state file updates using jq. Always use this skill instead of manually editing .claude/marathon-ralph.json.
Marks an issue as done: increments completed count, decrements todo, clears current_issue.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" complete-issue
Sets the current issue being worked on.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" start-issue "<issue_id>" "<issue_title>"
Updates the marathon phase (setup, init, coding, complete).
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" set-phase "<phase>"
Marks the entire marathon as complete (sets active=false, phase=complete).
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" mark-complete
Manually update the stats object.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" update-stats <completed> <in_progress> <todo>
Clears the session_id (used when --force takeover is needed).
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" clear-session
Resets the stop_hook_iterations counter to 0.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" reset-iterations
These commands support the circuit breaker system that prevents infinite loops.
Sets up the failure tracking structure with default limits.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" init-failure-tracking
Increments the attempt counter for a specific phase of an issue.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" increment-phase-attempt "<issue_id>" "<phase>"
Example:
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" increment-phase-attempt "GRU-220" "qa"
Returns the current attempt count for a phase.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" get-phase-attempts "<issue_id>" "<phase>"
Returns a number (e.g., "3").
Records an error with signature detection for repeated error tracking.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" record-error "<issue_id>" "<phase>" "[error_message]"
The script normalizes the error message and creates a signature to detect if the same error is repeating.
Marks a phase as skipped with a reason.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" skip-phase "<issue_id>" "<phase>" "[reason]"
Example:
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" skip-phase "GRU-220" "qa" "oRPC detected - REST URL mocking incompatible"
Skips an entire issue with a reason.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" skip-issue "<issue_id>" "[reason]"
Resets all failure tracking for a specific issue.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" reset-issue-tracking "<issue_id>"
Resets global failure counters after successful issue completion.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" reset-on-success
This resets:
Returns the list of skipped phases for an issue.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" get-skipped-phases "<issue_id>"
Returns a JSON array like:
[{"phase": "qa", "reason": "oRPC detected", "timestamp": "2024-01-15T10:30:00.000Z"}]
Checks if any failure limits have been exceeded.
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" check-limits "<issue_id>" "[phase]"
Returns JSON with limit status:
{
"issue_id": "GRU-220",
"should_skip_issue": false,
"should_abort": false,
"same_error_repeating": false,
"should_skip_phase": false,
"phase_attempts": 2,
"max_phase_attempts": 5,
"issue_attempts": 3,
"max_issue_attempts": 5,
"consecutive_failures": 1,
"repeated_errors": 1
}
| Limit | Default | Description |
|---|---|---|
| max_phase_attempts.verify | 3 | Max attempts for verify phase |
| max_phase_attempts.plan | 3 | Max attempts for plan phase |
| max_phase_attempts.code | 3 | Max attempts for code phase |
| max_phase_attempts.test | 5 | Max attempts for test phase |
| max_phase_attempts.qa | 5 | Max attempts for QA phase |
| max_issue_attempts | 5 | Max total attempts per issue |
| max_consecutive_failures | 5 | Max failures before aborting marathon |
| max_repeated_errors | 3 | Max same error before skipping |
| max_stop_hook_iterations | 25 | Max stop hook cycles |
After completing the verify-plan-code-test-qa cycle for an issue:
# Mark the issue complete in state file
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" complete-issue
When starting work on a new issue:
# Set current issue
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" start-issue "GRU-220" "Step 5: Toggle Completion"
When all issues are done:
# Mark marathon complete
bash "${CLAUDE_PLUGIN_ROOT}/skills/update-state/scripts/update-state.sh" mark-complete
The script uses ${CLAUDE_PROJECT_DIR:-.}/.claude/marathon-ralph.json
0: Success1: Invalid arguments or missing state file2: jq command failedWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub gruckion/marathon-ralph --plugin marathon-ralph8 skills in this plugin
/marathon-ralphAutonomous long-running development from specifications. Use when user wants to build an application from a spec file, run continuous development, or automate feature implementation. Triggers on phrases like "marathon this", "build from spec", "autonomous development", "keep coding until done"./project-detectionDetects project type, package manager, and monorepo structure. Returns correct commands for test/build/lint/dev. Run at project initialization and cache results in state. Use before running any build/test commands./setup-playwrightConfigure Playwright for E2E testing. Use when setting up end-to-end tests, when no E2E framework is detected, or when the user asks to configure browser testing./setup-vitestConfigure Vitest for unit and integration testing. Use when setting up a test framework, when no test runner is detected, or when the user asks to configure testing./sqliteSQLite Skill for better-t-stackSQLite database implementation using LibSQL client and Drizzle ORM. This skill covers local development, Turso cloud, and Cloudflare D1 deployments./visual-verificationVisually verify implemented features work correctly before marking complete. Use when testing UI changes, verifying web features, or checking user flows work in the browser.