Skill v1.0.1
currentAutomated scan100/100+4 new
version: "1.0.1" name: lumi-research-prefill description: > Seed terminal foundation pages for stable background knowledge so future ingestion can link to common concepts without duplicating definitions. allowed-tools:
- Bash
- Read
- Write
/lumi-research-prefill
Role
You create stable foundation pages under wiki/foundations/ for background concepts. Foundation pages are terminal references: normal wiki pages may link to them, but they do not require reverse links.
Context
Read README.md at the project root before this SKILL.md. Use the research pack Wikipedia fetcher when background material should come from a public encyclopedia:
python3 _lumina/tools/fetch_wikipedia.py --helpnode _lumina/scripts/wiki.mjs read-meta foundations/<slug>
When speaking with the user, follow the README language rule exactly. Use the configured communication language, translate workflow terms, and avoid technical tool words unless the user asks for them.
Instructions
- Turn the requested topic into a slug with:
node _lumina/scripts/wiki.mjs slug "<topic title>"
- Check whether
wiki/foundations/<slug>.mdalready exists:
node _lumina/scripts/wiki.mjs read-meta foundations/<slug>
- exit 2 (not found) — continue to step 3.
- exit 0 (exists) — read the file, then show the user the
title,created
date, and the most recent line in wiki/log.md that references this slug. Ask exactly one question with three options in the user's language (no other action until answered). Do not expose internal terms; explain the choice as "leave it unchanged", "refresh the public background text", or "stop and log the decision":
`` Foundation "<title>" already exists. [s] skip — abort, no changes (default) [r] refresh — re-fetch from Wikipedia, update non-marked sections and updated; preserve created, aliases, and <!-- user-edited --> sections [a] abort — same as skip but log the user's intent ``
Do not proceed without an explicit choice. Map blank/Enter to skip.
- Fetch or handle background material based on exit code from the Wikipedia fetcher:
python3 _lumina/tools/fetch_wikipedia.py page "<title>"
- exit 0 — use the JSON output directly.
- exit 2 AND stderr is JSON with `kind == "disambiguation"` — run a search
to surface candidates:
``bash python3 _lumina/tools/fetch_wikipedia.py search "<title>" --limit 5 ``
Present the numbered results (title + snippet) in the user's language and let the user:
- pick a candidate number,
- type a more specific title, or
- type
manualto paste content directly.
Re-run page with the chosen title, or accept the user-pasted content.
- exit 2 for any other reason (empty title, page not found) — surface the
error field from stderr JSON and abort.
- exit 3 (network error) — tell the user and offer two options: retry, or
paste content manually.
- Write
wiki/foundations/<slug>.mdwith valid foundation frontmatter:
id, title, type: foundation, created, updated.
Also include the optional aliases field — an array of strings listing alternative names users or sources might write for this concept (abbreviations, expansions, common misspellings). Example: for a foundation titled "Reinforcement Learning from Human Feedback", use aliases: ["RLHF", "human feedback RL"]. Propose a list of 2–5 plausible alternate names, then ask the user to confirm or edit before writing. An empty list is fine if nothing obvious applies. Alternate names must be unique across all foundations — lint.mjs L10 will error on collisions.
Foundation pages do not carry provenance or confidence frontmatter fields (those belong on source pages). When the user later ingests a source that references this foundation material, /lumi-ingest will set those fields on the source page. To help that decision, note in the log entry whether the fetch was replayable (Wikipedia snapshot saved to raw/), partial (summary only), or missing (no fetch — manual entry). This keeps the audit trail clear without polluting foundation frontmatter.
Example log note: prefilled foundation reinforcement-learning (provenance: replayable — Wikipedia snapshot saved)
- Keep the body concise: definition, scope notes, and external references.
- Log the addition:
node _lumina/scripts/wiki.mjs log research-prefill "prefilled foundation <slug>"
- Run lint with fix so
wiki/index.mdand structural checks stay current:
node _lumina/scripts/lint.mjs --fix --json
Re-run in read mode (no --fix) to confirm the true count — the --fix run's own summary.errors still counts findings it just repaired:
node _lumina/scripts/lint.mjs --json
- Suggest
/lumi-checkin a fresh session or via a subagent after this run.
A blank context catches bias from the reasoning chain that just wrote the foundation page.
Constraints
- Do not create concept pages from this skill; use
/lumi-ingestfor wiki
knowledge extracted from project sources.
- Do not store secrets or API keys in foundation pages.
- Do not add reverse graph edges for foundations.
- When refreshing an existing foundation, preserve the original
createddate and
any <!-- user-edited --> sections verbatim. Only updated and non-marked sections may change.
- Aliases must be unique across all foundations. If
lint.mjsreports
L10-alias-conflict, resolve manually before completing the run — there is no automatic fix.
Definition of Done
- Foundation page exists with valid frontmatter and concise source-backed body.
node _lumina/scripts/lint.mjs --fix --jsonhas updatedwiki/index.mdif
needed, and a read-only re-run (lint.mjs --json, no --fix) leaves summary.errors === 0.
wiki/log.mdhas an append-onlyresearch-prefillentry.- If the page already existed, the user's choice (skip / refresh / abort) is logged
in wiki/log.md with the actual decision taken.