-
Notifications
You must be signed in to change notification settings - Fork 0
feat(devloop): merge coderabbit into custom review #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughRemoved coderabbit/local-agent review options, added optional Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as Devloop Runner
participant Skill as Custom Review Skill
participant Script as devloop-pr-review-threads.sh
participant GH as GitHub (GraphQL)
Runner->>Skill: If review_mode=custom and custom_review_skill set, invoke skill
alt Skill returns findings
Skill-->>Runner: Findings (structured)
Runner->>Runner: Process findings -> apply feedback
else Skill fails or not configured
Runner->>Script: Invoke script with repo/pr
Script->>GH: GraphQL queries (paginate threads/comments)
GH-->>Script: Threads/comments JSON
Script-->>Runner: JSONL of active review comments
Runner->>Runner: Process threads -> decide next steps
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@plugins/devloop/README.md`:
- Line 62: The footer contains a typo "Genrated by
<https://github.com/lollipopkit/cc-plugins>" in plugins/devloop/README.md;
update that exact string to "Generated by
<https://github.com/lollipopkit/cc-plugins>" so the template footer is spelled
correctly (replace the phrase "Genrated by" with "Generated by").
In `@plugins/devloop/scripts/devloop-pr-review-threads.sh`:
- Around line 101-103: The gh api command currently produces pretty-printed
JSON; to ensure true JSONL (one compact JSON object per line) pipe the output
into jq -c to compact each object. Update the command that runs gh api graphql
-F owner="$OWNER" -F name="$NAME" -F pr="$PR" -f query="$QUERY" so its stdout is
piped into jq -c '.' (e.g., append | jq -c '.') after the existing --jq filter
that selects .data.repository.pullRequest.reviewThreads.nodes[] |
select(.isOutdated == false and .isResolved == false) | .comments.nodes[] so
each JSON object is emitted on a single line for JSONL consumers.
- Around line 75-94: The GraphQL query uses reviewThreads(first: 100) and
comments(last: 20) which can truncate results; update the logic that calls this
query to implement cursor-based pagination by adding pageInfo { hasNextPage
endCursor } to both reviewThreads and comments nodes and iterating using the
after parameter until hasNextPage is false, or document the limits; specifically
modify the query and the calling loop that handles reviewThreads and comments
(look for symbols reviewThreads, comments, pageInfo, endCursor, and the after
argument) to page through all results and accumulate nodes instead of relying on
a single-page response.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
plugins/devloop/README.mdplugins/devloop/README.zh-CN.mdplugins/devloop/agents/devloop-runner.mdplugins/devloop/commands/devloop.mdplugins/devloop/scripts/devloop-pr-review-threads.sh
🚧 Files skipped from review as they are similar to previous changes (1)
- plugins/devloop/README.zh-CN.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Markdown linting must ensure compliance with
.markdownlint.jsonconfiguration which disables MD013 and MD041 rules
Files:
plugins/devloop/README.mdplugins/devloop/agents/devloop-runner.mdplugins/devloop/commands/devloop.md
🧠 Learnings (2)
📚 Learning: 2026-01-17T04:29:56.872Z
Learnt from: CR
Repo: lollipopkit/cc-plugins PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-17T04:29:56.872Z
Learning: Applies to */scripts/**/*.{sh,py} : Prefer using GitHub CLI (`gh`) for all GitHub-related operations including PRs, issues, and comments
Applied to files:
plugins/devloop/scripts/devloop-pr-review-threads.shplugins/devloop/agents/devloop-runner.mdplugins/devloop/commands/devloop.md
📚 Learning: 2026-01-17T04:29:56.872Z
Learnt from: CR
Repo: lollipopkit/cc-plugins PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-17T04:29:56.872Z
Learning: Applies to */agents/*.md : Define behavior primarily via system prompts in Markdown files using YAML frontmatter to specify tool permissions
Applied to files:
plugins/devloop/agents/devloop-runner.md
🔇 Additional comments (14)
plugins/devloop/scripts/devloop-pr-review-threads.sh (5)
1-14: Clear header and behavior overview.Good use of strict mode and concise description.
15-29: Usage helper is concise and complete.
31-62: Argument parsing is straightforward.
64-74: Default repo/PR inference reads cleanly.
96-99: JQ passthrough option looks fine.plugins/devloop/commands/devloop.md (3)
43-45: Custom review mode configuration is clear.
49-49: ai_reviewer_id guidance looks fine.
65-69: Helper script invocation is well documented.plugins/devloop/README.md (2)
44-46: Config snippet updates are clear.
51-51: ai_reviewer_id default update is clear.plugins/devloop/agents/devloop-runner.md (4)
84-86: Custom review skill option is well explained.
164-166: Custom review skill trigger timing is clear.
176-180: Script-based review-thread fetch is documented clearly.
182-182: No-findings condition update is clear.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@plugins/devloop/scripts/devloop-pr-review-threads.sh`:
- Around line 36-49: The option parsing loop handling --repo, --pr, and --jq
must guard against missing values: in the while/case block that processes these
flags (the --repo, --pr, --jq branches), check that the next parameter ($2)
exists and does not start with '-' before doing shift 2 and assigning
REPO/PR/JQ_FILTER; if the value is missing or looks like another flag, print a
clear error/usage message and exit nonzero instead of blindly shifting. Update
the branches for --repo, --pr, and --jq to perform this validation and error
handling.
- Around line 32-71: The script calls `gh` in the REPO and PR fallback blocks
(the `gh repo view --json nameWithOwner` and `gh pr view --json number`
invocations) without checking for the GitHub CLI; add an early availability
check for `gh` (similar to the existing `python3` check later) before those
blocks so you can emit a clear error and exit if `gh` is not installed—use
`command -v gh` (or equivalent) and call the script's `usage` or print a
descriptive error then `exit 1` to stop execution.
- Around line 152-169: The gh_graphql function currently returns the parsed JSON
unconditionally and ignores a GraphQL "errors" field; update gh_graphql to
inspect the parsed JSON (result of json.loads(res.stdout)) and if it contains a
non-empty "errors" key, write the errors to stderr (or processLogger) and
raise/exit with a non-zero status so callers don't get silent failures. Keep the
existing subprocess error handling (res.returncode != 0) but after successful
run, parse res.stdout, check for "errors", emit a clear message including the
errors and raise SystemExit or an exception to abort; reference function name
gh_graphql and the parsed response variable when making the change.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
plugins/devloop/README.mdplugins/devloop/scripts/devloop-pr-review-threads.sh
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Markdown linting must ensure compliance with
.markdownlint.jsonconfiguration which disables MD013 and MD041 rules
Files:
plugins/devloop/README.md
🧠 Learnings (1)
📚 Learning: 2026-01-17T04:29:56.872Z
Learnt from: CR
Repo: lollipopkit/cc-plugins PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-17T04:29:56.872Z
Learning: Applies to */scripts/**/*.{sh,py} : Prefer using GitHub CLI (`gh`) for all GitHub-related operations including PRs, issues, and comments
Applied to files:
plugins/devloop/scripts/devloop-pr-review-threads.sh
🔇 Additional comments (1)
plugins/devloop/README.md (1)
44-46: Docs update looks good.The template now reflects
custom_review_skilland the new default reviewer ID behavior consistently.Also applies to: 51-62
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@plugins/devloop/scripts/devloop-pr-review-threads.sh`:
- Around line 84-94: After resolving REPO (the variable set from --repo or gh
repo view) add a guard that validates it contains a single '/' before extracting
OWNER and NAME; if REPO does not match the expected owner/name pattern, emit a
clear error via echo (or the script's logger) and exit nonzero. Specifically,
validate the REPO variable right before the lines that compute
OWNER="${REPO%%/*}" and NAME="${REPO#*/}", and fail fast with a descriptive
message like "Invalid --repo format: expected owner/name" so downstream uses of
OWNER and NAME (and any code referencing REPO) never receive misleading values.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
plugins/devloop/scripts/devloop-pr-review-threads.sh
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-17T04:29:56.872Z
Learnt from: CR
Repo: lollipopkit/cc-plugins PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-17T04:29:56.872Z
Learning: Applies to */scripts/**/*.{sh,py} : Prefer using GitHub CLI (`gh`) for all GitHub-related operations including PRs, issues, and comments
Applied to files:
plugins/devloop/scripts/devloop-pr-review-threads.sh
🔇 Additional comments (6)
plugins/devloop/scripts/devloop-pr-review-threads.sh (6)
16-30: Clear usage/help output.The options and example make invocation straightforward.
36-77: Option parsing is solid and user-friendly.
need_valuekeeps missing values from slipping through, and unknown args produce a clear usage path.
95-121: Control-flow split for--jqis tidy.Early exit keeps the default JSONL path simple and avoids unnecessary setup.
171-196: Helper error handling is robust.Non‑zero subprocess exits and JSON parsing failures are surfaced clearly.
199-201: JSONL emission is straightforward.Clean, minimal emitter with a single responsibility.
204-265: Nested iteration is easy to follow.The loop structure is clear, with early continues to avoid extra work.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
|
@coderabbitai 更新关于单文件行数的限制. 不能超过700行, 超过400行就警告, 以nitpick的方式推荐用户修复 |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain
🛠 Debug Information Gathered
请在仓库根目录的 reviews:
path_instructions:
- path: "**/*"
instructions: |
文件行数检查规则:
- 如果文件超过 700 行,这是一个严重问题,必须拆分文件
- 如果文件超过 400 行,以 nitpick 级别警告,建议考虑重构或拆分文件以提高可维护性
- 在审查时,请明确指出当前文件的行数,并根据上述阈值给出相应的反馈这个配置会:
配置生效后,我会在后续的代码审查中自动检查文件行数并给出相应的反馈。 ✏️ Learnings added
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@plugins/devloop/commands/devloop.md`:
- Around line 12-24: Add a short clarifying note in the "审查策略" section
explaining that custom review behavior is controlled by the config key
custom_review_skill in the devloop local config file (e.g., devloop.local.md),
and show the exact key name (custom_review_skill) and that its value should be
the skill or script to run (for example "coderabbit:review" or a script path).
Update the paragraph describing `custom` to point readers to that config file
and indicate how to specify the skill name/value and that the runner will invoke
that skill each cycle.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
plugins/devloop/README.mdplugins/devloop/agents/devloop-implementer.mdplugins/devloop/agents/devloop-runner.mdplugins/devloop/agents/devloop-validator.mdplugins/devloop/commands/devloop-enable.mdplugins/devloop/commands/devloop.mdplugins/devloop/scripts/devloop-pr-review-threads.shplugins/devloop/skills/feishu-lark-interaction/SKILL.mdplugins/devloop/skills/github-interaction/SKILL.md
✅ Files skipped from review due to trivial changes (2)
- plugins/devloop/agents/devloop-validator.md
- plugins/devloop/skills/feishu-lark-interaction/SKILL.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Markdown linting must ensure compliance with
.markdownlint.jsonconfiguration which disables MD013 and MD041 rules
Files:
plugins/devloop/commands/devloop-enable.mdplugins/devloop/commands/devloop.mdplugins/devloop/skills/github-interaction/SKILL.mdplugins/devloop/README.mdplugins/devloop/agents/devloop-implementer.mdplugins/devloop/agents/devloop-runner.md
🧠 Learnings (3)
📚 Learning: 2026-01-17T04:29:56.872Z
Learnt from: CR
Repo: lollipopkit/cc-plugins PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-17T04:29:56.872Z
Learning: Applies to */skills/SKILL.md : Ensure plugins have a `skills/` directory with complex multi-step capabilities defined in `SKILL.md` files
Applied to files:
plugins/devloop/skills/github-interaction/SKILL.md
📚 Learning: 2026-01-17T04:29:56.872Z
Learnt from: CR
Repo: lollipopkit/cc-plugins PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-17T04:29:56.872Z
Learning: Applies to */scripts/**/*.{sh,py} : Prefer using GitHub CLI (`gh`) for all GitHub-related operations including PRs, issues, and comments
Applied to files:
plugins/devloop/skills/github-interaction/SKILL.mdplugins/devloop/scripts/devloop-pr-review-threads.sh
📚 Learning: 2026-01-17T04:29:56.872Z
Learnt from: CR
Repo: lollipopkit/cc-plugins PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-17T04:29:56.872Z
Learning: Plugins should read per-project configuration from the target project's `.claude/<plugin-name>.local.md` file for local settings
Applied to files:
plugins/devloop/README.md
🪛 LanguageTool
plugins/devloop/commands/devloop.md
[uncategorized] ~8-~8: 您的意思是""倒"可以"?
Context: ...用本插件中的插件组件运行 devloop 工作流。此命令通过重复循环,将任务推进到可以合并的 pull request。 ## 强制工作流 1. **读取设置...
(DAO1_DAO2)
plugins/devloop/README.md
[uncategorized] ~8-~8: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:正确"地"修复
Context: ...sue/任务内容创建一个新的描述性分支。 2. 实施修复:研究并实施正确的修复或实现。 3. 提交:创建一个清晰的提交消息。 4. **Pull ...
(wb4)
[uncategorized] ~9-~9: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:清晰"地"提交
Context: ...实施修复:研究并实施正确的修复或实现。 3. 提交:创建一个清晰的提交消息。 4. Pull Request:打开一个 PR 以供审查。 ...
(wb4)
plugins/devloop/agents/devloop-implementer.md
[uncategorized] ~9-~9: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:必要"地"修改
Context: ...是一个专门负责实施代码更改的子代理。你的目标是研究给定的任务,并对代码库应用必要的修改。 ## 职责 1. 研究:探索代码库以了解当前的实现方式以及所...
(wb4)
[uncategorized] ~14-~14: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:正确"地"修复
Context: ..."`,你应该在分配的工作区路径内工作。 2. 实施:按照任务描述应用正确的修复或功能实现。 3. 自我纠正:如果你的更改引入了明显的语法错误或破坏...
(wb4)
[uncategorized] ~23-~23: 您的意思是""的""吗?
Context: ...施。验证将由单独的代理处理。 - 如果遇到阻碍(例如缺少依赖、需求模糊),请清晰地报告。
(wb4)
plugins/devloop/agents/devloop-runner.md
[uncategorized] ~28-~28: 您的意思是""倒"可以"?
Context: ...h"] --- 你负责运行一个迭代式的工程循环,以解决用户提供的问题并将其推进到可以合并的 PR。你绝对不能直接合并到基准分支(例如 main),除...
(DAO1_DAO2)
[uncategorized] ~33-~33: “关于”组成的介词短语必需位于句首,或请改用"对于"代替。
Context: ...自动化的详细指南。 - feishu-lark-interaction:关于使用飞书项目 (Feishu Project) OpenAPI 的指南。 ##...
(wb2)
[uncategorized] ~41-~41: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:清晰"地"提交
Context: ...证。 2. 实施修复:研究并实施修复。 3. 提交:创建一个清晰的提交消息。 4. Pull Request:打开一个 PR 以供审查。 ...
(wb4)
[uncategorized] ~60-~60: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:正确"地"修复
Context: ...gh issue create 创建一个。 - 创建工作分支,实施最小且正确的修复,并保持更改范围受控。 - 当你认为一个连贯的单元完成时,提交更改。 ##...
(wb4)
[uncategorized] ~70-~70: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:新"地"提交
Context: ...it push -f或git commit --amend。始终创建新的提交并使用标准的 git push`。 - 打开或更新 PR(默认 GitHu...
(wb4)
[uncategorized] ~73-~73: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:不必要"地"更改
Context: ...直到审查满意且 PR 状态为 MERGEABLE。 - 当反馈建议进行不必要的更改时,询问用户是否继续。 - 一旦 PR 获批且 mergeable 状态...
(wb4)
[uncategorized] ~172-~172: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:新"地"审查
Context: ...的 GitHub 轮询。 - 如果审查发现了问题,将其视为新的审查反馈并进入 应用反馈 步骤(跳过本轮剩余的轮询步骤)。 ...
(wb4)
[uncategorized] ~180-~180: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:有效"地"反馈
Context: ... - 使用 GraphQL 过滤掉过时和已解决的评论,以确保你只处理有效的反馈。 - 使用辅助脚本(输出 JSONL;每行一个 JSON ...
(wb4)
🔇 Additional comments (7)
plugins/devloop/agents/devloop-implementer.md (1)
1-4: File length check: 23 lines (below 400/700 thresholds). No split/refactor needed for size.plugins/devloop/commands/devloop-enable.md (1)
1-4: File length check: 56 lines (below 400/700 thresholds). The template cleanly surfacesreview_modeandcustom_review_skillfor the new flow.Also applies to: 24-29
plugins/devloop/scripts/devloop-pr-review-threads.sh (1)
1-4: File length check: 278 lines (below 400/700 thresholds). No split/refactor needed for size.plugins/devloop/skills/github-interaction/SKILL.md (1)
1-4: File length check: 80 lines (below 400/700 thresholds). No split/refactor needed for size.plugins/devloop/agents/devloop-runner.md (1)
1-3: File length check: 218 lines (below 400/700 thresholds). The config section clearly documentsreview_modeandcustom_review_skill.Also applies to: 87-90
plugins/devloop/README.md (1)
1-5: File length check: 62 lines (below 400/700 thresholds). The minimal template includescustom_review_skill, matching the updated flow.Also applies to: 43-46
plugins/devloop/commands/devloop.md (1)
1-33: Docs look good; file length is 33 lines (below 400/700 thresholds).No line-count action needed.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| 1. **读取设置**:读取 `.claude/devloop.local.md` 以获取项目特定的配置(审查模式、分支等)。 | ||
| 2. **确定问题来源**:从 GitHub issue、URL、飞书项目、本地文件或文本描述中识别任务。 | ||
| 3. **调用循环代理**:启动 `devloop-runner` 以执行完整的 修复/审查 周期。 | ||
|
|
||
| ## Behavior | ||
| ## 行为 | ||
|
|
||
| 1. **Determine the issue source**: | ||
| - **初始设置**:如果在基准分支(默认 `main`)上,则创建一个新分支。 | ||
| - **开发周期**:将实施任务委托给 `devloop-implementer`,将验证任务委托给 `devloop-validator`。 | ||
| - **审查循环**: | ||
| - **轮询审查**:等待 PR 状态更改和审查评论。 | ||
| - **审查策略**:遵循设置中的 `review_mode`。 | ||
| - `github`(默认):使用 `scripts/devloop-pr-review-threads.sh` 轮询评论。 | ||
| - `custom`:在每个周期触发特定的技能(例如 `coderabbit:review`)或脚本。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarify the custom_review_skill setting location/name.
The text says “custom” triggers a skill/script, but it doesn’t specify the config key (e.g., custom_review_skill) or where it lives. Add a short note pointing to .claude/devloop.local.md and the exact key to reduce confusion.
🤖 Prompt for AI Agents
In `@plugins/devloop/commands/devloop.md` around lines 12 - 24, Add a short
clarifying note in the "审查策略" section explaining that custom review behavior is
controlled by the config key custom_review_skill in the devloop local config
file (e.g., devloop.local.md), and show the exact key name (custom_review_skill)
and that its value should be the skill or script to run (for example
"coderabbit:review" or a script path). Update the paragraph describing `custom`
to point readers to that config file and indicate how to specify the skill
name/value and that the runner will invoke that skill each cycle.
Summary
Test plan
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.