@elvis1513/auto-coding-skill 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,47 @@
1
1
  # auto-coding-skill
2
2
 
3
- A generic `.agents` engineering workflow with adaptive execution profiles,
4
- minimal project scaffolding, evidence-backed closure, and optional CI/Jenkins and
5
- target-environment verification.
3
+ A generic `.agents` engineering workflow with isolated parallel worktrees, fast
4
+ local validation, push-based completion, required access configuration, and safe
5
+ branch cleanup.
6
+
7
+ ## What changed in v3.0.2
8
+
9
+ - Added controlled synchronization for the root `AGENTS.md` workflow bridge as
10
+ well as the managed `ENGINEERING.md` workflow block.
11
+ - Migrated known legacy rules that required full local gates, verify mode, or
12
+ Jenkins polling during normal development while preserving project facts and
13
+ unrelated custom instructions.
14
+ - Made project status, sync, doctor, and task lifecycle commands fail closed on
15
+ unknown workflow instructions that conflict with the changed-scope fast gate.
16
+ - Removed legacy YAML escalation fields during upgrade while keeping explicit
17
+ full-gate commands available for user-requested diagnostics.
18
+ - Clarified that locked dependencies may be restored only when the configured
19
+ changed-scope gate actually needs them, after which only that same fast gate is
20
+ rerun.
21
+
22
+ ## What changed in v3.0.1
23
+
24
+ - Fixed normal development to analysis → decomposition → design → development →
25
+ one changed-scope fast gate → push.
26
+ - Kept risk profiles for planning/review depth without promoting local work to a
27
+ standard/full gate or verify mode.
28
+ - Ended coding tasks immediately after safe target-branch push; Jenkins owns
29
+ later build/deploy work and the project owner owns acceptance.
30
+ - Removed repeated integration gates and all automatic post-push Jenkins/target
31
+ polling from `commit-push`.
32
+ - Required all project/Jenkins/GitLab/Nexus URLs, usernames, and direct passwords
33
+ under `access.*` during project initialization.
34
+ - Removed the shared-checkout `legacy` escape hatch; worktree isolation is now
35
+ mandatory for every write task.
36
+ - Added a structured subagent plan with parallel discovery, one-writer worktree
37
+ ownership, reviewer feedback loops, and main-agent Git lifecycle ownership.
38
+ - Enforced task-owned paths, dependency revisions, writer leases, and
39
+ fingerprint-bound review approvals in the task runtime.
40
+ - Added review, writer handoff, and conflicted-rebase resume lifecycle commands.
41
+ - Added planned paths and task intent to pre-development classification and
42
+ published a stable orchestration contract.
43
+ - Added controlled `ENGINEERING.md` workflow synchronization while preserving
44
+ project configuration and custom content.
6
45
 
7
46
  ## What changed in v3.0.0
8
47
 
@@ -17,8 +56,8 @@ target-environment verification.
17
56
  updating to the latest remote target.
18
57
  - Automatically removed integrated worktrees and local task branches, with safe
19
58
  lease-based remote task-branch cleanup and merged-branch pruning.
20
- - Kept `concurrency.isolation: legacy` only as an explicit compatibility escape
21
- hatch; missing configuration now defaults to worktree isolation.
59
+ - Initially kept a `legacy` compatibility escape hatch; v3.0.1 removes that path and
60
+ migrates existing configuration to mandatory worktree isolation.
22
61
 
23
62
  ## What changed in v2.2.1
24
63
 
@@ -50,6 +89,9 @@ target-environment verification.
50
89
  advisory structure checks, minimal scaffold budgets, on-demand docs, and Agent
51
90
  model inheritance.
52
91
 
92
+ This section records historical v2 behavior. The v3.0.2 workflow above supersedes
93
+ its full-gate and verify-mode rules for normal development.
94
+
53
95
  ## Install
54
96
 
