You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set up the foundational configuration files in this repository to enable effective collaboration with AI coding agents. This includes adding an AGENTS.md file to guide agents on project conventions, adding agent skills for repeatable specialized tasks, and defining custom agents for project-specific workflows.
AGENTS.md is an open, plain-Markdown format stewarded by the Agentic AI Foundation under the Linux Foundation. It acts as a "README for agents": a single, predictable file where coding agents look first for project-specific context (build steps, test commands, conventions, security considerations) that would otherwise clutter the human-focused README.md.
It is supported by a wide ecosystem of tools including GitHub Copilot (VS Code), Cursor, Windsurf, OpenAI Codex, Claude Code, Jules (Google), Warp, and many others. In monorepos, nested AGENTS.md files can be placed inside each package; the closest file to the file being edited takes precedence.
Agent Skills
Agent Skills (https://agentskills.io/specification) are directories of instructions, scripts, and resources that an agent can load to perform specialized, repeatable tasks. Each skill lives in a folder named after the skill and contains at minimum a SKILL.md file with YAML frontmatter (name, description, optional license, compatibility, metadata, allowed-tools) followed by Markdown instructions.
GitHub Copilot supports:
Project skills stored in the repository at .github/skills/, .claude/skills/, or .agents/skills/
Personal skills stored in the home directory at ~/.copilot/skills/, ~/.claude/skills/, or ~/.agents/skills/
Custom Agents
Custom agents are specialized versions of GitHub Copilot that can be tailored to project-specific workflows. They are defined as Markdown files with YAML frontmatter (agent profiles) stored at:
Organization/enterprise level: /agents/CUSTOM-AGENT-NAME.md inside a .github-private repository
An agent profile includes a name, description, optional tools, and optional mcp-servers configurations. The Markdown body of the file acts as the agent's prompt (it is not a YAML frontmatter key). The main Copilot agent can run custom agents as subagents in isolated context windows, including in parallel.
Checkpoint: git branch --show-current should output <issue-number>-ai-agent-configuration.
Task 1: Add AGENTS.md at the repository root
Provide AI coding agents with a clear, predictable source of project context so they can work
effectively without requiring repeated manual instructions.
Inspiration / reference AGENTS.md files from other Torrust projects:
Validate skill files against the Agent Skills spec (name rules: lowercase, hyphens, no consecutive hyphens, max 64 chars; description: max 1024 chars)
Candidate initial skills (ported / adapted from torrust-tracker-deployer):
The skills below are modelled on the skills already proven in torrust-tracker-deployer
(.github/skills/). Deployer-specific skills (Ansible, Tera templates, LXD, SDK,
deployer CLI architecture) are excluded because they have no equivalent in the tracker.
Directory layout to mirror the deployer structure:
Define custom GitHub Copilot agents tailored to Torrust project workflows so that specialized
tasks can be delegated to focused agents with the right prompt context.
Create .github/agents/ directory
Identify workflows that benefit from a dedicated agent (e.g. issue implementation planner, code reviewer, documentation writer, release drafter)
For each agent, create .github/agents/<agent-name>.md with:
YAML frontmatter: name (optional), description, optional tools
Prompt body: role definition, scope, constraints, and step-by-step instructions
Test each custom agent by assigning it to a task or issue in GitHub Copilot CLI
Candidate initial agents:
committer — commit specialist: reads branch/diff, runs pre-commit checks (linter all),
proposes a GPG-signed Conventional Commit message, and creates the commit only after scope and
checks are clear. Reference: torrust-tracker-demo/.github/agents/commiter.agent.md
issue-planner — given a GitHub issue, produces a detailed implementation plan document (like the ones in docs/issues/) including branch name, task breakdown, checkpoints, and commit message suggestions
code-reviewer — reviews PRs against Torrust coding conventions, clippy rules, and security considerations
docs-writer — creates or updates documentation files following the existing docs structure
Commit message: docs(agents): add initial custom agents under .github/agents/
Checkpoint:
linter all exits with code 0.
At least one custom agent can be assigned to a task in GitHub Copilot CLI.
Once the root file is stable, evaluate whether any workspace packages have sufficiently different
conventions or setup to warrant their own AGENTS.md. This can be tracked as a separate follow-up
issue.
Task 5: Add copilot-setup-steps.yml workflow
Create .github/workflows/copilot-setup-steps.yml so that the GitHub Copilot cloud agent gets a
fully prepared development environment before it starts working on any task. Without this file,
Copilot discovers and installs dependencies itself via trial-and-error, which is slow and
unreliable.
The workflow must contain a single copilot-setup-steps job (the exact job name is required by
Copilot). Steps run in GitHub Actions before Copilot starts; the file is also automatically
executed as a normal CI workflow whenever it changes, providing built-in validation.
Install cargo-machete — cargo install cargo-machete; ensures Copilot can run unused dependency checks (cargo machete) as required by the essential rules
Smoke-check: run linter all to confirm the environment is healthy before Copilot begins
Task 6: Create an ADR for the AI agent framework approach
Note: This task documents the decision that underlies the whole issue. It can be done
before Tasks 1–5 if preferred — recording the decision first and then implementing it is
the conventional ADR practice.
Document the decision to build a custom, GitHub-Copilot-aligned agent framework (AGENTS.md +
Agent Skills + Custom Agents) rather than adopting one of the existing pre-defined agent
frameworks that were evaluated.
Complexity mismatch — they introduce abstractions that are heavier than what tracker development needs.
Precision requirements — the tracker involves low-level programming where agent work must be reviewed carefully; generic productivity frameworks are not designed around that constraint.
GitHub-first ecosystem — the tracker is hosted on GitHub and makes intensive use of GitHub resources (Actions, Copilot, MCP tools, etc.). Staying aligned with GitHub Copilot avoids unnecessary integration friction.
Tooling churn — the AI agent landscape is evolving rapidly; depending on a third-party framework risks forced refactoring when that framework is deprecated or pivots. A first-party approach is more stable.
Tailored fit — a custom solution can be shaped precisely to Torrust conventions, commit style, linting gates, and package structure from day one.
Proven in practice — the same approach has already been validated during the development of torrust-tracker-deployer.
Agent-agnostic by design — keeping the framework expressed as plain Markdown files (AGENTS.md, SKILL.md, agent profiles) decouples it from any single agent product, making migration or multi-agent use straightforward.
Incremental adoption — individual skills, custom agents, or patterns from those frameworks can still be cherry-picked and integrated progressively if specific value is identified.
Create docs/adrs/<YYYYMMDDHHMMSS>_ai-agent-framework-approach.md using the create-adr skill
Record the decision, the alternatives considered, and the reasoning above
Commit message: docs(adrs): add ADR for AI agent framework approach
Checkpoint:
linter all exits with code 0.
References:
docs/adrs/README.md — ADR naming convention for this repository
Goal
Set up the foundational configuration files in this repository to enable effective collaboration with AI coding agents. This includes adding an
AGENTS.mdfile to guide agents on project conventions, adding agent skills for repeatable specialized tasks, and defining custom agents for project-specific workflows.References
Background
AGENTS.md
AGENTS.mdis an open, plain-Markdown format stewarded by the Agentic AI Foundation under the Linux Foundation. It acts as a "README for agents": a single, predictable file where coding agents look first for project-specific context (build steps, test commands, conventions, security considerations) that would otherwise clutter the human-focusedREADME.md.It is supported by a wide ecosystem of tools including GitHub Copilot (VS Code), Cursor, Windsurf, OpenAI Codex, Claude Code, Jules (Google), Warp, and many others. In monorepos, nested
AGENTS.mdfiles can be placed inside each package; the closest file to the file being edited takes precedence.Agent Skills
Agent Skills (https://agentskills.io/specification) are directories of instructions, scripts, and resources that an agent can load to perform specialized, repeatable tasks. Each skill lives in a folder named after the skill and contains at minimum a
SKILL.mdfile with YAML frontmatter (name,description, optionallicense,compatibility,metadata,allowed-tools) followed by Markdown instructions.GitHub Copilot supports:
.github/skills/,.claude/skills/, or.agents/skills/~/.copilot/skills/,~/.claude/skills/, or~/.agents/skills/Custom Agents
Custom agents are specialized versions of GitHub Copilot that can be tailored to project-specific workflows. They are defined as Markdown files with YAML frontmatter (agent profiles) stored at:
.github/agents/CUSTOM-AGENT-NAME.md/agents/CUSTOM-AGENT-NAME.mdinside a.github-privaterepositoryAn agent profile includes a
name,description, optionaltools, and optionalmcp-serversconfigurations. The Markdown body of the file acts as the agent's prompt (it is not a YAML frontmatter key). The main Copilot agent can run custom agents as subagents in isolated context windows, including in parallel.Tasks
Task 0: Create a local branch
<issue-number>-ai-agent-configurationgit fetch --all --prunegit checkout developgit pull --ff-onlygit checkout -b <issue-number>-ai-agent-configurationgit branch --show-currentshould output<issue-number>-ai-agent-configuration.Task 1: Add
AGENTS.mdat the repository rootProvide AI coding agents with a clear, predictable source of project context so they can work
effectively without requiring repeated manual instructions.
Inspiration / reference AGENTS.md files from other Torrust projects:
Create
AGENTS.mdin the repository root, adapting the above files to the tracker. At minimumthe file must cover:
src/,src/bin/,packages/,console/,contrib/,tests/,docs/,share/,storage/,.github/workflows/)axum-*,*-server,*-core,*-protocol).markdownlint.json,.yamllint-ci.yml,.taplo.toml,cspell.json,rustfmt.toml, etc.)cargo build,cargo test --doc,cargo test --all-targets, E2E runner, benchmarks)linter alland individual linters; how to install thelinterbinary)cargo machete)storage//target/commits,cargo machete)develop→staging/main→main).github/skills/is populated)docs/index.mdpointing contributors toAGENTS.md,.github/skills/, and.github/agents/Commit message:
docs(agents): add root AGENTS.mdCheckpoint:
linter allexits with code0.References:
Task 2: Add Agent Skills
Define reusable, project-specific skills that agents can load to perform specialized tasks on
this repository consistently.
.github/skills/directorySKILL.md— YAML frontmatter (name,description, optionallicense,compatibility) + step-by-step instructionsscripts/(optional) — executable scripts the agent can runreferences/(optional) — additional reference documentationCandidate initial skills (ported / adapted from
torrust-tracker-deployer):The skills below are modelled on the skills already proven in
torrust-tracker-deployer
(
.github/skills/). Deployer-specific skills (Ansible, Tera templates, LXD, SDK,deployer CLI architecture) are excluded because they have no equivalent in the tracker.
Directory layout to mirror the deployer structure:
add-new-skill— meta-skill: guide for creating new Agent Skills for this repository.dev/git-workflow/:commit-changes— commit following Conventional Commits; pre-commit verification checklist.create-feature-branch— branch naming convention and lifecycle.open-pull-request— open a PR via GitHub CLI or GitHub MCP tool; pre-flight checks.release-new-version— version bump, signed release commit, signed tag, CI verification.review-pr— review a PR against Torrust quality standards and checklist.run-linters— run the full linting suite (linter all); fix individual linter failures.run-pre-commit-checks— mandatory quality gates before every commit.dev/maintenance/:update-dependencies— runcargo update, create branch, commit, push, open PR.dev/planning/:create-adr— create an Architectural Decision Record indocs/adrs/.create-issue— draft and open a GitHub issue following project conventions.write-markdown-docs— GFM pitfalls (auto-links, ordered list numbering, etc.).cleanup-completed-issues— remove issue doc files and update roadmap after PR merge.dev/rust-code-quality/:handle-errors-in-code—thiserror-based structured errors; what/where/when/why context.handle-secrets— wrapper types for tokens/passwords; never use plainStringfor secrets.dev/testing/:write-unit-test—it_should_*naming, AAA pattern,MockClock,TempDir,rstest.Commit message:
docs(agents): add initial agent skills under .github/skills/Checkpoint:
linter allexits with code0.References:
Task 3: Add Custom Agents
Define custom GitHub Copilot agents tailored to Torrust project workflows so that specialized
tasks can be delegated to focused agents with the right prompt context.
.github/agents/directory.github/agents/<agent-name>.mdwith:name(optional),description, optionaltoolsCandidate initial agents:
committer— commit specialist: reads branch/diff, runs pre-commit checks (linter all),proposes a GPG-signed Conventional Commit message, and creates the commit only after scope and
checks are clear. Reference:
torrust-tracker-demo/.github/agents/commiter.agent.mdissue-planner— given a GitHub issue, produces a detailed implementation plan document (like the ones indocs/issues/) including branch name, task breakdown, checkpoints, and commit message suggestionscode-reviewer— reviews PRs against Torrust coding conventions, clippy rules, and security considerationsdocs-writer— creates or updates documentation files following the existing docs structureCommit message:
docs(agents): add initial custom agents under .github/agents/Checkpoint:
linter allexits with code0.References:
Task 4 (optional / follow-up): Add nested
AGENTS.mdfiles in packagesOnce the root file is stable, evaluate whether any workspace packages have sufficiently different
conventions or setup to warrant their own
AGENTS.md. This can be tracked as a separate follow-upissue.
Task 5: Add
copilot-setup-steps.ymlworkflowCreate
.github/workflows/copilot-setup-steps.ymlso that the GitHub Copilot cloud agent gets afully prepared development environment before it starts working on any task. Without this file,
Copilot discovers and installs dependencies itself via trial-and-error, which is slow and
unreliable.
The workflow must contain a single
copilot-setup-stepsjob (the exact job name is required byCopilot). Steps run in GitHub Actions before Copilot starts; the file is also automatically
executed as a normal CI workflow whenever it changes, providing built-in validation.
Reference example (from
torrust-tracker-deployer):https://raw.githubusercontent.com/torrust/torrust-tracker-deployer/refs/heads/main/.github/workflows/copilot-setup-steps.yml
Minimum steps to include:
workflow_dispatch,pushandpull_request(scoped to the workflow file path)copilot-setup-stepsjob onubuntu-latest,timeout-minutes: 30,permissions: contents: readactions/checkout@v5— check out the repository (verify this is still the latest stable version on the GitHub Marketplace before merging)dtolnay/rust-toolchain@stable— install the stable Rust toolchain (pin MSRV if needed)Swatinem/rust-cache@v2— cachetarget/and~/.cargobetween runscargo buildwarm-up — build the workspace (or key packages) so incremental compilation is ready when Copilot starts editinglinterbinary —cargo install --locked --git https://github.com/torrust/torrust-linting --bin lintercargo-machete—cargo install cargo-machete; ensures Copilot can run unused dependency checks (cargo machete) as required by the essential ruleslinter allto confirm the environment is healthy before Copilot beginsCommit message:
ci(copilot): add copilot-setup-steps workflowCheckpoint:
linter allexits with code0inside the workflow.References:
Task 6: Create an ADR for the AI agent framework approach
Document the decision to build a custom, GitHub-Copilot-aligned agent framework (AGENTS.md +
Agent Skills + Custom Agents) rather than adopting one of the existing pre-defined agent
frameworks that were evaluated.
Frameworks evaluated and not adopted:
Reasons for not adopting them:
torrust-tracker-deployer.docs/adrs/<YYYYMMDDHHMMSS>_ai-agent-framework-approach.mdusing thecreate-adrskillCommit message:
docs(adrs): add ADR for AI agent framework approachCheckpoint:
linter allexits with code0.References:
docs/adrs/README.md— ADR naming convention for this repositoryAcceptance Criteria
AGENTS.mdexists at the repo root and contains accurate, up-to-date project guidance..github/skills/and can be successfully activated by GitHub Copilot..github/agents/and can be assigned to a task.copilot-setup-steps.ymlexists, the workflow runs successfully in the Actions tab, andlinter allexits with code0inside it.docs/adrs/documenting the decision to use a custom GitHub-Copilot-aligned agent framework.cspell) and markdown linting.docs/index.mdpoints contributors toAGENTS.md,.github/skills/, and.github/agents/.