-
Notifications
You must be signed in to change notification settings - Fork 236
Suggestion: persist install-time --target in apm.yml so bare apm update works #1743
Copy link
Copy link
Open
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).priority/lowAccepted but not time-sensitiveAccepted but not time-sensitivestatus/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.New capability, new flag, new primitive.
Metadata
Metadata
Assignees
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).priority/lowAccepted but not time-sensitiveAccepted but not time-sensitivestatus/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.New capability, new flag, new primitive.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Todo
Summary
When we run
apm install <package> --target <harnesses>, the chosen targets are not written into the auto-generatedapm.yml. Because of that,apm updatecurrently asks us to pass the same--targetflag again.It would be more convenient if
apm updatecould simply refresh what was already installed, without having to remember and re-type the target list from the initial install.Motivation
--targetfeels natural—we are choosing which agent harnesses should receive primitives.--targeteach time adds a small but recurring step, and it is easy to mismatch the value used at install time.APM already documents a target resolution chain (
--target>apm.ymltargets:> auto-detect > fallback). It looks like the missing piece is persistingtargets:intoapm.ymlwhen--targetis used duringapm install.Docs reference: Install packages — Where files land
Current behavior
Run install with an explicit target:
apm.ymlis auto-created with dependencies, but without atargets:field.Later, run update without
--target:Update may fail or ask for target disambiguation (e.g.
Multiple harnesses detected), so we need to repeat the same--targetvalue from install.Suggested behavior
On
apm install: when--targetis passed, persist the resolved target list intoapm.yml:This would be a one-time manifest update at install time, alongside the existing dependency entries.
On
apm update: readtargets:fromapm.ymland deploy to those harnesses.apm updatewould not need to modifyapm.yml—onlyapm.lock.yaml(and deployed primitives) would change, which matches how we think about update vs install.After that, bare
apm updatewould be enough for the common refresh workflow.--targeton update could still overrideapm.ymlfor one-off runs, consistent with the documented resolution priority.Scenario overview
apm install <pkg> --target a,btargets:intoapm.ymlapm updatewhentargets:is already inapm.yml--targetflag neededapm updateapm.lock.yamland redeploy; leaveapm.ymlunchangedapm update --target xWorkaround (today)
We can manually add
targets:toapm.ymlafter the first install, or start from a template manifest that already includestargets:. That works becauseapm.ymltargets:is already honored by the resolution chain—it is just not set automatically by the recommended one-liner install flow.Environment
0.19.0cursor,copilot,claude) from a private Git host, then periodically runningapm updatein the same project directoryReferences
apm update --help(--target>apm.ymltargets:> auto-detect)