session-delivery-hygiene

$npx mdskill add microsoft/testfx/session-delivery-hygiene

Read [repository instructions](../../copilot-instructions.md) first. Apply only the gates relevant to the task's risks; this skill grants no additional scope, publication permission, or authority over another session.

SKILL.md

.github/skills/session-delivery-hygieneView on GitHub ↗
---
name: session-delivery-hygiene
description: Gate local-session scope, persistent delivery, live PR state, integration provenance, and owned cleanup. Use before implementing guidance changes, changing or pushing PR work, diagnosing package/output mismatches, or handing off implementation.
---

# Session delivery hygiene

Read [repository instructions](../../copilot-instructions.md) first. Apply only
the gates relevant to the task's risks; this skill grants no additional scope,
publication permission, or authority over another session.

## Risk-based gates

1. **Outcome and ownership.** Classify the request as analysis, implementation,
   publication, or an explicitly requested combination. Improving reviewer or
   workflow guidance means editing that guidance, not running or posting a
   review. Preserve the requested repository, branch, paths, and exclusions.
   Confirm the active worktree and existing changes before editing; do not
   overwrite unrelated work or alter user-global settings or other sessions.
2. **Persistent delivery.** For implementation, inspect the actual final files
   and Git diff, including staged and untracked files, against each requested
   outcome. Inspect commits too when the worktree is clean. A plan, status
   update, successful command, or agent's completion message is not a delivered
   change. Validate the changed artifact itself; for guidance, check skill
   metadata, local links, examples, and consistency with existing instructions.
   If no change is needed, explain the evidence rather than claiming a fix.
3. **Live PR destination.** Immediately before editing PR-linked work or
   pushing it, read the PR's live state, base/head repositories and refs, and
   head SHA; confirm the destination still matches the requested work. Recheck
   before publication if the state may have changed. Never push to or recreate
   a merged PR's old head branch. Use a new follow-up branch and, only when
   publication is authorized, a new PR targeting the intended base branch;
   do not infer that target from a local checkout or default to `main`.
   For a closed unmerged PR, stop publication unless reopening or a follow-up
   is authorized. If live state cannot be read, do not push based on stale
   session metadata. Local commits do not prove delivery to a live PR.
4. **Integration provenance.** Before diagnosing stale-package or launch
   failures, identify the exact consumer checkout, configuration, TFM/RID,
   executable/output layout, producer commit, and package ID/version. Inspect
   the consumer's effective NuGet configuration, `NUGET_PACKAGES` or
   `RestorePackagesPath`, and resolved paths in `project.assets.json`; a global
   cache listing does not identify a repository-local restore. For packaged
   apps, verify package identity/version, registration install location, and
   the launched process/loaded binary paths belong to the output under test.
   Establish or correct that provenance before concluding the implementation
   is defective; rebuilding elsewhere is not proof the consumer used it.
5. **Owned cleanup.** Track only resources created or temporarily changed for
   this task: process IDs and executable paths, exact package registrations and
   install locations, temporary files, and prior override values. Reconfirm
   ownership before cleanup; stop processes by specific PID, remove only
   task-owned registrations/files, and restore temporary overrides to their
   prior values. Never kill by process name, unregister all matching apps,
   clear entire shared/global caches, or recursively delete broad directories.
   Prefer isolated outputs/caches; even a targeted cache eviction requires
   proof of the consumer's actual path and ownership. Leave borrowed resources
   untouched and report any owned cleanup that could not be completed.

## Evidence-based handoff

Lead with the implemented outcome or concrete blocker, then name changed
artifacts and their actual delivery state. These states are not interchangeable:

| State | Required evidence |
| --- | --- |
| Local | Final file/diff exists in the identified worktree. |
| Committed | Commit SHA contains the intended changes. |
| Pushed | Read the destination remote ref and verify it contains that commit. |
| Published | Read the live PR/comment/other object and verify the intended content and current head where applicable. |
| CI-verified | Relevant checks passed for the exact published head SHA, not an earlier or merged PR. |

Include the decisive validation result and any remaining blocker or owned
cleanup. Do not label local validation as CI, or a push as publication. Existing
GitHub-body readback and composed-product validation requirements still apply.
Finish the requested work without status-only handoffs, invented follow-up
tasks, or unsolicited publication.

More from microsoft/testfx

SkillDescription
assertion-qualityAnalyze assertion quality, depth, variety, and false confidence in existing tests. ALWAYS USE when asked about weak, shallow, trivial, always-true, self-referential, assertion-free, presence/truthiness-only, or insufficiently diverse assertions, including MSTest, Jest, pytest, and Go. DO NOT USE for direct fixes: writing-mstest-tests owns supplied MSTest assertions; code-testing owns new cases. Use test-gap-analysis when asked whether tests would catch a production change, and test-anti-patterns for general severity-ranked audits.
behavior-preserving-refactorPreserve observable behavior when splitting files, moving members, consolidating helpers, or simplifying TestFx code. Use for structural refactors and file-diet implementation; inventory baseline semantics and consumers, then run focused equivalence checks.
binlog-failure-analysisDiagnose existing MSBuild .binlog failures with MCP/replay; not log capture or non-MSBuild failures.
binlog-generationCapture and verify unique MSBuild binlogs, quoting '-bl:{}' in PowerShell; not analysis of existing logs.
build-parallelismAnalyze an MSBuild solution, solution filter, or Build.proj that schedules multiple project files. USE FOR: measured idle worker nodes, `-m` that does not scale, a serial ProjectReference critical path, graph builds, or an MSBuild task that builds a Projects list. Requires at least two distinct project files whose scheduling or throughput must be analyzed. DO NOT USE for non-MSBuild build systems.
build-perf-baselineMeasure repeatable cold/changed-input/no-op MSBuild baselines for caching, output layout and graph tuning; not task diagnosis or non-MSBuild builds.
build-perf-diagnosticsDiagnose MSBuild target/task/analyzer bottlenecks from binlogs after baselining; not baseline setup, incremental correctness or parallelism tuning.
check-bin-obj-clashDetects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing/overwritten outputs in multi-project or multi-targeting builds where bin/obj (or project.assets.json) collide. Common causes: shared OutputPath, missing AppendTargetFrameworkToOutputPath, extra global properties (e.g. PublishReadyToRun), or SetTargetFramework on a ProjectReference to a single-targeting project. DO NOT USE FOR: file access errors unrelated to MSBuild (OS-level locking), single-project single-TFM builds, non-MSBuild build systems.
code-testing>-
code-testing-agent>-