schema-unify
यह क्या करती है
यह स्किल ऐसे ब्रेन को माइग्रेट करती है जिसमें बहुत सारे पेज प्रकार जमा हो गए हों, और उसे 15 के छोटे व एकसमान सेट में ले जाती है। यह उन ब्रेन के लिए है जहाँ प्रकार सूची समय के साथ उलझ गई है।
कब इस्तेमाल करें
- ✓जब आपके ब्रेन में बहुत ज़्यादा पेज प्रकारों की चेतावनी आए या कोई पैक अपग्रेड उपलब्ध हो।
- ✓जब आप पेज प्रकार साफ़ करके एक मानक सेट पर जाना चाहें।
- ✓जब आप पूछें कि पेज प्रकारों को साफ़ संरचना में कैसे व्यवस्थित करें।
Skill का लिंक
https://github.com/garrytan/gbrain/blob/master/plugin/skills/schema-unify/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे ब्रेन में दर्जनों पेज प्रकार हैं। दिखाइए कि इसे सुरक्षित रूप से मानक प्रकारों के सेट पर कैसे ले जाएँ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट मौजूदा स्थिति जांचता है, फिर एक माइग्रेशन चलाता है जो पुराने प्रकारों को उपनामों और लिंक के ज़रिए नए प्रकारों से जोड़ता है। अंत में वह उन उपनामों की जांच करता है जो अब कहीं नहीं ले जाते।
तकनीकी सामग्री (मूल 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
कमेंट
- …
इस repository की और skills
gbrain
31kयह आपके एजेंट को लोगों, प्रोजेक्ट और फ़ैसलों के बारे में तथ्य खोजने के लिए साझा कंपनी ज्ञान ब्रेन में खोजने और उसमें स्थायी नोट सहेजने देती है।
brain-ingest-gate
31kयह आपके एजेंट को नई सामग्री जोड़ने से पहले मौजूदा ज्ञान ब्रेन से जाँचने देती है, ताकि डुप्लिकेट न बनें और नामित इकाइयाँ पहले सुलझें।
brain-link-discipline
31kयह सुनिश्चित करती है कि आपका एजेंट हर उस ब्रेन पेज का काम करने वाला लिंक उसी संदेश में दे, जिसकी वह रिपोर्ट करता है, ताकि आप उसे तुरंत खोल सकें।
brain-ops
31kयह आपके एजेंट को ज्ञान ब्रेन की मुख्य दिनचर्या देती है: पहले मौजूदा संदर्भ जाँचना, स्पष्ट नोट उनके स्रोत के साथ सहेजना, और संबंधित पेज जोड़ना।
मिलती-जुलती skills
technical-documentation
394kयह आपके एजेंट को साफ़ तकनीकी डॉक्स और एजेंट निर्देश फ़ाइलें लिखने और जांचने में मदद करती है, ताकि लोग और AI टूल उन्हें आसानी से समझ सकें।
architecture-decision-records
280kयह आपके एजेंट को project structure से जुड़े ज़रूरी फैसलों को दर्ज करने देता है। इससे पता चलता है कि कोई चुनाव क्यों किया गया, और बदलावों का साफ़ इतिहास बना रहता है।
code-tour
280kआपके एजेंट को exact file और line references के साथ step-by-step code walkthrough बनाने देता है। intro, explanations और reviews के लिए उपयोगी है।