ContextStream MCP Server

आधिकारिक

सत्रों के बीच AI कोडिंग सहायकों के लिए स्थायी स्मृति और अर्थगत खोज

दस्तावेज़

Docs · अनुभाग ब्राउज़ करें

01 · सेटअप विज़ार्ड

एक कमांड, पूरी तरह कॉन्फ़िगर।

प्रमाणीकरण (ब्राउज़र/डिवाइस लॉगिन), API कुंजी बनाने, नियम उत्पन्न करने और आपके टूल के लिए सही MCP कॉन्फ़िग लिखने के लिए एक कमांड चलाएँ (VS Code के servers स्कीमा सहित)।

terminal · terminal · macOS / Linux

curl -fsSL https://contextstream.io/scripts/mcp.sh | bash

terminal · powershell · Windows

irm https://contextstream.io/scripts/mcp.ps1 | iex

पहले से इंस्टॉल है? सेटअप विज़ार्ड फिर से चलाएँ

terminal · terminal · फिर से चलाएँ

contextstream-mcp setup

यह क्या करता है: MCP कॉन्फ़िग लिखता है (VS Code servers, Cursor/Cline/आदि mcpServers), नियम उत्पन्न करता है (मानक/उन्नत), और प्रोजेक्ट को कार्यक्षेत्र से लिंक कर सकता है।

समेकित टूलसेट: विज़ार्ड डिफ़ॉल्ट रूप से ~11 समेकित डोमेन टूल कॉन्फ़िगर करता है (~75% टोकन कमी)। वैकल्पिक: router मोड (~2 मेटा-टूल, सबसे कॉम्पैक्ट)। पूर्ण टूल कैटलॉग देखें।

फ़ाइलें लिखे बिना परिवर्तनों का पूर्वावलोकन करें: contextstream-mcp setup --dry-run

टीम वर्कफ़्लो

साझा मेमोरी, कौशल और संदर्भ सरफेसिंग।

टीम खातों को साझा प्रोजेक्ट से अधिक मिलता है। contextstream-mcp setup के दौरान, विज़ार्ड टीम क्षमता का पता लगाता है और कार्यक्षेत्र युक्तियाँ सरफेस करता है। आपके संपादक में, प्रत्येक session(action="context") कॉल में टीम अनुशंसाएँ, गवर्नेंस संकेत, प्राथमिकता संकेत और लिंक्ड आर्टिफैक्ट शामिल हो सकते हैं।

साझा कार्यक्षेत्र चुनें

सेटअप के दौरान प्रत्येक रेपो को टीम कार्यक्षेत्र से लिंक करें ताकि अनुक्रमण, निर्णय और टिकट संरेखित रहें।

टीम कौशल साझा करें

skill(action="share", scope="team") पुन: प्रयोज्य वर्कफ़्लो प्रकाशित करता है जिन्हें टीम के साथी session(action="context") में ऑटो-मैच करते हैं।

निष्पादन का दायरा बदलें

दोहरे-संदर्भ खाते MCP में --account-mode=team|personal|auto या session set_account_mode का उपयोग करते हैं।

एंटिटी के साथ काम ट्रैक करें

टिकट, हैंडऑफ़, घटनाएँ और रिलीज़ अनुक्रमित रेफरी का उपयोग करते हैं — सत्रों और टीम के साथियों में टिकाऊ।

होस्टेड रिमोट डिफ़ॉल्ट है। स्थानीय बाइनरी MCP केवल-रिकवरी है — जब स्पष्ट रूप से आवश्यकता हो तो CONTEXTSTREAM_ALLOW_LOCAL_MCP=1 सेट करें। आमंत्रण/भूमिकाओं के लिए टीम सेटअप और पोस्ट-लॉगिन चेकलिस्ट देखें।

CLI शॉर्टकट

गैर-संवादात्मक कमांड (CI और रिफ्रेश)।

इन्हें संवादात्मक विज़ार्ड के बिना चलाएँ — अपग्रेड, टीम ऑनबोर्डिंग, क्रेडेंशियल रोटेशन, या कार्यक्षेत्र परिवर्तनों के बाद आदर्श। contextstream-mcp --help में भी सरफेस किया गया।

कमांडकब उपयोग करें
contextstream-mcp update-hooks --scope=globalअपग्रेड या टीम कार्यक्षेत्र में शामिल होने के बाद — PreToolUse/UserPromptSubmit हुक रिफ्रेश करें।
contextstream-mcp update-rules --scope=allनवीनतम टीम वर्कफ़्लो मार्गदर्शन के साथ .cursorrules / CLAUDE.md / AGENTS.md पुनर्जीवित करें।
contextstream-mcp update-configs --scope=globalAPI कुंजी या कार्यक्षेत्र परिवर्तनों के बाद MCP कॉन्फ़िग पुनर्लेखन करें।
contextstream-mcp migrate-remote --scope=allविरासत स्थानीय stdio कॉन्फ़िग को होस्टेड रिमोट ट्रांसपोर्ट में बदलें।
contextstream-mcp detect-editors --format=jsonस्क्रिप्ट करें कि कौन से संपादक इंस्टॉल हैं (बूटस्ट्रैप/CI)।
contextstream-mcp generate-configs --transport=remote --preauthफ़ाइलें लिखे बिना JSON कॉन्फ़िग पेलोड उत्सर्जित करें।
contextstream-mcp configure --transcripts=on --scope=allट्रांसक्रिप्ट कैप्चर डिफ़ॉल्ट गैर-संवादात्मक रूप से सेट करें।

terminal · खाता मोड · टीम बनाम व्यक्तिगत

# 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 · मैन्युअल कॉन्फ़िगरेशन

प्रति-क्लाइंट कॉन्फ़िग।

प्रति क्लाइंट सही प्रारूप का उपयोग करें (VS Code servers का उपयोग करता है; कई अन्य क्लाइंट mcpServers का उपयोग करते हैं)।

समेकित टूलसेट: डिफ़ॉल्ट रूप से, सर्वर ~11 समेकित डोमेन टूल उजागर करता है (विरासत ग्रैन्युलर टूल की तुलना में ~75% टोकन कमी)। और भी कम टूल के लिए, ~2 राउटर मेटा-टूल के लिए env ब्लॉक में "CONTEXTSTREAM_PROGRESSIVE_MODE": "true" जोड़ें। पूर्ण टूल कैटलॉग देखें।

अपने टूल पर जाएं

Cursor / VS CodeWindsurfCodex CLIOpenCode CLIClaude CodeClaude DesktopClineKilo CodeRoo CodeAntigravity

MCP क्या है?

AI के लिए एक खुला प्रोटोकॉल।

मॉडल कॉन्टेक्स्ट प्रोटोकॉल (MCP) एक खुला मानक है जो AI सहायकों को बाहरी टूल और डेटा स्रोतों से जुड़ने की अनुमति देता है। ContextStream के MCP सर्वर के साथ, आपके AI टूल यह कर सकते हैं:

  • सत्रों में बातचीत और निर्णय याद रखें
  • अपने कोडबेस और दस्तावेज़ीकरण को सिमैंटिक रूप से खोजें
  • ज्ञान ग्राफ बनाएं और क्वेरी करें
  • विभिन्न AI टूल के बीच संदर्भ साझा करें

प्राकृतिक भाषा

बस पूछें। AI टूल संभालता है।

आपको टूल के नाम याद रखने या उन्हें सीधे कॉल करने की आवश्यकता नहीं है। बस सादे अंग्रेजी में वर्णन करें कि आप क्या चाहते हैं और आपका AI सहायक स्वचालित रूप से सही टूल का उपयोग करेगा।

बस स्वाभाविक रूप से पूछें

  • · "सत्र सारांश"
  • · "हमने प्रमाणीकरण के बारे में क्या निर्णय लिया?"
  • · "याद रखें हम PostgreSQL का उपयोग कर रहे हैं"
  • · "भुगतान कोड खोजें"

AI बाकी संभालता है

  • · प्रासंगिक संदर्भ स्वचालित रूप से ढूंढता है
  • · जरूरत पड़ने पर पिछले निर्णयों को याद करता है
  • · महत्वपूर्ण जानकारी को मेमोरी में सहेजता है
  • · कोड और दस्तावेज़ीकरण खोजता है

उदाहरण · "सत्र सारांश"

Natural language example: typing 'session summary' and the AI automatically uses context_smart

AI आपके इरादे को समझता है और पर्दे के पीछे उपयुक्त ContextStream टूल को कॉल करता है।

पूर्वापेक्षाएँ

आपको क्या चाहिए।

  • एक ContextStream खाता (सेटअप विज़ार्ड ब्राउज़र लॉगिन के माध्यम से API कुंजी बना सकता है)।

संदर्भ समृद्ध करें

GitHub + Slack एकीकरण

MCP आपके AI को स्थायी मेमोरी देता है। GitHub और Slack को जोड़ने से वह मेमोरी अधिक समृद्ध हो जाती है — आपका AI प्रश्नों का उत्तर देते समय स्वचालित रूप से PR, मुद्दों और टीम चर्चाओं का संदर्भ ले सकता है।

स्वचालित संदर्भ संवर्धन

जब आप context_smart या session_smart_search कॉल करते हैं, तो प्रासंगिक GitHub मुद्दे, PR और Slack चर्चाएँ स्वचालित रूप से शामिल हो जाती हैं। कोई अतिरिक्त टूल की आवश्यकता नहीं।

GitHubSync मुद्दे, PR, रिलीज़ और टिप्पणियाँ। चर्चाओं से निर्णय स्वचालित रूप से निकाले जाते हैं।SlackSync चैनल और थ्रेड। उच्च-सहभागिता वाली बातचीत को स्कोर और प्राथमिकता दी जाती है।

