Skip to content

Commit 089f1b6

Browse files
committed
Refactor advanced exercises, add cheatsheet
1 parent 996bc6d commit 089f1b6

File tree

3 files changed

+92
-4
lines changed

3 files changed

+92
-4
lines changed

exercises/copilot-advanced-mode-a.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@ Master these sophisticated techniques throughout all exercises:
1515

1616
**Advanced Slash Commands**
1717
- `/tests` with specific context for comprehensive test generation
18-
- `/doc` for architectural documentation and API specifications
18+
- `/docs` for architectural documentation and API specifications
1919
- `/explain` with multi-file context for system understanding
2020
- `/fix` for automated error resolution with context awareness
21+
- `/setupTests` for configuring testing frameworks
22+
23+
*📖 See `copilot-cheatsheet.md` for full command reference*
2124

2225
**Precision Context Variables**
2326
- `#selection` for targeted code analysis and modification
24-
- `#usage:app.data_config.DataManager.analyze_technology_usage` for tracing function dependencies
2527
- `#codebase` for broad architectural questions
26-
- `#terminal` for debugging command outputs
28+
- `#problems` for debugging issues from Problems panel
29+
- `#testFailure` for diagnosing failing tests
30+
- `#terminalLastCommand` for understanding command errors
31+
32+
*📖 See `copilot-cheatsheet.md` for comprehensive context variable reference*
2733

2834
**Strategic Inline Chat Usage**
2935
- Use `Cmd+I`/`Ctrl+I` for complex refactoring within functions
@@ -381,6 +387,8 @@ Choose exercises based on your development interests and skill areas:
381387
382388
Analyze the existing test coverage. What types of tests are missing? How can we improve test organization and add integration testing, performance testing, and edge case coverage?
383389
```
390+
391+
*💡 Pro tip: Use `/setupTests` to get framework-specific testing recommendations*
384392

385393
2. **Test Strategy Development:**
386394
```

exercises/copilot-advanced-mode-b.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ Every exercise follows this structured approach:
111111

112112
**Important:** These exercises are designed for agent-driven development. Choose based on your comfort level with delegating implementation to AI while maintaining strategic oversight.
113113

114+
*📖 Reference `copilot-cheatsheet.md` for advanced context variables and commands useful in agent workflows*
115+
114116
**Exercise 1: Intelligent Refactoring Agent** *(Estimated: 3-4 hours with agent)*
115117
- **Complexity:** High - Full architectural transformation
116118
- **Agent Autonomy:** High - Requires sophisticated planning and execution
@@ -267,7 +269,7 @@ Format this as THREAD_SUMMARY.md for handoff to a fresh agent.
267269

268270
**Problem Space Exploration:**
269271
```
270-
@workspace I want to add advanced correlation analysis to our application. Before designing solutions, please:
272+
@workspace I want to add advanced correlation analysis to our application #codebase. Before designing solutions, please:
271273
272274
1. Analyze the current data structure and available columns
273275
2. Research best practices for correlation analysis in survey data
@@ -277,6 +279,8 @@ Format this as THREAD_SUMMARY.md for handoff to a fresh agent.
277279
Confirm your understanding of our data quality, sample sizes, and statistical requirements before proposing specific implementations.
278280
```
279281

282+
*💡 Use `#codebase` to give the agent full project context for data analysis*
283+
280284
### Phase 2: Specification Creation
281285

282286
**Statistical Analysis Specification:**

exercises/copilot-cheatsheet.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# GitHub Copilot Cheatsheet - Advanced Features
2+
3+
*Quick reference for advanced Copilot features in VS Code*
4+
5+
## 🎯 Essential Context Variables
6+
7+
| Variable | Purpose | Example Use |
8+
|----------|---------|-------------|
9+
| `#codebase` | Project-wide understanding | `How is authentication handled? #codebase` |
10+
| `#selection` | Current editor selection | `Optimize this function #selection` |
11+
| `#problems` | Issues from Problems panel | `Fix these errors #problems` |
12+
| `#changes` | Source control changes | `Generate commit message #changes` |
13+
| `#terminalLastCommand` | Last terminal command | `Explain this error #terminalLastCommand` |
14+
| `#testFailure` | Test failure details | `Why is this test failing? #testFailure` |
15+
| `#usages` | Symbol references/definitions | `Find all uses of this function #usages` |
16+
17+
## 🚀 Powerful Slash Commands
18+
19+
| Command | Purpose | Best For |
20+
|---------|---------|----------|
21+
| `/tests` | Generate test suites | Creating comprehensive tests |
22+
| `/docs` | Generate documentation | Adding docstrings and comments |
23+
| `/fix` | Fix code issues | Debugging and error resolution |
24+
| `/explain` | Explain code/concepts | Understanding complex logic |
25+
| `/new` | Scaffold projects/files | Creating new components |
26+
| `/setupTests` | Configure testing | Setting up test frameworks |
27+
| `/fixTestFailure` | Debug failing tests | Test troubleshooting |
28+
29+
## 🎛️ Advanced Features
30+
31+
**Keyboard Shortcuts:**
32+
- `⌘I` - Inline Chat in editor/terminal
33+
- `⇧⌥⌘L` - Quick Chat
34+
- `⌃⌘I` - Open Chat view
35+
- `F2` - AI-powered symbol renaming
36+
37+
**Chat Participants:**
38+
- `@workspace` - Project-wide operations
39+
- `@terminal` - Shell command help
40+
- `@vscode` - VS Code features help
41+
- `@github` - GitHub integration
42+
43+
**Custom Instructions:**
44+
- `.github/copilot-instructions.md` - Project-wide guidance
45+
- Language-specific settings in VS Code
46+
- Reusable `.prompt.md` files (experimental)
47+
48+
## 💡 Pro Tips
49+
50+
1. **Combine context**: `#codebase #problems #selection` for comprehensive understanding
51+
2. **Be specific**: Include framework/library names in requests
52+
3. **Use drag & drop**: Drop files/folders into chat for instant context
53+
4. **Chain commands**: Use multiple slash commands in sequence
54+
5. **Custom instructions**: Create project-specific guidance for consistency
55+
56+
## 🏴‍☠️ Analytics Project Specifics
57+
58+
**For FastAPI endpoints:**
59+
```
60+
/new FastAPI endpoint for data analysis with Pydantic models #codebase
61+
```
62+
63+
**For data processing:**
64+
```
65+
/tests generate tests for pandas data processing functions #selection
66+
```
67+
68+
**For debugging:**
69+
```
70+
/fix optimize this query performance #problems #selection
71+
```
72+
73+
**For documentation:**
74+
```
75+
/docs add comprehensive docstrings #selection
76+
```

0 commit comments

Comments
 (0)