qa-play
Skill1 starsChanged 3 months agoMITView on GitHub
Let the agent play a Unity game in Editor Play mode and check one test case through the in-game bridge (templates/unity/agent-qa + scripts/agent_qa.py): read the UI, click, verify expected state, keep evidence, and turn a passing run into a replay that CI runs without an LLM. Use when an acceptance criterion can only be confirmed by playing (Integration/UI stories), or when the user says 'play-test this TC', '에이전트 QA', '플레이해서 확인해'. Not for logic a unit test can cover, human playtest notes (/playtest-report) or the build gate (/smoke-check).
In this repository91 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adoptSkill
- api-cost-gateSkill
- architecture-decisionSkill
- architecture-reviewSkill
- art-bibleSkill
- asset-auditSkill
- asset-specSkill
- balance-checkSkill
- brainstormSkill
- bug-reportSkill
- bug-triageSkill
- changelogSkill
- code-reviewSkill
- consistency-checkSkill
- content-auditSkill
- create-architectureSkill
- create-control-manifestSkill
- create-epicsSkill
- create-prdSkill
- create-storiesSkill
- day-one-patchSkill
- design-reviewSkill
- design-systemSkill
- dev-storySkill
- doc-relinkSkill
- estimateSkill
- gate-checkSkill
- governance-bible-initSkill
- helpSkill
- hotfixSkill
- humanize-koreanSkill
- humanize-redoSkill
- humanizeSkill
- launch-checklistSkill
- legacy-purgeSkill
- lesson-logSkill
- lesson-reviewSkill
- localizeSkill
- map-systemsSkill
- milestone-reviewSkill
- onboardSkill
- patch-notesSkill
- perf-profileSkill
- playtest-reportSkill
- product-conceptSkill
- project-stage-detectSkill
- propagate-design-changeSkill
- prototypeSkill
- qa-planSkill
- quick-designSkill
- regression-suiteSkill
- release-checklistSkill
- remove-bgSkill
- retrospectiveSkill
- reverse-documentSkill
- review-all-gddsSkill
- scope-checkSkill
- security-auditSkill
- self-loopSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Run every check before touching the game.
- Distinctive: line 42
If not, offer to install it — ask before writing anything into the project:
- Very specific: line 44
add AGENT_QA to the Standalone scripting define symbols (release builds must not have it)
- Very specific: line 45
add "testables": ["com.ccs.agent-qa"] to Packages/manifest.json (otherwise the replay tests are invisible)
- Distinctive: line 52
Other work: If another session or Codex is driving this project's editor, stop and ask.
- Very specific: line 76
Run only approved cases. You may draft a case from a story acceptance criterion, but save it as draft and ask the user to approve it — the …
- Very specific: line 81
If the expectation is a feeling ("the jump feels responsive"), it is not this skill's test: route it to /playtest-report and say so.
- Very specific: line 86
Run dir: production/qa/agent-runs/<YYYY-MM-DD>-<TC id>/.
- Very specific: line 110
Every Oracle step pass → PASS (pending human review).
- Very specific: line 132
Only after a human 통과, and after asking before writing the macro and the one-line entry in tests/regression-suite.md:
- Very specific: line 142
Add the line to tests/regression-suite.md.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Agent Play QA
The agent plays the game the way a tester would — looks at the screen state, clicks,
waits — but it never grades its own work. Every pass or fail comes from the
in-game bridge checking live game state against an expect step. What the agent
says about a run is commentary; the exit code of scripts/agent_qa.py is the verdict.
Three pieces, one contract:
| Piece | Where | Job |
| Bridge | templates/unity/agent-qa/ → project Packages/com.ccs.agent-qa/ | AgentQa.Bridge.Handle(json): snapshot · click · expect · wait_until · checkpoint |
| Driver | scripts/agent_qa.py | sends steps through hera-agent-unity exec; step · run · check · promote |
| Replay runner | Packages/com.ccs.agent-qa/Tests/ReplayTests.cs | PlayMode test that replays tests/agent-qa/*.json, no LLM |
Exit codes (docs/deterministic-gates.md):
agent_qa.py run | Meaning | Report |
0 | every step passed, every expect held | PASS (still needs a human review before it counts as story evidence) |
2 | a step failed — wrong text, not found, covered by another UI, not interactable, wait timed out | FAIL |
3 | could not run — no hera, no bridge answer, not playing, wrong scene, invalid macro | BLOCKED — no verdict exists; never read this as a pass |
step adds 1 = pending (a wait_until not yet true). check returns 1 when a
macro has no expect/wait_until — a replay without an oracle proves nothing.
Phase 1 — Preflight
Run every check before touching the game. Each miss is BLOCKED with its fix.
- Game track. This is a game-pack skill. On a product project, stop.
- hera.
hera-agent-unity --helpmust answer. Missing → BLOCKED. - Bridge installed.
Packages/com.ccs.agent-qa/package.jsonexists in the project. If not, offer to install it — ask before writing anything into the project:- copy
templates/unity/agent-qa/toPackages/com.ccs.agent-qa/ - add
AGENT_QAto the Standalone scripting define symbols (release builds must not have it) - add
"testables": ["com.ccs.agent-qa"]toPackages/manifest.json(otherwise the replay tests are invisible) - split runtime (
production/runtime.txt=split):Packages/**andProjectSettings/**are Codex's paths. Hand the install to Codex (scripts/cli_agent.py codex --write …,rules/runtime-modes.md) and verify its diff; do not write them yourself.
- copy
- Compiled.
hera-agent-unity console --type erroris empty, then one probe:python scripts/agent_qa.py step --project <p> '{"do":"snapshot"}'. Exit 3 here means the define is missing, the editor is blocked, or there is a compile error — say which. - Other work. If another session or Codex is driving this project's editor, stop and ask. Entering Play mode under someone else's work breaks it.
hera exec is approval-gated; the driver passes --yes because the only code it sends is
the fixed AgentQa.Bridge.Handle(<json>) call. Do not send any other C# through hera in
this skill. Free-form exec is how a QA run quietly edits the game it is judging.
Phase 2 — The test case
One run checks one test case. Test cases live in production/qa/cases/TC-<slug>-<NN>.md:
---
id: TC-shop-01
source: production/epics/shop/story-004.md#AC2
scene: Shop
status: approved # draft | approved | retired
---
- **Precondition**: gold 100, shop open
- **Steps**: buy the first item once
- **Expected**: gold shows 0 and the buy button is disabled
- **Oracle**: Canvas/HUD/Gold text == "0"; Canvas/Shop/BuyBtn state == not_interactable- Run only
approvedcases. You may draft a case from a story acceptance criterion, but save it asdraftand ask the user to approve it — the agent does not approve its own test. - The Oracle line must name things the bridge can check: a path plus a
text(equals/contains), astate(interactable/not_interactable), orabsent.absentalso requires the parent path to exist, so a typo cannot pass it vacuously. If the expectation is a feeling ("the jump feels responsive"), it is not this skill's test: route it to/playtest-reportand say so.
Phase 3 — Play
- Run dir:
production/qa/agent-runs/<YYYY-MM-DD>-<TC id>/. Run id = that folder name. - Open the case's scene, then
hera-agent-unity editor play --wait. - Loop, one step per call, always logging:
python scripts/agent_qa.py step --project <p> --log <run dir> '{"run":"<run id>","id":<n>,"do":"snapshot"}' python scripts/agent_qa.py step --project <p> --log <run dir> '{"run":"<run id>","id":<n>,"do":"click","target":"Canvas/Shop/BuyBtn"}'- Decide the next step from the latest snapshot (paths, texts, interactable, rect).
- Number steps
1, 2, 3…within the run. If a call times out, resend the same step unchanged — the bridge returns the stored result instead of clicking twice. Await_untilthat answeredpending(exit 1) is never stored: resend it to look again. - End with the Oracle as
expect/wait_untilsteps. Those answers are the verdict. - Take a
checkpoint("name"plus a"path"inside the run dir) when the Oracle is checked.promotedropspath; replays write their own screenshots.
- Budget: at most 40 steps and 10 minutes per case. Over budget → stop, report BLOCKED ("could not reach the precondition"), and say where it got stuck.
click reaches UI only (RectTransform under a Canvas). Keyboard/gamepad input (press)
and game functions (call) are not in this version — say so instead of improvising C#.
Phase 4 — Verdict and evidence
Map the run, not your impression of it:
- Every Oracle step
pass→ PASS (pending human review). - An Oracle step
fail→ FAIL. Offer/bug-reportwith the logged steps as the reproduction and the failure screenshot as evidence. - The Oracle could not be expressed as bridge checks → CONCERNS: human review required.
- Any exit 3 → BLOCKED.
Then propose review.md in the run dir and ask before writing it:
# Review — <TC id> · <run id>
- Agent verdict: PASS | FAIL | CONCERNS | BLOCKED (exit <n>)
- Human verdict: 통과 | 실패 | 판단 불가 ← the user fills this
- Test case wrong: yes | no ← yes = fix the TC, not the game
- Notes:판단 불가 is not a pass: send the case back to draft and sharpen its Oracle.
"Test case wrong" is a TC defect, not a product bug — do not file it as a bug.
A run counts as story evidence (/story-done) only with a human 통과 in review.md.
Phase 5 — Promote to a replay
Only after a human 통과, and after asking before writing the macro and the one-line
entry in tests/regression-suite.md:
python scripts/agent_qa.py promote <run dir> --tc <TC id> --scene <scene> --to tests/agent-qa/<TC id>.jsonkeeps the passed actions and checks in order and drops snapshots and dead ends.python scripts/agent_qa.py check tests/agent-qa/<TC id>.json→ must be0.- Prove it replays from a clean start:
python scripts/agent_qa.py run --project <p> --out production/qa/agent-runs/<date>-<TC id>-replay tests/agent-qa/<TC id>.json(it restarts Play mode itself) → must be0. A replay that fails on a clean start is flaky or depends on state the macro did not set up; fix that before promoting. - Add the line to
tests/regression-suite.md. A replay with noexpect/wait_untilis refused bycheck,run(exit 3) and the Unity runner alike.
From then on CI replays it with no LLM: the PlayMode test AgentQa.ReplayTests runs every
tests/agent-qa/*.json, and the Unity test runner's exit code is what /smoke-check reads.
The scene must be in Build Settings — each replay reloads it so state never leaks between cases.
Next steps
- FAIL →
/bug-reportfrom the run dir, then/bug-triage. - PASS + human 통과 → Phase 5, then
/story-donewith the run dir as the evidence path. - CONCERNS / 판단 불가 → rewrite the case's Oracle, or move it to
/playtest-report. - BLOCKED → fix the named cause and rerun Phase 1.
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.

