skills/per-repo-conventions/SKILL.md
Use when starting work in any repository. Auto-surface when an agent is about to write code, create a PR, or verify work. Teaches the discovery pattern for finding and applying per-repo conventions (AGENTS.md, PR templates, CONTRIBUTING.md) before acting.
npx skillsauth add microsoft/amplifier-bundle-skills per-repo-conventionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When you work in a repo, you're a guest. The repo's owners maintain conventions that encode their experience — including bugs they have already paid for. Read those conventions before you act.
The foundation/kernel layer defines philosophy. Individual repos define specifics. The kernel does not know what a particular repo's smoke test command is, what its PR checklist requires, or which gates its maintainers consider non-negotiable. The repo does. Honor it.
At the start of any task that touches a repo, before writing code, walk this checklist:
AGENTS.md — check the repo root first, then walk up from the current
working directory if you're working in a subdirectory. This is the
highest-signal file for agent behavior in this ecosystem..github/PULL_REQUEST_TEMPLATE.md — check at repo root. This is the
checklist your PR must honor.CONTRIBUTING.md — check at repo root. General contribution
conventions.Skim each file that exists. Apply the relevant conventions to your work.
Some repos add files that are read only at specific phases of work, not at task
start. When AGENTS.md points to one of these, treat the trigger as binding:
load the referenced file when the phase fires, not before.
PRINCIPLES.md — read at design / planning phase, before writing
code. Captures philosophical context, architectural invariants, upstream-spec
linkage, intentional deltas, and pointers to deeper material (ADRs, design
docs). If present, AGENTS.md should point to it.SMOKE_TESTS.md — read at verification phase, before declaring done.
Names the repo's smoke runnable(s) and any cross-repo smokes to run when
changes affect dependents. If present, AGENTS.md and the PR template should
point to it.Force-loading these files at task start defeats the purpose — they exist because their content is only sometimes relevant. If neither exists in the repo, default behavior applies; the repo owner has chosen not to formalize design or verification context separately yet.
AGENTS.md — agent-facing conventions. Test commands, common pitfalls,
build steps, environment requirements, areas to avoid touching, and the
shape of "done" in this repo. Often the only place where tribal knowledge
is written down..github/PULL_REQUEST_TEMPLATE.md — the checklist that auto-populates
every PR body. Treat each checkbox as a required action, not a suggestion.CONTRIBUTING.md — broader contributor guidance. Style, branching,
review process, sign-off requirements.I'm about to fix a bug in some-repo. Before writing code, I read:
- some-repo/AGENTS.md
→ "Smoke test required: ./scripts/smoke-test.sh on a fresh DTU"
→ "Engine changes require a live pipeline run, not just unit tests"
- some-repo/.github/PULL_REQUEST_TEMPLATE.md
→ "[ ] Smoke test passed (link log)"
→ "[ ] Live run exercising changed code path (link events.jsonl)"
My plan:
1. Implement the fix.
2. Run unit tests (necessary, not sufficient).
3. Run ./scripts/smoke-test.sh on a fresh DTU per AGENTS.md. Capture log.
4. Run a live pipeline exercising the changed path. Capture events.jsonl.
5. PR body addresses each checklist item explicitly with links to evidence.
The cost of this discovery pass is minutes. The cost of skipping it is the integration-blocking bug the repo's conventions were written to prevent.
foundation:docs/PER_REPO_CONVENTIONS.md — canonical statement of the
principle.skills/verification-discipline/ — the complementary skill that explains
why per-repo gates (especially smoke and integration tests) matter and
what "verified" actually means.development
Convene the persona panel on the CURRENT conversation / work-in-progress — the plan, design, or decision you've been building in this session. The INLINE counterpart to /council (which forks and runs isolated, so it cannot see the chat). Use when you want the council to critique what we're working on right now.
development
Convene the persona panel (six orthogonal review lenses) on a target — cold independent fan-out, debate-to-consensus, synthesized verdict with recorded dissent and a roster manifest.
development
Hard-won patterns for probing, building, troubleshooting, and iterating against Microsoft Graph API endpoints -- especially from a browser SPA using delegated MSAL.js auth calling Graph directly with no backend (lessons generalize to any Graph integration). Covers the throwaway-probe-file methodology for de-risking before building, OData/query quirks, permission and admin-consent sequencing, recordings/transcripts access patterns (SharePoint REST, not Graph), CSP requirements for a pure-browser SPA, retry/pagination/backoff patterns, and the MSAL/EasyAuth auth-redirect-loop debugging saga. Use when integrating with Microsoft Graph, Teams APIs, MSAL.js, or EasyAuth; when hitting an unexpected Graph error (400/403/429), a silent missing-scope failure, an auth redirect loop, or a CSP violation that only appears in production; or when deciding how to validate a new Graph capability before committing it to a codebase.
tools
Use when building an Amplifier-powered workflow or automation tool and deciding how to expose it — as standalone .dot attractor pipelines (incl. inside the Resolve dot-graph resolver), an importable Python lib, agent-callable tool modules, or a CLI. Covers the four leverage levels, the DRY rule that keeps logic in ONE home, the judgment for which levels a real consumer actually needs (and when adding a level is just ceremony), and the maximally-DRY attractor-only specialization where the .dot pipeline is the sole logic home.