Skip to content

Commit 856640f

Browse files
authored
Merge branch 'staged' into brsingh/feature/java-instructions
2 parents 8f1a09d + e37cd31 commit 856640f

20 files changed

Lines changed: 4335 additions & 651 deletions

.codespellrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@
4646

4747
# queston - intentional misspelling example in skills/arize-dataset/SKILL.md demonstrating typo detection in field names
4848

49+
# nin - MongoDB $nin operator in security instructions NoSQL injection detection regex
50+
4951
# Vertexes - FreeCAD shape sub-elements used as property of obj.Shape
5052

51-
ignore-words-list = numer,wit,aks,edn,ser,ois,gir,rouge,categor,aline,ative,afterall,deques,dateA,dateB,TE,FillIn,alle,vai,LOD,InOut,pixelX,aNULL,Wee,Sherif,queston,Vertexes
53+
ignore-words-list = numer,wit,aks,edn,ser,ois,gir,rouge,categor,aline,ative,afterall,deques,dateA,dateB,TE,FillIn,alle,vai,LOD,InOut,pixelX,aNULL,Wee,Sherif,queston,Vertexes,nin
5254

5355
# Skip certain files and directories
5456

.github/plugin/marketplace.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@
325325
{
326326
"name": "modernize-dotnet",
327327
"description": "AI-powered .NET modernization and upgrade assistant. Helps upgrade .NET Framework and .NET applications to the latest versions of .NET.",
328-
"version": "1.0.979-preview1",
328+
"version": "1.0.1026-preview1",
329329
"author": {
330330
"name": "Microsoft",
331331
"url": "https://www.microsoft.com"
@@ -573,6 +573,31 @@
573573
"description": "Comprehensive collection of prompts, instructions, and resources for building declarative agents and API plugins using TypeSpec for Microsoft 365 Copilot extensibility.",
574574
"version": "1.0.0"
575575
},
576+
{
577+
"name": "whatidid",
578+
"description": "Turn your Copilot sessions into proof of impact — research-grounded HTML reports with effort estimation, skills analysis, and ROI metrics from local session logs.",
579+
"version": "1.0.0",
580+
"author": {
581+
"name": "Microsoft",
582+
"url": "https://www.microsoft.com"
583+
},
584+
"homepage": "https://github.com/microsoft/What-I-Did-Copilot",
585+
"keywords": [
586+
"copilot",
587+
"productivity",
588+
"impact",
589+
"report",
590+
"estimation",
591+
"roi",
592+
"session-logs"
593+
],
594+
"license": "MIT",
595+
"repository": "https://github.com/microsoft/What-I-Did-Copilot",
596+
"source": {
597+
"source": "github",
598+
"repo": "microsoft/What-I-Did-Copilot"
599+
}
600+
},
576601
{
577602
"name": "winui3-development",
578603
"source": "winui3-development",

.github/workflows/check-plugin-structure.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,50 @@ jobs:
2121
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
2222
with:
2323
script: |
24-
const { execSync } = require('child_process');
2524
const fs = require('fs');
2625
const path = require('path');
2726
2827
const pluginsDir = 'plugins';
2928
const errors = [];
3029
30+
function findSymlinks(rootDir) {
31+
const symlinks = [];
32+
const dirsToScan = [rootDir];
33+
34+
while (dirsToScan.length > 0) {
35+
const currentDir = dirsToScan.pop();
36+
let entries;
37+
38+
try {
39+
entries = fs.readdirSync(currentDir, { withFileTypes: true });
40+
} catch (error) {
41+
throw new Error(`Failed to read directory "${currentDir}": ${error.message}`);
42+
}
43+
44+
for (const entry of entries) {
45+
const entryPath = path.join(currentDir, entry.name);
46+
let stat;
47+
48+
try {
49+
stat = fs.lstatSync(entryPath);
50+
} catch (error) {
51+
throw new Error(`Failed to inspect "${entryPath}": ${error.message}`);
52+
}
53+
54+
if (stat.isSymbolicLink()) {
55+
symlinks.push(entryPath);
56+
continue;
57+
}
58+
59+
if (stat.isDirectory()) {
60+
dirsToScan.push(entryPath);
61+
}
62+
}
63+
}
64+
65+
return symlinks;
66+
}
67+
3168
if (!fs.existsSync(pluginsDir)) {
3269
console.log('No plugins directory found');
3370
return;
@@ -63,14 +100,15 @@ jobs:
63100
}
64101
}
65102
66-
// Check for symlinks anywhere in the plugin directory
103+
// Check for symlinks anywhere in the plugin directory without invoking a shell
67104
try {
68-
const allFiles = execSync(`find "${pluginPath}" -type l`, { encoding: 'utf-8' }).trim();
69-
if (allFiles) {
70-
errors.push(`${pluginPath} contains symlinks:\n${allFiles}`);
105+
const symlinkPaths = findSymlinks(pluginPath);
106+
if (symlinkPaths.length > 0) {
107+
const formattedPaths = symlinkPaths.map(filePath => `\`${filePath}\``).join(', ');
108+
errors.push(`${pluginPath} contains symlinks: ${formattedPaths}`);
71109
}
72-
} catch (e) {
73-
// find returns non-zero if no matches, ignore
110+
} catch (error) {
111+
errors.push(`Failed to inspect ${pluginPath} for symlinks: ${error.message}`);
74112
}
75113
}
76114

agents/github-actions-expert.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: 'GitHub Actions Expert'
33
description: 'GitHub Actions specialist focused on secure CI/CD workflows, action pinning, OIDC authentication, permissions least privilege, and supply-chain security'
4-
tools: ['codebase', 'edit/editFiles', 'terminalCommand', 'search', 'githubRepo']
4+
tools: ['github/*', 'search/codebase', 'edit/editFiles', 'execute/runInTerminal', 'read/readFile', 'search/fileSearch']
55
---
66

77
# GitHub Actions Expert

agents/tdd-green.agent.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: 'Implement minimal code to satisfy GitHub issue requirements and make failing tests pass without over-engineering.'
33
name: 'TDD Green Phase - Make Tests Pass Quickly'
4-
tools: ['github', 'findTestFiles', 'edit/editFiles', 'runTests', 'runCommands', 'codebase', 'filesystem', 'search', 'problems', 'testFailure', 'terminalLastCommand']
4+
tools: ['github/*', 'search/fileSearch', 'edit/editFiles', 'execute/runTests', 'execute/runInTerminal', 'execute/getTerminalOutput', 'execute/testFailure', 'read/readFile', 'read/terminalLastCommand', 'read/terminalSelection', 'read/problems', 'search/codebase']
55
---
66
# TDD Green Phase - Make Tests Pass Quickly
77

@@ -34,11 +34,11 @@ Write the minimal code necessary to satisfy GitHub issue requirements and make f
3434
- **Simple solutions first** - Choose the most straightforward implementation path from issue context
3535
- **Defer complexity** - Don't anticipate requirements beyond current issue scope
3636

37-
### C# Implementation Strategies
37+
### Implementation Strategies (Polyglot)
3838
- **Start with constants** - Return hard-coded values from issue examples initially
3939
- **Progress to conditionals** - Add if/else logic as more issue scenarios are tested
40-
- **Extract to methods** - Create simple helper methods when duplication emerges
41-
- **Use basic collections** - Simple List<T> or Dictionary<T,V> over complex data structures
40+
- **Extract to methods/functions** - Create simple helpers when duplication emerges
41+
- **Use basic collections** - Simple arrays, lists, or maps over complex data structures
4242

4343
## Execution Guidelines
4444

agents/tdd-red.agent.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Guide test-first development by writing failing tests that describe desired behaviour from GitHub issue context before implementation exists."
33
name: "TDD Red Phase - Write Failing Tests First"
4-
tools: ["github", "findTestFiles", "edit/editFiles", "runTests", "runCommands", "codebase", "filesystem", "search", "problems", "testFailure", "terminalLastCommand"]
4+
tools: ["github/*", "search/fileSearch", "edit/editFiles", "execute/runTests", "execute/runInTerminal", "execute/getTerminalOutput", "execute/testFailure", "read/readFile", "read/terminalLastCommand", "read/terminalSelection", "read/problems", "search/codebase"]
55
---
66

77
# TDD Red Phase - Write Failing Tests First
@@ -34,17 +34,19 @@ Focus on writing clear, specific failing tests that describe the desired behavio
3434

3535
### Test Quality Standards
3636

37-
- **Descriptive test names** - Use clear, behaviour-focused naming like `Should_ReturnValidationError_When_EmailIsInvalid_Issue{number}`
37+
- **Descriptive test names** - Use clear, behaviour-focused naming like `returnsValidationError_whenEmailIsInvalid_issue{number}` (adapt casing to your language convention)
3838
- **AAA Pattern** - Structure tests with clear Arrange, Act, Assert sections
3939
- **Single assertion focus** - Each test should verify one specific outcome from issue criteria
4040
- **Edge cases first** - Consider boundary conditions mentioned in issue discussions
4141

42-
### C# Test Patterns
42+
### Test Patterns (Polyglot)
4343

44-
- Use **xUnit** with **FluentAssertions** for readable assertions
45-
- Apply **AutoFixture** for test data generation
46-
- Implement **Theory tests** for multiple input scenarios from issue examples
47-
- Create **custom assertions** for domain-specific validations outlined in issue
44+
- **JavaScript/TypeScript**: Use **Jest** or **Vitest** with `describe`/`it` blocks and `expect` assertions
45+
- **Python**: Use **pytest** with descriptive function names and `assert` statements
46+
- **Java/Kotlin**: Use **JUnit 5** with **AssertJ** for fluent assertions
47+
- **C#/.NET**: Use **xUnit** or **NUnit** with **FluentAssertions**
48+
- Apply parameterised/data-driven tests for multiple input scenarios from issue examples
49+
- Create shared test utilities for domain-specific validations outlined in issue
4850

4951
## Execution Guidelines
5052

agents/tdd-refactor.agent.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Improve code quality, apply security best practices, and enhance design whilst maintaining green tests and GitHub issue compliance."
33
name: "TDD Refactor Phase - Improve Quality & Security"
4-
tools: ["github", "findTestFiles", "edit/editFiles", "runTests", "runCommands", "codebase", "filesystem", "search", "problems", "testFailure", "terminalLastCommand"]
4+
tools: ["github/*", "search/fileSearch", "edit/editFiles", "execute/runTests", "execute/runInTerminal", "execute/getTerminalOutput", "execute/testFailure", "read/readFile", "read/terminalLastCommand", "read/terminalSelection", "read/problems", "search/codebase"]
55
---
66

77
# TDD Refactor Phase - Improve Quality & Security
@@ -39,24 +39,24 @@ Clean up code, apply security best practices, and enhance design whilst keeping
3939
- **Authentication/Authorisation** - Implement proper access controls if specified in issue
4040
- **Data protection** - Encrypt sensitive data, use secure connection strings
4141
- **Error handling** - Avoid information disclosure through exception details
42-
- **Dependency scanning** - Check for vulnerable NuGet packages
43-
- **Secrets management** - Use Azure Key Vault or user secrets, never hard-code credentials
42+
- **Dependency scanning** - Check for vulnerable packages (`npm audit`, `pip audit`, `dotnet list package --vulnerable`, etc.)
43+
- **Secrets management** - Use environment variables or a secrets manager; never hard-code credentials
4444
- **OWASP compliance** - Address security concerns mentioned in issue or related security tickets
4545

4646
### Design Excellence
4747

4848
- **Design patterns** - Apply appropriate patterns (Repository, Factory, Strategy, etc.)
49-
- **Dependency injection** - Use DI container for loose coupling
50-
- **Configuration management** - Externalise settings using IOptions pattern
51-
- **Logging and monitoring** - Add structured logging with Serilog for issue troubleshooting
52-
- **Performance optimisation** - Use async/await, efficient collections, caching
49+
- **Dependency injection** - Use DI container or constructor injection for loose coupling
50+
- **Configuration management** - Externalise settings using environment variables or config files
51+
- **Logging and monitoring** - Add structured logging appropriate to your stack for issue troubleshooting
52+
- **Performance optimisation** - Use async/await or equivalent concurrency primitives, efficient collections, caching
5353

54-
### C# Best Practices
54+
### Language Best Practices (Polyglot)
5555

56-
- **Nullable reference types** - Enable and properly configure nullability
57-
- **Modern C# features** - Use pattern matching, switch expressions, records
58-
- **Memory efficiency** - Consider Span<T>, Memory<T> for performance-critical code
59-
- **Exception handling** - Use specific exception types, avoid catching Exception
56+
- **Null safety** - Enable strict null checks (TypeScript), nullable reference types (C#), or Optional types (Java/Kotlin)
57+
- **Modern language features** - Use pattern matching, destructuring, and idiomatic constructs for your language
58+
- **Memory & performance** - Apply language-specific optimisations only when profiling reveals a bottleneck
59+
- **Error handling** - Use specific error/exception types; avoid swallowing errors silently
6060

6161
## Security Checklist
6262

0 commit comments

Comments
 (0)