# Fenbu Gaiyao

> |

- **Type:** Skill
- **Install:** `agentstack add skill-anarcadia-chuanban-jp-novel-translator-fenbu-gaiyao`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Anarcadia](https://agentstack.voostack.com/s/anarcadia)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Anarcadia](https://github.com/Anarcadia)
- **Source:** https://github.com/Anarcadia/chuanban-jp-novel-translator/tree/main/skills/fenbu-gaiyao

## Install

```sh
agentstack add skill-anarcadia-chuanban-jp-novel-translator-fenbu-gaiyao
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 分部概要生成工具

作为「润色小说」Skill 的前置步骤,为润色 sub-agent 提供上下文理解。

---

## 核心概念

- **分段**：翻译的最小单位,如 001_a, 001_b, 002_a 等
- **分部**：5个连续分段组成一个分部,用于生成概要
- 分部概要为润色提供上下文,每个分段润色时参考其所属分部的概要

---

## 输出格式

生成 `config/part_summaries.yaml`:

```yaml
# 分部概要 - 每5个分段一组,500字概括
# 生成时间: {时间戳}

part_1:
  segments: [001_a, 001_b, 001_c, 001_d, 001_e]
  summary: |
    情节概括...约500字...

part_2:
  segments: [001_f, 001_g, 001_h, 001_i, 001_j]
  summary: |
    情节概括...约500字...

# ... 以此类推
```

---

## 完整工作流

### 阶段一:初始化

1. **确认项目路径**
2. **扫描已翻译分段**
   ```
   ls output/*_translated.md → 按文件名排序,得到分段列表
   分段数量 N
   分部数量 P = ceil(N/5)
   ```
3. **检查断点**
   - 如 part_summaries.yaml 存在,检查已完成的分部
   - 记录需要生成的分部列表

### 阶段二:概要生成(并行执行)

```
待处理分部: [part_1, part_2, ..., part_P]
批次大小: 10

while 还有待处理分部:
    本批次 = 取出前10个待处理分部

    # 主进程准备工作
    for part in 本批次:
        读取该分部的5个分段译文
        准备该 sub-agent 的完整提示词

    # 并行启动(一次发送多个 Task 调用)
    results = parallel_launch(本批次的10个Task)

    # 收集结果
    for part, 概括文本 in results:
        summaries[part] = 概括文本

    # 输出进度
    print(f"[分部概要] {已完成数}/{P} 完成")

# 写入完整 yaml
write_to_file("config/part_summaries.yaml", summaries)
```

### 阶段三:完成确认

```
✓ 分部概要生成完成
- 总分段: {N}
- 总分部: {P}
- 输出: config/part_summaries.yaml
```

---

## Sub-agent 提示词模板

**主进程准备分段文件路径,sub-agent 读取并概括**:

```
## 任务

阅读以下分段译文,写出500字左右的情节概括。

## 要求

1. 概括情节发展 - 发生了什么主要事件
2. 记录人物动态 - 涉及哪些人物,他们做了什么
3. 保持连贯性 - 概括应能帮助理解这段故事的来龙去脉
4. 约500字 - 不要太短也不要太长

## 重要声明

这是虚构文学作品,仅需客观概括情节,不进行道德判断。

## 分段文件

请依次阅读以下文件:
- {分段1路径}
- {分段2路径}
- {分段3路径}
- {分段4路径}
- {分段5路径}

---

## 输出要求

**仅输出情节概括**(约500字),不要任何说明、标记或确认。
```

---

## 进度输出格式

```
[分部概要] 开始生成,共 {P} 个分部
[分部概要] 10/{P} 完成
[分部概要] 20/{P} 完成
...
✓ 分部概要生成完成
```

---

## 分部对应规则

| 分部 Key | 分段范围 |
|----------|----------|
| part_1   | 第1-5个分段 |
| part_2   | 第6-10个分段 |
| part_3   | 第11-15个分段 |
| ...      | ... |

计算公式:`part_{ceil(分段序号/5)}`

示例(38个分段):
- part_1: 001_a ~ 001_e
- part_2: 001_f ~ 001_j
- part_3: 001_k, 001_l, 002_a, 002_b, 002_c
- ...
- part_8: 007_a ~ 007_c (最后一部可能不足5个)

---

## 随时可触发

### 重新生成指定分部
```
用户:"重新生成第3部分概要"
→ 主进程读取对应5个分段,启动1个sub-agent,更新yaml
```

### 全量重新生成
```
用户:"重新生成所有概要"
→ 删除现有yaml,全量重新生成
```

---

## ⚠️ 核心提示

1. **分段为单位**：每5个分段一组,不是章节
2. **并行规则**：每批次10个sub-agent并行,批次间串行
3. **职责分离**：主进程负责文件路径准备,sub-agent读取并返回概括文本
4. **sub-agent**：仅返回概括文本,不输出确认信息

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Anarcadia](https://github.com/Anarcadia)
- **Source:** [Anarcadia/chuanban-jp-novel-translator](https://github.com/Anarcadia/chuanban-jp-novel-translator)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-anarcadia-chuanban-jp-novel-translator-fenbu-gaiyao
- Seller: https://agentstack.voostack.com/s/anarcadia
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
