duaer-spec 0.6.3 → 0.6.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.
@@ -24,7 +24,9 @@ Before editing files for a new request:
24
24
 
25
25
  1. Update local **`develop`** (hotfix: **`main`**)
26
26
  2. Create `feat/<name>` or `fix/<name>`
27
- 3. Create worktree at **`.worktree/<request-id>`** (required)
27
+ 3. Create worktree at **`.worktree/feat-<name>`** or **`.worktree/fix-<name>`**
28
+ (slash → hyphen). Do **not** reuse the Brief folder name
29
+ (`.duaer/specs/<nnn-slug>/`) as the worktree id.
28
30
  4. Develop only inside that worktree
29
31
  5. Never develop on `main` / `develop` or in the primary checkout
30
32
  6. Never reuse another agent's branch/worktree
@@ -32,8 +34,9 @@ Before editing files for a new request:
32
34
 
33
35
  ```bash
34
36
  mkdir -p .worktree
35
- git worktree add .worktree/<request-id> -b feat/<name> develop
36
- cd .worktree/<request-id>
37
+ git worktree add .worktree/feat-login -b feat/login develop
38
+ cd .worktree/feat-login
39
+ # Brief lives inside the checkout, e.g. .duaer/specs/002-login/
37
40
  ```
38
41
 
39
42
  ## Immutable habits
@@ -17,9 +17,11 @@ If this conflicts with root `AGENTS.md` (worktrees, commits, Issue/PR),
17
17
  For new behavior, fixes, refactors that change product behavior, or architecture:
18
18
 
19
19
  0. **Isolate first (mandatory):** update **`develop`** (hotfix: **`main`**),
20
- create `feat|fix/<name>`, add worktree at `.worktree/<request-id>`,
21
- work only there. Never skip the worktree. Never commit `.worktree/`.
22
- Never develop on `main` or `develop`.
20
+ create `feat|fix/<name>`, add worktree at `.worktree/feat-<name>` or
21
+ `.worktree/fix-<name>` (slash → hyphen). Never name the worktree after the
22
+ Brief folder (do **not** use `.worktree/<nnn-slug>` when the Spec is
23
+ `.duaer/specs/<nnn-slug>/`). Work only in the worktree. Never commit
24
+ `.worktree/`. Never develop on `main` or `develop`.
23
25
  1. **Silently follow** the procedure in `.cursor/skills/duaer-do/SKILL.md`
24
26
  (assign Brief → light tasks → implement → converge → handoff line).
25
27
  2. Do **not** wait for `/duaer-do` or any other skill invocation.
@@ -32,6 +32,10 @@ Do **not** lecture about methodology. Do **not** ask them to run commands.
32
32
  - Matching active job (`.duaer/active-job.json` + `spec.md`) → update acceptance if needed.
33
33
  - Else create `.duaer/specs/<nnn-slug>/spec.md` and `.duaer/active-job.json`
34
34
  (same outcome as specify). Keep small asks short: what / why / acceptance.
35
+ - The Brief path is **not** the worktree path. Isolation uses
36
+ `.worktree/feat-<name>/` (or `fix-…`); the Spec stays under
37
+ `.duaer/specs/<nnn-slug>/` inside that checkout. Never set both names to
38
+ the same `<nnn-slug>`.
35
39
 
36
40
  2. **Break down** — If `tasks.md` missing, write a short checklist from the Spec.
37
41
  Skip a heavy plan unless architecture or contracts change.
package/AGENTS.md CHANGED
@@ -147,10 +147,31 @@ Example (normal feature):
147
147
  git switch develop
148
148
  git pull --ff-only
149
149
  mkdir -p .worktree
150
- git worktree add .worktree/<request-id> -b feat/<request-id> develop
151
- cd .worktree/<request-id>
150
+ git worktree add .worktree/feat-login -b feat/login develop
151
+ cd .worktree/feat-login
152
152
  ```
153
153
 
154
+ **Two different folders — do not give them the same name:**
155
+
156
+ | Layer | Path | Role |
157
+ |---|---|---|
158
+ | Worktree | `.worktree/feat-<name>/` | Full git checkout for isolation |
159
+ | Brief | `.duaer/specs/<nnn-slug>/` | Job Spec / tasks / delivery stamp |
160
+
161
+ A worktree is a **complete** repo copy, so Briefs live *inside* it:
162
+
163
+ ```text
164
+ .worktree/feat-login/.duaer/specs/002-login/spec.md
165
+ ```
166
+
167
+ That is expected. What is **wrong** is reusing the Brief folder name as the
168
+ worktree id (e.g. `.worktree/002-login/.../specs/002-login/`) — it looks like
169
+ double nesting and confuses humans. Always:
170
+
171
+ * Branch: `feat/<name>` or `fix/<name>`
172
+ * Worktree: `.worktree/feat-<name>` or `.worktree/fix-<name>` (slash → hyphen)
173
+ * Brief: `.duaer/specs/<nnn-slug>/` (numbered catalog; may differ from `<name>`)
174
+
154
175
  Branch and worktree names must be unique and clearly associated with the request.
155
176
  Do **not** place request worktrees outside the repo (for example `../worktrees/`)
156
177
  unless the project baseline explicitly overrides this and still keeps them
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.4 — 2026-09-15
4
+
5
+ ### Worktree ≠ Brief folder name
6
+
7
+ - Clarify two layers: `.worktree/feat-<name>/` (full checkout) vs
8
+ `.duaer/specs/<nnn-slug>/` (Brief)
9
+ - Forbid naming the worktree after the Brief slug (avoids
10
+ `.worktree/002-x/.../specs/002-x/` double naming)
11
+
3
12
  ## 0.6.3 — 2026-09-15
4
13
 
5
14
  ### Docs: update path in installed 说明
package/DUADER.md CHANGED
@@ -34,12 +34,18 @@ Humans need not configure it for everyday use.
34
34
  ## Layout
35
35
 
36
36
  ```text
