Command Palette

Search for a command to run...

Назад к скиллам
скилл № 76544

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от 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 — ### Migration sections per version (the spec)
  • _lumina/scripts/lint.mjs — runs checks; --fix repairs 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 = missing confidence (warning) — this skill only ever sees the L01/L02/L05 findings that --fix left standing, plus every L11; --suggest adds a suggestion string to each finding whose fixable is false (an L05 finding also carries a candidates array of matching pages)
  • _lumina/scripts/wiki.mjs — read-meta, set-meta, list-entities, log
  • wiki/graph/edges.jsonl — citation/edge counts for confidence inference
  • raw/ — 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-required findings (severity: error) — a required field --fix recognized but left standing, almost always a number or enum field with no safe default (e.g. a source's year or importance).
  • Surviving L02-frontmatter-types findings (severity: error) — same shape: a number/enum value that fails validation and that --fix cannot repair on its own.
  • Surviving L05-broken-wikilink findings (severity: error) — a wikilink whose basename matched zero or more than one page, so --fix would not guess.
  • All L11-confidence-missing findings (severity: warning) — entries missing the optional-but-recommended confidence field. --fix never 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

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Bash
  2. 02Read

Вложенные файлы

  • 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), без исполняемых скриптов.

Похожие скиллы

Сравнить lumi-migrate-legacy с