lumi-migrate-legacy
Backfill missing schema fields (provenance, confidence) and resolve judgment-only lint findings (L01/L02 fields lint.mjs --fix could not safely infer…
от tronghieu★ 40 звёзд на GitHub
Установить lumi-migrate-legacy в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
/lumi-migrate-legacy
Read README.md at the project root before this SKILL.md.
Role
You are the wiki's schema migration agent. After a Lumina version bump that
introduces new required or optional frontmatter fields, existing entries may
be missing those fields. Your job is to read the CHANGELOG, find the exact
fields each version introduced, and backfill them with inferred values —
not blind defaults. Every field you set should reflect what you actually know
about the entry. You also pick up wherever lint.mjs --fix had to stop:
number/enum frontmatter fields it couldn't safely default, and ambiguous
wikilinks it wouldn't guess at. Always let --fix run first — you spend your
reasoning only on what deterministic repair genuinely could not resolve.
This skill is CHANGELOG-driven, not hardcoded to any specific field set.
The CHANGELOG's ### Migration sections are the authoritative source of truth
for what needs backfilling. This means the skill works for v0.8, v0.9, and
future versions without modification, as long as the CHANGELOG is maintained.
Context
Key workspace paths:
_lumina/manifest.json—packageVersion,legacyMigrationNeeded_lumina/CHANGELOG.md—### Migrationsections per version (the spec)_lumina/scripts/lint.mjs— runs checks;--fixrepairs L01/L02/L03/L05/ L06/L07/L09/L19 wherever it safely can; L01 = missing required field (error), L02 = wrong frontmatter type (error), L05 = broken wikilink (error), L11 = missingconfidence(warning) — this skill only ever sees the L01/L02/L05 findings that--fixleft standing, plus every L11;--suggestadds asuggestionstring to each finding whosefixableisfalse(an L05 finding also carries acandidatesarray of matching pages)_lumina/scripts/wiki.mjs—read-meta,set-meta,list-entities,logwiki/graph/edges.jsonl— citation/edge counts for confidence inferenceraw/— source snapshots for provenance inference
Instructions
Phase 1 — Detect
Step 1.1 — Read manifest.
node -e "const m=JSON.parse(require('fs').readFileSync('_lumina/manifest.json','utf8')); console.log(JSON.stringify({packageVersion:m.packageVersion,legacyMigrationNeeded:m.legacyMigrationNeeded},null,2))"
Note packageVersion and legacyMigrationNeeded. If legacyMigrationNeeded
is false or absent, migration may still be needed — the flag is advisory.
Proceed to the lint check regardless.
Step 1.2 — Run the deterministic fix pass first.
lint.mjs --fix now repairs L01, L02, L03, L05, L06, L07, L09, and L19
automatically wherever it safely can. Run it before spending any inference
effort, so this skill only has to reason about what deterministic repair
genuinely could not resolve. It is idempotent — safe to run even if a
previous migration or /lumi-check already ran it.
node _lumina/scripts/lint.mjs --fix --json > /tmp/lumi-lint.json
Important — do NOT pipe --json straight into a heredoc. On a large wiki
the full findings JSON can exceed the shell tool's ~30KB stdout buffer and get
truncated mid-string, breaking JSON.parse. Read the temp file with a filtered
projection instead:
node -e "
const j=JSON.parse(require('fs').readFileSync('/tmp/lumi-lint.json','utf8'));
const want=new Set(['L01-frontmatter-required','L02-frontmatter-types','L05-broken-wikilink','L11-confidence-missing']);
const hits=j.findings.filter(f=>want.has(f.id) && !f.fix_applied)
.map(f=>({id:f.id,file:f.file,message:f.message}));
console.log(JSON.stringify(hits,null,2));
"
!f.fix_applied is the key filter: it drops everything the fix pass already
resolved and keeps only the findings that survived — the ones needing
inference or a human decision. The projected output (id + file + message
only) is bounded and parseable. If even that exceeds buffer (very large
wikis), read /tmp/lumi-lint.json with the Read tool instead — Read
paginates, Bash stdout does not.
Collect:
- Surviving
L01-frontmatter-requiredfindings (severity: error) — a required field--fixrecognized but left standing, almost always anumberorenumfield with no safe default (e.g. a source'syearorimportance). - Surviving
L02-frontmatter-typesfindings (severity: error) — same shape: anumber/enumvalue that fails validation and that--fixcannot repair on its own. - Surviving
L05-broken-wikilinkfindings (severity: error) — a wikilink whose basename matched zero or more than one page, so--fixwould not guess. - All
L11-confidence-missingfindings (severity: warning) — entries missing the optional-but-recommendedconfidencefield.--fixnever touches L11; every instance survives.
If the projected list above is empty:
No migration work needed. Lint is clean (after auto-fix).
Log and exit:
node _lumina/scripts/wiki.mjs log migrate-legacy "No migration needed — lint clean after auto-fix."
**Step 1.3 — Read CHANGELOG
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash - 02
Read
Вложенные файлы
- references/backfill-ids.md
FAQ
Что делает скилл lumi-migrate-legacy?
Backfill missing schema fields (provenance, confidence) and resolve judgment-only lint findings (L01/L02 fields lint.mjs --fix could not safely infer, ambiguous L05 wikilinks) on legacy wiki entries after a Lumina version upgrade. Use proactively when /lumi-check reports L01/L02/L05/L11 findings on multiple entries after a --fix pass, when manifest shows legacyMigrationNeeded:true, or when user mentions "lint do", "upgrade", "missing provenance", or "schema gap" after running install.
Как установить скилл lumi-migrate-legacy?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lumi-migrate-legacy запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…