# smart-commit-host-agent 实现路线图

> 对应规格：`docs/superpowers/specs/2026-08-10-host-agent-design.md`  
> 参考实现（只读）：`/Users/nietao/VSCode-plugins/smart-commit-cli` @ `0.1.21`（以当时 `package.json` 为准，实现时再核对）

## 为何拆分

规格要求 **CLI 全量命令对等** + turn 协议 + skill 迁移。单计划会过大且无法逐步交付可测软件。按可独立验收的垂直切片拆分：

| 计划 | 交付物 | 验收 |
|------|--------|------|
| **[Plan 1](./2026-08-10-host-agent-foundation.md)** | 包脚手架、Turn session、无 LLM 的 `config resolve`、CLI 入口与退出码 | `npm test` 绿；`config resolve` 不要求 apiKey |
| **[Plan 2](./2026-08-10-host-agent-bridge-review-only.md)** | `bridge --review-only`（审查 turn + 解析/阈值，不 commit） | fixture response 可跑通 blocked/passed |
| **[Plan 3](./2026-08-11-host-agent-bridge-full.md)** | 完整 `bridge`（commit message turn、git commit/push、断点续建用的状态字段） | review-only + 提 MR 主路径（可先 mock GitLab） |
| **[Plan 4](./2026-08-11-host-agent-plan4-skill-commands.md)** | `pull-request create` / `pull-request review` / `commit-message generate` | 与 skill 三种模式对齐（平台 API 仍 mock/fixture） |
| **[Plan 5](./2026-08-11-host-agent-plan5-platform-api.md)** | 真 GitLab/GitHub API；`schema print`；`my-pull-request list`；更新 `bugfix-gitlab-mr-qax` | skill 零 LLM 配置可用；矩阵覆盖 skill 主路径 |
| **[Plan 6](./2026-08-12-host-agent-plan6-deferred-parity.md)** | review 写操作；`my-pull-request batch-review`；`report generate` | 延期项对齐；矩阵 §4 不再「未跟进」 |

## 全局约束（所有计划）

- **禁止** 修改 `/Users/nietao/VSCode-plugins/smart-commit-cli`
- **禁止** 抽共享模块；对照移植，注明参考文件路径
- **禁止** host-agent 内调用外部 LLM HTTP API
- 锚定：`peerReference.cliVersion` 写入 `package.json`
- TDD：先红后绿；每任务结束 commit

## 当前执行

Plan 1–6 均已完成。延期列表已清空。有意保留的差距见 [parity-matrix.md](../../parity-matrix.md)（无 chunked/hybrid/correction；零 LLM HTTP）。

## Plan 6 status: complete

- **Date:** 2026-08-12
- **Branch:** `feature/plan6-deferred-parity`
- **详细计划:** [2026-08-12-host-agent-plan6-deferred-parity.md](./2026-08-12-host-agent-plan6-deferred-parity.md)
- **设计:** [2026-08-12-host-agent-plan6-deferred-parity-design.md](../specs/2026-08-12-host-agent-plan6-deferred-parity-design.md)
- **已完成:** `pull-request review` summary/inline/approve/merge；`my-pull-request batch-review`；`report generate`（本地 + AI turns）
- **延期列表:** 无（已清空）

## Plan 5 status: complete (skill path)

- **Date:** 2026-08-11
- **详细计划:** [2026-08-11-host-agent-plan5-platform-api.md](./2026-08-11-host-agent-plan5-platform-api.md)
- **已完成:** HTTP foundation；`pull-request review` API fetch；`pull-request create` / `bridge` 真平台 create；`schema print`；`my-pull-request list`；`bugfix-gitlab-mr-qax` → host-agent
- **曾延期（已由 Plan 6 完成）:** `my-pull-request batch-review`；`report generate`；review 评论/approve/merge 发布

## Plan 4 status: complete

- **Date:** 2026-08-11
- **Branch:** `feature/plan4-skill-commands`
- **详细计划:** [2026-08-11-host-agent-plan4-skill-commands.md](./2026-08-11-host-agent-plan4-skill-commands.md)
- **验收:** `commit-message generate` / `pull-request create`（mock）/ `pull-request review`（`--fixture-pr`）fixture 路径跑通；真 GitHub/GitLab HTTP 仍延期 Plan 5

## Plan 3 status: complete

- **Date:** 2026-08-11
- **Branch:** `feature/plan3-bridge-full`
- **详细计划:** [2026-08-11-host-agent-bridge-full.md](./2026-08-11-host-agent-bridge-full.md)
- **验收:** fixture 多 turn 跑通 commit-message → review → commit/push；mock GitLab `pullRequestCreation.created`；`--review-only` 仍可用

## Plan 2 status: complete

- **Date:** 2026-08-10
- **Branch:** `feature/plan2-bridge-review-only`
- **验收:** fixture response 跑通 `needs_host_agent` → `passed` / `blocked`；不 commit/push

## Plan 1 status: complete

- **Date:** 2026-08-10
- **Branch:** `feature/plan1-foundation`
- **Release:** `0.1.0`（对齐 `smart-commit-copilot-cli@0.1.21`）
- **验收:** `npm test` 14/14 pass；`config resolve` 无 LLM 依赖
- **发版材料:** [CHANGELOG.md](../../../CHANGELOG.md)、[0.1.0-draft](../../releases/0.1.0-draft.md)、[publish.md](../../publish.md)
