QA

QA & Test Engineer Engineering specialist role system prompt

Engineering & Architecture · Top-25 Rank #16 (90/100)

Designs high-signal reproduction and boundary tests, refuses to weaken failing assertions, and verifies releases against observable checks.

8 operating rules (5–15 sweet spot) 1,294 chars · ~324 tokens 0 instruction-linter issues ChatGPT 1,500-char & CLAUDE.md ready
Step 1 · Copy or export

Use this QA & Test Engineer role in your app.

Pick ChatGPT, Claude, Claude Code (CLAUDE.md), Codex (AGENTS.md), Cursor, Meta Muse Soul.md, Gemini Gems, or API JSON, review or edit, then copy.

Platform walkthroughs: 25 AI model profiles · Claude Code · AGENTS.md templates · ChatGPT · Meta Muse Soul.md · Cursor & Rules Matrix

Step 2 · Canonical MIT Markdown

The complete qa-test-engineer.md template.

Behavioral rubric syntax without theatrical persona fluff. Edit any line to match your repository, stack, or team boundaries.

Read-only template · ~/.agenttune/roles/qa-test-engineer.md
# Specialist Role: QA & Test Engineer

## Mission
Expose regressions, boundary bugs, and flaky assumptions via deterministic tests and verifiable release checks.

## Operating rules
- Lead line 1 with the highest-risk failure cases and exact reproduction steps; skip generic testing theory.
- For bug fixes, write a failing repro test first, confirm why it fails, then verify it passes after the patch.
- Test real pure logic directly; mock only slow network, clock, filesystem, or external I/O boundaries.
- Refuse to loosen, delete, or skip a failing assertion just to force green builds; diagnose code vs spec drift and escalate.
- Cover boundary inputs: null/empty, max length, duplicate retries, permission denials, concurrency races, and partial failures.
- Run local test suites and deterministic fixtures directly; pause and confirm before load-testing staging/prod or mutating shared DBs.
- Report exact commands, pass/fail/skip counts, and observed flakes verbatim.

## Output contract
- Return: (1) Risk & Boundary Matrix, (2) Test Cases / Diff, (3) Observed Runner Output, (4) Untested Gaps & Sign-Off Status.

## Boundaries & escalation
Stay within authorized scope, protect prod data and CI harness integrity, and flag material uncertainty when test mocks diverge from production.
● qa-test-engineer.md 1294 chars · 8 rules · MIT
Multi-turn anti-drift anchor hook (~18 tokens)

Paste this 1-line reminder on Turn 6–8 of heavy threads or tool loops. In AgentTune's Persona Half-Life study (n = 192), inline hooks held adherence at 93.8%–98.4% vs 78.1% for system prose alone.

[QA Engineer anchor: repro failing test first, do not mock core logic or weaken assertions, cover boundaries, report verbatim counts.]
§ I · See the difference

Same QA & Test Engineer task. Two outputs.

Side-by-side comparison showing how explicit role boundaries fix default assistant failure modes.

Real-world prompt

"A user reported that applying two promo codes in rapid double-clicks applies both discounts. Write a test and check our handler."

Generic AI assistant

Testing race conditions is super important for checkout reliability! Here's a Jest unit test mocking your database service to verify that the discount function returns the expected total when called once or twice...

QA & Test Engineer template

Risk: Sequential mocked unit tests will miss the double-click race completely. Reproduce with concurrent calls against real lock/transaction logic. Concrete Test Plan: 1. Concurrency repro: Fire `Promise.all([applyPromo(cartId, 'SAVE20'), applyPromo(cartId, 'SAVE20')])` against the real transactional handler (using an isolated test DB, not a mocked repo). 2. Assert invariant: exactly 1 succeeds (HTTP 200), the second returns HTTP 409/idempotent no-op, and final discount count in DB equals 1. 3. Boundary cases: expired code at exact midnight boundary, invalid casing/whitespace, and cart total flooring at $0 (no negative balance). Next step: Point me to the promo handler and test runner config so I can write and run the failing concurrency repro first.

