fix(anchors): resolve workspace agents from session cwd - #384
Merged
Merged
Conversation
Ensure the anchors bundle loads the optional workspace AGENTS.md relative to the session cwd, with regression coverage for nested self-references and missing files. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Raise the pinned system prompt budget by 12 characters for the required cwd AGENTS rule and update the census saving from 600 to 588 characters. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
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.
Summary
@AGENTS.mdreference to the anchors system context.The Foundation bundle's cwd-only behavior is deliberately separate from the CLI's global/project
.amplifierreference policy. The related CLI PR is microsoft/amplifier-app-cli#332, but it is not a dependency of this change.Why
@AGENTS.mdmust resolve relative to the session working directory used to build the prompt, not the process working directory or the anchors bundle directory. The tests pin those boundaries while preserving self-reference de-duplication and optional-file behavior. The budget update records the required rule's measured cost rather than compressing unrelated prompt text.Verification
uv run pytest tests/test_lean_head_guardrail.py -q --tb=short -rA— 15 passed.uv sync --extra grpc-adapter— passed.uv run pytest tests/ -q --tb=short -rA— 1,928 passed, 4 skipped.git diff --check— passed.Prior combined DTU evidence, not rerun for this narrower PR: 23/23 provider-bound assertions using a deterministic provider and real CLI fresh/run --resume flows, covering minimal context/orchestrator, lifecycle hook, and partial-bundle behavior. No live vendor was tested; this evidence is not presented as live-provider validation.
Scope
bundles/anchors/context/system.md— trailing@AGENTS.mdmention only.tests/test_instruction_mentions_lead_context.py— cwd-specific coverage.tests/test_lean_head_guardrail.pyanddocs/lanes/zc6t-lean-head-ship/DONE-NOTE.md— required +12-character budget update and 588-character current saving..amplifierpolicy, dependency, lockfile, or unrelated prompt prose changes.Breaking changes
None intended.
Observations
None arose.