This document provides top-level guidance for AI agents contributing to this repository. Detailed, folder-specific instructions live in .github/instructions/ and are applied automatically by Copilot when you work inside those folders.
/
├── build.ps1 ← Root build orchestrator (all projects)
├── vscode-extension/ ← VS Code extension (TypeScript / Node.js)
├── cli/ ← Command-line tool (TypeScript / Node.js)
├── visualstudio-extension/ ← Visual Studio extension (C# / .NET, planned)
├── docs/ ← Shared documentation
└── .github/
├── copilot-instructions.md ← This file
└── instructions/
├── vscode-extension.instructions.md ← VS Code extension guide
├── cli.instructions.md ← CLI guide
├── visualstudio-extension.instructions.md ← Visual Studio extension guide
└── workflows.instructions.md ← CI/CD workflow security guide
| Folder | Instructions file |
|---|---|
vscode-extension/ |
.github/instructions/vscode-extension.instructions.md |
cli/ |
.github/instructions/cli.instructions.md |
visualstudio-extension/ |
.github/instructions/visualstudio-extension.instructions.md |
.github/workflows/ |
.github/instructions/workflows.instructions.md |
Use the root orchestrator from the repo root:
./build.ps1 # build all projects
./build.ps1 -Project vscode # build VS Code extension only
./build.ps1 -Project cli # build CLI only
./build.ps1 -Project vscode -Target test # run testsIndividual project builds:
cd vscode-extension && npm run compile # VS Code extension
cd cli && npm run build # CLI- Minimal Changes: Only modify files directly needed for the task. Avoid touching unrelated files.
- Focused Modifications: Make surgical, precise changes without affecting other functionality.
- Preserve Existing Structure: Don't refactor or reorganize unless essential for the task.
When running as the GitHub Copilot Coding Agent (bootstrapped via .github/workflows/copilot-setup-steps.yml), additional data files may be available in the workspace root. These are downloaded from Azure Storage during the agent's setup phase and are not present in local development.
./session-logs/: Raw Copilot Chat session log files (last 7 days) from Azure Blob Storage../usage-data/usage-agg-daily.json: Aggregated daily token usage data (last 30 days) from Azure Table Storage.
These files are only available when the repository's copilot GitHub environment has COPILOT_STORAGE_ACCOUNT configured. See the session-log-data skill in .github/skills/session-log-data/SKILL.md for data schemas, analysis examples, and cost estimation.
To check if data is available:
[ -d ./session-logs ] && echo "Session logs available"
[ -f ./usage-data/usage-agg-daily.json ] && echo "Aggregated data available"This repository uses a devcontainer (.devcontainer/devcontainer.json). When working inside the devcontainer, terminal output capture is unreliable — commands execute successfully but the run_in_terminal tool often returns empty or truncated output. This is a known limitation of the remote filesystem layer.
Do not enter retry loops trying to capture terminal output. These patterns waste turns and never converge:
- Running commands repeatedly hoping output will appear
- Redirecting output to
/tmp/files and usingread_fileto read them (the remote FS often fails on newly-written temp files) - Spawning background terminals with
sleep && tailto poll for results - Delegating to subagents to "run tests in a clean way"
-
Use
npmscripts for standard operations (from insidevscode-extension/):npm run compile— lint + buildnpm run compile-tests— compile test files toout/npm run test:node— compile + run unit testsnpm run test:coverage— compile + run tests with coverage thresholds
-
Use
get_errorsto validate compilation. After edits, callget_errorson the changed files instead of runningtscin the terminal. -
Run tests in small batches. Instead of running all test files in one command, run one file at a time:
cd vscode-extension node --require ./out/test/unit/vscode-shim-register.js --test out/test/unit/sessionParser.test.js -
Accept a single run. If a test command runs without returning output, do not re-run it.
-
Write output to the workspace (not
/tmp/). If you must capture output to a file, write it inside the workspace whereread_filecan reliably access it.