novel-doomsday-resurgence/inkos_config_fix.md
唐天洛 5dc8c00de0 feat(sync): 固化小说内容到Git仓库
📚 小说内容:
- 《末日重生-开局囤货十亿物资》33章
- 完整的状态文件、记忆索引、钩子系统

🛠️ 系统配置:
- 版本控制管理系统
- 自动化脚本系统
- 质量监控系统

🧠 固化记忆:
- 长期记忆文件
- 系统配置文档
- 恢复流程指南

💾 数据安全:
- 本地备份系统
- Git版本控制
- 远程同步机制

同步时间: 2026-03-30 16:25:35
系统状态: inkos正常运行中 (PID: 1433309)
创作进度: 第33章《油粮》创作中
2026-03-30 16:25:35 +08:00

6.6 KiB
Raw Permalink Blame History

inkos 配置修复方案

🔍 问题根本原因

通过分析,发现 inkos 系统存在以下核心问题:

1. 写作风格与平台不匹配

  • 番茄小说需要:快节奏、爽点密集、对话丰富、段落适中
  • inkos 当前风格:极简主义、短段落、心理描写多、节奏缓慢

2. 审核标准与实际输出脱节

  • 审核系统检测到问题(爽点虚化、段落过短)
  • 但写作引擎继续产生同样风格的内容
  • 缺乏有效的反馈循环

3. 缺乏平台适配

  • 没有针对番茄小说的特殊优化
  • 不了解平台读者的阅读习惯
  • 缺乏对"爽文"特征的把握

🔧 解决方案

第一阶段:立即调整(配置文件)

在 inkos 配置中添加以下参数:

{
  "writing_style": {
    "platform": "tomato",
    "target_readers": "mobile_young",
    "reading_habit": {
      "prefer_dialogue": true,
      "prefer_short_chapters": true,
      "prefer_fast_pacing": true,
      "prefer_emotional_hooks": true
    },
    "paragraph_rules": {
      "min_length_chinese": 35,
      "max_consecutive_short": 3,
      "short_paragraph_ratio_warning": 0.3,
      "dialogue_paragraph_ratio_target": 0.4
    },
    "content_rules": {
      "爽点_density_per_chapter": 3,
      "emotional_arc_required": true,
      "reader_expectation_management": true,
      "anti_ai_patterns": true
    }
  }
}

第二阶段:写作引擎优化

1. 段落合并算法

def merge_short_paragraphs(paragraphs, min_length=35):
    """合并短段落"""
    merged = []
    buffer = []
    
    for para in paragraphs:
        # 计算段落长度(中文字符)
        char_count = count_chinese_chars(para)
        
        if char_count < min_length:
            buffer.append(para)
        else:
            if buffer:
                # 合并缓冲区中的短段落
                merged_para = " ".join(buffer)
                merged.append(merged_para)
                buffer = []
            merged.append(para)
    
    # 处理剩余的缓冲区
    if buffer:
        merged_para = " ".join(buffer)
        merged.append(merged_para)
    
    return merged

2. 爽点增强算法

def enhance_golden_points(text, chapter_num):
    """增强爽点"""
    if chapter_num == 1:  # 黄金三章
        enhancements = [
            "明确展现重生优势",
            "建立清晰的时间紧迫感",
            "设置第一个小冲突",
            "埋下第一个爽点伏笔"
        ]
    elif chapter_num <= 3:  # 前三章
        enhancements = [
            "兑现第一个爽点",
            "展现主角优势",
            "打脸第一个小反派",
            "建立升级体系"
        ]
    else:  # 后续章节
        enhancements = [
            "每章至少一个爽点",
            "保持升级节奏",
            "管理读者期待",
            "设置章节钩子"
        ]
    
    return apply_enhancements(text, enhancements)

第三阶段:监控与反馈

1. 实时质量监控

# 监控脚本
#!/bin/bash
while true; do
    # 检查段落长度
    python3 check_paragraphs.py
    
    # 检查爽点密度
    python3 check_golden_points.py
    
    # 检查读者期待管理
    python3 check_expectation_management.py
    
    # 生成报告
    python3 generate_quality_report.py
    
    sleep 300  # 每5分钟检查一次
done

2. 自动修复机制

class AutoFixer:
    def __init__(self):
        self.rules = {
            "short_paragraphs": self.fix_short_paragraphs,
            "missing_golden_points": self.add_golden_points,
            "flat_emotional_arc": self.enhance_emotional_arc,
            "tool_characters": self.enrich_characters
        }
    
    def fix_chapter(self, chapter_text, problems):
        """根据问题自动修复章节"""
        for problem in problems:
            if problem in self.rules:
                chapter_text = self.rules[problem](chapter_text)
        return chapter_text

🚀 实施步骤

步骤1创建配置文件

# 创建 inkos 配置文件
cat > /root/.openclaw/workspace/tomato-novel/inkos_config.json << EOF
{
  "writing_style": {
    "platform": "tomato",
    "target_readers": "mobile_young",
    "paragraph_rules": {
      "min_length_chinese": 35,
      "max_consecutive_short": 3
    }
  }
}
EOF

步骤2部署修复脚本

# 部署段落修复脚本
cp fix_paragraphs.py /root/.openclaw/workspace/tomato-novel/scripts/

# 部署爽点增强脚本
cp enhance_golden_points.py /root/.openclaw/workspace/tomato-novel/scripts/

# 部署监控脚本
cp monitor_quality.py /root/.openclaw/workspace/tomato-novel/scripts/

步骤3集成到 inkos 工作流

# 修改 inkos 启动脚本
cat >> /root/.openclaw/workspace/tomato-novel/start.sh << 'EOF'
# 加载配置
export INKOS_CONFIG=/root/.openclaw/workspace/tomato-novel/inkos_config.json

# 启动质量监控
python3 /root/.openclaw/workspace/tomato-novel/scripts/monitor_quality.py &

# 启动 inkos
inkos up
EOF

📊 预期效果

质量指标改善

指标 当前 目标 改善幅度
短段落比例 64.1% <30% -53%
爽点密度 1.2/章 3/章 +150%
情绪弧线起伏 0.3 0.7 +133%
审核通过率 60% 90% +50%

读者体验改善

  1. 阅读流畅性提升:段落长度适中,减少频繁换行
  2. 爽点密度增加每章至少3个爽点保持阅读兴趣
  3. 情绪管理优化:情绪起伏明显,增强代入感
  4. 期待管理加强:章节钩子明确,提升追读率

🛠️ 工具列表

已创建工具

  1. fix_paragraphs.py - 段落合并工具
  2. enhance_golden_points.py - 爽点增强工具
  3. monitor_quality.py - 质量监控工具
  4. audit_chapter1.sh - 章节审核工具

待创建工具

  1. emotional_arc_analyzer.py - 情绪弧线分析
  2. reader_expectation_tracker.py - 读者期待跟踪
  3. character_enrichment.py - 角色丰富化
  4. plot_pacing_optimizer.py - 情节节奏优化

📞 支持与维护

紧急联系方式

  • 系统问题:重启 inkos 服务
  • 配置问题:检查 /root/.openclaw/workspace/inkos_config_fix.md
  • 写作问题:运行监控脚本获取诊断报告

定期维护

  1. 每日:检查质量报告,调整参数
  2. 每周:分析读者反馈,优化算法
  3. 每月:评估整体效果,更新策略

最后更新: 2026-03-30 05:46 AM
状态: 配置修复方案制定完成,准备实施