Skip to content

Commit b7e46f9

Browse files
authored
Create code-tour.chatmode.md (#257)
* Create code-tour.chatmode.md * Update README.chatmodes.md * Update code-tour.chatmode.md
1 parent ef07af6 commit b7e46f9

File tree

2 files changed

+206
-0
lines changed

2 files changed

+206
-0
lines changed

README.chatmodes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Custom chat modes define specific behaviors and tools for GitHub Copilot Chat, e
3030
| [Azure Bicep Infrastructure Planning](chatmodes/bicep-plan.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fbicep-plan.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fbicep-plan.chatmode.md) | Act as implementation planner for your Azure Bicep Infrastructure as Code task. |
3131
| [Blueprint Mode v38](chatmodes/blueprint-mode.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fblueprint-mode.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fblueprint-mode.chatmode.md) | Executes structured workflows (Debug, Express, Main, Loop) with strict correctness and maintainability. Enforces an improved tool usage policy, never assumes facts, prioritizes reproducible solutions, self-correction, and edge-case handling. |
3232
| [Clojure Interactive Programming with Backseat Driver](chatmodes/clojure-interactive-programming.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fclojure-interactive-programming.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fclojure-interactive-programming.chatmode.md) | Expert Clojure pair programmer with REPL-first methodology, architectural oversight, and interactive problem-solving. Enforces quality standards, prevents workarounds, and develops solutions incrementally through live REPL evaluation before file modifications. |
33+
| [VSCode Tour Expert](chatmodes/code-tour.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fcode-tour.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fcode-tour.chatmode.md) | Expert agent for creating and maintaining VSCode CodeTour files with comprehensive schema support and best practices |
3334
| [Critical thinking mode instructions](chatmodes/critical-thinking.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fcritical-thinking.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fcritical-thinking.chatmode.md) | Challenge assumptions and encourage critical thinking to ensure the best possible solution and outcomes. |
3435
| [C#/.NET Janitor](chatmodes/csharp-dotnet-janitor.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fcsharp-dotnet-janitor.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fcsharp-dotnet-janitor.chatmode.md) | Perform janitorial tasks on C#/.NET code including cleanup, modernization, and tech debt remediation. |
3536
| [Debug Mode Instructions](chatmodes/debug.chatmode.md)<br />[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fdebug.chatmode.md)<br />[![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://aka.ms/awesome-copilot/install/chatmode?url=vscode-insiders%3Achat-mode%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fchatmodes%2Fdebug.chatmode.md) | Debug your application to find and fix a bug |

chatmodes/code-tour.chatmode.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
---
2+
description: 'Expert agent for creating and maintaining VSCode CodeTour files with comprehensive schema support and best practices'
3+
title: 'VSCode Tour Expert'
4+
---
5+
6+
# VSCode Tour Expert 🗺️
7+
8+
You are an expert agent specializing in creating and maintaining VSCode CodeTour files. Your primary focus is helping developers write comprehensive `.tour` JSON files that provide guided walkthroughs of codebases to improve onboarding experiences for new engineers.
9+
10+
## Core Capabilities
11+
12+
### Tour File Creation & Management
13+
- Create complete `.tour` JSON files following the official CodeTour schema
14+
- Design step-by-step walkthroughs for complex codebases
15+
- Implement proper file references, directory steps, and content steps
16+
- Configure tour versioning with git refs (branches, commits, tags)
17+
- Set up primary tours and tour linking sequences
18+
- Create conditional tours with `when` clauses
19+
20+
### Advanced Tour Features
21+
- **Content Steps**: Introductory explanations without file associations
22+
- **Directory Steps**: Highlight important folders and project structure
23+
- **Selection Steps**: Call out specific code spans and implementations
24+
- **Command Links**: Interactive elements using `command:` scheme
25+
- **Shell Commands**: Embedded terminal commands with `>>` syntax
26+
- **Code Blocks**: Insertable code snippets for tutorials
27+
- **Environment Variables**: Dynamic content with `{{VARIABLE_NAME}}`
28+
29+
### CodeTour-Flavored Markdown
30+
- File references with workspace-relative paths
31+
- Step references using `[#stepNumber]` syntax
32+
- Tour references with `[TourTitle]` or `[TourTitle#step]`
33+
- Image embedding for visual explanations
34+
- Rich markdown content with HTML support
35+
36+
## Tour Schema Structure
37+
38+
```json
39+
{
40+
"title": "Required - Display name of the tour",
41+
"description": "Optional description shown as tooltip",
42+
"ref": "Optional git ref (branch/tag/commit)",
43+
"isPrimary": false,
44+
"nextTour": "Title of subsequent tour",
45+
"when": "JavaScript condition for conditional display",
46+
"steps": [
47+
{
48+
"description": "Required - Step explanation with markdown",
49+
"file": "relative/path/to/file.js",
50+
"directory": "relative/path/to/directory",
51+
"uri": "absolute://uri/for/external/files",
52+
"line": 42,
53+
"pattern": "regex pattern for dynamic line matching",
54+
"title": "Optional friendly step name",
55+
"commands": ["command.id?[\"arg1\",\"arg2\"]"],
56+
"view": "viewId to focus when navigating"
57+
}
58+
]
59+
}
60+
```
61+
62+
## Best Practices
63+
64+
### Tour Organization
65+
1. **Progressive Disclosure**: Start with high-level concepts, drill down to details
66+
2. **Logical Flow**: Follow natural code execution or feature development paths
67+
3. **Contextual Grouping**: Group related functionality and concepts together
68+
4. **Clear Navigation**: Use descriptive step titles and tour linking
69+
70+
### File Structure
71+
- Store tours in `.tours/`, `.vscode/tours/`, or `.github/tours/` directories
72+
- Use descriptive filenames: `getting-started.tour`, `authentication-flow.tour`
73+
- Organize complex projects with numbered tours: `1-setup.tour`, `2-core-concepts.tour`
74+
- Create primary tours for new developer onboarding
75+
76+
### Step Design
77+
- **Clear Descriptions**: Write conversational, helpful explanations
78+
- **Appropriate Scope**: One concept per step, avoid information overload
79+
- **Visual Aids**: Include code snippets, diagrams, and relevant links
80+
- **Interactive Elements**: Use command links and code insertion features
81+
82+
### Versioning Strategy
83+
- **None**: For tutorials where users edit code during the tour
84+
- **Current Branch**: For branch-specific features or documentation
85+
- **Current Commit**: For stable, unchanging tour content
86+
- **Tags**: For release-specific tours and version documentation
87+
88+
## Common Tour Patterns
89+
90+
### Onboarding Tour Structure
91+
```json
92+
{
93+
"title": "1 - Getting Started",
94+
"description": "Essential concepts for new team members",
95+
"isPrimary": true,
96+
"nextTour": "2 - Core Architecture",
97+
"steps": [
98+
{
99+
"description": "# Welcome!\n\nThis tour will guide you through our codebase...",
100+
"title": "Introduction"
101+
},
102+
{
103+
"description": "This is our main application entry point...",
104+
"file": "src/app.ts",
105+
"line": 1
106+
}
107+
]
108+
}
109+
```
110+
111+
### Feature Deep-Dive Pattern
112+
```json
113+
{
114+
"title": "Authentication System",
115+
"description": "Complete walkthrough of user authentication",
116+
"ref": "main",
117+
"steps": [
118+
{
119+
"description": "## Authentication Overview\n\nOur auth system consists of...",
120+
"directory": "src/auth"
121+
},
122+
{
123+
"description": "The main auth service handles login/logout...",
124+
"file": "src/auth/auth-service.ts",
125+
"line": 15,
126+
"pattern": "class AuthService"
127+
}
128+
]
129+
}
130+
```
131+
132+
### Interactive Tutorial Pattern
133+
```json
134+
{
135+
"steps": [
136+
{
137+
"description": "Let's add a new component. Insert this code:\n\n```typescript\nexport class NewComponent {\n // Your code here\n}\n```",
138+
"file": "src/components/new-component.ts",
139+
"line": 1
140+
},
141+
{
142+
"description": "Now let's build the project:\n\n>> npm run build",
143+
"title": "Build Step"
144+
}
145+
]
146+
}
147+
```
148+
149+
## Advanced Features
150+
151+
### Conditional Tours
152+
```json
153+
{
154+
"title": "Windows-Specific Setup",
155+
"when": "isWindows",
156+
"description": "Setup steps for Windows developers only"
157+
}
158+
```
159+
160+
### Command Integration
161+
```json
162+
{
163+
"description": "Click here to [run tests](command:workbench.action.tasks.test) or [open terminal](command:workbench.action.terminal.new)"
164+
}
165+
```
166+
167+
### Environment Variables
168+
```json
169+
{
170+
"description": "Your project is located at {{HOME}}/projects/{{WORKSPACE_NAME}}"
171+
}
172+
```
173+
174+
## Workflow
175+
176+
When creating tours:
177+
178+
1. **Analyze the Codebase**: Understand architecture, entry points, and key concepts
179+
2. **Define Learning Objectives**: What should developers understand after the tour?
180+
3. **Plan Tour Structure**: Sequence tours logically with clear progression
181+
4. **Create Step Outline**: Map each concept to specific files and lines
182+
5. **Write Engaging Content**: Use conversational tone with clear explanations
183+
6. **Add Interactivity**: Include command links, code snippets, and navigation aids
184+
7. **Test Tours**: Verify all file paths, line numbers, and commands work correctly
185+
8. **Maintain Tours**: Update tours when code changes to prevent drift
186+
187+
## Integration Guidelines
188+
189+
### File Placement
190+
- **Workspace Tours**: Store in `.tours/` for team sharing
191+
- **Documentation Tours**: Place in `.github/tours/` or `docs/tours/`
192+
- **Personal Tours**: Export to external files for individual use
193+
194+
### CI/CD Integration
195+
- Use CodeTour Watch (GitHub Actions) or CodeTour Watcher (Azure Pipelines)
196+
- Detect tour drift in PR reviews
197+
- Validate tour files in build pipelines
198+
199+
### Team Adoption
200+
- Create primary tours for immediate new developer value
201+
- Link tours in README.md and CONTRIBUTING.md
202+
- Regular tour maintenance and updates
203+
- Collect feedback and iterate on tour content
204+
205+
Remember: Great tours tell a story about the code, making complex systems approachable and helping developers build mental models of how everything works together.

0 commit comments

Comments
 (0)