Skip to content

[FEATURE] Support package namespaces #739

Closed

Description

Is your feature request related to a problem? Please describe.
As an example, I have a project that looks something like this

  • project, with skills
  • apm dependency 1
  • apm dependency 2
    • transitive dependency 1
    • transitive dependency 2

After apm install, the skills folder flattens everything, e.g.,

  • project skills
  • apm dependency 1
  • apm dependency 2
  • transitive dependecy 1
  • transitive dependency 2

This is of course not APM's fault, it's the design of the .github folder. However, it leads to two distinct problems:

  1. It quickly becomes very difficult to understand where various skills came from, particularly differentiating project skills from installed dep skills
  2. Whilst developing a project, it's easy for the agent to update the installed skills because they are part of the "codebase" rather than a gitignored dep

Describe the solution you'd like
Using namespaces could at least help solve problem #1. If the package manifest defined a namespace that was applied (presumably sometihng like namespace.skillname/SKILL.md) then it would be clear where each skill originated. This would also allow for easier copilot instructions indicating not to edit non-project skill prompts unless expressly asked to do so.

A secondary/related solution could be to have apm install add the individual dep skill folders to .gitignore along with apm_modules. This may not be desirable in all cases though, so would likely need to be optional.

Describe alternatives you've considered
Hand-adding a namespace to my skill names is how I'm handling multiple skill repositories in our org, but that doesn't work with third-party skills.

Additional context
Add any other context or screenshots about the feature request here.

