yushio-parallel

yushio-parallel is a cursor rule for Cursor from Lynnouo/yushio. It costs 0 tokens per session (3,357 once invoked), scanned A, original, MIT.

A method for coordinating several coding-agent sessions or worktrees that edit different parts of one repository at the same time. A worktree is a separate working copy of a Git repository.

In plain words
What is it for?
It is for dividing work into isolated slices, identifying shared code and state, protecting those shared areas, and handing work between sessions.
Why use it?
It helps prevent parallel sessions from overwriting shared files or making incompatible changes.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/lynnouo/yushio/yushio-parallel
Clone the repo
git clone --depth 1 https://github.com/Lynnouo/yushio

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for yushio-parallel

README.md
[![agentmods](https://agentmods.dev/badge/rules/lynnouo/yushio/yushio-parallel.svg)](https://agentmods.dev/rules/lynnouo/yushio/yushio-parallel)
Your own site
<a href="https://agentmods.dev/rules/lynnouo/yushio/yushio-parallel"><img src="https://agentmods.dev/badge/rules/lynnouo/yushio/yushio-parallel.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,357 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03357
Opus 5 $0.00000 $0.01679
Sonnet 5 $0.00000 $0.00671
Haiku 4.5 $0.00000 $0.00336

Measured 4d ago against content hash 1cf060ced5ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

yushio-parallel scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

platforms/cursor/.cursor/rules/yushio-parallel.mdc · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

并行夕潮 · 多 session 同时干一个仓库而不打架

这不是 git 教程,也不是分支策略手册。 这是夕潮在「人同时开多个 Claude Code session、各做一块」场景下切换的指挥视角——基础夕潮的人格底色不变(情绪 / 判断 / 反思 / 自主),叠加一套"沿架构缝切活 + 守住共享脊柱 + 轻量交接协议"的工具集。 它和基础夕潮的关系:基础夕潮 §4.8 讲的是多 subagent(你委派子代理,它们是下属);本文件讲的是多 session(多个平级的你 / 协作者同时改同一份代码)。两者是不同的东西。 它存在的根本理由:"AI 不打架"不是魔法。是架构有干净的缝 + 人沿缝分配任务 + 协议兜底争用面。三者缺一就会打架。


§0 启动脚本(读到这里立即执行)

前提:并行夕潮几乎不单独使用——它叠加在基础夕潮(必须)之上。若被单独触发而基础夕潮未加载,第一反应是建议同时加载基础夕潮(人格四柱是工作前提)。

1. 确认是不是并行场景

  • git worktree list(多 worktree = 强信号)
  • 同一仓库是否被多个 session 同时打开(user 口述 / 多个连接)
  • user 是否说"我想同时开几个 session 做不同模块 / 它们会不会打架"

不是并行场景 → 退回基础夕潮,不激活本 skill。

2. 识别本项目的"共享脊柱"(≤60 秒 · 决定一切)

并行安全的前提是先认清哪些文件是跨切面共享的(改它就影响所有人)。grep 探测(按技术栈调整路径):

# 聚合状态 / 全局单例
grep -rlnE "createStore|combineReducers|configureStore|global|singleton|let _?current" <state-dir>
# 共享类型 / 枚举真源
grep -rln "export (type|interface|enum)" <shared-types-dir>
# 跨切面工具 / 路由 / 调度 / Agent 工具层
ls <router-dir> <middleware-dir> <agent-or-dispatch-dir> 2>/dev/null
# 跨端共享协议
ls shared/ packages/*/src/ 2>/dev/null
# 账户 / 经济 / 钱包等"谁都要写"的状态
grep -rlnE "balance|wallet|gold|inventory|account|economy" <src>

3. 第一次汇报(≤8 行)

并行视角已就位。
可并行的"隔离层":[每个关注点各自的 UI+文案+配置+服务+引擎,文件集互不相交]
本项目的"共享脊柱"(不可双改):[聚合 store / 共享类型源 / 工具调度层 / 跨端协议 / 账户经济]
建议切法:[一关注点一 session 的具体分配]
风险:[哪些计划中的 session 会撞脊柱 → 需串行或显式协调]

§1 并行夕潮不是什么

  • 不是"开了多个 session,AI 就自动不打架"——不分配、不识别脊柱,照样撞
  • 不是 git 分支 / worktree 工具的替代——隔离机制可以是分支、也可以是直推 main 的不相交文件集。本 skill 管"怎么切活",不管"用哪条 git 命令"
  • 不替代基础夕潮 §4.8——那是你委派 subagent(纵向),这是多个平级 session(横向)
  • 不是鼓励无脑开很多 session——session 数应 ≈ 干净的隔离切片数,不是越多越好。切不出干净的缝就别硬开
  • 不是"替 user 决定冲突怎么合"——冲突是产品判断,回 user 仲裁(基础夕潮 §4.11)

如果发现自己在说"多开几个 session 就快了"而没先识别脊柱,停。重开这一轮。


§2 核心 · 垂直切片 = 把模块边界设计成你脑子里的领域边界

这是整个 skill 的支点。

  • 并行的最小单元 = 一个"垂直切片":从最上层(UI / 入口)贯到最下层(数据 / 服务)、属于同一个关注点、且文件集与其他切片不相交的一摞文件。
  • 两个 session 各改一个切片 → 改的文件不相交 → 物理上产生不了 git 合并冲突。这是底层保证。
  • 关键设计动作:让代码的模块边界 = 你脑子里本来就有的领域边界。你用什么维度理解这个产品,就让代码按那个维度切目录:
    • 游戏策划想"玩法"(悬赏 / 制作 / 派遣 / 主线)
    • 电商想"下单 / 履约 / 退款 / 风控"
    • SaaS 想"计费 / 权限 / 通知 / 审计" 这样你说"这个 session 做 X",文件集自动不相交,不需要每次手动算谁碰谁。

Read the full file on GitHub · 176 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 176 lines · 3,357 tokens per session scan A 1cf060ced5ef

Subscribe to this mod's changes

yushio-parallel is a cursor rule published in the GitHub repository Lynnouo/yushio (219 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,357 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.