duaer-spec 0.12.0 → 0.14.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.
Files changed (119) hide show
  1. package/.claude/rules/agents-workflow.md +3 -1
  2. package/.cursor/rules/agents-workflow.mdc +3 -1
  3. package/.duaer/active-job.json +6 -1
  4. package/.duaer/specs/023-gh-deploy-docs-lang/delivery.json +12 -0
  5. package/.duaer/specs/023-gh-deploy-docs-lang/spec.md +47 -0
  6. package/.duaer/specs/023-gh-deploy-docs-lang/tasks.md +7 -0
  7. package/.duaer/specs/024-live-revise-feedback/delivery.json +12 -0
  8. package/.duaer/specs/024-live-revise-feedback/spec.md +43 -0
  9. package/.duaer/specs/024-live-revise-feedback/tasks.md +6 -0
  10. package/.duaer/specs/025-revise-dialogue-continue/delivery.json +12 -0
  11. package/.duaer/specs/025-revise-dialogue-continue/spec.md +40 -0
  12. package/.duaer/specs/025-revise-dialogue-continue/tasks.md +6 -0
  13. package/.duaer/specs/026-auto-fix-accept/delivery.json +9 -0
  14. package/.duaer/specs/026-auto-fix-accept/spec.md +27 -0
  15. package/.duaer/specs/026-auto-fix-accept/tasks.md +6 -0
  16. package/.duaer/specs/027-duaer-prefix/delivery.json +9 -0
  17. package/.duaer/specs/027-duaer-prefix/spec.md +21 -0
  18. package/.duaer/specs/027-duaer-prefix/tasks.md +4 -0
  19. package/.duaer/specs/028-fix-revise-stuck/delivery.json +9 -0
  20. package/.duaer/specs/028-fix-revise-stuck/spec.md +20 -0
  21. package/.duaer/specs/028-fix-revise-stuck/tasks.md +4 -0
  22. package/.duaer/specs/029-self-update/delivery.json +19 -0
  23. package/.duaer/specs/029-self-update/spec.md +28 -0
  24. package/.duaer/specs/029-self-update/tasks.md +6 -0
  25. package/.duaer/specs/030-revise-card-ui/delivery.json +13 -0
  26. package/.duaer/specs/030-revise-card-ui/spec.md +40 -0
  27. package/.duaer/specs/030-revise-card-ui/tasks.md +5 -0
  28. package/.duaer/specs/031-dispatch-init/delivery.json +13 -0
  29. package/.duaer/specs/031-dispatch-init/spec.md +38 -0
  30. package/.duaer/specs/031-dispatch-init/tasks.md +5 -0
  31. package/.duaer/specs/032-revise-ux/delivery.json +13 -0
  32. package/.duaer/specs/032-revise-ux/spec.md +32 -0
  33. package/.duaer/specs/032-revise-ux/tasks.md +5 -0
  34. package/.duaer/specs/033-agent-detect/delivery.json +13 -0
  35. package/.duaer/specs/033-agent-detect/spec.md +24 -0
  36. package/.duaer/specs/033-agent-detect/tasks.md +4 -0
  37. package/.duaer/specs/034-stale-worktree/delivery.json +15 -0
  38. package/.duaer/specs/034-stale-worktree/spec.md +20 -0
  39. package/.duaer/specs/034-stale-worktree/tasks.md +5 -0
  40. package/.duaer/specs/035-revise-card-below/delivery.json +10 -0
  41. package/.duaer/specs/035-revise-card-below/spec.md +19 -0
  42. package/.duaer/specs/035-revise-card-below/tasks.md +7 -0
  43. package/.duaer/specs/036-progress-cta/delivery.json +10 -0
  44. package/.duaer/specs/036-progress-cta/spec.md +18 -0
  45. package/.duaer/specs/036-progress-cta/tasks.md +5 -0
  46. package/.duaer/specs/037-live-i18n/delivery.json +38 -0
  47. package/.duaer/specs/037-live-i18n/spec.md +43 -0
  48. package/.duaer/specs/037-live-i18n/tasks.md +13 -0
  49. package/.duaer/specs/038-revise-enqueue-style/delivery.json +18 -0
  50. package/.duaer/specs/038-revise-enqueue-style/spec.md +60 -0
  51. package/.duaer/specs/038-revise-enqueue-style/tasks.md +7 -0
  52. package/.duaer/specs/039-desk-scroll-sync/delivery.json +18 -0
  53. package/.duaer/specs/039-desk-scroll-sync/spec.md +65 -0
  54. package/.duaer/specs/039-desk-scroll-sync/tasks.md +6 -0
  55. package/.duaer/specs/040-terminal-queue-wait/active-job.json +12 -0
  56. package/.duaer/specs/040-terminal-queue-wait/delivery.json +26 -0
  57. package/.duaer/specs/040-terminal-queue-wait/spec.md +85 -0
  58. package/.duaer/specs/040-terminal-queue-wait/tasks.md +6 -0
  59. package/.duaer/specs/041-desk-wide-queue/delivery.json +18 -0
  60. package/.duaer/specs/041-desk-wide-queue/spec.md +74 -0
  61. package/.duaer/specs/041-desk-wide-queue/tasks.md +6 -0
  62. package/.duaer/specs/042-progress-style/delivery.json +17 -0
  63. package/.duaer/specs/042-progress-style/spec.md +48 -0
  64. package/.duaer/specs/042-progress-style/tasks.md +6 -0
  65. package/.duaer/specs/043-live-history/active-job.json +12 -0
  66. package/.duaer/specs/043-live-history/delivery.json +21 -0
  67. package/.duaer/specs/043-live-history/spec.md +41 -0
  68. package/.duaer/specs/043-live-history/tasks.md +7 -0
  69. package/.duaer/specs/044-desk-layout/delivery.json +18 -0
  70. package/.duaer/specs/044-desk-layout/spec.md +60 -0
  71. package/.duaer/specs/044-desk-layout/tasks.md +7 -0
  72. package/.duaer/specs/045-revise-hang/delivery.json +40 -0
  73. package/.duaer/specs/045-revise-hang/spec.md +50 -0
  74. package/.duaer/specs/045-revise-hang/tasks.md +10 -0
  75. package/.duaer/specs/046-revise-stuck/delivery.json +9 -0
  76. package/.duaer/specs/046-revise-stuck/spec.md +59 -0
  77. package/.duaer/specs/046-revise-stuck/tasks.md +9 -0
  78. package/.duaer/specs/047-revise-preempt-kill/active-job.json +6 -0
  79. package/.duaer/specs/047-revise-preempt-kill/delivery.json +13 -0
  80. package/.duaer/specs/047-revise-preempt-kill/spec.md +53 -0
  81. package/.duaer/specs/047-revise-preempt-kill/tasks.md +6 -0
  82. package/.duaer/specs/048-progress-below/active-job.json +6 -0
  83. package/.duaer/specs/048-progress-below/delivery.json +8 -0
  84. package/.duaer/specs/048-progress-below/spec.md +44 -0
  85. package/.duaer/specs/048-progress-below/tasks.md +8 -0
  86. package/.duaer/specs/049-progress-column/active-job.json +6 -0
  87. package/.duaer/specs/049-progress-column/delivery.json +8 -0
  88. package/.duaer/specs/049-progress-column/spec.md +50 -0
  89. package/.duaer/specs/049-progress-column/tasks.md +7 -0
  90. package/.duaer/specs/050-validate-before-confirm/delivery.json +8 -0
  91. package/.duaer/specs/050-validate-before-confirm/spec.md +64 -0
  92. package/.duaer/specs/050-validate-before-confirm/tasks.md +16 -0
  93. package/.duaer/specs/051-confirm-wide-structured/delivery.json +8 -0
  94. package/.duaer/specs/051-confirm-wide-structured/spec.md +49 -0
  95. package/.duaer/specs/051-confirm-wide-structured/tasks.md +11 -0
  96. package/.duaer/specs/052-desk-fullscreen/delivery.json +8 -0
  97. package/.duaer/specs/052-desk-fullscreen/spec.md +37 -0
  98. package/.duaer/specs/052-desk-fullscreen/tasks.md +9 -0
  99. package/.duaer/specs/053-release-014/delivery.json +8 -0
  100. package/.duaer/specs/053-release-014/spec.md +36 -0
  101. package/.duaer/specs/053-release-014/tasks.md +9 -0
  102. package/.duaer/templates/deploy-github-pages.yml +43 -0
  103. package/ADOPT.md +11 -0
  104. package/AGENTS.md +14 -2
  105. package/CHANGELOG.md +109 -6
  106. package/README.md +22 -5
  107. package/README.zh-CN.md +22 -4
  108. package/bin/duaer-live.mjs +2026 -246
  109. package/bin/duaer.mjs +36 -3
  110. package/bin/update-check.mjs +202 -0
  111. package/docs/agent/README.md +1 -0
  112. package/docs/agent/branching-and-release.md +10 -2
  113. package/docs/agent/deploy-github.md +62 -0
  114. package/docs/agent/e2e-test-plan.md +49 -2
  115. package/package.json +1 -1
  116. package/web/live-dev/app.js +1791 -172
  117. package/web/live-dev/i18n.js +545 -0
  118. package/web/live-dev/index.html +199 -113
  119. package/web/live-dev/styles.css +608 -65
