flow-worktree
Skill2 starsChanged 6 days agoMITView on GitHub
Dùng khi có từ hai luồng việc trở lên trên cùng một repo — nhiều phiên agent, nhiều subagent độc lập, sửa gấp giữa lúc đang làm dở, đo một ref khác mà không động vào cây hiện tại, hoặc khi cây làm việc đang bị phiên khác dùng. Người dùng hay nói "chạy song song", "tách ra làm riêng", "làm cùng lúc mấy việc", "worktree".
In this repository13 other files it gives its agents.
- flow-contextSkill
- flow-executeSkill
- flow-exploreSkill
- flow-initSkill
- flow-learnSkill
- flow-planSkill
- flow-postSkill
- flow-reviewSkill
- flow-runbookSkill
- flow-secretsSkill
- flowSkill
- flow-syncSkill
- flow-testSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Commit sớm, commit nhỏ, để việc của mình không bị cuốn vào thay đổi của người khác.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
flow-worktree — việc song song
Một việc song song một worktree, vì hai tiến trình chung một cây làm việc sẽ ghi đè nhau mà không ai báo lỗi.
Lệnh
flow wt new <slug> --repo <repo> --base <ref>
flow wt list
flow wt context <slug>
flow wt done <slug>wt new: tạo worktree và nhánh, mang theo tệp ngữ cảnh cục bộ, vì git bỏ qua chúng nên chúng không tự sang.wt context: xem trước tệp ngữ cảnh nào sẽ chép về cây chính, tệp nào xung đột.wt done: đóng worktree. Chỉ dùng--forcekhi người dùng đồng ý.
Điều wt done đảm bảo
- Đối chiếu ba chiều ngữ cảnh: bản gốc lúc tách, bản trong worktree, bản ở cây chính. Chỉ một bên đổi thì lấy bên đó.
- Không ghi đè khi cả hai bên cùng đổi, mà để lại cho bạn xử lý.
- Gỡ link trước khi xoá, vì xoá cưỡng bức có thể đi xuyên link và xoá nội dung thật ở cây gốc.
Trong worktree
cdbằng đường dẫn tuyệt đối, và kiểmpwd, vì lệnh chạy nhầm cây sẽ sửa nhầm việc.- Cài phụ thuộc riêng. Link phụ thuộc từ cây khác làm phép đo sai, vì mã chạy với phiên bản không phải của nhánh này.
- Tắt consumer nền khi dùng chung CSDL, nếu không nó sẽ lấy mất thông điệp của cây kia.
- Điều phối số migration với các nhánh song song, vì hai migration cùng số sẽ va nhau lúc merge.
- Dev server đang chạy có thể phục vụ từ cây khác. Xác nhận thư mục của tiến trình trước khi tin kết quả.
- Kiểm nhánh trước mỗi commit:
git branch --show-current.
Subagent
- Mỗi subagent một worktree, phạm vi rõ.
- Không để hai subagent cùng sửa một tệp. Cần sửa chung thì xếp tuần tự.
- Sau mỗi đợt,
flow dup check --base <nhánh gốc>như ở skillflow-execute.
Khi buộc phải chung cây
- Commit sớm, commit nhỏ, để việc của mình không bị cuốn vào thay đổi của người khác.
- Ghi mốc
git rev-parse HEADtrước khi bắt đầu, để biết phần nào là của mình. git addđúng tệp của mình, không dùng-A.git statuscó thể báo sai do stat cache khi có tiến trình khác đang ghi. Đừng stash hay revert thứ không phải của mình.- Đo baseline bằng worktree riêng thay vì checkout đè lên cây đang làm:
flow wt new baseline --base <ref>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.

