-
Notifications
You must be signed in to change notification settings - Fork 225
feat(install): -g should compile instructions into user-scope root context file #1485
Copy link
Copy link
Open
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).area/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.Installers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/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/bugSomething does not work as documented.Something does not work as documented.
Milestone
Metadata
Metadata
Assignees
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).area/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.Installers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/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/bugSomething does not work as documented.Something does not work as documented.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
In Progress
Summary
apm install -g <pkg>deploys per-target primitives into user-scope directories (~/.claude/skills/, ...) and writes metadata under~/.apm/. Forinstructionsthis is not enough: the harness loads them only through a root context file (CLAUDE.md,AGENTS.md,GEMINI.md) thatapm compilegenerates, andapm compilehas no user-scope mode.Net effect:
apm install -gsilently installs instructions that no harness ever picks up.Repro
Real-world example:
Netcracker/qubership-ai-packages/agent-packages/apm-authoringships both.apm/skills/and.apm/instructions/.apm compilehas no--global/-gflag (seesrc/apm_cli/commands/compile/cli.py). The obvious workaroundcd ~/.apm && apm compile --target claudewrites to~/.apm/CLAUDE.md, which Claude Code does not read.Proposal
apm install -gfinishes and at least one installed package carriesinstructions, run the compile pipeline withscope=USERso it reads~/.apm/apm_modules/and writes into each active target's user-scope root context path (~/.claude/CLAUDE.md,~/.codex/AGENTS.md,~/.gemini/GEMINI.md, ...).--global/-gflag toapm compile.CLAUDE_CONFIG_DIRand the equivalent env vars thatTargetProfile.for_scope(user_scope=True)already handles.<!-- Generated by APM CLI from .apm/ primitives -->marker rule so a hand-authored root context file is never overwritten without consent.Packages that contain only
skills,agents,commands,hooks, or MCP already work correctly under-g-- compile is not on the path for those primitives.