Skip to content

feat: add VS Code config generator for GitHub Copilot - #158

Merged
mrsimpson merged 35 commits into
codemcp:mainfrom
manuliner:vscode_skript
Dec 6, 2025
Merged

mrsimpson merged 35 commits into
codemcp:mainfrom
manuliner:vscode_skript

Conversation

@manuliner

Copy link
Copy Markdown
Contributor

Add new VSCodeConfigGenerator to support GitHub Copilot in VS Code with MCP server integration. Extends the --generate-config CLI command with 'vscode' option.

Changes:

  • Add VSCodeConfigGenerator class to config-generator.ts
    • Generates .vscode/mcp.json with MCP server configuration
    • Generates .github/copilot-instructions.md with workflow guidance
    • Follows same factory pattern as existing generators
  • Fix async/await handling in CLI (parseCliArgs and runCli)
  • Update documentation:
    • README.md: Add vscode to supported agents
    • packages/docs/README.md: Add vscode to quick start
    • packages/docs/user/agent-setup.md: Add VS Code setup instructions
  • Update help text to include vscode in supported agents list

Usage:
npx responsible-vibe-mcp --generate-config vscode

This creates a complete VS Code + GitHub Copilot setup with:

  • MCP server configured in workspace (.vscode/mcp.json)
  • Copilot instructions for workflow guidance (.github/copilot-instructions.md)

Closes: N/A

@manuliner manuliner mentioned this pull request Nov 24, 2025

@mrsimpson mrsimpson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manuliner Thanks for the PR!

Since copilot and vscode are actually two independent pieces of software, I'd propose to use a combined enum value (like we have it for amazonq-cli too).

Also, I hope that we don't need those verbose instructions. Q and others work nicely with the compact system prompt.

Comment thread packages/cli/src/cli.ts Outdated
Comment thread README.md Outdated
Comment thread packages/cli/src/config-generator.ts Outdated
Comment thread packages/cli/src/config-generator.ts
Comment thread packages/docs/README.md Outdated
Comment thread packages/docs/user/agent-setup.md Outdated
Comment thread packages/docs/user/agent-setup.md
Manuel Hüttel and others added 8 commits November 25, 2025 14:02
Add new VSCodeConfigGenerator to support GitHub Copilot in VS Code with
MCP server integration. Extends the --generate-config CLI command with
'vscode' option.

Changes:
- Add VSCodeConfigGenerator class to config-generator.ts
  - Generates .vscode/mcp.json with MCP server configuration
  - Generates .github/copilot-instructions.md with workflow guidance
  - Follows same factory pattern as existing generators
- Fix async/await handling in CLI (parseCliArgs and runCli)
- Update documentation:
  - README.md: Add vscode to supported agents
  - packages/docs/README.md: Add vscode to quick start
  - packages/docs/user/agent-setup.md: Add VS Code setup instructions
- Update help text to include vscode in supported agents list

Usage:
  npx responsible-vibe-mcp --generate-config vscode

This creates a complete VS Code + GitHub Copilot setup with:
- MCP server configured in workspace (.vscode/mcp.json)
- Copilot instructions for workflow guidance (.github/copilot-instructions.md)

Closes: N/A
Co-authored-by: Manuel Liner <manuliner@users.noreply.github.com>
Co-authored-by: Oliver Jägle <mrsimpson@users.noreply.github.com>
Co-authored-by: Oliver Jägle <mrsimpson@users.noreply.github.com>
Co-authored-by: Oliver Jägle <mrsimpson@users.noreply.github.com>
Co-authored-by: Oliver Jägle <mrsimpson@users.noreply.github.com>
Co-authored-by: Oliver Jägle <mrsimpson@users.noreply.github.com>
Co-authored-by: Oliver Jägle <mrsimpson@users.noreply.github.com>
Remove custom instructions from copilot-instructions.md and use only
the standard system prompt from getSystemPrompt() function. This keeps
the VS Code generator consistent with other generators and avoids
duplication of instructions.
@mrsimpson

Copy link
Copy Markdown
Collaborator

@manuliner tests fail

Comment thread packages/cli/src/config-generator.ts
@mrsimpson

Copy link
Copy Markdown
Collaborator

