ai-dev-loop

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

AI 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
.agents/TASKS/[task-name].md
with structured metadata:
markdown
undefined
任务存储在
.agents/TASKS/[task-name].md
中,包含结构化元数据:
markdown
undefined

Task: [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]
undefined
Rejection-Count: 0 Rejections: [list of rejection notes]
undefined

2. Task Claiming

2. 任务认领

When an agent runs
/loop
:
  1. Scans
    .agents/TASKS/
    for
    Status: To Do
  2. Sorts by priority (High > Medium > Low)
  3. Skips tasks with active claims (< 30 min old)
  4. Updates task with
    Claimed-By
    and
    Claimed-At
当Agent运行
/loop
时:
  1. 扫描
    .agents/TASKS/
    目录寻找
    Status: To Do
    的任务
  2. 按优先级排序(高>中>低)
  3. 跳过有活跃认领(不足30分钟)的任务
  4. 更新任务的
    Claimed-By
    Claimed-At
    字段

3. Implementation

3. 任务实现

Agent works on the task:
  1. Reads task file and linked PRD
  2. Checks
    .agents/SESSIONS/
    for related past work
  3. Implements the feature/fix
  4. Updates
    Agent-Notes
    with progress
  5. Creates branch and commits
Agent处理任务的步骤:
  1. 读取任务文件及关联的PRD
  2. 检查
    .agents/SESSIONS/
    目录中的相关过往工作
  3. 实现功能/修复问题
  4. 更新
    Agent-Notes
    记录进度
  5. 创建分支并提交代码

4. Quality Check

4. 质量检查

Before moving to Testing:
  1. Runs qa-reviewer skill
  2. Updates QA-Checklist items
  3. Ensures code compiles/lints
进入Testing阶段前:
  1. 运行qa-reviewer技能
  2. 更新QA-Checklist项
  3. 确保代码可编译/通过代码检查

5. Completion

5. 任务完成

Agent finalizes:
  1. Sets
    Status: Testing
  2. Sets
    Completed-At
    timestamp
  3. Adds final summary to
    Agent-Notes
  4. Prompts for next action
Agent完成任务的步骤:
  1. 设置
    Status: Testing
  2. 设置
    Completed-At
    时间戳
  3. Agent-Notes
    中添加最终总结
  4. 提示下一步操作

6. QA Gate (Your Turn)

6. QA关卡(您的环节)

In Kaiban.md:
  1. Review Testing column
  2. Click task to see PRD preview
  3. Check linked PR
  4. Approve: Drag to Done
  5. Reject: Click reject, add note → returns to To Do
在Kaiban.md中:
  1. 查看Testing列
  2. 点击任务查看PRD预览
  3. 检查关联的PR
  4. 批准:拖动到Done列
  5. 拒绝:点击拒绝,添加备注 → 任务回到To Do列

7. Rejection Handling

7. 拒绝处理

When rejected:
  1. Status returns to To Do
  2. Rejection-Count increments
  3. Rejection note added to history
  4. Next
    /loop
    picks up with full context
任务被拒绝时:
  1. 状态回到To Do
  2. Rejection-Count计数加1
  3. 拒绝备注添加到历史记录
  4. 下一次
    /loop
    执行时会获取完整上下文并重新处理任务

Multi-Platform Strategy

多平台策略

Platform Strengths

平台优势

PlatformBest For
Claude CLIComplex logic, backend, architecture
CursorUI components, styling, visual work
CodexBulk refactoring, migrations, docs
Platform适用场景
Claude CLI复杂逻辑、后端开发、架构设计
CursorUI组件、样式设计、可视化工作
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:
  1. Agent saves progress to
    Agent-Notes
  2. Releases claim (clears
    Claimed-By
    )
  3. Suggests switching platform
  4. User continues with different platform
遇到速率限制时:
  1. Agent将进度保存到
    Agent-Notes
  2. 释放认领(清空
    Claimed-By
  3. 建议切换平台
  4. 用户可使用其他平台继续

Daily Workflow

日常工作流

Morning QA Session

晨间QA会议

  1. Open Kaiban.md extension in VS Code
  2. Review Testing column
  3. Approve good work → Done
  4. Reject with notes → To Do
  1. 在VS Code中打开Kaiban.md扩展
  2. 查看Testing列
  3. 批准合格工作 → 移至Done
  4. 拒绝并添加备注 → 移至To Do

Throughout Day

全天工作流程

bash
undefined
bash
undefined

Claude CLI

Claude CLI

claude
/loop # Process task /loop # Next task
claude
/loop # 处理任务 /loop # 下一个任务

Rate limited? Switch to Cursor

遇到速率限制?切换到Cursor

undefined
undefined

Rate 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:
/loop
is NOT a background process.
  • 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
    Agent-Notes
    provide context for pickup
  • 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
    Agent-Notes
    regularly
  • 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列任务数量较少