Ralph Method + StacksFinder
Combine autonomous AI loops with deterministic tech decisions. Let Ralph handle iteration while StacksFinder ensures data-driven stack selection.
Key Insights
- Ralph: "Deterministically bad in an undeterministic world" — iterate until success
- StacksFinder: 100% deterministic scoring — same input = same output
- Synergy: Ralph handles automation, StacksFinder handles data-driven decisions
- Integration: Add
recommend_stackcalls to your PROMPT.md
Why This Combination Works #
Ralph's philosophy embraces iteration through non-deterministic LLM outputs. But tech stack decisions shouldn't be non-deterministic — you need reproducible, auditable choices.
LLM Tech Decisions
- Hallucinations — Confidently state outdated or incorrect info
- Opinion-based — "Use React" without data-driven analysis
- Non-reproducible — Same question → different answers
StacksFinder MCP
- Deterministic — Versioned lookup tables, not LLM inference
- Data-driven — 6-dimension scores based on real metrics
- Auditable — Same constraints = same recommendations
MCP Tools for Each Phase
list_technologies Planning Discover available options by categoryanalyze_tech Planning Deep-dive analysis with 6-dimension scorescompare_techs Solutioning Side-by-side comparison of 2-4 technologiesrecommend_stack Solutioning Full stack recommendation for project typecreate_blueprint Implementation Generate shareable documentation (Pro)The Ultrathink Flowchart #
"Ultrathink" is a prompt technique for deep reasoning. Here's how Ralph integrates with StacksFinder MCP for data-driven tech decisions within the autonomous loop.
PROMPT.md Feed to agentanalyze_tech compare_techs recommend_stackIntegration Guide #
Integrating StacksFinder into your Ralph workflow requires two things: installing the MCP server and updating your PROMPT.md.
Install StacksFinder MCP
Add to your Claude Code configuration:
{
"mcpServers": {
"stacksfinder": {
"command": "npx",
"args": ["-y", "@stacksfinder/mcp-server"],
"env": {
"STACKSFINDER_API_KEY": "your-api-key"
}
}
}
}Note: Free tier includes list_technologies, analyze_tech, compare_techs, and 1 recommend_stack per day.
Update PROMPT_build.md
Add StacksFinder instructions to your building prompt:
0a. Study `specs/*` with up to 500 parallel Sonnet subagents.
0b. Study @IMPLEMENTATION_PLAN.md.
0c. For reference, the application source code is in `src/*`.
1. Your task is to implement functionality per the specifications.
Follow @IMPLEMENTATION_PLAN.md and choose the most important item.
**TECH DECISIONS:** When selecting technologies, frameworks, or
libraries, use StacksFinder MCP tools. Ultrathink.
- Use `list_technologies` to discover options
- Use `analyze_tech` for deep-dive on specific tech
- Use `compare_techs` to compare 2-4 alternatives
- Use `recommend_stack` for full stack recommendations
Do NOT rely on training data for tech recommendations.
StacksFinder provides deterministic, versioned scores.
2. After implementing, run tests for that unit of code.
3. When you discover issues, update @IMPLEMENTATION_PLAN.md.
4. When tests pass, update plan, `git add -A`, `git commit`.
99999. Capture the why — tests and implementation importance.
999999. Single sources of truth, no migrations/adapters.Enhanced Loop Script (Optional)
A production-ready loop with iteration limits and git push:
#!/bin/bash
# Usage: ./loop.sh [plan|build] [max_iterations]
MODE=${1:-build}
MAX=${2:-20}
PROMPT_FILE="PROMPT_${MODE}.md"
ITERATION=0
BRANCH=$(git branch --show-current)
echo "Mode: $MODE | Branch: $BRANCH | Max: $MAX"
while [ $ITERATION -lt $MAX ]; do
cat "$PROMPT_FILE" | claude -p \
--dangerously-skip-permissions \
--model opus \
--verbose
git push origin "$BRANCH" 2>/dev/null || \
git push -u origin "$BRANCH"
ITERATION=$((ITERATION + 1))
echo "=== LOOP $ITERATION ==="
done
echo "Completed $MAX iterations"Practical Examples #
Ralph Builds a SaaS MVP with StacksFinder
Build a B2B invoice management SaaS. Constraints: solo developer, $50/month hosting budget, ship in 6 weeks. Use StacksFinder MCP for all technology decisions. Ultrathink.
Starting implementation. First, I need to select the tech stack. Using StacksFinder MCP for deterministic recommendations...
recommend_stack projectType: "saas", scale: "mvp", priorities: ["time-to-market", "cost-efficiency"]feat: Initialize project with SvelteKit + Neon stackReading plan. Next task: Implement authentication. Comparing auth options for SvelteKit...
compare_techs ["lucia", "authjs", "clerk"], context: "mvp"Implementing Lucia auth with email/password and GitHub OAuth... Tests passing
Ready to add deterministic tech decisions to your Ralph workflow?
Frequently Asked Questions #
What is the Ralph Wiggum method?
The Ralph method, coined by Geoffrey Huntley, is an AI-driven development approach using a simple bash loop to iteratively feed prompts to an AI agent. The key insight: "deterministically bad in an undeterministic world" — failures are caught by loops, making errors cheap data points rather than session-enders.
Why combine Ralph with StacksFinder MCP?
Ralph handles iteration and automation, but LLMs hallucinate about technology capabilities. StacksFinder provides deterministic, versioned scores — same question = same answer. This creates the perfect synergy: autonomous iteration meets data-driven decisions.
What is "Ultrathink" in Ralph prompts?
Ultrathink is a prompt technique that instructs the AI to engage in deeper reasoning. In Ralph workflows, it's used for complex decisions like architecture, prioritization, and when integrating tools like StacksFinder for tech selection.
How much does the Ralph method cost?
Running Ralph requires high token usage (Geoff mentions ~$200/month plans). However, it trades compute cost for developer time savings, especially on greenfield projects. StacksFinder MCP adds minimal overhead with free tier tools.
Can I use Ralph without Claude Code?
Yes! The Ralph pattern works with any CLI-based AI agent: Cursor, Codex, Amp, OpenCode, etc. The core is the bash loop pattern and file-based state persistence, not a specific tool.
Is StacksFinder scoring really deterministic?
Yes, 100%. StacksFinder uses versioned lookup tables for all scoring — no LLM involvement in technology selection. The same constraints always produce the same recommendations, making decisions auditable and reproducible.
Let Ralph Ralph with Data-Driven Decisions
Install StacksFinder MCP and bring deterministic tech scoring to your autonomous development workflow.
Free tier includes core analysis tools. Pro unlocks blueprints and audits.