Architecture and sync

One git repo is the source of truth for every skill, subagent, slash command, hook and global instruction. A single script, bin/ai-sync, symlinks the portable parts into Claude Code, Cursor and Copilot and renders the parts whose schema differs per tool from one neutral definition.

  • Harness engineering
  • Config as code
  • Tool portability
  • Developer experience
What it is
A content repo plus a stdlib-only Python sync tool (1,253 lines) that runs import, link, reconcile, render and commit. It is registered as a session-end hook, so it runs on its own every time a chat ends.
What it isn't
Not a package manager or a plugin. Nothing is installed into a project; the repo is wired into each tool's user-level directory. It also doesn't make the three tools equivalent: hooks, in particular, reach Claude Code far more completely than the others.
Why it exists
Three agent tools each want their own copy of the same instructions in their own directory. Copies drift, and an edit made inside one editor never reaches the others. A symlink makes the editor's directory be the repo.
17skills in the repo
9subagents
4slash commands
28hook registrations

How it works

The repo holds two kinds of content, and they travel differently. Skills, subagents, commands and hook scripts use the same on-disk format in every tool, so they are symlinked. Hook registration and MCP server config use a different schema in each tool, so they are written once in hooks.def.json and mcp.json and rendered into each tool's own file.

ai-wow repo skills/ agents/ commands/ hooks/ global/CLAUDE.md Neutral definitions hooks.def.json · mcp.json .agents/skills shared skill folder ai-sync render one schema per tool home directory · per tool Claude Code all 28 hooks · CLAUDE.md Cursor 10 hooks · agents · commands Copilot CLI 8 hooks · agents · MCP VS Code Copilot skills · MCP · no hooks symlink (link step) by hand, once skills read render
Portable content is linked; tool-specific config is rendered. The one link ai-sync won't create is the hand-made skills link (amber). Without it the skill step returns early and you get zero skills with no error. The table below says exactly what lands in each tool.

What lands where

ContentClaude CodeCursorCopilot CLIVS Code Copilot
Skillsper-skill links from .agents/skillsper-skill linksreads .agents/skills directlyreads .agents/skills directly
Subagentssymlinked dirsymlinked dirsymlinked dirnot from this repo
Slash commandssymlinked dirsymlinked dirnorendered to .github/prompts/ in configured repos
Hook scripts and registration28 entries merged into settings.json10 entries in hooks.json8 entries in hooks/ai-wow.jsonnone
MCP servers.claude.jsonmcp.jsonmcp-config.jsonuser mcp.json, keyed servers
Global instructionsCLAUDE.md symlinknonothe same CLAUDE.md, once chat.useClaudeMdFile is on

The hook counts come from the per-tool keys in hooks.def.json: every one of the 28 entries has a Claude Code mapping, 10 have a Cursor mapping and 8 have a Copilot mapping. All the CAM hooks, the worktree-ownership hooks and the lane guards are Claude Code only.

The sync pipeline

  1. Import. Anything created inside an editor (a new agent, command or hook script) is copied back into the repo first, so nothing is lost when the directory becomes a link.
  2. Link. Each tool's agents, commands and hooks folders are replaced with symlinks into the repo. Before anything is removed, the script probes once whether the machine allows symlinks; on a locked-down Windows box it falls back to mirroring files, because discovering the denial after deleting the folder would leave the tool empty.
  3. Reconcile skills. Missing per-skill links are added and dangling ones pruned, so Claude Code and Cursor expose the same set.
  4. Render. Hook registration and MCP config are written into each tool's schema. Claude Code's settings.json is merged, keeping every other setting; the other tools get a dedicated file. Each file is backed up before it changes.
  5. Commit. Only the paths it manages, staged and committed by name, never git add -A. Then it pushes, unless local.config.json says "push": false.

The commit step is where a shared checkout bites. If another session has been live in the checkout within the last 15 minutes, the commit is skipped and logged, because the managed folders are exactly what a peer editing the harness is dirtying. In hook mode the script never errors: a failed sync must not break the end of a session.

Bundled and installed separately

PieceWhere it comes from
14 original skills, 9 subagents, 4 commands, the hooks, taskman, ai-syncThis repo
tdd, grill-with-docs, playwright-cliBundled unmodified from upstream, each with its own licence file
MCP servers named in mcp.jsonThe config is rendered; the serena binary is yours to install, and context7 is a remote URL
Machine paths, link mode, push settinglocal.config.json, gitignored, so the tracked tree points at no particular machine

