Intakes external content, classifies chunks against LifeOS taxonomy, commits with provenance. Sources: .md/.txt, stdin, LifeOS dirs, CLAUDE.md/Cursor/OpenAI Cus
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-migrate-54b1365391a5 ,按照其中的说明把「Migrate」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
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 &
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.
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.
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.
.md, .markdown, .txt (single file or directory recursion)USER/TELOS/ or MEMORY/KNOWLEDGE/ directoriesCLAUDE.md, .cursorrules, OpenAI Custom Instructions export| 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 |
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 |
Ask the user what he wants to migrate:
Collect the source path. If content is pasted, write it to a temp file first.
Run the scanner:
bun ~/.claude/LIFEOS/TOOLS/MigrateScan.ts --source <path>
# or
echo "$CONTENT" | bun ~/.claude/LIFEOS/TOOLS/MigrateScan.ts --stdin
Scanner output includes:
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?
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:
UNCLEAR chunks are ones where no classification rule matched strongly. For each:
--modify <id> --target <chosen>After approval pass:
/interview to interview around anything the migration left sparsesettings.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").MEMORY/KNOWLEDGE/* chunk becomes a new typed note with source metadata./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.
/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.
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).
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/Telos or write it as general Knowledge notes.--dry-run first to preview before committing.