---
title: The GSD Framework
title_ar:  إطار عمل GSD
url: "https://www.aiwithmo.com/prompts/gsd-framework"
canonical: "https://www.aiwithmo.com/prompts/gsd-framework"
published: 2026-04-19
updated: 2026-05-10
category: ai-tools
languages: [ar, en]
author: Mohamed Khair
site: aiwithmo
---

# The GSD Framework

##  إطار عمل GSD

Source: https://www.aiwithmo.com/prompts/gsd-framework · Author: Mohamed Khair (محمد خير), aiwithmo · Published in Arabic and English.

## English

## 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**.
* **Plan Mode:** The AI is restricted from writing any executable code. Its only job is to analyze the request and generate a strict markdown checklist (e.g., `implementation_plan.md`). 
* **Clean Context:** Once the plan is written, the terminal session is often restarted or cleared. The AI is then fed *only* the specific task from the checklist, ensuring its context window is 100% focused on the current objective without the baggage of previous steps.

#### 2. The Sub-Agent Ecosystem
GSD treats Claude Code not as a single developer, but as a team of specialized sub-agents. 
* **The Architect:** Drafts the roadmap and dependency graphs.
* **The Coder:** Executes task #1 on the checklist.
* **The Tester:** Runs the terminal commands to verify task #1.
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.
* It must run the local server or test suite.
* It must read the terminal output for errors.
* If an error is found, it enters a "Self-Correction Loop," debugging its own code without user intervention.
* Only when the terminal returns a clean exit code does it commit the changes to Git and proceed.

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

---

## العربية

## إطار عمل 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)**.
* **وضع التخطيط (Plan Mode):** يُمنع الـ AI تماماً من كتابة أي كود تنفيذي. مهمته الوحيدة هي تحليل المتطلبات وتوليد قائمة تحقق (Checklist) صارمة في ملف (مثل `implementation_plan.md`).
* **سياق نظيف (Clean Context):** بمجرد كتابة الخطة، يتم تزويد الـ AI بالمهمة الأولى فقط من القائمة. هذا يضمن أن نافذة السياق الخاصة به مركزة بنسبة 100% على الهدف الحالي دون التشتت بماضٍ أو مستقبل المشروع.

#### 2. نظام الوكلاء المصغرين (Sub-Agent Ecosystem)
إطار GSD يتعامل مع Claude Code ليس كمبرمج واحد، بل كفريق من الوكلاء المتخصصين:
* **المهندس المعماري:** يرسم خارطة الطريق وهيكلية المشروع.
* **المبرمج:** ينفذ المهمة رقم 1 من الـ Checklist.
* **المختبر (Tester):** يقوم بتشغيل أوامر التيرمينال لفحص المهمة رقم 1.
من خلال تحديد هذه الأدوار في الأمر التأسيسي (System Prompt)، يغير Claude Code شخصيته بناءً على الخطوة الحالية، مما يمنعه من التسرع والانتقال للخطوة التالية قبل إنهاء الحالية.

#### 3. حلقة التصحيح الذاتي (Self-Correction Loop)
الجزء الأهم في إطار GSD هو إلزامية التحقق. قبل أن يُسمح لـ Claude Code بوضع علامة "تم" على أي مهمة والانتقال للتالية، يجب أن يُثبت أن الكود يعمل:
* يجب أن يشغل السيرفر المحلي أو اختبارات الأكواد (Test Suite).
* يجب أن يقرأ مخرجات التيرمينال للبحث عن الأخطاء (Errors).
* إذا وجد خطأ، يدخل في "حلقة تصحيح ذاتي"، حيث يقوم بعمل Debugging للكود الخاص به دون أي تدخل بشري منك.
* فقط عندما يعطي التيرمينال نتيجة نجاح (Clean Exit Code)، يقوم بعمل Commit للتعديلات على Git وينتقل للخطوة التالية.

### كيف تطبق إطار GSD اليوم؟
لاستخدام هذا النظام في Claude Code، يجب أن تضع الحدود من أول رسالة (Prompt). بدلاً من قول "أضف بوابة دفع"، يجب أن يكون أمرك كالتالي:

> *"أنت تعمل الآن تحت إطار GSD. الخطوة 1: حلل المتطلبات واكتب خطة من 5 مرحل. لا تكتب أي كود. الخطوة 2: انتظر موافقتي. الخطوة 3: نفذ الخطوة الأولى من الخطة. الخطوة 4: شغل الاختبارات وصحح أي أخطاء ذاتياً. يُمنع منعاً باتاً الانتقال للخطوة التالية قبل أن تنجح الخطوة الحالية في جميع الاختبارات ويتم عمل Commit لها على Git."*

بتطبيق إطار GSD، أنت تغير دورك بالكامل. لم تعد مبرمجاً يتصارع مع الـ Syntax، بل أصبحت CTO (مدير تقني) يشرف على إدارة فريق رقمي ذاتي التشغيل وعالي الكفاءة.


رابط الانضمام للدورة: 
- https://halaqa.app/enrollment?course=start-with-ai

## Steps

### 1. What is this?

*This is to boost you while coding*

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.

## الخطوات

### 1. بماذا ستفيدك هذه الاداة؟

*هذه الاداة تحتوي على الاوامر اللازمة لتحسين جودة المخرجات وتنظيمها وزيادة الانتاجية*

يمكنك نسخ المصادر لهذه الاوامر وتحميلها عن طريق التيرمينال، اذا لم تعرف كيف، يمكنك الانضمام الى الكورس الذي نعمل على تجهيزه الان، الرابط في اسفل الصفحة.

## Prompt (البرومبت)

```text
هذه هي الروابط الرسمية للاضافات، في حال لم تعرف كيف تستخدمها، او اردت معلومات اكثر عن الذكاء الاصطناعي وكيفية الاستفادة منه، انضم الى الدورات التي نقوم بتحضيرها، رابط الانضمام للدورة : 
- 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
```

---

More free bilingual AI guides: https://www.aiwithmo.com/prompts · One to one AI mentorship in Arabic or English: https://www.aiwithmo.com/mentorship
