Translate skill docs (article-deep-summary, llm-summary-review, keyword-cleanup-review) from English to Chinese

This commit is contained in:
wdm
2026-03-30 23:14:22 +08:00
parent 5b8df317ef
commit ca86705646
3 changed files with 158 additions and 158 deletions
+50 -50
View File
@@ -1,55 +1,55 @@
---
name: llm-summary-review
description: Validate and refine LLM-generated summary JSON for extracted articles in this repository. Use when the user wants to review, validate, repair, or iterate on `outputs/result.json` or similar summary outputs produced from extracted article JSON.
description: 验证和优化 LLM 生成的文章摘要 JSON。当用户需要审查、验证、修复或迭代 `outputs/result.json` 或其他由已提取文章 JSON 生成的摘要输出时使用。
---
# LLM Summary Review
# LLM 摘要审查
Use this skill when working on the repository's summary loop after article extraction is done.
在文章提取完成后,处理本仓库摘要循环时使用此技能。
## What This Skill Does
## 功能说明
- Verifies that an LLM summary result matches the expected JSON contract
- Reuses the repository validator instead of re-checking fields manually
- Repairs invalid outputs by telling the LLM exactly what to fix
- Keeps the workflow aligned with the extraction JSON produced by this project
- 验证 LLM 摘要结果是否符合预期的 JSON 约定
- 复用仓库验证器,而非手动逐字段检查
- 通过告知 LLM 具体需要修复的内容来修复无效输出
- 保持工作流与本项目生成的提取 JSON 保持一致
## Inputs
## 输入
Typical files:
典型文件:
- Extracted article JSON: `outputs/*.extracted.json`
- LLM summary result JSON: `outputs/result.json`
- Prompt template: `outputs/llm-summary-prompt.txt`
- 已提取的文章 JSON:`outputs/*.extracted.json`
- LLM 摘要结果 JSON:`outputs/result.json`
- 提示词模板:`outputs/llm-summary-prompt.txt`
## Workflow
## 工作流程
1. Validate the current summary result with the repository validator:
1. 使用仓库验证器验证当前摘要结果:
```bash
python -m summary_mcp.validate_llm_result outputs/result.json --extracted outputs/read-flow-2026.extracted.json
```
2. If validation passes:
- Report that the result is structurally valid
- Briefly note any warnings
- Do not rewrite the result unless the user asks
2. 如果验证通过:
- 报告结果结构有效
- 简要说明任何警告
- 除非用户要求,否则不重写结果
3. If validation fails:
- Read the validator errors carefully
- Ask the LLM to regenerate or repair only the failing parts
- Re-run the validator until it passes or a retry limit is hit
3. 如果验证失败:
- 仔细阅读验证器错误信息
- 要求 LLM 仅重新生成或修复失败的部分
- 重新运行验证器,直到通过或达到重试上限
## Repair Prompt Pattern
## 修复提示词模式
When asking an LLM to repair a bad result, provide:
当要求 LLM 修复有问题的结果时,需提供:
- The original extracted article JSON
- The current invalid summary JSON
- The validator error list
- A strict instruction to preserve valid fields and fix only the failing ones
- 原始已提取的文章 JSON
- 当前无效的摘要 JSON
- 验证器错误列表
- 严格指令:保留正确字段,仅修复失败字段
Use this repair template:
使用以下修复模板:
```text
请修复下面这份不符合要求的摘要 JSON。
@@ -70,32 +70,32 @@ validator errors:
{{result_json}}
```
## Validation Rules
## 验证规则
The validator currently enforces:
验证器当前强制执行以下规则:
- Required fields exist
- Field types are correct
- `category` is one of: `资讯` `方法论` `工具实践` `观点评论`
- `summary` length is within bounds
- `highlights`, `keywords`, and `topics` counts are within bounds
- `keywords` and `topics` do not overlap
- `title` and `url` match the extracted article when an extracted JSON file is provided
- 必填字段存在
- 字段类型正确
- `category` 取值为以下之一:`资讯` `方法论` `工具实践` `观点评论`
- `summary` 长度在允许范围内
- `highlights`、`keywords` 和 `topics` 数量在允许范围内
- `keywords` 和 `topics` 不重叠
- 提供已提取 JSON 文件时,`title` 和 `url` 与已提取文章匹配
## Repository Implementation
## 代码实现
Relevant code:
相关代码:
- Validator model: `src/summary_mcp/models/llm_result.py`
- Validator logic: `src/summary_mcp/validators/llm_result.py`
- CLI entry: `src/summary_mcp/validate_llm_result.py`
- 验证器模型:`src/summary_mcp/models/llm_result.py`
- 验证器逻辑:`src/summary_mcp/validators/llm_result.py`
- CLI 入口:`src/summary_mcp/validate_llm_result.py`
Prefer using the existing validator rather than recreating checks in free-form reasoning.
优先使用现有验证器,而非在自由推理中重新创建检查逻辑。
## When To Stop
## 何时停止
Stop when one of these is true:
满足以下条件之一时停止:
- The validator returns `valid: true`
- The user asks to inspect the remaining failures manually
- Repeated retries fail and the user should decide how to proceed
- 验证器返回 `valid: true`
- 用户要求手动检查剩余的失败项
- 反复重试失败,应由用户决定后续操作