55
97
  ```bash
@@ -82,18 +124,18 @@ Configure the selector in `docs/ENGINEERING.md`:
82
124
  workflow:
83
125
  mode: dev
84
126
  profile: auto
127
+ completion: push
85
128
  ```
86
129
 
87
- | Effective profile | Intended work | Gate scope | Mode |
130
+ | Effective profile | Intended work | Local gate | Completion |
88
131
  | --- | --- | --- | --- |
89
- | `micro` | docs/tests-only or explicitly isolated work | changed | dev |
90
- | `standard` | normal feature and defect work | standard | dev |
91
- | `high-risk` | DB/auth/payment/file transfer/gateway/prod/deploy/build changes | full | verify |
132
+ | `micro` | docs/tests-only or explicitly isolated work | changed/quick | pushed |
133
+ | `standard` | normal feature and defect work | changed/quick | pushed |
134
+ | `high-risk` | sensitive, broad, deploy/build, or structural work | changed/quick | pushed |
92
135
 
93
- `auto` is a selector, not a fourth effective profile. Full-path patterns,
94
- high-risk categories, `gate.rules[].profile: high-risk`, and explicit verify work
95
- raise the plan to `high-risk`. A CLI `--profile micro` or `--mode dev` cannot
96
- lower it.
136
+ `auto` is a selector, not a fourth effective profile. Profiles affect analysis,
137
+ design depth, and reviewer recommendations only. They never expand the automatic
138
+ local gate or turn Jenkins/target verification into a completion condition.
97
139
 
98
140
  An explicit configured `micro`, `standard`, or `high-risk` profile replaces
99
141
  auto's low/normal baseline and acts as a floor for CLI overrides. Independently
@@ -106,13 +148,16 @@ python3 docs/tools/autopipeline/ap.py classify --scope auto
106
148
  python3 docs/tools/autopipeline/ap.py impact --scope auto --json
107
149
  ```
108
150
 
109
- Each result includes the effective profile, mode, gate scope, reasons, required
110
- verification surfaces, and recommended Agent roles.
151
+ Each result includes the effective profile, fixed fast gate scope, reasons,
152
+ recommended Agent roles, and a machine-readable `agent_plan` describing stages,
153
+ dependencies, assignment/result contracts, and lifecycle ownership.
111
154
 
112
155
  ## Parallel write isolation
113
156
 
114
157
  Each task that may write files runs in its own registered Git worktree and
115
- `codex/` task branch. Read-only discovery may remain in the primary worktree.
158
+ `codex/` task branch. `worktree` is the only supported isolation value. Each
159
+ worktree has exactly one writer; read-only discovery may remain in the primary
160
+ worktree.
116
161
 
117
162
  ```yaml
118
163
  concurrency:
@@ -127,18 +172,33 @@ concurrency:
127
172
  ```
128
173
 
129
174
  ```bash
130
- python3 docs/tools/autopipeline/ap.py task-start T0001
175
+ python3 docs/tools/autopipeline/ap.py task-start T0001 --owned-path src --writer "$FIXER"
131
176
  # Continue in the worktree path printed by task-start.
132
177
  python3 docs/tools/autopipeline/ap.py task-status T0001
133
178
  python3 docs/tools/autopipeline/ap.py task-submodule-sync T0001
