Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
58a8e3b
feat: backport tool, command hub, restored gate APIs and memory fixes
claude Oct 6, 2026
86ce54a
fix: bind human review to the reviewed render and refuse self-certifi…
claude Oct 6, 2026
c3ae066
feat: route every reference from the public skill and fix sanitizer f…
claude Oct 6, 2026
3eb7fdc
feat: public-only path rewrites and per-commit canonical replay
claude Oct 6, 2026
fc5e26f
fix: re-running a backport after --apply reports ALREADY_APPLIED
claude Oct 6, 2026
940d069
docs: align color order, LUT strength, review serving and commands wi…
claude Oct 6, 2026
b89e9a0
fix: restore script_gate.load_vocab and correct the vocab docs
claude Oct 6, 2026
20353b9
docs: reconcile pacing, loudness, style and voice rules with the gates
claude Oct 6, 2026
17c8d9b
W: workflow contract durability fixes (re-audit, owner-token lock, pl…
claude Oct 6, 2026
aa53359
Package D: gate input validation fixes (fail closed on placeholders a…
claude Oct 6, 2026
f8faa80
fix: finish the gate-validation follow-ups (example 05, publish hub, …
claude Oct 6, 2026
f01fb75
Package F: outcome memory integrity fixes (F4, F5, F7, F10)
claude Oct 6, 2026
2d3a118
fix: share one locked channel state between tracker, hub and interviews
claude Oct 6, 2026
f821265
feat: health check covers gates, examples, backport tool and Python 3.9
claude Oct 6, 2026
c672fe1
docs: document workflow resume --reaudit for expired or spent audit r…
claude Oct 6, 2026
ffe8e7b
docs: maintainer backport guide; public-only design DNA wording as a …
claude Oct 6, 2026
b849035
feat: public docs name the reviewing creator by role
claude Oct 6, 2026
c0c71f5
Package C: fail-closed media QA (WCAG flash, black runs, full-length …
claude Oct 6, 2026
d945aa0
fix: run the fail-closed media QA fixtures in quick health
claude Oct 6, 2026
9b1fa00
Package R: recover interrupted updates, lock install root, portable a…
claude Oct 6, 2026
018f294
docs: describe interrupted-update recovery and the update lock
claude Oct 6, 2026
c87f80b
docs: changelog entry for the skill optimization pass
claude Oct 6, 2026
c9e7936
E2: explicit BT.709 colour pipeline, filter/bloom math, Ken Burns and…
claude Oct 6, 2026
58962da
docs: changelog entry for the colour pipeline fixes
claude Oct 6, 2026
be40a38
Package E: caption typesetting and legibility fixes
claude Oct 6, 2026
f8a06cc
fix: finish the caption and colour follow-ups in the Shorts renderer
claude Oct 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ python src/release_manager.py selftest

PR CI 會在三種作業系統與兩個 Python 版本驗證,另有可重現建置檢查。測試通過只代表已覆蓋的條件;未測的環境、資安或媒體品質應如實列出。

## 維護者:把合併的公開修改同步回私有 canonical

公開版的 derived 檔案(`src/`、`codex-skill/` 等由 canonical 投影出來的檔案)在 PR 合併後,要先回寫到維護者本機的私有 canonical,下一次 `sync_canonical.py` 才不會把修改蓋掉。用 `scripts/canonical_backport.py`:

```text
python scripts/canonical_backport.py --canonical <私有 canonical 路徑> --base <上次同步的 commit> --head <要同步的 commit>
python scripts/canonical_backport.py --canonical <私有 canonical 路徑> --base <...> --head <...> --apply
python scripts/sync_canonical.py --canonical <私有 canonical 路徑>
git status
```

- 第一行是 dry run:逐檔列出 `FAST_FORWARD`/`MERGED`/`CREATE`/`DELETE`/`ALREADY_APPLIED`/`SKIPPED`/`CONFLICT`。`SKIPPED` 是不由 canonical 投影的檔案(repo-native、public-owned、generated、projection),不需要回寫;`tools/code-cleanup-helper/` 的修改要另外加 `--cleanup-helper <路徑>`;`docs/AUTOPILOT_ARCHITECTURE_V6.md` 來自私人工作區(`sync_canonical.py` 從公開 kit 資料夾的上一層讀它),要加 `--workspace <那個資料夾>` 才會回寫。
- 有 `CONFLICT` 或 `ERROR` 時 `--apply` 會拒絕;處理衝突後重跑,或明確加 `--partial` 只寫其餘檔案。`--apply` 前會備份到 `--backup-dir`(預設是公開 repo 內、已被 git 忽略的 `.video-autopilot/backport/<時間>/`),寫入失敗會整批還原,並保留原檔的 BOM 與換行。
- 公開 `SKILL.md` 由 `scripts/public_skill_skeleton.py` 產生,不會自動回寫;`--apply` 會在備份資料夾輸出 `SKILL.public-delta.diff` 與 `SKILL.public-head.md`,請手動把需要的段落併進私有 `SKILL.md`。
- 工具逐個 first-parent commit 重播,公開版專用的改寫規則(路徑、隱私 sanitizer)不會被寫回 canonical。PR 請用 merge commit(不要 squash),或直接對 PR 分支執行,才保留逐 commit 的重播資訊。
- 回寫並重新同步後,`git status` 應只剩 `sync-receipt.json` 變動;若還有其他差異,代表回寫不完整,先停下來檢查。
- 已套用過再跑一次會回報全部 `ALREADY_APPLIED`。`python scripts/canonical_backport.py --self-test` 驗證工具本身。

## 隱私與安全

不要提交 `config.py`、`profiles/`、`projects/`、頻道後台資料、客戶資訊、未公開影片、API key/token、session 紀錄或帶存取權限的遠端審片連結。範例使用虛構資料,證據先去識別化。
Expand Down
113 changes: 113 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,116 @@
## Unreleased

### Skill routing and sync-back

- The public `SKILL.md` now routes every one of its 56 references by task
(large references by section), starts each task from creator memory and a
context packet, and states a definition of done. The trigger description
covers Chinese requests (剪片、上字幕、調色、Shorts/Reels、封面、審片、發布).
The agent card no longer offers a remote review link by default.
- New `scripts/canonical_backport.py` writes merged public edits back into the
private canonical before the next sync: per-commit replay, three-way merge
that keeps BOM and line endings, public-only rewrites never written back,
all-or-nothing `--apply` with backups, and idempotent re-runs.
- New `scripts/hao_autopilot.py` command hub lists and runs the kit's entry
points.
- Public docs name the reviewing creator by role (創作者 / the creator);
brand names, schema ids and the repository owner are unchanged.

### Review integrity

- Saved reviews carry an HMAC over the exact render's sha256; `finalize`
re-hashes the render, requires a submitted stamped review and archives stale
reviews on rebuild. Quality-95 certifies only from a verified review.
- Missing evidence is an explicit REVIEW gap, never a silent full score; NaN,
infinite, boolean or text ratings never score.
- `publish_contract` and `publish_hub` treat only `CERTIFIED_95` as
certified or ready.

### Gates fail closed

- Gate inputs: typed interview sources (`url:`, `file:`, `sha256:`),
placeholder detection shared by every gate, a dated compliance stamp with a
named reviewer, finite positive shot durations, proof images matched by real
path or content hash, a hash-frozen parity contract and split-battle Shorts
ids. `gate_core` raises when a report says not-ok or has no `fails` list, and
a self-test with zero checks is red.
- Media QA: WCAG photosensitive-flash detection, long black runs, letterboxing
anywhere in the video, true peak <= -1.0 dBTP for Shorts, missing streams,
`-inf` loudness, special-character filenames and missing caption tools are
failures or UNVERIFIED, and anything not PASS blocks delivery.
- Workflow controller: `workflow resume <run> --reaudit` recovers expired or
spent audit receipts; the state lock is owner-token based and survives dead
owners; the sealed plan is re-verified at audit, apply and verify; real words
containing "todo" are no longer rejected.
- `script_gate.load_vocab()` is back, so creators can load their own audited
audience vocabulary; the restored Shorts gate API (`DEFAULT_RULES`,
`merge_rules`, `rules=`) runs example 04 again.

### Memory and learning

- Outcome baselines are per platform, format and window, count distinct
videos, and exclude early, late, undated, duplicate or non-finite captures
with a data-quality report.
- The taste model rebuilds ratings from the vote log and needs at least five
distinct comparisons plus a 95% Wilson margin before declaring a preference.
- Channel-state and taste writes are atomic and run under a lock, asset-usage
compaction is crash-safe, and interview scheduling and the publishing hub
share `data/channel_state.json`.
- Learned rules move to `data/knowledge_state.json` (`VIDEO_AUTOPILOT_KNOWLEDGE_STATE`
overrides it), seeded once from the shipped `knowledge/runtime/state.json`, so
an update can no longer overwrite learning; support counts distinct sources,
so a retried review cannot promote a rule.

### Colour and effects

- Every RGB-domain filter (LUTs, curves, colour balance, channel mixer) runs
inside explicit BT.709 conversions and outputs are tagged BT.709. An identity
LUT now reproduces SMPTE bars at about 70 dB instead of 29.5 dB, so reds no
longer drift from (191, 0, 0) to (205, 17, 0).
- One HDR-to-SDR normaliser (npl=100) is shared by the Shorts, grading and
tracking paths.
- Filter renderers use lossless intermediates instead of `mp4v`; scanlines
darken, halftone coverage follows tone, whip and chromatic shifts replicate
edges instead of wrapping, and bloom no longer darkens the background.
- Ken Burns helpers parse again, stay centred, move for the full clip and keep
the target aspect ratio.

### Captions and typesetting

- Shorts captions measure real libass widths and break only at rule-safe points:
never inside a Latin word or number, never with closing punctuation at a line
start. Lines scale down to 70% at most and raise instead of overflowing, and
every caption, chip and overlay stays inside one text-safe rectangle.
- Text on accent colours picks ink or white by WCAG contrast (at least 5.13:1
across all themes); a missing CJK font raises instead of drawing tofu.
- The thumbnail gate measures linearised WCAG contrast and keeps the headline
clear of the duration badge.
- Shorts renders keep HDR at full precision until tone mapping, convert ungraded
clips with an explicit BT.709 matrix, blend cards and motion cues in RGB and
tag every encode BT.709.

### Updater

- An interrupted update (Ctrl+C, a killed process) rolls back automatically;
the next `check`, `auto` or apply reports
`INTERRUPTED_TRANSACTION_RECOVERED`, or `INTERRUPTED_TRANSACTION` when manual
review is safer. Apply and rollback hold an install-root lock (`LOCKED`).
- Windows restarts after an update through a child process; archive order is
identical on every OS; errors keep their message unless it contains an
absolute path.

### Docs, rules and health

- Reconciled contradictions with the code: colour order and LUT strength,
review serving (local by default, phone review only by explicit request),
tutorial pacing (bounded by `pace_gate`), master loudness (-14 LUFS,
<= -1 dBTP), Signal Grid as a legacy family, the voice-profile rule, the
thumbnail test plan and the shipped design DNA seed count.
- `system_health --quick` now also runs the gate, memory, backport, command hub
and media-QA self-tests plus examples 02/04/05/06, and fails on annotations
that would crash Python 3.9 at import time.
- `.github/CONTRIBUTING.md` documents the maintainer backport workflow.

## v0.23.0 (2026-08-27)

### Architecture cleanup and public release closure
Expand Down
21 changes: 14 additions & 7 deletions README.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 🎬 video-autopilot-kit

> **v0.23.0 / architecture 7.0**: long-form, Shorts and Reels share a self-authored composition runtime, an Imagegen-first material gate,
> evidence-gated cinematic craft and one 38-preset filter library. Camera, edit, sound, color, VFX and transitions fall back to a clean cut when shot evidence is missing. The 33-reference design DNA, tracking, Quality-95 review, publishing packages, outcome learning and safe updates for long-form,
> evidence-gated cinematic craft and one 38-preset filter library. Camera, edit, sound, color, VFX and transitions fall back to a clean cut when shot evidence is missing. The 16-seed public design DNA, tracking, Quality-95 review, publishing packages, outcome learning and safe updates for long-form,
> Shorts and Reels. Run `python src/system_health.py --quick` to validate a clean install. Personal
> media and analytics never enter the release.

Expand Down Expand Up @@ -69,20 +69,22 @@ misleading) or stay too generic to have real methodology. This kit gives you the
(a battle-tested structure); `SETUP.md` **asks you questions** one section at a time, and
your answers fill it in — so it actually becomes **your** system.

## 🆕 New in v0.12.0 — borrowed numbers, evicted
## Borrowed numbers, evicted (a design rule since v0.12)

This release **removes no capability. It removes borrowed certainty.** Four unrelated parts of
v0.12 **removed no capability. It removed borrowed certainty.** Four unrelated parts of
the kit were making the same mistake: a number nobody measured, wearing an authority label, is
worse than no number at all — because you trust it.

- **The Shorts duration band is platform-aware.** Its dead zone was measured on **YouTube**
Shorts; applied to IG/FB it blocks cuts that perform perfectly well. Pick a band with
`spec["platform"]` (`rules=` still wins per key); an unknown platform name is a **blocking
failure**, never a silent fallback.
- **The script gate's four audience word-lists now ship empty.** Jargon grading can only be
audited out of **your own** transcripts — copy someone else's whitelist and you are checking
your script against their audience. An empty vocab doesn't block you (one warning, that's it);
`load_vocab()` loads yours.
- **The script gate's four audience word-lists are only a starter set.** The kit ships a generic
starter vocabulary (`PUBLIC_FIXTURE`); jargon grading can only be audited out of **your own**
transcripts — copy someone else's whitelist and you are checking your script against their
audience. `script_gate.load_vocab("your audience_vocab.json")` replaces all four lists (skeleton:
[`templates/audience_vocab.example.json`](templates/audience_vocab.example.json)); an empty vocab
is not scanned and returns a single `lang.no_vocab` warning.
- **A compliance layer + a "no link, no number" rule for the algorithm line** —
[`knowledge/ai-content-compliance.md`](knowledge/ai-content-compliance.md) (R26-R38 + a 10-item
pre-publish checklist) with 53 graded citations. Thresholds with no findable official source are
Expand Down Expand Up @@ -194,6 +196,11 @@ python install_or_upgrade.py --install-root <your-folder> --apply --install-skil
managed file has local edits.
- Every replacement is backed up under `.video-autopilot/backups/<transaction>/`; use
`python src/release_manager.py rollback` to restore it.
- An interrupted update (Ctrl+C, a closed terminal) rolls back automatically: the next `check`,
`auto` or `--apply` restores the previous version and reports `INTERRUPTED_TRANSACTION_RECOVERED`
(nothing new is applied that run; run it again). If recovery is not provably safe it reports
`INTERRUPTED_TRANSACTION` with the transaction id for manual review and `rollback`. Only one
update runs at a time; a second one gets `LOCKED`.
- Major or compatibility-window-breaking releases always require confirmation.

See the full contract in
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> Current version: v0.23.0
>
> **v0.23.0/架構 7.0**:長片/Shorts/Reels 共用自研 composition runtime、Imagegen-first 材質閘門、證據式電影工藝、統一濾鏡庫與唯一發布中樞;
> 38 組調色/動態/轉場/主體濾鏡、33 圖設計 DNA、Tracking、Quality-95 審片、發佈包、成效學習與安全自動更新都在同一套公開版。沒有鏡頭證據時仍會退回乾淨切鏡。
> 38 組調色/動態/轉場/主體濾鏡、16 組公開設計 DNA 種子、Tracking、Quality-95 審片、發佈包、成效學習與安全自動更新都在同一套公開版。沒有鏡頭證據時仍會退回乾淨切鏡。
> 執行 `python src/system_health.py --quick` 可驗證乾淨安裝;個人媒體與成效資料不會進 release。

> 一套**框架式**的 YouTube / 短影音自動化工具 + 方法論模板。
Expand Down Expand Up @@ -62,15 +62,16 @@ python src/filter_runtime.py gallery a.mp4 review/filter-library --source-b b.mp
要嘛太通用沒有方法論。這個 kit 給你**骨架**(經實戰的結構),
`SETUP.md` 一區一區**問你問題**,用你的答案填滿它 —— 這樣它才真的是**你的**系統。

## 🆕 v0.12.0 新增 — 把「借來的數字」清出去
## 把「借來的數字」清出去(v0.12 起的設計原則)

這一版**沒有拿掉任何功能,拿掉的是借來的把握**。四個地方犯的是同一種錯:
v0.12 **沒有拿掉任何功能,拿掉的是借來的把握**。四個地方犯的是同一種錯:
一個沒人量過的數字,掛上權威標籤,比沒有數字更糟 —— 因為你會信它。

- **Shorts 片長帶改平台感知** —— 死區是在 **YT Shorts** 上量出來的,套到 IG/FB 會擋掉正常的剪法。
改用 `spec["platform"]` 選帶(`rules=` 仍逐鍵優先);平台名打錯是**擋下的失敗**,不是靜默 fallback
- **腳本 gate 的四層詞表改成出貨即空** —— 行話分級只能從**你自己的逐字稿**審計出來;
照抄別人的白名單 = 用別人的觀眾檢查你的稿。空表不擋你(只回一條 warn),`load_vocab()` 載你自己的
- **腳本 gate 的四層詞表只是起手式** —— 出貨的是通用 starter 詞表(`PUBLIC_FIXTURE`);行話分級只能從**你自己的逐字稿**審計出來,
照抄別人的白名單 = 用別人的觀眾檢查你的稿。`script_gate.load_vocab("你的 audience_vocab.json")` 整組換成你的
(骨架:[`templates/audience_vocab.example.json`](templates/audience_vocab.example.json));載入空表時不掃詞,只回一條 `lang.no_vocab` warn
- **演算法線補上合規層+「沒出處就不引用」** —— [`knowledge/ai-content-compliance.md`](knowledge/ai-content-compliance.md)(R26-R38 + 發布前 10 項 checklist)
+ 53 條分級法源;查無官方出處的門檻數字就地標記,不再與有出處的並排
- **新工具 [`src/teardown.py`](src/teardown.py)** —— 一個指令把競品直式短片拆成可比較的數字(刀速/刀距分布/換句速率/換句÷剪點/LUFS);
Expand Down Expand Up @@ -169,6 +170,9 @@ python install_or_upgrade.py --install-root <你的資料夾> --apply --install-
- 未知自訂檔永不刪;已修改的官方管理檔在自動模式會停在 `CONFIRM_REQUIRED`。
- 每次覆蓋前建立 `.video-autopilot/backups/<transaction>/`;需要時執行
`python src/release_manager.py rollback`。
- 更新中斷(Ctrl+C、程式被關掉)會自動回滾:下一次 `check`/`auto`/`--apply` 先回到舊版並回報
`INTERRUPTED_TRANSACTION_RECOVERED`(這次不套新版,重跑一次即可);無法安全判斷時回報
`INTERRUPTED_TRANSACTION` 與交易編號,請人工檢查後 `rollback`。同時只能有一個更新在跑,另一個會得到 `LOCKED`。
- 重大/不相容版本不會靜默升級,必須由使用者確認。

完整契約見 [`codex-skill/video-autopilot/references/open-source-release-and-upgrade.md`](codex-skill/video-autopilot/references/open-source-release-and-upgrade.md)。
Expand Down
14 changes: 9 additions & 5 deletions SETUP.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ The AI asks one question at a time and fills the files for you — **you just an
> into things a **machine** can block? Use the cumulative version,
> `templates/style_profile.template.md`. Its §5 produces `audience_vocab.json`
> (skeleton: `templates/audience_vocab.example.json`), which
> `src/longform_maker/script_gate.py` reads to gate a script **before you record it**.
> **Those four word-lists ship empty on purpose** — they can only be audited out of your own
> transcripts, and copying someone else's means checking your script against *their* audience.
> `src/longform_maker/script_gate.py` uses, after `script_gate.load_vocab("your audience_vocab.json")`,
> to gate a script **before you record it**. **The built-in lists are only a generic starter set** —
> real grading can only be audited out of your own transcripts, and copying someone else's means
> checking your script against *their* audience.
> Method → `knowledge/script-retention-craft.md`.

## 4️⃣ Production → generates `config.py` ★required
Expand Down Expand Up @@ -161,8 +162,11 @@ prints a `WARN 節目 profile 未填: …` line listing exactly which fields are
> this verbatim, so an incomplete list means an incomplete release**).
>
> ⚠️ **Only a human can stamp compliance**: `plan` writes the compliance field as "pending review"
> and the gate blocks on it; you pass `--compliance-ok` yourself, after you've walked your
> platform's AI-content policy checklist. Methodology →
> and the gate blocks on it; you pass `--compliance-ok --reviewer "Your Name"` yourself, after
> you've walked your platform's AI-content policy checklist (the stamp carries the date and the
> reviewer; without `--reviewer` it uses `HOST_NAME` from `profiles/show.md`, and blocks if both
> are empty). `CLUSTER` must hold a real topic keyword too — a template placeholder fails P5.
> Methodology →
> [`knowledge/interview-show-playbook.md`](knowledge/interview-show-playbook.md).

## 8️⃣ Shorts rule calibration → override the `shorts_gate` thresholds ⭕optional (**only if you cut vertical Shorts**)
Expand Down
Loading
Loading