acaba ai kendi arama agentını yapabilir mi
Claude Code'un Explore agentını engelleyip kendi attention-agent'ımı yaptım. TS-morph ile dosya yollarını buluyor, context kaybı yok.
Son güncelleme
Bu yararlı oldu mu?
Bu yararlı oldu mu?
# PreToolUse Hook: Explore yerine attention-agent kullan
Ne zaman: Task tool subagent_type="Explore"
Aksiyon: Context inject et
"Explore kapalı. attention-agent + ts-morph kullan.
Workflow:
1. Sen (main) → attention-agent'a nereye bakacağını sor
2. Attention-agent → /tmp/attention-discover-{domain}-{keyword}-{uid}.ts yaz
3. Bun ile çalıştır
4. Sen (main) → yolları oku + karar ver
Sonuç: Context kaybı yok"---
name: attention-agent
description: Proje içinde dosya yollarını bulur (içerik değil)
tools: Write, Bash(bun)
model: haiku
---
# KURAL: Sadece yolları döndür
Protokol:
1. Task → domain keyword
2. /tmp/attention-discover-{domain}-{keyword}-{uid}.ts yaz
3. TS-morph: Imports, Importers, Exports, Identifiers
4. Bun ile çalıştır
5. Yolları döndür
Template:
```typescript
import { Project } from 'ts-morph'
const project = new Project({ tsConfigFilePath: './tsconfig.json' })
const keyword = 'KEYWORD'
const files = project.getSourceFiles()
.filter(f => f.getFullText().includes(keyword))
console.log(JSON.stringify(
files.map(f => ({
path: f.getFilePath(),
functions: f.getFunctions().map(fn => fn.getName()),
imports: f.getImportDeclarations().map(i => i.getModuleSpecifierValue())
})), null, 2
))Sen: "Telegram handler nerede?"
↓
Main Agent: Explore kullanmayı deniyor
↓
PreToolUse Hook: Explore'u engelliyor
↓
Main Agent: attention-agent'ı çağırıyor
↓
Attention-Agent:
- /tmp/attention-discover-messaging-telegram-{uid}.ts yazar
- Bun ile çalıştırır
- Yolları döndürür
↓
Main Agent: yolları okur → karar verir