Help us improve
Share bugs, ideas, or general feedback.
From ralphex
Smart-merges updated ralphex defaults into customized prompt/agent configs, preserving user edits. Run after ralphex updates to incorporate new defaults without losing customizations.
npx claudepluginhub umputun/ralphex --plugin ralphexHow this skill is triggered — by the user, by Claude, or both
Slash command
/ralphex:ralphex-updateThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**SCOPE**: Compare current embedded defaults with user's installed config, and intelligently merge updates into customized files. Preserves user intent while incorporating structural changes.
Launches ralphex autonomous plan execution with step-by-step mode selection, plan file picking, and iteration config. Use when you need to run multi-step plans with review loops.
Documents Ralph plugin arguments (--quick, --commit), execution modes (normal/quick), state management (.ralph-state.json), commit behavior, task loops, and error handling.
Scaffolds or updates repo-local Ralph autonomous harness in scripts/ralph/ with scripts, templates, and flowctl. Detects review backends like rp-cli or codex. Invoke via /flow-next:ralph-init.
Share bugs, ideas, or general feedback.
SCOPE: Compare current embedded defaults with user's installed config, and intelligently merge updates into customized files. Preserves user intent while incorporating structural changes.
which ralphex
If not found, guide installation:
brew install umputun/apps/ralphexgo install github.com/umputun/ralphex/cmd/ralphex@latestDo not proceed until which ralphex succeeds.
Create temp directory and dump embedded defaults:
DUMP_DIR=$(mktemp -d /tmp/ralphex-defaults-XXXX)
ralphex --dump-defaults "$DUMP_DIR"
echo "$DUMP_DIR"
Save the dump directory path for later use.
Resolve the user's config directory:
# check environment variable first
echo "${RALPHEX_CONFIG_DIR:-}"
If RALPHEX_CONFIG_DIR is empty, use default:
~/.config/ralphex/Verify the directory exists:
ls -la <config-dir>/
If it doesn't exist, inform user that ralphex hasn't been configured yet and there's nothing to update.
ralphex installs config, prompt, and agent files with all content commented out (every line prefixed with # ). At runtime, stripComments() removes these lines, finds nothing, and falls back to embedded defaults compiled into the binary. These all-commented files are functionally identical to missing files — they are do-nothing placeholders.
When ralphex is updated, new embedded defaults take effect automatically for every file that hasn't been customized. No file changes are needed.
A file is customized only if it contains at least one uncommented, non-empty line that was intentionally modified by the user. The --dump-defaults command produces the raw (uncommented) embedded content for comparison.
For each file in the defaults dump (config, prompts/*.txt, agents/*.txt), compare with the corresponding file in the user's config directory.
Algorithm to detect customized files: a file is customized if it contains at least one non-empty line that does NOT start with #. Files that are missing, empty, or contain only comment lines (# ...) and whitespace are do-nothing defaults.
Classify each file into one of these categories:
#)Note: files that exist only in the dump directory (no corresponding user file) are also do-nothing — do NOT offer to install them. Files that exist only in the user's config directory (no corresponding dump file) are user-created custom files — ignore them entirely.
How to compare: strip all #-prefixed lines from BOTH the user's file and the dump file, then compare the remaining non-comment content. This handles the config file where the dump has descriptive comment lines mixed with value lines — only the actual values matter for comparison.
#-prefixed lines from both sides)Show the user a summary with two groups:
ralphex config update summary:
No changes needed (N files):
prompts/task.txt, prompts/review_first.txt, agents/quality.txt, prompts/codex.txt, ...
Smart merge needed (N files):
prompts/review_second.txt, agents/implementation.txt
If nothing needs merging, report "all config files are up to date — no changes needed" and skip to cleanup.
Otherwise, use AskUserQuestion to confirm proceeding:
If user selects "Skip, just show details": for each file needing smart merge, show the diff between the user's file and the new default, then skip to Step 6 (Cleanup) without modifying any files.
For each customized file that needs merging:
Read both versions - the new default and the user's current version
Analyze the differences semantically:
Propose a merged version that:
{{VARIABLE}} usage)Show the user:
Use AskUserQuestion for each file:
Apply the user's choice
Remove the temp directory:
rm -rf <dump-dir>
Report final summary:
Update complete:
Skipped: N files (no changes needed)
Smart-merged: N files (M accepted, K kept)
When proposing smart merges, follow these rules:
{{VARIABLE}} references were added to defaults, include them in the merge