@elvis1513/auto-coding-skill 3.0.4 → 4.1.0

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,109 +1,19 @@
1
1
  # auto-coding-skill
2
2
 
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.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
-
20
- ## What changed in v3.0.2
21
-
22
- - Added controlled synchronization for the root `AGENTS.md` workflow bridge as
23
- well as the managed `ENGINEERING.md` workflow block.
24
- - Migrated known legacy rules that required full local gates, verify mode, or
25
- Jenkins polling during normal development while preserving project facts and
26
- unrelated custom instructions.
27
- - Made project status, sync, doctor, and task lifecycle commands fail closed on
28
- unknown workflow instructions that conflict with the changed-scope fast gate.
29
- - Removed legacy YAML escalation fields during upgrade while keeping explicit
30
- full-gate commands available for user-requested diagnostics.
31
- - Clarified that locked dependencies may be restored only when the configured
32
- changed-scope gate actually needs them, after which only that same fast gate is
33
- rerun.
34
-
35
- ## What changed in v3.0.1
36
-
37
- - Fixed normal development to analysis → decomposition → design → development →
38
- one changed-scope fast gate → push.
39
- - Kept risk profiles for planning/review depth without promoting local work to a
40
- standard/full gate or verify mode.
41
- - Ended coding tasks immediately after safe target-branch push; Jenkins owns
42
- later build/deploy work and the project owner owns acceptance.
43
- - Removed repeated integration gates and all automatic post-push Jenkins/target
44
- polling from `commit-push`.
45
- - Required all project/Jenkins/GitLab/Nexus URLs, usernames, and direct passwords
46
- under `access.*` during project initialization.
47
- - Removed the shared-checkout `legacy` escape hatch; worktree isolation is now
48
- mandatory for every write task.
49
- - Added a structured subagent plan with parallel discovery, one-writer worktree
50
- ownership, reviewer feedback loops, and main-agent Git lifecycle ownership.
51
- - Enforced task-owned paths, dependency revisions, writer leases, and
52
- fingerprint-bound review approvals in the task runtime.
53
- - Added review, writer handoff, and conflicted-rebase resume lifecycle commands.
54
- - Added planned paths and task intent to pre-development classification and
55
- published a stable orchestration contract.
56
- - Added controlled `ENGINEERING.md` workflow synchronization while preserving
57
- project configuration and custom content.
58
-
59
- ## What changed in v3.0.0
60
-
61
- - Isolated every write task in a registered Git worktree and task branch.
62
- - Added `task-start`, `task-status`, `task-submodule-sync`, `task-integrate`,
63
- `task-finish`, and `task-prune` lifecycle commands.
64
- - Made `commit-push` validate the task manifest before any gate or ledger write,
65
- stage only the task worktree's exact paths, and detect gate-time mutations.
66
- - Added task-scoped active, closure, and evidence records to avoid shared append
67
- conflicts.
68
- - Serialized target-branch integration and re-ran the resolved gate after
69
- updating to the latest remote target.
70
- - Automatically removed integrated worktrees and local task branches, with safe
71
- lease-based remote task-branch cleanup and merged-branch pruning.
72
- - Initially kept a `legacy` compatibility escape hatch; v3.0.1 removes that path and
73
- migrates existing configuration to mandatory worktree isolation.
74
-
75
- ## What changed in v2.2.1
76
-
77
- - Made same-period ledger archiving update one cumulative archive-index entry
78
- instead of appending duplicate month headings.
79
- - Recognized Markdown-wrapped and localized settled statuses such as
80
- `` `Done / PASS` `` and `Done(PASS)` during physical history archiving.
81
- - Added regression coverage for repeated same-month archives and these status
82
- formats.
83
-
84
- ## What changed in v2.2.0
85
-
86
- - Added `micro`, `standard`, and `high-risk` execution profiles.
87
- - `workflow.profile: auto` classifies changed work and cannot downgrade detected
88
- high-risk changes.
89
- - High-risk and explicit verify work now require a real `gate_full`/`full_gate`;
90
- light and standard commands are no longer accepted as full-gate fallbacks.
91
- - Generic structure checks are advisory by default. Projects can opt into
92
- blocking enforcement.
93
- - Reduced a new project scaffold from 46 files / about 10,120 lines to 20 files /
94
- about 5,300 lines.
95
- - Replaced duplicated repository-side Python tools with a small launcher that
96
- delegates to the single project-local skill runtime.
97
- - Kept only ENGINEERING, taskbook, and closure log in the default documentation
98
- scaffold; all specialized documents are materialized on demand.
99
- - Removed hard-coded model names from managed Agent templates. New installs
100
- inherit the active client model; existing project model overrides survive sync.
101
- - Added behavioral regression tests for profile resolution, strict full gates,
102
- advisory structure checks, minimal scaffold budgets, on-demand docs, and Agent
103
- model inheritance.
104
-
105
- This section records historical v2 behavior. The v3.0.3 workflow above supersedes
106
- its full-gate and verify-mode rules for normal development.
3
+ A delivery-first Codex engineering workflow:
4
+
5
+ `analysis → decomposition → necessary design → development → one final fast
6
+ changed-scope gate → commit/push`.
7
+
8
+ The Skill is a selectable guardrail, not a command sequence that must run for
9
+ every task. The model skips machinery whose expected benefit does not exceed its
10
+ cost; read-only work and obvious small clean-checkout changes normally stay direct.
11
+
12
+ Version 4.1 consolidates the 4.x delivery-first workflow into one canonical
13
+ repository contract. Version 4.0 replaced the 3.x governance-first defaults with progressive
14
+ guardrails. Clean single-writer work stays on the current branch. Worktrees,
15
+ parallel fixers, fingerprint review, durable design records, and stronger
16
+ affected-scope checks are enabled only when concurrency or risk justifies them.
107
17
 
