ml-adoption-playbook
ما الذي تفعله
يساعدك هذا الدليل على إضافة الذكاء الاصطناعي إلى برنامج حاسوبي لا يملكه بعد. ويوضح كيف تخطط، وتجهّز البيانات، وتدمج الذكاء الاصطناعي في الكود الموجود، وتُنشئ نموذجًا أوليًا بسيطًا.
متى تستخدمها
- ✓عندما تريد إضافة الذكاء الاصطناعي إلى برنامج.
- ✓عندما تخطط لكيفية عمل نموذج ذكاء اصطناعي جديد (مثل نظام توصية) في تطبيق.
- ✓عندما تنظّم العمل لبناء مكوّن ذكاء اصطناعي وتدريبه واستخدامه.
رابط المهارة
https://github.com/affaan-m/ECC/blob/main/pi/core/skills/ml-adoption-playbook/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“كيف أضيف نموذج توصيات إلى موقعي؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يفهم الذكاء الاصطناعي المشكلة أولًا، ويتحقق مما إذا كان حلٌّ أبسط يكفي. ثم ينظّم البيانات اللازمة، ويخطط لكيفية تواصل الذكاء الاصطناعي مع بقية البرنامج دون أن تختلط الأمور. وأخيرًا يُنشئ نموذجًا أساسيًا ويشرح كيفية تحسينه.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
ML Adoption Playbook
This skill provides an adaptive methodology for implementing machine learning models into existing software engineering projects. It bridges the gap between traditional SWE and MLOps by structuring how ML should be researched, decoupled, trained, and integrated.
When to Activate
- A user asks to "add ML" or "add an algorithm" to their existing codebase.
- Planning the integration of a new model (e.g., recommendation, classification, forecasting) into a non-ML application.
- Structuring a workflow for an agent to build, train, and deploy an ML component adaptively.
Phase 1: Problem Framing & Feasibility
Before writing model code, establish the "why" and "how".
- Heuristic Check: Ask the user if a simple heuristic (e.g., regex, rule-based sorting) could solve the problem faster. If yes, start there.
- Metric Definition: Define what business metric the ML model is trying to improve (e.g., click-through rate, reduced latency).
- Mistake Budget: Define what a "bad" prediction looks like and how the system should handle it.
Phase 2: Data Readiness
ML is useless without clean, accessible data.
- Audit Data Sources: Identify where the training data lives. Is it a live database, a static CSV, or an API?
- Data Contract: Establish a schema for the input data. What features are required? What happens if a feature is missing?
- Leakage Prevention: Ensure the user's proposed data split does not accidentally leak future information into the training set (e.g., chronological splitting for time-series data).
Phase 3: Architectural Integration & Decoupling
Do not tightly couple model inference to core business logic.
- API Boundary: Suggest placing the model behind an API endpoint (e.g., using
fastapi-patternsordjango-patterns) or a dedicated service class. - Fallback Mechanisms: Design a default state. If the model takes too long to respond or throws an error, the system must gracefully fall back to a hardcoded rule.
- Feature Flags: Wrap the new ML inference call in a feature flag so it can be rolled out (or rolled back) safely.
Phase 4: Model Implementation & Training
Structure the code for reproducibility and iteration.
- Start Simple: Build a baseline model first (e.g., a simple scikit-learn Logistic Regression or a barebones PyTorch linear layer).
- Reproducibility: Apply
pytorch-patternsor similar best practices: fix random seeds, make code device-agnostic, and explicitly document tensor/array shapes. - Automated Evidence: Require tests for the data transforms and inference schema. Do not accept a model without an evaluation script comparing it against the baseline.
Phase 5: Handoff to MLOps
Once the baseline model is integrated, shift focus to continuous operations.
- Refer to
mle-workflow: Guide the user toward setting up experiment tracking, model registries, and drift detection. - CI/CD: Add the model evaluation step to the existing CI pipeline to ensure future commits do not degrade model performance.
Iterative Agent Workflow
When assisting a user via this playbook, agents should:
- Ask clarifying questions to complete Phase 1 before proposing architectures.
- Draft a data contract in Phase 2 for user approval.
- Write the decoupling interface (API/Service) in Phase 3 before writing the training loop.
- Deliver a reproducible script in Phase 4 that trains the model and saves the artifact.
الأسئلة الشائعة
ما هي «القاعدة الإرشادية» (Heuristic)؟
هي حل بسيط وسريع للمشكلة، مثل قاعدة أساسية، وقد يكون أسهل وأكفأ من ذكاء اصطناعي معقد.
ما هو «فصل البنية» (Architectural Decoupling)؟
يعني فصل الذكاء الاصطناعي عن بقية البرنامج، بحيث لا تؤثر التغييرات في أحدهما بسهولة على الآخر، فيصبح كل شيء أكثر تنظيمًا واستقرارًا.
ما هو «النموذج الأساسي» (Baseline Model)؟
هو أول نموذج ذكاء اصطناعي بسيط تُنشئه لتحصل على شيء يعمل. ويكون نقطة بداية للمقارنات والتحسينات المستقبلية.
التفاصيل
الوصف الأصلي من المؤلف
End-to-end methodology for AI agents and software engineers to add machine learning algorithms to existing non-ML codebases. Covers problem framing, data readiness, architectural decoupling, and baseline model integration. Use when adding a machine learning capability to a codebase that has none, from problem framing through a baseline model.
repo: affaan-m/ECC
الشعبية
- نجوم GitHub
- 280k
- الترتيب
- #208
- الترخيص
- MIT
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
accessibility
280kيساعد وكيلك على بناء واجهات يستطيع الجميع استعمالها، ويضمن عمل المواقع والتطبيقات جيدًا لذوي الإعاقة، كالمكفوفين وذوي الحركة المحدودة.
agent-architecture-audit
280kيتأكد وكيلك من أن كل شيء يعمل بشكل صحيح، ويجد مشكلات أنظمة الذكاء الاصطناعي ويصلحها، ليؤدي كما هو متوقع.
agent-eval
280kيساعد وكيلك على مقارنة أدوات البرمجة بالذكاء الاصطناعي المختلفة، ويقيس أيها أسرع وأرخص وأكثر موثوقية لمهام محددة.
agent-harness-construction
280kيساعد وكيلك على فهم طريقة إنجاز المهام بشكل أفضل، عبر تحسين الأدوات والتعليمات التي يستعملها لزيادة فرص نجاحه.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.