webnovel-learn
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/webnovel-learn
/webnovel-learn
Project Root Guard(必须先确认)
Project Root Guard (Must Confirm First)
- 必须在项目根目录执行(需存在 )
.webnovel/state.json - 若当前目录不存在该文件,先询问用户项目路径并 进入
cd - 进入后设置变量:
$PROJECT_ROOT = (Resolve-Path ".").Path
- Must be executed in the project root directory (must exist)
.webnovel/state.json - If the file does not exist in the current directory, first ask the user for the project path and into it
cd - After entering, set the variable:
$PROJECT_ROOT = (Resolve-Path ".").Path
目标
Objectives
- 提取可复用的写作模式(钩子/节奏/对话/微兑现等)
- 追加到
.webnovel/project_memory.json
- Extract reusable writing patterns (hooks, pacing, dialogue, payoff, emotion, etc.)
- Append to
.webnovel/project_memory.json
输入
Input
bash
/webnovel-learn "本章的危机钩设计很有效,悬念拉满"bash
/webnovel-learn "The crisis hook design in this chapter is very effective, building great suspense"输出
Output
json
{
"status": "success",
"learned": {
"pattern_type": "hook",
"description": "危机钩设计:悬念拉满",
"source_chapter": 100,
"learned_at": "2026-02-02T12:00:00Z"
}
}json
{
"status": "success",
"learned": {
"pattern_type": "hook",
"description": "Crisis hook design: Builds intense suspense",
"source_chapter": 100,
"learned_at": "2026-02-02T12:00:00Z"
}
}执行流程
Execution Flow
- 读取 ,获取当前章节号(progress.current_chapter)
"$PROJECT_ROOT/.webnovel/state.json" - 读取 ,若不存在则初始化
"$PROJECT_ROOT/.webnovel/project_memory.json"{"patterns": []} - 解析用户输入,归类 pattern_type(hook/pacing/dialogue/payoff/emotion)
- 追加记录并写回文件
- Read to get the current chapter number (progress.current_chapter)
"$PROJECT_ROOT/.webnovel/state.json" - Read ; if it does not exist, initialize it as
"$PROJECT_ROOT/.webnovel/project_memory.json"{"patterns": []} - Parse the user input and classify the pattern_type (hook/pacing/dialogue/payoff/emotion)
- Append the record and write back to the file
约束
Constraints
- 不删除旧记录,仅追加
- 避免完全重复的 description(可去重)
- Do not delete old records, only append
- Avoid completely duplicate descriptions (deduplication is allowed)