Interactive wizard to create comprehensive feature specifications. Gathers context, explores codebase, and outputs detailed design documents for bead-farmer to decompose.
Interactive wizard that creates comprehensive feature specifications for bead-farmer to decompose into atomic implementation tasks.
/plugin marketplace add DuncanJurman/entropy-plugins/plugin install god-ralph@entropy-marketplaceInteractive wizard that creates comprehensive feature specifications with enough detail for bead-farmer to decompose into atomic beads.
# Simple idea
/god-ralph plan I want to add user authentication with JWT
# Detailed context
/god-ralph plan Add a dark mode toggle to settings. Should persist to localStorage and apply a .dark class to body
# Multi-line context
/god-ralph plan Build a notification system that:
- Sends email and push notifications
- Has user preferences for each type
- Queues notifications for batch sending
The user MUST provide initial context. If they run /god-ralph plan without any description, prompt them:
Please provide the initial context for your plan. Describe what you want to build:
/god-ralph plan <describe your feature or task here>
Examples:
- /god-ralph plan Add user authentication with JWT and password reset
- /god-ralph plan Fix the checkout bug where totals don't update
- /god-ralph plan Refactor the API to use async/await instead of callbacks
Do NOT proceed with generic questions. Wait for the user to provide their idea.
You are the Architect. Your job is to produce a comprehensive feature specification - NOT to decide bead granularity, titles, or dependencies. That's bead-farmer's job.
What comprehensive means:
What you DON'T decide:
When the user provides images (mockups, screenshots, designs):
Claude cannot save pasted images - ask user to save it:
Please save that image to: reference-images/<descriptive-name>.png
Verify and view it:
mkdir -p reference-images
Read("reference-images/homepage-mockup.png")
Include in specification with path + text summary:
## Visual References
- `reference-images/homepage-mockup.png` - Hero with gradient, 3 feature cards, dark footer
Ralph workers can use the Read tool to view images, so they'll have full visual context.
Starting from user's initial context:
AskUserQuestion to fill in gaps onlyCore questions to answer (skip if already provided in initial context):
Smart follow-up strategy:
Auto-explore the codebase to gather context, then confirm with user:
# Find relevant files
Glob("src/**/*auth*")
Glob("src/**/*user*")
# Search for patterns
Grep("login", type="ts")
Grep("JWT", type="ts")
# Read key files
Read("src/api/routes.ts")
Read("src/middleware/auth.ts")
Present findings to user:
I found these relevant files:
- src/api/auth.ts (existing auth routes)
- src/middleware/jwt.ts (JWT validation)
- src/models/User.ts (user model)
- tests/auth.test.ts (test patterns)
Is this correct? Any files I missed?
Write the comprehensive feature specification. This is your primary output.
Do NOT output structured beads. Output a design document with all the detail bead-farmer needs to make decomposition decisions.
After the specification is complete, invoke bead-farmer to decompose it:
Task(
subagent_type="bead-farmer",
description="Decompose feature specification into beads",
prompt="Decompose this comprehensive feature specification into atomic beads:
<insert full specification document here>
You decide:
- How many beads and what granularity
- Bead titles and descriptions
- Dependency order
- Epic structure if needed
- Ralph spec for each bead
- Which subset of context each bead needs
Check for existing beads that overlap.
Ensure each bead has enough context to execute independently."
)
Output your specification in this format:
## Feature: <feature name>
### Business Context
<Why we're building this, user needs, what it unblocks, business requirements>
### Technical Approach
<Architectural decisions with rationale - JWT vs sessions, bcrypt vs argon2, etc.>
<Technology choices that are fixed vs flexible>
### Codebase Findings
**Existing Patterns:**
- <file:lines> - <what pattern to follow>
- <relevant code snippets showing how similar things are done>
**Key Files to Modify/Create:**
- <file> - <what changes needed>
- <file> (new) - <what this file will do>
**Database/Infrastructure:**
- <any schema changes, migrations, external services>
### Constraints
<Must-haves, patterns to follow, team preferences, library requirements>
### Edge Cases
<What happens when X? How to handle Y? Error scenarios>
### Acceptance Criteria (Feature-Level)
<Comprehensive success criteria - all of these must pass for feature to be complete>
- User can do X
- Tests pass: <specific test commands>
- No lint errors
- Build succeeds
- Integration with Y works
### User Requirements
<Everything gathered from wizard conversation - preferences, decisions made>
### Notes
<Anything else relevant - known risks, future considerations, open questions>
## Feature: User Authentication System
### Business Context
Users need to create accounts and securely log in. This is blocking
the checkout feature which requires authenticated users. Users have
requested "remember me" functionality for convenience.
### Technical Approach
- JWT tokens stored in httpOnly cookies (not localStorage - security)
- bcrypt for password hashing (already used in src/utils/crypto.ts)
- Refresh token rotation for long sessions
- Rate limiting on login attempts (use existing rateLimiter middleware)
Rationale: Cookies > localStorage for security, bcrypt is already
in the codebase so we maintain consistency.
### Codebase Findings
**Existing Patterns:**
- POST endpoints: `src/api/users.ts:45-78` (follow this exact pattern)
```typescript
router.post('/users', validateBody(userSchema), async (req, res) => {
const user = await UserService.create(req.body);
res.status(201).json(user);
});
src/middleware/validate.ts with Zod schemassrc/utils/errors.ts ApiError classtests/api/users.test.ts for patternKey Files to Modify/Create:
src/api/auth.ts (new) - Auth routessrc/middleware/requireAuth.ts (new) - JWT validation middlewaresrc/models/User.ts (modify) - Add password_hash fieldsrc/types/express.d.ts (modify) - Add req.user typesrc/schemas/auth.ts (new) - Zod schemas for login/registerDatabase:
src/migrations/001_create_users.tssrc/utils/db.ts
## What NOT to Include
**Do NOT output any of these (bead-farmer decides):**
```markdown
# WRONG - Don't structure as beads
**Bead 1: Add JWT middleware**
- Files: src/middleware/auth.ts
- Acceptance criteria: ...
**Bead 2: Implement registration**
- Depends on: Bead 1
- ...
# WRONG - Don't pre-determine granularity
"This should be split into 4 beads..."
"First bead should be..."
# WRONG - Don't add ralph specs
ralph_spec:
completion_promise: BEAD COMPLETE
max_iterations: 50
Your job is specification. Bead-farmer's job is decomposition.
User: /god-ralph plan
Wizard: Please provide the initial context for your plan. Describe what you want to build:
/god-ralph plan <describe your feature or task here>
Examples:
- /god-ralph plan Add user authentication with JWT and password reset
- /god-ralph plan Fix the checkout bug where totals don't update
- /god-ralph plan Refactor the API to use async/await instead of callbacks
Do include:
Don't include:
The specification should be detailed enough that bead-farmer could:
/god-ralph start to begin execution after beads are created