AGENT SKILL

session-delivery-hygiene

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.

License 许可
MIT
所属仓库
microsoft/testfx
最近更新
2026-11-14
Stars
★ 1.1k
Forks
315

01 前言 Front Matter

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.

03 SKILL.md 正文

Session delivery hygiene

Read repository instructions 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.

04 同仓库更多 Skills

microsoft
microsoft/testfx

dotnet-breaking-changes

Use before changing .NET/C# code whose callers you do not control: a NuGet library, or a repo with PublicAPI.Shipped/Unshipped.txt, ApiCompat, multiple TargetFrameworks, InternalsVisibleTo, or generated (.g.cs) partials. Green builds miss silent breaks from optional parameters, parameter names, sealing, const values, nullability, and #if. USE FOR: "without breaking existing callers"; adding a public method, overload, optional parameter, or interface member to a shipped library; renaming a public method or an internal helper a friend assembly uses; consolidating duplicated logic; changing a signature, nullability, default, or attribute; adding a target framework; RS0016/RS0017 or ApiCompat errors; "is this PR breaking?". For a rename, extract, or merge, also invoke csharp-refactoring. DO NOT USE FOR: an executable whose callers all live in one project; renaming a local variable or private member, even in a shipped library; formatting; framework/SDK/NuGet upgrades (use dotnet-upgrade).

★ 1.1k
microsoft
microsoft/testfx

testfx-test-value-evidence

Apply the vendored test-value-evidence skill with TestFx toolchain, assertion, parallel-safety, packed-consumer, and review conventions. Use when implementing or reviewing behavior-changing TestFx PRs or commits, including source-only changes.

测试与质量
★ 1.1k
microsoft
microsoft/testfx

testfx-parallel-safety-preflight

Check concurrency and isolation before implementing or refactoring TestFx tests, lifecycle code, helpers, shared-state declarations, or production paths those tests exercise. Use before narrowing DoNotParallelize or ResourceLock, changing parallelization settings, or introducing asynchronous workers; repeat against the final diff.

★ 1.1k
microsoft
microsoft/testfx

testfx-localization-validation

Validate generated TestFx localization catalogs, resource IDs, placeholders and locked tokens. Use for RESX/XLF changes, OneLoc PRs, localization build failures, duplicate targets or units, and orphaned translation entries.

★ 1.1k
microsoft
microsoft/testfx

testfx-acceptance-validation

Validate TestFx shipping paths and capable CI execution using packed consumers, package/cache provenance, exact exits and artifacts, and selected-versus-executed test evidence. Use for acceptance regressions, package/MSBuild/launcher/protocol changes, or skipped-only CI results; not for unrelated unit-only or documentation changes.

测试与质量
★ 1.1k
microsoft
microsoft/testfx

post-release-activities

Systematic activities that need to be performed after a release is done.

★ 1.1k