134
- python3 docs/tools/autopipeline/ap.py commit-push T0001 --msg "T0001: summary"
135
- python3 docs/tools/autopipeline/ap.py task-integrate T0001
179
+ python3 docs/tools/autopipeline/ap.py task-review T0001 --verdict approved --diff-fingerprint "$SHA256"
180
+ python3 docs/tools/autopipeline/ap.py task-handoff T0001 --from "$FIXER" --to "$CODEX_THREAD_ID" --generation 1
181
+ python3 docs/tools/autopipeline/ap.py commit-push T0001 --writer "$CODEX_THREAD_ID" --msg "T0001: summary"
182
+ python3 docs/tools/autopipeline/ap.py task-integrate T0001 --writer "$CODEX_THREAD_ID"
136
183
  ```
137
184
 
138
185
  `commit-push` runs only inside the task worktree recorded in the repository
139
186
  manifest and stages only that task's changes. Unknown changes stop the command;
140
187
  the workflow never restores, resets, stashes, or cleans them.
141
188
 
189
+ Before upgrading a v3.0.0 project, finish and clean every registered in-flight
190
+ task with its currently installed runtime. `autocoding sync` refuses to replace
191
+ that runtime while a schema-1 task remains, because 3.0.1 cannot safely infer
192
+ its path ownership, dependencies, writer lease, or review state.
193
+
194
+ `commit-push` runs the only local gate. `task-integrate` is the rest of the same
195
+ push stage: it fetches/rebases, CAS-pushes the configured target, confirms the
196
+ remote SHA, and cleans up without repeating the gate. Successful integration
197
+ ends the coding task; do not wait for Jenkins, deployment, or acceptance results.
198
+ The task commit runs project commit hooks once. Its internal backup-branch push
199
+ skips the pre-push hook, while the final target-branch push runs that hook once.
200
+ Integration does not create a second evidence commit.
201
+
142
202
  Successful integration removes the clean worktree and merged local branch, and
143
203
  deletes the merged remote task branch by default. `task-finish T0001` retries
144
204
  cleanup for one integrated task; `task-prune` removes registered merged tasks
@@ -166,9 +226,7 @@ forced cleanup until they are reinitialized or recovered.
166
226
 
167
227
  ```yaml
168
228
  commands:
169
- gate_changed: "npm run test:changed"
170
- gate_standard: "npm test"
171
- gate_full: "npm run test:full"
229
+ gate_changed: "git diff --check"
172
230
 
173
231
  gate:
174
232
  default_scope: auto
@@ -178,10 +236,14 @@ gate:
178
236
  profile: high-risk