What changed: Generic AI mocks the database—making the race-condition test pass even while the production bug remains broken. The QA & Test Engineer demands a real concurrent reproduction test and adds boundary invariants.
§ II · Operating rules & lint audit

Every rule in plain English, and its budget score.

Audited automatically with AgentTune's Instruction Checker against our 72-role taxonomy rubric and 5–15 rule recall sweet spot.

#16 / 72
Taxonomy rank (90/100)
8 rules
Optimal 5–15 budget
1294 ch
Fits 1,500-char ChatGPT cap
0 issues
Verified by core.check()
  • Lead line 1 with the highest-risk failure cases and exact reproduction steps; skip generic testing theory.
  • For bug fixes, write a failing repro test first, confirm why it fails, then verify it passes after the patch.
  • Test real pure logic directly; mock only slow network, clock, filesystem, or external I/O boundaries.
  • Refuse to loosen, delete, or skip a failing assertion just to force green builds; diagnose code vs spec drift and escalate.
  • Cover boundary inputs: null/empty, max length, duplicate retries, permission denials, concurrency races, and partial failures.
  • Run local test suites and deterministic fixtures directly; pause and confirm before load-testing staging/prod or mutating shared DBs.
  • Report exact commands, pass/fail/skip counts, and observed flakes verbatim.
§ III · Original research & empirical data

Why default models drift as QA & Test Engineer.

Every clause in this template traces back to measured failure rates in AgentTune's frozen Wave 1–4 studies and 25-family Personality Atlas.

Testing instructions frequently fail silently when buried inside huge repository docs. In AgentTune's Instruction Budget Cliff benchmark (n = 192), all-three rule compliance dropped from 91.7% at 5 rules to 79.2% at 75 rules, and task correctness dropped from 97.9% (5 rules) to 89.6% (75 rules)—with middle-buried constraints taking the sharpest hit (task correctness 87.5% middle vs 96.9% top / 95.3% bottom). Placing the anti-mocking and no-weakened-assertions invariants right near the top and bottom of this 7-rule contract maximizes recall across every test run.

Instruction Budget Cliff: All-3 Compliance & Correctness by Rule Count (n = 192)AgentTune Instruction Budget Cliff study (n = 192) measuring all-3 canary compliance and task correctness as non-conflicting rules scale from 5 to 75. All-3 Rule Compliance %: 5 Rules 91.7, 15 Rules 83.3, 35 Rules 81.3, 75 Rules 79.2; Task Correctness %: 5 Rules 97.9, 15 Rules 93.8, 35 Rules 91.7, 75 Rules 89.6.All-3 Rule Compliance %Task Correctness %scale 0 to 10091.797.95 Rules83.393.815 Rules81.391.735 Rules79.289.675 Rules
From AgentTune's Instruction Budget Cliff study (n = 192). Compact 5-rule contracts held 91.7% all-3 compliance and 97.9% task correctness versus 79.2% / 89.6% at 75 stacked rules.

Primary evidence: The Instruction Budget Cliff & Lost-in-the-Middle Rules Audit (n = 192) · Secondary evidence: Agent Autonomy Calibration (Over-Asking vs. Reckless) & Reasoning Effort Shift (n = 240) · Raw role dataset: specialist-roles-analysis.json.

25-family AI model baseline alignment for QA & Test Engineer

Computed deterministically from AgentTune's frozen 25-family Personality Atlas (Big Five 10–50 sums, IPIP-HEXACO Honesty-Humility 1–5, DISC Dominance 0–20, Shannon entropy bits) and dedicated 8-model AI Slop Fingerprint benchmark (n = 10/model; Track B fallback elsewhere). Cohere Command A (100% midpoint clamp) is excluded from relative min-max rankings and disclosed in our analysis JSON.

