feat: add VS Code & Copilot CLI as editor targets#46
Merged
Conversation
Add support for two new editors in `archgate init`: - VS Code (`--editor vscode`): configures .vscode/settings.json with the git marketplace URL and MCP server - Copilot CLI (`--editor copilot`): auto-installs via `copilot plugin install` or prints manual commands, configures .github/copilot/mcp.json Both use the same git-based plugin format already served by the plugins service — no backend changes needed. Includes documentation guides for both editors and sidebar entries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bun.$ hangs on Windows due to pipe deadlocks — this was discovered in production and fixed in ca33377. This commit: - Creates ARCH-007 ADR mandating Bun.spawn over Bun.$ for all subprocess execution, with automated rule (no-bun-shell) that blocks Bun.$ usage - Updates ARCH-006 to remove Bun.$ recommendations and add Windows caveat - Cherry-picks the Bun.spawn migration from ca33377 (git-files, upgrade, plugin-install) and fixes remaining Bun.$ usage in git.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add test suites for vscode-settings and copilot-settings helpers (ARCH-005 compliance). Add full Portuguese translations for the VS Code and Copilot CLI plugin guide pages (GEN-002 compliance). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VS Code uses a dedicated .vscode/mcp.json file for MCP servers (with "servers" key), not .vscode/settings.json. The chat.plugins.marketplaces setting is application-scoped and must be set in user-level settings. Changes: - Rewrite vscode-settings.ts to write .vscode/mcp.json (workspace) and user settings.json (marketplace URL) separately - Auto-detect user settings path per platform (Win/Mac/Linux) - Remove installVscodePlugin from plugin-install.ts (no longer needed) - Update docs (en + pt-br) to reflect the two-file approach - Update tests for new merge functions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agent plugins require VS Code February 2026 release (1.99) or later. Added caution callout to both English and pt-br guide pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VS Code settings.json and mcp.json use JSONC (JSON with Comments) which includes single-line comments, block comments, and trailing commas. JSON.parse() fails on these files. Use Bun's built-in JSONC parser instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use Bun.JSONC.parse to read existing user settings.json (supports comments and trailing commas), merge the marketplace URL additively, and write back. All existing settings data is preserved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VS Code has built-in defaults for chat.plugins.marketplaces (github/copilot-plugins, github/awesome-copilot) that are implicit — not written to settings.json. When we explicitly set the key, VS Code stops using its defaults. Now we seed the array with these defaults when the key is absent from the file, preventing silent override. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Override both APPDATA (Windows) and HOME (macOS/Linux) in tests so getVscodeUserSettingsPath() resolves into the temp directory on all platforms. Use the real path resolver in tests instead of hardcoding Windows-specific paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VS Code Copilot expects .github/plugin/ manifest format, which is served from a separate virtual git repo at /archgate-vscode.git. Claude Code and Copilot CLI continue using /archgate.git with the .claude-plugin/ format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--editor vscode) and Copilot CLI (--editor copilot) as new editor targets forarchgate init.vscode/settings.jsonwith git marketplace URL + MCP server (additive merge)copilot plugin installwith CLI detection, falls back to manual instructions; configures.github/copilot/mcp.jsonplugins.archgate.dev— no backend changes neededNew files
src/helpers/vscode-settings.ts— VS Code settings merge + configuresrc/helpers/copilot-settings.ts— Copilot CLI MCP config merge + configuredocs/src/content/docs/guides/vscode-plugin.mdxdocs/src/content/docs/guides/copilot-cli-plugin.mdxModified files
src/helpers/plugin-install.ts— VS Code + Copilot CLI install functionssrc/helpers/init-project.ts—EditorTargettype extended, editor routingsrc/commands/init.ts— 4-editor support, refactored output with lookup tablesdocs/astro.config.mjs— sidebar entries for new guidesNote
pt-br translations for the two new guide pages are not included (no existing pt-br/guides/ translations exist yet).
Test plan
bun run typecheckpassesbun run lintpasses (no new warnings)bun test— all 240 tests passarchgate init --editor vscodecreates.vscode/settings.jsonwith marketplace URL + MCP serverarchgate init --editor copilotcreates.github/copilot/mcp.jsonand attemptscopilot plugin install--editor claudeand--editor cursorflows unchanged🤖 Generated with Claude Code