Path: blob/main/src/vs/sessions/test/ai-customizations.test.md
13388 views
AI Customizations Test Plan
The following test plan outlines the scenarios and specifications for the AI Customizations feature, which includes a management editor and tree view for managing customization items.
SPECS
SCENARIOS
Scenario 1: Empty state — no session, no customizations
Description
This tests the baseline empty state before any session or workspace is active. The 'new AI developer' state - who doesn't have any customizations on their machine yet.
Preconditions
On 'New Session' screen
No folder selected
No user customizations created (from this tool or others i.e. Copilot CLI)
Actions
Open the sidebar customizations section
Observe no sidebar counts are shown for any section (Agents, Skills, Instructions, Prompts, Hooks)
Open the management editor by clicking on one of the sections (e.g., "Instructions")
Observe the empty state messages
Click through each section in the sidebar
Run Developer: Customizations Debug and read the report
Expected Results
All sidebar counts are hidden (no badges visible)
Management editor shows empty state for each section with "No X yet" message
Create button for user customizations is visible but disabled until a workspace folder or repository is selected (Hooks should also show a disabled button, since there is no 'user' scoped hooks)
Notes
The
Window: Sessionsshould be verified by runningDeveloper: Customizations DebugNo workspace root should be active, verified via
Developer: Customizations Debug(active root = none)
Scenario 2: Active workspace selected from new session state
Description
This tests the transition from the empty state to having an active workspace selected, but before a worktree is checked out (i.e., before starting a task). This is the 'new session' state where the user has selected a repository but hasn't started working in a specific branch or worktree yet. Customizations should be loaded from the repository root, not a worktree, and counts should reflect that.
Preconditions
On 'New Session' screen (Scenario 1 completed)
A git repository, cloned on the machine, is available to select
For this test use
microsoft/vscodecloned to a test folder
Actions
From the new session screen, select a workspace folder
Observe the sidebar customization counts update
Open the management editor by clicking on "Instructions"
Observe items appear in the "Workspace" group
Note the workspace item count in the group header
Compare the sidebar badge count with the editor's workspace item count — they should match
Click "Agents" in the sidebar
Observe agent items listed with parsed friendly names (not raw filenames) and a description
Click "Skills" in the sidebar
Observe skills listed with names derived from folder names
Click "Prompts" in the sidebar
Observe only prompt-type items (no skills mixed in, although note there may be similarly named items)
Click "Hooks" in the sidebar
Observe only workspace-scoped hook files (no user-level
~/.claude/settings.json)Run Developer: Customizations Debug and read the report
Expected Results
Sidebar counts update from 0 to reflect the selected workspace's customizations
Sidebar badge count matches editor list count for every section
Instructions includes root-level files (AGENTS.md, CLAUDE.md, copilot-instructions.md) under "Workspace"
Instructions includes
.instructions.mdfiles from.github/instructions/Agents shows friendly names (e.g., "Optimize" not "optimize.agent.md")
Prompts excludes skill-type slash commands
Hooks shows only workspace-local files (filter:
sources: [local])No "Extensions" or "Plugins" groups visible
If user-level files exist in
~/.copilot/or~/.claude/, a "User" group appears for applicable sectionsDebug report shows
Window: Sessions,Active root: /path/to/repositoryCreate button shows both "Workspace" and "User" options in dropdown
Notes
The active root comes from the repository, not a worktree
Scenario 3: Create new workspace instruction in an active worktree session
Preconditions
Active session with a worktree checked out (task started and running)
Use the same repository as Scenario 2 (
microsoft/vscode)
Actions
Observe sidebar customization counts reflect the worktree's customizations and are the same as Scenario 2 (since new worktree inherits from repo root, counts should be the same)
Open the management editor by clicking on "Instructions"
Observe items listed — should match files in the worktree (not the bare repo)
Verify there is a primary button "New Instructions (Workspace)" and another option in the dropdown for "New Instructions (User)"
Click the "+ New Instructions (Workspace)" button (primary action)
Select a name
<name>when the quickpick appears and confirmVerify the file opens in the embedded editor
Verify the file path shown in the editor header is
<WORKTREE_PATH>/.github/instructions/<name>.instructions.mdUpdate the instruction file with some content, then press the back button
Confirm the instruction file was auto-committed and shows up in the worktree changes list
Reopen the customization management editor and click on "Instructions" again
Observe the new instruction appears in the "Workspace" group
Observe the sidebar badge count has incremented by 1
Expected Results
Active root is the worktree path, not the repository path
File is created under the worktree's
.github/instructions/folder (not the bare repo)File auto-saves and auto-commits to the worktree
Item count updates in both the sidebar badge and editor list after creation
The new file appears in the list with a friendly name derived from the filename
Notes
This is the primary creation flow — workspace instructions are the most common customization type
Key difference from Scenario 2: active root is the worktree, creation targets the worktree
Scenario 4: Create new user instruction in an active worktree session
Preconditions
Active session with a worktree checked out (continuing from Scenario 3)
Actions
Open the management editor by clicking on "Instructions"
Click the "Add" dropdown arrow → click "New Instruction (User)"
Select a name
<name>when the quickpick appears and confirmVerify the file opens in the embedded editor
Verify the file path shown in the editor header is
~/.copilot/instructions/<name>.instructions.mdConfirm the path is NOT the VS Code profile folder (e.g., NOT
~/.vscode-oss-sessions-dev/User/...)Press the back button to return to the list
Observe the new instruction appears in the "User" group
Observe the sidebar badge count reflects the new user instruction
Run Developer: Customizations Debug
Check the "Source Folders (creation targets)" section — verify
[user]points to~/.copilot/instructions
Expected Results
User file is created under
~/.copilot/instructions/(not the VS Code profile folder)The file appears in the "User" group in the list
Sidebar badge count includes the new user file
Debug report confirms the user creation target is
~/.copilot/instructions
Notes
This validates that
AgenticPromptsService.getSourceFolders()correctly redirects user creation to~/.copilot/The VS Code profile folder should never be used for user creation in sessions
Scenario 5: Create a new hook in an active worktree session
Preconditions
Active session with a worktree checked out (continuing from Scenario 3)
No existing
hooks.jsonin the worktree's.github/hooks/folder
Actions
Open the management editor by clicking on "Hooks"
Observe the current hook items (if any)
Click the "Add" button → observe a
hooks.jsonis createdVerify the hooks.json opens in the embedded editor
Verify the file path is
<WORKTREE_PATH>/.github/hooks/hooks.jsonRead the generated JSON and check:
"version": 1is present at the top levelHook entries use
"bash"as the shell field (not"command")All hook event types are present:
sessionStart,userPromptSubmitted,preToolUse,postToolUseEach event has a
[{ "type": "command", "bash": "" }]skeleton
Edit one of the hook entries (e.g., add a bash command to
sessionStart)Press the back button to return to the list
Observe the hooks.json appears in the "Workspace" group
Observe the sidebar badge count for Hooks has updated
Run Developer: Customizations Debug on the Hooks section
Verify
Active rootpoints to the worktree pathCompare Stage 1 counts with Stage 3 counts — they should be consistent
Expected Results
Hooks.json is created in the worktree's
.github/hooks/folderJSON skeleton has correct Copilot CLI format:
"version": 1,"bash"fieldAll hook events from
COPILOT_CLI_HOOK_TYPE_MAPare present in the skeletonHooks section shows only workspace-local hook files (no user-level hooks visible)
Item count updates after creation
Debug report Stage 1 → Stage 3 pipeline shows no unexpected filtering
Notes
Hook events are derived from
COPILOT_CLI_HOOK_TYPE_MAP— adding new events to the schema auto-includes them in the skeletonOnly
"bash"is used (not"command") to match the Copilot CLI schemaThe
"version": 1field is required by the CLI for format detection