Enforce canonical plugin manifest ordering#1601
Merged
Merged
Conversation
Sort existing plugin manifest spec arrays so plugin:clean no longer creates noisy diffs from out-of-order entries. Add validation to require alphabetical ordering and teach plugin:clean to normalize manifest arrays when cleaning materialized plugin content. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes plugin manifest entry ordering across the repository and updates the plugin tooling so manifest arrays are normalized and validated against a canonical alphabetical order. It fits into the repo’s plugin maintenance workflow by tightening consistency between checked-in plugin.json files and the plugin:clean / plugin:validate scripts.
Changes:
- Reorders
agentsandskillsarrays in many plugin manifests to a canonical alphabetical order. - Updates
plugin:cleanto normalize manifest spec arrays to that order while restoring manifests from materialized plugin content. - Updates
plugin:validateto reject unsorted manifest arrays.
Show a summary per file
| File | Description |
|---|---|
| plugins/typespec-m365-copilot/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/testing-automation/.github/plugin/plugin.json | Reorders agents and skills entries alphabetically. |
| plugins/software-engineering-team/.github/plugin/plugin.json | Reorders agents entries alphabetically. |
| plugins/salesforce-development/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/rug-agentic-workflow/.github/plugin/plugin.json | Reorders agents entries alphabetically. |
| plugins/react18-upgrade/.github/plugin/plugin.json | Reorders agents entries alphabetically. |
| plugins/project-planning/.github/plugin/plugin.json | Reorders agents and skills entries alphabetically. |
| plugins/power-platform-mcp-connector-development/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/polyglot-test-agent/.github/plugin/plugin.json | Reorders agents entries alphabetically. |
| plugins/partners/.github/plugin/plugin.json | Reorders agents entries alphabetically. |
| plugins/mcp-m365-copilot/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/java-development/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/gem-team/.github/plugin/plugin.json | Reorders agents entries toward canonical order. |
| plugins/frontend-web-dev/.github/plugin/plugin.json | Reorders agents entries alphabetically. |
| plugins/flowstudio-power-automate/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/edge-ai-tasks/.github/plugin/plugin.json | Reorders agents entries alphabetically. |
| plugins/dataverse-sdk-for-python/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/database-data-management/.github/plugin/plugin.json | Reorders agents and skills entries alphabetically. |
| plugins/csharp-dotnet-development/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/context-engineering/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/cast-imaging/.github/plugin/plugin.json | Reorders agents entries alphabetically. |
| plugins/azure-cloud-development/.github/plugin/plugin.json | Reorders agents and skills entries alphabetically. |
| plugins/awesome-copilot/.github/plugin/plugin.json | Reorders skills entries alphabetically. |
| plugins/ai-team-orchestration/.github/plugin/plugin.json | Reorders agents entries alphabetically. |
| eng/validate-plugins.mjs | Adds manifest array ordering validation to plugin validation. |
| eng/clean-materialized-plugins.mjs | Adds manifest array sorting during plugin cleanup/restoration and updates logging. |
Copilot's findings
Comments suppressed due to low confidence (2)
eng/validate-plugins.mjs:84
- The new alphabetical check only covers
agentsandskills.plugin:cleanand the documented plugin manifest schema also supportcommands, so a plugin with unsorted or invalidcommandsentries will still passplugin:validate, which means canonical ordering is only enforced for two of the three spec arrays.
This issue also appears on line 93 of the same file.
const specs = {
agents: { prefix: "./agents/", suffix: ".md", repoDir: "agents", repoSuffix: ".agent.md" },
skills: { prefix: "./skills/", suffix: "/", repoDir: "skills", repoFile: "SKILL.md" },
};
eng/validate-plugins.mjs:95
- This sortedness check runs before the element-type validation below. If a manifest contains a non-string entry,
sortPluginEntries()will calllocaleCompareon that value and abort the whole validation run instead of reporting the existingfield[i] must be a stringerror.
if (!arraysEqual(arr, sortPluginEntries(arr))) {
errors.push(`${field} must be sorted alphabetically`);
}
- Files reviewed: 26/26 changed files
- Comments generated: 2
Comment on lines
+7
to
+12
| "./agents/gem-designer-mobile.md", | ||
| "./agents/gem-designer.md", | ||
| "./agents/gem-devops.md", | ||
| "./agents/gem-documentation-writer.md", | ||
| "./agents/gem-implementer-mobile.md", | ||
| "./agents/gem-designer-mobile.md", | ||
| "./agents/gem-mobile-tester.md" | ||
| "./agents/gem-implementer.md", |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agentsandskillsentries alphabeticallyplugin:cleannormalize manifest spec arrays to canonical orderValidation