From eb0ad58920d606f5f58acbe7be882d59b26856dc Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Mon, 12 Oct 2026 21:14:32 -0700 Subject: [PATCH] agents: document test construct comments and rule domain separation Add guidance to testing.md to comment non-obvious test constructs (such as single-branch select() expressions used to test macro select() handling), and document model_decision vs glob triggers and domain separation in rule-creator/SKILL.md. --- .agents/rules/testing.md | 3 +++ .agents/skills/rule-creator/SKILL.md | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.agents/rules/testing.md b/.agents/rules/testing.md index cd56f69105..21a0191aa6 100644 --- a/.agents/rules/testing.md +++ b/.agents/rules/testing.md @@ -41,3 +41,6 @@ Bzlmod with `target_compatible_with = SUPPORTS_BZLMOD` (`//tests/support:support.bzl`). WORKSPACE mode resolves pip dependencies for only the host Python version. +* **Non-Obvious Test Constructs**: Add an inline comment when a test target + uses an intentionally unusual construct (e.g., a `select()` with only + `//conditions:default` to verify macro `select()` handling). diff --git a/.agents/skills/rule-creator/SKILL.md b/.agents/skills/rule-creator/SKILL.md index 34306e79d1..4a6201f80d 100644 --- a/.agents/skills/rule-creator/SKILL.md +++ b/.agents/skills/rule-creator/SKILL.md @@ -32,8 +32,17 @@ trigger: #### Trigger Conditions * `always_on`: The rule is always active and must be followed for all tasks. -* Custom triggers: You can specify other trigger conditions if the rule only - applies in certain contexts. +* `model_decision`: The agent loads the rule based on its `description` when + relevant. Prefer `model_decision` for conceptual, architectural, or + cross-cutting rules (e.g., `pr.md`, `rules_python.md`). +* `glob`: The rule activates when matching files (`globs:`) are accessed. + Use for syntax/formatting rules tied to specific file types. + +### Domain Separation +* Keep language and tool rule files (`starlark.md`, `bzl.md`, `python.md`, + `docs.md`) general to those domains. +* Place `rules_python`-specific Bzlmod, PyPI, and rule API invariants in + `.agents/rules/rules_python.md`. ### Formatting Guidelines * **Line Wrapping:** Wrap all text to 80 columns.