Skip to content

zed_agent: Pick rules file in order described in docs#52495

Merged
benbrandt merged 1 commit intozed-industries:mainfrom
halvko:fix/zed-agent-rule-picking-order
Mar 26, 2026
Merged

zed_agent: Pick rules file in order described in docs#52495
benbrandt merged 1 commit intozed-industries:mainfrom
halvko:fix/zed-agent-rule-picking-order

Conversation

@halvko
Copy link
Copy Markdown
Contributor

@halvko halvko commented Mar 26, 2026

Context

This makes zed-agent prioritize rules files in the same order as is described in the docs. My order of experience was

  • saw in my zed agent thread `Using project "CLAUDE.md" file.
  • went to settings to see if I can make it use AGENTS.md instead.
  • went to the docs where it specifies that AGENTS.md is be picked over CLAUDE.md.
  • went to source to see what went wrong

How to Review

I'm changing the order of filenames in an array - the only two places where the order matters is when picking which rules file to use. The last place it's used with an .iter().any().

Self-Review Checklist

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
    • If you want the behavior tested I can, but I think it's equally hard keeping docs and tests and docs and this codepath in sync.
  • Performance impact has been considered and is acceptable

Release Notes:

  • Fixed agent rules files are prioritized as described in docs

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 26, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, osyvokon and rtfeldman and removed request for a team March 26, 2026 13:35
Copy link
Copy Markdown
Member

@benbrandt benbrandt left a comment

Choose a reason for hiding this comment

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

Thanks!

@benbrandt benbrandt enabled auto-merge (squash) March 26, 2026 13:40
@zed-industries-bot
Copy link
Copy Markdown
Contributor

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against 9f0e91d

@benbrandt benbrandt merged commit 12bdc20 into zed-industries:main Mar 26, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants