Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .agents/skills/e2e/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: >
(6) asks about test infrastructure (markers, fixtures, scope, multicast setup, port allocation),
(7) mentions "端到端测试", "e2e test", "integration test" in the context of rtp2httpd.
This skill contains the complete helper API reference, test patterns, and conventions — without it
the agent must read many files to discover what the skill provides instantly.
the model must read many files to discover what the skill provides instantly.
argument-hint: "[run|write|debug] [optional test file or keyword]"
---

Expand Down
129 changes: 129 additions & 0 deletions .agents/skills/sync-fcc-ip-docs/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
name: sync-fcc-ip-docs
description: >
Synchronize rtp2httpd FCC IP documentation from GitHub issue feedback. ALWAYS use this skill
when the user asks to update FCC address docs, check new FCC IP reports, validate existing FCC
entries, or process comments from https://github.com/stackia/rtp2httpd/issues/5.
argument-hint: "[check|sync|update] [optional issue/comment context]"
---

# Sync FCC IP Documentation

Use this skill to curate community-sourced FCC (Fast Channel Change) IP address reports for
rtp2httpd and keep the Chinese and English FCC documentation synchronized.

Before processing comments, read `references/update-memory.md` for the last processed checkpoint,
known document paths, formatting rules, and prior update history. Update that reference after each
run with the newest processed comment timestamp and a concise update record.

## Core Mission

1. Read comments from <https://github.com/stackia/rtp2httpd/issues/5>.
2. Identify actionable information: new working FCC IPs and credible non-working reports.
3. Update the Chinese FCC address summary document.
4. Use the `translate-docs-zh-en` skill to synchronize the English translation after Chinese doc changes.

## Step 1: Fetch and Read Issue Comments

Check `references/update-memory.md` for `last_processed_comment_date`.

```bash
# Incremental: only comments after the last processed date
gh api "repos/stackia/rtp2httpd/issues/5/comments?since=YYYY-MM-DDTHH:MM:SSZ" --paginate

# Full: when no checkpoint exists
gh api repos/stackia/rtp2httpd/issues/5/comments --paginate
```

- If a checkpoint exists, process only comments created after that timestamp.
- If no checkpoint exists, process all comments.
- Read comments chronologically because later comments may correct earlier ones.

## Step 2: Classify Each Comment

### Actionable: New FCC IP Report

- The user explicitly shares a new FCC IP address they discovered or successfully use.
- The user confirms an IP works for a specific region, ISP, or location.
- Look for IP addresses such as `10.x.x.x`, `172.x.x.x`, `192.168.x.x`, or public IPs with location context.
- Example: "我在北京联通发现了一个新的 FCC 地址:10.205.x.x".

### Potentially Actionable: FCC Failure Report

- The user definitively reports that a known FCC IP no longer works, has been decommissioned, or is unreachable.
- A single report is not enough to remove an entry. Flag it for review and ask before deleting.
- Multiple independent reports for the same IP provide stronger evidence, but still confirm before removal.

### Not Actionable: Questions or General Discussion

- Questions about whether an IP works, how to find IPs, configuration help, troubleshooting, thanks, or project discussion.
- Phrases such as "请问", "有没有", "能不能", "是否", and "怎么" usually indicate questions.
- A question mark (`?` or `?`) often means inquiry rather than report.

### Classification Rules

- Treat phrases such as "分享一下", "发现了", "可以用", "亲测可用", and "已确认" as report signals.
- If ambiguous, do not update the document.
- If a later comment contradicts an earlier one, note both and prioritize the most recent reliable information.

## Step 3: Read Existing Documentation

- Use the Chinese FCC summary document recorded in `references/update-memory.md`.
- Read the current document to understand existing regions, ISPs, IPs, and formatting.
- Check whether reported IPs are already documented before adding anything.

## Step 4: Update the Chinese Document

- Add newly reported working FCC IPs with region, ISP, and city/location information when available.
- Do not duplicate existing IPs.
- Maintain existing Markdown style and grouping.
- Organize entries by province, then ISP.
- Within the same province and ISP, list addresses without city annotations first, then addresses with city annotations.
- For non-working reports, ask before removing or marking inactive unless the user already gave explicit removal instructions.
- Add notes only when the document convention supports them and the uncertainty is important.

## Step 5: Acknowledge Contributors

For each comment whose IP was added to the document, add a rocket reaction:

```bash
gh api repos/stackia/rtp2httpd/issues/comments/{comment_id}/reactions -f content=rocket
```

- React only to comments actually used for document updates.
- Do not react to questions, discussions, or duplicate reports.
- If the reaction already exists from a previous run, skip it.

## Step 6: Summarize Changes

Prepare a concise summary listing:

1. Number of comments reviewed.
2. Number classified as actionable vs. non-actionable.
3. IPs added, removed, or flagged for review.
4. Source comment authors and dates for traceability.

## Step 7: Sync English Translation

After Chinese document changes are complete, use the `translate-docs-zh-en` skill to update the
corresponding English document. Provide the updated Chinese document path and the change summary so
the translation update can focus on modified sections.

## Quality Assurance

- Validate every IP address and port before adding it.
- Confirm regional and ISP attribution from source comments.
- Verify no still-working IPs were removed accidentally.
- Preserve document formatting and ordering.
- If no actionable updates exist, report that clearly and make no doc changes.

## Updating Sync Memory

After each run, update `references/update-memory.md` with:

- `last_processed_comment_date`: set to the `created_at` timestamp of the last processed comment.
- An update record noting what changed.

You may also record reusable classification lessons, known platform/port patterns, or stable
document conventions. Do not record temporary task state, speculation, or duplicate repo-level
instructions.
54 changes: 54 additions & 0 deletions .agents/skills/sync-fcc-ip-docs/references/update-memory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# FCC IP Documentation Sync Memory

## Processing Checkpoint

last_processed_comment_date: 2026-05-05T06:17:23Z

## Document Paths

- Chinese FCC summary document: `docs/reference/cn-fcc-collection.md`
- English version: `docs/en/reference/cn-fcc-collection.md`

## FCC Address Characteristics

All FCC addresses, whether public or private, are usually usable only inside the specified
province, region, or operator network. When adding entries, include province, city, and ISP
information whenever possible.

## Common Ports and Platforms

- 8027: Huawei platform
- 15970: ZTE/FiberHome platform
- 7777: Shanghai Telecom specific
- 554: RTSP port, used by special Jiangsu Telecom channels

## Document Format

Group by province, then by ISP: China Telecom, China Unicom, China Mobile. Within the same
province and ISP, list addresses without city annotations first, then addresses with city
annotations.

```markdown
## Province

- 电信:
- `IP:port`
- `IP:port`(City)
```

## Classification Lessons

- Comments containing fields such as `ChannelFCCIP`, `ChannelFCCPort`, and `FCCEnable` are usually packet-capture shares and actionable.
- "部分频道不支持 FCC" for 4K or carousel channels is normal behavior, not an address failure. Do not remove addresses for that alone.
- Some FCC servers redirect to other IPs for load balancing. This is normal behavior.

## Update Log

- 2026-05-05: Processed 2 new comments. Added Zhejiang Huzhou Telecom `115.208.248.108:8027` (comment ID 4376934403, reaction added). One Chengdu CCTV13 entry (`118.123.55.74:8027`) was already documented.
- 2026-05-04: Processed 7 new comments. Added Guangdong Foshan Telecom `183.59.144.166:8027` (comment ID 4143424499). Other comments: one already documented Baoding entry with reaction added, one already documented Chengdu CCTV13 entry, one Tianjin Unicom inquiry, one Shandong Yantai inquiry/single-point non-working report with no Yantai Unicom doc entry, one Shanghai Telecom timeout note where `124.75.25.211` was confirmed working by another user, and one Shanghai Telecom rebuttal to the timeout report.
- 2026-03-16: Processed 1 new comment (ID: 4065999085). Added Hebei Baoding Telecom `192.168.72.20:8027`.
- 2026-03-15: Processed 1 new comment (ID: 4060432457). Added Sichuan Yibin Telecom `182.134.43.42:8027`.
- 2026-03-12: Processed 1 new comment (ID: 4039072693). No update: Guizhou Telecom `10.255.5.32:8027` was already documented.
- 2026-03-09: Processed 3 new comments (IDs: 3988244004, 3994879570, 4018542569), 108 total comments. No update: Shandong Weifang/Heze Unicom addresses were already documented; Zhejiang Hangzhou Telecom was troubleshooting context.
- 2026-03-08: Processed all 105 comments. Added 8 addresses: Zhejiang Wenzhou 4, Hunan Shaoyang 1, Henan Unicom 2, Hebei Telecom 1; annotated Hebei Telecom Tangshan.
- 2026-03-03: Processed 1 new comment (ID: 3988244004). Added Shandong Weifang Unicom `60.210.139.78:8027`.
148 changes: 148 additions & 0 deletions .agents/skills/translate-docs-zh-en/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
---
name: translate-docs-zh-en
description: >
Translate and synchronize rtp2httpd Chinese documentation into English. ALWAYS use this skill
whenever Chinese docs under docs/ need English translations under docs/en/, when Chinese doc diffs
need to be reflected in existing English files, when VitePress English sidebar entries need to
mirror Chinese docs, or when translation terminology needs to stay consistent across docs.
argument-hint: "[new|update|batch] [docs path or diff context]"
---

