Skip to content

Replace the AGENTS.md and .agents symlinks with regular agent files - #405

Merged
hathach merged 1 commit into
masterfrom
no-symlinks
Nov 22, 2026
Merged

hathach merged 1 commit into
masterfrom
no-symlinks

Conversation

@hathach

@hathach hathach commented Nov 22, 2026

Copy link
Copy Markdown
Member

Problem

The repository tracks two symlinks added with the agent contracts: AGENTS.md -> CLAUDE.md and .agents ->
.claude. A Windows clone without symlink support checks them out as plain files holding the target path, so Codex and
Copilot lose the instructions there. The Adafruit Arduino libraries dropped the same links because arduino-lint rule
LS005 keeps a release holding one out of the Library Manager (adafruit/Adafruit_SPIFlash#202), and agentrc now
prescribes the link-free layout for Arduino libraries and cores (hathach/agentrc#571).

Solution

The layout adafruit/Adafruit_SPIFlash#203 and adafruit/Adafruit_TinyUSB_Arduino#635 adopted:

  • AGENTS.md is a regular file holding the instructions, unchanged, plus an "Agent files" section; CLAUDE.md imports
    it (@AGENTS.md); .agents is removed. Skills stay in .claude/skills/.
  • A no-symlinks pre-commit hook, copied unchanged from SPIFlash, fails on any symlink in the index; CI's pre-commit
    job runs it.

pre-commit run --all-files passes (clang-format, no-symlinks, agent contract tests); check_build.py selects nothing
to build.

A Windows clone without symlink support checks the links out as plain files, and the Adafruit Arduino libraries dropped the same links because arduino-lint LS005 keeps a release holding one out of the Library Manager (adafruit/Adafruit_SPIFlash#202).
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The repository adds centralized agent instructions in AGENTS.md, updates CLAUDE.md to refer to them, removes the .agents file, and adds a pre-commit check that fails when tracked symlinks exist.

Changes: Repository agent guidance

Layer / File(s) Summary
Centralize agent guidance and check symlinks
AGENTS.md, CLAUDE.md, .agents, .pre-commit-config.yaml
AGENTS.md contains repository-wide build, hardware-validation, code, and PR guidance. CLAUDE.md points to AGENTS.md for shared instructions. The .agents file is removed. The pre-commit configuration adds an always-running check that lists tracked symlinks and fails if any are found.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • adafruit/ArduinoCore-samd#402: Changes the same agent instruction files and pre-commit setup, but establishes a different layout for the agent files.

Suggested reviewers: greptile-apps

Merge Risk: Minimal · up to 5ffca

This change moves agent instructions into regular files and adds a check that blocks tracked symlinks. It does not alter library behavior, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the AGENTS.md and .agents symlinks are replaced with regular agent files. The raw summary confirms this: .agents is deleted, AGENTS.md becomes a regular file, and CLAU…
Description check Passed The description explains the problem (symlinks checked out as plain files on Windows, plus arduino-lint LS005 and agentrc guidance) and the solution (regular AGENTS.md, CLAUDE.md importing it via @AGE…
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.
Full details: Title check

Explanation

The title names the main change: the AGENTS.md and .agents symlinks are replaced with regular agent files. The raw summary confirms this: .agents is deleted, AGENTS.md becomes a regular file, and CLAUDE.md imports it. The title is specific and matches the changeset.

Full details: Description check

Explanation

The description explains the problem (symlinks checked out as plain files on Windows, plus arduino-lint LS005 and agentrc guidance) and the solution (regular AGENTS.md, CLAUDE.md importing it via @AGENTS.md, removal of .agents, and a no-symlinks pre-commit hook). This matches the raw summary's file changes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b73ae8c and 5ffca67.

Files selected for processing: 5

  • .agents
  • .pre-commit-config.yaml
  • AGENTS.md
  • AGENTS.md
  • CLAUDE.md
Files with no reviewable changes: 1

  • .agents

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge.

Summary

Replaces the agent symlinks with regular files and adds a check against tracked symlinks.

  • Agents share regular instructions, and pre-commit rejects repository symlinks.

Intentional change acknowledged by hathach: .agents is removed; agents that do not discover .claude/skills/ follow the paths in AGENTS.md.

No actionable issues found. This review used source inspection; no tests were run.

Reviews (1) · Last reviewed commit: "Replace the AGENTS.md and .agents symlin..." · Reviewed by Greptile

@hathach
hathach merged commit 033985b into master Nov 22, 2026
28 checks passed
@hathach
hathach deleted the no-symlinks branch November 22, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant