Files
agentic-resources/workplans/AGENTIC-WP-0008-read-before-edit-reflex.md
tegwick 035c7a20d3 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>
2026-06-07 15:27:22 +02:00

57 lines
2.1 KiB
Markdown

---
id: AGENTIC-WP-0008
type: workplan
title: "Act on #1 friction — Read-before-Edit reflex"
domain: helix_forge
repo: agentic-resources
status: finished
owner: codex
topic_slug: helix-forge
created: "2026-06-07"
updated: "2026-06-07"
state_hub_workstream_id: "6aac5cfc-4799-4d07-9537-42a203af2d1b"
---
# Act on #1 Friction — Read-before-Edit Reflex
The error-body mining ([AGENTIC-WP-0006](AGENTIC-WP-0006-error-body-mining.md))
found that the single most common error across real coding sessions is
**`File has not been read yet. Read it first before writing to it.`** — Edit/Write
before Read, in **12 of 27 sessions across 8 repos** — followed by the stale-read
**`File has been modified since read`** (6 sessions). See
[ASSESSMENT-infra-friction.md](../docs/ASSESSMENT-infra-friction.md).
This is the cheapest high-value fix surfaced by the whole analysis: a short
behavioural reflex in the agent instructions. We also capture it as a curated
SolutionPattern so Phase 3 Distribute can propose it to other repos/flavors —
closing the assess → curate → distribute loop by hand for one real pattern.
## Add Read-before-Edit Reflex to Agent Instructions
```task
id: AGENTIC-WP-0008-T01
status: done
priority: high
state_hub_task_id: "549c84c1-5bd8-4ff6-b61d-1c72946b8b8e"
```
Add a concise, data-cited **Read-before-Edit / re-read-on-"modified since read"**
reflex to `AGENTS.md` (and note for `CLAUDE.md`), targeting the #1 and #2 recurring
errors. Keep it short to avoid context bloat (cf. PRD OQ6 — pattern bloat degrades
context budgets).
## Capture as Curated SolutionPattern for Distribute
```task
id: AGENTIC-WP-0008-T02
status: done
priority: medium
state_hub_task_id: "c007baf9-db14-40fa-b944-d1f1a71ea28b"
```
Promote the recurring "file not read" problem into a curated `SolutionPattern` in
the Pattern Catalog with per-flavor `rendering_hints`, so Phase 3 Distribute can
render and propose it across repos/flavors. Links assess → curate → distribute end
to end on a real pattern. After updates, notify the operator to run
`make fix-consistency REPO=agentic-resources`.