Pisuan-Know core

skill_id: "writing.chapter"

install
source · Clone the upstream repo
git clone https://github.com/yogyoho/Pisuan-Know
manifest: src/agents/report-writing-agent/engine/skills/core/writing_chapter.skill.yaml
source content

skill_id: "writing.chapter" version: "1.0.0" name: "章节编写" description: "根据大纲编写单个章节内容,支持按章节ID指定和增量更新" type: "core" category: "writing" tags: ["写作", "章节", "生成"] author: "system" trigger: "explicit"

system_prompt: | 你是专业的环保报告编写专家。请根据提供的大纲和数据源,按照以下要求编写章节内容: 编写原则:

  1. 严格遵循报告类型的格式规范
  2. 内容要全面、准确、专业
  3. 数据引用要规范,来源清晰
  4. 逻辑清晰,论证充分
  5. 语言简洁,符合技术报告风格

user_prompt_template: | 请编写以下章节内容:

【章节信息】 章节ID: {{ chapter_id }} 章节标题: {{ chapter_title }} 章节序号: {{ chapter_order }}

【章节大纲要求】 {% if chapter_outline %} {{ chapter_outline }} {% else %}

  • 按照标准报告格式编写
  • 包含必要的背景介绍
  • 包含数据分析和建议结论 {% endif %}

【项目数据】 {% if data_sources %} {% for key, value in data_sources.items() %}

  • {{ key }}: {{ value | truncate(500) }} {% endfor %} {% else %} 无额外数据,请基于一般知识编写 {% endif %}

【前置章节摘要】 {% if previous_chapters_summary %} {{ previous_chapters_summary | truncate(2000) }} {% else %} 无前置章节 {% endif %}

【字数要求】 最低: {{ min_words | default(500) }} 字 建议: {{ suggested_words | default(1000) }} 字

【输出要求】

  1. 直接输出章节内容(Markdown格式)
  2. 不要包含章节标题(标题由系统添加)
  3. 内容要完整、连贯
  4. 如需引用数据或法规,请明确标注

inputs:

  • name: "chapter_id" type: "string" required: true description: "章节ID标识符"
  • name: "chapter_title" type: "string" required: true description: "章节标题"
  • name: "chapter_order" type: "string" required: false description: "章节序号" default: ""
  • name: "chapter_outline" type: "string" required: false description: "章节大纲/结构要求" default: ""
  • name: "data_sources" type: "object" required: false description: "章节依赖的数据源,键值对形式" default: {}
  • name: "previous_chapters_summary" type: "string" required: false description: "前置章节内容摘要" default: ""
  • name: "min_words" type: "number" required: false description: "最低字数要求" default: 500
  • name: "suggested_words" type: "number" required: false description: "建议字数" default: 1000

outputs:

  • name: "content" type: "string" description: "生成的章节内容"
  • name: "word_count" type: "number" description: "实际字数"
  • name: "data_references" type: "array" description: "引用的数据来源"
  • name: "quality_score" type: "number" description: "质量评分(0-100)"

output_format: "markdown" temperature: 0.3 max_tokens: 8000 quality_criteria: must_include: [] prohibited: []

examples:

  • name: "环境现状章节示例" input: chapter_id: "chapter_2" chapter_title: "环境现状调查与评价" chapter_order: "第二章" chapter_outline: | 1. 自然环境概况 2. 环境质量现状监测 3. 敏感目标调查 4. 现有环境问题分析 data_sources: project_name: "XX煤矿项目" location: "山西省XX市" monitoring_data: "PM2.5年均浓度35μg/m3,达标" previous_chapters_summary: "第一章介绍了项目基本情况" min_words: 800 suggested_words: 1500 expected_output: |

    2.1 自然环境概况

    项目位于山西省XX市,属温带大陆性季风气候区,年平均气温9.2℃,年降水量约420mm。地貌类型以黄土丘陵为主,海拔高度在1200-1500m之间。

    区域土壤主要为褐土和黄土,植被覆盖率约为35%。项目评价范围内无国家级自然保护区、风景名胜区等特殊保护区域。

    2.2 环境质量现状监测

    2.2.1 大气环境质量

    根据2023年环境质量监测数据,项目所在区域大气环境质量总体良好,各项指标均满足《环境空气质量标准》(GB3095-2012)二级标准要求:

    监测因子年均浓度(μg/m3)标准限值达标情况
    PM2.53535达标
    PM106870达标
    SO21860达标
    NO23240达标

    2.2.2 地表水环境质量

    项目附近河流为XX河,属季节性河流。根据监测结果,河流断面水质满足《地表水环境质量标准》(GB3838-2002)Ⅲ类水质标准要求。

    2.3 敏感目标调查

    经调查,项目评价范围内敏感目标主要包括:

    1. 居民点:项目厂界外500m范围内有居民3户,约15人
    2. 学校:XX小学位于项目西南方向约1.2km处
    3. 医疗机构:XX卫生院位于项目西侧约800m处

    2.4 现有环境问题分析

    根据现状调查,项目所在区域存在以下环境问题:

    1. 区域大气PM10浓度接近标准限值,需重点控制
    2. 地下水水位呈下降趋势,需关注采煤对地下水的影响
    3. 生态敏感区域分布广泛,需加强生态保护措施

    (后续需补充详细监测数据和保护措施建议) quality: "good" notes: "展示了标准章节结构,包含多个小节"