Skip to content

Commit a072801

Browse files
anandgupta42claude
andcommitted
refactor: cut training_scan and training_validate, simplify docs
Research from 8 independent evaluations + SkillsBench (7,308 test runs) found that compact focused context beats comprehensive docs by 20pp. The training system's value is in correction capture (2-sec saves) and team propagation (git sync) — not in regex scanning or keyword grep. Removed: - training_scan (255 lines) — regex pattern counting, not discovery - training_validate (315 lines) — keyword grep, not validation Simplified: - trainer.txt: removed scan/validate workflows, focused on guided teaching and curation - agent-modes.md: updated trainer section with correction-focused example - training docs: complete rewrite with new pitch: "Correct the agent once. It remembers forever. Your team inherits it." Backed by SkillsBench research showing compact > comprehensive. Net: -753 lines. 152 tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent df67fd6 commit a072801

File tree

9 files changed

+791
-916
lines changed

9 files changed

+791
-916
lines changed

.github/meta/commit.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
feat: merge training into memory with context-aware relevance scoring
2+
3+
Replace two parallel injection systems (memory 8KB + training 16KB)
4+
with a single unified injection that scores blocks by relevance to
5+
the current agent.
6+
7+
How it works:
8+
- All blocks (memory + training) loaded in one pass
9+
- Each block scored: agent tag match (+10), training kind relevance
10+
per agent (+1-5), applied count bonus (+0-3), recency (+0-2),
11+
non-training base (+5)
12+
- Builder sees rules/patterns first; analyst sees glossary/context first
13+
- Budget is 20KB unified, filled greedily by score
14+
- Training blocks still tracked with applied counts (fire-and-forget)
15+
16+
Architecture:
17+
- memory/prompt.ts: new scoreBlock(), unified inject() with InjectionContext
18+
- memory/types.ts: UNIFIED_INJECTION_BUDGET, AGENT_TRAINING_RELEVANCE weights
19+
- session/prompt.ts: single inject call with agent context (was 2 separate)
20+
- training/prompt.ts: deprecated, delegates to MemoryPrompt (backward compat)
21+
22+
No changes to: MemoryStore, TrainingStore, training tools, memory tools.
23+
24+
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

0 commit comments

Comments
 (0)