उदाहरण संकेत

  • · "हमने प्रमाणीकरण के बारे में क्या निर्णय लिया?" — GitHub मुद्दों + Slack थ्रेड से निर्णय ढूंढता है
  • · "मुझे भुगतान प्रणाली पर हाल की गतिविधि दिखाएं" — PR, मुद्दे और टीम चर्चाएँ सरफेस करता है
  • · "पिछले आउटेज से हमने क्या सबक सीखा?" — Slack और GitHub से अंतर्दृष्टि प्राप्त करता है
  • · "मुझे GitHub गतिविधि का साप्ताहिक सारांश दें" — integration(provider="github", action="summary", ...) का उपयोग करता है
  • · "डेटाबेस माइग्रेशन चर्चाओं के लिए सभी एकीकरण खोजें" — integration(provider="all", action="search", ...) का उपयोग करता है
  • · "मुझे सभी स्रोतों से साप्ताहिक टीम सारांश दें" — integration(provider="all", action="summary", ...) का उपयोग करता है

एकीकरण टूल क्रियाएँ त्वरित संदर्भ

integration(provider="github|slack|all", action="...") का उपयोग करें

GitHub (provider="github")

  • action="stats" — आँकड़े और सिंक स्थिति
  • action="search" — स्थिति/समय सीमा फ़िल्टर के साथ खोजें
  • action="activity" — गतिविधि फ़ीड (दिन फ़िल्टर)
  • action="knowledge" — निकाले गए निर्णय/सबक
  • action="summary" — साप्ताहिक/मासिक सारांश
  • action="repos" — सिंक किए गए रेपो की सूची बनाएं
  • action="issues" — मुद्दों/PR की सूची बनाएं

Slack (provider="slack")

  • action="stats" — आँकड़े और सिंक स्थिति
  • action="search" — चैनल/समय सीमा फ़िल्टर के साथ खोजें
  • action="discussions" — उच्च-सहभागिता थ्रेड
  • action="knowledge" — निकाले गए निर्णय/सबक
  • action="summary" — साप्ताहिक/मासिक सारांश
  • action="channels" — सिंक किए गए चैनलों की सूची बनाएं

क्रॉस-स्रोत (provider="all")

  • action="status" — सभी जुड़े एकीकरणों की सिंक स्थिति और स्वास्थ्य की जाँच करें
  • action="search" — एक ही क्वेरी में सभी जुड़े एकीकरणों में खोजें
  • action="summary" — सभी स्रोतों में एकीकृत गतिविधि सारांश (दिन फ़िल्टर)
  • action="knowledge" — सभी स्रोतों से निर्णय, सबक और अंतर्दृष्टि प्राप्त करें

क्लाइंट · Cursor / VS Code

Cursor / VS Code

Cursor और VS Code विभिन्न MCP कॉन्फ़िग स्कीमा का उपयोग करते हैं। Cursor अभी भी स्थानीय MCP प्रक्रिया का उपयोग करता है, लेकिन VS Code/Copilot अब सीधे HTTP पर होस्टेड ContextStream MCP का उपयोग कर सकता है।

terminal · .cursor/mcp.json (प्रोजेक्ट) या ~/.cursor/mcp.json (वैश्विक)

{
  "mcpServers": {
    "contextstream": {
      "command": "contextstream-mcp",
      "env": {
        "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
        "CONTEXTSTREAM_API_KEY": "your_api_key"
      }
    }
  }
}

VS Code / Copilot के लिए अनुशंसित: एक-क्लिक रिमोट इंस्टॉल

होस्टेड ContextStream MCP इंस्टॉल करें और VS Code को पहले उपयोग पर OAuth संभालने दें। .vscode/mcp.json में कोई स्थानीय बाइनरी या API कुंजी रखने की आवश्यकता नहीं है।

VS Code में इंस्टॉल करेंVS Code MCP डॉक्स

terminal · .vscode/mcp.json (VS Code नेटिव MCP, रिमोट)

{
  "servers": {
    "contextstream": {
      "type": "http",
      "url": "https://mcp.contextstream.io/mcp?default_context_mode=fast"
    }
  }
}

कमांड लाइन पसंद करते हैं? code --add-mcp के साथ रिमोट सर्वर जोड़ें

terminal · terminal

code --add-mcp '{"name":"contextstream","type":"http","url":"https://mcp.contextstream.io/mcp?default_context_mode=fast"}'

पहले उपयोग पर, VS Code को ContextStream को अधिकृत करने और फिर स्वचालित रूप से सेटअप पूरा करने के लिए संकेत देना चाहिए।

स्व-होस्टेड? उसी रिमोट कॉन्फ़िग को https://mcp.contextstream.io/mcp?default_context_mode=fast के बजाय अपने स्वयं के MCP गेटवे URL पर इंगित करें।

क्लाइंट · OpenCode CLI

OpenCode CLI

