Hello,
I always appreciate rulesync.
I found an issue where the subagent files generated for GitHub Copilot are not being loaded in VSCode Copilot Chat, and I'd like to share it.
Problem
When rulesync generate creates subagents for GitHub Copilot, the generated file names do not match the format supported by VSCode Copilot Chat. Specifically, they lack the .agent.md extension.
Example: For a source file .rulesync/subagents/planner.md
- Incorrect:
.github/agents/planner.md
- Correct:
.github/agents/planner.agent.md
Because of this, the custom agents generated by rulesync cannot be utilized in GitHub Copilot.
Evidence
According to the source code of vscode-copilot-chat, the .agent.md extension is explicitly expected for agent files.
https://github.com/microsoft/vscode-copilot-chat/blob/main/src/platform/customInstructions/common/promptTypes.ts#L39
export const AGENT_FILE_EXTENSION = '.agent.md';
https://github.com/microsoft/vscode-copilot-chat/blob/main/src/extension/chatSessions/copilotcli/node/copilotCli.ts#L337
export function getAgentFileNameFromFilePath(filePath: URI): string {
const nameFromFile = basename(filePath);
const indexOfAgentMd = nameFromFile.toLowerCase().indexOf('.agent.md');
const agentName = indexOfAgentMd > 0 ? nameFromFile.substring(0, indexOfAgentMd) : nameFromFile;
return agentName;
}
- If
.agent.md is found -> The string before it becomes the agent name.
- If not found -> The entire file name is used as the agent name. While it doesn't cause an error, the glob pattern does not match, so the file is never loaded.
I am planning to create a PR for this myself when I have some free time.
Your confirmation would be appreciated.
Hello,
I always appreciate rulesync.
I found an issue where the subagent files generated for GitHub Copilot are not being loaded in VSCode Copilot Chat, and I'd like to share it.
Problem
When
rulesync generatecreates subagents for GitHub Copilot, the generated file names do not match the format supported by VSCode Copilot Chat. Specifically, they lack the.agent.mdextension.Example: For a source file
.rulesync/subagents/planner.md.github/agents/planner.md.github/agents/planner.agent.mdBecause of this, the custom agents generated by rulesync cannot be utilized in GitHub Copilot.
Evidence
According to the source code of
vscode-copilot-chat, the.agent.mdextension is explicitly expected for agent files.https://github.com/microsoft/vscode-copilot-chat/blob/main/src/platform/customInstructions/common/promptTypes.ts#L39
https://github.com/microsoft/vscode-copilot-chat/blob/main/src/extension/chatSessions/copilotcli/node/copilotCli.ts#L337
.agent.mdis found -> The string before it becomes the agent name.I am planning to create a PR for this myself when I have some free time.
Your confirmation would be appreciated.