duaer-spec 0.9.0 → 0.11.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/.claude/rules/agents-workflow.md +2 -1
- package/.claude/rules/duaer-spec.md +12 -6
- package/.cursor/rules/agents-workflow.mdc +2 -1
- package/.cursor/rules/duaer-spec.mdc +12 -6
- package/.cursor/skills/duaer-clarify/SKILL.md +5 -0
- package/.cursor/skills/duaer-converge/SKILL.md +15 -2
- package/.cursor/skills/duaer-do/SKILL.md +30 -7
- package/.cursor/skills/duaer-implement/SKILL.md +2 -1
- package/.cursor/skills/duaer-tasks/SKILL.md +8 -4
- package/.duaer/active-job.json +5 -0
- package/.duaer/memory/constitution.md +10 -4
- package/.duaer/memory/project-context.md +1 -1
- package/.duaer/memory/testing.md +70 -9
- package/.duaer/specs/001-verification-gate/delivery.json +19 -0
- package/.duaer/specs/001-verification-gate/spec.md +60 -0
- package/.duaer/specs/001-verification-gate/tasks.md +21 -0
- package/.duaer/specs/002-understand-gate/delivery.json +14 -0
- package/.duaer/specs/002-understand-gate/spec.md +42 -0
- package/.duaer/specs/002-understand-gate/tasks.md +9 -0
- package/.duaer/specs/003-live-dev-web/delivery.json +13 -0
- package/.duaer/specs/003-live-dev-web/spec.md +33 -0
- package/.duaer/specs/003-live-dev-web/tasks.md +8 -0
- package/.duaer/specs/004-live-deepseek-preset/delivery.json +12 -0
- package/.duaer/specs/004-live-deepseek-preset/spec.md +30 -0
- package/.duaer/specs/004-live-deepseek-preset/tasks.md +5 -0
- package/.duaer/specs/005-live-ui-probe/delivery.json +9 -0
- package/.duaer/specs/005-live-ui-probe/spec.md +17 -0
- package/.duaer/specs/005-live-ui-probe/tasks.md +5 -0
- package/.duaer/specs/006-live-auto-accept/delivery.json +9 -0
- package/.duaer/specs/006-live-auto-accept/spec.md +17 -0
- package/.duaer/specs/006-live-auto-accept/tasks.md +5 -0
- package/.duaer/specs/007-live-stream/delivery.json +9 -0
- package/.duaer/specs/007-live-stream/spec.md +17 -0
- package/.duaer/specs/007-live-stream/tasks.md +5 -0
- package/.duaer/specs/008-live-dispatch/delivery.json +12 -0
- package/.duaer/specs/008-live-dispatch/spec.md +19 -0
- package/.duaer/specs/008-live-dispatch/tasks.md +5 -0
- package/.duaer/specs/009-live-repo-pick/delivery.json +9 -0
- package/.duaer/specs/009-live-repo-pick/spec.md +17 -0
- package/.duaer/specs/009-live-repo-pick/tasks.md +5 -0
- package/.duaer/specs/010-fix-browse-remember/delivery.json +1 -0
- package/.duaer/specs/010-fix-browse-remember/spec.md +7 -0
- package/.duaer/specs/010-fix-browse-remember/tasks.md +2 -0
- package/.duaer/templates/plan-template.md +1 -1
- package/.duaer/templates/tasks-template.md +16 -14
- package/ADOPT.md +2 -1
- package/AGENTS.md +30 -16
- package/CHANGELOG.md +63 -0
- package/DUADER.md +9 -5
- package/README.md +16 -0
- package/README.zh-CN.md +21 -1
- package/bin/duaer-live.mjs +1446 -0
- package/bin/duaer.mjs +74 -2
- package/docs/agent/README.md +2 -1
- package/docs/agent/change-checklist.md +9 -7
- package/docs/agent/e2e-test-plan.md +13 -2
- package/docs/agent/workflow.md +13 -6
- package/package.json +4 -2
- package/web/live-dev/app.js +614 -0
- package/web/live-dev/index.html +117 -0
- package/web/live-dev/styles.css +548 -0
|
@@ -40,7 +40,8 @@ cd .worktree/feat-login
|
|
|
40
40
|
|
|
41
41
|
- Spec-sync for behavior changes; ADR when architecture/security/contracts change
|
|
42
42
|
- One logical change per commit; leave the worktree clean
|
|
43
|
-
-
|
|
43
|
+
- Risk-based verification per `.duaer/memory/testing.md` before accept / merge
|
|
44
|
+
- User/protocol-visible changes update E2E scenario docs **and** run required L3 subsets
|
|
44
45
|
- Merge into **`develop`** when done (hotfix: **`main`**, then back-merge **`develop`**)
|
|
45
46
|
- **Handoff (mandatory):** stop worktree-bound processes → remove `.worktree/<id>` →
|
|
46
47
|
restart from primary checkout on `develop` (`duaer handoff [--run]`, `.duaer/handoff.json`)
|
|
@@ -20,13 +20,17 @@ For new behavior, fixes, refactors that change product behavior, or architecture
|
|
|
20
20
|
`.duaer/specs/<nnn-slug>/`). Work only in the worktree. Never commit
|
|
21
21
|
`.worktree/`. Never develop on `main` or `develop`.
|
|
22
22
|
1. **Silently follow** the procedure in `.claude/skills/duaer-do/SKILL.md`
|
|
23
|
-
(assign Brief → light tasks → implement →
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
(assign Brief → **understand / confirm** → light tasks → implement →
|
|
24
|
+
converge → handoff line).
|
|
25
|
+
2. If the ask is vague: restate precise goal / scope / acceptance and wait for
|
|
26
|
+
confirm (or ≤3 blocking questions) before coding. Do not invent product
|
|
27
|
+
decisions silently.
|
|
28
|
+
3. Do **not** wait for `/duaer-do` or any other skill invocation.
|
|
29
|
+
4. Do **not** say “please run `/duaer-specify`” — you do it.
|
|
30
|
+
5. Do **not** dump a methodology tutorial unless they ask how Duaer works.
|
|
31
|
+
6. Merge to **`develop`** when done (hotfix: **`main`**, then back-merge
|
|
28
32
|
**`develop`**). Promote to **`main`** only if the user asks to go online.
|
|
29
|
-
|
|
33
|
+
7. **Handoff (mandatory):** stop processes bound to `.worktree/<id>/`, remove
|
|
30
34
|
the worktree, then restart services from the primary checkout on `develop`
|
|
31
35
|
using `.duaer/handoff.json` / `duaer handoff [--run]`. Never leave the user
|
|
32
36
|
on a dead worktree server.
|
|
@@ -43,6 +47,8 @@ For new behavior, fixes, refactors that change product behavior, or architecture
|
|
|
43
47
|
## Forbidden
|
|
44
48
|
|
|
45
49
|
- Jump from chat to code with no Brief under `.duaer/specs/`.
|
|
50
|
+
- Jump from a vague ask to implementation without restating and confirming
|
|
51
|
+
intent (see Understand in `duaer-do`).
|
|
46
52
|
- Making the human operate the workflow.
|
|
47
53
|
|
|
48
54
|
## Optional finer tools (agent-only)
|
|
@@ -43,7 +43,8 @@ cd .worktree/feat-login
|
|
|
43
43
|
|
|
44
44
|
- Spec-sync for behavior changes; ADR when architecture/security/contracts change
|
|
45
45
|
- One logical change per commit; leave the worktree clean
|
|
46
|
-
-
|
|
46
|
+
- Risk-based verification per `.duaer/memory/testing.md` before accept / merge
|
|
47
|
+
- User/protocol-visible changes update E2E scenario docs **and** run required L3 subsets
|
|
47
48
|
- Merge into **`develop`** when done (hotfix: **`main`**, then back-merge **`develop`**)
|
|
48
49
|
- **Handoff (mandatory):** stop worktree-bound processes → remove `.worktree/<id>` →
|
|
49
50
|
restart from primary checkout on `develop` (`duaer handoff [--run]`, `.duaer/handoff.json`)
|
|
@@ -24,13 +24,17 @@ For new behavior, fixes, refactors that change product behavior, or architecture
|
|
|
24
24
|
`.worktree/`. Never develop on `main` or `develop`.
|
|
25
25
|
1. **Silently follow** the procedure in the `duaer-do` skill
|
|
26
26
|
(`.cursor/skills/duaer-do/SKILL.md` or `.claude/skills/duaer-do/SKILL.md`)
|
|
27
|
-
(assign Brief → light tasks → implement →
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
(assign Brief → **understand / confirm** → light tasks → implement →
|
|
28
|
+
converge → handoff line).
|
|
29
|
+
2. If the ask is vague: restate precise goal / scope / acceptance and wait for
|
|
30
|
+
confirm (or ≤3 blocking questions) before coding. Do not invent product
|
|
31
|
+
decisions silently.
|
|
32
|
+
3. Do **not** wait for `/duaer-do` or any other skill invocation.
|
|
33
|
+
4. Do **not** say “please run `/duaer-specify`” — you do it.
|
|
34
|
+
5. Do **not** dump a methodology tutorial unless they ask how Duaer works.
|
|
35
|
+
6. Merge to **`develop`** when done (hotfix: **`main`**, then back-merge
|
|
32
36
|
**`develop`**). Promote to **`main`** only if the user asks to go online.
|
|
33
|
-
|
|
37
|
+
7. **Handoff (mandatory):** stop processes bound to `.worktree/<id>/`, remove
|
|
34
38
|
the worktree, then restart services from the primary checkout on `develop`
|
|
35
39
|
using `.duaer/handoff.json` / `duaer handoff [--run]`. Never leave the user
|
|
36
40
|
on a dead worktree server.
|
|
@@ -47,6 +51,8 @@ For new behavior, fixes, refactors that change product behavior, or architecture
|
|
|
47
51
|
## Forbidden
|
|
48
52
|
|
|
49
53
|
- Jump from chat to code with no Brief under `.duaer/specs/`.
|
|
54
|
+
- Jump from a vague ask to implementation without restating and confirming
|
|
55
|
+
intent (see Understand in `duaer-do`).
|
|
50
56
|
- Making the human operate the workflow.
|
|
51
57
|
|
|
52
58
|
## Optional finer tools (agent-only)
|
|
@@ -56,6 +56,11 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
56
56
|
|
|
57
57
|
Goal: Detect and reduce ambiguity or missing decision points in the active feature specification and record the clarifications directly in the spec file.
|
|
58
58
|
|
|
59
|
+
Note: The lightweight **Understand** step in `duaer-do` is the front door for
|
|
60
|
+
casual asks (restate + confirm before coding). Use this skill when a Spec
|
|
61
|
+
already exists and still has high-impact gaps (up to 5 questions). Prefer
|
|
62
|
+
Understand first; escalate here when the Brief is large or architecture-heavy.
|
|
63
|
+
|
|
59
64
|
Note: This clarification workflow is expected to run (and be completed) BEFORE invoking `/duaer-plan`. If the user explicitly states they are skipping clarification (e.g., exploratory spike), you may proceed, but must warn that downstream rework risk increases.
|
|
60
65
|
|
|
61
66
|
Execution steps:
|
|
@@ -98,6 +98,11 @@ When the codebase already satisfies everything, the command MUST leave `tasks.md
|
|
|
98
98
|
produces a corresponding remediation task. If the constitution is an unfilled template,
|
|
99
99
|
skip constitution checks gracefully rather than failing.
|
|
100
100
|
|
|
101
|
+
**Verification Authority**: `.duaer/memory/testing.md` is part of accept criteria.
|
|
102
|
+
Do **not** stamp `status: "accepted"` if required risk-table levels were not run and
|
|
103
|
+
no written waiver exists in the feature docs. Treat missing verification as a
|
|
104
|
+
`missing` gap (append a Convergence task) rather than accepting on Spec match alone.
|
|
105
|
+
|
|
101
106
|
## Execution Steps
|
|
102
107
|
|
|
103
108
|
### 1. Initialize Convergence Context
|
|
@@ -256,15 +261,23 @@ Append to the **end** of `tasks.md`, per the append contract:
|
|
|
256
261
|
"checkedAt": "<ISO-8601 UTC>",
|
|
257
262
|
"openTasks": 0,
|
|
258
263
|
"findings": 0,
|
|
259
|
-
"source": "duaer-converge"
|
|
264
|
+
"source": "duaer-converge",
|
|
265
|
+
"verification": {
|
|
266
|
+
"levels": ["L0", "L1"],
|
|
267
|
+
"commands": ["<commands run>"],
|
|
268
|
+
"result": "pass",
|
|
269
|
+
"notes": "<optional waiver or subset note>"
|
|
270
|
+
}
|
|
260
271
|
}
|
|
261
272
|
```
|
|
262
273
|
|
|
274
|
+
Include `verification` whenever checks were run or waived (`result`: `pass` |
|
|
275
|
+
`waived`). Omit only for pure-docs jobs with no levels required.
|
|
263
276
|
Set `openTasks` to the count of unchecked `- [ ]` lines currently in `tasks.md`
|
|
264
277
|
(must be `0` for `status: "accepted"`; if any remain, treat as `tasks_appended`
|
|
265
278
|
path instead — do not stamp accepted).
|
|
266
279
|
- Report: **"✅ Converged — the implementation satisfies the spec, plan, and tasks."**
|
|
267
|
-
- Include the summary counts of what was checked.
|
|
280
|
+
- Include the summary counts of what was checked **and** verification levels/commands.
|
|
268
281
|
- Tell the user they can run `duaer job .` to see handoff status (policy default: coach).
|
|
269
282
|
- Reminder: this is **job acceptance**, not a repository merge lock.
|
|
270
283
|
### 8. Provide Next Actions (Handoff)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "duaer-do"
|
|
3
|
-
description: "Autonomous job loop for digital employees: Brief → work → accept. Agents must follow this whenever the user asks for product work — without waiting for the user to invoke this skill or any CLI."
|
|
3
|
+
description: "Autonomous job loop for digital employees: Brief → understand → work → accept. Agents must follow this whenever the user asks for product work — without waiting for the user to invoke this skill or any CLI."
|
|
4
4
|
compatibility: "Requires duaer-spec project structure with .duaer/ directory"
|
|
5
5
|
metadata:
|
|
6
6
|
author: "duaer-spec"
|
|
@@ -37,25 +37,48 @@ Do **not** lecture about methodology. Do **not** ask them to run commands.
|
|
|
37
37
|
`.duaer/specs/<nnn-slug>/` inside that checkout. Never set both names to
|
|
38
38
|
the same `<nnn-slug>`.
|
|
39
39
|
|
|
40
|
-
2. **
|
|
40
|
+
2. **Understand** — Turn a casual ask into a precise job **before** coding:
|
|
41
|
+
- Restate in plain language: **goal**, **in scope**, **out of scope**,
|
|
42
|
+
**acceptance** (how we know it is done).
|
|
43
|
+
- If the ask is vague, multi-way, or missing acceptance: present that
|
|
44
|
+
restatement, optionally ask **at most 3** blocking questions (or offer
|
|
45
|
+
recommended defaults), and **wait for the human to confirm or correct**
|
|
46
|
+
before Break down / Work.
|
|
47
|
+
- Write the confirmed intent into the Brief (`spec.md`). Do not invent
|
|
48
|
+
product decisions silently.
|
|
49
|
+
- **May proceed without a blocking wait** when any of these hold:
|
|
50
|
+
- The human already gave clear acceptance criteria, OR
|
|
51
|
+
- Hotfix with a clear repro / root cause, OR
|
|
52
|
+
- The human explicitly said to skip confirm ("just do it", "按你说的做"),
|
|
53
|
+
in which case record assumptions in the Brief.
|
|
54
|
+
- Deep ambiguity after a full Spec still uses `duaer-clarify` (up to 5
|
|
55
|
+
questions). Understand is the **lightweight front door** on every ask.
|
|
56
|
+
|
|
57
|
+
3. **Break down** — If `tasks.md` missing, write a short checklist from the Spec.
|
|
41
58
|
Skip a heavy plan unless architecture or contracts change.
|
|
42
59
|
|
|
43
|
-
|
|
60
|
+
4. **Work** — Implement open tasks; mark `[x]` as you go. No scope beyond Spec.
|
|
44
61
|
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
5. **Accept** — Converge against Spec **and** `.duaer/memory/testing.md`:
|
|
63
|
+
run required verification (or record a written waiver), stamp `delivery.json`
|
|
64
|
+
`accepted` with optional `verification` evidence, or append gap tasks and
|
|
65
|
+
implement them when small enough; otherwise one clear remaining note.
|
|
66
|
+
Never accept on Spec match alone when required levels were not run.
|
|
47
67
|
|
|
48
|
-
|
|
68
|
+
6. **Handoff** — One line to the human:
|
|
49
69
|
- `✅ Job accepted — ready for your review.`
|
|
50
70
|
- `⏳ Job not accepted yet — <one sentence>.`
|
|
71
|
+
- During Understand wait: `⏳ Confirming intent — <one sentence restatement>.`
|
|
51
72
|
Never claim done unless accepted + tasks clear. Git is not locked by this.
|
|
52
73
|
|
|
53
74
|
## Hotfix
|
|
54
75
|
|
|
55
|
-
Still a short Spec (symptom / cause / acceptance)
|
|
76
|
+
Still a short Spec (symptom / cause / acceptance). Restate once; if repro is
|
|
77
|
+
clear, proceed. Same handoff.
|
|
56
78
|
|
|
57
79
|
## Never
|
|
58
80
|
|
|
81
|
+
- Jump from a vague chat line to implementation without restating intent.
|
|
59
82
|
- Ask the human to run `/duaer-*`, `duaer status`, or `duaer policy`.
|
|
60
83
|
- Discuss policy modes unless they ask.
|
|
61
84
|
- Block on slash-command invocation.
|
|
@@ -174,7 +174,8 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
174
174
|
9. Completion validation:
|
|
175
175
|
- Verify all required tasks are completed
|
|
176
176
|
- Check that implemented features match the original specification
|
|
177
|
-
-
|
|
177
|
+
- Run `.duaer/memory/testing.md` levels required for the change (or record waivers)
|
|
178
|
+
- Validate that required tests pass; leave failures as open work
|
|
178
179
|
- Confirm the implementation follows the technical plan
|
|
179
180
|
|
|
180
181
|
Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running `/duaer-tasks` first to regenerate the task list.
|
|
@@ -78,7 +78,7 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
78
78
|
- Phase 1: Setup tasks (project initialization)
|
|
79
79
|
- Phase 2: Foundational tasks (blocking prerequisites for all user stories)
|
|
80
80
|
- Phase 3+: One phase per user story (in priority order from spec.md)
|
|
81
|
-
- Each phase includes: story goal, independent test criteria,
|
|
81
|
+
- Each phase includes: story goal, independent test criteria, **verification tasks** (from `testing.md`), implementation tasks
|
|
82
82
|
- Final Phase: Polish & cross-cutting concerns
|
|
83
83
|
- All tasks must follow the strict checklist format (see Task Generation Rules below)
|
|
84
84
|
- Clear file paths for each task
|
|
@@ -139,7 +139,11 @@ The tasks.md should be immediately executable - each task must be specific enoug
|
|
|
139
139
|
|
|
140
140
|
**CRITICAL**: Tasks MUST be organized by user story to enable independent implementation and testing.
|
|
141
141
|
|
|
142
|
-
**
|
|
142
|
+
**Verification is DEFAULT**: For each user story, generate verification tasks
|
|
143
|
+
from `.duaer/memory/testing.md` (L0–L3 as the risk table requires). Do **not**
|
|
144
|
+
omit tests just because the Spec did not say “TDD”. Only skip a level when the
|
|
145
|
+
Spec or tasks record an explicit waiver. Extra TDD-style tests before
|
|
146
|
+
implementation remain allowed when requested.
|
|
143
147
|
|
|
144
148
|
### Checklist Format (REQUIRED)
|
|
145
149
|
|
|
@@ -181,12 +185,12 @@ Every task MUST strictly follow this format:
|
|
|
181
185
|
- Models needed for that story
|
|
182
186
|
- Services needed for that story
|
|
183
187
|
- Interfaces/UI needed for that story
|
|
184
|
-
-
|
|
188
|
+
- Verification tasks for that story (per `.duaer/memory/testing.md` risk table)
|
|
185
189
|
- Mark story dependencies (most stories should be independent)
|
|
186
190
|
|
|
187
191
|
2. **From Contracts**:
|
|
188
192
|
- Map each interface contract → to the user story it serves
|
|
189
|
-
-
|
|
193
|
+
- Each interface contract → contract/verification task [P] before or with implementation when the risk table requires L1/L2
|
|
190
194
|
|
|
191
195
|
3. **From Data Model**:
|
|
192
196
|
- Map each entity to the user story(ies) that need it
|
|
@@ -11,8 +11,9 @@ Duaer for what to build.
|
|
|
11
11
|
### I. Spec before code (NON-NEGOTIABLE)
|
|
12
12
|
|
|
13
13
|
The **agent** starts a Brief before coding — the human does not operate phases.
|
|
14
|
-
Autonomous default: follow `duaer-do` (Brief →
|
|
15
|
-
|
|
14
|
+
Autonomous default: follow `duaer-do` (Brief → **understand** → tasks →
|
|
15
|
+
implement → converge). Never skip Spec, intent confirm when vague, or converge.
|
|
16
|
+
Never ask the human to run `/duaer-*` for normal work.
|
|
16
17
|
|
|
17
18
|
### II. Read as-is before changing
|
|
18
19
|
|
|
@@ -29,8 +30,13 @@ Do not expand scope without updating the spec and tasks.
|
|
|
29
30
|
|
|
30
31
|
### IV. Verify before done
|
|
31
32
|
|
|
32
|
-
Mark tasks complete only when the
|
|
33
|
-
|
|
33
|
+
Mark tasks complete only when the verification required by
|
|
34
|
+
`.duaer/memory/testing.md` (and any Spec/task checks) has been **executed**,
|
|
35
|
+
or explicitly waived in the feature docs.
|
|
36
|
+
|
|
37
|
+
Do not stamp `delivery.json` `accepted` without verification evidence (or a
|
|
38
|
+
written waiver). Prefer automated subsets; use manual L4 only when automation
|
|
39
|
+
cannot cover the path.
|
|
34
40
|
|
|
35
41
|
**Job handoff (not a git lock):** the agent reports accept/open itself.
|
|
36
42
|
Default policy `coach` — do not claim "done" while the active job is unfinished.
|
package/.duaer/memory/testing.md
CHANGED
|
@@ -1,14 +1,75 @@
|
|
|
1
|
-
# Testing expectations (
|
|
1
|
+
# Testing expectations (project contract)
|
|
2
|
+
|
|
3
|
+
Agents **must** read this file before marking work verified or accepting a job.
|
|
4
|
+
Replace command examples with the adopting project's real scripts. Keep the
|
|
5
|
+
level model and risk rules unless an ADR documents a change.
|
|
2
6
|
|
|
3
7
|
## Levels
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
| Level | What | Typical commands (replace) | Default owner |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| **L0** | Lint / typecheck / static | `npm run lint`, `tsc --noEmit` | After every implementation pass |
|
|
12
|
+
| **L1** | Unit tests for changed modules | `npm test` (or package subset) | Default for code changes |
|
|
13
|
+
| **L2** | Integration / product acceptance at changed boundaries | project acceptance or integration suite | When boundaries or core paths change |
|
|
14
|
+
| **L3** | Automated E2E / browser for user-visible paths | `npm run test:e2e` or equivalent **subset** | When UI / protocol UX changes |
|
|
15
|
+
| **L4** | Manual account / device path when automation cannot cover auth or real data | documented steps in the Brief | When UI/auth and no automated substitute |
|
|
16
|
+
|
|
17
|
+
IDE Browser / MCP exploration is **optional discovery**. It does **not** replace
|
|
18
|
+
L3 automation when the project has an E2E suite.
|
|
19
|
+
|
|
20
|
+
## Risk table (what to run)
|
|
21
|
+
|
|
22
|
+
| Change touch | Minimum before accept / merge to `develop` |
|
|
23
|
+
|---|---|
|
|
24
|
+
| Docs / comments only | None (note in Brief) |
|
|
25
|
+
| Internal code, same behavior | L0 + L1 for affected packages |
|
|
26
|
+
| API / data / core path | L0 + L1 + L2 (or documented equivalent) |
|
|
27
|
+
| User-visible or protocol-visible UI/UX | L0 + L1 + **L3 subset for touched flows** + update E2E catalog |
|
|
28
|
+
| Auth / payments / irreversible ops | Above + L4 if L3 cannot cover |
|
|
29
|
+
|
|
30
|
+
Prefer **targeted subsets** over full monorepo suites. Do not skip a required
|
|
31
|
+
level without an explicit waiver in the feature docs (`tasks.md` or Spec).
|
|
32
|
+
|
|
33
|
+
## Opt-in (still need an explicit ask or Spec note)
|
|
34
|
+
|
|
35
|
+
Mark these in the project table when they are expensive:
|
|
36
|
+
|
|
37
|
+
- Full-repo E2E (vs subset)
|
|
38
|
+
- Remote CI-only jobs the agent would trigger manually
|
|
39
|
+
- Live paid LLM / third-party smoke
|
|
40
|
+
- Production / staging account checks beyond local
|
|
41
|
+
|
|
42
|
+
Absence from this opt-in list means the agent **runs** the level when the risk
|
|
43
|
+
table requires it — the human does **not** have to re-request ordinary
|
|
44
|
+
verification.
|
|
45
|
+
|
|
46
|
+
## Definition of Done (agent-owned work)
|
|
47
|
+
|
|
48
|
+
Before `delivery.json` `accepted` and before merging the request branch into
|
|
49
|
+
local **`develop`**:
|
|
50
|
+
|
|
51
|
+
1. [ ] Required levels from the risk table have been **executed** (or waived in writing)
|
|
52
|
+
2. [ ] Failures fixed or the job left `open` with a clear remaining note
|
|
53
|
+
3. [ ] User/protocol-visible changes: E2E catalog scenario added/updated
|
|
54
|
+
4. [ ] Handoff mentions what was run (commands + result)
|
|
55
|
+
|
|
56
|
+
## Phase hooks (Duaer)
|
|
57
|
+
|
|
58
|
+
| Phase | Verification action |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `specify` | Independent Test + acceptance scenarios; name expected levels |
|
|
61
|
+
| `plan` | Fill **Testing** with concrete commands / levels |
|
|
62
|
+
| `tasks` | **Default:** verification tasks per story (not optional) |
|
|
63
|
+
| `implement` | Run relevant checks as tasks complete |
|
|
64
|
+
| `converge` | Refuse `accepted` without verification evidence or waiver |
|
|
65
|
+
|
|
66
|
+
## Waivers
|
|
67
|
+
|
|
68
|
+
A waiver must state: which level, why it cannot run now, and the follow-up.
|
|
69
|
+
“Too slow” alone is not enough if a subset command exists.
|
|
10
70
|
|
|
11
|
-
##
|
|
71
|
+
## Adopter profiles
|
|
12
72
|
|
|
13
|
-
|
|
14
|
-
|
|
73
|
+
Thick product examples (e.g. `examples/dianwu-flow/testing.md`) may add L5+
|
|
74
|
+
layers (Playwright CI, live LLM, expert review). Those extend this contract;
|
|
75
|
+
they do not replace it.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"status": "accepted",
|
|
4
|
+
"outcome": "converged",
|
|
5
|
+
"checkedAt": "2026-09-15T06:50:00.000Z",
|
|
6
|
+
"openTasks": 0,
|
|
7
|
+
"findings": 0,
|
|
8
|
+
"source": "duaer-converge",
|
|
9
|
+
"verification": {
|
|
10
|
+
"levels": ["L0", "L1"],
|
|
11
|
+
"commands": [
|
|
12
|
+
"rg 'Do not run local E2E' AGENTS.md docs/agent (expect none)",
|
|
13
|
+
"rg 'Verification is DEFAULT' .cursor/skills/duaer-tasks/SKILL.md",
|
|
14
|
+
"test -f .duaer/memory/testing.md docs/adr/001-verification-gate.md"
|
|
15
|
+
],
|
|
16
|
+
"result": "pass",
|
|
17
|
+
"notes": "Docs/policy change in duaer-spec; no app runtime suite. Manual catalog E2E-017–020."
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Feature Specification: Verification gate for development
|
|
2
|
+
|
|
3
|
+
**Feature Branch**: `feat/verification-gate`
|
|
4
|
+
|
|
5
|
+
**Created**: 2026-09-15
|
|
6
|
+
|
|
7
|
+
**Status**: Active
|
|
8
|
+
|
|
9
|
+
**Input**: Evolve duaer-spec so adopting projects require risk-based verification during development (not docs-only E2E; not default “skip E2E”).
|
|
10
|
+
|
|
11
|
+
## User Scenarios & Testing *(mandatory)*
|
|
12
|
+
|
|
13
|
+
### User Story 1 - Agent must verify before accept (Priority: P1)
|
|
14
|
+
|
|
15
|
+
As a human using a digital employee on an adopting project, I want the agent to run the project's required checks for the change before marking the job accepted, so “done” means verified, not only Spec-matched.
|
|
16
|
+
|
|
17
|
+
**Why this priority**: Closes the gap between Spec converge and real quality.
|
|
18
|
+
|
|
19
|
+
**Independent Test**: Read AGENTS + `duaer-do` + converge; confirm accept path requires verification per `.duaer/memory/testing.md`.
|
|
20
|
+
|
|
21
|
+
**Acceptance Scenarios**:
|
|
22
|
+
|
|
23
|
+
1. **Given** a user-visible change, **When** the agent converges, **Then** it must run (or record a justified waiver for) the levels required by `testing.md`, and stamp `delivery.json` only when that gate is satisfied.
|
|
24
|
+
2. **Given** an internal-only change, **When** the agent works, **Then** it still runs L0/L1 (or project equivalent) when those commands exist, and may skip browser E2E.
|
|
25
|
+
|
|
26
|
+
### User Story 2 - Project testing contract is actionable (Priority: P1)
|
|
27
|
+
|
|
28
|
+
As an adopting project, I get a concrete `.duaer/memory/testing.md` that defines levels, when to run what, and the merge-to-develop minimum — not a five-line stub.
|
|
29
|
+
|
|
30
|
+
**Independent Test**: Open installed `testing.md`; it names levels, risk table, DoD, and phase hooks.
|
|
31
|
+
|
|
32
|
+
### User Story 3 - Policy no longer forbids needed E2E (Priority: P1)
|
|
33
|
+
|
|
34
|
+
As an agent, I am instructed to run risk-appropriate automated E2E / browser suites from the project contract, instead of a blanket “do not run E2E unless the user asks”.
|
|
35
|
+
|
|
36
|
+
**Independent Test**: AGENTS / workflow R3 / change-checklist no longer contain the blanket ban; they point at `testing.md`.
|
|
37
|
+
|
|
38
|
+
## Requirements *(mandatory)*
|
|
39
|
+
|
|
40
|
+
### Functional Requirements
|
|
41
|
+
|
|
42
|
+
- **FR-001**: System MUST publish an actionable `.duaer/memory/testing.md` template (levels L0–L4+, risk table, DoD, phase hooks, waiver rules).
|
|
43
|
+
- **FR-002**: AGENTS and workflow MUST require risk-based verification for agent-owned development; MUST NOT blanket-forbid local E2E.
|
|
44
|
+
- **FR-003**: `duaer-do`, `duaer-tasks`, and `duaer-converge` MUST treat verification as default (tasks include it; accept requires evidence or explicit waiver).
|
|
45
|
+
- **FR-004**: E2E scenario catalog docs remain required for user/protocol-visible changes (R3 docs) **and** execution follows `testing.md`.
|
|
46
|
+
- **FR-005**: ADR MUST record the policy change (verification gate).
|
|
47
|
+
- **FR-006**: Host always-on rules (`agents-workflow`) MUST mention verification, not only E2E docs.
|
|
48
|
+
- **FR-007**: Expensive / remote / full-suite or live-LLM runs MAY still require explicit user ask when `testing.md` marks them as opt-in; subset E2E for touched UI paths MUST run when the project defines those commands.
|
|
49
|
+
|
|
50
|
+
### Non-goals
|
|
51
|
+
|
|
52
|
+
- Scaffolding Playwright into every adopter by default.
|
|
53
|
+
- Requiring IDE Browser MCP.
|
|
54
|
+
- Changing R6 PR principle (third-party completeness may still be follow-up).
|
|
55
|
+
|
|
56
|
+
## Success Criteria
|
|
57
|
+
|
|
58
|
+
- **SC-001**: A new agent reading only AGENTS + testing.md + duaer-do knows it must verify before accept.
|
|
59
|
+
- **SC-002**: Blanket “do not run E2E unless asked” is gone from ops docs.
|
|
60
|
+
- **SC-003**: dianwu-flow example remains a thick adopter profile pointing at the shared contract.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Tasks: Verification gate
|
|
2
|
+
|
|
3
|
+
## Phase 1 — Contract
|
|
4
|
+
|
|
5
|
+
- [x] T001 Expand `.duaer/memory/testing.md` into actionable project contract
|
|
6
|
+
- [x] T002 Rewrite AGENTS §3 + workflow R3 + change-checklist for risk-based verification
|
|
7
|
+
- [x] T003 Update constitution IV + agents-workflow (Cursor/Claude) + DUADER light mention
|
|
8
|
+
- [x] T004 ADR-001 verification gate; update ADR index
|
|
9
|
+
|
|
10
|
+
## Phase 2 — Job loop skills
|
|
11
|
+
|
|
12
|
+
- [x] T005 Update `duaer-do` Accept step for verification evidence
|
|
13
|
+
- [x] T006 Flip `duaer-tasks` from “tests optional” to default verification tasks
|
|
14
|
+
- [x] T007 Update `duaer-converge` / `duaer-implement` accept + validation gates
|
|
15
|
+
- [x] T008 Optional `verification` field on `delivery.json` when accepted
|
|
16
|
+
|
|
17
|
+
## Phase 3 — Catalog & examples
|
|
18
|
+
|
|
19
|
+
- [x] T009 Update e2e-test-plan scenarios; CHANGELOG; examples/dianwu-flow pointer
|
|
20
|
+
- [x] T010 `checkWorkplace` includes `.duaer/memory/testing.md`
|
|
21
|
+
- [x] T011 Converge + stamp delivery.json
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "accepted",
|
|
3
|
+
"acceptedAt": "2026-09-15T10:05:00.000Z",
|
|
4
|
+
"summary": "Added Understand gate to duaer-do and host-facing docs so vague asks are restated and confirmed before implementation.",
|
|
5
|
+
"verification": {
|
|
6
|
+
"levels": ["L0"],
|
|
7
|
+
"commands": [
|
|
8
|
+
"rg 'Understand' .cursor/skills/duaer-do/SKILL.md DUADER.md AGENTS.md",
|
|
9
|
+
"rg 'understand / confirm' .cursor/rules/duaer-spec.mdc .claude/rules/duaer-spec.md"
|
|
10
|
+
],
|
|
11
|
+
"result": "pass",
|
|
12
|
+
"notes": "Methodology/docs only; no runtime suite."
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Feature Specification: Understand gate before implement
|
|
2
|
+
|
|
3
|
+
**Feature Branch**: `feat/understand-gate`
|
|
4
|
+
|
|
5
|
+
**Created**: 2026-09-15
|
|
6
|
+
|
|
7
|
+
**Status**: Active
|
|
8
|
+
|
|
9
|
+
**Input**: User wants casual asks restated and confirmed as precise requirements before coding.
|
|
10
|
+
|
|
11
|
+
## User Scenarios & Testing
|
|
12
|
+
|
|
13
|
+
### User Story 1 - Casual ask gets a restatement first (Priority: P1)
|
|
14
|
+
|
|
15
|
+
A human says something vague (e.g. "消息没回复修好一下"). The digital employee restates a precise Brief (goal / scope / acceptance / out of scope), asks only what blocks precision (or offers recommended defaults), and does **not** start implementation until the human confirms or corrects.
|
|
16
|
+
|
|
17
|
+
**Independent Test**: Read `duaer-do` + DUADER + AGENTS; confirm Understand is required before Work for underspecified asks.
|
|
18
|
+
|
|
19
|
+
**Acceptance Scenarios**:
|
|
20
|
+
|
|
21
|
+
1. **Given** a vague product ask, **When** the agent runs `duaer-do`, **Then** it presents an intent restatement and waits for confirm before implement.
|
|
22
|
+
2. **Given** a clear ask with explicit acceptance (or hot-fix with clear repro), **When** the agent runs `duaer-do`, **Then** it may proceed after a short restatement without a blocking Q&A.
|
|
23
|
+
3. **Given** the human says skip / just do it, **When** noted in the Brief, **Then** implement may proceed with recorded assumption risk.
|
|
24
|
+
|
|
25
|
+
## Requirements
|
|
26
|
+
|
|
27
|
+
- **FR-001**: `duaer-do` MUST include an **Understand** step after Assign (or as part of Assign) and before Break down / Work.
|
|
28
|
+
- **FR-002**: Understand MUST restate: what / why / in-scope / out-of-scope / how we will know it is done.
|
|
29
|
+
- **FR-003**: If the ask is underspecified, the agent MUST wait for human confirmation (or answers to ≤3 blocking questions) before Work.
|
|
30
|
+
- **FR-004**: Confirmed intent MUST be written into the Brief (`spec.md`) before tasks/implement.
|
|
31
|
+
- **FR-005**: Host-facing docs (DUADER, AGENTS autonomous loop, Cursor duaer-spec rule) MUST mention the Understand gate so agents do not skip it.
|
|
32
|
+
- **FR-006**: Deep `/duaer-clarify` remains for post-spec ambiguity; Understand is the lightweight front door for every casual ask.
|
|
33
|
+
|
|
34
|
+
## Success Criteria
|
|
35
|
+
|
|
36
|
+
- **SC-001**: A new agent reading only duaer-do knows not to jump from chat to code without restating and confirming when the ask is vague.
|
|
37
|
+
- **SC-002**: Humans experience "整理需求 → 确认 → 开发" without typing phase names.
|
|
38
|
+
|
|
39
|
+
## Verification
|
|
40
|
+
|
|
41
|
+
- L0: Doc/skill review (this change is methodology text).
|
|
42
|
+
- E2E catalog: update scenario for `duaer-do` Understand gate.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Tasks: Understand gate
|
|
2
|
+
|
|
3
|
+
- [x] T001 Add Understand step to `.cursor/skills/duaer-do/SKILL.md`
|
|
4
|
+
- [x] T002 Update `DUADER.md` agent procedure
|
|
5
|
+
- [x] T003 Update `AGENTS.md` autonomous job loop
|
|
6
|
+
- [x] T004 Update `.cursor/rules/duaer-spec.mdc`
|
|
7
|
+
- [x] T005 Point `duaer-clarify` at Understand as front door
|
|
8
|
+
- [x] T006 Update `docs/agent/e2e-test-plan.md` + `CHANGELOG.md`
|
|
9
|
+
- [x] T007 Stamp delivery.json (L0 doc review)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "accepted",
|
|
3
|
+
"acceptedAt": "2026-09-15T10:30:00.000Z",
|
|
4
|
+
"summary": "现场开发 web: dialogue + four-block confirm + duaer live writes Brief under .duaer/specs.",
|
|
5
|
+
"verification": {
|
|
6
|
+
"levels": ["L0", "L3-smoke"],
|
|
7
|
+
"commands": [
|
|
8
|
+
"curl /api/health",
|
|
9
|
+
"POST /api/confirm → .duaer/specs/00N-*"
|
|
10
|
+
],
|
|
11
|
+
"result": "pass"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Feature Specification: 现场开发 Web(对话确认台)
|
|
2
|
+
|
|
3
|
+
**Feature Branch**: `feat/live-dev`
|
|
4
|
+
|
|
5
|
+
**Created**: 2026-09-15
|
|
6
|
+
|
|
7
|
+
**Status**: Active
|
|
8
|
+
|
|
9
|
+
**Input**: Confirmed — web UI on duaer-spec: multi-round dialogue → four-block confirm → digital employee Brief.
|
|
10
|
+
|
|
11
|
+
## Goal
|
|
12
|
+
|
|
13
|
+
Ship a **网页端「现场开发」** so a human can clarify requirements in chat, confirm a fixed four-block card, then hand off a Duaer Brief for the digital employee to work.
|
|
14
|
+
|
|
15
|
+
## In scope (v1)
|
|
16
|
+
|
|
17
|
+
- Local web page: dialogue + four blocks (要做什么 / 不做什么 / 验收标准 / 假设)
|
|
18
|
+
- Multi-round questions (priority order, one at a time, max 5)
|
|
19
|
+
- Confirm button locks intent and writes `.duaer/specs/<nnn-slug>/` Brief + light tasks + `active-job.json`
|
|
20
|
+
- CLI: `duaer live` (or `npm run live`) serves UI + write API against the **current project**
|
|
21
|
+
- Copyable handoff prompt for the coding agent
|
|
22
|
+
|
|
23
|
+
## Out of scope (v1)
|
|
24
|
+
|
|
25
|
+
- Cloud multi-tenant hosting, billing
|
|
26
|
+
- Full IDE / auto-merge to main
|
|
27
|
+
- Mandatory paid LLM (v1 uses structured questioning; optional later)
|
|
28
|
+
|
|
29
|
+
## Acceptance
|
|
30
|
+
|
|
31
|
+
1. User can open the page, answer rounds, edit the four blocks, and confirm.
|
|
32
|
+
2. Confirm creates Brief files under `.duaer/specs/` without prior implement.
|
|
33
|
+
3. Docs explain how to run `duaer live` from an adopting repo.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Tasks: 003-live-dev-web
|
|
2
|
+
|
|
3
|
+
- [x] T001 Spec + active-job
|
|
4
|
+
- [x] T002 Static UI: chat + four-block card + confirm
|
|
5
|
+
- [x] T003 Node server: serve + POST confirm → Brief
|
|
6
|
+
- [x] T004 `duaer live` CLI + package.json script
|
|
7
|
+
- [x] T005 README note + CHANGELOG
|
|
8
|
+
- [x] T006 Smoke test server + delivery stamp
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "accepted",
|
|
3
|
+
"acceptedAt": "2026-09-15T11:15:00.000Z",
|
|
4
|
+
"verification": {
|
|
5
|
+
"levels": ["L0"],
|
|
6
|
+
"commands": [
|
|
7
|
+
"duaer live config --provider deepseek --api-key sk-test (DUAER_HOME temp)",
|
|
8
|
+
"GET /api/config returns providers including deepseek"
|
|
9
|
+
],
|
|
10
|
+
"result": "pass"
|
|
11
|
+
}
|
|
12
|
+
}
|