feat: add scientific subtitle review workflow
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: materialsub
|
||||
description: MaterialSub downloads maximum-quality videos, covers, and source subtitles from yt-dlp platforms or browser-confirmed authorized embedded HLS players; translates foreign subtitles with the active session model; creates bilingual captions; and burns captions plus an optional approved citation watermark into MP4. Use for video download, video-only or subtitle-only delivery, Chrome-authenticated download, bilingual subtitles, citation watermarks, or hard-burned caption delivery.
|
||||
description: MaterialSub downloads maximum-quality videos, covers, and source subtitles from yt-dlp platforms or browser-confirmed authorized embedded HLS players; translates foreign subtitles with the active session model; performs source-bound AI-assisted biomedical and life-science review; creates bilingual captions; and burns captions plus an optional approved citation watermark into MP4. Use for scientific video download, video-only or subtitle-only delivery, Chrome-authenticated download, bilingual subtitles, scientific translation review, citation watermarks, or hard-burned caption delivery.
|
||||
---
|
||||
|
||||
# MaterialSub
|
||||
@@ -26,6 +26,7 @@ For an approved citation, read [citation-watermark.md](references/citation-water
|
||||
7. A job is complete only when `verify_delivery.py` exits 0 for its declared `--deliver` target; the default `full` target requires translation, render, and burn.
|
||||
8. Keep context small: never read the full subtitle manifest, all batches at once, or raw FFmpeg logs.
|
||||
9. Treat signed playlist URLs like credentials: keep them in mode-600 local resource maps, never put them in shell arguments or final responses, and clean agent-created maps after a successful ingest.
|
||||
10. For biomedical or life-science subtitles, preserve the initial translation and complete the source-bound scientific-review gate before rendering. Never describe AI review as human expert approval.
|
||||
|
||||
## Run
|
||||
|
||||
@@ -91,12 +92,34 @@ Repeat `next-batch` → translate → write until it returns `done:true`; it val
|
||||
|
||||
When the target is Chinese (the default), apply the house style: replace internal `,。` pauses with spaces and omit them at cue endings; other targets keep native punctuation. Always preserve names, URLs, code, numerals, tone, and meaning. Do not merge, split, reorder, annotate, or add line breaks.
|
||||
|
||||
Render after the queue is complete:
|
||||
Do not render immediately after the translation queue completes. Read
|
||||
[scientific-review.md](references/scientific-review.md), then run its compact
|
||||
domain-profile and review batches with the active session model:
|
||||
|
||||
```bash
|
||||
python3 <skill-dir>/scripts/scientific_review.py next-batch \
|
||||
--manifest "<job-dir>/subtitles/subtitle-manifest.json" \
|
||||
--translations-dir "<job-dir>/subtitles/translation-output" \
|
||||
--review-dir "<job-dir>/subtitles/scientific-review"
|
||||
```
|
||||
|
||||
The first response requests a multi-label biomedical/life-science domain
|
||||
profile. Subsequent responses request bounded source-versus-translation review
|
||||
batches. Repeat until `done:true`, then run `scientific_review.py finalize`.
|
||||
This produces a separate reviewed translation set and JSON/Markdown report;
|
||||
the initial translations remain unchanged. Evidence-backed terminology or
|
||||
semantic corrections are applied, while uncertain source-caption, numeric,
|
||||
unit, drug, gene, protein, vector, strain, or model-name issues are preserved
|
||||
and flagged rather than guessed. Unresolved high-risk flags do not block the
|
||||
ordinary internal-use workflow, but must be disclosed in the final handoff.
|
||||
|
||||
Render only the reviewed translation set and bind its exact review report:
|
||||
|
||||
```bash
|
||||
python3 <skill-dir>/scripts/subtitle_pipeline.py render \
|
||||
--manifest "<job-dir>/subtitles/subtitle-manifest.json" \
|
||||
--translations-dir "<job-dir>/subtitles/translation-output" \
|
||||
--translations-dir "<job-dir>/subtitles/scientific-review/reviewed-translations" \
|
||||
--scientific-review-report "<job-dir>/subtitles/scientific-review/report.json" \
|
||||
--output-dir "<job-dir>/subtitles/rendered"
|
||||
```
|
||||
|
||||
@@ -122,6 +145,10 @@ python3 <skill-dir>/scripts/verify_delivery.py "<job-dir>/download-manifest.json
|
||||
```
|
||||
|
||||
Exit 3 identifies the unfinished stage; continue it immediately. Report success only after exit 0 and a non-empty bilingual MP4 exists when subtitles were available.
|
||||
When scientific review ran, also deliver `subtitles/scientific-review/report.md`.
|
||||
Call it “AI-assisted biomedical and life-science review,” not expert or human
|
||||
professional review. If `unresolved_high` is nonzero, include the report's
|
||||
disclosure verbatim in the handoff.
|
||||
|
||||
## Preflight and failures
|
||||
|
||||
|
||||
Reference in New Issue
Block a user