# Translate rtp2httpd Docs from Chinese to English

Use this skill to keep English documentation faithful to the Chinese source of truth.
Chinese docs under `docs/` are authoritative; English docs under `docs/en/` are translations.

Before translating, read `references/translation-memory.md` for established terminology and
project-specific conventions. Update that reference when you confirm stable terminology,
documentation structure, sidebar patterns, or other reusable translation decisions.

## Core Responsibilities

1. Translate Chinese documentation files to English, writing output to the corresponding path under `docs/en/`.
2. For new documents, read the full Chinese source and produce a complete English translation.
3. For document updates, read the Chinese diff, identify changed sections, and update only the corresponding English sections.

## Translation Rules

### Structure Preservation

- Mirror the Chinese Markdown structure, heading hierarchy, link anchors, code blocks, and document layout.
- Translate frontmatter fields containing user-facing text. Keep frontmatter keys unchanged.
- Preserve VitePress syntax such as `::: tip`, `::: warning`, `::: danger`, `::: info`, `::: details`, and custom containers. Translate the content inside containers.

### Link Handling

- Internal/site links: add the `/en/` prefix. Example: `/guide/quick-start` becomes `/en/guide/quick-start`.
- External links: keep unchanged.
- Relative image/asset paths: add one extra `../` because English docs live one level deeper under `docs/en/`.
- `docs/index.md` using `./images/foo.png` becomes `docs/en/index.md` using `../images/foo.png`.
- `docs/guide/bar.md` using `../images/foo.png` becomes `docs/en/guide/bar.md` using `../../images/foo.png`.
- Absolute paths starting with `/`: keep unchanged.
- Anchor links: translate anchor text and update anchor targets to match translated headings using VitePress anchor generation.

### Do Not Translate

- Code inside inline or fenced code blocks, shell commands, configuration parameter names, and variable names.
- URLs, IP addresses, and port numbers.
- Product and project names such as rtp2httpd, udpxy, VLC, and FFmpeg.
- File paths and filenames.

### Special Handling

- For China-specific concepts, retain the original term only when needed and add an English explanation.
- Keep common technical acronyms as-is, including RTP, HTTP, UDP, IGMP, FCC, and FEC.
- In English docs, avoid leaving Chinese characters unless they are intentionally retained terms with explanations.
- In code/config examples, translate Chinese sample values to English equivalents, such as `group-title="央视"` to `group-title="CCTV"`.

## English Documentation Style

- Use clear, concise technical English that reads naturally to a native English-speaking developer.
- Match the original tone without becoming overly formal or casual.
- Prefer active voice where natural.
- Preserve precise meaning. Do not generalize, soften, omit qualifiers, or change numeric values.
- If the Chinese source has inconsistent values, flag the inconsistency instead of silently choosing one.

### Page Titles

- "详解" / "参数详解" -> "Reference", for example "配置参数详解" -> "Configuration Reference".
- "说明" -> a simple noun form or "Guide", for example "URL 格式说明" -> "URL Formats".
- "报告" -> drop it when redundant, for example "性能测试报告" -> "Performance Benchmark".
- "建议" -> "Guide" rather than "Recommendations", for example "公网访问建议" -> "Public Access Guide".
- Use plural forms when a page covers multiple items, such as "URL Formats".
- Avoid "Specification" unless the document is an actual standard/specification.

### Terminology

- Prefer "build" over "compile" for software construction, except when referring to literal commands such as `make ... compile`.
- Translate "后台" as "admin panel" or "admin interface", not "backend".
- Translate "花屏" as "artifacts" and "卡顿" as "stuttering".
- Use "traffic interception" or "packet capture via gateway", not "man-in-the-middle", for packet capture setups.

