Fix explicit relative references in nested instruction files - #414
Merged
Brian Krabach (bkrabach) merged 3 commits intoSep 25, 2026
Merged
Conversation
This was referenced Sep 25, 2026
Brian Krabach (bkrabach)
marked this pull request as ready for review
September 25, 2026 12:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An instruction file such as
rules/AGENTS.mdcontaining@./tasks.mdcurrently loads the workspace'stasks.md, even though the loader passes the referring directory recursively. Resolve explicit./and../references beside their referring file. Keep bare@AGENTS.mdworkspace-relative so Anchors continues to load the current project's instructions; preserve namespaces, home paths, missing-file behavior and legacy resolver implementations.Adds an optional per-call resolver capability without mutating shared resolver state or bypassing subclass policy. Tracks visited paths separately from content deduplication so identical global/project instruction files can each load their distinct relative task rules.
Validation: 188 tests passed across mention expansion, real prompt factories, bundle preparation and subprocess behavior. Five new checks fail against the unmodified installed Foundation. The generic instruction fixture verifies rule delivery across repeated turns, refreshed factories, two bundle namespaces, edits and removal; it makes no model requests and does not access personal files. Ruff and diff checks passed.
Class-wide review covered current Amplifier MODULES.md, local inventories, Microsoft code search and known community sources. The equivalent amplifier-lib loader is being patched in parallel; CLI/Unified require a small optional-capability adapter. Community Rust/Lakehouse implementations and the runtime bounding wrapper have separate compatibility gaps recorded for follow-up.
Bundle-declared
context:files now pass through the same recursive loader. Tests cover that entry point, filenames containing spaces, edits and fresh/resumed prompt factories. Raw file-tool results and attachments remain literal content. All production behavior is generic; no filename is special-cased.