Testing it, I found that CoPilot now also supports agent configurations.

.github/agents/vibe.agent.md

---
description: 'Describe what this custom agent does and when to use it.'
tools: ['responsible-vibe-mcp/*']
---
Define what this custom agent accomplishes for the user, when to use it, and the edges it won't cross. Specify its ideal inputs/outputs, the tools it may call, and how it reports progress or asks for help.

I'd prefer to put the system prompt there. WDYT?

Co-authored-by: Oliver Jägle <mrsimpson@users.noreply.github.com>
@manuliner

Copy link
Copy Markdown
Contributor Author

Testing it, I found that CoPilot now also supports agent configurations.

.github/agents/vibe.agent.md

---
description: 'Describe what this custom agent does and when to use it.'
tools: ['responsible-vibe-mcp/*']
---
Define what this custom agent accomplishes for the user, when to use it, and the edges it won't cross. Specify its ideal inputs/outputs, the tools it may call, and how it reports progress or asks for help.

I'd prefer to put the system prompt there. WDYT?

thats an nice idea. Let me try how the agent behaves.

@manuliner

Copy link
Copy Markdown
Contributor Author

agent works good

@manuliner
manuliner requested a review from mrsimpson November 27, 2025 12:17
@mrsimpson

Copy link
Copy Markdown
Collaborator

Nice. Does it also find the project docs on its own (manipulating architecture.md etc)?

@mrsimpson mrsimpson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, except it didn't catch the docs.

Did you see for yourself that it actually creates the plan and works nicely in Coplitot?

Comment thread packages/docs/user/agent-setup.md Outdated
Comment thread packages/docs/user/agent-setup.md Outdated
@mrsimpson

Copy link
Copy Markdown
Collaborator

tests fail.

Other than that, I noticed that in VSCode, the cwd is not set properly. This results in plan files being maintained in the user's home directory, with no proper assignment to a project. We should fix this, maybe even prior to generating the VSCode config

@manuliner

Copy link
Copy Markdown
Contributor Author

i am not sure what you experience. I do use RV a few days with the agents file now and it sets up dev plans in the vibe folder. Yes the issue with the docs is correct. As long as i say where the docs are it works. My biggest problem is that even with the Agent.md file i always need to tell the model "use responsible mcp" to start an workflow.

blue-red-yellow and others added 4 commits December 4, 2025 21:41
- Added 'vscode' as alias for 'copilot-vscode' in config generator
- Added comprehensive tests for VS Code configuration generation
- Tests verify .vscode/mcp.json and .github/agents/Vibe.agent.md creation
- Tests check YAML frontmatter and system prompt content
Fixes issue codemcp#161 where branch names containing slashes (e.g.,
feature/awesome-feature) were incorrectly used in plan file paths,
causing the slash to be treated as a directory separator instead
of part of the filename.

Changes:
- Modified ConversationManager to sanitize branch names by replacing
  forward slashes and backslashes with dashes before using them in
  plan file names
- Added comprehensive E2E tests to verify proper git branch detection
  and plan file naming for branches with slashes
- All 126 tests pass with no regressions

Test coverage:
- Verifies plan files use sanitized branch names (feature-awesome-feature.md)
- Tests non-git repositories still use "default" correctly
- Validates different branches get different plan files
The real issue was that git rev-parse --abbrev-ref HEAD fails when
a branch has no commits yet (common when initializing a new repo).
This caused the system to fall back to "default" as the branch name,
even when on a valid feature branch.

Changes:
- Changed from 'git rev-parse --abbrev-ref HEAD' to
  'git symbolic-ref --short HEAD' which works without commits
- Updated both ConversationManager and StartDevelopmentHandler
- Added test case for branches without commits
- All 127 tests pass

Fixes codemcp#161
@mrsimpson
mrsimpson merged commit 1edf3c5 into codemcp:main Dec 6, 2025
4 checks passed
@mrsimpson

Copy link
Copy Markdown
Collaborator

After the renovate-merge-conflict hell, it's finally merged. There are some remaining issues with hard coded cli instructions, but we can fix this separately

@mrsimpson

Copy link
Copy Markdown
Collaborator

Thanks for the contribution, @manuliner !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants