# AgentTeams v0.1.14

This release adds a review-first team workflow, stronger delivery gates, and safer controls for long-running AgentTeams sessions.

## New

- **Review plans before execution**: normal `/agent-teams` runs now stage the roster and task DAG without creating members or scheduling work. Reviewers can edit members, prompts, models, reasoning levels, tasks, and dependencies before launch.
- **Native model routing**: the plan editor uses Harness's provider/model catalog and reasoning metadata instead of maintaining a separate handwritten model list.
- **Captain-designed teams and stop controls**: profiles can let the Captain design the task graph for the real workspace, while running teams expose a dedicated, confirmed stop action in the activity panel.
- **Quality delivery gates**: optional requirements, implementation, verification, independent review, repair, re-review, and integration contracts keep downstream work blocked until evidence is accepted.

## Fixed & Improved

- **Atomic approval**: every member route is validated before any child session is created, preventing a bad model choice from leaving a partially started team.
- **Return to chat and revise**: returning from review cancels the planning turn, asks one focused question, and applies the answer to the same draft with one atomic plan edit before requesting review again.
- **Discard really stops planning**: discarding archives the draft, aborts an active Captain turn, and injects authoritative context that prevents the model from silently recreating the team.
- **Responsive review actions**: decision controls respond to the activity panel's own width, so approve, revise, and discard remain aligned even when the panel is narrow.
- **Safer recovery and takeover**: abandoned Captain-owned tasks return to the scheduler without allowing stale attempts to overwrite newer work.
- **More stable panel state**: restored activity panels preserve their collapsed state and retain complete staged, running, stopped, and archived histories.

## Verification

- Passed TypeScript checks, production builds, offline verification, lifecycle verification, quality-gate TDD, the complex stress suite, and package dry-run checks.
- Exercised the staged-plan workflow in the real Harness Web UI with DeepSeek-V4-Flash / High: native model routing, narrow-panel layout, return-to-chat revision, atomic plan editing, discard cancellation, archive state, and ordinary chat after discard all passed.
- Verified that discarding while the Captain was still planning stopped the active generation immediately and did not recreate the team.

## Installation

```sh
dsh plugin --profile web add @nanmicoder/dsh-agent-teams
```

<details>
<summary><b>中文版本 / Chinese Version</b></summary>

# AgentTeams v0.1.14

本次更新加入执行前审查流程、更强的交付质量门禁，以及更安全的长任务控制。

## 新功能

- **执行前审查计划**：普通 `/agent-teams` 会先生成可编辑的成员阵容和任务 DAG，不创建成员、不调度任务。启动前可调整成员、提示词、模型、推理等级、任务和依赖。
- **复用 Harness 模型路由**：计划编辑器直接使用 Harness 的 Provider、模型目录和推理等级元数据，不再维护另一份手写模型列表。
- **队长规划与团队停止**：profile 可让队长根据真实 workspace 设计任务图；运行中的团队可从活动面板执行带确认的停止操作。
- **交付质量门禁**：可选的需求、实现、验证、独立审查、修复、复审和集成合同，会在证据验收前持续阻断下游任务。

## 修复与改进

- **原子启动校验**：创建任何子会话之前先校验全部成员模型路由，避免错误模型造成“半支团队”。
- **返回对话修改**：返回聊天会取消当前规划轮次，只追问一个修改问题；用户回复后通过一次原子计划编辑更新同一份草案，再次等待审查。
- **放弃后真正停止**：放弃计划会归档草案、中止仍在运行的队长轮次，并注入禁止静默重建团队的权威上下文。
- **窄面板操作稳定**：操作区根据活动面板自身宽度响应，面板再窄也不会让确认、修改和放弃按钮错位重叠。
- **更安全的恢复与接管**：被遗留的队长任务会安全回到调度器，旧 attempt 不能覆盖较新的执行结果。
- **面板状态更稳定**：恢复后的活动面板保持折叠状态，并完整保留待审、运行、停止和归档历史。

## 验证

- 通过 TypeScript 检查、生产构建、离线验证、生命周期验证、质量门禁 TDD、复杂压力测试和 npm 包 dry-run。
- 在真实 Harness Web UI 中使用 DeepSeek-V4-Flash / High 完成执行前计划回归：原生模型路由、窄面板、返回对话、原子修改、放弃取消、归档状态及放弃后的普通聊天均通过。
- 验证队长仍在规划时放弃：生成立即停止，团队不会被重新创建。

## 安装

```sh
dsh plugin --profile web add @nanmicoder/dsh-agent-teams
```

</details>
