duaer-spec 0.6.2 → 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.
- package/.cursor/rules/agents-workflow.mdc +6 -3
- package/.cursor/rules/duaer-spec.mdc +5 -3
- package/.cursor/skills/duaer-do/SKILL.md +4 -0
- package/ADOPT.md +7 -2
- package/AGENTS.md +23 -2
- package/CHANGELOG.md +17 -0
- package/DUADER.md +15 -7
- package/README.md +2 -0
- package/README.zh-CN.md +43 -0
- package/docs/agent/README.md +3 -1
- package/docs/agent/branching-and-release.md +24 -1
- package/docs/agent/e2e-test-plan.md +6 -0
- package/package.json +3 -2
|
@@ -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
|
|
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
|
|
36
|
-
cd .worktree
|
|
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
|
|
21
|
-
|
|
22
|
-
|
|
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/ADOPT.md
CHANGED
|
@@ -12,10 +12,15 @@ npx duaer-spec init --here
|
|
|
12
12
|
npx duaer-spec update
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Do **not** use `init --here --force` as the everyday refresh. `update` reuses
|
|
16
|
+
the mode/branch from `.duaer/duaer-init.json`.
|
|
17
|
+
|
|
18
|
+
If you customized constitution / baseline / `.duaer/handoff.json` commands,
|
|
19
|
+
glance at `git diff` once and keep your overrides.
|
|
16
20
|
|
|
17
21
|
Ensure the repo has **`main`** and **`develop`**. See
|
|
18
|
-
[`docs/agent/branching-and-release.md`](docs/agent/branching-and-release.md)
|
|
22
|
+
[`docs/agent/branching-and-release.md`](docs/agent/branching-and-release.md)
|
|
23
|
+
(Chinese: [`README.zh-CN.md`](README.zh-CN.md)).
|
|
19
24
|
|
|
20
25
|
Then talk to the agent in plain language.
|
|
21
26
|
|
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
|
|
151
|
-
cd .worktree
|
|
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,22 @@
|
|
|
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
|
+
|
|
12
|
+
## 0.6.3 — 2026-09-15
|
|
13
|
+
|
|
14
|
+
### Docs: update path in installed 说明
|
|
15
|
+
|
|
16
|
+
- `DUADER.md` and `docs/agent/branching-and-release.md` document `npx duaer-spec update`
|
|
17
|
+
- Add `README.zh-CN.md` (install / update / branches)
|
|
18
|
+
- ADOPT clarifies: do not use `init --force` for everyday refresh
|
|
19
|
+
|
|
3
20
|
## 0.6.2 — 2026-09-15
|
|
4
21
|
|
|
5
22
|
### Simple update
|
package/DUADER.md
CHANGED
|
@@ -7,9 +7,10 @@ runs Brief → work → accept. Humans are not the operators of the phase machin
|
|
|
7
7
|
|
|
8
8
|
## Human experience
|
|
9
9
|
|
|
10
|
-
1. One-time: `npx duaer-spec init --here`
|
|
11
|
-
2.
|
|
12
|
-
3.
|
|
10
|
+
1. One-time install: `npx duaer-spec init --here`
|
|
11
|
+
2. Later refresh: `npx duaer-spec update`
|
|
12
|
+
3. Ongoing: describe work in chat
|
|
13
|
+
4. Review the handoff line (accepted / not yet)
|
|
13
14
|
|
|
14
15
|
## Agent procedure (autonomous)
|
|
15
16
|
|
|
@@ -33,13 +34,20 @@ Humans need not configure it for everyday use.
|
|
|
33
34
|
## Layout
|
|
34
35
|
|
|
35
36
|
```text
|
|
36
|
-
.
|
|
37
|
-
.duaer/
|
|
38
|
-
.
|
|
39
|
-
.
|
|
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
|
|
40
43
|
```
|
|
41
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
|
+
|
|
42
49
|
## Related
|
|
43
50
|
|
|
44
51
|
- Adopt: [`ADOPT.md`](ADOPT.md)
|
|
52
|
+
- Branches / go-live: [`docs/agent/branching-and-release.md`](docs/agent/branching-and-release.md)
|
|
45
53
|
- Agent ops: [`AGENTS.md`](AGENTS.md)
|
package/README.md
CHANGED
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# duaer-spec
|
|
2
|
+
|
|
3
|
+
**Duaer** 把 AI 编程助手变成**数字员工**:你用自然语言提需求,它自己跑 Spec → 实现 → 验收;只有交接干净才算完成。
|
|
4
|
+
|
|
5
|
+
你**不用**操作流程。装一次之后,说话即可。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx duaer-spec init --here
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 更新
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx duaer-spec update
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
若你改过本地 constitution / baseline / `handoff.json` 命令,看一眼 `git diff` 即可。
|
|
20
|
+
|
|
21
|
+
## 必须有的分支
|
|
22
|
+
|
|
23
|
+
| 分支 | 作用 |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `main` | 生产 / 正式上线 |
|
|
26
|
+
| `develop` | 日常集成、联调 |
|
|
27
|
+
| `feat/<name>` | 功能 → 合进 `develop` |
|
|
28
|
+
| `fix/<name>` | 缺陷 → 合进 `develop`(紧急从 `main` 出,再回补 `develop`) |
|
|
29
|
+
|
|
30
|
+
不同问题怎么上线:[`docs/agent/branching-and-release.md`](docs/agent/branching-and-release.md)
|
|
31
|
+
|
|
32
|
+
合并后:`duaer handoff [--run]` 在 `develop` 上重启本地服务(命令写在 `.duaer/handoff.json`)。
|
|
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
|
+
|
|
43
|
+
英文源:[`README.md`](README.md) · 采纳细节:[`ADOPT.md`](ADOPT.md)
|
package/docs/agent/README.md
CHANGED
|
@@ -10,4 +10,6 @@ Wins over Duaer and `examples/` when they conflict.
|
|
|
10
10
|
| [change-checklist.md](change-checklist.md) | Finish checklist |
|
|
11
11
|
| [e2e-test-plan.md](e2e-test-plan.md) | E2E scenario catalog template |
|
|
12
12
|
|
|
13
|
-
Root contract: [`AGENTS.md`](../../AGENTS.md).
|
|
13
|
+
Root contract: [`AGENTS.md`](../../AGENTS.md).
|
|
14
|
+
Adoption: [`ADOPT.md`](../../ADOPT.md) — `npx duaer-spec init --here` / `npx duaer-spec update`.
|
|
15
|
+
Chinese summary: [`README.zh-CN.md`](../../README.zh-CN.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
|
|
|
@@ -199,9 +211,20 @@ All implementation edits happen inside the request worktree.
|
|
|
199
211
|
|
|
200
212
|
---
|
|
201
213
|
|
|
214
|
+
## 7. Install and update (adopters)
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
npx duaer-spec init --here # once
|
|
218
|
+
npx duaer-spec update # later refresh — no --force recipe
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Details: [`ADOPT.md`](../../ADOPT.md). Chinese summary: [`README.zh-CN.md`](../../README.zh-CN.md).
|
|
222
|
+
|
|
202
223
|
## Related
|
|
203
224
|
|
|
204
225
|
- [workflow.md](workflow.md) — R4 and development loop
|
|
205
226
|
- [change-checklist.md](change-checklist.md) — finish checklist
|
|
206
227
|
- [baseline.md](../baseline.md) — frozen: `develop` + `main`
|
|
207
|
-
- [ADOPT.md](../../ADOPT.md) — install into another repo
|
|
228
|
+
- [ADOPT.md](../../ADOPT.md) — install / update into another repo
|
|
229
|
+
- [README.zh-CN.md](../../README.zh-CN.md) — Chinese install, update, branches
|
|
230
|
+
|
|
@@ -35,6 +35,9 @@ the table for their app.
|
|
|
35
35
|
| E2E-008 | Docs require main+develop+feat+fix and typed go-live flows | manual |
|
|
36
36
|
| E2E-009 | After merge, handoff restarts services on develop (`duaer handoff`) | manual |
|
|
37
37
|
| E2E-010 | `npx duaer-spec update` refreshes an existing install | manual |
|
|
38
|
+
| E2E-011 | Installed docs (`DUADER.md`, `docs/agent/`) document `update` | manual |
|
|
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 |
|
|
38
41
|
|
|
39
42
|
## Traceability
|
|
40
43
|
|
|
@@ -50,3 +53,6 @@ the table for their app.
|
|
|
50
53
|
| E2E-008 | `branching-and-release.md` | Branch + release matrix |
|
|
51
54
|
| E2E-009 | `.duaer/handoff.json` / `duaer handoff` | Service handoff |
|
|
52
55
|
| E2E-010 | `duaer update` | One-line refresh |
|
|
56
|
+
| E2E-011 | DUADER + agent docs | Update path in installed 说明 |
|
|
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
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "Digital employees: autonomous delivery; main/develop/feat/fix; simple update",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"docs/agent",
|
|
19
19
|
"docs/baseline.md",
|
|
20
20
|
"LICENSE",
|
|
21
|
-
"README.md"
|
|
21
|
+
"README.md",
|
|
22
|
+
"README.zh-CN.md"
|
|
22
23
|
],
|
|
23
24
|
"publishConfig": {
|
|
24
25
|
"access": "public"
|