Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 28 additions & 27 deletions plugins/devloop/README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,63 @@
English | [简体中文](README.zh-CN.md)
[English](README.md) | [简体中文](README.zh-CN.md)

# devloop

A Claude Code plugin that drives a task/issue to a merge-ready PR through an iterative loop:
一个 Claude Code 插件,通过迭代循环将任务/issue 推进到可合并的 PR:

1. **Create Branch**: Always start by creating a new descriptive branch based on the issue/task content.
2. **Implement Fix**: Research and implement the smallest correct fix.
3. **Commit**: Create a clear commit message.
4. **Pull Request**: Open a PR for review.
5. **Wait for Review**: Poll for review comments.
6. **Address Feedback**: Apply changes based on review comments and commit/push again.
7. **Repeat**: Iterate through cycles of review and feedback until the PR is approved or merged.
1. **创建分支**:始终根据 issue/任务内容创建一个新的描述性分支。
2. **实施修复**:研究并实施正确的修复或实现。
3. **提交**:创建一个清晰的提交消息。
4. **Pull Request**:打开一个 PR 以供审查。
5. **等待审查**:轮询审查评论。
6. **处理反馈**:根据审查评论应用更改并再次提交/推送。
7. **重复**:迭代执行审查和反馈循环,直到 PR 获批或合并。

## Installation
## 安装

```bash
/plugin marketplace add lollipopkit/cc-plugins
/plugin install devloop@lk-ccp
```

## Components
## 组件

- Command: `commands/devloop.md` (Workflow definition)
- Command: `commands/devloop.md` (工作流定义)
- Agent: `agents/devloop-runner.md`
- Commands:
- `/devloop` – start or resume the workflow
- `/devloop-enable` – create/update `.claude/devloop.local.md`
- `/devloop` – 启动或恢复该工作流
- `/devloop-enable` – 创建/更新 `.claude/devloop.local.md`
- Hook:
- `hooks/hooks.json` – Stop hook that can send IM notifications using a user-provided command template
- `hooks/hooks.json` – Stop 钩子,可使用用户提供的命令模板发送 IM 通知

## Configuration
## 配置

Create `.claude/devloop.local.md` in your project root.
在你的项目根目录创建 `.claude/devloop.local.md`

Minimal template:
最小模板:

```markdown
---
enabled: true
base_branch: "main"

# Review behavior
review_mode: "github" # github|coderabbit|local-agent|custom
# 审查行为
review_mode: "github" # github|custom
custom_review_skill: "" # 可选;例如 "coderabbit:review"
max_review_polls: 40
review_poll_seconds: 60

# Wait for review behavior
# 等待审查行为
wait_behavior: "poll" # poll|ping_ai
ai_reviewer_id: "coderabbitai"
ping_message_template: "@{{ai_id}} This PR is awaiting review feedback. Could you provide an update?"
ping_threshold: 3 # number of wait rounds before pinging (minimum 1)
ai_reviewer_id: ""
ping_message_template: "@{{ai_id}} PR 正在等待审查反馈。您可以提供更新吗?"
ping_threshold: 3 # 提醒前的等待轮数 (最小为 1)

# Notifications (optional)
# 通知 (可选)
notify_enabled: false
notify_shell: "auto" # auto|bash|fish
notify_on_stop: true
notify_command_template: "" # executed with selected shell; can reference env vars below
notify_command_template: "" # 在选定的 shell 中执行;可以引用下方的环境变量
---

Additional instructions for devloop can go here.
由 <https://github.com/lollipopkit/cc-plugins> 生成
```
7 changes: 4 additions & 3 deletions plugins/devloop/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ enabled: true
base_branch: "main"

# Review behavior
review_mode: "github" # github|coderabbit|local-agent|custom
review_mode: "github" # github|custom
custom_review_skill: "" # 可选;例如 "coderabbit:review"
max_review_polls: 40
review_poll_seconds: 60

# Wait for review behavior
wait_behavior: "poll" # poll|ping_ai
ai_reviewer_id: "coderabbitai"
ai_reviewer_id: ""
ping_message_template: "@{{ai_id}} This PR is awaiting review feedback. Could you provide an update?"
ping_threshold: 3 # number of wait rounds before pinging (minimum 1)

Expand All @@ -58,5 +59,5 @@ notify_on_stop: true
notify_command_template: "" # executed with selected shell; can reference env vars below
---

这里可以写给 devloop 的额外说明。
由 <https://github.com/lollipopkit/cc-plugins> 生成
```
27 changes: 13 additions & 14 deletions plugins/devloop/agents/devloop-implementer.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
---
name: devloop-implementer
description: Specialized agent for researching issues and implementing code changes within the devloop workflow.
description: 专门用于在 devloop 工作流中研究问题并实施代码更改的代理。
tools: ["Read", "Write", "Edit", "Grep", "Glob", "Bash", "WebFetch", "WebSearch"]
---

# Devloop Implementer Agent
# Devloop 实施代理 (Implementer)

You are a specialized Sub-Agent focused on implementing code changes. Your goal is to research a given task and apply the necessary modifications to the codebase.
你是一个专门负责实施代码更改的子代理。你的目标是研究给定的任务,并对代码库应用必要的修改。

## Responsibilities
## 职责

1. **Research**: Explore the codebase to understand the current implementation and the scope of the requested change. If `workspace_mode` is `"gws"`, you should work within the assigned workspace path.
2. **Implementation**: Apply the smallest correct fix or feature implementation as described in the task.
3. **Self-Correction**: If your changes introduce obvious syntax errors or break basic logic, fix them before finishing.
4. **Reporting**: Provide a concise summary of the files modified and the logic changed. If locks were used, mention them.
1. **研究**:探索代码库以了解当前的实现方式以及所请求更改的范围。如果 `workspace_mode` `"gws"`,你应该在分配的工作区路径内工作。
2. **实施**:按照任务描述应用正确的修复或功能实现。
3. **自我纠正**:如果你的更改引入了明显的语法错误或破坏了基本逻辑,请在完成前予以修复。
4. **报告**:简要总结修改的文件和更改的逻辑。如果使用了锁(locks),请提及。

## Guidelines
## 指南

- Keep changes focused and minimal.
- Follow existing coding conventions and patterns found in the codebase.
- **Presence**: Never include "Co-authored-by: Claude" or AI signatures in your output or proposed messages.
- Do NOT run tests; your primary focus is implementation. Validation will be handled by a separate agent.
- If you encounter blockers (e.g., missing dependencies, ambiguous requirements), report them clearly.
- 遵循代码库中现有的编码规范和模式。
- **署名**:严禁在你的输出或建议的消息中包含 "Co-authored-by: Claude" 或 AI 签名。
- 不要运行测试;你的首要重点是实施。验证将由单独的代理处理。
- 如果遇到阻碍(例如缺少依赖、需求模糊),请清晰地报告。
Loading