Skip to content
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

feat(agent): remind the agent about unread AGENTS.md files - #50

Merged
YaseenHQ merged 1 commit into
mainfrom
feat/agents-md-reminder
Aug 13, 2026
Merged

YaseenHQ merged 1 commit into
mainfrom
feat/agents-md-reminder

Conversation

@YaseenHQ

Copy link
Copy Markdown
Owner

Related Issue

No linked issue.

Problem

The instruction hierarchy is loaded once, and only along the project-root to cwd chain. A tool that reaches into a sibling directory therefore works there without ever seeing that directory's AGENTS.md — the rules exist and are silently ignored.

What changed

Hook onDidExecuteTool: when a tool touches a directory whose agent file was not part of the injected instructions, append a reminder naming it to that tool's result.

  • Read/Edit/Write/ReadMediaFile contribute their path; Glob/Grep their search root. Anything ambiguous contributes nothing rather than guessing.
  • Probing walks project root to the touched directory with the same candidate names as the init-time load, so an already-injected file is never suggested.
  • Each file is claimed before the reminder is attached, so two tools touching the same new directory in one step produce one reminder, not two.
  • Failed results are skipped: a vetoed duplicate carries a placeholder that is swapped later, so attaching there would discard the reminder while the file was already counted as suggested.
  • Blank files are claimed but not suggested, so they are not re-read on every touch.

Off by default — it adds a filesystem probe per newly touched directory. Enable under Feature controls or ECHADRON_EXPERIMENTAL_AGENTS_MD_REMINDER=1.

Testing

Seven cases: suggests an uncovered file, never suggests an injected one, suggests once per file, ignores but claims blank files, silent when the control is off, leaves failed results alone and keeps the file eligible, and per-tool argument extraction. Full suite 16,970 pass; lint and typecheck clean.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Added a release changeset with pnpm changeset, or this PR needs no changeset.
  • Updated user-facing documentation, or this PR needs no documentation change.

The instruction hierarchy loads once and only along the project-root to
cwd chain, so a tool that reaches into a sibling directory operates there
without ever seeing that directory's AGENTS.md.

Hook onDidExecuteTool: when a tool touches a directory whose agent file
was not injected, append a reminder naming it to that tool's result.
Files are claimed before the reminder is attached, so two tools touching
the same new directory in one step produce one reminder; failed results
are skipped so a vetoed duplicate cannot swallow it. Off by default.
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@YaseenHQ, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 17 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d64fa5c-5490-41c1-9687-9485e6fef366

📥 Commits

Reviewing files that changed from the base of the PR and between 63ba96d and bbac343.

📒 Files selected for processing (6)
  • .changeset/agents-md-reminder.md
  • packages/agent-core-v2/src/agent/agentsMdReminder/agentsMdReminder.ts
  • packages/agent-core-v2/src/agent/agentsMdReminder/agentsMdReminderService.ts
  • packages/agent-core-v2/src/agent/agentsMdReminder/flag.ts
  • packages/agent-core-v2/src/agent/agentsMdReminder/touchedPaths.ts
  • packages/agent-core-v2/test/agent/agentsMdReminder/agentsMdReminder.test.ts

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

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

@YaseenHQ
YaseenHQ merged commit de0c08c into main Aug 13, 2026
15 checks passed
@YaseenHQ
YaseenHQ deleted the feat/agents-md-reminder branch August 13, 2026 20:21
@github-actions github-actions Bot mentioned this pull request Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant