Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions perfkitbenchmarker/agents/review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@ rules. If there are no comments to add, grant approval.
- **Parameterize Workload Execution Timings:** Critical execution parameters
(such as warmup time, test duration, or thread counts) should be
configurable flags or spec attributes, not hardcoded dictionary literals.
- **Single-Use Flags:** Mark flags private if used only in one file.
- **Define Single-Use Flags Locally and Privately:** Define flags in the
module where they are used rather than in a shared `flags.py` file, and mark
them private if used only in one file.
- **Avoid Tri-State Booleans:** Default boolean flags and config fields to
`True` or `False` rather than `None` unless distinguishing an unset value
from `False` is strictly required for backward compatibility.
- **Namespace Custom Flags:** Flags must be explicit (e.g.,
`gke_python_benchmark_threads` has the prefix `gke_python_benchmark`). Use
lowercase strings for `DEFINE_enum` values unless matching an established
Expand Down Expand Up @@ -160,7 +165,9 @@ rather than diverging unless there is a strong reason to differ:
- **Functions & Utilities:** Search helper modules (e.g., `vm_util.py`,
`flag_util.py`, `regex_util.py`, `linux_virtual_machine.py`, and nearby
`*_util.py` / `*_helper.py` files) and parent/provider classes for functions
or methods that already perform the same or a similar operation.
or methods that already perform the same or a similar operation. Also check
existing `third_party/py/` libraries (e.g., `treelib`) before
re-implementing generic data structures or parsers from scratch.
- **Benchmarks & Packages:** Search `linux_benchmarks/`,
`windows_benchmarks/`, `linux_packages/`, and `windows_packages/` to check
whether an existing benchmark or package already covers the workload or
Expand Down Expand Up @@ -217,6 +224,10 @@ rather than diverging unless there is a strong reason to differ:
`raise_on_failure=False`, do not wrap calls in redundant
`try ... except Exception` blocks to catch command execution errors;
instead, inspect the returned stderr, returncode, or stdout directly.
- **Keep Shared Helpers Free of Caller-Specific Error Hooks:** Avoid adding
one-off error-ignoring parameters (such as caller-specific marker lists) to
shared command or retry helpers; let the helper raise its standard exception
and handle the special case in the caller.
- **Use Specific Exception Types:** Raise and catch specific PKB error classes
(e.g., `errors.Resource.RetryableGetError`, `errors.Config.InvalidValue`) or
dedicated custom exception types rather than bare `Exception` or overly
Expand All @@ -228,9 +239,10 @@ rather than diverging unless there is a strong reason to differ:

- **No Inline Dependencies:** Do not add inline module imports inside
functions.
- **Factor Literals into Module Constants:** Extract magic strings, repository
URLs (e.g. Git clone URLs), and static file paths into module-level
uppercase constants.
- **Factor Literals into Module Constants:** Extract magic strings, static
lists or tuples (e.g., error markers or allowlists), repository URLs (e.g.
Git clone URLs), and static file paths into module-level uppercase
constants.
- **No Boilerplate No-Op Functions:** Do not define empty or no-op functions
(such as a `Cleanup` function that only executes `del vm`) when no teardown
or resource cleanup is actually performed.
Expand Down
Loading