/cortex-jira:qa-scope [ISSUE-KEY] [PR number | commit range] [brief | full]from cortex-jira
Drafts QA scope and plain-language test scenarios for Jira tickets by analyzing the ticket, comments, and code changes commit-by-commit. Outputs Markdown to docs/ and posts to Jira on approval.
Ships in cortex-jira. 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.
Read when SKILL.md points to them.
A manual QA engineer gets a ticket written for developers and a diff they cannot read. What they need is the gap between the two: what the ticket promised, what the team decided later in the comments, and what the code actually changed. This skill closes that gap in words a non-technical tester can act on.
The skill works on these assumptions. Show them to the user in Step 1, so they can correct one before any work starts.
git symbolic-ref --short refs/remotes/origin/HEAD). The user can name another one.PROJ-123: Fix the thing.). The skill uses the key to find the ticket's commits and merged PRs.CONTEXT.md, CONCEPTS.md or GLOSSARY.md at the repo root or under docs/. If none exists, it uses the ticket's own words.git (fetch, log, show, diff, branch, remote, cat-file) and read-only gh pr view / gh pr diff / gh pr list / gh api. git fetch updates remote-tracking refs only; it never touches the working tree.docs/qa-scope/. It never stages or commits it.Ticket key. Match [A-Za-z]+-\d+ and normalize to upper case. Accept a bare key or a browse URL (take the segment after /browse/). Use only two sources:
feature/PROJ-123-some-description gives PROJ-123. Use it without asking, but name it in Step 1 so the user can correct it.Nothing found → ask for the key and stop. Never invent a key.
Change. What the code under test is, in this order:
abc123..def456, #512).gh pr view --json number,url,baseRefName,headRefName.gh pr list --state merged --search "<KEY>" --json number,title,mergedAt. PR titles carry the key (assumption 3), so this finds every merge type.git fetch origin <base>, then git log origin/<base> --grep="<KEY>" -i --format=%H, and for a hit gh api "repos/{owner}/{repo}/commits/<sha>/pulls" --jq '.[].number'.origin/<base>. Run git fetch origin <base> first — the local base branch is often stale, and a stale base puts other people's merged work into the scope.Without gh or a GitHub remote, skip sources 2 and 3 and use the git log --grep fallback.
Commits. Read every change commit by commit, oldest first, and read each commit's full message (subject and body) together with its diff. The message says why the step was made and what it was meant to do; the diff alone does not. A body often names an edge case, a decision, or a fix to an earlier step that QA must test.
gh pr view <n> --json title,body,commits,files. The PR body counts as a message too. git fetch origin pull/<n>/head makes squashed commits readable with git show <sha>.git log --reverse origin/<base>..HEAD, then git show <sha> for each.git log --reverse <range>, then git show <sha> for each.A squash merge folds the whole story into one diff. The single commits show the order of the work, fixes to earlier steps, and scope that was added and then taken out. A step that a later commit reverted is not in scope. When a message and its diff disagree, the diff is what ships — note the gap under Open questions.
Find a Jira connector before anything else, in this order:
getAccessibleAtlassianResources, then getJiraIssue).PATH (jira, acli).Prove it works by reading the ticket's summary. If no connector exists, or the one found asks for login or authorization, stop. Tell the user which connector you found and what it needs. Do not rebuild the ticket from guesses or from the branch name — every scenario would inherit the guess.
Then print the assumptions (from the Assumptions section, with the real values) and the scope as YAML. The same YAML becomes the draft's frontmatter in Step 4.
ticket: PROJ-123
ticket_source: branch name
change: PR #512
base: main
glossary: CONCEPTS.md
jira_connector: Atlassian MCP
Then ask which format the user wants, and wait for the answer:
Skip the question only when the user's message already names the format. Reading a ticket and a diff costs minutes, so the format is settled before that work, not guessed after it.
Fetch the ticket with summary, description, status, issuetype, parent, issuelinks and all comments. Also fetch the parent when present, and linked issues only when their summary is not enough.
Then read the comments as a decision log. For each one, ask: does it add, drop, or change a requirement? Build a short internal list:
Comments beat the description. A conflict between them goes into the draft under Open questions — QA will test the wrong thing if two people believe different things.
Read the commits of the change, message with diff, as Commits describes. Then get the combined file list (gh pr diff --name-only, or git diff --name-only origin/<base>...HEAD, or the named range) and read the changed files, not only the hunks, far enough to answer:
Take each test's type from the repo, in this order:
CLAUDE.md, AGENTS.md, contributing docs) or a testing skill in the session that defines the test types.playwright.config.ts, jest.config.*), test scripts (test:e2e in package.json), folder names (tests/contract/), file suffixes (.e2e-spec.ts).Keep the repo's own label, also when it differs from the defaults: a repo that calls its database-backed tests "unit" keeps "unit". QA runs tests by the repo's groups, so the repo's name is the one they can act on. A type the defaults do not know (Smoke, Visual) gets its own group under the repo's name.
Compare this with Step 2. Note ticket items the diff does not touch and diff changes the ticket does not explain — both go to Open questions, not into scenarios. Do not audit the code; this is a test plan, not a review.
Read the glossary from Step 1, if there is one. Every domain word in the draft must be a term defined there, capitalized as it is there, and never an alias the glossary retires. When a term has two meanings, say which one.
Write in strict ASD-STE100 Simplified Technical English: invoke /cortex-communication:simple-english (this plugin depends on it). Glossary terms are STE technical names — use them as they are, and use one term for one thing in the whole draft. If the skill is not available, apply the core rules: procedural sentences up to 20 words, descriptive up to 25, one instruction per sentence, imperative steps, active voice, condition before command, only can, will and must as modals, no idioms.
Condense. The reader is a tester between test runs, so each word must help them test. Cut what they will not act on, say each fact once in the whole draft, and prefer a glossary term to a description of it. Short must not cost clarity: keep every state, action and result a tester needs.
Write for a manual tester who has never seen the code. No class names, endpoints, field names, file paths or vendor object ids — except in the Automated tests section. A page is named by its relative URL plus what is on it.
Save to docs/qa-scope/YYYY-MM-DD-<KEY>-qa-scope.md. Read the reference for the format chosen in Step 1, and only that one — it holds the format's middle part and its own rules:
Both formats share the start and the end of the draft:
---
ticket: <KEY>
ticket_source: <user message / branch name>
ticket_status: <status>
change: <PR #n / branch / range>
base: <base branch>
glossary: <path / none>
format: <brief / full>
---
# QA scope: <KEY> — <ticket summary>
<the format's middle part, from its reference>
## Automated tests
### <test type, e.g. Integration>
- `[T1]` [<file name>](<repo URL>/blob/<branch>/<path/from/git/root/to/file.spec.ts>)
### <next test type, e.g. E2E>
- `[T2]` [<file name>](<repo URL>/blob/<branch>/<path/from/git/root/to/file.e2e-spec.ts>)
## Open questions
- <contradiction, unanswered comment, or ticket item the change does not cover>
Rules for scenarios, in both formats:
### group, set by what the diff does to that behaviour, not by the ticket type:
Rules for Automated tests:
### heading per type from Step 3, in pyramid order: Integration, Contract, E2E, then project-specific types A–Z. Leave out unit tests, also when the repo uses its own name for them. Leave out empty groups. No matching test at all → leave out the whole section.git remote get-url origin points to GitHub or GitLab, link the file name to the file on the branch where the change landed, so QA opens it in one click:
`[T1]` [search.spec.ts](https://github.com/acme/shop/blob/develop/apps/web/src/search.spec.ts)`[T1]` [search.spec.ts](https://gitlab.com/acme/shop/-/blob/develop/apps/web/src/search.spec.ts)`[T1]: apps/web/src/search.spec.ts`.[T1]: … at the start of a line is a Markdown link definition, and Jira or GitHub hides the line.origin. If none is known, take the first of develop, main and master that has the file on origin (git cat-file -e origin/<branch>:<path>).git rev-parse --show-toplevel), never from a package or the test folder. Several suites can share a spec name — apps/web/src/search.spec.ts and apps/admin/src/search.spec.ts — and only the full path tells them apart.describe blocks, test names or explanations of what the test checks. QA opens the file to read or run it; the list only points to it.T1…Tn across the whole section, in the order the files appear. One key per file, also when the file covers several scenarios.·: Sign in with email · `[T1]` `[T4]`. An item without keys is manual only — add no "no tests" note.Leave out any section that is empty, except Test scenarios and the sections the format's reference keeps.
Show the file path and the full draft in the conversation. Ask the user to review it. Apply their edits to the file and show the changed parts again. When they ask for the other format, rewrite the draft from that format's reference. Repeat until they say it is good.
When the user approves the draft, ask one direct question: post it to <KEY> as a new comment? Post only on a clear yes to that question — approval of the text is not permission to post, and one yes covers one post.
Post through the connector from Step 1 as a new comment, never an edit of an existing one. With the Atlassian MCP, that is addCommentToJiraIssue or addOrEditJiraIssueComment without a commentId, with Markdown content. Send the file content without the frontmatter and the # QA scope title line — the ticket already shows the key and summary. No AI or tool attribution in the comment.
Report the comment link. If the post fails, show the error and keep the file; do not retry with a different format without asking.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alexander-danilenko/cortex-claude-code-plugins --plugin cortex-jira2 skills in this plugin
Other plugins' skills for the same job