E2e To Bazel
Testing & Qualitye2e-to-bazelE2e To Bazel is an Agent Skill for testing & quality published in the google/heir repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Converts end-to-end (e2e) test targets or paths to `bazel run` commands for `heir-opt`. Use when you need to convert an e2e test target (where flags are defined in the BUILD file) to a shell command whose flags can be modified for further analysis and debugging.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/google/heir/blob/HEAD/.agents/skills/e2e_to_bazel/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/e2e-to-bazel, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
E2E To Bazel
Overview
This skill guides the agent in using the e2e_to_bazel tool to convert e2e test
targets or paths to executable commands.
Usage
Converting a Test Target or Path
To convert an e2e test target, directory, or source file to a bazel run
command, use the following command recipes:
bazel run //third_party/heir/scripts:e2e_to_bazel -- {target_or_path}
Replace {target_or_path} with the test target (e.g.,
//tests/Examples/lattigo/ckks/mnist:mnist_test), directory, or source file
path.
Gotchas
- Blaze Query Dependency: The tool relies on
bazel queryto extract attributes. This requires a workingblazeenvironment and may be slow for the first run. - Workspace State: It requires that the workspace is in a state where
bazel querycan evaluate the targets. - Source file mapping: If a source file is provided, it searches for
heir_opttargets that depend on it.
Copy this checklist and track progress:
- [ ] Step 1: Identify the e2e test target, directory, or file to convert.
- [ ] Step 2: Run the `e2e_to_bazel` tool on it.
- [ ] Step 3: Inspect the generated command or run it.
- [ ] Step 4: Verify execution results.