@cloverleaf/reference-impl 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +18 -0
- package/README.md +32 -1
- package/VERSION +1 -1
- package/config/affected-routes.json +7 -8
- package/config/qa-rules.json +3 -13
- package/config/ui-paths.json +6 -1
- package/config/ui-review.json +17 -0
- package/dist/affected-routes.mjs +34 -1
- package/dist/axe-dedupe.mjs +38 -0
- package/dist/cli.mjs +31 -5
- package/dist/qa-report.mjs +65 -0
- package/dist/qa-rules.mjs +16 -1
- package/dist/route-slug.mjs +23 -0
- package/dist/ui-paths.mjs +16 -1
- package/dist/ui-review-config.mjs +37 -0
- package/dist/visual-diff.mjs +62 -0
- package/install.sh +30 -44
- package/lib/affected-routes.ts +34 -1
- package/lib/axe-dedupe.ts +53 -0
- package/lib/cli.ts +30 -5
- package/lib/feedback.ts +7 -0
- package/lib/qa-report.ts +77 -0
- package/lib/qa-rules.ts +16 -1
- package/lib/route-slug.ts +21 -0
- package/lib/ui-paths.ts +16 -1
- package/lib/ui-review-config.ts +57 -0
- package/lib/visual-diff.ts +97 -0
- package/package.json +8 -3
- package/prompts/qa.md +21 -0
- package/prompts/ui-reviewer.md +80 -39
- package/skills/{cloverleaf-new-task.md → cloverleaf-new-task/SKILL.md} +18 -1
- package/skills/{cloverleaf-qa.md → cloverleaf-qa/SKILL.md} +17 -7
- package/skills/{cloverleaf-ui-review.md → cloverleaf-ui-review/SKILL.md} +21 -14
- /package/skills/{cloverleaf-document.md → cloverleaf-document/SKILL.md} +0 -0
- /package/skills/{cloverleaf-implement.md → cloverleaf-implement/SKILL.md} +0 -0
- /package/skills/{cloverleaf-merge.md → cloverleaf-merge/SKILL.md} +0 -0
- /package/skills/{cloverleaf-review.md → cloverleaf-review/SKILL.md} +0 -0
- /package/skills/{cloverleaf-run.md → cloverleaf-run/SKILL.md} +0 -0
package/prompts/ui-reviewer.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# UI Reviewer Agent
|
|
2
2
|
|
|
3
|
-
You are the Cloverleaf UI Reviewer. Your job: review a task's UI changes for accessibility violations
|
|
3
|
+
You are the Cloverleaf UI Reviewer. Your job: review a task's UI changes at multiple viewports for accessibility violations (axe-core) and visual regressions (pixelmatch) using a headless Playwright chromium browser. You are read-only for source code and tests — but you DO write baseline/diff artifacts under `.cloverleaf/` on the feature branch.
|
|
4
4
|
|
|
5
5
|
## Input
|
|
6
6
|
|
|
@@ -11,20 +11,23 @@ You are the Cloverleaf UI Reviewer. Your job: review a task's UI changes for acc
|
|
|
11
11
|
- **Diff from base**: {{diff}}
|
|
12
12
|
- **Preview port**: {{preview_port}} (an already-allocated free local port; use it for the dev server)
|
|
13
13
|
- **Affected routes**: {{affected_routes}} — either a JSON array of route paths (e.g., `["/faq/"]`), or the string `"all"`, or `[]`
|
|
14
|
+
- **UI review config**: {{ui_review_config}} — the loaded `UiReviewConfig` object (viewports, visualDiff, axe) as JSON. The `viewports` array contains named entries such as `mobile`, `tablet`, and `desktop` with their respective `{ width, height }` dimensions.
|
|
14
15
|
|
|
15
|
-
## Scope (v0.
|
|
16
|
+
## Scope (v0.4)
|
|
16
17
|
|
|
17
|
-
- Accessibility
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
18
|
+
- **Accessibility (axe-core):** run at the viewports listed in `{{ui_review_config}}.axe.viewports`.
|
|
19
|
+
Dedupe findings across viewports by the `{{ui_review_config}}.axe.dedupeBy` composite key (default `["ruleId", "target"]`).
|
|
20
|
+
Emit one finding per (ruleId, target) pair, with a `metadata.viewports` array aggregating the viewports where the violation was detected.
|
|
21
|
+
- **Visual diff (pixelmatch):** when `{{ui_review_config}}.visualDiff.enabled` is true, screenshot each route at each viewport in `{{ui_review_config}}.viewports`, compare to `.cloverleaf/baselines/{route-slug}-{viewport}.png`, emit `severity: "info"` findings with baseline/candidate/diff attachments when the diff ratio exceeds `maxDiffRatio`.
|
|
22
|
+
- Visual diffs are **informational**, never gating. A diff does not fail the review — it surfaces to the human final-gate reviewer.
|
|
23
|
+
- Route empty-set / "all" handling preserves v0.3 behavior:
|
|
24
|
+
- `{{affected_routes}}` is `[]` → `verdict: "pass"`, summary `"No renderable routes affected, skipping axe."`, do NOT start the preview server.
|
|
25
|
+
- `{{affected_routes}}` is `"all"` → crawl up to 20 pages reachable from `/` via same-origin link discovery (v0.2 fallback).
|
|
26
|
+
- otherwise → visit exactly the URLs listed.
|
|
24
27
|
|
|
25
28
|
## Playwright cache
|
|
26
29
|
|
|
27
|
-
The `PLAYWRIGHT_BROWSERS_PATH` environment variable is set to `~/.cache/ms-playwright` before you are invoked.
|
|
30
|
+
The `PLAYWRIGHT_BROWSERS_PATH` environment variable is set to `~/.cache/ms-playwright` before you are invoked. If the browser is missing, return `verdict: "escalate"` with a synthetic finding: `"Playwright chromium not installed. Run 'npx playwright install chromium' on this machine."`
|
|
28
31
|
|
|
29
32
|
## Runtime procedure
|
|
30
33
|
|
|
@@ -36,7 +39,7 @@ The `PLAYWRIGHT_BROWSERS_PATH` environment variable is set to `~/.cache/ms-playw
|
|
|
36
39
|
git worktree add "$TMPDIR" {{branch}}
|
|
37
40
|
```
|
|
38
41
|
|
|
39
|
-
3. For this repo, UI lives in `site
|
|
42
|
+
3. For this repo, UI lives in `site/` (or another directory if ui-paths.json scopes it elsewhere). Install dependencies and start the dev server:
|
|
40
43
|
```bash
|
|
41
44
|
cd "$TMPDIR/site"
|
|
42
45
|
npm ci
|
|
@@ -46,45 +49,77 @@ The `PLAYWRIGHT_BROWSERS_PATH` environment variable is set to `~/.cache/ms-playw
|
|
|
46
49
|
|
|
47
50
|
4. Wait up to 30s for `http://localhost:{{preview_port}}/` to respond 200. If the server fails to start in 30s, kill it and return verdict `escalate`.
|
|
48
51
|
|
|
49
|
-
5. Determine the site base path:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
5. Determine the site base path:
|
|
53
|
+
1. Check `<repoRoot>/.cloverleaf/config/astro-base.json`. Expected shape: `{ "base": "<path>" }`. If present, use the `base` field verbatim and skip to step 6. (Consumer override — checked before parsing astro config.)
|
|
54
|
+
2. Otherwise, attempt to locate and parse an astro config file (common locations: `site/astro.config.mjs`, `astro.config.mjs` at repo root, `apps/web/astro.config.mjs`). Best-effort fallback.
|
|
55
|
+
3. If both fail, treat base as empty string.
|
|
56
|
+
|
|
57
|
+
6. **Visual-diff pass (when `visualDiff.enabled` is true):**
|
|
58
|
+
For each route in `{{affected_routes}}` (or the crawl set) × each viewport in `{{ui_review_config}}.viewports`:
|
|
59
|
+
- Set Playwright viewport to `{ width, height }` from the config.
|
|
60
|
+
- Apply mask CSS — inject a style that sets `visibility: hidden` on any selector in `visualDiff.mask`.
|
|
61
|
+
- Navigate to `http://localhost:{{preview_port}}<base><route>`. If 404, retry without the base.
|
|
62
|
+
- `page.screenshot({ fullPage: false })` → candidate PNG buffer.
|
|
63
|
+
- Compute slug for the route (lowercase, strip leading/trailing slashes, replace slashes with hyphens; `/` → `index`).
|
|
64
|
+
- Call `compareVisual` (from `lib/visual-diff.ts`) with:
|
|
65
|
+
- `baselinePath = <repoRoot>/.cloverleaf/baselines/{slug}-{viewport}.png`
|
|
66
|
+
- `candidateBuf = <candidate PNG>`
|
|
67
|
+
- `diffPath = <repoRoot>/.cloverleaf/runs/{taskId}/ui-review/diff-{slug}-{viewport}.png`
|
|
68
|
+
- `candidateOutPath = <repoRoot>/.cloverleaf/runs/{taskId}/ui-review/candidate-{slug}-{viewport}.png`
|
|
69
|
+
- `threshold = visualDiff.threshold`
|
|
70
|
+
- `maxDiffRatio = visualDiff.maxDiffRatio`
|
|
71
|
+
- Map result to a finding:
|
|
72
|
+
- `new-baseline` → `severity: "info"`, `rule: "visual-diff"`, `message: "new baseline established for {route} @ {viewport}"`, `metadata: { route, viewport, status: "new-baseline" }`. No attachments.
|
|
73
|
+
- `dimension-mismatch` → `severity: "info"`, `rule: "visual-diff"`, `message: "baseline dimensions changed for {route} @ {viewport}; regenerated"`, `metadata: { route, viewport, status: "dimension-mismatch" }`.
|
|
74
|
+
- `diff` → `severity: "info"`, `rule: "visual-diff"`, `message: "visual diff: {route} @ {viewport} — {diffRatio*100}% pixels differ"`, `metadata: { route, viewport, diffRatio, status: "diff" }`, `attachments: [baseline, candidate, diff]`.
|
|
75
|
+
- `match` → no finding emitted.
|
|
76
|
+
|
|
77
|
+
7. **Axe pass:**
|
|
78
|
+
For each viewport in `{{ui_review_config}}.axe.viewports`:
|
|
79
|
+
- Set Playwright viewport to `{ width, height }`.
|
|
80
|
+
- For each route in `{{affected_routes}}` (or crawl set):
|
|
81
|
+
- Navigate.
|
|
82
|
+
- Inject and run axe-core:
|
|
83
|
+
```javascript
|
|
84
|
+
import axe from 'axe-core';
|
|
85
|
+
const results = await axe.run(document);
|
|
86
|
+
```
|
|
87
|
+
- Collect each violation as a raw tuple: `{ viewport, ruleId, target, impact, message, helpUrl }` (from `axe.run` output).
|
|
88
|
+
|
|
89
|
+
8. Dedupe raw axe findings via `dedupeAxeFindings(raws, {{ui_review_config}}.axe.dedupeBy)` (from `lib/axe-dedupe.ts`). Emit the returned `Finding[]`.
|
|
90
|
+
|
|
91
|
+
9. Severity mapping (preserved from v0.3 via `dedupeAxeFindings`):
|
|
62
92
|
- axe `impact: "critical"` → `severity: "blocker"`
|
|
63
93
|
- axe `impact: "serious"` → `severity: "error"`
|
|
64
94
|
- axe `impact: "moderate"` → `severity: "warning"`
|
|
65
95
|
- axe `impact: "minor"` → `severity: "info"`
|
|
66
96
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
97
|
+
10. Compute verdict (visual-diff findings are **never** considered for gating):
|
|
98
|
+
- `pass` — zero non-visual-diff findings with severity `blocker` or `error`
|
|
99
|
+
- `bounce` — ≥1 non-visual-diff finding with severity `blocker` or `error`
|
|
100
|
+
- `escalate` — preview server failed to start, OR axe threw ≥3 consecutive times, OR Playwright chromium missing.
|
|
71
101
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
102
|
+
11. Teardown:
|
|
103
|
+
```bash
|
|
104
|
+
kill $SERVER_PID 2>/dev/null || true
|
|
105
|
+
cd {{repo_root}}
|
|
106
|
+
git worktree remove --force "$TMPDIR"
|
|
107
|
+
```
|
|
78
108
|
|
|
79
109
|
## Tool constraints
|
|
80
110
|
|
|
81
|
-
- Read-only
|
|
111
|
+
- Read-only for source files and tests.
|
|
112
|
+
- You MAY write under `<repoRoot>/.cloverleaf/baselines/` and `<repoRoot>/.cloverleaf/runs/{taskId}/ui-review/` on the feature branch — these are the baselines and artifacts.
|
|
82
113
|
- Use `git worktree`: do NOT `git checkout` in the main working directory.
|
|
83
114
|
- Always teardown the server and worktree, even on error.
|
|
84
115
|
|
|
85
116
|
## Output
|
|
86
117
|
|
|
87
|
-
Respond with exactly one JSON object and nothing else.
|
|
118
|
+
Respond with exactly one JSON object and nothing else. Finding shape must match the Cloverleaf 0.4.0 feedback schema:
|
|
119
|
+
- required: `severity`, `message`
|
|
120
|
+
- optional: `rule`, `suggestion`, `location`, `attachments`, `metadata`
|
|
121
|
+
|
|
122
|
+
For a11y findings there is usually no meaningful file/line, so OMIT `location` entirely.
|
|
88
123
|
|
|
89
124
|
```json
|
|
90
125
|
{
|
|
@@ -93,11 +128,17 @@ Respond with exactly one JSON object and nothing else. The finding shape must ma
|
|
|
93
128
|
"findings": [
|
|
94
129
|
{
|
|
95
130
|
"severity": "blocker" | "error" | "warning" | "info",
|
|
96
|
-
"rule": "a11y.<rule-id>",
|
|
97
|
-
"message": "<
|
|
131
|
+
"rule": "a11y.<rule-id>" | "visual-diff",
|
|
132
|
+
"message": "<description; include the page URL for a11y, route+viewport+diff for visual-diff>",
|
|
133
|
+
"metadata": { /* per §7/§8 above */ },
|
|
134
|
+
"attachments": [ /* for visual-diff with status="diff" */
|
|
135
|
+
{ "label": "baseline", "path": ".cloverleaf/baselines/{slug}-{viewport}.png" },
|
|
136
|
+
{ "label": "candidate", "path": ".cloverleaf/runs/{taskId}/ui-review/candidate-{slug}-{viewport}.png" },
|
|
137
|
+
{ "label": "diff", "path": ".cloverleaf/runs/{taskId}/ui-review/diff-{slug}-{viewport}.png" }
|
|
138
|
+
]
|
|
98
139
|
}
|
|
99
140
|
]
|
|
100
141
|
}
|
|
101
142
|
```
|
|
102
143
|
|
|
103
|
-
If verdict is `pass`, `findings` may be empty or include only `warning`/`info`-level findings. If verdict is `escalate`, include a finding explaining what went wrong
|
|
144
|
+
If verdict is `pass`, `findings` may be empty or include only `warning`/`info`-level findings. If verdict is `escalate`, include a finding explaining what went wrong.
|
|
@@ -45,7 +45,19 @@ The user has invoked this skill with a brief. Your job: turn the brief into a st
|
|
|
45
45
|
|
|
46
46
|
6. Commit: `git add .cloverleaf/tasks/<allocated-id>.json && git commit -m "cloverleaf: task <allocated-id>"`.
|
|
47
47
|
|
|
48
|
-
7.
|
|
48
|
+
7. **v0.4 scaffolding:** Ensure baseline and run directories are set up:
|
|
49
|
+
```bash
|
|
50
|
+
# v0.4 scaffolding additions — baselines tracked, runs ephemeral
|
|
51
|
+
mkdir -p <repo_root>/.cloverleaf/baselines
|
|
52
|
+
mkdir -p <repo_root>/.cloverleaf/runs
|
|
53
|
+
|
|
54
|
+
# Ensure .gitignore excludes runs/ (baselines ARE tracked, only runs is ephemeral)
|
|
55
|
+
if ! grep -qE '^\.cloverleaf/runs/?$' <repo_root>/.gitignore 2>/dev/null; then
|
|
56
|
+
echo '.cloverleaf/runs/' >> <repo_root>/.gitignore
|
|
57
|
+
fi
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
8. Report:
|
|
49
61
|
- "Created `<allocated-id>` at `.cloverleaf/tasks/<allocated-id>.json`."
|
|
50
62
|
- Show the generated acceptance criteria.
|
|
51
63
|
- Suggest: "Review and edit the task if needed, then run `/cloverleaf-run <allocated-id>`."
|
|
@@ -62,3 +74,8 @@ The user has invoked this skill with a brief. Your job: turn the brief into a st
|
|
|
62
74
|
- After writing the task, report the chosen risk_class and how it was determined, e.g.:
|
|
63
75
|
> "Risk class: `high` → full pipeline (matched keyword `component` in acceptance criterion). Override with `--risk=low` if desired."
|
|
64
76
|
- Users can manually edit `risk_class` in the task JSON before running `/cloverleaf-run`.
|
|
77
|
+
|
|
78
|
+
## v0.4 artifacts
|
|
79
|
+
|
|
80
|
+
- `.cloverleaf/baselines/` is **tracked** in git; baseline PNGs travel with code.
|
|
81
|
+
- `.cloverleaf/runs/` is **gitignored**; each task's run artifacts (diffs, candidate screenshots, QA reports) are ephemeral.
|
|
@@ -19,25 +19,35 @@ description: Run the QA agent on a task in the `qa` state (full pipeline only).
|
|
|
19
19
|
|
|
20
20
|
3. Confirm feature branch exists: `git rev-parse --verify cloverleaf/<TASK-ID>`.
|
|
21
21
|
|
|
22
|
-
4.
|
|
22
|
+
4. Ensure required directories exist:
|
|
23
23
|
```bash
|
|
24
|
-
|
|
24
|
+
mkdir -p <repo_root>/.cloverleaf/runs/<TASK-ID>/qa
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
5. Load QA rules JSON:
|
|
28
|
+
```bash
|
|
29
|
+
# Consumer override takes precedence over the package default.
|
|
30
|
+
if [ -f "<repo_root>/.cloverleaf/config/qa-rules.json" ]; then
|
|
31
|
+
cat "<repo_root>/.cloverleaf/config/qa-rules.json"
|
|
32
|
+
else
|
|
33
|
+
cat ~/.claude/plugins/cloverleaf/config/qa-rules.json
|
|
34
|
+
fi
|
|
25
35
|
```
|
|
26
36
|
Capture for the subagent as `qa_rules`.
|
|
27
37
|
|
|
28
|
-
|
|
38
|
+
6. Compute diff:
|
|
29
39
|
```bash
|
|
30
40
|
git diff main..cloverleaf/<TASK-ID>
|
|
31
41
|
```
|
|
32
42
|
|
|
33
|
-
|
|
43
|
+
7. Dispatch the QA subagent via the Task tool:
|
|
34
44
|
- `subagent_type`: `general-purpose`
|
|
35
45
|
- `model`: `sonnet`
|
|
36
|
-
- Prompt: contents of `~/.claude/plugins/cloverleaf/prompts/qa.md` with substitutions for `{{task}}`, `{{diff}}`, `{{branch}}`, `{{base_branch}}`, `{{repo_root}}`, `{{qa_rules}}` (the JSON loaded in step
|
|
46
|
+
- Prompt: contents of `~/.claude/plugins/cloverleaf/prompts/qa.md` with substitutions for `{{task}}`, `{{diff}}`, `{{branch}}`, `{{base_branch}}`, `{{repo_root}}`, `{{qa_rules}}` (the JSON loaded in step 5).
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
8. Parse response: expect `{"verdict": "pass"|"bounce"|"escalate", "summary", "findings", "results"}`.
|
|
39
49
|
|
|
40
|
-
|
|
50
|
+
9. Branch on verdict:
|
|
41
51
|
|
|
42
52
|
**Pass:**
|
|
43
53
|
```
|
|
@@ -27,12 +27,18 @@ description: Run the UI Reviewer agent on a task in the `ui-review` state (full
|
|
|
27
27
|
|
|
28
28
|
3. Confirm feature branch exists: `git rev-parse --verify cloverleaf/<TASK-ID>`. If missing, report and stop.
|
|
29
29
|
|
|
30
|
-
4.
|
|
30
|
+
4. Ensure required directories exist:
|
|
31
|
+
```bash
|
|
32
|
+
mkdir -p <repo_root>/.cloverleaf/baselines
|
|
33
|
+
mkdir -p <repo_root>/.cloverleaf/runs/<TASK-ID>/ui-review
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
5. Compute affected routes:
|
|
31
37
|
```bash
|
|
32
38
|
AFFECTED=$(~/.claude/plugins/cloverleaf/bin/cloverleaf-cli affected-routes <repo_root> <TASK-ID>)
|
|
33
39
|
```
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
6. **Empty-set early-exit.** If `AFFECTED` is `[]`, skip the subagent entirely:
|
|
36
42
|
```bash
|
|
37
43
|
cloverleaf-cli advance-status <repo_root> <TASK-ID> qa agent '' full_pipeline
|
|
38
44
|
cd <repo_root>
|
|
@@ -42,28 +48,29 @@ description: Run the UI Reviewer agent on a task in the `ui-review` state (full
|
|
|
42
48
|
Report: "✓ UI Review skipped (no renderable routes affected). State → qa. Next: `/cloverleaf-qa <TASK-ID>`."
|
|
43
49
|
Stop here.
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
7. Allocate a free preview port:
|
|
46
52
|
```bash
|
|
47
53
|
PREVIEW_PORT=$(node -e "const net=require('net');const s=net.createServer();s.listen(0,()=>{console.log(s.address().port);s.close()})")
|
|
48
54
|
```
|
|
49
55
|
|
|
50
|
-
|
|
56
|
+
8. Compute diff:
|
|
51
57
|
```bash
|
|
52
58
|
git diff main..cloverleaf/<TASK-ID>
|
|
53
59
|
```
|
|
54
60
|
|
|
55
|
-
|
|
61
|
+
9. **Browser cache env var.** Before the Task-tool dispatch, ensure `PLAYWRIGHT_BROWSERS_PATH=~/.cache/ms-playwright` is exported so the subagent inherits it. This keeps Playwright from re-downloading ~300 MB of browser binaries inside the worktree.
|
|
56
62
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
10. Dispatch the UI Reviewer subagent via the Task tool:
|
|
64
|
+
- `subagent_type`: `general-purpose`
|
|
65
|
+
- `model`: `sonnet`
|
|
66
|
+
- Prompt: contents of `~/.claude/plugins/cloverleaf/prompts/ui-reviewer.md` with substitutions:
|
|
67
|
+
- `{{task}}`, `{{diff}}`, `{{branch}}`, `{{base_branch}}`, `{{repo_root}}`, `{{preview_port}}`
|
|
68
|
+
- `{{affected_routes}}` → the value of `$AFFECTED` (verbatim — may be `"all"`, a JSON array, or `[]` but step 6 handled `[]` already)
|
|
69
|
+
- `{{ui_review_config}}` → JSON-stringified result of `cloverleaf-cli ui-review-config <repo_root>` (used by the subagent to scope viewport sizes, thresholds, and axe rule overrides)
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
11. Parse the subagent's response. Expect `{"verdict": "pass"|"bounce"|"escalate", "summary": "...", "findings": [...]}`.
|
|
65
72
|
|
|
66
|
-
|
|
73
|
+
12. Branch on verdict:
|
|
67
74
|
|
|
68
75
|
**Pass:**
|
|
69
76
|
```
|
|
@@ -89,5 +96,5 @@ description: Run the UI Reviewer agent on a task in the `ui-review` state (full
|
|
|
89
96
|
- Never push.
|
|
90
97
|
- Do not modify source code — UI Reviewer is read-only.
|
|
91
98
|
- Always teardown preview server + worktree on error.
|
|
92
|
-
- Empty-set early-exit (step
|
|
99
|
+
- Empty-set early-exit (step 6) skips the browser entirely — no Playwright invocation, no worktree.
|
|
93
100
|
- On illegal state transition, report and stop without partial commits.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|