autoresearch-finalize
ما الذي تفعله
تأخذ هذه المهارة التغييرات المحتفَظ بها من جلسة autoresearch، وتجمعها في فروع نظيفة، فرع لكل فكرة. وهي لمن يريدون عملًا قابلًا للمراجعة قبل الدمج.
متى تستخدمها
- ✓عندما تنتهي جلسة autoresearch وتريد مراجعة تغييراتها.
- ✓عندما يكون لديك كثير من commits تجريبية صغيرة وتحتاج إلى ترتيبها حسب الموضوع.
- ✓عندما تريد التأكد من التغييرات المحتفَظ بها قبل تجهيز الفروع.
رابط المهارة
https://github.com/davebcn87/pi-autoresearch/blob/main/skills/autoresearch-finalize/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أنهِ جلسة autoresearch الخاصة بي، بحيث يكون كل تحسين في فرع نظيف منفصل للمراجعة.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تقرأ المهارة سجل الجلسة، وتحتفظ فقط بالتجارب المعلَّمة كمحتفَظ بها، ثم تجمعها حسب الموضوع. تقترح المجموعات لتراجعها، ثم تبني فرعًا لكل مجموعة انطلاقًا من نقطة البداية المشتركة مع الفرع الرئيسي.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Finalize Autoresearch
Turn a noisy autoresearch branch into clean, independent branches — one per logical change, each starting from the merge-base.
Step 1 — Analyze and Propose Groups
- Read
.auto/log.jsonl(legacy:autoresearch.jsonl). Filter to kept experiments only. - Read
.auto/prompt.md(legacy:autoresearch.md) for context. - Expand all short commit hashes to full hashes:
git rev-parse <short_hash> - Get the merge-base:
git merge-base HEAD main - For each kept commit, get the diff stat (use
$BASE..<commit>for the first,<prev_kept>..<commit>for subsequent). - Group kept commits into logical changesets:
- Preserve application order. Group N comes before Group N+1.
- No two groups may touch the same file. Each branch is applied to merge-base independently — overlapping files would conflict. If two groups touch the same file, merge them into one group.
- Watch for cross-file dependencies. Each branch is independent, so if group 1 adds an API in
api.jsand group 2 calls it inparser.js, group 2's branch won't work in isolation. When proposing groups, flag dependencies: "group 2 depends on group 1 — review together." If the dependency is tight, merge the groups. - Keep each group small and focused. One idea, one theme per group.
- Don't hardcode a count. Could be 2, could be 15.
Present the proposed grouping to the user:
Proposed branches (each from merge-base, independent):
1. **Switch test runner to forks pool** (commits abc1234, def5678)
Files: vitest.config.ts, package.json
Metric: 42.3s → 38.1s (-9.9%)
2. **Tune worker count and timeouts** (commits ghi9012, jkl3456)
Files: test/setup.ts
Metric: 38.1s → 31.7s (-16.8%)
Wait for approval before proceeding.
Step 2 — Write groups.json and Run
Write groups.json:
{
"base": "<full merge-base hash>",
"trunk": "main",
"final_tree": "<full hash of current HEAD>",
"goal": "short-slug",
"groups": [
{
"title": "Switch to forks pool",
"body": "Why + what changed.\n\nExperiments: #3, #5\nMetric: total_time 42.3s → 38.1s (-9.9%)",
"last_commit": "<full hash of last kept commit in this group>",
"slug": "forks-pool"
}
]
}
Key rules:
last_commitmust be a full hash. Expand from jsonl short hashes withgit rev-parse.- No two groups may share a file. The script validates this and fails if violated.
Then run:
bash <SKILL_DIR>/finalize.sh /tmp/groups.json
The script creates one branch per group from the merge-base, verifies the union matches the original branch, and prints a summary with all branches, cleanup commands, and any ideas from .auto/ideas.md (legacy: autoresearch.ideas.md).
On creation failure: rolls back (deletes branches, restores original branch, pops stash). On verification failure: exits non-zero but leaves branches intact for inspection.
Step 3 — Report
After the script finishes, report to the user:
- Branches created and what each contains
- Overall metric improvement (baseline → best)
- Show the cleanup commands from the script's summary output
Edge Cases
- Only 1 kept experiment: One branch is fine — don't force splits.
- Overlapping files between groups: The script fails with an error naming the file. Merge the overlapping groups and retry.
- Non-experiment commits on the branch: Skip them — only process kept experiments from the jsonl.
الأسئلة الشائعة
هل أستطيع مراجعة المجموعات أولًا؟
نعم. تعرض المهارة المجموعات المقترحة قبل بناء الفروع.
ماذا عن التغييرات غير المحتفَظ بها؟
تُستخدم التجارب المعلَّمة كمحتفَظ بها فقط، فتُستبعد المحاولات المهملة.
ما الفرع الذي تقارن به؟
تستخدم merge-base مع الفرع الرئيسي نقطة بداية لكل مجموعة.
التفاصيل
الوصف الأصلي من المؤلف
Finalize an autoresearch session into clean, reviewable branches. Use when asked to "finalize autoresearch", "clean up experiments", or "prepare autoresearch for review".
الشعبية
- نجوم GitHub
- 8.2k
- الترتيب
- #12523
- الترخيص
- MIT
- آخر تحديث
- 7/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
autoresearch-create
8.2kيساعد وكيلك على تشغيل حلقة تجارب مستقلة تجرّب الأفكار، وتحتفظ بما يحسّن الهدف المختار، وتتخلص من الباقي.
autoresearch-hooks
8.2kيعلّم وكيلك كتابة سكربتات صغيرة تعمل قبل كل تجربة وبعدها، للتنبيهات أو حفظ الملاحظات أو جلب الأبحاث.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.