The core needs Python 3 and git, with no API keys or database. The board package wants Python 3.12 or later.

Copilot and Windows status

Copilot CLI works, with one known gap. The hooks were verified live against Copilot CLI 1.0.80 on 2026-08-21. Copilot picks its payload contract by the casing of the event name, and the PascalCase names ai-sync renders get the Claude-compatible payload, so the scripts run unchanged: guard-destructive denied a real command there. The one mapping that does nothing is the subagent-start tracker stamp, because Copilot's subagent event carries its own payload with no tool input. Renaming keys can't fix that.

VS Code Copilot gets the content, not the guards. The extension shares the skill folder, reads the global instructions once a setting is on, and picks up commands as prompt files, but nothing reads the CLI's hook files. A capability probe for VS Code's Agent Host hooks exists in hooks/vscode_agent_host/; by design it makes no authorisation decision yet.

Windows works with three preconditions. Developer Mode for symlinks (or copy mode when policy forbids it), the skills link created in PowerShell, and a python3 that resolves from Git Bash, because the hook scripts call it by that exact name. Miss the last one and the hooks silently do nothing.

A one-command Windows Copilot release is planned, not built. The plan is a no-argument install.cmd that installs the shell guards and the single-lane core loop into a user's Copilot directory without admin rights, published to a separate public repo by CI as a pull request. The plan pass finished on 2026-10-05 with ten lane briefs; two of its open questions are answered and no build lane has run. An earlier export of six skills and two agents already sits in that public repo.

AI engineering practices it demonstrates

  • Config as code for agents. Instructions, procedures and guards are versioned, reviewed and tested like application code, and every machine runs the same commit.
  • One neutral definition rendered into several vendor schemas, so a new tool is a renderer rather than a fork of the content.
  • Capability probing before destructive steps, and a copy-mode fallback for locked-down machines.
  • Verified-live claims. The Copilot compatibility note in hooks.def.json records the CLI version and the date it was checked against, and which mapping failed.
  • Self-checking docs: a repo-shape test fails when the inventory counts in the README stop matching what is on disk.

Limits

Where it loses

The sync commits and pushes without asking. Path scoping and the peer check narrow the blast radius, but a peer idle for more than 15 minutes counts as gone, so a session-end sync can still sweep that peer's half-finished managed files into an unexplained sync: commit.

  • The guarantees are uneven across tools. Claude Code gets all 28 hooks; Cursor 10; Copilot CLI 8; VS Code Copilot none. Whether Cursor runs its shell hooks for subagent calls at all is unverified.
  • The skills link is a silent failure point: skip it and you get zero skills and no error.
  • In copy mode, skill edits made inside an editor are not imported back. The repo has to be the place you edit.
  • The README still says mcp.json ships empty; it now names two servers. Docs drift, and only some of it is under test.
  • Twelve hooks are a six-line shell shim whose only job is to exec python3 on the real script, which doubles the files to review and is why a Windows machine needs python3 on the Git Bash path.

Roadmap

ItemWhy it mattersStatus
Never commit from the session-end hookHook mode would render links, hooks and MCP only; a manual run keeps the commitcorrectness
Windows VS Code Copilot release 1One no-argument install of the guards and the core loop, published by CI as a pull requestplanned
Verify Cursor hooks inside subagentsDecides whether Cursor lanes run guarded at allbacklog · high
Render the hook async flagThe live settings already lost one hook's async settingbacklog
Render Python hooks directlyDrop the shell shims and share one payload adapter across hookscandidate
One instructions file for all three toolsAGENTS.md, read beside CLAUDE.md, could replace per-tool instruction filesconsider

Sources

  • bin/ai-sync: LINK_DIRS, COPILOT_LINK_DIRS, LINK_FILES, can_symlink, do_render_hooks, do_render_mcp, do_render_copilot_workspace, commit_skip_reason (PEER_LIVE_SECONDS = 15 * 60), sync.
  • hooks.def.json: the 28 registrations, their per-tool keys and the Copilot compatibility note. mcp.json: the two servers.
  • README.md: inventory, install, licences. human-playbook.md §3 and appendices A and B: delivery mechanisms, VS Code, copy mode, Windows.
  • hooks/vscode_agent_host/: the Agent Host probe and release guard.
  • docs/plans/public-core-release/plan.md: release 1 scope and progress (status only).
  • Task board: open items for hook-mode commits, Cursor subagent hooks, the async flag, shim removal and AGENTS.md.

Facts as of 2026-10-08. Counts read from the repo and hooks.def.json on that date.