179
237
  ```
180
238
 
181
- For Node projects, a new scaffold can infer changed/standard commands from
182
- `test`, `test:changed`, and `test:standard`. It only infers a full command from a
183
- dedicated `test:full` script; ordinary `npm test` is never promoted to full.
184
- A high-risk or verify run fails clearly when no real full command is configured.
239
+ Rules affect classification and planning only. Legacy `scope` or `commands`
240
+ inside a rule never execute automatically; invoke an explicitly configured
241
+ diagnostic with `ap.py run <name>` when the user asks for it.
242
+
243
+ For Node projects, a new scaffold selects `npm run test:changed` only when that
244
+ dedicated quick script exists. It never promotes ordinary `npm test`, builds, or
245
+ full regression into the automatic changed gate. Standard/full commands may be
246
+ kept as explicit diagnostics, but normal development does not invoke them.
185
247
 
186
248
  ## Structure policy
187
249
 
@@ -239,27 +301,32 @@ Existing project-local `model = "..."` lines are treated as explicit overrides:
239
301
  client inheritance.
240
302
  - Custom Agent files are always preserved byte-for-byte.
241
303
 
242
- The effective profile recommends roles dynamically:
243
-
244
- - micro: main Agent only by default
245
- - standard: explorer → fixer, plus browser/docs roles when indicated
246
- - high-risk: explorer/docs as indicated → fixer → browser as indicated → reviewer
247
-
248
- ## Verification configuration
249
-
250
- Generic projects start with both optional external surfaces disabled:
251
-
252
- ```yaml
253
- verification:
254
- target_env_required: false
255
- jenkins_required: false
256
- ```
257
-
258
- When target verification is enabled, `doctor` requires only the health URL/path
259
- needed by the default health check. Frontend/backend URLs and credentials are
260
- validated when the corresponding path or basic-auth options are actually used.
261
- Jenkins keeps its explicit configuration checks. Unused sections should stay
262
- absent rather than containing placeholders.
304
+ The effective profile emits an executable collaboration shape:
305
+
306
+ - micro: main Agent only unless useful independent work exceeds dispatch overhead
307
+ - standard/high-risk: main decomposition → parallel justified explorer/docs/browser
308
+ discovery → main design → dependency waves of isolated fixers → read-only
309
+ reviewers → main fast gate/integration, followed by final push/cleanup
310
+
311
+ Only dependency-free fixer units with explicitly non-overlapping paths may run
312
+ in parallel. A dependent writer starts after its prerequisite is integrated.
313
+ Subagents do not commit, push, integrate, clean branches, or run the project gate.
314
+ Reviewer findings return to the owning fixer. Verdicts bind to a diff fingerprint,
315
+ so any edit requires re-review before the main Agent may run the gate.
316
+
317
+ ## Required access configuration
318
+
319
+ For a new project, `autocoding sync` creates `access.project`, `access.jenkins`,
320
+ `access.gitlab`, and `access.nexus` in `docs/ENGINEERING.md`. Existing projects
321
+ must run `ap.py upgrade --write` to merge newly required fields into their manual
322
+ configuration. Fill every URL, username, and direct password during
323
+ initialization as an inline YAML string; quote values that resemble numbers,
324
+ dates, booleans, or YAML collections. `status` rejects blank/TODO fields;
325
+ `doctor` and `task-start`
326
+ also validate URL shape locally. These access checks never contact the listed
327
+ service endpoints; after validation, `task-start` may still fetch the configured
328
+ Git remote unless `--no-fetch` is used. Configuration presence does not enable
329
+ Jenkins/build/deploy verification.
263
330
 
264
331
  ## Core commands
265
332
 
@@ -268,13 +335,15 @@ python3 docs/tools/autopipeline/ap.py doctor
268
335
  python3 docs/tools/autopipeline/ap.py classify --scope auto
269
336
  python3 docs/tools/autopipeline/ap.py light-gate --scope auto --explain
270
337
  python3 docs/tools/autopipeline/ap.py structure-check --scope auto
271
- python3 docs/tools/autopipeline/ap.py task-start T0001
338
+ python3 docs/tools/autopipeline/ap.py task-start T0001 --owned-path src --writer "$FIXER"
272
339
  python3 docs/tools/autopipeline/ap.py task-status T0001
273
340
  python3 docs/tools/autopipeline/ap.py task-submodule-sync T0001
341
+ python3 docs/tools/autopipeline/ap.py task-review T0001 --verdict approved --diff-fingerprint "$SHA256"
342
+ python3 docs/tools/autopipeline/ap.py task-handoff T0001 --from "$FIXER" --to "$CODEX_THREAD_ID" --generation 1
274
343
  python3 docs/tools/autopipeline/ap.py docs-ledger-check
275
344
  python3 docs/tools/autopipeline/ap.py gate-profile
276
- python3 docs/tools/autopipeline/ap.py commit-push T0001 --msg "T0001: summary"
277
- python3 docs/tools/autopipeline/ap.py task-integrate T0001
345
+ python3 docs/tools/autopipeline/ap.py commit-push T0001 --writer "$CODEX_THREAD_ID" --msg "T0001: summary"
346
+ python3 docs/tools/autopipeline/ap.py task-integrate T0001 --writer "$CODEX_THREAD_ID"
278
347
  python3 docs/tools/autopipeline/ap.py task-finish T0001
279
348
  python3 docs/tools/autopipeline/ap.py task-prune
280
349
  ```
@@ -299,15 +368,18 @@ Retired template files do not count as drift.
299
368
 
300
369
  ## Development
301
370
 
371
+ Normal changes should use the configured changed-scope gate only. The commands
372
+ below are explicit package-maintainer diagnostics, not the default project
373
+ development gate:
374
+
302
375
  ```bash
303
- npm run sync-assets
304
- npm run check:assets
305
376
  npm run test:src
306
377
  npm test
307
378
  npm run release:check
308
379
  ```
309
380
 
