Skip to content

Fix Copilot-only coupling in three Agent Skills - #4453

Closed
MerverliPy wants to merge 4 commits into
github:mainfrom
MerverliPy:fix/skills-copilot-only-coupling
Closed

MerverliPy wants to merge 4 commits into
github:mainfrom
MerverliPy:fix/skills-copilot-only-coupling

Conversation

@MerverliPy

Copy link
Copy Markdown

Three skills in this collection are built on the Agent Skills specification but are coupled to one host agent in ways that make them misbehave elsewhere. Each fix is one or two lines; the reasoning is longer than the change.

Found while vendor-installing these skills into a non-Copilot agent. The three commits are independent and can be taken separately.

1. dotnet-best-practices: the ${selection} prompt variable is not spec

-Your task is to ensure .NET/C# code in ${selection} meets the best practices …
+Your task is to ensure the .NET/C# code in the scope you were asked about meets the best practices …

${selection} is resolved by Copilot's editor selection context. It is not part of the Agent Skills specification, so outside Copilot it is never substituted and the model receives the literal string ${selection}.

This is not cosmetic here: that sentence is the skill's task statement, so the agent is being told to evaluate a scope that does not exist. The replacement carries the same intent with no host dependency.

2. build-evidence-map: the description names one agent

-… Use when Copilot must preserve supporting, contradicting, qualifying, and missing evidence …
+… Use when an agent must preserve supporting, contradicting, qualifying, and missing evidence …

A description is the routing text an agent reads to decide whether to load the skill. Naming one vendor's agent there reduces its reach without adding routing information, and reads as a precondition to every other agent.

3. harness-engineering: the harness-surface table is Copilot-only

Three changes in the same direction — harness engineering is not Copilot-specific, but this file presents it as though it were.

a. Trigger list opened with "make a repository more reliable for GitHub Copilot or other coding agents". Named agents are now examples rather than the subject.

b. Discovery list gained two Agent Skills specification locations that were missing:

 - `AGENTS.md`
 - `.github/copilot-instructions.md`
 - `.github/instructions/`
+- `.pi/skills/` or `.agents/skills/`

The discovery step exists to find a repository's agent instructions; a repository keeping its skills in either of those locations was invisible to it.

c. Recommended-artifact table said AGENTS.md or .github/copilot-instructions.md, which reads as a choice between equals. It is not one — AGENTS.md is read by 20+ agents, .github/copilot-instructions.md by one:

-| Always-on agent behavior | `AGENTS.md` or `.github/copilot-instructions.md` |
-| File-scoped guidance | `.github/instructions/*.instructions.md` |
+| Always-on agent behavior | `AGENTS.md` (with `.github/copilot-instructions.md` as a Copilot-only mirror) |
+| File-scoped guidance | nested `AGENTS.md`, or `.github/instructions/*.instructions.md` for Copilot |
+| Reusable agent workflows | a skill folder with `SKILL.md` |

The skill row is new. The table had no place for skills despite appearing in a skills collection.

Where the Copilot-only mechanism is genuinely the right answer, it is still named — and still named for Copilot. Nothing was weakened or removed.

Verification

  • No frontmatter field was added or removed; each skill still validates against the Agent Skills rules (name ^[a-z0-9-]+$ ≤64 chars, folder/name match, description 10–1024 chars), checked with a port of eng/validate-skills.mjs.
  • No bundled references/ or scripts/ file was touched — git diff --stat shows 3 files, 7 insertions, 5 deletions.
  • The three skills still route and load; the edits change wording and one variable, not control flow or rules.

The description said "Use when Copilot must preserve supporting, contradicting,
qualifying, and missing evidence". A skill description is the routing text an agent
reads to decide whether to load the skill; naming one vendor's agent there narrows it
without adding information, and reads as a precondition to an agent that is not
Copilot.

Same sentence, agent-neutral: "Use when an agent must preserve ...".
`${selection}` is a GitHub Copilot prompt variable resolved by the editor's selection
context. It is not part of the Agent Skills specification, so outside Copilot it is
not substituted at all and the instruction reaches the model as the literal string
"${selection}".

That is worse than a cosmetic problem for this skill: the sentence is the task
statement, and it currently tells the agent to check the best practices of
"${selection}" - a scope that does not exist. Rewritten as "the .NET/C# code in the
scope you were asked about", which carries the same intent without depending on a
host that may or may not be there.

Found while porting this skill to a non-Copilot agent; the file is otherwise
unchanged.
Three changes, all in the same direction. Harness engineering is not Copilot-specific,
but this file presented it as though it were.

1. The trigger list opened with "make a repository more reliable for GitHub Copilot or
   other coding agents". Named agents now appear as examples rather than as the
   subject, and `pi` and `Claude Code` are named alongside it.

2. The discovery list now includes `.pi/skills/` and `.agents/skills/`. Both are
   Agent Skills specification locations, so a repository that keeps its skills there
   was invisible to the discovery step that exists to find them.

3. The recommended-artifact table said "Always-on agent behavior: `AGENTS.md` or
   `.github/copilot-instructions.md`", which reads as a choice between equals. It is
   not: `AGENTS.md` is read by 20+ agents, `.github/copilot-instructions.md` by one.
   `AGENTS.md` is now listed first with the Copilot file described as a mirror, the
   file-scoped row offers nested `AGENTS.md` before the Copilot-only path, and a row
   was added for skills, which the table had no place for despite being the subject
   it appears in.

