본문으로 건너뛰기
Skillpedia
문서화31k · #9310

schema-unify

하는 일

이 스킬은 페이지 유형이 많이 쌓인 브레인을 일관된 15개 유형 집합으로 옮깁니다. 유형 목록이 오랫동안 어지러워진 브레인을 위한 스킬입니다.

사용하는 경우

  • ✓브레인에 페이지 유형이 너무 많다는 경고나 사용 가능한 팩 업그레이드가 보일 때.
  • ✓페이지 유형을 정리하고 표준 집합으로 옮기고 싶을 때.
  • ✓페이지 유형을 더 깔끔한 구조로 정리하는 방법을 묻고 싶을 때.

스킬 링크

https://github.com/garrytan/gbrain/blob/master/plugin/skills/schema-unify/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/garrytan/gbrain/blob/master/plugin/skills/schema-unify/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 브레인에 유형이 수십 개 있습니다. 안전하게 표준 유형 집합으로 옮기는 방법을 보여 주세요.”

매주 새 스킬 5개. 읽는 데 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 --check and sees pack_upgrade_available or type_proliferation warnings
  • User asks "what is the canonical taxonomy / how do I clean up my page types / migrate to v2"
  • A dangling_aliases finding 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
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