schema-unify
ما الذي تفعله
تنقل هذه المهارة قاعدة معارف تراكمت فيها أنواع صفحات كثيرة إلى مجموعة أصغر ومتسقة من 15 نوعًا. وهي مخصصة للقواعد التي تضخمت فيها قائمة الأنواع بشكل فوضوي مع الوقت.
متى تستخدمها
- ✓عندما تعرض قاعدة معارفك تحذيرات عن كثرة أنواع الصفحات أو عن ترقية متاحة للحزمة.
- ✓عندما تريد تنظيف أنواع الصفحات والانتقال إلى مجموعة معيارية.
- ✓عندما تسأل كيف ترتب أنواع صفحاتك في بنية أنظف.
رابط المهارة
https://github.com/garrytan/gbrain/blob/master/plugin/skills/schema-unify/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“في قاعدة معارفي عشرات الأنواع من الصفحات. أرني كيف أنقلها إلى المجموعة المعيارية من الأنواع بأمان.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يتحقق وكيلك من الحالة الحالية، ثم يشغّل ترحيلًا يربط الأنواع القديمة بالجديدة باستخدام الأسماء البديلة والروابط. وفي النهاية يتحقق من وجود أسماء بديلة متبقية لا تشير إلى شيء.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Schema Unification (gbrain-base → gbrain-base-v2)
v0.41.22 ships gbrain-base-v2 — a 15-type DRY/MECE taxonomy (14 canonical + note catch-all) — as the install default for new brains. Existing brains on gbrain-base can opt in via the pack_upgrade_available onboard finding + the unify-types PROTECTED Minion handler.
This skill is the playbook for that migration.
brain_first: exempt
This skill is ABOUT the brain's shape — it can't depend on the brain it's reshaping. No gbrain search lookup first; jump straight to onboard.
When this skill fires
- Agent runs
gbrain onboard --checkand seespack_upgrade_availableortype_proliferationwarnings - User asks "what is the canonical taxonomy / how do I clean up my page types / migrate to v2"
- A
dangling_aliasesfinding surfaces (post-unify GC) - An agent ingesting from a custom pack wants to consult the v2 taxonomy as a reference
Mental model (one paragraph)
A production gbrain brain accreted 94 distinct pages.type values over years of ingestion: tweet / tweet-thread / tweet-bundle / tweet-single / media/x-tweet/bundle / tweet-stub all coexisting; 5.5K concept-redirect pages; atom-partner-link pages that should be links; civic / framework / insight / memo / anecdote one-offs. The cure: collapse to 15 canonical types (person, company, media, tweet, social-digest, analysis, atom, concept, source, deal, email, slack, writing, project, note) with subtypes/format/origin pushed to frontmatter, alias-rows for redirects, real link-rows for edge-shaped pages, and a catch-all that bins long-tail unknowns to note with frontmatter.legacy_type = <original> for rollback.
Workflow
Phase 1: Discovery
Confirm the brain is actually on gbrain-base (not already on v2).
gbrain schema active --json | jq -r '.identity'
Expected: gbrain-base@1.0.0+<sha>. If you see gbrain-base-v2@..., the brain is already on v2 — skip the migration.
Then run onboard to see what would change:
gbrain onboard --check
Look for the pack_upgrade_available finding. If it's ok, there's no successor declared for the active pack — done.
Phase 2: Preview
Run the per-cluster narrative:
gbrain onboard --check --explain
This invokes the unify-types handler in dry-run mode and prints:
- How many pages would retype per cluster (tweets, articles, companies, etc.)
- How many concept-redirect pages would become alias rows
- How many edge-shaped pages would convert to real links
- The synthesized catch-all rules for unknown types
Review the output. If the proposed changes look wrong, don't proceed — file an issue or write a custom pack with adjusted mapping_rules.
Phase 3: Apply
Managed brains: stop after the preview. Applying the migration is not
supported on a managed brain (managed persistence on) yet: the retype writes
pages directly instead of through the coordinated writer, so the apply job is
refused (writer_coordinator_required) before it changes anything. The
pack_upgrade_available finding says so on those brains. Keep using
gbrain onboard --check --explain to preview, tell the user the pack upgrade
waits for coordinated retype support, and don't submit the apply job below.
One exception: when the preview shows nothing to retype, link or alias, the
apply job only switches the active pack, so it may be submitted with the
user's agreement.
The handler is PROTECTED (manual_only) — autopilot will never auto-fire it. Submit explicitly:
gbrain jobs submit unify-types \
--params '{"target_pack":"gbrain-base-v2","apply":true}'
On PGLite (the install default), or on any setup without a running gbrain jobs work worker or supervisor daemon, add --follow so the job executes inline:
gbrain jobs submit unify-types \
--follow \
--params '{"target_pack":"gbrain-base-v2","apply":true}'
The persistent worker daemon is Postgres-only. Without --follow on PGLite, the job sits queued forever and the migration never runs.
apply defaults to false (dry-run) per the handler contract, so
"apply":true is required here or the job reports success having retyped
nothing and left the active pack unflipped. Omit it to preview.
Watch progress per phase (worker-daemon runs; with --follow the same progress streams inline):
gbrain jobs get <job_id> # one job: status, progress, result
gbrain jobs watch --follow # live dashboard of the whole queue
الأسئلة الشائعة
كم نوعًا سيبقى؟
المجموعة المستهدفة تضم 15 نوعًا معتمدًا، منها نوع ملاحظة عام لكل ما عداه.
هل يحتفظ الترحيل بصفحاتي؟
الترحيل يربط الأنواع القديمة بالجديدة، فتبقى الصفحات ضمن البنية الجديدة.
هل أتحقق من النتيجة؟
نعم. تتضمن المهارة فحصًا للأسماء البديلة المتبقية بعد انتهاء الترحيل.
التفاصيل
الوصف الأصلي من المؤلف
Migrate a brain from gbrain-base (or any pack) to gbrain-base-v2's 14-canonical-type taxonomy via gbrain onboard --check + the unify-types Minion handler. Collapses 94 noisy types to 15 canonical with subtypes, alias rows, and link rows. Triggers when an agent notices pack_upgrade_available, type_proliferation, or asks "what is the canonical taxonomy / how do I clean up my page types".
repo: garrytan/gbrain
الشعبية
- نجوم GitHub
- 31k
- الترتيب
- #9310
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
gbrain
31kيتيح لوكيلك البحث في عقل المعرفة المشترك للشركة عن معلومات عن الأشخاص والمشاريع والقرارات، وحفظ ملاحظات دائمة فيه.
brain-ingest-gate
31kيفحص المحتوى الجديد أمام عقل المعرفة الموجود قبل إضافته، لتجنب التكرار وحسم الكيانات المسمّاة أولًا.
brain-link-discipline
31kيضمن أن يتضمن وكيلك رابطًا يعمل لكل صفحة من العقل يبلّغ عنها، في الرسالة نفسها، لتفتحها فورًا.
brain-ops
31kيزوّد وكيلك بالروتين الأساسي للعقل المعرفي: الاطلاع على السياق أولًا، وحفظ الملاحظات الصريحة مع مصدرها، وربط الصفحات ذات الصلة.
مهارات مشابهة
technical-documentation
394kيساعد وكيلك على كتابة الوثائق التقنية ومراجعتها، وملفات التعليمات الخاصة بالوكلاء، لتكون سهلة المتابعة للناس وأدوات الذكاء الاصطناعي.
architecture-decision-records
280kيساعد وكيلك على تسجيل قرارات بنية المشروع المهمة، فيفهم سبب كل اختيار ويحتفظ بتاريخ واضح للتغييرات.
code-tour
280kيتيح لوكيلك إنشاء جولات شيفرة خطوة بخطوة مع مراجع دقيقة للملفات والأسطر، ويفيد للتعريف بالمشروع والشرح والمراجعة.