| name | import |
| description | Import an existing research project into the SWF workflow: create Linear Project with milestones, add standard docs to existing repo |
Import Existing Project
Bring an existing research project into the SWF workflow without disrupting current work.
Workflow
-
Identify the project:
- Ask: repo 路径或 GitHub URL
- Read the repo to understand current state:
ls top-level structure
- Check for existing CLAUDE.md, README, docs/
git log --oneline -10 recent history
- Check language/framework from files
-
Assess current phase:
-
Gather project info:
- 项目简称(用于 Linear Project 名,通常和 repo 名一致)
- 一句话描述
- 技术栈
- GitHub repo URL(从
git remote -v 自动获取)
-
Create Linear Project:
-
Create Phase Milestones (read ${CLAUDE_SKILL_DIR}/../reference/phase-template.md):
- Create all Phase 1~8 milestones
- Phases before current: leave empty (historical work not tracked)
- Current phase: will populate with issues next
-
Scaffold missing docs (non-destructive — never overwrite existing files):
| File | If exists | If missing |
|---|
| CLAUDE.md | Keep as-is, suggest merging SWF conventions | Generate from template |
| docs/design.md | Keep as-is | Create placeholder, remind user to fill |
| docs/adr/ | Keep as-is | Create directory |
| docs/experiments/benchmark/ | Keep as-is | Create directory |
| docs/experiments/case/ | Keep as-is | Create directory |
| docs/paper/ | Keep as-is | Create directory |
| configs/ | Keep as-is | Create directory |
| results/ | Keep as-is | Create directory |
| .gitignore | Merge SWF entries (results/, *.h5ad, etc.) without deleting existing rules | Generate from template |
-
Handle existing CLAUDE.md:
- If exists, show a diff of what SWF conventions would add:
- 行为准则 section
- 实验规范 section
- 文档保护 section
- 工作方式 section(Linear 关联)
- Ask: "要合并这些内容到现有 CLAUDE.md 吗?还是保持原样?"
- If merge: append new sections, don't touch existing content
-
Seed current phase issues:
- Ask: "当前阶段有哪些正在做或待做的事?我来建成 Linear issues。"
- For each item the user describes:
- Create issue with appropriate labels (type + executor)
- Assign to current phase milestone
- If user says "暂时不建",skip this step
-
Summarize prior work to Archive:
- Analyze the repo's history and existing artifacts to understand what has been done before import:
git log — development history, key milestones
- Existing docs, README — project description, design decisions
- Existing results, figures — completed experiments
- Code structure — what's been built
- Write a summary as a Linear Document to the Linear project itself (using
create_document with project parameter):
- Present summary to user for review before saving
-
Commit and report:
Safety
- NEVER overwrite existing files — only create missing ones or merge with confirmation
- NEVER delete or reorganize existing code or directory structure
- NEVER move existing docs to new locations without asking
- Respect the project's existing conventions — SWF adapts to the project, not the other way around