No rule was weakened: where the Copilot-only mechanism is the right one it is still
named, and it is still named for Copilot.
Copilot AI balanced review requested due to automatic review settings October 3, 2026 04:31
@MerverliPy
MerverliPy requested a review from a team as a code owner October 3, 2026 04:31
@github-actions github-actions Bot added skills PR touches skills merge-risk:low requires-submitter-fixes Submission has quality-gate findings that submitter must fix before maintainer review labels Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 3 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: ⏳ Awaiting automation

Risk tier: merge-risk:low — Documentation, metadata, generated output, or a small update to an existing resource
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access.

Why this tier
  • Small update (14 changed lines) to existing resources with no added or removed files

Automated checks

Check Status Details
Line endings ✅ Passed Passed · logs
Spelling ✅ Passed Passed · logs
Generated README consistency ✅ Passed Passed · logs
Skill validation ✅ Passed Passed · logs
Skill lint (vally) ✅ Passed Passed · logs
Risk scan ✅ Passed Passed · logs
Contributor reputation ✅ Passed Passed · logs
Duplicate resource scan ✅ Passed Passed · logs
PR quality signal ⏭️ Skipped Skipped by its workflow · logs
Contributor risk signal 🔧 Infrastructure failure The contributor check succeeded but its result artifact was missing, unreadable, or for another commit · logs

Action needed

  • 🔧 Contributor risk signal hit an automation problem that is not caused by your contribution. Comment /rerun-checks to retry; maintainers are notified if it keeps failing.

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s)
  • No staffed reviewer pool owns these files yet; any reviewer with write access counts as the resource owner.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for f5502f3 · gate run · This comment is maintained automatically — see submission gate docs.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🔍 Vally Lint Results

✅ All checks passed

Scope Checked
Skills 3
Agents 0
Total 3
Severity Count
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ ✅ build-evidence-map (2/2 checks passed)
ℹ️ ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
ℹ️ ✓ spec-compliance: All spec checks passed.
ℹ️ ✓ [valid-refs] All file references across 1 skill(s) are valid.
ℹ️ ✓ valid-refs: All file references resolve to existing files within the skill directory.
ℹ️ 1 skill(s) linted, 1 passed
ℹ️ ✅ dotnet-best-practices (2/2 checks passed)
ℹ️ ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
ℹ️ ✓ spec-compliance: All spec checks passed.
ℹ️ ✓ [valid-refs] All file references across 1 skill(s) are valid.
Full linter output
### Linting skills/build-evidence-map
✅ build-evidence-map (2/2 checks passed)
    ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
        ✓ spec-compliance: All spec checks passed.
    ✓ [valid-refs] All file references across 1 skill(s) are valid.
        ✓ valid-refs: All file references resolve to existing files within the skill directory.

1 skill(s) linted, 1 passed

### Linting skills/dotnet-best-practices
✅ dotnet-best-practices (2/2 checks passed)
    ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
        ✓ spec-compliance: All spec checks passed.
    ✓ [valid-refs] All file references across 1 skill(s) are valid.
        ✓ valid-refs: All file references resolve to existing files within the skill directory.

1 skill(s) linted, 1 passed

### Linting skills/harness-engineering
✅ harness-engineering (2/2 checks passed)
    ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
        ✓ spec-compliance: All spec checks passed.
    ✓ [valid-refs] All file references across 1 skill(s) are valid.
        ✓ valid-refs: All file references resolve to existing files within the skill directory.

1 skill(s) linted, 1 passed

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 review overview

🟡 Changes recommended

The generated skills catalog still contains the old Copilot-specific description.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Decouples three Agent Skills from Copilot-specific assumptions.

Changes:

  • Replaces ${selection} with host-neutral scope wording.
  • Generalizes routing and harness guidance across coding agents.
  • Adds portable skill discovery and artifact recommendations.
File Description
skills/​harness-engineering/​SKILL.md Expands multi-agent guidance.
skills/​dotnet-best-practices/​SKILL.md Removes a Copilot-specific variable.
skills/​build-evidence-map/​SKILL.md Generalizes skill routing text.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

---
name: build-evidence-map
description: 'Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must preserve supporting, contradicting, qualifying, and missing evidence with exact source regions instead of collapsing disagreement into prose.'
description: 'Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when an agent must preserve supporting, contradicting, qualifying, and missing evidence with exact source regions instead of collapsing disagreement into prose.'
`docs/README.skills.md` is generated from the skills' frontmatter by
`eng/update-readme.mjs`, and `validate-readme` fails any pull request where the
generated output does not match the sources. Changing a description without
regenerating it leaves the catalogue advertising the old text.

Output of `npm start`, unedited: one line, the build-evidence-map row. Nothing else
in the generated tree moved, which is the useful part of the check - it confirms the
committed generated files were otherwise in sync.

Pairs with a3556e9; that commit's description change is what this line now matches.
Copilot AI balanced review requested due to automatic review settings October 3, 2026 04:37
@MerverliPy
MerverliPy requested a review from a team as a code owner October 3, 2026 04:37
@github-actions github-actions Bot added awaiting-automation and removed requires-submitter-fixes Submission has quality-gate findings that submitter must fix before maintainer review labels Oct 3, 2026

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 review overview

🟢 Approval recommended

The focused documentation changes are consistent, portable, and introduce no unresolved issues.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review awaiting-automation and removed awaiting-automation ready-for-review Submission passed intake validation and is ready for maintainer review labels Oct 3, 2026
@aaronpowell

Copy link
Copy Markdown
Contributor

Given that the repo is called Awesome Copilot, it makes sense that things are designed to optimise how Copilot behaves.

@aaronpowell aaronpowell closed this Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants