general: T8595: add AGENTS.md#2
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR introduces ChangesMergify Configuration Baseline Documentation
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Line 50: The AGENTS.md contains a broken reference "data/github.md" (the
string appears on line 50) which does not exist in the repo; either remove that
reference from AGENTS.md or replace it with the correct existing verification
file/path, or add a new file named "data/github.md" containing the claimed
verification details; update the AGENTS.md text to point to the corrected file
name or remove the parenthetical reference so the document no longer links to a
non-existent "data/github.md".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 64bd620c-4327-452e-a404-dd1011e57887
📒 Files selected for processing (2)
.github/copilot-instructions.mdAGENTS.md
📜 Review details
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:43.776Z
Learning: Agents must be stateless - they should not maintain internal state between invocations
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:43.776Z
Learning: Use dependency injection to provide agent dependencies rather than hardcoding them
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:43.776Z
Learning: Agents must implement the Agent interface or abstract base class
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:43.776Z
Learning: Handle errors gracefully with try-catch blocks and return meaningful error messages
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:43.776Z
Learning: Document agent inputs, outputs, and side effects clearly in code comments or docstrings
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:55.324Z
Learning: Central Mergify baseline configuration should be defined in `.mergify.yml` at the root of the `vyos/mergify` repository, with an `extends:` mechanism for per-repo inheritance
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:55.324Z
Learning: Conflict-label rule must be included in the central Mergify baseline configuration
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:55.324Z
Learning: Commit and PR title format must follow `component: T12345: description` with mandatory Phorge task ID reference
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:55.324Z
Learning: Default branch for repositories must be set to `production`
Learnt from: CR
Repo: vyos/mergify
Timestamp: 2026-05-09T19:14:55.324Z
Learning: Validate Mergify configuration locally using `mergify config-validate` command before pushing changes
🪛 LanguageTool
AGENTS.md
[grammar] ~42-~42: Ensure spelling is correct
Context: ...rmat: component: T12345: description. Phorge task ID at https://vyos.dev mandatory. ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[uncategorized] ~50-~50: The official name of this software platform is spelled with a capital “H”.
Context: ...epository_selection: all(verified perdata/github.md). ## Rollback git revert` the of...
(GITHUB)
🔍 Remote MCP
I'll search for relevant context to help review this PR about adding AGENTS.md and Mergify configuration documentation.## Additional Context Summary for PR Review
AGENTS.md Standard and Context
AGENTS.md is a simple, open format for guiding coding agents. It functions as a dedicated, predictable place to provide context and instructions to help AI coding agents work on your project. The format is used by over 60k open-source projects as a README for agents. Google, OpenAI, Factory, Sourcegraph, and Cursor jointly launched AGENTS.md as a simple open standard.
AGENTS.md is just standard Markdown with no required structure, allowing projects to use any headings they like. The closest AGENTS.md to the edited file wins, with explicit user chat prompts overriding all file content. This proximity-based resolution ensures agents receive the most specific and relevant guidance for the code they're modifying.
Mergify Configuration Extends Feature
Mergify offers a feature to extend configuration files by incorporating settings from another repository using the keyword extends — aiding in consistency and reducing duplication. Mergify lets you extend configuration files by including configuration from another repository, which is useful when you want to share and reuse configuration rules across multiple repositories. To extend a configuration file, use the extends keyword at the top level and specify the repository name.
Values in the defaults and commands_restrictions keys are merged, with remote defaults applying to local configuration unless a same default value already exists locally. Rules in various sections are merged, and a rule will not be overwritten by the extended configuration if it has the same name in both configurations.
GitHub Copilot Instructions Compatibility
To create repository custom instructions for GitHub Copilot, create a file named .github/copilot-instructions.md in the repository root, and add natural language instructions to the file in Markdown format. Agent instructions are used by AI agents, and you can create one or more AGENTS.md files stored anywhere within the repository. When Copilot is working, the nearest AGENTS.md file in the directory tree will take precedence.
The PR's approach of using a symlink from .github/copilot-instructions.md to the root AGENTS.md aligns with the practice where if an AGENTS.md file and a .github/copilot-instructions.md file are both found at the root of the repository, the instructions in both files are used.
Key Reviewable Points
- Format Alignment: The AGENTS.md content in the PR (documenting Mergify configuration conventions) appropriately uses the AGENTS.md standard's flexibility to document project-specific requirements.
- Configuration Hierarchy: The
extends: vyos/mergifypattern documented aligns with Mergify's nativeextendsfeature for sharing and overriding configuration across repositories. - Dual Access Pattern: Using a symlink ensures compatibility with both GitHub Copilot's
.github/copilot-instructions.mdpath requirement and the broader AGENTS.md ecosystem used by other AI coding agents.
[::web_search::] (AGENTS.md standard specification and Mergify configuration extends feature documentation)
🔀 Multi-repo context ansible/ansible
Linked repositories findings
ansible/ansible
- test/sanity/code-smell/package-data.py — AGENTS.md is included in the sdist ignore_patterns list (so packaging/tests expect AGENTS.md to be present/ignored) and the repo contains an AGENTS.md file. [::ansible/ansible::test/sanity/code-smell/package-data.py:1-200]
- Repository root contains AGENTS.md (document for AI assistants). [::ansible/ansible::AGENTS.md]
🔇 Additional comments (3)
AGENTS.md (2)
1-55: LGTM: Documentation aligns with Mergify conventions and learnings.The AGENTS.md content correctly documents:
- The
extends: vyos/mergifyinheritance pattern (Line 5, 35)- Mandatory commit/PR title format with Phorge task ID (Line 42)
- Default branch
production(Line 43)- Local validation using
mergify config-validate(Line 22)- Conflict-label rule inclusion in baseline (Line 26)
The structure is clear, conventions are well-specified, and the rollback approach is practical.
Based on learnings: central Mergify baseline configuration with
extends:mechanism, commit format requirements, default branch conventions, and local validation workflow.
44-44: ⚡ Quick winNo issues found. The claim that
unqueueis obsolete and replaced bydequeueis correct per Mergify documentation. Line 44 of AGENTS.md accurately reflects the current command set..github/copilot-instructions.md (1)
1-1: ⚡ Quick winNo issues found. The file
.github/copilot-instructions.mdis correctly implemented as a symlink (Git mode 120000) pointing to../AGENTS.md. The diff representation showing the path content is the standard Git display format for symlinks, not evidence of a plain text file.
|
|
||
| - Sibling: `VyOS-Networks/mergify` (private, same shape). | ||
| - Authority: [T8782](https://vyos.dev/T8782) (central-config rollout via `extends:`), [T8531](https://vyos.dev/T8531) (predecessor: per-repo Mergify rollout with command restrictions). | ||
| - App installation: org-level Mergify GitHub App, `repository_selection: all` (verified per `data/github.md`). |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if data/github.md exists in the repository
fd -t f -i 'github.md' data/Repository: vyos/mergify
Length of output: 149
🏁 Script executed:
#!/bin/bash
# Explore repository structure and look for the referenced file
echo "=== Repository structure ==="
git ls-files | head -30
echo -e "\n=== Checking for github.md file ==="
fd -t f 'github.md' . || echo "No github.md found"
echo -e "\n=== Checking for AGENTS.md ==="
fd -t f 'AGENTS.md' . || echo "No AGENTS.md found"
echo -e "\n=== Checking for data directory ==="
fd -t d 'data' . || echo "No data directory found"Repository: vyos/mergify
Length of output: 255
🏁 Script executed:
#!/bin/bash
# Check AGENTS.md content around line 50
if [ -f "AGENTS.md" ]; then
echo "=== AGENTS.md around line 50 ==="
sed -n '45,55p' AGENTS.md
fiRepository: vyos/mergify
Length of output: 720
Remove or correct the data/github.md reference on line 50.
The referenced file data/github.md does not exist in the repository. Either add the file with verification details or remove the reference.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~50-~50: The official name of this software platform is spelled with a capital “H”.
Context: ...epository_selection: all(verified perdata/github.md). ## Rollback git revert` the of...
(GITHUB)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@AGENTS.md` at line 50, The AGENTS.md contains a broken reference
"data/github.md" (the string appears on line 50) which does not exist in the
repo; either remove that reference from AGENTS.md or replace it with the correct
existing verification file/path, or add a new file named "data/github.md"
containing the claimed verification details; update the AGENTS.md text to point
to the corrected file name or remove the parenthetical reference so the document
no longer links to a non-existent "data/github.md".
Adds
AGENTS.mdat the repo root plus.github/copilot-instructions.mdsymlink (compatibility with Copilot code review, which only reads the.github/copilot-instructions.mdpath).Part of the T8595 fleet rollout. Schema decision (AGENTS.md primary + symlink) is documented on T8595.
This repo was added to T8595 scope on 2026-05-09 alongside its sibling and the central Mergify repos for fleet uniformity.
🤖 Generated by robots