wiki-migration
Skill2 starsChanged 2 months agoMITView on GitHub
Use when a wiki page's schema_version is behind the registry's current version for its page type. Owns the minimal schema registry (schemas.json) and a thin verify/apply primitive for running one migration directory against one page. Invoked by /ren:update, not directly by the friend.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- backupSkill
- bootstrap-projectSkill
- code-mapSkill
- distillSkill
- doctorSkill
- ingest-projectSkill
- installSkill
- interviewSkill
- metric-watchSkill
- pinSkill
- recallSkill
- rememberSkill
- retrospectiveSkill
- routine-initSkill
- suggestionsSkill
- updateSkill
- wiki-healthSkill
- wrapSkill
The file
Files
wiki-migration
The minimal registry + runner /ren:update (and /ren:doctor's schema-version check) drive migrations through. Per spec §7.1, donor's heavy chain-computer + registry-template + JSON-schema-validated verify-page.sh machinery is pre-excluded for 0.2 — this is deliberately thin.
schemas.json
Enumerates only the page types actually stamped by something in this repo: identity, l2-map (both still at their initial schema, no migrations yet), and routine-spec (schema 3, migrated via routine-spec-1-to-2 then routine-spec-2-to-3). Not a speculative full taxonomy — add an entry only when a page type gets a real migration.
The env-mapping shim (load-bearing)
migrations/routine-spec-1-to-2/ was carried verbatim from donor and expects SF_WIKI_ROOT/SF_SNAPSHOT_DIR. migrations/routine-spec-2-to-3/ was written fresh for this repo and expects REN_WIKI_ROOT/REN_SNAPSHOT_DIR. run_migration() sets both pairs of env vars to the same values on every invocation, so the same thin runner drives either migration directory without needing to know in advance which naming convention its migrate.sh reads. This is documented here rather than fixed at the source, because "carry verbatim" for 1-to-2 was an explicit instruction (Task 6.3) — the shim is the seam, not a bug to clean up.
Behavior
load_registry()readsschemas.json.migration_chain(page_type, from_version)returns the ordered subset of that page type's migration directories still needed to reachcurrent.- For each directory in the chain:
run_migration(migration_dir, page_path, wiki_root, snapshot_dir)invokes itsmigrate.sh(idempotent, in-place — see each migration's own README for what it changes). verify_page(verify_json_path, page_path)checks the migrated page's frontmatter against that migration'sverify.jsonassertions (yaml.valid/yaml.equals/yaml.present/yaml.in;snapshot.body-identicalis not implemented here — callers that need it compare bodies directly, which both migration test suites already do).
What this skill does NOT do
- Compute a full dependency-ordered migration chain across ALL page types with cross-references (donor's chain-computer). This is a flat per-page-type list.
- Validate
verify.jsonfiles against a JSON Schema.verify_page()is a small, direct predicate interpreter for the four predicate kinds actually used by the two migrations in this repo. - Decide WHEN to migrate.
/ren:update(this skill's only caller) owns the snapshot-before/diff-approval/apply flow around these primitives.
References
migrations/routine-spec-1-to-2/,migrations/routine-spec-2-to-3/— the two migration directories this skill can runskills/update/— the only intended caller ofrun_migration/verify_pageskills/doctor/— readsload_registry()/migration_chain()for its schema-version check
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