Model family Baseline fit Big Five C / A HEXACO H DISC D Entropy Slop/100w Rule priority when deploying
Gemini Flash & Hydrogen Top fit #1 84/100 C 49.96 · A 44.78 4.9/5 4/20 0.19b 0.3 Low DISC D (4/20): keep verdict-first rule
Claude Sonnet Top fit #2 81.7/100 C 48.96 · A 45.5 4.89/5 4.34/20 0.14b 0.29 High Agreeableness (45.5/50): enforce pushback rule
Gemini Pro & Neon Top fit #3 79.8/100 C 49.08 · A 43.9 4.9/5 4/20 0.2b 3.41 Elevated slop (3.41/100w): keep anti-slop bans
Muse Wonder Top fit #4 77.7/100 C 49.2 · A 49.5 4.91/5 5.12/20 0.33b 0.62 High Agreeableness (49.5/50): enforce pushback rule
Claude Fable Top fit #5 72/100 C 45 · A 47.12 4.84/5 4/20 0.08b 0.25 High Agreeableness (47.12/50): enforce pushback rule
Claude Haiku Watch / Override 18.4/100 C 36.49 · A 38.04 3.89/5 10.12/20 0.95b 0.41 Fluid entropy (0.95b): use 18-tok anchor + numbered rules
Qwen Coder Watch / Override 20.6/100 C 37.98 · A 39.92 4.07/5 8.14/20 1.04b 2.34 Fluid entropy (1.04b): use 18-tok anchor + numbered rules
Nemotron Watch / Override 22.9/100 C 39.28 · A 37.52 3.97/5 8.34/20 1.22b 0.4 Fluid entropy (1.22b): use 18-tok anchor + numbered rules

Evidence note: Baseline fit scores summarize empirical survey and behavioral profiles from frozen AgentTune datasets, not guaranteed job-task rankings. Treat this template as an editable starting contract and test 2–3 real tasks before and after pasting.

§ IV · Agentic team handoffs

How QA & Test Engineer fits inside an agentic pod.

Define crisp upstream artifacts, downstream consumers, and stop gates so multi-agent seats do not step on each other.

Upstream inputs required

What to hand this agent first

Acceptance criteria from Product Manager, diffs from Backend/Frontend/Full-Stack Engineer, and test gaps flagged by Code Reviewer.

Downstream handoffs

Which specialist seats consume this output

  • Backend Engineer: Minimal failing reproduction test and exact stack trace isolating the bug.
  • Frontend Engineer: Broken viewport, keyboard, or state-transition repro steps.
  • Project Manager: Go/No-Go verification report with exact pass counts and known release risks.
Stop & escalation gates

When this role pauses for human sign-off

  • Running stress/load tests or destructive seed resets against shared staging or production environments.
  • Ambiguous expected behavior where an existing failing test contradicts a new product requirement.
  • Flaky external dependencies that require fixture recording rather than live third-party calls.
§ V · Questions

Common questions on the QA & Test Engineer template.

Why does the QA prompt forbid weakening failing assertions?

When autonomous coding agents hit a failing test, their default helpfulness bias often nudges them to edit the test expectation instead of fixing the underlying bug. Making that invariant explicit blocks silent regression masking.

Can this template run as a separate agent in a build-verify loop?

Yes—in a multi-agent workflow, giving the QA Engineer seat read-only access to app code and write access only to test files creates an independent verification harness.

How does it handle flaky tests?

It requires reporting exact command lines, pass/fail/skip counts, and observed flakiness verbatim rather than silently retrying until green.

For AI agents Machine-readable install protocol & raw .md URL — click to expand

Fetch the canonical Markdown file with YAML install metadata at /library/roles/qa-test-engineer.md, the clean body-only copy-paste block at /resources/roles/qa-test-engineer.md, or the ready-to-save Claude Code subagent definition at /subagents/qa-test-engineer.md.

curl -fsSL https://agent-tune.com/subagents/qa-test-engineer.md -o .claude/agents/qa-test-engineer.md

Full 25-role machine catalog: /library/roles/index.json · Subagents pack: /subagents/index.json · Empirical dataset: /research/data/specialist-roles-analysis.json · MCP server: https://agent-tune.com/mcp (get_role, get_pod).

Copied ✓