OpenCode CLI के साथ ContextStream का उपयोग करने के लिए, अपनी ~/.config/opencode/opencode.json फ़ाइल (या आपके प्रोजेक्ट रूट में opencode.json) में MCP सर्वर कॉन्फ़िगरेशन जोड़ें:

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"
      }
    }
  }
}

कॉन्फ़िग संपादित करने के बाद, OpenCode को पुनरारंभ करें ताकि वह ContextStream MCP सर्वर लोड कर सके।

क्लाइंट · Codex CLI

Codex CLI

Codex CLI के साथ ContextStream का उपयोग करने के लिए, अपनी ~/.codex/config.toml फ़ाइल में MCP सर्वर कॉन्फ़िगरेशन जोड़ें:

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"

कॉन्फ़िग संपादित करने के बाद, Codex को पुनरारंभ करें ताकि वह ContextStream MCP सर्वर लोड कर सके।

क्लाइंट · Claude Code

Claude Code (CLI)

अपनी प्रोजेक्ट निर्देशिका से यह कमांड चलाकर Claude Code में ContextStream जोड़ें:

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 चेतावनी (नेटिव Windows, WSL नहीं): -- के बाद cmd /c contextstream-mcp का उपयोग करें।

वैकल्पिक: 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"}}'

युक्ति: टीम सेटअप के लिए, शेल इतिहास में कुंजियाँ एम्बेड करने के बजाय प्रतिबद्ध .mcp.json फ़ाइल (प्रोजेक्ट स्कोप) को प्राथमिकता दें।

यह आपके प्रोजेक्ट के पथ के तहत ~/.claude.json में ContextStream जोड़ता है, जिससे उस निर्देशिका में काम करते समय यह उपलब्ध हो जाता है।

MCP स्कोप विकल्प

  • · स्थानीय (डिफ़ॉल्ट): आपके लिए निजी, केवल वर्तमान प्रोजेक्ट → प्रोजेक्ट पथ के तहत ~/.claude.json में संग्रहीत।
  • · उपयोगकर्ता (--scope user): आपके लिए निजी, सभी प्रोजेक्ट → वैश्विक रूप से ~/.claude.json में संग्रहीत।
  • · प्रोजेक्ट (--scope project): टीम के साथ साझा → प्रोजेक्ट रूट में .mcp.json में संग्रहीत (git पर कमिट करें)।

टीम साझाकरण के लिए, .mcp.json फ़ाइल बनाने के लिए प्रोजेक्ट स्कोप का उपयोग करें जिसे git पर कमिट किया जा सके:

terminal · .mcp.json (प्रोजेक्ट स्कोप)

{
  "mcpServers": {
    "contextstream": {
      "command": "contextstream-mcp",
      "env": {
        "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
        "CONTEXTSTREAM_API_KEY": "your_api_key"
      }
    }
  }
}

MCP सर्वर जोड़ने के बाद, परिवर्तनों को प्रभावी होने के लिए Claude Code को पुनरारंभ करें। claude mcp list से सत्यापित करें कि सर्वर लोड हो गया है। .mcp.json से प्रोजेक्ट-स्कोप वाले सर्वरों के लिए, Claude Code पहले उपयोग पर अनुमोदन के लिए संकेत देगा।

क्लाइंट · Claude Desktop

Claude Desktop (GUI ऐप)

Claude Desktop एप्लिकेशन में ContextStream जोड़ें:

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"
      }
    }
  }
}

कॉन्फ़िग संपादित करने के बाद, परिवर्तनों को प्रभावी होने के लिए Claude Desktop को छोड़ें और पुनरारंभ करें।

क्लाइंट · Windsurf

Windsurf

वैश्विक MCP कॉन्फ़िग फ़ाइल संपादित करके Windsurf में ContextStream जोड़ें:

कॉन्फ़िग: ~/.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"
      }
    }
  }
}

नियम फ़ाइलें

  • · वैश्विक: ~/.codeium/windsurf/memories/global_rules.md
  • · प्रोजेक्ट: .windsurf/rules/contextstream.md

Windsurf ContextStream नियमों के स्वचालित प्रवर्तन के लिए हुक का समर्थन करता है। कॉन्फ़िग संपादित करने के बाद, परिवर्तनों को प्रभावी होने के लिए Windsurf को पुनरारंभ करें।

क्लाइंट · Cline

Cline

अपने Cline MCP कॉन्फ़िगरेशन में ContextStream जोड़ें। Cline में MCP सर्वर आइकन पर क्लिक करें, "कॉन्फ़िगर करें" टैब चुनें, फिर संपादित करने के लिए "MCP सर्वर कॉन्फ़िगर करें" पर क्लिक करें:

terminal · cline_mcp_settings.json

{
  "mcpServers": {
    "contextstream": {
      "command": "contextstream-mcp",
      "env": {
        "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
        "CONTEXTSTREAM_API_KEY": "your_api_key"
      }
    }
  }
}

कॉन्फ़िग संपादित करने के बाद, परिवर्तनों को प्रभावी होने के लिए Cline को पुनरारंभ करें। आप विशिष्ट टूल को ऑटो-अनुमोदित करने के लिए alwaysAllow का भी उपयोग कर सकते हैं।

क्लाइंट · Kilo Code

Kilo Code

अपने Kilo Code MCP कॉन्फ़िगरेशन में ContextStream जोड़ें। आप MCP सर्वर को वैश्विक रूप से या प्रति-प्रोजेक्ट कॉन्फ़िगर कर सकते हैं:

वैश्विक: mcp_settings.json खोलने के लिए सेटिंग्स → MCP सर्वर → इंस्टॉल्ड → वैश्विक MCP संपादित करें पर क्लिक करें

प्रोजेक्ट: आपके प्रोजेक्ट रूट में .kilocode/mcp.json

terminal · .kilocode/mcp.json (या mcp_settings.json)

{
  "mcpServers": {
    "contextstream": {
      "command": "contextstream-mcp",
      "env": {
        "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
        "CONTEXTSTREAM_API_KEY": "your_api_key"
      }
    }
  }
}

प्रोजेक्ट-स्तरीय कॉन्फ़िग वैश्विक कॉन्फ़िग पर प्राथमिकता लेते हैं। संपादन के बाद Kilo Code को पुनरारंभ करें।

क्लाइंट · Roo Code

Roo Code

अपने Roo Code MCP कॉन्फ़िगरेशन में ContextStream जोड़ें। आप MCP सर्वर को वैश्विक रूप से या प्रति-प्रोजेक्ट कॉन्फ़िगर कर सकते हैं:

वैश्विक: mcp_settings.json खोलने के लिए सेटिंग्स आइकन → वैश्विक MCP संपादित करें पर क्लिक करें

प्रोजेक्ट: आपके प्रोजेक्ट रूट में .roo/mcp.json

terminal · .roo/mcp.json (या mcp_settings.json)

{
  "mcpServers": {
    "contextstream": {
      "command": "contextstream-mcp",
      "env": {
        "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
        "CONTEXTSTREAM_API_KEY": "your_api_key"
      }
    }
  }
}

प्रोजेक्ट-स्तरीय कॉन्फ़िग वैश्विक कॉन्फ़िग पर प्राथमिकता लेते हैं। संपादन के बाद Roo Code को पुनरारंभ करें।

क्लाइंट · Antigravity

Antigravity (Google)

Antigravity Cursor/Claude Desktop के समान प्रारूप वाली प्रोजेक्ट-स्कोप्ड .mcp.json फ़ाइलों का उपयोग करता है:

terminal · .mcp.json (प्रोजेक्ट रूट)

{
  "mcpServers": {
    "contextstream": {
      "command": "contextstream-mcp",
      "env": {
        "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
        "CONTEXTSTREAM_API_KEY": "your_api_key"
      }
    }
  }
}

Windows उपयोगकर्ता: cmd रैपर का उपयोग करें

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"
      }
    }
  }
}

नियम फ़ाइलें

  • · वैश्विक: ~/.gemini/GEMINI.md
  • · कार्यक्षेत्र: .agent/rules/contextstream.md

अपने कॉन्फ़िगरेशन को सत्यापित करने के लिए "..." मेनू → "MCP सर्वर" → "कच्चा कॉन्फ़िग देखें" के माध्यम से पहुँचें। संपादन के बाद Antigravity को पुनरारंभ करें।

संपादक नियम

स्वचालित ContextStream उपयोग में सुधार करें

अनुशंसित

ContextStream की ऑटो-संदर्भ सुविधा जब भी आप किसी ContextStream टूल का उपयोग करते हैं तो कार्यक्षेत्र संदर्भ स्वचालित रूप से लोड करती है। हालाँकि, AI सहायक हमेशा सक्रिय रूप से निर्णय सहेज नहीं सकते या पिछले संदर्भ को याद नहीं कर सकते। संपादक AI नियम जोड़ने से स्थिरता में सुधार होता है और यह सुनिश्चित होता है कि AI आपकी बातचीत के दौरान स्वचालित रूप से निर्णय, प्राथमिकताएँ और महत्वपूर्ण संदर्भ कैप्चर करता है।

महत्वपूर्ण: MCP टूल नामकरण परंपराएँ

विभिन्न AI उपकरण MCP टूल के लिए विभिन्न नामकरण परंपराओं का उपयोग करते हैं। गलत प्रारूप का उपयोग करने से टूल नहीं मिलेंगे।

AI उपकरणप्रारूपउदाहरण
Claude Codemcp____mcp__contextstream__session_init
Codex CLI / OpenCode CLI (कच्चा नाम)session_init
Cursor / Windsurf / Cline (कच्चा नाम)session_init
Kilo Code / Roo Code (कच्चा नाम)session_init

सारांश: केवल Claude Code mcp__contextstream__ उपसर्ग का उपयोग करता है। अन्य सभी उपकरण कच्चे टूल नामों का उपयोग करते हैं।