Activity

  1. added
    enhancement
    needs-triage
    on Apr 16, 2026
  2. shreejaykurhade commented on Apr 18, 2026

    @shreejaykurhade
    Contributor

    I would love to work on this.
    Will submit a small implementation.
    /assign

  3. shreejaykurhade commented on Apr 18, 2026

    @shreejaykurhade
    Contributor

    Nathan Evans (@natoverse) please take a look. guide me how do go from here

  4. moved this from Todo to In Progress in APM Roadmapon Apr 24, 2026
  5. github-actions commented on Apr 26, 2026

    @github-actions

    Triage decision

    needs-design

    Proposed labels

    theme/portability
    area/package-authoring
    area/multi-target
    type/feature
    status/needs-design
    status/triaged
    

    Milestone

    null

    Suggested next action

    Design the namespace scheme: separator character, backward compatibility with existing flat skill references, how agent runtimes (Copilot, Claude Code, Codex) discover namespaced skills by name, and the lockfile schema change required.

    Suggested issue comment

    Thanks for the detailed write-up -- you have identified two distinct problems that are easy to conflate:
    
    1. **Provenance opacity**: it is hard to tell which skill came from which package in a flat directory.
    2. **Developer mutability**: agents can accidentally overwrite installed skills because they share the same flat directory as project skills.
    
    Both are real and acknowledged. However, namespacing is a non-trivial design change because it touches how agent runtimes *discover* skills by name. Copilot, Claude Code, and Codex all use a flat skills/ directory today -- a namespace separator (e.g., `pkg-a/skill-name`) would change how agents reference skills, which is a breaking change for existing packages.
    
    Before code lands, the design needs to address:
    
    - **Namespace separator and path format**: must be valid across all target runtimes and file systems.
    - **Backward compatibility**: existing packages use flat names; how do they opt in or out?
    - **lockfile schema**: how is namespace recorded as part of a skill identity in apm.lock.yaml?
    - **Protection mechanism**: would namespace directories be write-protected from agents, or is a separate mechanism (e.g., a `.apm-managed` marker, read-only file bits) needed?
    - **Path security**: namespace strings must be validated through `validate_path_segments` to prevent traversal.
    
    If you would like to contribute, the best next step is a design comment here proposing answers to those questions. We can move to status/accepted once the design is agreed.

    Per-lens notes (collapsed)

    DevX UX Expert -- User-Need Reviewer

    Both identified problems (provenance confusion and accidental overwrites) are real pain points that emerge at scale. The flat design is deliberate -- it matches runtime discovery -- but it does hurt in larger monorepos with many transitive dependencies. The namespace approach is the right direction but the design has multiple viable solutions: namespacing, protected directories, manifest-based tracking. Any implementation must preserve how agents reference skills by name in their prompts.

    Supply Chain Security Expert -- Risk-Surface Reviewer

    Namespace separators in deployment paths are a potential path traversal vector if not validated at parse time. The existing validate_path_segments in src/apm_cli/utils/path_security.py must be extended to handle namespace components (including backslash normalization on Windows) before any PR lands. Not a blocker for the design phase, but the security review checklist for the implementing PR must explicitly cover namespace string validation.

    OSS Growth Hacker -- Contributor-Tone Reviewer

    Activated. natoverse is NONE association. The issue is thoughtful and demonstrates real project use at scale. The reply should be warm, validate both problems identified (not just say "it is complicated"), and clearly explain why this is needs-design rather than a quick fix -- so the contributor understands the tradeoffs, not just the outcome.

    Python Architect -- Architecture Reviewer

    Activated. Namespacing requires changes to: skill deployment in BaseIntegrator and per-target integrators, collision detection logic, the lockfile schema (namespace as part of skill identity), and potentially how target-specific integrators resolve skill references. The cross-runtime discovery impact is the hardest part: if namespace directories are transparent to the runtime, they degrade to the current flat experience; if they are opaque, agents need to know the namespace to reference the skill. Recommend status/needs-design with a required design doc before any PR is accepted.

    Doc Writer -- Documentation Reviewer

    Activated. Any namespacing feature will need documentation: how to reference namespaced skills in agent prompts, lockfile format changes, upgrade guide for existing packages. area/multi-target added as a secondary label because the design must account for all supported runtimes. Doc work is premature until the design is settled.

    APM CEO -- Triage Arbiter

    Valid direction that addresses a real user pain point in larger repos. The flat design was intentional but the tradeoffs are emerging as usage scales. Pushing to needs-design because the runtime discovery impact is a potential breaking-change surface that must be designed carefully. The protection mechanism (preventing agent overwrites of installed skills) could potentially be addressed independently as a smaller, non-breaking improvement while the namespacing design matures. No milestone until design is agreed.

    {
      "decision": "needs-design",
      "decision_detail": "Namespace separator, backward compatibility with flat references, runtime discovery impact across all targets, lockfile schema change, and path security validation must be designed before implementation.",
      "theme": "theme/portability",
      "areas": ["area/package-authoring", "area/multi-target"],
      "type": "type/feature",
      "status": "status/needs-design",
      "priority": null,
      "preserved_labels": [],
      "milestone": null,
      "next_action": "Post a design comment proposing: namespace separator format, backward compatibility path, lockfile schema change, and how agent runtimes discover namespaced skills.",
      "comment_markdown": "Both provenance opacity and developer mutability are real. Namespacing is the right direction but needs design before code: separator format, backward compat, runtime discovery impact, and lockfile schema change must be agreed first."
    }

    Triage status: agentic proposal pending human ratification.
    Silence is approval. Maintainers can:

    • Override any label or milestone above by editing it directly --
      human edits are authoritative and will not be reverted on
      subsequent runs.
    • Re-trigger triage by applying the status/needs-triage label, or
      by removing status/triaged to enroll the issue in the next
      daily sweep.

    Posted by the Triage Panel workflow. See .apm/skills/apm-triage-panel for the panel skill.

    Generated by Triage Panel · ● 3.3M · ◷

  6. added
    area/multi-target
    area/package-authoring
    status/needs-design
    status/triaged
    type/feature
    on Apr 26, 2026
  7. 15 remaining items

  8. danielmeppiel commented on Oct 1, 2026

    @danielmeppiel
    Collaborator

    Human decision: relate the native-plugin concerns to accepted #3094; keep the standalone-skill remainder separately scoped.

    #3094 owns intact native plugin identity and loading. Accepted child #1120 must prove that two plugins with identically named components coexist through native invocation without APM-invented renaming. This carries forward the native identity/provenance concerns here and the previous prohibition on rewriting skill names or folder identities.

    Native-plugin delivery does not automatically solve provenance or protection for independently installed standalone skills. That remainder is still pending a separate decision. This comment neither accepts nor defers #739 wholesale, and this issue must not be closed merely because the epic or #1120 ships. Existing contributor authorship and prior branch coordination remain intact.

    Recorded by Copilot on behalf of Daniel Meppiel (@danielmeppiel) following the direct product decisions confirmed on 2026-09-30 and explicit authorization to update the issues on 2026-10-01. Daniel separately confirmed that he is the review contact for accepted scopes. This records a human decision, not an autonomous triage recommendation. It does not promise a release, assign implementation, approve a merge, or bypass review.

  9. danielmeppiel commented on Oct 21, 2026

    @danielmeppiel
    Collaborator

    Decision: approve
    Area: project
    Scope: For #739's still-undecided standalone-skill remainder, add an explicitly read-only reverse-provenance mode apm view --file PATH, with existing project/user scope selection (-g), for installed standalone SKILL.md files and their bundled resources. Use existing canonical lock/deployment ownership records, not inferred directory names or new metadata, to show exact recorded owner(s), active writer where relevant, dependency source/ref/commit when available and distinction from project-self or imperative local-bundle ownership. Separate recorded provenance from current file status: matches the recorded deployed hash, modified, missing or unverifiable. Add concise opt-in guidance for humans/agents to inspect before editing and edit the actual source rather than a deployed copy. Bound protection to advisory guidance, not runtime write prevention. Keep existing package, versions and marketplace modes unchanged.
    Done when: Installed-CLI evidence covers project/user scope, direct/transitive/local dependencies, project-self and local-bundle records, bundled resources, shared paths with active and surviving owners, changed/missing files, absent hashes, legacy/partial/malformed records and path/symlink boundaries. Exact-path canonical records determine ownership; no same-name, directory-prefix or substring guess. Unrecorded provenance is explicit and nonzero, never project-owned or safe to edit; invalid/unreadable state gives an actionable nonzero error. A recorded owner with changed or missing bytes is reported as recorded provenance, not verified upstream content. Honor existing safe/redacted source display and containment without following external symlinks. Prove no network or content execution and no project, lock, cache or native-state writes, including no legacy lock migration, repair or ownership adoption. Verify useful Rich/plain output, scope/argument validation, unchanged existing view modes, and directly related CLI documentation and packaged usage guidance. Preserve #3202 selected-skill collision and #3288 surviving-ownership rules and the separate native-plugin scopes.
    Out of scope: New command family or dependency-list/tree/why expansion, broad reporting/JSON framework, manifest/lock/identity schema, prefixes, aliases, skill-name/folder rewriting, metadata/body/frontmatter injection, universal container layout, read-only bits/ACLs, automatic gitignore or user-instruction edits, new collision policy, ownership recovery, runtime enforcement/monitoring, native-plugin changes, #2649 branch/label/reviewer/assignment change or prefix-implementation approval/restart, release promises, technical PR approval or merge, implementation dispatch or restarting blocked delivery.
    Review contact: Daniel Meppiel (@danielmeppiel)

  10. danielmeppiel commented on Oct 21, 2026

    @danielmeppiel
    Collaborator

    Accepted: inspect a standalone skill's recorded origin from its file

    Daniel Meppiel (@danielmeppiel) explicitly accepted this bounded product recommendation on October 21. Copilot is publishing that human decision, not issuing an autonomous triage recommendation. The separate strict scope record is the precise contract; its reference to the previously undecided remainder identifies the slice being accepted, not a remaining approval question.

    This addresses Nathan Evans (@natoverse)'s central concern: when a human or agent is about to edit an unfamiliar installed skill, it should be possible to identify its recorded source without changing the skill's identity.

    Intended experience

    apm view --file .agents/skills/review/SKILL.md
    

    The new read-only mode will identify the exact recorded owner(s), active writer where relevant, and available dependency source/ref/commit. It will distinguish dependency copies, project-self deployments and local bundles, and separately report whether the file matches its recorded deployed hash, was modified, is missing or cannot be verified. Bundled resources and user scope (-g) are included. Unknown provenance is not proof that a file belongs to the project or is safe to edit.

    Existing lock/deployment records supply this information. No inferred folder prefix, same-name match, injected metadata or second ownership model is approved. The lookup must not fetch, execute content, follow external symlinks, migrate a lock, repair state or write project/native configuration.

    Why this interface, and its limit

    Here the file is known but its package may not be. Package inventory and apm deps why PACKAGE answer different questions. An explicit file mode extends the existing inspection command without guessing whether a slash-containing argument is a package identifier or a path. An editing agent already has the path; humans can use the same lookup for unfamiliar files.

    This is a bounded CLI recommendation, not a claim that usability studies establish it as the best possible interface. It must still be consulted and respected. Concise opt-in guidance will recommend editing the actual source rather than an installed copy, but there is no automatic editor visibility, automatic instruction insertion or runtime write-protection guarantee.

    Existing decisions and contributors remain protected

    The September 14 no-renaming boundary remains: no synthetic prefixes, skill-name changes or renaming a skill's own folder. Native container support still requires target-specific evidence. Accepted native-plugin work in #3094/#1120 stays separate, as do #3202 collision and #3288 surviving-ownership rules.

    #2649 remains Sergio's recognized successor to Shreejay's contribution in #1028. This decision neither approves its prefix-based implementation nor requests a branch change, restart, reviewer change or new implementation pass. Oskar's naming feedback and the original contributor history remain relevant. Closed, unmerged predecessor PRs are not delivery evidence.

    The issue stays open. Existing labels and ownership are preserved, with status/accepted added to signal only this bounded scope; the existing design hold is not erased or converted into delivery permission. There is no PR approval, assignment, release promise, merge authorization or automated execution dispatch.

    Evidence was current-source and documentation inspection, not product tests or native execution. The scope record's completion criteria describe what future delivery must demonstrate, not checks already performed.


    Generated by atlas. This comment is AI-generated and may contain errors.

  11. added
    status/accepted
    on Oct 21, 2026
  12. danielmeppiel commented on Nov 12, 2026

    @danielmeppiel
    Collaborator

    Decision (Daniel Meppiel (@danielmeppiel), 2026-11-12): namespacing comes from upstream specs and native plugins, not from APM.

    This issue will close when apm view --file lands.


    Posted with AI assistance on behalf of Daniel Meppiel (@danielmeppiel).

  13. added
    pillar/consume
    and removed on Nov 12, 2026
  14. removed
    status/needs-design
    on Nov 12, 2026
  15. moved this from In Progress to Done in APM Roadmapon Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/multi-targetarea/package-authoringpillar/consumestatus/acceptedtriage/recommendedtype/feature

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions