Migrate skill

Intakes external content, classifies chunks against LifeOS taxonomy, commits with provenance.

by danielmiessler·MIT license·★ 19,269 Stars on the repo·GitHub ↗

Use now

Files of Migrate

danielmiessler/main1 file shown
SKILL.md
Show the full text191 lines

Migrate — external-content intake and classification

🚨 MANDATORY: Voice Notification

curl -s -X POST http://localhost:31337/notify \
  -H "Content-Type: application/json" \
  -d '{"message": "Starting the migration. Scanning source and classifying chunks."}' \
  > /dev/null 2>&1 &

What It Does

Migrate intakes external content, classifies each chunk against the LifeOS taxonomy, and commits it to the right destination with provenance. Sources include .md/.txt files, stdin, other LifeOS installs, agent-harness rule files (CLAUDE.md, Cursor rules, OpenAI Custom Instructions), and Obsidian/Notion/Apple Notes exports. Classification confidence drives the flow: high-confidence chunks auto-approve, medium ones ask for confirmation, low ones get a walk-through.

The Problem

When you adopt LifeOS you usually arrive with years of accumulated notes — a CLAUDE.md, a vault of markdown, journal dumps, rules from another tool — and none of it maps cleanly onto LifeOS's structure. Sorting hundreds of chunks into TELOS sections, knowledge notes, and operational rules by hand is the kind of tedious work that never gets done, so the old material just sits there unused. Migrate does the sorting: it reads the content you already have, proposes a destination for every chunk with a confidence score, and lets you approve in bulk or review the uncertain ones, attaching provenance so nothing lands in TELOS without attribution.

How It Works

Migrates content into the LifeOS structure from external sources. Unlike /interview (which asks the user questions to fill gaps), /migrate already has the content — it just needs to classify each chunk and route it to the right LifeOS destination. MigrateScan classifies into a routing table; MigrateApprove commits per the user's chosen path.

Sources supported in V1
  • Files: .md, .markdown, .txt (single file or directory recursion)
  • Stdin: piped content or pasted directly
  • Other LifeOS installs: point at their USER/TELOS/ or MEMORY/KNOWLEDGE/ directories
  • Agent-harness rule files: CLAUDE.md, .cursorrules, OpenAI Custom Instructions export
  • Exports: Obsidian vaults (markdown), Notion exports (markdown), Apple Notes exports (.txt), raw journal dumps
What it classifies chunks into
Category Destinations
Foundational TELOS MISSION, GOALS, PROBLEMS, STRATEGIES, CHALLENGES, BELIEFS, WISDOM, MODELS, FRAMES, NARRATIVES, SPARKS
IDEAL_STATE dimensions HEALTH, MONEY, FREEDOM, RELATIONSHIPS, CREATIVE, RHYTHMS
Preference files BOOKS, AUTHORS, MOVIES, BANDS, RESTAURANTS, FOOD_PREFERENCES, LEARNING, MEETUPS, CIVIC
Identity USER/PRINCIPAL/PRINCIPAL_IDENTITY.md
Knowledge MEMORY/KNOWLEDGE/{Ideas,People,Companies,Research}
AI collaboration rules Walk-through to a constitutional surface — CLAUDE.md operational rules, a hook, settings.json, or the relevant skill's Gotchas ("always do X" / "never Y" patterns are system patches, never harness memory/feedback_*.md memos)
Unclear Flagged for the user's manual routing

Workflow Routing

No Workflows/ directory — the single migration procedure runs inline through Phases 1–6 below, backed by two tools in LIFEOS/TOOLS/.

Trigger Workflow File
/migrate, migrate content, bulk import, import from other LifeOS, import CLAUDE.md / Cursor rules / Obsidian / Notion / Apple Notes export, bring in old notes Inline Phases 1–6 (identify → scan → route → approve → UNCLEAR → summary) LIFEOS/TOOLS/MigrateScan.ts + LIFEOS/TOOLS/MigrateApprove.ts

Workflow

Phase 1 — Identify the source

Ask the user what he wants to migrate:

  • "Paste the content here and I'll work from stdin"
  • "Point me at a file path"
  • "Point me at a directory and I'll scan everything inside"
  • "I have a Cursor rules file at ~/Projects/X/.cursorrules"
  • "My old LifeOS install has TELOS at ~/old-claude/TELOS/"

Collect the source path. If content is pasted, write it to a temp file first.

Phase 2 — Scan

Run the scanner:

bun ~/.claude/LIFEOS/TOOLS/MigrateScan.ts --source <path>
# or
echo "$CONTENT" | bun ~/.claude/LIFEOS/TOOLS/MigrateScan.ts --stdin

Scanner output includes:

  • Total chunks found
  • Proposed routing table (how many chunks per target)
  • Average classification confidence
  • Count of UNCLEAR chunks
  • Count of low-confidence (<40%) chunks
Phase 3 — Present routing summary

Show the user the routing proposal in a scannable format:

Found 47 chunks from 3 files. Proposed routing:

  📂 TELOS/GOALS.md              12 chunks  (78% avg confidence)
  📂 TELOS/WISDOM.md              8 chunks  (65% avg confidence)
  📂 TELOS/BELIEFS.md             6 chunks  (71% avg confidence)
  📂 MEMORY/KNOWLEDGE/Ideas      15 chunks  (52% avg confidence)
  🧠 AI collaboration rules       4 chunks  (walk-through: CLAUDE.md / hook / skill)
  ❓ UNCLEAR                      2 chunks  (needs your call)

Options:
  - Approve everything trusted (confidence ≥60%)?
  - Walk through the low-confidence and UNCLEAR chunks one by one?
  - Review specific categories?
  - Review everything?
Phase 4 — Approval loop

Based on the user's preference:

Fast path (he says "approve all trusted"):

bun ~/.claude/LIFEOS/TOOLS/MigrateApprove.ts --approve-all

Commits everything non-UNCLEAR. Then walk through UNCLEAR chunks conversationally.

Category path (he says "approve goals and wisdom, skip knowledge"):

bun ~/.claude/LIFEOS/TOOLS/MigrateApprove.ts --approve-target TELOS/GOALS.md
bun ~/.claude/LIFEOS/TOOLS/MigrateApprove.ts --approve-target TELOS/WISDOM.md

Walk-through path (he wants careful review):

bun ~/.claude/LIFEOS/TOOLS/MigrateApprove.ts --review

Show each pending chunk. For each:

  • Show preview + proposed target + confidence + alternatives
  • Ask: approve / modify target / reject
  • Commit decision
Phase 5 — Handle UNCLEAR chunks

UNCLEAR chunks are ones where no classification rule matched strongly. For each:

  • Display full content (not just preview)
  • Ask the user: "This one's unclear — what is it? Could be X, Y, Z, or maybe Knowledge/Ideas as a catch-all?"
  • the user chooses → commit via --modify <id> --target <chosen>
Phase 6 — Completion summary

After approval pass:

  • Report total chunks committed, per-target count
  • Flag any remaining UNCLEAR
  • Recommend next step: run /interview to interview around anything the migration left sparse

