{
  "name": "inkos-format-optimizer",
  "version": "1.0.0",
  "description": "优化inkos输出格式，避免加粗、标题重复、排版混乱问题",
  "enabled": true,
  
  "chapter_title_optimization": {
    "min_title_length": 3,
    "max_title_length": 8,
    "avoid_duplicate_titles": true,
    "title_quality_checks": {
      "avoid_single_words": true,
      "avoid_repetitive_titles": true,
      "require_emotional_hook": true,
      "require_action_verb": false
    },
    "title_templates": [
      "危机_名词",
      "行动_动词",
      "地点_事件",
      "时间_转折",
      "人物_冲突"
    ],
    "predefined_titles": {
      "chapter_2": "暗流涌动",
      "chapter_3": "仓鼠行动",
      "chapter_4": "物资先行", 
      "chapter_5": "钢铁堡垒",
      "chapter_6": "焊光四溅",
      "chapter_7": "骨刺警告",
      "chapter_8": "暗流再起",
      "chapter_9": "初次对峙",
      "chapter_10": "末日倒计时",
      "chapter_11": "生存筹码",
      "chapter_12": "深夜质询",
      "chapter_13": "铁锈危机",
      "chapter_14": "断水危机"
    }
  },
  
  "markdown_format_rules": {
    "chapter_header": {
      "format": "# 第{chapter_number}章 {title}",
      "require_blank_line_after": true,
      "prohibit_bold": true
    },
    "paragraph_format": {
      "min_paragraph_length": 50,
      "max_paragraph_length": 500,
      "require_blank_line_between": true,
      "prohibit_bold_within": true
    },
    "dialogue_format": {
      "chinese_quotes": "“”",
      "require_separate_paragraph": true,
      "speaker_after_quotes": true,
      "example": "“对话内容，”他说。"
    },
    "section_breaks": {
      "use_triple_dash": "---",
      "require_blank_lines": true,
      "end_chapter_with_break": true
    }
  },
  
  "content_quality_rules": {
    "prohibit_patterns": [
      "**加粗文本**",
      "## 多余的标题",
      "# 第{num}章 {title}##",
      "【爽点一：信息碾压】",
      "【爽点：重生者的先知优势】"
    ],
    "required_patterns": [
      "合理的段落分隔",
      "标准对话格式",
      "章节标题清晰",
      "章节结尾分隔线"
    ],
    "auto_fix_rules": {
      "remove_excessive_bold": true,
      "fix_misplaced_headings": true,
      "normalize_dialogue_format": true,
      "add_missing_line_breaks": true,
      "standardize_chapter_endings": true
    }
  },
  
  "generation_pipeline": {
    "pre_generation_checks": {
      "validate_title": true,
      "check_duplicate_titles": true,
      "verify_template_compliance": true
    },
    "generation_constraints": {
      "avoid_bold_formatting": true,
      "use_standard_markdown": true,
      "enforce_paragraph_rules": true
    },
    "post_generation_fixes": {
      "auto_format_chapter": true,
      "remove_format_errors": true,
      "add_missing_elements": true,
      "validate_final_output": true
    }
  },
  
  "monitoring_and_correction": {
    "real_time_checks": {
      "check_every_chapter": true,
      "alert_on_format_errors": true,
      "auto_correct_immediately": true
    },
    "quality_metrics": {
      "format_compliance_score": true,
      "title_quality_score": true,
      "paragraph_structure_score": true,
      "dialogue_format_score": true
    },
    "correction_strategies": {
      "retry_with_better_format": true,
      "use_template_if_failed": true,
      "escalate_to_human_if_needed": true
    }
  },
  
  "integration": {
    "with_inkos": {
      "config_path": "/root/.openclaw/workspace/tomato-novel/config.json",
      "priority": "high",
      "reload_on_change": true
    },
    "with_project": {
      "chapter_directory": "/root/.openclaw/workspace/tomato-novel/books/末日重生-开局囤货十亿物资/chapters",
      "backup_before_changes": true,
      "version_control_integration": true
    }
  },
  
  "templates": {
    "chapter_template": "# 第{chapter_number}章 {title}\n\n{content}\n\n---",
    "paragraph_template": "{paragraph_text}\n",
    "dialogue_template": "“{dialogue_content}，”{speaker}说。\n",
    "action_template": "{character}{action_description}。\n"
  }
}