* feat(stdlib): add skill catalog generation (#16) - Generate comprehensive skill-catalog.yaml (173 skills, 4341 lines) - Generate skill-index.json for quick lookup - Include statistics: 86710 code lines, 3.1MB total size - Organize by 10 categories: ai, api, cloud, data, design, devops, domains, industry-specializations, frameworks, languages, professional, qa, scientific, security, tools - Add 950+ tags for skill discovery - Document allowed_tools and file paths for each skill * chore: update repository URL from pcl-lite to pcl (#18) - Update git clone URLs in documentation - Update GitHub repository links - Update issues tracker URLs - Update release workflow URLs - Update git remote origin URL
10 KiB
VS Code Setup Guide for PCL Development
Complete guide to configuring Visual Studio Code for optimal PCL development experience.
🎯 Prerequisites
- VS Code: Version 1.85+
- Node.js: Version 18+
- Git: For version control
🚀 Quick Start (5 Minutes)
1. Clone and Install
git clone https://github.com/personamanagmentlayer/pcl.git
cd pcl
npm install
2. Open in VS Code
code .
3. Install Recommended Extensions
When VS Code opens, you'll see a notification:
"This workspace has extension recommendations."
Click "Install All" or:
Ctrl+Shift+P → "Extensions: Show Recommended Extensions"
→ Click "Install Workspace Recommended Extensions"
4. Verify Setup
Run the quality gate:
npm run lint
npm run test
npm run build
All should pass! ✅
📦 Essential Extensions
Must-Have (Core Development)
-
GitHub Copilot (
github.copilot)- AI-powered code completion
- Suggests whole functions and patterns
- Context-aware recommendations
-
GitHub Copilot Chat (
github.copilot-chat)- Natural language code assistance
- Explains code, finds bugs, writes tests
- Supports
/personacommands (see copilot-instructions.md)
-
ESLint (
dbaeumer.vscode-eslint)- Real-time linting
- Auto-fixes on save
- Enforces code style
-
Prettier (
esbenp.prettier-vscode)- Code formatter
- Consistent style across project
- Format on save enabled
Highly Recommended (Quality)
-
Error Lens (
usernamehw.errorlens)- Inline error messages
- See errors without hovering
- Improves debugging speed
-
Code Spell Checker (
streetsidesoftware.code-spell-checker)- Catches typos in comments/strings
- Supports technical terms
- Reduces embarrassing bugs
-
Vitest Explorer (
vitest.explorer)- Test runner UI
- Click to run individual tests
- Visual test results
Nice to Have (Productivity)
-
GitLens (
eamodio.gitlens)- Enhanced Git integration
- Blame annotations
- File history visualization
-
Todo Tree (
gruntfuggly.todo-tree)- Finds TODO/FIXME comments
- Organizes in sidebar
- Quick navigation
-
Better Comments (
aaron-bond.better-comments)- Color-coded comments
// TODO:= orange// != red alert// ?= blue question
⚙️ Workspace Settings
The project includes pre-configured settings in .vscode/settings.json. Key features:
TypeScript Optimization
{
"typescript.tsserver.maxTsServerMemory": 4096,
"typescript.suggest.autoImports": true,
"typescript.updateImportsOnFileMove.enabled": "always",
}
Auto-Formatting
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": true,
},
}
Performance
{
"files.watcherExclude": {
"**/node_modules/**": true,
"**/dist/**": true,
"**/coverage/**": true,
},
}
🎯 Task Runner
Press Ctrl+Shift+P → Tasks: Run Task to access:
Development Tasks
- npm: dev - Build + watch for changes
- npm: build - One-time build
- npm: build:watch - Auto-rebuild on save
Testing Tasks
- npm: test - Run all tests once
- npm: test:watch - Auto-rerun on changes
- npm: test:coverage - Generate HTML coverage report
Quality Tasks
- npm: lint - Check code style
- npm: lint:fix - Auto-fix style issues
- npm: format - Format with Prettier
Custom Shortcuts
- 🚀 Quick Start -
npm install && npm run build - ✅ Quality Gate - Lint → Type Check → Test (sequential)
- 🔍 Pre-Commit Check - Fix all + test
- 📊 Coverage Report - Test coverage + open HTML
Tip: Assign keyboard shortcuts in .vscode/keybindings.json
🐛 Debugging
Debug Current Test File
- Open a
.test.tsfile - Set breakpoint (click left of line number)
- Press
F5or select "🐛 Debug Current Test" - Debugger stops at breakpoint
Debug All Tests
- Open any file
- Press
F5 - Select "🧪 Debug All Tests"
- Step through with F10/F11
Debug Parser/Runtime
- Select "🎯 Debug Parser" configuration
- Press
F5 - Inspect variables in Debug sidebar
⌨️ Keyboard Shortcuts
Default Shortcuts
| Action | Shortcut |
|---|---|
| Command Palette | Ctrl+Shift+P |
| Quick Open | Ctrl+P |
| Toggle Terminal | Ctrl+` |
| Split Editor | Ctrl+\ |
| Go to Definition | F12 |
| Find References | Shift+F12 |
| Rename Symbol | F2 |
| Format Document | Shift+Alt+F |
| Show Problems | Ctrl+Shift+M |
Custom Shortcuts (Optional)
Add to .vscode/keybindings.json:
[
{
"key": "ctrl+shift+t",
"command": "workbench.action.tasks.runTask",
"args": "npm: test"
},
{
"key": "ctrl+shift+q",
"command": "workbench.action.tasks.runTask",
"args": "✅ Quality Gate"
}
]
🎨 Editor Tips
IntelliSense
- Trigger:
Ctrl+Space - Parameter Hints:
Ctrl+Shift+Space - Quick Info: Hover over symbol
Refactoring
- Extract Function: Select code → Right-click → Refactor → Extract Function
- Rename: F2 on symbol name
- Organize Imports:
Alt+Shift+O
Multi-Cursor Editing
- Add Cursor:
Alt+Click - Add Cursor Above/Below:
Ctrl+Alt+Up/Down - Select All Occurrences:
Ctrl+Shift+L
Code Navigation
- Go to File:
Ctrl+P→ type filename - Go to Symbol:
Ctrl+Shift+O→ type symbol - Go to Line:
Ctrl+G→ type line number - Breadcrumbs: Top of editor shows file structure
📊 Quality Monitoring
Real-Time Feedback
With Error Lens installed:
- Errors appear inline (red)
- Warnings appear inline (yellow)
- No need to check Problems panel
Coverage Gutters
With Coverage Gutters installed:
- Run
npm run test:coverage - Click "Watch" in status bar
- Green = covered, Red = not covered
- See coverage in editor gutter
Test Explorer
With Vitest Explorer:
- Tests appear in sidebar
- Click to run individual test
- See pass/fail status
- Jump to test code
🔧 Troubleshooting
Problem: TypeScript Errors Not Showing
Solution:
Ctrl+Shift+P → "TypeScript: Restart TS Server"
Problem: ESLint Not Running
Solution:
Ctrl+Shift+P → "ESLint: Restart ESLint Server"
Check Output panel (View → Output → ESLint) for errors.
Problem: Format on Save Not Working
Check:
.vscode/settings.jsonhas"editor.formatOnSave": true- Prettier extension is installed and enabled
- No conflicting formatters (disable others)
Problem: Tests Not Running
Solution:
# Clear cache
npm run clean
rm -rf node_modules
npm install
# Restart Vitest
Ctrl+Shift+P → "Vitest: Restart Test Runner"
Problem: Slow Performance
Solutions:
- Increase TypeScript memory:
"typescript.tsserver.maxTsServerMemory": 8192 - Close unused editor tabs
- Disable unused extensions
- Restart VS Code
🚀 Advanced Configuration
Custom Code Snippets
Create .vscode/pcl.code-snippets:
{
"PCL Persona Declaration": {
"prefix": "persona",
"body": [
"persona ${1:NAME} {",
" skills: [${2:skills}]",
" constraints: {",
" ${3:constraints}",
" }",
"}"
],
"description": "Create a PCL persona declaration"
}
}
Usage: Type persona → Tab → fills template
Multi-Root Workspace
For multiple PCL projects:
{
"folders": [
{ "path": "../pcl-lite" },
{ "path": "../pcl-examples" },
{ "path": "../pcl-stdlib" }
],
"settings": {
"editor.formatOnSave": true
}
}
Save as pcl-workspace.code-workspace
Tasks with Problem Matchers
Add to .vscode/tasks.json:
{
"label": "Build with Error Matching",
"type": "shell",
"command": "npm run build",
"problemMatcher": {
"owner": "typescript",
"fileLocation": "relative",
"pattern": {
"regexp": "^(.*)\\((\\d+),(\\d+)\\):\\s+(error|warning)\\s+(TS\\d+):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"code": 5,
"message": 6
}
}
}
Errors appear in Problems panel after build.
💡 Workflow Recommendations
Morning Routine
git pull- Get latest changesnpm install- Update dependenciesnpm run build- Verify buildnpm run test- Check tests- Start
npm run dev- Watch mode
Coding Session
- Open file in editor
- Split editor (code + test side-by-side)
- Use Copilot for suggestions
- Save often (auto-format triggers)
- Watch test output in terminal
Before Commit
- Run 🔍 Pre-Commit Check task
- Review git diff (GitLens)
- Check coverage report
- Stage changes (
Ctrl+Shift+G) - Write descriptive commit message
Code Review
- Open PR branch locally
- Use GitLens file history
- Run ✅ Quality Gate task
- Check test coverage
- Review inline comments
📚 Learning Resources
VS Code
TypeScript
Testing
PCL-Specific
🎯 Next Steps
- ✅ Install recommended extensions
- ✅ Run quality gate to verify setup
- ✅ Explore keyboard shortcuts
- ✅ Read copilot-instructions.md
- ✅ Try
/personacommands in Copilot Chat - ✅ Start contributing!
Questions? Open an issue or ask in Discussions!
Happy Coding! 🚀