Skip to content

feat(agents): set up basic AI agent configuration (#1697)#1699

Merged
josecelano merged 13 commits intotorrust:developfrom
josecelano:1697-ai-agent-configuration
Apr 21, 2026
Merged

feat(agents): set up basic AI agent configuration (#1697)#1699
josecelano merged 13 commits intotorrust:developfrom
josecelano:1697-ai-agent-configuration

Conversation

@josecelano
Copy link
Copy Markdown
Member

@josecelano josecelano commented Apr 20, 2026

Progress

  • Task 0: Create local branch 1697-ai-agent-configuration
  • Task 1: Add AGENTS.md at the repository root
  • Extra: Add packages/AGENTS.md with package architecture guide
  • Task 2: Add Agent Skills under .github/skills/
  • Task 3: Add Custom Agents under .github/agents/
  • Task 4 (optional): Add nested AGENTS.md files in packages
  • Task 5: Add copilot-setup-steps.yml workflow
  • Task 6: Create an ADR for the AI agent framework approach

@josecelano josecelano self-assigned this Apr 20, 2026
@josecelano josecelano added the - Developer - Torrust Improvement Experience label Apr 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.41%. Comparing base (fa1f6d1) to head (4fc97a0).
⚠️ Report is 14 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1699      +/-   ##
===========================================
+ Coverage    86.40%   86.41%   +0.01%     
===========================================
  Files          288      288              
  Lines        22672    22672              
  Branches     22672    22672              
===========================================
+ Hits         19590    19593       +3     
+ Misses        2849     2843       -6     
- Partials       233      236       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…dex, and templates

- Add 19 agent skills under .github/skills/ covering git workflow,
  maintenance, planning, Rust code quality, and testing
- Add scripts/pre-commit.sh: unified pre-commit check runner
- Add scripts/install-git-hooks.sh: one-command git hook installer
- Add .githooks/pre-commit: checked-in hook delegating to pre-commit.sh
- Add docs/adrs/index.md: standalone ADR index table
- Update docs/adrs/README.md: replace inline index with link to index.md
- Add docs/templates/ADR.md and docs/templates/ISSUE.md
- Update project-words.txt: add toplevel, behaviour, autolinks, backlinks, usize
- Update docs/issues/1697-ai-agent-configuration.md: mark Task 2 complete
…exity auditor (torrust#1697)

- Add .github/agents/committer.agent.md: commit specialist with GPG signing
- Add .github/agents/implementer.agent.md: TDD implementer with sub-agent delegation
- Add .github/agents/complexity-auditor.agent.md: cyclomatic/cognitive complexity checker
- Update project-words.txt: add cyclomatic, analyse, penalise
- Update docs/issues/1697-ai-agent-configuration.md: mark Tasks 3 and 4 complete
- Add .github/workflows/copilot-setup-steps.yml: prepares Copilot cloud
  agent environment before it starts working on any task
- Triggers on workflow_dispatch, push and pull_request (scoped to file)
- Steps: checkout (v6), stable Rust toolchain, rust-cache, cargo build,
  install linter, install cargo-machete, install git hooks, linter all
- Update docs/issues/1697-ai-agent-configuration.md: mark Task 5 complete
- Add docs/adrs/20260420200013_adopt_custom_github_copilot_aligned_agent_framework.md:
  records the decision to build a custom GitHub-Copilot-aligned agent
  framework (AGENTS.md + Agent Skills + Custom Agents) over third-party
  alternatives (obra/superpowers, gsd-build/get-shit-done)
- Update docs/adrs/index.md: add new ADR entry
- Update project-words.txt: add specialised
- Update docs/issues/1697-ai-agent-configuration.md: mark Task 6 complete
@josecelano josecelano marked this pull request as ready for review April 20, 2026 20:04
@josecelano josecelano requested a review from a team as a code owner April 20, 2026 20:04
@josecelano josecelano requested a review from Copilot April 20, 2026 20:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a first-party AI agent framework for this Rust workspace (Torrust Tracker), centered around AGENTS.md guidance, Copilot Agent Skills, custom agent profiles, and supporting automation/docs so agents and contributors can follow consistent workflows.

Changes:

  • Introduces repository + subdirectory AGENTS.md files and supporting docs/templates (issue/ADR templates, ADR entry).
  • Adds Agent Skills under .github/skills/ and custom agent profiles under .github/agents/.
  • Adds supporting automation: Copilot cloud-agent setup workflow, git hook installer, and a pre-commit verification script; cleans up cspell config/dictionary and ignores a generated artifact.

Reviewed changes

Copilot reviewed 39 out of 40 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/AGENTS.md Documents src/ responsibilities, bootstrap flow, AppContainer, and JobManager for agents/contributors.
scripts/pre-commit.sh Adds a unified local pre-commit verification runner (deps check, lint, doc tests, tests).
scripts/install-git-hooks.sh Installs repo-provided hooks from .githooks/ into .git/hooks/.
project-words.txt Extends cspell project dictionary with additional technical terms.
packages/AGENTS.md Adds workspace package layering + catalog guidance for agents/contributors.
docs/templates/ISSUE.md Adds a standard issue template for consistent planning/specs.
docs/templates/ADR.md Adds an ADR template for consistent architectural decision records.
docs/issues/1697-ai-agent-configuration.md Marks the issue plan checklist items as completed and updates details.
docs/adrs/index.md Registers the new ADR in the ADR index table.
docs/adrs/README.md Improves ADR README guidance (naming, indexing, typical structure).
docs/adrs/20260420200013_adopt_custom_github_copilot_aligned_agent_framework.md Adds ADR documenting the agent framework approach and alternatives.
cspell.json Updates cspell ignore paths (including repomix-output.xml).
cSpell.json Removes the duplicate cspell config file (case-variant).
AGENTS.md Adds root-level agent/contributor instructions, commands, and conventions.
.gitignore Ignores repomix-output.xml artifact.
.github/workflows/copilot-setup-steps.yml Adds Copilot cloud agent setup workflow (toolchain, build warmup, linter/tools, hooks).
.github/skills/dev/testing/write-unit-test/SKILL.md Adds a skill describing unit test conventions (naming, AAA, clocks, rstest).
.github/skills/dev/rust-code-quality/handle-secrets/SKILL.md Adds a skill guiding secret handling (secrecy::Secret, exposure rules).
.github/skills/dev/rust-code-quality/handle-errors-in-code/SKILL.md Adds a skill guiding structured error handling (thiserror, context/actionability, located-error).
.github/skills/dev/planning/write-markdown-docs/SKILL.md Adds a skill documenting GFM pitfalls (notably #NUMBER autolinks).
.github/skills/dev/planning/create-issue/SKILL.md Adds a skill describing spec-first issue creation workflow.
.github/skills/dev/planning/create-adr/SKILL.md Adds a skill describing ADR creation + indexing workflow.
.github/skills/dev/planning/cleanup-completed-issues/SKILL.md Adds a skill describing how to remove closed issue specs after merge.
.github/skills/dev/maintenance/update-dependencies/SKILL.md Adds a skill guiding dependency update workflow and categorization.
.github/skills/dev/maintenance/setup-dev-environment/SKILL.md Adds onboarding steps for a fresh development environment.
.github/skills/dev/maintenance/install-linter/SKILL.md Adds a skill describing installing linter plus external tool dependencies.
.github/skills/dev/git-workflow/run-pre-commit-checks/SKILL.md Adds a skill describing mandatory pre-commit gates and manual checks.
.github/skills/dev/git-workflow/run-linters/references/linters.md Adds detailed linter reference documentation.
.github/skills/dev/git-workflow/run-linters/SKILL.md Adds a skill describing how to run and debug linters.
.github/skills/dev/git-workflow/review-pr/SKILL.md Adds a PR review checklist skill aligned to repo standards.
.github/skills/dev/git-workflow/release-new-version/SKILL.md Adds a skill documenting the release workflow/branching/tagging/publishing steps.
.github/skills/dev/git-workflow/open-pull-request/SKILL.md Adds a skill describing PR creation workflow and checks.
.github/skills/dev/git-workflow/create-feature-branch/SKILL.md Adds a skill describing branch naming and lifecycle conventions.
.github/skills/dev/git-workflow/commit-changes/SKILL.md Adds a skill describing Conventional Commits + GPG signing + pre-commit verification.
.github/skills/add-new-skill/references/specification.md Adds a local reference summary of the Agent Skills spec.
.github/skills/add-new-skill/SKILL.md Adds a meta-skill documenting how to create new skills in this repo.
.github/agents/implementer.agent.md Adds a custom agent profile for TDD-oriented implementation workflow.
.github/agents/complexity-auditor.agent.md Adds a custom agent profile for complexity auditing workflow.
.github/agents/committer.agent.md Adds a custom agent profile for safe/reviewable committing workflow.
.githooks/pre-commit Adds a git pre-commit hook that runs ./scripts/pre-commit.sh.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/skills/dev/git-workflow/run-linters/references/linters.md Outdated
Comment thread packages/AGENTS.md
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread scripts/pre-commit.sh
Comment thread AGENTS.md Outdated
Comment thread .github/skills/dev/testing/write-unit-test/SKILL.md Outdated
Comment thread AGENTS.md
@da2ce7
Copy link
Copy Markdown
Contributor

da2ce7 commented Apr 20, 2026

wow! a massive set of general good advise :)

…#1697)

- Fix malformed YAML frontmatter in write-unit-test SKILL.md (file path
  prepended to opening delimiter; fix metadata field indentation)
- Remove stale cSpell.json reference from run-linters/references/linters.md
- Remove located-error and clock from Utilities/Test-support layer in
  packages/AGENTS.md (already listed in Domain/Shared)
- Update AGENTS.md: remove torrust#1697 placeholders for .github/skills/ and
  .github/agents/ entries; remove cSpell.json from config table; fix
  nightly toolchain comment; update Auto-Invoke Skills section; fix
  Quick Navigation table last two rows to proper links
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 39 out of 40 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/install-git-hooks.sh
Comment thread project-words.txt
Comment thread project-words.txt
Comment thread project-words.txt
Comment thread .github/workflows/copilot-setup-steps.yml
…ust#1697)

- Fix install-git-hooks.sh: use git rev-parse --git-path hooks for
  HOOKS_DST to support git worktrees; add mkdir -p to ensure dir exists
- Fix project-words.txt: restore alphabetical order for penalise
  (after peerlist), repomix (in re* section before repr), specialised
  (between socketaddr and sqllite), and toplevel (between tlsv and
  Torrentstorm); remove duplicates from near-end of file
- Fix copilot-setup-steps.yml: expand push/pull_request path triggers
  to include scripts/install-git-hooks.sh and scripts/pre-commit.sh
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 39 out of 40 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/AGENTS.md
Comment thread .github/skills/dev/testing/write-unit-test/SKILL.md Outdated
Comment thread .github/skills/dev/testing/write-unit-test/SKILL.md Outdated
Comment thread .github/skills/dev/git-workflow/run-pre-commit-checks/SKILL.md Outdated
)

- Fix MySQL test commands: replace torrust-tracker-core / tracker-core
  with the correct Cargo package name bittorrent-tracker-core in
  packages/AGENTS.md and run-pre-commit-checks/SKILL.md
- Fix write-unit-test/SKILL.md: replace fictional Arc<dyn Clock>
  injection pattern and MockClock::new() constructor with the real
  type-level CurrentClock alias (clock::Working / clock::Stopped) and
  Stopped::local_set() for deterministic time in tests; also fix
  cargo test -p tracker-core -> bittorrent-tracker-core and update
  quick checklist
@josecelano
Copy link
Copy Markdown
Member Author

ACK 4fc97a0

@josecelano josecelano linked an issue Apr 21, 2026 that may be closed by this pull request
44 tasks
@josecelano josecelano merged commit a95af24 into torrust:develop Apr 21, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

- Developer - Torrust Improvement Experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set Up Basic AI Agent Configuration

3 participants