/edge-scrum:sprint-healthfrom edge-scrum
Analyzes sprint health for the OCPEDGE team using Jira data — capacity at sprint start, risks mid-sprint, or retrospective input at the end. Invoked by name or when sprint health is discussed.
Ships in edge-scrum. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are orchestrating a sprint health analysis for the OCPEDGE team. Data fetching runs inline using MCP tools and transform scripts. Analysis is delegated to sub-agents.
Before proceeding: Read
plugins/edge-scrum/references/Edge-Scrum-Laws.mdto identify which law files apply to Sprint Health, then read those files. Law files are the canonical reference for story pointing rules, workflow states, capacity rules, and hygiene expectations. When in doubt, the Laws win.
# Scrum Board
board_id: "11479"
board_name: "OpenShift Edge Scrum"
# Custom Field IDs
fields:
story_points: customfield_10028
parent: parent # native issue → Epic link (Jira Cloud)
epic_link: customfield_10014 # legacy fallback for the native Parent field
qa_contact: customfield_10470
flagged: customfield_10021
Rules:
plugins/edge-scrum/bin/) convert raw MCP data to structured JSONcheck-page.py to extract pagination info from persisted filesRead and Write — they consume the structured JSONThe user may provide arguments: $ARGUMENTS
285) → target that specific sprintRead these files and hold in working memory:
plugins/edge-scrum/references/Edge-Scrum-Laws.md — read the Sprint Health row in the Agent Task Index to identify required law filesplugins/edge-scrum/references/laws/00-team-roster.md — SP targets and roster rulesplugins/edge-scrum/references/laws/06-jira-fields.md — custom field IDsplugins/edge-scrum/references/laws/07-workflow-states.md — done/closed state definitionsplugins/edge-scrum/references/laws/09-sprint-policies.md — capacity rulesplugins/edge-scrum/.roster.json — extract username, display_name, sp_target per memberIf .roster.json does not exist, stop: "Roster file not found. Copy .roster.json.example to .roster.json and populate it before running this skill."
Parse $ARGUMENTS:
^[0-9]+$. Validate it before using it anywhere — it is interpolated into {WORKDIR} below, so a value with path or shell metacharacters must never reach the directory name. If it does not match, stop with an error (Invalid sprint number '<value>' — expected digits only.) and do not create the work directory. Otherwise set TARGET_SPRINT="<number>".TARGET_SPRINT="active" (the only non-numeric value allowed).Use AskUserQuestion to ask:
"Which sprint health mode would you like to run?
- capacity — start-of-sprint load and commitment health
- mid-sprint — burndown, blockers, and sprint goal risk
- retro — delivery summary, churn, and goal analysis"
Set MODE to one of: capacity, mid-sprint, retro.
Set TODAY = today's date as YYYY-MM-DD.
Create the work directory:
WORKDIR=/tmp/sprint-health-$(echo "$TARGET_SPRINT")-$(date +%Y%m%d) && mkdir -p "$WORKDIR" && echo "$WORKDIR"
Record WORKDIR.
Phase 2 is sequential: Complete Phase 2a before starting Phase 2b — Phase 2b requires
SPRINT_IDfrom Phase 2a's output.
Call jira_get_sprints_from_board for board_id "11479" three times:
state="active"state="closed" — paginate using page_token (see pagination protocol below)state="future"After each MCP call, the response is persisted to a file. Note each file path.
python3 plugins/edge-scrum/bin/transform-sprints.py \
--input <all_persisted_file_paths> \
--output {WORKDIR}/sprints.json \
--today {TODAY} \
--target-sprint {TARGET_SPRINT}
Read {WORKDIR}/sprints.json. Verify target_sprint is non-null. If null, stop: "Could not find sprint '{TARGET_SPRINT}'."
Extract:
SPRINT_ID = target_sprint.idSPRINT_START = target_sprint.startSPRINT_NAME = target_sprint.nameSPRINT_NUM = last digits from target_sprint.name (e.g., "OCPEDGE Sprint 285" → 285)Call jira_search with:
project in (OCPEDGE, USHIFT, OCPBUGS) AND sprint = {SPRINT_ID} ORDER BY priority ASCkey, summary, description, status, issuetype, assignee, created, updated, labels, issuelinks, customfield_10028, parent, customfield_10014, customfield_10021, customfield_1047050Paginate using page_token (see pagination protocol below). Note all persisted file paths.
Write the sprint metadata to a file with the Write tool first (never interpolate the Jira sprint name into a shell command — it is attacker-influenced text):
{WORKDIR}/sprint_issues.meta.json = {"sprint_id": {SPRINT_ID}, "sprint_name": <SPRINT_NAME as a JSON-escaped string>}
JSON-encode SPRINT_NAME (a name containing " or \ breaks the file otherwise) and confirm the metadata file parses as JSON before running the transform.
python3 plugins/edge-scrum/bin/transform-sprint-issues.py \
--input <all_persisted_file_paths> \
--output {WORKDIR}/sprint_issues.json \
--sprint-meta {WORKDIR}/sprint_issues.meta.json \
--today {TODAY}
Read {WORKDIR}/sprint_issues.json. If total_issues is 0, warn: "Sprint {SPRINT_NAME} has no issues — analysis sections will be sparse." Proceed anyway.
For MODE = capacity, compute the team's measured velocity — the average completed SP over the last 3 closed sprints (edge-context decision 0015). Skip this phase for mid-sprint and retro modes. If the data is unavailable, skip it and proceed; the capacity analyzer falls back to the roster-capacity figure and says so.
Write this run's velocity files to a fresh, uniquely named directory created with mktemp -d. Because the directory is new each run (a random suffix, no predictable path), there are no stale files for a glob to pick up and nothing to delete:
VELOCITY_DIR=$(mktemp -d "{WORKDIR}/velocity.XXXXXX") && echo "$VELOCITY_DIR"
Record VELOCITY_DIR and substitute it for {VELOCITY_DIR} below. It sits inside {WORKDIR}, so the end-of-run cleanup removes it with the rest of the run directory.
Read {WORKDIR}/sprints.json → sprint_map. Pick the three closed sprints with the highest num that is < SPRINT_NUM (the three most recent closed sprints before the target). Phase 2a transformed the board data without --first-sprint/--last-sprint, so sprint_map holds the full sprint history and no extra board call is needed. Record each sprint's id, num, and (if available) start/end (the sprint_map date keys), and collect the exact file path you write for each into {VELOCITY_FILES}.
For each of those sprint IDs, call jira_search:
project in (OCPEDGE, USHIFT, OCPBUGS) AND sprint = {SPRINT_ID}key, summary, status, issuetype, assignee, resolutiondate, customfield_10028, customfield_10470, customfield_1002050, paginate with page_token.Write the sprint metadata to a file with the Write tool (never interpolate the Jira sprint name into a shell command):
{VELOCITY_DIR}/velocity_s{NUM}.meta.json =
{"sprint_id": {SPRINT_ID}, "sprint_name": <SPRINT_NAME as a JSON-escaped string>, "sprint_start": <"YYYY-MM-DD" or null>, "sprint_end": <"YYYY-MM-DD" or null>}
JSON-encode SPRINT_NAME (a name containing " or \ breaks the file otherwise) and use the bare JSON literal null for a missing date, never the string "null" (which compute-velocity.py would treat as a real date). Read the metadata file back and confirm it parses as JSON before running the transform; if it does not, skip this sprint's velocity contribution.
Then run (pass the metadata file, not --sprint-name):
python3 plugins/edge-scrum/bin/transform-sprint-issues.py \
--input <all_persisted_file_paths> \
--output {VELOCITY_DIR}/velocity_s{NUM}.json \
--sprint-meta {VELOCITY_DIR}/velocity_s{NUM}.meta.json \
--today {TODAY}
Compute velocity from the (up to) three sprint files. Pass the exact files you wrote in {VELOCITY_FILES} (space-separated, each under {VELOCITY_DIR}), never a velocity_s*.json glob:
python3 plugins/edge-scrum/bin/compute-velocity.py \
--sprint-issues {VELOCITY_FILES} \
--roster plugins/edge-scrum/.roster.json \
--output {VELOCITY_DIR}/velocity.json
Velocity counts completed SP of team-owned issues (assignee or QA Contact on the roster, per law 00); bugs count like other work (decision 0003). A done issue is credited only to the sprint it finished in — the sprint with the latest end date among the sprints it belonged to (falling back to the highest sprint id, then its resolution date, when end dates are missing; Jira does not return the list in reliable order) — so a carried-over issue is not double-counted. The capacity analyzer reads {VELOCITY_DIR}/velocity.json if present.
This Jira instance uses page_token pagination, NOT start_at. Follow this protocol for all paginated MCP calls:
Make the first call without page_token
The response is persisted to a file. Note the file path.
Run check-page.py to get pagination info:
python3 plugins/edge-scrum/bin/check-page.py <persisted_file_path>
Output: {"issues_count": N, "has_more": bool, "next_page_token": "..."}
If has_more is true: make the next call with page_token set to the next_page_token value. Repeat from step 2.
If has_more is false: pagination is complete.
For jira_get_sprints_from_board: closed sprints may require multiple pages. Active and future typically fit in one page each.
Based on MODE, read the corresponding skill file, substitute placeholders, and spawn as a sub-agent.
capacity:
Read plugins/edge-scrum/skills/sprint-health-capacity-analyzer/SKILL.md. Substitute:
{WORKDIR} → work directory path{VELOCITY_DIR} → velocity directory path from Phase 2c (holds velocity.json when it ran; if Phase 2c was skipped, substitute an empty value and the analyzer uses the roster fallback){TODAY} → today's date{SPRINT_START} → sprint start datemid-sprint:
Read plugins/edge-scrum/skills/sprint-health-midpoint-analyzer/SKILL.md. Substitute:
{WORKDIR} → work directory path{TODAY} → today's dateretro:
Read plugins/edge-scrum/skills/sprint-health-retro-analyzer/SKILL.md. Substitute:
{WORKDIR} → work directory path{TODAY} → today's date{SPRINT_START} → sprint start date{SPRINT_ID} → sprint ID integerAfter the sub-agent completes, read {WORKDIR}/analysis.md to verify it was written successfully.
Read {WORKDIR}/sprints.json to get target_sprint values. Read {WORKDIR}/sprint_issues.json to get total_sp and total_issues.
Determine the capacity line:
{VELOCITY_DIR}/velocity.json, capacity mode only) and it exists, read team_velocity and set
CAPACITY_LINE = Team velocity (last 3 sprints): {team_velocity} SP.total_roster_sp = sum of all sp_target values in .roster.json
and set CAPACITY_LINE = {total_roster_sp} SP (roster fallback — velocity not measured).Assemble the final report:
a. Write this header:
# Sprint Health: {SPRINT_NAME}
**Date**: {TODAY}
**Mode**: {MODE}
**Sprint**: {target_sprint.start} – {target_sprint.end} | {target_sprint.days_elapsed} of {target_sprint.total_days} days elapsed
**Goal**: {target_sprint.goal or "Not set"}
**Team**: {roster_size} members | {CAPACITY_LINE}
**Committed**: {total_sp} SP across {total_issues} issues
---
b. Append the body from {WORKDIR}/analysis.md, replacing each line that matches the pattern ===SECTION:<name>=== (any section name) with a blank line.
Write the assembled report to:
.reports/sprint_health_{SPRINT_NUM}_{MODE}_{TODAY}.md
Clean up:
test -n "$WORKDIR" && [[ "$WORKDIR" == /tmp/sprint-health-* ]] && rm -rf -- "$WORKDIR"
transform-sprints.py selects the highest-numbered closed sprint; report proceeds normally.plugins/edge-scrum/bin/ — reusable data transformation (no LLM needed)plugins/edge-scrum/skills/sprint-health-*/SKILL.md — LLM-driven analysisplugins/edge-scrum/references/laws/ (per the index in references/Edge-Scrum-Laws.md) — never hardcode rules here.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub openshift-eng/edge-tooling --plugin edge-scrum9 skills in this plugin
/create-epicedge-scrum:create-epicUse when creating a new Epic in Jira for the OpenShift Edge team — enforces team conventions for required fields, description template, sizing, and parent linkage from Edge Scrum Laws/release-healthUse when analyzing the health of an OCP release cycle — evaluates Features, Initiatives, Epics, and Tasks from Jira to assess progress, identify risks, surface refinement gaps, and recommend actions to keep the team on track toward branch cut/release-health-analysisAnalyze release health data and produce assessment/release-planningUse when assessing whether the team can deliver planned scope within remaining time — evaluates capacity, timeline, assignment, bug load, sizing, and progress risks per person and per feature to surface planning risks before they become execution problems/release-planning-analysisWrite the actionable recommendations and narrative for a release planning risk assessment — reads pre-computed check results and produces a short, decision-oriented recommendations file/sprint-health-capacity-analyzerAnalyze sprint capacity and commitment health