108
18
  ## Install
109
19
 
@@ -114,285 +24,206 @@ autocoding sync --projects .
114
24
  pip install pyyaml requests
115
25
  ```
116
26
 
117
- `autocoding init` installs the project-local skill and five managed roles under
118
- `.agents`. `autocoding sync` installs the minimal project scaffold:
27
+ The project install contains:
119
28
 
120
29
  ```text
121
30
  .agents/skills/auto-coding-skill/
122
31
  .agents/agents/
123
32
  docs/ENGINEERING.md
124
- docs/tasks/taskbook.md
125
- docs/tasks/closure-log.md
126
33
  docs/tools/autopipeline/ap.py
34
+ AGENTS.md (fully managed canonical repository contract)
127
35
  ```
128
36
 
129
- The `docs/tools` entry point is a compatibility launcher. Runtime code lives only
130
- under `.agents/skills/auto-coding-skill/scripts`.
37
+ Ordinary projects no longer receive taskbook or closure logs. Existing optional
38
+ documents are preserved during upgrades but are not required or updated by the
39
+ normal workflow.
131
40
 
132
- ## Execution profiles
41
+ Fill the project/Jenkins/GitLab/Nexus URL, username, and password fields under
42
+ `access.*`, then configure one real fast validation command and run:
133
43
 
134
- Configure the selector in `docs/ENGINEERING.md`:
135
-
136
- ```yaml
137
- workflow:
138
- mode: dev
139
- profile: auto
140
- completion: push
44
+ ```bash
45
+ python3 docs/tools/autopipeline/ap.py upgrade --write
46
+ python3 docs/tools/autopipeline/ap.py doctor
141
47
  ```
142
48
 
143
- | Effective profile | Intended work | Local gate | Completion |
144
- | --- | --- | --- | --- |
145
- | `micro` | docs/tests-only or explicitly isolated work | changed/quick | pushed |
146
- | `standard` | normal feature and defect work | changed/quick | pushed |
147
- | `high-risk` | sensitive, broad, deploy/build, or structural work | changed/quick | pushed |
148
-
149
- `auto` is a selector, not a fourth effective profile. Profiles affect analysis,
150
- design depth, and reviewer recommendations only. They never expand the automatic
151
- local gate or turn Jenkins/target verification into a completion condition.
49
+ Plaintext credential values are allowed by the generic workflow.
152
50
 
153
- An explicit configured `micro`, `standard`, or `high-risk` profile replaces
154
- auto's low/normal baseline and acts as a floor for CLI overrides. Independently
155
- detected high-risk signals still force `high-risk`.
51
+ ## Adaptive development
156
52
 
157
- Inspect the plan:
53
+ Inspect a task before writing:
158
54
 
159
55
  ```bash
160
- python3 docs/tools/autopipeline/ap.py classify --scope auto
161
- python3 docs/tools/autopipeline/ap.py impact --scope auto --json
56
+ python3 docs/tools/autopipeline/ap.py classify --scope auto \
57
+ --planned-path backend/internal/orders/service.go \
58
+ --intent "fix order retry" \
59
+ --writers 1
162
60
  ```
