# Phase 2:Halo 内容迁移(6文/21图/1瞬间,URL 1:1)- 任务拆解 ## 使用规则 - 每个任务 boundary/verify 齐备;verify 首个反引号 span 为执行命令 - 迁移中间产物只落 .migration/(gitignore) ## 阶段一:实现 - [x] T1 Halo 全量导出脚本 - claim: orchestrator - boundary: 只写 scripts/migrate/halo_export.py 与 .migration/ 产物;对 Halo 仅 GET - verify: `python3 scripts/migrate/halo_export.py && test -s .migration/posts.json -a -s .migration/photos.json -a -s .migration/moments.json` - [x] T2 文章转换入库 - depends-on: task_0001 - claim: orchestrator - boundary: 只写 scripts/migrate/posts_to_md.py 与 content/posts/*.md(图片落 content/posts/ 同名资产目录或引用 photos 集合);书评 mood 按篇分配五档色 - verify: `pnpm astro build && test $(ls content/posts/*.md | wc -l) -eq 6` - [x] T3 图库迁移 - depends-on: task_0001 - boundary: 只写 scripts/migrate/photos_migrate.py 与 content/photos/(jpg+json sidecar;分组沿用 Halo 数据) - verify: `test $(ls content/photos/*.jpg | wc -l) -eq 21 && pnpm astro build` - [x] T4 瞬间迁移 - depends-on: task_0001 - boundary: 只写 scripts/migrate/moments_migrate.py 与 content/moments/ - verify: `test $(ls content/moments/*.md | wc -l) -ge 1 && pnpm astro build` - [x] T5 URL 1:1 断言 - depends-on: task_0002 - boundary: 只写 scripts/migrate/check_urls.py(读 .migration/posts.json 与 content/posts/ 比对 slug 集) - verify: `python3 scripts/migrate/check_urls.py` - [x] T6 构建验收 + staging + 抽检清单 + 生产复查 - depends-on: task_0002, task_0003, task_0004, task_0005 - boundary: 跑 build.sh 更新 staging;抽检清单写 .spec/specs/2026-10-24_migrate-blog-content/evidence/spot-check.md;复查 halo 容器与本机 200 - verify: `bash infra/deploy/build.sh && docker inspect -f {{.State.Health.Status}} halo-halo-1 | grep -q healthy` --- **当前进度**:由脚本计算,无需手动维护