Repository navigation
fix: resolve sibling skill links for instructions, prompts, and commands (#5531) - #5539
Conversation
…nds (microsoft#5531) Signed-off-by: Yshuro <yshuro1080@gmail.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved link-rewriting defects remain, and the invalid changelog fragment and missing test metadata block release assembly and the taxonomy check.
4 open issues
What changed in this PR
This PR addresses #5531 by extending the sibling-skill link resolution used by agents to instructions, prompts, and commands, so they can reference deployed skills instead of gitignored package sources.
Changes:
- Passes target, skill-selection, and deployment context into primitive link resolvers.
- Threads
skip_binthrough link planning to reflect executable deployment decisions. - Adds regression tests for selected and excluded skills, executable filtering, and a changelog fragment.
| File | Description |
|---|---|
tests/unit/integration/test_sibling_skill_links.py |
Adds sibling-skill link and skip_bin regression cases. |
src/apm_cli/integration/skill_preflight.py |
Applies the supplied skip_bin decision when projecting deployed files. |
src/apm_cli/integration/prompt_integrator.py |
Forwards skill deployment context to prompt link resolution. |
src/apm_cli/integration/instruction_integrator.py |
Initializes instruction link resolution with target and skill context. |
src/apm_cli/integration/command_integrator.py |
Initializes command link resolution with target and skill context. |
src/apm_cli/integration/base_integrator.py |
Forwards skip_bin to the shared skill-file projection. |
src/apm_cli/integration/agent_integrator.py |
Adds executable filtering context to agent link resolution. |
src/apm_cli/install/services.py |
Supplies skill-selection and executable context to all four primitive integrators. |
changelog.d/5531.bugfix.md |
Adds a release-note fragment describing the link-resolution change. |
Review effort: Balanced
…microsoft#5531) Signed-off-by: Yshuro <yshuro1080@gmail.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…esolver entry - drop the bin/ link threading (skip_bin): out of scope for microsoft#5531; the planned skill map keeps excluding bin/ as before - BaseIntegrator.init_target_link_resolver is the one entry the agent, instruction, prompt and command integrators use (no duplicated preamble) - lifecycle cells for instructions, prompts and commands: fresh-clone oracle, a non-deployed file and an other-harness sibling keep the apm_modules link, reinstall and audit --ci converge - docs: links from every primitive name the deployed sibling copy - lifecycle bug-ledger row for microsoft#5531 apm-spec-waiver: deployed-copy link rendering is not normed by any OpenAPM v0.1 requirement Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Thanks Sami (@Yshuro) for this fix, and for the Gemini command link rendering, which we kept. I pushed one commit on top of your two (your history is unchanged) to fit the approved scope for #5531:
Your |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Every primitive of a package asks for the same target's deployed-skill map; memoising it per live source plan (cleared when the plan is collected) walks the skill trees once per target, as agents alone did before, instead of once per primitive. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The cache can reuse destinations from a different target layout, while missing rendering inputs in overwrite preflight can falsely block reinstalls that should preserve user edits.
2 open issues
4 resolved since last review
Review effort: Balanced
| if _prim_name in ("agents", "instructions", "prompts", "commands"): | ||
| _call_kwargs["skill_pairing"] = skill_pairing | ||
| _call_kwargs["skill_targets"] = projection_targets |
| key = ( | ||
| target.name, | ||
| str(project_root), | ||
| skill_pairing, | ||
| tuple(profile.name for profile in skill_targets or ()), | ||
| ) |
62329d6
into
microsoft:main
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> # Conflicts: # docs/src/content/docs/producer/write-primitives.md # src/apm_cli/install/services.py # src/apm_cli/integration/base_integrator.py # src/apm_cli/integration/instruction_integrator.py # tests/fixtures/lifecycle_bug_ledger/bugs/5531.json # tests/integration/test_sibling_skill_agent_link_lifecycle.py
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- projected_resolve_links(deployed_links=True) renders the locked source with the deployed-sibling map of the locked plan (LockedSkillSources), using the link scope init_link_resolver records; no locked plan means no projection, so adoption keeps refusing. A ref bump that renames the linked sibling no longer refuses committed output on a fresh clone. - collision preflight caches each skills folder's resolver with its scope - cells: ref bump renaming a linked sibling (red-first); ref-bump mixed-form, unclaimed and unpinned trees refuse and keep their bytes - mixed-case lifecycle: every primitive links the deployed skill; a non-deployed file keeps the mixed-case apm_modules link for the stale-casing repair path (#5539 change; Integration never ran on it) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Closes #5531