3 पॉइंट द्वारा sleeplesshan 17 시간 전 | अभी कोई टिप्पणी नहीं है. | WhatsApp पर शेयर करें

नमस्ते। हाल में Codex या Claude Code को वास्तविक काम में इस्तेमाल करते हुए, जब LLM जटिल कोड लिखता है तो उस पर आसानी से overload आ जाना या पिछली decisions को पलट देना जैसी समस्याओं को कम करने के लिए, मैं open source के रूप में विकसित किए जा रहे extension skill protocol Dual-Brain का परिचय देना चाहता हूँ。

Dual-Brain, AI को “PM / developer / QA” जैसी भूमिकाएँ बाँटने के बजाय, समस्या को देखने वाली सोच की functions को अलग करने के ज्यादा करीब है。

एक agent तुरंत जवाब नहीं देता, बल्कि right-brain की context interrogation और left-brain की logical verification को क्रम से पूरा करने के बाद orchestrator को अंतिम परिणाम synthesize करने के लिए मजबूर करता है。

1. मौजूदा single-agent execution के 3 failure modes

टर्मिनल में LLM को एक बार में जटिल architecture design या refactoring सौंप दें, तो आमतौर पर ये समस्याएँ अक्सर सामने आती हैं。

  • शब्दशः मान लेने का जाल
    अस्पष्ट requirements को वैसे ही स्वीकार करके, आत्मविश्वास से बिल्कुल गलत कोड build कर देता है。
  • details का नरक
    microscopic code syntax और edge cases में फँसकर, वह अधिक सरल और बेहतर architectural path को खो देता है。
  • amnesia loop
    session खत्म होते ही पिछला context गायब हो जाता है, और पिछले हफ्ते तय की गई architecture direction को अगले session में फिर पलट देता है。

2. समाधान: सोच की दो functions

Dual-Brain को load करने पर main agent orchestrator की भूमिका लेता है और तुरंत जवाब नहीं देता。 इसके बजाय, वह तय क्रम में दो internal review stages चलाता है。

  • right-brain, Right Brain: context / pattern / interrogation
    यह user की requirements को तुरंत implement नहीं करता, बल्कि पहले उन पर शक करता है。 “इस requirement की blind spot क्या है?”, “क्या यह पिछली decisions से टकराती है?”, “क्या terminology अस्पष्ट है?” जैसे सवाल पूछता है。
  • left-brain, Left Brain: logic / verification / code
    right-brain द्वारा बनाई गई problem definition को वास्तविक codebase, official docs और project memory से मिलाकर देखता है。 यह hallucinated API, पुराने assumptions और implement न हो सकने वाले designs को छाँटकर उन्हें executable form में ढालता है。

अंत में orchestrator इन दोनों परिणामों को synthesize करके code changes, documentation और memory update तक ले जाता है。

3. memory tier system

यह skill project root की .dual-brain/MEMORY.md में long-term memory स्टोर करता है。

लेकिन project जितना बड़ा होता है, उतना ही पुरानी decisions और पिछले हफ्ते की active constraints एक ही weight के साथ मिल जाने की समस्या पैदा हो सकती है। इसे हल करने के लिए memory को flat document नहीं, बल्कि tiered memory की तरह संभाला जाता है。

  • Hot Memory
  • Warm Memory
  • Cold Memory
  • Archived Decisions

Hot Memory वे active decisions और constraints हैं जो मौजूदा काम पर ज़ोरदार असर डालते हैं。

Warm Memory वह उपयोगी context है जिसे केवल संबंधित कामों में पढ़ा जाता है。

Cold Memory और Archived Decisions को default रूप से पूरा नहीं पढ़ा जाता; इन्हें केवल keyword search या conflict verification की ज़रूरत होने पर ही देखा जाता है。

refs सिर्फ पढ़ लेने से नहीं बढ़ता; यह तभी बढ़ता है जब उसने वास्तव में question / verification / synthesis / implementation को प्रभावित किया हो。

पुरानी या duplicate memories को अपने-आप compress किया जाता है, और contradictory या discarded decisions को Archived में भेज दिया जाता है。

sensitive information, tokens, keys और personal information को स्टोर या summarize नहीं किया जाता, बल्कि remove/no-store targets की तरह संभाला जाता है。

महत्वपूर्ण बात यह है कि memory truth का source नहीं है。 Dual-Brain में memory advisory context है, और current code तथा official docs को stale memory पर प्राथमिकता दी जाती है。

4. benchmark

repo में Codex के आधार पर single-agent method और Dual-Brain method की तुलना करने वाला एक छोटा benchmark harness शामिल है。

Dual-Brain तेज तरीका नहीं है。 बल्कि इसका उद्देश्य शुरुआत में ज्यादा सोचने के लिए मजबूर करना है, ताकि बाद में इंसान द्वारा फिर से ठीक करने और समझाने वाले loops कम हों。

5. installation

SkillsGate का उपयोग करें तो Codex CLI और Claude Code environments में इस skill को install और manage किया जा सकता है。

npx skillsgate add sleeplesshan/dual-brain -g  
मैनुअल इंस्टॉलेशन भी संभव है।  
 - Codex  
Bash  
git clone [https://github.com/sleeplesshan/dual-brain.git](https://github.com/sleeplesshan/dual-brain.git) ~/.codex/skills/dual-brain  
 - Claude Code  
Bash  
git clone [https://github.com/sleeplesshan/dual-brain.git](https://github.com/sleeplesshan/dual-brain.git) ~/.claude/skills/dual-brain  
इंस्टॉल करने के बाद, हमेशा की तरह प्राकृतिक भाषा में इसे बुलाया जा सकता है।  
  
6. इसे कब इस्तेमाल करना अच्छा है  
Dual-Brain साधारण edits के लिए overkill है。 variable name बदलना, एक लाइन का bug fix, या साफ़ boilerplate के लिए इसे इस्तेमाल करने की खास ज़रूरत नहीं है。  
इसके बजाय, यह इन स्थितियों में बेहतर फिट बैठता है。  
- अस्पष्ट requirements वाली refactoring  
- architecture decisions  
- अपरिचित API या SDK integration  
- ऐसे changes जो पिछली decisions से टकरा सकते हों  
- ऐसे काम जहाँ hallucinated API वास्तविक outage में बदल सकती हो  
- ऐसे tasks जहाँ लगे, “मुझे यह भी नहीं पता कि मैं अभी सही सवाल पूछ रहा हूँ या नहीं”  
  
पूरी `SKILL.md` और benchmark harness को open source (MIT license) के रूप में सार्वजनिक किया गया है.  
मैं LLM orchestration, prompt engineering और agent memory design में रुचि रखने वालों से feedback पाना चाहता हूँ।

अभी कोई टिप्पणी नहीं है.

अभी कोई टिप्पणी नहीं है.