Skillpedia
برمجة عامة101k · #988

rewrite-plan

ما الذي تفعله

ينشئ هذا الوكيل خطة مفصلة لإعادة كتابة كودك. يقسّم العمل إلى خطوات أصغر، ويحدد المسؤول عن كل جزء، لضمان أن تكون التغييرات آمنة وسهلة المراجعة.

متى تستخدمها

  • ✓عندما تحتاج إلى إعادة كتابة أجزاء من الكود بطريقة منظمة.
  • ✓عند بدء مشروع كبير يتطلب عدة خطوات تعديل.
  • ✓لضمان أن تكون تغييرات الكود آمنة ولا تكسر المشروع.

رابط المهارة

https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/rewrite-plan/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/rewrite-plan/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أنشئ خطة لإعادة كتابة قسم المصادقة في موقعي، مع تحديد مسؤوليات واضحة لكل ملف.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

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

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Rewrite plan

Spec §20.3 / §21.3.2: scenario 4 (design → deliverable production code) requires a contract-shaped rewrite plan before the agent starts editing files. The plan is the audit trail every subsequent stage references; without it the patch path slides into "refactor everything that looks wrong" and the build breaks in unreviewable ways.

Inputs

  • code/index.json from code-import.
  • token-map/*.json from token-map.
  • The active design system DESIGN.md (already in prompt).
  • The user's tune intent (typically a short brief).

Output

project-cwd/
└── plan/
    ├── plan.md           # human-readable narrative
    ├── ownership.json    # { file: '...', layer: 'leaf' | 'shared' | 'route' | 'shell' }
    ├── steps.json        # ordered { id, files[], rationale, risk: 'low' | 'medium' | 'high' }[]
    └── meta.json         # { generatedAt, atomDigest, tokenMapDigest }

steps.json is the input patch-edit reads one entry per iteration. ownership.json is the source of truth for "which files belong to a single component vs. shared infrastructure"; patch-edit refuses to touch a shell-tier file unless the matching step has risk: 'high' and the user explicitly confirmed.

Convergence

The atom completes when plan.md is non-empty AND steps.json contains at least one step.

Anti-patterns the prompt fragment forbids

  • Plans that include "rewrite the whole component library" as a single step. Break into per-component steps.
  • Plans that don't classify ownership.
  • Plans that don't list a build-test step at the end.

Status

Implemented by the daemon runner in apps/daemon/src/plugins/atoms/rewrite-plan.ts. It classifies ownership and writes plan.md, steps.json, and ownership.json.

الأسئلة الشائعة

لماذا تعد الخطة مهمة قبل إعادة كتابة الكود؟

تمنع الخطة الوكيل من محاولة «إصلاح كل شيء دفعة واحدة»، فقد يكسر المشروع بطرق يصعب فهمها. وتضمن أن تتم التغييرات بشكل مضبوط وآمن.

ما هي «حدود الملكية»؟

تحدد أجزاء الكود التي تنتمي إلى مكوّن معين، وأيها للاستخدام العام. وهذا يساعد على تنظيم العمل وتجنب التعارض.

ماذا يحدث إذا كانت الخطوة خطيرة جدًا؟

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

التفاصيل

الوصف الأصلي من المؤلف

Author a long-running multi-file rewrite plan that subsequent patch-edit + diff-review + build-test stages will execute, with explicit ownership boundaries and patch-safety guarantees.

repo: nexu-io/open-design

الشعبية

نجوم GitHub
101k
الترتيب
#988
الترخيص
Apache-2.0
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة