Configure VS Code for FrootAI
Set up VS Code with file associations, JSON schema validation, one-click tasks, and MCP server integration.
Step 1: File Associationsโ
Add to .vscode/settings.json so VS Code recognizes FrootAI file types:
.vscode/settings.json
{
"files.associations": {
"*.agent.md": "markdown",
"*.instructions.md": "markdown",
"*.prompt.md": "markdown",
"fai-manifest.json": "json",
"fai-context.json": "json",
"plugin.json": "json",
"hooks.json": "json",
"froot.json": "json"
}
}
Step 2: JSON Schema Validationโ
Auto-validate FrootAI JSON files with inline error highlighting:
.vscode/settings.json
{
"json.schemas": [
{
"fileMatch": ["agents/*/fai-context.json"],
"url": "./schemas/fai-context.schema.json"
},
{
"fileMatch": ["solution-plays/*/fai-manifest.json"],
"url": "./schemas/fai-manifest.schema.json"
},
{
"fileMatch": ["plugins/*/plugin.json"],
"url": "./schemas/plugin.schema.json"
},
{
"fileMatch": ["hooks/*/hooks.json"],
"url": "./schemas/hook.schema.json"
}
]
}
:::tip Red Squiggles With schema validation configured, VS Code shows red squiggles for missing required fields before you even run validation scripts. :::
Step 3: VS Code Tasksโ
Add to .vscode/tasks.json for one-click validation:
.vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Validate All Primitives",
"type": "shell",
"command": "node scripts/validate-primitives.js",
"group": { "kind": "test", "isDefault": true }
},
{
"label": "Generate Marketplace",
"type": "shell",
"command": "node scripts/generate-marketplace.js",
"group": "build"
},
{
"label": "Scaffold Agent",
"type": "shell",
"command": "node scripts/scaffold-primitive.js agent"
},
{
"label": "Scaffold Skill",
"type": "shell",
"command": "node scripts/scaffold-primitive.js skill"
},
{
"label": "Run FAI Engine (Play 01)",
"type": "shell",
"command": "node engine/index.js solution-plays/01-enterprise-rag/fai-manifest.json --status"
},
{
"label": "Validate Consistency",
"type": "shell",
"command": "node scripts/validate-consistency.js"
}
]
}
Run tasks via: Ctrl+Shift+P โ "Tasks: Run Task"
Step 4: MCP Server Configurationโ
Give Copilot Chat access to FrootAI MCP tools:
.vscode/mcp.json
{
"servers": {
"frootai": {
"command": "node",
"args": ["mcp-server/index.js"],
"cwd": "${workspaceFolder}"
}
}
}
This enables 25 MCP tools in Copilot Chat:
search_knowledgeโ search FROOT modulesget_moduleโ retrieve specific knowledge moduleget_play_detailโ detailed play informationcompare_modelsโ AI model comparisonestimate_costโ Azure cost estimation
Step 5: Recommended Extensionsโ
| Extension | Purpose |
|---|---|
| GitHub Copilot | AI pair programmer |
| GitHub Copilot Chat | Agent-based interactions |
| Bicep | Azure IaC syntax + validation |
| YAML | YAML schema validation |
| Markdown All in One | Markdown editing |
| Python | Python development |
Step 6: Verify Setupโ
# Run the default test task
node scripts/validate-primitives.js
Expected output:
โ
Passed: 2510
ALL CHECKS PASSED โ
File Type Recognitionโ
After setup, VS Code automatically recognizes:
| File Pattern | Benefit |
|---|---|
*.agent.md | Copilot understands agent persona |
*.instructions.md | Copilot applies coding standards |
fai-manifest.json | Red squiggles on invalid fields |
plugin.json | Auto-complete for plugin fields |
hooks.json | Event type validation |
Best Practicesโ
- Commit
.vscode/config โ share the setup with your team - Use tasks, not raw commands โ discoverable and consistent
- Enable schema validation โ catch errors before running scripts
- Configure MCP โ let Copilot access your knowledge base
- Keep
copilot-instructions.mdupdated โ it's the project DNA
See Alsoโ
- MCP Server โ FrootAI MCP server
- Installation โ full setup guide