简介
来自OpenClaw团队的轻量级PIV开发框架,通过对话驱动免PRD快速构建小到中型功能,自动生成需求计划并执行验证闭环。
原始描述
Lightweight PIV workflow - discovery-driven feature builder. No PRD needed. Asks quick questions, generates PRP, executes with validation loop. For small-to-medium features when you want to skip PRD ceremony.
中文使用说明 来自收录源
核心用法
Mini PIV Ralph 是一套简化的 Plan-Implement-Validate(PIV)开发工作流,专为希望跳过传统 PRD(Product Requirements Document)繁琐流程的中小功能开发设计。用户只需回答 3-5 个快速问题,系统即可自动生成结构化的 PRP(Pull Request Proposal),并进入标准的执行-验证-调试闭环。
工作流程分为六个阶段:
- Discovery(发现):通过对话收集功能需求、代码位置、成功标准等关键信息
- Research & PRP:分析代码库并生成 PRP 文档
- Execute:执行 PRP 中的实现计划
- Validate:验证实现是否符合预期
- Debug Loop:最多 3 次迭代修复问题
- Commit:智能提交并生成规范化的 commit message
显著优点
- 零文档负担:无需撰写完整 PRD,5 分钟对话即可启动开发
- 标准化质量:保留 PIV 核心流程(Execute → Validate → Debug),确保交付质量不降级
- 子代理架构:通过
sessions_spawn分离 Research、Executor、Validator、Debugger 角色,避免上下文污染 - 弹性验证:根据变更规模智能选择快速验证或完整验证,节省资源
- 模板驱动:内置 PRP 模板和代码分析指南,降低使用门槛
潜在缺点与局限性
- 规模限制:明确定位为"small-to-medium features",大型架构改造仍需完整 PIV 流程
- 依赖外部文档:需要配套 references/ 目录下的 codebase-analysis.md、generate-prp.md 等文件才能正常工作
- 调试次数上限:硬编码 3 次调试循环,复杂问题可能需人工介入
- Git 依赖:要求项目已初始化 git 仓库,且需要执行者确认 bash 命令安全性
适合人群
- 追求快速迭代的独立开发者或小团队
- 需要频繁开发小型功能(API 端点、UI 组件、配置变更)的工程师
- 希望标准化开发流程但不愿承担 PRD 维护成本的技术负责人
常规风险
- 生成的 bash 命令(尤其是 git 操作)需人工确认,避免误操作
- 子代理执行代码修改时,建议在受信任的项目环境中使用
- 虽为纯 Markdown Skill,但实际调用时会创建文件并执行 shell 命令,需留意权限控制
技术细节
- 用户可调用:是(user-invocable: true)
- 模型不可调用:禁用模型直接调用(disable-model-invocation: true)
- 支持平台:macOS、Linux
- 依赖工具:git
技能正文
name: mini-piv description: "Lightweight PIV workflow - discovery-driven feature builder. No PRD needed. Asks quick questions, generates PRP, executes with validation loop. For small-to-medium features when you want to skip PRD ceremony." user-invocable: true disable-model-invocation: true metadata: {"openclaw":{"emoji":"zap","homepage":"https://github.com/SmokeAlot420/ftw","requires":{"bins":["git"]},"os":["darwin","linux"]}}
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
Philosophy: Quick & Quality
"When you just want to build something without writing a PRD first."
Same quality pipeline (Execute → Validate → Debug), but starts from a quick conversation instead of a PRD.
You are the orchestrator - stay lean, spawn fresh sub-agents for heavy lifting.
Sub-agent spawning: Use the sessions_spawn tool to create fresh sub-agent sessions. Each spawn is non-blocking — you'll receive results via an announce step. Wait for each agent's results before proceeding to the next step.
Required Reading by Role
| Role | Instructions |
|---|---|
| Orchestrator | This file only |
| Research Agent | {baseDir}/references/codebase-analysis.md + {baseDir}/references/generate-prp.md |
| Executor | {baseDir}/references/piv-executor.md + {baseDir}/references/execute-prp.md |
| Validator | {baseDir}/references/piv-validator.md |
| Debugger | {baseDir}/references/piv-debugger.md |
Visual Workflow
┌──────────────────────────────────────────────────────────┐
│ 1. DISCOVERY → Ask 3-5 questions │
│ 2. RESEARCH & PRP → Codebase analysis + PRP generation │
│ 3. EXECUTE → Implement PRP │
│ 4. VALIDATE → PASS / GAPS_FOUND / HUMAN_NEEDED │
│ 5. DEBUG LOOP → Fix gaps (max 3x) │
│ 6. COMMIT → feat(mini): {description} │
└──────────────────────────────────────────────────────────┘
Step 1: Discovery Phase
1a. Determine Feature Name
If not provided: ask user or infer from context. Normalize to kebab-case.
1b. Check for Existing PRP
ls -la PROJECT_PATH/PRPs/ 2>/dev/null | grep -i "mini-{FEATURE_NAME}"
If exists, ask: "Overwrite, rename, or skip to execution?"
1c. Ask Discovery Questions
Present in a single conversational message:
I've got a few quick questions so I can build this right:
1. **What does this feature do?** Quick rundown.
2. **Where in the codebase does it live?** Files, folders, components?
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?**
Adapt for feature type (UI, API, contracts, integrations).
1d. Structure Discovery Answers
feature:
name: {FEATURE_NAME}
scope: {Q1}
touchpoints: {Q2}
dependencies: {Q3}
success_criteria: {Q4}
out_of_scope: {Q5}
Step 2: Research & PRP Generation
Spawn a fresh sub-agent using sessions_spawn:
MINI PIV: RESEARCH & PRP GENERATION
====================================
Project root: {PROJECT_PATH}
Feature name: {FEATURE_NAME}
## Discovery Input
{paste structured YAML}
## Step 1: Codebase Analysis
Read {baseDir}/references/codebase-analysis.md for the process.
Save to: {PROJECT_PATH}/PRPs/planning/mini-{FEATURE_NAME}-analysis.md
## Step 2: Generate PRP (analysis context still loaded)
Read {baseDir}/references/generate-prp.md for the process.
### Discovery → PRP Translation
| Discovery | PRP Section |
|-----------|-------------|
| Scope (Q1) | Goal + What |
| Touchpoints (Q2) | Implementation task locations |
| Dependencies (Q3) | Context YAML, Known Gotchas |
| Success Criteria (Q4) | Success Criteria + Validation |
| Out of Scope (Q5) | Exclusions in What section |
Use template: PRPs/templates/prp_base.md
Output to: {PROJECT_PATH}/PRPs/mini-{FEATURE_NAME}.md
Do BOTH steps yourself. DO NOT spawn sub-agents.
Wait for completion.
Step 3: Spawn EXECUTOR
Spawn a fresh sub-agent using sessions_spawn:
EXECUTOR MISSION - Mini PIV
============================
Read {baseDir}/references/piv-executor.md for your role.
Read {baseDir}/references/execute-prp.md for the execution process.
PRP: {PROJECT_PATH}/PRPs/mini-{FEATURE_NAME}.md
Project: {PROJECT_PATH}
Follow: Load PRP → Plan Thoroughly → Execute → Validate → Verify
Output EXECUTION SUMMARY.
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
Spawn a fresh sub-agent using sessions_spawn:
VALIDATOR MISSION - Mini PIV
=============================
Read {baseDir}/references/piv-validator.md for your process.
PRP: {PROJECT_PATH}/PRPs/mini-{FEATURE_NAME}.md
Project: {PROJECT_PATH}
Executor Summary: {SUMMARY}
Verify ALL requirements independently.
Output VERIFICATION REPORT with Grade, Checks, Gaps.
Process result: PASS → commit | GAPS_FOUND → debugger | HUMAN_NEEDED → ask user
Step 5: Debug Loop (Max 3 iterations)
Spawn a fresh sub-agent using sessions_spawn:
DEBUGGER MISSION - Mini PIV - Iteration {I}
============================================
Read {baseDir}/references/piv-debugger.md for your methodology.
Project: {PROJECT_PATH}
PRP: {PROJECT_PATH}/PRPs/mini-{FEATURE_NAME}.md
Gaps: {GAPS}
Errors: {ERRORS}
Fix root causes. Run tests after each fix.
Output FIX REPORT.
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
## 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}
All requirements verified and passing.
Error Handling
- Executor BLOCKED: Ask user for guidance
- Validator HUMAN_NEEDED: Ask user for guidance
- 3 debug cycles exhausted: Escalate with persistent issues list
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 |
| Large feature with phases | Full PIV (/piv) |
File Naming
PRPs/mini-{feature-name}.md # PRP
PRPs/planning/mini-{feature-name}-analysis.md # Analysis
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。