Repository navigation
feat(brief): 开 PR 前补三行标题/正文语言自检清单 - #18
Merged
Merged
Conversation
本周 6 次同类违规(firstmate #16/#17、HT #1、elmo-apps #44/#45、passkey #3、 pi-ecc-agents #1)的根因不在 worker,而在简报本身:`# PR description` 是第 14/14 段、位于第 110 行(全文 151 行),内容仅两行且只指向 `pr-description` skill, 标题中文/正文中文在上/英文折叠这三个要求**在简报里从未出现**(旧测试甚至用 assert_no_grep 明确禁止它出现),所以没加载该 skill 的 worker 无从遵守。 改法(最小):在 `bin/fm-dod-lib.sh` 的 `fm_pr_description_block`(简报与提升后 worker 的同一 owner)里补三行自检清单,放在「报告 PR ready 之前」这一动作点上: - Title: Chinese after the conventional-commit prefix (`feat(scope): <中文>`)? - Body: Chinese visible first, above the fold? - Body: the English body folded inside `<details><summary>English</summary>`? 不新增脚本/框架、不改交付流程语义:完整格式、翻译规则、各平台命令仍由 `pr-description` skill 单一拥有,简报只补「开 PR 那一刻要做的三个决定」。 测试同步更新:断言三问与折叠标记在两种开 PR 模式下都存在、提升后 worker 同样 收到,并断言简报仍不复制 skill 的平台命令与格式标题(守住单一 owner 边界)。
firstmate 裁定收口:仓内规范要求普通 `-`、不用 em dash,本次改动只涉及 `fm_pr_description_block` 自检块里的两处分隔符(自有仓分支与第三方上游分支 各一处),换掉即可,不新增自动守卫、不顺手全仓替换。纯字符替换,零行为变化。
…g with self-check
Owner
Author
|
打回,中文 |
Owner
Author
|
Risk Assessment 后面的中文不合格 |
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.
队长原话(Intent)
队长口径(2026-09-10 定):自有仓 PR 一律标题中文(保留 conventional 英文前缀)+ 正文中文在上、英文折叠在
<details><summary>English</summary>。现状:本周同类违规 6 次(firstmate #16/#17、HT #1、elmo-apps #44/#45、passkey #3、pi-ecc-agents #1),每次都由监督侧事后叫回改。简报里其实写了这条契约,但 worker 实际开 PR 时没执行。
改了什么
bin/fm-dod-lib.sh的 PR 描述块在原有pr-descriptionskill 指针之外,新增「报 PR ready 之前」的自检清单:先判定这次 PR 属于哪一类,再按该类的规则核对 live 的标题与正文,任一为「否」必须在报 ready 前改好。onyx-space/*、内网 Giteaadmin/*与AI.Buddy/*)适用中文优先契约,逐条自检三问:feat(scope): <中文>)?<details><summary>English</summary>里了吗?bin/fm-brief.sh渲染进 ship brief、由bin/fm-promote.sh渲染进 promoted scout 的 ship 指令,两条开 PR 路径都带上自检;local-only不开 PR,仍不渲染。docs/architecture.md同步更新该块的职责描述;tests/fm-brief.test.sh与tests/fm-task-delivery.test.sh相应调整断言,覆盖三条自检项、类型分流,并确认 skill 的格式细则与平台命令未被复制进 brief。风险评估
✅ 低。本次只改一段共享提示词(prompt block)的措辞,另配一句文档说明和相应测试:新增的按类型分流写法与 intent 中「自有仓」的范围一致,也没有偏离单一 owner 的 skill 归属;该段在两条开 PR 路径上都原样渲染,没有改动任何代码路径或控制流。
验证
在隔离的 FM_HOME 里把真实生成器端到端跑了一遍。
bin/fm-brief.sh会把# PR description段渲染进 no-mistakes 与 direct-PR 两类 ship brief,内容含:未改动的单一 owner 指针(~/.agents/skills/pr-description/SKILL.md)、报 PR ready 之前的自检门、自有仓三问(conventional 前缀之后是中文标题、中文正文位于折叠之上、英文正文折叠在<details><summary>English</summary>内),以及显式的第三方上游分支(never rewrite a third-party upstream PR title into Chinese);local-only 的 brief 不带该段。用bin/fm-promote.sh提升一个 scout,再执行它打印出的投递命令:promoted 的 no-mistakes / direct-PR worker 收到同一段,local-only 的收到零段。单一 owner 的守卫成立:brief 里既没有gh pr edit,也没有## 摘要,格式与平台命令仍归 skill 独有。把基线提交单独导出并生成它的 brief,复现了本次改动要补的缺口:指针在,自检与上游分支都不在。两个改动的测试文件都通过。唯一没有实测的环节,是 worker 的 LLM 在真正开 PR 时会不会照做;这属于模型理解范畴,本次改动的确定性提示词策略与 no-mistakes 的测试质量规则都把它挡在实测 CI 之外,而隔离门里也没有可用的、能打真实 PR 端点的 worker 跑。文档(docs/architecture.md)已读过,与新的按类型分流写法一致;lint 与静态检查不在本阶段的边界内。bin/fm-brief.sh生成 no-mistakes ship brief,会输出 pr-description 指针、自有仓三问,以及第三方上游豁免bin/fm-brief.sh生成 direct-PR ship brief,输出的自检与上面完全一致# PR description(pr-description-selfcheck-checks.txt)bin/fm-promote.sh提升 scout 并执行它打印的投递命令后,promoted 的 no-mistakes / direct-PR worker 收到同一段自检,local-only 收到零gh pr editand 0 of## 摘要while carrying the pointer and actionable questions (pr-description-selfcheck-checks.txt)Third-party upstream repo - the Chinese-first contract does not apply ... never rewrite a third-party upstream PR title into Chinese(pr-description-selfcheck-live.txt…English
What Changed
bin/fm-dod-lib.sh, the PR-description block now carries a pre-PR self-check alongside the existingpr-descriptionskill pointer: the worker must first classify the PR, then verify the three decisions for that kind - title language, visible body language, and the English fold - fixing any "no" before reporting the PR ready.onyx-space/*, internal Giteaadmin/*andAI.Buddy/*); a third-party upstream PR is exempt and follows the upstream's own conventions, and its title must never be rewritten into Chinese.bin/fm-brief.shinto a ship brief and bybin/fm-promote.shinto a promoted scout's ship instructions, so both PR-opening paths carry the self-check;local-onlystill renders nothing because it opens no PR.docs/architecture.mdis updated to match the block's new ownership prose, andtests/fm-brief.test.shplustests/fm-task-delivery.test.shassert the three decisions, the own-repo/upstream split, and that the skill's format headings and platform commands are not duplicated into the brief.Risk Assessment
✅ Low: Prose-only change to one shared prompt block plus matching doc sentence and tests: the new scope-aware wording matches the intent's 自有仓 scope and the single-owner skill, and the block renders verbatim on both PR-opening paths with no code path or control flow changed.
Testing
Drove the real generators end-to-end in an isolated FM_HOME.bin/fm-brief.shemits the# PR descriptionblock into no-mistakes and direct-PR ship briefs containing the unchanged single-owner pointer (~/.agents/skills/pr-description/SKILL.md), the PR-ready self-check gate, the three own-repo questions (Chinese title after the conventional prefix, Chinese body above the fold, English body folded in<details><summary>English</summary>), and the explicit third-party upstream branch withnever rewrite a third-party upstream PR title into Chinese; the local-only brief carries no block. Promoting a scout throughbin/fm-promote.shand executing the delivery command it prints delivers the same block to promoted no-mistakes/direct-PR workers and none to a local-only one. The one-owner guard holds: the briefs contain neithergh pr editnor## 摘要, so the skill remains the sole owner of format and platform commands. Extracting the base commit and generating its brief reproduced the gap the change closes: the pointer was present but the self-check and upstream branch were absent. Both changed test files pass. The only undriven part is whether a worker LLM actually obeys the emitted prompt when it opens a PR; that is model interpretation, which the change's own deterministic-prompt strategy and no-mistakes' test-quality rule keep out of live CI, and no live worker run against a real PR endpoint is available in this isolated gate. Docs (docs/architecture.md) were read and match the new scope-aware wording; lint/static checks are outside this phase's boundary.# PR description(pr-description-selfcheck-checks.txt)gh pr editand 0 of## 摘要while carrying the pointer and actionable questions (pr-description-selfcheck-checks.txt)Third-party upstream repo - the Chinese-first contract does not apply ... never rewrite a third-party upstream PR title into Chinese(pr-description-selfcheck-live.txt…Evidence: Live-generated PR description block for ship briefs and promoted payloads (both PR-opening modes + local-only)
Source: Live-generated PR description block for ship briefs and promoted payloads (both PR-opening modes + local-only)
Evidence: Live check matrix: own-repo questions, upstream exemption, local-only absence, single-owner guard, base-commit regression
Source: Live check matrix: own-repo questions, upstream exemption, local-only absence, single-owner guard, base-commit regression
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
# PR description(pr-description-selfcheck-checks.txt)gh pr editand 0 of## 摘要while carrying the pointer and actionable questions (pr-description-selfcheck-checks.txt)Third-party upstream repo - the Chinese-first contract does not apply ... never rewrite a third-party upstream PR title into Chinese(pr-description-selfcheck-live.txt…FM_HOME=<isolated> bin/fm-brief.sh brief-prdesc-{no-mistakes,direct-PR,local-only} some-proj --mode <mode>and inspection of each generateddata/<id>/brief.mdFM_HOME=<isolated> bin/fm-promote.sh promote-dod-<mode> --mode <mode> --yolo offthen running the printednext:fm-send.shdelivery command against a capturing stub, for no-mistakes, direct-PR and local-onlybash tests/fm-brief.test.sh(full file for the changed test)bash tests/fm-task-delivery.test.sh(full file for the changed test)baseline delta: extracted base tree withgit archive 47b5518and ran itsbin/fm-brief.shto confirm the pointer existed without the self-check✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.