Skip to content

Commit c9da5ca

Browse files
committed
docs(AGENTS): updating
1 parent ec7efdb commit c9da5ca

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

AGENTS.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22

33
This file provides guidance to agents when working with code in this repository.
44

5-
- Settings View Pattern: When working on `SettingsView`, inputs must bind to the local `cachedState`, NOT the live `useExtensionState()`. The `cachedState` acts as a buffer for user edits, isolating them from the `ContextProxy` source-of-truth until the user explicitly clicks "Save". Wiring inputs directly to the live state causes race conditions.
5+
## Settings View Pattern
66

7-
## LLM-Assisted Contribution Guidance
7+
- When working on `SettingsView`, inputs must bind to the local `cachedState`, NOT the live `useExtensionState()`. The `cachedState` acts as a buffer for user edits, isolating them from the `ContextProxy` source-of-truth until the user explicitly clicks "Save". Wiring inputs directly to the live state causes race conditions.
88

9-
Before implementing a non-trivial change, decompose it into the smallest independently reviewable slices you can.
9+
## PR Decomposition Guidance
1010

11-
- One independently reviewable unit per PR. A PR should be understandable, testable, and mergeable on its own without the next PR.
12-
- Prefer stacked draft PRs over one large PR when a change naturally builds in layers. Link dependent PRs and keep them small.
11+
Small PRs reduce review latency and keep each change understandable, testable, and mergeable on its own.
12+
13+
- Before coding a non-trivial change, decide whether it should be one PR, stacked PRs, or a smaller first slice.
14+
- Put one independently reviewable unit in each PR.
15+
- Use stacked draft PRs when a change builds in layers. Link dependent PRs and keep each PR small.
1316
- Separate refactors from behavior changes. If a change both restructures code and adds or fixes user-visible behavior, land the preparatory refactor first.
1417
- "Tightly coupled" is not enough reason to bundle everything together. Shared files or runtime coupling do not automatically mean the work belongs in one PR.
15-
- Use this test when deciding whether work must stay together: if PR A can merge without leaving the repository broken or degraded while PR B waits, they should usually be separate PRs.
18+
- If merging PR A without PR B would leave the repository broken or degraded, keep them together; otherwise split them.
1619
- When the decomposition is unclear, pause before coding and propose the split in the issue or in a draft PR.
1720

1821
## Test Placement Guidance

0 commit comments

Comments
 (0)