@@ -45,8 +45,10 @@ cd .worktree/feat-login
45
45
  - Merge into **`develop`** when done (hotfix: **`main`**, then back-merge **`develop`**)
46
46
  - **Handoff (mandatory):** stop worktree-bound processes → remove `.worktree/<id>` →
47
47
  restart from primary checkout on `develop` (`duaer handoff [--run]`, `.duaer/handoff.json`)
48
- - Push only when the user explicitly asks
48
+ - Push only when the user explicitly asks (a deploy/hosting ask authorizes
49
+ the `gh` + push needed for that publish — see `docs/agent/deploy-github.md`)
49
50
  - Promote **`develop` → `main`** only when the user asks to go online
51
+ - English docs: no Chinese (CJK); Chinese docs may include English terms
50
52
 
51
53
  ## GitHub issue / PR intake
52
54
 
@@ -48,8 +48,10 @@ cd .worktree/feat-login
48
48
  - Merge into **`develop`** when done (hotfix: **`main`**, then back-merge **`develop`**)
49
49
  - **Handoff (mandatory):** stop worktree-bound processes → remove `.worktree/<id>` →
50
50
  restart from primary checkout on `develop` (`duaer handoff [--run]`, `.duaer/handoff.json`)
51
- - Push only when the user explicitly asks
51
+ - Push only when the user explicitly asks (a deploy/hosting ask authorizes
52
+ the `gh` + push needed for that publish — see `docs/agent/deploy-github.md`)
52
53
  - Promote **`develop` → `main`** only when the user asks to go online
