Appearance
Why It Matters
GitHub Copilot repository and path-specific instruction files are easier to reason about when they stay short and focused. Once instruction markdown grows past the documented 4000-character guidance limit, part of the intended behavior can become easier to ignore, harder to review, and less portable across review-oriented Copilot workflows.
What Triggers
SEC353 applies only to GitHub Copilot instruction paths:
.github/copilot-instructions.md.github/instructions/*.instructions.md
It triggers when the file content exceeds 4000 characters.
Examples that trigger:
- a repository-level
.github/copilot-instructions.mdpacked with multi-page guidance - a path-specific
.github/instructions/review.instructions.mdthat grows beyond the same limit
Examples that stay clean:
- short repository-level Copilot instructions
- path-specific instruction files that stay within the limit
- fixture-like paths such as
tests/fixtures/.github/copilot-instructions.md
False Positives
This rule stays Preview because some projects may intentionally keep large instruction files while they evaluate how much Copilot actually consumes in their workflows. The rule is guidance about reviewability and effective application, not a claim that every long file is broken.
Remediation
Split long Copilot guidance into:
- a shorter shared
.github/copilot-instructions.md - narrower
.github/instructions/*.instructions.mdfiles for path-specific behavior
Prefer small, focused instruction files over one large catch-all document.