From 6079726ccef24b51f399eb5a8ef07a9e2ad05e18 Mon Sep 17 00:00:00 2001 From: CsUtil <45512166+cs-util@users.noreply.github.com> Date: Sat, 25 Oct 2025 12:32:51 +0000 Subject: [PATCH 1/3] Refactor AGENTS.md to improve clarity and structure; separate tasks and testing instructions for better guidance --- AGENTS.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 1e13a22..503fa93 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,14 +4,17 @@ - You must follow the instructions in the `AGENTS.md` file while working on your task and regularly review if you are still aligned with these instructions and the spec. - Do not stop until every acceptance criterion is implemented, verified locally and prepared for review. - **Co-locate docs**: every code file must have a matching `*.md` sidecar next to it, that explains the component in detail. The goal of the sidecar is to make purpose, API, invariants, examples and test strategy of the component obvious to agents and humans. - - This is a minimal local first web app (static HTML + modular JS). Prefer tailwind over custom CSS. - Entrypoint: `index.html` (+ static pages in `pages/` if any needed) - The code is composed of small, focused modules in `src/` (`components/`, `utils/`, ..) with colocated tests -- Run `npm test` and `npm outdated` at the start and end of each significant task and weekly at minimum; keep dependencies healthy. Prefer bumping to the `Wanted` version unless blocked by incompatibilities (document any exceptions). Also run `npm audit` to catch security issues even when versions are current +- Do exactly one prioritized task per iteration and work in a TDD approach where possible. +- Before and after any change, run `npm test` +- Run `npm outdated` weekly at minimum; keep dependencies healthy. Prefer bumping to the `Wanted` version unless blocked by incompatibilities (document any exceptions). Also run `npm audit` to catch security issues even when versions are current. - Only change code directly related to the current task; keep diffs small! - Preserve existing comments & docs; add concise, long-lived comments where useful and avoid narrating changes via comments - When external documentation could be consulted, do so to validate your plan makes sense. If you lack a browsing/online search tool, ask the user to run an online search for you (e.g., "Please search for \"x\" and paste back the findings") +- Before adding functionality, search the codebase (e.g., ripgrep) to confirm it's truly absent. If present, prefer refactor over re-implementation. +- After each iteration add a concise update at the end of docs/implementation-progress.md to use it as the memory between iterations for learnings, decisions, planning etc. ## Dependencies & no-build approach to use @@ -36,6 +39,7 @@ Do requirements gathering before implementation - Reduce risks from assumptions (no matter how sure you are) by **proving these assumptions with tests**. Do not throw away the produced tests after you did the validation, because they often serve as useful documentation of a behavior. Make sure their comments explain their purpose. - **TDD by default.** Interfaces emerge from tests. +- When adding/updating tests, keep a brief "why this test matters" comment in the test so future iterations can better decide to modify/keep/remove. ## TDD Loop From 70b90b7f2668823ac41540f5e869e3a992095fd3 Mon Sep 17 00:00:00 2001 From: CsUtil <45512166+cs-util@users.noreply.github.com> Date: Sat, 25 Oct 2025 12:36:24 +0000 Subject: [PATCH 2/3] Consolidate property-based specs note in AGENTS.md for clarity --- AGENTS.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 503fa93..c836534 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,6 +53,5 @@ Do requirements gathering before implementation ## Test layout - Unit specs: `*.test.js` -- Property-based specs: `*.property.test.js` -- Property-based tests are important, don't omit them for any components +- Property-based specs: `*.property.test.js` - Property-based tests are important, don't omit them for any components - Keep tests deterministic and fast; avoid E2E unless asked From d664b76070c773629ba8323931f26f4fc203b9c2 Mon Sep 17 00:00:00 2001 From: CsUtil <45512166+cs-util@users.noreply.github.com> Date: Sat, 25 Oct 2025 14:41:22 +0200 Subject: [PATCH 3/3] Update AGENTS.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index c836534..503fa93 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,5 +53,6 @@ Do requirements gathering before implementation ## Test layout - Unit specs: `*.test.js` -- Property-based specs: `*.property.test.js` - Property-based tests are important, don't omit them for any components +- Property-based specs: `*.property.test.js` +- Property-based tests are important, don't omit them for any components - Keep tests deterministic and fast; avoid E2E unless asked