fix: keep the Attractor expert prompt in its owning profile - #360
Merged
Merged
Conversation
The packaged attractor-expert could not start. Its profile declared
system_prompt_file: context/system-attractor-expert.md
and loop-agent resolves a RELATIVE system_prompt_file against ITS OWN
installed bundle root (parents[3] of its __init__.py, then an upward
ancestor walk) -- never against the bundle that declared the value.
This agent's session.orchestrator.source deliberately mounts loop-agent
from the SEPARATE amplifier-bundle-dot-runner package (that mount is what
stops a pipeline parent's loop-pipeline from recursing into the child),
so the anchor is the dot-runner install, where an Attractor-owned
context/ asset does not exist. Measured against the real installed
resolver:
FileNotFoundError: system_prompt_file 'context/system-attractor-expert.md'
(relative) could not be resolved to an existing file. Expected it at the
bundle root: <dot-runner-root>/context/system-attractor-expert.md
The repair uses the channel loop-agent already supports at HIGHER
precedence (explicit system_prompt > explicit system_prompt_file >
provider default > fail-loud): the persona is carried INLINE as a YAML
literal block, so there is no path left to anchor wrongly.
The persona is MOVED, not rewritten -- spliced programmatically, never
re-typed. The parsed value is byte-identical to the retired asset:
sha256 07e24526081f0b76888e984895f44d753b381f4cf1de66e4f2c4c8c01404b487,
12120 bytes, 204 lines. The side-file is retired rather than kept
beside it: two independently-maintained Layer-1 owners is the drift
class this repo names in docs/designs/RECURRING-BUG-CLASSES.md.
Preserved deliberately: the non-coding consultant persona (a provider
coding base here is explicitly rejected -- see
docs/designs/layer-1-profile-owned-system-prompt.md, which records this
as the ONE agent keeping a persona override), the separate Markdown
expert body, and the explicit git+ loop-agent mount.
Scope: this is packaging restoration, not an engine or nlspec change.
No Dot Runner / Foundation / Core edit, no new resolver, no namespace
lookup, no provider pin. StrongDM coding-agent-loop-spec 6.1/6.2 puts
system instructions in the profile/backend layer and does not prescribe
wording; attractor-spec 1.4 leaves backend internals to implementors.
Decision-matrix tier: toward-spec (restores the profile-owned Layer-1
the spec assigns to the backend layer).
Verification -- parse-level, and honest about its ceiling:
* RED captured against the REAL installed loop-agent resolver
(FileNotFoundError, above), and the 7 new guards proven RED on the
pre-fix declaration (5 failed, 2 invariants held) before the fix.
* Root guards: 275 passed, 2 skipped (both pre-existing namespaced-ref
skips in test_context_include_paths.py), keys unset.
* tests/test_orchestrator_source_pin_guard.py: 8 passed, 0 skipped.
* These are PARSE-level guards. Parsing was never the broken thing,
so they do NOT prove the packaged expert now SPAWNS. That needs a
real packaged public-path run; the DTU probe is handed to the
manager with this candidate. "The test passes" is not "it works".
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
The packaged Attractor expert can now start from outside its repository. Previously its relative
system_prompt_filewas looked up under the separate Dot Runner package and raisedFileNotFoundErrorbefore its first model request.Move the expert's existing Layer-1 persona into the already-supported literal
system_promptfield in its owning agent profile. Retire the separate copy so there remains one owner of that text.loop-agentmount are unchanged.Spec and vision fit
StrongDM's coding-agent-loop spec §§6.1–6.2 assigns Layer-1 instructions to the provider/profile construction and specifies required topics rather than complete wording. The Attractor spec §1.4 preserves the backend boundary. This is a packaging repair inside that boundary, not a change to graph semantics.
The repository's vision and profile-owned Layer-1 design retain the expert's non-coding consultant persona. This change preserves that text exactly through an existing public configuration channel. Frozen and historical documents were not rewritten.
Verification
The diff has four paths: the agent profile, its former asset, a directly affected behavior comment, and new regression tests. Raw session output and operational paths remain outside source control.
Verification checklist