You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a smaller intent-drift check, grounded in a real Copilot session - #6367
A diff-review skill for checking whether current work still matches the original request:
State the request and the test/behavior that decides done (full requested suite/acceptance, plus preserved security/input-validation constraints).
Inspect git status --short --untracked-files=all, git diff, and git diff --cached, and read untracked files.
Confirm a passing baseline, split mixed hunks into logical changes, and classify each as required or out of scope (keep and flag required controls such as input validation for human review when tests do not cover them).
Revert only out-of-scope changes (index first, then working tree), remove agent-created out-of-scope untracked files, re-run the acceptance check, and report a concrete verdict based on request, acceptance, and diff.
This skill is package-free: it uses only git and the repository's existing acceptance command. It does not install or run external PyPI/npm engine packages and does not rely on external alignment scores in the verdict.
A real GitHub Copilot CLI 1.0.109 session (kept as a historical transcript) where a passing test fix also introduced unrelated edits; /intent-drift reverted out-of-scope changes and kept the required fix.
An illustrative current-procedure walkthrough showing how the package-free SKILL.md flow applies to the same scenario, including keeping/flagging the discount clamp as input validation for human review.
The historical transcript is preserved verbatim and labeled as history, with a caveat that the current procedure keeps the discount clamp as input validation rather than reverting it.
Validation
npm run skill:validate — passes (intent-drift is valid)
npm run build — regenerated docs/marketplace outputs as needed
bash .github/scripts/maintenance/fix-line-endings.sh — run
Manual review of skills/intent-drift/SKILL.md and skills/intent-drift/examples/real-session.md against the current diff-review procedure
Replace the heuristic scoring engine from github#6242 with a short diff-review procedure. The check uses the request's acceptance test to classify each change as required or out of scope, reverts only out-of-scope hunks, and re-runs the check.
The worked example is a real GitHub Copilot CLI session where a test fix also changed unrelated behavior; the check caught the scope creep and restored the minimal fix.
Risk tier:merge-risk:high — Privileged execution, automation, or review-policy change Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access, including a maintainer with admin or maintain permission.
Why this tier
Label needs-review:HIGH flags a high contributor-risk signal
✓ [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
Full linter output
### Linting skills/intent-drift
✅ intent-drift (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
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The intent-drift workflow can miss staged, untracked, or mixed-hunk changes, reject necessary test updates, and report corrections without complete validation or an appropriate uncorrected verdict.
Adds a lightweight intent-drift skill to help Copilot identify and undo changes outside the user’s request, replacing the broader scoring-based approach proposed in #6242.
Changes:
Defines a diff-review procedure with acceptance checks, scope classification, selective reverts, and structured reporting.
Includes a real Copilot CLI session demonstrating removal of unrelated edits while preserving a test fix.
Registers the skill in the generated skills catalog.
File
Description
skills/intent-drift/SKILL.md
Defines the intent-drift review and correction procedure.
skills/intent-drift/examples/real-session.md
Documents a cart-test repair and subsequent scope correction.
docs/README.skills.md
Adds the skill’s installation command, description, and example link.
Use the full requested test suite for necessity and post-revert checks, review staged and untracked changes, split mixed hunks before classification, add a drifted (uncorrected) verdict, and allow test updates that follow a requested behavior change.
Pushed ea988b0a to address the five review points:
Full suite, not just the first failure — step 1 now defines acceptance as the full suite the request refers to, and step 5 re-runs that full suite after reverts.
Staged and untracked changes — step 2 now inspects git diff, git diff --cached, and reads untracked files from git status.
Mixed hunks — step 3 now splits each hunk into the smallest independently reviewable changes before applying the necessity test, and only judges a whole hunk when it truly cannot be split. The worked example now calls out that its single mixed hunk had to be split.
Uncorrected verdict — the verdict is now on track | drifted (uncorrected) | drifted (corrected); drifted (corrected) is only allowed after the reverts are complete and the acceptance check passes, and a revert that breaks the check means the change was required.
Test updates for requested behavior changes — the blanket test rule is replaced: weakening/skipping/deleting a test to make it pass is drift, but updating assertions that encode old behavior is required when the user asked to change that behavior.
Validation: npm run skill:validate passes, npm run build regenerated, line endings normalized.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The workflow can miss staged or untracked drift and incorrectly direct removal of required changes or security controls when acceptance checks are incomplete or already failing.
Require security review before removing untested controls
skills/intent-drift/SKILL.md:46
When the acceptance suite omits unauthorized requests, this rule can classify a necessary authorization check as out of scope and direct its removal in step 5. Re-running the same suite will not detect that loss of protection. Include required security constraints in the acceptance criteria, and require review rather than reverting a security control solely because tests pass without it.
List every untracked file with --untracked-files=all, require a passing baseline before classification (otherwise report inconclusive), revert staged drift as well as working-tree drift and recheck both diffs, and never revert security controls just because tests pass without them.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because reading all untracked files risks exposing sensitive data, while agent-added tests can incorrectly justify out-of-scope changes.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The skill runs third-party packages without an explicit approval step and unsafely interpolates request text into executable code, creating critical security risks.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for narrowing this to a concrete diff-review workflow. The steps for splitting mixed hunks and restoring staged changes before working-tree changes give the skill a useful, evidence-based core. However, step 4 now requires installing the author's PyPI package and running npx -y intent-drift@1.1.0 on every invocation, making the scores part of the verdict. That brings back the scoring approach discussed in #6242, where the review found the score was not a dependable signal, and it also runs downloaded package code during routine use. Please remove the mandatory dual-engine step, or make it explicitly opt-in and keep its scores out of the verdict. The real-session example predates these engines, so please add GitHub Copilot validation of that path if you retain it.
@aaronpowell Thanks for the review — pushed f898ce10 to address this:
Removed the mandatory dual-engine step and all external package execution (intent-drift==0.1.3 / npx -y intent-drift@1.1.0), so the skill no longer installs/runs third-party code or uses alignment scores in the verdict.
The procedure is now a concrete diff review driven by the request, acceptance check, and the diff (verdict based on that evidence only).
Validation: npm run skill:validate and npm run build passed locally. Happy to adjust further if needed.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The skill advertises pinned PyPI and npm engine cross-checks but invokes neither package and excludes external scores from its drift verdict, leaving the documented validation absent.
Clarify package-free diff-review workflow (no PyPI/npm engine checks or external alignment scores) and add a current-procedure GitHub Copilot validation walkthrough to the worked example while keeping the historical transcript labeled.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The PR description promises engine integration that the skill forbids, while the example contains inconsistent change classifications and insufficient evidence for its end-to-end validation claim.
Label current-procedure example as illustrative (not captured artifacts), classify discount clamp as kept/flagged required control, and document all reverted logical changes; align worked-example text with package-free workflow.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because the rules can misclassify requested work, preserve test bypasses, and trigger destructive cleanup without explicit authorization.
Replied on the open thread about the PR description: the PR body already reflects the package-free workflow (git + existing acceptance command only; no pinned PyPI/npm engine runs and no external alignment scores).
Tightened skills/intent-drift/SKILL.md classification to reduce misclassification: changes that implement the stated request or required security/input-validation constraints are treated as required even if the current acceptance check does not cover them; ambiguous cases require asking before reverting.
Strengthened the test rule to explicitly call out bypasses (broadening assertions, commenting out checks, skip/xfail/todo markers) unless explicitly requested, and to preserve/replace coverage when removing obsolete tests.
Made untracked-file cleanup non-destructive by default: only remove an out-of-scope untracked file if it was created in this task and is clearly not user-authored; otherwise keep it, report it, and ask before deleting.
Validation: npm run skill:validate (462 skills), npm run build, and bash .github/scripts/maintenance/fix-line-endings.sh (known pre-existing macOS sed noise; no intent-drift line-ending issues).
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The current procedure lacks a captured Copilot run on a real repository diff with verified classifications; the existing walkthrough is illustrative and the only recorded run uses a throwaway repository and earlier behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A diff-review skill for checking whether current work still matches the original request:
git status --short --untracked-files=all,git diff, andgit diff --cached, and read untracked files.This skill is package-free: it uses only
gitand the repository's existing acceptance command. It does not install or run external PyPI/npm engine packages and does not rely on external alignment scores in the verdict.Worked example
skills/intent-drift/examples/real-session.mdincludes:/intent-driftreverted out-of-scope changes and kept the required fix.SKILL.mdflow applies to the same scenario, including keeping/flagging the discount clamp as input validation for human review.The historical transcript is preserved verbatim and labeled as history, with a caveat that the current procedure keeps the discount clamp as input validation rather than reverting it.
Validation
npm run skill:validate— passes (intent-drift is valid)npm run build— regenerated docs/marketplace outputs as neededbash .github/scripts/maintenance/fix-line-endings.sh— runskills/intent-drift/SKILL.mdandskills/intent-drift/examples/real-session.mdagainst the current diff-review procedure#6242 stays closed; this is a fresh PR.