163
61
 
164
- Each result includes the effective profile, fixed fast gate scope, reasons,
165
- recommended Agent roles, and a machine-readable `agent_plan` describing stages,
166
- dependencies, assignment/result contracts, and lifecycle ownership.
62
+ The result includes:
167
63
 
168
- ## Parallel write isolation
64
+ - `execution_mode=direct`: clean checkout and one writer; stay on the current branch.
65
+ - `execution_mode=isolated`: dirty checkout, explicit isolation, or multiple writers.
66
+ - `execution_mode=none`: no task signal or change; create no branch/worktree.
67
+ - `review_required` and `design_required`: risk-based escalation decisions.
68
+ - an adaptive agent plan that does not force fan-out for ordinary work.
169
69
 
170
- Each task that may write files runs in its own registered Git worktree and
171
- `codex/` task branch. `worktree` is the only supported isolation value. Each
172
- worktree has exactly one writer; read-only discovery may remain in the primary
173
- worktree.
174
-
175
- ```yaml
176
- concurrency:
177
- isolation: adaptive
178
- base_ref: origin/dev
179
- target_branch: dev
180
- branch_prefix: codex/
181
- worktree_root: ../.worktrees
182
- cleanup_merged: true
183
- delete_remote_branch: true
184
- disposable_ignored: []
185
- ```
70
+ Use a machine-enforced task lifecycle when useful:
186
71
 
187
72
  ```bash
188
- python3 docs/tools/autopipeline/ap.py task-start T0001 --owned-path src --writer "$FIXER"
189
- # Continue in the worktree path printed by task-start.
190
- python3 docs/tools/autopipeline/ap.py task-status T0001
191
- python3 docs/tools/autopipeline/ap.py task-submodule-sync T0001
192
- python3 docs/tools/autopipeline/ap.py task-review T0001 --verdict approved --diff-fingerprint "$SHA256"
193
- python3 docs/tools/autopipeline/ap.py task-handoff T0001 --from "$FIXER" --to "$CODEX_THREAD_ID" --generation 1
194
- python3 docs/tools/autopipeline/ap.py commit-push T0001 --writer "$CODEX_THREAD_ID" --msg "T0001: summary"
195
- python3 docs/tools/autopipeline/ap.py task-integrate T0001 --writer "$CODEX_THREAD_ID"
73
+ python3 docs/tools/autopipeline/ap.py task-start T0001 \
74
+ --owned-path backend/internal/orders
75
+ python3 docs/tools/autopipeline/ap.py commit-push T0001 \
76
+ --msg "T0001: fix order retry"
196
77
  ```
197
78
 
198
- `commit-push` runs only inside the task worktree recorded in the repository
199
- manifest and stages only that task's changes. Unknown changes stop the command;
200
- the workflow never restores, resets, stashes, or cleans them.
201
-
202
- Before upgrading a v3.0.0 project, finish and clean every registered in-flight
203
- task with its currently installed runtime. `autocoding sync` refuses to replace
204
- that runtime while a schema-1 task remains, because 3.0.1 cannot safely infer
205
- its path ownership, dependencies, writer lease, or review state.
206
-
207
- `commit-push` runs the only local gate. `task-integrate` is the rest of the same
208
- push stage: it fetches/rebases, CAS-pushes the configured target, confirms the
209
- remote SHA, and cleans up without repeating the gate. Successful integration
210
- ends the coding task; do not wait for Jenkins, deployment, or acceptance results.
211
- The task commit runs project commit hooks once. Its internal backup-branch push
212
- skips the pre-push hook, while the final target-branch push runs that hook once.
213
- Integration does not create a second evidence commit.
214
-
215
- Successful integration removes the clean worktree and merged local branch, and
216
- deletes the merged remote task branch by default. `task-finish T0001` retries
217
- cleanup for one integrated task; `task-prune` removes registered merged tasks
218
- left behind. Dirty worktrees and unmerged branches are never removed. Integration
219
- does not update the primary checkout; pull it explicitly when its local state is
220
- ready. Cleanup also refuses unknown ignored files such as local secrets; list
221
- only disposable project cache/build paths under `concurrency.disposable_ignored`.
222
- Initialized submodules are recursively checked before forced task-worktree
223
- removal: they must be clean and contain no unknown ignored data, local-only
224
- commits, unmirrored local branches, or additional linked worktrees. Their
225
- remotes are refreshed before that decision. A durable snapshot
226
- of refs and reflog commits is stored under Git's
227
- `auto-coding-skill/submodule-recovery` state before forced worktree removal, so
228
- a remote deletion race cannot destroy the last copy of a commit. Cleanup never
229
- deinitializes the primary checkout's shared submodule configuration.
230
- `task-start` enables Git worktree-scoped config and seeds each task's submodule
231
- URLs. After changing `.gitmodules`, run `task-submodule-sync` before initializing
232
- or syncing modules. Relative URLs follow Git's current-worktree default-remote
233
- rules, including task bases whose `.gitmodules` differs from the control checkout.
234
- Shared/common submodule config changes are reported and never overwritten.
235
- Residual Git directories from modules manually deinitialized inside a task block
236
- forced cleanup until they are reinitialized or recovered.
237
-
238
- ## Gate configuration
79
+ On a clean single-writer checkout, `task-start` records a lightweight direct
80
+ manifest in the Git common directory and creates no branch or worktree.
81
+ `commit-push` runs the final gate, commits, and pushes the current target branch.
82
+ If no diff was produced, it clears the manifest without commit or push.
239
83
 
240
- ```yaml
241
- commands:
242
- gate_changed: "git diff --check"
84
+ Dirty or parallel work receives an isolated task branch/worktree:
243
85
 
244
- gate:
245
- default_scope: auto
246
- rules:
247
- - name: payments
248
- paths: ["src/payments/**"]
249
- profile: high-risk
86
+ ```bash
87
+ python3 docs/tools/autopipeline/ap.py task-start T0002 \
88
+ --owned-path backend --review-required
89
+ # implement in the printed worktree
90
+ python3 docs/tools/autopipeline/ap.py task-review T0002 \
91
+ --verdict approved --diff-fingerprint "$SHA256"
92
+ python3 docs/tools/autopipeline/ap.py commit-push T0002 \
93
+ --msg "T0002: bounded change"
94
+ python3 docs/tools/autopipeline/ap.py task-integrate T0002
250
95
  ```
251
96
 
252
- Rules affect classification and planning only. Legacy `scope` or `commands`
253
- inside a rule never execute automatically; invoke an explicitly configured
254
- diagnostic with `ap.py run <name>` when the user asks for it.
97
+ Integration serializes the target push and removes clean merged worktrees and
98
+ temporary branches. Unknown changes, unmerged history, unsafe ignored data, or
99
+ dirty submodules block cleanup rather than being discarded.
255
100
 
256
- For Node projects, a new scaffold selects `npm run test:changed` only when that
257
- dedicated quick script exists. It never promotes ordinary `npm test`, builds, or
258
- full regression into the automatic changed gate. Standard/full commands may be
259
- kept as explicit diagnostics, but normal development does not invoke them.
101
+ Parallel development uses one task ID and one `task-start` per writer. `--writers`
102
+ belongs to `classify` planning only; the runtime rejects overlapping active
103
+ `owned_paths` and never creates multiple writers in one task/worktree.
260
104
 
261
- ## Structure policy
105
+ ## Real changed-scope validation
262
106
 
263
- The generic checker remains useful for surfacing large files, large additions,
264
- function-size signals, and import-direction heuristics, but it is not universally
265
- authoritative:
107
+ Risk classification and validation execution are deliberately separate:
266
108
 
267
109
  ```yaml
268
- structure:
269
- enabled: true
270
- enforcement: advisory # advisory | blocking
271
- architecture_standard: project-defined
272
- ```
273
-
274
- `advisory` reports findings without blocking. Projects with reliable, tailored
275
- rules can opt into `blocking`. Repository-native architecture, compiler output,
276
- tests, and real dependency graphs take precedence over generic path heuristics.
277
-
278
- ## Optional documentation
279
-
280
- Specialized templates are created only when required:
281
-
282
- ```bash
283
- python3 docs/tools/autopipeline/ap.py scaffold api --write
284
- python3 docs/tools/autopipeline/ap.py scaffold design --write
285
- python3 docs/tools/autopipeline/ap.py scaffold architecture --write
286
- python3 docs/tools/autopipeline/ap.py scaffold review --write
287
- python3 docs/tools/autopipeline/ap.py scaffold testing --write
288
- python3 docs/tools/autopipeline/ap.py scaffold deployment --write
289
- python3 docs/tools/autopipeline/ap.py scaffold bugs --write
290
- python3 docs/tools/autopipeline/ap.py scaffold all --write
110
+ commands:
111
+ backend_fast: "cd backend && go test ./internal/orders/..."
112
+ frontend_fast: "cd frontend && npm run test:changed"
113
+
114
+ validation:
115
+ on_unmapped: error
116
+ routes:
117
+ - name: backend
118
+ paths: ["backend/**", "contracts/**"]
119
+ commands: [backend_fast]
120
+ - name: frontend
121
+ paths: ["frontend/**"]
122
+ commands: [frontend_fast]
123
+
124
+ risk:
125
+ rules:
126
+ - name: auth
127
+ paths: ["backend/**/auth/**"]
128
+ profile: high-risk
129
+ review: required
291
130
  ```
292
131
 
293
- The command is idempotent and does not overwrite existing project documents
294
- unless `--force` is supplied. `baseline init` and `gen-summary` generate their
295
- outputs directly without static templates.
132
+ Every path may match multiple routes. All referenced commands are collected in
133
+ configuration order, de-duplicated, and executed once. Unmapped code and missing
134
+ commands fail before staging. Documentation-only changes may use the built-in
135
+ diff check. `git diff --check` remains an additional hygiene check and is never
136
+ treated as business validation.
296
137
 
297
- For a one-step legacy-style full scaffold:
138
+ Check coverage without running project commands:
298
139
 
299
140
  ```bash
300
- python3 .agents/skills/auto-coding-skill/scripts/ap.py --repo . install --full
141
+ python3 docs/tools/autopipeline/ap.py validation-map-check --path contracts/api.yaml
142
+ python3 docs/tools/autopipeline/ap.py validation-map-check --tracked
301
143
  ```
302
144
 
303
- ## Dynamic Agents and models
304
-
305
- Managed role templates define role instructions, permissions, and reasoning
306
- effort but do not pin a model. The current client therefore supplies a supported
307
- model automatically.
308
-
309
- Existing project-local `model = "..."` lines are treated as explicit overrides:
310
-
311
- - `status` reports them but does not mark the project stale for model-only drift.
312
- - `sync` updates managed instructions while preserving the override.
313
- - `sync --reset-agent-models` removes managed-role overrides and returns to
314
- client inheritance.
315
- - Custom Agent files are always preserved byte-for-byte.
316
-
317
- The effective profile emits an executable collaboration shape:
318
-
319
- - micro: main Agent only unless useful independent work exceeds dispatch overhead
320
- - standard/high-risk: main decomposition → parallel justified explorer/docs/browser
321
- discovery → main design → dependency waves of isolated fixers → read-only
322
- reviewers → main fast gate/integration, followed by final push/cleanup
323
-
324
- Only dependency-free fixer units with explicitly non-overlapping paths may run
325
- in parallel. A dependent writer starts after its prerequisite is integrated.
326
- Subagents do not commit, push, integrate, clean branches, or run the project gate.
327
- Reviewer findings return to the owning fixer. Verdicts bind to a diff fingerprint,
328
- so any edit requires re-review before the main Agent may run the gate.
329
-
330
- ## Required access configuration
145
+ Focused tests may be run and rerun during implementation. Only the final routed
146
+ closure gate is limited to one stable-diff run. Full regression, Docker, builds,
147
+ Jenkins, deployment, API verification, and target checks remain explicit
148
+ diagnostics outside normal closure.
331
149
 
332
- For a new project, `autocoding sync` creates `access.project`, `access.jenkins`,
333
- `access.gitlab`, and `access.nexus` in `docs/ENGINEERING.md`. Existing projects
334
- must run `ap.py upgrade --write` to merge newly required fields into their manual
335
- configuration. Fill every URL, username, and direct password during
336
- initialization as an inline YAML string; quote values that resemble numbers,
337
- dates, booleans, or YAML collections. `status` rejects blank/TODO fields;
338
- `doctor` and `task-start`
339
- also validate URL shape locally. These access checks never contact the listed
340
- service endpoints; after validation, `task-start` may still fetch the configured
341
- Git remote unless `--no-fetch` is used. Configuration presence does not enable
342
- Jenkins/build/deploy verification.
150
+ ## Risk and subagent policy
343
151
 
344
- ## Core commands
152
+ - Micro and standard work default to the main agent.
153
+ - Read-only explorer/docs/browser roles run only for independent questions with
154
+ clear value.
155
+ - Parallel fixers require separate worktrees and non-overlapping paths.
156
+ - Reviewer fingerprint approval is required for high-risk, cross-module,
157
+ explicitly configured, or parallel integration work.
158
+ - DD/ADR is created only for lasting cross-module, API, data, security,
159
+ deployment, or key user-flow decisions.
160
+ - Historical debt does not block product work unless the current change worsens it.
345
161
 
346
- ```bash
347
- python3 docs/tools/autopipeline/ap.py doctor
348
- python3 docs/tools/autopipeline/ap.py classify --scope auto
349
- python3 docs/tools/autopipeline/ap.py light-gate --scope auto --explain
350
- python3 docs/tools/autopipeline/ap.py structure-check --scope auto
351
- python3 docs/tools/autopipeline/ap.py task-start T0001 --owned-path src --writer "$FIXER"
352
- python3 docs/tools/autopipeline/ap.py task-status T0001
353
- python3 docs/tools/autopipeline/ap.py task-submodule-sync T0001
354
- python3 docs/tools/autopipeline/ap.py task-review T0001 --verdict approved --diff-fingerprint "$SHA256"
355
- python3 docs/tools/autopipeline/ap.py task-handoff T0001 --from "$FIXER" --to "$CODEX_THREAD_ID" --generation 1
356
- python3 docs/tools/autopipeline/ap.py docs-ledger-check
357
- python3 docs/tools/autopipeline/ap.py gate-profile
358
- python3 docs/tools/autopipeline/ap.py commit-push T0001 --writer "$CODEX_THREAD_ID" --msg "T0001: summary"
359
- python3 docs/tools/autopipeline/ap.py task-integrate T0001 --writer "$CODEX_THREAD_ID"
360
- python3 docs/tools/autopipeline/ap.py task-finish T0001
361
- python3 docs/tools/autopipeline/ap.py task-prune
362
- ```
162
+ The main agent owns architecture, final validation, Git closure, ordered
163
+ integration, push, and cleanup. Push ends the coding task; later CI/acceptance is
164
+ not polled automatically. An explicitly requested failure diagnosis may continue
165
+ in the same conversation/task without an artificial second ledger lifecycle.
363
166
 
364
167
  ## Upgrade and multi-project sync
365
168
 
366
- ```bash
367
- autocoding sync --projects /path/a,/path/b
368
-
369
- python3 docs/tools/autopipeline/ap.py upgrade --dry-run
370
- python3 docs/tools/autopipeline/ap.py upgrade --write
169
+ Finish every registered task using its currently installed runtime before syncing
170
+ a different Skill version. Batch sync fails before any writes when it finds an
171
+ active manifest, regardless of schema version.
371
172
 
