docs: 重构 README 并统一文档语言为中文

README 精简(中文 528 → 364 行,-31%;英文 552 → 390 行,-29%):
- 删除使用者不需要的深层细节,改为指向 references/ 与 SKILL.md:
  横向对比全表、八条契约表、project.json 逐字段说明、仓库目录树、B() 代码详解
- 第一定位改为「Agent Skill」,而不是「一条渲染流水线」
- 新增「安装」章:一句话安装 prompt + 九个智能体的技能目录对照表 + 环境要求
- 新增「参考思路与姊妹项目」:anything2explainer 与 html-video,并明确标注
  两者为不同作者的独立项目,本项目运行时不依赖其代码

文档语言统一为中文(README.en.md 除外):
CHANGELOG.md、CONTRIBUTING.md、THIRD_PARTY_NOTICES.md、PR/issue 模板、CI 注释。
许可证原文(MIT / Apache-2.0)与 GSAP 自带 README 属第三方逐字文本,未翻译。

跨平台可移植性修复(原先隐含 WorkBuddy 专属路径):
- peek_frame.mjs 的技能根兜底改为遍历各智能体技能目录
  (.workbuddy / .claude / .codex / .gemini / .cursor / .agents),已用隔离夹具正反验证
- setup_env.sh 标注哪几个候选是 WorkBuddy 托管路径
- SKILL.md 新增「跨 Agent 安装」章,安装路径不再写死单一平台

修正一处事实错误:THIRD_PARTY_NOTICES 原称两个方法来源项目「均为作者本人作品」,
与事实不符,已改为「他人独立项目」并补充来源链接。
This commit is contained in:
MohZhuang committed 2026-09-21 13:11:22 +08:00
1 parent 6474719119
commit 2581e2c685
13 files changed
+874 -1198

No files matched your search

