Skip to content

feat: add shared QA requirements writing rule#9010

Open
jianwei1 wants to merge 7 commits intomainfrom
jianweichong/nes-1429-update-qa-requirements-rule
Open

feat: add shared QA requirements writing rule#9010
jianwei1 wants to merge 7 commits intomainfrom
jianweichong/nes-1429-update-qa-requirements-rule

Conversation

@jianwei1
Copy link
Copy Markdown
Contributor

@jianwei1 jianwei1 commented Apr 13, 2026

Summary

  • Adds a team-wide Claude rule (.claude/rules/writing-qa-requirements.md) for writing QA requirements on Linear tickets
  • Combines the QA-validated scenario-based format (Setup → Verify) with change analysis, indirect impact tracing, and regression testing guidance from feat: add QA checklist skill for Claude Code #8831
  • Intended to give all devs a consistent, QA-approved format when writing QA requirements with Claude

Context

Compared the existing QA checklist skill from #8831 with a personal QA rule that QA has confirmed produces clear, actionable requirements. This rule merges the best of both:

  • From the existing personal rule: Scenario-based structure, one-assertion-per-checkbox, blocked scenario callouts, iterative collaboration, scenario design principles
  • From feat: add QA checklist skill for Claude Code #8831: Change analysis steps (git diff/log), indirect impact tracing (shared components/hooks), regression testing section

Test plan

  • Verify the rule file is picked up by Claude Code when asking to write QA requirements
  • Confirm the generated QA requirements follow the scenario-based format with Setup/Verify structure
  • Confirm change analysis is performed before writing scenarios
  • Confirm regression testing section is included when indirect impacts are found

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive QA requirements guidelines: step‑by‑step workflow for creating ticket QA, mandatory fetch of the ticket first, iterative draft/feedback process, and posting requirements as a ticket comment.
    • Standardized output format: top-level QA heading, numbered scenarios with Setup and Verify sections, arrow-chained setup steps, single-assertion checkbox verifications, and explicit "Blocked until..." callouts.
    • Guidance on regression testing, consistency, roles, environment notes, and attaching screenshots/videos.

Adds a team-wide Claude rule for writing QA requirements on Linear
tickets. Combines scenario-based format (validated by QA) with change
analysis, indirect impact tracing, and regression testing guidance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear Bot commented Apr 13, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0bf99d3a-6a6f-4e7a-a35f-cf33e6821c30

📥 Commits

Reviewing files that changed from the base of the PR and between 13b7b68 and 59290bb.

📒 Files selected for processing (1)
  • .cursor/skills/write-qa-requirements/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • .cursor/skills/write-qa-requirements/SKILL.md

Walkthrough

Added two new Markdown documentation files defining a standardized, step-by-step process for writing QA requirements for Linear tickets, including when to apply the workflow, systematic branch-change analysis, required output format (scenarios, setup/verify checklists), collaboration cadence, and conditional regression testing guidance.

Changes

Cohort / File(s) Summary
QA Requirements Command
.claude/commands/write-qa-requirements.md
New documentation that prescribes a step-by-step workflow for producing QA requirements: fetch the Linear ticket, optionally reference sibling-ticket QA for formatting, perform git-based change analysis, iterate via draft/feedback/refine, and post a comment. Specifies exact output format (top-level ## QA Requirements, ### Scenario N, **Setup:** with arrow-chained steps, **Verify:** with single-assertion - [ ] checkboxes), blocking callouts, and user-perspective writing rules.
QA Requirements Skill
.cursor/skills/write-qa-requirements/SKILL.md
New skill/document describing the same standardized process and formatting requirements for writing QA requirements, when to include a ## Regression Testing section (only for indirect impacts), guidance on roles/environments/timings, and attachment recommendations for complex UI changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a shared QA requirements writing rule/standardized process. It is concise, specific, and directly related to the primary change in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jianweichong/nes-1429-update-qa-requirements-rule

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 13, 2026

View your CI Pipeline Execution ↗ for commit 50240d4

Command Status Duration Result
nx affected --target=subgraph-check --base=aa6f... ✅ Succeeded <1s View ↗
nx affected --target=extract-translations --bas... ✅ Succeeded <1s View ↗
nx affected --target=lint --base=aa6f913f6b2abe... ✅ Succeeded <1s View ↗
nx affected --target=type-check --base=aa6f913f... ✅ Succeeded <1s View ↗
nx run-many --target=codegen --all --parallel=3 ✅ Succeeded 2s View ↗
nx run-many --target=prisma-generate --all --pa... ✅ Succeeded 4s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-22 01:17:23 UTC

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
.claude/rules/writing-qa-requirements.md (2)

26-33: Add concrete symbol-tracing commands for indirect impact checks.

This section is good conceptually, but adding command examples will make execution consistent across engineers.

Suggested doc enhancement
 2. **Trace indirect impacts:**
    - Identify shared components, hooks, or utilities that were modified
-   - Check where those shared pieces are imported/used across the codebase
+   - Check where those shared pieces are imported/used across the codebase (e.g. `rg -n "from '...'"`, `rg -n "<SymbolName>"`)
    - Note any user-facing flows that consume the changed code, even if those flows weren't the target of the change
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/rules/writing-qa-requirements.md around lines 26 - 33, Update the
"Trace indirect impacts" and "Map entry points" sections to include concrete
symbol-tracing commands engineers can run: show examples such as ripgrep/rg or
git grep to find usages (e.g. rg --hidden --glob '!node_modules' "MyComponent"
or git grep -n "useMyHook"), VSCode/IDE actions like "Find All References" and
"Go to Implementation", and git history commands for change impact (git log
-S"symbol" -- path or git blame path). Also add a short example for mapping
entry points using browser-searchable route patterns and ripgrep to locate route
handlers/pages (e.g. rg "RouteName|/path" src) so readers can follow a concrete
workflow for identifying indirect consumers referenced in those sections.

14-16: Include console-log capture guidance for regression debugging.

You already request screenshots/videos; adding console log capture for regressions would make bug triage faster.

Based on learnings: Extend Playwright scenarios when UI behavior shifts, and capture console logs/screenshots for regressions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/rules/writing-qa-requirements.md around lines 14 - 16, Add a new
bullet after the existing bullets ("Ask the user if any scenarios are blocked by
other work..." and "Remind the user to attach screenshots or videos...") that
instructs reporters to include console-log captures for regression debugging and
to attach Playwright/Chromium console logs and network logs alongside
screenshots/videos; specify preferred capture guidance (e.g., collect browser
console output, error stacks, and a short repro script or Playwright trace) and
a short recommended filename/format convention so triage can quickly correlate
logs with screenshots and Linear tickets.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/rules/writing-qa-requirements.md:
- Around line 21-24: Update the guidance around using "git log main..HEAD
--oneline" and "git diff main..HEAD --stat" to first refresh the local main
branch so diffs aren’t stale; add a preceding step telling the reader to fetch
and update main from upstream (e.g., perform a git fetch and update/reset or
pull main) before running the log/diff commands so the QA scope includes the
latest upstream changes.

---

Nitpick comments:
In @.claude/rules/writing-qa-requirements.md:
- Around line 26-33: Update the "Trace indirect impacts" and "Map entry points"
sections to include concrete symbol-tracing commands engineers can run: show
examples such as ripgrep/rg or git grep to find usages (e.g. rg --hidden --glob
'!node_modules' "MyComponent" or git grep -n "useMyHook"), VSCode/IDE actions
like "Find All References" and "Go to Implementation", and git history commands
for change impact (git log -S"symbol" -- path or git blame path). Also add a
short example for mapping entry points using browser-searchable route patterns
and ripgrep to locate route handlers/pages (e.g. rg "RouteName|/path" src) so
readers can follow a concrete workflow for identifying indirect consumers
referenced in those sections.
- Around line 14-16: Add a new bullet after the existing bullets ("Ask the user
if any scenarios are blocked by other work..." and "Remind the user to attach
screenshots or videos...") that instructs reporters to include console-log
captures for regression debugging and to attach Playwright/Chromium console logs
and network logs alongside screenshots/videos; specify preferred capture
guidance (e.g., collect browser console output, error stacks, and a short repro
script or Playwright trace) and a short recommended filename/format convention
so triage can quickly correlate logs with screenshots and Linear tickets.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 10eb170b-e455-44cf-81e9-46c46594c8dd

📥 Commits

Reviewing files that changed from the base of the PR and between 29048f1 and ea5af42.

📒 Files selected for processing (1)
  • .claude/rules/writing-qa-requirements.md

Comment on lines +21 to +24
1. **Identify all changes on the branch:**
- Run `git log main..HEAD --oneline` to see all commits
- Run `git diff main..HEAD --stat` to see all changed files
- Read the key changed files to understand what was modified
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Refresh main before branch diff to avoid stale analysis.

main..HEAD is only reliable if local main is current. Without a fetch/reset step, QA scope can miss recent upstream changes.

Suggested doc fix
 1. **Identify all changes on the branch:**
+   - Run `git fetch origin main` (or update local `main`) first so comparisons use the latest baseline
    - Run `git log main..HEAD --oneline` to see all commits
    - Run `git diff main..HEAD --stat` to see all changed files
    - Read the key changed files to understand what was modified
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/rules/writing-qa-requirements.md around lines 21 - 24, Update the
guidance around using "git log main..HEAD --oneline" and "git diff main..HEAD
--stat" to first refresh the local main branch so diffs aren’t stale; add a
preceding step telling the reader to fetch and update main from upstream (e.g.,
perform a git fetch and update/reset or pull main) before running the log/diff
commands so the QA scope includes the latest upstream changes.

@jaco-brink
Copy link
Copy Markdown
Collaborator

nit: Really useful content — the format and change-analysis steps are great. One small packaging suggestion: this file reads as a multi-step procedure (fetch Linear ticket → run git log/git diff → draft scenarios → post comment) that the user explicitly invokes — which is the shape of a slash command, not a rule.

Core's existing .claude/rules/ convention is specifically for path-scoped conventions that /review-pr auto-loads based on which files a PR touches (via paths: frontmatter — see docs/ai-foundations.md). This file has no paths: field and isn't triggered by file changes, so it won't match anything the existing rule loader looks for. It fits the .claude/commands/ pattern instead — same shape as review-pr.md and handle-pr-review.md.

From Anthropic's Skills docs (note: custom commands and skills are now the same thing — .claude/commands/*.md keeps working):

"Create a skill when you keep pasting the same playbook, checklist, or multi-step procedure into chat, or when a section of CLAUDE.md has grown into a procedure rather than a fact. Unlike CLAUDE.md content, a skill's body loads only when it's used, so long reference material costs almost nothing until you need it."

And Best Practices:

"CLAUDE.md should only include things that apply broadly since it's loaded every session; for domain knowledge or workflows that are only relevant sometimes, use skills instead."

Moving this to .claude/commands/writing-qa-requirements.md would let anyone run /writing-qa-requirements NES-1429 on demand, and match the house style of the existing commands directory. Totally a nit though — happy to see this formalised either way. 👍

jianwei1 and others added 6 commits April 15, 2026 09:24
Move writing-qa-requirements from .claude/rules/ to
.claude/commands/write-qa-requirements.md — this is a multi-step
procedure invoked on demand, not a path-scoped convention.

Addresses review feedback from jaco-brink.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mirror of .claude/commands/write-qa-requirements.md with Cursor
frontmatter conventions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants