Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Removes the HTML comment from generated Copilot files and enables Cursor provider to automatically set retrieval-strategy: always when alwaysApply: true in source rules.

Changes

  • CopilotProvider: Removed <!-- Generated by agent-rules. Do not edit this file manually. --> from output
  • CursorProvider: Auto-inherit retrieval-strategy: always when alwaysApply: true unless explicitly overridden
  • Tests: Added 4 test cases validating inheritance behavior and precedence rules

Example

Before, source files required both properties:

---
description: My rule
alwaysApply: true
cursor:
  retrieval-strategy: always
---

Now, only alwaysApply is needed:

---
description: My rule
alwaysApply: true
---

The Cursor provider automatically generates retrieval-strategy: always in the output. Explicit cursor.retrieval-strategy values still take precedence when specified.

Original prompt

I need to remove the <!-- Generated by agent-rules. Do not edit this file manually. --> from generated rules. I also need to ensure that the alwaysApply in the frontmatter of the source-files is correctly inherited for respective special rules, e.g. cursor: retrieval-strategy: always, so that a user can avoid defining both and only using alwaysApply


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 6, 2025 12:53
…rsor provider

Co-authored-by: tom-bywild <102795185+tom-bywild@users.noreply.github.com>
Co-authored-by: tom-bywild <102795185+tom-bywild@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove generated comment and ensure alwaysApply inheritance Remove generated comment and auto-inherit retrieval-strategy from alwaysApply Nov 6, 2025
Copilot AI requested a review from tom-bywild November 6, 2025 13:00
@tom-bywild tom-bywild marked this pull request as ready for review November 6, 2025 21:17
@tom-bywild tom-bywild merged commit 134da86 into main Nov 6, 2025
@tom-bywild tom-bywild deleted the copilot/remove-generated-comment-and-inherit branch November 6, 2025 21:18
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.

2 participants