| name | mini-piv |
| description | Lightweight PIV workflow - discovery-driven feature builder. No PRD needed. Asks 5 quick questions, generates PRP from answers, then executes the full validate/debug loop. Use for small-to-medium features, quick builds, or when you want to skip PRD ceremony. |
| disable-model-invocation | true |
| allowed-tools | Task, TaskCreate, TaskUpdate, TaskList, Read, Write, Bash, Glob, Grep, AskUserQuestion |
| argument-hint | [feature-name] [project-path] |
Mini PIV Ralph - Lightweight Feature Builder
Arguments: $ARGUMENTS
Parse arguments:
FEATURE_NAME = $ARGUMENTS[0] or null (will ask user during discovery)
PROJECT_PATH = $ARGUMENTS[1] or current working directory
Examples:
/mini-piv โ Asks for feature name during discovery, uses cwd
/mini-piv "add-user-auth" โ Feature name provided, uses cwd
/mini-piv "token-filters" /path/to/project โ Both provided
Philosophy: Quick & Quality
"When you just want to build something without writing a PRD first."
Mini PIV Ralph is the lightweight sibling of the full PIV Ralph orchestrator. Same quality pipeline (Execute โ Validate โ Debug), but starts from a quick conversation instead of a PRD.
You are the orchestrator - stay lean at ~15% context, spawn fresh sub-agents for heavy lifting.
Required Reading by Role
| Role | Instructions |
|---|
| Orchestrator | This file only (you're reading it now) |
| Research Agent | references/codebase-analysis.md + references/generate-prp.md |
| Executor | Use the piv-executor agent + references/execute-prp.md |
| Validator | Use the piv-validator agent |
| Debugger | Use the piv-debugger agent |
DO NOT wing it. Sub-agents MUST read their instruction files before acting.
Visual Workflow
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MINI PIV RALPH ORCHESTRATOR โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1. DISCOVERY (Orchestrator) โ
โ Ask user 3-5 questions conversationally โ
โ Extract: scope, touchpoints, deps, success, out-of-scopeโ
โ โ
โ 2. RESEARCH & PRP GENERATION (Fresh sub-agent) โ
โ โโ Step 1: Codebase analysis (deep research) โ
โ โโ Step 2: Generate PRP from discovery answers โ
โ โโ Output: PRPs/mini-{feature-name}.md โ
โ โ
โ 3. EXECUTE (Executor sub-agent) โ
โ โ EXECUTION SUMMARY โ
โ โ
โ 4. VALIDATE (Validator sub-agent) โ
โ โ PASS / GAPS_FOUND / HUMAN_NEEDED โ
โ โ
โ 5. DEBUG LOOP (if needed, max 3 iterations) โ
โ Spawn DEBUGGER โ Re-validate โ repeat or escalate โ
โ โ
โ 6. COMMIT (Orchestrator) โ
โ feat(mini): {description} โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Step 1: Discovery Phase
1a. Determine Feature Name
If FEATURE_NAME is not provided:
- Check recent conversation for context
- If clear, propose a name and confirm
- If unclear, ask directly
Normalize to kebab-case (e.g., "User Authentication" โ "user-authentication").
1b. Check for Existing PRP
ls -la PROJECT_PATH/PRPs/ 2>/dev/null | grep -i "mini-{FEATURE_NAME}"
If exists, ask: "A PRP for '{FEATURE_NAME}' already exists. Overwrite, rename, or skip to execution?"
1c. Ask Discovery Questions (Conversational)
Present all questions in a single message. Adapt based on context.
Default question set:
I've got a few quick questions so I can build this right:
1. **What does this feature do?** Quick rundown โ what's it supposed to accomplish?
2. **Where in the codebase does it live?** Specific files, folders, components?
(Say "not sure" if you want me to figure it out)
3. **Any specific libraries, patterns, or existing code to follow?**
4. **What does "done" look like?** 1-3 concrete success criteria.
5. **Anything explicitly OUT of scope?** What should I NOT build right now?
Adapt by feature type:
- UI Components โ also ask about styling, props, responsive behavior
- API Endpoints โ also ask about request/response format, auth
- Smart Contracts โ also ask about functions, events, security
- Integrations โ also ask about external service details, error handling
Wait for user response, then extract structured answers.
1d. Structure Discovery Answers
feature:
name: {FEATURE_NAME}
scope: {Answer to Q1}
touchpoints: {Answer to Q2}
dependencies: {Answer to Q3}
success_criteria: {Answer to Q4}
out_of_scope: {Answer to Q5}
Step 2: Research & PRP Generation
CRITICAL: Spawn a FRESH sub-agent. Do NOT do this yourself.
Spawn a general-purpose sub-agent with this prompt:
MINI PIV RALPH: RESEARCH & PRP GENERATION
==========================================
You are generating a PRP for a lightweight, single-phase feature.
Project root: {PROJECT_PATH}
Feature name: {FEATURE_NAME}
## Discovery Input (from user)
{paste structured YAML from Step 1d}
## Step 1: Codebase Analysis
Run deep codebase analysis for this feature.
Save to: {PROJECT_PATH}/PRPs/planning/mini-{FEATURE_NAME}-analysis.md
## Step 2: Generate PRP (analysis context still loaded)
You already have the codebase analysis โ use it directly.
### Discovery โ PRP Translation Guide
| Discovery Answer | PRP Section |
|-----------------|-------------|
| Feature Scope (Q1) | Goal + What |
| Touch Points (Q2) | Implementation Blueprint task locations |
| Dependencies (Q3) | Context YAML, patterns, Known Gotchas |
| Success Criteria (Q4) | Success Criteria checklist + Final Validation |
| Out of Scope (Q5) | Explicit exclusions in What section |
### Template & Output
Use the PRP template: PRPs/templates/prp_base.md
Output PRP to: {PROJECT_PATH}/PRPs/mini-{FEATURE_NAME}.md
## Critical Rules
- Do BOTH steps yourself in sequence
- Follow the full PRP generation process
- DO NOT spawn sub-agents
Wait for completion.
Step 3: Spawn EXECUTOR Sub-Agent
Use the Task tool with subagent_type: "piv-executor":
EXECUTOR MISSION - Mini PIV Ralph
==================================
Execute the PRP at: {PROJECT_PATH}/PRPs/mini-{FEATURE_NAME}.md
Project root: {PROJECT_PATH}
Read references/execute-prp.md for the execution process.
Follow: Load PRP โ Plan Thoroughly โ Execute โ Validate โ Verify
Output EXECUTION SUMMARY with Status, Files, Tests, Issues.
Wait for completion.
Validation Sizing Decision
Before spawning a full validator, assess:
- <5 files changed, <100 lines, no external APIs โ Quick validation (review changes yourself as orchestrator)
- Otherwise โ Spawn full validator sub-agent (Step 4)
Step 4: Spawn VALIDATOR Sub-Agent
Use the Task tool with subagent_type: "piv-validator":
VALIDATOR MISSION - Mini PIV Ralph
===================================
Verify implementation of: {PROJECT_PATH}/PRPs/mini-{FEATURE_NAME}.md
Project root: {PROJECT_PATH}
Executor Summary: {paste EXECUTION SUMMARY}
Verify ALL requirements independently. Don't trust executor claims.
Output VERIFICATION REPORT with Grade, Checks, Gaps.
Process result:
PASS โ Step 6 (commit)
GAPS_FOUND โ Step 5 (debugger)
HUMAN_NEEDED โ Ask user
Step 5: Debug Loop (Max 3 iterations)
Spawn debugger using subagent_type: "piv-debugger":
DEBUGGER MISSION - Mini PIV - Iteration {I}
============================================
Project: {PROJECT_PATH}
PRP Path: {PROJECT_PATH}/PRPs/mini-{FEATURE_NAME}.md
Gaps: {GAPS}
Errors: {ERRORS}
Fix root causes, not symptoms. Run tests after each fix.
Output FIX REPORT with Status, Fixes Applied, Test Results.
After debugger: re-validate โ PASS (commit) or loop (max 3) or escalate.
Step 6: Smart Commit
cd PROJECT_PATH && git status && git diff --stat
git add -A
git commit -m "feat(mini): implement {FEATURE_NAME}
- {bullet 1}
- {bullet 2}
Built via Mini PIV Ralph
Built with FTW (First Try Works) - https://github.com/SmokeAlot420/ftw"
Completion Summary
## MINI PIV RALPH COMPLETE
Feature: {FEATURE_NAME}
Project: {PROJECT_PATH}
### Artifacts
- PRP: PRPs/mini-{FEATURE_NAME}.md
- Analysis: PRPs/planning/mini-{FEATURE_NAME}-analysis.md
### Implementation
- Validation cycles: {N}
- Debug iterations: {M}
### Files Changed
{list}
### Commit
{hash}: {message}
All requirements verified and passing.
Error Handling
Executor Returns BLOCKED
Ask user: "Executor blocked on '{FEATURE_NAME}'. Issue: {description}. How should we proceed?"
Validator Returns HUMAN_NEEDED
Ask user: "Validator needs guidance. Question: {details}. Please advise."
3 Debug Cycles Exhausted
Ask user: "'{FEATURE_NAME}' failed validation after 3 fix attempts. Persistent issues: {list}. Need your guidance."
Sub-Agent Timeout/Failure
When a sub-agent times out or fails:
- Check for partial work (files created, tests written)
- Retry once with a simplified, shorter prompt
- If retry fails, escalate to user with what was accomplished
Quick Reference
| Scenario | Use This |
|---|
| Small/medium feature, no PRD | Mini PIV Ralph |
| Quick feature, explore scope first | Mini PIV Ralph |
| Large feature with phases | Full PIV Ralph (/piv) |
| PRD already exists | Full PIV Ralph (/piv) |
File Naming
PRPs/mini-{feature-name}.md # PRP file
PRPs/planning/mini-{feature-name}-analysis.md # Codebase analysis