310
- `release:check` synchronizes source assets, validates Python 3.11 grammar and
311
- TOML, runs installer and profile regressions, and performs `npm pack --dry-run`.
381
+ Run `npm run sync-assets` explicitly after source changes. `release:check` is a
382
+ read-only release gate: it rejects asset drift, validates Python 3.11 grammar and
383
+ TOML, runs the broader regressions, and performs `npm pack --dry-run`.
312
384
 
313
385
  License: MIT.
@@ -1,7 +1,7 @@
1
1
  name = "browser_debugger"
2
2
  description = "浏览器调试代理,用于复现 UI 问题、收集控制台和网络证据。"
3
3
  model_reasoning_effort = "xhigh"
4
- sandbox_mode = "workspace-write"
4
+ sandbox_mode = "read-only"
5
5
 
6
6
  developer_instructions = """
7
7
  你负责复现问题和采集证据,不优先修改业务代码。
@@ -19,11 +19,9 @@ developer_instructions = """
19
19
  - 控制台报错
20
20
  - 网络请求
21
21
  - 状态变化
22
- 4. 输出必须包含:
23
- - 复现步骤
24
- - 实际结果
25
- - 预期结果
26
- - 证据
27
- - 根因候选
22
+ 4. 将复现步骤、实际结果、预期结果、证据和根因候选压缩到 summary、evidence、findings、risks。
28
23
  5. 如果需要代码修复,只给出修复建议,交给 fixer 或主代理实施。
24
+ 6. 只执行主代理明确分配的复现/证据任务;不要把浏览器复现扩展为推送后的实际验收。
25
+ 7. 不修改业务代码,不提交、不推送、不集成、不清理分支。
26
+ 8. 最终只返回一个 JSON 对象,不要 Markdown 或代码围栏。对象必须符合 `.agents/skills/auto-coding-skill/data/contracts/orchestration-v1.schema.json#/$defs/agentResult`,包含全部必填字段,`contract_version` 固定为 1,`role` 固定为 `browser_debugger`,`owned_paths`、`changed_paths` 固定为空数组;正常完成时 `status=completed`、`verdict=not-applicable`,无法继续时使用 `status=blocked`、`verdict=blocked`。
29
27
  """
@@ -11,10 +11,8 @@ developer_instructions = """
11
11
  2. 优先使用官方文档、项目仓库、发行说明或连接器返回的权威信息;不要用博客或二手资料替代官方来源。
12
12
  3. 重点核对:API签名、参数含义、版本兼容性、废弃项、默认行为、迁移要求。
13
13
  4. 输出要简洁、可引用、可落地。
14
- 5. 优先返回:
15
- - 结论
16
- - 证据点
17
- - 对当前项目的影响
18
- - 建议给 explorer / fixer / reviewer 的下一步
14
+ 5. 将结论、权威证据、对当前项目的影响和下一步压缩到 summary、evidence、findings、risks、next_owner。
19
15
  6. 如果文档不足以确认,明确标注“不确定”,不要猜。
16
+ 7. 只处理主代理给定的 task_id、范围、依赖和验收目标,不修改代码或项目文档。
17
+ 8. 不提交、不推送、不集成、不清理分支。最终只返回一个 JSON 对象,不要 Markdown 或代码围栏。对象必须符合 `.agents/skills/auto-coding-skill/data/contracts/orchestration-v1.schema.json#/$defs/agentResult`,包含全部必填字段,`contract_version` 固定为 1,`role` 固定为 `docs_researcher`,`owned_paths`、`changed_paths` 固定为空数组;正常完成时 `status=completed`、`verdict=not-applicable`,无法继续时使用 `status=blocked`、`verdict=blocked`。
20
18
  """
@@ -9,7 +9,7 @@ developer_instructions = """
9
9
  工作要求:
10
10
  1. 优先用 rg / git / 项目脚本快速定位真实入口,再向下追踪调用链。
