将deep调研结果汇总为markdown报告,覆盖所有字段,跳过不确定值。
/research-report
在当前工作目录查找 */outline.yaml,读取topic和output_dir配置。
读取所有JSON结果,提取适合在目录中显示的字段(数值型、简短指标),例如:
使用AskUserQuestion询问用户:
在 {topic}/ 目录下生成 generate_report.py,脚本要求:
{topic}/report.md目录格式要求:
1. [GitHub Copilot](#github-copilot) - Stars: 10k | Score: 85%1. JSON结构兼容 支持两种JSON结构:
{"name": "xxx", "release_date": "xxx"}{"basic_info": {"name": "xxx"}, "technical_features": {...}}字段查找顺序:顶层 -> category映射key -> 遍历所有嵌套dict
2. Category多语言映射 fields.yaml的category名与JSON的key可能是任意组合(中中、中英、英中、英英)。必须建立双向映射:
CATEGORY_MAPPING = {
"基本信息": ["basic_info", "基本信息"],
"技术特性": ["technical_features", "technical_characteristics", "技术特性"],
"性能指标": ["performance_metrics", "performance", "性能指标"],
"里程碑意义": ["milestone_significance", "milestones", "里程碑意义"],
"商业信息": ["business_info", "commercial_info", "商业信息"],
"竞争与生态": ["competition_ecosystem", "competition", "竞争与生态"],
"历史沿革": ["history", "历史沿革"],
"市场定位": ["market_positioning", "market", "市场定位"],
}
3. 复杂值格式化
|分隔kv<br>或使用blockquote格式,提高可读性4. 额外字段收集 收集JSON中有但fields.yaml中没定义的字段,放入"其他信息"分类。注意过滤:
_source_file, uncertainbasic_info, technical_features等uncertain数组:需要逐行显示每个字段名,不要压缩成一行5. 不确定值跳过 跳过条件:
[不确定]字符串uncertain数组中运行 python {topic}/generate_report.py
{topic}/generate_report.py - 转换脚本{topic}/report.md - 汇总报告