A CLI tool for managing AI coding assistant plugins across multiple clients (Claude Code, GitHub Copilot, Cursor, etc.).
Before writing any code for a bug fix, confirm you understand the actual problem. Ask the user clarifying questions when:
- The issue description is vague or could have multiple root causes
- You cannot reproduce the reported behavior from the description alone
- The proposed solution in the issue doesn't clearly match the described problem
- The bug could be a user error (e.g., running a command from the wrong directory) rather than a code defect
Do NOT assume the first plausible-looking code path is the root cause. Verify the user's environment, exact commands run, and expected vs actual output before proposing a fix.
Design documents and implementation plans are stored in .claude/plans/. These are temporary working documents - once implementation is complete, delete the plan and update official docs with any user-facing behavior.
Follow conventional commits: type(scope): description
Types: feat, fix, docs, style, refactor, test, chore
Do NOT add Co-Authored-By attribution to commit messages.
When working on a GitHub issue, ALWAYS follow this workflow:
-
Create a worktree with a feature branch from
main:git worktree add ../allagents.worktrees/<type>-<short-description> -b <type>/<issue-number>-<short-description> # Example: git worktree add ../allagents.worktrees/feat-add-new-embedder -b feat/42-add-new-embedder cd ../allagents.worktrees/<type>-<short-description>
-
Implement the changes and commit following the commit convention
-
Push the branch and create a Pull Request:
git push -u origin <branch-name> gh pr create --title "<type>(scope): description" --body "Closes #<issue-number>"
-
Before merging, ensure:
- CI pipeline passes (all checks green)
- Code has been reviewed if required
- No merge conflicts with
main
IMPORTANT: Never push directly to main. Always use branches and PRs.
Always use squash merge when merging PRs to main. This keeps the commit history clean with one commit per feature/fix.
# Using GitHub CLI to squash merge a PR
gh pr merge <PR_NUMBER> --squash --delete-branch --adminDo NOT use regular merge or rebase merge, as these create noisy commit history with intermediate commits.
Once a PR is squash-merged, its source branch diverges from main. Do NOT try to push additional commits from that branch—you will get merge conflicts.
For follow-up fixes:
git checkout main
git pull origin main
git checkout -b fix/<short-description>
# Apply fixes on the fresh branchTests use bun:test. Run with bun test or target a specific file with bun test tests/unit/core/foo.test.ts.
- One test per distinct code path. Avoid testing the same branch with slightly different inputs — if the code path is the same, one test is enough.
- Prefer covering the input matrix (e.g. config present/absent across scopes) but collapse cases that exercise identical logic.
- Tests should be fast and not slow down CI. Remove redundant tests rather than keeping them for completeness.
Manual E2E testing is required at two points in the development workflow:
ALWAYS run a red E2E test first to understand the current behavior before writing any code. Build the CLI from the current branch, set up a temp workspace that exercises the feature/fix you're about to implement, and document what happens today. This establishes the baseline and confirms you understand the problem.
ALWAYS run a green E2E test after implementation to verify the change works end-to-end. Use the same temp workspace from the red test and confirm the behavior now matches expectations.
# Build the CLI in your worktree
bun run build
# Test the specific behavior your change affects
./dist/index.js update
./dist/index.js plugin updateCreate a temporary workspace in /tmp/, configure it with a workspace.yaml that exercises your change, run the built CLI against it, and verify the filesystem result matches expectations. Clean up after.
IMPORTANT: Never run git config in the repo directory. If tests need git user config (e.g., for commits in a temp repo), always scope it to the temp directory: git config --local user.name "Test" inside the temp dir. Running git config user.name or git config user.email in the project root will silently override the user's identity for all future commits.
Include E2E steps in the PR description so human reviewers can reproduce the test. Document the exact commands you ran and what you verified.
Unit tests with mocks verify internal logic but miss integration bugs. Mocks that don't match real interfaces create false confidence.
ALWAYS run a code review after implementation is complete and before final E2E. Use the superpowers:code-reviewer agent to review changed files against the plan and CLAUDE.md coding standards. Fix all important issues before proceeding to the green E2E test.
The full workflow for any feature or fix is:
- Red E2E — build CLI, test current behavior, confirm the problem
- Implement — write code and unit/integration tests
- Code review — review implementation for correctness, DRY, test coverage
- Green E2E — build CLI, test new behavior, confirm the fix
- Push — commit and push, verify CI passes
Avoid tests that verify implementation details rather than behavior:
- Bad: "verify
updateMarketplacewas called with'test-marketplace'" — breaks on refactors, misses real bugs - Good: "plugin updates successfully when marketplace exists" — tests actual outcome
If a mock doesn't match the real interface (e.g., missing a name field the real function returns), the test passes but production breaks. When writing mocks, match the actual return type.
Use the default allagents.worktrees/ directory (sibling to the repo, already in .gitignore). After creating a worktree, run bun install since worktrees do not share node_modules.
When done:
git worktree remove ../allagents.worktrees/<name>MCP servers from plugins are synced to VS Code's mcp.json. Key ownership rule:
- We only track servers we added. If a server already exists in the user's
mcp.jsonbefore a plugin is installed, we must NOT track it — otherwise uninstalling the plugin would delete the user's manually-configured server. trackedServersin sync state = "servers we own and are responsible for updating/removing"- Skipped servers (user-managed conflicts) must never be added to
trackedServers
User-facing output for sync results is displayed from multiple entry points:
updatecommand (src/cli/commands/workspace.ts) — also available asworkspace syncplugin install/uninstall/updatecommands (src/cli/commands/plugin.ts)- TUI interactive sync (
src/cli/tui/actions/sync.ts)
Shared formatting lives in src/cli/format-sync.ts. When adding new sync output, update the shared module — not individual call sites.
vscode is a display alias for copilot for artifact counts only (skills, commands, agents, hooks). Since VS Code and Copilot share skill paths, their counts are merged under the copilot label.
MCP output uses the raw client name — no aliasing. This is because vscode and copilot have independent MCP support.
Internally, vscode and copilot remain distinct client types with separate path mappings (see resolveClientMappings() in client-mapping.ts).
Never run npm publish directly. Always use the two-step workflow:
bun run publish:next— publishes to thenexttagbun run promote:latest— promotesnexttolatestafter testing
A prepublishOnly guard in package.json blocks direct npm publish. This prevents untested releases from going to latest.
If agent-browser open fails with "Missing X server or $DISPLAY" errors on Linux, the installed version may be outdated. Update to the latest version:
sudo npm update -g agent-browser
agent-browser --version # Verify updateThe browser runs in headless mode by default and should not require X11.