uat-write

A command that converts product-owner-written user acceptance tests into Playwright end-to-end test files before implementation begins.

In plain words
What is it for?
Finding the active GAIA specification and generating one Playwright test file for each of its acceptance tests.
Why use it?
It creates a test harness early, so the upcoming implementation can be checked against the intended user scenarios.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/gaia-react/gaia/uat-write
Clone the repo
git clone --depth 1 https://github.com/gaia-react/gaia
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,140 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.01140
Opus 5 $0.00016 $0.00570
Sonnet 5 $0.00006 $0.00228
Haiku 4.5 $0.00003 $0.00114

Measured 2d ago against content hash 09263f91d5a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

uat-write scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.specify/extensions/gaia/commands/uat-write.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

UAT auto-write pass

Fired automatically by spec-kit on the before_implement event (mandatory hook). The agent reads this skill and renders the active SPEC's PO-authored UATs into one Playwright e2e spec per UAT, leaving a red-state harness in place before /speckit-implement edits source.

Locate the active SPEC

The render target is the SPEC artifact whose UATs back the upcoming /speckit-implement run. In a GAIA project that artifact lives at .gaia/local/specs/SPEC-NNN/SPEC.md.

Resolve the path in this order (4-step algorithm; locked post-probe, .specify/feature.json carries no SPEC backreference, so a feature-cross-walk step was dropped):

  1. If $ARGUMENTS carries an explicit SPEC-NNN id or absolute path, use it.
  2. Otherwise pick the most-recent .gaia/local/specs/SPEC-NNN/SPEC.md with status: in-progress, modified within the last 30 minutes.
  3. Otherwise the single .gaia/local/specs/SPEC-NNN/SPEC.md with status: in-progress (only if exactly one exists).
  4. Otherwise AskUserQuestion: list all in-progress SPECs and ask which one to render. Do NOT guess.

The GAIA preset's /speckit-specify wrapper relocates and stamps the SPEC immediately after authoring, so the just-written SPEC is the most-recent in-progress entry, step 2 covers the /speckit-specify/gaia-plan/speckit-implement chain. Step 3 handles the common single-feature case.

Run the render helper

Run using the Bash tool:

bash .specify/extensions/gaia/lib/uat-write.sh <resolved-spec-path>

The helper emits a JSON summary on stdout. Capture it verbatim; do NOT pipe through anything else. Exit codes: 0 success, 1 operational failure, 2 usage error.

Surface results

  • Success (ok: true). Emit a one-line summary:

    before_implement UAT-write complete: written, rewritten, deleted, fixme, unchanged. Specs at .playwright/e2e/<spec-dir>/. Cache: .gaia/local/cache/uat-write/<SPEC-ID>.json.

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 58 lines · 32 tokens per session scan A 09263f91d5a1

Subscribe to this mod's changes

uat-write is a command published in the GitHub repository gaia-react/gaia (22 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 1,140 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.