### Quick start setup with flow.js init and Claude Code Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Set up FlowPilot in your project: build it, copy flow.js, run init to choose a client, then start e.g. Claude Code. Requires Node.js and npm installed. ```bash cd FlowPilot && npm install && npm run build cp dist/flow.js /your/project/ # 2. 初始化(会显示客户端选项) cd /your/project node flow.js init # 3. 启动客户端,直接描述需求 claude --dangerously-skip-permissions ``` -------------------------------- ### Set up and run FlowPilot with npm commands Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Installs dependencies Commands for building ("npm run build") to dist/flow.js, running development mode, and executing tests. Use these in the FlowPilot project root. ```bash cd FlowPilot npm install npm run build # 构建 → dist/flow.js npm run dev # 开发模式 npm test # 运行测试 ``` -------------------------------- ### Install context7 MCP on macOS/Linux Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/纯手动安装/安装说明.md Commands to make the context7 installation scripts executable and run the installer on macOS/Linux. ```bash chmod +x install_context7_mcp.sh repair_context7_mcp.sh ./install_context7_mcp.sh ``` -------------------------------- ### Check dirty baseline with git status --porcelain Source: https://github.com/6bnbn/flowpilot/blob/main/docs/troubleshooting-git-and-claude-pollution.md Run this before starting FlowPilot to see if the workspace is dirty. Any output will be recorded as dirty baseline, which resume will report and finish will not auto-merge into the final commit. ```bash git status --porcelain ``` -------------------------------- ### Prompt Claude Code with a task description Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Example prompt for Claude Code to describe a task; FlowPilot automatically decomposes the task, identifies dependencies, dispatches sub-agents in parallel, writes code, checkpoints, commits, and runs build/test/lint. ```text 你:帮我做一个电商系统,用户注册、商品管理、购物车、订单支付 (然后就不用管了) ``` -------------------------------- ### 运行 FlowPilot 命令 Source: https://github.com/6bnbn/flowpilot/blob/main/自动更新说明.md 在项目根目录运行 FlowPilot 命令。init 用于初始化,next 用于下一步,status 用于查看状态。 ```bash node flow.js init node flow.js next node flow.js status # ...其他命令 ``` -------------------------------- ### 初始化 FlowPilot 到现有项目 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 初始化 FlowPilot 到现有项目:复制 flow.js、运行 init,然后向 CC 描述需求。 ```bash # 1. 复制 flow.js 到项目里(如果还没有的话) cp FlowPilot目录/dist/flow.js 你的项目/ # 2. 初始化 cd 你的项目 node flow.js init # 3. 打开 CC,描述你的开发需求: 给现有系统加一个搜索功能,支持按标题和内容搜索 ``` -------------------------------- ### 已有项目增量开发:node flow.js init Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 用于已有项目增量开发。先进入项目目录并运行 node flow.js init 接管项目,然后通过 CC 描述开发需求。 ```bash cd 已有项目 node flow.js init # 接管项目 # 开CC,描述开发需求 你:给现有系统加一个搜索功能 ``` -------------------------------- ### macOS/Linux 更新 ui-ux-pro-max 技能 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/README.md 运行更新脚本,单独重装 ui-ux-pro-max 技能。 ```bash ./update-ui-ux-pro-max-skill.sh ``` -------------------------------- ### Initialize FlowPilot in your project with flow.js init Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Initializes FlowPilot in your project by copying the dist/flow.js file to your project directory, navigating to it, and running `node flow.js init`. ```bash cp dist/flow.js 你的项目/ cd 你的项目 node flow.js init ``` -------------------------------- ### macOS/Linux 安装脚本权限设置 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/README.md 在终端中为安装、修复和自检脚本添加执行权限。 ```bash chmod +x install_cursor_skills.sh repair_cursor_skills.sh self_check_cursor_skills.sh ``` -------------------------------- ### 快速开始:复制 flow.js 并初始化 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 将 flow.js 复制到项目目录,运行 node flow.js init 初始化,然后启动客户端。初始化时会显示客户端选项,包括 Claude Code、Codex、Cursor/Other 和 snow-cli。 ```bash # 1. 复制 flow.js 到你的项目 cp /path/to/workflow-engine/dist/flow.js 你的项目目录/ # 2. 初始化(会显示客户端选项) cd 你的项目目录 node flow.js init # 3. 打开客户端,直接描述需求 claude --dangerously-skip-permissions ``` -------------------------------- ### 中断恢复 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 使用 --continue 标志从上次中断处恢复。 ```bash claude --dangerously-skip-permissions --continue ``` -------------------------------- ### ui-ux-pro-max 技能运行要求 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/codex一键安装技能/纯手动安装/安装说明.md ui-ux-pro-max 技能运行搜索脚本时目标机器需要具备的 Python 环境。 ```text python3 或 python ``` -------------------------------- ### 卸载 FlowPilot Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 删除 FlowPilot 带入或运行时生成的所有文件,以卸载 FlowPilot。包括 flow.js、可能的 instruction file(如 CLAUDE.md、AGENTS.md、ROLE.md)、设置文件和本地状态目录。如果这些文件中有手动补充的内容,需先保留。 ```bash rm -rf flow.js AGENTS.md CLAUDE.md ROLE.md .claude/settings.json .workflow .flowpilot ``` -------------------------------- ### 任务输入格式示例(markdown) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 通过 `node flow.js init` 从 stdin 接收的任务列表格式,包含任务类型、依赖和描述。 ```markdown # 博客系统 全栈博客应用 1. [backend] 数据库设计 PostgreSQL + Prisma,用户表、文章表、评论表 2. [backend] API 路由 (deps: 1) RESTful API,CRUD 接口 3. [frontend] 首页 (deps: 2) 文章列表、分页 4. [general] 部署配置 (deps: 2,3) Docker + nginx 配置 ``` -------------------------------- ### ui-ux-pro-max 更新脚本列表 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/codex一键安装技能/纯手动安装/安装说明.md 仓库根目录提供的更新 ui-ux-pro-max 技能的脚本文件列表。 ```text 一键更新ui-ux-pro-max技能.bat update-ui-ux-pro-max-skill.ps1 update-ui-ux-pro-max-skill.sh ``` -------------------------------- ### 生成的文件结构(目录树) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md FlowPilot 初始化后生成的项目文件结构,包括工具本体、指令文件、角色文件和 .workflow 目录。 ```text 你的项目/ ├── flow.js # 工具本体(你复制过来的) ├── CLAUDE.md / AGENTS.md # 按客户端选择生成的 instruction file ├── ROLE.md # 仅 snow-cli 模式额外生成 └── .workflow/ ├── progress.md # 任务状态表(核心记忆) ├── tasks.md # 原始任务定义 └── context/ ├── summary.md # 滚动摘要(全局背景) ├── task-001.md # 任务1的详细产出 ├── task-002.md # 任务2的详细产出 └── ... ``` -------------------------------- ### macOS/Linux 自检脚本 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/安装说明.md 运行以确认安装成功。 ```bash ./self_check_cursor_skills.sh ``` -------------------------------- ### FlowPilot source directory structure Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Shows the project's source tree layout with entry point, domain, application, infrastructure, and interfaces directories. Useful for navigating the repository and understanding module responsibilities. ```text src/ ├── main.ts # 入口,依赖注入 ├── domain/ │ ├── types.ts # TaskEntry, ProgressData 等类型 │ ├── task-store.ts # 任务状态管理(纯函数) │ ├── workflow.ts # WorkflowDefinition 定义 │ └── repository.ts # 仓储接口 ├── application/ │ └── workflow-service.ts # 核心用例(16个) ├── infrastructure/ │ ├── fs-repository.ts # 文件系统 + 协议嵌入 + Hooks注入 │ ├── markdown-parser.ts # 任务Markdown解析(兼容FlowPilot/OpenSpec双格式) │ ├── memory.ts # 智能记忆引擎(BM25 + 向量索引 + RRF + MMR + LRU缓存) │ ├── extractor.ts # 知识提取(LLM + 规则引擎降级) │ ├── truncation.ts # CJK感知智能截断 │ ├── loop-detector.ts # 三策略循环检测 │ ├── history.ts # 历史分析 + 三阶段自我进化(Reflect/Experiment/Review) │ ├── git.ts # 自动git提交(子模块感知) │ ├── verify.ts # 多语言项目验证(8种) │ ├── hooks.ts # 生命周期钩子 │ ├── protocol-template.ts # 工作流协议模板(双路径:标准/OpenSpec) │ └── logger.ts # 结构化日志(JSONL) └── interfaces/ ├── cli.ts # 命令路由 ├── formatter.ts # 输出格式化 └── stdin.ts # stdin读取 ``` -------------------------------- ### flow.js CLI commands reference Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Lists all CLI commands for the flow.js tool. Each command has specific options and behaviors: init --force, next --batch, checkpoint with --files, review triggers evolution checks, and finish refuses to end until review and final commit succeed. ```bash node flow.js init [--force] # 初始化/接管项目 node flow.js next [--batch] # 获取下一个/所有可并行任务 node flow.js checkpoint # 记录任务完成(stdin/--file/内联)[--files f1 f2 ...] node flow.js skip # 手动跳过任务 node flow.js review # 标记code-review已完成 + 进化自愈检查 node flow.js finish # 智能收尾(验证+总结;未review或最终commit未成功时不会结束工作流) node flow.js status # 查看全局进度 node flow.js resume # 中断恢复 node flow.js add <描述> [--type] # 追加任务(frontend/backend/general) node flow.js recall <关键词> # 检索历史记忆(BM25 + Dense 双路) node flow.js evolve # 接收 CC sub-agent 反思结果并应用进化 ``` -------------------------------- ### 初始化 FlowPilot Source: https://github.com/6bnbn/flowpilot/blob/main/docs/troubleshooting-git-and-claude-pollution.md 在项目中复制 flow.js 后,执行此命令进行初始化,会触发接管/注入操作。 ```bash node flow.js init ``` -------------------------------- ### Quick self-check commands for git and FlowPilot troubleshooting Source: https://github.com/6bnbn/flowpilot/blob/main/docs/troubleshooting-git-and-claude-pollution.md Quick self-check commands to run in order: check for baseline dirty files, see why FlowPilot rejected, inspect owned-files for ownership issues, check for residue after setup-owned cleanup, and review the current ignore policy. ```bash git status --porcelain ``` ```bash node flow.js finish ``` ```bash cat .workflow/owned-files.json ``` ```bash git diff -- AGENTS.md CLAUDE.md .claude/settings.json .gitignore ``` ```bash git diff -- .gitignore ``` -------------------------------- ### Windows 本地命令模式配置 mcp.json Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/纯手动安装/context7-mcp-templates/使用说明.md 将 mcp.local.windows.json 的内容合并到 mcp.json,用于 Windows 系统。命令路径使用反斜杠转义,指向 `C:\Users\YOUR_USER\.cursor\run-context7.cmd`。 ```json { "mcpServers": { "context7": { "command": "C:\\Users\\YOUR_USER\\.cursor\\run-context7.cmd", "args": [] } } } ``` -------------------------------- ### 查看进度 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 查看当前工作流进度,显示已完成、进行中、阻塞和下一步。 ```bash node flow.js status ``` -------------------------------- ### Windows PowerShell 更新 ui-ux-pro-max 技能 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/README.md 使用 PowerShell 执行更新脚本,绕过执行策略。 ```powershell powershell.exe -ExecutionPolicy Bypass -File .\update-ui-ux-pro-max-skill.ps1 ``` -------------------------------- ### macOS/Linux 安装脚本 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/安装说明.md 在终端进入当前目录后运行,赋予脚本执行权限并安装 Cursor 技能。 ```bash chmod +x install_cursor_skills.sh repair_cursor_skills.sh self_check_cursor_skills.sh ./install_cursor_skills.sh ``` -------------------------------- ### macOS/Linux 安装脚本执行 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/README.md 运行安装脚本,安装技能和 MCP 配置。 ```bash ./install_cursor_skills.sh ``` -------------------------------- ### Expected skills directory structure Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/纯手动安装/安装说明.md Expected directory structure after copying the skills folder to the Cursor skills directory. ```text ~/.cursor/skills/brainstorming/ ~/.cursor/skills/playwright/ ~/.cursor/skills/code-review/ ``` -------------------------------- ### 配置 FlowPilot 环境变量(~/.claude/settings.json) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 在 ~/.claude/settings.json 的 env 中设置 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS 为 1 以启用 Agent Teams,并可配置 ANTHROPIC_API_KEY 和 ANTHROPIC_BASE_URL。不配置 API Key 时,记忆提取和进化反思会降级为纯规则引擎模式,但核心功能不受影响。 ```json { "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1", "ANTHROPIC_API_KEY": "sk-ant-...", "ANTHROPIC_BASE_URL": "https://api.anthropic.com" } } ``` -------------------------------- ### 一键安装技能(Codex / Cursor) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 安装 FlowPilot 的 Codex 或 Cursor 技能包。选择对应目录并运行安装脚本,macOS/Linux 需要先确保脚本有执行权限。安装后需重启 CLI 或编辑器。 ```bash cd "兼容codex@cursor一键安装技能/codex一键安装技能" chmod +x install.sh repair.sh ./install.sh --force ``` ```bash # Cursor(macOS / Linux) cd "兼容codex@cursor一键安装技能/cursor一键安装技能" chmod +x install_cursor_skills.sh repair_cursor_skills.sh self_check_cursor_skills.sh ./install_cursor_skills.sh ``` -------------------------------- ### macOS/Linux 本地命令模式配置 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/纯手动安装/context7-mcp-templates/使用说明.md 将 mcp.local.unix.json 的内容合并到 mcp.json,用于 macOS/Linux 本地命令模式。 ```json { "mcpServers": { "context7": { "command": "/home/YOUR_USER/.cursor/run-context7.sh", "args": [] } } } ``` -------------------------------- ### 新项目从零开始:用户描述需求 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 用于新项目从零开始的场景。用户描述需求后,CC 自动拆解为多个任务并按依赖顺序执行。 ```text 你:帮我做一个博客系统,要有用户注册登录、文章发布、评论功能 CC:(自动拆解为 10+ 个任务,按依赖顺序逐个执行) ``` -------------------------------- ### Compare serial vs parallel development with flow next --batch Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Illustrates the difference between serial (5 rounds) and parallel (3 rounds) development execution in FlowPilot. The `flow next --batch` command identifies all parallel tasks and dispatches multiple sub-agents in a single message. ```text 串行:数据库 → 用户API → 商品API → 用户页 → 商品页 (5轮) 并行:数据库 → [用户API, 商品API] → [用户页, 商品页] (3轮) ``` -------------------------------- ### FlowPilot 自动执行流程(全自动) Source: https://github.com/6bnbn/flowpilot/blob/main/README.md FlowPilot 的完整自动执行流程,从初始化、协议嵌入到任务循环、验证和最终提交,全程无需人工介入。展示 `flow next`、`flow checkpoint`、`flow finish`、`flow review` 和 `flow evolve` 等关键命令的顺序。包含自动重试、级联跳过、中断恢复、循环检测和心跳自检等错误处理机制。 ```text node flow.js init ↓ 协议嵌入 instruction file(`Claude Code` 默认 `CLAUDE.md`,`Codex / Cursor / Other` 默认 `AGENTS.md`,旧项目兼容原有文件)+ 按客户端选择注入额外配置 ↓ 用户描述需求 / 丢入开发文档 ↓ ← 以下全自动,无需人工介入 ┌─→ flow next (--batch) ──→ 获取任务+上下文+相关记忆 │ ↓ │ 子Agent执行(自动选插件) │ ↓ │ flow checkpoint ──→ 知识提取 → 记录产出 + git commit │ ↓ └── 还有任务?──→ 是 → 循环 否 ↓ flow finish ──→ build/test/lint ↓ code-review ──→ flow review(进化自愈检查) ↓ flow evolve(可选,CC 深度反思) ↓ flow finish ──→ final commit + auto Reflect + Experiment → idle ``` -------------------------------- ### 下载 flow.js 文件 Source: https://github.com/6bnbn/flowpilot/blob/main/自动更新说明.md 使用 curl 从 GitHub Release 下载最新版 flow.js 到项目根目录。 ```bash curl -L https://github.com/6BNBN/FlowPilot/releases/latest/download/flow.js -o flow.js ``` -------------------------------- ### macOS/Linux 安装 context7 MCP 脚本 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/codex一键安装技能/纯手动安装/安装说明.md 在 macOS/Linux 上运行 context7 专用安装脚本,包括赋予执行权限和运行安装脚本,可选指定 --target-codex-home 参数。 ```bash chmod +x install_context7_mcp.sh repair_context7_mcp.sh ./install_context7_mcp.sh ./install_context7_mcp.sh --target-codex-home /path/to/.codex ``` -------------------------------- ### 新版本提示信息 Source: https://github.com/6bnbn/flowpilot/blob/main/自动更新说明.md 当检测到新版本时,FlowPilot 会显示此提示,包含当前版本、新版本号、下载地址和更新命令。 ```text 🔄 发现新版本: v0.3.9 (当前: v0.3.8) 下载: https://github.com/6BNBN/FlowPilot/releases 项目根目录运行: curl -L https://github.com/6BNBN/FlowPilot/releases/latest/download/flow.js -o flow.js 💡 提示: 下载后请运行 node flow.js init 重新初始化 ``` -------------------------------- ### 并行中断恢复流程 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 展示并行执行中断后如何通过 flow resume 和 flow next --batch 恢复并重新派发任务。 ```text 新窗口 → 说:继续任务 → flow resume ↓ 检测到3个active任务 → 全部重置为pending ↓ flow next --batch → 重新并行派发这3个任务(前提是写边界清晰) ``` -------------------------------- ### 并行工作原理图(文本) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 展示主Agent如何通过 flow next --batch 获取可并行任务,并在同一条消息中派发多个子Agent并行执行。 ```text 主Agent(调度器) │ ├── flow next --batch │ 返回所有依赖已满足的任务(比如3个) │ ├── 同时派发3个子Agent(一条消息,3个Task工具调用) │ ├── 子Agent-A → 执行任务001 → 自行checkpoint │ ├── 子Agent-B → 执行任务002 → 自行checkpoint │ └── 子Agent-C → 执行任务003 → 自行checkpoint │ └── 3个子Agent全部返回后 主Agent执行 flow status 确认 → 继续下一轮 ``` -------------------------------- ### 工作原理流程图(文本) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 展示 FlowPilot 从用户描述需求到最终提交的完整工作流程,包括调度模式、并行派发、checkpoint 和 code-review。 ```text 用户描述开发需求 ↓ 客户端读取 instruction file(`Claude Code` 默认 `CLAUDE.md`,`Codex / Cursor / Other` 默认 `AGENTS.md`,旧项目兼容原有文件)→ 发现嵌入协议 → 进入调度模式 ↓ flow resume → 检查是否有未完成工作流 ↓ flow next --batch → 返回所有依赖上可并行任务 + 依赖上下文 ↓ CC 用 Task 工具并行派发子Agent(Agent Teams) ↓ 子Agent自行 checkpoint → 记录产出 + 自动git提交 ↓ 主Agent确认进度 → 循环直到全部完成 ↓ code-review → flow review → 解锁finish ↓ flow finish → 自动跑 build/test/lint → 汇报完成/跳过/失败项 → 清除.workflow/ → 最终提交 ↓ 回到待命,等待下一个需求 ``` -------------------------------- ### Manual rollback of evolution via experiments.json and rollbackEvolution Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md Shows how to manually roll back an automatic evolution. First view the evolution history from experiments.json, then call rollbackEvolution(index) in code with the index from the evolution log. ```bash cat .flowpilot/evolution/experiments.json ``` ```javascript rollbackEvolution(index) # index 为进化日志索引 ``` -------------------------------- ### Memory write-extract-retrieve-inject pipeline Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Illustrates the four-stage pipeline for processing checkpoint data: knowledge extraction, storage, semantic retrieval, and context injection. This flow is activated on each checkpoint and influences subsequent next/nextBatch operations. ```text checkpoint(成功/失败) ↓ 知识提取(LLM 智能提取 或 规则引擎降级) ↓ 存储到 .flowpilot/memory.json(带标签、时间戳、来源) ↓ next/nextBatch 时语义检索相关记忆 ↓ 带 [source] 标签注入子Agent上下文 ``` -------------------------------- ### Enable multi-agent in Claude Code settings.json Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Add this JSON to ~/.claude/settings.json to enable multi-agent support in Claude Code. Requires the 'env' key with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS set to "1". ```json "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } ``` -------------------------------- ### Enable multi-agent for Codex config.toml Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Add this TOML to ~/.codex/config.toml to enable multi-agent and set max_threads. The comment indicates the default is 6. Use 'codex --yolo' for fully automatic runs. ```toml [agents] max_threads = 50 # 子代理并发上限,默认 6 [features] multi_agent = true ``` -------------------------------- ### 从历史会话恢复 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 从历史对话列表中选择一个会话恢复。 ```bash claude --dangerously-skip-permissions --resume ``` -------------------------------- ### Finish rejection due to unowned dirty files Source: https://github.com/6bnbn/flowpilot/blob/main/docs/troubleshooting-git-and-claude-pollution.md This is the output when finish rejects the final commit because there are dirty files not owned by any checkpoint. The listed file (src/unowned.ts) needs to be handled by adding it to a checkpoint, reverting, or deferring to the next workflow. ```text 拒绝最终提交:检测到未归属给 workflow checkpoint 的脏文件。 - src/unowned.ts ``` -------------------------------- ### 纯手动安装目录内的独立脚本列表 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/codex一键安装技能/纯手动安装/安装说明.md 在纯手动安装目录内可直接运行的独立脚本文件列表。 ```text install-ui-ux-pro-max-skill.ps1 repair-ui-ux-pro-max-skill.ps1 一键安装ui-ux-pro-max技能.bat 一键修复ui-ux-pro-max技能.bat install_ui_ux_pro_max_skill.sh repair_ui_ux_pro_max_skill.sh ``` -------------------------------- ### Finish rejection due to missing dirty baseline Source: https://github.com/6bnbn/flowpilot/blob/main/docs/troubleshooting-git-and-claude-pollution.md This output indicates that the old workflow is missing the .workflow/dirty-baseline.json file. In this case, manually verify git status and do not let FlowPilot guess which files belong to the current workflow. ```text 拒绝最终提交:未找到 dirty baseline,无法证明工作流边界安全。 ``` -------------------------------- ### Dependency direction diagram for FlowPilot Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Illustrates the dependency direction between main layers: interfaces depend on application, application on domain, and infrastructure on domain as well. Confirms runtime has zero external dependencies, using only Node.js built-ins. ```text interfaces → application → domain ← infrastructure ``` -------------------------------- ### Codex 配置:启用多代理功能 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 在 ~/.codex/config.toml 中启用 multi_agent 功能。全自动运行建议使用 codex --yolo。 ```toml [features] multi_agent = true ``` -------------------------------- ### checkpoint 命令示例:使用标签保存知识 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 通过 `node flow.js checkpoint` 命令在 checkpoint 时使用标签标记关键信息,如 `[REMEMBER]` 和 `[DECISION]`,这些信息会被自动提取并永久保存。 ```bash echo '完成用户模块 [REMEMBER] 密码用bcrypt加密 [DECISION] 选择JWT认证' | node flow.js checkpoint 001 --files src/auth.ts ``` -------------------------------- ### 恢复中断的工作流 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 中断后恢复工作流:Claude Code 使用 --continue,Codex 使用 --yolo,然后说「继续任务」。 ```bash # 接续最近一次对话,全自动继续 # Claude Code claude --dangerously-skip-permissions --continue # Codex codex --yolo ``` -------------------------------- ### recall 命令示例:手动检索历史记忆 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 使用 `node flow.js recall` 命令手动检索历史记忆,返回最相关的 5 条记忆,按融合得分排序。正常工作流中 `next` 命令会自动查询相关记忆。 ```bash node flow.js recall "数据库设计" ``` ```bash node flow.js recall "authentication strategy" ``` -------------------------------- ### 差的任务依赖设计(全串行) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 展示一个全串行的任务依赖设计,其中任务3和4实际上不依赖前一个任务,导致执行时间线为5轮。 ```markdown 1. [backend] 数据库设计 2. [backend] 用户API (deps: 1) 3. [backend] 文章API (deps: 2) ← 其实不依赖用户API 4. [frontend] 用户页面 (deps: 3) ← 其实只依赖用户API 5. [frontend] 文章页面 (deps: 4) ← 其实只依赖文章API ``` -------------------------------- ### 快的写法(并行任务) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 快的写法:将无先后关系的任务分开描述,CC 会自动识别可并行任务,多个子 Agent 并行开发。 ```text 做一个电商系统: - 后端:用户模块、商品模块、订单模块(都依赖数据库) - 前端:首页、商品页、购物车页(各自依赖对应的后端API) - 最后做集成测试 ``` -------------------------------- ### 好的任务依赖设计(充分并行) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 展示一个充分并行的任务依赖设计,通过只声明实际依赖,使任务2和3、4和5可以并行执行,总轮数减少到4轮。 ```markdown 1. [backend] 数据库设计 2. [backend] 用户API (deps: 1) 3. [backend] 文章API (deps: 1) ← 只依赖数据库,和2并行 4. [frontend] 用户页面 (deps: 2) ← 只依赖用户API 5. [frontend] 文章页面 (deps: 3) ← 只依赖文章API,和4并行 6. [general] 集成测试 (deps: 4,5) ``` -------------------------------- ### Checkpoint with --files to declare ownership Source: https://github.com/6bnbn/flowpilot/blob/main/docs/troubleshooting-git-and-claude-pollution.md Use this command to explicitly assign files to a checkpoint, ensuring ownership boundaries are clear. Without --files, the checkpoint will not auto-commit, and unowned dirty files will cause finish to reject the final commit. ```bash echo "完成xxx [REMEMBER] ..." | node flow.js checkpoint 001 --files src/a.ts src/b.ts ``` -------------------------------- ### Claude Code 环境变量配置 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 在 ~/.claude/settings.json 的 env 中添加 ANTHROPIC_API_KEY 和 ANTHROPIC_BASE_URL,用于启用 LLM 智能提取和深度分析。 ```json { "env": { "ANTHROPIC_API_KEY": "sk-ant-...", "ANTHROPIC_BASE_URL": "https://api.anthropic.com" } } ``` -------------------------------- ### 中途添加需求 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 直接向 CC 提出新需求,CC 会自动追加任务继续执行。 ```text 再加一个导出 PDF 的功能 ``` -------------------------------- ### 执行时间线对比(差 vs 好) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 对比差设计和好设计的执行时间线,展示并行带来的轮数减少。 ```text 差的设计: 1 → 2 → 3 → 4 → 5 (5轮) 好的设计: 1 → [2,3] → [4,5] → 6 (4轮,任务2和3并行,4和5并行) ``` -------------------------------- ### 复制后的技能目录结构 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/codex一键安装技能/纯手动安装/安装说明.md 展示复制 skills 目录后预期的目录结构,用于验证技能是否正确安装。 ```text ~/.codex/skills/brainstorming/ ~/.codex/skills/playwright/ ~/.codex/skills/code-review/ ``` -------------------------------- ### Self-evolution workflow triggered by finish() and review() Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Flow of the three-stage evolution loop: finish() triggers Reflect and Experiment; review() triggers Review; optionally use node flow.js evolve to apply results after manual reflection. ```text finish() 触发: Reflect(反思)→ 分析本轮成败模式(失败链、重试热点、类型集中度) Experiment(实验)→ 自动调整 config 参数和协议模板,保存完整快照 review() 触发: Review(自愈)→ 对比进化前后指标,退化则自动回滚 Finalization 阶段(可选补充): 需要额外人工反思时,CC sub-agent + brainstorming 技能深度反思 → node flow.js evolve 应用结果 ``` -------------------------------- ### Iterative review workflow with three rounds Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Shows the iterative review workflow: multiple rounds of automated implementation, review, and refinement to improve code quality and catch deviations. ```text 第一轮:需求 → 全自动实现 → 代码产出 第二轮:审查 → 发现偏离/缺陷 → 自动修补 第三轮:精修 → 代码质量提升 → 收尾验证 ``` -------------------------------- ### Windows PowerShell 自检脚本执行 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/cursor一键安装技能/README.md 使用 PowerShell 运行自检脚本,检查安装状态。 ```powershell powershell.exe -ExecutionPolicy Bypass -File .\自检Cursor技能和MCP.ps1 ``` -------------------------------- ### 慢的写法(串行任务) Source: https://github.com/6bnbn/flowpilot/blob/main/docs/quick-start.md 慢的写法:串行描述任务,CC 不会并行处理。 ```text 先做数据库,然后做API,然后做页面 ``` -------------------------------- ### 验证 code-review 技能 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/codex一键安装技能/纯手动安装/安装说明.md 在 Codex 中测试 code-review 技能的示例命令。 ```text Use `code-review` to review the changed files in this workspace and list findings first. ``` -------------------------------- ### Manually trigger evolution with node flow.js evolve Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md Manually triggers the evolution experiment phase by piping an AI reflection result (JSON) to the evolve command. Normally finish() automatically triggers evolution, so this is an advanced entry point for injecting extra reflection results. ```bash echo '反思结果JSON' | node flow.js evolve ``` -------------------------------- ### 电商系统执行时间线 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 展示电商系统10个任务在5轮中的并行执行计划,每轮并行执行的任务组。 ```text 第1轮: [1, 5] ← 数据库和前端组件库并行 第2轮: [2, 3, 4] ← 三个API模块并行 第3轮: [6, 7, 8] ← 三个前端页面并行 第4轮: [9] ← 订单页(依赖登录和订单API) 第5轮: [10] ← E2E测试 ``` -------------------------------- ### Resume a workflow with flow resume after interruption Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Flow for resuming a workflow after interruption: if no pending changes, reset unfinished tasks and continue; if there are pending changes, pause and adopt or confirm/process them before restarting. This ensures no task is lost and avoids blindly re-dispatching. ```text 新窗口 → 说:继续任务 → flow resume ├─ 若无待接管变更:重置未完成任务 → 继续 └─ 若有待处理变更:暂停调度 → adopt / 确认并处理列出的本任务变更后 restart → 再继续 ``` -------------------------------- ### 实战示例:电商系统任务列表 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 一个完整的电商系统任务列表,包含10个任务,展示了如何设计依赖以实现最大并行。 ```markdown # 电商平台 全栈电商应用 1. [backend] 数据库设计 PostgreSQL: users, products, orders, payments, cart 2. [backend] 认证模块 (deps: 1) JWT + bcrypt,注册/登录/刷新token 3. [backend] 商品API (deps: 1) CRUD + 分页搜索 + 图片上传 4. [backend] 订单API (deps: 1) 下单/支付/退款流程 5. [frontend] 公共组件库 Header/Footer/Card/Modal/Form组件 6. [frontend] 商品列表页 (deps: 3,5) 商品卡片、筛选、分页 7. [frontend] 购物车页 (deps: 3,5) 增删改查、数量调整 8. [frontend] 登录注册页 (deps: 2,5) 表单验证、错误提示 9. [frontend] 订单页 (deps: 4,8) 下单流程、订单历史 10. [general] E2E测试 (deps: 6,7,8,9) Playwright 核心流程测试 ``` -------------------------------- ### node flow.js status 输出示例 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 展示 node flow.js status 命令的输出示例,优先显示用户最关心的信息,包括工作流状态、任务进度和下一步。 ```text **═══ 工作流状态 ═══** 🔄 示例工作流 · running 📊 2/4 已完成 | ⏳ 1 进行中 | ○ 1 待执行 **═══ 任务进度 ═══** ✓ 001 修复入口 ⏳ 002 实现中 📍 implementation · 🕐 8s前更新 · 📈 正在跑测试 ○ 003 待执行 ⊘ 004 已跳过 **═══ 下一步 ═══** - 继续跟进进行中的任务 (002) ``` -------------------------------- ### 验证 context7 技能 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/codex一键安装技能/纯手动安装/安装说明.md 在 Codex 中测试 context7 技能的示例命令。 ```text Use context7 to resolve the official React library ID. ``` -------------------------------- ### 中断恢复:继续任务 Source: https://github.com/6bnbn/flowpilot/blob/main/docs/usage-guide.md 用于中断恢复场景。新开一个 CC 窗口后说“继续任务”,CC 会恢复工作流并显示进度和中断任务信息。 ```text # 新开一个CC窗口 你:继续任务 CC:恢复工作流: 博客系统 | 进度: 7/12 | 检测到中断任务 008 的待接管变更,已暂停继续调度 ``` -------------------------------- ### Resume interrupted session with Claude Code or Codex Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Resume an interrupted FlowPilot session. For Claude Code use --continue; for Codex use --yolo in the project directory. ```bash # Claude Code claude --dangerously-skip-permissions --continue # Codex codex --yolo ``` -------------------------------- ### Configure Codex CLI concurrent max_threads to 50 Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Configures the Codex CLI to allow up to 50 concurrent threads by setting agents.max_threads. This is needed because the default concurrency limit is 6. ```toml [agents] max_threads = 50 ``` -------------------------------- ### Final summary status markers for finished tasks Source: https://github.com/6bnbn/flowpilot/blob/main/README.md Status markers used in the final summary output and in .workflow/final-summary.md to display each task's state before cleanup. ```text ✓ 已完成 ⊘ 已跳过 ✗ 已失败 ○ 未完成 ``` -------------------------------- ### playwright 技能运行要求 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/codex一键安装技能/纯手动安装/安装说明.md playwright 技能运行相关命令时目标机器需要具备的工具列表。 ```text node npm npx ``` -------------------------------- ### 验证 playwright 技能 Source: https://github.com/6bnbn/flowpilot/blob/main/兼容codex@cursor一键安装技能/codex一键安装技能/纯手动安装/安装说明.md 在 Codex 中测试 playwright 技能的示例命令。 ```text Use `playwright` to automate a simple browser flow and explain the run steps. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.