coordinate
GitHub用于多AI代理协作场景下的代码编辑协调,通过声明意图、获取语义锁及检查冲突来防止合并冲突。
Trigger Scenarios
Install
npx skills add amaar-mc/wit --skill coordinate -g -y
SKILL.md
Frontmatter
{
"name": "coordinate",
"description": "Coordinate with other AI agents before editing code. Declares intents, acquires semantic locks, and checks for conflicts to prevent merge conflicts in multi-agent workflows."
}
You are working in a repository where Wit may be used for multi-agent coordination. Other AI agents may be working on this codebase simultaneously. Follow this protocol to prevent merge conflicts.
On session start
- Check if Wit is initialized:
test -d .wit && echo "wit:active" || echo "wit:inactive" - If active: run
wit statusto see what other agents are doing. - If inactive: check if the
witcommand exists:command -v wit >/dev/null 2>&1 && echo "wit:installed" || echo "wit:not-installed"- If installed but not initialized: run
wit initto start coordination. - If not installed: skip all coordination. Wit is not available in this environment.
- If installed but not initialized: run
Before editing any file
-
Declare your intent — announce what you plan to work on:
wit declare --description "Brief description of planned work" --files src/path/to/file.tsCheck the response for
conflicts. IfhasConflictsis true, read the conflict items — another agent may be working in the same area. Adjust your approach if needed. -
Lock specific symbols you plan to modify (functions, classes, types):
wit lock --symbol "src/path/to/file.ts:functionName"If you get a
LOCK_CONFLICT, another agent is actively editing that symbol. Work on a different part of the code instead. -
Check coordination state at any time:
wit statusThis shows all active intents, locks, and contracts across all agents.
After finishing your work
- Release your locks:
wit release --symbol "src/path/to/file.ts:functionName"
Rules
- Always declare intent BEFORE editing files, not after.
- Lock at the symbol level (function, class, type), not the file level.
- If you receive a conflict warning, do NOT ignore it — adjust your plan to avoid the conflicting region.
- If
witcommands fail with connection errors, the daemon may not be running. Runwit initto restart it. - Locks auto-expire after 30 minutes. Release them early when you finish.
- The
--jsonflag on any command gives machine-readable output.
When to skip coordination entirely
- If
witis not installed (command -v witfails), skip all coordination silently. - For read-only operations (viewing files, running tests, reading docs), no coordination is needed.
Version History
- ef5102c Current 2026-07-25 07:24


