ai-dev-loop
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI Development Loop
AI开发循环
Autonomous task execution with QA gates across multiple AI platforms.
跨多个AI平台实现带QA关卡的自主任务执行。
Overview
概述
The AI Development Loop enables fully autonomous feature development where:
- AI agents pick up and implement tasks from a queue
- You do QA only (approve or reject in Testing column)
- Multiple platforms (Claude CLI, Cursor, Codex) can work in parallel
- Rate limits are maximized by switching between platforms
AI开发循环支持完全自主的功能开发,具体包括:
- AI Agent从队列中领取并执行任务
- 您仅需负责QA工作(在Testing列中批准或拒绝)
- 多个平台(Claude CLI、Cursor、Codex)可并行工作
- 通过在平台间切换最大化利用速率限制
Architecture
架构
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ BACKLOG │────▶│ TO DO │────▶│ TESTING │────▶│ DONE │
│ │ │ │ │ │ │ │
│ PRDs ready │ │ Agent picks │ │ YOU review │ │ Shipped │
│ │ │ & builds │ │ & approve │ │ │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
│ │
┌─────┴─────┐ ┌─────┴─────┐
│ Claude │ │ Reject │
│ Cursor │ │ → To Do │
│ Codex │ └───────────┘
└───────────┘┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ BACKLOG │────▶│ TO DO │────▶│ TESTING │────▶│ DONE │
│ │ │ │ │ │ │ │
│ PRDs ready │ │ Agent picks │ │ YOU review │ │ Shipped │
│ │ │ & builds │ │ & approve │ │ │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
│ │
┌─────┴─────┐ ┌─────┴─────┐
│ Claude │ │ Reject │
│ Cursor │ │ → To Do │
│ Codex │ └───────────┘
└───────────┘Task Lifecycle
任务生命周期
1. Task Creation
1. 任务创建
Tasks live in with structured metadata:
.agents/TASKS/[task-name].mdmarkdown
undefined任务存储在中,包含结构化元数据:
.agents/TASKS/[task-name].mdmarkdown
undefinedTask: [Feature Name]
Task: [Feature Name]
ID: feature-name-slug
Status: Backlog | To Do | Testing | Done
Priority: High | Medium | Low
PRD: Link
ID: feature-name-slug
Status: Backlog | To Do | Testing | Done
Priority: High | Medium | Low
PRD: Link
Agent Metadata
Agent Metadata
Claimed-By: [platform-session-id]
Claimed-At: [timestamp]
Completed-At: [timestamp]
Claimed-By: [platform-session-id]
Claimed-At: [timestamp]
Completed-At: [timestamp]
Progress
Progress
Agent-Notes: [real-time updates]
QA-Checklist:
- Code compiles/lints
- Tests pass (CI)
- User acceptance
- Visual review
Agent-Notes: [real-time updates]
QA-Checklist:
- Code compiles/lints
- Tests pass (CI)
- User acceptance
- Visual review
Rejection History
Rejection History
Rejection-Count: 0
Rejections: [list of rejection notes]
undefinedRejection-Count: 0
Rejections: [list of rejection notes]
undefined2. Task Claiming
2. 任务认领
When an agent runs :
/loop- Scans for
.agents/TASKS/Status: To Do - Sorts by priority (High > Medium > Low)
- Skips tasks with active claims (< 30 min old)
- Updates task with and
Claimed-ByClaimed-At
当Agent运行时:
/loop- 扫描目录寻找
.agents/TASKS/的任务Status: To Do - 按优先级排序(高>中>低)
- 跳过有活跃认领(不足30分钟)的任务
- 更新任务的和
Claimed-By字段Claimed-At
3. Implementation
3. 任务实现
Agent works on the task:
- Reads task file and linked PRD
- Checks for related past work
.agents/SESSIONS/ - Implements the feature/fix
- Updates with progress
Agent-Notes - Creates branch and commits
Agent处理任务的步骤:
- 读取任务文件及关联的PRD
- 检查目录中的相关过往工作
.agents/SESSIONS/ - 实现功能/修复问题
- 更新记录进度
Agent-Notes - 创建分支并提交代码
4. Quality Check
4. 质量检查
Before moving to Testing:
- Runs qa-reviewer skill
- Updates QA-Checklist items
- Ensures code compiles/lints
进入Testing阶段前:
- 运行qa-reviewer技能
- 更新QA-Checklist项
- 确保代码可编译/通过代码检查
5. Completion
5. 任务完成
Agent finalizes:
- Sets
Status: Testing - Sets timestamp
Completed-At - Adds final summary to
Agent-Notes - Prompts for next action
Agent完成任务的步骤:
- 设置
Status: Testing - 设置时间戳
Completed-At - 在中添加最终总结
Agent-Notes - 提示下一步操作
6. QA Gate (Your Turn)
6. QA关卡(您的环节)
In Kaiban.md:
- Review Testing column
- Click task to see PRD preview
- Check linked PR
- Approve: Drag to Done
- Reject: Click reject, add note → returns to To Do
在Kaiban.md中:
- 查看Testing列
- 点击任务查看PRD预览
- 检查关联的PR
- 批准:拖动到Done列
- 拒绝:点击拒绝,添加备注 → 任务回到To Do列
7. Rejection Handling
7. 拒绝处理
When rejected:
- Status returns to To Do
- Rejection-Count increments
- Rejection note added to history
- Next picks up with full context
/loop
任务被拒绝时:
- 状态回到To Do
- Rejection-Count计数加1
- 拒绝备注添加到历史记录
- 下一次执行时会获取完整上下文并重新处理任务
/loop
Multi-Platform Strategy
多平台策略
Platform Strengths
平台优势
| Platform | Best For |
|---|---|
| Claude CLI | Complex logic, backend, architecture |
| Cursor | UI components, styling, visual work |
| Codex | Bulk refactoring, migrations, docs |
| Platform | 适用场景 |
|---|---|
| Claude CLI | 复杂逻辑、后端开发、架构设计 |
| Cursor | UI组件、样式设计、可视化工作 |
| Codex | 批量重构、迁移、文档编写 |
Parallel Execution
并行执行
Multiple platforms can work simultaneously:
- Each claims different tasks
- Claims prevent conflicts (30-min lock)
- Shared state via task files
多个平台可同时工作:
- 每个平台认领不同任务
- 认领机制防止冲突(30分钟锁定)
- 通过任务文件共享状态
Rate Limit Handling
速率限制处理
When rate limited:
- Agent saves progress to
Agent-Notes - Releases claim (clears )
Claimed-By - Suggests switching platform
- User continues with different platform
遇到速率限制时:
- Agent将进度保存到
Agent-Notes - 释放认领(清空)
Claimed-By - 建议切换平台
- 用户可使用其他平台继续
Daily Workflow
日常工作流
Morning QA Session
晨间QA会议
- Open Kaiban.md extension in VS Code
- Review Testing column
- Approve good work → Done
- Reject with notes → To Do
- 在VS Code中打开Kaiban.md扩展
- 查看Testing列
- 批准合格工作 → 移至Done
- 拒绝并添加备注 → 移至To Do
Throughout Day
全天工作流程
bash
undefinedbash
undefinedClaude CLI
Claude CLI
claude
/loop # Process task /loop # Next task
claude
/loop # 处理任务 /loop # 下一个任务
Rate limited? Switch to Cursor
遇到速率限制?切换到Cursor
undefinedundefinedRate Limit Strategy
速率限制应对策略
Claude limit? → Switch to Cursor
Cursor limit? → Switch to Codex
All limited? → QA time (review Testing)Claude受限?→ 切换到Cursor
Cursor受限?→ 切换到Codex
全部受限?→ QA时间(审核Testing列)Integration Points
集成点
Kaiban.md Extension
Kaiban.md扩展
- Visual Kanban board for
.agents/TASKS/ - Drag & drop status changes
- PRD preview panel
- Reject button with note input
- Agent claim status badges
- 为提供可视化看板
.agents/TASKS/ - 拖放操作更改状态
- PRD预览面板
- 带备注输入的拒绝按钮
- Agent认领状态徽章
Existing Skills
现有技能
- qa-reviewer: 6-phase quality verification
- session-documenter: Auto-document completed work
- rules-capture: Learn from rejection feedback
- qa-reviewer: 6阶段质量验证
- session-documenter: 自动记录已完成工作
- rules-capture: 从拒绝反馈中学习规则
Git Workflow
Git工作流
- Branch per task:
feature/[task-id] - Commits with clear messages
- PR linked in task file
- 每个任务对应一个分支:
feature/[task-id] - 提交信息清晰明确
- PR链接到任务文件
Not a Daemon
非守护进程
Important: is NOT a background process.
/loop- Each invocation handles ONE task
- Returns control to user
- User decides to continue or stop
- Respects "never run background processes" rule
重要提示:并非后台进程。
/loop- 每次调用处理一个任务
- 执行完成后将控制权交还给用户
- 用户决定继续或停止
- 遵循“永不运行后台进程”规则
Claim Expiration
认领过期
Claims expire after 30 minutes:
- Handles agent crashes
- Handles rate limit interruptions
- Previous provide context for pickup
Agent-Notes - Enables multi-platform handoff
认领30分钟后过期:
- 处理Agent崩溃情况
- 处理速率限制中断情况
- 之前的提供上下文以便继续处理
Agent-Notes - 支持多平台交接
Best Practices
最佳实践
For Task Creation
任务创建
- Write clear, actionable task descriptions
- Link to PRD for requirements
- Set appropriate priority
- Include testing criteria
- 编写清晰、可执行的任务描述
- 关联PRD以明确需求
- 设置合适的优先级
- 包含测试标准
For Agents
Agent使用
- Read task and PRD thoroughly before starting
- Update regularly
Agent-Notes - Run qa-reviewer before completing
- Create clean, focused commits
- 开始前仔细阅读任务和PRD
- 定期更新
Agent-Notes - 完成前运行qa-reviewer
- 创建清晰、聚焦的提交
For QA (You)
QA环节(您的工作)
- Review PRD alongside implementation
- Provide specific rejection feedback
- Approve incrementally (don't batch)
- Keep Testing column short
- 对照PRD审核实现
- 提供具体的拒绝反馈
- 逐步批准(不要批量处理)
- 保持Testing列任务数量较少