refactor(review): drop deterministic-analysis and autofix steps - #6092
Conversation
Slim the bundled /review skill from 11 to 9 steps by removing Step 3 (deterministic analysis — auto-run of tsc/eslint/ruff/clippy/go vet plus CI-lint discovery) and Step 8 (autofix — PR-worktree auto-fix, commit and push). Renumber the remaining steps (4→3 … 11→9) and update every cross-reference. Agent 7 (Build & Test) stays in the parallel review step and now always runs build+test instead of skipping when Step 3 had already compiled. The [linter]/[typecheck] source tags are dropped; [build]/[test]/[review] remain. DESIGN.md is updated to match (step numbers, removed Autofix/deterministic rationale, LLM-budget table).
|
Thanks for the PR! (Re-run after multiple review rounds.) Template looks good ✓ — all required headings present, PR body updated to match the final shape (deterministic subcommand removed, not retained). On direction: this is a deliberate simplification — dropping the deterministic-analysis step (auto-running linters/typecheckers) and the autofix step from On approach: the scope is tight and well-contained. Every change in the diff is a necessary consequence of removing the two steps — step renumbering, source tag cleanup ( 中文说明感谢贡献!(多轮 review 后重新运行。) 模板完整 ✓——所有必要标题齐全,PR body 已更新以反映最终形态( 方向:这是一次有意的简化——从 方案:范围紧凑且自包含。diff 中每一处改动都是删除这两步的必然后果——步骤重编号、source tag 清理、死代码删除(约 740 行 — Qwen Code · qwen3.7-max |
Code Review (re-run)Independent proposal (before reading the diff): to remove deterministic analysis and autofix from Comparison with the diff: the PR matches this proposal exactly. Every change is a necessary consequence of removing the two steps. Verified:
No correctness issues, no AGENTS.md violations. The diff is clean and focused. VerificationWorktree Dangling-reference checks (run locally on PR code): Tmux TestingN/A — this is a prompt + docs + dead-code removal PR with no user-visible CLI behavior change. The 中文说明代码审查(重新运行)独立方案(看 diff 前):要从 与 diff 对比: PR 完全匹配这个方案。每处改动都是移除两步的必然后果。已验证:
无正确性问题,无 AGENTS.md 违规。diff 干净且聚焦。 验证结果Worktree 残留引用检查(在 PR 代码上本地运行): Tmux 测试N/A——这是一个 prompt + 文档 + 死代码删除的 PR,没有用户可见的 CLI 行为变更。 — Qwen Code · qwen3.7-max |
Reflection (re-run)Going back to the independent proposal — the PR matches it exactly. Every change is a necessary consequence of removing deterministic analysis and autofix. The diff is focused (9 files, +144 −972), the step renumbering is consistent across all files, the source tag cleanup is thorough, and the new The direction tradeoff is honest and well-reasoned: the deterministic step's multi-language tool matrix and autofix's worktree commit/push add real complexity, and the simplification is worth the loss of the deterministic safety net — especially since Agent 7 still runs build+test, and the exclusion criteria are updated (decoupled from pipeline state) to bring substantive lint/type issues back into LLM scope. The security hardening note carried over from Step 3 to Agent 7 is a thoughtful touch. Multiple rounds of review feedback have been addressed: the Guardrail note: this is a cross-repository fork PR with a 中文说明反思(重新运行)回到独立方案——PR 完全匹配。每处改动都是移除确定性分析和 autofix 的必然后果。diff 聚焦(9 个文件,+144 −972),步骤重编号在所有文件中一致,source tag 清理彻底,新的 方向的权衡诚实且有理:确定性步骤的多语言工具矩阵和 autofix 的 worktree commit/push 确实增加了复杂度,简化值得——尤其是 Agent 7 仍然运行 build+test,排除标准已更新(与 pipeline 状态解耦)将实质 lint/类型问题重新纳入 LLM 范围。从 Step 3 延续到 Agent 7 的安全加固是个用心的细节。 多轮 review 反馈已处理: 护栏说明: 这是一个跨仓库 fork PR 且标题为 — Qwen Code · qwen3.7-max |
| 2. If a matching remote is found, proceed with the **normal worktree flow** — use that remote name (instead of hardcoded `origin`) for `git fetch <remote> pull/<number>/head:qwen-review/pr-<number>`. In Step 9, use the owner/repo from the URL for posting comments. | ||
| 3. If **no remote matches**, use **lightweight mode**: run `gh pr diff <url>` to get the diff directly. Skip Steps 2 (no local rules), 3 (no local linter), 8 (no local files to fix), 10 (no local cache). In Step 11, skip worktree removal (none was created) but still clean up temp files (`.qwen/tmp/qwen-review-{target}-*`). Also fetch existing PR comments using the URL's owner/repo (`gh api repos/{owner}/{repo}/pulls/{number}/comments`) to avoid duplicating human feedback. In Step 9, use the owner/repo from the URL. Inform the user: "Cross-repo review: running in lightweight mode (no build/test, no linter, no autofix)." | ||
| 2. If a matching remote is found, proceed with the **normal worktree flow** — use that remote name (instead of hardcoded `origin`) for `git fetch <remote> pull/<number>/head:qwen-review/pr-<number>`. In Step 7, use the owner/repo from the URL for posting comments. | ||
| 3. If **no remote matches**, use **lightweight mode**: run `gh pr diff <url>` to get the diff directly. Skip Step 2 (no local rules) and Step 8 (no local cache). In Step 9, skip worktree removal (none was created) but still clean up temp files (`.qwen/tmp/qwen-review-{target}-*`). Also fetch existing PR comments using the URL's owner/repo (`gh api repos/{owner}/{repo}/pulls/{number}/comments`) to avoid duplicating human feedback. In Step 7, use the owner/repo from the URL. Inform the user: "Cross-repo review: running in lightweight mode (no build/test)." |
There was a problem hiding this comment.
Stale step reference in lightweight-mode skip list. The old text was:
Skip Steps 2 (no local rules), 3 (no local linter), 8 (no local files to fix), 10 (no local cache)
The PR removed Step 3 (Deterministic analysis — deleted) and Step 8 (Autofix — deleted) from the skip list and renumbered 10→8. But the removed Step 3 (no local linter) was relabeled as Step 2 (no local rules) instead of being dropped entirely. In the new numbering, Step 2 is "Load project review rules" — which IS active in lightweight mode (the loaded rules are injected into review agents in Step 3, including lightweight mode which still runs Agents 1–6).
Suggested fix: remove "Skip Step 2 (no local rules) and" so the line reads:
Skip Step 8 (no local cache). In Step 9, skip worktree removal …
There was a problem hiding this comment.
Thanks for looking, but I think this is a misread of the diff. The original line on main already skipped Step 2: Skip Steps 2 (no local rules), 3 (no local linter), 8 (...), 10 (...). In lightweight (cross-repo) mode there is no local checkout of the target repo, so qwen review load-rules has no local .qwen/review-rules.md / AGENTS.md to read — it loads rules from the base branch, which isn't present locally in cross-repo mode. So Skip Step 2 (no local rules) preserves the original design; it isn't a relabel of the removed Step 3. Step 2 is genuinely skipped in lightweight mode, so I've kept the line as-is.
中文
感谢 review,但我认为这是对 diff 的误读。main 上的原文本来就跳过 Step 2:Skip Steps 2 (no local rules), 3 (no local linter), 8 (...), 10 (...)。lightweight(跨仓库)模式下本地没有目标仓库的 checkout,所以 qwen review load-rules 没有本地 .qwen/review-rules.md / AGENTS.md 可读——它从 base 分支加载 rules,而跨仓库模式下本地没有该 base 分支。因此 Skip Step 2 (no local rules) 是保留原设计,不是把已删的 Step 3 重命名。lightweight 模式确实跳过 Step 2,所以这行我保持原样。
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
Additional suggestions (not inline-annotatable):
[Suggestion] Exclusion criteria creates coverage blind spot (SKILL.md:577) — The exclusion criteria tells LLM agents: "do NOT flag issues that a linter or type checker would catch automatically". But with Step 3 (deterministic analysis) removed, no step runs linters or standalone type checkers anymore. Agent 7's build catches compilation failures, but lint warnings, unused variables, and strict-mode type issues that tsc --noEmit / eslint / ruff would catch are now in a void — agents are told to skip them, but no tool catches them. Consider narrowing the exclusion to purely stylistic issues.
[Suggestion] Orphaned qwen review deterministic CLI subcommand — packages/cli/src/commands/review/deterministic.ts (743 lines) is still imported and registered in review.ts (line 15, 28, 33), but the skill no longer calls it. Consider removing it or adding a deprecation note.
[Suggestion] Documentation not updated — docs/users/features/code-review.md still has full "Deterministic Analysis" and "Autofix" sections, old step numbering, and a comparison table. docs/users/features/commands.md line 132 still mentions "deterministic analysis". These should be updated to match.
[Suggestion] Stale step-number comments in CLI source — packages/cli/src/commands/review/cleanup.ts:7 says "Step 11" (now Step 9) and packages/cli/src/commands/review/presubmit.ts:7,260 says "Step 9" (now Step 7).
— qwen3.7-max via Qwen Code /review
Follow-up to the 11->9 step change, addressing PR review comments: - Restore base-branch CI-config protection in Agent 7. The removed Step 3 carried the instruction to read CI config from the base branch; without it Agent 7 would discover build/test commands from the untrusted PR branch. Re-added to Agent 7's CI-config discovery clause. - Drop the stale "linters" token from the worktree rule (no standalone linter step runs anymore). - Narrow the exclusion criteria: substantive lint/type issues (unused vars, unreachable code, type errors) are no longer auto-excluded now that no deterministic tool catches them; only pure formatting stays excluded. - Update user docs to match: docs/users/features/code-review.md (11->9 steps, remove the Deterministic Analysis and Autofix sections, drop the two comparison-table rows, renumber the Token-efficiency table) and docs/users/features/commands.md (agent count). - Fix stale step-number references in CLI comments: cleanup.ts (Step 11->9) and presubmit.ts (Step 9->7, comment + yargs describe).
|
Thanks for the thorough review — pushed Applied:
Not applied (with reason):
Rebuttal:
中文感谢细致的 review——已推送 已采纳:
未采纳(附理由):
反驳:
|
wenshao
left a comment
There was a problem hiding this comment.
Additional observations (not inline-annotatable):
[Suggestion] Dead code: deterministic.ts still registered in review.ts — qwen review deterministic is still imported and registered in review.ts:15-34, appearing in qwen review --help with "deterministic analysis" in the describe text. The skill prompt no longer invokes it. The PR acknowledges this is intentional, but the stale describe text is actively misleading. Consider removing the import/registration or updating the describe text.
[Suggestion] No test validates new 9-step structure — bundled-skills.integration.test.ts only verifies frontmatter parsing. No test asserts the absence of autofix, [linter], [typecheck], Step 10, Step 11 or the presence of Steps 1-9. Consider adding content assertions to prevent accidental reintroduction.
— qwen3.7-max via Qwen Code /review
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
[Suggestion] The qwen review deterministic subcommand (packages/cli/src/commands/review/deterministic.ts, ~740 lines) and its registration in review.ts are now orphaned — no SKILL.md step invokes it. The PR description explicitly notes this was left in place, but it still ships in the CLI bundle and appears in qwen review --help. If a future SKILL.md edit accidentally references it, the subcommand will produce findings tagged [linter]/[typecheck] that the downstream pipeline no longer recognizes as pre-confirmed (Step 4 deduplication only recognizes [build]/[test]). Consider removing it in a follow-up or adding a @deprecated note.
— qwen3.7-max via Qwen Code /review
yiliang114
left a comment
There was a problem hiding this comment.
Thanks for the follow-up. I did a light pass over the latest revision: the /review flow is consistently reduced to 9 steps, the main user docs and CLI comments are aligned, the base-branch CI-config protection is restored, and the formatting/CI checks are clean. I only see a couple of non-blocking DESIGN.md wording nits that can be handled separately, so this looks good to merge from my side.
Second round of PR feedback: - Remove the now-orphaned `qwen review deterministic` subcommand. review.ts describes these subcommands as "internal helpers used by the /review skill"; with Step 3 gone the skill no longer invokes it, so the ~740-line module plus its import / registration / describe / subcommand-list entries were dead code. Deleted deterministic.ts and its wiring in review.ts. - Decouple the exclusion criterion from pipeline state (SKILL.md): substantive lint/type issues (unused vars, unreachable code, type errors) are now "in scope — LLM agents should report them" rather than "no longer have a deterministic tool catching them", so the rule stays correct if a linter step is ever re-added. - Drop the stale "linting" justification from the worktree dependency-install note (SKILL.md); only build/test remain. - DESIGN.md: rename the subcommands section to "presubmit and cleanup", drop "lint" from the review-tools rejected alternative, and fix the "we already have those" cell to "We retain build/test (Agent 7)".
|
Pushed Reversed my earlier call — removed Other suggestions applied (all inline-resolved):
Verified: 中文已推送 推翻我上一轮的判断——删除了 其他建议已采纳(均已 inline resolve):
已验证: |
|
Thanks for the follow-up. One small housekeeping item before merge: the PR body still reflects the earlier revision. It says this is a prompt/docs-only change with no TypeScript logic change, and that While there, The code diff itself looks clean from my side. Ubuntu CI is green; only the review job is still pending. |
|
@qwen-code /triage |
…rding
Third round of PR feedback:
- Merge the exclusion criteria to remove the contradiction between the unconditional "matches codebase conventions" exclude and the "substantive lint/type issues are in scope" include. Now a single bullet: cosmetic style/formatting/naming is excluded, but substantive issues a linter or type checker would flag (unused variables, unreachable code, type errors) are in scope even where the surrounding code tolerates them. Kept decoupled from pipeline state (no "deterministic tool" wording). Applied in both SKILL.md and docs/users/features/code-review.md.
- SKILL.md lightweight-mode skip: "(no local reports or cache)" to match Step 8's title ("Save review report and cache").
- DESIGN.md: rename the CI-config section to "auto-discover build/test commands" to match the body, which was narrowed to build/test only.
|
@yiliang114 thanks — updated the PR body to match the current state: it now says the Also pushed
CI (ubuntu) is green. 中文@yiliang114 感谢——已更新 PR body 以反映当前状态:现在写明 另外推送了
CI(ubuntu)已通过。 |
wenshao
left a comment
There was a problem hiding this comment.
[Suggestion] Orphaned "linting" reference in Worktree Isolation section
The deleted Deterministic Analysis section previously gave "linting" its meaning here. The line at docs/users/features/code-review.md:76 still reads:
Dependencies are installed in the worktree (
npm ci, etc.) so linting and build/test work
But no linting step remains. The SKILL.md equivalent (line 62) was correctly updated to "agents, build/test" — this doc should match.
- Dependencies are installed in the worktree (`npm ci`, etc.) so build/test work
— qwen3.7-max via Qwen Code /review
…nting ref - Add packages/cli/src/commands/review.test.ts verifying the `qwen review` builder registers exactly [fetch-pr, pr-context, load-rules, presubmit, cleanup], no longer registers the removed `deterministic` subcommand, and that `describe` no longer mentions deterministic analysis. Guards against silently re-adding the subcommand or dropping a helper (review.ts previously had no test). - docs/users/features/code-review.md: drop the orphaned "linting" from the Worktree Isolation dependency-install note; only build/test remain now that Step 3 is gone.
|
Pushed
All ci-bot inline threads are now resolved. The only remaining unresolved thread is DragonnZhang's lightweight-mode Step 2 note, which I rebutted earlier (the original 中文推送了
所有 ci-bot 的 inline thread 现已全部 resolve。唯一剩下的 unresolved 是 DragonnZhang 的 lightweight Step 2 意见,我此前已反驳( |
|
@qwen-code /triage |
1 similar comment
|
@qwen-code /triage |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
No review findings. Downgraded from Approve to Comment: CI still running.
LGTM — clean removal of deterministic analysis and autofix steps. Step renumbering is consistent across all files, deterministic.ts deletion is complete with no dangling imports, build and all relevant tests pass.
— qwen3.7-max via Qwen Code /review
|
Qwen Code review did not complete successfully. Qwen review aborted with an API error before posting comments. See workflow logs. |
yiliang114
left a comment
There was a problem hiding this comment.
LGTM. I reviewed the latest head (39f8435): the scope is focused, the removed deterministic/autofix flow is consistently reflected in the CLI registration, bundled skill prompt, and user docs, and I did not find blocking issues.
Verification run locally in an isolated worktree:
- cd packages/cli && npx vitest run src/commands/review.test.ts (3 passed)
- cd packages/core && npx vitest run src/skills/bundled-skills.integration.test.ts (9 passed)
- npx prettier --check on the changed files (clean)
GitHub's main Qwen Code CI check is green; one automatic review workflow job is still pending, but no blockers from this review.
Stale automated review from an earlier commit; the requested items were addressed in later commits and the latest head has been reviewed and approved.
| names.push(String(m.command).split(' ')[0]); | ||
| return stub; | ||
| }, | ||
| demandCommand: () => stub, |
There was a problem hiding this comment.
[Suggestion] The block comment (line 16) says this test guards against "the describe / demand text drift," but demandCommand: () => stub discards all arguments — the demand message string in review.ts:31 ('Specify a subcommand: fetch-pr, pr-context, load-rules, presubmit, or cleanup.') is never captured or asserted. A future edit could reword that message (e.g., re-add "deterministic") and all three tests would still pass.
Consider capturing the message and asserting on it:
let demandMsg = '';
const stub = {
command: (m: CommandModule) => {
names.push(String(m.command).split(' ')[0]);
return stub;
},
demandCommand: (_min: number, msg: string) => { demandMsg = msg; return stub; },
version: () => stub,
} as unknown as Argv;Then add:
it('demandCommand message does not mention deterministic', () => {
registeredSubcommands();
expect(demandMsg).not.toMatch(/deterministic/i);
});Alternatively, trim the comment to match reality: "…so a future edit can't silently re-add deterministic or drop one of the others."
— qwen3.7-max via Qwen Code /review
| ## Why presubmit and cleanup live as `qwen review` subcommands | ||
|
|
||
| **Original behavior:** Step 9's three pre-submission checks (self-PR detection, CI status, existing-comment classification) and Step 11's cleanup were inlined in SKILL.md as `gh api` / `git` shell commands. The LLM ran each command itself, parsed the output, and applied the classification logic. | ||
| **Original behavior:** Step 7's three pre-submission checks (self-PR detection, CI status, existing-comment classification) and Step 9's cleanup were inlined in SKILL.md as `gh api` / `git` shell commands. The LLM ran each command itself, parsed the output, and applied the classification logic. |
There was a problem hiding this comment.
[Suggestion] The "Original behavior" paragraph was rewritten to use the new step numbers (Step 7 / Step 9) instead of preserving the historical step numbers (Step 9 / Step 11). On main, this line reads Step 9's three pre-submission checks … and Step 11's cleanup — the before/after contrast with the "Current behavior" paragraph is now lost.
Same issue at line 132: Step 6 resolved verdict to APPROVE was Step 7 on main.
"Original behavior" sections should preserve the historical numbering so readers can see what changed:
| **Original behavior:** Step 7's three pre-submission checks (self-PR detection, CI status, existing-comment classification) and Step 9's cleanup were inlined in SKILL.md as `gh api` / `git` shell commands. The LLM ran each command itself, parsed the output, and applied the classification logic. | |
| **Original behavior:** Step 9's three pre-submission checks (self-PR detection, CI status, existing-comment classification) and Step 11's cleanup were inlined in SKILL.md as `gh api` / `git` shell commands. The LLM ran each command itself, parsed the output, and applied the classification logic. |
— qwen3.7-max via Qwen Code /review
main's PR QwenLM#6092 added review.test.ts locking the 'qwen review' subcommand surface to exactly 5 helpers. This PR adds a 6th, post-suggestions, so the guard test must include it. Keeps the deterministic-removal guards intact. Co-Authored-By: Qwen-Coder <noreply@qwen.ai>
…ent (QwenLM#5786) * feat(review): route suggestion-level findings to an updatable PR comment Suggestion-level /review findings now go to a single issue comment that is PATCHed in place across runs, instead of becoming per-line inline comments. Critical findings stay inline. Why: every /review run re-emitted a fresh batch of inline comments with no notion of "this suggestion was already posted and is still open", so the PR Files-changed view grew noisier each round and issues never converged — worst for agentic authors who feel forced to resolve each thread one-by-one. One updatable comment keeps the suggestion list a single refreshable view; the locate-and-PATCH lives in a new deterministic `qwen review post-suggestions` subcommand so the LLM never reposts a duplicate. * fix(review): validate SUMMARY_MARKER in body-file and harden payload cleanup Add runtime validation that the body-file contains SUMMARY_MARKER before posting to GitHub, preventing duplicate summary comments when the marker is accidentally omitted. Move writeFileSync(payloadPath) inside the try block so that finally's unlinkSync cannot throw ENOENT when preceding code throws before the file is written. Wrap unlinkSync in try/catch as best-effort cleanup. * fix(review): add runPostSuggestions tests and clear stale summaries Add 4 integration tests covering the PATCH/POST branching, marker validation, and payload cleanup on error (previously untested I/O path). Update SKILL.md and DESIGN.md so that when a /review run finds zero new Suggestions but a prior summary comment exists, the stale table is replaced with an 'all addressed' message instead of being left frozen. * fix(review): resolve SKILL.md contradictions and add COMMENT event example - Fix body rule to allow unmappable Critical findings in review body - Add JSON example for Suggestion-only COMMENT event reviews - Align --body-file describe text and SKILL.md marker wording with actual includes() validation (was documented as startsWith) * fix(review): exclude suggestion summaries from Already-discussed section in pr-context Filter issue comments containing SUMMARY_MARKER out of the 'Already discussed — do NOT re-report' section and render them in a dedicated 'Previous suggestion summary (evaluate afresh)' section instead. Without this, review agents treat prior suggestion rows as already discussed, produce zero new Suggestions, and the all-addressed path overwrites the summary even though nothing was actually fixed. * fix(review): add author verification to suggestion summary filter * fix(review): ensure out dir exists and frame gh-api parse errors in post-suggestions - mkdirSync(dirname(out)) before writing the payload/report, matching every peer review subcommand (pr-context, fetch-pr, load-rules, deterministic). Without it, an --out under a not-yet-created dir (e.g. .qwen/tmp/) crashed with a raw ENOENT. - Wrap both JSON.parse(raw) of the gh-api response so a non-JSON body (empty, rate-limit JSON, HTML during an outage) throws a diagnostic error naming the failed call and showing the raw output, like fetch-pr.ts does, instead of a bare SyntaxError. Co-Authored-By: Qwen-Coder <noreply@qwen.ai> * fix(review): render previous suggestion summary verbatim in pr-context The 'Previous suggestion summary (evaluate afresh)' section passed the summary body through snippet(), which collapses all whitespace into single spaces and truncates at 500 chars. The summary is a multi-row Markdown table, so this mangled it into an unreadable single line and dropped rows — defeating the 're-evaluate each row' purpose. Render the body verbatim (only stripping the locator marker); it is our own author-verified comment, so preserving its structure is safe. Co-Authored-By: Qwen-Coder <noreply@qwen.ai> * chore(review): restore non-review files to main to keep PR diff scoped The old branch carried prettier/.editorconfig-driven reformats of files unrelated to the /review suggestion-summary feature (mcp-client, acp-bridge, feishu adapter, workflow-orchestrator/client-mcp tests, and channel-loop / settings docs). These are cosmetic-only and not enforced by CI (the prettier step runs 'prettier --write .' without a diff gate), but they polluted the PR. Restore them verbatim to origin/main so the PR diff is review-only. Co-Authored-By: Qwen-Coder <noreply@qwen.ai> * test(review): expect post-suggestions in registered subcommand list main's PR QwenLM#6092 added review.test.ts locking the 'qwen review' subcommand surface to exactly 5 helpers. This PR adds a 6th, post-suggestions, so the guard test must include it. Keeps the deterministic-removal guards intact. Co-Authored-By: Qwen-Coder <noreply@qwen.ai> * fix(review): exclude all stale summaries, add pr-context tests, clarify event rule Address the latest /review suggestions: - pr-context: build summaryIds from every one of my summary comments, not just the latest — a leftover older summary (e.g. after a failed PATCH+POST) was leaking into the 'Already discussed' section and could suppress still-open findings. Extract the author+marker selection into a pure, exported collectSuggestionSummaries() and cover the prompt-injection guard, latest-wins ordering, and full-exclusion behavior in a new pr-context.test.ts. - post-suggestions.test: cover the non-JSON gh-api diagnostic paths (PATCH/POST) and the mkdirSync(dirname(out)) call added in b05280c. - SKILL.md: make the event rule unambiguous — APPROVE only when there are no Critical AND no Suggestion findings; COMMENT for Suggestion-only. Co-Authored-By: Qwen-Coder <noreply@qwen.ai> --------- Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com> Co-authored-by: Qwen-Coder <noreply@qwen.ai>
What this PR does
This PR slims the bundled
/reviewskill from 11 steps to 9 by removing Step 3 (deterministic analysis) — the auto-run of the project's linter and type checker (tsc/eslint/ruff/cargo clippy/go vet) plus CI-lint discovery — and Step 8 (autofix) — the PR-worktree auto-fix that committed and pushed fixes back to the PR branch. The remaining steps are renumbered (4→3 … 11→9) and every cross-reference is updated. Agent 7 (Build & Test) stays in the parallel-review step and now always runs build+test.Since the
qwen review deterministicsubcommand was the internal backend for the removed Step 3 (review.tsdescribes these subcommands as "internal helpers used by the /review skill"), it is now orphaned and is removed together with its import/registration inreview.ts. Companion docs are updated to match:DESIGN.md,docs/users/features/code-review.md(11→9 steps, removed Deterministic Analysis / Autofix sections + comparison-table rows), anddocs/users/features/commands.md.Why it's needed
The deterministic-analysis and autofix steps add significant prompt size and operational complexity to the skill: the deterministic step carries a multi-language tool matrix and CI-config parsing, while autofix performs worktree commits and pushes. Removing them makes
/reviewa leaner, LLM-review-focused flow. Code correctness is still covered by the LLM review agents (Agents 1–6) and by Agent 7, which compiles and tests the change. This is a deliberate simplification tradeoff — see Risk & Scope.Reviewer Test Plan
How to verify
The change is the bundled-skill prompt + its docs, plus removal of the now-unused
deterministicCLI subcommand.cd packages/core && npx vitest run src/skills/bundled-skills.integration.test.ts→ 9 passed.cd packages/cli && npx vitest run src/services/BundledSkillLoader.test.ts→ 23 passed.deterministic.ts, the CLI still type-checks:npm --prefix packages/core run build && npm --prefix packages/cli run typecheckreports no review/deterministic error (any remaining errors are pre-existing localdiststaleness in unrelated packages; CI builds fresh).git grep deterministicCommand→ no remaining references;deterministic.tshad no dedicated test.npx prettier --checkon the changed files → clean.Evidence (Before & After)
Before: 11 steps (incl. Step 3 deterministic analysis and Step 8 Autofix) plus the
qwen review deterministicsubcommand. After: 9 steps, both removed and the rest renumbered, and the subcommand deleted. N/A for screenshots (skill prompt + docs + dead-code removal).Tested on
Skill prompt + docs + dead-code removal with no platform-specific behavior; the vitest suites and typecheck run on all three OSes in CI.
Environment (optional)
Unit tests + typecheck (vitest / tsc); no runtime/sandbox needed.
Risk & Scope
/reviewno longer auto-runs a linter/type checker, so lint/type regressions lose their deterministic safety net — coverage now relies on the LLM review agents plus Agent 7's build (which includes compilation). This is the intended simplification tradeoff and runs counter to the original "deterministic ground-truth" design rationale.qwen review deterministicsubcommand is removed (it was the Step 3 backend and became orphaned once Step 3 was gone). The local "fix these issues" interactive edit in the present step is retained./reviewrun against a live PR; verification is the unit tests + typecheck + format/content checks above. No test was removed (deterministic.ts had none).Linked Issues
N/A.
中文说明
这个 PR 做了什么
把内置
/reviewskill 从 11 步精简到 9 步,删除 Step 3(确定性分析)——自动跑 linter/类型检查(tsc/eslint/ruff/cargo clippy/go vet)加 CI-lint 发现——和 Step 8(autofix)——在 PR worktree 里自动修复并 commit、push 回 PR 分支。剩余步骤重编号(4→3 … 11→9),所有交叉引用同步。Agent 7(Build & Test)保留在并行 review 步骤,现在总是跑 build+test。由于
qwen review deterministic子命令是被删的 Step 3 的内部后端(review.ts把这些子命令描述为_"internal helpers used by the /review skill"_),它现在 orphaned,故连同review.ts里的 import/注册一并删除。配套文档同步更新:DESIGN.md、docs/users/features/code-review.md(11→9 步、删除 Deterministic Analysis / Autofix 两节 + 对比表行)、docs/users/features/commands.md。为什么需要
确定性分析和 autofix 两步给 skill 增加了相当多的 prompt 体积和操作复杂度:确定性步骤带多语言工具矩阵和 CI 配置解析,autofix 执行 worktree 的 commit 和 push。移除它们让
/review更精简、聚焦 LLM 评审。代码正确性仍由 LLM review agents(Agent 1–6)和会编译并测试改动的 Agent 7 覆盖。这是有意的简化权衡——见风险与范围。Reviewer Test Plan
如何验证
改动是内置 skill 的 prompt + 文档,外加删除已不再使用的
deterministicCLI 子命令。cd packages/core && npx vitest run src/skills/bundled-skills.integration.test.ts→ 9 passed。cd packages/cli && npx vitest run src/services/BundledSkillLoader.test.ts→ 23 passed。deterministic.ts后 CLI 仍能类型检查:npm --prefix packages/core run build && npm --prefix packages/cli run typecheck无 review/deterministic 相关错误(剩余错误是本地无关包dist陈旧的既有问题;CI 全新构建)。git grep deterministicCommand→ 无残留引用;deterministic.ts无专用测试。npx prettier --check→ 干净。证据(Before & After)
Before:11 步(含 Step 3 确定性分析、Step 8 Autofix)加
qwen review deterministic子命令。After:9 步、两步删除、其余重编号、子命令删除。截图 N/A(skill prompt + 文档 + 死代码删除)。测试平台
skill prompt + 文档 + 死代码删除,无平台特定行为;vitest 套件和 typecheck 在 CI 三个 OS 上都会跑。
环境(可选)
单元测试 + typecheck(vitest / tsc);不需要运行时/sandbox。
风险与范围
/review不再自动跑 linter/类型检查,lint/type 回归失去确定性安全网——覆盖现在依赖 LLM review agents 加 Agent 7 的 build(含编译)。这是有意的简化权衡,与原本"确定性 ground-truth"设计理念相反。qwen review deterministic子命令已删除(它是 Step 3 的后端,Step 3 删了它就 orphaned)。present 步骤里本地的 "fix these issues" 交互式编辑保留。/review;验证是上面的单元测试 + typecheck + 格式/内容检查。没有删除任何测试(deterministic.ts 本就没有)。Linked Issues
N/A。