apm
danielmeppiel/apm/.github/copilot-instructions.md
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
What's in it
- Linting (canonical contract)
- CI-mirror commands
- Local workflow
- Common surprises
- Lifecycle binding
<!-- 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):**
```bash
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.
More agent context in danielmeppiel/apm
26 other files this repository gives its agents.
Skill
- apm-spec-guardian.agents/skills/apm-spec-guardian/SKILL.md
- apm-strategy.agents/skills/apm-strategy/SKILL.md
- auth.agents/skills/auth/SKILL.md
- autopilot-comment.agents/skills/autopilot-comment/SKILL.md
- autopilot-issue-delivery-scheduler.agents/skills/autopilot-issue-delivery-scheduler/SKILL.md
- autopilot-issue-delivery-worker.agents/skills/autopilot-issue-delivery-worker/SKILL.md
- autopilot-issue-triage-scheduler.agents/skills/autopilot-issue-triage-scheduler/SKILL.md
- autopilot-issue-triage-worker.agents/skills/autopilot-issue-triage-worker/SKILL.md
- autopilot-pr-merge-worker.agents/skills/autopilot-pr-merge-worker/SKILL.md
- autopilot-pr-review-scheduler.agents/skills/autopilot-pr-review-scheduler/SKILL.md
- autopilot-pr-review-worker.agents/skills/autopilot-pr-review-worker/SKILL.md
- autopilot-pr-triage-scheduler.agents/skills/autopilot-pr-triage-scheduler/SKILL.md
- autopilot-pr-triage-worker.agents/skills/autopilot-pr-triage-worker/SKILL.md
- cli-logging-ux.agents/skills/cli-logging-ux/SKILL.md
- cut-release.agents/skills/cut-release/SKILL.md
- devx-ux.agents/skills/devx-ux/SKILL.md
- docs-corpus-audit.agents/skills/docs-corpus-audit/SKILL.md
- docs-grounding-verifier.agents/skills/docs-grounding-verifier/SKILL.md
- docs-impact-architect.agents/skills/docs-impact-architect/SKILL.md
- docs-impact-classifier.agents/skills/docs-impact-classifier/SKILL.md
- docs-impact-localizer.agents/skills/docs-impact-localizer/SKILL.md
- docs-sync.agents/skills/docs-sync/SKILL.md
- oss-growth.agents/skills/oss-growth/SKILL.md
- pr-description-skill.agents/skills/pr-description-skill/SKILL.md
- python-architecture.agents/skills/python-architecture/SKILL.md
- supply-chain-security.agents/skills/supply-chain-security/SKILL.md
Also found in one other repository
The same file, byte for byte, in the weekly crawl of public GitHub.
Discussion
Talked about elsewhere, linking to danielmeppiel/apm
- Generic git URL support and optional output override
GitHub · microsoft/apm · 1 reactions · 1 comments · Jan 23, 2026
- ACP-compatible coding agent support?
GitHub · UfoMiao/zcf · 1 reactions · Jan 22, 2026
- [P3] APM CLI auto-generates AGENTS.md/CLAUDE.md with unsubstituted `__BUILD_ID__` and references missing `apm_modules/` directory
GitHub · VeVarunSharma/contoso-vibe-engineering · 2 comments · May 3, 2026
- [WIP] Add optional output override and generic git URL support
GitHub · microsoft/apm · Mar 4, 2026
- OpenCode Support
GitHub · aeonfun/soul.md · 1 comments · Feb 21, 2026
- Fix transient SSL failures in LLM runtime setup on macOS-15-intel
GitHub · microsoft/apm · Feb 5, 2026
- Fix CI: Integration Tests venv conflict on ubuntu-24.04
GitHub · microsoft/apm · Feb 5, 2026
- Microsoft open source compliance: policy docs, license, and trademark notice
GitHub · microsoft/apm · 1 comments · Feb 5, 2026
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

