generated from coulomb/repo-seed
session-memory: Read-before-Edit reflex + curated pattern (WP-0008)
Acts on the #1 friction finding. T01: added a data-cited Read-before-Edit / re-read-on-stale reflex to AGENTS.md (top error: 'File has not been read yet', 12/27 sessions). T02: captured it as a curated SolutionPattern (sp-problem-file_not_read-edit, approved/distribution_ready) with real resolutions + per-flavor hints, so Distribute proposes it across repos/flavors — closing assess->curate->distribute on a real pattern. Suite 126/126. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
12
AGENTS.md
12
AGENTS.md
@@ -34,6 +34,18 @@ green), and for pipeline changes do a live `ingest → detect → curate` pass a
|
||||
the local store. See `session_memory/README.md` for the full layout and the
|
||||
detect → curate → distribute flow.
|
||||
|
||||
### Editing files — Read before you Edit
|
||||
|
||||
**Read a file (or the region you'll touch) before Edit/Write.** The most common
|
||||
error across our own captured coding sessions was *"File has not been read yet.
|
||||
Read it first before writing to it"* — 12 of 27 real sessions, 8 repos
|
||||
(`docs/ASSESSMENT-infra-friction.md`). Two cheap reflexes eliminate it:
|
||||
|
||||
- **Read → then Edit/Write.** Don't blind-write a file you haven't read this
|
||||
session; the edit tools reject it and the retry wastes a turn.
|
||||
- **On `File has been modified since read`, re-Read then re-Edit.** A stale read
|
||||
means the file changed under you — refresh before retrying, don't loop.
|
||||
|
||||
---
|
||||
|
||||
## State Hub Integration
|
||||
|
||||
Reference in New Issue
Block a user