37
- .duaer/active-job.json
38
- .duaer/specs/<nnn-slug>/spec.md|tasks.md|delivery.json
39
- .cursor/rules/duaer-spec.mdc # autonomous behavior
40
- .cursor/skills/duaer-do/ # default job loop
37
+ .worktree/feat-<name>/ # git isolation (full checkout)
38
+ .duaer/active-job.json
39
+ .duaer/specs/<nnn-slug>/ # Brief (≠ worktree folder name)
40
+ spec.md | tasks.md | delivery.json
41
+ .cursor/rules/duaer-spec.mdc # autonomous behavior
42
+ .cursor/skills/duaer-do/ # default job loop
41
43
  ```
42
44
 
45
+ Worktree and Brief are different layers. Prefer
46
+ `.worktree/feat-login/.duaer/specs/002-login/` — not
47
+ `.worktree/002-login/.duaer/specs/002-login/`.
48
+
43
49
  ## Related
44
50
 
45
51
  - Adopt: [`ADOPT.md`](ADOPT.md)
package/README.zh-CN.md CHANGED
@@ -31,4 +31,13 @@ npx duaer-spec update
31
31
 
32
32
  合并后:`duaer handoff [--run]` 在 `develop` 上重启本地服务(命令写在 `.duaer/handoff.json`)。
33
33
 
34
+ ### 目录不要同名套娃
35
+
36
+ Worktree 是整仓副本,Brief 在仓库内的 `.duaer/specs/`:
37
+
38
+ ```text
39
+ 正确: .worktree/feat-login/.duaer/specs/002-login/spec.md
40
+ 错误: .worktree/002-login/.duaer/specs/002-login/spec.md ← worktree 名不要用 specs 目录名
41
+ ```
42
+
34
43
  英文源:[`README.md`](README.md) · 采纳细节:[`ADOPT.md`](ADOPT.md)
@@ -36,6 +36,18 @@ feat/<short-description> # new capability / improvement
36
36
  fix/<short-description> # defect
37
37
  ```
38
38
 
39
+ Worktree directory = branch with `/` → `-`:
40
+
41
+ ```text
42
+ branch feat/login → .worktree/feat-login
43
+ branch fix/timer → .worktree/fix-timer
44
+ ```
45
+
46
+ Duaer Brief folders are separate: `.duaer/specs/<nnn-slug>/`. Because a worktree
47
+ is a full checkout, Specs appear as
48
+ `.worktree/feat-login/.duaer/specs/002-login/spec.md`. That nesting is normal.
49
+ Do **not** reuse `<nnn-slug>` as the worktree folder name.
50
+
39
51
  Optional types when the project already uses them: `docs/`, `chore/`, `refactor/`,
40
52
  `test/`, `ci/` — still branch from `develop`, merge back to `develop` first.
41
53
 
@@ -37,6 +37,7 @@ the table for their app.
37
37
  | E2E-010 | `npx duaer-spec update` refreshes an existing install | manual |
38
38
  | E2E-011 | Installed docs (`DUADER.md`, `docs/agent/`) document `update` | manual |
39
39
  | E2E-012 | `README.zh-CN.md` covers install, update, branch model | manual |
40
+ | E2E-013 | Worktree id ≠ Brief `<nnn-slug>`; path is `.worktree/feat-…/.duaer/specs/…` | manual |
40
41
 
41
42
  ## Traceability
42
43
 
@@ -54,3 +55,4 @@ the table for their app.
54
55
  | E2E-010 | `duaer update` | One-line refresh |
55
56
  | E2E-011 | DUADER + agent docs | Update path in installed 说明 |
56
57
  | E2E-012 | `README.zh-CN.md` | Chinese 说明文档 |
58
+ | E2E-013 | AGENTS / branching naming | Avoid double `<nnn-slug>` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "duaer-spec",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Digital employees: autonomous delivery; main/develop/feat/fix; simple update",
5
5
  "type": "module",
6
6
  "bin": {