원클릭으로
metrics
Compute and display pipeline timing metrics for a project by reading YAML frontmatter from all project documents.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Compute and display pipeline timing metrics for a project by reading YAML frontmatter from all project documents.
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 | metrics |
| description | Compute and display pipeline timing metrics for a project by reading YAML frontmatter from all project documents. |
| argument-hint | <callsign> |
| allowed-tools | ["Read","Glob","Grep","Bash","mcp__wcp__wcp_get_artifact","mcp__wcp__wcp_attach","mcp__wcp__wcp_comment"] |
You compute pipeline timing metrics for a project by reading the YAML frontmatter from all project artifacts on a WCP work item, enriching with git/PR data, and producing a metrics report.
$ARGUMENTSCLAUDE.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.).wcp_get($ARGUMENTS) or attempt to read any artifact.Read each of these artifacts via wcp_get_artifact($ARGUMENTS, filename):
prd.mddiscovery-report.mdarchitecture-proposal.mdgameplan.mdtest-coverage-matrix.mdprogress.mdreview-report.mdqa-plan.mdFor each that returns content, extract the YAML frontmatter (lines between the opening and closing --- markers). Skip any that don't exist.
Parse these fields from each document:
pipeline_stagepipeline_stage_namepipeline_started_atpipeline_completed_atpipeline_approved_at (architecture-proposal.md, gameplan.md)pipeline_backfilled (boolean)pipeline_m*_started_at / pipeline_m*_completed_at (progress.md)pipeline_pr_created_at / pipeline_pr_url (progress.md)Check for PR merge data:
gh pr list --head '<branch-prefix>$ARGUMENTS' --state merged --json mergedAt,createdAt,url --limit 1
If a merged PR is found, extract mergedAt and createdAt. If no merged PR, try open PRs:
gh pr list --head '<branch-prefix>$ARGUMENTS' --state open --json createdAt,url --limit 1
For each stage, compute:
completed_at - started_at (if both exist)completed_at and the next stage's started_atFor stages with approval checkpoints:
completed_at - started_at (agent work time)approved_at - completed_at (time waiting for human approval)For implementation milestones:
mN_completed_at - mN_started_atCompute summary metrics:
started_at (or completed_at if backfilled) → PR merge time (or latest completed_at)Format all durations in human-readable form:
Xm (e.g., 25m)Xh Ym (e.g., 2h 15m)Xd Yh (e.g., 3d 2h)Attach the metrics report to the work item:
wcp_attach(
id=$ARGUMENTS,
type="metrics",
title="Pipeline Metrics",
filename="metrics.md",
content="[metrics report]"
)
Use this template for the report content:
# Pipeline Metrics — $ARGUMENTS
> Generated: <current date/time>
> Data quality: [live / partially backfilled / fully backfilled]
## Stage Timeline
| Stage | Document | Started | Completed | Duration | Wait → Next |
|-------|----------|---------|-----------|----------|-------------|
| 0: PRD | prd.md | ... | ... | ... | ... |
| 1: Discovery | discovery-report.md | ... | ... | ... | ... |
| 2: Architecture | architecture-proposal.md | ... | ... | ... | — |
| 2→3: Human Review | — | ... | approved ... | ... | — |
| 3: Gameplan | gameplan.md | ... | ... | ... | — |
| 3→4: Human Review | — | ... | approved ... | ... | — |
| 4: Test Generation | test-coverage-matrix.md | ... | ... | ... | ... |
| 5: Implementation | progress.md | — | — | — | — |
| 5/M1 | — | ... | ... | ... | ... |
| 5/M2 | — | ... | ... | ... | ... |
| [continue for each milestone] | | | | | |
| 7: QA Plan | qa-plan.md | ... | ... | ... | ... |
| PR Created | — | — | ... | — | ... |
| PR Merged | — | — | ... | — | — |
Use `—` for fields where data is unavailable.
## Summary
| Metric | Value |
|--------|-------|
| **Total Lead Time** (PRD start → PR merge) | ... |
| **Active Agent Time** | ... |
| **Human Review Time** | ... |
| **Idle/Queue Time** | ... |
| **Agent Efficiency** | ...% |
## Implementation Breakdown
| Milestone | Duration | Files | Tests |
|-----------|----------|-------|-------|
| M1 | ... | ... | ... |
| M2 | ... | ... | ... |
| **Total** | ... | ... | ... |
[If milestone-level data is available from progress.md]
## Data Quality Notes
- [Note which stages have live vs backfilled timestamps]
- [Note any stages with missing data]
- [Note if started_at is missing (backfilled documents)]
— in the tablestarted_at is missing (backfilled), duration cannot be computed — show — for durationcompleted_at exists, still show it in the timeline for orderingAdd a comment to the work item summarizing the metrics:
wcp_comment(
id=$ARGUMENTS,
author="pipeline/metrics",
body="Metrics report attached as metrics.md — [brief summary of key metrics]"
)
metrics.md.— for missing data.Tell the user:
$ARGUMENTS as metrics.md