Skip to content

Generic git URL support and optional output override #72

@SebastienDegodez

Description

@SebastienDegodez

Description

Two improvements to apm dependency management for flexibility and native tool integration:

  1. Optional output override: In the dependencies.apm section, allow entries to be defined as objects with an optional output field.
    • Default behavior: If output is not specified, the dependency is bundled into the global compilation (e.g., agent.md).
    • Override behavior: If output is defined, the primitive is exported directly to that specific file path (e.g., .github/copilot-instructions.md).
  2. Generic git URL support: Enhance the parser to support git protocol URLs as dependency references — https://, git@, ssh://, as well as browser-pasted URLs with /tree/main/, /blob/, or Azure DevOps path parameters (?path=).

Why generic git URLs

APM currently only supports GitHub.com, GitHub Enterprise (*.ghe.com), and Azure DevOps as hosts. The plugin spec (adopted by Claude Code and GitHub Copilot CLI) supports any git URL natively. Supporting generic git protocol URLs in apm.yml would:

Sub-issues

Proposed Configuration Example

name: {{project_name}}
version: {{version}}
output: .github # default folder destination

dependencies:
  apm:
    # 1. Default behavior — short form (GitHub, uses owner/repo convention)
    - danielmeppiel/design-guidelines

    # 2. Full HTTPS URL (GitLab, Bitbucket, any git host)
    - https://gitlab.com/acme/coding-standards.git
    - https://bitbucket.org/acme/security-rules.git

    # 3. Browser-pasted URL with path (auto-parsed)
    - source: https://github.com/danielmeppiel/apm/tree/main/primitives/coding-standards
      output: .github

    # 4. Azure DevOps with specific output
    - source: https://dev.azure.com/org/project/_git/repo?path=/rules
      output: other

  mcp:
    - microsoft/azure-devops-mcp

scripts:
  start: "copilot -p .github/copilot-instructions.md"

Benefits

  • Workflow Integration: Allows seamless generation of Copilot-native instruction files in .github/ without relying on the full agent compilation.
  • Granularity: Choose exactly which primitives go to the main agent file and which are exported as standalone files.
  • Improved DX: Users can paste URLs directly from their browser without manual editing.
  • Host-agnostic: Any git-accessible repository works as a dependency source — no host-specific code needed per platform.

Sub-issues

Metadata

Metadata

Labels

acceptedDirection approved, safe to start workenhancementNew feature or requestpriority/highShips in current or next milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions