frontend-visualqa 0.1.0__tar.gz

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.
Files changed (56) hide show
  1. frontend_visualqa-0.1.0/.agents/skills/README.md +11 -0
  2. frontend_visualqa-0.1.0/.agents/skills/frontend-visualqa/SKILL.md +1 -0
  3. frontend_visualqa-0.1.0/.agents/skills/frontend-visualqa/agents/openai.yaml +13 -0
  4. frontend_visualqa-0.1.0/.agents/skills/frontend-visualqa/references/claim-writing.md +55 -0
  5. frontend_visualqa-0.1.0/.agents/skills/frontend-visualqa/references/install.md +62 -0
  6. frontend_visualqa-0.1.0/.agents/skills/frontend-visualqa/references/protocol.md +47 -0
  7. frontend_visualqa-0.1.0/.claude-plugin/marketplace.json +18 -0
  8. frontend_visualqa-0.1.0/.claude-plugin/plugin.json +16 -0
  9. frontend_visualqa-0.1.0/.codex/config.toml +3 -0
  10. frontend_visualqa-0.1.0/.cursor-plugin/marketplace.json +18 -0
  11. frontend_visualqa-0.1.0/.cursor-plugin/plugin.json +16 -0
  12. frontend_visualqa-0.1.0/.github/workflows/publish_to_pypi.yml +28 -0
  13. frontend_visualqa-0.1.0/.gitignore +227 -0
  14. frontend_visualqa-0.1.0/.mcp.json +8 -0
  15. frontend_visualqa-0.1.0/PKG-INFO +387 -0
  16. frontend_visualqa-0.1.0/README.md +362 -0
  17. frontend_visualqa-0.1.0/docs/skill-ecosystem.md +23 -0
  18. frontend_visualqa-0.1.0/examples/benchmarks/readme/index.html +192 -0
  19. frontend_visualqa-0.1.0/examples/benchmarks/readme/settings/index.html +103 -0
  20. frontend_visualqa-0.1.0/examples/benchmarks/readme/signup/index.html +130 -0
  21. frontend_visualqa-0.1.0/examples/benchmarks/readme/tasks/123/index.html +160 -0
  22. frontend_visualqa-0.1.0/examples/benchmarks/readme/tasks/124/index.html +14 -0
  23. frontend_visualqa-0.1.0/examples/benchmarks/readme/tasks/index.html +223 -0
  24. frontend_visualqa-0.1.0/examples/benchmarks/realistic/settings/index.html +233 -0
  25. frontend_visualqa-0.1.0/examples/comprehensive_test.html +988 -0
  26. frontend_visualqa-0.1.0/examples/multi_page_app.html +936 -0
  27. frontend_visualqa-0.1.0/examples/regression_wrong_heading.html +106 -0
  28. frontend_visualqa-0.1.0/examples/regression_wrong_modal_title.html +142 -0
  29. frontend_visualqa-0.1.0/examples/test_page.html +535 -0
  30. frontend_visualqa-0.1.0/package.json +5 -0
  31. frontend_visualqa-0.1.0/pyproject.toml +57 -0
  32. frontend_visualqa-0.1.0/skills/frontend-visualqa/SKILL.md +58 -0
  33. frontend_visualqa-0.1.0/src/frontend_visualqa/__init__.py +49 -0
  34. frontend_visualqa-0.1.0/src/frontend_visualqa/actions.py +872 -0
  35. frontend_visualqa-0.1.0/src/frontend_visualqa/artifacts.py +72 -0
  36. frontend_visualqa-0.1.0/src/frontend_visualqa/browser.py +311 -0
  37. frontend_visualqa-0.1.0/src/frontend_visualqa/claim_verifier.py +774 -0
  38. frontend_visualqa-0.1.0/src/frontend_visualqa/cli.py +337 -0
  39. frontend_visualqa-0.1.0/src/frontend_visualqa/errors.py +19 -0
  40. frontend_visualqa-0.1.0/src/frontend_visualqa/mcp_server.py +242 -0
  41. frontend_visualqa-0.1.0/src/frontend_visualqa/n1_client.py +162 -0
  42. frontend_visualqa-0.1.0/src/frontend_visualqa/prompts.py +96 -0
  43. frontend_visualqa-0.1.0/src/frontend_visualqa/reporters.py +137 -0
  44. frontend_visualqa-0.1.0/src/frontend_visualqa/runner.py +508 -0
  45. frontend_visualqa-0.1.0/src/frontend_visualqa/schemas.py +177 -0
  46. frontend_visualqa-0.1.0/tests/fixtures/ctrf.schema.json +645 -0
  47. frontend_visualqa-0.1.0/tests/test_actions.py +440 -0
  48. frontend_visualqa-0.1.0/tests/test_browser.py +329 -0
  49. frontend_visualqa-0.1.0/tests/test_claim_verifier.py +885 -0
  50. frontend_visualqa-0.1.0/tests/test_cli.py +360 -0
  51. frontend_visualqa-0.1.0/tests/test_live_runner.py +206 -0
  52. frontend_visualqa-0.1.0/tests/test_mcp_server.py +276 -0
  53. frontend_visualqa-0.1.0/tests/test_n1_client.py +142 -0
  54. frontend_visualqa-0.1.0/tests/test_reporters.py +255 -0
  55. frontend_visualqa-0.1.0/tests/test_runner.py +765 -0
  56. frontend_visualqa-0.1.0/uv.lock +1184 -0
