Skip to content

[FEATURE] Mark deployed files as generated in .gitattributes #3207

Description

@MPV

Problem

Teams that commit what apm install deploys, so that agents without network access or tokens still find their skills, review those files like hand-written code. A bump of one dependency changes one line in apm.yml and hundreds in apm.lock.yaml and each target directory. With several targets, the same SKILL.md appears once per target.

GitHub collapses such diffs when a path is marked linguist-generated. Keeping that list right by hand means tracking deployed_files across installs, removals and new transitive dependencies.

Desired solution

An option, in apm.yml or as a flag, under which apm install maintains a marked block in .gitattributes, as it already adds apm_modules/ to .gitignore:

# >>> managed by apm install
/apm.lock.yaml linguist-generated
/.claude/skills/service-yaml/** linguist-generated
/.agents/skills/service-yaml/** linguist-generated
# <<< managed by apm install
  • One entry per deployed package directory, taken from the lockfile, so skills authored in the repo stay reviewable.
  • Entries removed when a package is removed.
  • Lines outside the block left alone.
  • Optionally, apm audit reports a block that doesn't match the lockfile.

Alternatives and additional context

  • A hand-written /.claude/skills/** linguist-generated also marks skills authored in the repo, and goes stale as dependencies change.
  • -diff hides the change from git itself, which is too strong.
  • This repository already marks its own gh-aw lock files linguist-generated in .gitattributes, and feat: dogfood APM on microsoft/apm -- .apm/ primitives, compile, --check gate #842 did the same for apm compile output.
  • Linguist's built-in list covers files with fixed names, and Mark APM lockfiles as generated github-linguist/linguist#8265 proposes adding apm.lock.yaml to it, so GitHub would collapse the lockfile in every repository. The deployed directories vary by project and target, and only APM knows them, so they can't go there. Once 8265 ships, /apm.lock.yaml can leave the block.

Happy to help test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/featureNew capability, new flag, new primitive.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions