@elvis1513/auto-coding-skill 3.0.2 → 3.0.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 +15 -2
- package/cli/assets/agents/fixer.toml +3 -3
- package/cli/assets/skill/SKILL.md +30 -22
- package/cli/assets/skill/data/contracts/orchestration-v1.schema.json +18 -2
- package/cli/assets/skill/data/policies/workflow-migrations-v1.json +3 -3
- package/cli/assets/skill/data/templates/ENGINEERING.md +21 -14
- package/cli/assets/skill/data/templates/bridges/AGENTS.md +2 -2
- package/cli/assets/skill/scripts/ap.py +14 -12
- package/cli/src/index.js +5 -4
- package/cli/tests/ap_concurrency_test.py +3 -3
- package/cli/tests/ap_profiles_test.py +2 -2
- package/cli/tests/index.test.js +12 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,19 @@ A generic `.agents` engineering workflow with isolated parallel worktrees, fast
|
|
|
4
4
|
local validation, push-based completion, required access configuration, and safe
|
|
5
5
|
branch cleanup.
|
|
6
6
|
|
|
7
|
+
## What changed in v3.0.4
|
|
8
|
+
|
|
9
|
+
- Fixed the GeeSight legacy workflow replacement so the migrated owner-managed
|
|
10
|
+
diagnostic wording does not trigger its own post-push conflict rule.
|
|
11
|
+
|
|
12
|
+
## What changed in v3.0.3
|
|
13
|
+
|
|
14
|
+
- Made workspace isolation adaptive: one serial task uses a clean current branch;
|
|
15
|
+
dirty checkouts or concurrent writers use isolated task branches/worktrees.
|
|
16
|
+
- Kept one changed-scope fast gate as the complete local validation step and
|
|
17
|
+
avoided temporary branches when they provide no isolation benefit.
|
|
18
|
+
- Fixed quoted and inline legacy gate YAML detection in CLI status.
|
|
19
|
+
|
|
7
20
|
## What changed in v3.0.2
|
|
8
21
|
|
|
9
22
|
- Added controlled synchronization for the root `AGENTS.md` workflow bridge as
|
|
@@ -89,7 +102,7 @@ branch cleanup.
|
|
|
89
102
|
advisory structure checks, minimal scaffold budgets, on-demand docs, and Agent
|
|
90
103
|
model inheritance.
|
|
91
104
|
|
|
92
|
-
This section records historical v2 behavior. The v3.0.
|
|
105
|
+
This section records historical v2 behavior. The v3.0.3 workflow above supersedes
|
|
93
106
|
its full-gate and verify-mode rules for normal development.
|
|
94
107
|
|
|
95
108
|
## Install
|
|
@@ -161,7 +174,7 @@ worktree.
|
|
|
161
174
|
|
|
162
175
|
```yaml
|
|
163
176
|
concurrency:
|
|
164
|
-
isolation:
|
|
177
|
+
isolation: adaptive
|
|
165
178
|
base_ref: origin/dev
|
|
166
179
|
target_branch: dev
|
|
167
180
|
branch_prefix: codex/
|
|
@@ -7,9 +7,9 @@ developer_instructions = """
|
|
|
7
7
|
你负责小而准的实现修改。
|
|
8
8
|
|
|
9
9
|
工作要求:
|
|
10
|
-
1. 只在问题已经相对明确,并收到 task_id、
|
|
11
|
-
2.
|
|
12
|
-
3. 一个 worktree 只能有一个写入者。只修改 owned_paths,不进入或修改其他任务工作树;发现未知改动立即停止,不 restore/reset/stash/clean。
|
|
10
|
+
1. 只在问题已经相对明确,并收到 task_id、execution_mode、owned_paths、depends_on 和 acceptance 后再动手;isolated 模式还必须收到 task_branch 和绝对 worktree_path。
|
|
11
|
+
2. direct 模式只用于单写入者且主代理确认当前 checkout 干净的当前分支;isolated 模式必须确认当前目录和 task_branch 与分配的注册 worktree 一致。不满足时停止并上报。
|
|
12
|
+
3. 一个 worktree 只能有一个写入者。只修改 owned_paths,不进入或修改其他任务工作树;发现未知改动立即停止,不 restore/reset/stash/clean。direct 模式期间主代理不得并发编辑同一 checkout。
|
|
13
13
|
4. 坚持“最小可辩护修改”原则。
|
|
14
14
|
5. 除非明确要求,否则不要重构、不做大面积改名、不改无关文件。
|
|
15
15
|
6. 先跟随项目现有模式、helper、组件、脚本和文档约束,不新造不必要抽象。
|
|
@@ -12,9 +12,10 @@ gate → push workflow. The project keeps one manual configuration source:
|
|
|
12
12
|
At task start, inventory installed skills, MCP servers, connectors, browser
|
|
13
13
|
tools, and repository scripts. Prefer the most direct authoritative capability.
|
|
14
14
|
The main agent decomposes the task before dispatch. Run independent read-only
|
|
15
|
-
discovery roles in parallel when the runtime supports them.
|
|
16
|
-
|
|
17
|
-
never share a write
|
|
15
|
+
discovery roles in parallel when the runtime supports them. A single serial
|
|
16
|
+
writer uses the current branch when its checkout is clean. Dirty checkouts and
|
|
17
|
+
parallel writers use one registered worktree per fixer; never share a write
|
|
18
|
+
worktree between agents.
|
|
18
19
|
|
|
19
20
|
## Install and upgrade
|
|
20
21
|
|
|
@@ -65,15 +66,18 @@ python3 docs/tools/autopipeline/ap.py classify --scope auto
|
|
|
65
66
|
# or --intent-file when the working tree does not yet describe the task.
|
|
66
67
|
```
|
|
67
68
|
|
|
68
|
-
`light-gate` remains available for an explicit gate-diagnostic task. Do not
|
|
69
|
-
it before normal
|
|
69
|
+
`light-gate` remains available for an explicit gate-diagnostic task. Do not add
|
|
70
|
+
it before normal closure. The main agent runs exactly one configured changed
|
|
71
|
+
gate directly on a clean serial branch or through `commit-push` for isolated work.
|
|
70
72
|
|
|
71
|
-
##
|
|
73
|
+
## Adaptive write isolation
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
For one serial writer, inspect the current checkout before creating anything. If
|
|
76
|
+
it is clean, use its current branch directly. If it already has changes, or two
|
|
77
|
+
or more writers will run concurrently, preserve the checkout and use one
|
|
78
|
+
registered task branch/worktree per writer. Read-only discovery may stay in the
|
|
79
|
+
primary worktree. A worktree has exactly one writer; no other agent may edit it
|
|
80
|
+
while that writer is active. The lifecycle commands below are for isolated mode.
|
|
77
81
|
|
|
78
82
|
```bash
|
|
79
83
|
python3 docs/tools/autopipeline/ap.py task-start <TASK_ID> \
|
|
@@ -151,24 +155,27 @@ explicitly recovered.
|
|
|
151
155
|
in parallel, then let the main agent merge their evidence into one design.
|
|
152
156
|
3. Create DD/ADR only for cross-module, API, DB, deployment/CI, security, key UI
|
|
153
157
|
flow, or lasting structural decisions.
|
|
154
|
-
4.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
4. For one serial writer, inspect the current checkout first and work directly on
|
|
159
|
+
its current branch when it is clean. Create registered task branches/worktrees
|
|
160
|
+
only when the checkout already has changes or multiple writers run in parallel.
|
|
161
|
+
Never share one worktree between writers; parallelize only dependency-free
|
|
162
|
+
units with non-overlapping paths.
|
|
158
163
|
5. Review each stable diff with a read-only reviewer. Route blocking findings to
|
|
159
164
|
the owning fixer and re-review after any change. The main agent records the
|
|
160
165
|
current verdict with `task-review`, then hands the writer lease back before Git
|
|
161
166
|
closure when required.
|
|
162
|
-
6. After all agents have returned, the main agent
|
|
163
|
-
|
|
164
|
-
|
|
167
|
+
6. After all agents have returned, the main agent executes the changed-scope fast
|
|
168
|
+
gate once, records `DEV-CLOSED`, commits, and pushes. Use `commit-push` for
|
|
169
|
+
registered isolated tasks; on a clean serial current branch, commit and push
|
|
170
|
+
that branch directly without creating a temporary branch.
|
|
165
171
|
If that configured fast gate fails only because a dependency already present
|
|
166
172
|
in the lockfile is not installed locally, restore the locked dependencies and
|
|
167
173
|
rerun that same fast gate once. Missing dependencies in an accidentally or
|
|
168
174
|
explicitly invoked standard/full diagnostic do not justify dependency
|
|
169
175
|
installation or a full-gate rerun.
|
|
170
|
-
7.
|
|
171
|
-
|
|
176
|
+
7. For isolated tasks, the main agent runs `task-integrate` in dependency order
|
|
177
|
+
and cleans every task worktree and merged task branch. Direct serial work has
|
|
178
|
+
no temporary branch to clean.
|
|
172
179
|
8. Stop. Jenkins owns later build/deploy work and the project owner owns actual
|
|
173
180
|
acceptance. Ignore later external failures unless the user opens a diagnostic task.
|
|
174
181
|
|
|
@@ -205,9 +212,10 @@ For standard and high-risk write tasks, use the following fan-out/fan-in contrac
|
|
|
205
212
|
role, scope, dependencies, acceptance criteria, and expected output.
|
|
206
213
|
2. Discovery roles are read-only and may run in parallel. Browser work is limited
|
|
207
214
|
to requested reproduction/evidence; it does not replace owner acceptance.
|
|
208
|
-
3. Each fixer receives
|
|
209
|
-
|
|
210
|
-
|
|
215
|
+
3. Each fixer receives `execution_mode` and owned paths. Direct mode also names
|
|
216
|
+
the clean current checkout; isolated mode supplies a task branch and absolute
|
|
217
|
+
worktree path. It may edit only its assigned checkout and must not commit,
|
|
218
|
+
push, integrate, clean, or run the project gate.
|
|
211
219
|
4. Each reviewer receives a stable diff and binds approved or changes-requested
|
|
212
220
|
to its fingerprint. Changes go back to the same fixer and invalidate approval.
|
|
213
221
|
5. Every subagent returns exactly one JSON object conforming to
|
|
@@ -82,6 +82,10 @@
|
|
|
82
82
|
"acceptance": {
|
|
83
83
|
"$ref": "#/$defs/stringArray"
|
|
84
84
|
},
|
|
85
|
+
"execution_mode": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"enum": ["direct", "isolated"]
|
|
88
|
+
},
|
|
85
89
|
"task_branch": {
|
|
86
90
|
"type": "string",
|
|
87
91
|
"minLength": 1
|
|
@@ -123,9 +127,21 @@
|
|
|
123
127
|
},
|
|
124
128
|
"then": {
|
|
125
129
|
"required": [
|
|
126
|
-
"
|
|
127
|
-
"worktree_path",
|
|
130
|
+
"execution_mode",
|
|
128
131
|
"owned_paths"
|
|
132
|
+
],
|
|
133
|
+
"allOf": [
|
|
134
|
+
{
|
|
135
|
+
"if": {
|
|
136
|
+
"properties": {
|
|
137
|
+
"execution_mode": { "const": "isolated" }
|
|
138
|
+
},
|
|
139
|
+
"required": ["execution_mode"]
|
|
140
|
+
},
|
|
141
|
+
"then": {
|
|
142
|
+
"required": ["task_branch", "worktree_path"]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
129
145
|
]
|
|
130
146
|
}
|
|
131
147
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"managed_versions": {
|
|
4
|
-
"agents": "3.0.
|
|
5
|
-
"engineering": "3.0.
|
|
4
|
+
"agents": "3.0.3",
|
|
5
|
+
"engineering": "3.0.3"
|
|
6
6
|
},
|
|
7
7
|
"known_official_agents_sha256": [
|
|
8
8
|
"ebaaadab60327b3a4852948443d7191a4d48cb00bf4910038ab78c9149089373"
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"paths": ["AGENTS.md"],
|
|
110
110
|
"match": "exact-block",
|
|
111
111
|
"text": "- Micro work uses the changed gate and dev closure; ordinary product work uses the\n standard three-stack gate and dev closure; DB, auth, dependency, deployment,\n Jenkins, Docker, Compose, or MediaMTX changes use the real full gate and verify closure.\n- High-risk signals cannot be downgraded. Jenkins and target verification run only\n after commit/push when the effective profile is high-risk or verification is explicit.",
|
|
112
|
-
"replacement": "- DB, auth, dependency, deployment, Jenkins, Docker, Compose, and MediaMTX changes are high-risk for analysis, design, and review; every normal task still uses one changed-scope fast gate and push closure.\n- Jenkins and target verification
|
|
112
|
+
"replacement": "- DB, auth, dependency, deployment, Jenkins, Docker, Compose, and MediaMTX changes are high-risk for analysis, design, and review; every normal task still uses one changed-scope fast gate and push closure.\n- Jenkins and target verification run only in a separately requested owner-managed diagnostic task."
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"id": "agents-v22-xjmate-version",
|
|
@@ -39,7 +39,7 @@ access:
|
|
|
39
39
|
password: ""
|
|
40
40
|
|
|
41
41
|
concurrency:
|
|
42
|
-
isolation: "
|
|
42
|
+
isolation: "adaptive"
|
|
43
43
|
base_ref: ""
|
|
44
44
|
target_branch: ""
|
|
45
45
|
branch_prefix: "codex/"
|
|
@@ -121,7 +121,7 @@ docs:
|
|
|
121
121
|
|
|
122
122
|
# Engineering Workflow
|
|
123
123
|
|
|
124
|
-
<!-- auto-coding-skill:managed-workflow:start version=3.0.
|
|
124
|
+
<!-- auto-coding-skill:managed-workflow:start version=3.0.3 -->
|
|
125
125
|
|
|
126
126
|
This file is the single project workflow configuration. Keep it in Git. Its YAML
|
|
127
127
|
frontmatter and content outside these versioned markers are manually maintained;
|
|
@@ -162,8 +162,8 @@ Required for normal development:
|
|
|
162
162
|
initialization incomplete and block `doctor`; keep each value as an inline
|
|
163
163
|
YAML string, quoting values that resemble numbers, dates, booleans, or YAML
|
|
164
164
|
collections
|
|
165
|
-
- `concurrency.isolation`:
|
|
166
|
-
|
|
165
|
+
- `concurrency.isolation`: use `adaptive`; a clean serial task works directly on
|
|
166
|
+
the current branch, while dirty or parallel write work uses isolated worktrees
|
|
167
167
|
- `concurrency.base_ref` and `target_branch`: leave blank to derive the current
|
|
168
168
|
upstream, or set them explicitly for a fixed integration branch
|
|
169
169
|
- `concurrency.branch_prefix` and `worktree_root`
|
|
@@ -180,7 +180,7 @@ changed gate. `quick_test` remains the only fallback when `gate_changed` is
|
|
|
180
180
|
absent. Run `doctor` for exact missing-field diagnostics.
|
|
181
181
|
|
|
182
182
|
If the actual changed gate fails only because a dependency already declared in
|
|
183
|
-
the repository lockfile is not installed in the
|
|
183
|
+
the repository lockfile is not installed in the working checkout, restore that
|
|
184
184
|
locked dependency locally (for example with `npm ci`) and rerun the same changed
|
|
185
185
|
gate once. Do not install dependencies or restart a standard/full diagnostic
|
|
186
186
|
that was invoked outside the normal development gate, and never promote this
|
|
@@ -188,8 +188,12 @@ recovery into a full-gate run.
|
|
|
188
188
|
|
|
189
189
|
## Concurrent write tasks
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
the
|
|
191
|
+
For one serial write task, inspect the current checkout first. If it is clean,
|
|
192
|
+
develop directly on the current branch, run the changed gate once, commit, and
|
|
193
|
+
push without creating a temporary branch. If it already contains changes, or if
|
|
194
|
+
multiple writers will run concurrently, preserve the checkout and use one
|
|
195
|
+
registered task branch/worktree per writer. Never share one worktree between
|
|
196
|
+
writers. Clean temporary worktrees and merged task branches after integration.
|
|
193
197
|
|
|
194
198
|
```bash
|
|
195
199
|
python3 docs/tools/autopipeline/ap.py task-start <TASK_ID> \
|
|
@@ -268,9 +272,10 @@ work concurrently.
|
|
|
268
272
|
it is not post-push acceptance.
|
|
269
273
|
2. The main agent merges discovery evidence and decides the design, dependency
|
|
270
274
|
graph, and non-overlapping path ownership.
|
|
271
|
-
3. Assign each independent write unit to exactly one `fixer
|
|
272
|
-
|
|
273
|
-
|
|
275
|
+
3. Assign each independent write unit to exactly one `fixer`. A single serial
|
|
276
|
+
fixer may use a clean current branch; dirty checkouts and parallel fixers each
|
|
277
|
+
require a registered task branch/worktree. Never run two writers in one worktree.
|
|
278
|
+
Do not let the main agent edit a fixer-owned worktree concurrently.
|
|
274
279
|
4. Parallelize fixer units only when they are dependency-free and their owned
|
|
275
280
|
paths do not overlap. Complete implementation → review → gate/integration for
|
|
276
281
|
the current dependency wave, then start the next wave only after its
|
|
@@ -292,7 +297,8 @@ work concurrently.
|
|
|
292
297
|
`classify` emits a machine-readable `agent_plan` with this stage and ownership
|
|
293
298
|
contract. Micro tasks remain main-agent-only unless useful independent work
|
|
294
299
|
clearly exceeds delegation overhead. If the client cannot run subagents, execute
|
|
295
|
-
the same stages sequentially
|
|
300
|
+
the same stages sequentially and check for a clean current branch before creating
|
|
301
|
+
any temporary worktree.
|
|
296
302
|
|
|
297
303
|
## Default workflow
|
|
298
304
|
|
|
@@ -302,7 +308,7 @@ Development:
|
|
|
302
308
|
2. Analyze and decompose the request; run or reason through `classify --scope auto`.
|
|
303
309
|
3. Fan out independent discovery roles, then fan their results back into one main-agent design.
|
|
304
310
|
4. Record the smallest useful design note; create DD/ADR only when indicated.
|
|
305
|
-
5.
|
|
311
|
+
5. Use the clean current branch for one serial writer; only dirty or parallel work starts registered worktrees with explicit owned paths, dependency SHAs, and writer leases.
|
|
306
312
|
6. Review stable diffs, record their fingerprints with `task-review`, and return findings to their owning fixers until approved.
|
|
307
313
|
7. Hand the writer lease to the main agent. The main agent runs `commit-push` for each write task; it enforces ownership,
|
|
308
314
|
dependency, lease, and current-review gates, executes the one changed-scope fast gate, records
|
|
@@ -369,8 +375,9 @@ python3 docs/tools/autopipeline/ap.py docs-ledger-check
|
|
|
369
375
|
python3 docs/tools/autopipeline/ap.py gate-profile
|
|
370
376
|
```
|
|
371
377
|
|
|
372
|
-
`light-gate` is available for an explicit gate-diagnostic task. Do not
|
|
373
|
-
|
|
378
|
+
`light-gate` is available for an explicit gate-diagnostic task. Do not add it to
|
|
379
|
+
normal closure. Run exactly one configured changed gate directly on a clean
|
|
380
|
+
serial branch or through `commit-push` for isolated work.
|
|
374
381
|
|
|
375
382
|
The launcher under `docs/tools/autopipeline` delegates to the single runtime in
|
|
376
383
|
`.agents/skills/auto-coding-skill/scripts`; do not duplicate that runtime.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- auto-coding-skill:managed-agents:start version=3.0.
|
|
1
|
+
<!-- auto-coding-skill:managed-agents:start version=3.0.3 -->
|
|
2
2
|
|
|
3
3
|
Follow `docs/ENGINEERING.md` strictly. Source of truth: `docs/ENGINEERING.md`.
|
|
4
4
|
At task start, use `ap.py classify --scope auto` when changed-file impact is not obvious.
|
|
@@ -6,7 +6,7 @@ Before code changes, read the configured structure standard and place new code i
|
|
|
6
6
|
Obey `structure.layer_rules` import boundaries unless a DD/ADR explicitly records the exception.
|
|
7
7
|
Before optimization reviews, read the project health baseline and optimization backlog, and report only new, worsened, unrecorded P0/P1, or upgraded-priority items.
|
|
8
8
|
Route work through already available MCP servers, installed skills, plugins, and app connectors when they provide current docs, design context, browser evidence, GitHub/CI state, security review, or artifact rendering.
|
|
9
|
-
Use the `.agents/agents` role model when available. The main agent decomposes and fans out independent explorer/docs_researcher/browser_debugger work, fans evidence into one design,
|
|
9
|
+
Use the `.agents/agents` role model when available. The main agent decomposes and fans out independent explorer/docs_researcher/browser_debugger work, then fans evidence into one design. For one serial writer, use the current branch when its checkout is clean; create registered task branches/worktrees only when that checkout is already dirty or multiple writers run concurrently. Give every writer explicit non-overlapping paths, route stable diffs through reviewer, then let the main agent run the one fast gate, commit, integrate, push, and clean temporary branches. Never run two writers in one worktree; start dependent write work only after its prerequisite is integrated.
|
|
10
10
|
Use exactly one fast changed-scope local gate before pushing. Keep advisory structure, docs-ledger, full regression, Docker, API, Jenkins, and target checks outside the default development gate.
|
|
11
11
|
Keep active docs ledgers small: `taskbook.md`, `closure-log.md`, and top-level `docs/design/T*.md` must be physically archived when over budget. Use `docs-ledger-archive --plan` before `--write`; `archive-index.md` is only navigation.
|
|
12
12
|
Keep `docs/tasks/evidence.jsonl` and closure Markdown aligned with actual executed checks.
|
|
@@ -49,7 +49,7 @@ _AGENT_CONTRACT_SCHEMA = "data/contracts/orchestration-v1.schema.json"
|
|
|
49
49
|
_WORKFLOW_MIGRATION_POLICY = Path("data/policies/workflow-migrations-v1.json")
|
|
50
50
|
_FALLBACK_WORKFLOW_MIGRATION_POLICY = {
|
|
51
51
|
"schema_version": 1,
|
|
52
|
-
"managed_versions": {"agents": "3.0.
|
|
52
|
+
"managed_versions": {"agents": "3.0.3", "engineering": "3.0.3"},
|
|
53
53
|
"known_official_engineering_body_sha256": [
|
|
54
54
|
"d1306cc626e8baf8c83c953b760fd771066de2bf125168eca3a7b7d6ff2b87a2",
|
|
55
55
|
"305931c6edef770033a4f1970b00e5fb1c1728351856a173dbfa497daf563021",
|
|
@@ -682,8 +682,8 @@ def _migrate_fast_development_defaults(cfg: dict, repo: Path) -> list[str]:
|
|
|
682
682
|
if not isinstance(concurrency_cfg, dict):
|
|
683
683
|
concurrency_cfg = {}
|
|
684
684
|
cfg["concurrency"] = concurrency_cfg
|
|
685
|
-
if _text(concurrency_cfg.get("isolation")).lower() != "
|
|
686
|
-
concurrency_cfg["isolation"] = "
|
|
685
|
+
if _text(concurrency_cfg.get("isolation")).lower() != "adaptive":
|
|
686
|
+
concurrency_cfg["isolation"] = "adaptive"
|
|
687
687
|
changed.append("concurrency.isolation")
|
|
688
688
|
|
|
689
689
|
return changed
|
|
@@ -1500,10 +1500,10 @@ def _concurrency_cfg(cfg: dict) -> dict:
|
|
|
1500
1500
|
|
|
1501
1501
|
|
|
1502
1502
|
def _task_isolation(cfg: dict) -> str:
|
|
1503
|
-
isolation = _text(_concurrency_cfg(cfg).get("isolation")).lower() or "
|
|
1504
|
-
if isolation
|
|
1503
|
+
isolation = _text(_concurrency_cfg(cfg).get("isolation")).lower() or "adaptive"
|
|
1504
|
+
if isolation not in {"adaptive", "worktree"}:
|
|
1505
1505
|
raise APError(
|
|
1506
|
-
"concurrency.isolation must be worktree; shared-checkout
|
|
1506
|
+
"concurrency.isolation must be adaptive or worktree; legacy shared-checkout mode is unsupported"
|
|
1507
1507
|
)
|
|
1508
1508
|
return isolation
|
|
1509
1509
|
|
|
@@ -4072,7 +4072,7 @@ def _agent_contract_shape() -> tuple[dict, list[str]]:
|
|
|
4072
4072
|
"depends_on",
|
|
4073
4073
|
"acceptance",
|
|
4074
4074
|
],
|
|
4075
|
-
"writer": ["
|
|
4075
|
+
"writer": ["execution_mode", "owned_paths", "task_branch/worktree_path when isolated"],
|
|
4076
4076
|
"reviewer": [
|
|
4077
4077
|
"task_id",
|
|
4078
4078
|
"diff_base",
|
|
@@ -4136,6 +4136,7 @@ def _agent_execution_plan(profile: str, categories: set[str], classification: di
|
|
|
4136
4136
|
"strategy": "main-only",
|
|
4137
4137
|
"policies": {
|
|
4138
4138
|
"one_writer_per_worktree": True,
|
|
4139
|
+
"workspace_isolation": "adaptive-clean-current-or-isolated",
|
|
4139
4140
|
"path_ownership": "explicit-non-overlapping",
|
|
4140
4141
|
"dependency_policy": "integrate-before-dependent-start",
|
|
4141
4142
|
"review_feedback_owner": "main",
|
|
@@ -4171,6 +4172,7 @@ def _agent_execution_plan(profile: str, categories: set[str], classification: di
|
|
|
4171
4172
|
"strategy": "orchestrated-subagents",
|
|
4172
4173
|
"policies": {
|
|
4173
4174
|
"one_writer_per_worktree": True,
|
|
4175
|
+
"workspace_isolation": "adaptive-clean-current-or-isolated",
|
|
4174
4176
|
"path_ownership": "explicit-non-overlapping",
|
|
4175
4177
|
"dependency_policy": "integrate-before-dependent-start",
|
|
4176
4178
|
"review_feedback_owner": "owning-fixer",
|
|
@@ -4234,12 +4236,12 @@ def _agent_execution_plan(profile: str, categories: set[str], classification: di
|
|
|
4234
4236
|
],
|
|
4235
4237
|
"constraints": [
|
|
4236
4238
|
"Delegate only independent bounded work and declare dependencies before dispatch.",
|
|
4237
|
-
"
|
|
4239
|
+
"One serial fixer may use a clean current branch; dirty or parallel writers require registered task branches/worktrees.",
|
|
4238
4240
|
"Never run two writers in one worktree or let the main agent edit a fixer-owned worktree concurrently.",
|
|
4239
4241
|
"Start a dependent write task only after its prerequisite has been integrated into the target branch.",
|
|
4240
4242
|
"Subagents do not commit, push, integrate, or clean task branches.",
|
|
4241
4243
|
"Reviewers inspect a stable diff; changes-requested returns to the owning fixer and any edit requires re-review.",
|
|
4242
|
-
"The main agent routes review feedback, runs
|
|
4244
|
+
"The main agent routes review feedback, runs one fast gate, pushes, and cleans only temporary branches/worktrees that were actually created.",
|
|
4243
4245
|
],
|
|
4244
4246
|
})
|
|
4245
4247
|
|
|
@@ -4688,10 +4690,10 @@ def cmd_doctor(args: argparse.Namespace) -> None:
|
|
|
4688
4690
|
missing.append("workflow.profile (must be auto, micro, standard, or high-risk)")
|
|
4689
4691
|
if completion != "push":
|
|
4690
4692
|
missing.append("workflow.completion (must be push)")
|
|
4691
|
-
isolation = _text(concurrency_cfg.get("isolation")).lower() or "
|
|
4692
|
-
if isolation
|
|
4693
|
+
isolation = _text(concurrency_cfg.get("isolation")).lower() or "adaptive"
|
|
4694
|
+
if isolation not in {"adaptive", "worktree"}:
|
|
4693
4695
|
validation_errors.append(
|
|
4694
|
-
"concurrency.isolation must be worktree; shared-checkout
|
|
4696
|
+
"concurrency.isolation must be adaptive or worktree; legacy shared-checkout mode is unsupported"
|
|
4695
4697
|
)
|
|
4696
4698
|
branch_prefix = _text(concurrency_cfg.get("branch_prefix")) or "codex/"
|
|
4697
4699
|
if not branch_prefix.endswith("/"):
|
package/cli/src/index.js
CHANGED
|
@@ -903,10 +903,11 @@ function legacyGateEscalationTokens(text){
|
|
|
903
903
|
const key = match?.[1] || "";
|
|
904
904
|
const value = match?.[2]?.trim() || "";
|
|
905
905
|
if (key === "full_on") tokens.push("gate.full_on (legacy automatic full escalation)");
|
|
906
|
-
if (key === "full_on_unknown" && /^(?:true|yes|on|1)
|
|
906
|
+
if (key === "full_on_unknown" && /^(?:true|yes|on|1)$/i.test(frontmatterScalarValue(value))) {
|
|
907
907
|
tokens.push("gate.full_on_unknown=true (legacy automatic full escalation)");
|
|
908
908
|
}
|
|
909
909
|
if (key === "rules") {
|
|
910
|
+
if (value && value !== "[]") tokens.push("gate.rules inline value (run upgrade to migrate safely)");
|
|
910
911
|
rulesIndent = indent;
|
|
911
912
|
continue;
|
|
912
913
|
}
|
|
@@ -1063,8 +1064,8 @@ function projectStatus(project, assetSkill, assetAgents){
|
|
|
1063
1064
|
.filter(({ item, state }) => state.present && item.filled === true && !frontmatterValueIsFilled(state.value))
|
|
1064
1065
|
.map(({ item }) => item.label);
|
|
1065
1066
|
const isolationState = frontmatterPathState(text, ["concurrency", "isolation"]);
|
|
1066
|
-
if (isolationState.present && frontmatterScalarValue(isolationState.value).toLowerCase()
|
|
1067
|
-
invalidConfigTokens.push("concurrency.isolation (must be worktree)");
|
|
1067
|
+
if (isolationState.present && !["adaptive", "worktree"].includes(frontmatterScalarValue(isolationState.value).toLowerCase())) {
|
|
1068
|
+
invalidConfigTokens.push("concurrency.isolation (must be adaptive or worktree)");
|
|
1068
1069
|
}
|
|
1069
1070
|
invalidConfigTokens.push(...legacyGateEscalationTokens(text));
|
|
1070
1071
|
}
|
|
@@ -1097,7 +1098,7 @@ function projectStatus(project, assetSkill, assetAgents){
|
|
|
1097
1098
|
} else if (missingConfigPaths.length) {
|
|
1098
1099
|
next = "run project-local ap.py upgrade --write to merge missing paths, fill every required value in docs/ENGINEERING.md, then run doctor";
|
|
1099
1100
|
} else if (invalidConfigTokens.length) {
|
|
1100
|
-
next = "run project-local ap.py upgrade --write to migrate concurrency.isolation to
|
|
1101
|
+
next = "run project-local ap.py upgrade --write to migrate concurrency.isolation to adaptive, then run doctor";
|
|
1101
1102
|
} else if (unfilledConfigTokens.length) {
|
|
1102
1103
|
next = "fill every required value in docs/ENGINEERING.md, then run project-local ap.py doctor";
|
|
1103
1104
|
}
|
|
@@ -49,7 +49,7 @@ def git_output(cwd: Path, *args: str) -> str:
|
|
|
49
49
|
return git(cwd, *args).stdout.strip()
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
def base_config(isolation: str | object = "
|
|
52
|
+
def base_config(isolation: str | object = "adaptive") -> dict:
|
|
53
53
|
config = {
|
|
54
54
|
"workflow": {"mode": "dev", "profile": "auto", "completion": "push"},
|
|
55
55
|
"project": {"name": "concurrency-test"},
|
|
@@ -109,7 +109,7 @@ def base_config(isolation: str | object = "worktree") -> dict:
|
|
|
109
109
|
class AutoCodingConcurrencyTests(unittest.TestCase):
|
|
110
110
|
def make_repo(
|
|
111
111
|
self,
|
|
112
|
-
isolation: str | object = "
|
|
112
|
+
isolation: str | object = "adaptive",
|
|
113
113
|
) -> tuple[Path, Path, Path]:
|
|
114
114
|
temp = tempfile.TemporaryDirectory(prefix="autocoding-concurrency-")
|
|
115
115
|
self.addCleanup(temp.cleanup)
|
|
@@ -1632,7 +1632,7 @@ class AutoCodingConcurrencyTests(unittest.TestCase):
|
|
|
1632
1632
|
check=False,
|
|
1633
1633
|
)
|
|
1634
1634
|
self.assertNotEqual(0, result.returncode)
|
|
1635
|
-
self.assertIn("must be worktree", result.stdout + result.stderr)
|
|
1635
|
+
self.assertIn("must be adaptive or worktree", result.stdout + result.stderr)
|
|
1636
1636
|
self.assertEqual(before, git_output(legacy_repo, "rev-parse", "HEAD"))
|
|
1637
1637
|
self.assertEqual(
|
|
1638
1638
|
"baseline",
|
|
@@ -27,7 +27,7 @@ def run(repo: Path, *args: str) -> None:
|
|
|
27
27
|
def base_config() -> dict:
|
|
28
28
|
return {
|
|
29
29
|
"workflow": {"mode": "dev", "profile": "auto", "completion": "push"},
|
|
30
|
-
"concurrency": {"isolation": "
|
|
30
|
+
"concurrency": {"isolation": "adaptive"},
|
|
31
31
|
"project": {"name": "profile-test"},
|
|
32
32
|
"access": {
|
|
33
33
|
"project": {
|
|
@@ -557,7 +557,7 @@ class AutoCodingProfileTests(unittest.TestCase):
|
|
|
557
557
|
repo, _ = self.make_repo(config=cfg)
|
|
558
558
|
with self.assertRaises(APError) as context:
|
|
559
559
|
ap.cmd_doctor(argparse.Namespace(repo=str(repo)))
|
|
560
|
-
self.assertIn("must be worktree", str(context.exception))
|
|
560
|
+
self.assertIn("must be adaptive or worktree", str(context.exception))
|
|
561
561
|
|
|
562
562
|
def test_doctor_requires_one_fast_gate_for_every_profile(self) -> None:
|
|
563
563
|
for profile in ["micro", "standard", "high-risk", "auto"]:
|
package/cli/tests/index.test.js
CHANGED
|
@@ -210,7 +210,7 @@ function testMinimalSyncConvergesWithinBudget() {
|
|
|
210
210
|
assert(lines <= 10000, `minimal scaffold line budget exceeded: ${lines}`);
|
|
211
211
|
const engineering = fs.readFileSync(path.join(repo, "docs", "ENGINEERING.md"), "utf8");
|
|
212
212
|
assert(engineering.includes("profile: \"auto\""), "engineering should enable adaptive profiles");
|
|
213
|
-
assert(engineering.includes("isolation: \"
|
|
213
|
+
assert(engineering.includes("isolation: \"adaptive\""), "engineering should default to adaptive clean-branch/worktree isolation");
|
|
214
214
|
assert(engineering.includes('completion: "push"'), "engineering should complete normal development at push");
|
|
215
215
|
assert(engineering.includes('gate_changed: "git diff --check"'), "generic projects should receive the fast diff gate");
|
|
216
216
|
assert(engineering.includes(`name: "${path.basename(repo)}"`), "project name should be initialized automatically");
|
|
@@ -256,7 +256,7 @@ function testStatusRejectsLegacyIsolation() {
|
|
|
256
256
|
fillRequiredAccess(repo);
|
|
257
257
|
const engineeringPath = path.join(repo, "docs", "ENGINEERING.md");
|
|
258
258
|
const engineering = fs.readFileSync(engineeringPath, "utf8").replace(
|
|
259
|
-
'isolation: "
|
|
259
|
+
'isolation: "adaptive"',
|
|
260
260
|
'isolation: "legacy"',
|
|
261
261
|
);
|
|
262
262
|
fs.writeFileSync(engineeringPath, engineering);
|
|
@@ -265,7 +265,7 @@ function testStatusRejectsLegacyIsolation() {
|
|
|
265
265
|
assert(result.status !== 0, "status must reject legacy isolation");
|
|
266
266
|
const parsed = JSON.parse(result.stdout).results[0];
|
|
267
267
|
assert(
|
|
268
|
-
parsed.invalidConfigTokens.includes("concurrency.isolation (must be worktree)"),
|
|
268
|
+
parsed.invalidConfigTokens.includes("concurrency.isolation (must be adaptive or worktree)"),
|
|
269
269
|
`status should identify the invalid isolation value: ${result.stdout}`,
|
|
270
270
|
);
|
|
271
271
|
assert(parsed.next.includes("upgrade --write"), "status should direct legacy projects through upgrade");
|
|
@@ -278,7 +278,7 @@ function testStatusRejectsLegacyGateEscalation() {
|
|
|
278
278
|
const engineeringPath = path.join(repo, "docs", "ENGINEERING.md");
|
|
279
279
|
const engineering = fs.readFileSync(engineeringPath, "utf8").replace(
|
|
280
280
|
' full_on_unknown: false\n no_change_scope: "changed"\n profile_log:',
|
|
281
|
-
' full_on_unknown: true\n full_on: ["prod_config"]\n no_change_scope: "changed"\n rules:\n - match: ["Jenkinsfile"]\n scope: "full"\n commands: ["gate_full"]\n profile_log:',
|
|
281
|
+
' full_on_unknown: "true"\n full_on: ["prod_config"]\n no_change_scope: "changed"\n rules:\n - match: ["Jenkinsfile"]\n scope: "full"\n commands: ["gate_full"]\n profile_log:',
|
|
282
282
|
);
|
|
283
283
|
fs.writeFileSync(engineeringPath, engineering);
|
|
284
284
|
const status = run("node", [cli, "status", "--projects", repo, "--json"], { check: false });
|
|
@@ -636,7 +636,7 @@ function testUpgradeMigratesLegacyAutomaticGateToFastDefault() {
|
|
|
636
636
|
assert(engineering.includes("gate_changed: git diff --check"), "upgrade should replace the v3 auto-seeded npm test gate");
|
|
637
637
|
assert(engineering.includes("mode: dev"), "upgrade should migrate verify mode to fast development mode");
|
|
638
638
|
assert(engineering.includes("completion: push"), "upgrade should add push completion");
|
|
639
|
-
assert(engineering.includes("isolation:
|
|
639
|
+
assert(engineering.includes("isolation: adaptive"), "upgrade should migrate legacy isolation to adaptive");
|
|
640
640
|
for (const key of ["default_scope", "fallback_scope", "no_change_scope"]) {
|
|
641
641
|
assert(engineering.includes(`${key}: changed`), `upgrade should migrate gate.${key} to changed`);
|
|
642
642
|
}
|
|
@@ -719,7 +719,7 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
719
719
|
|
|
720
720
|
const engineering = path.join(repo, "docs", "ENGINEERING.md");
|
|
721
721
|
const initial = fs.readFileSync(engineering, "utf8");
|
|
722
|
-
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=3\.0\.
|
|
722
|
+
const startPattern = /<!-- auto-coding-skill:managed-workflow:start version=3\.0\.3 -->/;
|
|
723
723
|
const endMarker = "<!-- auto-coding-skill:managed-workflow:end -->";
|
|
724
724
|
assert(startPattern.test(initial), "new projects should include a versioned managed workflow marker");
|
|
725
725
|
assert(initial.includes(endMarker), "new projects should include the managed workflow end marker");
|
|
@@ -738,7 +738,7 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
738
738
|
const dryRun = run("node", [cli, "sync", "--projects", repo, "--dry-run", "--json"]);
|
|
739
739
|
const dryResult = JSON.parse(dryRun.stdout).results[0];
|
|
740
740
|
assert(dryResult.managedWorkflow.state === "stale", `dry-run should expose stale workflow state: ${dryRun.stdout}`);
|
|
741
|
-
assert(dryResult.managedWorkflow.version === "3.0.
|
|
741
|
+
assert(dryResult.managedWorkflow.version === "3.0.3", "dry-run should expose the target workflow version");
|
|
742
742
|
assert(dryResult.actions.some(item => item.action === "would-update" && item.path === "docs/ENGINEERING.md"), "dry-run should plan the managed body update");
|
|
743
743
|
assert(fs.readFileSync(engineering, "utf8") === customized, "dry-run must not write ENGINEERING.md");
|
|
744
744
|
|
|
@@ -748,14 +748,14 @@ function testManagedEngineeringSyncIsControlledAndIdempotent() {
|
|
|
748
748
|
const updatedEnd = updated.indexOf(endMarker) + endMarker.length;
|
|
749
749
|
assert(updated.slice(0, updatedStart) === outsideBefore, "sync must preserve frontmatter and content before the managed block byte-for-byte");
|
|
750
750
|
assert(updated.slice(updatedEnd) === outsideAfter, "sync must preserve content after the managed block byte-for-byte");
|
|
751
|
-
assert(updated.includes("version=3.0.
|
|
751
|
+
assert(updated.includes("version=3.0.3"), "sync should install the current managed workflow version");
|
|
752
752
|
assert(updated.includes("## Execution profiles"), "sync should refresh stale managed workflow content");
|
|
753
753
|
|
|
754
754
|
fillRequiredAccess(repo);
|
|
755
755
|
const status = run("node", [cli, "status", "--projects", repo, "--json"]);
|
|
756
756
|
const statusResult = JSON.parse(status.stdout).results[0];
|
|
757
757
|
assert(statusResult.managedWorkflow.state === "current", `status should expose current managed workflow state: ${status.stdout}`);
|
|
758
|
-
assert(statusResult.managedWorkflow.version === "3.0.
|
|
758
|
+
assert(statusResult.managedWorkflow.version === "3.0.3", "status should expose the installed managed workflow version");
|
|
759
759
|
|
|
760
760
|
const beforeSecondSync = fs.readFileSync(engineering, "utf8");
|
|
761
761
|
const second = run("node", [cli, "sync", "--projects", repo, "--json"]);
|
|
@@ -783,7 +783,7 @@ function testLegacyEngineeringMigrationPreservesExistingBody() {
|
|
|
783
783
|
assert(dryResult.actions.find(item => item.path === "docs/ENGINEERING.md")?.detail.includes("preserved-custom"), "custom legacy action should be labeled preserved-custom");
|
|
784
784
|
run("node", [cli, "sync", "--projects", repo]);
|
|
785
785
|
const migrated = fs.readFileSync(engineering, "utf8");
|
|
786
|
-
assert(migrated.includes("version=3.0.
|
|
786
|
+
assert(migrated.includes("version=3.0.3"), "legacy migration should insert the current managed workflow");
|
|
787
787
|
assert(migrated.includes(legacyNote), "legacy migration must preserve the complete existing body");
|
|
788
788
|
const migratedStart = migrated.indexOf("<!-- auto-coding-skill:managed-workflow:start");
|
|
789
789
|
const migratedEnd = migrated.indexOf(endMarker) + endMarker.length;
|
|
@@ -915,7 +915,7 @@ function testManagedAgentsMigrationPreservesCustomRules() {
|
|
|
915
915
|
run("node", [cli, "sync", "--projects", repo]);
|
|
916
916
|
const agents = path.join(repo, "AGENTS.md");
|
|
917
917
|
const initial = fs.readFileSync(agents, "utf8");
|
|
918
|
-
assert(initial.includes("managed-agents:start version=3.0.
|
|
918
|
+
assert(initial.includes("managed-agents:start version=3.0.3"), "new projects should receive the versioned root AGENTS block");
|
|
919
919
|
|
|
920
920
|
const custom = [
|
|
921
921
|
"# Project rules",
|
|
@@ -932,7 +932,7 @@ function testManagedAgentsMigrationPreservesCustomRules() {
|
|
|
932
932
|
|
|
933
933
|
run("node", [cli, "sync", "--projects", repo]);
|
|
934
934
|
const migrated = fs.readFileSync(agents, "utf8");
|
|
935
|
-
assert(migrated.includes("managed-agents:start version=3.0.
|
|
935
|
+
assert(migrated.includes("managed-agents:start version=3.0.3"), "AGENTS migration should install the current managed block");
|
|
936
936
|
assert(migrated.includes("Preserve this repository-specific rule exactly."), "AGENTS migration must preserve unrelated custom rules");
|
|
937
937
|
assert(!migrated.includes("must execute `commands.gate_full`"), "known official conflicting rule should be removed");
|
|
938
938
|
const stable = fs.readFileSync(agents);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elvis1513/auto-coding-skill",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "CLI installer for an isolated .agents engineering workflow with parallel Git worktrees, fast local gates, push-based completion, and safe cleanup.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|