Skip to content

Improve Copilot instructions and agent. Introduce common, useful skills #9064

Merged
hl662 merged 7 commits into
masterfrom
nam/backport-agent
Mar 5, 2026
Merged

Improve Copilot instructions and agent. Introduce common, useful skills #9064
hl662 merged 7 commits into
masterfrom
nam/backport-agent

Conversation

@hl662

@hl662 hl662 commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Reviewed the existing merge conflict skill and CVE audit agent, found a few gaps and some overlap. This PR restructures them and trims the copilot instructions.

Changes

New: cve-remediation skill (.github/skills/cve-remediation/)

  • Extracted domain knowledge out of the CVE audit agent into a reusable skill
  • Covers pnpm-config.json structure (globalOverrides, ignoreCves), fix strategies (direct vs transitive), severity policy, validation workflows
  • Both the CVE audit agent and the merge conflict skill can now reference this instead of duplicating knowledge

Updated: cve-audit agent

  • Slimmed down — removed inline domain knowledge that's now in the cve-remediation skill
  • Still owns all orchestration: branching, protected branch guards, PR creation, deferral workflow, failure handling

Updated: merge-conflict-resolving skill

  • Reviewed ~15 real Mergify backport PRs to identify gaps in the original skill
  • Added coverage for:
    • pnpm-config.json conflicts (the most common conflict type in security backports — was completely missing)
    • common/api/*.api.md — generated API signature files
    • common/changes/@itwin/ — rush change files
    • .github/ CI config conflicts
    • Combined/multi-PR backports
    • Backport-specific additional edits
  • Fixed incorrect assumption that Mergify uses merge — it uses cherry-pick
  • Added residual conflict marker check, rollback guidance, real PR examples

Trimmed: copilot-instructions.md (344 → 219 lines)

  • The instructions file had become a full reference doc rather than actionable guidance — it listed every single package in the monorepo, common code patterns, debugging tips, etc. Most of this is discoverable from rush.json and the codebase itself
  • Cut all discoverable/reference content, kept only guardrails and workflows
  • Added three things that were actually missing:
    • Internal/cross-package export pattern (cross-package.ts + @itwin/no-internal-barrel-imports)
    • ESLint centralized config location (common/config/eslint/)
    • CI pipeline paths

hl662 and others added 4 commits February 16, 2026 10:47
- Extract domain knowledge from cve-audit agent into reusable cve-remediation skill
- Slim cve-audit agent to reference skill (no duplicated domain knowledge)
- Expand merge conflict skill with gaps identified from real Mergify PRs:
  pnpm-config.json, common/api/*.api.md, rush change files, CI configs,
  cherry-pick workflow, combined backports, rollback guidance

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove discoverable content (full package catalog, common patterns, debugging
tips). Add missing guardrails: internal/cross-package export pattern, ESLint
config location, CI pipeline paths. 344 → 219 lines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hl662 hl662 self-assigned this Mar 5, 2026
@hl662 hl662 marked this pull request as ready for review March 5, 2026 17:52
@hl662 hl662 requested review from a team, aruniverse and ben-polinsky as code owners March 5, 2026 17:52
@hl662 hl662 added the buildology Issues related to process, tooling or CI/CD pipelines label Mar 5, 2026
- Mergify posts generic comment, not file list — use git status
- Package.json guidance: use workspace:* for internal deps
- CVE skill: update stale example, label as illustrative

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aruniverse aruniverse requested a review from Copilot March 5, 2026 18:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@hl662 hl662 requested a review from Copilot March 5, 2026 20:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


You can also share your feedback on Copilot code review. Take the survey.

Comment thread .github/skills/merge-conflict-resolving/SKILL.md Outdated
Comment thread .github/skills/merge-conflict-resolving/SKILL.md
Comment thread .github/agents/cve-audit.agent.md Outdated
hl662 and others added 2 commits March 5, 2026 15:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ben-polinsky

Copy link
Copy Markdown
Contributor

Do we have any note of agents/skills in our readme?

@hl662

hl662 commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

Do we have any note of agents/skills in our readme?

No, but also - who would it be for? Devs could discover it naturally through the CLI or VS Code UI, and agentic tools will load them already

@hl662 hl662 merged commit 96a2e25 into master Mar 5, 2026
15 checks passed
@hl662 hl662 deleted the nam/backport-agent branch March 5, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildology Issues related to process, tooling or CI/CD pipelines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants