dotnet-reportgenerator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ReportGenerator for .NET

适用于.NET的ReportGenerator

Trigger On

适用场景

  • the repo uses or wants
    ReportGenerator
  • CI needs human-readable coverage reports
  • multiple coverage files must be merged
  • 代码库使用或想要使用
    ReportGenerator
  • CI需要可读性强的覆盖率报告
  • 需要合并多个覆盖率文件

Value

价值

  • produce a concrete project delta: code, docs, config, tests, CI, or review artifact
  • reduce ambiguity through explicit planning, verification, and final validation skills
  • leave reusable project context so future tasks are faster and safer
  • 生成具体的项目变更:代码、文档、配置、测试、CI或审核产物
  • 通过明确的规划、验证和最终确认能力减少歧义
  • 留存可复用的项目上下文,让后续任务更快速安全

Do Not Use For

不适用场景

  • raw coverage collection with no reporting need
  • 仅需原始覆盖率收集、无需生成报告的场景

Inputs

输入

  • the nearest
    AGENTS.md
  • existing coverage artifacts
  • desired output formats
  • 最近的
    AGENTS.md
  • 现有覆盖率产物
  • 期望的输出格式

Quick Start

快速开始

  1. Read the nearest
    AGENTS.md
    and confirm scope and constraints.
  2. Run this skill's
    Workflow
    through the
    Ralph Loop
    until outcomes are acceptable.
  3. Return the
    Required Result Format
    with concrete artifacts and verification evidence.
  1. 阅读最近的
    AGENTS.md
    并确认范围和约束。
  2. 通过
    Ralph Loop
    运行本技能的
    工作流
    ,直到结果符合要求。
  3. 返回符合
    要求结果格式
    的内容,包含具体产物和验证证据。

Workflow

工作流

  1. Keep collection and rendering separate: Coverlet collects, ReportGenerator renders.
  2. Prefer the local or manifest-based .NET tool for reproducible CI runs.
  3. Choose output formats deliberately:
    • HtmlSummary
    • Cobertura
    • MarkdownSummaryGithub
    • badges
  4. Merge multiple reports only when the repo really needs a consolidated view.
  1. 保持收集和渲染分离:Coverlet负责收集,ReportGenerator负责渲染。
  2. 优先使用本地或基于清单的.NET工具,保证CI运行可复现。
  3. 谨慎选择输出格式:
    • HtmlSummary
    • Cobertura
    • MarkdownSummaryGithub
    • 徽章
  4. 仅当代码库确实需要统一视图时,才合并多个报告。

Bootstrap When Missing

未配置时的初始化流程

If
ReportGenerator
is not configured yet:
  1. Detect current state:
    • rg --files -g '.config/dotnet-tools.json'
    • dotnet tool list --local
    • dotnet tool list --global
    • command -v reportgenerator
  2. Prefer local tool installation for reproducible CI:
    • dotnet new tool-manifest
      (if missing)
    • dotnet tool install dotnet-reportgenerator-globaltool
  3. Add one explicit render command to
    AGENTS.md
    and CI, for example:
    • dotnet tool run reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"artifacts/coverage" -reporttypes:"HtmlSummary;Cobertura"
  4. Run the report command once and return
    status: configured
    or
    status: improved
    .
  5. If raw coverage outputs are already sufficient and no rendered artifacts are needed, return
    status: not_applicable
    .
如果
ReportGenerator
尚未配置:
  1. 检测当前状态:
    • rg --files -g '.config/dotnet-tools.json'
    • dotnet tool list --local
    • dotnet tool list --global
    • command -v reportgenerator
  2. 为了CI可复现,优先选择本地工具安装:
    • dotnet new tool-manifest
      (如果不存在)
    • dotnet tool install dotnet-reportgenerator-globaltool
  3. AGENTS.md
    和CI中添加明确的渲染命令,例如:
    • dotnet tool run reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"artifacts/coverage" -reporttypes:"HtmlSummary;Cobertura"
  4. 运行一次报告命令,返回
    status: configured
    status: improved
  5. 如果原始覆盖率输出已经足够,无需渲染产物,返回
    status: not_applicable

Deliver

交付物

  • readable coverage artifacts for humans and CI systems
  • explicit report-generation commands
  • 可供人工和CI系统读取的覆盖率产物
  • 明确的报告生成命令

Validate

验证

  • report inputs match the generated coverage format
  • generated reports land in a stable artifact path
  • 报告输入与生成的覆盖率格式匹配
  • 生成的报告存放在稳定的产物路径下

Ralph Loop

Ralph Loop

Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
  1. Plan first (mandatory):
    • analyze current state
    • define target outcome, constraints, and risks
    • write a detailed execution plan
    • list final validation skills to run at the end, with order and reason
  2. Execute one planned step and produce a concrete delta.
  3. Review the result and capture findings with actionable next fixes.
  4. Apply fixes in small batches and rerun the relevant checks or review steps.
  5. Update the plan after each iteration.
  6. Repeat until outcomes are acceptable or only explicit exceptions remain.
  7. If a dependency is missing, bootstrap it or return
    status: not_applicable
    with explicit reason and fallback path.
所有任务都使用Ralph Loop,包括文档、架构、测试和工具类工作。
  1. 首先规划(强制要求):
    • 分析当前状态
    • 定义目标结果、约束和风险
    • 编写详细的执行计划
    • 列出最终要运行的验证能力,包含执行顺序和原因
  2. 执行一个规划好的步骤,生成具体变更。
  3. 审核结果,记录发现的问题以及可执行的后续修复方案。
  4. 小批量应用修复,重新运行相关检查或审核步骤。
  5. 每次迭代后更新计划。
  6. 重复上述步骤,直到结果符合要求或仅剩明确的例外情况。
  7. 如果缺少依赖,先初始化依赖,或返回
    status: not_applicable
    ,并说明明确原因和备选方案。

Required Result Format

要求的结果格式

  • status
    :
    complete
    |
    clean
    |
    improved
    |
    configured
    |
    not_applicable
    |
    blocked
  • plan
    : concise plan and current iteration step
  • actions_taken
    : concrete changes made
  • validation_skills
    : final skills run, or skipped with reasons
  • verification
    : commands, checks, or review evidence summary
  • remaining
    : top unresolved items or
    none
For setup-only requests with no execution, return
status: configured
and exact next commands.
  • status
    :
    complete
    |
    clean
    |
    improved
    |
    configured
    |
    not_applicable
    |
    blocked
  • plan
    : 简洁的计划和当前迭代步骤
  • actions_taken
    : 已执行的具体变更
  • validation_skills
    : 最终运行的能力,或跳过的原因
  • verification
    : 命令、检查或审核证据摘要
  • remaining
    : 主要未解决项或
    none
如果仅请求设置无需执行,返回
status: configured
以及准确的后续命令。

Load References

加载参考

  • references/reportgenerator.md
  • references/commands.md
  • references/formats.md
  • references/reportgenerator.md
  • references/commands.md
  • references/formats.md

Example Requests

请求示例

  • "Render coverage as HTML in CI."
  • "Merge multiple Coverlet reports."
  • "在CI中将覆盖率渲染为HTML格式"
  • "合并多个Coverlet报告"