一键导入
wpt-gen-maintenance
Instructions on managing dependencies, build tools, project architecture rules, and integrating workflows via the Makefile in WPT-Gen.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Instructions on managing dependencies, build tools, project architecture rules, and integrating workflows via the Makefile in WPT-Gen.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Evaluate a WPT test file against extracted normative requirements from its governing spec. Use when a spec URL is available and conformance to the spec needs to be judged. Pairs with the wpt-evaluator skill, which checks against WPT documentation guidance rather than spec conformance.
Evaluate the quality of a WPT test file against guidance in the upstream WPT documentation. Use when reviewing a generated or submitted test before merge.
Generate Web Platform Tests (WPT) from minimal XML test suggestions. The agent will autonomously determine the test type and implementation details by analyzing existing repository paradigms. Use when the user asks to generate a Web Platform Test based on a test suggestion.
Instructions to manually test the generate workflow of WPT-Gen to verify system integrity.
Best practices for CLI infrastructure, outputs, subprocess management, and templating in WPT-Gen.
Best practices for configuring LLM integrations, concurrent networking, context scraping, and managing prompts in WPT-Gen.
| name | wpt-gen-maintenance |
| description | Instructions on managing dependencies, build tools, project architecture rules, and integrating workflows via the Makefile in WPT-Gen. |
This document outlines standard maintenance procedures, core architectural constraints, and development workflow instructions for the wpt-gen repository.
WPT-Gen uses standard Python packaging tools managed via pyproject.toml.
google-genai, typer) are listed under [project.dependencies].pytest, ruff, mypy) are listed under [project.optional-dependencies].pip install -e ".[dev]". This is conveniently wrapped in make install.The Makefile serves as the primary entry point for all development tasks, ensuring consistency across environments.
make lint-fix: Runs ruff to automatically format code and apply safe fixes. You should run this frequently while coding.make typecheck: Runs mypy against the main package and the tests folder. Ensure zero errors remain.make test: Executes the pytest suite.make check: Run this to quickly execute linting, typechecking, and testing in sequence locally.Before pushing any code or opening a pull request, you MUST run:
make presubmit
This command runs lint-fix, typecheck, and test. If this pipeline fails, your code will fail Continuous Integration.
When authoring or reviewing structural code for WPT-Gen, you MUST strictly adhere to these foundational constraints:
'chrome', 'canary', 'gemini') for business logic routing or configurations. You must define explicit Python Enum classes. For grouping configurations, prefer the use of explicit @dataclass objects over sprawling dictionaries or tuples.# type: ignore comments is strictly banned without an accompanying inline comment providing technical justification for the upstream stub failure.wpt_root or output_dir). You must strictly validate paths before execution using path.resolve().relative_to(wpt_root) to prevent catastrophic ../ traversal sandbox escapes. Reviewers must actively search for read_text or write_text calls that lack preceding .relative_to() constraints.Every file containing source code must include the standard Apache 2.0 copyright and license information header.
Copyright 2026 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Ensure this is present at the top of any newly created .py, .js, .html, or .yml files.
To avoid stale cache issues (especially with pytest or mypy):
make clean: Deletes .pytest_cache, .mypy_cache, .ruff_cache, and all __pycache__ directories. Use this if you encounter strange behavior after branch switches or dependency updates.