@elvis1513/auto-coding-skill 3.0.0 → 3.0.1
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 +111 -54
- package/cli/assets/agents/browser-debugger.toml +5 -7
- package/cli/assets/agents/docs-researcher.toml +3 -5
- package/cli/assets/agents/explorer.toml +5 -10
- package/cli/assets/agents/fixer.toml +19 -17
- package/cli/assets/agents/reviewer.toml +14 -10
- package/cli/assets/skill/SKILL.md +111 -49
- package/cli/assets/skill/data/contracts/orchestration-v1.schema.json +475 -0
- package/cli/assets/skill/data/templates/ENGINEERING.md +164 -82
- package/cli/assets/skill/data/templates/bridges/AGENTS.md +4 -4
- package/cli/assets/skill/data/templates/docs/tasks/closure-log.md +7 -6
- package/cli/assets/skill/data/templates/docs/tasks/taskbook.md +11 -4
- package/cli/assets/skill/scripts/ap.py +1000 -563
- package/cli/src/index.js +399 -51
- package/cli/tests/ap_concurrency_test.py +396 -75
- package/cli/tests/ap_profiles_test.py +242 -99
- package/cli/tests/index.test.js +409 -15
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
# auto-coding-skill
|
|
2
2
|
|
|
3
|
-
A generic `.agents` engineering workflow with
|
|
4
|
-
|
|
5
|
-
|
|
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.1
|
|
8
|
+
|
|
9
|
+
- Fixed normal development to analysis → decomposition → design → development →
|
|
10
|
+
one changed-scope fast gate → push.
|
|
11
|
+
- Kept risk profiles for planning/review depth without promoting local work to a
|
|
12
|
+
standard/full gate or verify mode.
|
|
13
|
+
- Ended coding tasks immediately after safe target-branch push; Jenkins owns
|
|
14
|
+
later build/deploy work and the project owner owns acceptance.
|
|
15
|
+
- Removed repeated integration gates and all automatic post-push Jenkins/target
|
|
16
|
+
polling from `commit-push`.
|
|
17
|
+
- Required all project/Jenkins/GitLab/Nexus URLs, usernames, and direct passwords
|
|
18
|
+
under `access.*` during project initialization.
|
|
19
|
+
- Removed the shared-checkout `legacy` escape hatch; worktree isolation is now
|
|
20
|
+
mandatory for every write task.
|
|
21
|
+
- Added a structured subagent plan with parallel discovery, one-writer worktree
|
|
22
|
+
ownership, reviewer feedback loops, and main-agent Git lifecycle ownership.
|
|
23
|
+
- Enforced task-owned paths, dependency revisions, writer leases, and
|
|
24
|
+
fingerprint-bound review approvals in the task runtime.
|
|
25
|
+
- Added review, writer handoff, and conflicted-rebase resume lifecycle commands.
|
|
26
|
+
- Added planned paths and task intent to pre-development classification and
|
|
27
|
+
published a stable orchestration contract.
|
|
28
|
+
- Added controlled `ENGINEERING.md` workflow synchronization while preserving
|
|
29
|
+
project configuration and custom content.
|
|
6
30
|
|
|
7
31
|
## What changed in v3.0.0
|
|
8
32
|
|
|
@@ -17,8 +41,8 @@ target-environment verification.
|
|
|
17
41
|
updating to the latest remote target.
|
|
18
42
|
- Automatically removed integrated worktrees and local task branches, with safe
|
|
19
43
|
lease-based remote task-branch cleanup and merged-branch pruning.
|
|
20
|
-
-
|
|
21
|
-
|
|
44
|
+
- Initially kept a `legacy` compatibility escape hatch; v3.0.1 removes that path and
|
|
45
|
+
migrates existing configuration to mandatory worktree isolation.
|
|
22
46
|
|
|
23
47
|
## What changed in v2.2.1
|
|
24
48
|
|
|
@@ -50,6 +74,9 @@ target-environment verification.
|
|
|
50
74
|
advisory structure checks, minimal scaffold budgets, on-demand docs, and Agent
|
|
51
75
|
model inheritance.
|
|
52
76
|
|
|
77
|
+
This section records historical v2 behavior. The v3.0.1 workflow above supersedes
|
|
78
|
+
its full-gate and verify-mode rules for normal development.
|
|
79
|
+
|
|
53
80
|
## Install
|
|
54
81
|
|
|
55
82
|
```bash
|
|
@@ -82,18 +109,18 @@ Configure the selector in `docs/ENGINEERING.md`:
|
|
|
82
109
|
workflow:
|
|
83
110
|
mode: dev
|
|
84
111
|
profile: auto
|
|
112
|
+
completion: push
|
|
85
113
|
```
|
|
86
114
|
|
|
87
|
-
| Effective profile | Intended work |
|
|
115
|
+
| Effective profile | Intended work | Local gate | Completion |
|
|
88
116
|
| --- | --- | --- | --- |
|
|
89
|
-
| `micro` | docs/tests-only or explicitly isolated work | changed |
|
|
90
|
-
| `standard` | normal feature and defect work |
|
|
91
|
-
| `high-risk` |
|
|
117
|
+
| `micro` | docs/tests-only or explicitly isolated work | changed/quick | pushed |
|
|
118
|
+
| `standard` | normal feature and defect work | changed/quick | pushed |
|
|
119
|
+
| `high-risk` | sensitive, broad, deploy/build, or structural work | changed/quick | pushed |
|
|
92
120
|
|
|
93
|
-
`auto` is a selector, not a fourth effective profile.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
lower it.
|
|
121
|
+
`auto` is a selector, not a fourth effective profile. Profiles affect analysis,
|
|
122
|
+
design depth, and reviewer recommendations only. They never expand the automatic
|
|
123
|
+
local gate or turn Jenkins/target verification into a completion condition.
|
|
97
124
|
|
|
98
125
|
An explicit configured `micro`, `standard`, or `high-risk` profile replaces
|
|
99
126
|
auto's low/normal baseline and acts as a floor for CLI overrides. Independently
|
|
@@ -106,13 +133,16 @@ python3 docs/tools/autopipeline/ap.py classify --scope auto
|
|
|
106
133
|
python3 docs/tools/autopipeline/ap.py impact --scope auto --json
|
|
107
134
|
```
|
|
108
135
|
|
|
109
|
-
Each result includes the effective profile,
|
|
110
|
-
|
|
136
|
+
Each result includes the effective profile, fixed fast gate scope, reasons,
|
|
137
|
+
recommended Agent roles, and a machine-readable `agent_plan` describing stages,
|
|
138
|
+
dependencies, assignment/result contracts, and lifecycle ownership.
|
|
111
139
|
|
|
112
140
|
## Parallel write isolation
|
|
113
141
|
|
|
114
142
|
Each task that may write files runs in its own registered Git worktree and
|
|
115
|
-
`codex/` task branch.
|
|
143
|
+
`codex/` task branch. `worktree` is the only supported isolation value. Each
|
|
144
|
+
worktree has exactly one writer; read-only discovery may remain in the primary
|
|
145
|
+
worktree.
|
|
116
146
|
|
|
117
147
|
```yaml
|
|
118
148
|
concurrency:
|
|
@@ -127,18 +157,33 @@ concurrency:
|
|
|
127
157
|
```
|
|
128
158
|
|
|
129
159
|
```bash
|
|
130
|
-
python3 docs/tools/autopipeline/ap.py task-start T0001
|
|
160
|
+
python3 docs/tools/autopipeline/ap.py task-start T0001 --owned-path src --writer "$FIXER"
|
|
131
161
|
# Continue in the worktree path printed by task-start.
|
|
132
162
|
python3 docs/tools/autopipeline/ap.py task-status T0001
|
|
133
163
|
python3 docs/tools/autopipeline/ap.py task-submodule-sync T0001
|
|
134
|
-
python3 docs/tools/autopipeline/ap.py
|
|
135
|
-
python3 docs/tools/autopipeline/ap.py task-
|
|
164
|
+
python3 docs/tools/autopipeline/ap.py task-review T0001 --verdict approved --diff-fingerprint "$SHA256"
|
|
165
|
+
python3 docs/tools/autopipeline/ap.py task-handoff T0001 --from "$FIXER" --to "$CODEX_THREAD_ID" --generation 1
|
|
166
|
+
python3 docs/tools/autopipeline/ap.py commit-push T0001 --writer "$CODEX_THREAD_ID" --msg "T0001: summary"
|
|
167
|
+
python3 docs/tools/autopipeline/ap.py task-integrate T0001 --writer "$CODEX_THREAD_ID"
|
|
136
168
|
```
|
|
137
169
|
|
|
138
170
|
`commit-push` runs only inside the task worktree recorded in the repository
|
|
139
171
|
manifest and stages only that task's changes. Unknown changes stop the command;
|
|
140
172
|
the workflow never restores, resets, stashes, or cleans them.
|
|
141
173
|
|
|
174
|
+
Before upgrading a v3.0.0 project, finish and clean every registered in-flight
|
|
175
|
+
task with its currently installed runtime. `autocoding sync` refuses to replace
|
|
176
|
+
that runtime while a schema-1 task remains, because 3.0.1 cannot safely infer
|
|
177
|
+
its path ownership, dependencies, writer lease, or review state.
|
|
178
|
+
|
|
179
|
+
`commit-push` runs the only local gate. `task-integrate` is the rest of the same
|
|
180
|
+
push stage: it fetches/rebases, CAS-pushes the configured target, confirms the
|
|
181
|
+
remote SHA, and cleans up without repeating the gate. Successful integration
|
|
182
|
+
ends the coding task; do not wait for Jenkins, deployment, or acceptance results.
|
|
183
|
+
The task commit runs project commit hooks once. Its internal backup-branch push
|
|
184
|
+
skips the pre-push hook, while the final target-branch push runs that hook once.
|
|
185
|
+
Integration does not create a second evidence commit.
|
|
186
|
+
|
|
142
187
|
Successful integration removes the clean worktree and merged local branch, and
|
|
143
188
|
deletes the merged remote task branch by default. `task-finish T0001` retries
|
|
144
189
|
cleanup for one integrated task; `task-prune` removes registered merged tasks
|
|
@@ -166,9 +211,7 @@ forced cleanup until they are reinitialized or recovered.
|
|
|
166
211
|
|
|
167
212
|
```yaml
|
|
168
213
|
commands:
|
|
169
|
-
gate_changed: "
|
|
170
|
-
gate_standard: "npm test"
|
|
171
|
-
gate_full: "npm run test:full"
|
|
214
|
+
gate_changed: "git diff --check"
|
|
172
215
|
|
|
173
216
|
gate:
|
|
174
217
|
default_scope: auto
|
|
@@ -178,10 +221,14 @@ gate:
|
|
|
178
221
|
profile: high-risk
|
|
179
222
|
```
|
|
180
223
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
224
|
+
Rules affect classification and planning only. Legacy `scope` or `commands`
|
|
225
|
+
inside a rule never execute automatically; invoke an explicitly configured
|
|
226
|
+
diagnostic with `ap.py run <name>` when the user asks for it.
|
|
227
|
+
|
|
228
|
+
For Node projects, a new scaffold selects `npm run test:changed` only when that
|
|
229
|
+
dedicated quick script exists. It never promotes ordinary `npm test`, builds, or
|
|
230
|
+
full regression into the automatic changed gate. Standard/full commands may be
|
|
231
|
+
kept as explicit diagnostics, but normal development does not invoke them.
|
|
185
232
|
|
|
186
233
|
## Structure policy
|
|
187
234
|
|
|
@@ -239,27 +286,32 @@ Existing project-local `model = "..."` lines are treated as explicit overrides:
|
|
|
239
286
|
client inheritance.
|
|
240
287
|
- Custom Agent files are always preserved byte-for-byte.
|
|
241
288
|
|
|
242
|
-
The effective profile
|
|
243
|
-
|
|
244
|
-
- micro: main Agent only
|
|
245
|
-
- standard:
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
289
|
+
The effective profile emits an executable collaboration shape:
|
|
290
|
+
|
|
291
|
+
- micro: main Agent only unless useful independent work exceeds dispatch overhead
|
|
292
|
+
- standard/high-risk: main decomposition → parallel justified explorer/docs/browser
|
|
293
|
+
discovery → main design → dependency waves of isolated fixers → read-only
|
|
294
|
+
reviewers → main fast gate/integration, followed by final push/cleanup
|
|
295
|
+
|
|
296
|
+
Only dependency-free fixer units with explicitly non-overlapping paths may run
|
|
297
|
+
in parallel. A dependent writer starts after its prerequisite is integrated.
|
|
298
|
+
Subagents do not commit, push, integrate, clean branches, or run the project gate.
|
|
299
|
+
Reviewer findings return to the owning fixer. Verdicts bind to a diff fingerprint,
|
|
300
|
+
so any edit requires re-review before the main Agent may run the gate.
|
|
301
|
+
|
|
302
|
+
## Required access configuration
|
|
303
|
+
|
|
304
|
+
For a new project, `autocoding sync` creates `access.project`, `access.jenkins`,
|
|
305
|
+
`access.gitlab`, and `access.nexus` in `docs/ENGINEERING.md`. Existing projects
|
|
306
|
+
must run `ap.py upgrade --write` to merge newly required fields into their manual
|
|
307
|
+
configuration. Fill every URL, username, and direct password during
|
|
308
|
+
initialization as an inline YAML string; quote values that resemble numbers,
|
|
309
|
+
dates, booleans, or YAML collections. `status` rejects blank/TODO fields;
|
|
310
|
+
`doctor` and `task-start`
|
|
311
|
+
also validate URL shape locally. These access checks never contact the listed
|
|
312
|
+
service endpoints; after validation, `task-start` may still fetch the configured
|
|
313
|
+
Git remote unless `--no-fetch` is used. Configuration presence does not enable
|
|
314
|
+
Jenkins/build/deploy verification.
|
|
263
315
|
|
|
264
316
|
## Core commands
|
|
265
317
|
|
|
@@ -268,13 +320,15 @@ python3 docs/tools/autopipeline/ap.py doctor
|
|
|
268
320
|
python3 docs/tools/autopipeline/ap.py classify --scope auto
|
|
269
321
|
python3 docs/tools/autopipeline/ap.py light-gate --scope auto --explain
|
|
270
322
|
python3 docs/tools/autopipeline/ap.py structure-check --scope auto
|
|
271
|
-
python3 docs/tools/autopipeline/ap.py task-start T0001
|
|
323
|
+
python3 docs/tools/autopipeline/ap.py task-start T0001 --owned-path src --writer "$FIXER"
|
|
272
324
|
python3 docs/tools/autopipeline/ap.py task-status T0001
|
|
273
325
|
python3 docs/tools/autopipeline/ap.py task-submodule-sync T0001
|
|
326
|
+
python3 docs/tools/autopipeline/ap.py task-review T0001 --verdict approved --diff-fingerprint "$SHA256"
|
|
327
|
+
python3 docs/tools/autopipeline/ap.py task-handoff T0001 --from "$FIXER" --to "$CODEX_THREAD_ID" --generation 1
|
|
274
328
|
python3 docs/tools/autopipeline/ap.py docs-ledger-check
|
|
275
329
|
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
|
|
330
|
+
python3 docs/tools/autopipeline/ap.py commit-push T0001 --writer "$CODEX_THREAD_ID" --msg "T0001: summary"
|
|
331
|
+
python3 docs/tools/autopipeline/ap.py task-integrate T0001 --writer "$CODEX_THREAD_ID"
|
|
278
332
|
python3 docs/tools/autopipeline/ap.py task-finish T0001
|
|
279
333
|
python3 docs/tools/autopipeline/ap.py task-prune
|
|
280
334
|
```
|
|
@@ -299,15 +353,18 @@ Retired template files do not count as drift.
|
|
|
299
353
|
|
|
300
354
|
## Development
|
|
301
355
|
|
|
356
|
+
Normal changes should use the configured changed-scope gate only. The commands
|
|
357
|
+
below are explicit package-maintainer diagnostics, not the default project
|
|
358
|
+
development gate:
|
|
359
|
+
|
|
302
360
|
```bash
|
|
303
|
-
npm run sync-assets
|
|
304
|
-
npm run check:assets
|
|
305
361
|
npm run test:src
|
|
306
362
|
npm test
|
|
307
363
|
npm run release:check
|
|
308
364
|
```
|
|
309
365
|
|
|
310
|
-
`
|
|
311
|
-
|
|
366
|
+
Run `npm run sync-assets` explicitly after source changes. `release:check` is a
|
|
367
|
+
read-only release gate: it rejects asset drift, validates Python 3.11 grammar and
|
|
368
|
+
TOML, runs the broader regressions, and performs `npm pack --dry-run`.
|
|
312
369
|
|
|
313
370
|
License: MIT.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
name = "browser_debugger"
|
|
2
2
|
description = "浏览器调试代理,用于复现 UI 问题、收集控制台和网络证据。"
|
|
3
3
|
model_reasoning_effort = "xhigh"
|
|
4
|
-
sandbox_mode = "
|
|
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.
|
|
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.
|
|
14
|
-
5.
|
|
15
|
-
6.
|
|
16
|
-
7.
|
|
17
|
-
8.
|
|
18
|
-
9.
|
|
19
|
-
10.
|
|
20
|
-
11.
|
|
21
|
-
12.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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.
|
|
12
|
-
3.
|
|
13
|
-
4.
|
|
14
|
-
5.
|
|
15
|
-
6.
|
|
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
|
-
|
|
23
|
-
|
|
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
|
"""
|