API responses that the frontend consumes (verify the contract end-to-end)
Tasks that are pure backend (DB migrations, config, internal services) do NOT need browser testing.
browser_acceptance Format
Add to any DAG task alongside the CLI acceptance field:
{"browser_acceptance":{"dev_server":"npm run dev","base_url":"http://localhost:3000","tests":[{"name":"Google OAuth button visible and clickable","steps":
[
"Navigate to /login"
,
"Verify a button containing 'Google' is visible"
,
"Click the button"
,
"Verify URL changes to contain '/oauth'"
]
,
"assertions"
:
[
"No console errors on page load"
,
"No failed network requests to /api/* endpoints"
]
}
]
}
}
Rules
Steps are natural language, not selectors. Generated Playwright uses getByRole, getByText, accessibility tree. Never hardcode CSS selectors — this makes tests resilient to UI changes.
Keep tests minimal. 1-3 tests per task, 2-5 steps each. Test the acceptance criteria, not the entire app.
Always include console/network assertions. Even if the UI looks right, runtime errors indicate broken code.
Inherit project defaults from .godag/quality.md if it exists. Only specify per-task overrides.
Quality Bar File (Optional)
If .godag/quality.md exists in the project root, read it during DAG generation for project-wide defaults:
# Quality Bars## Dev Server- Command: `npm run dev`- Port: 3000
- Ready signal: "ready in" or "Local:" in stdout
## Browser Defaults- No console errors on any page
- All /api/* calls return 2xx
- No horizontal overflow at 375px viewport
## Code Quality-`tsc --noEmit` clean
-`npm run lint` clean
When generating browser_acceptance, inherit these defaults. Only add task-specific assertions for behavior unique to that task.
Playwright Script Generation
The orchestrator generates .godag/tests/{task_id}.spec.ts before running. Template:
After Playwright runs, orchestrator spawns a disposable Task-tool subagent to distill results. This keeps verbose JSON + screenshots out of the orchestrator's context.