- commit
- c5e007b
- parent
- fe1bafa
- author
- im_wower
- date
- 2026-03-21 23:58:23 +0800 CST
Create third-wave task cards
8 files changed,
+471,
-6
+7,
-3
1@@ -11,7 +11,7 @@
2 - `done`: 12
3 - `in_progress`: 0
4 - `blocked`: 0
5-- `todo`: 0
6+- `todo`: 5
7
8 ## 已完成
9
10@@ -32,11 +32,15 @@
11
12 ## 当前活动任务
13
14-- 暂无
15+- `T-013`
16+- `T-014`
17+- `T-015`
18+- `T-016`
19+- `T-017`
20
21 ## 下一步建议
22
23-- 如需继续推进,请新建第三波任务卡
24+- 当前已创建第三波任务卡,可直接并行启动
25 - `launchd` 仍依赖真实 `dist/index.js` 构建产物
26 - `baa-firefox` 仓库仍需按 `docs/firefox/README.md` 落地协议
27 - `control-api-worker`、`status-api`、`worker-runner` 仍有骨架待接实
+9,
-3
1@@ -44,15 +44,21 @@
2
3 ## 4. 当前活动任务
4
5-当前没有活动任务。
6+第三波任务已经创建,可以直接并行启动。
7
8-如果要继续推进,请先创建第三波任务卡。
9+第三波统一要求见:
10+
11+- [`THIRD_WAVE_START.md`](./THIRD_WAVE_START.md)
12
13 ## 5. 当前活动任务矩阵
14
15 | Task | 标题 | 状态 | 分支 | 依赖 | 主要写入范围 |
16 | --- | --- | --- | --- | --- | --- |
17-| 无 | 暂无活动任务 | - | - | - | - |
18+| `T-013` | Build 与 dist 产物 | `todo` | `feat/T-013-build-runtime` | `T-011` | 根构建配置、`apps/*/package.json`、`apps/*/tsconfig.json` |
19+| `T-014` | Control API 运行时接线 | `todo` | `feat/T-014-control-api-runtime` | `T-003`, `T-012` | `apps/control-api-worker/**` |
20+| `T-015` | Conductor 运行时接线 | `todo` | `feat/T-015-conductor-runtime` | `T-004` | `apps/conductor-daemon/**` |
21+| `T-016` | Worker 本地持久化 | `todo` | `feat/T-016-worker-persistence` | `T-005`, `T-006` | `apps/worker-runner/**`, `packages/checkpointing/**`, `packages/logging/**` |
22+| `T-017` | Status API 运行时入口 | `todo` | `feat/T-017-status-runtime` | `T-010` | `apps/status-api/**` |
23
24 ## 6. 已归档任务
25
+37,
-0
1@@ -0,0 +1,37 @@
2+# 第三波统一开工说明
3+
4+第三波任务统一要求如下:
5+
6+- 所有任务必须从当前 `origin/main` 最新提交切分支
7+- 每个任务必须使用独立 worktree
8+- 新 worktree 第一次进入后先执行 `npx --yes pnpm install`
9+- 不允许从其他任务分支继续切分支
10+- 开始时把任务卡状态改为 `in_progress`
11+- 完成并推送后把任务卡状态改为 `review`
12+
13+推荐命令模板:
14+
15+```bash
16+git fetch origin
17+git switch main
18+git pull --ff-only origin main
19+git worktree add ../baa-conductor-TXXX -b feat/T-XXX-name main
20+cd ../baa-conductor-TXXX
21+npx --yes pnpm install
22+```
23+
24+每个实例启动后按顺序读:
25+
26+1. `DESIGN.md`
27+2. `coordination/TASK_OVERVIEW.md`
28+3. `coordination/WORKFLOW.md`
29+4. `coordination/tasks/T-XXX-*.md`
30+
31+第三波的目标不是继续铺骨架,而是把关键运行链路接实:
32+
33+- 真实 `build` 产物
34+- control-api 运行时接线
35+- conductor 运行时接线
36+- worker 本地持久化
37+- status API 真正可挂载的入口
38+
1@@ -0,0 +1,93 @@
2+---
3+task_id: T-013
4+title: Build 与 dist 产物
5+status: todo
6+branch: feat/T-013-build-runtime
7+repo: /Users/george/code/baa-conductor
8+base_ref: main
9+depends_on:
10+ - T-011
11+write_scope:
12+ - package.json
13+ - tsconfig.base.json
14+ - apps/conductor-daemon/package.json
15+ - apps/conductor-daemon/tsconfig.json
16+ - apps/control-api-worker/package.json
17+ - apps/control-api-worker/tsconfig.json
18+ - apps/status-api/package.json
19+ - apps/status-api/tsconfig.json
20+ - apps/worker-runner/package.json
21+ - apps/worker-runner/tsconfig.json
22+ - docs/runtime/**
23+updated_at: 2026-03-21
24+---
25+
26+# T-013 Build 与 dist 产物
27+
28+## 目标
29+
30+把当前仓库从“只有 typecheck,没有真实产物”推进到“至少 apps 能产出 `dist/index.js`”,让 launchd 模板不再只是静态占位。
31+
32+## 统一开工要求
33+
34+- 必须从当前最新 `origin/main` 切出该分支
35+- 新 worktree 进入后先执行 `npx --yes pnpm install`
36+- 不允许从其他任务分支切分支
37+
38+## 本任务包含
39+
40+- 修正根 `build` 脚本
41+- 让 `apps/*` 的 `build` 真正输出 JS
42+- 调整必要的 tsconfig,使 `dist/` 可生成
43+- 如果需要,补最小的 build 使用说明到 `docs/runtime/**`
44+
45+## 本任务不包含
46+
47+- 真正运行 launchd
48+- 真实业务逻辑接线
49+- 包级发布配置
50+
51+## 建议起始文件
52+
53+- `package.json`
54+- `tsconfig.base.json`
55+- `apps/*/package.json`
56+- `apps/*/tsconfig.json`
57+- `docs/runtime/launchd.md`
58+
59+## 交付物
60+
61+- `pnpm -r build` 可用
62+- apps 产出 `dist/index.js`
63+
64+## 验收
65+
66+- `npx --yes pnpm -r build` 通过
67+- `apps/conductor-daemon/dist/index.js` 存在
68+- `apps/worker-runner/dist/index.js` 存在
69+- `apps/status-api/dist/index.js` 存在
70+
71+## files_changed
72+
73+- 待填写
74+
75+## commands_run
76+
77+- 待填写
78+
79+## result
80+
81+- 待填写
82+
83+## risks
84+
85+- 待填写
86+
87+## next_handoff
88+
89+- 待填写
90+
91+## notes
92+
93+- `2026-03-21`: 创建第三波任务卡
94+
1@@ -0,0 +1,83 @@
2+---
3+task_id: T-014
4+title: Control API 运行时接线
5+status: todo
6+branch: feat/T-014-control-api-runtime
7+repo: /Users/george/code/baa-conductor
8+base_ref: main
9+depends_on:
10+ - T-003
11+ - T-012
12+write_scope:
13+ - apps/control-api-worker/**
14+updated_at: 2026-03-21
15+---
16+
17+# T-014 Control API 运行时接线
18+
19+## 目标
20+
21+把第二波已经做好的 control-api 骨架推进到“可真正承载运行时接线”的程度,包括 env、auth 注入、repository 注入和基础 handler 落点。
22+
23+## 统一开工要求
24+
25+- 必须从当前最新 `origin/main` 切出该分支
26+- 新 worktree 进入后先执行 `npx --yes pnpm install`
27+- 不允许从其他任务分支切分支
28+
29+## 本任务包含
30+
31+- 明确 Worker `Env` 结构
32+- 把 auth hook 真正接入 route 执行流
33+- 整理 repository 注入点
34+- 尽量实现可安全落地的 read-only handler 或 mutation glue 代码
35+
36+## 本任务不包含
37+
38+- 修改 `packages/auth/**`
39+- 修改 `packages/db/**`
40+- 修改 conductor 代码
41+
42+## 建议起始文件
43+
44+- `apps/control-api-worker/src/index.ts`
45+- `apps/control-api-worker/src/router.ts`
46+- `apps/control-api-worker/src/handlers.ts`
47+- `apps/control-api-worker/src/contracts.ts`
48+
49+## 交付物
50+
51+- 更像真实 Worker 的运行时入口
52+- auth 与 repository 挂载方式
53+- 至少部分 handler 不再只是纯占位
54+
55+## 验收
56+
57+- `npx --yes pnpm --filter @baa-conductor/control-api-worker typecheck`
58+- `npx --yes pnpm --filter @baa-conductor/control-api-worker build`
59+- 路由、auth、env、repository 关系清晰
60+
61+## files_changed
62+
63+- 待填写
64+
65+## commands_run
66+
67+- 待填写
68+
69+## result
70+
71+- 待填写
72+
73+## risks
74+
75+- 待填写
76+
77+## next_handoff
78+
79+- 待填写
80+
81+## notes
82+
83+- `2026-03-21`: 创建第三波任务卡
84+
1@@ -0,0 +1,79 @@
2+---
3+task_id: T-015
4+title: Conductor 运行时接线
5+status: todo
6+branch: feat/T-015-conductor-runtime
7+repo: /Users/george/code/baa-conductor
8+base_ref: main
9+depends_on:
10+ - T-004
11+write_scope:
12+ - apps/conductor-daemon/**
13+updated_at: 2026-03-21
14+---
15+
16+# T-015 Conductor 运行时接线
17+
18+## 目标
19+
20+把 conductor 从“状态机骨架”推进到“有可启动入口、有 env/CLI 配置、有 control-api client 接线”的程度。
21+
22+## 统一开工要求
23+
24+- 必须从当前最新 `origin/main` 切出该分支
25+- 新 worktree 进入后先执行 `npx --yes pnpm install`
26+- 不允许从其他任务分支切分支
27+
28+## 本任务包含
29+
30+- env / CLI 配置解析
31+- 构造可启动的 daemon 入口
32+- 组织 heartbeat / lease loop 启动流程
33+- 暴露最小状态快照或运行时接口
34+
35+## 本任务不包含
36+
37+- 修改 `packages/db/**`
38+- 修改 control-api-worker
39+- 完整调度器
40+
41+## 建议起始文件
42+
43+- `apps/conductor-daemon/src/index.ts`
44+- `apps/conductor-daemon/src/index.test.js`
45+
46+## 交付物
47+
48+- 可以启动的 conductor 运行时入口
49+- 更明确的主备启动流程
50+
51+## 验收
52+
53+- `npx --yes pnpm --filter @baa-conductor/conductor-daemon typecheck`
54+- `npx --yes pnpm --filter @baa-conductor/conductor-daemon build`
55+- `node --test --experimental-strip-types apps/conductor-daemon/src/index.test.js`
56+
57+## files_changed
58+
59+- 待填写
60+
61+## commands_run
62+
63+- 待填写
64+
65+## result
66+
67+- 待填写
68+
69+## risks
70+
71+- 待填写
72+
73+## next_handoff
74+
75+- 待填写
76+
77+## notes
78+
79+- `2026-03-21`: 创建第三波任务卡
80+
1@@ -0,0 +1,84 @@
2+---
3+task_id: T-016
4+title: Worker 本地持久化
5+status: todo
6+branch: feat/T-016-worker-persistence
7+repo: /Users/george/code/baa-conductor
8+base_ref: main
9+depends_on:
10+ - T-005
11+ - T-006
12+write_scope:
13+ - apps/worker-runner/**
14+ - packages/checkpointing/**
15+ - packages/logging/**
16+updated_at: 2026-03-21
17+---
18+
19+# T-016 Worker 本地持久化
20+
21+## 目标
22+
23+把 worker-runner 从“内存态结构”推进到“会把 meta/state/log/checkpoint 真正写入本地目录”的程度。
24+
25+## 统一开工要求
26+
27+- 必须从当前最新 `origin/main` 切出该分支
28+- 新 worktree 进入后先执行 `npx --yes pnpm install`
29+- 不允许从其他任务分支切分支
30+
31+## 本任务包含
32+
33+- 本地目录创建
34+- `meta.json`、`state.json` 写入
35+- `worker.log`、`stdout.log`、`stderr.log` 落盘
36+- checkpoint 文件真正写入 `checkpoints/`
37+
38+## 本任务不包含
39+
40+- 真实 Codex 子进程接入
41+- D1 checkpoint 上报
42+- failover 恢复全链路
43+
44+## 建议起始文件
45+
46+- `apps/worker-runner/src/runner.ts`
47+- `apps/worker-runner/src/checkpoints.ts`
48+- `packages/checkpointing/src/index.ts`
49+- `packages/logging/src/*`
50+
51+## 交付物
52+
53+- 本地持久化 runner 骨架
54+- checkpoint 文件真正落盘
55+
56+## 验收
57+
58+- `npx --yes pnpm --filter @baa-conductor/worker-runner typecheck`
59+- `npx --yes pnpm --filter @baa-conductor/checkpointing typecheck`
60+- 能明确说明哪些文件会落到本地 runtime 目录
61+
62+## files_changed
63+
64+- 待填写
65+
66+## commands_run
67+
68+- 待填写
69+
70+## result
71+
72+- 待填写
73+
74+## risks
75+
76+- 待填写
77+
78+## next_handoff
79+
80+- 待填写
81+
82+## notes
83+
84+- `2026-03-21`: 创建第三波任务卡
85+
1@@ -0,0 +1,79 @@
2+---
3+task_id: T-017
4+title: Status API 运行时入口
5+status: todo
6+branch: feat/T-017-status-runtime
7+repo: /Users/george/code/baa-conductor
8+base_ref: main
9+depends_on:
10+ - T-010
11+write_scope:
12+ - apps/status-api/**
13+updated_at: 2026-03-21
14+---
15+
16+# T-017 Status API 运行时入口
17+
18+## 目标
19+
20+把 status-api 从“包内 handler 骨架”推进到“有可挂载运行时入口”的程度。
21+
22+## 统一开工要求
23+
24+- 必须从当前最新 `origin/main` 切出该分支
25+- 新 worktree 进入后先执行 `npx --yes pnpm install`
26+- 不允许从其他任务分支切分支
27+
28+## 本任务包含
29+
30+- 明确 status-api 对外入口
31+- 整理 `GET /healthz`、`GET /v1/status`、`GET /v1/status/ui`
32+- 提供最小 fetch handler 或 node server adapter
33+
34+## 本任务不包含
35+
36+- 修改 control-api-worker
37+- 修改 conductor
38+- 真实部署配置
39+
40+## 建议起始文件
41+
42+- `apps/status-api/src/index.ts`
43+- `apps/status-api/src/service.ts`
44+- `apps/status-api/src/render.ts`
45+
46+## 交付物
47+
48+- 可挂载的 status-api 入口
49+- 更完整的 HTML/JSON 响应骨架
50+
51+## 验收
52+
53+- `npx --yes pnpm --filter @baa-conductor/status-api typecheck`
54+- `npx --yes pnpm --filter @baa-conductor/status-api build`
55+- 入口结构清晰,后续可直接接入 launchd 或本地 HTTP server
56+
57+## files_changed
58+
59+- 待填写
60+
61+## commands_run
62+
63+- 待填写
64+
65+## result
66+
67+- 待填写
68+
69+## risks
70+
71+- 待填写
72+
73+## next_handoff
74+
75+- 待填写
76+
77+## notes
78+
79+- `2026-03-21`: 创建第三波任务卡
80+