Copilot config

From event4u-app/agent-config · View interactive version

Copilot config is an AI agent skill from the GitHub repository event4u-app/agent-config. Tune the GitHub Copilot AI — `copilot-instructions.md`, PR-review patterns, suggestion behavior, output verbosity. NOT for dev-environment setup (use `devcontainer`).

How to use this skill

Skill file

Copilot Skill

When to use

Use this skill when:

Do NOT use when:

Procedure: Configure Copilot

  1. Inspect current Copilot config — Read .github/copilot-instructions.md (if any) and the What Copilot Can and Cannot Read table below to confirm Copilot Code Review vs. Chat scope.
  2. Decide self-contained scope — Identify which rules must live in copilot-instructions.md (PR-review-relevant) vs. .augment/ (agent-only).
  3. Apply changes — Edit copilot-instructions.md with coding-standards, review-comment rules, and any new conventions; keep it self-contained.
  4. Verify — Open a draft PR, confirm Copilot reads the new rules; for Chat, ask Copilot to summarize the active instructions.

Configuration File

.github/copilot-instructions.md — the single source of truth for Copilot behavior.

What Copilot Can and Cannot Read

| Context | Copilot Code Review (PR bot) | Copilot Chat (IDE) |

|---|---|---|

| .github/copilot-instructions.md | ✅ Reads automatically | ✅ Reads automatically |

| .augment/rules/ | ❌ Cannot access | ✅ Can read if referenced |

| .augment/skills/ | ❌ Cannot access | ✅ Can read if referenced |

| .augment/guidelines/ | ❌ Cannot access | ✅ Can read if referenced |

| AGENTS.md | ❌ Cannot access | ✅ Can read if referenced |

| agents/ | ❌ Cannot access | ✅ Can read if referenced |

Key implication: copilot-instructions.md must be self-contained for PR reviews.

It cannot reference .augment/ files and expect Copilot Code Review to follow them.

For Copilot Chat users, a hint at the top of the file points to .augment/ for deeper context.

What Copilot Controls

| Area | How |

|---|---|

| Code suggestions | Follows coding standards, PHP 8.2 patterns, Laravel conventions |

| PR reviews | Reviews only modified lines + direct dependencies |

| Comment behavior | Deduplication rules, reply handling, scope control |

| Language | English code comments, bilingual PR comments (EN + DE) |

Relationship to `.augment/`

copilot-instructions.md and .augment/ serve different audiences:

| | copilot-instructions.md | .augment/ |

|---|---|---|

| Audience | GitHub Copilot (bot + chat) | Augment Agent |

| Scope | Coding standards, review rules | Full agent infrastructure |

| Self-contained? | Yes (must be) | Yes (skills reference each other) |

| Duplication | Intentional — Copilot can't read .augment/ | No duplication needed |

When updating coding rules, check if both files need the change:

PR Review Comment Rules

Copilot is configured with strict comment behavior rules:

Deduplication

Before creating a comment, Copilot must:

  1. Check if it already commented on the same line/concern
  2. Check if another reviewer already raised the same point
  3. Skip if a duplicate would be created

Reply Handling

| Developer response | Copilot action |

|---|---|

| Accepted suggestion | Acknowledge briefly or resolve |

| Rejected with reason | Accept the decision, do NOT re-raise |

| Asked a question | Answer with analysis and examples |

| Dismissed without explanation | Move on, do NOT re-raise |

Key Principle

One comment per concern per location. Never duplicate, never re-raise rejected suggestions.

Handling Copilot Bot Comments (as Augment Agent)

When the user asks to fix Copilot's PR review comments (via /fix-pr-comments):

1. Evaluate Each Comment

For each Copilot comment, determine:

| Category | Action |

|---|---|

| Valid and actionable | Fix the code as suggested |

| Valid but already handled | Reply explaining it's already addressed (e.g., by ECS/Rector) |

| False positive | Reply explaining why the suggestion doesn't apply |

| Style nitpick | Reply that ECS/Rector handles this automatically |

| Out of scope | Reply that the comment is outside the PR's change scope |

2. Reply Format

When replying to Copilot comments on behalf of the user:

{English explanation}

---

🇩🇪 {German translation}

3. Common False Positives

Copilot frequently suggests things that conflict with project conventions:

| Copilot suggests | Project convention | Response |

|---|---|---|

| Add null !== $var with is_string() | is_string() already excludes null | False positive — redundant check |

| Register events manually | Laravel 11 uses event discovery | Not needed since Laravel 11 |

| Use float for money | Use Math helper class | Project uses BCMath via Math::*() |

| Add PHPDoc repeating signature | Only add PHPDoc when types are insufficient | Redundant documentation |

| Suggest array() syntax | Short syntax [] enforced by ECS | Auto-fixed by ECS |

| Add final to mocked classes | Classes mocked by Mockery can't be final | Would break tests |

Improving Copilot Instructions

When updating .github/copilot-instructions.md:

Structure

When to Add New Rules

| Trigger | Action |

|---|---|

| Copilot repeatedly makes the same wrong suggestion | Add to "Known Issues" section |

| New project convention introduced | Add to the relevant section |

| Copilot ignores scope control | Strengthen "Code Review Scope" section |

| Copilot creates duplicate comments | Strengthen "Comment Behavior" section |

When NOT to Add Rules

Relationship to Other Tools

| Tool | Role | Config |

|---|---|---|

| Copilot | IDE suggestions + PR reviews | .github/copilot-instructions.md |

| Augment | Agent workflows + deep analysis | .augment/ + agents/ |

| Greptile | PR review bot (if enabled) | Separate config |

| ECS | Code style auto-fix | ecs.php (project root) |

| Rector | Code refactoring auto-fix | rector.php (project root) |

| PHPStan | Static analysis | phpstan.neon (project root) |

Copilot and Augment complement each other:

Related

Output format

  1. Updated copilot-instructions.md or related config file
  2. Summary of changes and which Copilot behavior is affected

Gotcha

Do NOT

Auto-trigger keywords

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.