Rules

  • Every commit carries provenance. The committed content includes an HTML comment noting source file + section + timestamp. Nothing gets dropped into TELOS without attribution.
  • Never bulk-approve UNCLEAR. Those require the user's explicit routing.
  • Confidence thresholds: ≥70% = trusted (auto-approve eligible). 40-70% = medium (show for confirmation). <40% = low (walk-through required).
  • Ask before touching identity. PRINCIPAL_IDENTITY.md commits always prompt — that file is load-bearing.
  • Don't duplicate. If the same content already exists in the target (substring match), flag it and ask before appending.
  • Respect private paths. Never migrate content into IDEAL_STATE/ without the user's per-dimension call (Decision #3: IDEAL_STATE is fully private and curated).
  • Rules never go to harness memory. AI collaboration rule chunks are always walked through one by one and routed to a constitutional surface: an operational rule in CLAUDE.md, a hook, a settings.json permission, or the relevant skill's Gotchas. Writing them to the harness memory/feedback_*.md directory is forbidden — every feedback memo is a missed system patch (see the system prompt's "Override of harness auto-memory").
  • Knowledge gets new files too. Each MEMORY/KNOWLEDGE/* chunk becomes a new typed note with source metadata.

Examples

User: /migrate ~/old-claude/TELOS/

the DA scans the old TELOS directory, classifies every chunk, presents the routing summary, offers fast-path vs. walk-through approval.

User: /migrate (then pastes CLAUDE.md content)

the DA reads from stdin, classifies most chunks as AI collaboration rules (walked through to CLAUDE.md / hooks / skill Gotchas) plus maybe PRINCIPAL_IDENTITY (if identity lines are mixed in), walks through approval.

User: "migrate my Cursor rules at ~/.cursor/rules"

the DA scans the rules dir, surfaces likely rule classifications, walks each through to its constitutional destination with extra care (Cursor rules often have tool-specific stuff that doesn't translate to LifeOS).

User: "import the stuff I dumped in /tmp/journal.md"

the DA scans the journal, expects a lot of UNCLEAR + WISDOM, walks through each section.

  • /interview — fills gaps by asking questions (not by intaking existing content)
  • /Telos Update workflow — edit a single TELOS file directly
  • /Knowledge — manage the Knowledge Archive
  • an identity-profile skill — manage PRINCIPAL_IDENTITY

Gotchas

  • Low average confidence (<40%): the source is probably genre-mismatched (e.g., code comments, logs, raw data). Consider pre-filtering to remove non-prose chunks before scanning.
  • Everything goes to UNCLEAR: the source probably has no recognizable LifeOS-taxonomy patterns. Either add the content manually via /Telos or write it as general Knowledge notes.
  • Duplicate content warnings: the scanner doesn't dedupe against existing files yet. Run --dry-run first to preview before committing.
1---
2name: Migrate
3version: 1.0.11
4description: "Intakes external content, classifies chunks against LifeOS taxonomy, commits with provenance. Sources: .md/.txt, stdin, LifeOS dirs, CLAUDE.md/Cursor/OpenAI Custom Instructions, Obsidian/Notion/Apple Notes exports. MigrateScan classifies → routing table. MigrateApprove with --approve-all/--approve-target/--review/--dry-run. Confidence ≥70% auto, 40-70% confirm, <40% walk-through. USE WHEN /migrate, migrate content, import from other LifeOS, bring in old notes, import Cursor rules, import CLAUDE.md, bulk import, Obsidian/Notion/Apple Notes import. NOT FOR single-file edits, conversational interviews, identity edits."
5disable-model-invocation: true
6---
7 
8# Migrate — external-content intake and classification
9 
10## 🚨 MANDATORY: Voice Notification
11 
12```bash
13curl -s -X POST http://localhost:31337/notify \
14 -H "Content-Type: application/json" \
15 -d '{"message": "Starting the migration. Scanning source and classifying chunks."}' \
16 > /dev/null 2>&1 &
17```
18 
19## What It Does
20 
21Migrate intakes external content, classifies each chunk against the LifeOS taxonomy, and commits it to the right destination with provenance. Sources include `.md`/`.txt` files, stdin, other LifeOS installs, agent-harness rule files (CLAUDE.md, Cursor rules, OpenAI Custom Instructions), and Obsidian/Notion/Apple Notes exports. Classification confidence drives the flow: high-confidence chunks auto-approve, medium ones ask for confirmation, low ones get a walk-through.
22 
23## The Problem
24 
25When you adopt LifeOS you usually arrive with years of accumulated notes — a CLAUDE.md, a vault of markdown, journal dumps, rules from another tool — and none of it maps cleanly onto LifeOS's structure. Sorting hundreds of chunks into TELOS sections, knowledge notes, and operational rules by hand is the kind of tedious work that never gets done, so the old material just sits there unused. Migrate does the sorting: it reads the content you already have, proposes a destination for every chunk with a confidence score, and lets you approve in bulk or review the uncertain ones, attaching provenance so nothing lands in TELOS without attribution.
26 
27## How It Works
28 
29Migrates content into the LifeOS structure from external sources. Unlike `/interview` (which asks the user questions to fill gaps), `/migrate` **already has the content** — it just needs to classify each chunk and route it to the right LifeOS destination. MigrateScan classifies into a routing table; MigrateApprove commits per the user's chosen path.
30 
31### Sources supported in V1
32 
33- **Files:** `.md`, `.markdown`, `.txt` (single file or directory recursion)
34- **Stdin:** piped content or pasted directly
35- **Other LifeOS installs:** point at their `USER/TELOS/` or `MEMORY/KNOWLEDGE/` directories
36- **Agent-harness rule files:** `CLAUDE.md`, `.cursorrules`, OpenAI Custom Instructions export
37- **Exports:** Obsidian vaults (markdown), Notion exports (markdown), Apple Notes exports (.txt), raw journal dumps
38 
39### What it classifies chunks into
40 
41| Category | Destinations |
42|---|---|
43| **Foundational TELOS** | MISSION, GOALS, PROBLEMS, STRATEGIES, CHALLENGES, BELIEFS, WISDOM, MODELS, FRAMES, NARRATIVES, SPARKS |
44| **IDEAL_STATE dimensions** | HEALTH, MONEY, FREEDOM, RELATIONSHIPS, CREATIVE, RHYTHMS |
45| **Preference files** | BOOKS, AUTHORS, MOVIES, BANDS, RESTAURANTS, FOOD_PREFERENCES, LEARNING, MEETUPS, CIVIC |
46| **Identity** | USER/PRINCIPAL/PRINCIPAL_IDENTITY.md |
47| **Knowledge** | MEMORY/KNOWLEDGE/{Ideas,People,Companies,Research} |
48| **AI collaboration rules** | Walk-through to a constitutional surface — CLAUDE.md operational rules, a hook, `settings.json`, or the relevant skill's Gotchas ("always do X" / "never Y" patterns are system patches, never harness `memory/feedback_*.md` memos) |
49| **Unclear** | Flagged for the user's manual routing |
50 
51## Workflow Routing
52 
53No `Workflows/` directory — the single migration procedure runs inline through Phases 1–6 below, backed by two tools in `LIFEOS/TOOLS/`.
54 
55| Trigger | Workflow | File |
56|---------|----------|------|
57| /migrate, migrate content, bulk import, import from other LifeOS, import CLAUDE.md / Cursor rules / Obsidian / Notion / Apple Notes export, bring in old notes | Inline Phases 1–6 (identify → scan → route → approve → UNCLEAR → summary) | `LIFEOS/TOOLS/MigrateScan.ts` + `LIFEOS/TOOLS/MigrateApprove.ts` |
58 
59## Workflow
60 
61### Phase 1 — Identify the source
62 
63Ask the user what he wants to migrate:
64 
65- "Paste the content here and I'll work from stdin"
66- "Point me at a file path"
67- "Point me at a directory and I'll scan everything inside"
68- "I have a Cursor rules file at ~/Projects/X/.cursorrules"
69- "My old LifeOS install has TELOS at ~/old-claude/TELOS/"
70 
71Collect the source path. If content is pasted, write it to a temp file first.
72 
73### Phase 2 — Scan
74 
75Run the scanner:
76 
77```bash
78bun ~/.claude/LIFEOS/TOOLS/MigrateScan.ts --source <path>
79# or
80echo "$CONTENT" | bun ~/.claude/LIFEOS/TOOLS/MigrateScan.ts --stdin
81```
82 
83Scanner output includes:
84- Total chunks found
85- Proposed routing table (how many chunks per target)
86- Average classification confidence
87- Count of UNCLEAR chunks
88- Count of low-confidence (<40%) chunks
89 
90### Phase 3 — Present routing summary
91 
92Show the user the routing proposal in a scannable format:
93 
94```
95Found 47 chunks from 3 files. Proposed routing:
96 
97 📂 TELOS/GOALS.md 12 chunks (78% avg confidence)
98 📂 TELOS/WISDOM.md 8 chunks (65% avg confidence)
99 📂 TELOS/BELIEFS.md 6 chunks (71% avg confidence)
100 📂 MEMORY/KNOWLEDGE/Ideas 15 chunks (52% avg confidence)
101 🧠 AI collaboration rules 4 chunks (walk-through: CLAUDE.md / hook / skill)
102 ❓ UNCLEAR 2 chunks (needs your call)
103 
104Options:
105 - Approve everything trusted (confidence ≥60%)?
106 - Walk through the low-confidence and UNCLEAR chunks one by one?
107 - Review specific categories?
108 - Review everything?
109```
110 
111### Phase 4 — Approval loop
112 
113Based on the user's preference:
114 
115**Fast path** (he says "approve all trusted"):
116```bash
117bun ~/.claude/LIFEOS/TOOLS/MigrateApprove.ts --approve-all
118```
119Commits everything non-UNCLEAR. Then walk through UNCLEAR chunks conversationally.
120 
121**Category path** (he says "approve goals and wisdom, skip knowledge"):
122```bash
123bun ~/.claude/LIFEOS/TOOLS/MigrateApprove.ts --approve-target TELOS/GOALS.md
124bun ~/.claude/LIFEOS/TOOLS/MigrateApprove.ts --approve-target TELOS/WISDOM.md
125```
126 
127**Walk-through path** (he wants careful review):
128```bash
129bun ~/.claude/LIFEOS/TOOLS/MigrateApprove.ts --review
130```
131Show each pending chunk. For each:
132- Show preview + proposed target + confidence + alternatives
133- Ask: approve / modify target / reject
134- Commit decision
135 
136### Phase 5 — Handle UNCLEAR chunks
137 
138UNCLEAR chunks are ones where no classification rule matched strongly. For each:
139- Display full content (not just preview)
140- Ask the user: "This one's unclear — what is it? Could be X, Y, Z, or maybe Knowledge/Ideas as a catch-all?"
141- the user chooses → commit via `--modify <id> --target <chosen>`
142 
143### Phase 6 — Completion summary
144 
145After approval pass:
146- Report total chunks committed, per-target count
147- Flag any remaining UNCLEAR
148- Recommend next step: run `/interview` to interview around anything the migration left sparse
149 
150## Rules
151 
152- **Every commit carries provenance.** The committed content includes an HTML comment noting source file + section + timestamp. Nothing gets dropped into TELOS without attribution.
153- **Never bulk-approve UNCLEAR.** Those require the user's explicit routing.
154- **Confidence thresholds:** ≥70% = trusted (auto-approve eligible). 40-70% = medium (show for confirmation). <40% = low (walk-through required).
155- **Ask before touching identity.** PRINCIPAL_IDENTITY.md commits always prompt — that file is load-bearing.
156- **Don't duplicate.** If the same content already exists in the target (substring match), flag it and ask before appending.
157- **Respect private paths.** Never migrate content into IDEAL_STATE/ without the user's per-dimension call (Decision #3: IDEAL_STATE is fully private and curated).
158- **Rules never go to harness memory.** AI collaboration rule chunks are always walked through one by one and routed to a constitutional surface: an operational rule in CLAUDE.md, a hook, a `settings.json` permission, or the relevant skill's Gotchas. Writing them to the harness `memory/feedback_*.md` directory is forbidden — every feedback memo is a missed system patch (see the system prompt's "Override of harness auto-memory").
159- **Knowledge gets new files too.** Each `MEMORY/KNOWLEDGE/*` chunk becomes a new typed note with source metadata.
160 
161## Examples
162 
163### User: `/migrate ~/old-claude/TELOS/`
164 
165the DA scans the old TELOS directory, classifies every chunk, presents the routing summary, offers fast-path vs. walk-through approval.
166 
167### User: `/migrate` (then pastes CLAUDE.md content)
168 
169the DA reads from stdin, classifies most chunks as AI collaboration rules (walked through to CLAUDE.md / hooks / skill Gotchas) plus maybe PRINCIPAL_IDENTITY (if identity lines are mixed in), walks through approval.
170 
171### User: "migrate my Cursor rules at ~/.cursor/rules"
172 
173the DA scans the rules dir, surfaces likely rule classifications, walks each through to its constitutional destination with extra care (Cursor rules often have tool-specific stuff that doesn't translate to LifeOS).
174 
175### User: "import the stuff I dumped in /tmp/journal.md"
176 
177the DA scans the journal, expects a lot of UNCLEAR + WISDOM, walks through each section.
178 
179## Related
180 
181- `/interview` — fills gaps by asking questions (not by intaking existing content)
182- `/Telos` Update workflow — edit a single TELOS file directly
183- `/Knowledge` — manage the Knowledge Archive
184- an identity-profile skill — manage PRINCIPAL_IDENTITY
185 
186## Gotchas
187 
188- **Low average confidence (<40%):** the source is probably genre-mismatched (e.g., code comments, logs, raw data). Consider pre-filtering to remove non-prose chunks before scanning.
189- **Everything goes to UNCLEAR:** the source probably has no recognizable LifeOS-taxonomy patterns. Either add the content manually via `/Telos` or write it as general Knowledge notes.
190- **Duplicate content warnings:** the scanner doesn't dedupe against existing files yet. Run `--dry-run` first to preview before committing.
191 

Discussion

Alternatives