54
+ - English docs: no Chinese (CJK); Chinese docs may include English terms
53
55
 
54
56
  ## GitHub issue / PR intake
55
57
 
@@ -1 +1,6 @@
1
- {"specDir":".duaer/specs/022-live-preview-link","branch":"feat/live-preview-link","startedAt":"2026-09-16T02:00:00.000Z"}
1
+ {
2
+ "featureDir": ".duaer/specs/053-release-014",
3
+ "branch": "feat/release-014",
4
+ "worktree": ".worktree/feat-release-014",
5
+ "status": "active"
6
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T02:20:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0"],
6
+ "commands": [
7
+ "node --check bin/duaer-live.mjs",
8
+ "rg -n '[\\p{Han}]' README.md CHANGELOG.md AGENTS.md docs/agent docs/npm-trusted-publishing.md docs/adr (expect empty)"
9
+ ],
10
+ "result": "pass"
11
+ }
12
+ }
@@ -0,0 +1,47 @@
1
+ # Feature Specification: GitHub CLI deploy + English docs language
2
+
3
+ **Feature Branch**: `feat/gh-deploy`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Accepted
8
+
9
+ ## Goal
10
+
11
+ When a product job needs hosting/deploy, digital employees use **GitHub CLI
12
+ (`gh`) + GitHub Actions** as the default automation path (not third-party
13
+ host CLIs). English documentation must not contain Chinese characters;
14
+ Chinese docs may include English terms.
15
+
16
+ ## In scope
17
+
18
+ - Live dispatch: detect deploy need from Brief text; add tasks + agent prompt
19
+ rules for `gh` / Actions / Pages
20
+ - Template workflow adopters/agents can copy
21
+ - Agent-ops + README (EN/ZH) document the policy
22
+ - Scrub Chinese from English tracked docs (`README.md`, `CHANGELOG.md`,
23
+ `docs/agent/*`, etc.)
24
+
25
+ ## Out of scope
26
+
27
+ - Rewriting Chinese Live Dev UI copy to English
28
+ - Non-GitHub cloud vendors as first-class defaults
29
+ - Auto-push without an explicit deploy/ship ask in the job
30
+
31
+ ## Acceptance
32
+
33
+ 1. Deploy-needed live jobs get an extra task and prompt block pointing to
34
+ `gh` + Actions (Pages template available under `.duaer/templates/`)
35
+ 2. `docs/agent/deploy-github.md` exists (English only) and is linked from
36
+ branching/README
37
+ 3. English docs contain no CJK characters
38
+ 4. Chinese README documents the same deploy preference (may use English
39
+ tool names)
40
+ 5. E2E catalog lists the deploy policy scenario
41
+
42
+ ## Assumptions
43
+
44
+ - “Needs deploy” includes 部署 / host / publish / Pages / go online for a
45
+ user-facing site or app artifact
46
+ - User asking for a deployable site authorizes `gh` setup and the push
47
+ required to publish that deployment
@@ -0,0 +1,7 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Spec + active-job
4
+ - [x] T002 Live dispatch: needsDeploy → tasks + prompt; Pages workflow template
5
+ - [x] T003 Docs: deploy-github.md, AGENTS/README EN+ZH, scrub CJK from English docs
6
+ - [x] T004 E2E catalog + CHANGELOG Unreleased
7
+ - [x] T005 Verify (docs + static checks) and accept
@@ -0,0 +1,12 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T02:30:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0"],
6
+ "commands": [
7
+ "node --check bin/duaer-live.mjs",
8
+ "rg revise README.md / api / UI"
9
+ ],
10
+ "result": "pass"
11
+ }
12
+ }
@@ -0,0 +1,43 @@
1
+ # Feature Specification: Live revise after preview feedback
2
+
3
+ **Feature Branch**: `feat/live-revise`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Accepted
8
+
9
+ ## Goal
10
+
11
+ After the user opens the finished product and is not satisfied, they can give
12
+ feedback on the live desk; the system understands the ask and relaunches the
13
+ digital employee on the **same** product worktree to improve.
14
+
15
+ ## In scope
16
+
17
+ - UI after `delivery.json` accepted: feedback box +「继续改进」
18
+ - `POST /api/revise`: append revision to product Brief/tasks, reopen delivery,
19
+ relaunch CLI agent (same worktree)
20
+ - Optional light restatement of feedback into the Brief
21
+ - Resume progress polling after revise
22
+ - Docs (EN no CJK) + E2E scenario
23
+
24
+ ## Out of scope
25
+
26
+ - Creating a brand-new worktree for every revision
27
+ - Changing the original confirm-card flow before first dispatch
28
+ - Automatic satisfaction scoring
29
+
30
+ ## Acceptance
31
+
32
+ 1. When status is accepted and preview is shown (or missing), revise panel is
33
+ visible
34
+ 2. Submitting non-empty feedback calls `/api/revise`, updates product
35
+ `spec.md` / `tasks.md`, sets delivery back to open (not accepted)
36
+ 3. Agent Terminal relaunches with a revise prompt that cites the feedback
37
+ 4. Status poll resumes until the next accept
38
+ 5. English docs mention the revise loop without CJK
39
+
40
+ ## Assumptions
41
+
42
+ - Same `dispatch.worktreePath` / Brief folder is reused
43
+ - User feedback authorizes another agent run (not a remote push by itself)
@@ -0,0 +1,6 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Spec + active-job
4
+ - [x] T002 `reviseDispatchedJob` + `POST /api/revise`
5
+ - [x] T003 Live UI feedback panel + poll resume
6
+ - [x] T004 Docs + E2E + CHANGELOG; verify; accept
@@ -0,0 +1,12 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T02:50:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0"],
6
+ "commands": [
7
+ "node --check bin/duaer-live.mjs",
8
+ "rg --continue bin/duaer-live.mjs"
9
+ ],
10
+ "result": "pass"
11
+ }
12
+ }
@@ -0,0 +1,40 @@
1
+ # Feature Specification: Revise via dialogue + agent --continue
2
+
3
+ **Feature Branch**: `feat/revise-dialogue`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Accepted
8
+
9
+ ## Goal
10
+
11
+ After preview, users start「继续改进」and clarify dissatisfaction in the **left
12
+ chat** (why / what to change). Only after the revise card is confirmed does the
13
+ desk dispatch. Revise launches reuse Cursor Agent / Claude **`--continue`** so
14
+ the Terminal session keeps working on the same job.
15
+
16
+ ## In scope
17
+
18
+ - Enter revise mode from a single button; freeform one-shot dispatch removed
19
+ - `/api/chat` mode `revise` with multi-turn understand
20
+ - Confirm card becomes revise card; confirm triggers `/api/revise`
21
+ - `launchAgent({ continueSession: true })` → `agent --continue` / `claude --continue`
22
+ - Docs EN/ZH (no CJK in EN)
23
+
24
+ ## Out of scope
25
+
26
+ - Injecting keystrokes into an already-open Terminal TTY
27
+ - Resuming a specific chatId UI picker
28
+
29
+ ## Acceptance
30
+
31
+ 1. After accept,「继续改进」opens left dialogue; no immediate dispatch
32
+ 2. Chat asks about reasons / desired change; revise card fills until ready
33
+ 3. Only「改进方案确认,再派一版」calls revise + Terminal relaunch
34
+ 4. Revise Terminal command includes `--continue` for Cursor Agent and Claude
35
+ 5. English docs mention continue-session revise without CJK
36
+
37
+ ## Assumptions
38
+
39
+ - `--continue` uses the latest session for that worktree/cwd
40
+ - If continue fails (no prior session), agent still runs with the new prompt
@@ -0,0 +1,6 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Spec + active-job
4
+ - [x] T002 Chat mode revise + revise card confirm → /api/revise
5
+ - [x] T003 launchAgent continueSession (--continue)
6
+ - [x] T004 UI enter revise mode; docs; verify; accept
@@ -0,0 +1,9 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T03:00:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0"],
6
+ "commands": ["node --check bin/duaer-live.mjs"],
7
+ "result": "pass"
8
+ }
9
+ }
@@ -0,0 +1,27 @@
1
+ # Feature Specification: Auto-fix button on accept failure
2
+
3
+ **Feature Branch**: `feat/auto-fix-accept`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ When confirm auto-accept fails (`自动验收未通过`), show an **自动修正** button
12
+ on that bot message. Clicking it asks the model to fix the confirm card from
13
+ the listed issues, then re-runs accept (and on success continues to dispatch
14
+ as usual).
15
+
16
+ ## Acceptance
17
+
18
+ 1. Failed `/api/confirm` bubble includes an 自动修正 action button
19
+ 2. Click calls `/api/confirm/fix` with card + issues
20
+ 3. Fixed fields apply to the card; if accept passes, same success path as
21
+ normal confirm (Brief + dispatch panel)
22
+ 4. If still failing, show issues again with another 自动修正 button
23
+
24
+ ## Out of scope
25
+
26
+ - Revise-card flow
27
+ - Silent fix without a button
@@ -0,0 +1,6 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Spec
4
+ - [x] T002 `/api/confirm/fix` + FIX prompt
5
+ - [x] T003 UI action button on accept failure
6
+ - [x] T004 Docs/CHANGELOG; accept; merge
@@ -0,0 +1,9 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T03:10:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0"],
6
+ "commands": ["node --check bin/duaer-live.mjs", "rg Duaer web/live-dev bin/duaer-live.mjs"],
7
+ "result": "pass"
8
+ }
9
+ }
@@ -0,0 +1,21 @@
1
+ # Feature Specification: Start command prefix Duaer
2
+
3
+ **Feature Branch**: `feat/duaer-prefix`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ Live desk start-command / agent-prompt prefix is **`Duaer`**, not `Agent`.
12
+
13
+ ## Acceptance
14
+
15
+ 1. UI label/placeholder and default start command use `Duaer`
16
+ 2. Server dispatch/revise enforce `/^Duaer\b/`; legacy `Agent` prefix is rewritten to `Duaer`
17
+ 3. README EN/ZH and CHANGELOG mention `Duaer` prefix (EN docs no CJK)
18
+
19
+ ## Out of scope
20
+
21
+ - Renaming Cursor Agent product labels
@@ -0,0 +1,4 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Change prefix Agent → Duaer (UI + server + docs)
4
+ - [x] T002 Accept + merge
@@ -0,0 +1,9 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T03:20:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0"],
6
+ "commands": ["node --check bin/duaer-live.mjs"],
7
+ "result": "pass"
8
+ }
9
+ }
@@ -0,0 +1,20 @@
1
+ # Feature Specification: Fix stuck revise UI
2
+
3
+ **Feature Branch**: `fix/revise-stuck`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Accepted
8
+
9
+ ## Goal
10
+
11
+ Revise mode must show clear motion: auto-start left-chat questions, no stuck
12
+ 「正在左侧对话改进…」label, and a visible **再派一版** button in the revise
13
+ panel (not only the far confirm card).
14
+
15
+ ## Acceptance
16
+
17
+ 1. Entering revise kicks off an assistant question immediately
18
+ 2. Revise panel shows status + **再派一版** when card ready; no fake loading label
19
+ 3. Re-clicking enter revise does not wipe an in-progress revise chat
20
+ 4. Confirm-card and revise-panel CTAs both dispatch revise
@@ -0,0 +1,4 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Auto kickoff + revise panel CTA + no stuck label
4
+ - [x] T002 Accept + merge + restart live
@@ -0,0 +1,19 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T03:10:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0", "L1-smoke", "L3-catalog"],
6
+ "commands": [
7
+ "node --check bin/update-check.mjs",
8
+ "node --check bin/duaer.mjs",
9
+ "node --check bin/duaer-live.mjs",
10
+ "DUAER_NO_UPDATE_CHECK=1 node bin/duaer.mjs version",
11
+ "cmpSemver / formatUpdateHint unit smoke",
12
+ "curl /api/health → update.outdated + versions",
13
+ "rg CJK scrub on EN docs (CHANGELOG fixed)"
14
+ ],
15
+ "result": "pass",
16
+ "e2e": ["E2E-030"]
17
+ },
18
+ "notes": "Prompt-only update check; self-update is explicit. Product repos still use npx duaer-spec update."
19
+ }
@@ -0,0 +1,28 @@
1
+ # Feature Specification: CLI update check + self-update
2
+
3
+ **Feature Branch**: `feat/self-update`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ When a newer `duaer-spec` is on npm, the CLI (and live desk) **notifies** the
12
+ user. `duaer self-update` upgrades the global CLI. Default is prompt-only —
13
+ no silent global install.
14
+
15
+ ## In scope
16
+
17
+ - Shared update-check (npm registry, 24h cache under `~/.duaer/`)
18
+ - Print hint on `duaer live` / common commands; `DUAER_NO_UPDATE_CHECK=1` skips
19
+ - `duaer self-update` → `npm i -g duaer-spec@latest`
20
+ - Live `/api/health` + small UI notice when outdated
21
+ - Docs EN/ZH (EN no CJK)
22
+
23
+ ## Acceptance
24
+
25
+ 1. Outdated install prints a one-line upgrade hint (cached ≤24h)
26
+ 2. `duaer self-update` runs global npm install of latest
27
+ 3. Live health exposes `update.outdated` / versions; UI shows a short notice
28
+ 4. Env `DUAER_NO_UPDATE_CHECK=1` disables the check
@@ -0,0 +1,6 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Shared update-check module
4
+ - [x] T002 `duaer self-update` + startup hints
5
+ - [x] T003 Live health + UI notice
6
+ - [x] T004 Docs; accept; merge
@@ -0,0 +1,13 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T03:20:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0", "L3-catalog"],
6
+ "commands": [
7
+ "node --check web/live-dev/app.js",
8
+ "rg no stale 正在对话或续派 / exitReviseMode"
9
+ ],
10
+ "result": "pass",
11
+ "e2e": ["E2E-031"]
12
+ }
13
+ }
@@ -0,0 +1,40 @@
1
+ # Feature Specification: Revise card stays visible after dispatch
2
+
3
+ **Feature Branch**: `fix/revise-card-ui`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ After the user confirms a revision and dispatch succeeds, the right-hand card
12
+ keeps showing that revision (like the confirm card after first accept). Chat
13
+ busy must not look like "续派中".
14
+
15
+ ## Problem
16
+
17
+ 1. UI stuck on「正在对话或续派,请稍候…」/「续派中…」even after dispatch
18
+ 2. After dispatch, chrome falls back to confirm/specify ("继续收集需求") so the
19
+ confirmed revision is no longer visible as an improve card
20
+ 3. Users need the right panel to show this round's confirmed improve fields
21
+
22
+ ## In scope
23
+
24
+ - Separate chat busy vs revise-dispatch busy for button/hint copy
25
+ - After successful `/api/revise`: keep right card as locked 改进卡 with the
26
+ confirmed fields; CTA "已续派";「继续改进」starts a new round
27
+ - Do not reset to specify confirm-card chrome on revise success
28
+ - E2E catalog note
29
+
30
+ ## Out of scope
31
+
32
+ - Changing Terminal `--continue` launch
33
+ - Redesigning dispatch progress polling
34
+
35
+ ## Acceptance
36
+
37
+ 1. During left-chat only: hints say dialogue in progress, not「续派中」
38
+ 2. During revise POST: show「续派中…」; after success clear it
39
+ 3. After success, right card remains 改进卡 with locked confirmed values
40
+ 4.「继续改进(左侧对话)」available for another round; entering clears for new card
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Split chat/dispatch busy; fix revise hints
4
+ - [x] T002 Keep locked 改进卡 after revise success
5
+ - [x] T003 Docs E2E + accept + merge + restart live
@@ -0,0 +1,13 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T03:35:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0", "L1-smoke", "L3-catalog"],
6
+ "commands": [
7
+ "node --check bin/duaer-live.mjs",
8
+ "duaer-live.mjs repo add <empty-dir> → git init + AGENTS.md/.duaer (SMOKE_OK)"
9
+ ],
10
+ "result": "pass",
11
+ "e2e": ["E2E-032"]
12
+ }
13
+ }
@@ -0,0 +1,38 @@
1
+ # Feature Specification: Init Duaer in the chosen product directory
2
+
3
+ **Feature Branch**: `fix/dispatch-init`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ When the user picks a product directory for live dispatch, install/init Duaer
12
+ **in that directory** (and the created worktree). Do not redirect to another
13
+ repo or leave the agent to hunt for Duaer elsewhere.
14
+
15
+ ## Problem
16
+
17
+ User selected a folder; it had no Duaer install; the flow “went looking”
18
+ elsewhere (child git repo or agent search) instead of initializing in place.
19
+
20
+ ## In scope
21
+
22
+ - Dispatch uses the chosen path (no silent single-child repo redirect)
23
+ - Auto `git init` + `duaer init --here` in the chosen dir when needed
24
+ - After worktree create: ensure Duaer is installed inside the worktree too
25
+ - Agent prompt: work only here; Duaer already installed; do not search other trees
26
+ - Browse/remember path: same ensure when registering a repo
27
+
28
+ ## Out of scope
29
+
30
+ - Changing npm global self-update
31
+ - Forcing commit of init files onto develop
32
+
33
+ ## Acceptance
34
+
35
+ 1. Dispatch to empty/non-duaer folder installs Duaer under that path
36
+ 2. Worktree contains AGENTS.md / `.duaer/` before agent launch
37
+ 3. Choosing a parent with one child git repo no longer silently switches; init stays on chosen path (or clear error)
38
+ 4. Docs/E2E note
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ - [x] T001 exact-path probe + ensureDuaerInstalled
4
+ - [x] T002 wire dispatch + repo remember; prompt text
5
+ - [x] T003 verify smoke; docs; accept; merge; restart live
@@ -0,0 +1,13 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T03:50:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0", "L3-catalog"],
6
+ "commands": [
7
+ "node --check bin/duaer-live.mjs",
8
+ "manual: Terminal reuse via .duaer/live-terminal queue"
9
+ ],
10
+ "result": "pass",
11
+ "e2e": ["E2E-033"]
12
+ }
13
+ }
@@ -0,0 +1,32 @@
1
+ # Feature Specification: Revise UX — brief visible, preview, Terminal reuse
2
+
3
+ **Feature Branch**: `fix/revise-ux`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ 1.「再改一版」must not bury the original requirements; keep original Brief visible
12
+ 2. After dispatch / revise, user can always open the (updated) product preview
13
+ 3. Reuse one Terminal window per worktree for follow-up tasks instead of opening many
14
+
15
+ ## In scope
16
+
17
+ - Show compact「原始需求」when in revise / revise-locked chrome
18
+ - Soften revise CTA: show only when delivery accepted; secondary style
19
+ - Preview: keep serving last preview during revising (do not drop delivery.preview)
20
+ - Terminal task queue under worktree `.duaer/live-terminal/`; enqueue revise into same runner
21
+
22
+ ## Out of scope
23
+
24
+ - Cross-machine Terminal remoting
25
+ - Changing agent CLI flags beyond queue wrapping
26
+
27
+ ## Acceptance
28
+
29
+ 1. Original goal/acceptance remain readable while「再改一版」is available
30
+ 2. Preview link stays usable after accept and during/after revise when artifact exists
31
+ 3. Second revise enqueue does not `open` a new Terminal if runner PID is alive
32
+ 4. E2E catalog updated
@@ -0,0 +1,5 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Terminal queue reuse in launchInTerminal / launchAgent
4
+ - [x] T002 Preview kept during revise; original brief UI + softer CTA
5
+ - [x] T003 Docs accept merge restart
@@ -0,0 +1,13 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T04:15:00.000Z",
4
+ "verification": {
5
+ "levels": ["docs", "L0", "L3-catalog"],
6
+ "commands": [
7
+ "node --check bin/duaer-live.mjs",
8
+ "PATH=/usr/bin:/bin node -e detectAgents smoke"
9
+ ],
10
+ "result": "pass",
11
+ "e2e": ["E2E-034"]
12
+ }
13
+ }
@@ -0,0 +1,24 @@
1
+ # Feature Specification: Detect CLI agents under launchd PATH
2
+
3
+ **Feature Branch**: `fix/agent-detect`
4
+
5
+ **Created**: 2026-09-16
6
+
7
+ **Status**: Active
8
+
9
+ ## Goal
10
+
11
+ Live desk must detect installed Cursor Agent / Claude Code even when started
12
+ via LaunchAgent (minimal PATH).
13
+
14
+ ## Problem
15
+
16
+ LaunchAgent PATH is `/usr/bin:/bin:/usr/sbin:/sbin`, so `which agent|claude`
17
+ fails even though `~/.local/bin` and `/usr/local/bin` have the CLIs.
18
+
19
+ ## Acceptance
20
+
21
+ 1. `ensureCliSearchPath` prepends `~/.local/bin`, `/usr/local/bin`, `/opt/homebrew/bin`
22
+ 2. `whichCmd` falls back to those dirs if `which` misses
23
+ 3. `/api/agents` reports installed agents when binaries exist there
24
+ 4. LaunchAgent plist PATH updated (local handoff) after merge
@@ -0,0 +1,4 @@
1
+ # Tasks
2
+
3
+ - [x] T001 Expand PATH + whichCmd fallback
4
+ - [x] T002 Docs; accept; merge; reload LaunchAgent
@@ -0,0 +1,15 @@
1
+ {
2
+ "status": "accepted",
3
+ "acceptedAt": "2026-09-16T04:28:30.000Z",
4
+ "summary": "Live desk recovers Brief/status from product primary after worktree handoff cleanup; revise recreates worktree instead of failing.",
5
+ "verification": {
6
+ "levels": ["docs", "L0", "L1-smoke", "L3-catalog"],
7
+ "commands": [
8
+ "/usr/local/bin/node --check bin/duaer-live.mjs",
9
+ "curl -s 'http://127.0.0.1:8792/api/status?jobId=024-job-3l9xtu'"
10
+ ],
11
+ "result": "pass",
12
+ "e2e": ["E2E-035"],
13
+ "notes": "Smoke: status=accepted, delivery.status=accepted, canRevise=true, handoffCleaned=true, worktreeExists=false, featureDir=/Users/morgan/autotest/.duaer/specs/034-job-3l9xtu, resolvedFrom=primary. LaunchAgent 8787 reloaded after merge."
14
+ }
15
+ }