173
+ ```bash
372
174
  autocoding status --projects /path/a,/path/b
373
175
  autocoding sync --projects /path/a,/path/b --dry-run
176
+ autocoding sync --projects /path/a,/path/b
374
177
  ```
375
178
 
376
- For a v2.1 project, run the new CLI sync first; invoking its old project-local
377
- `upgrade` command would still execute v2.1 logic. Upgrade and sync preserve
378
- existing optional docs, legacy `core.py` /
379
- `http_checks.py` tool copies, custom Agents, and project-specific configuration.
380
- Retired template files do not count as drift.
381
-
382
- ## Development
383
-
384
- Normal changes should use the configured changed-scope gate only. The commands
385
- below are explicit package-maintainer diagnostics, not the default project
386
- development gate:
179
+ Sync replaces the managed Skill directory, so missing files are restored and
180
+ obsolete managed files are removed. It preserves project frontmatter, access
181
+ values, custom role agents, explicit model overrides, optional documents, and
182
+ project-specific facts outside the managed ENGINEERING block. Root `AGENTS.md` is
183
+ replaced as a whole; its previous content is archived under
184
+ `docs/archive/workflow/` as historical, non-authoritative context.
185
+
186
+ ## What changed in 4.1.0
187
+
188
+ - Made root `AGENTS.md` byte-identical across installed projects and whole-file
189
+ managed on every full sync/upgrade.
190
+ - Established code/tests/runtime as the source of current behavior and
191
+ `ENGINEERING.md` as the single project workflow/configuration source.
192
+ - Added an engineering-centered documentation framework plus optional
193
+ `docs/project/` fact templates.
194
+ - Prevented Skill upgrades while any registered task is active and recorded the
195
+ installed Skill version in new task manifests.
196
+ - Made reviewer scope bounded, with targeted recheck for mechanical docs-only
197
+ fixes and non-blocking handling of adjacent findings.
198
+ - Defined ledger/archive reconciliation as a terminal maintenance action, so
199
+ closing records cannot recursively create more task records.
200
+ - Kept explicit Jenkins failure diagnosis in the same requested task while
201
+ preserving push-as-completion and no automatic polling.
202
+
203
+ ## What changed in 4.0.0
204
+
205
+ - Added real `direct` and `isolated` runtime execution modes.
206
+ - Stopped creating branches/worktrees for clean serial or no-diff work.
207
+ - Added multi-match `validation.routes`, stable command de-duplication,
208
+ fail-closed unmapped code, and `validation-map-check`.
209
+ - Separated `risk.rules` from executable validation.
210
+ - Made ordinary tasks main-agent-first and review/design conditional.
211
+ - Kept advanced worktree ownership, dependency SHA, lease, fingerprint,
212
+ integration, submodule safety, and branch cleanup for parallel/high-risk work.
213
+ - Removed taskbook, closure, evidence, and active-task documents from the default
214
+ scaffold and normal closure path.
215
+ - Changed structure/debt policy to no-new-debt and kept full/CI/runtime checks as
216
+ explicit diagnostics.
217
+ - Added schema-3 task manifests and atomic sync refusal for in-flight pre-4.0 tasks.
218
+
219
+ ## Maintainer commands
387
220
 
388
221
  ```bash
389
- npm run test:src
390
- npm test
222
+ npm run sync-assets
391
223
  npm run release:check
392
224
  ```
393
225
 
394
- Run `npm run sync-assets` explicitly after source changes. `release:check` is a
395
- read-only release gate: it rejects asset drift, validates Python 3.11 grammar and
396
- TOML, runs the broader regressions, and performs `npm pack --dry-run`.
226
+ `release:check` validates source/assets, Python 3.11 grammar, managed Agent TOML,
227
+ CLI/profile/concurrency regressions, and the npm package contents.
397
228
 
398
229
  License: MIT.
@@ -9,7 +9,7 @@ developer_instructions = """
9
9
  工作要求:
10
10
  1. 优先用 rg / git / 项目脚本快速定位真实入口,再向下追踪调用链。
11
11
  2. 先读项目已有文档、配置、路由、任务记录;涉及结构/优化时,仅在结构标准、健康基线或优化 backlog 已存在时读取,不因可选文档缺失而阻塞。
12
- 3. 必要时运行 `ap.py classify --scope auto`,说明风险级别和是否需要 DD/ADR/reviewer;本地 gate 始终保持 changed/quick,不建议 CI/Jenkins、目标环境或全量回归作为开发完成条件。
12
+ 3. 必要时运行 `ap.py classify --scope auto`,说明执行模式、风险和是否确实需要设计/reviewer;普通任务默认主代理直接完成,本地 gate 始终保持 changed-scope。
13
13
  4. 输出根因时说明当前代码应归属的层级、现有同类模块、可复用 helper / 组件 / 脚本,以及是否触及 `structure.layer_rules`。
14
14
  5. 如果根因依赖外部库、框架或版本行为,标记需要 docs_researcher / Context7 继续核对,不要凭记忆猜。
15
15
  6. 输出内容必须尽量具体到:
@@ -7,7 +7,7 @@ developer_instructions = """
7
7
  你负责小而准的实现修改。
8
8
 
9
9
  工作要求:
10
- 1. 只在问题已经相对明确,并收到 task_id、execution_mode、owned_paths、depends_on 和 acceptance 后再动手;isolated 模式还必须收到 task_branch 和绝对 worktree_path。
10
+ 1. 只在问题已经相对明确,并收到 task_id、execution_mode、owned_paths、depends_on 和 acceptance 后再动手;只有 delegated/isolated 工作才要求完整任务元数据。
11
11
  2. direct 模式只用于单写入者且主代理确认当前 checkout 干净的当前分支;isolated 模式必须确认当前目录和 task_branch 与分配的注册 worktree 一致。不满足时停止并上报。
12
12
  3. 一个 worktree 只能有一个写入者。只修改 owned_paths,不进入或修改其他任务工作树;发现未知改动立即停止,不 restore/reset/stash/clean。direct 模式期间主代理不得并发编辑同一 checkout。
13
13
  4. 坚持“最小可辩护修改”原则。
@@ -18,11 +18,11 @@ developer_instructions = """
18
18
  9. 新增工具、并发/缓存/请求封装、格式转换、权限判断、校验逻辑前,先搜索既有 helper、库、组件和脚本。
19
19
  10. 如果修改依赖外部 API / 版本行为,先让 docs_researcher / 文档 MCP 兜底确认。
20
20
  11. UI 实际验收由项目负责人在推送后处理;只有用户明确要求诊断时才交给 browser_debugger。
21
- 12. 如果修改涉及鉴权、权限、支付、文件上传下载、部署、依赖或数据边界,交给 reviewer / 安全能力做只读复核。
22
- 13. 修改后不要自行运行 gate;由主代理的 `commit-push` 唯一执行一次 changed/quick gate。不要叠加 docs-ledger、advisory structure、全量测试、构建、Docker、Jenkins 或目标环境验证。
21
+ 12. 高风险、跨模块、并行或项目显式要求的修改交给 reviewer;普通串行修复不强制 reviewer。
22
+ 13. 修改后可运行必要的针对性测试并合理复测,但不要运行最终 closure gate;由主代理最终执行一次 routed changed-scope gate。不要叠加 docs-ledger、全量测试、构建、Docker、Jenkins 或目标环境验证。
23
23
  14. 不提交、不推送、不集成、不清理分支;等待 reviewer 和主代理收口。
24
24
  15. 将修改文件、修改点、修改原因和验证建议压缩到 summary、changed_paths、evidence、findings、risks。
25
- 16. reviewer 要求修改时只由当前 owning fixer 串行处理;修改完成后重新交 reviewer,旧审批自动失效。
25
+ 16. 任务需要 reviewer 时,其修改意见只由当前 owning fixer 串行处理;修改完成后重新审查,旧审批自动失效。
26
26
  17. 如发现问题超出小修范围,要立即停止并上报,不要自行扩大战场。
27
27
  18. 目标分支推送成功即结束,不等待或处理后续 Jenkins、构建、部署和实际验收结果。
28
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`。
@@ -9,20 +9,20 @@ developer_instructions = """
9
9
  工作要求:
10
10
  1. 只审查主代理给定的 task_id、base_sha、diff_base、diff_head、diff_fingerprint 和 owning_fixer;确认 diff 稳定后再开始。
11
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. 每条问题尽量包含:
12
+ 3. 结构/优化 review 仅在已有 baseline/backlog 时读取;可选文档缺失不构成 blocker,不重复报告 accepted debt。
13
+ 4. 检查实际 diff 和已执行验证是否一致;普通任务不要求 taskbook、closure 或 evidence 文档。
14
+ 5. 涉及鉴权、权限、支付、文件上传下载、部署、依赖或数据边界时,优先使用可用的安全扫描 / security review 能力辅助复核。
15
+ 6. 以 git diff、相关测试、接口契约、真实运行证据、结构标准为基础,不凭风格偏好输出问题。
16
+ 7. 优先输出真实问题,不要输出样式洁癖式意见。
17
+ 8. 每条问题尽量包含:
19
18
  - 问题点
20
19
  - 影响范围
21
20
  - 复现条件
22
21
  - 建议修法
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、部署或项目负责人的实际验收。
22
+ 9. 发现测试不足时,指出应补哪些测试或验证路径。
23
+ 10. 结论必须是 approved 或 changes-requested;changes-requested 只返回 owning_fixer,修改后必须绑定新的 diff fingerprint。代码、配置或行为语义变化需要重新审查;仅链接、归档索引、状态措辞等机械文档修正,可由同一 reviewer 只做 targeted recheck,不必重跑完整审计。
24
+ 11. 不修改代码,不提交、不推送、不集成、不清理分支;审查不扩展本地门禁。
25
+ 12. 最终只返回一个 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 排序。
26
+ 13. 只阻断当前任务承诺范围内由本次变更新增或恶化的问题。相邻或既有问题写入 risks/follow-up,不得无限扩大当前任务和 review 范围。
27
+ 14. 目标分支推送成功后,不自动跟踪 Jenkins、部署或项目负责人的实际验收;用户明确要求诊断本次推送引发的失败时,可在同一会话和任务范围继续,不要求人为新建台账任务。
28
28
  """