Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: clarify additive API change and test guidance (#15530)

Valery Meleshkin43ab53a6c3b0
diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md
index 2878e3b787..668485063a 100644
--- a/.agents/AGENTS.md
+++ b/.agents/AGENTS.md
@@ -11,8 +11,12 @@ evaluating, and debugging AI applications.
wire form initial values from loaded data — read
`.agents/skills/frontend-large-feature-architecture/SKILL.md` first. Most
such effects should not exist.
-- For bug fixes, write the failing test first, confirm it fails, then fix the
- bug. If the bug depends on a data shape, pause and ask: can
+- For bug fixes, first write the smallest failing test that proves the reported
+ behavior and confirm it fails against the buggy behavior before changing
+ production code. Add another test only when it exercises a distinct adapter,
+ contract, or execution path. Extend the closest existing test suite; do not
+ create a standalone constant test when an existing feature suite owns the
+ behavior. If the bug depends on a data shape, pause and ask: can
`pnpm run seed` prefill that shape locally? If not, consider extending a
seeder scenario so the bug stays cheaply reproducible
(`packages/shared/scripts/seeder/AGENTS.md`), or note why a seed cannot
diff --git a/.agents/skills/backend-dev-guidelines/SKILL.md b/.agents/skills/backend-dev-guidelines/SKILL.md
index 86cad14f44..a481b0152d 100644
--- a/.agents/skills/backend-dev-guidelines/SKILL.md
+++ b/.agents/skills/backend-dev-guidelines/SKILL.md
@@ -43,6 +43,23 @@ Use this skill for backend and API work across `web/`, `worker/`, and
- Add unit or integration tests in `__tests__/`.
- Access config via `env.mjs`.
+### Existing Endpoint: Additive Field or Filter
+
+Before coding, classify the change as a new endpoint, an additive field/filter
+on an existing endpoint, or a semantic replacement/breaking change.
+
+For an additive field/filter:
+
+- Reuse the canonical predicate. For endpoints that already support field-group
+ selection, reuse their existing field-group/projection path.
+- Preserve the endpoint's existing response contract: use the normal optional
+ partial-row schema and converter path for field-group endpoints; retain the
+ strict response schema and converter path for ordinary endpoints.
+- Do not create API-version-specific field sets, casts, or "must be selected"
+ runtime assertions unless compatibility requires them.
+- Extend examples and contracts; do not replace an existing filter example.
+- Write one test per unique boundary, not one test per file touched.
+
### SDKs: New Public API Endpoint
- Create the route in `pages/api/public/`.
diff --git a/.agents/skills/code-review/SKILL.md b/.agents/skills/code-review/SKILL.md
index 3e01e34bb5..e819628d7f 100644
--- a/.agents/skills/code-review/SKILL.md
+++ b/.agents/skills/code-review/SKILL.md
@@ -33,6 +33,10 @@ Focus on:
- security and tenant-isolation risks
- performance issues with real impact
- missing or weak tests for risky changes
+- Before calling coverage missing, identify the unique regression each proposed
+ test catches. Prefer merging into the closest existing suite. Flag repeated
+ tests of the same predicate across layers unless each proves a distinct
+ transport, projection, or execution boundary.
## Output Expectations