ci: @claude 审核默认改用 Opus 4.8,复杂时主 Agent 自行派发子 Agent#669
Merged
Conversation
Contributor
PR Reviewer Guide 🔍(Review updated until commit 4a986fe)Here are some key observations to aid the review process:
|
- 默认模型 claude-sonnet-4-6 → claude-opus-4-8;评论写 --sonnet(或含 claude-sonnet)降级省 OAuth 额度 - claude_args 放行 Task + Read/Grep/Glob(不放行 Bash,保持只读、不执行 PR 代码) - append-system-prompt:默认单主 Agent 审核,仅改动较大/复杂时才自行派发子 Agent 再汇总 - append-system-prompt 内置全平台适配性要求:扫描/审核时核对 macOS/Windows/Linux 三端 #[cfg(target_os=...)] 分支是否同步(Linux 多处 allow(dead_code) 最易漏),识别仅单平台生效或破坏他端的改动
d003f07 to
4a986fe
Compare
Contributor
|
Persistent review updated to latest commit 4a986fe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
背景
@claude云端审核(.github/workflows/claude.yml)原来默认用claude-sonnet-4-6,只在评论写--opus时升级。本次按需求把默认审核模型改为 Opus 4.8,并保留主 Agent 在复杂改动时自行派发子 Agent的能力(不强制多 Agent 架构)。改动(仅
claude.yml,+17/-8)claude-sonnet-4-6→claude-opus-4-8。开关反转:原--opus升级开关改成--sonnet降级开关 —— 评论写--sonnet(或含claude-sonnet)才降回 sonnet,作为简单任务的省额度逃生通道。--append-system-prompt指示默认由单个主 Agent 完成审核;仅当改动较大/复杂时,主 Agent 才用Task工具自行派发子 Agent 协助并汇总。--allowedTools "Task,Read,Grep,Glob"—— 允许派发子 Agent 及只读审码。不放行Bash,审核保持只读、不执行 PR 代码。为什么 base 是
main而不是betaclaude.yml由issue_comment/issues/pull_request_review等事件触发,GitHub Actions 对这类事件一律使用默认分支(main)上的 workflow 文件。所以此改动必须落到main才会真正改变@claude的行为;合并到beta不会生效。本 PR 为纯 CI 配置改动,不含应用代码,直接进 main 安全。取舍
Opus 4.8 的 token 消耗高于 sonnet。但触发面未变 —— 仍是只有组织成员主动
@claude才跑、不自动 review,总量可控;急用省钱时评论带--sonnet即可降级。测试计划
ruby -ryaml校验 YAML 合法,claude_args三个 flag(--model/--allowedTools/--append-system-prompt)解析正确(append-system-prompt 为单行、双引号包裹、内部无双引号)pick_model逻辑:默认输出claude-opus-4-8,命中--sonnet/claude-sonnet时输出claude-sonnet-4-6@claude跑一次,确认用 Opus 4.8、单主 Agent 正常出审核结论;再用@claude --sonnet确认能降级PR Type
Enhancement
Description
Default model switched to claude-opus-4-8 with opt-down via --sonnet comment
Allowed Task, Read, Grep, Glob tools for complex sub-agent dispatch
Added cross-platform compatibility checks in system prompt
Diagram Walkthrough
File Walkthrough
claude.yml
Switch default model and enhance agent capabilities.github/workflows/claude.yml
comment
dispatch
single-agent guidance