@@ -0,0 +1,11 @@
1
+ # Agent skills (Codex / OpenAI compatible clients)
2
+
3
+ The canonical skill lives at `skills/frontend-visualqa/`.
4
+
5
+ `.agents/skills/frontend-visualqa/` is only a compatibility wrapper:
6
+
7
+ - `SKILL.md` is a symlink to the canonical skill body
8
+ - `references/` is a symlink to the canonical support files
9
+ - `agents/` is a symlink to the canonical agent metadata
10
+
11
+ Edit the canonical files under `skills/frontend-visualqa/` so the content does not drift across install paths.
@@ -0,0 +1 @@
1
+ ../../../skills/frontend-visualqa/SKILL.md
@@ -0,0 +1,13 @@
1
+ appearance:
2
+ name: "Frontend Visual QA"
3
+ description: "Claim-based visual QA for local frontends"
4
+
5
+ interface:
6
+ display_name: "Frontend Visual QA"
7
+ description: "Verify local frontend changes with screenshot-backed visual claims"
8
+ brand_color: "#0F766E"
9
+ default_prompt: "Verify a local frontend change with frontend-visualqa"
10
+
11
+ dependencies:
12
+ mcp_servers:
13
+ - frontend-visualqa
@@ -0,0 +1,55 @@
1
+ # Claim Writing
2
+
3
+ Claims should describe one visible fact each.
4
+
5
+ Good claims:
6
+
7
+ - `The modal title reads "Invite teammate"`
8
+ - `The Save button is visible without scrolling`
9
+ - `The selected tab has a blue underline`
10
+ - `At 375px width, the sidebar is replaced by a menu button`
11
+ - `After form submit, a success toast appears in the top right corner`
12
+
13
+ Weak claims:
14
+
15
+ - `The modal works`
16
+ - `The page looks good`
17
+ - `The layout is cleaner now`
18
+ - `The interaction feels smooth`
19
+
20
+ ## Rules
21
+
22
+ 1. Write claims that can be proven from the final screenshot.
23
+ 2. Keep each claim to a single user-visible fact.
24
+ 3. Split compound assertions into separate claims.
25
+ 4. Use exact visible copy for headings, labels, and button text when text matters.
26
+ 5. Always set an explicit viewport when responsive behavior matters.
27
+
28
+ ## Navigation Hints
29
+
30
+ If the page needs interaction before the claim can be judged, keep the claim short and put the setup steps in `navigation_hint`.
31
+
32
+ Good:
33
+
34
+ - Claim: `The delete confirmation dialog is visible`
35
+ - Navigation hint: `Open the first row action menu and click Delete before judging the claim.`
36
+
37
+ Bad:
38
+
39
+ - Claim: `Open the first row action menu, click Delete, and confirm the delete dialog is visible`
40
+
41
+ ## Claim Batching
42
+
43
+ Prefer 1-5 related claims per run.
44
+
45
+ Good batch:
46
+
47
+ - `The modal title reads "Edit Task"`
48
+ - `The Save button is visible without scrolling`
49
+ - `The Cancel button is left of Save`
50
+
51
+ Bad batch:
52
+
53
+ - 20 unrelated claims across multiple pages and viewports
54
+
55
+ Small batches make failures easier to diagnose and keep the agent from conflating unrelated states.
@@ -0,0 +1,62 @@
1
+ # Install And Setup
2
+
3
+ ## Requirements
4
+
5
+ - A running local frontend
6
+ - Yutori API key — run `uvx yutori auth login` or set `YUTORI_API_KEY`
7
+ - Playwright Chromium installed once
8
+
9
+ ## Quick Install
10
+
11
+ Authenticate with Yutori:
12
+
13
+ ```bash
14
+ uvx yutori auth login
15
+ ```
16
+
17
+ MCP server (works with all clients):
18
+
19
+ ```bash
20
+ npx add-mcp -n frontend-visualqa "uvx frontend-visualqa serve"
21
+ ```
22
+
23
+ Skill (cross-agent):
24
+
25
+ ```bash
26
+ npx skills add yutori-ai/frontend-visualqa -g
27
+ ```
28
+
29
+ Restart the agent client after setup.
30
+
31
+ ## CLI Fallback
32
+
33
+ If the MCP server is not installed, the same runner can be used directly:
34
+
35
+ ```bash
36
+ frontend-visualqa screenshot http://localhost:3000
37
+ frontend-visualqa verify http://localhost:3000 --claims "The heading reads Dashboard"
38
+ ```
39
+
40
+ ## Persistent Login
41
+
42
+ For auth-gated apps, populate the persistent browser profile once:
43
+
44
+ ```bash
45
+ frontend-visualqa login http://localhost:3000/login
46
+ ```
47
+
48
+ Subsequent runs can use persistent mode:
49
+
50
+ ```bash
51
+ frontend-visualqa verify http://localhost:3000/dashboard \
52
+ --browser-mode persistent \
53
+ --claims "The user avatar is visible in the header"
54
+ ```
55
+
56
+ ## If Tools Are Missing
57
+
58
+ If the skill is installed but the `frontend-visualqa` tools are unavailable in the current client:
59
+
60
+ 1. Install or register the MCP server.
61
+ 2. Restart the client so it rescans skills and MCP servers.
62
+ 3. Retry with `take_screenshot` before writing claims.
@@ -0,0 +1,47 @@
1
+ # QA Protocol
2
+
3
+ ## Preflight
4
+
5
+ Before running claim verification, confirm:
6
+
7
+ - the local URL is reachable
8
+ - the viewport matches the scenario you care about
9
+ - the page does not require an unavailable login
10
+ - the claims are concrete and short
11
+
12
+ If any of that is unclear, call `take_screenshot` first.
13
+
14
+ ## Recommended Loop
15
+
16
+ 1. Use the app's normal tooling, the browser's current session, or a `navigation_hint` to reach the relevant state.
17
+ 2. Capture a screenshot baseline if route or state is uncertain.
18
+ 3. Run `verify_visual_claims` on a small batch of related claims.
19
+ 4. Read the structured result for each claim.
20
+ 5. Inspect the saved screenshots when a claim fails or is inconclusive.
21
+ 6. Fix the frontend and rerun the same claims.
22
+
23
+ ## Status Meanings
24
+
25
+ - `passed`: visual evidence matched the claim
26
+ - `failed`: the page rendered something different from the claim
27
+ - `inconclusive`: the runner explored but could not determine the claim confidently
28
+ - `not_testable`: the environment blocked verification, usually because the page was unreachable, crashed, or required unavailable auth
29
+
30
+ ## When To Reset Browser State
31
+
32
+ Use `manage_browser` if:
33
+
34
+ - the runner is clearly on the wrong page
35
+ - stale cookies or local storage are affecting the result
36
+ - a previous run left the browser in an unexpected state
37
+ - the viewport needs to be changed without restarting the whole client session
38
+
39
+ For auth-gated flows, prefer persistent mode over repeating manual login on every run.
40
+
41
+ ## Scope Boundaries
42
+
43
+ This skill is for targeted, claim-based visual QA during development. It is not meant to replace:
44
+
45
+ - end-to-end functional coverage
46
+ - CI-wide regression suites
47
+ - open-ended design critique without explicit claims
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "frontend-visualqa-plugins",
3
+ "owner": {
4
+ "name": "Yutori",
5
+ "email": "support@yutori.com"
6
+ },
7
+ "metadata": {
8
+ "description": "Official frontend-visualqa plugin marketplace for Claude Code",
9
+ "version": "1.0.0"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "frontend-visualqa",
14
+ "source": "./",
15
+ "description": "Local visual QA for frontends with Yutori n1 and Playwright"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "frontend-visualqa",
3
+ "version": "1.0.0",
4
+ "description": "Local visual QA for frontends with Yutori n1 and Playwright",
5
+ "author": {
6
+ "name": "Yutori",
7
+ "email": "support@yutori.com",
8
+ "url": "https://yutori.com"
9
+ },
10
+ "homepage": "https://github.com/yutori-ai/frontend-visualqa",
11
+ "repository": "https://github.com/yutori-ai/frontend-visualqa",
12
+ "license": "Apache-2.0",
13
+ "keywords": ["frontend", "visual-qa", "browser", "playwright", "mcp"],
14
+ "skills": "skills",
15
+ "mcpServers": ".mcp.json"
16
+ }
@@ -0,0 +1,3 @@
1
+ [mcp_servers.frontend-visualqa]
2
+ command = "uvx"
3
+ args = [ "frontend-visualqa", "serve" ]
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "frontend-visualqa-plugins",
3
+ "owner": {
4
+ "name": "Yutori",
5
+ "email": "support@yutori.com"
6
+ },
7
+ "metadata": {
8
+ "description": "Official frontend-visualqa plugin marketplace for Cursor",
9
+ "version": "1.0.0"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "frontend-visualqa",
14
+ "source": "./",
15
+ "description": "Local visual QA for frontends with Yutori n1 and Playwright"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "frontend-visualqa",
3
+ "version": "1.0.0",
4
+ "description": "Local visual QA for frontends with Yutori n1 and Playwright",
5
+ "author": {
6
+ "name": "Yutori",
7
+ "email": "support@yutori.com",
8
+ "url": "https://yutori.com"
9
+ },
10
+ "homepage": "https://github.com/yutori-ai/frontend-visualqa",
11
+ "repository": "https://github.com/yutori-ai/frontend-visualqa",
12
+ "license": "Apache-2.0",
13
+ "keywords": ["frontend", "visual-qa", "browser", "playwright", "mcp"],
14
+ "skills": "skills",
15
+ "mcpServers": ".mcp.json"
16
+ }
@@ -0,0 +1,28 @@
1
+ name: Publish frontend-visualqa to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.12"
17
+
18
+ - name: Install build tools
19
+ run: pip install build twine
20
+
21
+ - name: Build package
22
+ run: python -m build
23
+
24
+ - name: Publish to PyPI
25
+ run: twine upload dist/*
26
+ env:
27
+ TWINE_USERNAME: __token__
28
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,227 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+ .DS_Store
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py.cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # UV
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ #uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ #poetry.lock
110
+ #poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ #pdm.lock
117
+ #pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ #pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi
127
+
128
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
129
+ __pypackages__/
130
+
131
+ # Celery stuff
132
+ celerybeat-schedule
133
+ celerybeat.pid
134
+
135
+ # SageMath parsed files
136
+ *.sage.py
137
+
138
+ # Environments
139
+ .env
140
+ .envrc
141
+ .venv
142
+ env/
143
+ venv/
144
+ ENV/
145
+ env.bak/
146
+ venv.bak/
147
+
148
+ # Spyder project settings
149
+ .spyderproject
150
+ .spyproject
151
+
152
+ # Rope project settings
153
+ .ropeproject
154
+
155
+ # mkdocs documentation
156
+ /site
157
+
158
+ # mypy
159
+ .mypy_cache/
160
+ .dmypy.json
161
+ dmypy.json
162
+
163
+ # Pyre type checker
164
+ .pyre/
165
+
166
+ # pytype static type analyzer
167
+ .pytype/
168
+
169
+ # Cython debug symbols
170
+ cython_debug/
171
+
172
+ # PyCharm
173
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
174
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
175
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
176
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
177
+ #.idea/
178
+
179
+ # Abstra
180
+ # Abstra is an AI-powered process automation framework.
181
+ # Ignore directories containing user credentials, local state, and settings.
182
+ # Learn more at https://abstra.io/docs
183
+ .abstra/
184
+
185
+ # Visual Studio Code
186
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
187
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
188
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
189
+ # you could uncomment the following to ignore the entire vscode folder
190
+ # .vscode/
191
+
192
+ # Ruff stuff:
193
+ .ruff_cache/
194
+
195
+ # frontend-visualqa runtime artifacts
196
+ artifacts/
197
+
198
+ # Agent / planning artifacts (internal docs, not shipped)
199
+ agent_artifacts/
200
+
201
+ # Node
202
+ node_modules/
203
+ package-lock.json
204
+
205
+ # Playwright
206
+ /test-results/
207
+ /playwright-report/
208
+ /blob-report/
209
+ /playwright/.cache/
210
+
211
+ # PyPI configuration file
212
+ .pypirc
213
+
214
+ # Cursor
215
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
216
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
217
+ # refer to https://docs.cursor.com/context/ignore-files
218
+ .cursorignore
219
+ .cursorindexingignore
220
+
221
+ # Marimo
222
+ marimo/_static/
223
+ marimo/_lsp/
224
+ __marimo__/
225
+
226
+ # Claude Code
227
+ .claude/
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "frontend-visualqa": {
4
+ "command": "uvx",
5
+ "args": ["frontend-visualqa", "serve"]
6
+ }
7
+ }
8
+ }