The GSD Framework
The GSD Framework: Mastering Autonomous Coding with Claude Code
The dream of AI-assisted development is to write a single prompt, grab a coffee, and return to a fully functioning application. The reality, however, is much messier. If you give an AI agent an open-ended task, it usually performs brilliantly for the first 10 minutes before succumbing to "Context Rot", a state where its memory overflows, it loses track of the architecture, and it begins to hallucinate or break existing code.
To achieve true autonomous coding, you cannot just give an AI a prompt; you must give it a system. This is where the GSD (Get Shit Done) framework comes into play.
What is the GSD Framework?
Originally a productivity mantra, GSD in the context of AI and CLI tools like Claude Code is a strict, structured methodology designed to force AI agents into a disciplined workflow. It transforms an unpredictable AI into a reliable, autonomous engineering team by enforcing memory segmentation, mandatory verification, and strict boundaries.
The Core Problem: Context Rot
Large Language Models (LLMs) have a finite Context Window. When Claude Code modifies multiple files, reads terminal outputs, and generates new functions, that window fills up with noise. When the AI is forced to hold the entire project history in its "working memory," it gets confused. GSD solves this by flushing the memory and starting fresh for every specific task.
The 3 Pillars of GSD in Claude Code
1. Memory Segmentation (The Phased Approach)
Under the GSD framework, you never ask Claude Code to "build a feature." Instead, you force it to operate in isolated phases: Plan, Execute, and Review.
implementation_plan.md).2. The Sub-Agent Ecosystem
GSD treats Claude Code not as a single developer, but as a team of specialized sub-agents.
By defining these roles in your initial system prompt, Claude Code shifts its persona based on the current step in the checklist, preventing it from rushing ahead.
3. The Autonomous Self-Correction Loop
The most critical part of the GSD framework is the verification mandate. Before Claude Code is allowed to mark a task as "Done" and move to the next item on the checklist, it must prove that the code works.
How to Implement GSD Today
To use this in Claude Code, your initial prompt must establish the boundaries. Instead of saying "Add a payment gateway," your prompt should look like this:
"You are operating under the GSD framework. Step 1: Analyze the requirement and create a 5-phase plan. Do not write code. Step 2: Await my approval. Step 3: Execute step 1 of the plan. Step 4: Run tests and self-correct any errors. Do not proceed to the next step until the current step passes all tests and is committed to Git."
By enforcing the GSD framework, you shift your role entirely. You are no longer a programmer fighting with syntax; you are a CTO managing a highly efficient, autonomous digital team.
What is this?
You can copy the sources for these commands and download them via the terminal. If you don't know how, you can join the course that we are preparing now. The link is at the bottom of the page.
إطار عمل GSD
إطار عمل GSD: كيف تتقن البرمجة الذاتية (Autonomous Coding) باستخدام Claude Code
الحلم الأكبر لأي مطور يستخدم الذكاء الاصطناعي هو كتابة أمر (Prompt) واحد، الذهاب لشرب القهوة، والعودة ليجد التطبيق جاهزاً ويعمل بكفاءة. لكن الواقع مختلف تماماً؛ إذا أعطيت الذكاء الاصطناعي مهمة مفتوحة، سيبدع في أول 10 دقائق، ثم يصاب بما يسمى بـ "تآكل السياق" (Context Rot). تمتلئ ذاكرته، يضيع في تفاصيل المعمارية، ويبدأ في الهلوسة أو تخريب الكود الذي كتبه بنفسه!
لتحقيق "التشغيل الذاتي" (Autonomous Coding) الحقيقي، لا يكفي أن تعطي الـ AI أمراً، بل يجب أن تفرض عليه "نظاماً". هنا يأتي دور إطار عمل GSD (Get Shit Done).
ما هو إطار عمل GSD؟
في سياق الذكاء الاصطناعي وأدوات التيرمينال مثل Claude Code، يعتبر GSD منهجية صارمة ومُهيكلة تهدف إلى إجبار وكلاء الذكاء الاصطناعي (AI Agents) على اتباع مسار عمل منضبط. هذا الإطار يحول الـ AI من مبرمج فوضوي ومتقلب إلى فريق هندسي موثوق يعمل بشكل ذاتي، من خلال فرض تجزئة الذاكرة، التوثيق الإجباري، والحدود الصارمة.
المشكلة الأساسية: تآكل السياق (Context Rot)
نماذج اللغة الكبيرة (LLMs) تمتلك نافذة سياق (Context Window) محدودة. عندما يقوم Claude Code بتعديل عدة ملفات، قراءة مخرجات التيرمينال، وتوليد دوال (Functions) جديدة، تمتلئ هذه النافذة بالضوضاء. إجبار الـ AI على تذكر تاريخ المشروع بالكامل في "ذاكرته العاملة" يجعله يفقد التركيز. GSD يحل هذه المشكلة عبر "تفريغ" الذاكرة والبدء بسياق نظيف لكل مهمة محددة.
الركائز الثلاث لإطار عمل GSD داخل Claude Code
1. تجزئة الذاكرة (نظام المراحل)
تحت إطار GSD، أنت لا تطلب أبداً من Claude Code "بناء ميزة جديدة" دفعة واحدة. بدلاً من ذلك، تجبره على العمل في مراحل معزولة: التخطيط (Plan)، التنفيذ (Execute)، والمراجعة (Review).
implementation_plan.md).2. نظام الوكلاء المصغرين (Sub-Agent Ecosystem)
إطار GSD يتعامل مع Claude Code ليس كمبرمج واحد، بل كفريق من الوكلاء المتخصصين:
من خلال تحديد هذه الأدوار في الأمر التأسيسي (System Prompt)، يغير Claude Code شخصيته بناءً على الخطوة الحالية، مما يمنعه من التسرع والانتقال للخطوة التالية قبل إنهاء الحالية.
3. حلقة التصحيح الذاتي (Self-Correction Loop)
الجزء الأهم في إطار GSD هو إلزامية التحقق. قبل أن يُسمح لـ Claude Code بوضع علامة "تم" على أي مهمة والانتقال للتالية، يجب أن يُثبت أن الكود يعمل:
كيف تطبق إطار GSD اليوم؟
لاستخدام هذا النظام في Claude Code، يجب أن تضع الحدود من أول رسالة (Prompt). بدلاً من قول "أضف بوابة دفع"، يجب أن يكون أمرك كالتالي:
"أنت تعمل الآن تحت إطار GSD. الخطوة 1: حلل المتطلبات واكتب خطة من 5 مرحل. لا تكتب أي كود. الخطوة 2: انتظر موافقتي. الخطوة 3: نفذ الخطوة الأولى من الخطة. الخطوة 4: شغل الاختبارات وصحح أي أخطاء ذاتياً. يُمنع منعاً باتاً الانتقال للخطوة التالية قبل أن تنجح الخطوة الحالية في جميع الاختبارات ويتم عمل Commit لها على Git."
بتطبيق إطار GSD، أنت تغير دورك بالكامل. لم تعد مبرمجاً يتصارع مع الـ Syntax، بل أصبحت CTO (مدير تقني) يشرف على إدارة فريق رقمي ذاتي التشغيل وعالي الكفاءة.
رابط الانضمام للدورة:
الخطوات
بماذا ستفيدك هذه الاداة؟
يمكنك نسخ المصادر لهذه الاوامر وتحميلها عن طريق التيرمينال، اذا لم تعرف كيف، يمكنك الانضمام الى الكورس الذي نعمل على تجهيزه الان، الرابط في اسفل الصفحة.
Prompt
هذه هي الروابط الرسمية للاضافات، في حال لم تعرف كيف تستخدمها، او اردت معلومات اكثر عن الذكاء الاصطناعي وكيفية الاستفادة منه، انضم الى الدورات التي نقوم بتحضيرها، رابط الانضمام للدورة : - https://halaqa.app/enrollment?course=start-with-ai The GSD at : https://github.com/gsd-build/get-shit-done رابط حسابي على الانستغرام : https://www.instagram.com/ai.with.mo/ لا تنسى التسجيل للانضمام الى الدورات الخاصة بالذكاء الاصطناعي : - https://halaqa.app/enrollment?course=start-with-ai