From 7c1d382e4ac5a0014adf9b0e34be32911b48dbf2 Mon Sep 17 00:00:00 2001 From: Conductor Adriaan Date: Mon, 19 Oct 2026 21:47:26 +0000 Subject: [PATCH 1/2] Ask agents to weigh script size against edge cases Co-Authored-By: Claude Opus 5.5 (1M context) --- AGENTS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 01bda39..c0b8796 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,9 @@ Before working here, read the shared [Simple Analytics instructions](https://git ## Tracker changes -1. **Minimize shipped bytes.** Keep changes small and reuse existing helpers and variables. Measure minified and gzip byte differences for affected scripts against the target branch using the same build and compression settings. Test proposed optimizations: extracting repeated strings can increase gzip size. +1. **Minimize shipped bytes.** Keep changes small and reuse existing helpers and variables. Measure minified, gzip, and brotli byte differences for affected scripts against the target branch using the same build and compression settings. Test proposed optimizations: extracting repeated strings can increase gzip size. + + The tracker should balance size against edge cases, not handle every edge case. Cover the common browsers and flows; accept small data loss in rare cases, such as old browser versions, unusual event orders, or invalid settings, instead of adding code for them. When a change fixes edge cases, list each part with its minified/gzip/brotli cost and what is lost without it, so each part can be kept or dropped on purpose. 2. **Preserve existing installations.** Unless the user explicitly accepts a behavior change, preserve existing settings and integrations. Check affected combinations against the [customer documentation](https://docs.simpleanalytics.com/), including manual pageviews, query handling, attribution, namespaces, ignored metrics, metadata, and automatic events. Report concrete before/after effects on customer data, event names, and counts, separately from additions that leave existing installations unchanged. From 16d60b7c238697ac4439a5da2467e3547c7c2014 Mon Sep 17 00:00:00 2001 From: Conductor Adriaan Date: Mon, 19 Oct 2026 22:37:46 +0000 Subject: [PATCH 2/2] Stop asking agents to commit generated distributions The Dist section says feature work never commits dist/, which item 6 contradicted. Co-Authored-By: Claude Opus 5.5 (1M context) --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index c0b8796..b0a7374 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,7 +20,7 @@ Before working here, read the shared [Simple Analytics instructions](https://git 5. **Keep collection deliberate.** Honor collection settings and opt-outs. Distinguish query-parameter names from values when checking what is sent. Keep form field values out of automatic form tracking, sanitize automatically reported URLs, and keep extra diagnostic requests such as 404 confirmation opt-in. Make changes to collection defaults explicit for review. -6. **Preserve browser and build compatibility.** Keep visitor-facing output ES5-compatible and respect feature boundaries such as event-free `light.js`. Build affected scripts from source and commit their generated distributions. Review source and build inputs first, using relevant generated output to verify those changes. Keep previously published pinned versions and their SRI bytes unchanged unless explicitly requested. +6. **Preserve browser and build compatibility.** Keep visitor-facing output ES5-compatible and respect feature boundaries such as event-free `light.js`. Build affected scripts from source to verify them, but leave `dist/` out of commits (see Dist). Review source and build inputs first, using relevant generated output to verify those changes. Keep previously published pinned versions and their SRI bytes unchanged unless explicitly requested. ## Validation and review