agentleFS
jazz1xjazz1x/galmuri/skills/ralphi/SKILL.md

ralphi

Skill3 starsChanged 7 months agoMITView on GitHub

Quality-loop discipline. Enforces a per-cycle token budget (setup → worker → verifier → commit → handoff phases) and runs a between-cycle philosophy auto-check via rg sweep over the diff. Halts on any introduced ROP / version-hardcoding violation. Etymology — "ralph" (from Ralph Wiggum, persistent retry) + "-i" (inspection). Triggers: "ralphi", "사이클 점검", "loop budget", "cycle gate", "philosophy sweep", "between-cycle check"

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If invoked bare (no cycle goal), ask: *"What is this cycle's narrow goal?

    line 43
  2. Very specific:

    If any phase exceeds its budget, write tmp/ralphi-state-<n>.json (cycle counter, goal, pending files, last verifier output) and pause.

    line 56
  3. Distinctive:

    Run between cycles, before advancing the counter.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

galmuri:ralphi — quality-loop discipline

Etymology — Ralph Wiggum (The Simpsons): persistent retry until it works. The -i suffix marks the inspection family.

The lean discipline-gate version. Bounds token spend per cycle and forbids philosophy regressions from sneaking in between cycles. If you need the full file-type-aware inspection skill (criteria-prd / criteria-skill / criteria-script / criteria-code + Necessity Check), use harnish:ralphi.

If invoked bare (no cycle goal), ask: "What is this cycle's narrow goal? e.g. migrate 3 callers off legacy adapter, remove 5 dead exports — name something verifiable in one cycle."

Cycle phases (budget pattern)

#PhaseBudgetWhat runs
1Setup≤ 500 tokensState the cycle goal in one sentence; list affected files via rg -l (not rg); confirm baseline branch + SHA. No file reads.
2Worker Dispatch≤ 4 parallel sub-agents, each ≤ 2000 tokens outEach worker emits {file, change, 3-line summary} — no full-file contents in worker output.
3Verifier≤ 1000 tokensOne verifier sub-agent re-reads ONLY changed lines via rg -A 3 -B 3 'pattern' <file>; never full files. Apply the Necessity Check (below) per diff hunk.
4Philosophy Sweep≤ 200 tokensrg sweep across the new diff for ROP / version-name violations (below). Halt if any hit.
5Commitn/aOne commit per cycle. Never batch multiple cycles into a single commit.
6Handoff≤ 300 tokens5-line summary: what changed, what verified, next cycle's narrow goal. Then advance counter or pause.

If any phase exceeds its budget, write tmp/ralphi-state-<n>.json (cycle counter, goal, pending files, last verifier output) and pause. Next invocation resumes from that state.

Necessity Check (Socratic 4 questions)

Apply to each diff hunk in the Verifier phase. Lifted from the original harnish:ralphi — the only inspection method that gates on purpose before correctness.

  1. Why is this here? — (purpose)
  2. What is it composed of? — (composition, scaffold for Q1/Q4)
  3. What is it really, stripped of framing? — (truth, scaffold for Q1/Q4)
  4. What happens if it's removed? — (necessity)

Verdict. Q1 and Q4 are the only gates. Q2 and Q3 are scaffolding to reach honest answers. Items failing Q1 or Q4 → [warning] unjustified existence (kept only by convention / inheritance / authority).

Fix discipline. Subtraction is the default. For [critical/warning], minimal additive patches are allowed (null check, missing import, type fix, error guard). Do NOT introduce new abstractions, modules, or features. If a fix would require new abstraction/module/feature → tag [unfixed] structural change required and hand off to the user.

Philosophy auto-check (between cycles)

Run between cycles, before advancing the counter. Halt the loop and surface to the user on any hit.

# ROP — defensive timeouts / silent catches added by this cycle
git diff HEAD~1 | rg -n 'withTimeout|timeout:\s*\d+|catch\s*\([^)]*\)\s*\{[^}]*//' \
  && echo "VIOLATION: possible ROP breach in last cycle"

# SSOT — hardcoded version-specific field names
git diff HEAD~1 | rg -n 'v\d+\.\w+|schema_v\d' \
  && echo "VIOLATION: possible hardcoded version"

Baseline note: HEAD~1 assumes the previous cycle already committed. If running against a feature branch with multiple cycles, prefer git diff $(git merge-base HEAD main)..HEAD for the full branch range.

Halt conditions

  • Philosophy sweep hit → halt, surface, wait for user judgement
  • Worker / verifier exceeds its phase budget → write state, pause
  • Necessity Check tags [unfixed] structural change required → halt the autonomous loop, hand off to user
  • Two consecutive cycles fail the verifier on the same hunk → halt (convergence failure)

What this skill does NOT do

  • ✗ Type detection + criteria-file matching (that's harnish:ralphi)
  • ✗ Run tests by itself — assumes the caller's loop drives the runner
  • ✗ Auto-fix philosophy violations — surfaces them for user judgement
  • ✗ Replace galmuri:polish (completion-claim gate) or galmuri:self-audit (single-session audit)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.