ralph-wiggum-v2

from adaptationio/skrillz

No description

1 stars0 forksUpdated Jan 16, 2026
npx skills add https://github.com/adaptationio/skrillz --skill ralph-wiggum-v2

SKILL.md

Ralph Wiggum v2 - Autonomous TDD Development Loop

Quick Start

/ralph-wiggum-v2:ralph-loop --project "diablo-starcraft" --completion-promise "DIABLO_STARCRAFT_COMPLETE"

Overview

Autonomous TDD development loop that uses parallel agent swarms to review code, discover issues, and fix them with test-first methodology until convergence criteria are met.

Workflow

Phase 1: Discovery & Initialization

  1. Locate or create state file: {project}/.ralph/state.json
  2. Locate or create categories file: {project}/.ralph/categories.json
  3. Bootstrap categories from codebase structure if empty

Phase 2: Parallel Agent Review Swarm

Spawn 3-5 parallel agents with:

  • Random category (weighted toward lowest scores)
  • Random subcategory within that category
  • Random review style (never same as last 3 used)
  • Unique focus area (no overlap between agents)

Phase 3: TDD Implementation Cycle

For each finding:

  1. Write failing test first
  2. Implement minimal fix
  3. Verify test passes
  4. Update state

Phase 4: Category Evolution

After each iteration:

  1. Merge new discoveries
  2. Recalculate scores
  3. Meta-review (every 5 iterations)

Phase 5: Convergence Detection

Complete when:

  • 10 consecutive clean iterations
  • All category scores >= 95/100
  • All tests passing
  • Game runs without crashes

State Schema

{
  "project": "diablo-starcraft",
  "iteration": 0,
  "consecutiveCleanIterations": 0,
  "requiredCleanIterations": 10,
  "completionPromise": "DIABLO_STARCRAFT_COMPLETE",
  "categories": {},
  "discoveryLog": [],
  "lastReviewStyles": [],
  "agentHistory": [],
  "startedAt": "<timestamp>",
  "lastUpdated": "<timestamp>"
}

Categories Schema

{
  "categories": {
    "<category_name>": {
      "score": 50,
      "maxScore": 100,
      "subcategories": {
        "<subcategory_name>": {
          "score": 50,
          "issues": [],
          "lastReviewed": null,
          "reviewCount": 0
        }
      },
      "discoveredAt": 0,
      "lastUpdated": "<timestamp>"
    }
  }
}

Review Styles

Code Quality

StyleFocus
NITPICKERFormatting, naming, tiny inconsistencies
REFACTORERDuplication, abstraction opportunities
DRY_ENFORCERCopy-paste code, repeated patterns
TYPE_ZEALOTType safety, any usage, casting
SOLID_ADHERENTSOLID principle violations
API_PURISTInterface design, contracts, signatures

Reliability

StyleFocus
DEBUGGERLogic errors, off-by-one, wrong operators
EDGE_CASE_HUNTERBoundary conditions, null/undefined
ERROR_HANDLERMissing try/catch, unhandled promises
STATE_MACHINE_ANALYSTInvalid state transitions
CONCURRENCY_EXPERTRace conditions, async bugs
MEMORY_LEAK_HUNTERListeners not removed, growing arrays

Performance

StyleFocus
PERFORMANCE_HAWKO(n²), unnecessary renders, hot paths
ALLOCATION_AUDITORObject churn, GC pressure
RENDER_OPTIMIZERDOM thrashing, layout thrashing

Security

StyleFocus
SECURITY_AUDITORXSS, injection, unsafe operations
INPUT_VALIDATORUnsanitized user input

Architecture

StyleFocus
ARCHITECTCoupling, cohesion, separation of concerns
DEPENDENCY_AUDITORCircular deps, tight coupling
LAYER_GUARDIANLayer violations, wrong abstractions

Testing

StyleFocus
TEST_SKEPTICCoverage gaps, weak assertions
MUTATION_TESTERTests that always pass
INTEGRATION_ANALYSTUnit vs integration gaps

Game-Specific

StyleFocus
DIABLO_VETERANARPG conventions, loot, skills, combat feel
STARCRAFT_FANFaction identity, unit feel, SC universe
GAME_FEEL_EXPERTJuice, polish, responsiveness
BALANCE_DESIGNERNumbers, progression, fairness
PLAYER_PSYCHOLOGYMotivation, reward loops
SPEEDRUNNERExploits, sequence breaks
COMPLETIONISTMissing edge cases in content
FIRST_TIME_USEROnboarding, confusion points

Meta

StyleFocus
FRESH_EYESWhat would confuse a new developer?
DOCUMENTATION_STICKLERMissing/wrong comments
FUTURE_MAINTAINERTechnical debt accumulation

Agent Output Format

{
  "agentId": "<uuid>",
  "category": "<category>",
  "subcategory": "<subcategory>",
  "reviewStyle": "<style>",
  "filesReviewed": ["<paths>"],
  "findings": [
    {
      "severity": "critical|major|minor|nitpick",
      "type": "<issue_type>",
      "location": "<file:line>",
      "description": "<what's wrong>",
      "suggestedFix": "<how to fix>",
      "requiresTest": true,
      "testWritten": false,
      "fixed": false,
      "newSubcategory": null
    }
  ],
  "scoreAdjustment": 0,
  "newCategoriesDiscovered": [],
  "cleanReview": false
}

Hard Requirements

  • **PLAY

...

Read full content

Repository Stats

Stars1
Forks0