Skip to content

general: T8595: add AGENTS.md#1

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

general: T8595: add AGENTS.md#1
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
    • Updated configuration guidelines and documentation to reference centralized baseline instructions.
    • Added comprehensive documentation outlining project structure, configuration inheritance rules, operational conventions, and deployment processes for consistency across repositories.

Walkthrough

This PR establishes the vyos/coderabbit central baseline configuration repository. AGENTS.md documents the org-wide CodeRabbit baseline for all vyos/* repositories, covering the inheritance model, per-repo override conventions, schema pinning, operational behavior, and rollback procedures. The copilot-instructions.md file is updated to reference this baseline documentation.

Changes

CodeRabbit Baseline Documentation

Layer / File(s) Summary
Baseline Configuration Documentation
AGENTS.md
Adds complete baseline documentation for vyos/coderabbit, including org-wide configuration distribution model, inheritance/deep-merge requirements for per-repo overrides, schema pinning conventions, commit/PR title formats, default branch guidance, cross-repo context rules, and rollback procedures.
Copilot Instructions Reference
.github/copilot-instructions.md
Adds single-line reference to ../AGENTS.md to direct agents to the baseline configuration.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title accurately summarizes the primary change: adding AGENTS.md documentation as part of task T8595.
Description check ✅ Passed Description clearly explains the changeset: AGENTS.md creation plus copilot-instructions.md symlink for Copilot compatibility, with task context.
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: 3

🤖 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 @.github/copilot-instructions.md:
- Line 1: The file .github/copilot-instructions.md is a plain text file
containing "../AGENTS.md" but should be a symlink to the actual AGENTS.md;
remove the plain file and replace it with a symbolic link named
.github/copilot-instructions.md that points to ../AGENTS.md (ensure ../AGENTS.md
exists in the repo), then git add the symlink so the repository stores a symlink
rather than literal text.

In `@AGENTS.md`:
- Line 21: The doc incorrectly states the central baseline `.coderabbit.yaml`
pins `inheritance: true`; update AGENTS.md to remove or rephrase that claim so
it no longer implies the baseline has a parent — clarify that only per-repo
override files should set `inheritance: true` to deep-merge with the central
baseline and that the central `.coderabbit.yaml` should not set `inheritance:
true`.
- Line 27: The sentence currently reads "Every per-repo override file MUST also
pin `inheritance: true`" which wrongly implies the central baseline has that
flag; edit the sentence to remove the word "also" so it reads "Every per-repo
override file MUST pin `inheritance: true`", ensuring the documentation clearly
states that only per-repo overrides must set `inheritance: true`.
🪄 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: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 727d2b96-d653-418a-a98d-fa5a38d976ed

📥 Commits

Reviewing files that changed from the base of the PR and between a6cc754 and 47ee113.

📒 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/coderabbit

Timestamp: 2026-05-09T19:14:36.149Z
Learning: Design agents to be task-focused with clear, singular responsibilities
Learnt from: CR
Repo: vyos/coderabbit

Timestamp: 2026-05-09T19:14:36.149Z
Learning: Implement proper error handling and recovery mechanisms in agent workflows
Learnt from: CR
Repo: vyos/coderabbit

Timestamp: 2026-05-09T19:14:36.149Z
Learning: Document agent behavior, parameters, and expected outputs clearly
Learnt from: CR
Repo: vyos/coderabbit

Timestamp: 2026-05-09T19:14:36.149Z
Learning: Use configuration files for agent parameters rather than hardcoding values
Learnt from: CR
Repo: vyos/coderabbit

Timestamp: 2026-05-09T19:14:36.149Z
Learning: Ensure agents can be tested independently with mocked dependencies
Learnt from: CR
Repo: vyos/coderabbit

Timestamp: 2026-05-09T19:14:36.149Z
Learning: Maintain backward compatibility when updating agent interfaces
Learnt from: CR
Repo: vyos/coderabbit

Timestamp: 2026-05-09T19:14:42.289Z
Learning: Commit/PR title format must follow `component: T12345: description` pattern with Phorge task ID at https://vyos.dev
Learnt from: CR
Repo: vyos/coderabbit

Timestamp: 2026-05-09T19:14:42.289Z
Learning: Use deep-merge inheritance model where objects are deep-merged, arrays are unioned, and scalars favor child values in `.coderabbit.yaml` configuration
Learnt from: CR
Repo: vyos/coderabbit

Timestamp: 2026-05-09T19:14:42.289Z
Learning: Default branch for this repository must be `production`
🪛 LanguageTool
AGENTS.md

[grammar] ~37-~37: Ensure spelling is correct
Context: ...rmat: component: T12345: description. Phorge task ID at https://vyos.dev mandatory. ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔍 Remote MCP Context7

Summary of Relevant Context for PR Review

Based on CodeRabbit's official documentation, here is the relevant context for reviewing this PR:

Key Documentation Standards:

Configuration Inheritance Mechanism:
The PR document correctly states that per-repository overrides must include inheritance: true to enable deep-merging behavior. According to CodeRabbit documentation, this inheritance model works as follows:

  • Scalar values are overridden by child configurations
  • Objects undergo deep merge where child properties override parent properties at each nesting level
  • Arrays append unique parent items after child items, deduplicated by stable keys like path, label, name, id, or key

Central Configuration Purpose:
The vyos/coderabbit repository serves as a central configuration repository. Per CodeRabbit standards, this approach:

  • Maintains organization-wide defaults in a dedicated central repository
  • Automatically applies settings to repositories without their own configuration
  • Ensures organization-wide consistency and simplifies management
  • Follows a strict priority order where repository-specific .coderabbit.yaml overrides the central repository's configuration

Symlink Strategy Validation:
The PR includes .github/copilot-instructions.md as a symlink to AGENTS.md. This aligns with CodeRabbit's configuration management approach, using YAML files for hierarchical configuration.

Review Considerations:

  1. Inheritance Flag Requirement: The PR's emphasis on requiring inheritance: true in per-repository overrides is correctly aligned with CodeRabbit's documented merge behavior
  2. Array Deduplication Rules: Any path_instructions arrays in child repositories would be properly merged with parent arrays using the documented child-first deduplication strategy
  3. Central Repository Setup: The PR's documentation of the repository role (single .coderabbit.yaml as the baseline) matches CodeRabbit's central configuration setup requirements
🔀 Multi-repo context ansible/ansible

Linked repositories findings

ansible/ansible

  • Repository already contains an AGENTS.md at the repo root. [::ansible/ansible::AGENTS.md]
  • CLAUDE.md references AGENTS.md. [::ansible/ansible::CLAUDE.md:1]
  • Many files reference "vyos" (modules, runtime redirects, tests, inventory templates), indicating this repo consumes vyos-related configuration/plugins and may be affected by documentation/config conventions for vyos baselines. Examples:
    • test/sanity/package-data.py lists 'AGENTS.md'. [::ansible/ansible::test/sanity/code-smell/package-data.py:36]
    • Multiple runtime/config redirects to vyos plugins and collections in lib/ansible/config/{base.yml,ansible_builtin_runtime.yml} (numerous lines). [::ansible/ansible::lib/ansible/config/ansible_builtin_runtime.yml]
    • Test/integration targets reference vyos modules and action plugins. [::ansible/ansible::test/integration/targets/module_defaults/test_defaults.yml]
  • .github/copilot-instructions.md is not present in this repository (no symlink to create). [::ansible/ansible::.github]

Conclusion: AGENTS.md already exists and is referenced in this repo; the PR's addition of AGENTS.md + a .github/copilot-instructions.md symlink in vyos/coderabbit is relevant (ansible uses AGENTS.md and vyos artifacts), but ansible/ansible itself does not need a copilot-instructions.md symlink. Reviewers should note existing AGENTS.md usage and vyos references when assessing cross-repo fleet rollout.

🔇 Additional comments (4)
AGENTS.md (4)

1-8: LGTM: Clear central configuration purpose.

Correctly documents CodeRabbit's central-configuration feature and public transparency rationale.


42-47: LGTM: Cross-repo context documented.

Sibling repo, Phorge task references, and overlay catalog pointer are clear. Consistent with linked repos findings (ansible/ansible AGENTS.md usage).


48-50: LGTM: Clear rollback procedure.

git revert or {} fallback strategy is correct and practical.


39-39: Schema is correctly pinned. The .coderabbit.yaml file at repository root has the required YAML language server schema directive on line 1, matching the convention documented in AGENTS.md line 39.

@@ -0,0 +1 @@
../AGENTS.md No newline at end of file
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 | 🔴 Critical | ⚡ Quick win

File must be a symlink, not text content.

PR description states this should be "a .github/copilot-instructions.md symlink" but the file appears to be regular text containing ../AGENTS.md rather than an actual symlink. Git and GitHub support symlinks natively.

Create as actual symlink:

ln -s ../AGENTS.md .github/copilot-instructions.md
git add .github/copilot-instructions.md

Tools reading .github/copilot-instructions.md expect either the target content (via symlink resolution) or standalone instructions, not a path string.

🤖 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 @.github/copilot-instructions.md at line 1, The file
.github/copilot-instructions.md is a plain text file containing "../AGENTS.md"
but should be a symlink to the actual AGENTS.md; remove the plain file and
replace it with a symbolic link named .github/copilot-instructions.md that
points to ../AGENTS.md (ensure ../AGENTS.md exists in the repo), then git add
the symlink so the repository stores a symlink rather than literal text.

Comment thread AGENTS.md

## Repository layout

- `.coderabbit.yaml` — central baseline. Pins `inheritance: true` so per-repo overrides deep-merge instead of fully replacing.
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 | 🟠 Major | ⚡ Quick win

Incorrect: central baseline should NOT pin inheritance: true.

Line 21 states the central baseline pins inheritance: true, but the central config has no parent to inherit from—it IS the baseline. Only per-repo override files need inheritance: true to deep-merge with this central baseline (correctly stated at line 27).

Remove or rephrase line 21 to avoid contradiction:

-- `.coderabbit.yaml` — central baseline. Pins `inheritance: true` so per-repo overrides deep-merge instead of fully replacing.
+- `.coderabbit.yaml` — central baseline. Per-repo overrides must pin `inheritance: true` to deep-merge instead of fully replacing.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `.coderabbit.yaml` — central baseline. Pins `inheritance: true` so per-repo overrides deep-merge instead of fully replacing.
- `.coderabbit.yaml` — central baseline. Per-repo overrides must pin `inheritance: true` to deep-merge instead of fully replacing.
🤖 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 21, The doc incorrectly states the central baseline
`.coderabbit.yaml` pins `inheritance: true`; update AGENTS.md to remove or
rephrase that claim so it no longer implies the baseline has a parent — clarify
that only per-repo override files should set `inheritance: true` to deep-merge
with the central baseline and that the central `.coderabbit.yaml` should not set
`inheritance: true`.

Comment thread AGENTS.md

## Inheritance model (load-bearing)

Every per-repo override file MUST also pin `inheritance: true`. Without it, the override fully replaces this baseline. With it, CodeRabbit deep-merges per the [configuration-inheritance docs](https://docs.coderabbit.ai/configuration/configuration-inheritance):
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

Remove "also" to fix inheritance documentation.

The word "also" incorrectly implies the central baseline has inheritance: true (echoing line 21's error). Only per-repo overrides need this flag.

-Every per-repo override file MUST also pin `inheritance: true`. Without it, the override fully replaces this baseline. With it, CodeRabbit deep-merges per the [configuration-inheritance docs](https://docs.coderabbit.ai/configuration/configuration-inheritance):
+Every per-repo override file MUST pin `inheritance: true`. Without it, the override fully replaces this baseline. With it, CodeRabbit deep-merges per the [configuration-inheritance docs](https://docs.coderabbit.ai/configuration/configuration-inheritance):
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Every per-repo override file MUST also pin `inheritance: true`. Without it, the override fully replaces this baseline. With it, CodeRabbit deep-merges per the [configuration-inheritance docs](https://docs.coderabbit.ai/configuration/configuration-inheritance):
Every per-repo override file MUST pin `inheritance: true`. Without it, the override fully replaces this baseline. With it, CodeRabbit deep-merges per the [configuration-inheritance docs](https://docs.coderabbit.ai/configuration/configuration-inheritance):
🤖 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 27, The sentence currently reads "Every per-repo override
file MUST also pin `inheritance: true`" which wrongly implies the central
baseline has that flag; edit the sentence to remove the word "also" so it reads
"Every per-repo override file MUST pin `inheritance: true`", ensuring the
documentation clearly states that only per-repo overrides must set `inheritance:
true`.

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