diff --git a/.agents/skills/dsh-pr-description/SKILL.md b/.agents/skills/dsh-pr-description/SKILL.md index 674aca8b4f..2a8422a040 100644 --- a/.agents/skills/dsh-pr-description/SKILL.md +++ b/.agents/skills/dsh-pr-description/SKILL.md @@ -54,7 +54,7 @@ Items that Changes lists as None need no test design. |---|---|---| | Changing the behavior an existing test describes | Why the behavior changed | The Tests describe behavior rule in [root AGENTS.md](../../../AGENTS.md) | | Raising a ceiling in `scripts/doc-budgets.manifest.json` | Why the words are necessary | [Wordcount budgets](../../../docs/AGENTS.md#wordcount-budgets) | -| Changing product-user-visible GUI behavior | An embedded demonstration GIF, with the demonstrated commit, the serving origin, and whether a real model round ran | [record-browser-gif](../record-browser-gif/SKILL.md#every-gui-pull-request-includes-a-gif) | +| Changing product-user-visible GUI behavior | An embedded demonstration GIF, with the disclosures that record-browser-gif requires beside the embed | [record-browser-gif](../record-browser-gif/SKILL.md#every-gui-pull-request-includes-a-gif) | | Using a translation term the terminology list lacks | The source of the rendering, or a proposed rendering under pending terms | [Translation rules](../../../docs/i18n/translation-rules.md) | ## Human and Agent Roles @@ -63,7 +63,7 @@ This section records who made the decisions in each stage of the PR, and how aut ### Levels - + Levels are ordered from least to most AI involvement; each level pairs an English name with a Chinese name. Autonomy is the Agent's autonomy in that stage, a multiple of 5% within the chosen level's range. @@ -78,8 +78,6 @@ Levels are ordered from least to most AI involvement; each level pairs an Englis ### Stages and criteria - - Stages appear in a fixed order; each stage pairs an English name with a Chinese name. The criteria below cover assist through auto; judge hint by its meaning in the level table. **breakdown 问题拆解**: after the problem appears, whether a human takes part in breaking it down, or the Agent acts on it directly. @@ -93,8 +91,8 @@ Stages appear in a fixed order; each stage pairs an English name with a Chinese - auto 模型自主: a human adopts the Agent's design as proposed, or only confirms an option the Agent recommends. - copilot 人工把关: a human chooses among the Agent's designs, or rejects parts of one. -- pair 人工引导: the Agent proposes the design skeleton; a human gives key constraints, names, or several revisions. -- assist 人工主导: a human supplies the design skeleton (module split, data flow, or key interfaces); the Agent fills in the mechanism or writes it up. +- pair 人工引导: the Agent proposes the design structure; a human gives key constraints, names, or several revisions. +- assist 人工主导: a human supplies the design structure (module split, data flow, or key interfaces); the Agent fills in the mechanism or writes it up. **testing 验收测试**: who sets the acceptance goals, test cases, and test matrix, and who checks the results. For documentation-only changes, the acceptance goals are content requirements. @@ -149,13 +147,11 @@ Levels and Agent autonomy: **hint 人工独立** 0–15%, **assi ### Example - - Filled in from the session and review records of #6013: ```markdown - **pair 人工引导** 45% · breakdown 问题拆解 — The author identified two process-specific values that do not belong in the system prompt and pointed to the custom model route; the Agent traced the root cause. -- **assist 人工主导** 25% · design 方案设计 — The author supplied the skeleton: runtime context, frozen legacy sections for old sessions, and a separate package; the Agent filled in the projection matching. +- **assist 人工主导** 25% · design 方案设计 — The author supplied the design structure: runtime context, frozen legacy sections for old sessions, and a separate package; the Agent filled in the projection matching. - **pair 人工引导** 50% · testing 验收测试 — The author required two scenarios: restoring an old session after upgrade, and changing ports after upgrade; the Agent wrote the cases and snapshots. - **pair 人工引导** 45% · implementation 技术实现 — The Agent wrote the code and the Agent Note; the author required one revert and specified 3 approaches, such as getOrigin() instead of an origin property. - **pair 人工引导** 50% · review 评审处理 — The author decided each bot comment, such as no upgrade guide and keeping a devDependency; the Agent fixed and replied. diff --git a/.github/issue-management/policy.test.mjs b/.github/issue-management/policy.test.mjs index c0161ece04..414c85b9bd 100644 --- a/.github/issue-management/policy.test.mjs +++ b/.github/issue-management/policy.test.mjs @@ -206,7 +206,7 @@ test('keeps Task Issues limited to summary and deliverables', () => { ) }) -test('keeps the pull request template as the skeleton of the dsh-pr-description skill', () => { +test('keeps the pull request template aligned with the dsh-pr-description skill', () => { const source = readFileSync(new URL('../pull_request_template.md', import.meta.url), 'utf8') const skillPath = '.agents/skills/dsh-pr-description/SKILL.md' const skill = readFileSync(new URL(`../../${skillPath}`, import.meta.url), 'utf8') @@ -218,6 +218,7 @@ test('keeps the pull request template as the skeleton of the dsh-pr-description '## Human and Agent Roles', ]) assert.doesNotMatch(source, /^### /m) + assert.match(source, /^## Motivation\n\n$/m, 'the template prompts for an Issue reference') assert.match(source, /- \n\n
\n Proof<\/summary>/) assert.equal(source.match(/
/g)?.length, 1) assert.equal(source.match(/<\/details>/g)?.length, 1) @@ -225,12 +226,26 @@ test('keeps the pull request template as the skeleton of the dsh-pr-description const levelLine = /^Levels and Agent autonomy: .+$/m assert.ok(skill.match(levelLine), 'the skill shows the role level line') assert.equal(source.match(levelLine)?.[0], skill.match(levelLine)?.[0], 'the template level line matches the skill') - const skillStages = [...skill.matchAll(/^\*\*([a-z]+ \S+)\*\*:/gm)].map(([, stage]) => stage) + const stagesSection = skill.match(/^### Stages and criteria\n([\s\S]*?)(?=^### )/m)?.[1] + assert.ok(stagesSection, 'the skill has a Stages and criteria section') + const skillStages = [...stagesSection.matchAll(/^\*\*(.+?)\*\*:/gm)].map(([, stage]) => stage) assert.ok(skillStages.length > 0, 'the skill lists role stages') + for (const stage of skillStages) { + assert.match(stage, /^[a-z]+ [\u4e00-\u9fff]+$/, `stage name pairs one English word with a Chinese name: ${stage}`) + } + const reviewStage = 'review 评审处理' + assert.equal(skillStages.at(-1), reviewStage, 'review is the last stage') assert.deepEqual( - [...source.matchAll(/^- \*\*待填级别\*\*<\/ins> \?% · (.+?) — 待填说明$/gm)].map(([, stage]) => stage), + [...source.matchAll(/^- \*\*(?:待填级别\*\*<\/ins> \?%|n\/a 暂不适用\*\*<\/ins>) · (.+?) — .+$/gm)].map(([, stage]) => stage), skillStages, - 'the template has one placeholder line per skill stage, in skill order', + 'the template has one line per skill stage, in skill order', + ) + for (const stage of skillStages.slice(0, -1)) { + assert.ok(source.includes(`- **待填级别** ?% · ${stage} — 待填说明\n`), `${stage} has a placeholder line`) + } + assert.ok( + source.includes(`- **n/a 暂不适用** · ${reviewStage} — 尚无已处理的评审意见。\n`), + 'the review line starts as n/a, as the skill requires at PR creation', ) }) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index caa92c120d..05e4579652 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,6 +2,8 @@ ## Motivation + + ## Changes ## Testing @@ -23,4 +25,4 @@ Levels and Agent autonomy: **hint 人工独立** 0–15%, **assi - **待填级别** ?% · design 方案设计 — 待填说明 - **待填级别** ?% · testing 验收测试 — 待填说明 - **待填级别** ?% · implementation 技术实现 — 待填说明 -- **待填级别** ?% · review 评审处理 — 待填说明 +- **n/a 暂不适用** · review 评审处理 — 尚无已处理的评审意见。 diff --git a/AGENTS.md b/AGENTS.md index 5963565627..3212233b96 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -161,7 +161,7 @@ Real-API tests/demos read `DEEPSEEK_API_KEY`, optional `DEEPSEEK_BASE_URL`, and - **Both SDKs project the loop.** Agent-loop, session-lifecycle, and `SessionEventMap` changes update the TypeScript and Python SDK expected outputs in the same PR; `pnpm run test` covers neither ([surfaces](docs/testing.md#when-a-snapshot-test-is-required)). - **Choose PR history deliberately.** Split independent changes and fix the introducing PR before propagation. Standalone/stack branches may merge-forward or rebase. Rewrites use `--force-with-lease`, abort on remote movement, never raw `--force`; preserve an in-progress merge-forward checkpoint before taking a newer base ([rationale](.agents/notes/implemented/process/2026-08-02-native-github-stacks-and-optional-rebases.md)). - **Labels:** one PR `kind/*`, all material `area/*`, and native Issue Type ([taxonomy](.agents/notes/implemented/process/2026-08-08-unified-github-label-taxonomy.md)). -- **PR descriptions:** write every PR description with [dsh-pr-description](.agents/skills/dsh-pr-description/SKILL.md), including PRs created with `gh pr create --body-file`, and update it after each later push or handled review round. +- **PR descriptions:** write and update every PR description with [dsh-pr-description](.agents/skills/dsh-pr-description/SKILL.md). - TODO markers: `FIXME`/`TODO`/`XXX` by urgency ([semantics](docs/development.md)). - Files end with exactly one trailing newline; `git diff --cached --check` (pre-commit) gates it.