Skip to content

general: T8595: add AGENTS.md#2

Open
andamasov wants to merge 1 commit into
productionfrom
T8595-add-agents-md
Open

general: T8595: add AGENTS.md#2
andamasov wants to merge 1 commit into
productionfrom
T8595-add-agents-md

Conversation

@andamasov
Copy link
Copy Markdown
Member

Adds AGENTS.md at the repo root plus .github/copilot-instructions.md symlink (compatibility with Copilot code review, which only reads the .github/copilot-instructions.md path).

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

@andamasov andamasov requested a review from dmbaturin May 9, 2026 19:14
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Introduced centralized Mergify configuration baseline documentation. Covers configuration conventions including required commit/PR title formats and default branch settings, local validation procedures via the Mergify CLI, repository layout structure expectations, cross-repository references, application installation scope, inheritance patterns for configuration files, and rollback strategies to maintain consistency across all repositories.

Walkthrough

This PR introduces AGENTS.md as documentation for the vyos/mergify repository, establishing it as a centralized Mergify YAML configuration baseline for the vyos/* organization. It defines inheritance patterns via extends: vyos/mergify, local validation workflow, operational conventions, and rollback procedures. The copilot-instructions.md file is updated to reference this new documentation.

Changes

Mergify Configuration Baseline Documentation

Layer / File(s) Summary
Document Purpose & Scope
AGENTS.md lines 1–11
Establishes vyos/mergify as org-wide Mergify YAML baseline; explains extends: inheritance vs standalone; records 2026-05-09 rename.
Repository Structure & Layout
AGENTS.md lines 13–29
Defines repo composition: central .mergify.yml, README.md, and CODEOWNERS.
Local Validation Workflow
AGENTS.md lines 18–23
Specifies no build/test/runtime; documents local validation via Mergify CLI config-validate.
Consumer Configuration Pattern
AGENTS.md lines 30–39
Defines per-repo override pattern: extends: vyos/mergify with restatement of divergent keys only.
Operational Conventions
AGENTS.md lines 40–45
Documents commit/PR title format, default branch (production), and commands_restrictions with unqueuedequeue update.
Cross-repo Context & Authority
AGENTS.md lines 46–51
Records sibling repo references, authority tracking links, and GitHub App scope.
Rollback & Inheritance Safety
AGENTS.md lines 52–54
Provides git revert rollback path; clarifies inheritance behavior for consumer configs post-rollback.
Copilot Integration
.github/copilot-instructions.md line 1
References ../AGENTS.md for AI-assisted workflow integration.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'general: T8595: add AGENTS.md' accurately describes the primary change: adding AGENTS.md documentation file as part of T8595 task.
Description check ✅ Passed The description directly explains the changeset: adds AGENTS.md at repo root and creates .github/copilot-instructions.md symlink, with context about T8595 fleet rollout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch T8595-add-agents-md
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch T8595-add-agents-md

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between e74cbad and 178631e.

📒 Files selected for processing (2)
  • .github/copilot-instructions.md
  • AGENTS.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/mergify pattern documented aligns with Mergify's native extends feature for sharing and overriding configuration across repositories.
  • Dual Access Pattern: Using a symlink ensures compatibility with both GitHub Copilot's .github/copilot-instructions.md path 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/mergify inheritance 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 win

No issues found. The claim that unqueue is obsolete and replaced by dequeue is correct per Mergify documentation. Line 44 of AGENTS.md accurately reflects the current command set.

.github/copilot-instructions.md (1)

1-1: ⚡ Quick win

No issues found. The file .github/copilot-instructions.md is 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.

Comment thread AGENTS.md

- 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`).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 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
fi

Repository: 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant