Scorecard Regression Analysis
Analyze scorecard performance and numerics regressions, classify by trend,
cluster by root cause, and post a structured triage comment on the GitHub issue.
Budget: You have ~35 tool calls. Be efficient. Batch queries. Do NOT read files one-by-one.
Context Variables
Injected via the workflow prompt:
ISSUE_URL — the regression issue URL in qcom-ai-hub/tetracode
RUN_ID — GitHub Actions run ID
RUN_URL — direct link to the scorecard workflow run
DEPLOYMENT — "prod" or "dev"/"staging"
ARTIFACT_NAME — name of the artifact bundle to download
TREND_SUMMARY — JSON with trend counts (passed inline, no download needed):
{"lookback": N, "threshold": N, "total_current": N, "sustained_count": N, "new_count": N, "flaky_count": N, "recovered_count": N}
Use these counts directly in the Summary table. If "unavailable", classify all trends as unknown.
Critical Rules
- ALWAYS use
--json and --jq flags for gh API calls — never parse human-readable text
- NEVER use
!= in --jq expressions — bash mangles !. Use select(.x == "y") instead
- NEVER assign to a specific person — route to teams only (czar rotates weekly)
- Use fully-qualified cross-repo references:
qcom-ai-hub/ai-hub-models-internal#N
- Keep the final comment under 65,000 characters
- If a file is missing, note it and proceed with available data
Step 1: Load Regression Data (~4 tool calls)
Download the scorecard artifacts:
gh run download $RUN_ID -n "$ARTIFACT_NAME" -D /tmp/scorecard-artifacts
The agent runner has actions: read, so this should succeed. If it fails
(e.g., the artifact upload step itself failed), fall back to Step 1b.
If download succeeded, find and read the perf regressions JSON:
find /tmp/scorecard-artifacts -name "perf-regressions-2x-*.json"
cat <found_path>
Each entry has: Model ID, Precision, Component, Device, Runtime, Prev Inference time,
New Inference time, Kx slower, Job ID, Previous Job ID (prod/staging).
If download succeeded, find and read the numerics regressions JSON:
find /tmp/scorecard-artifacts -name "numerics-regressions-*.json"
cat <found_path>
Each entry has: Model ID, Dataset Name, Metric Name, Device, Precision, Runtime,
FP Accuracy, Device Accuracy, Previous FP Accuracy, Previous Device Accuracy.
If download succeeded, find and read the full trend report for per-regression classification:
find /tmp/scorecard-artifacts -name "trend-report.json"
cat <found_path>
Contains: sustained, new, flaky, recovered lists + summary stats.
Step 1b (fallback): If artifact download failed:
- Read regression data from the issue body via
gh api repos/qcom-ai-hub/tetracode/issues/NUMBER
- Use the
TREND_SUMMARY variable (passed inline in your prompt) for aggregate counts
- Note in Reasoning Trace that per-regression trend classification is unavailable
After loading, note:
- Total perf regressions count
- Total numerics regressions count
- Trend summary (N new, N sustained, N flaky, N recovered) — from TREND_SUMMARY or trend-report.json
Step 2: Analyze Trend Classifications (~2 tool calls)
From the trend report, classify perf regressions by priority:
Priority order: NEW > SUSTAINED > FLAKY
- NEW (first time seen) — highest priority, investigate root cause
- SUSTAINED (appeared in 2+ of last 4 runs) — known ongoing issues, link existing tickets
- FLAKY (intermittent, 1 of last 4 runs) — likely noise, note but don't escalate
- RECOVERED (previously sustained, now gone) — good news, mention briefly
For numerics regressions (no trend data in v1):
- Compare "Previous FP Accuracy" vs "FP Accuracy" — if FP accuracy changed, model weights were updated
- Compare "Previous Device Accuracy" vs "Device Accuracy" — if only device accuracy changed, runtime issue
- Flag regressions where Device Accuracy dropped significantly (>5% absolute) as HIGH priority
Step 3: Root-Cause Clustering (~8 tool calls)
Group regressions by shared attributes to identify systemic patterns.
Read .claude/triage/scorecard-patterns.md for scorecard-specific signals.
Performance Clustering
By Device — If 3+ models regress on same device:
- All runtimes affected → firmware/driver issue (Tungsten)
- Only one runtime → runtime-specific (Compiler or Tungsten)
By Runtime — If 3+ models regress on same runtime:
- QNN only → QNN runtime update (Tungsten)
- TFLite only → delegate issue (Compiler/ONNX2EP)
- ONNX only → ORT update (Tungsten)
By Model Family — If multiple components of same model regress:
- Across all devices → model-specific issue (AI Hub Models)
- Single device → device interaction issue
By Precision — If w8a8/w8a16 cluster together:
- Quantization tool update (Quantization team)
By Severity — Flag any >5x factor as CRITICAL regardless of cluster
Numerics Clustering
- Same metric drops across many models → calibration or AIMET update (Quantization)
- Same device, all metrics → device accuracy regression (Tungsten)
- FP accuracy changed → model weights updated (AI Hub Models)
- Single model, all devices → model code change (AI Hub Models)
Cross-Reference
Read .claude/triage/runtime-guide.md to confirm runtime → team mapping.
Check if any cluster pattern matches .claude/triage/error-patterns.md entries.
Step 4: Soft Triage & Ownership Routing (~5 tool calls)
Read .claude/triage/teams.md for team routing rules.
Map each cluster to a team:
| Cluster Type |
Primary Team |
Escalation Condition |
| Device-wide perf regression |
Tungsten |
>5x or sustained 3+ runs |
| QNN runtime regression |
Tungsten |
Any new regression |
| TFLite/ONNX compile path |
Compiler/ONNX2EP |
Any new regression |
| Quantization drift (w8a8/w8a16) |
Quantization |
>5% accuracy drop |
| Model-specific (all devices) |
AI Hub Models |
Check recent model PRs |
| Infrastructure (timeouts, OOM) |
Cloud Services |
Blocking multiple models |
Severity classification:
| Level |
Criteria |
| CRITICAL |
>5x factor AND new this run |
| HIGH |
>5x factor OR (2-5x AND new AND 3+ models affected) |
| MEDIUM |
2-5x sustained (known ongoing) |
| LOW |
Flaky (intermittent, single occurrence) |
Search for existing tracking issues (if time permits, 1 call):
gh issue list --repo qcom-ai-hub/tetracode --search "scorecard regression" --state open --limit 5 --json number,title,labels
Step 5: Post Structured Comment (~3 tool calls)
Extract issue number from ISSUE_URL (e.g., https://github.com/qcom-ai-hub/tetracode/issues/19062 → 19062).
Build the comment body using the output format below.
Post the comment:
gh api repos/qcom-ai-hub/tetracode/issues/NUMBER/comments \
-X POST -f body="<comment_body>"
If the comment exceeds 65K characters:
- Truncate the detailed tables to top 10 entries per cluster
- Add "(N more — see full data in scorecard artifacts)" at the bottom
Output Format
## Breeze AI Scorecard Analysis
**Run:** [View Scorecard]($RUN_URL) | **Date:** YYYY-MM-DD | **Deployment:** $DEPLOYMENT
---
### Summary
| Category | Count | New | Sustained | Flaky |
|----------|------:|----:|----------:|------:|
| Perf Regressions (2x+) | N | X | Y | Z |
| Numerics Regressions | N | — | — | — |
---
### Critical Regressions (>5x slowdown)
| Model | Device | Runtime | Precision | Factor | Trend | Job |
|-------|--------|---------|-----------|--------|-------|-----|
| ... | ... | ... | ... | ... | NEW | [link] |
---
### Performance Clusters
#### Cluster 1: [Description] (N models affected)
**Signal:** [what pattern was detected]
**Team:** @team-name
**Trend:** [NEW/SUSTAINED/FLAKY]
| Model | Device | Runtime | Factor | Trend |
|-------|--------|---------|--------|-------|
| ... | ... | ... | ... | ... |
#### Cluster 2: ...
---
### Numerics Regressions
| Model | Dataset | Metric | Device | Precision | Runtime | Prev Accuracy | New Accuracy |
|-------|---------|--------|--------|-----------|---------|---------------|--------------|
| ... | ... | ... | ... | ... | ... | ... | ... |
**Analysis:**
- [Observations about numerics patterns — FP accuracy changes, device-only drops, etc.]
---
### Trend Context
- **N regressions are NEW** this run → investigate first
- **N are SUSTAINED** since run XXXXX → known ongoing issues
- **N are FLAKY** (appeared 1/4 recent runs) → likely noise
- **N RECOVERED** → previously sustained, now resolved
---
### Triage Recommendations
| # | Cluster/Issue | Severity | Owner | Recommended Action |
|---|--------------|----------|-------|-------------------|
| 1 | ... | CRITICAL | Tungsten | Investigate device firmware on [device] |
| 2 | ... | HIGH | Quantization | Check AIMET version bump |
| 3 | ... | MEDIUM | AI Hub Models | Known issue — link to existing ticket |
> Soft recommendations for the scorecard czar. Do not assign to individuals.
> When the symptom matches an entry in `teams.md` "External Destinations" (QAIRT/AISW JIRA, QDC JIRA, upstream ORT-QNN), add a `Likely tracked in: <link>` line under the affected row. Owner is still the tetracode team — destination is where the fix lands.
---
<details>
<summary>Agent Reasoning Trace</summary>
**Data loaded:**
- Perf regressions: N entries from perf-regressions-2x-TIMESTAMP.json
- Numerics regressions: N entries from numerics-regressions-TIMESTAMP.json
- Trend report: [available/unavailable]
**Clustering decisions:**
- [Which patterns from scorecard-patterns.md matched]
- [Why each cluster was grouped together]
- [Confidence level for each cluster: HIGH/MEDIUM/LOW]
**Team routing:**
- [For each recommendation: why this team? what was ruled out?]
**Uncertainties:**
- [Any regressions where confidence < HIGH]
- [Patterns not found in KB]
- [Ambiguous cases]
</details>
---
**Grading this analysis:** when you close this issue, please apply one of
`triage-correct` / `triage-wrong` / `triage-transient` so the weekly KB-update
agent can score the scorecard agent against human ground truth. See
[LABELING.md](https://github.com/qcom-ai-hub/ai-hub-models-internal/blob/main/.claude/triage/LABELING.md).
*Generated by Breeze AI scorecard analyst*
Rules
- Batch operations — never loop over regressions one-by-one
- If trend-report.json is missing, proceed without trend data (classify all as "unknown trend")
- Be concise — the czar needs actionable info, not prose
- Include UTC timestamps and deployment info
- For job IDs, construct Hub links:
- Prod:
https://workbench.aihub.qualcomm.com/jobs/JOB_ID
- Dev:
https://dev.aihub.qualcomm.com/jobs/JOB_ID
- Always note which deployment this scorecard ran against
- If zero perf regressions but numerics regressions exist, still post analysis
- If zero regressions of both types, post a brief "no regressions detected" note
1---2name: scorecard-analyze3description: Scorecard Regression Analysis4---5# Scorecard Regression Analysis67Analyze scorecard performance and numerics regressions, classify by trend,8cluster by root cause, and post a structured triage comment on the GitHub issue.910**Budget: You have ~35 tool calls. Be efficient. Batch queries. Do NOT read files one-by-one.**1112## Context Variables1314Injected via the workflow prompt:15- `ISSUE_URL` — the regression issue URL in qcom-ai-hub/tetracode16- `RUN_ID` — GitHub Actions run ID17- `RUN_URL` — direct link to the scorecard workflow run18- `DEPLOYMENT` — "prod" or "dev"/"staging"19- `ARTIFACT_NAME` — name of the artifact bundle to download20- `TREND_SUMMARY` — JSON with trend counts (passed inline, no download needed):21 `{"lookback": N, "threshold": N, "total_current": N, "sustained_count": N, "new_count": N, "flaky_count": N, "recovered_count": N}`22 Use these counts directly in the Summary table. If "unavailable", classify all trends as unknown.2324## Critical Rules2526- ALWAYS use `--json` and `--jq` flags for `gh` API calls — never parse human-readable text27- NEVER use `!=` in `--jq` expressions — bash mangles `!`. Use `select(.x == "y")` instead28- NEVER assign to a specific person — route to teams only (czar rotates weekly)29- Use fully-qualified cross-repo references: `qcom-ai-hub/ai-hub-models-internal#N`30- Keep the final comment under 65,000 characters31- If a file is missing, note it and proceed with available data3233## Step 1: Load Regression Data (~4 tool calls)34351. Download the scorecard artifacts:36 ```37 gh run download $RUN_ID -n "$ARTIFACT_NAME" -D /tmp/scorecard-artifacts38 ```39 The agent runner has `actions: read`, so this should succeed. If it fails40 (e.g., the artifact upload step itself failed), fall back to Step 1b.41422. If download succeeded, find and read the perf regressions JSON:43 ```44 find /tmp/scorecard-artifacts -name "perf-regressions-2x-*.json"45 cat <found_path>46 ```47 Each entry has: Model ID, Precision, Component, Device, Runtime, Prev Inference time,48 New Inference time, Kx slower, Job ID, Previous Job ID (prod/staging).49503. If download succeeded, find and read the numerics regressions JSON:51 ```52 find /tmp/scorecard-artifacts -name "numerics-regressions-*.json"53 cat <found_path>54 ```55 Each entry has: Model ID, Dataset Name, Metric Name, Device, Precision, Runtime,56 FP Accuracy, Device Accuracy, Previous FP Accuracy, Previous Device Accuracy.57584. If download succeeded, find and read the full trend report for per-regression classification:59 ```60 find /tmp/scorecard-artifacts -name "trend-report.json"61 cat <found_path>62 ```63 Contains: `sustained`, `new`, `flaky`, `recovered` lists + `summary` stats.6465**Step 1b (fallback): If artifact download failed:**66- Read regression data from the issue body via `gh api repos/qcom-ai-hub/tetracode/issues/NUMBER`67- Use the `TREND_SUMMARY` variable (passed inline in your prompt) for aggregate counts68- Note in Reasoning Trace that per-regression trend classification is unavailable6970**After loading, note:**71- Total perf regressions count72- Total numerics regressions count73- Trend summary (N new, N sustained, N flaky, N recovered) — from TREND_SUMMARY or trend-report.json7475## Step 2: Analyze Trend Classifications (~2 tool calls)7677From the trend report, classify perf regressions by priority:7879**Priority order: NEW > SUSTAINED > FLAKY**8081- **NEW** (first time seen) — highest priority, investigate root cause82- **SUSTAINED** (appeared in 2+ of last 4 runs) — known ongoing issues, link existing tickets83- **FLAKY** (intermittent, 1 of last 4 runs) — likely noise, note but don't escalate84- **RECOVERED** (previously sustained, now gone) — good news, mention briefly8586For numerics regressions (no trend data in v1):87- Compare "Previous FP Accuracy" vs "FP Accuracy" — if FP accuracy changed, model weights were updated88- Compare "Previous Device Accuracy" vs "Device Accuracy" — if only device accuracy changed, runtime issue89- Flag regressions where Device Accuracy dropped significantly (>5% absolute) as HIGH priority9091## Step 3: Root-Cause Clustering (~8 tool calls)9293Group regressions by shared attributes to identify systemic patterns.94Read `.claude/triage/scorecard-patterns.md` for scorecard-specific signals.9596### Performance Clustering97981. **By Device** — If 3+ models regress on same device:99 - All runtimes affected → firmware/driver issue (Tungsten)100 - Only one runtime → runtime-specific (Compiler or Tungsten)1011022. **By Runtime** — If 3+ models regress on same runtime:103 - QNN only → QNN runtime update (Tungsten)104 - TFLite only → delegate issue (Compiler/ONNX2EP)105 - ONNX only → ORT update (Tungsten)1061073. **By Model Family** — If multiple components of same model regress:108 - Across all devices → model-specific issue (AI Hub Models)109 - Single device → device interaction issue1101114. **By Precision** — If w8a8/w8a16 cluster together:112 - Quantization tool update (Quantization team)1131145. **By Severity** — Flag any >5x factor as CRITICAL regardless of cluster115116### Numerics Clustering1171181. **Same metric drops across many models** → calibration or AIMET update (Quantization)1192. **Same device, all metrics** → device accuracy regression (Tungsten)1203. **FP accuracy changed** → model weights updated (AI Hub Models)1214. **Single model, all devices** → model code change (AI Hub Models)122123### Cross-Reference124125Read `.claude/triage/runtime-guide.md` to confirm runtime → team mapping.126Check if any cluster pattern matches `.claude/triage/error-patterns.md` entries.127128## Step 4: Soft Triage & Ownership Routing (~5 tool calls)129130Read `.claude/triage/teams.md` for team routing rules.131132**Map each cluster to a team:**133134| Cluster Type | Primary Team | Escalation Condition |135|-------------|-------------|---------------------|136| Device-wide perf regression | Tungsten | >5x or sustained 3+ runs |137| QNN runtime regression | Tungsten | Any new regression |138| TFLite/ONNX compile path | Compiler/ONNX2EP | Any new regression |139| Quantization drift (w8a8/w8a16) | Quantization | >5% accuracy drop |140| Model-specific (all devices) | AI Hub Models | Check recent model PRs |141| Infrastructure (timeouts, OOM) | Cloud Services | Blocking multiple models |142143**Severity classification:**144145| Level | Criteria |146|-------|----------|147| CRITICAL | >5x factor AND new this run |148| HIGH | >5x factor OR (2-5x AND new AND 3+ models affected) |149| MEDIUM | 2-5x sustained (known ongoing) |150| LOW | Flaky (intermittent, single occurrence) |151152**Search for existing tracking issues** (if time permits, 1 call):153```154gh issue list --repo qcom-ai-hub/tetracode --search "scorecard regression" --state open --limit 5 --json number,title,labels155```156157## Step 5: Post Structured Comment (~3 tool calls)1581591. Extract issue number from ISSUE_URL (e.g., `https://github.com/qcom-ai-hub/tetracode/issues/19062` → `19062`).1601612. Build the comment body using the output format below.1621633. Post the comment:164 ```165 gh api repos/qcom-ai-hub/tetracode/issues/NUMBER/comments \166 -X POST -f body="<comment_body>"167 ```168169**If the comment exceeds 65K characters:**170- Truncate the detailed tables to top 10 entries per cluster171- Add "(N more — see full data in scorecard artifacts)" at the bottom172173## Output Format174175```markdown176## Breeze AI Scorecard Analysis177178**Run:** [View Scorecard]($RUN_URL) | **Date:** YYYY-MM-DD | **Deployment:** $DEPLOYMENT179180---181182### Summary183184| Category | Count | New | Sustained | Flaky |185|----------|------:|----:|----------:|------:|186| Perf Regressions (2x+) | N | X | Y | Z |187| Numerics Regressions | N | — | — | — |188189---190191### Critical Regressions (>5x slowdown)192193| Model | Device | Runtime | Precision | Factor | Trend | Job |194|-------|--------|---------|-----------|--------|-------|-----|195| ... | ... | ... | ... | ... | NEW | [link] |196197---198199### Performance Clusters200201#### Cluster 1: [Description] (N models affected)202**Signal:** [what pattern was detected]203**Team:** @team-name204**Trend:** [NEW/SUSTAINED/FLAKY]205206| Model | Device | Runtime | Factor | Trend |207|-------|--------|---------|--------|-------|208| ... | ... | ... | ... | ... |209210#### Cluster 2: ...211212---213214### Numerics Regressions215216| Model | Dataset | Metric | Device | Precision | Runtime | Prev Accuracy | New Accuracy |217|-------|---------|--------|--------|-----------|---------|---------------|--------------|218| ... | ... | ... | ... | ... | ... | ... | ... |219220**Analysis:**221- [Observations about numerics patterns — FP accuracy changes, device-only drops, etc.]222223---224225### Trend Context226227- **N regressions are NEW** this run → investigate first228- **N are SUSTAINED** since run XXXXX → known ongoing issues229- **N are FLAKY** (appeared 1/4 recent runs) → likely noise230- **N RECOVERED** → previously sustained, now resolved231232---233234### Triage Recommendations235236| # | Cluster/Issue | Severity | Owner | Recommended Action |237|---|--------------|----------|-------|-------------------|238| 1 | ... | CRITICAL | Tungsten | Investigate device firmware on [device] |239| 2 | ... | HIGH | Quantization | Check AIMET version bump |240| 3 | ... | MEDIUM | AI Hub Models | Known issue — link to existing ticket |241242> Soft recommendations for the scorecard czar. Do not assign to individuals.243> When the symptom matches an entry in `teams.md` "External Destinations" (QAIRT/AISW JIRA, QDC JIRA, upstream ORT-QNN), add a `Likely tracked in: <link>` line under the affected row. Owner is still the tetracode team — destination is where the fix lands.244245---246247<details>248<summary>Agent Reasoning Trace</summary>249250**Data loaded:**251- Perf regressions: N entries from perf-regressions-2x-TIMESTAMP.json252- Numerics regressions: N entries from numerics-regressions-TIMESTAMP.json253- Trend report: [available/unavailable]254255**Clustering decisions:**256- [Which patterns from scorecard-patterns.md matched]257- [Why each cluster was grouped together]258- [Confidence level for each cluster: HIGH/MEDIUM/LOW]259260**Team routing:**261- [For each recommendation: why this team? what was ruled out?]262263**Uncertainties:**264- [Any regressions where confidence < HIGH]265- [Patterns not found in KB]266- [Ambiguous cases]267268</details>269270---271**Grading this analysis:** when you close this issue, please apply one of272`triage-correct` / `triage-wrong` / `triage-transient` so the weekly KB-update273agent can score the scorecard agent against human ground truth. See274[LABELING.md](https://github.com/qcom-ai-hub/ai-hub-models-internal/blob/main/.claude/triage/LABELING.md).275276*Generated by Breeze AI scorecard analyst*277```278279## Rules280281- Batch operations — never loop over regressions one-by-one282- If trend-report.json is missing, proceed without trend data (classify all as "unknown trend")283- Be concise — the czar needs actionable info, not prose284- Include UTC timestamps and deployment info285- For job IDs, construct Hub links:286 - Prod: `https://workbench.aihub.qualcomm.com/jobs/JOB_ID`287 - Dev: `https://dev.aihub.qualcomm.com/jobs/JOB_ID`288- Always note which deployment this scorecard ran against289- If zero perf regressions but numerics regressions exist, still post analysis290- If zero regressions of both types, post a brief "no regressions detected" note