Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🔨 chore(acceptance): sync acceptance skill to 0.7.5 (#20856)

YuTengjinge6fd036edb4d
diff --git a/.agents/skills/acceptance/SKILL.md b/.agents/skills/acceptance/SKILL.md
index f1693c595c2..2c635df718b 100644
--- a/.agents/skills/acceptance/SKILL.md
+++ b/.agents/skills/acceptance/SKILL.md
@@ -2,7 +2,7 @@
name: acceptance
license: Apache-2.0
metadata:
- version: "0.7.2"
+ version: "0.7.5"
description: >
End-to-end verification and self-evidence for a delivery in any repository,
with or without a preconfigured verify plan. Discover an existing plan when
@@ -300,12 +300,12 @@ excuse below was made in a real round.
| Excuse | Reality |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| "Injection is hard; happy-path plus unit tests covers it" | The error state _was_ the goal. Walk the probe ladder ([probe-mock-patterns.md](references/probe-mock-patterns.md) A) before calling it blocked. (M2) |
-| "The branch name says what to verify" / "Loading the living logs first…" | The task lives in the user's words. Recover it, or confirm a labeled guess with one structured question — silently; never narrate setup. (M3, M21) |
-| "The black frame is probably display sleep / a permission" | Measure first: pixel brightness, the permission bit, an A/B with one variable toggled. Publish "confirmed by X" or "suspected", never a guess. (M4) |
-| "Let me ask how they want it run" / "I'll click Sign in and you authorize" / "too small to screenshot" | Environment mechanics are yours: full isolated run, auth by direct injection (never an interactive login — it hijacks the user's browser), a screenshot for every user-facing change. Ask only about the product decision. (M8) |
-| "One more config edit and the env will boot" / "I'll mock it" / "I'll drive the rest myself" | Timebox. Inventory running instances, probe for the real capability before mocking (a mock that records nothing is not in the path), re-delegate a dead subagent's remaining steps, revert experiments and ask. (M17) |
-| "The fix is in and tests pass — verified" | Reproduce the failure's precondition first, then verify with it held. A run that cannot fail proves nothing; "reproduces sometimes" means an unnamed precondition. When the mocked seam is the suspect, drop the mock. (M31) |
+| "Injection is hard; happy-path plus unit tests covers it" | The error state _was_ the goal. Walk the probe ladder ([probe-mock-patterns.md](references/probe-mock-patterns.md) A) before calling it blocked. |
+| "The branch name says what to verify" / "Loading the living logs first…" | The task lives in the user's words. Recover it, or confirm a labeled guess with one structured question — silently; never narrate setup. |
+| "The black frame is probably display sleep / a permission" | Measure first: pixel brightness, the permission bit, an A/B with one variable toggled. Publish "confirmed by X" or "suspected", never a guess. |
+| "Let me ask how they want it run" / "I'll click Sign in and you authorize" / "too small to screenshot" | Environment mechanics are yours: full isolated run, auth by direct injection (never an interactive login — it hijacks the user's browser), a screenshot for every user-facing change. Ask only about the product decision. |
+| "One more config edit and the env will boot" / "I'll mock it" / "I'll drive the rest myself" | Timebox. Inventory running instances, probe for the real capability before mocking (a mock that records nothing is not in the path), re-delegate a dead subagent's remaining steps. Search the project layer (`.agents/acceptance/`, including `references/`) for the exact error before asking; if it has no fix, revert experiments and ask for the missing prerequisite. |
+| "The fix is in and tests pass — verified" | Reproduce the failure's precondition first, then verify with it held. A run that cannot fail proves nothing; "reproduces sometimes" means an unnamed precondition. When the mocked seam is the suspect, drop the mock. |
## Pick the surface by the user-visible outcome
@@ -334,6 +334,15 @@ passing tests support that evidence; they do not replace it.
[report.md](references/report.md#structured-visualizations). **A deliverable
the user hears needs `audio`** —
[evidence.md](references/evidence.md#audio-deliverables).
+- **A change to UI users already see needs before/after evidence.** When the
+ delivery changes existing copy, labels, toasts, layout, or style, each such
+ case requires a `comparison` pair of the same view on the pre-change and
+ post-change code — [report.md](references/report.md#beforeafter-comparison-pairs).
+ An after-only shot of a toast reading `重命名遇到了问题,请重试` does not show
+ it replaced `Rename failed`. Prove the before half really runs the old code
+ ([probe-mock-patterns.md](references/probe-mock-patterns.md) A6); text that
+ does not render visibly, such as an `aria-label`, also needs the DOM reading.
+ UI with no prior state is exempt.
- **Auth is a gate scoped to the surface**: authenticate that surface first or
every capture lands on the sign-in page. Web:
[auth-web.md](references/auth-web.md).
@@ -468,8 +477,9 @@ Coverage: 2/2 criteria, all required evidence uploaded
- **Engine-level capture over OS capture.** `agent-browser screenshot` / `dom` /
`eval` run headless; `screencapture` / osascript are macOS-only. iOS: `xcrun
-simctl io` over host-window capture. Rounds land under `.acceptances/`, which
- the CLI keeps out of git.
+simctl io` over host-window capture. Rounds land under `.acceptances/`;
+ allocate them with `new_round` ([report.md](references/report.md#no-operation-id-needed)),
+ which seeds the `.acceptances/.gitignore` that keeps them out of git.
- **Upload as you go.** Evidence keyed to its check mid-run survives a crash near
the end.
- **Don't invent evidence.** Capture only the types a check declares.
diff --git a/.agents/skills/acceptance/references/acceptance-checker.md b/.agents/skills/acceptance/references/acceptance-checker.md
index 9a800f09edc..51196141cc2 100644
--- a/.agents/skills/acceptance/references/acceptance-checker.md
+++ b/.agents/skills/acceptance/references/acceptance-checker.md
@@ -61,8 +61,9 @@ Checker procedure: read the original sources, list their required outcomes,
and compare them with the draft cases and supplied diff. State coverage limits
when sources are incomplete. Look for missing boundaries, ambiguous
criteria, and probes that cannot distinguish success from failure. Check how
-fixtures/fault injections will be proven effective. Also identify duplicate or
-out-of-scope cases; review must not only expand scope.
+fixtures/fault injections will be proven effective, and that each case
+changing existing UI requires a before/after comparison pair. Also identify
+duplicate or out-of-scope cases; review must not only expand scope.
Check that groups reflect independently reviewable user tasks and that each check
can be accepted or rejected on its own. For flow plans, inspect flow titles as
the resulting default checklist categories: flag an umbrella PR group that hides
diff --git a/.agents/skills/acceptance/references/common-mistakes.md b/.agents/skills/acceptance/references/common-mistakes.md
index 41a25d4203c..861035e7fa6 100644
--- a/.agents/skills/acceptance/references/common-mistakes.md
+++ b/.agents/skills/acceptance/references/common-mistakes.md
@@ -29,7 +29,7 @@ Apply the same shape to the project layer's file. Never narrate the reading.
## Checklist
- **M1** Open every screenshot with Read before `pass`; greps and element counts never decide. Presence/absence of a UI section is asserted on structured state, never on page text.
-- **M5** Before/after is a `comparison` pair with exactly one `before` and one `after`; never a stale shot loose in `evidence`, never a hand-composed image, never sequential flow steps.
+- **M5** Before/after is a `comparison` pair of pre-change vs delivered code in the same state, with exactly one `before` and one `after`; never a stale shot loose in `evidence`, never a hand-composed image, never sequential flow steps, never loading vs loaded of one build.
- **M6** Prove the running instance loads your working-tree code by measuring a changed value. After a direct fixture write, cold-load and assert at the layer the behavior reads, not where you wrote.
- **M12** A UI chip/badge is supporting evidence; the payload, request body, DB row, or side effect is the proof.
- **M13** A GIF's last frame is its headline — end on the asserted state or say in `observation` why it ends elsewhere.
@@ -62,12 +62,14 @@ that drives it or a located DOM node, never a substring.
**Trap:** a stale "before" shot loose in a passed case's `evidence` (the page
headings each image by filename, so it reads as the current result); two shots
-hand-composed into one image; or two sequential steps of a flow tagged as
-`before`/`after`.
-
-**Rule:** one view in two states = a `comparison` pair with a shared `id`,
-exactly one `before` and one `after`, one pair per case; the page owns the
-labeling. Flow steps are ordered evidence with captions. Shape in
+hand-composed into one image; two sequential steps of a flow tagged as
+`before`/`after`; or two states of the delivered build, such as a skeleton
+tagged `before` and the loaded page tagged `after`.
+
+**Rule:** the same view in the same state on the pre-change and delivered code
+= a `comparison` pair with a shared `id`, exactly one `before` and one `after`,
+one pair per case; the page owns the labeling. Other states of one build and
+flow steps are ordered evidence with captions. Shape in
[report.md](./report.md#beforeafter-comparison-pairs).
### M6 — Verifying against a build or cache that is not your code
diff --git a/.agents/skills/acceptance/references/report.md b/.agents/skills/acceptance/references/report.md
index b5bd835a197..2099e0e8e06 100644
--- a/.agents/skills/acceptance/references/report.md
+++ b/.agents/skills/acceptance/references/report.md
@@ -34,10 +34,18 @@ never point a second ingest at a directory you already published:
# $1 = subject key (see Directory layout), $2 = a short slug for this round.
new_round() {
dir=".acceptances/$1/$(date +%Y%m%d-%H%M%S)-$2"
- mkdir -p "$dir/assets" && printf '%s' "$dir"
+ mkdir -p "$dir/assets" || return
+ # Fresh clones and worktrees never carry the self-ignoring file, so seed it
+ # before anything is written; an existing one is left untouched.
+ [ -e .acceptances/.gitignore ] || printf '*\n' > .acceptances/.gitignore || return
+ printf '%s' "$dir"
}
```
+Run it from the repository root. It is the only supported way to create a round
+directory by hand: it keeps the whole tree out of `git status` before the first
+`result.json` or screenshot exists.
+
```bash
# A. first external-project round — creates a standalone acceptance.
# It has no subject yet, so group it under `standalone-<slug>` until the
@@ -100,8 +108,11 @@ Three things the shape buys, none of them cosmetic:
- **The tree is git-invisible.** `.acceptances/.gitignore` contains `*`, which
ignores the whole directory including itself, so evidence binaries never land
as untracked noise and the project's own `.gitignore` is never rewritten.
- Create that file before writing evidence; a general-purpose skill installer
- does not seed it. `lh acceptance run ingest` also ensures it exists.
+ The file ignores itself, so a fresh clone or worktree never has it, and a
+ general-purpose skill installer does not seed it either. `new_round` creates
+ it before anything is written; `lh acceptance install` and
+ `lh acceptance run ingest` also ensure it exists, but ingest runs only after
+ the round has already been written.
Writing a round somewhere else still works — `ingest` takes an explicit path —
but then keeping it out of git is on you.
@@ -402,7 +413,11 @@ Choose the layout by comparison intent, not by the source image dimensions:
full width matters more than simultaneous scanning, such as a very wide,
shallow toolbar or timeline strip.
-A comparison pair means the same view in two states — sequential steps of a
+A comparison pair means the same view, reached by the same operation and held
+in the same state, on the pre-change code (`before`) and the delivered code
+(`after`). Two states of one build — loading vs loaded, empty vs filled — are
+ordinary evidence, not a pair; a skeleton change pairs the old skeleton with
+the new one, and the loaded page goes in plain evidence. Sequential steps of a
flow are ordinary ordered evidence with captions, not a pair.
### Video chapters
diff --git a/.agents/skills/acceptance/references/resource-guard.md b/.agents/skills/acceptance/references/resource-guard.md
index 7ee478feed6..957adfcab8c 100644
--- a/.agents/skills/acceptance/references/resource-guard.md
+++ b/.agents/skills/acceptance/references/resource-guard.md
@@ -48,6 +48,8 @@ Start one guard per run, before the first heavy command, and stop it at teardown
```bash
GUARD=.agents/skills/acceptance/scripts/resource-guard.sh
RUN_DIR=".acceptances/guard/$RUN_TAG"
+# The guard may start before any round exists; keep its state out of git too.
+mkdir -p .acceptances && { [ -e .acceptances/.gitignore ] || printf '*\n' > .acceptances/.gitignore; }
bash "$GUARD" start \
--state-dir "$RUN_DIR" --run-tag "$RUN_TAG" --interval 10 \