+35 -36
View File
@@ -1,75 +1,74 @@
name: Bug report
description: Something rendered wrong, failed silently, or crashed.
name: Bug 报告
description: 画面渲错了、静默失败,或者直接崩了。
title: "[Bug] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for the report. This pipeline fails **silently** by design — a broken
frame usually still produces a plausible-looking video. The more of the detail
below you can fill in, the faster this gets diagnosed.
感谢反馈。这条流水线是**静默**失败的 —— 一个坏掉的帧通常还是能产出一条看着挺像样的
视频。下面这些信息你填得越全,定位得越快。
- type: dropdown
id: stage
attributes:
label: Which stage failed?
label: 哪个阶段出错了?
options:
- "0 · new_project (scaffold)"
- "1 · tts_build (voiceover)"
- "2 · timeline_build (global timeline)"
- "3 · subs (subtitles / beats)"
- "4 · lint_frames (static audit)"
- "5 · render_video (rendering)"
- "6 · qc_check (audit)"
- "7 · cover_build (covers)"
- "setup_env / environment"
- "Not sure"
- "0 · new_project(建项目)"
- "1 · tts_build(配音)"
- "2 · timeline_build(全局时间轴)"
- "3 · subs(字幕 / 节拍)"
- "4 · lint_frames(静态体检)"
- "5 · render_video(渲染)"
- "6 · qc_check(体检)"
- "7 · cover_build(封面)"
- "setup_env / 环境问题"
- "不确定"
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Include the exact command you ran and the full output.
label: 发生了什么?
description: 请附上你执行的完整命令与完整输出。
placeholder: |
Command: node scripts/render_video.mjs . --preview 30
Expected: 30s preview with animated cards
Actual: preview renders, but the number counter never moves
命令:node scripts/render_video.mjs . --preview 30
期望:30 秒预览,卡片有动画
实际:预览渲出来了,但数字计数器一直不动
validations:
required: true
- type: textarea
id: symptom-class
attributes:
label: Did it fail loudly or silently?
label: 它是报错了,还是静默出错?
description: >
Silent failures are the interesting ones here. If playback works but the output
is wrong (frozen element, desynced subtitle, missing text), say so explicitly.
静默失败才是这里最有价值的一类。如果视频能播但输出是错的
(元素卡住、字幕不同步、文字缺失),请明确写出来。
validations:
required: false
- type: textarea
id: environment
attributes:
label: Environment
description: "Run these and paste the result."
label: 环境
description: "跑一下这些,把结果贴上来。"
value: |
- OS:
- `node -v`:
- `python -V`:
- Shell (Git Bash / PowerShell / zsh):
- Browser used for rendering (Chrome / Edge / playwright chromium):
- ffmpeg source (PATH / imageio-ffmpeg):
- 操作系统:
- `node -v`:
- `python -V`:
- Shell(Git Bash / PowerShell / zsh):
- 渲染用浏览器(Chrome / Edge / playwright chromium):
- ffmpeg 来源(PATH / imageio-ffmpeg):
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: The `version:` field in SKILL.md, or the release tag.
label: 版本
description: SKILL.md 里的 `version:` 字段,或发布 tag。
placeholder: "1.2.2"
validations:
required: true
@@ -77,7 +76,7 @@ body:
- type: textarea
id: qc-output
attributes:
label: QC output (if you got as far as rendering)
description: Paste `out/qc_report.md`, or attach the contact sheet.
label: QC 输出(如果你已经跑到渲染那一步)
description: 贴 `out/qc_report.md`,或附上抽帧速览图。
validations:
required: false
+7 -7
View File
@@ -1,11 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Read the frame contract first
- name: 先读画面契约
url: https://github.com/OneMoh/html-explainer/blob/main/references/frame-contract.md
about: Most "my frame renders but looks wrong" reports are explained by the eight contract rules.
- name: Check the lessons ledger
about: 绝大多数「我的画面能渲但看着不对」都能被八条契约规则解释。
- name: 先查踩坑台账
url: https://github.com/OneMoh/html-explainer/blob/main/references/lessons.md
about: Known silent-failure modes and their diagnoses. Worth a search before filing.
- name: Setup and environment issues
url: https://github.com/OneMoh/html-explainer/blob/main/README.md#疑难排查
about: Run `bash setup_env.sh` and compare against the troubleshooting table (English version: README.en.md#troubleshooting).
about: 已知的静默失败模式及其定位方法。提 issue 之前值得先搜一遍。
- name: 安装与环境问题
url: https://github.com/OneMoh/html-explainer/blob/main/README.md
about: 先跑 `bash setup_env.sh`,再对照 README 的「疑难排查」一节。
+18 -20
View File
@@ -1,51 +1,49 @@
name: Feature request
description: Propose a new capability, style, or workflow improvement.
name: 功能建议
description: 提议一个新能力、新风格,或流程改进。
title: "[Feature] "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
This project deliberately keeps a small surface: HTML frames in, MP4 out, with
audio-video sync that actually holds. Proposals that add a build system, a plugin
API, or a cloud dependency are usually out of scope — but say so if you think
there's an important exception.
本项目刻意保持很小的接口面:HTML 帧进,MP4 出,音画同步稳得住。会增加构建系统、
插件 API 或云依赖的提议,一般都在范围之外 —— 但如果你认为有重要的例外,请说明。
- type: textarea
id: problem
attributes:
label: What problem does this solve?
description: Describe the situation you're in, not the API you want.
label: 它解决什么问题?
description: 描述你处的场景,而不是你想要的 API。
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed approach
label: 你建议的做法
validations:
required: true
- type: dropdown
id: area
attributes:
label: Area
label: 涉及范围
options:
- Visual styles / templates
- Narration / TTS
- Subtitles / beat sync
- Rendering
- QC / auditing
- Covers
- Docs
- Other
- 画面风格 / 模板
- 解说 / TTS
- 字幕 / 节拍同步
- 渲染
- QC / 体检
- 封面
- 文档
- 其它
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Including "just do it manually" — it's a valid answer.
label: 考虑过的替代方案
description: 包括「干脆手工做」—— 这也是个有效答案。
validations:
required: false
+18 -18
View File
@@ -1,32 +1,32 @@
## What this changes
## 这次改了什么
<!-- One or two sentences. What was wrong, and what does this do about it? -->
<!-- 一两句话。原来错在哪,这个改动做了什么? -->
## Why
## 为什么要改
<!--
If this fixes a silent failure, explain what was misbehaving and how you proved the
cause. "I tried X, it still broke; I changed Y, it worked" is genuinely useful here —
this pipeline produces plausible-looking output while being wrong.
如果这修的是一个静默失败,请说明它原来表现成什么样、你又是怎么证明病因的。
「我试了 X,还是坏的;改了 Y,就好了」在这里是真正有用的信息 ——
这条流水线的输出经常看着挺像样,其实是错的。
-->
## How it was verified
## 怎么验证的
<!--
Not "it should work". What did you actually run?
e.g. `node scripts/peek_frame.mjs . hook --at 25,50,85` and inspected the 50% frame
不要写「应该能跑」。你实际跑了什么?
例如 `node scripts/peek_frame.mjs . hook --at 25,50,85`,并检查了 50% 那一帧
-->
## Checklist
## 检查清单
- [ ] `python scripts/lint_frames.py --project <project>` reports no FAILs for frames I touched
- [ ] I actually rendered the change and looked at the output
- [ ] No external fonts, CDN links, or hardcoded colour literals introduced
- [ ] New lesson (if any) appended to `references/lessons.md` with the next number
- [ ] `python scripts/check_integrity.py` passes
- [ ] `README.md` and `README.en.md` updated together if user-facing behaviour changed
- [ ] `THIRD_PARTY_NOTICES.md` updated if third-party content was added or re-derived
- [ ] `python scripts/lint_frames.py --project <project>` 对我动过的帧没有 FAIL
- [ ] 我真的渲染过这次改动,并看过输出
- [ ] 没有引入外部字体、CDN 链接或硬编码颜色字面量
- [ ] 新增的踩坑记录(如果有)已按下一个编号追加到 `references/lessons.md`
- [ ] `python scripts/check_integrity.py` 通过
- [ ] 涉及使用者可见行为的改动,`README.md` 与 `README.en.md` 已同步更新
- [ ] 如果新增或再衍生了第三方内容,`THIRD_PARTY_NOTICES.md` 已更新
## Related issues
## 相关 issue
<!-- Closes #... -->
+11 -13
View File
@@ -7,7 +7,7 @@ on:
branches: [main]
workflow_dispatch:
# Only the latest run per branch matters; cancel superseded ones.
# 每个分支只关心最新一次运行;被取代的自动取消。
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@@ -19,8 +19,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# Windows + Git Bash is the primary development platform, so it is
# tested alongside Linux rather than treated as an afterthought.
# Windows + Git Bash 是主要开发平台,所以和 Linux 一起测,
# 而不是被当成事后补的。
os: [ubuntu-latest, windows-latest]
python: ["3.9", "3.13"]
@@ -35,27 +35,27 @@ jobs:
with:
node-version: "22"
# --- Repo self-consistency: version drift, catalog drift, stray CDN links ---
# --- 仓库自洽性:版本号漂移、风格目录漂移、残留外链 ---
- name: Repository integrity check
run: python scripts/check_integrity.py
# --- Python scripts must at least compile on the oldest supported version ---
# --- Python 脚本至少在支持的最低版本上要能编译 ---
- name: Compile Python scripts
run: python -m compileall -q scripts
# --- Frame audit tool must be importable and its CLI must respond ---
# --- 画面体检工具要能被导入,且命令行要能响应 ---
- name: Lint tool smoke test
run: python scripts/lint_frames.py --help
- name: Integrity checker smoke test
run: python scripts/check_integrity.py --root .
# --- Shell entrypoint syntax ---
# --- Shell 入口语法 ---
- name: Check setup_env.sh syntax
shell: bash
run: bash -n setup_env.sh
# --- Renderer / cover builder / peek tool syntax ---
# --- 渲染器 / 封面器 / 单帧速览工具的语法 ---
- name: Check Node module syntax
shell: bash
run: |
@@ -69,11 +69,9 @@ jobs:
shell: bash
run: |
set -e
# Frames must never reach out to a CDN or web font: offline rendering
# degrades silently rather than failing.
# Scope to HTML only — markdown docs legitimately *mention* these URLs
# (e.g. the guide explaining that you must delete them), and GSAP's own
# bundled README documents its CDN option.
# 画面帧绝不允许引 CDN 或网络字体:离线渲染不会报错,只会静默劣化。
# 只扫 HTML —— markdown 文档里*提到*这些 URL 是合理的
# (比如正是指南在教你要把它们删掉),而 GSAP 自带的 README 也会介绍它的 CDN 用法。
hits=$(grep -rInE --include='*.html' \
'https?://[^"'"'"' ]*(fonts\.googleapis|fonts\.gstatic|cdn\.)' . \
|| true)