From a203304742e268aed16779f1e6854a6a099bb0e8 Mon Sep 17 00:00:00 2001 From: fkwp Date: Fri, 11 Sep 2026 14:12:42 +0200 Subject: [PATCH] Allow either hand at the commit, and measure continuous redraws MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Committing from the agent rules out running it where there is no git identity, a sandbox included. Either is now fine: commit on the user's word where the setup allows it, or write the message and hand it over. Redrawing continuously is the other addition. A level meter reported a fresh value every animation frame, so its whole menu reconciled sixty times a second, silence included, and nobody noticed until review. A PR that adds anything of the kind now says what it costs, or better, counts the redraws — commits rather than render calls, since React runs a component it then discards. Co-Authored-By: Claude Opus 5 (1M context) --- AGENTS.md | 6 ++++-- docs/agents/testing.md | 2 ++ docs/agents/workflow.md | 12 +++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index be7c327bb..f0a94112c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,8 +16,8 @@ host's page. It is the MatrixRTC reference implementation. `@media`, global `i18next` or the `widget` global — take it from a provider. - The change works standalone, as a widget and as a component. Say what you checked. - Every gate below is green before you push. -- Hand off after the first implementation, before the quality pass. Commit when the - user confirms direction, not before. +- Hand off after the first implementation, before the quality pass. Then commit on + the user's word where the setup allows it, or hand them the message. ## Read before you @@ -48,5 +48,7 @@ pnpm i18n:check - View model + marble tests, thin view, a story per state, an e2e spec. - Any new shared component called out explicitly, with why nothing existing fit. - Template filled for real: what, why, before/after screenshots, repro steps. +- Anything that redraws continuously — an animation frame, a stream — says what it + costs, or better, counts the redraws in a test. - Branch `/`. Plain imperative commit subjects, no prefixes. - Once review starts, fix forward. Never force-push a regeneration over a review. diff --git a/docs/agents/testing.md b/docs/agents/testing.md index 024eabf25..35a9548a8 100644 --- a/docs/agents/testing.md +++ b/docs/agents/testing.md @@ -12,6 +12,8 @@ lines a PR touches. - Reuse the factories in `src/utils/test.ts` — `mockRemoteParticipant`, `mockMatrixRoom`, `mockLivekitRoom`, `MockRTCSession`. Hand-rolled mocks drift. - Snapshots live in `__snapshots__/`; update with `pnpm test -u`. +- How often something redraws is testable: drive the frames and count commits, not + render calls. An effect with no dependency array runs once per commit. - `component/**/*.test.ts` runs in the same jsdom project as `src`. ## Storybook diff --git a/docs/agents/workflow.md b/docs/agents/workflow.md index 9b8f82be9..2170f4a8c 100644 --- a/docs/agents/workflow.md +++ b/docs/agents/workflow.md @@ -39,10 +39,12 @@ Git-ignored. One kebab-case subfolder per task, matching the branch topic: ## Commit and PR readiness -- Commit once the user confirms direction, or asks for one. Not before. -- Before committing, every gate in [AGENTS.md](../../AGENTS.md#gates) is green and - the change is covered at the layers [testing.md](./testing.md) asks for. Read the - diff against [code-style.md](./code-style.md). -- Re-run the whole checklist after any fix. Commit only on green. +- Commit once the user confirms direction, or asks for one. Not before. Where the + setup has no git identity, a sandbox included, write the message to + `commit-msg.txt` and hand it over instead. +- Ready means every gate in [AGENTS.md](../../AGENTS.md#gates) is green and the + change is covered at the layers [testing.md](./testing.md) asks for. Read the diff + against [code-style.md](./code-style.md) first. +- Re-run the whole checklist after any fix. Only on green, either way. - Once a human has started reviewing, fix forward — never force-push a regeneration over a review in progress.