Skill站外收录 @skilllib/skill-2117939930272411474
ralplan
协调规划者、架构师与评审者三方协作,通过多轮迭代完善工作计划,在战略合理性、技术可行性与风险控制间达成共识,确保输出具备明确验收标准、具体实施路径及可验证成果的高质量方案。
数据与分析 AI 技能
Skills.MD
# Ralplan Skill
## Overview
Ralplan orchestrates three specialized agents—Planner, Architect, and Critic—in an iterative loop until consensus is reached on a comprehensive work plan. This skill ensures plans are strategically sound, architecturally valid, and thoroughly reviewed before execution.
## The Planning Triad
Three agents collaborate in structured phases to validate and refine work plans:
| Agent | Role | Output |
|-------|------|--------|
| **Planner** | Strategic Planner | Creates/refines the work plan |
| **Architect** | Strategic Advisor | Answers questions, validates architecture |
| **Critic** | Ruthless Reviewer | Critiques and identifies gaps |
## The Iteration Loop
```
┌─────────────────────────────────────────────────────────────────┐
│ RALPLAN LOOP │
│ │
│ ┌──────────────┐ │
│ │ PLANNER │◄────────────────────────────────┐ │
│ │ (Plans) │ │ │
│ └──────┬───────┘ │ │
│ │ │ │
│ ▼ │ │
│ ┌──────────────┐ Questions? ┌───────────┐ │ │
│ │ Has open │─────────────────► │ ARCHITECT │ │ │
│ │ questions? │ │ (Advises) │ │ │
│ └──────┬───────┘ └─────┬─────┘ │ │
│ │ │ │ │
│ │ No questions │ │ │
│ ▼ ▼ │ │
│ ┌──────────────┐ ┌──────────┐ │ │
│ │ CRITIC │◄─────────────────│ Answers │ │ │
│ │ (Reviews) │ └──────────┘ │ │
│ └──────┬───────┘ │ │
│ │ │ │
│ ▼ │ │
│ ┌──────────────┐ REJECT ┌──────────────┐│ │
│ │ Verdict? │─────────────────►│ Feedback ││ │
│ └──────┬───────┘ │ to Planner │┘ │
│ │ └─────────────┘ │
│ │ OKAY │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ PLAN APPROVED │ │
│ │ Ready for /ralph execution │ │
│ └──────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
```
## State Management
Ralplan maintains persistent state in `.omc/ralplan-state.json` to track progress and enable recovery across interruptions:
```json
{
"active": true,
"mode": "ralplan",
"iteration": 1,
"max_iterations": 5,
"plan_path": ".omc/plans/[feature].md",
"current_phase": "planner_planning",
"started_at": "ISO-timestamp",
"task_description": "[original task]"
}
```
**Phases**: `planner_planning` → `architect_consultation` → `critic_review` → `handling_verdict` → `complete`
## Execution Protocol
### Initialization
The skill begins by establishing the planning environment:
1. Create `.omc/plans/` directory if it doesn't exist
2. Read task description from user input
3. Create `ralplan-state.json` with initial values:
- `active: true`
- `iteration: 0`
- `max_iterations: 5`
- `current_phase: "planner_planning"`
- `started_at`: Current ISO timestamp
- `task_description`: User's task description
### Planner Planning Phase
The Planner creates an initial plan based on task context:
- Invoke Planner in **direct planning mode** (bypassing interview since task context is pre-gathered)
- Planner receives task context directly without preliminary questioning
- Planner mandatorily consults with Metis for gap detection
- Planner generates plan directly to `.omc/plans/[feature-name].md`
- Plan includes: requirements summary, concrete acceptance criteria, specific implementation steps with file references, risk identification with mitigations, and verification steps
- Signal completion with `PLAN_READY: .omc/plans/[filename].md`
- Extract plan path from completion signal and update state
### Architect Consultation (Conditional)
The Architect provides strategic guidance in two scenarios:
1. **After Planner**: If Planner raises architectural questions needing strategic input
2. **After Critic rejection**: If Critic identifies questions requiring expert guidance
When invoked, the Architect receives file paths to read for analysis, not summaries. This enables thorough examination of the existing codebase context before providing recommendations.
### Critic Review
The Critic examines the plan against quality standards:
- Critic receives the plan file path (per its design)
- Critic conducts thorough review of plan completeness and feasibility
- Critic emits verdict: either `OKAY` (approval) or `REJECT` with specific issues
### Verdict Handling and Iteration
Based on Critic's verdict, the skill either approves the plan or continues iteration:
**If verdict is OKAY:**
- Mark plan as approved
- Log approval with iteration count
- Prepare plan for execution with `/ralph` or manual orchestration
- Set state `active: false, current_phase: "complete"`
**If verdict is REJECT:**
- Extract Critic feedback with specific issues
- Increment iteration counter
- If `iteration >= max_iterations` (5):
- Force approval with warning about unresolved concerns
- Recommend manual review before execution
- Otherwise:
- Feed Critic feedback back to Planner
- Return to Planner Planning phase for refinement
## Iteration Rules
| Rule | Description |
|------|-------------|
| **Max 5 iterations** | Safety limit prevents infinite loops |
| **Planner owns plan** | Only Planner writes to plan file |
| **Architect provides wisdom** | Architect reads and advises, never modifies |
| **Critic has final say** | Plan approved only when Critic signals OKAY |
| **Feedback is specific** | Each rejection includes actionable improvements |
| **State persists** | Progress survives session interruptions |
## Quality Gates
The orchestrator must verify these gates before invoking Critic for each review:
1. **Plan file exists** at the path specified in state
2. **File references are valid** - Verify all mentioned files exist in codebase
3. **Acceptance criteria are concrete** - No vague "improve" or "optimize" without measurable metrics
4. **No ambiguous language** - Each task clearly specifies what to do
If any gate fails, return to Planner with specific failure feedback for remediation.
## Agent Communication Protocol
### Planner to Architect Questions
```
ARCHITECT_QUESTION:
- Topic: [Architecture/Performance/Security/Pattern]
- Context: [What we're planning]
- Files to examine: [specific paths]
- Specific Question: [What we need answered]
```
### Architect to Planner Answers
```
ARCHITECT_ANSWER:
- Topic: [Matching topic]
- Analysis: [What Architect found after reading files]
- Recommendation: [Specific guidance]
- Trade-offs: [What to consider]
- References: [file:line citations from codebase]
```
### Critic to Planner Feedback
```
CRITIC_FEEDBACK:
- Verdict: REJECT
- Critical Issues:
1. [Issue with specific fix required]
2. [Issue with specific fix required]
- Minor Issues:
1. [Nice to fix]
- Questions for Architect (if any):
1. [Architectural question needing expert input]
```
## Cancellation
To stop an active ralplan session:
- Use `/cancel-ralph` (automatically detects ralplan via state file)
- Or manually delete `.omc/ralplan-state.json`
## Skill Workflow
1. **Initialize state** and log: `[RALPLAN Iteration 0/5] Initializing...`
2. **Parse task** from user input
3. **Spawn Planner** in direct planning mode
4. **Iterate** through planning loop with observability logging at each phase
5. **Complete** when Critic approves or max iterations reached with warnings
The iterative loop refines the plan until it meets the rigorous standards of all three agents, ensuring comprehensive, architecturally sound work plans ready for execution.
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「ralplan」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次