PHPackages                             satoved/lararalph - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. satoved/lararalph

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

satoved/lararalph
=================

Agentic Ralph Wiggum loops for Laravel

v0.0.1(2mo ago)1202MITPHPPHP ^8.4CI failing

Since Feb 22Pushed 2mo agoCompare

[ Source](https://github.com/satoved/lararalph)[ Packagist](https://packagist.org/packages/satoved/lararalph)[ Docs](https://github.com/satoved/lararalph)[ RSS](/packages/satoved-lararalph/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Lararalph
=========

[](#lararalph)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4bb14b6b4118c88b30cef780680933b6c5cc11068812295b2349239a988ca872/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7361746f7665642f6c61726172616c70682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/satoved/lararalph)[![Total Downloads](https://camo.githubusercontent.com/905fcff546231dde2e209fd47f9292de88ad9383f75867bdd1451abda7edb968/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7361746f7665642f6c61726172616c70682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/satoved/lararalph)

Laravel package that wraps the [Ralph Wiggum technique](https://ghuntley.com/ralph/) into Artisan commands and Laravel-grade UX. Define requirements, plan implementation, build — through a specs-driven workflow with Claude Code doing the work in agentic loops.

What is the Ralph Wiggum Technique?
-----------------------------------

[](#what-is-the-ralph-wiggum-technique)

The [Ralph Wiggum technique](https://ghuntley.com/ralph/) is a development methodology where Claude runs in an agentic loop: given a prompt, it reads your codebase, reasons about what to do, writes code, runs tests, and iterates until the task is complete. Each iteration gets a fresh context window. The implementation plan file on disk acts as shared state between iterations.

The core idea: **three phases, two prompts, one loop.**

1. **Define requirements** — human + Claude conversation produces specs
2. **Plan** — Claude analyzes specs vs existing code (gap analysis), produces a prioritized task list
3. **Build** — Claude picks one task per iteration, implements, tests, commits, loop restarts with fresh context

Workflow
--------

[](#workflow)

```
 claude /prd            artisan ralph:plan         artisan ralph:build
      │                         │                           │
      ▼                         ▼                           ▼
    PRD.md ──────────► IMPLEMENTATION_PLAN.md ──────────► Code
(requirements)         (prioritized checklist)     (one task at a time)

```

Specs Directory
---------------

[](#specs-directory)

The package manages a `specs/` directory in your project root:

```
specs/
├── backlog/
│   └── 2026-01-15-user-notifications/
│       ├── PRD.md                    # Functional requirements (created by `claude /prd`)
│       ├── IMPLEMENTATION_PLAN.md    # Prioritized task list (created by `artisan ralph:plan`)
│       └── logs/                     # Agent loop JSON + text logs
└── complete/
    └── 2026-01-14-old-feature/       # Moved here when done

```

- `claude /prd` creates a timestamped folder in `specs/backlog/` with `PRD.md`
- `artisan ralph:plan` reads `PRD.md` + existing codebase, produces `IMPLEMENTATION_PLAN.md`
- `artisan ralph:build` picks the highest-priority unchecked task, implements it, runs tests, commits — one task per loop iteration
- Finished specs move to `specs/complete/`

Requirements
------------

[](#requirements)

- PHP 8.4+, Laravel 11+
- Node.js installed
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code)

Installation
------------

[](#installation)

```
composer require satoved/lararalph
```

Publish config, specs directory, and Claude skill:

```
php artisan vendor:publish --tag="lararalph-config" --tag="lararalph-specs" --tag="lararalph-claude"
```

Usage
-----

[](#usage)

### 1. Define Requirements

[](#1-define-requirements)

Inside Claude Code, use the `/prd` skill:

```
claude "/prd user notifications"

```

Claude asks clarifying questions about the feature, then writes `specs/backlog/2026-01-15-user-notifications/PRD.md`. The PRD focuses on *what* (functional requirements, acceptance criteria, user stories) — no implementation details.

### 2. Plan

[](#2-plan)

```
# Interactive: choose from backlog specs
php artisan ralph:plan

# Or specify directly:
php artisan ralph:plan 2026-01-15-user-notifications
```

Claude studies your codebase against the PRD using subagents, performs gap analysis, and produces `IMPLEMENTATION_PLAN.md` — a prioritized bullet-point checklist of tasks to implement.

The plan is disposable. If it's wrong, regenerate it with `--force`. One planning loop is cheap compared to building from a bad plan.

### 3. Build

[](#3-build)

```
# Interactive: choose from backlog specs
php artisan ralph:build

# Or specify directly:
php artisan ralph:build 2026-01-15-user-notifications
```

Each loop iteration: Claude reads the plan, picks the most important unchecked task, implements it, runs tests, updates the plan, and commits. Then the loop restarts with a fresh context window and Claude picks the next task.

Worktrees
---------

[](#worktrees)

Use `--create-worktree` on `ralph:plan` or `ralph:build` to run in an isolated git worktree:

```
php artisan ralph:plan 2026-01-15-user-notifications --create-worktree
php artisan ralph:build 2026-01-15-user-notifications --create-worktree
```

This creates a sibling directory (e.g., `../myapp-2026-01-15-user-notifications/`), copies `.env` with adjusted URLs, and runs setup commands (`composer install`, etc).

```
# Clean up worktrees
php artisan ralph:finish
```

Configuration
-------------

[](#configuration)

```
php artisan vendor:publish --tag="lararalph-config"
```

`config/lararalph.php`:

```
return [
    'worktree_setup' => [
        CopyEnvFile::class,
        RunInstallComposer::class,
        RunInstallNpm::class,
        RunHerdSecure::class,
        OpenInPHPStorm::class,
    ],
];
```

### Customizing Prompts

[](#customizing-prompts)

Planning and building prompts are Blade templates. Publish them:

```
php artisan vendor:publish --tag="lararalph-views"
```

Edit `resources/views/vendor/lararalph/prompts/plan.blade.php` and `build.blade.php` to adjust how Claude approaches planning and building. This is where you steer Ralph — add guardrails, change subagent counts, adjust backpressure instructions.

### Customizing the PRD Skill

[](#customizing-the-prd-skill)

Published to `.claude/skills/prd/SKILL.md`. Edit to match your team's PRD template.

Commands
--------

[](#commands)

CommandDescription`ralph:plan {spec?}`Gap analysis: specs vs codebase → `IMPLEMENTATION_PLAN.md``ralph:build {spec?}`Pick task, implement, test, commit, loop`ralph:finish`List and remove git worktreesTesting
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Geoffrey Huntley](https://ghuntley.com/ralph/) — the Ralph Wiggum technique
- [Oleg Makedonsky](https://github.com/satoved)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance83

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

85d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2b8224588137b70944d8f4e3d35e4cc7338e208deb4cc57059335ce6b2d676c?d=identicon)[satoved](/maintainers/satoved)

---

Top Contributors

[![satoved](https://avatars.githubusercontent.com/u/14319239?v=4)](https://github.com/satoved "satoved (47 commits)")

---

Tags

laravelclaude-codelararalphralph wiggumagentic developmentagentic loop

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/satoved-lararalph/health.svg)

```
[![Health](https://phpackages.com/badges/satoved-lararalph/health.svg)](https://phpackages.com/packages/satoved-lararalph)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
