Skip to content

Commit f5e9921

Browse files
authored
Merge branch 'main' into main
2 parents 23ed831 + 812febf commit f5e9921

303 files changed

Lines changed: 40290 additions & 2014 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespellrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@
2828

2929
# TE - HTTP transfer coding header
3030

31+
# alle - Finnish word meaning "under/below" (not "all" or "alley")
32+
33+
# vai - Finnish word meaning "or"
34+
3135
# FillIn - pdftk-server skill reference file available permission
3236

33-
ignore-words-list = numer,wit,aks,edn,ser,ois,gir,rouge,categor,aline,ative,afterall,deques,dateA,dateB,TE,FillIn
37+
ignore-words-list = numer,wit,aks,edn,ser,ois,gir,rouge,categor,aline,ative,afterall,deques,dateA,dateB,TE,FillIn,alle,vai
3438

3539
# Skip certain files and directories
3640

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@
2626
*.ico binary
2727
*.zip binary
2828
*.pdf binary
29+
30+
.github/workflows/*.lock.yml linguist-generated=true merge=ours

.github/aw/actions-lock.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v8": {
4+
"repo": "actions/github-script",
5+
"version": "v8",
6+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7+
},
8+
"github/gh-aw/actions/setup@v0.45.7": {
9+
"repo": "github/gh-aw/actions/setup",
10+
"version": "v0.45.7",
11+
"sha": "5d8900eb6f6230c9d41a3c30af320150a2361285"
12+
}
13+
}
14+
}

.github/plugin/marketplace.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"name": "csharp-dotnet-development",
5151
"source": "./plugins/csharp-dotnet-development",
5252
"description": "Essential prompts, instructions, and chat modes for C# and .NET development including testing, documentation, and best practices.",
53-
"version": "1.0.0"
53+
"version": "1.1.0"
5454
},
5555
{
5656
"name": "csharp-mcp-development",
@@ -92,7 +92,7 @@
9292
"name": "gem-team",
9393
"source": "./plugins/gem-team",
9494
"description": "A modular multi-agent team for complex project execution with DAG-based planning, parallel execution, TDD verification, and automated testing.",
95-
"version": "1.0.0"
95+
"version": "1.1.0"
9696
},
9797
{
9898
"name": "go-mcp-development",
@@ -178,6 +178,12 @@
178178
"description": "Comprehensive resources for building Model Context Protocol servers using the official PHP SDK with attribute-based discovery, including best practices, project generation, and expert assistance",
179179
"version": "1.0.0"
180180
},
181+
{
182+
"name": "polyglot-test-agent",
183+
"source": "./plugins/polyglot-test-agent",
184+
"description": "Multi-agent pipeline for generating comprehensive unit tests across any programming language. Orchestrates research, planning, and implementation phases using specialized agents to produce tests that compile, pass, and follow project conventions.",
185+
"version": "1.0.0"
186+
},
181187
{
182188
"name": "power-apps-code-apps",
183189
"source": "./plugins/power-apps-code-apps",

.github/workflows/check-line-endings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Check Line Endings
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [staged]
66
pull_request:
7-
branches: [main]
7+
branches: [staged]
88

99
permissions:
1010
contents: read
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Check Plugin Structure
2+
3+
on:
4+
pull_request:
5+
branches: [staged]
6+
paths:
7+
- "plugins/**"
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
13+
jobs:
14+
check-materialized-files:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Check for materialized files in plugin directories
21+
uses: actions/github-script@v7
22+
with:
23+
script: |
24+
const { execSync } = require('child_process');
25+
const fs = require('fs');
26+
const path = require('path');
27+
28+
const pluginsDir = 'plugins';
29+
const errors = [];
30+
31+
if (!fs.existsSync(pluginsDir)) {
32+
console.log('No plugins directory found');
33+
return;
34+
}
35+
36+
const pluginDirs = fs.readdirSync(pluginsDir, { withFileTypes: true })
37+
.filter(d => d.isDirectory())
38+
.map(d => d.name);
39+
40+
for (const plugin of pluginDirs) {
41+
const pluginPath = path.join(pluginsDir, plugin);
42+
43+
// Check for materialized agent/command/skill files
44+
for (const subdir of ['agents', 'commands', 'skills']) {
45+
const subdirPath = path.join(pluginPath, subdir);
46+
if (!fs.existsSync(subdirPath)) continue;
47+
48+
const stat = fs.lstatSync(subdirPath);
49+
if (stat.isSymbolicLink()) {
50+
errors.push(`${pluginPath}/${subdir} is a symlink — symlinks should not exist in plugin directories`);
51+
continue;
52+
}
53+
54+
if (stat.isDirectory()) {
55+
const files = fs.readdirSync(subdirPath);
56+
if (files.length > 0) {
57+
errors.push(
58+
`${pluginPath}/${subdir}/ contains ${files.length} file(s): ${files.join(', ')}. ` +
59+
`Plugin directories on staged should only contain .github/plugin/plugin.json and README.md. ` +
60+
`Agent, command, and skill files are materialized automatically during publish to main.`
61+
);
62+
}
63+
}
64+
}
65+
66+
// Check for symlinks anywhere in the plugin directory
67+
try {
68+
const allFiles = execSync(`find "${pluginPath}" -type l`, { encoding: 'utf-8' }).trim();
69+
if (allFiles) {
70+
errors.push(`${pluginPath} contains symlinks:\n${allFiles}`);
71+
}
72+
} catch (e) {
73+
// find returns non-zero if no matches, ignore
74+
}
75+
}
76+
77+
if (errors.length > 0) {
78+
const prBranch = context.payload.pull_request.head.ref;
79+
const prRepo = context.payload.pull_request.head.repo.full_name;
80+
const isFork = context.payload.pull_request.head.repo.fork;
81+
82+
const body = [
83+
'⚠️ **Materialized files or symlinks detected in plugin directories**',
84+
'',
85+
'Plugin directories on the `staged` branch should only contain:',
86+
'- `.github/plugin/plugin.json` (metadata)',
87+
'- `README.md`',
88+
'',
89+
'Agent, command, and skill files are copied in automatically when publishing to `main`.',
90+
'',
91+
'**Issues found:**',
92+
...errors.map(e => `- ${e}`),
93+
'',
94+
'---',
95+
'',
96+
'### How to fix',
97+
'',
98+
'It looks like your branch may be based on `main` (which contains materialized files). Here are two options:',
99+
'',
100+
'**Option 1: Rebase onto `staged`** (recommended if you have few commits)',
101+
'```bash',
102+
`git fetch origin staged`,
103+
`git rebase --onto origin/staged origin/main ${prBranch}`,
104+
`git push --force-with-lease`,
105+
'```',
106+
'',
107+
'**Option 2: Remove the extra files manually**',
108+
'```bash',
109+
'# Remove materialized files from plugin directories',
110+
'find plugins/ -mindepth 2 -maxdepth 2 -type d \\( -name agents -o -name commands -o -name skills \\) -exec rm -rf {} +',
111+
'# Remove any symlinks',
112+
'find plugins/ -type l -delete',
113+
'git add -A && git commit -m "fix: remove materialized plugin files"',
114+
'git push',
115+
'```',
116+
].join('\n');
117+
118+
await github.rest.pulls.createReview({
119+
owner: context.repo.owner,
120+
repo: context.repo.repo,
121+
pull_number: context.issue.number,
122+
event: 'REQUEST_CHANGES',
123+
body
124+
});
125+
126+
core.setFailed('Plugin directories contain materialized files or symlinks that should not be on staged');
127+
} else {
128+
console.log('✅ All plugin directories are clean');
129+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Check PR Target Branch
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
types: [opened]
7+
8+
permissions:
9+
pull-requests: write
10+
11+
jobs:
12+
check-target:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Reject PR targeting main
16+
uses: actions/github-script@v7
17+
with:
18+
script: |
19+
const body = [
20+
'⚠️ **This PR targets `main`, but PRs should target `staged`.**',
21+
'',
22+
'The `main` branch is auto-published from `staged` and should not receive direct PRs.',
23+
'Please close this PR and re-open it against the `staged` branch.',
24+
'',
25+
'You can change the base branch using the **Edit** button at the top of this PR,',
26+
'or run: `gh pr edit ${{ github.event.pull_request.number }} --base staged`'
27+
].join('\n');
28+
29+
await github.rest.pulls.createReview({
30+
owner: context.repo.owner,
31+
repo: context.repo.repo,
32+
pull_number: context.issue.number,
33+
event: 'REQUEST_CHANGES',
34+
body
35+
});

.github/workflows/codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Check Spelling
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [staged]
66
pull_request:
7-
branches: [main]
7+
branches: [staged]
88

99
permissions:
1010
contents: read

.github/workflows/publish.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish to main
2+
3+
on:
4+
push:
5+
branches: [staged]
6+
7+
concurrency:
8+
group: publish-to-main
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout staged branch
19+
uses: actions/checkout@v4
20+
with:
21+
ref: staged
22+
fetch-depth: 0
23+
24+
- name: Extract Node version from package.json
25+
id: node-version
26+
run: |
27+
NODE_VERSION=$(jq -r '.engines.node // "22"' package.json)
28+
echo "version=${NODE_VERSION}" >> "$GITHUB_OUTPUT"
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: ${{ steps.node-version.outputs.version }}
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Materialize plugin files
39+
run: node eng/materialize-plugins.mjs
40+
41+
- name: Build generated files
42+
run: npm run build
43+
44+
- name: Fix line endings
45+
run: bash scripts/fix-line-endings.sh
46+
47+
- name: Publish to main
48+
run: |
49+
git config user.name "github-actions[bot]"
50+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
51+
git add -A
52+
git commit -m "chore: publish from staged [skip ci]" --allow-empty
53+
git push origin HEAD:main --force

0 commit comments

Comments
 (0)