VS Code extensions monorepo. Primary extension: Git ID Switcher — manages multiple Git identities with SSH key association, GPG signing, and submodule support. TypeScript, npm workspaces, multilingual (26 languages).
- Do not add tests for code marked with
/* c8 ignore */— intentionally excluded from coverage. - Do not remove code marked with
// defense-in-depth— intentional security safeguards. - Keep security validator files in
security/as separate files (Single Responsibility Principle). - Do not make security constants user-configurable — hardcoded security values are by design.
- Do not add features outside the current scope (e.g., GitHub API integration).
- Minimize dependencies — add only when genuinely needed and not replaceable by existing tools.
- Include
--signoffflag on all commits (DCO requirement).
- main branch: Direct push is disabled. All changes must go through a Pull Request.
- CI checks: The
buildcheck must pass before merging. - Signed commits: Required on main (handled by maintainers during merge).
Extensions are automatically published to VS Code Marketplace and Open VSX when a release tag is pushed.
AI agents should NOT:
- Push release tags
- Modify version numbers in package.json without explicit instruction
- Run
vsce publishor similar commands
Release tags follow the format: git-id-switcher-v1.0.0
- Node.js 20+
cd extensions/git-id-switcher
# Unit tests (fast, no VS Code required)
npm run test
# E2E tests (requires VS Code download on first run)
npm run test:e2e
# All tests
npm run test && npm run test:e2e| Test Type | Target | When to Use |
|---|---|---|
| Unit Tests | Pure functions, utilities, validation | Fast feedback, edge cases |
| E2E Tests | VS Code API integration, extension lifecycle | Real behavior verification |
E2E test files are in extensions/git-id-switcher/src/test/e2e/. Guidelines:
- No mocks: Use real VS Code APIs and Git commands
- Cleanup: Remove temporary files/repos after tests
- Isolation: Each test should be independent
- Naming: Use descriptive test names that explain the scenario
- StatusBar: Test state transitions (
setIdentity,setNoIdentity,setLoading,setError) - QuickPick: Modify config → generate items → verify output
- Webview (Documentation): Cannot access DOM directly; verify via command execution +
extension.isActivecheck
- Unit tests: Must pass to merge PR
- E2E tests: Run in parallel with build, currently non-blocking (
continue-on-error: true) - E2E uses
xvfb-runfor headless execution on Linux
- GOVERNANCE.md — Project governance model
- CODE_OF_CONDUCT.md — Garden etiquette
- CONTRIBUTING.md — How to contribute
- SECURITY.md — Security policy and vulnerability reporting