From 9ddf61a09003d8a2f554e35e0ba587d096a64a4c Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:59:33 +0800 Subject: [PATCH] fix(review): keep Chinese as the primary review language Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- loopx/capabilities/pr_review_queue/README.md | 27 ++++++++++--------- .../pr_review_queue/review_contract.py | 11 +++++--- skills/loopx-pr-review/SKILL.md | 21 ++++++++------- skills/loopx-pr-review/agents/openai.yaml | 2 +- 4 files changed, 35 insertions(+), 26 deletions(-) diff --git a/loopx/capabilities/pr_review_queue/README.md b/loopx/capabilities/pr_review_queue/README.md index e5a22d1ab8..c5b406f7e7 100644 --- a/loopx/capabilities/pr_review_queue/README.md +++ b/loopx/capabilities/pr_review_queue/README.md @@ -773,23 +773,26 @@ starts with `/loopx-pr-review`, words such as `open`, `closed`, `merged`, skip the review. Downgrade only for explicit opt-out phrases such as `只统计`, `只列出`, `stats only`, `list only`, `不要 review`, or `不用分析`. -The published review is a full-PR bilingual review: five complete sections with -English structure and concise Chinese explanations covering every changed -surface, key symbol, positive and negative path, and validation, plus one concise English machine verdict +The published review is a full-PR review primarily in Chinese: five complete +sections covering every changed surface, key symbol, positive and negative path, +and validation, plus one concise English machine verdict (`APPROVE`, `REQUEST_CHANGES`, or the author-owned `COMMENTED` fallback). The body carries the depth and evidence; the English verdict carries the machine-readable state and validation summary. Prefer `动机 / Motivation`, `改动思路 / Approach`, `具体改动 / Changes`, `对主干的风险 / Risks` and `我的整体评价 / Verdict`. These map to the same Chinese canonical section ids; -existing headings and evidence floors remain valid. Older installed parsers can -use Chinese headings with English subheadings until upgraded. - -Use an informative English finding title, followed by short Problem / Evidence / -Impact / Fix paragraphs. Mark validation PASS / FAIL / UNVERIFIED, using compact -tables for actual comparisons. Keep symbols, commands and standard technical -terms in English. Do not mechanically translate each sentence, impose a language -ratio or delete evidence to make the text shorter. This is writing guidance, -not a new language gate. A findings-only or blocker-only body is incomplete. +existing headings and evidence floors remain valid. Older installed parsers use +the canonical Chinese headings; the body's primary language stays Chinese. + +Use connected Chinese prose for the main narrative, problem analysis, evidence +and conclusion. Keep finding titles informative and short; optional +Problem / Evidence / Impact / Fix labels introduce Chinese explanations. Retain +accurate English technical terms, symbols and commands where useful, explaining +unfamiliar terms once. Mark validation PASS / FAIL / UNVERIFIED, using compact +tables for actual comparisons. Do not expand English labels into long English +passages, duplicate the analysis in both languages, impose a language ratio or +delete evidence to make the text shorter. This is writing guidance, not a new +language gate. A findings-only or blocker-only body is incomplete. The opening `动机` must stand alone for a reader unfamiliar with the repository: who encounters the problem, one triggering task and concrete before/after diff --git a/loopx/capabilities/pr_review_queue/review_contract.py b/loopx/capabilities/pr_review_queue/review_contract.py index 950a9f6187..296c7d5b38 100644 --- a/loopx/capabilities/pr_review_queue/review_contract.py +++ b/loopx/capabilities/pr_review_queue/review_contract.py @@ -452,10 +452,13 @@ def build_review_template(item: Mapping[str, Any]) -> dict[str, Any]: "Render the verified structured result using the five sections. " "Open the body with one `Reviewer:` line (reviewer_declaration.body_marker) " "carrying result.reviewer's actor_kind, model and provider. " - "Use English throughout the body as useful structure, with short Chinese explanations: " - "bilingual section headings, an informative English finding title, and Problem / Evidence / " - "Impact / Fix within each finding. Keep symbols, commands and standard technical terms in " - "English; explain unfamiliar terms once. Use PASS / FAIL / UNVERIFIED for validation, and " + "Write the main narrative, analysis, evidence and conclusion in connected Chinese prose. " + "Keep accurate English technical terms, symbols and commands where useful; explain " + "unfamiliar terms once. Bilingual headings, short finding titles and optional " + "Problem / Evidence / Impact / Fix labels can aid navigation, but their explanations " + "stay primarily Chinese. Do not turn English labels into long English paragraphs or " + "a second translation of the same analysis. Keep one concise English verdict. " + "Use PASS / FAIL / UNVERIFIED for validation, and " "a compact table only for genuinely comparable observations. Do not translate every sentence " "twice, impose a language ratio, repeat conclusions or remove evidence to reduce density. " "This is writing guidance, not a new language quota or an exception to any evidence gate. " diff --git a/skills/loopx-pr-review/SKILL.md b/skills/loopx-pr-review/SKILL.md index d4401b0072..97106c26e0 100644 --- a/skills/loopx-pr-review/SKILL.md +++ b/skills/loopx-pr-review/SKILL.md @@ -1,6 +1,6 @@ --- name: loopx-pr-review -description: Use for `/loopx-pr-review` or evidence-backed PR queue review. Run `loopx pr-review` first, execute the capability-owned review plan for each selected exact head, then publish complete reviews with English structure, concise Chinese explanation and an English verdict matching the verified findings. Use `loopx-pr-merge` for approval or merge actions. +description: Use for `/loopx-pr-review` or evidence-backed PR queue review. Run `loopx pr-review` first, execute the capability-owned review plan for each selected exact head, then publish complete reviews primarily in Chinese, with accurate English technical terms and a concise English verdict matching the verified findings. Use `loopx-pr-merge` for approval or merge actions. --- # LoopX PR Review @@ -141,14 +141,17 @@ bypass never overrides this gate, and author fallback needs user authority. Use each PR's current `review_template`, `reviewer_declaration` and `completion_gate.required_final_sections` to render a standalone full-PR review. -Use the packet's bilingual headings (`动机 / Motivation`, `改动思路 / Approach`, -`具体改动 / Changes`, `对主干的风险 / Risks`, `我的整体评价 / Verdict`), with short -Chinese explanations and useful English structure throughout the body. Existing -Chinese-only anchors remain valid; older installed checkers need those anchors -with English subheadings until the shared parser is upgraded. Keep informative -English finding titles and Problem / Evidence / Impact / Fix paragraphs, and -PASS / FAIL / UNVERIFIED validation states. Avoid mechanical sentence-by-sentence -translation, language ratios, dense paragraphs and repeated conclusions. +Write the main narrative, problem analysis, evidence and conclusion in connected +Chinese prose. Retain accurate English technical terms such as head, diff, +checkpoint and resume where they help; explain unfamiliar terms once. The packet's +bilingual headings (`动机 / Motivation`, `改动思路 / Approach`, `具体改动 / Changes`, +`对主干的风险 / Risks`, `我的整体评价 / Verdict`) and short finding labels can aid +navigation. Existing Chinese-only anchors remain valid and are the fallback for +older installed checkers; this does not change the body's primary language. +Optional Problem / Evidence / Impact / Fix labels organize Chinese explanations. +Use PASS / FAIL / UNVERIFIED validation states. Do not expand English labels into +long English passages or duplicate the analysis in both languages. Avoid language +ratios, dense paragraphs and repeated conclusions. A findings-only or blocker-only body is incomplete. Cover every changed surface and key symbols according to the current plan, not just the main finding. Open with the visible `body_marker` matching `result.reviewer`. The **英文简短结论** starts with `English verdict:` and the bare diff --git a/skills/loopx-pr-review/agents/openai.yaml b/skills/loopx-pr-review/agents/openai.yaml index 0a2dcb6058..38ae8339dd 100644 --- a/skills/loopx-pr-review/agents/openai.yaml +++ b/skills/loopx-pr-review/agents/openai.yaml @@ -1,4 +1,4 @@ interface: display_name: "LoopX PR Review" short_description: "Review LoopX PRs with deep key-code explanations" - default_prompt: "Use $loopx-pr-review to execute the current exact-head review packet, publish the checked complete review with English structure and concise Chinese explanations throughout all five sections plus an English verdict, and read back the result." + default_prompt: "Use $loopx-pr-review to execute the current exact-head review packet, publish the checked complete review primarily in Chinese with accurate English technical terms and one concise English verdict, and read back the result."