gh-address-cr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesegh-address-cr
gh-address-cr
Use this skill as the PR review orchestrator. It owns session state, intake routing, and the final gate.
将此skill用作PR评审编排器。它负责会话状态、输入路由以及最终校验门。
Usage
使用方法
text
/gh-address-cr review <owner/repo> <pr_number>
/gh-address-cr threads <owner/repo> <pr_number>
/gh-address-cr findings <owner/repo> <pr_number> --input <path>|-
/gh-address-cr adapter <owner/repo> <pr_number> <adapter_cmd...>text
/gh-address-cr review <owner/repo> <pr_number>
/gh-address-cr threads <owner/repo> <pr_number>
/gh-address-cr findings <owner/repo> <pr_number> --input <path>|-
/gh-address-cr adapter <owner/repo> <pr_number> <adapter_cmd...>Packaging Scope
打包范围
This file is part of the packaged skill.
All paths in this document are relative to the installed skill root.
gh-address-cr- means files inside this packaged skill
scripts/... - means skill-owned reference docs
references/... - is an assistant-specific hint file inside the skill
agents/openai.yaml
A surrounding source repository may also contain repo-level tests, CI, and release metadata, but those are outside the packaged skill payload.
本文件是打包后的 skill的一部分。本文档中的所有路径均相对于已安装的skill根目录。
gh-address-cr- 指此打包skill内的文件
scripts/... - 指skill所属的参考文档
references/... - 是skill内的一个助手特定提示文件
agents/openai.yaml
外部的源仓库可能还包含仓库级别的测试、CI和发布元数据,但这些不属于打包后的skill payload。
Agent Execution Ladder
Agent执行阶梯
Read this skill in this order when you are an AI agent:
- Start from the public main entrypoint: .
review <owner/repo> <pr_number> - If returns
review, fill the handoff files in the PR workspace:WAITING_FOR_EXTERNAL_REVIEWproducer-request.mdincoming-findings.jsonincoming-findings.md
- Rerun the same command. It will auto-consume findings JSON or fixed
reviewblocks and continue orchestration.finding - If returns
review, inspect the loop request artifact, applyBLOCKED,fix, orclarify, then rerun the samedefercommand.review - Use ,
threads,findings, andadapteronly as advanced/internal integration surfaces.review-to-findings
Fail-fast rules:
- is the only public main entrypoint.
review - does not bind to any one review skill or tool name.
review - If findings are absent, returns
reviewand writes a standard producer handoff request instead of waiting onWAITING_FOR_EXTERNAL_REVIEW.stdin - External review producer output must be findings JSON or fixed blocks.
finding - does not accept arbitrary Markdown. It only accepts the fixed
review-to-findingsblock format.finding - ,
review, andthreadsrequireadapteronghand fail immediately when it is missing.PATH - The high-level CLI commands are the only agent-safe public surface. Treat low-level scripts as internal implementation details.
Important:
- is the default end-to-end orchestrator and the public main entrypoint.
review - manages session state, external review handoff, GitHub threads, and final-gate.
review - ,
threads,findings, andadapterare advanced/internal entrypoints for explicit integrations.review-to-findings - is only a converter. It is not a review engine and it is not a general Markdown parser.
review-to-findings
Recommended high-level entrypoints:
review- public main entrypoint
- generates a standard producer handoff when findings are absent
- handles both local findings and GitHub review threads in one run
threads- advanced/internal: GitHub review threads only
findings- advanced/internal: existing findings JSON only
- handles local findings only; it does not process GitHub review threads
adapter- advanced/internal: adapter-produced findings plus PR orchestration
review-to-findings- advanced/internal: fixed-format finding blocks to findings JSON
Examples:
text
$gh-address-cr review <PR_URL>
$gh-address-cr threads <PR_URL>
$gh-address-cr findings <PR_URL> --input findings.json
$gh-address-cr findings <PR_URL> --input - --sync
$gh-address-cr adapter <PR_URL> <adapter_cmd...>
$gh-address-cr review-to-findings <owner/repo> <pr_number> --input -Minimal valid input:
review-to-findingstext
```finding
title: Missing null guard
path: src/example.py
line: 12
body: Potential null dereference.
```This converter rejects plain narrative Markdown review output.
AI Agent请按以下顺序使用此skill:
- 从公开主入口开始:。
review <owner/repo> <pr_number> - 如果返回
review,在PR工作区中填充交接文件:WAITING_FOR_EXTERNAL_REVIEWproducer-request.mdincoming-findings.jsonincoming-findings.md
- 重新运行相同的命令。它会自动读取结果JSON或已修复的
review块并继续编排。finding - 如果返回
review,检查循环请求工件,执行BLOCKED、fix或clarify操作,然后重新运行相同的defer命令。review - 仅将、
threads、findings和adapter用作高级/内部集成接口。review-to-findings
快速失败规则:
- 是唯一的公开主入口。
review - 不绑定到任何特定的评审skill或工具名称。
review - 如果结果缺失,会返回
review并生成标准的生产者交接请求,而非等待WAITING_FOR_EXTERNAL_REVIEW输入。stdin - 外部评审生产者的输出必须是结果JSON或已修复的块。
finding - 不接受任意Markdown格式,仅接受固定的
review-to-findings块格式。finding - 、
review和threads要求adapter在gh中,若缺失会立即失败。PATH - 高级CLI命令是唯一对Agent安全的公开接口,将低级脚本视为内部实现细节。
重要说明:
- 是默认的端到端编排器和公开主入口。
review - 管理会话状态、外部评审交接、GitHub线程以及最终校验门。
review - 、
threads、findings和adapter是用于显式集成的高级/内部入口。review-to-findings - 仅为转换器,不是评审引擎,也不是通用Markdown解析器。
review-to-findings
推荐的高级入口:
review- 公开主入口
- 当结果缺失时生成标准的生产者交接请求
- 一次运行即可处理本地结果和GitHub评审线程
threads- 高级/内部:仅处理GitHub评审线程
findings- 高级/内部:仅处理已有的结果JSON
- 仅处理本地结果,不处理GitHub评审线程
adapter- 高级/内部:适配器生成的结果加上PR编排
review-to-findings- 高级/内部:将固定格式的finding块转换为结果JSON
示例:
text
$gh-address-cr review <PR_URL>
$gh-address-cr threads <PR_URL>
$gh-address-cr findings <PR_URL> --input findings.json
$gh-address-cr findings <PR_URL> --input - --sync
$gh-address-cr adapter <PR_URL> <adapter_cmd...>
$gh-address-cr review-to-findings <owner/repo> <pr_number> --input -review-to-findingstext
```finding
title: Missing null guard
path: src/example.py
line: 12
body: Potential null dereference.
```此转换器会拒绝普通叙述性的Markdown评审输出。
Machine Summary Contract
机器摘要约定
High-level commands emit structured JSON by default. Agents should consume these fields, not parse human prose:
statusrepopr_numberitem_iditem_kindcountsartifact_pathreason_codewaiting_onnext_actionexit_code
reason_codewaiting_oncounts.*null高级命令默认输出结构化JSON。Agent应读取这些字段,而非解析自然语言:
statusrepopr_numberitem_iditem_kindcountsartifact_pathreason_codewaiting_onnext_actionexit_code
reason_codewaiting_oncounts.*nullAdvanced References
高级参考
- Dispatch details:
references/mode-producer-matrix.md - Review triage checklist:
references/cr-triage-checklist.md - Optional OTel -> Worker -> Better Stack logging:
references/otel-worker-better-stack.md - Low-level scripts are implementation details, not the public agent surface.
Examples that require advanced dispatch details live in the reference docs instead of the first-read contract.
- 调度详情:
references/mode-producer-matrix.md - 评审分类检查清单:
references/cr-triage-checklist.md - 可选OTel -> Worker -> Better Stack日志:
references/otel-worker-better-stack.md - 低级脚本是实现细节,不属于公开的Agent接口。
需要高级调度详情的示例请参考参考文档,而非首次阅读的约定内容。
Entry Contract
入口约定
Treat as the source of truth for using this skill.
SKILL.md- Start from the high-level dispatcher:
python3 scripts/cli.py review <owner/repo> <pr_number>python3 scripts/cli.py threads <owner/repo> <pr_number>python3 scripts/cli.py findings <owner/repo> <pr_number> --input <path>|- [--sync]python3 scripts/cli.py adapter <owner/repo> <pr_number> <adapter_cmd...>
- Use only for mode-specific dispatch details.
references/mode-producer-matrix.md - Do not rely on for unique behavior; it is only a thin assistant-specific hint layer.
agents/openai.yaml
将视为使用此skill的权威来源。
SKILL.md- 从高级调度器开始:
python3 scripts/cli.py review <owner/repo> <pr_number>python3 scripts/cli.py threads <owner/repo> <pr_number>python3 scripts/cli.py findings <owner/repo> <pr_number> --input <path>|- [--sync]python3 scripts/cli.py adapter <owner/repo> <pr_number> <adapter_cmd...>
- 仅在需要特定模式的调度详情时使用。
references/mode-producer-matrix.md - 不要依赖实现独特行为,它仅为一层薄的助手特定提示层。
agents/openai.yaml
Capability Status
功能状态
These high-level paths are fully operational now:
reviewthreadsfindingsadapter
The internal iteration and dispatch layers are implementation details and are not part of the public entrypoint surface.
Advanced producer and dispatch details live in:
references/mode-producer-matrix.mdreferences/cr-triage-checklist.md
以下高级路径目前已完全可用:
reviewthreadsfindingsadapter
内部迭代和调度层是实现细节,不属于公开入口接口。
高级生产者和调度详情请参考:
references/mode-producer-matrix.mdreferences/cr-triage-checklist.md
Non-Negotiable Rule
不可协商规则
python3 scripts/cli.py final-gate- Never output "done", "all resolved", "completed", or equivalent unless:
- has just passed, and
python3 scripts/cli.py final-gate <owner/repo> <pr_number> - output includes , and
Verified: 0 Unresolved Threads found - output includes , and
Verified: 0 Pending Reviews found - session blocking item count is zero.
- Use or the machine-readable count lines printed by
audit_summary.mdwhen run-scoped diagnostics are needed.final-gate - If gate fails, continue iteration; completion summary is forbidden.
在发布任何完成声明前,必须通过校验。
python3 scripts/cli.py final-gate- 除非满足以下所有条件,否则不得输出"完成"、"全部解决"、"已完成"或类似表述:
- 刚执行完且通过
python3 scripts/cli.py final-gate <owner/repo> <pr_number> - 输出包含
Verified: 0 Unresolved Threads found - 输出包含
Verified: 0 Pending Reviews found - 会话阻塞项数量为0
- 刚执行完
- 当需要运行范围的诊断信息时,使用或
audit_summary.md输出的机器可读计数行。final-gate - 如果校验门失败,继续迭代;禁止发布完成摘要。
Core Rules
核心规则
- Use the high-level task entrypoints first:
python3 scripts/cli.py review <owner/repo> <pr_number>python3 scripts/cli.py threads <owner/repo> <pr_number>python3 scripts/cli.py findings <owner/repo> <pr_number> --input <path>|-python3 scripts/cli.py adapter <owner/repo> <pr_number> <adapter_cmd...>
- Use the internal low-level dispatch only when the high-level entrypoints do not fit.
- Process only unresolved GitHub threads and open local findings.
- For GitHub review threads, reply and resolve are both mandatory.
- Outdated / GitHub threads are still unresolved until explicitly handled.
STALE - For local findings, terminal handling must include a note.
- must emit findings JSON before session handling starts.
producer=code-review - Never declare completion before passes.
python3 scripts/cli.py final-gate
- 优先使用高级任务入口:
python3 scripts/cli.py review <owner/repo> <pr_number>python3 scripts/cli.py threads <owner/repo> <pr_number>python3 scripts/cli.py findings <owner/repo> <pr_number> --input <path>|-python3 scripts/cli.py adapter <owner/repo> <pr_number> <adapter_cmd...>
- 仅当高级入口不适用时,才使用内部低级调度。
- 仅处理未解决的GitHub线程和未关闭的本地结果。
- 对于GitHub评审线程,回复和解决操作都是必须的。
- 已过时/标记为的GitHub线程在未明确处理前仍视为未解决。
STALE - 对于本地结果,最终处理必须包含备注。
- 必须在会话处理开始前输出结果JSON。
producer=code-review - 在通过前,不得宣布完成。
python3 scripts/cli.py final-gate
Automatic Iteration
自动迭代
The default review entrypoint runs repeated intake, item selection, action execution, and gate evaluation internally until the PR session converges.
- The internal fixer handoff path uses the current AI agent by default.
- If a finding cannot be resolved automatically, the workflow records an internal fixer request artifact for the agent to handle.
- Advanced external fixer commands remain available for integrations that need an explicit command boundary.
- External fixer commands must read a JSON payload from stdin and return a JSON object containing:
- :
resolution,fix, orclarifydefer note- for GitHub thread :
fixfix_replycommit_hashfiles- optional ,
severity,why,test_commandtest_result - may be used as the default validation evidence when
validation_commands/test_commandare omittedtest_result
- for GitHub thread or
clarify:deferreply_markdown - optional
validation_commands
- and
code-reviewproducers are consumed once per review run.json - producer is re-run on each iteration.
adapter - The workflow exits as:
- when gate succeeds
PASSED - when retry thresholds are exceeded
NEEDS_HUMAN - when a non-recoverable orchestration step fails
BLOCKED
默认的评审入口会在内部重复执行输入、项选择、操作执行和校验门评估,直到PR会话收敛。
- 内部修复交接路径默认使用当前AI Agent。
- 如果某个结果无法自动解决,工作流会记录一个内部修复请求工件供Agent处理。
- 对于需要显式命令边界的集成,仍可使用高级外部修复命令。
- 外部修复命令必须从stdin读取JSON payload,并返回包含以下内容的JSON对象:
- :
resolution、fix或clarifydefer note- 针对GitHub线程的操作:
fixfix_replycommit_hashfiles- 可选的、
severity、why、test_commandtest_result - 当省略/
test_command时,test_result可作为默认的验证证据validation_commands
- 针对GitHub线程的或
clarify操作:deferreply_markdown - 可选的
validation_commands
- 和
code-review生产者在每次评审运行中仅被读取一次。json - 生产者在每次迭代中都会重新运行。
adapter - 工作流会以下列状态退出:
- :校验门成功
PASSED - :超过重试阈值
NEEDS_HUMAN - :不可恢复的编排步骤失败
BLOCKED
Producer Contract
生产者约定
gh-address-cr- is a producer, not the session owner.
code-review - here means "review-style findings producer", not one mandatory skill name.
code-review - now uses the built-in
code-reviewbackend for structured intake.code-review-adapter - If the upstream review output is fixed-format blocks, normalize it with
findingbefore ingestion.review-to-findings - does not accept arbitrary Markdown prose.
review-to-findings - only assumes the normalized finding contract:
gh-address-crtitlebodypathline
- Accepted findings input shapes:
- JSON array of finding objects
- JSON object with ,
findings, orissuesresults - NDJSON, one finding object per line
- Accepted field aliases:
- or
pathorfilefilename - or
lineorstart_lineposition - or
titleorrulecheck - or
bodyormessagedescription
- Input path rule:
- use only when a producer already emitted a real JSON file
--input <path> - otherwise prefer and pipe findings through
--input -stdin - do not create ad-hoc temporary findings files in the project workspace just to drive the workflow
- use
- Refresh rule:
- use when re-ingesting the same source and you want missing local findings to auto-close
--sync
- use
- Supported dispatch paths live in:
references/mode-producer-matrix.md
gh-address-cr- 是生产者,而非会话所有者。
code-review - 此处的指"评审风格的结果生产者",而非某个必须的skill名称。
code-review - 目前使用内置的
code-review后端进行结构化输入。code-review-adapter - 如果上游评审输出是固定格式的块,在导入前需使用
finding进行标准化。review-to-findings - 不接受任意Markdown文本。
review-to-findings - 仅依赖标准化的结果约定:
gh-address-crtitlebodypathline
- 接受的结果输入格式:
- 结果对象的JSON数组
- 包含、
findings或issues的JSON对象results - NDJSON,每行一个结果对象
- 接受的字段别名:
- 或
path或filefilename - 或
line或start_lineposition - 或
title或rulecheck - 或
body或messagedescription
- 输入路径规则:
- 仅当生产者已生成真实JSON文件时,使用
--input <path> - 否则优先使用并通过stdin管道传输结果
--input - - 不要为了驱动工作流而在项目工作区中创建临时结果文件
- 仅当生产者已生成真实JSON文件时,使用
- 刷新规则:
- 当重新导入同一来源且希望自动关闭缺失的本地结果时,使用
--sync
- 当重新导入同一来源且希望自动关闭缺失的本地结果时,使用
- 支持的调度路径请参考:
references/mode-producer-matrix.md
Discovery Rules
适用场景
Use this skill when the task involves one or more of these needs:
- handle GitHub PR review threads with explicit reply and resolve steps
- ingest local review findings into a PR-scoped session
- run a final gate before declaring review completion
- keep remote threads and local findings under one auditable PR session
Do not use this skill as the review engine itself.
- It manages intake, state, processing discipline, and gating.
- It does not own the reasoning logic of external review producers.
当任务涉及以下一项或多项需求时,使用此skill:
- 处理GitHub PR评审线程,包含明确的回复和解决步骤
- 将本地评审结果导入PR范围的会话
- 在宣布评审完成前运行最终校验门
- 在一个可审计的PR会话中管理远程线程和本地结果
请勿将此skill用作评审引擎本身。
- 它负责输入、状态、处理规范和校验门管理。
- 它不拥有外部评审生产者的推理逻辑。
Decision Matrix
决策矩阵
- Accept: real bug or low-cost valid improvement; fix and provide evidence.
- Clarify: reviewer misunderstood the code; explain without changing code.
- Defer: non-blocking or high-cost preference; explain the tradeoff.
- Reject: suggestion is technically incorrect, conflicts with the current contract, or would break an intentional compatibility guarantee.
- 接受:真实bug或低成本的有效改进;修复并提供证据。
- 澄清:评审者误解了代码;无需修改代码,仅作解释。
- 推迟:非阻塞或高成本的偏好;解释权衡理由。
- 拒绝:建议在技术上不正确、与当前约定冲突,或会破坏有意的兼容性保证。
Fix Selection Rules
修复选择规则
Before changing code, classify each item in this order:
- Validity
- : reproducible in current HEAD or directly supported by code/tests
confirmed - : not yet verified; do not implement blindly
unclear - : technically incorrect or based on missing context
rejected
- Impact
- Does it affect correctness, session/gate consistency, runtime safety, compatibility, packaging, or CI?
- Scope Fit
- Is the fix local to the current PR, or does it expand into a new design decision or larger refactor?
- Decision
- ,
fix,clarify, ordeferreject
Use these defaults:
- Default to for correctness bugs, state mismatches, concurrency hazards, compatibility regressions, install/runtime breakage, and P1/P2 issues that can be verified.
fix - Default to when behavior is intentional and the reviewer lacks context.
clarify - Default to when the issue is real but out of scope for the current PR or would force broader redesign.
defer - Default to when the suggestion is technically unsound or would violate an explicit workflow contract.
reject
Do not change code until the item has been validated and classified.
在修改代码前,按以下顺序对每个项进行分类:
- 有效性
- :在当前HEAD中可复现,或直接由代码/测试支持
confirmed - :尚未验证;不要盲目实现
unclear - :技术上不正确或基于缺失的上下文
rejected
- 影响
- 它是否影响正确性、会话/校验门一致性、运行时安全性、兼容性、打包或CI?
- 范围适配性
- 修复是否局限于当前PR,还是会扩展为新的设计决策或更大规模的重构?
- 决策
- 、
fix、clarify或deferreject
使用以下默认规则:
- 对于正确性bug、状态不匹配、并发风险、兼容性回归、安装/运行时故障以及可验证的P1/P2问题,默认选择。
fix - 当行为是有意设计且评审者缺乏上下文时,默认选择。
clarify - 当问题真实存在但超出当前PR范围,或会迫使进行更广泛的重新设计时,默认选择。
defer - 当建议在技术上不合理或违反明确的工作流约定时,默认选择。
reject
在项经过验证和分类前,请勿修改代码。
Scope Guardrails
范围约束
Do not "fix" items just to make the thread disappear.
- Do not expand the PR with unrelated refactors.
- Do not change public behavior for style-only comments.
- Do not weaken compatibility defaults unless the review identifies a real regression.
- Do not let a reviewer preference override an existing, tested contract without explicit product intent.
If a review item is real but not appropriate for the current PR, reply with and a concrete rationale instead of stretching scope.
defer不要为了让线程消失而"修复"项。
- 不要在PR中添加无关的重构内容。
- 不要因仅涉及风格的评论而修改公共行为。
- 除非评审指出真实的回归问题,否则不要弱化兼容性默认设置。
- 在没有明确产品意图的情况下,不要让评审者的偏好覆盖已有的、经过测试的约定。
如果评审项真实存在但不适合当前PR,请回复并给出具体理由,而非扩大范围。
deferNeeds-Human Escalation
需要人工介入的升级场景
Prefer over speculative fixes when:
NEEDS_HUMAN- the claim cannot be verified from the codebase or tests
- two valid concerns conflict and require a product decision
- the fix would create a new interface or contract
- the same item keeps reopening after multiple technically sound attempts
- the suggestion conflicts with an intentional compatibility or workflow rule and the tradeoff is not obvious
gh-address-cr在以下情况下,优先选择而非推测性修复:
NEEDS_HUMAN- 无法从代码库或测试中验证该主张
- 两个有效的关注点冲突,需要产品决策
- 修复会创建新的接口或约定
- 同一问题在多次技术上合理的尝试后仍反复出现
- 建议与有意的兼容性或工作流规则冲突,且权衡不明显
gh-address-crAgent Feedback
Agent反馈
- When the skill itself blocks progress, file a feedback issue against the skill repository before giving up.
- Use feedback issues for skill-level problems such as contradictory instructions, missing automation, documentation gaps, or repeatable tooling failures that are not caused by the repository under review.
- Do not file feedback issues for normal PR findings, code bugs in the target repository, or expected wait states such as .
WAITING_FOR_EXTERNAL_REVIEW - Do not include usernames, emails, tokens, machine names, or absolute local paths in feedback issues.
- Prefer safe technical diagnostics such as failing command, exit code, status, ,
reason_code,waiting_on, and skill version.run_id - When and
--using-repoare present,--using-prauto-collects local PR-workspace evidence fromsubmit_feedback.py,last-machine-summary.json,session.json, and cached PR head SHA when those files exist.audit_summary.md - Repeated feedback is deduplicated by fingerprint; if the same feedback issue is already open, or was closed recently inside the cooldown window, the helper returns the existing issue instead of creating a new one.
- Use with explicit fields so the body matches the repository issue format:
python3 scripts/submit_feedback.py--category--title--summary--expected--actual- optional ,
--source-command,--failing-command,--exit-code,--status,--reason-code,--waiting-on,--run-id,--skill-version,--using-repo,--using-pr, and--artifact--notes
- Example:
python3 scripts/submit_feedback.py --category workflow-gap --title "blocked without a recovery step" --summary "review stopped in a blocked state without enough operator guidance." --expected "the skill should identify the next command or artifact to inspect." --actual "the workflow stopped and the next action was ambiguous." --source-command "python3 scripts/cli.py review owner/repo 123" --failing-command "python3 scripts/cli.py final-gate owner/repo 123" --exit-code 5 --status BLOCKED --reason-code WAITING_FOR_FIX --waiting-on human_fix --run-id cr-loop-20260417T120000Z --skill-version 1.2.0 --using-repo owner/repo --using-pr 123 --artifact /tmp/loop-request.jsonpython3 scripts/cli.py submit-feedback --category workflow-gap --title "blocked without a recovery step" --summary "review stopped in a blocked state without enough operator guidance." --expected "the skill should identify the next command or artifact to inspect." --actual "the workflow stopped and the next action was ambiguous."
- 当skill本身阻碍进展时,在放弃前请向skill仓库提交反馈issue。
- 反馈issue用于skill级别的问题,如矛盾的指令、缺失的自动化、文档缺口或可重复的工具故障,且这些问题并非由被评审的仓库导致。
- 请勿为正常的PR结果、目标仓库中的代码bug或等预期等待状态提交反馈issue。
WAITING_FOR_EXTERNAL_REVIEW - 请勿在反馈issue中包含用户名、邮箱、令牌、机器名称或绝对本地路径。
- 优先使用安全的技术诊断信息,如失败的命令、退出码、状态、、
reason_code、waiting_on和skill版本。run_id - 当和
--using-repo存在时,--using-pr会自动从submit_feedback.py、last-machine-summary.json、session.json和缓存的PR head SHA(如果这些文件存在)中收集本地PR工作区的证据。audit_summary.md - 重复的反馈会通过指纹去重;如果相同的反馈issue已存在,或在冷却窗口内最近被关闭,助手会返回已有的issue而非创建新的。
- 使用并指定明确字段,使内容符合仓库issue格式:
python3 scripts/submit_feedback.py--category--title--summary--expected--actual- 可选的、
--source-command、--failing-command、--exit-code、--status、--reason-code、--waiting-on、--run-id、--skill-version、--using-repo、--using-pr和--artifact--notes
- 示例:
python3 scripts/submit_feedback.py --category workflow-gap --title "blocked without a recovery step" --summary "review stopped in a blocked state without enough operator guidance." --expected "the skill should identify the next command or artifact to inspect." --actual "the workflow stopped and the next action was ambiguous." --source-command "python3 scripts/cli.py review owner/repo 123" --failing-command "python3 scripts/cli.py final-gate owner/repo 123" --exit-code 5 --status BLOCKED --reason-code WAITING_FOR_FIX --waiting-on human_fix --run-id cr-loop-20260417T120000Z --skill-version 1.2.0 --using-repo owner/repo --using-pr 123 --artifact /tmp/loop-request.jsonpython3 scripts/cli.py submit-feedback --category workflow-gap --title "blocked without a recovery step" --summary "review stopped in a blocked state without enough operator guidance." --expected "the skill should identify the next command or artifact to inspect." --actual "the workflow stopped and the next action was ambiguous."
Required Evidence
必需证据
- Accepted GitHub thread:
- commit
- touched files
- validation command and result
- Clarified or deferred item:
- rationale
- Local finding terminal state:
- note
- 已处理的GitHub线程:
- commit
- 修改的文件
- 验证命令及结果
- 已澄清或推迟的项:
- 理由
- 本地结果的最终状态:
- 备注
Completion Contract
完成约定
Final output must include:
- command used
final_gate Verified: 0 Unresolved Threads foundVerified: 0 Pending Reviews found- unresolved GitHub threads = 0
- session blocking items = 0
- audit summary path + sha256
For run-scoped diagnostics, use:
python3 scripts/audit_report.py --run-id <run_id> <owner/repo> <pr_number>- successful runs archive the PR workspace before deletion under
python3 scripts/cli.py final-gate --auto-clean ...archive/<owner>__<repo>/pr-<pr>/<run_id>/
最终输出必须包含:
- 使用的命令
final_gate Verified: 0 Unresolved Threads foundVerified: 0 Pending Reviews found- 未解决的GitHub线程数 = 0
- 会话阻塞项数 = 0
- 审计摘要路径 + sha256
如需运行范围的诊断信息,使用:
python3 scripts/audit_report.py --run-id <run_id> <owner/repo> <pr_number>- 成功运行的会在删除前将PR工作区归档到
python3 scripts/cli.py final-gate --auto-clean ...目录下archive/<owner>__<repo>/pr-<pr>/<run_id>/
Must-Fix Rule
必须修复规则
- Default must-fix: correctness bugs, data loss risks, platform/runtime breakage, packaging/install breakage, P1/P2 regressions.
- Can defer with rationale: style-only, naming preference, non-blocking wording improvements.
- For this repo, fix priority is:
- session / gate / iteration semantic mismatches
- GitHub reply / resolve / pending-review visibility issues
- CLI and shell-wrapper compatibility regressions
- workspace/cache side effects
- test and CI breakage caused by real implementation changes
- documentation/runtime mismatches that mislead actual usage
- 默认必须修复:正确性bug、数据丢失风险、平台/运行时故障、打包/安装故障、P1/P2回归问题。
- 可附带理由推迟:仅涉及风格、命名偏好、非阻塞的措辞改进。
- 对于本仓库,修复优先级为:
- 会话/校验门/迭代语义不匹配
- GitHub回复/解决/待评审可见性问题
- CLI和shell-wrapper兼容性回归
- 工作区/缓存副作用
- 由真实实现变更导致的测试和CI故障
- 误导实际使用的文档/运行时不匹配
Why CR Appears Later (Use This Exact Logic)
为何CR出现在后期(请严格遵循此逻辑)
- GitHub review bots run asynchronously.
- New commits trigger re-analysis and can generate new comments.
- Old threads can become outdated; new ones may appear on different lines.
- GitHub评审机器人异步运行。
- 新提交会触发重新分析,并可能生成新的评论。
- 旧线程可能过时;新线程可能出现在不同行。
References
参考
- dispatch matrix:
references/mode-producer-matrix.md - checklist:
references/cr-triage-checklist.md - stable operator surface:
python3 scripts/cli.py - preferred automation surface:
python3 scripts/cli.py ... - AI agent feedback helper:
python3 scripts/submit_feedback.py - code-review bridge prompt:
python3 scripts/cli.py prepare-code-review <local|mixed> <owner/repo> <pr_number> - Markdown-to-findings converter:
python3 scripts/cli.py review-to-findings <owner/repo> <pr_number> --input - - code-review adapter backend:
python3 scripts/cli.py code-review-adapter --input -
- 调度矩阵:
references/mode-producer-matrix.md - 检查清单:
references/cr-triage-checklist.md - 稳定的操作员接口:
python3 scripts/cli.py - 首选自动化接口:
python3 scripts/cli.py ... - AI Agent反馈助手:
python3 scripts/submit_feedback.py - 代码评审桥接提示:
python3 scripts/cli.py prepare-code-review <local|mixed> <owner/repo> <pr_number> - Markdown转结果转换器:
python3 scripts/cli.py review-to-findings <owner/repo> <pr_number> --input - - 代码评审适配器后端:
python3 scripts/cli.py code-review-adapter --input -