agentleFS
sebastientaggartsebastientaggart/CodeCannon/.cursor/rules/qa.mdc

CodeCannon / rules

Cursor rule1 starsChanged 9 months agoMITView on GitHub

Code Cannon: View the QA queue or review a specific issue

The file

Show its rules and text

We split this qa.mdc into the rules it gives an agent

15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    If the list is empty, say:

    line 30
  2. Distinctive:

    Do not take any other action.

    line 34
  3. Very specific:

    Check whether ready-for-qa is currently applied to the issue.

    line 50
  4. Distinctive:

    Wait. If the user says no, stop.

    line 54
  5. Distinctive:

    Wait for confirmation. On yes:

    line 91
  6. Distinctive:

    Before applying labels, fetch the issue's current assignees:

    line 111
  7. Very specific:

    If one or more assignees are found, prepend the following line to the comment body (above the ## QA Review heading) in the comment that was …

    line 116
  8. Very specific:

    If there are multiple assignees, include one cc @<login> per line.

    line 120
  9. Very specific:

    If the gh issue edit command fails because a label does not exist in the repo, report the error and say:

    line 126
  10. Distinctive:

    Do not retry automatically.

    line 130
  11. Distinctive:

    After applying labels, tell the user what was done:

    line 132
  12. Distinctive:

    Never close an issue — verdict recording and closure are separate concerns.

    line 141
  13. Distinctive:

    Never post the comment without showing it to the user first.

    line 142
  14. Distinctive:

    Never apply labels without user confirmation (the confirmation in Step 3 is the single gate for both posting the comment and applying …

    line 143
  15. Very specific:

    Never merge, deploy, or take any action beyond labeling and commenting.

    line 144

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
qa.mdc
---
description: Code Cannon: View the QA queue or review a specific issue
globs:
alwaysApply: false
---

> **Cursor:** Trigger this skill via `@qa` in Agent mode. State any arguments in your message. Sub-agent spawning is not supported — the automated review step in `/submit-for-review` must be done manually using the review-agent prompt.

---

## What `/qa` does

`/qa` has two modes:

- **No argument** — show all issues awaiting QA.
- **Numeric argument** — walk through QA review for a specific issue.

---

## Mode A — No argument: QA queue view

Run:
```
gh issue list --label "ready-for-qa" --state open \
  --json number,title,url,labels,milestone,assignees
```

Display as a numbered list. For each issue show: issue number, title, milestone (if set), and URL.

If the list is empty, say:

> "No issues are currently waiting for QA."

Do not take any other action.

---

## Mode B — Numeric argument: Review a specific issue

The argument is an issue number. Work through the following steps.

### Step 1 — Load context

```
gh issue view <number> --json number,title,body,labels,url,comments
```

Display the issue title and body.

Check whether `ready-for-qa` is currently applied to the issue. If it is **not** present, warn:

> "Issue #N does not have the ready-for-qa label. It may not be deployed to preview yet. Continue anyway? (yes/no)"

Wait. If the user says no, stop.

---

### Step 2 — Review prompt

Say:

> "Test this feature on the preview environment. When you're done, describe what you tested, what you found, and your verdict (pass or fail). Include screenshots if you have them — paste image links or drag-and-drop into GitHub directly."

**Stop. Wait for the QA person's input. Do not proceed until they provide a verdict.**

---

### Step 3 — Post findings as issue comment

Build a structured comment from their input:

```
## QA Review

**Verdict:** PASS  (or FAIL)

**What was tested:**
<their description>

**Findings:**
<their findings, or "None — feature works as expected.">

**Screenshots:**
<image links if provided, or "None attached.">
```

Show the comment to the user before posting. Ask:

> "Post this to issue #N? (yes/no)"

Wait for confirmation. On yes:
```
gh issue comment <number> --body "<comment>"
```

On no, stop — do not post and do not apply labels.

---

### Step 4 — Apply verdict label

Based on the verdict:

**PASS:**
```
gh issue edit <number> --add-label "qa-passed" --remove-label "ready-for-qa"
```

**FAIL:**

Before applying labels, fetch the issue's current assignees:
```
gh issue view <number> --json assignees
```

If one or more assignees are found, prepend the following line to the comment body (above the `## QA Review` heading) in the comment that was already posted:

> cc @<assignee> — this issue needs attention.

If there are multiple assignees, include one `cc @<login>` per line. If the command errors or returns no results, omit the line silently.

```
gh issue edit <number> --add-label "qa-failed" --remove-label "ready-for-qa"
```

If the `gh issue edit` command fails because a label does not exist in the repo, report the error and say:

> "The label does not exist in this repository. Create it in GitHub Settings → Labels, then re-run `/qa <number>` from Step 4."

Do not retry automatically.

After applying labels, tell the user what was done:

- On PASS: "Issue #N marked as QA passed. The developer can now close it or promote to production."
- On FAIL: "Issue #N marked as QA failed. The developer will see the findings in the issue comments."

---

## Hard rules

- Never close an issue — verdict recording and closure are separate concerns.
- Never post the comment without showing it to the user first.
- Never apply labels without user confirmation (the confirmation in Step 3 is the single gate for both posting the comment and applying labels).
- Never merge, deploy, or take any action beyond labeling and commenting.
<!-- generated by CodeCannon/sync.py | skill: qa | adapter: cursor | hash: bb2c1da5 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.