Repository navigation
feat: expose the agent roles as GitHub Copilot custom agents - #166
Merged
aditeyabaral merged 1 commit intoSep 26, 2026
Merged
Conversation
Copilot lists custom agents only from real .github/agents/<name>.agent.md files on the default branch, and GitHub does not read files through the pesu-dev/skills submodule, so the ten roles were invisible to it. scripts/sync_agents.py generates a wrapper per role: the role's frontmatter copied verbatim and a body telling the agent to read the role file, which stays the only definition. A sync-agents pre-commit hook runs the script with --check on every commit, since a submodule bump changes no tracked Markdown file, and the pre-commit workflow now checks out the submodule so CI can run it. mdformat gains mdformat-frontmatter, without which it rewrites the wrappers' frontmatter. copilot-setup-steps.yml gives Copilot's cloud agent the submodule and the uv environment. It has no TEST_* secrets: live tests share one PESU session and stay with humans and CI. The submodule moves to pesu-dev/skills 6862d1f (pesu-dev#2 and pesu-dev#3), which documents all of this, adds `tools` to the read-only roles, and records the profile logging as deliberate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
📌 Description
Makes the ten agent roles (planner, implementer, reviewer, ...) available as GitHub Copilot custom agents, in the agent picker on GitHub.com and in VS Code.
Copilot lists custom agents only from real
.github/agents/<name>.agent.mdfiles on the default branch, and GitHub does not read files through the.agents/pesudev-skillssubmodule, so the roles were invisible to it. This adds a generated wrapper per role. Each wrapper holds the role's frontmatter, copied verbatim, and a short body telling the agent to read the role file. The role file in pesu-dev/skills stays the only definition.scripts/sync_agents.py(standard library only) generates.github/agents/from.agents/pesudev-skills/auth/agents/.--checkwrites nothing and fails on missing, extra or stale wrappers. If the submodule isn't checked out, it fails withgit submodule update --initinstead of deleting every wrapper..github/agents/*.agent.md: the ten generated wrappers. The four read-only roles carrytools: ["read", "search", "execute", "github/*"], so Copilot gives them no edit tools..pre-commit-config.yaml:sync-agentshook withalways_run: true, because a submodule bump changes no tracked file;mdformat-frontmatter, without which mdformat rewrites the wrappers' frontmatter as Markdown and Copilot stops recognising them..github/workflows/pre-commit.yaml: checkout withsubmodules: true, so CI can run the check..github/workflows/copilot-setup-steps.yml(new): the environment Copilot's cloud agent starts in: the submodule, Python 3.14 anduv sync --all-groups. It hascontents: readand noTEST_*secrets, because live tests share one PESU session.6862d1f, covering chore: use only provider-neutral paths in project repos skills#2 and feat: expose auth's roles as GitHub Copilot custom agents skills#3. That commit documents all of the above, adds thetoolsfield, and records the profile logging as deliberate.source.yamlrejects here.pyproject.toml: the ruff-exclude comment now says it's the Lint workflow that checks out without submodules. Version bumped to 4.11.0, anduv lockrun.🧱 Type of Change
🧪 How Has This Been Tested?
tests/unit/): 12 new tests intests/unit/test_sync_agents.py. They cover generation, idempotence, stale/extra wrappers being rewritten or removed,--checkfailing without writing, a missing submodule, malformed frontmatter, the CLI, and the committed.github/agents/matching the real submodule.tests/functional/)tests/integration/)--checkfailed naming the stale wrapper. After a restore it passed.Full
uv run pre-commit run --all-fileson this commit, with credentials, so the live tests ran: 288 passed, 0 deselected, 100.00% coverage. The generated files are unchanged by the hooks.✅ Checklist
scripts/run_tests.py)pre-commit run --all-files)🛠️ Affected API Behaviour
No API behaviour changes.
🐳 DevOps & Config
.github/workflows/*.yaml– CI/CD pipeline or deployment updatespyproject.toml/requirements.txt– Dependency version changes (version bump only).pre-commit-config.yaml– Linting or formatting hook changes🧠 Additional Notes (if applicable)
6862d1f. A plain bump would failsync-agents, because.github/agents/doesn't exist without this PR. If Dependabot opens that PR, it can be closed; Dependabot should also close it oncedevhas the commit.sync-agents. Either a maintainer pushes the regenerated agents to its branch, or someone supersedes it from a fork. See "Dependabot submodule bumps" in.agents/pesudev-skills/auth/docs/ci-cd.md.copilot-setup-stepsrunning green as Copilot's own setup job;🤖 Generated with Claude Code