Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e6bd198
feat: add VS Code config generator for GitHub Copilot
Nov 24, 2025
4936f8d
Update packages/docs/user/agent-setup.md
manuliner Nov 25, 2025
52c0b83
Update packages/cli/src/cli.ts
manuliner Nov 25, 2025
27d48ae
Update README.md
manuliner Nov 25, 2025
7967209
Update packages/cli/src/config-generator.ts
manuliner Nov 25, 2025
f585e68
Update packages/docs/README.md
manuliner Nov 25, 2025
71bffb1
Update packages/docs/user/agent-setup.md
manuliner Nov 25, 2025
879dc1c
refactor: simplify VS Code generator to use standard system prompt
Nov 25, 2025
c0472c1
Update packages/cli/src/config-generator.ts
manuliner Nov 25, 2025
4b9a574
feat: update Vibe agent with formatted YAML frontmatter
blue-red-yellow Nov 27, 2025
35fabca
Merge branch 'main' into vscode_skript
manuliner Nov 27, 2025
a554344
Apply suggestions from code review
mrsimpson Nov 28, 2025
8d232ce
fix: add vscode alias and tests for Vibe.agent.md generation
blue-red-yellow Nov 27, 2025
45e1c20
fix: sanitize git branch names in plan file paths
claude Nov 29, 2025
99e93b6
fix: use git symbolic-ref to detect branches without commits
claude Nov 29, 2025
82bc350
chore: bump version to 4.2.2 [skip ci]
actions-user Nov 29, 2025
02b8072
chore(deps): update dependency tsx to v4.21.0
renovate[bot] Nov 30, 2025
f1dc06a
chore: bump version to 4.2.3 [skip ci]
actions-user Nov 30, 2025
41bd8aa
chore(deps): update dependency @tsconfig/node22 to v22.0.5 (#163)
renovate[bot] Nov 30, 2025
feada5d
chore: bump version to 4.2.4 [skip ci]
actions-user Nov 30, 2025
1eb2855
chore(deps): update dependency @tsconfig/strictest to v2.0.8 (#164)
renovate[bot] Dec 1, 2025
4a9d017
chore: bump version to 4.2.5 [skip ci]
actions-user Dec 1, 2025
a23319e
chore(deps): update softprops/action-gh-release action to v2
renovate[bot] Dec 1, 2025
0eea05f
chore: bump version to 4.2.6 [skip ci]
actions-user Dec 2, 2025
533378e
chore(deps): update dependency marked to v16.4.2 (#167)
renovate[bot] Dec 3, 2025
8f9795c
chore: bump version to 4.2.7 [skip ci]
actions-user Dec 3, 2025
065ed04
chore(deps): update dependency nodemon to v3.1.11 (#168)
renovate[bot] Dec 4, 2025
12686b1
chore: bump version to 4.2.8 [skip ci]
actions-user Dec 4, 2025
e121f8a
feat: implement configuration merging for all generators
ThomasSteinbach Dec 4, 2025
0f0f139
chore: bump version to 4.3.0 [skip ci]
actions-user Dec 4, 2025
31acb4d
fixed tests
manuliner Dec 4, 2025
d533d5a
Merge branch 'main' into vscode_skript
manuliner Dec 4, 2025
cf4ab5f
Merge branch 'main' into vscode_skript
mrsimpson Dec 6, 2025
1364bb1
Merge branch 'main' into vscode_skript
mrsimpson Dec 6, 2025
b8d3dcb
Merge branch 'main' into vscode_skript
mrsimpson Dec 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/agents/Vibe.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
description: AI assistant that helps users develop software features using the responsible-vibe-mcp server.'
tools:
[
'edit',
'runNotebooks',
'search',
'new',
'runCommands',
'runTasks',
'responsible-vibe-mcp/*',
'usages',
'vscodeAPI',
'problems',
'changes',
'testFailure',
'openSimpleBrowser',
'fetch',
'githubRepo',
'extensions',
'runSubagent',
]
---

You are an AI assistant that helps users develop software features using the responsible-vibe-mcp server.

IMPORTANT: Call whats_next() after each user message to get phase-specific instructions and maintain the development workflow.

Each tool call returns a JSON response with an "instructions" field. Follow these instructions immediately after you receive them.

Do not use your own task management tools. Use the development plan which you will retrieve via whats_next() for all task tracking and project management.
101 changes: 101 additions & 0 deletions .vibe/development-plan-vscode_skript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Development Plan: responsible-vibe-mcp (vscode_skript branch)

*Generated on 2025-11-24 by Vibe Feature MCP*
*Workflow: [minor](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/minor)*

## Goal
Neuer VS Code Config Generator für das `--generate-config vscode` Kommando erstellen.

## Explore
### Tasks
*Alle Tasks abgeschlossen*

### Completed
- [x] Created development plan file
- [x] Analysiere bestehende Config-Generatoren (Amazon Q, Claude, Gemini, OpenCode)
- [x] Bestimme VS Code Konfigurationsformat und benötigte Dateien
- [x] Entwerfe VS Code Generator-Implementierung

## Implement

### Phase Entrance Criteria:
- [x] VS Code Konfigurationsformat ist klar definiert
- [x] Benötigte Dateien und deren Struktur sind dokumentiert
- [x] Generator-Design ist im Plan-File dokumentiert

### Tasks
*Alle Tasks abgeschlossen*

### Completed
- [x] Implementiere VSCodeConfigGenerator Klasse in config-generator.ts
- [x] Registriere VSCodeConfigGenerator in ConfigGeneratorFactory
- [x] Aktualisiere Dokumentation (README.md, agent-setup.md)
- [x] Fixe async/await für parseCliArgs und runCli
- [x] Teste Config-Generierung mit `--generate-config vscode`
- [x] Verifiziere generierte Dateien (.vscode/mcp.json und .github/copilot-instructions.md)

## Finalize

### Phase Entrance Criteria:
- [x] VS Code Config Generator ist implementiert
- [x] Generator ist in Factory registriert
- [x] Funktionalität ist getestet

### Tasks
*Alle Tasks abgeschlossen*

### Completed
- [x] Code Cleanup: Debug-Output geprüft (alle console.log sind legitime CLI-Outputs)
- [x] Dokumentation finalisiert (README.md, packages/docs/README.md, agent-setup.md)
- [x] Test-Verzeichnis aufgeräumt (test-vscode-config und test-generation.sh entfernt)
- [x] Tests laufen erfolgreich

## Key Decisions

### VS Code + GitHub Copilot Konfiguration
- **Unterschied zu Claude**: VS Code nutzt `.vscode/mcp.json` statt root `.mcp.json`
- **System Prompt**: GitHub Copilot nutzt `.github/copilot-instructions.md` statt separate CLAUDE.md
- **Zwei Dateien generieren**:
1. `.vscode/mcp.json` - MCP Server Konfiguration
2. `.github/copilot-instructions.md` - System Instructions für Copilot
- **Tool-Referenzierung**: In Instructions mit `#responsible-vibe-mcp_tool_name` Syntax
- **Windows-Kompatibilität**: Wie andere Generatoren - cmd/npx basierend auf Plattform

### Bestehende Generator-Architektur
- Factory Pattern mit ConfigGenerator Basisklasse
- Jeder Generator erbt von ConfigGenerator
- Shared utilities: getSystemPrompt(), writeFile(), getDefaultMcpConfig()
- Factory registriert Generatoren im switch statement

### VS Code Generator Design
```typescript
class VSCodeConfigGenerator extends ConfigGenerator {
async generate(outputDir: string): Promise<void> {
// 1. Generate .vscode/mcp.json with server config
// 2. Generate .github/copilot-instructions.md with system prompt + tool guidance
}
}
```

## Notes

### VS Code MCP Konfigurationsformat
```json
{
"servers": {
"responsible-vibe-mcp": {
"command": "npx",
"args": ["@codemcp/workflows@latest"]
}
}
}
```

### Copilot Instructions Format
- Markdown-Format
- Beschreibt verfügbare MCP Tools
- Gibt Anweisungen für Workflow-Nutzung
- Tool-Referenzen: `#responsible-vibe-mcp_whats_next`, etc.

---
*This plan is maintained by the LLM. Tool responses provide guidance on which section to focus on and what tasks to work on.*
10 changes: 10 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"servers": {
"responsible-vibe-mcp": {
"command": "npx",
"args": [
"@codemcp/workflows@latest"
]
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Transform any AI coding agent into a structured development partner with battle-

```bash
# Setup your coding agent
npx responsible-vibe-mcp --generate-config amazonq-cli # or claude, gemini, opencode
npx responsible-vibe-mcp --generate-config amazonq-cli # or claude, gemini, opencode, copilot-vscode
# OR manually configure any MCP agent with our system prompt, check the docs for that
```

Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ function parseCliArgs(): { shouldExit: boolean } {
if (!agent) {
console.error('❌ Error: --generate-config requires an agent parameter');
console.error('Usage: --generate-config <agent>');
console.error('Supported agents: amazonq-cli, claude, gemini, opencode');
console.error(
'Supported agents: amazonq-cli, claude, gemini, opencode, copilot-vscode'
);
process.exit(1);
}
handleGenerateConfig(agent);
Expand Down
41 changes: 40 additions & 1 deletion packages/cli/src/config-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,42 @@ class OpencodeConfigGenerator extends ConfigGenerator {
}
}

/**
* VS Code Configuration Generator
* Generates .vscode/mcp.json and .github/agents/Vibe.agent.md for GitHub Copilot Vibe mode
*/
class VSCodeConfigGenerator extends ConfigGenerator {
async generate(outputDir: string): Promise<void> {
const systemPrompt = this.getSystemPrompt();
const mcpServers = this.getDefaultMcpConfig();

// Generate .vscode/mcp.json (MCP server configuration for VS Code)
const vscodeDir = join(outputDir, '.vscode');
await mkdir(vscodeDir, { recursive: true });

const mcpConfig = {
servers: mcpServers,
};
const mcpJsonPath = join(vscodeDir, 'mcp.json');
await this.writeFile(mcpJsonPath, JSON.stringify(mcpConfig, null, 2));

// Generate .github/agents/Vibe.agent.md (Agent configuration for GitHub Copilot Vibe mode)
const githubAgentsDir = join(outputDir, '.github', 'agents');
await mkdir(githubAgentsDir, { recursive: true });

const agentContent = `---
description: AI assistant that helps users develop software features using the responsible-vibe-mcp server.
tools: ['edit', 'runNotebooks', 'search', 'new', 'runCommands', 'runTasks', 'responsible-vibe-mcp/*', 'usages', 'vscodeAPI', 'problems', 'changes', 'testFailure', 'openSimpleBrowser', 'fetch', 'githubRepo', 'extensions', 'runSubagent']
---

${systemPrompt}
`;

const agentPath = join(githubAgentsDir, 'Vibe.agent.md');
await this.writeFile(agentPath, agentContent);
}
}

/**
* Factory class for creating configuration generators
*/
Expand All @@ -388,9 +424,12 @@ class ConfigGeneratorFactory {
return new GeminiConfigGenerator();
case 'opencode':
return new OpencodeConfigGenerator();
case 'vscode':
case 'copilot-vscode':
return new VSCodeConfigGenerator();
default:
throw new Error(
`Unsupported agent: ${agent}. Supported agents: amazonq-cli, claude, gemini, opencode`
`Unsupported agent: ${agent}. Supported agents: amazonq-cli, claude, gemini, opencode, vscode`
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ if (args.length === 0) {
} else {
// Any arguments, run CLI
const { runCli } = await import('./cli.js');
runCli();
await runCli();
}
2 changes: 1 addition & 1 deletion packages/cli/test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe('CLI', () => {
'❌ Error: --generate-config requires an agent parameter'
);
expect(consoleErrorSpy).toHaveBeenCalledWith(
'Supported agents: amazonq-cli, claude, gemini, opencode'
'Supported agents: amazonq-cli, claude, gemini, opencode, copilot-vscode'
);
});
});
Expand Down
30 changes: 30 additions & 0 deletions packages/cli/test/config-generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,36 @@ describe('Config Generator', () => {
});
});

describe('VS Code Configuration', () => {
it('should generate VS Code configuration files', async () => {
await generateConfig('vscode', tempDir);

// Check .vscode/mcp.json
const mcpJsonPath = join(tempDir, '.vscode', 'mcp.json');
expect(existsSync(mcpJsonPath)).toBe(true);
const mcpConfig = JSON.parse(readFileSync(mcpJsonPath, 'utf-8'));
expect(mcpConfig.servers['responsible-vibe-mcp']).toBeDefined();

// Check .github/agents/Vibe.agent.md
const agentPath = join(tempDir, '.github', 'agents', 'Vibe.agent.md');
expect(existsSync(agentPath)).toBe(true);
const agentContent = readFileSync(agentPath, 'utf-8');

// Check YAML frontmatter
expect(agentContent).toContain('---');
expect(agentContent).toContain(
'description: AI assistant that helps users develop software features using the responsible-vibe-mcp server.'
);
expect(agentContent).toContain(
"tools: ['edit', 'runNotebooks', 'search', 'new', 'runCommands', 'runTasks', 'responsible-vibe-mcp/*'"
);

// Check system prompt content
expect(agentContent).toContain('responsible-vibe-mcp');
expect(agentContent).toContain('whats_next()');
});
});

describe('Error Handling', () => {
it('should throw error for unsupported agent', async () => {
await expect(generateConfig('unsupported', tempDir)).rejects.toThrow(
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Works with any agent that supports the Model Context Protocol. Amazon Q CLI, Cla

```bash
# Setup your coding agent (works with any MCP-compatible agent)
npx responsible-vibe-mcp --generate-config amazonq-cli # or claude, gemini, opencode
npx responsible-vibe-mcp --generate-config amazonq-cli # or claude, gemini, opencode, copilot-vscode
```

Head to an empty directory and try: _"Build a simple todo app with a terminal interface"_
Expand Down
15 changes: 15 additions & 0 deletions packages/docs/user/agent-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ npx responsible-vibe-mcp --generate-config opencode

_Limitation: Until [`#1961`](https://github.com/sst/opencode/issues/1961) is resolved, permissions to ask the user before executing proceed_to_phase will not be respected. Thus, RV MCP in OpenCode is currently a bit ... stressful_

### VS Code (GitHub Copilot)

```bash
npx responsible-vibe-mcp --generate-config copilot-vscode
```

**Creates**: `.vscode/mcp.json`, `.github/agents/Vibe.agent.md`

## Manual Setup

If you prefer manual configuration or use a different agent:
Expand Down Expand Up @@ -198,6 +206,13 @@ npx responsible-vibe-mcp --generate-config opencode
2. System prompt is automatically provided via MCP
3. Tool permissions are configured to prevent automatic phase transitions

### VS Code (GitHub Copilot)

**Manual Setup**:

1. Create `.vscode/mcp.json` with MCP server configuration
2. Either create `.github/copilot-instructions.md` or an agent definition `.github/agents/Vibe.agent.md` with the system-prompt

## Custom Project Path

To use a different project directory, set the `PROJECT_PATH` environment variable:
Expand Down