neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
여러 AI 코딩 에이전트를 하나의 git 저장소에서 실행하고, 격리 작업 트리·병합 시뮬레이션·안전 정리를 제공하는 CLI
A CLI for running multiple AI coding agents on one git repository: isolated worktrees, merge simulation before anyone lands, safe cleanup.
개발 도구TypeScript · JavaScriptGitHub @MohammedAlkindi온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Run many AI coding agents on one repo without collisions.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
One repo, many AI coding agents, zero collisions — Switchyard's fleet CLI gives every agent an isolated git worktree, with collision detection before you merge.
fleet spawn two agents · fleet list the whole fleet · fleet check catches the collision before anyone merges · full-quality mp4README 전문 보기 ↗Switchyard's
fleetCLI coordinates coding agents working on one Git repository. Each agent gets its own worktree and branch, andfleet checkreports files that more than one agent changed before anyone merges.
Two AI coding agents on one checkout ends badly. This project exists because Codex silently ran a git reset on main mid-merge while Claude Code was mid-task on the same files — the merge state vanished and neither agent noticed. The failure mode isn't exotic: two agents, one working tree, no isolation. Switchyard (published as @switchyardhq/switchyard; the installed command is fleet) gives each agent its own git worktree and branch, tracks them centrally, and flags collisions between agents before anyone merges.
(The same flow as the demo video, in skimmable, copy-pasteable form.)
$ fleet spawn claude
Spawned agent claude
branch: fleet/claude (from main)
worktree: ~/project/.fleet/worktrees/claude
Point your agent at it:
cd ~/project/.fleet/worktrees/claude
$ fleet list
┌────────┬──────────────┬──────┬───────┬───────────────┬───────────┬───────────────┬──────────────────────────┐
│ AGENT │ BRANCH │ BASE │ +/- │ CHANGES │ VALIDATED │ LAST ACTIVITY │ WORKTREE │
├────────┼──────────────┼──────┼───────┼───────────────┼───────────┼───────────────┼──────────────────────────┤
│ claude │ fleet/claude │ main │ +3/-0 │ clean │ passed │ 12m ago │ .fleet/worktrees/claude │
│ codex │ fleet/codex │ main │ +1/-2 │ 4 uncommitted │ — │ just now │ .fleet/worktrees/codex │
└────────┴──────────────┴──────┴───────┴───────────────┴───────────┴───────────────┴──────────────────────────┘
$ fleet check
1 collision risk detected:
┌───────────────────┬───────────────┬───────────────┐
│ FILE │ AGENTS │ VERDICT │
├───────────────────┼───────────────┼───────────────┤
│ src/api/routes.ts │ claude, codex │ will conflict │
└───────────────────┴───────────────┴───────────────┘
Verdicts from git merge-tree simulation of each agent pair's committed work; uncommitted edits can't be simulated and stay blocking.
npm install -g @switchyardhq/switchyard
Requires Node.js >= 18.17 and git >= 2.31. The installed command is fleet.
cd your-repo
fleet init # config, ignore entry, and the agent-facing docs
fleet spawn claude # isolated worktree on branch fleet/claude
cd .fleet/worktrees/claude # point your agent here and let it work
fleet check # any files also touched by other agents?
fleet sync claude # base moved on? catch the branch up
fleet validate claude # run your test command, record the result
fleet dashboard # agents, validation, collisions — one live pane
fleet exec claude -- npm test # run commands in the worktree without cd'ing
fleet diff claude # review the branch before merging
fleet merge claude # merge into your current branch + clean up the agent
fleet undo # …and roll that merge back if it was a mistake
fleet pr claude # …or push it and open a PR via gh instead
| Command | Description | Key flags |
|---|---|---|
fleet init | Set the repo up for the fleet workflow: starter .fleetrc.json, .fleet/ in .git/info/exclude, the Claude Code skill in .claude/skills/, and a protocol block in AGENTS.md. Idempotent — re-run after upgrading to refresh the agent-facing docs | --check verify without writing; exits 1 on drift (CI-friendly), --force overwrite an existing .fleetrc.json, --json machine-readable output |
fleet spawn <agent> | Create a worktree in .fleet/worktrees/<agent>/ on a new branch fleet/<agent>, then provision it (copyOnSpawn / postSpawn below) | --from <branch> base branch (default: current branch) |
fleet list | All active agents: branch, base, ahead/behind, uncommitted count, last activity | --json machine-readable output |
fleet status <agent> | One agent in detail: uncommitted files, diff stat vs base, ahead/behind | --json machine-readable output |
fleet check | Table of files touched by more than one agent. On git ≥ 2.38 each shared file gets a merge-simulation verdict — files whose committed changes merge cleanly are reported but don't block or fail the check. Exits 1 on real collision risks (CI-friendly) | --lines only count overlapping line ranges, --files-only skip simulation; flag any shared file, --json machine-readable output |
fleet diff <agent> | Full diff of the agent's branch against its base | --base <branch> diff against a different branch |
fleet sync <agent> | Merge the agent's base branch into its branch, catching it up. A conflicting merge is aborted — never left half-done | --all sync every registered agent in one sweep, continuing past per-agent failures; exits 1 if any failed |
fleet validate <agent> | Run the configured validate command in the agent's worktree and record the result against the exact commit it certifies. fleet list shows the record; trusts a passing one instead of re-running. Refuses a worktree that is dirty before or after the command — a record certifies a commit |
All commands work from the main checkout or from inside any agent worktree.
init, list, status, check, validate, and doctor take --json for machine-readable output, so agents and CI can consume Switchyard state directly — e.g. a merge gate:
fleet check --json || exit 1 # exit code alone is enough for CI
fleet list --json | jq -r '.[].name' # enumerate active agents
fleet init --check # exits 1 when the agent-facing docs drifted
fleet validate --all # exits 1 unless every agent's tip passes
fleet dashboard --once # one full-fleet frame, for CI logs
fleet check --lines refines collision detection from files to line ranges: two agents editing disjoint parts of one file are reported separately instead of blocking. Ranges are computed against each pair's merge base — exact when both agents share a base, a documented heuristic otherwise (see docs/architecture.md).
On git ≥ 2.38, fleet check upgrades from "same file" to "would actually
conflict": each pair of overlapping agents is merged in memory with
git merge-tree, and cleanly merging overlaps are demoted to an informational
list (they no longer exit 1). --files-only restores plain file-level
behavior; older git falls back to it automatically. JSON output carries
prediction: "merge-tree" | "files" so scripts know which semantics ran.
Everything above assumes a human at a terminal. fleet mcp gives the agents
themselves a way to see the fleet: it serves Switchyard state over the
Model Context Protocol on stdio, so an agent
can check for collisions before it starts editing rather than discovering
them at merge time.
Point an MCP client at it:
{
"mcpServers": {
"switchyard": {
"command": "fleet",
"args": ["mcp"]
}
}
}
Without a global install, use "command": "npx", "args": ["-y", "@switchyardhq/switchyard", "mcp"].
| Tool | Arguments | Returns |
|---|---|---|
fleet_list | — | Every active agent: branch, base, worktree path, ahead/behind, uncommitted count, last activity |
fleet_status | agent | One agent in detail: record, ahead/behind, uncommitted files, diffstat vs base |
fleet_check | lines?, filesOnly? | Files touched by more than one agent, with merge-simulation verdicts |
fleet_lock_status | — | Whether a fleet command is currently mutating the repo |
Each returns the same object the matching --json flag prints, so the CLI and
the MCP surface can never disagree about what the state is.
The demo GIF above shows the human side. This is the same collision from the
agent's side — a real session against fleet mcp, two agents having both
rewritten src/api/routes.ts:
// → the client opens the session
{"jsonrpc":"2.0","id":1,"method":"initialize",
"params":{"protocolVersion":"2025-11-25","capabilities":{},
"clientInfo":{"name":"demo-client","version":"1.0.0"}}}
// ← the server answers, and states the read-only contract up front
{"jsonrpc":"2.0","id":1,"result":{
"protocolVersion":"2025-11-25",
"capabilities":{"tools":{}},
"serverInfo":{"name":"switchyard","title":"Switchyard","version":"0.5.0"},
"instructions":"... These tools are read-only by design. Spawning agents,
merging, and removing worktrees are human actions in this
release — there are no tools for them. Ask for
`fleet spawn <name>` rather than creating a worktree yourself."}}
// → before editing anything, the agent checks
{"jsonrpc":"2.0","id":2,"method":"tools/call",
"params":{"name":"fleet_check","arguments":{}}}
The reply's content block carries the same object fleet check --json prints:
{
"collisions": [
{ "file": "src/api/routes.ts", "agents": ["claude", "codex"], "verdict": "conflicts" }
],
"prediction": "merge-tree",
"agentsChecked": 2,
"cleanMerges": []
}
"verdict": "conflicts" is the agent's cue to stop and coordinate — reached
before it wrote a line, rather than at merge time.
There is no fleet_spawn, fleet_merge, or fleet_remove. Agents can observe
the fleet; they cannot join or change it. Provisioning and merging stay human
actions in this release.
That is a real limitation, not a technicality, and it has a failure mode worth
naming: an agent that goes looking for a spawn tool, finds none, and falls back
to a raw git worktree add has produced exactly the untracked, uncoordinated
state Switchyard exists to prevent. The server therefore says so at handshake
time, and the shipped skill says so again — an agent should ask for
fleet spawn <name> instead.
A pleasant consequence: since spawn is not exposed, the postSpawn hook
(arbitrary shell from .fleetrc.json) is not reachable from an agent at all.
The tools report state; they cannot convey that you are expected to check
before editing rather than before merging, or that provisioning is something
to ask a human for. That convention is the actual product, and fleet init
installs it in two forms:
| Artifact | Audience |
|---|---|
.claude/skills/switchyard/SKILL.md | Claude Code, which loads the full skill on demand |
A marked block in AGENTS.md | Any agent that reads AGENTS.md up front — Codex, Cursor, and others |
Two texts rather than one generated from the other, because the audiences differ: a skill loaded on demand can afford a hundred lines, an always-read file cannot.
Both are package-managed and refreshed on every fleet init, so upgrading the
package and re-running is enough to keep them current. In AGENTS.md only the
region between <!-- switchyard:begin --> and <!-- switchyard:end --> is
rewritten — the rest of the file is yours and is never touched. .fleetrc.json
is treated the opposite way: it is your file, so init never overwrites it
without --force.
If the markers are ever half-deleted or inverted, init refuses rather than guessing where your content ends.
An optional .fleetrc.json at the repo root sets per-repo defaults. Precedence everywhere: CLI flag > .fleetrc.json > built-in default.
{
"$schema": "https://unpkg.com/@switchyardhq/switchyard/schema/fleetrc.schema.json",
"defaultBase": "main",
"watchInterval": 3,
"autoClean": false,
"copyOnSpawn": [".env"],
"postSpawn": "npm ci",
"preMerge": "npm run lint",
"validate": "npm test"
}
$schema — optional; points editors at the config's JSON schema for autocomplete and validation. The schema ships with the package (node_modules/@switchyardhq/switchyard/schema/fleetrc.schema.json).defaultBase — base branch for fleet spawn when --from is not passed (built-in default: the current branch).watchInterval — refresh interval for fleet watch, in seconds (built-in default: 3).autoClean — when true, every successful fleet merge also runs a fleet clean sweep for other fully merged agents (built-in default: false).copyOnSpawn — repo-root-relative files/directories copied into every new worktree by fleet spawn. Worktrees don't carry gitignored files, so a fresh one has no .env or local config — this fixes that. Missing entries are skipped with a note.postSpawn — shell command run inside the new worktree after fleet spawn (e.g. npm ci), so the worktree is ready to work in. A failing hook is reported but the worktree is kept.preMerge — shell command run inside the agent's worktree before fleet merge starts (e.g. npm test). A non-zero exit aborts the merge before anything is touched.validate — shell command fleet validate runs inside an agent's worktree and records per commit (e.g. npm test). When set, fleet merge requires the agent's tip to hold a passing record, running the command itself when the record is missing or stale. preMerge still runs at merge time regardless — validate is the recorded, skippable gate; preMerge is the always-run hook.A malformed config file is a hard error with the offending key named; a missing one is fine.
[!NOTE]
postSpawn,preMerge, andvalidaterun shell commands straight from the repo's.fleetrc.json— the same trust you already extend to a repo's npm scripts or git hooks. Review that file before runningfleet spawn,fleet merge, orfleet validatein a repository you didn't author (details in SECURITY.md).
fleet spawn runs git worktree add under the hood: each agent gets a real, separate directory with its own checkout of a dedicated fleet/<agent> branch, so one agent's git reset physically cannot touch another agent's files. A single gitignored .fleet/state.json in the main repo maps each agent to its branch, base, and worktree, and fleet check uses it to diff every agent branch against its base (git diff base...branch, plus uncommitted edits) and cross-reference the changed files. Switchyard also adds .fleet/ to .git/info/exclude automatically, so it never dirties the repos it manages. Design rationale and limitations live in docs/architecture.md.
PRs are welcome. Clone, npm install, npm test — every command is tested against real throwaway git repositories, and any change to a command must come with such a test (no git mocks; see CLAUDE.md and AGENTS.md for the ground rules). Commits follow Conventional Commits. Read docs/architecture.md before structural changes, and docs/deployment.md for the release process.
MIT © Mohammed Alkindi — see LICENSE.
Open the fleet review to inspect an example generated from real temporary Git worktrees, or open your own reports:
fleet list --json > agents.json
fleet check --json > collisions.json
Export both from the same repository without making intervening changes. The check may exit 1 for collisions and still write a valid report. Choose both files in Open local reports. The viewer uses the existing 0.5.0 JSON format; no CLI update or account connection is required. It reads files only in the browser, sends no report data, and does not persist reports or notes in browser storage. Reloading clears imported data. Limit: 100 agents, 1 MB per report.
Inspect an agent to see branch divergence, worktree changes, validation state, shared-file verdicts and suggested local checks. Review candidate only means no recorded blockers in this snapshot; it is not merge approval. Validation can become stale, and file-only detection cannot predict committed conflicts. Select agents, write a handoff note and download a Markdown review plan. Notes and plan selections are separate from Git evidence. The viewer executes no commands and does not run workers, validation, sync or merges.
Build the static website with npm run build:site. Browser TypeScript and
version copy are compiled during deployment; CI rejects generated JavaScript
drift. To regenerate the synthetic example, run
npx --yes tsx scripts/generate-example.ts. This script uses
tests/helpers.ts to create and clean up a throwaway Git repository; it does
not read this repository's fleet state or start any AI workers.
fleet merge--all validate every agent, continuing past per-agent failures, --json machine-readable output; exits 1 on any failure |
fleet exec <agent> -- <cmd> | Run a shell command inside the agent's worktree (e.g. fleet exec claude -- npm test) | --all run in every worktree sequentially; exits 1 if any run fails |
fleet merge <agent> | Check for collisions, require a passing validation record when validate is configured (running it if missing or stale), run the preMerge hook, merge the agent's branch into the current branch, then remove the worktree and branch. A conflicting merge is aborted — never left half-done. Overlaps that provably merge cleanly no longer block; predicted conflicts and uncommitted overlaps still do | --no-clean keep the worktree and branch, --delete-branch explicit form of the default cleanup |
fleet undo | Roll back the last fleet merge: reset the target branch, restore the agent's branch, worktree, and state entry, including after interrupted post-merge cleanup. Single-level; refuses if history moved on | — |
fleet pr <agent> | Push the agent's branch to origin and open a pull request with the GitHub CLI — the review-based alternative to a local merge | --title <t>, --base <branch>, --draft |
fleet remove <agent> | Remove the worktree; refuses if there are uncommitted changes | --force discard changes, --delete-branch also delete the branch |
fleet clean | Remove agents whose branches are fully merged into their base | --dry-run list only, --stale <days> also remove long-idle agents (clean worktrees only; their branches are kept) |
fleet watch | fleet list, re-rendered live until Ctrl+C | --interval <seconds> refresh rate (default 3) |
fleet dashboard | One live pane for the whole fleet: the agent table with validation states, per-agent touched-file counts, and the full collision report with merge-simulation verdicts | --once print a single frame and exit (scripts, CI logs), --interval <seconds> refresh rate (default 3) |
fleet doctor | Diagnose git version, state file validity, orphaned worktrees, and stale entries. Exits 1 if problems remain | --fix repair: rebuild state from git worktree list, adopt/remove orphans, prune stale entries; --json machine-readable output |
fleet completion <shell> | Print a completion script for bash, zsh, or fish (agent names are a snapshot from generation time) | — |
fleet mcp | Serve the read-only fleet tools to an AI agent over MCP (stdio). Not run by hand — see Use it from an AI agent | — |