@elvis1513/auto-coding-skill 4.1.2 → 4.1.4
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 +39 -3
- package/cli/assets/agents/explorer.toml +1 -1
- package/cli/assets/agents/fixer.toml +3 -3
- package/cli/assets/skill/SKILL.md +11 -13
- package/cli/assets/skill/data/contracts/orchestration-v1.schema.json +16 -0
- package/cli/assets/skill/data/policies/workflow-migrations-v1.json +2 -2
- package/cli/assets/skill/data/templates/ENGINEERING.md +2 -2
- package/cli/assets/skill/data/templates/bridges/AGENTS.md +9 -8
- package/cli/assets/skill/scripts/ap.py +591 -46
- package/cli/tests/ap_concurrency_test.py +102 -0
- package/cli/tests/ap_profiles_test.py +197 -1
- package/cli/tests/index.test.js +19 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,9 @@ The Skill is a selectable guardrail, not a command sequence that must run for
|
|
|
9
9
|
every task. The model skips machinery whose expected benefit does not exceed its
|
|
10
10
|
cost; read-only work and obvious small clean-checkout changes normally stay direct.
|
|
11
11
|
|
|
12
|
-
Version 4.1.
|
|
12
|
+
Version 4.1.4 makes direct continuation provably pre-write, closes self-review and
|
|
13
|
+
risk-classification gaps, validates Agent contracts, and makes tag publication
|
|
14
|
+
idempotent. Version 4.1.3 closed classification bypasses. Version 4.1.2 made mechanisms required,
|
|
13
15
|
model-selectable when beneficial, or forbidden for the current task. Version
|
|
14
16
|
4.1.1 consolidated the 4.x delivery-first workflow into one canonical
|
|
15
17
|
repository contract. Version 4.0 replaced the 3.x governance-first defaults with progressive
|
|
@@ -67,17 +69,24 @@ The result includes:
|
|
|
67
69
|
- `execution_mode=isolated`: dirty checkout, explicit isolation, or multiple writers.
|
|
68
70
|
- `execution_mode=none`: no task signal or change; create no branch/worktree.
|
|
69
71
|
- `review_required` and `design_required`: risk-based escalation decisions.
|
|
70
|
-
- `task_kind`: `read_only`, `change`, `terminal_maintenance`, or `none`.
|
|
72
|
+
- `task_kind`: `read_only`, `change`, `terminal_maintenance`, or internal `none`.
|
|
71
73
|
- `mechanism_plan.required`: the complete minimum mechanism set for the task.
|
|
72
74
|
- `mechanism_plan.optional_when_beneficial`: model-selectable mechanisms whose
|
|
73
75
|
expected benefit must exceed coordination cost.
|
|
74
76
|
- `mechanism_plan.forbidden`: mechanisms that stay off unless the user overrides.
|
|
77
|
+
- `optional_agents`: model-selectable explorer/docs/browser candidates; they are
|
|
78
|
+
never automatic stages.
|
|
75
79
|
- an adaptive agent plan that does not force fan-out for ordinary work.
|
|
76
80
|
|
|
77
81
|
Clean serial work proceeds directly on the current branch with normal Git; it does
|
|
78
82
|
not create machine lifecycle state. Use `task-start` only when classification
|
|
79
83
|
requires isolation/review or the user explicitly requests lifecycle tracking:
|
|
80
84
|
|
|
85
|
+
When a direct task materially changes scope after writing, reclassify with
|
|
86
|
+
`--continue-direct` and repeat every current task `--planned-path`. Undeclared
|
|
87
|
+
dirty paths, another writer, or mandatory isolation still selects a worktree. If
|
|
88
|
+
the new plan requires review lifecycle, reuse `--continue-direct` on `task-start`.
|
|
89
|
+
|
|
81
90
|
```bash
|
|
82
91
|
python3 docs/tools/autopipeline/ap.py task-start T0001 \
|
|
83
92
|
--owned-path backend/internal/orders --force-lifecycle
|
|
@@ -97,7 +106,8 @@ python3 docs/tools/autopipeline/ap.py task-start T0002 \
|
|
|
97
106
|
# implement in the printed worktree
|
|
98
107
|
python3 docs/tools/autopipeline/ap.py task-status T0002 --json
|
|
99
108
|
python3 docs/tools/autopipeline/ap.py task-review T0002 \
|
|
100
|
-
--verdict approved --diff-fingerprint "$CURRENT_DIFF_FINGERPRINT"
|
|
109
|
+
--verdict approved --diff-fingerprint "$CURRENT_DIFF_FINGERPRINT" \
|
|
110
|
+
--reviewer "$REVIEWER_ID"
|
|
101
111
|
python3 docs/tools/autopipeline/ap.py commit-push T0002 \
|
|
102
112
|
--msg "T0002: bounded change"
|
|
103
113
|
python3 docs/tools/autopipeline/ap.py task-integrate T0002
|
|
@@ -200,6 +210,32 @@ project-specific facts outside the managed ENGINEERING block. Root `AGENTS.md` i
|
|
|
200
210
|
replaced as a whole; its previous content is archived under
|
|
201
211
|
`docs/archive/workflow/` as historical, non-authoritative context.
|
|
202
212
|
|
|
213
|
+
## What changed in 4.1.4
|
|
214
|
+
|
|
215
|
+
- Added clean pre-write direct claims so broad paths cannot adopt unknown existing
|
|
216
|
+
dirt after development starts.
|
|
217
|
+
- Prevented the current writer lease holder from approving its own diff and added
|
|
218
|
+
executable assignment/result contract validation.
|
|
219
|
+
- Escalated high-confidence database, authorization, settlement, gateway, and
|
|
220
|
+
production intents while keeping ordinary UI work lightweight.
|
|
221
|
+
- Made mechanism plans dependency-closed: parallel fixers require reclassification
|
|
222
|
+
with multiple writers and therefore require isolated worktrees.
|
|
223
|
+
- Published from matching `v*` tags with idempotent npm registry checks and a final
|
|
224
|
+
registry verification.
|
|
225
|
+
|
|
226
|
+
## What changed in 4.1.3
|
|
227
|
+
|
|
228
|
+
- Made explicit task kinds fail closed: `none` is internal-only and terminal
|
|
229
|
+
maintenance cannot be applied to code or unrelated documentation paths.
|
|
230
|
+
- Added guarded `--continue-direct` reclassification for already-owned changes;
|
|
231
|
+
unknown dirty paths still require isolation.
|
|
232
|
+
- Separated intent risk hints from path/rule-confirmed high risk so ordinary login
|
|
233
|
+
or payment UI work no longer automatically receives a heavy lifecycle.
|
|
234
|
+
- Aligned generated Agent plans with their JSON Schema and exposed optional
|
|
235
|
+
read-only Agent candidates without auto-dispatching them.
|
|
236
|
+
- Clarified delegated-fixer worktree ownership, reviewer identity, and explorer
|
|
237
|
+
source authority.
|
|
238
|
+
|
|
203
239
|
## What changed in 4.1.2
|
|
204
240
|
|
|
205
241
|
- Added explicit read-only, change, and terminal-maintenance task kinds so
|
|
@@ -8,7 +8,7 @@ developer_instructions = """
|
|
|
8
8
|
|
|
9
9
|
工作要求:
|
|
10
10
|
1. 优先用 rg / git / 项目脚本快速定位真实入口,再向下追踪调用链。
|
|
11
|
-
2.
|
|
11
|
+
2. 以当前代码、测试、schema、migration 和运行配置为事实源;仅按任务需要读取 ENGINEERING 或当前接口文档,任务记录只在明确追溯历史时读取。涉及结构/优化时,仅在结构标准、健康基线或 optimization backlog 已存在时读取,不因可选文档缺失而阻塞。
|
|
12
12
|
3. 必要时运行 `ap.py classify --scope auto`,说明执行模式、风险和是否确实需要设计/reviewer;普通任务默认主代理直接完成,本地 gate 始终保持 changed-scope。
|
|
13
13
|
4. 输出根因时说明当前代码应归属的层级、现有同类模块、可复用 helper / 组件 / 脚本,以及是否触及 `structure.layer_rules`。
|
|
14
14
|
5. 如果根因依赖外部库、框架或版本行为,标记需要 docs_researcher / Context7 继续核对,不要凭记忆猜。
|
|
@@ -7,9 +7,9 @@ developer_instructions = """
|
|
|
7
7
|
你负责小而准的实现修改。
|
|
8
8
|
|
|
9
9
|
工作要求:
|
|
10
|
-
1. 只在问题已经相对明确,并收到 task_id、execution_mode、owned_paths、depends_on 和 acceptance
|
|
11
|
-
2.
|
|
12
|
-
3. 一个 worktree 只能有一个写入者。只修改 owned_paths
|
|
10
|
+
1. 只在问题已经相对明确,并收到 task_id、execution_mode、owned_paths、depends_on 和 acceptance 后再动手。
|
|
11
|
+
2. fixer 属于 delegated writer,必须使用注册的 isolated worktree;direct 模式保留给干净 checkout 中独立开发的主代理。确认当前目录和 task_branch 与分配一致,否则停止并上报。
|
|
12
|
+
3. 一个 worktree 只能有一个写入者。只修改 owned_paths,不进入其他任务工作树;发现未知改动立即停止,不 restore/reset/stash/clean。
|
|
13
13
|
4. 坚持“最小可辩护修改”原则。
|
|
14
14
|
5. 除非明确要求,否则不要重构、不做大面积改名、不改无关文件。
|
|
15
15
|
6. 先跟随项目现有模式、helper、组件、脚本和文档约束,不新造不必要抽象。
|
|
@@ -13,45 +13,43 @@ Do not reconstruct or duplicate those rules from historical task documents.
|
|
|
13
13
|
|
|
14
14
|
Normal delivery is:
|
|
15
15
|
|
|
16
|
-
`analysis → decomposition → necessary design → development →
|
|
17
|
-
changed-scope gate → commit/push`.
|
|
16
|
+
`analysis → decomposition → necessary design → development → bounded gate → commit/push`.
|
|
18
17
|
|
|
19
18
|
## Select the minimum mechanism set
|
|
20
19
|
|
|
21
|
-
Read-only questions need no workflow command.
|
|
22
|
-
|
|
23
|
-
impact, risk, or concurrency is unclear, run:
|
|
20
|
+
Read-only questions need no workflow command. Clean serial edits and terminal
|
|
21
|
+
maintenance may follow `AGENTS.md` directly. When impact or concurrency is unclear, run:
|
|
24
22
|
|
|
25
23
|
```bash
|
|
26
24
|
python3 docs/tools/autopipeline/ap.py classify --scope auto \
|
|
27
25
|
--planned-path <PATH> --intent "<intent>" [--writers <N>] \
|
|
28
|
-
[--task-kind read_only|change|terminal_maintenance]
|
|
26
|
+
[--task-kind read_only|change|terminal_maintenance] [--claim-direct]
|
|
29
27
|
```
|
|
30
28
|
|
|
31
29
|
Run `mechanism_plan.required`. The model may select
|
|
32
30
|
`optional_when_beneficial` only when expected value exceeds coordination cost.
|
|
33
31
|
Do not run `forbidden` mechanisms unless the user explicitly overrides the plan.
|
|
34
|
-
Reclassify
|
|
35
|
-
|
|
32
|
+
Reclassify before changing writer count. For uncertain direct work, create
|
|
33
|
+
`--claim-direct` while clean; continuation requires its ID and exact paths.
|
|
36
34
|
|
|
37
35
|
Use the registered lifecycle only when classification requires isolation or
|
|
38
36
|
fingerprinted review, or when the user explicitly requests it:
|
|
39
37
|
|
|
40
38
|
```bash
|
|
41
39
|
python3 docs/tools/autopipeline/ap.py task-start T0001 \
|
|
42
|
-
--owned-path src [--isolated] [--review-required] [--
|
|
40
|
+
--owned-path src [--isolated] [--review-required] [--continue-direct --direct-claim <ID>]
|
|
43
41
|
# For review-required work, obtain the current fingerprint and approve it:
|
|
44
42
|
python3 docs/tools/autopipeline/ap.py task-status T0001 --json
|
|
45
43
|
python3 docs/tools/autopipeline/ap.py task-review T0001 \
|
|
46
|
-
--verdict approved --diff-fingerprint <CURRENT_DIFF_FINGERPRINT>
|
|
44
|
+
--verdict approved --diff-fingerprint <CURRENT_DIFF_FINGERPRINT> --reviewer <REVIEWER_ID>
|
|
47
45
|
python3 docs/tools/autopipeline/ap.py commit-push T0001 --msg "T0001: summary"
|
|
48
46
|
# Isolated tasks only:
|
|
49
47
|
python3 docs/tools/autopipeline/ap.py task-integrate T0001
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
Each parallel writer uses a
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
Each parallel writer uses a task ID, worktree, lease, dependency SHAs, and distinct
|
|
51
|
+
`owned_paths`. Main integrates, gates, pushes, and cleans. Validate delegated JSON
|
|
52
|
+
with `agent-contract-check`; parallel fixers require reclassification with `--writers >1`.
|
|
55
53
|
|
|
56
54
|
## Close with the bounded routed gate
|
|
57
55
|
|
|
@@ -384,6 +384,7 @@
|
|
|
384
384
|
"policies",
|
|
385
385
|
"assignment_contract",
|
|
386
386
|
"result_contract",
|
|
387
|
+
"optional_roles",
|
|
387
388
|
"stages",
|
|
388
389
|
"constraints"
|
|
389
390
|
],
|
|
@@ -409,6 +410,9 @@
|
|
|
409
410
|
"result_contract": {
|
|
410
411
|
"$ref": "#/$defs/stringArray"
|
|
411
412
|
},
|
|
413
|
+
"optional_roles": {
|
|
414
|
+
"$ref": "#/$defs/stringArray"
|
|
415
|
+
},
|
|
412
416
|
"stages": {
|
|
413
417
|
"type": "array",
|
|
414
418
|
"items": {
|
|
@@ -454,10 +458,13 @@
|
|
|
454
458
|
"classification_files",
|
|
455
459
|
"intent_provided",
|
|
456
460
|
"intent_categories",
|
|
461
|
+
"intent_risk_candidates",
|
|
462
|
+
"high_confidence_intent_categories",
|
|
457
463
|
"task_kind",
|
|
458
464
|
"profile",
|
|
459
465
|
"categories",
|
|
460
466
|
"recommended_agents",
|
|
467
|
+
"optional_agents",
|
|
461
468
|
"agent_plan",
|
|
462
469
|
"mechanism_plan"
|
|
463
470
|
],
|
|
@@ -483,6 +490,12 @@
|
|
|
483
490
|
"intent_categories": {
|
|
484
491
|
"$ref": "#/$defs/stringArray"
|
|
485
492
|
},
|
|
493
|
+
"intent_risk_candidates": {
|
|
494
|
+
"$ref": "#/$defs/stringArray"
|
|
495
|
+
},
|
|
496
|
+
"high_confidence_intent_categories": {
|
|
497
|
+
"$ref": "#/$defs/stringArray"
|
|
498
|
+
},
|
|
486
499
|
"task_kind": {
|
|
487
500
|
"enum": ["none", "read_only", "change", "terminal_maintenance"]
|
|
488
501
|
},
|
|
@@ -499,6 +512,9 @@
|
|
|
499
512
|
"recommended_agents": {
|
|
500
513
|
"$ref": "#/$defs/stringArray"
|
|
501
514
|
},
|
|
515
|
+
"optional_agents": {
|
|
516
|
+
"$ref": "#/$defs/stringArray"
|
|
517
|
+
},
|
|
502
518
|
"agent_plan": {
|
|
503
519
|
"$ref": "#/$defs/agentPlan"
|
|
504
520
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
workflow:
|
|
3
|
-
skill_version: "4.1.
|
|
3
|
+
skill_version: "4.1.4"
|
|
4
4
|
mode: "dev"
|
|
5
5
|
profile: "auto"
|
|
6
6
|
completion: "push"
|
|
@@ -94,7 +94,7 @@ docs:
|
|
|
94
94
|
|
|
95
95
|
# Engineering Configuration and Project Facts
|
|
96
96
|
|
|
97
|
-
<!-- auto-coding-skill:managed-workflow:start version=4.1.
|
|
97
|
+
<!-- auto-coding-skill:managed-workflow:start version=4.1.4 -->
|
|
98
98
|
|
|
99
99
|
Root `AGENTS.md` is the single shared behavioral protocol. The installed
|
|
100
100
|
`SKILL.md` contains invocation guidance. This file is the single source for the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- auto-coding-skill:managed-agents:start version=4.1.
|
|
1
|
+
<!-- auto-coding-skill:managed-agents:start version=4.1.4 -->
|
|
2
2
|
# Shared Engineering Protocol
|
|
3
3
|
|
|
4
4
|
This file is fully managed by `auto-coding-skill`. Keep project-specific facts,
|
|
@@ -51,17 +51,16 @@ failure may continue in the same conversation/task without a second lifecycle.
|
|
|
51
51
|
|
|
52
52
|
## Git and parallel work
|
|
53
53
|
|
|
54
|
-
- One writer in a clean checkout works directly
|
|
55
|
-
|
|
54
|
+
- One writer in a clean checkout works directly. If review may be needed, create a
|
|
55
|
+
claim before the first write; continuation requires that claim and exact paths.
|
|
56
56
|
- Existing unrelated changes, another writer, or configured mandatory isolation
|
|
57
57
|
requires a registered task branch/worktree.
|
|
58
|
-
- Every
|
|
58
|
+
- Every delegated fixer or parallel writer owns a task ID/worktree, writer lease,
|
|
59
59
|
non-overlapping `owned_paths`, and prerequisite commit SHAs.
|
|
60
60
|
- Never let multiple writing agents share a checkout. Never restore, reset, stash,
|
|
61
61
|
clean, overwrite, or commit unknown changes.
|
|
62
62
|
- No diff means no commit, push, or temporary branch.
|
|
63
|
-
-
|
|
64
|
-
merged temporary worktrees and branches.
|
|
63
|
+
- Main integrates in dependency order and removes only clean, merged temporary state.
|
|
65
64
|
- Do not sync or upgrade while any registered task is active.
|
|
66
65
|
|
|
67
66
|
## Design, agents, and review
|
|
@@ -73,8 +72,10 @@ failure may continue in the same conversation/task without a second lifecycle.
|
|
|
73
72
|
or key user-flow decisions.
|
|
74
73
|
- Use read-only explorer/docs/browser agents only for independent questions.
|
|
75
74
|
- Use parallel fixers only for bounded, dependency-free, non-overlapping units.
|
|
76
|
-
-
|
|
77
|
-
|
|
75
|
+
- Reclassify before parallel fixers; single-writer plans grant no implicit writes.
|
|
76
|
+
- Validate delegated assignment/result JSON with `agent-contract-check` before use.
|
|
77
|
+
- Require fingerprinted review only for path/rule-confirmed high-risk,
|
|
78
|
+
contract-crossing, parallel, or configured work; intent words are candidates only.
|
|
78
79
|
- Review blocks only defects introduced or worsened in the promised scope.
|
|
79
80
|
Adjacent existing issues are non-blocking follow-ups.
|
|
80
81
|
- Semantic changes invalidate approval. Mechanical documentation-only corrections
|