11
11
  2. 先读项目已有文档、配置、路由、任务记录;涉及结构/优化时,仅在结构标准、健康基线或优化 backlog 已存在时读取,不因可选文档缺失而阻塞。
12
- 3. 必要时运行或建议 `ap.py classify --scope auto` 和 `ap.py docs-ledger-check`,说明风险级别、建议 gate scope、是否需要 DD/ADR/browser/CI-Jenkins/target verify,以及活跃 docs ledger 是否超预算;如超预算,只建议 `docs-ledger-archive --plan`,不要直接归档。
12
+ 3. 必要时运行 `ap.py classify --scope auto`,说明风险级别和是否需要 DD/ADR/reviewer;本地 gate 始终保持 changed/quick,不建议 CI/Jenkins、目标环境或全量回归作为开发完成条件。
13
13
  4. 输出根因时说明当前代码应归属的层级、现有同类模块、可复用 helper / 组件 / 脚本,以及是否触及 `structure.layer_rules`。
14
14
  5. 如果根因依赖外部库、框架或版本行为,标记需要 docs_researcher / Context7 继续核对,不要凭记忆猜。
15
15
  6. 输出内容必须尽量具体到:
@@ -18,14 +18,9 @@ developer_instructions = """
18
18
  - 关键结构体 / 类 / 接口
19
19
  - 关键配置项
20
20
  7. 不要泛泛而谈,不要直接给大段修复方案。
21
- 8. 输出格式:
22
- - 问题入口
23
- - 调用链
24
- - 关键文件
25
- - 分类 / 风险 / 建议 gate
26
- - 当前层级 / 归属模块
27
- - 既有复用点
28
- - 根因候选
29
- - 建议交给哪个代理继续处理
21
+ 8. 将问题入口、调用链、关键文件、分类/风险/快速 gate、归属模块、既有复用点和根因候选压缩到 summary、evidence、findings、risks。
30
22
  9. 优先快速精准搜索,避免全仓库无差别扫描。
23
+ 10. 只接受主代理分配的明确 task_id、范围、依赖和验收目标;不要扩展到其他并行单元。
24
+ 11. 不提交、不推送、不集成、不清理分支,也不修改任何工作树。
25
+ 12. 最终只返回一个 JSON 对象,不要 Markdown 或代码围栏。对象必须符合 `.agents/skills/auto-coding-skill/data/contracts/orchestration-v1.schema.json#/$defs/agentResult`,包含全部必填字段,`contract_version` 固定为 1,`role` 固定为 `explorer`,`owned_paths`、`changed_paths` 固定为空数组;正常完成时 `status=completed`、`verdict=not-applicable`,无法继续时使用 `status=blocked`、`verdict=blocked`。
31
26
  """
