docs: add 7th review feedback (L-1) to CLAUDE.md
L-1: Phase 3-2 incorrectly lists GetMemoryContext() as a strings.Split optimization target — it doesn't directly call any split helpers after Phase 3-1. GetPlanContext() is the correct target: it calls extractPhaseContent, extractCommandsSection, extractContextSection which all split independently on the same content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e52547f17d
commit
ba1c8a75fa
1 changed files with 35 additions and 0 deletions
35
CLAUDE.md
35
CLAUDE.md
|
|
@ -678,3 +678,38 @@ Phase 0 ──→ Phase 1 ──→ Phase 2 ──→ Phase 3 ──→ Phase 4
|
|||
- Phase 4: **ディスク書き込み削減** (microSD 寿命保護)
|
||||
- Phase 5: 必要に応じて個別判断
|
||||
|
||||
---
|
||||
|
||||
## FEEDBACK — 第7回レビュー (L)
|
||||
|
||||
> レビュー日: 2026-02-24。`pkg/agent/memory.go` の呼び出し経路と Phase 3-2 の対象関数を照合。
|
||||
|
||||
### L-1. Phase 3-2: `GetMemoryContext()` は Split 最適化の対象外、`GetPlanContext()` が抜けている
|
||||
|
||||
**指摘内容**: Phase 3-2 に「`GetMemoryContext()` / `FormatPlanDisplay()` 内で1回 `strings.Split(content, "\n")`」とあるが、`GetMemoryContext()` は `strings.Split` を呼ぶヘルパーを**直接呼ばない**。Split は呼び先の `GetPlanContext()` 等の内部で起きる。Phase 3-2 の対象は `GetMemoryContext()` ではなく `GetPlanContext()` が正しい。
|
||||
|
||||
**各関数から split ヘルパーへの直接呼び出しを確認**:
|
||||
|
||||
```
|
||||
GetMemoryContext() (Phase 3-1 修正後)
|
||||
├─ reActivePlan.MatchString(content) ← regex、split なし
|
||||
├─ reStatus.FindStringSubmatch(content) ← regex、split なし
|
||||
└─ GetPlanContext() / GetInterviewContext() 等 ← 内部で split するが、
|
||||
GetMemoryContext から lines を渡せない
|
||||
(signature 変更が必要になる)
|
||||
|
||||
FormatPlanDisplay()
|
||||
├─ getPlanPhasesFrom(content) ← 内部で extractPhaseContent → Split ✓
|
||||
├─ extractCommandsSection(content) L699 ← extractSection → Split ✓
|
||||
└─ extractContextSection(content) L710 ← extractSection → Split ✓
|
||||
|
||||
GetPlanContext()
|
||||
├─ extractPhaseContent(content, phase) L585 ← Split ✓
|
||||
├─ extractCommandsSection(content) L591 ← Split ✓
|
||||
└─ extractContextSection(content) L598 ← Split ✓
|
||||
```
|
||||
|
||||
`FormatPlanDisplay()` と `GetPlanContext()` はいずれも同じ `content` を受け取り、複数の split ヘルパーを呼ぶ。これらが Phase 3-2 の正しい対象。
|
||||
|
||||
**計画の修正箇所**: Phase 3-2 の対象を `GetMemoryContext()` → `GetPlanContext()` に差し替える。
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue