agentleFS
MicrosoftKnown publishermicrosoft/apm/.github/copilot-instructions.md

apm

Copilot instructions3.9k starsChanged 2 months agoMITView on GitHub

The CI Lint job is a hard gate. Mirror it locally before git push and before producing any artifact (PR body, release note, audit report) that claims CI is green. The Lint job runs (see .github/workflows/ci.yml): 1. uv run --extra dev ruff check src/ tests/ 2. uv run --extra dev ruff format --check src/ tests/ 3. YAML I/O safety guard (rejects raw yaml.dump(..., handle) outside utils/yaml_io.py; mark approved exceptions with # yaml-io-exempt). 4. File length guardrail (no src/**/*.py may exceed…

  • Commits and pushes

Trending

Steady talk.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 13 mentionsApr 2026: 7 mentionsMay 2026: 3 mentionsJun 2026: 5 mentionsJul 2026: 4 mentionsAug 2026: 0 mentionsSep 2026: 5 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/apm repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/apm

The biggest 5 of 41 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 41

Talked about on GitHub, Hacker News and Bluesky (41 times).

On GitHub · 32

27 more on GitHub

On Bluesky · 4

The file

We split this copilot-instructions.md into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No raw str(path.relative_to(...)) patterns -- use portable_relpath() from apm_cli.utils.paths.

    line 19
  2. Distinctive:

    All seven must succeed. CI evaluates these on the PR merge commit (HEAD merged with current main), so duplication introduced by a recent …

    line 26
  3. Distinctive:

    Always merge main locally before running the mirror.

    line 29
  4. Distinctive:

    Always run the verify chain before git push -- the CI Lint job fails on any remaining diagnostic.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md
<!-- Generated by APM CLI from .apm/ primitives --><!-- Build ID: 9fe84b8620b0 -->

Linting (canonical contract)

The CI Lint job is a hard gate. Mirror it locally before git push and before producing any artifact (PR body, release note, audit report) that claims CI is green.

CI-mirror commands

The Lint job runs (see .github/workflows/ci.yml):

  1. uv run --extra dev ruff check src/ tests/
  2. uv run --extra dev ruff format --check src/ tests/
  3. YAML I/O safety guard (rejects raw yaml.dump(..., handle) outside utils/yaml_io.py; mark approved exceptions with # yaml-io-exempt).
  4. File length guardrail (no src/**/*.py may exceed 2450 lines).
  5. No raw str(path.relative_to(...)) patterns -- use portable_relpath() from apm_cli.utils.paths.
  6. Code duplication guardrail (pylint R0801): uv run --extra dev python -m pylint --disable=all --enable=R0801 \ --min-similarity-lines=10 --fail-on=R0801 src/apm_cli/
  7. Auth-protocol boundary check: bash scripts/lint-auth-signals.sh

All seven must succeed. CI evaluates these on the PR merge commit (HEAD merged with current main), so duplication introduced by a recent main commit can fail your PR even if your own diff is clean. Always merge main locally before running the mirror.

Local workflow

  • Auto-fix style+imports: uv run --extra dev ruff check src/ tests/ --fix
  • Apply formatter: uv run --extra dev ruff format src/ tests/
  • Verify the full Lint job (must all be silent / exit 0):
    uv run --extra dev ruff check src/ tests/ \
      && uv run --extra dev ruff format --check src/ tests/ \
      && uv run --extra dev python -m pylint --disable=all --enable=R0801 \
         --min-similarity-lines=10 --fail-on=R0801 src/apm_cli/ \
      && bash scripts/lint-auth-signals.sh
    (The YAML, file-length, and relative_to guards are pure-grep one-liners from ci.yml; run them directly if you have touched those surfaces.)

Always run the verify chain before git push -- the CI Lint job fails on any remaining diagnostic.

Common surprises

  • RUF043 -- use match=r"..." for pytest.raises patterns with regex metacharacters ((, ), [, etc.).
  • UP006 / UP045 -- use list / dict / X | None instead of List / Dict / Optional.
  • RUF100 -- drop stale # noqa directives.
  • F401 / F841 -- remove unused imports / unused locals.
  • SIM103 -- inline negated returns where the body is one line.
  • I001 -- import sort order (auto-fixable).
  • R0801 -- 10+ identical lines across two files. Extract the shared block into a base class / helper module instead of disabling.

Lifecycle binding

This is the canonical lint contract for the repo. Skills that produce artifacts asserting green CI -- notably pr-description-skill (whose "Validation evidence" row covers CI checks) -- inherit this gate transitively. Do NOT redefine ruff or pylint commands inside individual skills; honor this instruction before invoking them.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.