आप दो स्तरों पर ContextStream नियम जोड़ सकते हैं: वैश्विक (सभी प्रोजेक्ट पर लागू होता है) या प्रोजेक्ट (एक प्रोजेक्ट पर लागू होता है)।

वैश्विक नियम (सभी प्रोजेक्ट)

इन्हें एक बार जोड़ें और वे स्वचालित रूप से हर प्रोजेक्ट पर लागू होंगे:

संपादकवैश्विक नियम स्थान
Cursorसेटिंग्स → सामान्य → AI के लिए नियम
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 (वैश्विक) या मूल फ़ोल्डर (जैसे ~/dev/AGENTS.md)
OpenCode CLI~/.config/opencode/AGENTS.md

प्रोजेक्ट नियम (एकल प्रोजेक्ट)

इन्हें किसी विशिष्ट प्रोजेक्ट में जोड़ें। Cursor फ़ोल्डर-आधारित नियमों के लिए, सक्रियण मोड को "हमेशा चालू" पर सेट करें ताकि नियम हमेशा सक्रिय रहें।

संपादकप्रोजेक्ट नियम स्थान
Cursor.cursorrules या .cursor/rules/*.mdc
Windsurf.windsurf/rules/contextstream.md
Cline.clinerules फ़ाइल या .clinerules/ फ़ोल्डर
Kilo Code.kilocode/rules/
Roo Code.roo/rules/contextstream.md या .roo/rules/ फ़ोल्डर
Claude Codeप्रोजेक्ट रूट में CLAUDE.md
Codex CLIप्रोजेक्ट रूट में AGENTS.md
OpenCode CLIप्रोजेक्ट रूट में AGENTS.md
Aiderप्रोजेक्ट रूट में .aider.conf.yml

सक्रियण मोड (Cursor, Kilo Code और Roo Code)

फ़ोल्डर-आधारित नियमों (जैसे, .cursor/rules/) का उपयोग करते समय, प्रत्येक नियम फ़ाइल का एक सक्रियण मोड होता है:

  • हमेशा चालू — हमेशा सक्रिय (ContextStream के लिए अनुशंसित)
  • मैन्युअल — केवल तब जब आप नियम का @mention करें
  • मॉडल निर्णय — AI विवरण के आधार पर निर्णय लेता है
  • ग्लोब — मिलान फ़ाइल पैटर्न के लिए सक्रिय

वैश्विक नियम और रूट-स्तरीय फ़ाइलें (.cursorrules) हमेशा सक्रिय रहती हैं।

सेटअप विज़ार्ड पसंद करते हैं? पहले इसे चलाएँ। अन्यथा, इन मानक नियमों को मैन्युअल रूप से जोड़ें। प्रत्येक संपादक के लिए उदाहरण:

Claude Code

अपने प्रोजेक्ट रूट में CLAUDE.md फ़ाइल बनाएँ या अपने वैश्विक ~/.claude/CLAUDE.md में जोड़ें:

terminal · CLAUDE.md (मानक)

## 🚨 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

उन्नत नियम दिखाएँ (वर्बोज़)

terminal · CLAUDE.md (उन्नत)

## 🚨 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 → अंततः समझें


**✅ CORRECT workflow (fast, complete):**

mcp__contextstream__search(mode="hybrid", query="function implementation") → हो गया (परिणामों में संदर्भ शामिल है)


**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

अपने प्रोजेक्ट रूट (प्रोजेक्ट नियम) में या ~/.codex/AGENTS.md (Codex वैश्विक) / ~/.config/opencode/AGENTS.md (OpenCode वैश्विक) में AGENTS.md फ़ाइल बनाएँ:

Codex / OpenCode बनाम Claude टूल नाम

Codex / OpenCode कच्चे MCP टूल नामों का उपयोग करते हैं (जैसे, session_init)। Claude Code नेमस्पेस्ड टूल नामों का उपयोग करता है (जैसे, mcp__contextstream__session_init)। अपने AI टूल के लिए सही प्रारूप का उपयोग करें।

terminal · AGENTS.md (मानक)

## 🚨 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

उन्नत नियम दिखाएँ (वर्बोज़)

terminal · AGENTS.md (उन्नत)

## 🚨 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 → अंततः समझें


**✅ CORRECT workflow (fast, complete):**

search(mode="hybrid", query="function implementation") → हो गया (परिणामों में संदर्भ शामिल है)


**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

अपने प्रोजेक्ट रूट में .windsurf/rules/contextstream.md फ़ाइल बनाएँ या अपने वैश्विक ~/.codeium/windsurf/memories/global_rules.md में जोड़ें:

terminal · .windsurf/rules/contextstream.md (मानक)

## 🚨 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

उन्नत नियम दिखाएँ (वर्बोज़)

terminal · .windsurf/rules/contextstream.md (उन्नत)

## 🚨 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 → अंततः समझें


**✅ CORRECT workflow (fast, complete):**

search(mode="hybrid", query="function implementation") → हो गया (परिणामों में संदर्भ शामिल है)


**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/ में एक Markdown फ़ाइल बनाएँ:

terminal · .kilocode/rules/contextstream.md (मानक)

## 🚨 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

उन्नत नियम दिखाएँ (वर्बोज़)

terminal · .kilocode/rules/contextstream.md (उन्नत)

## 🚨 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 → अंततः समझें


**✅ CORRECT workflow (fast, complete):**

search(mode="hybrid", query="function implementation") → हो गया (परिणामों में संदर्भ शामिल है)


**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

अपने प्रोजेक्ट रूट में .clinerules फ़ाइल बनाएँ या .clinerules/ फ़ोल्डर का उपयोग करें:

terminal · .clinerules (मानक)

## 🚨 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

उन्नत नियम दिखाएँ (वर्बोज़)

terminal · .clinerules (उन्नत)

## 🚨 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 → अंततः समझें


**✅ CORRECT workflow (fast, complete):**

search(mode="hybrid", query="function implementation") → हो गया (परिणामों में संदर्भ शामिल है)


**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

.roo/rules/contextstream.md फ़ाइल बनाएँ या .roo/rules/ फ़ोल्डर का उपयोग करें:

terminal · .roo/rules/contextstream.md (मानक)

## 🚨 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

उन्नत नियम दिखाएँ (वर्बोज़)

terminal · .roo/rules/contextstream.md (उन्नत)

## 🚨 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 → अंततः समझें


**✅ CORRECT workflow (fast, complete):**

search(mode="hybrid", query="function implementation") → हो गया (परिणामों में संदर्भ शामिल है)


**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

नियम ऑटो-जनरेट करें

आप AI से यह कहकर भी इन नियमों को स्वचालित रूप से उत्पन्न करने के लिए कह सकते हैं: "इस प्रोजेक्ट के लिए ContextStream नियम बनाने के लिए generate_rules का उपयोग करें"

सबक प्रणाली

सीखे गए सबक प्रणाली

गलतियों से सीखें — उन्हें कभी न दोहराएं

सबक प्रणाली गलतियों, सुधारों और उपयोगकर्ता की निराशाओं को कैप्चर करती है ताकि AI सहायक कभी भी वही त्रुटियाँ न दोहराएँ। प्रासंगिक होने पर सबक स्वचालित रूप से session_init और context_smart प्रतिक्रियाओं में सरफेस किए जाते हैं।

सबक कब कैप्चर करें

जब भी ये स्थितियाँ उत्पन्न हों तो सबक स्वचालित रूप से कैप्चर किए जाने चाहिए:

ट्रिगरउदाहरणगंभीरता
उत्पादन समस्या"उस बदलाव के कारण साइट डाउन है"critical
उपयोगकर्ता निराशा"नहीं! मैंने तुमसे कहा था ऐसा मत करो", "WTF", कैप्स लॉकhigh
सुधार"यह गलत है, तुम्हें चाहिए...", "इसे ठीक करो"medium
ब्रेकिंग चेंज"इससे टेस्ट टूट गए", "बिल्ड फेल हो गया"medium/high
वरीयता बताई गई"मैं इसे इस तरह पसंद करता हूँ", "हमेशा X के बजाय Y करो"low

सबक फ़ील्ड की व्याख्या

फ़ील्डविवरणउदाहरण
titleक्या याद रखना है (अनिवार्य)"पुश करने से पहले हमेशा git में एसेट्स सत्यापित करें"
severitycritical, high, medium, lowउत्पादन समस्याओं के लिए "critical"
categoryworkflow, code_quality, verification, communication, project_specific"workflow"
triggerकिस क्रिया ने समस्या उत्पन्न की"छवियों को कमिट किए बिना उन्हें संदर्भित करने वाला कोड पुश किया"
impactक्या गलत हुआ"उत्पादन 404 त्रुटियाँ - टूटा हुआ लैंडिंग पेज"
preventionभविष्य में कैसे रोकें"पुश करने से पहले अनट्रैक्ड फ़ाइलों की जाँच के लिए git status चलाएँ"
keywordsभविष्य के संदर्भों में मिलान के लिए कीवर्ड["git", "images", "assets", "push"]

पूर्ण उदाहरण

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"]
})

सबक कैसे सरफेस किए जाते हैं

कैप्चर किए गए सबक प्रासंगिक होने पर भविष्य के सत्रों में स्वचालित रूप से लौटाए जाते हैं:

session_init

इस कार्यक्षेत्र से उच्च और गंभीर गंभीरता वाले सबक सत्र आरंभीकरण में शामिल किए जाते हैं, AI को वही गलती करने से पहले चेतावनी देते हैं।

context_smart

जब AI संदर्भ मांगता है, तो क्वेरी कीवर्ड से मेल खाने वाले सबक शामिल किए जाते हैं। जैसे, "git push" के बारे में पूछने पर "git" या "push" कीवर्ड वाले सबक सरफेस होते हैं।

सबक प्राप्त करना

सबक प्राप्त करने और फ़िल्टर करने के लिए session_get_lessons का उपयोग करें:

terminal · session_get_lessons उदाहरण

// 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
})

प्रो टिप: जब उपयोगकर्ता निराशा या सुधार व्यक्त करते हैं तो स्वचालित रूप से सबक कैप्चर करने के लिए अपने संपादक में नियम जोड़ें (ऊपर संपादक AI नियम अनुभाग देखें)। यह एक ज्ञान आधार बनाता है जो बार-बार होने वाली गलतियों को रोकता है।

टूल कैटलॉग

MCP उपकरण।

पूर्ण MCP टूल संदर्भ (PRO बैज और सामान्य उपयोग उदाहरण) देखें।

MCP उपकरण संदर्भ देखेंसमेकित टूलसेट विरासत ग्रैन्युलर टूल की तुलना में ~75% टोकन कमी के लिए ~11 डोमेन टूल का उपयोग करता है।पढ़ें

उपयोग उदाहरण

क्या पूछें।

एक बार कनेक्ट होने पर, आप अपने AI सहायक से ऐसी चीज़ें पूछ सकते हैं:

"याद रखें कि हमने डेटाबेस के लिए PostgreSQL का उपयोग करने का निर्णय लिया था"

"प्रमाणीकरण के बारे में हमारे पिछले निर्णय क्या थे?"

"हमारे कोडबेस में खोजें कि हम API दर सीमित करने को कैसे संभालते हैं"

"मुझे भुगतान प्रणाली के बारे में संबंधित संदर्भ दिखाएं"

सबक उदाहरण

जब आप निराशा या सुधार व्यक्त करते हैं तो AI को स्वचालित रूप से सबक कैप्चर करना चाहिए:

उपयोगकर्ता कहता है

"नहीं! आपने बिना टेस्ट चलाए पुश कर दिया और अब उत्पादन टूट गया है!"

→ AI सबक कैप्चर करता है गंभीरता: critical, श्रेणी: verification के साथ

उपयोगकर्ता कहता है

"यह गलत है। डेटाबेस कॉलम के लिए हमेशा snake_case का उपयोग करें, camelCase नहीं।"

→ AI सबक कैप्चर करता है गंभीरता: medium, श्रेणी: code_quality के साथ

उपयोगकर्ता कहता है

"मैं TypeScript स्ट्रिक्ट मोड पसंद करता हूँ। कृपया इसे हमेशा सक्षम करें।"

→ AI सबक कैप्चर करता है गंभीरता: low, श्रेणी: project_specific के साथ

ये सबक भविष्य के सत्रों में स्वचालित रूप से सरफेस किए जाते हैं जब प्रासंगिक संदर्भ का अनुरोध किया जाता है।

रखरखाव

अद्यतित रहना।

नवीनतम सुविधाएँ, बग फिक्स और सुधार प्राप्त करने के लिए, समय-समय पर MCP सर्वर को अपडेट करें:

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 सर्वर स्वचालित रूप से आपको चेतावनी देगा। अपडेट करने के बाद, नए संस्करण का उपयोग करने के लिए अपने AI टूल को पुनरारंभ करें।

समस्या निवारण

जब कुछ काम न करे।

MCP सर्वर प्रारंभ नहीं हो रहा

सुनिश्चित करें कि contextstream-mcp इंस्टॉल है और आपके PATH में उपलब्ध है। त्रुटियों की जाँच के लिए मैन्युअल रूप से contextstream-mcp --version चलाने का प्रयास करें।

प्रमाणीकरण त्रुटियाँ

सत्यापित करें कि आपकी API कुंजी सही है और समाप्त नहीं हुई है। आप अपने ContextStream डैशबोर्ड से एक नई कुंजी उत्पन्न कर सकते हैं।

उपकरण दिखाई नहीं दे रहे

कॉन्फ़िग संशोधित करने के बाद अपने AI एप्लिकेशन को पुनरारंभ करें। MCP कनेक्शन त्रुटियों के लिए एप्लिकेशन लॉग जाँचें।

कोई कार्यक्षेत्र नहीं मिला (पहली बार सेटअप)

यदि आपके खाते में अभी तक कोई कार्यक्षेत्र नहीं है, तो ContextStream आपके AI सहायक को आपसे कार्यक्षेत्र का नाम पूछने के लिए संकेत देगा। वर्तमान फ़ोल्डर एक प्रोजेक्ट के रूप में बनाया जाएगा। workspace_bootstrap के लिए MCP उपकरण देखें।

अगले कदम

अन्वेषण जारी रखें।

टीम सेटअपसदस्यों को आमंत्रित करें, संदर्भ साझा करें।पढ़ेंसीखे गए सबकगलतियाँ कैप्चर करें, उन्हें कभी न दोहराएं।पढ़ेंमेमोरी इवेंटमेमोरी प्रकारों के बारे में जानें।पढ़ेंसिमैंटिक सर्चअर्थ के आधार पर खोजें।पढ़ें

{"@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"}}