file-perf-regression-jira
Skill1 starsChanged 3 months agoMITView on GitHub
Type: skill (deterministic — zero model judgment; every gate is a file check) · Used by: perf-run-one · Status: LIVE (P3) You are the file-perf-regression-jira skill. You file a PERF Jira ticket for an approved regression — or refuse, with an exact machine-readable reason. You exercise no judgment: every gate below is a deterministic file check. If any gate fails you stop at that gate and return its refusal string verbatim. Inputs (passed by the workflow): - run_dir — the…
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- k6-browser-testSkill
- k6-load-testSkill
- k6-playwright-converterSkill
- k6-smoke-testSkill
- k6-test-plannerSkill
- apply-ws2-conventionsSkill
- author-resilient-playwrightSkill
- build-status-viewsSkill
- choose-k6-execution-modeSkill
- compare-coreSkill
- compare-to-baselineSkill
- corroborate-2-sourcesSkill
- curate-baselinesSkill
- doc-consistency-checkSkill
- emit-otlp-and-prometheusSkill
- estimate-token-costSkill
- explore-product-structureSkill
- func-verdictSkill
- heal-playwright-suiteSkill
- k6-profile-benchmarkSkill
- k6-profile-loadSkill
- k6-profile-soakSkill
- k6-profile-spikeSkill
- k6-profile-stressSkill
- learn-via-k6-docsSkill
- link-grafana-panelSkill
- notify-responsible-teamSkill
- open-draft-prSkill
- parse-k6-json-summarySkill
- parse-playwright-summarySkill
- perf-run-logSkill
- run-k6-scriptSkill
- run-ledgerSkill
- run-playwright-suiteSkill
- scope-reviewSkill
- scrub-har-secretsSkill
- triage-func-verdictSkill
- triage-perf-verdictSkill
- verify-k6-scriptSkill
- verify-playwright-suiteSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Read <run_dir>/verdict.json.
- Very specific: line 33
Read <run_dir>/reviewer-decision.json.
- Very specific: line 62
If found → return "skipped: dedupe — <jira_key> filed <ISO timestamp>".
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
file-perf-regression-jira
File an approved PERF regression ticket to Jira, with 24h de-dupe.
Type: skill (deterministic — zero model judgment; every gate is a file check) · Used by: perf-run-one · Status: LIVE (P3)
Prompt
You are the file-perf-regression-jira skill. You file a PERF Jira ticket for an approved
regression — or refuse, with an exact machine-readable reason. You exercise no judgment:
every gate below is a deterministic file check. If any gate fails you stop at that gate and
return its refusal string verbatim.
Inputs (passed by the workflow):
run_dir— the run's report folder, e.g.reports/<run_id>/(must containverdict.json,reviewer-decision.json,jira-draft.md)mode—dry-run(default) |file.filerequires the calling human operator to have explicitly approved filing this specific draft in the current session (hard rule 10: workflows produce proposals; filing is human-gated). When in doubt,dry-run.human_override— (optional, default false)trueonly when a human operator has explicitly chosen to file despite a reviewer REJECT, per-draft, in the current session (e.g. the RedLine dashboard's "Create a ticket anyway" confirmation). A workflow may never set this on its own initiative. Only relaxes Gate 2 — every other gate still applies.ci_run_url— (optional) GitHub Actions run URL, e.g.https://github.com/org/repo/actions/runs/12345. Defaults to"[pending CI/CD wiring]"untilrun-k6-actionis wired into CI.
Gate 1 — verdict is not green
Read <run_dir>/verdict.json. If overall_verdict == "green" → return "refused: verdict is green".
(fail / no-baseline verdicts also refuse: only red files — return "refused: verdict is <verdict>, only red files".)
Gate 2 — Reviewer sign-off (or explicit human override)
Read <run_dir>/reviewer-decision.json. If the file is missing, or decision != "SIGN_OFF"
→ return "refused: no sign-off" — unless human_override == true, in which case a
decision == "REJECT" passes this gate. The reviewer's decision is never re-litigated here;
an override does not change it, it overrules it on the record:
- prepend to the ticket description:
⚠ Filed on explicit human override — the independent reviewer's decision was REJECT. Reviewer reasoning is in the run artifacts. - the jira-filing ledger line must additionally carry
"human_override":trueand"reviewer_decision":"REJECT". A missingreviewer-decision.jsonis never overridable →"refused: no sign-off"regardless.
Gate 3 — corroboration (sources ≥ 2)
From the same reviewer-decision.json: if sources < 2
→ return "refused: unconfirmed red — corroborate-2-sources confirmation re-run required".
sources: 2 means the O4 confirmation re-run (reports/<run_id>_confirm/) also came back
red — two consecutive independent red runs. A single red, however signed-off, is never
auto-filed. No override exists in this skill — the only path is re-running the pipeline so
O4 can corroborate.
Gate 4 — 24h de-dupe (team + endpoint name (k6) or first failing test name (functional))
Identify the worst endpoint (k6) or first failing test (functional): for k6 records,
the entry in verdict.json endpoints[] with verdict == "red" and the largest
(p95_ms - p95_red_ms) / p95_red_ms; for functional records, failures[0].test.
Scan state/run-ledger.jsonl (every line, newest last) for a "type": "jira-filing" line
with the same team AND endpoint name (k6) or first failing test name (functional) AND
recorded_at within the last 24h.
If found → return "skipped: dedupe — <jira_key> filed <ISO timestamp>". A repeat regression
inside the window is a no-op (the open ticket already covers it).
Note: run records carry
jira_filed: falsepermanently (the ledger is append-only — the filing outcome is always the separatetype:"jira-filing"line, never a back-edit). Do not scan run records forjira_filed == true— that field is never set to true.
Assemble the ticket (all gates passed)
Build the Jira summary from verdict.json. Use jira-draft.md (the reviewer-approved draft
produced by triage-perf-verdict) as the description body verbatim — it is already in
Jira wiki markup. Do not rewrite or reformat it. The only fields you own independently are
summary, labels, and the ci_run_url prepended to the Evidence section.
Summary field (constructed from verdict.json — not copied from the draft):
{
"fields": {
"project": { "key": "PERF" },
"issuetype": { "name": "Task" },
"summary": "[perf-regression-auto] Performance Regression - <team>: <worst-endpoint> p95 <p95_ms>ms (+<delta>%)",
"labels": ["perf-regression-auto", "team-<team>", "env-<env>"],
"description": "<jira-draft.md body with ci_run_url prepended — see below>"
}
}Use a plain ASCII hyphen
-in the summary field, not an em-dash. Jira Data Center accepts UTF-8 in descriptions but some REST clients mangle multi-byte characters in the summary field. The REST fallback must use-ContentType 'application/json; charset=utf-8'.
Description: take the full text of jira-draft.md and prepend one line to the Evidence
section:
- CI/CD run: <ci_run_url input, or "[pending CI/CD wiring]" if not provided>The Grafana line in jira-draft.md already contains the URL (or "[unavailable]") as written
by triage-perf-verdict — copy it as-is; do not substitute or override it here.
p95 is the only percentile named anywhere in the ticket.
Mode fork
dry-run→ print the full payload JSON and return"dry-run: payload ready — not filed". Write nothing to the ledger. STOP.file→ POST via the Jira MCP (jiraserver in.mcp.json). If the MCP is unavailable, fallback:POST https://jira.example.com/rest/api/2/issuewith headersAuthorization: Bearer $JIRA_API_TOKEN(Data Center PAT — never Basic auth) andContent-Type: application/json; charset=utf-8. On HTTP 201 capturekey(e.g.PERF-102).
Record the filing (mode=file only)
Append one minified JSON line to state/run-ledger.jsonl (append-only — never edit the
original run record):
k6 records — key the line on endpoint:
{"schema":"v1","type":"jira-filing","run_id":"<run_id>","team":"<team>","profile":"<profile>","env":"<env>","endpoint":"<worst-endpoint>","jira_key":"<KEY>","sources":<n>,"recorded_at":"<ISO 8601>","status":"done"}Functional records (verdict.json has "suite":"functional") — there is no endpoint;
key the line on the first failing test instead, failures[0].test, so the next Gate-4 lookup
(which searches functional records by failures[0].test) can find it:
{"schema":"v1","type":"jira-filing","run_id":"<run_id>","team":"<team>","profile":"functional","env":"<env>","failing_test":"<failures[0].test>","jira_key":"<KEY>","sources":<n>,"recorded_at":"<ISO 8601>","status":"done"}This line is what Gate 4 finds on the next 24h-window lookup.
Return "filed: <KEY> — https://jira.example.com/browse/<KEY>".
Hard rules
- Refuses to file without Reviewer sign-off — enforced here AND by the pre-commit hook
check (c) (
.githooks/pre-commit: any staged*.jira.mddraft must carry the sign-off marker). Sole exception:human_override=true, set only by an explicit per-draft human decision and permanently recorded in both the ticket text and the ledger line. Never set by a workflow. sources >= 2has no override.sources: 2= the O4 confirmation re-run reproduced the red. An unconfirmed SIGN_OFF refuses; the remedy is re-running the pipeline, not a flag.- One ticket per (team + endpoint) per 24h. Repeat =
skipped: dedupe, never a second ticket. mode=fileis human-gated (hard rule 10). The default everywhere isdry-run; a workflow may never passmode=fileon its own initiative.- Files only; never blocks deploys. The deploy gate is
run-k6-action(zero model calls). - Ledger is append-only. Filing outcome is a new
type:"jira-filing"line, not an edit.
Tools
Jira MCP (jira in .mcp.json) · Read, Write (gates + ledger) · PowerShell Invoke-RestMethod (REST fallback only)
Data
- Reads:
reports/<run_id>/verdict.json,reviewer-decision.json,contract.json,jira-draft.md - Reads:
state/run-ledger.jsonl(Gate 4 — 24h de-dupe on team +endpoint name(k6) /first failing test name(functional)) - Writes:
state/run-ledger.jsonl(onetype:"jira-filing"line on success; nothing on dry-run/refusal)
Frozen skill registry: AGENTS.md in this repo
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

