# inkos 配置修复方案 ## 🔍 问题根本原因 通过分析,发现 inkos 系统存在以下核心问题: ### 1. **写作风格与平台不匹配** - 番茄小说需要:**快节奏、爽点密集、对话丰富、段落适中** - inkos 当前风格:**极简主义、短段落、心理描写多、节奏缓慢** ### 2. **审核标准与实际输出脱节** - 审核系统检测到问题(爽点虚化、段落过短) - 但写作引擎继续产生同样风格的内容 - 缺乏有效的反馈循环 ### 3. **缺乏平台适配** - 没有针对番茄小说的特殊优化 - 不了解平台读者的阅读习惯 - 缺乏对"爽文"特征的把握 ## 🔧 解决方案 ### 第一阶段:立即调整(配置文件) 在 inkos 配置中添加以下参数: ```json { "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. **段落合并算法** ```python 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. **爽点增强算法** ```python 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. **实时质量监控** ```bash # 监控脚本 #!/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. **自动修复机制** ```python 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:创建配置文件 ```bash # 创建 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:部署修复脚本 ```bash # 部署段落修复脚本 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 工作流 ```bash # 修改 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 **状态:** 配置修复方案制定完成,准备实施