ContextStream MCP Server
resmiOturumlar arasında AI kodlama asistanları için kalıcı bellek ve anlamsal arama
Dokümantasyon
Docs · Bölümlere göz at
01 · Kurulum sihirbazı
Tek komut, tam yapılandırma.
Kimlik doğrulama (tarayıcı/cihaz girişi), bir API anahtarı oluşturma, kurallar üretme ve aracınız için doğru MCP yapılandırmasını yazma (VS Code'un servers şeması dahil) işlemlerini tek bir komutla gerçekleştirin.
terminal · terminal · macOS / Linux
curl -fsSL https://contextstream.io/scripts/mcp.sh | bash
terminal · powershell · Windows
irm https://contextstream.io/scripts/mcp.ps1 | iex
Zaten kurulu mu? Kurulum sihirbazını yeniden çalıştırın
terminal · terminal · yeniden çalıştır
contextstream-mcp setup
Ne yapar: MCP yapılandırmasını yazar (VS Code servers, Cursor/Cline/vb mcpServers), kurallar üretir (Standart/Gelişmiş) ve projeleri bir çalışma alanına bağlayabilir.
Birleştirilmiş araç seti: Sihirbaz varsayılan olarak 11 birleştirilmiş alan aracı yapılandırır (%75 token azaltımı). İsteğe bağlı: router modu (~2 meta-araç, en kompakt). Bkz. tam araç kataloğu.
Dosyaları yazmadan değişiklikleri önizleyin: contextstream-mcp setup --dry-run
Ekip iş akışları
Paylaşılan bellek, beceriler ve bağlam yüzeye çıkarma.
Ekip hesapları, paylaşılan projelerden daha fazlasını sunar. contextstream-mcp setup sırasında sihirbaz ekip yeteneğini algılar ve çalışma alanı ipuçlarını gösterir. Düzenleyicinizde her session(action="context") çağrısı ekip önerileri, yönetişim ipuçları, öncelik sinyalleri ve bağlantılı yapıtlar içerebilir.
Paylaşılan çalışma alanını seçin
Dizinleme, kararlar ve biletlerin uyumlu kalması için kurulum sırasında her depoyu ekip çalışma alanına bağlayın.
Ekip becerilerini paylaşın
skill(action="share", scope="team"), session(action="context") içinde ekip arkadaşlarının otomatik olarak eşleştireceği yeniden kullanılabilir iş akışlarını yayınlar.
Yürütme kapsamını değiştirin
Çift bağlamlı hesaplar, MCP'de --account-mode=team|personal|auto veya session set_account_mode kullanır.
İşleri varlıklarla takip edin
Biletler, devirler, olaylar ve sürümler, oturumlar ve ekip arkadaşları arasında kalıcı olan dizinlenmiş referanslar kullanır.
Barındırılan uzak varsayılandır. Yerel ikili MCP yalnızca kurtarma amaçlıdır — açıkça gerektiğinde CONTEXTSTREAM_ALLOW_LOCAL_MCP=1 ayarlayın. Davet/roller için ekip kurulumu ve giriş sonrası kontrol listesi bölümlerine bakın.
CLI kısayolları
Etkileşimsiz komutlar (CI ve yenileme).
Bunları etkileşimli sihirbaz olmadan çalıştırın — yükseltmeler, ekip katılımı, kimlik bilgisi rotasyonu veya çalışma alanı değişikliklerinden sonra idealdir. Ayrıca contextstream-mcp --help içinde gösterilir.
| Komut | Ne zaman kullanılır |
|---|---|
| contextstream-mcp update-hooks --scope=global | Yükseltme sonrası veya bir ekip çalışma alanına katıldıktan sonra — PreToolUse/UserPromptSubmit kancalarını yenileyin. |
| contextstream-mcp update-rules --scope=all | En son ekip iş akışı rehberliğiyle .cursorrules / CLAUDE.md / AGENTS.md dosyalarını yeniden oluşturun. |
| contextstream-mcp update-configs --scope=global | API anahtarı veya çalışma alanı değişikliklerinden sonra MCP yapılandırmalarını yeniden yazın. |
| contextstream-mcp migrate-remote --scope=all | Eski yerel stdio yapılandırmalarını barındırılan uzak aktarıma dönüştürün. |
| contextstream-mcp detect-editors --format=json | Hangi düzenleyicilerin kurulu olduğunu betikleyin (önyükleme/CI). |
| contextstream-mcp generate-configs --transport=remote --preauth | Dosyaları yazmadan JSON yapılandırma yüklerini yayın. |
| contextstream-mcp configure --transcripts=on --scope=all | Transkript yakalama varsayılanlarını etkileşimsiz olarak ayarlayın. |
terminal · hesap modu · ekip vs kişisel
# Default: follow account (auto)
contextstream-mcp --account-mode=auto
# Force team-scoped reads/writes
contextstream-mcp --account-mode=team
# Or set once in shell profile:
export CONTEXTSTREAM_ACCOUNT_MODE=team
02 · Manuel yapılandırma
İstemci başına yapılandırmalar.
Her istemci için doğru biçimi kullanın (VS Code servers kullanır; diğer birçok istemci mcpServers kullanır).
Birleştirilmiş araç seti: Sunucu varsayılan olarak ~11 birleştirilmiş alan aracı sunar (eski ayrıntılı araçlara kıyasla ~%75 token azaltımı). Daha da az araç için, ~2 yönlendirici meta-aracı için env bloğuna "CONTEXTSTREAM_PROGRESSIVE_MODE": "true" ekleyin. Bkz. tam araç kataloğu.
Aracınıza atlayın
Cursor / VS CodeWindsurfCodex CLIOpenCode CLIClaude CodeClaude DesktopClineKilo CodeRoo CodeAntigravity
MCP nedir?
Yapay zeka için açık bir protokol.
Model Bağlam Protokolü (MCP), yapay zeka asistanlarının harici araçlara ve veri kaynaklarına bağlanmasına olanak tanıyan açık bir standarttır. ContextStream'in MCP sunucusu ile yapay zeka araçlarınız şunları yapabilir:
- Konuşmaları ve kararları oturumlar arasında hatırlayabilir
- Kod tabanınızı ve dokümantasyonunuzu anlamsal olarak arayabilir
- Bilgi grafikleri oluşturabilir ve sorgulayabilir
- Farklı yapay zeka araçları arasında bağlam paylaşabilir
Doğal dil
Sadece sorun. Araçları yapay zeka halleder.
Araç adlarını ezberlemenize veya onları doğrudan çağırmanıza gerek yok. Sadece ne istediğinizi düz bir İngilizce ile tanımlayın, yapay zeka asistanınız doğru araçları otomatik olarak kullanacaktır.
Doğal bir şekilde sorun
- · "oturum özeti"
- · "kimlik doğrulama hakkında ne karar verdik?"
- · "PostgreSQL kullandığımızı unutma"
- · "ödeme kodunu ara"
Gerisini yapay zeka halleder
- · İlgili bağlamı otomatik olarak bulur
- · Gerektiğinde geçmiş kararları hatırlar
- · Önemli bilgileri belleğe kaydeder
- · Kod ve dokümantasyonu arar
Örnek · "oturum özeti"

Yapay zeka niyetinizi anlar ve perde arkasında uygun ContextStream araçlarını çağırır.
Ön koşullar
İhtiyacınız olanlar.
- Bir ContextStream hesabı (kurulum sihirbazı tarayıcı girişi ile bir API anahtarı oluşturabilir).
Bağlamı zenginleştirin
GitHub + Slack entegrasyonları
MCP, yapay zekanıza kalıcı bellek sağlar. GitHub ve Slack'i bağlamak bu belleği çok daha zengin hale getirir — yapay zekanız soruları yanıtlarken PR'lara, konulara ve ekip tartışmalarına otomatik olarak başvurabilir.
Otomatik bağlam zenginleştirme
context_smart veya session_smart_search çağırdığınızda, ilgili GitHub konuları, PR'lar ve Slack tartışmaları otomatik olarak dahil edilir. Ekstra araca gerek yok.
GitHubSync konuları, PR'ları, sürümleri ve yorumları. Kararlar tartışmalardan otomatik olarak çıkarılır.SlackSync kanalları ve konu başlıkları. Yüksek etkileşimli konuşmalar puanlanır ve önceliklendirilir.
Örnek istemler
- · "Kimlik doğrulama hakkında ne karar verdik?" — GitHub konuları + Slack konu başlıklarından kararları bulur
- · "Ödeme sistemiyle ilgili son etkinliği göster" — PR'ları, konuları ve ekip tartışmalarını gösterir
- · "Son kesintiden hangi dersleri çıkardık?" — Slack ve GitHub'dan içgörüleri getirir
- · "Bana haftalık bir GitHub etkinlik özeti ver" —
integration(provider="github", action="summary", ...)kullanır - · "Veritabanı taşıma tartışmaları için tüm entegrasyonlarda ara" —
integration(provider="all", action="search", ...)kullanır - · "Tüm kaynaklardan haftalık bir ekip özeti ver" —
integration(provider="all", action="summary", ...)kullanır
Entegrasyon aracı eylemleri hızlı başvuru
integration(provider="github|slack|all", action="...") kullanın
GitHub (provider="github")
action="stats"— İstatistikler ve senkronizasyon durumuaction="search"— Durum/zaman aralığı filtreleriyle aramaaction="activity"— Etkinlik akışı (gün filtresi)action="knowledge"— Çıkarılan kararlar/dersleraction="summary"— Haftalık/aylık özetaction="repos"— Senkronize edilen depoları listeleaction="issues"— Konuları/PR'ları listele
Slack (provider="slack")
action="stats"— İstatistikler ve senkronizasyon durumuaction="search"— Kanal/zaman aralığı filtreleriyle aramaaction="discussions"— Yüksek etkileşimli konu başlıklarıaction="knowledge"— Çıkarılan kararlar/dersleraction="summary"— Haftalık/aylık özetaction="channels"— Senkronize edilen kanalları listele
Çapraz kaynak (provider="all")
action="status"— Bağlı tüm entegrasyonların senkronizasyon durumunu ve sağlığını kontrol etaction="search"— Tek bir sorguda bağlı tüm entegrasyonlarda araaction="summary"— Tüm kaynaklardan birleşik etkinlik özeti (gün filtresi)action="knowledge"— Tüm kaynaklardan kararları, dersleri ve içgörüleri al
İstemci · Cursor / VS Code
Cursor / VS Code
Cursor ve VS Code farklı MCP yapılandırma şemaları kullanır. Cursor hala yerel bir MCP süreci kullanır, ancak VS Code/Copilot artık barındırılan ContextStream MCP'yi doğrudan HTTP üzerinden kullanabilir.
terminal · .cursor/mcp.json (proje) veya ~/.cursor/mcp.json (genel)
{
"mcpServers": {
"contextstream": {
"command": "contextstream-mcp",
"env": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
VS Code / Copilot için önerilir: tek tıklamayla uzak kurulum
Barındırılan ContextStream MCP'yi kurun ve VS Code'un ilk kullanımda OAuth'u yönetmesine izin verin. .vscode/mcp.json içinde yerel ikili veya API anahtarı bulunması gerekmez.
VS Code'da KurVS Code MCP Belgeleri
terminal · .vscode/mcp.json (VS Code yerel MCP, uzak)
{
"servers": {
"contextstream": {
"type": "http",
"url": "https://mcp.contextstream.io/mcp?default_context_mode=fast"
}
}
}
Komut satırını mı tercih edersiniz? code --add-mcp ile uzak sunucuyu ekleyin
terminal · terminal
code --add-mcp '{"name":"contextstream","type":"http","url":"https://mcp.contextstream.io/mcp?default_context_mode=fast"}'
İlk kullanımda VS Code, ContextStream'e yetki vermek için sizi yönlendirmeli ve ardından kurulumu otomatik olarak tamamlamalıdır.
Kendi kendine mi barındırıyorsunuz? Aynı uzak yapılandırmayı https://mcp.contextstream.io/mcp?default_context_mode=fast yerine kendi MCP ağ geçidi URL'nize yönlendirin.
İstemci · OpenCode CLI
OpenCode CLI
ContextStream'i OpenCode CLI ile kullanmak için, MCP sunucu yapılandırmasını ~/.config/opencode/opencode.json dosyanıza (veya proje kökünüzdeki opencode.json) ekleyin:
terminal · ~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"contextstream": {
"type": "local",
"command": ["contextstream-mcp"],
"enabled": true,
"environment": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
Yapılandırmayı düzenledikten sonra, ContextStream MCP sunucusunu yükleyebilmesi için OpenCode'u yeniden başlatın.
İstemci · Codex CLI
Codex CLI
ContextStream'i Codex CLI ile kullanmak için, MCP sunucu yapılandırmasını ~/.codex/config.toml dosyanıza ekleyin:
terminal · ~/.codex/config.toml
[mcp_servers.contextstream]
command = "contextstream-mcp"
args = []
[mcp_servers.contextstream.env]
CONTEXTSTREAM_API_URL = "https://api.contextstream.io"
CONTEXTSTREAM_API_KEY = "your_api_key"
Yapılandırmayı düzenledikten sonra, ContextStream MCP sunucusunu yükleyebilmesi için Codex'i yeniden başlatın.
İstemci · Claude Code
Claude Code (CLI)
Proje dizininizden bu komutu çalıştırarak ContextStream'i Claude Code'a ekleyin:
terminal · terminal
claude mcp add --transport stdio contextstream --env CONTEXTSTREAM_API_URL=https://api.contextstream.io --env CONTEXTSTREAM_API_KEY=your_api_key -- contextstream-mcp
Windows uyarısı (WSL değil, yerel Windows): -- sonrasında cmd /c contextstream-mcp kullanın.
Alternatif: add-json (stdio)
terminal · terminal · add-json
claude mcp add-json contextstream \
'{"type":"stdio","command":"contextstream-mcp","args":[],"env":{"CONTEXTSTREAM_API_URL":"https://api.contextstream.io","CONTEXTSTREAM_API_KEY":"your_api_key"}}'
İpucu: ekip kurulumları için, anahtarları kabuk geçmişine gömmek yerine, commit'lenmiş bir .mcp.json dosyasını (proje kapsamı) tercih edin.
Bu, ContextStream'i projenizin yolu altındaki ~/.claude.json dosyasına ekleyerek, o dizinde çalışırken kullanılabilir hale getirir.
MCP kapsam seçenekleri
- · Yerel (varsayılan): Size özel, yalnızca mevcut proje → proje yolu altındaki
~/.claude.jsoniçinde saklanır. - · Kullanıcı (
--scope user): Size özel, tüm projeler → genel olarak~/.claude.jsoniçinde saklanır. - · Proje (
--scope project): Ekip ile paylaşılır → proje kökündeki.mcp.jsoniçinde saklanır (git'e commit'leyin).
Ekip paylaşımı için, git'e commit'lenebilecek bir .mcp.json dosyası oluşturmak üzere proje kapsamını kullanın:
terminal · .mcp.json (proje kapsamı)
{
"mcpServers": {
"contextstream": {
"command": "contextstream-mcp",
"env": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
MCP sunucusunu ekledikten sonra, değişikliklerin etkili olması için Claude Code'u yeniden başlatın. Sunucunun claude mcp list ile yüklendiğini doğrulayın. .mcp.json kaynaklı proje kapsamlı sunucular için, Claude Code ilk kullanımda onay isteyecektir.
İstemci · Claude Desktop
Claude Desktop (GUI uygulaması)
ContextStream'i Claude Desktop uygulamasına ekleyin:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
terminal · claude_desktop_config.json
{
"mcpServers": {
"contextstream": {
"command": "contextstream-mcp",
"env": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
Yapılandırmayı düzenledikten sonra, değişikliklerin etkili olması için Claude Desktop'ı kapatıp yeniden başlatın.
İstemci · Windsurf
Windsurf
Genel MCP yapılandırma dosyasını düzenleyerek ContextStream'i Windsurf'e ekleyin:
Yapılandırma: ~/.codeium/windsurf/mcp_config.json
terminal · ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"contextstream": {
"command": "contextstream-mcp",
"env": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
Kural dosyaları
- · Genel:
~/.codeium/windsurf/memories/global_rules.md - · Proje:
.windsurf/rules/contextstream.md
Windsurf, ContextStream kurallarının otomatik olarak uygulanması için kancaları destekler. Yapılandırmayı düzenledikten sonra, değişikliklerin etkili olması için Windsurf'u yeniden başlatın.
İstemci · Cline
Cline
ContextStream'i Cline MCP yapılandırmanıza ekleyin. Cline'daki MCP Sunucuları simgesine tıklayın, "Yapılandır" sekmesini seçin, ardından düzenlemek için "MCP Sunucularını Yapılandır"a tıklayın:
terminal · cline_mcp_settings.json
{
"mcpServers": {
"contextstream": {
"command": "contextstream-mcp",
"env": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
Yapılandırmayı düzenledikten sonra, değişikliklerin etkili olması için Cline'ı yeniden başlatın. Belirli araçları otomatik onaylamak için alwaysAllow'i de kullanabilirsiniz.
İstemci · Kilo Code
Kilo Code
ContextStream'i Kilo Code MCP yapılandırmanıza ekleyin. MCP sunucularını genel olarak veya proje bazında yapılandırabilirsiniz:
Genel: Ayarlar → MCP Sunucuları → Yüklü → Genel MCP'yi Düzenle'ye tıklayarak mcp_settings.json'i açın
Proje: Proje kökünüzdeki .kilocode/mcp.json
terminal · .kilocode/mcp.json (veya mcp_settings.json)
{
"mcpServers": {
"contextstream": {
"command": "contextstream-mcp",
"env": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
Proje düzeyindeki yapılandırmalar genel yapılandırmalara göre önceliklidir. Düzenledikten sonra Kilo Code'u yeniden başlatın.
İstemci · Roo Code
Roo Code
ContextStream'i Roo Code MCP yapılandırmanıza ekleyin. MCP sunucularını genel olarak veya proje bazında yapılandırabilirsiniz:
Genel: Ayarlar simgesine tıklayın → Genel MCP'yi Düzenle'ye tıklayarak mcp_settings.json'i açın
Proje: Proje kökünüzdeki .roo/mcp.json
terminal · .roo/mcp.json (veya mcp_settings.json)
{
"mcpServers": {
"contextstream": {
"command": "contextstream-mcp",
"env": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
Proje düzeyindeki yapılandırmalar genel yapılandırmalara göre önceliklidir. Düzenledikten sonra Roo Code'u yeniden başlatın.
İstemci · Antigravity
Antigravity (Google)
Antigravity, Cursor/Claude Desktop ile aynı formatta proje kapsamlı .mcp.json dosyalarını kullanır:
terminal · .mcp.json (proje kökü)
{
"mcpServers": {
"contextstream": {
"command": "contextstream-mcp",
"env": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
Windows kullanıcıları: cmd sarmalayıcısını kullanın
terminal · .mcp.json (Windows)
{
"mcpServers": {
"contextstream": {
"command": "cmd",
"args": ["/c", "contextstream-mcp"],
"env": {
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
"CONTEXTSTREAM_API_KEY": "your_api_key"
}
}
}
}
Kural dosyaları
- · Genel:
~/.gemini/GEMINI.md - · Çalışma Alanı:
.agent/rules/contextstream.md
Yapılandırmanızı doğrulamak için "..." menüsü → "MCP Sunucuları" → "Ham yapılandırmayı görüntüle" yoluyla erişin. Düzenledikten sonra Antigravity'i yeniden başlatın.
Editör kuralları
Otomatik ContextStream kullanımını iyileştirme
Önerilen
ContextStream'in otomatik bağlam özelliği, herhangi bir ContextStream aracı kullandığınızda çalışma alanı bağlamını otomatik olarak yükler. Ancak, yapay zeka asistanları her zaman proaktif olarak kararları kaydetmeyebilir veya geçmiş bağlamı hatırlamayabilir. Editör yapay zeka kuralları eklemek tutarlılığı artırır ve yapay zekanın konuşmalarınız boyunca kararları, tercihleri ve önemli bağlamı otomatik olarak yakalamasını sağlar.
Kritik: MCP araç adlandırma kuralları
Farklı yapay zeka araçları, MCP araçları için farklı adlandırma kuralları kullanır. Yanlış biçimi kullanmak araçların bulunamamasına neden olur.
| Yapay zeka aracı | Biçim | Örnek |
|---|---|---|
| Claude Code | mcp____ | mcp__contextstream__session_init |
| Codex CLI / OpenCode CLI | (ham ad) | session_init |
| Cursor / Windsurf / Cline | (ham ad) | session_init |
| Kilo Code / Roo Code | (ham ad) | session_init |
Özet: Yalnızca Claude Code mcp__contextstream__ önekini kullanır. Diğer tüm araçlar ham araç adlarını kullanır.
ContextStream kurallarını iki düzeyde ekleyebilirsiniz: Genel (tüm projelere uygulanır) veya Proje (bir projeye uygulanır).
Genel kurallar (tüm projeler)
Bunları bir kez ekleyin ve her projeye otomatik olarak uygulanır:
| Editör | Genel kurallar konumu |
|---|---|
| Cursor | Ayarlar → Genel → Yapay Zeka Kuralları |
| Windsurf | ~/.codeium/windsurf/memories/global_rules.md |
| Cline | ~/Documents/Cline/Rules/ |
| Kilo Code | ~/.kilocode/rules/ |
| Roo Code | ~/.roo/rules/ |
| Claude Code | ~/.claude/CLAUDE.md |
| Codex CLI | ~/.codex/AGENTS.md (genel) veya üst klasör (örn. ~/dev/AGENTS.md) |
| OpenCode CLI | ~/.config/opencode/AGENTS.md |
Proje kuralları (tek proje)
Bunları belirli bir projeye ekleyin. Cursor klasör tabanlı kurallar için, kuralların her zaman etkin olması için etkinleştirme modunu "Her Zaman Açık" olarak ayarlayın.
| Editör | Proje kuralları konumu |
|---|---|
| Cursor | .cursorrules veya .cursor/rules/*.mdc |
| Windsurf | .windsurf/rules/contextstream.md |
| Cline | .clinerules dosyası veya .clinerules/ klasörü |
| Kilo Code | .kilocode/rules/ |
| Roo Code | .roo/rules/contextstream.md veya .roo/rules/ klasörü |
| Claude Code | Proje kökünde CLAUDE.md |
| Codex CLI | Proje kökünde AGENTS.md |
| OpenCode CLI | Proje kökünde AGENTS.md |
| Aider | Proje kökünde .aider.conf.yml |
Etkinleştirme modları (Cursor, Kilo Code ve Roo Code)
Klasör tabanlı kurallar (örn. .cursor/rules/) kullanırken, her kural dosyasının bir etkinleştirme modu vardır:
- Her Zaman Açık — Her zaman etkindir (ContextStream için önerilir)
- Manuel — Yalnızca kuralı @bahsettiğinizde
- Model Kararı — Yapay zeka açıklamaya göre karar verir
- Glob — Eşleşen dosya desenleri için etkindir
Genel kurallar ve kök düzeyindeki dosyalar (.cursorrules) her zaman etkindir.
Kurulum sihirbazını mı tercih edersiniz? Önce onu çalıştırın. Aksi takdirde, bu standart kuralları manuel olarak ekleyin. Her editör için örnekler:
Claude Code
Proje kökünüzde bir CLAUDE.md dosyası oluşturun veya genel ~/.claude/CLAUDE.md dosyanıza ekleyin:
terminal · CLAUDE.md (Standart)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `mcp__contextstream__search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `mcp__contextstream__context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x (Hooks Enforced)
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
### Required Every Message
| Action | Tool Call |
|--------|-----------|
| **1st message** | `mcp__contextstream__session_init(folder_path="<cwd>", context_hint="<msg>")` then `mcp__contextstream__context_smart(...)` |
| **2nd+ messages** | `mcp__contextstream__context_smart(user_message="<msg>", format="minified", max_tokens=400)` |
| **Code search** | `mcp__contextstream__search(mode="hybrid", query="...")` — BEFORE any local tools |
| **Save decisions** | `mcp__contextstream__session(action="capture", event_type="decision", ...)` |
### Search Modes
| Mode | Use Case |
|------|----------|
| `hybrid` | General code mcp__contextstream__search (default) |
| `keyword` | Exact symbol/string match |
| `exhaustive` | Find ALL matches (grep-like) |
| `semantic` | Conceptual questions |
### Why ContextStream First?
❌ **WRONG:** `Grep → Read → Read → Read` (4+ tool calls, slow)
✅ **CORRECT:** `mcp__contextstream__search(mode="hybrid")` (1 call, returns context)
ContextStream search is **indexed** and returns semantic matches + context in ONE call.
### Quick Reference
| Tool | Example |
|------|---------|
| `search` | `mcp__contextstream__search(mode="hybrid", query="auth", limit=3)` |
| `session` | `mcp__contextstream__session(action="capture", event_type="decision", title="...", content="...")` |
| `memory` | `mcp__contextstream__memory(action="list_events", limit=10)` |
| `graph` | `mcp__contextstream__graph(action="dependencies", file_path="...")` |
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `mcp__contextstream__session(action="get_lessons", query="<topic>")`
- On mistakes: `mcp__contextstream__session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
### Plans & Tasks
When user asks for a plan, use ContextStream (not EnterPlanMode):
1. `mcp__contextstream__session(action="capture_plan", title="...", steps=[...])`
2. `mcp__contextstream__memory(action="create_task", title="...", plan_id="<id>")`
Full docs: https://contextstream.io/docs/mcp/tools
Gelişmiş kuralları göster (ayrıntılı)
terminal · CLAUDE.md (Gelişmiş)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `mcp__contextstream__search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `mcp__contextstream__context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x Integration (Enhanced)
You have access to ContextStream MCP tools for persistent memory and context.
v0.4.x uses **~11 consolidated domain tools** for ~75% token reduction vs previous versions.
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
## TL;DR - REQUIRED EVERY MESSAGE
| Message | What to Call |
|---------|--------------|
| **1st message** | `mcp__contextstream__session_init(folder_path="...", context_hint="<user's message>")`, then `mcp__contextstream__context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **2nd+ messages** | `mcp__contextstream__context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **🔍 ANY code search** | `mcp__contextstream__search(mode="hybrid", query="...")` — ALWAYS before Glob/Grep/Search/Read |
| **Before risky/non-trivial work** | `mcp__contextstream__session(action="get_lessons", query="<topic>")` |
| **After completing task** | `mcp__contextstream__session(action="capture", event_type="decision", ...)` - MUST capture |
| **User frustration/correction** | `mcp__contextstream__session(action="capture_lesson", ...)` - MUST capture lessons |
**NO EXCEPTIONS.** Do not skip even if you think you have enough context.
**First message rule:** After `session_init`, always call `context_smart` before any other tool or response.
**Context Pack (Pro+):** If enabled, use `mcp__contextstream__context_smart(..., mode="pack", distill=true)` for code/file queries. If unavailable or disabled, omit `mode` and proceed with standard `context_smart` (the API will fall back).
**Tool naming:** Use the exact tool names exposed by your MCP client. Claude Code typically uses `mcp__<server>__<tool>` where `<server>` matches your MCP config (often `contextstream`). If a tool call fails with "No such tool available", refresh rules and match the tool list.
---
## Consolidated Domain Tools Architecture
v0.4.x consolidates ~58 individual tools into ~11 domain tools with action/mode dispatch:
### Standalone Tools (Always Call)
- **`session_init`** - Initialize session with workspace detection + context
- **`context_smart`** - Semantic search for relevant context (CALL EVERY MESSAGE, including immediately after `session_init`)
### Domain Tools (Use action/mode parameter)
| Domain | Actions/Modes | Example |
|--------|---------------|---------|
| **`search`** | mode: semantic, hybrid, keyword, pattern, exhaustive, refactor | `mcp__contextstream__search(mode="hybrid", query="auth implementation", limit=3)` |
| **`session`** | action: capture, capture_lesson, get_lessons, recall, remember, user_context, summary, compress, delta, smart_search, decision_trace | `mcp__contextstream__session(action="capture", event_type="decision", title="Use JWT", content="...")` |
| **`memory`** | action: create_event, get_event, update_event, delete_event, list_events, distill_event, create_node, get_node, update_node, delete_node, list_nodes, supersede_node, search, decisions, timeline, summary | `mcp__contextstream__memory(action="list_events", limit=10)` |
| **`graph`** | action: dependencies, impact, call_path, related, path, decisions, ingest, circular_dependencies, unused_code, contradictions | `mcp__contextstream__graph(action="impact", symbol_name="AuthService")` |
| **`project`** | action: list, get, create, update, index, overview, statistics, files, index_status, ingest_local | `mcp__contextstream__project(action="statistics")` |
| **`workspace`** | action: list, get, associate, bootstrap | `mcp__contextstream__workspace(action="list")` |
| **`reminder`** | action: list, active, create, snooze, complete, dismiss | `mcp__contextstream__reminder(action="active")` |
| **`integration`** | provider: slack/github/all; action: status, search, stats, activity, contributors, knowledge, summary, channels, discussions, sync_users, repos, issues | `mcp__contextstream__integration(provider="github", action="search", query="...")` |
| **`help`** | action: tools, auth, version, editor_rules, enable_bundle | `mcp__contextstream__help(action="tools")` |
---
### Why context_smart is Required (Even After session_init)
**Common mistake:** "session_init already gave me context, I don't need context_smart"
**This is WRONG. Here's why:**
- `session_init` returns the last ~10 items **BY TIME** (chronological)
- `context_smart` **SEARCHES** for items **RELEVANT to THIS message** (semantic)
**Example failure:**
- User asks: "how should I implement authentication?"
- Auth decisions were made 20 conversations ago
- `session_init` won't have it (too old, not in recent 10)
- `context_smart` FINDS it via semantic search
**Without context_smart, you WILL miss relevant older context.**
---
### Search & Code Intelligence (ContextStream-first)
⚠️ **STOP: Before using Search/Glob/Grep/Read/Explore** → Call `mcp__contextstream__search(mode="hybrid")` FIRST. Use local tools ONLY if ContextStream returns 0 results.
**❌ WRONG workflow (wastes tokens, slow):**
Grep "function" → Read file1.ts → Read file2.ts → Read file3.ts → sonunda anla
**✅ CORRECT workflow (fast, complete):**
mcp__contextstream__search(mode="hybrid", query="function implementation") → tamam (sonuçlar bağlamı içerir)
**Why?** ContextStream search returns semantic matches + context + file locations in ONE call. Local tools require multiple round-trips.
**Search Mode Selection:**
| Need | Mode | Example |
|------|------|---------|
| Find code by meaning | `hybrid` | "authentication logic", "error handling" |
| Exact string/symbol | `keyword` | "UserAuthService", "API_KEY" |
| File patterns | `pattern` | "*.sql", "test_*.py" |
| ALL matches (grep-like) | `exhaustive` | "TODO", "FIXME" (find all occurrences) |
| Symbol renaming | `refactor` | "oldFunctionName" (word-boundary matching) |
| Conceptual search | `semantic` | "how does caching work" |
**Token Efficiency:** Use `output_format` to reduce response size:
- `full` (default): Full content for understanding code
- `paths`: File paths only (80% token savings) - use for file listings
- `minimal`: Compact format (60% savings) - use for refactoring
- `count`: Match counts only (90% savings) - use for quick checks
---
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `mcp__contextstream__session(action="get_lessons", query="<topic>")`
- On mistakes: `mcp__contextstream__session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
---
### Plans & Tasks
When user asks to create a plan or implementation roadmap:
1. Create plan: `mcp__contextstream__session(action="capture_plan", title="Plan Title", description="...", goals=["goal1", "goal2"], steps=[{id: "1", title: "Step 1", order: 1}, ...])`
2. Get plan_id from response, then create tasks: `mcp__contextstream__memory(action="create_task", title="Task Title", plan_id="<plan_id>", priority="high|medium|low", description="...")`
To manage existing plans/tasks:
- List plans: `mcp__contextstream__session(action="list_plans")`
- Get plan with tasks: `mcp__contextstream__session(action="get_plan", plan_id="<uuid>", include_tasks=true)`
- List tasks: `mcp__contextstream__memory(action="list_tasks", plan_id="<uuid>")` or `mcp__contextstream__memory(action="list_tasks")` for all
- Update task status: `mcp__contextstream__memory(action="update_task", task_id="<uuid>", task_status="pending|in_progress|completed|blocked")`
---
### Rules Update Notices
- If you see **[RULES_NOTICE]**, update rules via `mcp__contextstream__generate_rules(overwrite_existing=true)` (preserves custom rules).
- If you see **[VERSION_NOTICE]**, tell the user to update MCP using the provided command.
See full documentation: https://contextstream.io/docs/mcp/tools
Codex CLI / OpenCode CLI
Proje kökünüzde (proje kuralları) veya ~/.codex/AGENTS.md (Codex genel) / ~/.config/opencode/AGENTS.md (OpenCode genel) içinde bir AGENTS.md dosyası oluşturun:
Codex / OpenCode ve Claude araç adları
Codex / OpenCode ham MCP araç adlarını kullanır (örn. session_init). Claude Code ad alanlı araç adlarını kullanır (örn. mcp__contextstream__session_init). Yapay zeka aracınız için doğru biçimi kullanın.
terminal · AGENTS.md (Standart)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x (Hooks Enforced)
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
### Required Every Message
| Action | Tool Call |
|--------|-----------|
| **1st message** | `session_init(folder_path="<cwd>", context_hint="<msg>")` then `context_smart(...)` |
| **2nd+ messages** | `context_smart(user_message="<msg>", format="minified", max_tokens=400)` |
| **Code search** | `search(mode="hybrid", query="...")` — BEFORE any local tools |
| **Save decisions** | `session(action="capture", event_type="decision", ...)` |
### Search Modes
| Mode | Use Case |
|------|----------|
| `hybrid` | General code search (default) |
| `keyword` | Exact symbol/string match |
| `exhaustive` | Find ALL matches (grep-like) |
| `semantic` | Conceptual questions |
### Why ContextStream First?
❌ **WRONG:** `Grep → Read → Read → Read` (4+ tool calls, slow)
✅ **CORRECT:** `search(mode="hybrid")` (1 call, returns context)
ContextStream search is **indexed** and returns semantic matches + context in ONE call.
### Quick Reference
| Tool | Example |
|------|---------|
| `search` | `search(mode="hybrid", query="auth", limit=3)` |
| `session` | `session(action="capture", event_type="decision", title="...", content="...")` |
| `memory` | `memory(action="list_events", limit=10)` |
| `graph` | `graph(action="dependencies", file_path="...")` |
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
### Plans & Tasks
When user asks for a plan, use ContextStream (not EnterPlanMode):
1. `session(action="capture_plan", title="...", steps=[...])`
2. `memory(action="create_task", title="...", plan_id="<id>")`
Full docs: https://contextstream.io/docs/mcp/tools
Gelişmiş kuralları göster (ayrıntılı)
terminal · AGENTS.md (Gelişmiş)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x Integration (Enhanced)
You have access to ContextStream MCP tools for persistent memory and context.
v0.4.x uses **~11 consolidated domain tools** for ~75% token reduction vs previous versions.
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
## TL;DR - REQUIRED EVERY MESSAGE
| Message | What to Call |
|---------|--------------|
| **1st message** | `session_init(folder_path="...", context_hint="<user's message>")`, then `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **2nd+ messages** | `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **🔍 ANY code search** | `search(mode="hybrid", query="...")` — ALWAYS before Glob/Grep/Search/Read |
| **Before risky/non-trivial work** | `session(action="get_lessons", query="<topic>")` |
| **After completing task** | `session(action="capture", event_type="decision", ...)` - MUST capture |
| **User frustration/correction** | `session(action="capture_lesson", ...)` - MUST capture lessons |
**NO EXCEPTIONS.** Do not skip even if you think you have enough context.
**First message rule:** After `session_init`, always call `context_smart` before any other tool or response.
**Context Pack (Pro+):** If enabled, use `context_smart(..., mode="pack", distill=true)` for code/file queries. If unavailable or disabled, omit `mode` and proceed with standard `context_smart` (the API will fall back).
**Tool naming:** Use the exact tool names exposed by your MCP client. Claude Code typically uses `mcp__<server>__<tool>` where `<server>` matches your MCP config (often `contextstream`). If a tool call fails with "No such tool available", refresh rules and match the tool list.
---
## Consolidated Domain Tools Architecture
v0.4.x consolidates ~58 individual tools into ~11 domain tools with action/mode dispatch:
### Standalone Tools (Always Call)
- **`session_init`** - Initialize session with workspace detection + context
- **`context_smart`** - Semantic search for relevant context (CALL EVERY MESSAGE, including immediately after `session_init`)
### Domain Tools (Use action/mode parameter)
| Domain | Actions/Modes | Example |
|--------|---------------|---------|
| **`search`** | mode: semantic, hybrid, keyword, pattern, exhaustive, refactor | `search(mode="hybrid", query="auth implementation", limit=3)` |
| **`session`** | action: capture, capture_lesson, get_lessons, recall, remember, user_context, summary, compress, delta, smart_search, decision_trace | `session(action="capture", event_type="decision", title="Use JWT", content="...")` |
| **`memory`** | action: create_event, get_event, update_event, delete_event, list_events, distill_event, create_node, get_node, update_node, delete_node, list_nodes, supersede_node, search, decisions, timeline, summary | `memory(action="list_events", limit=10)` |
| **`graph`** | action: dependencies, impact, call_path, related, path, decisions, ingest, circular_dependencies, unused_code, contradictions | `graph(action="impact", symbol_name="AuthService")` |
| **`project`** | action: list, get, create, update, index, overview, statistics, files, index_status, ingest_local | `project(action="statistics")` |
| **`workspace`** | action: list, get, associate, bootstrap | `workspace(action="list")` |
| **`reminder`** | action: list, active, create, snooze, complete, dismiss | `reminder(action="active")` |
| **`integration`** | provider: slack/github/all; action: status, search, stats, activity, contributors, knowledge, summary, channels, discussions, sync_users, repos, issues | `integration(provider="github", action="search", query="...")` |
| **`help`** | action: tools, auth, version, editor_rules, enable_bundle | `help(action="tools")` |
---
### Why context_smart is Required (Even After session_init)
**Common mistake:** "session_init already gave me context, I don't need context_smart"
**This is WRONG. Here's why:**
- `session_init` returns the last ~10 items **BY TIME** (chronological)
- `context_smart` **SEARCHES** for items **RELEVANT to THIS message** (semantic)
**Example failure:**
- User asks: "how should I implement authentication?"
- Auth decisions were made 20 conversations ago
- `session_init` won't have it (too old, not in recent 10)
- `context_smart` FINDS it via semantic search
**Without context_smart, you WILL miss relevant older context.**
---
### Search & Code Intelligence (ContextStream-first)
⚠️ **STOP: Before using Search/Glob/Grep/Read/Explore** → Call `search(mode="hybrid")` FIRST. Use local tools ONLY if ContextStream returns 0 results.
**❌ WRONG workflow (wastes tokens, slow):**
Grep "function" → Read file1.ts → Read file2.ts → Read file3.ts → sonunda anla
**✅ CORRECT workflow (fast, complete):**
search(mode="hybrid", query="function implementation") → tamam (sonuçlar bağlamı içerir)
**Why?** ContextStream search returns semantic matches + context + file locations in ONE call. Local tools require multiple round-trips.
**Search Mode Selection:**
| Need | Mode | Example |
|------|------|---------|
| Find code by meaning | `hybrid` | "authentication logic", "error handling" |
| Exact string/symbol | `keyword` | "UserAuthService", "API_KEY" |
| File patterns | `pattern` | "*.sql", "test_*.py" |
| ALL matches (grep-like) | `exhaustive` | "TODO", "FIXME" (find all occurrences) |
| Symbol renaming | `refactor` | "oldFunctionName" (word-boundary matching) |
| Conceptual search | `semantic` | "how does caching work" |
**Token Efficiency:** Use `output_format` to reduce response size:
- `full` (default): Full content for understanding code
- `paths`: File paths only (80% token savings) - use for file listings
- `minimal`: Compact format (60% savings) - use for refactoring
- `count`: Match counts only (90% savings) - use for quick checks
---
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
---
### Plans & Tasks
When user asks to create a plan or implementation roadmap:
1. Create plan: `session(action="capture_plan", title="Plan Title", description="...", goals=["goal1", "goal2"], steps=[{id: "1", title: "Step 1", order: 1}, ...])`
2. Get plan_id from response, then create tasks: `memory(action="create_task", title="Task Title", plan_id="<plan_id>", priority="high|medium|low", description="...")`
To manage existing plans/tasks:
- List plans: `session(action="list_plans")`
- Get plan with tasks: `session(action="get_plan", plan_id="<uuid>", include_tasks=true)`
- List tasks: `memory(action="list_tasks", plan_id="<uuid>")` or `memory(action="list_tasks")` for all
- Update task status: `memory(action="update_task", task_id="<uuid>", task_status="pending|in_progress|completed|blocked")`
---
### Rules Update Notices
- If you see **[RULES_NOTICE]**, update rules via `generate_rules(overwrite_existing=true)` (preserves custom rules).
- If you see **[VERSION_NOTICE]**, tell the user to update MCP using the provided command.
See full documentation: https://contextstream.io/docs/mcp/tools
Windsurf
Proje kökünüzde bir .windsurf/rules/contextstream.md dosyası oluşturun veya genel ~/.codeium/windsurf/memories/global_rules.md dosyanıza ekleyin:
terminal · .windsurf/rules/contextstream.md (Standart)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x (Hooks Enforced)
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
### Required Every Message
| Action | Tool Call |
|--------|-----------|
| **1st message** | `session_init(folder_path="<cwd>", context_hint="<msg>")` then `context_smart(...)` |
| **2nd+ messages** | `context_smart(user_message="<msg>", format="minified", max_tokens=400)` |
| **Code search** | `search(mode="hybrid", query="...")` — BEFORE any local tools |
| **Save decisions** | `session(action="capture", event_type="decision", ...)` |
### Search Modes
| Mode | Use Case |
|------|----------|
| `hybrid` | General code search (default) |
| `keyword` | Exact symbol/string match |
| `exhaustive` | Find ALL matches (grep-like) |
| `semantic` | Conceptual questions |
### Why ContextStream First?
❌ **WRONG:** `Grep → Read → Read → Read` (4+ tool calls, slow)
✅ **CORRECT:** `search(mode="hybrid")` (1 call, returns context)
ContextStream search is **indexed** and returns semantic matches + context in ONE call.
### Quick Reference
| Tool | Example |
|------|---------|
| `search` | `search(mode="hybrid", query="auth", limit=3)` |
| `session` | `session(action="capture", event_type="decision", title="...", content="...")` |
| `memory` | `memory(action="list_events", limit=10)` |
| `graph` | `graph(action="dependencies", file_path="...")` |
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
### Plans & Tasks
When user asks for a plan, use ContextStream (not EnterPlanMode):
1. `session(action="capture_plan", title="...", steps=[...])`
2. `memory(action="create_task", title="...", plan_id="<id>")`
Full docs: https://contextstream.io/docs/mcp/tools
Gelişmiş kuralları göster (ayrıntılı)
terminal · .windsurf/rules/contextstream.md (Gelişmiş)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x Integration (Enhanced)
You have access to ContextStream MCP tools for persistent memory and context.
v0.4.x uses **~11 consolidated domain tools** for ~75% token reduction vs previous versions.
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
## TL;DR - REQUIRED EVERY MESSAGE
| Message | What to Call |
|---------|--------------|
| **1st message** | `session_init(folder_path="...", context_hint="<user's message>")`, then `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **2nd+ messages** | `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **🔍 ANY code search** | `search(mode="hybrid", query="...")` — ALWAYS before Glob/Grep/Search/Read |
| **Before risky/non-trivial work** | `session(action="get_lessons", query="<topic>")` |
| **After completing task** | `session(action="capture", event_type="decision", ...)` - MUST capture |
| **User frustration/correction** | `session(action="capture_lesson", ...)` - MUST capture lessons |
**NO EXCEPTIONS.** Do not skip even if you think you have enough context.
**First message rule:** After `session_init`, always call `context_smart` before any other tool or response.
**Context Pack (Pro+):** If enabled, use `context_smart(..., mode="pack", distill=true)` for code/file queries. If unavailable or disabled, omit `mode` and proceed with standard `context_smart` (the API will fall back).
**Tool naming:** Use the exact tool names exposed by your MCP client. Claude Code typically uses `mcp__<server>__<tool>` where `<server>` matches your MCP config (often `contextstream`). If a tool call fails with "No such tool available", refresh rules and match the tool list.
---
## Consolidated Domain Tools Architecture
v0.4.x consolidates ~58 individual tools into ~11 domain tools with action/mode dispatch:
### Standalone Tools (Always Call)
- **`session_init`** - Initialize session with workspace detection + context
- **`context_smart`** - Semantic search for relevant context (CALL EVERY MESSAGE, including immediately after `session_init`)
### Domain Tools (Use action/mode parameter)
| Domain | Actions/Modes | Example |
|--------|---------------|---------|
| **`search`** | mode: semantic, hybrid, keyword, pattern, exhaustive, refactor | `search(mode="hybrid", query="auth implementation", limit=3)` |
| **`session`** | action: capture, capture_lesson, get_lessons, recall, remember, user_context, summary, compress, delta, smart_search, decision_trace | `session(action="capture", event_type="decision", title="Use JWT", content="...")` |
| **`memory`** | action: create_event, get_event, update_event, delete_event, list_events, distill_event, create_node, get_node, update_node, delete_node, list_nodes, supersede_node, search, decisions, timeline, summary | `memory(action="list_events", limit=10)` |
| **`graph`** | action: dependencies, impact, call_path, related, path, decisions, ingest, circular_dependencies, unused_code, contradictions | `graph(action="impact", symbol_name="AuthService")` |
| **`project`** | action: list, get, create, update, index, overview, statistics, files, index_status, ingest_local | `project(action="statistics")` |
| **`workspace`** | action: list, get, associate, bootstrap | `workspace(action="list")` |
| **`reminder`** | action: list, active, create, snooze, complete, dismiss | `reminder(action="active")` |
| **`integration`** | provider: slack/github/all; action: status, search, stats, activity, contributors, knowledge, summary, channels, discussions, sync_users, repos, issues | `integration(provider="github", action="search", query="...")` |
| **`help`** | action: tools, auth, version, editor_rules, enable_bundle | `help(action="tools")` |
---
### Why context_smart is Required (Even After session_init)
**Common mistake:** "session_init already gave me context, I don't need context_smart"
**This is WRONG. Here's why:**
- `session_init` returns the last ~10 items **BY TIME** (chronological)
- `context_smart` **SEARCHES** for items **RELEVANT to THIS message** (semantic)
**Example failure:**
- User asks: "how should I implement authentication?"
- Auth decisions were made 20 conversations ago
- `session_init` won't have it (too old, not in recent 10)
- `context_smart` FINDS it via semantic search
**Without context_smart, you WILL miss relevant older context.**
---
### Search & Code Intelligence (ContextStream-first)
⚠️ **STOP: Before using Search/Glob/Grep/Read/Explore** → Call `search(mode="hybrid")` FIRST. Use local tools ONLY if ContextStream returns 0 results.
**❌ WRONG workflow (wastes tokens, slow):**
Grep "function" → Read file1.ts → Read file2.ts → Read file3.ts → sonunda anla
**✅ CORRECT workflow (fast, complete):**
search(mode="hybrid", query="function implementation") → tamam (sonuçlar bağlamı içerir)
**Why?** ContextStream search returns semantic matches + context + file locations in ONE call. Local tools require multiple round-trips.
**Search Mode Selection:**
| Need | Mode | Example |
|------|------|---------|
| Find code by meaning | `hybrid` | "authentication logic", "error handling" |
| Exact string/symbol | `keyword` | "UserAuthService", "API_KEY" |
| File patterns | `pattern` | "*.sql", "test_*.py" |
| ALL matches (grep-like) | `exhaustive` | "TODO", "FIXME" (find all occurrences) |
| Symbol renaming | `refactor` | "oldFunctionName" (word-boundary matching) |
| Conceptual search | `semantic` | "how does caching work" |
**Token Efficiency:** Use `output_format` to reduce response size:
- `full` (default): Full content for understanding code
- `paths`: File paths only (80% token savings) - use for file listings
- `minimal`: Compact format (60% savings) - use for refactoring
- `count`: Match counts only (90% savings) - use for quick checks
---
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
---
### Plans & Tasks
When user asks to create a plan or implementation roadmap:
1. Create plan: `session(action="capture_plan", title="Plan Title", description="...", goals=["goal1", "goal2"], steps=[{id: "1", title: "Step 1", order: 1}, ...])`
2. Get plan_id from response, then create tasks: `memory(action="create_task", title="Task Title", plan_id="<plan_id>", priority="high|medium|low", description="...")`
To manage existing plans/tasks:
- List plans: `session(action="list_plans")`
- Get plan with tasks: `session(action="get_plan", plan_id="<uuid>", include_tasks=true)`
- List tasks: `memory(action="list_tasks", plan_id="<uuid>")` or `memory(action="list_tasks")` for all
- Update task status: `memory(action="update_task", task_id="<uuid>", task_status="pending|in_progress|completed|blocked")`
---
### Rules Update Notices
- If you see **[RULES_NOTICE]**, update rules via `generate_rules(overwrite_existing=true)` (preserves custom rules).
- If you see **[VERSION_NOTICE]**, tell the user to update MCP using the provided command.
See full documentation: https://contextstream.io/docs/mcp/tools
Kilo Code
.kilocode/rules/ içinde bir Markdown dosyası oluşturun:
terminal · .kilocode/rules/contextstream.md (Standart)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x (Hooks Enforced)
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
### Required Every Message
| Action | Tool Call |
|--------|-----------|
| **1st message** | `session_init(folder_path="<cwd>", context_hint="<msg>")` then `context_smart(...)` |
| **2nd+ messages** | `context_smart(user_message="<msg>", format="minified", max_tokens=400)` |
| **Code search** | `search(mode="hybrid", query="...")` — BEFORE any local tools |
| **Save decisions** | `session(action="capture", event_type="decision", ...)` |
### Search Modes
| Mode | Use Case |
|------|----------|
| `hybrid` | General code search (default) |
| `keyword` | Exact symbol/string match |
| `exhaustive` | Find ALL matches (grep-like) |
| `semantic` | Conceptual questions |
### Why ContextStream First?
❌ **WRONG:** `Grep → Read → Read → Read` (4+ tool calls, slow)
✅ **CORRECT:** `search(mode="hybrid")` (1 call, returns context)
ContextStream search is **indexed** and returns semantic matches + context in ONE call.
### Quick Reference
| Tool | Example |
|------|---------|
| `search` | `search(mode="hybrid", query="auth", limit=3)` |
| `session` | `session(action="capture", event_type="decision", title="...", content="...")` |
| `memory` | `memory(action="list_events", limit=10)` |
| `graph` | `graph(action="dependencies", file_path="...")` |
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
### Plans & Tasks
When user asks for a plan, use ContextStream (not EnterPlanMode):
1. `session(action="capture_plan", title="...", steps=[...])`
2. `memory(action="create_task", title="...", plan_id="<id>")`
Full docs: https://contextstream.io/docs/mcp/tools
Gelişmiş kuralları göster (ayrıntılı)
terminal · .kilocode/rules/contextstream.md (Gelişmiş)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x Integration (Enhanced)
You have access to ContextStream MCP tools for persistent memory and context.
v0.4.x uses **~11 consolidated domain tools** for ~75% token reduction vs previous versions.
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
## TL;DR - REQUIRED EVERY MESSAGE
| Message | What to Call |
|---------|--------------|
| **1st message** | `session_init(folder_path="...", context_hint="<user's message>")`, then `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **2nd+ messages** | `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **🔍 ANY code search** | `search(mode="hybrid", query="...")` — ALWAYS before Glob/Grep/Search/Read |
| **Before risky/non-trivial work** | `session(action="get_lessons", query="<topic>")` |
| **After completing task** | `session(action="capture", event_type="decision", ...)` - MUST capture |
| **User frustration/correction** | `session(action="capture_lesson", ...)` - MUST capture lessons |
**NO EXCEPTIONS.** Do not skip even if you think you have enough context.
**First message rule:** After `session_init`, always call `context_smart` before any other tool or response.
**Context Pack (Pro+):** If enabled, use `context_smart(..., mode="pack", distill=true)` for code/file queries. If unavailable or disabled, omit `mode` and proceed with standard `context_smart` (the API will fall back).
**Tool naming:** Use the exact tool names exposed by your MCP client. Claude Code typically uses `mcp__<server>__<tool>` where `<server>` matches your MCP config (often `contextstream`). If a tool call fails with "No such tool available", refresh rules and match the tool list.
---
## Consolidated Domain Tools Architecture
v0.4.x consolidates ~58 individual tools into ~11 domain tools with action/mode dispatch:
### Standalone Tools (Always Call)
- **`session_init`** - Initialize session with workspace detection + context
- **`context_smart`** - Semantic search for relevant context (CALL EVERY MESSAGE, including immediately after `session_init`)
### Domain Tools (Use action/mode parameter)
| Domain | Actions/Modes | Example |
|--------|---------------|---------|
| **`search`** | mode: semantic, hybrid, keyword, pattern, exhaustive, refactor | `search(mode="hybrid", query="auth implementation", limit=3)` |
| **`session`** | action: capture, capture_lesson, get_lessons, recall, remember, user_context, summary, compress, delta, smart_search, decision_trace | `session(action="capture", event_type="decision", title="Use JWT", content="...")` |
| **`memory`** | action: create_event, get_event, update_event, delete_event, list_events, distill_event, create_node, get_node, update_node, delete_node, list_nodes, supersede_node, search, decisions, timeline, summary | `memory(action="list_events", limit=10)` |
| **`graph`** | action: dependencies, impact, call_path, related, path, decisions, ingest, circular_dependencies, unused_code, contradictions | `graph(action="impact", symbol_name="AuthService")` |
| **`project`** | action: list, get, create, update, index, overview, statistics, files, index_status, ingest_local | `project(action="statistics")` |
| **`workspace`** | action: list, get, associate, bootstrap | `workspace(action="list")` |
| **`reminder`** | action: list, active, create, snooze, complete, dismiss | `reminder(action="active")` |
| **`integration`** | provider: slack/github/all; action: status, search, stats, activity, contributors, knowledge, summary, channels, discussions, sync_users, repos, issues | `integration(provider="github", action="search", query="...")` |
| **`help`** | action: tools, auth, version, editor_rules, enable_bundle | `help(action="tools")` |
---
### Why context_smart is Required (Even After session_init)
**Common mistake:** "session_init already gave me context, I don't need context_smart"
**This is WRONG. Here's why:**
- `session_init` returns the last ~10 items **BY TIME** (chronological)
- `context_smart` **SEARCHES** for items **RELEVANT to THIS message** (semantic)
**Example failure:**
- User asks: "how should I implement authentication?"
- Auth decisions were made 20 conversations ago
- `session_init` won't have it (too old, not in recent 10)
- `context_smart` FINDS it via semantic search
**Without context_smart, you WILL miss relevant older context.**
---
### Search & Code Intelligence (ContextStream-first)
⚠️ **STOP: Before using Search/Glob/Grep/Read/Explore** → Call `search(mode="hybrid")` FIRST. Use local tools ONLY if ContextStream returns 0 results.
**❌ WRONG workflow (wastes tokens, slow):**
Grep "function" → Read file1.ts → Read file2.ts → Read file3.ts → sonunda anla
**✅ CORRECT workflow (fast, complete):**
search(mode="hybrid", query="function implementation") → tamam (sonuçlar bağlamı içerir)
**Why?** ContextStream search returns semantic matches + context + file locations in ONE call. Local tools require multiple round-trips.
**Search Mode Selection:**
| Need | Mode | Example |
|------|------|---------|
| Find code by meaning | `hybrid` | "authentication logic", "error handling" |
| Exact string/symbol | `keyword` | "UserAuthService", "API_KEY" |
| File patterns | `pattern` | "*.sql", "test_*.py" |
| ALL matches (grep-like) | `exhaustive` | "TODO", "FIXME" (find all occurrences) |
| Symbol renaming | `refactor` | "oldFunctionName" (word-boundary matching) |
| Conceptual search | `semantic` | "how does caching work" |
**Token Efficiency:** Use `output_format` to reduce response size:
- `full` (default): Full content for understanding code
- `paths`: File paths only (80% token savings) - use for file listings
- `minimal`: Compact format (60% savings) - use for refactoring
- `count`: Match counts only (90% savings) - use for quick checks
---
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
---
### Plans & Tasks
When user asks to create a plan or implementation roadmap:
1. Create plan: `session(action="capture_plan", title="Plan Title", description="...", goals=["goal1", "goal2"], steps=[{id: "1", title: "Step 1", order: 1}, ...])`
2. Get plan_id from response, then create tasks: `memory(action="create_task", title="Task Title", plan_id="<plan_id>", priority="high|medium|low", description="...")`
To manage existing plans/tasks:
- List plans: `session(action="list_plans")`
- Get plan with tasks: `session(action="get_plan", plan_id="<uuid>", include_tasks=true)`
- List tasks: `memory(action="list_tasks", plan_id="<uuid>")` or `memory(action="list_tasks")` for all
- Update task status: `memory(action="update_task", task_id="<uuid>", task_status="pending|in_progress|completed|blocked")`
---
### Rules Update Notices
- If you see **[RULES_NOTICE]**, update rules via `generate_rules(overwrite_existing=true)` (preserves custom rules).
- If you see **[VERSION_NOTICE]**, tell the user to update MCP using the provided command.
See full documentation: https://contextstream.io/docs/mcp/tools
Cline
Proje kökünüzde bir .clinerules dosyası oluşturun veya .clinerules/ klasörünü kullanın:
terminal · .clinerules (Standart)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x (Hooks Enforced)
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
### Required Every Message
| Action | Tool Call |
|--------|-----------|
| **1st message** | `session_init(folder_path="<cwd>", context_hint="<msg>")` then `context_smart(...)` |
| **2nd+ messages** | `context_smart(user_message="<msg>", format="minified", max_tokens=400)` |
| **Code search** | `search(mode="hybrid", query="...")` — BEFORE any local tools |
| **Save decisions** | `session(action="capture", event_type="decision", ...)` |
### Search Modes
| Mode | Use Case |
|------|----------|
| `hybrid` | General code search (default) |
| `keyword` | Exact symbol/string match |
| `exhaustive` | Find ALL matches (grep-like) |
| `semantic` | Conceptual questions |
### Why ContextStream First?
❌ **WRONG:** `Grep → Read → Read → Read` (4+ tool calls, slow)
✅ **CORRECT:** `search(mode="hybrid")` (1 call, returns context)
ContextStream search is **indexed** and returns semantic matches + context in ONE call.
### Quick Reference
| Tool | Example |
|------|---------|
| `search` | `search(mode="hybrid", query="auth", limit=3)` |
| `session` | `session(action="capture", event_type="decision", title="...", content="...")` |
| `memory` | `memory(action="list_events", limit=10)` |
| `graph` | `graph(action="dependencies", file_path="...")` |
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
### Plans & Tasks
When user asks for a plan, use ContextStream (not EnterPlanMode):
1. `session(action="capture_plan", title="...", steps=[...])`
2. `memory(action="create_task", title="...", plan_id="<id>")`
Full docs: https://contextstream.io/docs/mcp/tools
Gelişmiş kuralları göster (ayrıntılı)
terminal · .clinerules (Gelişmiş)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x Integration (Enhanced)
You have access to ContextStream MCP tools for persistent memory and context.
v0.4.x uses **~11 consolidated domain tools** for ~75% token reduction vs previous versions.
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
## TL;DR - REQUIRED EVERY MESSAGE
| Message | What to Call |
|---------|--------------|
| **1st message** | `session_init(folder_path="...", context_hint="<user's message>")`, then `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **2nd+ messages** | `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **🔍 ANY code search** | `search(mode="hybrid", query="...")` — ALWAYS before Glob/Grep/Search/Read |
| **Before risky/non-trivial work** | `session(action="get_lessons", query="<topic>")` |
| **After completing task** | `session(action="capture", event_type="decision", ...)` - MUST capture |
| **User frustration/correction** | `session(action="capture_lesson", ...)` - MUST capture lessons |
**NO EXCEPTIONS.** Do not skip even if you think you have enough context.
**First message rule:** After `session_init`, always call `context_smart` before any other tool or response.
**Context Pack (Pro+):** If enabled, use `context_smart(..., mode="pack", distill=true)` for code/file queries. If unavailable or disabled, omit `mode` and proceed with standard `context_smart` (the API will fall back).
**Tool naming:** Use the exact tool names exposed by your MCP client. Claude Code typically uses `mcp__<server>__<tool>` where `<server>` matches your MCP config (often `contextstream`). If a tool call fails with "No such tool available", refresh rules and match the tool list.
---
## Consolidated Domain Tools Architecture
v0.4.x consolidates ~58 individual tools into ~11 domain tools with action/mode dispatch:
### Standalone Tools (Always Call)
- **`session_init`** - Initialize session with workspace detection + context
- **`context_smart`** - Semantic search for relevant context (CALL EVERY MESSAGE, including immediately after `session_init`)
### Domain Tools (Use action/mode parameter)
| Domain | Actions/Modes | Example |
|--------|---------------|---------|
| **`search`** | mode: semantic, hybrid, keyword, pattern, exhaustive, refactor | `search(mode="hybrid", query="auth implementation", limit=3)` |
| **`session`** | action: capture, capture_lesson, get_lessons, recall, remember, user_context, summary, compress, delta, smart_search, decision_trace | `session(action="capture", event_type="decision", title="Use JWT", content="...")` |
| **`memory`** | action: create_event, get_event, update_event, delete_event, list_events, distill_event, create_node, get_node, update_node, delete_node, list_nodes, supersede_node, search, decisions, timeline, summary | `memory(action="list_events", limit=10)` |
| **`graph`** | action: dependencies, impact, call_path, related, path, decisions, ingest, circular_dependencies, unused_code, contradictions | `graph(action="impact", symbol_name="AuthService")` |
| **`project`** | action: list, get, create, update, index, overview, statistics, files, index_status, ingest_local | `project(action="statistics")` |
| **`workspace`** | action: list, get, associate, bootstrap | `workspace(action="list")` |
| **`reminder`** | action: list, active, create, snooze, complete, dismiss | `reminder(action="active")` |
| **`integration`** | provider: slack/github/all; action: status, search, stats, activity, contributors, knowledge, summary, channels, discussions, sync_users, repos, issues | `integration(provider="github", action="search", query="...")` |
| **`help`** | action: tools, auth, version, editor_rules, enable_bundle | `help(action="tools")` |
---
### Why context_smart is Required (Even After session_init)
**Common mistake:** "session_init already gave me context, I don't need context_smart"
**This is WRONG. Here's why:**
- `session_init` returns the last ~10 items **BY TIME** (chronological)
- `context_smart` **SEARCHES** for items **RELEVANT to THIS message** (semantic)
**Example failure:**
- User asks: "how should I implement authentication?"
- Auth decisions were made 20 conversations ago
- `session_init` won't have it (too old, not in recent 10)
- `context_smart` FINDS it via semantic search
**Without context_smart, you WILL miss relevant older context.**
---
### Search & Code Intelligence (ContextStream-first)
⚠️ **STOP: Before using Search/Glob/Grep/Read/Explore** → Call `search(mode="hybrid")` FIRST. Use local tools ONLY if ContextStream returns 0 results.
**❌ WRONG workflow (wastes tokens, slow):**
Grep "function" → Read file1.ts → Read file2.ts → Read file3.ts → sonunda anla
**✅ CORRECT workflow (fast, complete):**
search(mode="hybrid", query="function implementation") → tamam (sonuçlar bağlamı içerir)
**Why?** ContextStream search returns semantic matches + context + file locations in ONE call. Local tools require multiple round-trips.
**Search Mode Selection:**
| Need | Mode | Example |
|------|------|---------|
| Find code by meaning | `hybrid` | "authentication logic", "error handling" |
| Exact string/symbol | `keyword` | "UserAuthService", "API_KEY" |
| File patterns | `pattern` | "*.sql", "test_*.py" |
| ALL matches (grep-like) | `exhaustive` | "TODO", "FIXME" (find all occurrences) |
| Symbol renaming | `refactor` | "oldFunctionName" (word-boundary matching) |
| Conceptual search | `semantic` | "how does caching work" |
**Token Efficiency:** Use `output_format` to reduce response size:
- `full` (default): Full content for understanding code
- `paths`: File paths only (80% token savings) - use for file listings
- `minimal`: Compact format (60% savings) - use for refactoring
- `count`: Match counts only (90% savings) - use for quick checks
---
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
---
### Plans & Tasks
When user asks to create a plan or implementation roadmap:
1. Create plan: `session(action="capture_plan", title="Plan Title", description="...", goals=["goal1", "goal2"], steps=[{id: "1", title: "Step 1", order: 1}, ...])`
2. Get plan_id from response, then create tasks: `memory(action="create_task", title="Task Title", plan_id="<plan_id>", priority="high|medium|low", description="...")`
To manage existing plans/tasks:
- List plans: `session(action="list_plans")`
- Get plan with tasks: `session(action="get_plan", plan_id="<uuid>", include_tasks=true)`
- List tasks: `memory(action="list_tasks", plan_id="<uuid>")` or `memory(action="list_tasks")` for all
- Update task status: `memory(action="update_task", task_id="<uuid>", task_status="pending|in_progress|completed|blocked")`
---
### Rules Update Notices
- If you see **[RULES_NOTICE]**, update rules via `generate_rules(overwrite_existing=true)` (preserves custom rules).
- If you see **[VERSION_NOTICE]**, tell the user to update MCP using the provided command.
See full documentation: https://contextstream.io/docs/mcp/tools
Roo Code
Bir .roo/rules/contextstream.md dosyası oluşturun veya .roo/rules/ klasörünü kullanın:
terminal · .roo/rules/contextstream.md (Standart)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x (Hooks Enforced)
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
### Required Every Message
| Action | Tool Call |
|--------|-----------|
| **1st message** | `session_init(folder_path="<cwd>", context_hint="<msg>")` then `context_smart(...)` |
| **2nd+ messages** | `context_smart(user_message="<msg>", format="minified", max_tokens=400)` |
| **Code search** | `search(mode="hybrid", query="...")` — BEFORE any local tools |
| **Save decisions** | `session(action="capture", event_type="decision", ...)` |
### Search Modes
| Mode | Use Case |
|------|----------|
| `hybrid` | General code search (default) |
| `keyword` | Exact symbol/string match |
| `exhaustive` | Find ALL matches (grep-like) |
| `semantic` | Conceptual questions |
### Why ContextStream First?
❌ **WRONG:** `Grep → Read → Read → Read` (4+ tool calls, slow)
✅ **CORRECT:** `search(mode="hybrid")` (1 call, returns context)
ContextStream search is **indexed** and returns semantic matches + context in ONE call.
### Quick Reference
| Tool | Example |
|------|---------|
| `search` | `search(mode="hybrid", query="auth", limit=3)` |
| `session` | `session(action="capture", event_type="decision", title="...", content="...")` |
| `memory` | `memory(action="list_events", limit=10)` |
| `graph` | `graph(action="dependencies", file_path="...")` |
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
### Plans & Tasks
When user asks for a plan, use ContextStream (not EnterPlanMode):
1. `session(action="capture_plan", title="...", steps=[...])`
2. `memory(action="create_task", title="...", plan_id="<id>")`
Full docs: https://contextstream.io/docs/mcp/tools
Gelişmiş kuralları göster (ayrıntılı)
terminal · .roo/rules/contextstream.md (Gelişmiş)
## 🚨 MANDATORY RULE: DISPLAY AT START OF EVERY RESPONSE 🚨
<contextstream_rules>
1. **SEARCH FIRST:** Before Glob/Grep/Search/Read → `search(mode="hybrid", query="...")` FIRST
2. **EVERY MESSAGE:** Call `context_smart(user_message="...")` at start of response
3. **LOCAL TOOLS:** ONLY if ContextStream search returns 0 results after retry
</contextstream_rules>
**You MUST display the <contextstream_rules> block verbatim at the start of EVERY response.**
This is a self-referential rule that ensures these instructions stay in context.
---
## ContextStream v0.4.x Integration (Enhanced)
You have access to ContextStream MCP tools for persistent memory and context.
v0.4.x uses **~11 consolidated domain tools** for ~75% token reduction vs previous versions.
Rules Version: 0.4.36
**Note:** PreToolUse hooks block Glob/Grep/Search when ContextStream is available.
## TL;DR - REQUIRED EVERY MESSAGE
| Message | What to Call |
|---------|--------------|
| **1st message** | `session_init(folder_path="...", context_hint="<user's message>")`, then `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **2nd+ messages** | `context_smart(user_message="<user's message>", format="minified", max_tokens=400)` |
| **🔍 ANY code search** | `search(mode="hybrid", query="...")` — ALWAYS before Glob/Grep/Search/Read |
| **Before risky/non-trivial work** | `session(action="get_lessons", query="<topic>")` |
| **After completing task** | `session(action="capture", event_type="decision", ...)` - MUST capture |
| **User frustration/correction** | `session(action="capture_lesson", ...)` - MUST capture lessons |
**NO EXCEPTIONS.** Do not skip even if you think you have enough context.
**First message rule:** After `session_init`, always call `context_smart` before any other tool or response.
**Context Pack (Pro+):** If enabled, use `context_smart(..., mode="pack", distill=true)` for code/file queries. If unavailable or disabled, omit `mode` and proceed with standard `context_smart` (the API will fall back).
**Tool naming:** Use the exact tool names exposed by your MCP client. Claude Code typically uses `mcp__<server>__<tool>` where `<server>` matches your MCP config (often `contextstream`). If a tool call fails with "No such tool available", refresh rules and match the tool list.
---
## Consolidated Domain Tools Architecture
v0.4.x consolidates ~58 individual tools into ~11 domain tools with action/mode dispatch:
### Standalone Tools (Always Call)
- **`session_init`** - Initialize session with workspace detection + context
- **`context_smart`** - Semantic search for relevant context (CALL EVERY MESSAGE, including immediately after `session_init`)
### Domain Tools (Use action/mode parameter)
| Domain | Actions/Modes | Example |
|--------|---------------|---------|
| **`search`** | mode: semantic, hybrid, keyword, pattern, exhaustive, refactor | `search(mode="hybrid", query="auth implementation", limit=3)` |
| **`session`** | action: capture, capture_lesson, get_lessons, recall, remember, user_context, summary, compress, delta, smart_search, decision_trace | `session(action="capture", event_type="decision", title="Use JWT", content="...")` |
| **`memory`** | action: create_event, get_event, update_event, delete_event, list_events, distill_event, create_node, get_node, update_node, delete_node, list_nodes, supersede_node, search, decisions, timeline, summary | `memory(action="list_events", limit=10)` |
| **`graph`** | action: dependencies, impact, call_path, related, path, decisions, ingest, circular_dependencies, unused_code, contradictions | `graph(action="impact", symbol_name="AuthService")` |
| **`project`** | action: list, get, create, update, index, overview, statistics, files, index_status, ingest_local | `project(action="statistics")` |
| **`workspace`** | action: list, get, associate, bootstrap | `workspace(action="list")` |
| **`reminder`** | action: list, active, create, snooze, complete, dismiss | `reminder(action="active")` |
| **`integration`** | provider: slack/github/all; action: status, search, stats, activity, contributors, knowledge, summary, channels, discussions, sync_users, repos, issues | `integration(provider="github", action="search", query="...")` |
| **`help`** | action: tools, auth, version, editor_rules, enable_bundle | `help(action="tools")` |
---
### Why context_smart is Required (Even After session_init)
**Common mistake:** "session_init already gave me context, I don't need context_smart"
**This is WRONG. Here's why:**
- `session_init` returns the last ~10 items **BY TIME** (chronological)
- `context_smart` **SEARCHES** for items **RELEVANT to THIS message** (semantic)
**Example failure:**
- User asks: "how should I implement authentication?"
- Auth decisions were made 20 conversations ago
- `session_init` won't have it (too old, not in recent 10)
- `context_smart` FINDS it via semantic search
**Without context_smart, you WILL miss relevant older context.**
---
### Search & Code Intelligence (ContextStream-first)
⚠️ **STOP: Before using Search/Glob/Grep/Read/Explore** → Call `search(mode="hybrid")` FIRST. Use local tools ONLY if ContextStream returns 0 results.
**❌ WRONG workflow (wastes tokens, slow):**
Grep "function" → Read file1.ts → Read file2.ts → Read file3.ts → sonunda anla
**✅ CORRECT workflow (fast, complete):**
search(mode="hybrid", query="function implementation") → tamam (sonuçlar bağlamı içerir)
**Why?** ContextStream search returns semantic matches + context + file locations in ONE call. Local tools require multiple round-trips.
**Search Mode Selection:**
| Need | Mode | Example |
|------|------|---------|
| Find code by meaning | `hybrid` | "authentication logic", "error handling" |
| Exact string/symbol | `keyword` | "UserAuthService", "API_KEY" |
| File patterns | `pattern` | "*.sql", "test_*.py" |
| ALL matches (grep-like) | `exhaustive` | "TODO", "FIXME" (find all occurrences) |
| Symbol renaming | `refactor` | "oldFunctionName" (word-boundary matching) |
| Conceptual search | `semantic` | "how does caching work" |
**Token Efficiency:** Use `output_format` to reduce response size:
- `full` (default): Full content for understanding code
- `paths`: File paths only (80% token savings) - use for file listings
- `minimal`: Compact format (60% savings) - use for refactoring
- `count`: Match counts only (90% savings) - use for quick checks
---
### Lessons (Past Mistakes)
- After `session_init`: Check for `lessons` field and apply before work
- Before risky work: `session(action="get_lessons", query="<topic>")`
- On mistakes: `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")`
---
### Plans & Tasks
When user asks to create a plan or implementation roadmap:
1. Create plan: `session(action="capture_plan", title="Plan Title", description="...", goals=["goal1", "goal2"], steps=[{id: "1", title: "Step 1", order: 1}, ...])`
2. Get plan_id from response, then create tasks: `memory(action="create_task", title="Task Title", plan_id="<plan_id>", priority="high|medium|low", description="...")`
To manage existing plans/tasks:
- List plans: `session(action="list_plans")`
- Get plan with tasks: `session(action="get_plan", plan_id="<uuid>", include_tasks=true)`
- List tasks: `memory(action="list_tasks", plan_id="<uuid>")` or `memory(action="list_tasks")` for all
- Update task status: `memory(action="update_task", task_id="<uuid>", task_status="pending|in_progress|completed|blocked")`
---
### Rules Update Notices
- If you see **[RULES_NOTICE]**, update rules via `generate_rules(overwrite_existing=true)` (preserves custom rules).
- If you see **[VERSION_NOTICE]**, tell the user to update MCP using the provided command.
See full documentation: https://contextstream.io/docs/mcp/tools
Kuralları otomatik oluştur
Ayrıca yapay zekadan şunu söyleyerek bu kuralları otomatik olarak oluşturmasını isteyebilirsiniz: "Bu proje için ContextStream kuralları oluşturmak üzere generate_rules kullan"
Dersler sistemi
Öğrenilen dersler sistemi
Hatalardan ders alın — asla tekrarlamayın
Dersler Sistemi, yapay zeka asistanlarının aynı hataları asla tekrarlamaması için hataları, düzeltmeleri ve kullanıcı hayal kırıklıklarını yakalar. Dersler, ilgili olduğunda session_init ve context_smart yanıtlarında otomatik olarak yüzeye çıkarılır.
Dersler ne zaman yakalanmalı
Dersler, bu durumlardan herhangi biri meydana geldiğinde otomatik olarak yakalanmalıdır:
| Tetikleyici | Örnek | Önem Derecesi |
|---|---|---|
| Üretim sorunu | "Bu değişiklik yüzünden site çöktü" | kritik |
| Kullanıcı hayal kırıklığı | "HAYIR! Bunu yapmamanı SÖYLEDİM", "WTF", büyük harf | yüksek |
| Düzeltme | "Bu yanlış, şöyle yapmalısın...", "Bunu düzelt" | orta |
| Kırıcı değişiklik | "Bu testleri bozdu", "Derleme başarısız oldu" | orta/yüksek |
| Tercih belirtildi | "Bunu böyle tercih ederim", "Her zaman X yerine Y yap" | düşük |
Ders alanları açıklandı
| Alan | Açıklama | Örnek |
|---|---|---|
| title | Hatırlanması gereken (emir kipi) | "Göndermeden önce her zaman git'teki varlıkları doğrula" |
| severity | kritik, yüksek, orta, düşük | üretim sorunları için "kritik" |
| category | iş akışı, kod_kalitesi, doğrulama, iletişim, proje_özel | "iş akışı" |
| trigger | Soruna neden olan eylem | "Görselleri taahhüt etmeden onlara referans veren kod gönderildi" |
| impact | Ne yanlış gitti | "Üretim 404 hataları - bozuk açılış sayfası" |
| prevention | Gelecekte nasıl önlenir | "Göndermeden önce izlenmeyen dosyaları kontrol etmek için git status çalıştır" |
| keywords | Gelecekteki bağlamlarda eşleştirme için anahtar kelimeler | ["git", "görseller", "varlıklar", "gönderme"] |
Tam örnek
terminal · session_capture_lesson
// User says: "OH COME ON! You pushed the code but the images are missing
// and now the production site shows broken images!"
session_capture_lesson({
title: "Always verify assets in git before pushing code references",
severity: "critical",
category: "workflow",
trigger: "Pushed code referencing /screenshots/*.png without committing images",
impact: "Production 404 errors - broken landing page with missing images",
prevention: "Run 'git status' to check untracked files before pushing code that references static assets",
keywords: ["git", "images", "assets", "push", "404", "static", "screenshots"]
})
Dersler nasıl yüzeye çıkarılır
Yakalanan dersler, ilgili olduğunda gelecekteki oturumlarda otomatik olarak döndürülür:
session_init
Bu çalışma alanındaki yüksek ve kritik önem derecesine sahip dersler, oturum başlatmaya dahil edilir ve yapay zekayı aynı hatayı yapmadan önce uyarır.
context_smart
Yapay zeka bağlam istediğinde, sorgu anahtar kelimeleriyle eşleşen dersler dahil edilir. Örn. "git push" hakkında soru sormak, "git" veya "push" anahtar kelimelerine sahip dersleri yüzeye çıkarır.
Dersleri alma
Dersleri almak ve filtrelemek için session_get_lessons'i kullanın:
terminal · session_get_lessons örnekleri
// Get all critical lessons
session_get_lessons({ severity: "critical" })
// Get workflow lessons
session_get_lessons({ category: "workflow" })
// Search for relevant lessons
session_get_lessons({ query: "git push images" })
// Combine filters
session_get_lessons({
category: "verification",
severity: "high",
limit: 5
})
Profesyonel ipucu: Kullanıcılar hayal kırıklığı veya düzeltme ifade ettiğinde dersleri otomatik olarak yakalamak için düzenleyicinize kurallar ekleyin (yukarıdaki Düzenleyici AI Kuralları bölümüne bakın). Bu, tekrarlanan hataları önleyen bir bilgi tabanı oluşturur.
Araç kataloğu
MCP araçları.
Tam MCP araç referansına bakın (PRO rozetleri ve yaygın kullanım örnekleri).
Kullanım örnekleri
Ne sorulur.
Bağlandıktan sonra, AI asistanınıza şunun gibi şeyler sorabilirsiniz:
"Veritabanı için PostgreSQL kullanmaya karar verdiğimizi hatırla"
"Kimlik doğrulama hakkında önceki kararlarımız nelerdi?"
"Kod tabanımızda API hız sınırlamasını nasıl ele aldığımızı ara"
"Bana ödeme sistemiyle ilgili bağlamı göster"
Ders örnekleri
AI, hayal kırıklığı veya düzeltme ifade ettiğinizde dersleri otomatik olarak yakalamalıdır:
Kullanıcı der ki
"HAYIR! Testleri çalıştırmadan push yaptın ve şimdi üretim ortamı bozuk!"
→ AI dersi yakalar: önem: kritik, kategori: doğrulama
Kullanıcı der ki
"Bu yanlış. Veritabanı sütunları için her zaman snake_case kullan, camelCase değil."
→ AI dersi yakalar: önem: orta, kategori: kod_kalitesi
Kullanıcı der ki
"TypeScript katı modunu tercih ediyorum. Lütfen her zaman etkinleştir."
→ AI dersi yakalar: önem: düşük, kategori: proje_özel
Bu dersler, ilgili bağlam istendiğinde gelecekteki oturumlarda otomatik olarak yüzeye çıkarılır.
Bakım
Güncel kalmak.
En son özellikleri, hata düzeltmelerini ve iyileştirmeleri almak için MCP sunucusunu periyodik olarak güncelleyin:
terminal · terminal · macOS / Linux
curl -fsSL https://contextstream.io/scripts/mcp.sh | bash
terminal · powershell · Windows
irm https://contextstream.io/scripts/mcp.ps1 | iex
MCP sunucusu, daha yeni bir sürüm mevcut olduğunda sizi otomatik olarak uyaracaktır. Güncelledikten sonra, yeni sürümü kullanmak için AI aracınızı yeniden başlatın.
Sorun Giderme
Bir şey çalışmadığında.
MCP sunucusu başlamıyor
contextstream-mcp yüklü olduğundan ve PATH'inizde mevcut olduğundan emin olun. Hataları kontrol etmek için contextstream-mcp --version komutunu manuel olarak çalıştırmayı deneyin.
Kimlik doğrulama hataları
API anahtarınızın doğru olduğunu ve süresinin dolmadığını doğrulayın. ContextStream kontrol panelinizden yeni bir anahtar oluşturabilirsiniz.
Araçlar görünmüyor
Yapılandırmayı değiştirdikten sonra AI uygulamanızı yeniden başlatın. MCP bağlantı hataları için uygulama günlüklerini kontrol edin.
Çalışma alanı bulunamadı (ilk kurulum)
Hesabınızda henüz çalışma alanı yoksa, ContextStream AI asistanınıza bir çalışma alanı adı sorması için talimat verecektir. Geçerli klasör bir proje olarak oluşturulacaktır. workspace_bootstrap için MCP Araçları bölümüne bakın.
Sonraki adımlar
Keşfetmeye devam edin.
Ekip KurulumuÜyeleri davet edin, bağlamı paylaşın.OkuyunÖğrenilen DerslerHataları yakalayın, asla tekrarlamayın.OkuyunBellek OlaylarıBellek türleri hakkında bilgi edinin.OkuyunAnlamsal AramaAnlama göre arama yapın.Okuyun
{"@context":"https://schema.org","@type":"Organization","name":"ContextStream","url":"https://contextstream.io","logo":"https://contextstream.io/logo.png","description":"Give your AI applications infinite context. Unify code, documentation, and workspace history into a single, queryable intelligence layer with semantic search and knowledge graphs.","sameAs":["https://twitter.com/contextstream","https://github.com/contextstream"]}
{"@context":"https://schema.org","@type":"SoftwareApplication","name":"ContextStream","applicationCategory":"DeveloperApplication","operatingSystem":"Any","description":"Give your AI applications infinite context. Unify code, documentation, and workspace history into a single, queryable intelligence layer with semantic search and knowledge graphs.","offers":{"@type":"Offer","price":"20","priceCurrency":"USD","description":"Pro plan includes a 5-day free trial"},"aggregateRating":{"@type":"AggregateRating","ratingValue":"5","ratingCount":"10"}}