@@ -7,21 +7,23 @@ developer_instructions = """
7
7
  你负责小而准的实现修改。
8
8
 
9
9
  工作要求:
10
- 1. 只在问题已经相对明确后再动手。
11
- 2. 坚持“最小可辩护修改”原则。
12
- 3. 除非明确要求,否则不要重构、不做大面积改名、不改无关文件。
13
- 4. 先跟随项目现有模式、helper、组件、脚本和文档约束,不新造不必要抽象。
14
- 5. 改代码前先确认项目现有架构中的正确落位;不要默认项目采用 DDD/Clean Architecture,也不要仅因文件偏大而机械拆分。
15
- 6. `structure.layer_rules` 仅在项目显式启用且设为 blocking 时构成硬门禁;advisory 结果作为复核信号,结合真实依赖关系判断。
16
- 7. 新增工具、并发/缓存/请求封装、格式转换、权限判断、校验逻辑前,先搜索既有 helper、库、组件和脚本。
17
- 8. 如果修改依赖外部 API / 版本行为,先让 docs_researcher / 文档 MCP 兜底确认。
18
- 9. 如果修改影响 UI,交给 browser_debugger 或主代理做真实浏览器验证。
19
- 10. 如果修改涉及鉴权、权限、支付、文件上传下载、部署、依赖或数据边界,交给 reviewer / 安全能力做只读复核。
20
- 11. 修改后运行聚焦门禁:优先项目 light gate,其次 docs-ledger-check、structure-check、相关测试、typecheck、lint、git diff --check,并确保 evidence.jsonl 记录实际执行;docs ledger 超预算时先输出 `docs-ledger-archive --plan`,只有主代理或用户确认后才执行 `--write`。
21
- 12. 修改后输出:
22
- - 修改文件
23
- - 修改点
24
- - 修改原因
25
- - 验证方法
26
- 13. 如发现问题超出小修范围,要立即停止并上报,不要自行扩大战场。
10
+ 1. 只在问题已经相对明确,并收到 task_id、task_branch、绝对 worktree_path、owned_paths、depends_on 和 acceptance 后再动手。
11
+ 2. 开始前确认当前目录就是分配的注册 worktree、当前分支就是 task_branch;不满足时停止并上报。
12
+ 3. 一个 worktree 只能有一个写入者。只修改 owned_paths,不进入或修改其他任务工作树;发现未知改动立即停止,不 restore/reset/stash/clean。
13
+ 4. 坚持“最小可辩护修改”原则。
14
+ 5. 除非明确要求,否则不要重构、不做大面积改名、不改无关文件。
15
+ 6. 先跟随项目现有模式、helper、组件、脚本和文档约束,不新造不必要抽象。
16
+ 7. 改代码前先确认项目现有架构中的正确落位;不要默认项目采用 DDD/Clean Architecture,也不要仅因文件偏大而机械拆分。
17
+ 8. `structure.layer_rules` 仅在项目显式启用且设为 blocking 时构成硬门禁;advisory 结果作为复核信号,结合真实依赖关系判断。
18
+ 9. 新增工具、并发/缓存/请求封装、格式转换、权限判断、校验逻辑前,先搜索既有 helper、库、组件和脚本。
19
+ 10. 如果修改依赖外部 API / 版本行为,先让 docs_researcher / 文档 MCP 兜底确认。
20
+ 11. UI 实际验收由项目负责人在推送后处理;只有用户明确要求诊断时才交给 browser_debugger。
21
+ 12. 如果修改涉及鉴权、权限、支付、文件上传下载、部署、依赖或数据边界,交给 reviewer / 安全能力做只读复核。
22
+ 13. 修改后不要自行运行 gate;由主代理的 `commit-push` 唯一执行一次 changed/quick gate。不要叠加 docs-ledger、advisory structure、全量测试、构建、Docker、Jenkins 或目标环境验证。
23
+ 14. 不提交、不推送、不集成、不清理分支;等待 reviewer 和主代理收口。
24
+ 15. 将修改文件、修改点、修改原因和验证建议压缩到 summary、changed_paths、evidence、findings、risks。
25
+ 16. reviewer 要求修改时只由当前 owning fixer 串行处理;修改完成后重新交 reviewer,旧审批自动失效。
26
+ 17. 如发现问题超出小修范围,要立即停止并上报,不要自行扩大战场。
27
+ 18. 目标分支推送成功即结束,不等待或处理后续 Jenkins、构建、部署和实际验收结果。
28
+ 19. 最终只返回一个 JSON 对象,不要 Markdown 或代码围栏。对象必须符合 `.agents/skills/auto-coding-skill/data/contracts/orchestration-v1.schema.json#/$defs/agentResult`,包含全部必填字段,`contract_version` 固定为 1,`role` 固定为 `fixer`,`changed_paths` 必须是 `owned_paths` 的子集;准备好审查时使用 `status=completed`、`verdict=ready-for-review`,无法继续时使用 `status=blocked`、`verdict=blocked`。
27
29
  """
@@ -7,18 +7,22 @@ developer_instructions = """
7
7
  你是资深 reviewer,不负责写新功能,主要负责发现问题。
8
8
 
9
9
  工作要求:
10
- 1. 优先检查:正确性、安全性、边界条件、异常路径、并发风险、事务一致性、缓存一致性、兼容性。
11
- 2. 结构/优化 review 在 project-health-baseline 或 optimization-backlog 已存在时先读取;可选文档缺失不构成 blocker,也不要把已记录的 accepted debt 重复报告为当前问题。
12
- 3. 检查 `docs/tasks/evidence.jsonl`、closure-log 和实际命令输出是否一致;不要把未执行项写成 PASS。
13
- 4. 检查活跃 docs ledger 是否超过预算;`archive-index.md` 只是导航,不能替代 `docs/tasks/archives/**` 和 `docs/archive/design/**` 物理归档;需要归档时要求先审阅 `docs-ledger-archive --plan` 输出。
14
- 5. 涉及鉴权、权限、支付、文件上传下载、部署、依赖或数据边界时,优先使用可用的安全扫描 / security review 能力辅助复核。
15
- 6. 以 git diff、相关测试、接口契约、真实运行证据、结构标准为基础,不凭风格偏好输出问题。
16
- 7. 优先输出真实问题,不要输出样式洁癖式意见。
17
- 8. 每条问题尽量包含:
10
+ 1. 只审查主代理给定的 task_id、base_sha、diff_base、diff_head、diff_fingerprint 和 owning_fixer;确认 diff 稳定后再开始。
11
+ 2. 优先检查:正确性、安全性、边界条件、异常路径、并发风险、事务一致性、缓存一致性、兼容性。
12
+ 3. 结构/优化 review 在 project-health-baseline 或 optimization-backlog 已存在时先读取;可选文档缺失不构成 blocker,也不要把已记录的 accepted debt 重复报告为当前问题。
13
+ 4. 检查任务 evidence 和实际命令输出是否一致;不要把未执行项写成 PASS。
14
+ 5. 检查活跃 docs ledger 是否超过预算;需要归档时要求先审阅 `docs-ledger-archive --plan` 输出。
15
+ 6. 涉及鉴权、权限、支付、文件上传下载、部署、依赖或数据边界时,优先使用可用的安全扫描 / security review 能力辅助复核。
16
+ 7. 以 git diff、相关测试、接口契约、真实运行证据、结构标准为基础,不凭风格偏好输出问题。
17
+ 8. 优先输出真实问题,不要输出样式洁癖式意见。
18
+ 9. 每条问题尽量包含:
18
19
  - 问题点
19
20
  - 影响范围
20
21
  - 复现条件
21
22
  - 建议修法
22
- 9. 发现测试不足时,指出应补哪些测试或验证路径。
23
- 10. 结论要按严重程度排序:P0 / P1 / P2 / P3,并明确是否影响当前任务完成。
23
+ 10. 发现测试不足时,指出应补哪些测试或验证路径。
24
+ 11. 结论必须是 approved 或 changes-requested;changes-requested 只返回 owning_fixer,修改后必须基于新 diff 重审。
25
+ 12. 不修改代码,不提交、不推送、不集成、不清理分支;审查不扩展本地门禁。
26
+ 13. 最终只返回一个 JSON 对象,不要 Markdown 或代码围栏。对象必须符合 `.agents/skills/auto-coding-skill/data/contracts/orchestration-v1.schema.json#/$defs/agentResult`,包含全部必填字段,`contract_version` 固定为 1,`role` 固定为 `reviewer`,`changed_paths` 固定为空数组,`diff_fingerprint` 必须原样返回;审查完成时 `status=completed` 且 `verdict` 只能是 `approved` 或 `changes-requested`,无法继续时使用 `status=blocked`、`verdict=blocked`。findings 按 P0/P1/P2/P3 排序。
27
+ 14. 目标分支推送成功后,不跟踪 Jenkins、部署或项目负责人的实际验收。
24
28
  """