一键导入
quality
Generate a code quality report for a pipeline project by reading quality frontmatter from progress.md and optionally running fresh analysis.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate a code quality report for a pipeline project by reading quality frontmatter from progress.md and optionally running fresh analysis.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run pipeline Stage 2 (Architecture) for a project. Designs data model, API endpoints, migrations, and security scoping based on Pipeline Configuration in the conventions file.
Run pipeline Stage 1 (Discovery) for a project. Explores the target codebase to understand current state before designing changes.
Run pipeline Stage 3 (Gameplan) for a project. Produces the engineering spec from PRD + Discovery Report + APPROVED Architecture.
Run pipeline Stage 5 (Implementation) for a project milestone. Writes code to make Stage 4's failing tests pass.
Detect the current pipeline stage for a work item and run the next stage. Handles approval gates by invoking /pipeline-approve.
Run the full pipeline autonomously for a work item. Chains stages with context isolation, handles approval gates via interactive interview or auto-approve.
| name | quality |
| description | Generate a code quality report for a pipeline project by reading quality frontmatter from progress.md and optionally running fresh analysis. |
| argument-hint | <callsign> |
| allowed-tools | ["Read","Glob","Grep","Bash","mcp__wcp__wcp_get_artifact","mcp__wcp__wcp_attach","mcp__wcp__wcp_comment"] |
You generate a code quality report for a pipeline project by reading the pipeline_quality_* frontmatter from progress.md, optionally running fresh analysis against the repo baseline, and attaching a quality report to the work item.
wcp_get_artifact($ARGUMENTS, "progress.md") — quality frontmatter from Stage 5 implementation milestonesCLAUDE.md, AGENTS.md, or CONVENTIONS.md (use the first one found). Read it in full. From the ## Pipeline Configuration section, extract Repository Details (default branch, branch prefix, etc.), and look for a Complexity Analysis section.wcp_get_artifact($ARGUMENTS, "progress.md")If progress.md does not exist, STOP:
"No progress artifact found for
$ARGUMENTS. Run Stage 5 implementation first."
wcp_get_artifact($ARGUMENTS, "progress.md") — extract YAML frontmatter. Parse all pipeline_quality_* fields:
Per-milestone fields (pattern: pipeline_quality_mN_*):
pipeline_quality_mN_flog_avgpipeline_quality_mN_flog_maxpipeline_quality_mN_flog_max_methodpipeline_quality_mN_files_analyzedProject summary fields (written by /create-pr):
pipeline_quality_flog_avgpipeline_quality_repo_baseline_flog_avgpipeline_quality_deltapipeline_quality_verdictpipeline_quality_files_analyzedIf no pipeline_quality_* fields exist in the frontmatter, STOP with a helpful message:
"No quality data found in progress.md for
$ARGUMENTS. Quality metrics are captured during Stage 5 implementation when the conventions file has a Complexity Analysis section.To add quality data to an existing project, a future
/backfill-qualityskill (ROAD-20 v2) will support checking out old branches and running analysis retroactively."
If the conventions file has a Complexity Analysis section, run the repo baseline command for a fresh comparison:
<repo-baseline-command>
Parse the output to extract the current repo-wide flog/method average. Store as current_baseline.
If the command fails or the section doesn't exist, use the stored pipeline_quality_repo_baseline_flog_avg from frontmatter (if available) or —.
Check if the project branch still exists:
git branch --list '<branch-prefix>$ARGUMENTS'
If the branch exists:
git checkout <branch-prefix>$ARGUMENTSgit diff --name-only origin/<default-branch>...<branch-prefix>$ARGUMENTS -- '<file-glob>' (exclude spec/)git checkout -If the branch does not exist (already merged/deleted), note this in the report and rely solely on frontmatter data.
Failure handling: If any command fails, log a warning and continue with frontmatter data only. Never fail the report because of a stale branch.
Attach the quality report to the work item:
wcp_attach(
id=$ARGUMENTS,
type="quality",
title="Quality Report",
filename="quality.md",
content="[quality report]"
)
Use the following template for the report content:
# Code Quality Report — $ARGUMENTS
> Generated: <current date/time>
> Tool: [tool name from Pipeline Configuration, or from frontmatter context]
> Hotspot threshold: [threshold from Pipeline Configuration, or "unknown"]
## Quality Scorecard
| Metric | Value |
|--------|-------|
| **Project flog avg** | [from frontmatter or fresh analysis] |
| **Repo baseline avg** | [current_baseline or stored baseline] |
| **Delta** | [delta] |
| **Verdict** | [verdict] |
| **Total files analyzed** | [files_analyzed] |
## Per-Milestone Breakdown
| Milestone | Flog Avg | Flog Max | Max Method | Files |
|-----------|----------|----------|------------|-------|
| M1 | [m1_flog_avg] | [m1_flog_max] | [m1_flog_max_method] | [m1_files_analyzed] |
| M2 | ... | ... | ... | ... |
[One row per milestone with quality data]
## Hotspots
[Top 5 methods above the hotspot threshold, from fresh analysis if available, otherwise from per-milestone flog_max data]
| Score | Method | Source |
|-------|--------|--------|
| [score] | [ClassName#method_name] | [file path or milestone] |
[If no methods above threshold: "No methods above the hotspot threshold of [threshold]."]
## Baseline Context
| Metric | Value |
|--------|-------|
| **Stored baseline** (at PR time) | [pipeline_quality_repo_baseline_flog_avg] |
| **Current baseline** | [current_baseline or "—"] |
| **Baseline drift** | [current - stored, or "—"] |
> Baseline drift shows how the repo average has changed since the PR was created. A rising baseline means overall repo complexity is increasing.
## Data Quality Notes
- [Note whether data is from frontmatter only or includes fresh analysis]
- [Note if project branch was available for fresh analysis]
- [Note any milestones missing quality data]
- [Note if baseline was live or stored]
— in the table/create-pr run yet), compute from per-milestone data if possible— for any metric that cannot be computedAdd a comment to the work item summarizing the quality report:
wcp_comment(
id=$ARGUMENTS,
author="pipeline/quality",
body="Quality report attached as quality.md — [verdict summary]"
)
quality.md to the WCP work item.— for missing data.git checkout - after analysis.Tell the user:
$ARGUMENTS as quality.md