## Workflow

### New File Translation

1. Read the Chinese source file completely.
2. Create the corresponding file under `docs/en/` with the same relative path.
3. Translate the entire document using the rules above.
4. Check whether `docs/.vitepress/config.ts` needs a matching English sidebar entry.
5. Self-review for structure, links, code blocks, frontmatter, and completeness.

### Existing File Updates

1. Read the diff of the Chinese document to identify changed sections.
2. Open the existing English translation.
3. Locate corresponding sections in the English file.
4. Update only the changed sections.
5. Verify the updated surrounding context still reads naturally.

### Batch Translation

1. List all files that need translation.
2. Translate in logical order, usually overview/index files first.
3. Verify the English sidebar in `docs/.vitepress/config.ts` is complete.

## VitePress Config Updates

- Locate the English locale sidebar configuration, usually under `en` or `/en/`.
- Add entries that mirror the Chinese sidebar structure with translated text and `/en/`-prefixed links.
- Do not modify the Chinese locale configuration unless the user explicitly asks.

## Quality Checklist

Before finishing each file, verify:

- All headings are translated and hierarchy matches the Chinese source.
- Internal links have `/en/` prefixes.
- External links are unchanged.
- Relative image/asset paths have one additional `../`.
- Code blocks are untouched.
- Product and project names are not translated.
- VitePress container syntax is preserved.
- Frontmatter text fields are translated.
- No unintended Chinese characters remain in English docs.
- Cross-reference link text matches the target page H1.

## Cross-Reference Consistency

When a document links to another page, the link text must match the H1 title of the target page.
After translating or updating a page title, search English docs for references to that page and
update stale link text in related documentation, next steps sections, and inline references.

## Updating Translation Memory

Use `references/translation-memory.md` as the persistent project memory for this skill.

Record:

- Stable terminology choices.
- Document structure and sidebar conventions.
- China-specific concepts and their established English rendering.
- File organization patterns between Chinese and English docs.

Do not record:

- Session-specific task state.
- Speculative or unverified conclusions.
- Anything that duplicates or contradicts repo instructions in `AGENTS.md` or `CLAUDE.md`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation Memory for rtp2httpd Documentation

## Terminology Conventions

### Preserved Product/Technical Names

- rtp2httpd, udpxy, msd_lite, FFmpeg, APTV, TiviMate, Wireshark
- FCC (Fast Channel Change) - expand on first use
- FEC (Forward Error Correction) - expand on first use
- VA-API, V4L2, QSV - hardware acceleration names
- fnOS - keep as-is

### Standard Translations

- 组播 -> multicast
- 单播 -> unicast
- 快速换台 -> fast channel change / channel switching
- 时移回看 -> time-shifted playback / time-shift / catch-up
- 电子节目单 -> EPG (Electronic Program Guide)
- 频道 -> channel
- 线路/源 -> source
- 播放列表 -> playlist
- 上游服务器 -> upstream server
- 反向代理 -> reverse proxy
- 机顶盒 -> set-top box
- 抓包 -> packet capture
- 起播 -> start playback
- 帧间压缩 -> inter-frame compression
- 关键帧 / IDR 帧 -> keyframe / IDR frame
- P 帧 / B 帧 -> P-frame / B-frame
- NAT 穿透 -> NAT traversal
- 端口转发 -> port forwarding
- 慢客户端 -> slow clients
- 缓冲池 -> buffer pool
- 丢包 -> packet loss
- 花屏 -> artifacts
- 卡顿 -> stuttering
- 后台 -> admin panel / admin interface

### China-specific Terms

- 运营商 -> operator / ISP (电信 -> China Telecom, 联通 -> China Unicom, 移动 -> China Mobile)
- 华为 -> Huawei, 中兴 -> ZTE, 烽火 -> FiberHome
- 央视 -> "CCTV" (do not keep Chinese in English docs)
- 卫视 -> Satellite (as group name)
- Province/city names -> standard pinyin (浙江 -> Zhejiang, 杭州 -> Hangzhou, etc.)

## Project-specific Patterns

- Benchmark tables use emoji trophy (🏆) to mark best performers.
- FCC collection: retain Chinese ISP names with English translation on first use.
- Chinese tutorial URLs are kept unchanged when the target content is Chinese-only.
Loading
Loading