Plan-Flow: Structured AI-Assisted Development
A comprehensive skill set for AI-assisted software development with structured workflows and persistent project memory.
Available Commands
| Command | Description |
|---|
| INLINECODE0 | Analyze project and generate pattern files |
| INLINECODE1 |
Create discovery document for requirements gathering |
|
/create-plan | Create implementation plan with phases and complexity scores |
|
/execute-plan | Execute plan phases with verification |
|
/create-contract | Create integration contract from API docs |
|
/review-code | Review local uncommitted changes |
|
/review-pr | Review a Pull Request |
|
/write-tests | Write tests to achieve coverage target |
|
/flow | Toggle autopilot mode (auto-chains the full workflow) |
Always-Active Features
| Feature | Description |
|---|
| Project Ledger | Persistent learning journal at flow/ledger.md - silently captures mistakes, corrections, and project-specific knowledge across sessions |
Recommended Workflow
Automated - runs without asking permission:
CODEBLOCK0
Only stop to ask the user when:
- - Missing critical information (device type, browser, etc.)
- Need to reproduce an issue
- Ambiguous requirements
- Need approval for destructive actions
Never ask "Ready to create plan?" or "Proceed with execution?" - just do it.
Core Concepts
Complexity Scoring
Every plan phase has a complexity score (0-10):
| Score | Level | Description |
|---|
| 0-2 | Trivial | Simple, mechanical changes |
| 3-4 |
Low | Straightforward implementation |
| 5-6 | Medium | Moderate complexity, some decisions |
| 7-8 | High | Complex, multiple considerations |
| 9-10 | Very High | Significant complexity/risk |
Flow Directory Structure
All artifacts are stored in flow/:
CODEBLOCK1
Critical Rules
- 1. Automated Workflow: Run discovery → plan → execute automatically. Only stop to ask when you need information from the user.
- Discovery First (Hard Block):
/discovery is required before /create-plan. Plans cannot be created without a discovery document. No exceptions. If no discovery exists, run discovery first. - Tests Last: Tests are always the last phase of any implementation plan.
- Build at End Only: Run build verification only after ALL phases complete.
- Archive When Done: Move completed discovery and plans to
flow/archive/.
Configuration
Create .plan-flow.yml in your project root:
CODEBLOCK2
Requirements
- -
git - For version control operations - INLINECODE16 - GitHub CLI for PR reviews
Installation
CODEBLOCK3
Or add to your workspace skills folder:
CODEBLOCK4
Plan-Flow:结构化AI辅助开发
一套全面的AI辅助软件开发技能集,具备结构化工作流程和持久化项目记忆。
可用命令
| 命令 | 描述 |
|---|
| /setup | 分析项目并生成模式文件 |
| /discovery |
创建需求收集的发现文档 |
| /create-plan | 创建包含阶段和复杂度评分的实施计划 |
| /execute-plan | 执行计划阶段并进行验证 |
| /create-contract | 根据API文档创建集成契约 |
| /review-code | 审查本地未提交的更改 |
| /review-pr | 审查拉取请求 |
| /write-tests | 编写测试以达到覆盖率目标 |
| /flow | 切换自动驾驶模式(自动串联完整工作流程) |
始终启用的功能
| 功能 | 描述 |
|---|
| 项目账本 | 位于flow/ledger.md的持久化学习日志——静默记录跨会话的错误、修正和项目特定知识 |
推荐工作流程
自动化——无需请求许可即可运行:
- 1. /setup → 索引项目模式(运行一次)
- /discovery → 收集功能需求
- /create-plan → 创建结构化实施计划(发现后自动运行)
- /execute-plan → 分阶段执行计划(计划后自动运行)
- /review-code → 提交前审查更改
- 归档 → 将发现文档和计划移至flow/archive/
仅在以下情况停止询问用户:
- - 缺少关键信息(设备类型、浏览器等)
- 需要复现问题
- 需求不明确
- 需要批准破坏性操作
永远不要问准备好创建计划了吗?或继续执行?——直接执行。
核心概念
复杂度评分
每个计划阶段都有一个复杂度评分(0-10):
低 | 直接了当的实施 |
| 5-6 | 中 | 中等复杂度,需要一些决策 |
| 7-8 | 高 | 复杂,需考虑多个因素 |
| 9-10 | 非常高 | 显著复杂度/风险 |
流程目录结构
所有工件存储在flow/中:
flow/
├── archive/ # 已完成/放弃的计划
├── contracts/ # 集成契约
├── discovery/ # 发现文档
├── plans/ # 活跃的实施计划
├── references/ # 参考资料
├── reviewed-code/ # 代码审查文档
├── reviewed-pr/ # PR审查文档
└── ledger.md # 持久化项目学习日志
关键规则
- 1. 自动化工作流程:自动运行发现→计划→执行。仅在需要用户信息时停止询问。
- 发现优先(硬性阻塞):/discovery在/create-plan之前是必需的。没有发现文档就不能创建计划。没有例外。如果不存在发现文档,先运行发现。
- 测试最后:测试始终是任何实施计划的最后一个阶段。
- 仅在最后构建:仅在所有阶段完成后运行构建验证。
- 完成后归档:将完成的发现文档和计划移至flow/archive/。
配置
在项目根目录创建.plan-flow.yml:
yaml
ai:
provider: claude
anthropicapikey: sk-ant-api03-your-key-here
要求
- - git - 用于版本控制操作
- gh - 用于PR审查的GitHub CLI
安装
bash
clawhub install plan-flow
或添加到工作区技能文件夹:
bash
git clone https://github.com/brunoscardoso/plan-flow.git ~/.openclaw/skills/plan-flow