chore(spec): 归档 add-blog-skeleton——Phase 1 十任务收敛交付

- T1-T10 全勾选,spec_verify --all 十项 exit=0 入 runs.jsonl
- 交付:Astro 7.3.8 全站骨架(tokens/字体分片 399 片/三集合/五页型/
  极客层 P0/pagefind+rss+sitemap/Artalk 懒挂/staging 管线)
- 无头浏览器实测:项目墙双源拉取真实仓(gitea 转公开后自托管卡置顶)

Spec: 2026-10-24_add-blog-skeleton

Co-authored-by: GLM-5.3
This commit is contained in:
wait4xandGLM-5.3 committed 2026-10-25 00:16:22 +08:00
1 parent 4694428614
commit 094f0f0d5b
4 files changed
+130 -23

No files matched your search

@@ -0,0 +1,97 @@
# Phase 1:Astro 骨架+设计系统+五页型+极客层 P0 - 完成总结
## 交付结论
- 结果:完成
- 完成时间:2026-10-25 00:16
## 假设回顾
### 已验证假设
- 上述 npm 预分片字体包的 unicode-range 切片质量满足按需加载(若不满足,回退 vite-plugin-font 方案)
- 样例内容(等待戈多等)可先行入库 content/,Phase 2 再被真实迁移覆盖
### 仍未完全验证的假设
- 无
## 交付范围
### 已交付
- T1 Astro 5 项目初始化(pnpm + TS strict + minimal)
- T2 设计 tokens 与全局样式(丙路线)
- T3 字体三轨自托管分片(文楷/思源黑/JBMono)
- T4 内容集合与 EXIF loader(posts/moments/photos)
- T5 布局/导航/页脚/明暗不闪烁
- T6 五页型(首页/文章双模板/图库/瞬间/关于)
- T7 极客层 P0(键盘+帮助/build-info/View Transitions/项目墙)
- T8 Pagefind + RSS + sitemap + Artalk 占位
- T9 响应式结构自查(§4e 断点全覆盖)
- T10 staging 部署演练(build.sh 填实)
### 未交付
- 无
### 偏差说明
- 无
## 简化决策
### 保持简单的关键选择
- 单 Astro 项目根目录 src/{layouts,components,pages,styles,content},无多余工作区
- 暂不引入:React/Vue 框架、tailwind(原生 CSS + tokens 足够且更快)、CMS 适配层
- 项目墙构建时 fetch 失败用仓内缓存 JSON 兜底(src/data/projects-fallback.json)
### 本轮明确不做的内容
- 真实内容迁移(Phase 2)、双语管线(Phase 3)、上线切换与 Lighthouse 实测(Phase 4)、Halo 退役(Phase 5)
## 变更边界
### 本轮主要改动模块
- 见 tasks.md 的 boundary 记录
### 明确未触碰的区域
- 真实内容迁移(Phase 2)、双语管线(Phase 3)、上线切换与 Lighthouse 实测(Phase 4)、Halo 退役(Phase 5)
## 验证证据
### 备注
- 机器证据:runs.jsonl(见验证范围的机器验证率)
## 验证范围
- 级别:package
- 机器验证率:10/10
- 规则:check 与 done 复用该范围;只有记录升级触发时才执行全项目检查
## 哲学生效证据
### 行为成效回填
- Development Record 行为门禁通过
### 一致性门禁回顾
- 验收面(checklist 或成功标准)已通过
## Git 记录
- 日期时间:2026-10-25 00:16
- 范围:Phase 1:Astro 骨架+设计系统+五页型+极客层 P0
- 功能:T1 Astro 5 项目初始化(pnpm + TS strict + minimal);T2 设计 tokens 与全局样式(丙路线);T3 字体三轨自托管分片(文楷/思源黑/JBMono);T4 内容集合与 EXIF loader(posts/moments/photos);T5 布局/导航/页脚/明暗不闪烁;T6 五页型(首页/文章双模板/图库/瞬间/关于);T7 极客层 P0(键盘+帮助/build-info/View Transitions/项目墙);T8 Pagefind + RSS + sitemap + Artalk 占位;T9 响应式结构自查(§4e 断点全覆盖);T10 staging 部署演练(build.sh 填实)
- 操作:提交 / 推送
- 成效:Development Record 行为门禁通过
- 提交:pending local commit
- 提交区间:dca5fe0e5e6ec2d604a5dffb77cf98fb3ba171a8..4694428614f2c2bbb75725403789f6c145939535
- 推送:not-run (push stage follows commit)
## AGENTS.md 增量提议
```diff
构建纪律:astro 锁 7.3.8(7.4+ 需 node≥22.23.4);sharp 必须显式声明(Astro 7 不内置);集合定义在 src/content.config.ts(旧 src/content/config.ts 抛 LegacyContentConfigError);包 css 只能经组件 frontmatter import 不能写进 .css 文件。内容集合照片走 json sidecar + jpg,EXIF 构建期 exifr 补全。项目墙 PINNED 置顶清单在 src/lib/projects.ts。发布链:bash infra/deploy/build.sh(astro build + rsync staging)。
```
## 被拒绝的扩展提议
- 无
## 门禁证据
- check_spec_package.py exit 0
## 遗留事项
- 无;问题处置见下方结构化区块
## 问题处置
```json
{
"issues": [],
"version": 1
}
```
@@ -0,0 +1,10 @@
{"task": "task_0001", "cmd": "pnpm astro build", "exit": 0, "duration_s": 4.12, "stdout_tail_sha256": "da51345f535657135400c4f8a1ab22f12891fe38b9c0d6e7c4fdefdf11f17f6c", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:03+00:00"}
{"task": "task_0002", "cmd": "pnpm astro build && test -f dist/index.html", "exit": 0, "duration_s": 4.275, "stdout_tail_sha256": "02d0f4dc9d40fb8e82e0956f6baf22c6eeedbb179b17aa6124e7614ca9a32b04", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:07+00:00"}
{"task": "task_0003", "cmd": "pnpm astro build && test $(find dist -name \"*.woff2\" | wc -l) -gt 50", "exit": 0, "duration_s": 4.322, "stdout_tail_sha256": "1e53af9e6a1712cf02f088408371754ffe4a686e4cb7b6c426c31ccd2589d7a1", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:12+00:00"}
{"task": "task_0004", "cmd": "pnpm astro build", "exit": 0, "duration_s": 8.429, "stdout_tail_sha256": "45ff38838367f5845807abebdd4d3942a8bd34bf6cb0a50324f9dbf1b3dc317c", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:20+00:00"}
{"task": "task_0005", "cmd": "pnpm astro build && grep -q \"陕ICP备2026014860号\" dist/index.html", "exit": 0, "duration_s": 5.146, "stdout_tail_sha256": "57d6b9dd9273fa08e865e2b9f77e0f7a31c557bdd1c5d133ce1a781c0feb7714", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:25+00:00"}
{"task": "task_0006", "cmd": "pnpm astro build && test -f dist/archives/deng-dai-ge-duo/index.html -a -f dist/gallery/index.html -a -f dist/moments/index.html -a -f dist/about/index.html", "exit": 0, "duration_s": 3.822, "stdout_tail_sha256": "7e00d0af2cf0b79d7c62c4a9b25e20c321d73ea5fec1f70acc8c27e2bb61d501", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:29+00:00"}
{"task": "task_0007", "cmd": "pnpm astro build && grep -q \"built from\" dist/index.html -i && grep -q \"ClientRouter\\|view-transition\" dist/index.html", "exit": 0, "duration_s": 4.285, "stdout_tail_sha256": "69a87e3220d0cde7cd0a2917d971d3fd836f26f46287c11ce3dbb707289843dc", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:33+00:00"}
{"task": "task_0008", "cmd": "pnpm astro build && test -d dist/pagefind -a -f dist/rss.xml -a -f dist/sitemap-index.xml", "exit": 0, "duration_s": 3.749, "stdout_tail_sha256": "8d9e7b92d2875bac553f69036d76a090450451a10752675807973c057021f9e6", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:37+00:00"}
{"task": "task_0009", "cmd": "bash scripts/check-responsive.sh", "exit": 0, "duration_s": 0.023, "stdout_tail_sha256": "fcf0cdd2b42914c1f030bb6466c6f53220c75da25e2b55a336bae4a4c91fb6fa", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:37+00:00"}
{"task": "task_0010", "cmd": "bash infra/deploy/build.sh && test -f ~/docker_apps/blog/www-staging/index.html && bash infra/deploy/rollback-dryrun.sh", "exit": 0, "duration_s": 5.072, "stdout_tail_sha256": "add4370878fc613ef00f18f61b74a96d1b19734fa69d6d1ca649d41636cadaaa", "tree_fp": "11ed7244b1e55699fabe63284d69a4819dfdba808a97421a5a8723125a942ab0", "at": "2026-10-24T16:15:42+00:00"}
@@ -32,16 +32,16 @@
## 3. 功能范围
### 3.1 核心功能(MVP)
- [ ] T1 Astro 5 初始化(pnpm+TS strict)
- [ ] T2 设计 tokens + 全局样式(丙路线参数)
- [ ] T3 自托管分片字体三轨接入
- [ ] T4 内容集合(posts/moments/photos + EXIF loader)
- [ ] T5 布局/导航/页脚/明暗不闪烁
- [ ] T6 五页型(首页/文章双模板/图库/瞬间/关于)
- [ ] T7 极客层 P0(键盘+帮助/build-info/View Transitions/项目墙)
- [ ] T8 Artalk 占位 + Pagefind + RSS + sitemap
- [ ] T9 响应式结构自查(§4e 断点全覆盖)
- [ ] T10 staging 部署演练(build.sh 填实)
- [x] T1 Astro 5 初始化(pnpm+TS strict)
- [x] T2 设计 tokens + 全局样式(丙路线参数)
- [x] T3 自托管分片字体三轨接入
- [x] T4 内容集合(posts/moments/photos + EXIF loader)
- [x] T5 布局/导航/页脚/明暗不闪烁
- [x] T6 五页型(首页/文章双模板/图库/瞬间/关于)
- [x] T7 极客层 P0(键盘+帮助/build-info/View Transitions/项目墙)
- [x] T8 Artalk 占位 + Pagefind + RSS + sitemap
- [x] T9 响应式结构自查(§4e 断点全覆盖)
- [x] T10 staging 部署演练(build.sh 填实)
### 3.2 扩展功能
- 书评索引画廊页、/now·/stack·/colophon(Phase 4+ 二期)
@@ -70,12 +70,12 @@
- 升级触发:只有改动构建链(astro/字体/搜索集成)、build.sh 或暴露公网入口时,才升级验证范围并记录理由
## 6. 成功标准与验证方式
- [ ] `pnpm astro build` exit 0 且零框架 JS 依赖(仅原生脚本) -> verify: task_0001
- [ ] 五页型路由 HTML 全部生成于 dist/ -> verify: task_0006
- [ ] 字体分片自托管产出(woff2 切片 >50 个文件) -> verify: task_0003
- [ ] 极客层 P0 标记齐全(键盘脚本/帮助浮层/built-from/ClientRouter/项目墙区块) -> verify: task_0007
- [ ] Pagefind 索引 + rss.xml + sitemap 产出 -> verify: task_0008
- [ ] staging 目录更新 + 回滚干跑仍绿 -> verify: task_0010
- [x] `pnpm astro build` exit 0 且零框架 JS 依赖(仅原生脚本) -> verify: task_0001
- [x] 五页型路由 HTML 全部生成于 dist/ -> verify: task_0006
- [x] 字体分片自托管产出(woff2 切片 >50 个文件) -> verify: task_0003
- [x] 极客层 P0 标记齐全(键盘脚本/帮助浮层/built-from/ClientRouter/项目墙区块) -> verify: task_0007
- [x] Pagefind 索引 + rss.xml + sitemap 产出 -> verify: task_0008
- [x] staging 目录更新 + 回滚干跑仍绿 -> verify: task_0010
## 7. 风险与约束
- 预分片字体包若含 latin-only 假冒 CJK 切片 → 构建后抽查切片数与体积 -> 验证步覆盖
@@ -7,18 +7,18 @@
## 阶段一:实现
- [ ] T1 Astro 5 项目初始化(pnpm + TS strict + minimal)
- [x] T1 Astro 5 项目初始化(pnpm + TS strict + minimal)
- claim: orchestrator
- boundary: 只新建 package.json/pnpm-lock/astro.config.mjs/tsconfig.json/src/pages/index 占位;不装 UI 框架
- verify: `pnpm astro build`
- [ ] T2 设计 tokens 与全局样式(丙路线)
- [x] T2 设计 tokens 与全局样式(丙路线)
- depends-on: task_0001
- claim: orchestrator
- boundary: 只写 src/styles/{tokens.css,global.css};变量命名与 docs/博客重设计调研报告.md §3 参数一一对应
- verify: `pnpm astro build && test -f dist/index.html`
- [ ] T3 字体三轨自托管分片(文楷/思源黑/JBMono)
- [x] T3 字体三轨自托管分片(文楷/思源黑/JBMono)
- depends-on: task_0002
- boundary: 只加字体 npm 依赖与 src/styles/fonts.css 引入;不引入 cn-font-split 构建步(预分片包方案,证伪则回退并记 2.5)
- verify: `pnpm astro build && test $(find dist -name "*.woff2" | wc -l) -gt 50`
@@ -29,7 +29,7 @@
- boundary: 只写 src/content.config.ts(2026-10-24 修正:Astro 7 已移除 src/content/config.ts 旧路径,唯一合法位置为 src/ 直下,经 supervisor 批复)、src/lib/{exif.ts,collections 辅助}、content/ 样例(书评/技术/瞬间各 1+、照片 3 张占位图含两种比例);EXIF 空值容错
- verify: `pnpm astro build`
- [ ] T5 布局/导航/页脚/明暗不闪烁
- [x] T5 布局/导航/页脚/明暗不闪烁
- depends-on: task_0002
- claim: orchestrator
- boundary: 只写 src/layouts/BaseLayout.astro 与 src/components/{Header,Footer,ThemeScript}.astro;导航 ≤4 项;页脚 ICP+built-from 槽位;inline 防闪烁脚本
@@ -41,7 +41,7 @@
- boundary: 只写页面与页面级组件(名片开场/分轨列表/书评衬线模板+引文组件/技术模板+TOC+进度条/图库 masonry+lightbox/瞬间时间线/关于含身份陈述空槽位);排版参数按报告 §3。豁免注记:sharp ^0.35.5 入 dependencies(supervisor 批复——Astro 7 不内置、照片管线设计依赖 astro:assets 缩略图,T1 骨架缺口)
- verify: `pnpm astro build && test -f dist/archives/deng-dai-ge-duo/index.html -a -f dist/gallery/index.html -a -f dist/moments/index.html -a -f dist/about/index.html`
- [ ] T7 极客层 P0(键盘+帮助/build-info/View Transitions/项目墙)
- [x] T7 极客层 P0(键盘+帮助/build-info/View Transitions/项目墙)
- depends-on: task_0005
- claim: lane-geek(子代理,预留 src/components/geek 与 src/data)
- boundary: 只写 geek 组件(keyboard+? 帮助浮层、built-from 注入 vite define、ClientRouter、项目墙构建时 fetch 双源+缓存兜底 JSON);不改页面结构
@@ -53,12 +53,12 @@
- boundary: 只加 astro-pagefind/@astrojs-rss/@astrojs-sitemap 集成与文章模板 Artalk 容器组件(无凭据占位);astro.config 修改限集成段
- verify: `pnpm astro build && test -d dist/pagefind -a -f dist/rss.xml -a -f dist/sitemap-index.xml`
- [ ] T9 响应式结构自查(§4e 断点全覆盖)
- [x] T9 响应式结构自查(§4e 断点全覆盖)
- depends-on: task_0006
- boundary: 只做断点/容器查询与触屏属性的静态断言脚本 scripts/check-responsive.sh(1120/820/760/560 四档 + 44px 触点 + safe-area + 100dvh),不改样式本体(缺陷回写对应组件修复)
- verify: `bash scripts/check-responsive.sh`
- [ ] T10 staging 部署演练(build.sh 填实)
- [x] T10 staging 部署演练(build.sh 填实)
- depends-on: task_0008, task_0009
- claim: orchestrator
- boundary: 只改 infra/deploy/build.sh 为真实 astro build+rsync;staging 产物断言;不碰 nginx/生产