frontend-acceptance
Skill2 starsChanged 3 months agoMITView on GitHub
Evidence-first implementation and runtime acceptance for user-visible frontend changes, responsive work, interactions, animations, and user flows. Requires browser evidence and a local report. Do not use it to turn a read-only code review into implementation or harness installation without separate authorization.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- audit-agent-workflowsSkill
- find-simplificationsSkill
- page-performance-auditSkill
- polish-code-changeSkill
- review-code-changeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
44 rules. About 0 are common, 31 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈31
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use this skill whenever work changes something a user can see or interact with.
- Distinctive: line 19
Never declare a user-visible frontend change complete from code inspection alone.
- Distinctive: line 23
run the real application;
- Distinctive: line 25
verify deterministic behavior with Playwright assertions.
- Distinctive: line 33
Do not replace missing evidence with confident prose.
- Very specific: line 59
If the harness is not installed, do not assume the Skill-only installation was enough.
- Distinctive: line 61
If the harness is missing, say that the acceptance harness is not installed and either install/copy it when authorized or perform an …
- Very specific: line 68
follow assets/acceptance/README.md (install @playwright/test + chromium, add the four package scripts, gitignore .acceptance/).
- Very specific: line 70
add app-specific helpers (auth login, seed data) to fixtures.ts or spec files as needed.
- Very specific: line 74
When a project already has an acceptance/ harness from an older or divergent generation, do not force-copy over it.
- Very specific: line 93
create or update .acceptance/plan.md.
- Distinctive: line 103
Do not perform a giant unstructured rewrite.
- Very specific: line 124
Create/update cases under acceptance/specs/.
- Distinctive: line 126
Use the project fixture:
- Distinctive: line 132
Every meaningful case should call:
- Distinctive: line 144
Use stable IDs so reports and visual review can refer to the same case.
- Distinctive: line 148
Prefer batches that a user can understand:
- Distinctive: line 157
Do not split purely by source file if that obscures the user-visible result.
- Distinctive: line 161
Do not change an acceptance expectation or screenshot baseline merely because the implementation fails.
- Distinctive: line 165
Run the relevant acceptance subset during iteration:
- Distinctive: line 171
Use the real browser flow.
- Very specific: line 181
Use acceptance.checkpoint() for states a human should be able to inspect later.
- Distinctive: line 185
before/after a destructive or stateful action.
- Distinctive: line 201
Run the relevant case with pass-video retention:
- Distinctive: line 207
Use Trace as additional evidence.
- Distinctive: line 231
Treat unexpected runtime errors as implementation failures.
- Distinctive: line 233
Do not suppress them with allowlists unless they are genuinely understood, unrelated, and documented.
- Distinctive: line 237
If the app intentionally uses horizontal-scrolling subcontainers, that must not create horizontal overflow on the document root.
- Distinctive: line 241
When a case fails:
- Distinctive: line 250
After targeted repair passes, run the full acceptance suite before final completion.
- Distinctive: line 252
Do not "repair" a failure by weakening the test unless the test was objectively wrong.
- Very specific: line 254
If progress is blocked by authentication, unavailable backend data, permissions, external services, unsupported environment, or missing …
- Distinctive: line 258
After an automation run, find the latest run:
- Very specific: line 275
write .acceptance/runs/<run>/visual-review.json conforming to acceptance/visual-review.schema.json.
- Distinctive: line 277
Do not write visual review based only on filenames or DOM assertions.
- Very specific: line 286
Use uncertain when the evidence exists but visual correctness is subjective or not sufficiently demonstrated.
- Very specific: line 288
Use blocked when required evidence could not be produced or a dependency prevents verification.
- Distinctive: line 296
If visual review finds a real defect, return to the repair loop and produce a fresh run.
- Very specific: line 328
no case at any severity is FAIL.
- Distinctive: line 329
all required visual evidence has been inspected.
- Very specific: line 335
If there are unresolved UNCERTAIN or BLOCKED items, the implementation may be ready, but verification remains incomplete.
- Distinctive: line 339
Keep the chat handoff short.
- Distinctive: line 346
only the manual-review blockers that still require human attention.
- Distinctive: line 348
Do not restate every browser step in chat when it is already preserved in the report.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Frontend Acceptance
Use this skill whenever work changes something a user can see or interact with.
For a read-only review, preserve that boundary: inspect existing browser evidence and report missing acceptance coverage, but do not install a harness, run a repair loop, or edit product code unless the user separately requests implementation or runtime acceptance.
The objective is not merely to make tests green. The objective is to leave human-readable evidence that the implementation and important UI/UX flows were actually exercised.
A frontend task is not complete until the acceptance gate below is satisfied.
Core rule
Never declare a user-visible frontend change complete from code inspection alone.
For each affected flow, you must:
- run the real application;
- operate it through a real browser;
- verify deterministic behavior with Playwright assertions;
- capture screenshots of important states;
- inspect runtime/browser diagnostics;
- visually inspect the captured evidence;
- fix discovered issues and rerun affected flows;
- generate a local acceptance report;
- mark anything you cannot reliably verify as
UNCERTAINorBLOCKED.
Do not replace missing evidence with confident prose.
Locate the harness
Expected project files:
acceptance/
playwright.config.ts
fixtures.ts
specs/
visual-review.schema.json
scripts/Expected commands:
pnpm acceptance
pnpm acceptance:report
pnpm acceptance:open
pnpm acceptance:cleanThe repository may use npm/yarn/bun instead. Read package.json and lockfiles first and use the project's package manager.
If the harness is not installed, do not assume the Skill-only installation was enough. A Skill gives workflow guidance; the project still needs acceptance/ and its Playwright dependency for executable evidence.
If the harness is missing, say that the acceptance harness is not installed and either install/copy it when authorized or perform an equivalent evidence-first Playwright workflow. Do not silently downgrade to code-only verification.
Bundled template
This skill ships a ready-to-copy harness under assets/acceptance/ (next to this SKILL.md). When the project has no harness and you are authorized to install one:
- copy
assets/acceptance/into the project root asacceptance/; - follow
assets/acceptance/README.md(install@playwright/test+ chromium, add the four package scripts, gitignore.acceptance/); - point it at the app with
ACCEPTANCE_BASE_URLorACCEPTANCE_WEB_SERVER_CMD; - add app-specific helpers (auth login, seed data) to
fixtures.tsor spec files as needed.
Upgrading an existing harness
When a project already has an acceptance/ harness from an older or divergent generation, do not force-copy over it. Reconcile it to the current template by hand, preserving the project's own parts:
- Keep:
specs/, app-specific config inplaywright.config.ts(webServer, projects, baseURL), auth/seed helpers infixtures.ts, and historical.acceptance/runs/. - Replace: the framework plumbing with the template's complete
scripts/directory andvisual-review.schema.json. - Converge the contract: per-case evidence JSON shape, run-dir layout, and the four package scripts must match the template, because run/report tooling depends on them. Read the project's existing fixtures and merge logic, then adapt rather than blindly overwrite.
- The report tolerates mixed-generation history: runs whose evidence it cannot read are simply omitted from the run-history sidebar instead of breaking the report.
The generated report.html is a self-contained dark report: collapsible case panels, status filter chips, an image lightbox (keyboard ←/→/Esc), a run-history sidebar (every run under .acceptance/runs/ summarized and cross-linked), and before/after comparison sliders. Checkpoint naming convention: a before:<label> checkpoint and an after:<label> checkpoint with the same label are paired automatically into an <img-compare> slider (a dependency-free Web Component in scripts/report-assets/report.js, reusable on its own). Use it for regression/fix evidence.
Phase 0 — Understand before changing
For a narrow change, inspect the affected component, route, state management, existing tests, and surrounding UI.
For a broad request such as "improve the frontend", "polish the UI", or "fix UX overall":
- start the application;
- inspect the important routes in desktop and mobile viewports;
- identify the primary user journeys;
- capture a small baseline set where useful;
- create or update
.acceptance/plan.md.
The plan should prioritize user-visible problems, not file-by-file refactors.
Suggested buckets:
- P0: broken flow, inaccessible core action, data loss, severe responsive breakage
- P1: confusing hierarchy, inconsistent component behavior, broken states, obvious visual defects
- P2: polish, spacing, typography, motion, minor consistency improvements
Do not perform a giant unstructured rewrite. Work in reviewable batches.
Phase 1 — Define acceptance criteria before implementation
Each user-visible batch must have acceptance criteria that can be observed.
Bad:
- "looks better"
- "make responsive"
- "animation should be smooth"
Better:
- "At 390×844, the primary action remains visible without horizontal page scrolling."
- "Closing the lightbox returns focus and visual state to the originating thumbnail."
- "During close animation, only one flying image layer is visible."
- "Loading, empty, error, and success states retain the same page shell width and typography hierarchy."
Acceptance criteria should describe user-visible outcomes rather than implementation details.
Create/update cases under acceptance/specs/.
Use the project fixture:
import { test, expect } from '../fixtures';Every meaningful case should call:
acceptance.meta({
id: 'stable-case-id',
feature: 'Feature name',
severity: 'P1',
steps: ['...', '...'],
expected: ['...', '...'],
});Use stable IDs so reports and visual review can refer to the same case.
Phase 2 — Implement in small batches
Prefer batches that a user can understand:
- shell/navigation
- design tokens and shared components
- one route or one workflow
- responsive behavior
- states and validation
- motion/polish
Do not split purely by source file if that obscures the user-visible result.
Preserve existing behavior unless the task explicitly changes it.
Do not change an acceptance expectation or screenshot baseline merely because the implementation fails. Only change expectations when the requested product behavior truly changed.
Phase 3 — Browser verification
Run the relevant acceptance subset during iteration:
pnpm acceptance -- --grep "case or feature"Use the real browser flow. Do not simulate completion by calling internal state setters unless the product itself exposes that as normal behavior.
At minimum verify:
- the intended happy path;
- the states directly changed by this work;
- desktop and mobile projects;
- loading/empty/error states when relevant;
- keyboard/focus behavior when interaction or modal/dialog behavior changed.
Use acceptance.checkpoint() for states a human should be able to inspect later.
Examples:
- before/after a destructive or stateful action;
- modal/lightbox open;
- animation settled state;
- mobile navigation expanded;
- form validation error;
- empty/error/success states;
- any layout that was specifically fixed.
Name fix/regression pairs before:<label> and after:<label> — the report renders each pair as a single draggable comparison slider instead of two separate thumbnails.
A final screenshot is captured automatically, but that is not a substitute for meaningful intermediate checkpoints.
Motion and animation
For animations, transitions, drag, gesture, lightbox, carousel, or other temporal behavior, screenshots alone may not prove correctness.
Run the relevant case with pass-video retention:
ACCEPTANCE_VIDEO=on pnpm acceptance -- --grep "case"Use Trace as additional evidence. If final acceptance requires the complete suite, run the full suite afterward.
Record every video or trace actually inspected in the case's evidenceRefs. Paths must be relative to the run directory and point to existing artifacts, for example:
{
"evidenceRefs": [
"playwright-artifacts/lightbox-close/video.webm",
"playwright-artifacts/lightbox-close/trace.zip"
]
}Phase 4 — Automatic diagnostics
The harness records:
console.error- page exceptions
- failed requests
- HTTP 4xx/5xx
- horizontal viewport overflow
- screenshots and Playwright artifacts
Treat unexpected runtime errors as implementation failures.
Do not suppress them with allowlists unless they are genuinely understood, unrelated, and documented.
A network warning is not automatically a product bug, but it must be inspected if it affects the tested flow.
If the app intentionally uses horizontal-scrolling subcontainers, that must not create horizontal overflow on the document root.
Phase 5 — Repair loop
When a case fails:
- inspect the failure;
- inspect screenshot/trace/diagnostics;
- identify the product defect;
- fix product code;
- rerun the smallest affected acceptance subset;
- repeat until stable.
After targeted repair passes, run the full acceptance suite before final completion.
Do not "repair" a failure by weakening the test unless the test was objectively wrong.
If progress is blocked by authentication, unavailable backend data, permissions, external services, unsupported environment, or missing product requirements, stop fabricating certainty and mark the case BLOCKED.
Phase 6 — Visual review
After an automation run, find the latest run:
.acceptance/latestRead:
.acceptance/runs/<run>/evidence-index.jsonFor every case whose visualRequired is not false:
- inspect all relevant desktop/mobile screenshots listed in the evidence index;
- inspect video/trace when temporal behavior matters;
- judge against the case's
expectedcriteria and the visual rubric inreferences/visual-review.md; - write
.acceptance/runs/<run>/visual-review.jsonconforming toacceptance/visual-review.schema.json.
Do not write visual review based only on filenames or DOM assertions. Actually inspect the images.
Allowed visual statuses:
passfailuncertainblocked
Use uncertain when the evidence exists but visual correctness is subjective or not sufficiently demonstrated.
Use blocked when required evidence could not be produced or a dependency prevents verification.
Confidence:
high: direct clear evidencemedium: evidence supports the conclusion but has some ambiguitylow: weak evidence; normally pair withuncertain
If visual review finds a real defect, return to the repair loop and produce a fresh run. Do not keep a known-bad run as the final report.
Phase 7 — Final report
After writing visual-review.json:
pnpm acceptance:reportThe required final deliverables are:
.acceptance/runs/<run>/report.html
.acceptance/runs/<run>/summary.md
.acceptance/runs/<run>/evidence-index.jsonThe HTML report should be the primary human handoff.
Final status semantics:
PASS: automation passed and required visual review passed.FAIL: automation or visual review found a defect.UNCERTAIN: evidence is incomplete/ambiguous, automation was flaky, or visual review is missing/uncertain.BLOCKED: the flow could not be exercised for an external or environmental reason.
Completion gate
You may declare the frontend task complete only when:
- the final full acceptance run exists;
- no case at any severity is
FAIL; - all required visual evidence has been inspected;
- remaining
UNCERTAIN/BLOCKEDcases are explicitly surfaced for human review; report.htmlandsummary.mdwere generated.
pnpm acceptance:report always writes the available report, but exits non-zero unless the overall status is PASS. Invalid visual-review data also fails closed instead of being treated as a passing verdict.
If there are unresolved UNCERTAIN or BLOCKED items, the implementation may be ready, but verification remains incomplete. Say exactly that rather than calling the task complete or fully verified.
Final response style
Keep the chat handoff short. The report contains the detail.
Report:
- what was changed;
- final counts: PASS / FAIL / UNCERTAIN / BLOCKED;
- the local report path;
- only the manual-review blockers that still require human attention.
Do not restate every browser step in chat when it is already preserved in the report.
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.

