Rajio
Use this skill to translate Japanese audio/video into polished, carefully proofread
subtitles with rajio: prepare context, extract audio, transcribe Japanese, proofread
the transcript, run multi-round Simplified Chinese translation and review, polish the
final subtitle text, and export SRT/ASS files.
Do not use this skill unless the user explicitly asks for the rajio skill or asks you to
create polished Chinese subtitles from Japanese audio/video with rajio.
Non-Negotiable Rules
Quality comes first:
- The goal is accurate, natural, comfortable subtitles. Correctness, readability, tone,
subtitle flow, and viewing comfort outrank mechanical formatting cleanup.
rajio check is a quality floor, not the definition of finished quality. fatal means
invalid data or session state, error means a problem that seriously hurts readability in
ordinary cases, and warning means a recommended improvement.
- Clearing, skipping, or preserving
rajio check issues only establishes the technical
baseline. Manual review and text refinement are still required for ASR mistakes, proper
nouns, context, terminology, fixed phrases, translation consistency, concision, tone, and
Chinese subtitle polish.
- Do not satisfy QA heuristics by making subtitles less correct, less natural, or harder to
watch. Also do not ignore warnings mechanically: inspect remaining warnings and decide
case by case whether to fix, preserve, merge, split, retime, compress, or document the
exception.
Respect privacy and provider boundaries:
- Make the privacy boundary explicit before transcription. Rajio uploads audio to the configured
transcription provider; start transcription only after the user authorizes that upload.
- During
translation_work, do not use manual AI/API calls as a bulk machine-translation
service for whole subtitle ranges. This does not forbid using the configured ASR provider
for transcription. Sub-agents produce the first-draft batch translations from the provided
context; the main agent reviews, merges, validates, and performs the required full-file
Chinese refinement.
Respect manual-stage ownership:
transcript_work and translation_work are manual stages. Always process first-draft
proofreading and translation through sub-agent batches. If sub-agent tooling is
unavailable, stop and report that the manual stage cannot be completed under this skill.
- The main agent owns batch planning, patch review, patch application, glossary decisions,
consistency QA,
description.md, validation, commits, exports, and final reporting.
- The main agent must not proofread or translate the full first-draft manual stage by
itself. The explicit exception is final Chinese refinement: after sub-agent translation
batches have produced the first draft, the main agent must perform full-file Chinese
subtitle refinement as described in Refine Chinese Subtitles.
Define manual review strictly:
- Manual review means reading subtitle segment text in timeline order with enough
neighboring context to judge meaning, flow, timing, tone, terminology, and subtitle
comfort. It does not mean only running
rajio check, scanning issue summaries, applying
generated patches, or spot-checking validation examples.
- During
transcript_work, translation_work, and final Chinese refinement, agents must
use rajio segments list with explicit ranges, offsets, IDs, issue filters, and
neighboring context to inspect actual subtitle text in batches. Every segment in the
assigned or owned scope must be reviewed as text, not only as QA metadata.
- Batch workers must read every segment in their assigned range plus enough surrounding
segments to catch cross-boundary continuity problems. The main agent must review worker
patches, batch boundaries, glossary decisions, and at least one continuous full-file
Chinese pass after applying first-draft translation patches.
rajio check is only validation support. Passing checks, clearing warnings, adding
skip_checks, or applying suggested patches does not count as manual review unless the
affected subtitle text has been read in context.
- Do not use ad hoc automation scripts to edit
segments.toml, generate subtitle text,
generate translation/proofread patch operations, or add skip_checks. Write and review
subtitle edits through the manual process and rajio segments tooling.
- Automation scripts are allowed only for non-editing support such as collecting counts,
slicing check JSON for inspection, comparing statistics, or validating data shape. They
must support review, not replace reading and judgment.
- If a range was not read segment by segment in context, report it as unreviewed. Do not
call the stage polished or final.
Respect file boundaries:
- Never edit
transcript/raw/segments.toml or transcript/raw/checkpoints/*.toml. Raw
transcript files are references.
- Edit only the active manual work file,
description.md, and session-local patch or
review artifacts: transcript/work/segments.toml, translation/work/segments.toml,
description.md, and files under session-local patches/ or clip review directories.
description.md is the source of truth for media metadata, user notes, context,
glossary, fixed terms, style requirements, and unresolved uncertainty. Keep it current
throughout the session.
Use rajio tools deliberately:
- Use
rajio check as documented in the CLI section before commits and final reporting,
while remembering it is not a substitute for manual QA.
- Use
rajio segments commands for stable targeted edits to work-stage segments.toml:
list/filter segments, edit fields, split/merge subtitle units, and delete semantically
empty filler segments. Shape: rajio segments <command> <target>.
- Use
rajio clips commands for difficult source-video ranges that need independent
retranscription for comparison. Clip outputs are sidecar review artifacts only; do not
treat them as automatic replacements for transcript/work/segments.toml.
- Record intentional subtitle QA
error exceptions with per-segment skip_checks in the
work-stage segments.toml. Every skip must name the exact issue code and include a
reason. Never skip fatal data/file/schema/timeline issues, unfinished translation, or
unreviewed batches. Matched skips are omitted from check output; stale skips still report
fatal unused_skip_check.
Sub-Agent Batch Contract
- Spawn sub-agents for every
transcript_work proofread batch and every
translation_work translation batch. If sub-agent tooling is unavailable, stop and
report that manual stages cannot be completed under this skill.
- Run sub-agent batches within the active concurrency/thread limit, and close or release
completed workers before spawning more.
- Read SUB_AGENTS.md before spawning sub-agents. Keep this file focused
on workflow rules; use that document for mandatory batch-worker templates and
instructions.
- The main agent owns batch planning, patch application, glossary decisions, consistency
QA, final full-file Chinese refinement,
description.md, rajio check, commits,
exports, and final reporting.
Required Input
- Local audio/video path. Refuse to start without this.
- Optional but preferred: title, original URL, publish date, uploader/channel, synopsis,
cast, program/corner names, user notes, fixed terminology, and translation style
requirements.
If optional metadata is missing, proceed with filename-based defaults, record the
uncertainty in description.md, and revisit it when transcript context reveals more.
CLI Quick Reference
For complete command syntax, examples, output formats, segment patch shape, clip artifact
details, and environment variables, read CLI.md.
For ASR provider configuration, chunk/checkpoint artifacts, and provider-specific doctor
behavior, read references/configuration.md only when changing
transcription config or debugging provider issues.
Check whether rajio is available:
command -v rajio
If it is not installed, run commands through npx rajio ....
Command Overview
Use the installed CLI:
rajio <target> [options]
rajio segments <command> <target> --stage transcript
rajio clips <command> <target>
rajio check <target>
rajio doctor <target>
Default Command
The default command drives the whole session workflow.
Default command media option:
--media <path>: invocation-only media override.
Default command workflow controls:
--continue=until-manual: run automatic stages until the next manual stage.
--continue=step: run one automatic stage.
--commit: commit the current manual stage after validating its work file.
--reset <stage>: regenerate from audio, transcript_raw, transcript_work,
translation_work, or export.
--full: runs automatic stages only; manual stages still require sub-agent batch work
and --commit.
Audio chunk options:
--chunk-target <seconds>: local audio chunk target. Default 600, minimum 60.
--chunk-boundary-search <seconds>: silence search window around the target cut point.
Default 90, range 0..300.
--chunk-silence-noise <db>: ffmpeg silencedetect threshold. Default -35.
--chunk-silence-duration <seconds>: minimum silence duration. Default 0.4.
The selected transcription provider decides whether these options produce local chunk artifacts.
For provider-specific behavior, read references/configuration.md.
Segments
Most rajio segments commands print affected segment rows. segments apply is the
exception: by default it prints operation counts plus patch-scoped check feedback. Agents
should default to --json for parseable output. When using verbose JSON, pipe the output
through jq to select only the fields you need instead of reading the full raw payload.
See CLI.md for JSON structures.
Segment command examples:
rajio segments list /path/to/session --json --stage transcript
rajio segments list /path/to/session --json --stage transcript --id 12
rajio segments list /path/to/session --json --stage transcript --id 12,15,19
rajio segments list /path/to/session --json --stage transcript --id 12,15,19 --around 3
rajio segments list /path/to/session --json --stage transcript --offset 100 --limit 50
rajio segments list /path/to/session --json --stage transcript --start 600 --end 660
rajio segments list /path/to/session --json --stage translation --issues empty_zh,zh_line_hard_limit
rajio segments list /path/to/session --json --stage translation --issues duration_too_long --level error
rajio segments list /path/to/session --json --stage translation --issues empty_zh --offset 100 --limit 50
rajio segments apply /path/to/session patch.toml --json --stage translation
rajio segments apply /path/to/session --json --stage translation <<'EOF'
[[operations]]
op = "edit"
segment_id = "12"
zh = "修正后的中文字幕"
EOF
rajio segments edit /path/to/session 12 --json --stage transcript --start 10.2 --end 13.4 --speaker A --ja "修正した日本語"
rajio segments edit /path/to/session 12 --json --stage transcript --ja "修正した日本語" --dry-run
rajio segments split /path/to/session 12 --json --stage transcript --at 11.8 --gap 0.05 --id1 12.1 --id2 12.2 --ja1 "前半の日本語" --ja2 "後半の日本語" --speaker1 A --speaker2 B
rajio segments merge /path/to/session 12.1 12.2 --json --stage transcript --id 12 --ja "結合した日本語" --speaker A,B
rajio segments insert /path/to/session 12.5 --json --stage transcript --start 42.0 --end 43.2 --speaker A --ja "追加された字幕"
rajio segments delete /path/to/session 13 --json --stage transcript
In segments commands, pass /path/to/session after the segment subcommand. Replace
--stage transcript with --stage translation for translation/work/segments.toml.
Segment ids must be non-empty, trimmed strings without commas.
segments list selects rows by id, time range, validation issue, or plain pagination:
--id <ids>: show a comma-separated id list in requested order. Segment ids
themselves must not contain commas.
--id <ids> --around <count>: show surrounding context for each requested id,
deduplicated in timeline order.
--start <time> --end <time>: show segments whose start time is in [start, end).
--issues <codes>: show segments matching validation codes such as invalid_time,
ja_line_hard_limit, or empty_zh; add --level error to exclude warning-level
matches for soft-or-hard codes like duration and reading speed. Add --offset and
--limit to page through issue matches.
--offset <count> --limit <count>: show a zero-based window after any issue filtering;
omit --limit to read from offset to the end. Do not combine with --id, --around,
or --start/--end.
segments apply <target> [file] applies an ordered TOML patch as the batch form of edit,
split, merge, insert, and delete. Pass a file path, or omit [file] only when providing
stdin in the same shell command, such as <<'EOF' ... EOF. For batch work, prefer a patch file
under a session-local patches/ directory. Normal apply writes the patched segments, then
runs patch-scoped check feedback. --dry-run validates the patch, previews affected output,
and runs the same checks without writing changes. Use --verbose --json with jq when you
need affected segment rows and their remaining issues.
created_by = "worker-a"
start = 120.0
end = 180.0
[[operations]]
op = "edit"
segment_id = "12"
zh = "修正后的中文字幕"
[[operations]]
op = "edit"
segment_id = "title"
skip_checks = [
{ code = "zh_repeated_punctuation", reason = "Official title spelling." },
{ code = "zh_line_hard_limit", reason = "Official title should stay on one line." }
]
[[operations]]
op = "split"
source_id = "long"
gap = 0.05
[[operations.replacements]]
segment_id = "long.1"
start = 10.0
end = 13.2
speaker = "A"
ja = "前半の日本語"
zh = "前半中文字幕"
[[operations.replacements]]
segment_id = "long.2"
start = 13.2
end = 16.0
speaker = "A"
ja = "後半の日本語"
zh = "后半中文字幕"
[[operations]]
op = "merge"
source_ids = ["13.1", "13.2"]
merged_id = "13"
speaker = "A,B"
ja = "結合した日本語"
zh = "合并后的中文字幕"
[[operations]]
op = "insert"
segment_id = "13.5"
start = 16.2
end = 17.0
speaker = "A"
ja = "追加された字幕"
zh = "新增字幕"
[[operations]]
op = "delete"
segment_id = "14"
Clips
Clip command examples:
rajio clips transcribe /path/to/session --start 120 --end 180 --label noisy-overlap
rajio clips list /path/to/session --json
rajio clips show /path/to/session clip-120000-180000 --json
Use clips when an initial transcription has a complex, noisy, overlapped, or error-prone
time range that should be independently recognized for comparison. clips list prints
only clip rows; clips show prints only that clip's segments.toml. Agents should
default to --json for clips list and clips show; otherwise output is a
human-readable table. See CLI.md for JSON structures.
Check
Use rajio check before committing manual stages and before final reporting. It validates
session shape, timeline integrity, required text, and subtitle QA heuristics, but it does
not replace semantic review for ASR mistakes, names, terms, context, translation quality,
or editorial polish. Treat the levels as follows:
fatal: invalid data or session state; fix before proceeding.
error: a problem that seriously hurts subtitle readability in ordinary cases; fix it
unless a specific reviewed exception is better for accuracy or viewing comfort.
warning: a recommendation; inspect it and make a local editorial decision instead of
mechanically fixing or mechanically ignoring it.
Passing rajio check, including with zero fatal/error issues, does not mean the
subtitles are polished. It only means the work has passed the baseline data and subtitle
heuristic checks.
Use --json for machine-readable output; pipe it to jq when you need to extract fields
or slice down the output. See CLI.md for JSON structures.
rajio check /path/to/session --json --level error: show blocking fatal and error
issues.
rajio check /path/to/session --json --stage transcript --language ja: check transcript
work Japanese QA. Transcript checks only support ja.
rajio check /path/to/session --json --stage translation: check translation work Chinese QA;
zh is the default language for translation.
rajio check /path/to/session --json --stage translation --language ja: inspect Japanese
subtitle QA inherited into translation/work/segments.toml.
- Add
--verbose only when you need full sorted issues, such as locating exact
segment IDs and issue codes before adding skip_checks. When using verbose JSON, pipe
it through jq to inspect only the fields you need instead of reading the full raw
payload.
Subtitle QA Rules
These are the subtitle QA thresholds enforced by rajio check; severity, stage, and
language filtering follow the Check section above.
| Rule |
Warning |
Error |
| Japanese line length |
ja line exceeds 20 visible non-space characters |
ja line exceeds 28 visible non-space characters |
| Chinese line length |
zh line exceeds 16 visible non-space characters |
zh line exceeds 24 visible non-space characters |
| Line breaks |
2 lines that still need review after merge-length check |
More than 2 lines, or 2 lines that merge within the soft length and should be one line |
| Subtitle duration |
shorter than 0.5 seconds or longer than 7 seconds |
shorter than 0.3 seconds or longer than 10 seconds |
| Reading speed |
Japanese exceeds 15 chars/s; Chinese exceeds 11 chars/s |
Japanese exceeds 20 chars/s; Chinese exceeds 15 chars/s |
| Adjacent gap |
gap is 50-150 ms |
gap is under 50 ms |
| Punctuation |
none |
ordinary comma/period punctuation, ordinary sentence-ending punctuation, 2+ repeated question/exclamation marks, or punctuation-only line |
Do not satisfy numeric limits by creating unreadable single-character, single-syllable,
or isolated filler subtitles. Prefer natural compression, merging with an adjacent segment,
retiming, or splitting at a semantic pause. Single ? or ! is allowed when needed for
intent, but use it sparingly.
Warnings are still work items. Review them in context and either improve the subtitle or
keep the current form because it is more accurate, natural, or comfortable than the
mechanical alternative.
Workflow
0. Prepare The Session
- Resolve the media path to an absolute path and confirm it exists.
- Choose the session directory. If the user provides one, use it. Otherwise create one
near the media file or in the current workspace using a filesystem-safe title or media
stem. Do not copy large media files unless the user asks.
- Create or update
description.md.
- Gather confirmed context before transcription when practical. Use the original URL,
official pages, video title, filenames, on-screen text, user notes, and later transcript
discoveries. Record uncertainty explicitly instead of guessing.
Use this description.md shape:
---
media: ./video.mp4
title: Video title or filename stem
url: https://example.com/original
published_at: 2026-06-06
---
## Context
- Source/uploader:
- User notes:
- Video synopsis:
- Cast/speakers:
- Program/corner structure:
- Known fixed greetings or sign-offs:
- Related events/products/works mentioned:
## Glossary And Fixed Terms
- Japanese term/person/place -> Chinese translation or note
- Common ASR confusion -> Correct Japanese term / Chinese translation
## Style Requirements
- Translate into natural Simplified Chinese subtitles.
- Preserve important names and terminology consistently.
1. Run To Transcript Work
Before automatic stages, run:
rajio doctor /path/to/session
rajio doctor reports the rajio CLI version and update-check result first. Confirm the CLI version matches this SKILL frontmatter metadata.version; if they differ, or doctor reports a newer version is available or update checking failed, report that before starting automatic stages. It also validates runtime configuration and provider access using the target directory for .env loading. Do not start transcription until rajio doctor passes or the environment issue is resolved.
Run:
rajio /path/to/session --continue=until-manual
Expected result: rajio creates or reads session.toml, extracts audio, transcribes
Japanese, writes raw transcript artifacts, creates transcript/work/segments.toml, and
stops at transcript_work.
Wait for transcript/raw/checkpoints/input-*.toml or
transcript/raw/checkpoints/input-*.error.log. Do not restart while requests may still be in
flight unless there is a clear CLI/provider failure.
Treat automatically created work segments as a draft.
Rajio may write suggested patches under
transcript/work/suggested-patches/, but never applies them automatically. Review them during
the proofread stage below.
Suggested patch review:
- Review suggested patches in numeric filename order before spawning transcript workers.
- Before spawning transcript workers, either apply, manually fold in, or explicitly reject
each suggested patch, including
*-low.* files.
- Treat
confidence = "medium" patches with extra care and *-low.* files as manual
decision candidates, not automatic cleanup or post-worker TODOs.
- Patch
reason and confidence fields do not change apply behavior.
Example generated files:
transcript/work/suggested-patches/
01-punctuation-cleanup-chunk-000-000000s-000600s-high.toml
02-fragment-merge-chunk-000-000000s-000600s-high.toml
02-fragment-merge-chunk-000-000000s-000600s-medium.toml
03-boundary-retime-chunk-000-000000s-000600s-high.toml
04-long-segment-candidates-chunk-000-000000s-000600s-low.md
2. Proofread And Polish Japanese
Proofread flow:
- Review automatically generated suggested patches under
transcript/work/suggested-patches/, adjust them if needed, dry-run them with
rajio segments apply <session> <patch> --stage transcript --dry-run, then apply,
manually incorporate, or reject them before assigning worker ranges.
- Spawn transcript proofread sub-agents following SUB_AGENTS.md. Each
worker gets a label and assigned source-media
start/end range.
- Review each worker patch file, dry-run summary, and final report confirmations. Apply
accepted patches to
transcript/work/segments.toml. A blocker report is not an
accepted patch; resolve it or reassign that range before committing.
- Manually perform a whole-transcript review and polish pass for context, terminology,
fixed phrases, structure, and readability across batch boundaries.
- Commit
transcript_work only after semantic review and validation are clean, or only
intentional subtitle QA exceptions remain with exact skip_checks.
Transcript review requirements:
- Use the segment commands documented in the CLI section with
--stage transcript for
transcript inspection, patch review, patch application, and validation.
- Do not translate in this stage; only correct and polish the Japanese transcript.
- The main agent's proofread and polish pass must be the manual review defined in
Non-Negotiable Rules. Use
rajio segments list to read the
actual transcript text in timeline-order batches with neighboring context, review
suggested and worker patches against those segments, and inspect batch boundaries.
rajio check, suggested patches, issue filters, dry-run summaries, or statistics are
only supporting evidence. They do not count as transcript proofreading unless the
affected subtitle text is read in context.
For complex, noisy, overlapped, or suspicious ASR ranges, the main agent or a sub-agent may
use rajio clips transcribe to retranscribe the original media time range as sidecar
evidence. Then use
rajio clips list --json and rajio clips show <id> --json to compare the alternate
transcript against transcript/work/segments.toml. Clip output is reference material; do
not treat it as an automatic replacement.
Validate often with rajio check as documented in the CLI section. This only checks data
shape, timing, required fields, and subtitle limits; before committing, still polish the
content semantically against the acceptance criteria below.
Acceptance criteria:
- Every segment has stable
id, numeric start/end, non-empty speaker, and non-empty
Japanese ja.
- Timestamps increase and do not overlap.
- Japanese text is coherent, natural, and corrected against
description.md, glossary,
proper nouns, and raw transcript references.
- Known names, program titles, corner names, event names, hashtags, greetings, mail reads,
and sign-offs are corrected consistently.
- Search the whole transcript for likely ASR variants of fixed terms, not only exact
glossary terms.
- Check high-risk positions explicitly: opening title call, self-introductions, listener
greetings, corner starts, event announcements, mail-address reads, and ending sign-off.
- Follow the Subtitle QA Rules for line length, line count, duration, reading speed, gaps,
and punctuation.
Speaker and segment structure:
- A normal segment should represent one readable subtitle unit.
- Do not preserve unreadable fragments such as single characters or syllables when adjacent
fragments form one jointly spoken phrase.
- If multiple speakers complete the same short phrase together, merge it into one segment
with complete
ja; combine speakers with comma-separated values such as
speaker = "A,B" when attribution matters.
- Preserve segment IDs unless a structural correction truly requires a change.
Before committing:
- Update
description.md with newly confirmed context and terminology.
- Search for known ASR confusions and wrong proper nouns.
- Spot-check opening, middle, and ending subtitles for proper nouns and fixed phrases.
- Confirm no remaining segment is an unreadable fragment that should be merged.
When clean:
rajio /path/to/session --commit --continue=until-manual
If only intentional subtitle QA exceptions remain, inspect them first:
rajio check /path/to/session --json --stage transcript --language ja --verbose
If preserving an exception improves accuracy, naturalness, or readability, add
skip_checks to the affected segment with the exact issue code and a reason, then commit
normally:
rajio /path/to/session --commit --continue=until-manual
Expected result: rajio commits transcript_work, creates
translation/work/segments.toml, and stops at translation_work.
3. Translate And Polish Chinese
Initial translation flow:
- Plan explicit translation batches by non-overlapping source-media time ranges instead
of attempting the whole file in one pass. Choose range sizes by dialogue density and
the active sub-agent concurrency limit.
- Spawn translation sub-agents following SUB_AGENTS.md. Each worker gets
a label and assigned source-media
start/end range.
- Review each worker patch file, dry-run summary, and final report confirmations. Apply
accepted patches to
translation/work/segments.toml so every segment has filled or
refined zh. A blocker report is not an accepted patch or a completed batch; resolve
it or reassign that range before committing.
- Manually perform a whole-file first-draft review for terminology, subtitle continuity,
missing translations, Japanese corrections made during translation, and cross-batch
style consistency.
- Commit
translation_work and export only after every batch has been translated,
terminology has been cross-checked, and validation has no blocking fatal or Chinese
error issues except reviewed intentional subtitle QA exceptions.
Translation review requirements:
- Use the segment commands documented in the CLI section with
--stage translation for
translation inspection, patch review, patch application, and validation.
- Fill or refine translated subtitle text in
zh; keep Japanese corrections limited to
transcript issues found while translating.
- The main agent's first-draft translation review must be the manual review defined in
Non-Negotiable Rules. Use
rajio segments list to read
translated segments in timeline-order batches with neighboring context, compare ja and
zh, review worker patches against those segments, and inspect batch boundaries.
rajio check, issue lists, dry-run summaries, or statistics are only supporting
evidence. They do not count as translation review unless the subtitle text is read in
context.
During batch work, keep glossary updates and unresolved uncertainty in description.md,
and search earlier completed batches when a new name, phrase, or style decision appears.
Before committing, confirm this command has no blocking fatal or Chinese error issues:
rajio check /path/to/session --json --stage translation
To inspect Japanese QA in the current translation work file, run the same command with
--language ja.
During translation_work, translation/work/segments.toml is the active subtitle work
file. If translation reveals a Japanese typo, wrong name, wrong fixed phrase, missing
context, or bad segment structure, correct the relevant ja and zh in
translation/work/segments.toml and update description.md when the decision affects
terminology or future batches.
If a translation problem points back to an uncertain or messy source-audio range, use
rajio clips transcribe for that original media time range and inspect it with
rajio clips show <id> --json. Use the sidecar transcript as a second reference before
editing the committed transcript and reconciling the translation.
Validate often with rajio check as documented in the CLI section. This only checks data
shape, timing, required fields, and subtitle limits; before committing, still polish the
content semantically against the acceptance criteria below.
Acceptance criteria:
- Keep
id, start, end, and speaker stable unless a structural correction or
intentionally removed semantically empty filler genuinely requires a change. ja may be
corrected in translation/work/segments.toml when translation review finds a Japanese
typo, name, or fixed-phrase issue.
- Every segment has non-empty
zh.
- Chinese is natural Simplified Chinese subtitle language, not word-by-word literal output.
- Preserve meaning, tone, speaker intent, jokes, references, and discourse flow.
- Very short segments that are only meaningless fillers, breaths, interjections, or pure
hesitation sounds may be deleted from the subtitle if removing them does not change
meaning, speaker intent, or timing comprehension.
- Smooth spoken hesitation, false starts, and harmless repetition in Chinese unless they are
semantically important, characterize the speaker, or affect the scene's rhythm.
- Remove unnecessary Chinese filler and transcript-shaped clutter, including but not
limited to redundant
嗯, 啊, 哦, 呃, 欸, 那个, 就是, repeated 对对对,
duplicated verbs, repeated subjects, stalled false starts, and trailing particles such
as 嘛 when they do not carry tone or timing value. Treat these as review candidates,
not a fixed deletion list. Keep interjections when they express a real reaction, joke
beat, surprise, embarrassment, or speaker personality.
- Keep Chinese renderings globally consistent for people, programs, corners, events,
hashtags, works, products, honorific decisions, and recurring phrases.
- Use
description.md as the glossary and style source. Update it if new confirmed terms
are discovered.
- Translate merged multi-speaker phrases as one complete subtitle. Do not preserve
syllable-by-syllable fragments in Chinese.
- Follow the Subtitle QA Rules for line length, line count, duration, reading speed, gaps,
and punctuation.
- Do not create an awkward short trailing subtitle only to satisfy a warning threshold.
Preserve subtitle continuity and readability first.
Before committing:
- Compare
description.md glossary against translation/work/segments.toml.
- Search for inconsistent Chinese names, untranslated Japanese names, wrong titles, and
stale translations from earlier draft assumptions.
- Spot-check opening, middle, ending, fixed greetings, mail reads, event announcements,
and sign-off for Japanese correctness and Chinese readability.
- Check subtitle continuity across adjacent segments: the Chinese should read as connected
dialogue, not isolated literal fragments.
- Review Japanese
error and warning issues still present in
translation/work/segments.toml:
rajio check /path/to/session --json --stage translation --language ja --level warning
- Record unresolved uncertainty in
description.md or mention it in the final report.
When clean, commit and export the first translation draft:
rajio /path/to/session --commit --continue=until-manual
If intentional Chinese QA exceptions remain, inspect them first:
rajio check /path/to/session --json --stage translation --verbose
Add skip_checks to each affected segment only after manual review confirms every
remaining error issue is an intentional subtitle QA exception and no fatal issues
remain. Then commit normally.
rajio /path/to/session --commit --continue=until-manual
Expected result: rajio commits translation_work, runs export, and reaches the
terminal done state. This ends the CLI workflow, but the exported subtitles are still
only a first-pass translation and proofread draft. The current main agent must continue
with the refinement pass below before treating the subtitles as final polished output.
Expected draft output:
output/*.ja.srt
output/*.zh.srt
output/*.ja-zh.ass
4. Refine Chinese Subtitles
After the first draft export, the main agent must perform at least three full-pass Chinese
subtitle refinement passes over translation/work/segments.toml, and should keep
iterating while meaningful improvements remain. This is not a
substitute for the sub-agent batch translation stage: do not use these passes to fill
large missing sections or redo the whole translation from scratch. Use them to raise the
already translated draft to final subtitle quality.
Preserve the committed draft's structure unless a change clearly improves accuracy,
readability, or subtitle continuity. Do not break the Subtitle QA Rules, timeline
integrity, required fields, segment IDs, or transcript alignment. If refinement changes
the work file after export, recommit translation_work and regenerate export output.
Required refinement pass loop:
For each Chinese refinement pass, follow these steps exactly:
- Read
translation/work/segments.toml from start to end in timeline order as actual
ja/zh subtitle text, using rajio segments list windows or ranges with neighboring
context until the full file is covered. This full read is mandatory; do not replace it
with rg, rajio check, issue summaries, issue lists, issue IDs, examples, filters,
or statistics.
- Edit the Chinese subtitles for style, flow, tone, concision, consistency, and viewing
comfort. Update matching
ja, glossary, or description.md entries only when the
Chinese review exposes a confirmed source or term problem.
- Run the translation checks for
zh and ja only as regression checks. Final
refinement starts from a committed draft that should already have no blocking
fatal or error issues; if this pass introduces any new fatal or error, fix it
immediately. Warnings may guide inspection, but this pass is not mechanical warning
cleanup.
- Reread every segment changed in this pass one by one in its final subtitle form, with
neighboring context for boundary flow.
- If the reread finds a style, meaning, flow, or consistency problem, fix it. If checks
show a new
fatal or error, fix it immediately. Then repeat steps 3-4.
- Count the pass complete only after the full-file read, editorial pass, regression
checks, and changed-segment reread are all done.
Refinement requirements:
- Perform at least three full-file Chinese refinement passes before final verification. A
pass must make a deliberate full-file check for text quality, not only run
rajio check.
- Each refinement pass must satisfy the manual review definition in
Non-Negotiable Rules: read the actual
ja/zh segment text in
timeline order with neighboring context, using rajio segments list windows or ranges
to cover the full file. Warning lists, statistics, scripted transformations, and
validation output may guide where to look, but they do not count as a refinement pass.
- Do not substitute
rg searches, rajio check summaries, rajio check --verbose issue
lists, issue IDs, examples, or filtered issue views for full-file reading. They are only
navigation aids; the pass counts only when the subtitle text itself was read and edited
in order.
- Read the Chinese subtitles continuously across adjacent segments, not only segment by
segment. Repair places where the text reads like isolated translated fragments.
- Enforce global term consistency for names, programs, corners, events, works, products,
hashtags, recurring jokes, honorific choices, and fixed phrases.
- Match register, tone, and speaker intent to the local context: casual speech should not
become stiff, jokes should not become flat, and emotional emphasis should not disappear.
- Prefer natural Simplified Chinese subtitle language over literal completeness. Compress
harmless repetition and spoken clutter when the source meaning, rhythm, and speaker
personality are preserved.
- Clean up filler-heavy Chinese, wordiness, and direct translation artifacts, including
but not limited to redundant interjections, duplicated words or clauses, repeated
subjects, over-explicit pronouns, stalled false starts, stiff connectives, explanatory
padding, and literal translations of Japanese hesitation. Treat these as review
candidates rather than a fixed deletion list; delete or rewrite them when they only
mirror source disfluency or make the subtitle read like prose instead of subtitles.
- Check pronouns, ellipses, omitted subjects, callbacks, and topic shifts against nearby
Japanese context so Chinese lines do not become ambiguous or misleading.
- Smooth sentence flow across subtitle boundaries while keeping each subtitle readable on
its
…(truncated)
1---2name: rajio3description: Use only when explicitly asked to use rajio for Japanese audio/video subtitle translation.4---56# Rajio78Use this skill to translate Japanese audio/video into polished, carefully proofread9subtitles with `rajio`: prepare context, extract audio, transcribe Japanese, proofread10the transcript, run multi-round Simplified Chinese translation and review, polish the11final subtitle text, and export SRT/ASS files.1213Do not use this skill unless the user explicitly asks for the rajio skill or asks you to14create polished Chinese subtitles from Japanese audio/video with rajio.1516## Non-Negotiable Rules1718Quality comes first:1920- The goal is accurate, natural, comfortable subtitles. Correctness, readability, tone,21 subtitle flow, and viewing comfort outrank mechanical formatting cleanup.22- `rajio check` is a quality floor, not the definition of finished quality. `fatal` means23 invalid data or session state, `error` means a problem that seriously hurts readability in24 ordinary cases, and `warning` means a recommended improvement.25- Clearing, skipping, or preserving `rajio check` issues only establishes the technical26 baseline. Manual review and text refinement are still required for ASR mistakes, proper27 nouns, context, terminology, fixed phrases, translation consistency, concision, tone, and28 Chinese subtitle polish.29- Do not satisfy QA heuristics by making subtitles less correct, less natural, or harder to30 watch. Also do not ignore warnings mechanically: inspect remaining warnings and decide31 case by case whether to fix, preserve, merge, split, retime, compress, or document the32 exception.3334Respect privacy and provider boundaries:3536- Make the privacy boundary explicit before transcription. Rajio uploads audio to the configured37 transcription provider; start transcription only after the user authorizes that upload.38- During `translation_work`, do not use manual AI/API calls as a bulk machine-translation39 service for whole subtitle ranges. This does not forbid using the configured ASR provider40 for transcription. Sub-agents produce the first-draft batch translations from the provided41 context; the main agent reviews, merges, validates, and performs the required full-file42 Chinese refinement.4344Respect manual-stage ownership:4546- `transcript_work` and `translation_work` are manual stages. Always process first-draft47 proofreading and translation through sub-agent batches. If sub-agent tooling is48 unavailable, stop and report that the manual stage cannot be completed under this skill.49- The main agent owns batch planning, patch review, patch application, glossary decisions,50 consistency QA, `description.md`, validation, commits, exports, and final reporting.51- The main agent must not proofread or translate the full first-draft manual stage by52 itself. The explicit exception is final Chinese refinement: after sub-agent translation53 batches have produced the first draft, the main agent must perform full-file Chinese54 subtitle refinement as described in [Refine Chinese Subtitles](#4-refine-chinese-subtitles).5556Define manual review strictly:5758- Manual review means reading subtitle segment text in timeline order with enough59 neighboring context to judge meaning, flow, timing, tone, terminology, and subtitle60 comfort. It does not mean only running `rajio check`, scanning issue summaries, applying61 generated patches, or spot-checking validation examples.62- During `transcript_work`, `translation_work`, and final Chinese refinement, agents must63 use `rajio segments list` with explicit ranges, offsets, IDs, issue filters, and64 neighboring context to inspect actual subtitle text in batches. Every segment in the65 assigned or owned scope must be reviewed as text, not only as QA metadata.66- Batch workers must read every segment in their assigned range plus enough surrounding67 segments to catch cross-boundary continuity problems. The main agent must review worker68 patches, batch boundaries, glossary decisions, and at least one continuous full-file69 Chinese pass after applying first-draft translation patches.70- `rajio check` is only validation support. Passing checks, clearing warnings, adding71 `skip_checks`, or applying suggested patches does not count as manual review unless the72 affected subtitle text has been read in context.73- Do not use ad hoc automation scripts to edit `segments.toml`, generate subtitle text,74 generate translation/proofread patch operations, or add `skip_checks`. Write and review75 subtitle edits through the manual process and `rajio segments` tooling.76- Automation scripts are allowed only for non-editing support such as collecting counts,77 slicing check JSON for inspection, comparing statistics, or validating data shape. They78 must support review, not replace reading and judgment.79- If a range was not read segment by segment in context, report it as unreviewed. Do not80 call the stage polished or final.8182Respect file boundaries:8384- Never edit `transcript/raw/segments.toml` or `transcript/raw/checkpoints/*.toml`. Raw85 transcript files are references.86- Edit only the active manual work file, `description.md`, and session-local patch or87 review artifacts: `transcript/work/segments.toml`, `translation/work/segments.toml`,88 `description.md`, and files under session-local `patches/` or clip review directories.89- `description.md` is the source of truth for media metadata, user notes, context,90 glossary, fixed terms, style requirements, and unresolved uncertainty. Keep it current91 throughout the session.9293Use rajio tools deliberately:9495- Use `rajio check` as documented in the CLI section before commits and final reporting,96 while remembering it is not a substitute for manual QA.97- Use `rajio segments` commands for stable targeted edits to work-stage `segments.toml`:98 list/filter segments, edit fields, split/merge subtitle units, and delete semantically99 empty filler segments. Shape: `rajio segments <command> <target>`.100- Use `rajio clips` commands for difficult source-video ranges that need independent101 retranscription for comparison. Clip outputs are sidecar review artifacts only; do not102 treat them as automatic replacements for `transcript/work/segments.toml`.103- Record intentional subtitle QA `error` exceptions with per-segment `skip_checks` in the104 work-stage `segments.toml`. Every skip must name the exact issue code and include a105 reason. Never skip `fatal` data/file/schema/timeline issues, unfinished translation, or106 unreviewed batches. Matched skips are omitted from check output; stale skips still report107 `fatal unused_skip_check`.108109## Sub-Agent Batch Contract110111- Spawn sub-agents for every `transcript_work` proofread batch and every112 `translation_work` translation batch. If sub-agent tooling is unavailable, stop and113 report that manual stages cannot be completed under this skill.114- Run sub-agent batches within the active concurrency/thread limit, and close or release115 completed workers before spawning more.116- Read [SUB_AGENTS.md](SUB_AGENTS.md) before spawning sub-agents. Keep this file focused117 on workflow rules; use that document for mandatory batch-worker templates and118 instructions.119- The main agent owns batch planning, patch application, glossary decisions, consistency120 QA, final full-file Chinese refinement, `description.md`, `rajio check`, commits,121 exports, and final reporting.122123## Required Input124125- Local audio/video path. Refuse to start without this.126- Optional but preferred: title, original URL, publish date, uploader/channel, synopsis,127 cast, program/corner names, user notes, fixed terminology, and translation style128 requirements.129130If optional metadata is missing, proceed with filename-based defaults, record the131uncertainty in `description.md`, and revisit it when transcript context reveals more.132133## CLI Quick Reference134135For complete command syntax, examples, output formats, segment patch shape, clip artifact136details, and environment variables, read [CLI.md](CLI.md#rajio-cli-reference).137138For ASR provider configuration, chunk/checkpoint artifacts, and provider-specific `doctor`139behavior, read [references/configuration.md](references/configuration.md) only when changing140transcription config or debugging provider issues.141142Check whether `rajio` is available:143144```bash145command -v rajio146```147148If it is not installed, run commands through `npx rajio ...`.149150### Command Overview151152Use the installed CLI:153154```bash155rajio <target> [options]156rajio segments <command> <target> --stage transcript157rajio clips <command> <target>158rajio check <target>159rajio doctor <target>160```161162### Default Command163164The default command drives the whole session workflow.165166Default command media option:167168- `--media <path>`: invocation-only media override.169170Default command workflow controls:171172- `--continue=until-manual`: run automatic stages until the next manual stage.173- `--continue=step`: run one automatic stage.174- `--commit`: commit the current manual stage after validating its work file.175- `--reset <stage>`: regenerate from `audio`, `transcript_raw`, `transcript_work`,176 `translation_work`, or `export`.177- `--full`: runs automatic stages only; manual stages still require sub-agent batch work178 and `--commit`.179180Audio chunk options:181182- `--chunk-target <seconds>`: local audio chunk target. Default `600`, minimum `60`.183- `--chunk-boundary-search <seconds>`: silence search window around the target cut point.184 Default `90`, range `0..300`.185- `--chunk-silence-noise <db>`: ffmpeg `silencedetect` threshold. Default `-35`.186- `--chunk-silence-duration <seconds>`: minimum silence duration. Default `0.4`.187188The selected transcription provider decides whether these options produce local chunk artifacts.189For provider-specific behavior, read [references/configuration.md](references/configuration.md).190191### Segments192193Most `rajio segments` commands print affected segment rows. `segments apply` is the194exception: by default it prints operation counts plus patch-scoped check feedback. Agents195should default to `--json` for parseable output. When using verbose JSON, pipe the output196through `jq` to select only the fields you need instead of reading the full raw payload.197See [CLI.md](CLI.md#segments-commands) for JSON structures.198199Segment command examples:200201```bash202rajio segments list /path/to/session --json --stage transcript203rajio segments list /path/to/session --json --stage transcript --id 12204rajio segments list /path/to/session --json --stage transcript --id 12,15,19205rajio segments list /path/to/session --json --stage transcript --id 12,15,19 --around 3206rajio segments list /path/to/session --json --stage transcript --offset 100 --limit 50207rajio segments list /path/to/session --json --stage transcript --start 600 --end 660208rajio segments list /path/to/session --json --stage translation --issues empty_zh,zh_line_hard_limit209rajio segments list /path/to/session --json --stage translation --issues duration_too_long --level error210rajio segments list /path/to/session --json --stage translation --issues empty_zh --offset 100 --limit 50211rajio segments apply /path/to/session patch.toml --json --stage translation212rajio segments apply /path/to/session --json --stage translation <<'EOF'213[[operations]]214op = "edit"215segment_id = "12"216zh = "修正后的中文字幕"217EOF218rajio segments edit /path/to/session 12 --json --stage transcript --start 10.2 --end 13.4 --speaker A --ja "修正した日本語"219rajio segments edit /path/to/session 12 --json --stage transcript --ja "修正した日本語" --dry-run220rajio segments split /path/to/session 12 --json --stage transcript --at 11.8 --gap 0.05 --id1 12.1 --id2 12.2 --ja1 "前半の日本語" --ja2 "後半の日本語" --speaker1 A --speaker2 B221rajio segments merge /path/to/session 12.1 12.2 --json --stage transcript --id 12 --ja "結合した日本語" --speaker A,B222rajio segments insert /path/to/session 12.5 --json --stage transcript --start 42.0 --end 43.2 --speaker A --ja "追加された字幕"223rajio segments delete /path/to/session 13 --json --stage transcript224```225226In `segments` commands, pass `/path/to/session` after the segment subcommand. Replace227`--stage transcript` with `--stage translation` for `translation/work/segments.toml`.228Segment ids must be non-empty, trimmed strings without commas.229230`segments list` selects rows by id, time range, validation issue, or plain pagination:231232- `--id <ids>`: show a comma-separated id list in requested order. Segment ids233 themselves must not contain commas.234- `--id <ids> --around <count>`: show surrounding context for each requested id,235 deduplicated in timeline order.236- `--start <time> --end <time>`: show segments whose `start` time is in `[start, end)`.237- `--issues <codes>`: show segments matching validation codes such as `invalid_time`,238 `ja_line_hard_limit`, or `empty_zh`; add `--level error` to exclude warning-level239 matches for soft-or-hard codes like duration and reading speed. Add `--offset` and240 `--limit` to page through issue matches.241- `--offset <count> --limit <count>`: show a zero-based window after any issue filtering;242 omit `--limit` to read from offset to the end. Do not combine with `--id`, `--around`,243 or `--start/--end`.244245`segments apply <target> [file]` applies an ordered TOML patch as the batch form of `edit`,246`split`, `merge`, `insert`, and `delete`. Pass a file path, or omit `[file]` only when providing247stdin in the same shell command, such as `<<'EOF' ... EOF`. For batch work, prefer a patch file248under a session-local `patches/` directory. Normal apply writes the patched segments, then249runs patch-scoped check feedback. `--dry-run` validates the patch, previews affected output,250and runs the same checks without writing changes. Use `--verbose --json` with `jq` when you251need affected segment rows and their remaining issues.252253```toml254created_by = "worker-a"255start = 120.0256end = 180.0257258[[operations]]259op = "edit"260segment_id = "12"261zh = "修正后的中文字幕"262263[[operations]]264op = "edit"265segment_id = "title"266skip_checks = [267 { code = "zh_repeated_punctuation", reason = "Official title spelling." },268 { code = "zh_line_hard_limit", reason = "Official title should stay on one line." }269]270271[[operations]]272op = "split"273source_id = "long"274gap = 0.05275276[[operations.replacements]]277segment_id = "long.1"278start = 10.0279end = 13.2280speaker = "A"281ja = "前半の日本語"282zh = "前半中文字幕"283284[[operations.replacements]]285segment_id = "long.2"286start = 13.2287end = 16.0288speaker = "A"289ja = "後半の日本語"290zh = "后半中文字幕"291292[[operations]]293op = "merge"294source_ids = ["13.1", "13.2"]295merged_id = "13"296speaker = "A,B"297ja = "結合した日本語"298zh = "合并后的中文字幕"299300[[operations]]301op = "insert"302segment_id = "13.5"303start = 16.2304end = 17.0305speaker = "A"306ja = "追加された字幕"307zh = "新增字幕"308309[[operations]]310op = "delete"311segment_id = "14"312```313314### Clips315316Clip command examples:317318```bash319rajio clips transcribe /path/to/session --start 120 --end 180 --label noisy-overlap320rajio clips list /path/to/session --json321rajio clips show /path/to/session clip-120000-180000 --json322```323324Use clips when an initial transcription has a complex, noisy, overlapped, or error-prone325time range that should be independently recognized for comparison. `clips list` prints326only clip rows; `clips show` prints only that clip's `segments.toml`. Agents should327default to `--json` for `clips list` and `clips show`; otherwise output is a328human-readable table. See [CLI.md](CLI.md#clips-commands) for JSON structures.329330### Check331332Use `rajio check` before committing manual stages and before final reporting. It validates333session shape, timeline integrity, required text, and subtitle QA heuristics, but it does334not replace semantic review for ASR mistakes, names, terms, context, translation quality,335or editorial polish. Treat the levels as follows:336337- `fatal`: invalid data or session state; fix before proceeding.338- `error`: a problem that seriously hurts subtitle readability in ordinary cases; fix it339 unless a specific reviewed exception is better for accuracy or viewing comfort.340- `warning`: a recommendation; inspect it and make a local editorial decision instead of341 mechanically fixing or mechanically ignoring it.342343Passing `rajio check`, including with zero `fatal`/`error` issues, does not mean the344subtitles are polished. It only means the work has passed the baseline data and subtitle345heuristic checks.346347Use `--json` for machine-readable output; pipe it to `jq` when you need to extract fields348or slice down the output. See [CLI.md](CLI.md#check) for JSON structures.349350- `rajio check /path/to/session --json --level error`: show blocking `fatal` and `error`351 issues.352- `rajio check /path/to/session --json --stage transcript --language ja`: check transcript353 work Japanese QA. Transcript checks only support `ja`.354- `rajio check /path/to/session --json --stage translation`: check translation work Chinese QA;355 `zh` is the default language for translation.356- `rajio check /path/to/session --json --stage translation --language ja`: inspect Japanese357 subtitle QA inherited into `translation/work/segments.toml`.358- Add `--verbose` only when you need full sorted `issues`, such as locating exact359 segment IDs and issue codes before adding `skip_checks`. When using verbose JSON, pipe360 it through `jq` to inspect only the fields you need instead of reading the full raw361 payload.362363## Subtitle QA Rules364365These are the subtitle QA thresholds enforced by `rajio check`; severity, stage, and366language filtering follow the Check section above.367368| Rule | Warning | Error |369| -------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |370| Japanese line length | `ja` line exceeds 20 visible non-space characters | `ja` line exceeds 28 visible non-space characters |371| Chinese line length | `zh` line exceeds 16 visible non-space characters | `zh` line exceeds 24 visible non-space characters |372| Line breaks | 2 lines that still need review after merge-length check | More than 2 lines, or 2 lines that merge within the soft length and should be one line |373| Subtitle duration | shorter than 0.5 seconds or longer than 7 seconds | shorter than 0.3 seconds or longer than 10 seconds |374| Reading speed | Japanese exceeds 15 chars/s; Chinese exceeds 11 chars/s | Japanese exceeds 20 chars/s; Chinese exceeds 15 chars/s |375| Adjacent gap | gap is 50-150 ms | gap is under 50 ms |376| Punctuation | none | ordinary comma/period punctuation, ordinary sentence-ending punctuation, 2+ repeated question/exclamation marks, or punctuation-only line |377378Do not satisfy numeric limits by creating unreadable single-character, single-syllable,379or isolated filler subtitles. Prefer natural compression, merging with an adjacent segment,380retiming, or splitting at a semantic pause. Single `?` or `!` is allowed when needed for381intent, but use it sparingly.382383Warnings are still work items. Review them in context and either improve the subtitle or384keep the current form because it is more accurate, natural, or comfortable than the385mechanical alternative.386387## Workflow388389### 0. Prepare The Session3903911. Resolve the media path to an absolute path and confirm it exists.3922. Choose the session directory. If the user provides one, use it. Otherwise create one393 near the media file or in the current workspace using a filesystem-safe title or media394 stem. Do not copy large media files unless the user asks.3953. Create or update `description.md`.3964. Gather confirmed context before transcription when practical. Use the original URL,397 official pages, video title, filenames, on-screen text, user notes, and later transcript398 discoveries. Record uncertainty explicitly instead of guessing.399400Use this `description.md` shape:401402```markdown403---404media: ./video.mp4405title: Video title or filename stem406url: https://example.com/original407published_at: 2026-06-06408---409410## Context411412- Source/uploader:413- User notes:414- Video synopsis:415- Cast/speakers:416- Program/corner structure:417- Known fixed greetings or sign-offs:418- Related events/products/works mentioned:419420## Glossary And Fixed Terms421422- Japanese term/person/place -> Chinese translation or note423- Common ASR confusion -> Correct Japanese term / Chinese translation424425## Style Requirements426427- Translate into natural Simplified Chinese subtitles.428- Preserve important names and terminology consistently.429```430431### 1. Run To Transcript Work432433Before automatic stages, run:434435```bash436rajio doctor /path/to/session437```438439`rajio doctor` reports the rajio CLI version and update-check result first. Confirm the CLI version matches this SKILL frontmatter `metadata.version`; if they differ, or doctor reports a newer version is available or update checking failed, report that before starting automatic stages. It also validates runtime configuration and provider access using the target directory for `.env` loading. Do not start transcription until `rajio doctor` passes or the environment issue is resolved.440441Run:442443```bash444rajio /path/to/session --continue=until-manual445```446447Expected result: rajio creates or reads `session.toml`, extracts audio, transcribes448Japanese, writes raw transcript artifacts, creates `transcript/work/segments.toml`, and449stops at `transcript_work`.450451Wait for `transcript/raw/checkpoints/input-*.toml` or452`transcript/raw/checkpoints/input-*.error.log`. Do not restart while requests may still be in453flight unless there is a clear CLI/provider failure.454455Treat automatically created work segments as a draft.456457Rajio may write suggested patches under458`transcript/work/suggested-patches/`, but never applies them automatically. Review them during459the proofread stage below.460461Suggested patch review:462463- Review suggested patches in numeric filename order before spawning transcript workers.464- Before spawning transcript workers, either apply, manually fold in, or explicitly reject465 each suggested patch, including `*-low.*` files.466- Treat `confidence = "medium"` patches with extra care and `*-low.*` files as manual467 decision candidates, not automatic cleanup or post-worker TODOs.468- Patch `reason` and `confidence` fields do not change apply behavior.469470Example generated files:471472```text473transcript/work/suggested-patches/474 01-punctuation-cleanup-chunk-000-000000s-000600s-high.toml475 02-fragment-merge-chunk-000-000000s-000600s-high.toml476 02-fragment-merge-chunk-000-000000s-000600s-medium.toml477 03-boundary-retime-chunk-000-000000s-000600s-high.toml478 04-long-segment-candidates-chunk-000-000000s-000600s-low.md479```480481### 2. Proofread And Polish Japanese482483Proofread flow:4844851. Review automatically generated suggested patches under486 `transcript/work/suggested-patches/`, adjust them if needed, dry-run them with487 `rajio segments apply <session> <patch> --stage transcript --dry-run`, then apply,488 manually incorporate, or reject them before assigning worker ranges.4892. Spawn transcript proofread sub-agents following [SUB_AGENTS.md](SUB_AGENTS.md). Each490 worker gets a label and assigned source-media `start`/`end` range.4913. Review each worker patch file, dry-run summary, and final report confirmations. Apply492 accepted patches to `transcript/work/segments.toml`. A blocker report is not an493 accepted patch; resolve it or reassign that range before committing.4944. Manually perform a whole-transcript review and polish pass for context, terminology,495 fixed phrases, structure, and readability across batch boundaries.4965. Commit `transcript_work` only after semantic review and validation are clean, or only497 intentional subtitle QA exceptions remain with exact `skip_checks`.498499Transcript review requirements:500501- Use the segment commands documented in the CLI section with `--stage transcript` for502 transcript inspection, patch review, patch application, and validation.503- Do not translate in this stage; only correct and polish the Japanese transcript.504- The main agent's proofread and polish pass must be the manual review defined in505 [Non-Negotiable Rules](#non-negotiable-rules). Use `rajio segments list` to read the506 actual transcript text in timeline-order batches with neighboring context, review507 suggested and worker patches against those segments, and inspect batch boundaries.508- `rajio check`, suggested patches, issue filters, dry-run summaries, or statistics are509 only supporting evidence. They do not count as transcript proofreading unless the510 affected subtitle text is read in context.511512For complex, noisy, overlapped, or suspicious ASR ranges, the main agent or a sub-agent may513use `rajio clips transcribe` to retranscribe the original media time range as sidecar514evidence. Then use515`rajio clips list --json` and `rajio clips show <id> --json` to compare the alternate516transcript against `transcript/work/segments.toml`. Clip output is reference material; do517not treat it as an automatic replacement.518519Validate often with `rajio check` as documented in the CLI section. This only checks data520shape, timing, required fields, and subtitle limits; before committing, still polish the521content semantically against the acceptance criteria below.522523Acceptance criteria:524525- Every segment has stable `id`, numeric `start`/`end`, non-empty `speaker`, and non-empty526 Japanese `ja`.527- Timestamps increase and do not overlap.528- Japanese text is coherent, natural, and corrected against `description.md`, glossary,529 proper nouns, and raw transcript references.530- Known names, program titles, corner names, event names, hashtags, greetings, mail reads,531 and sign-offs are corrected consistently.532- Search the whole transcript for likely ASR variants of fixed terms, not only exact533 glossary terms.534- Check high-risk positions explicitly: opening title call, self-introductions, listener535 greetings, corner starts, event announcements, mail-address reads, and ending sign-off.536- Follow the Subtitle QA Rules for line length, line count, duration, reading speed, gaps,537 and punctuation.538539Speaker and segment structure:540541- A normal segment should represent one readable subtitle unit.542- Do not preserve unreadable fragments such as single characters or syllables when adjacent543 fragments form one jointly spoken phrase.544- If multiple speakers complete the same short phrase together, merge it into one segment545 with complete `ja`; combine speakers with comma-separated values such as546 `speaker = "A,B"` when attribution matters.547- Preserve segment IDs unless a structural correction truly requires a change.548549Before committing:550551- Update `description.md` with newly confirmed context and terminology.552- Search for known ASR confusions and wrong proper nouns.553- Spot-check opening, middle, and ending subtitles for proper nouns and fixed phrases.554- Confirm no remaining segment is an unreadable fragment that should be merged.555556When clean:557558```bash559rajio /path/to/session --commit --continue=until-manual560```561562If only intentional subtitle QA exceptions remain, inspect them first:563564```bash565rajio check /path/to/session --json --stage transcript --language ja --verbose566```567568If preserving an exception improves accuracy, naturalness, or readability, add569`skip_checks` to the affected segment with the exact issue code and a reason, then commit570normally:571572```bash573rajio /path/to/session --commit --continue=until-manual574```575576Expected result: rajio commits `transcript_work`, creates577`translation/work/segments.toml`, and stops at `translation_work`.578579### 3. Translate And Polish Chinese580581Initial translation flow:5825831. Plan explicit translation batches by non-overlapping source-media time ranges instead584 of attempting the whole file in one pass. Choose range sizes by dialogue density and585 the active sub-agent concurrency limit.5862. Spawn translation sub-agents following [SUB_AGENTS.md](SUB_AGENTS.md). Each worker gets587 a label and assigned source-media `start`/`end` range.5883. Review each worker patch file, dry-run summary, and final report confirmations. Apply589 accepted patches to `translation/work/segments.toml` so every segment has filled or590 refined `zh`. A blocker report is not an accepted patch or a completed batch; resolve591 it or reassign that range before committing.5924. Manually perform a whole-file first-draft review for terminology, subtitle continuity,593 missing translations, Japanese corrections made during translation, and cross-batch594 style consistency.5955. Commit `translation_work` and export only after every batch has been translated,596 terminology has been cross-checked, and validation has no blocking `fatal` or Chinese597 `error` issues except reviewed intentional subtitle QA exceptions.598599Translation review requirements:600601- Use the segment commands documented in the CLI section with `--stage translation` for602 translation inspection, patch review, patch application, and validation.603- Fill or refine translated subtitle text in `zh`; keep Japanese corrections limited to604 transcript issues found while translating.605- The main agent's first-draft translation review must be the manual review defined in606 [Non-Negotiable Rules](#non-negotiable-rules). Use `rajio segments list` to read607 translated segments in timeline-order batches with neighboring context, compare `ja` and608 `zh`, review worker patches against those segments, and inspect batch boundaries.609- `rajio check`, issue lists, dry-run summaries, or statistics are only supporting610 evidence. They do not count as translation review unless the subtitle text is read in611 context.612613During batch work, keep glossary updates and unresolved uncertainty in `description.md`,614and search earlier completed batches when a new name, phrase, or style decision appears.615Before committing, confirm this command has no blocking `fatal` or Chinese `error` issues:616617```bash618rajio check /path/to/session --json --stage translation619```620621To inspect Japanese QA in the current translation work file, run the same command with622`--language ja`.623624During `translation_work`, `translation/work/segments.toml` is the active subtitle work625file. If translation reveals a Japanese typo, wrong name, wrong fixed phrase, missing626context, or bad segment structure, correct the relevant `ja` and `zh` in627`translation/work/segments.toml` and update `description.md` when the decision affects628terminology or future batches.629630If a translation problem points back to an uncertain or messy source-audio range, use631`rajio clips transcribe` for that original media time range and inspect it with632`rajio clips show <id> --json`. Use the sidecar transcript as a second reference before633editing the committed transcript and reconciling the translation.634635Validate often with `rajio check` as documented in the CLI section. This only checks data636shape, timing, required fields, and subtitle limits; before committing, still polish the637content semantically against the acceptance criteria below.638639Acceptance criteria:640641- Keep `id`, `start`, `end`, and `speaker` stable unless a structural correction or642 intentionally removed semantically empty filler genuinely requires a change. `ja` may be643 corrected in `translation/work/segments.toml` when translation review finds a Japanese644 typo, name, or fixed-phrase issue.645- Every segment has non-empty `zh`.646- Chinese is natural Simplified Chinese subtitle language, not word-by-word literal output.647- Preserve meaning, tone, speaker intent, jokes, references, and discourse flow.648- Very short segments that are only meaningless fillers, breaths, interjections, or pure649 hesitation sounds may be deleted from the subtitle if removing them does not change650 meaning, speaker intent, or timing comprehension.651- Smooth spoken hesitation, false starts, and harmless repetition in Chinese unless they are652 semantically important, characterize the speaker, or affect the scene's rhythm.653- Remove unnecessary Chinese filler and transcript-shaped clutter, including but not654 limited to redundant `嗯`, `啊`, `哦`, `呃`, `欸`, `那个`, `就是`, repeated `对对对`,655 duplicated verbs, repeated subjects, stalled false starts, and trailing particles such656 as `嘛` when they do not carry tone or timing value. Treat these as review candidates,657 not a fixed deletion list. Keep interjections when they express a real reaction, joke658 beat, surprise, embarrassment, or speaker personality.659- Keep Chinese renderings globally consistent for people, programs, corners, events,660 hashtags, works, products, honorific decisions, and recurring phrases.661- Use `description.md` as the glossary and style source. Update it if new confirmed terms662 are discovered.663- Translate merged multi-speaker phrases as one complete subtitle. Do not preserve664 syllable-by-syllable fragments in Chinese.665- Follow the Subtitle QA Rules for line length, line count, duration, reading speed, gaps,666 and punctuation.667- Do not create an awkward short trailing subtitle only to satisfy a warning threshold.668 Preserve subtitle continuity and readability first.669670Before committing:671672- Compare `description.md` glossary against `translation/work/segments.toml`.673- Search for inconsistent Chinese names, untranslated Japanese names, wrong titles, and674 stale translations from earlier draft assumptions.675- Spot-check opening, middle, ending, fixed greetings, mail reads, event announcements,676 and sign-off for Japanese correctness and Chinese readability.677- Check subtitle continuity across adjacent segments: the Chinese should read as connected678 dialogue, not isolated literal fragments.679- Review Japanese `error` and `warning` issues still present in680 `translation/work/segments.toml`:681682```bash683rajio check /path/to/session --json --stage translation --language ja --level warning684```685686- Record unresolved uncertainty in `description.md` or mention it in the final report.687688When clean, commit and export the first translation draft:689690```bash691rajio /path/to/session --commit --continue=until-manual692```693694If intentional Chinese QA exceptions remain, inspect them first:695696```bash697rajio check /path/to/session --json --stage translation --verbose698```699700Add `skip_checks` to each affected segment only after manual review confirms every701remaining `error` issue is an intentional subtitle QA exception and no `fatal` issues702remain. Then commit normally.703704```bash705rajio /path/to/session --commit --continue=until-manual706```707708Expected result: rajio commits `translation_work`, runs export, and reaches the709terminal `done` state. This ends the CLI workflow, but the exported subtitles are still710only a first-pass translation and proofread draft. The current main agent must continue711with the refinement pass below before treating the subtitles as final polished output.712713Expected draft output:714715- `output/*.ja.srt`716- `output/*.zh.srt`717- `output/*.ja-zh.ass`718719### 4. Refine Chinese Subtitles720721After the first draft export, the main agent must perform at least three full-pass Chinese722subtitle refinement passes over `translation/work/segments.toml`, and should keep723iterating while meaningful improvements remain. This is not a724substitute for the sub-agent batch translation stage: do not use these passes to fill725large missing sections or redo the whole translation from scratch. Use them to raise the726already translated draft to final subtitle quality.727728Preserve the committed draft's structure unless a change clearly improves accuracy,729readability, or subtitle continuity. Do not break the Subtitle QA Rules, timeline730integrity, required fields, segment IDs, or transcript alignment. If refinement changes731the work file after export, recommit `translation_work` and regenerate export output.732733Required refinement pass loop:734735For each Chinese refinement pass, follow these steps exactly:7367371. Read `translation/work/segments.toml` from start to end in timeline order as actual738 `ja`/`zh` subtitle text, using `rajio segments list` windows or ranges with neighboring739 context until the full file is covered. This full read is mandatory; do not replace it740 with `rg`, `rajio check`, issue summaries, issue lists, issue IDs, examples, filters,741 or statistics.7422. Edit the Chinese subtitles for style, flow, tone, concision, consistency, and viewing743 comfort. Update matching `ja`, glossary, or `description.md` entries only when the744 Chinese review exposes a confirmed source or term problem.7453. Run the translation checks for `zh` and `ja` only as regression checks. Final746 refinement starts from a committed draft that should already have no blocking747 `fatal` or `error` issues; if this pass introduces any new `fatal` or `error`, fix it748 immediately. Warnings may guide inspection, but this pass is not mechanical warning749 cleanup.7504. Reread every segment changed in this pass one by one in its final subtitle form, with751 neighboring context for boundary flow.7525. If the reread finds a style, meaning, flow, or consistency problem, fix it. If checks753 show a new `fatal` or `error`, fix it immediately. Then repeat steps 3-4.7546. Count the pass complete only after the full-file read, editorial pass, regression755 checks, and changed-segment reread are all done.756757Refinement requirements:758759- Perform at least three full-file Chinese refinement passes before final verification. A760 pass must make a deliberate full-file check for text quality, not only run `rajio check`.761- Each refinement pass must satisfy the manual review definition in762 [Non-Negotiable Rules](#non-negotiable-rules): read the actual `ja`/`zh` segment text in763 timeline order with neighboring context, using `rajio segments list` windows or ranges764 to cover the full file. Warning lists, statistics, scripted transformations, and765 validation output may guide where to look, but they do not count as a refinement pass.766- Do not substitute `rg` searches, `rajio check` summaries, `rajio check --verbose` issue767 lists, issue IDs, examples, or filtered issue views for full-file reading. They are only768 navigation aids; the pass counts only when the subtitle text itself was read and edited769 in order.770- Read the Chinese subtitles continuously across adjacent segments, not only segment by771 segment. Repair places where the text reads like isolated translated fragments.772- Enforce global term consistency for names, programs, corners, events, works, products,773 hashtags, recurring jokes, honorific choices, and fixed phrases.774- Match register, tone, and speaker intent to the local context: casual speech should not775 become stiff, jokes should not become flat, and emotional emphasis should not disappear.776- Prefer natural Simplified Chinese subtitle language over literal completeness. Compress777 harmless repetition and spoken clutter when the source meaning, rhythm, and speaker778 personality are preserved.779- Clean up filler-heavy Chinese, wordiness, and direct translation artifacts, including780 but not limited to redundant interjections, duplicated words or clauses, repeated781 subjects, over-explicit pronouns, stalled false starts, stiff connectives, explanatory782 padding, and literal translations of Japanese hesitation. Treat these as review783 candidates rather than a fixed deletion list; delete or rewrite them when they only784 mirror source disfluency or make the subtitle read like prose instead of subtitles.785- Check pronouns, ellipses, omitted subjects, callbacks, and topic shifts against nearby786 Japanese context so Chinese lines do not become ambiguous or misleading.787- Smooth sentence flow across subtitle boundaries while keeping each subtitle readable on788 its789790…(truncated)