智能终端性能变更审查
performance-review
审查本地工作区、提交范围、分支或 PR 中的智能终端性能变更。适用于渲染器、文本缓冲区、VT、UI 线程、标签/窗格、WTA、异步、会话、日志、内存分配、事件放大、基准测试、性能分析(profiling)、响应性、内存以及 CI 成本相关的变更。
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 2.2k
- Forks
- 179
01 前言 Front Matter
- name
- performance-review
- description
- Review Intelligent Terminal performance changes in local work, commit ranges, branches, or PRs. Use for renderer, text-buffer, VT, UI-thread, tab/pane, WTA, async, session, logging, allocation, event-amplification, benchmark, profiling, responsiveness, memory, and CI-cost changes.
03 SKILL.md 正文
Performance Review
Investigate how a change affects typing, rendering, tab switching, WTA startup, session refresh and repeated work. Establish the affected scenario and cost before recommending an optimization.
Review context
Establish the baseline and reviewed changes from the caller's local diff, commit range, branch comparison or PR. Record the exact snapshot for mutable work so later edits cannot be mistaken for reviewed evidence.
Identify changed files, affected components and callers. File and line counts help estimate effort; execution frequency, data growth and subsystem risk determine which paths merit deeper investigation. Caller-supplied scope and analyzer output are discovery inputs, not proof of complete coverage. Review every relevant language independently of edit permissions. A Rust-only repair allowlist does not exclude C++, XAML, rendering or UI-thread paths from source review. State uninspected paths as coverage gaps.
Review produces Markdown using the results template below. The caller owns execution permissions, additional output formats, validation and delivery. Review-only is the default; authorized corrections follow the repair criteria.
Investigation
Inspect the complete patch and compare behavior with the baseline. Trace the changed functions into repeated lifecycle and event paths: renderer and TerminalCore, text buffer, VT parser/adapter, UI thread, tab/pane ownership, WTA process pooling, tasks, locks, channels, session/log enumeration, allocations, copies and notification amplification.
Apply each rule when its trigger appears in the changes or affected callers. Record the rule ID with its evidence.
| Rule | Trigger | Investigation | Intentional cases |
|---|---|---|---|
PERF-REPEATED-WORK |
A loop, lookup, copy or enumeration changes on a repeated path. | Compare work as input grows; establish caller frequency and actual bounds. Inspect nested scans and collections used only for count or membership. | Fixed small bounds, one-time startup, required snapshots and amortized work. |
PERF-UI-BLOCKING |
A UI callback or dispatcher path gains synchronous work. | Trace the executing thread, I/O, waits and traversal through callees; identify the stalled interaction and its blocking cost. | Already-background work, bounded cheap callbacks and required thread affinity. |
PERF-MVVM-AMPLIFICATION |
A property, binding, collection update or subscription changes. | Trace notifications to consumers; count expensive refreshes per logical change, including bulk updates and reentrancy. | Required individual notifications, cheap consumers and existing batching. |
PERF-ASYNC-CONTENTION |
Lock scope, awaits, channels or synchronous work in a task changes. | Establish what survives suspension, who contends and how ordering affects progress; verify actual scopes. | Async-aware locks, released guards, intentional backpressure and non-suspending operations. |
PERF-OWNER-LIFETIME |
Tabs, panes, tasks, subscriptions, helpers or pools have different lifetimes. | Trace repeated creation through teardown and cancellation; identify retained work or memory beyond its intended owner. | Resident pools, pre-warmed helpers, stash/restore and deliberately longer-lived bounded tasks. |
Analyzer and measurement evidence
Inspect each diagnostic in source before adopting it. Comparable results identify revisions, tool versions, configuration, target and analyzed scope. Separate new or worsened costs from unchanged baseline debt; moved lines alone are not new defects. Shared headers or callers can worsen behavior outside edited lines. Check the actual implementation and version of library helpers before claiming a cost difference; an owned return value can transfer an allocation rather than reuse it. Trace existing backoff, caps and cleanup before recommending them.
Available repository entrypoints include the opt-in C++
PerformanceAnalysis=Extended profile, cargo wta-perf and
cargo wta-perf-extended. Use their definitions in the build configuration
and Cargo aliases as the authority for checks and commands. Ordinary Cargo
builds do not run Clippy.
C++ project selection is provisional until evaluated MSBuild ClCompile
membership establishes translation-unit coverage. Successful prerequisite
builds are not additional analyzer coverage. Unmapped sources, shared callers,
headers and unsupported languages remain explicit coverage gaps.
Interpret warnings in context. await_holding_lock can warn after an explicit
drop; collections may preserve iterator or clone side effects; boxing a large
future trades stack size for allocation. Group membership and machine-fix
availability do not establish impact or behavioral safety.
Inspect existing evidence where relevant: src/ConsolePerf.wprp,
src/tools/ConsoleBench, test/e2e/Measure-PaneContext.ps1,
build/scripts/Measure-AgentHookOverhead.ps1, focused tests and duration
telemetry.
| Evidence | What it establishes |
|---|---|
| Source / complexity / blocking / lifetime proof | A concrete causal cost under stated execution and input bounds. |
| Microbenchmark | Cost of the measured operation, not end-to-end improvement. |
| End-to-end measurement | Impact on the measured user scenario and environment. |
| Profile | Where measured work or resource use accumulates. |
| Native test | Behavior covered by that test on the exact validated source. |
| Missing, partial or failed analysis | A coverage gap or blocker, not a clean result. |
Separate application performance, responsiveness, memory growth and CI runtime/cost. Record the native OS, architecture, tooling and measurement conditions. Noisy measurements need at least three samples and their spread; cross-platform timings remain evidence for the platform actually measured.
Triage and repair
Classify each finding as HIGH, MEDIUM or LOW before choosing its disposition. Rank severity by demonstrated scenario impact, frequency or growth, not by how easy a fix is. Do not promote a finding to HIGH to make it autofix-eligible. Collapse duplicate warnings for the same underlying defect.
| Result | Disposition |
|---|---|
| HIGH, high confidence, measured regression or proven complexity/blocking/lifetime defect on a relevant path | Propose the smallest behavior-preserving correction. |
| Important defect with redesign, ordering/lifetime uncertainty or unsupported validation | Manual handoff with evidence and missing proof. |
| Plausible cost with uncertain impact or frequency | MEDIUM/LOW advice with uncertainty and tradeoffs. |
| Unrelated baseline debt, negligible bounded cost, intentional behavior or false positive | Explain the exclusion in check evidence. |
Every finding needs an introduced, unintended cost and its affected scenario. Do not fill finding rows with observations that conclude the work is negligible, unchanged or intentional; record those exclusions in checks instead. A source proof of blocking, repeated work or unbounded retention does not require a benchmark, but an unexplored alternative implementation is not such proof.
Proof that work exists is not proof that it merits HIGH repair. Tie its growth, blocking or retention to the affected scenario's actual bounds/frequency or demonstrated impact. An unnecessary allocation or copy with no such context remains MEDIUM/LOW advice, even if its local replacement is obvious. A separate HIGH defect in the same file does not authorize editing an advice-only finding.
Only HIGH findings are eligible for authorized autofix, and only when they are high-confidence, small and localized, behavior-preserving, and supported by repository-specific evidence. Build and test are not prerequisites for committing an authorized proposal: the original reviewer owns validation and may revert the proposed fix commit. Broad threading, caching, architecture, dependency or policy changes require separate design work. When committing is authorized, make one separate minimal commit per HIGH finding and put its commit link in that finding's table row. Do not combine findings or add unrelated cleanup.
Preserve existing tests and intended semantics. Analyzer replacements need the same proof as hand-written changes: a reference parameter can affect ABI or coroutine lifetime, and reserved capacity can increase retained memory. Insufficient evidence or validation results in an unresolved handoff rather than a broader edit. Report source changes and validation separately so a proposal cannot be mistaken for a verified improvement. When proposals are committed, include one notice below the findings table: "Proposed fixes committed without build/test. The original reviewer owns validation and may revert the fix commit." Do not repeat it for each finding.
Results template
Keep the opening summary as prose. Use tables for findings and checks, ordered HIGH, MEDIUM, LOW; within a severity, show validated corrections, proposals, manual handoffs and advice in that order. Include exact commands/results and missing evidence. With no actionable findings, use that plain statement instead of placeholder rows.
## Performance review
<One sentence describing the outcome and most important impact.>
### Findings
| Severity | Rule / location | Finding and impact | Disposition | Commit | Validation |
| --- | --- | --- | --- | --- | --- |
| HIGH / MEDIUM / LOW | <rule ID; path:line> | <scenario and evidenced cost> | Proposed fix commit / Manual handoff / Advice only | <actual commit link, or None> | <performed check or Not built/tested> |
<For committed proposals, put one shared build/test ownership and rollback
notice here; omit it when nothing was committed.>
### Checks performed
| Check | Scope / command | Result | Missing evidence |
| --- | --- | --- | --- |
| <analyzer or architecture rule> | <actual scope and command/inspection> | Completed / Failed / Not run | <gap, or None> |
Completed records that a check ran; it does not imply no findings or measured
gain. A validated correction names its exact source and completed validation.
Unavailable or failed checks remain visible even when source review is complete.
04 同仓库更多 Skills
商店上架信息本地化
store-listing-localizer
自动化 Microsoft Store(Partner Center)上 Intelligent Terminal(Store ID 9NMQC2SSJX24)的应用上架信息本地化。当被要求导出/导入商店上架信息、将发布说明/描述/字幕/功能本地化为 80 多种语言、更新 listingData CSV,或推送商店上架信息翻译而无需在 Partner Center 中手动点击操作时使用。通过 Playwright MCP 驱动 Partner Center 的导出/导入,并将各语言的翻译合并到 listingData CSV 中。
上游代码同步
upstream-sync
定期将 microsoft/terminal 的新提交同步到这个手动 fork 的 intelligent-terminal 仓库,方式是逐个 cherry-pick 提交到带日期的同步分支,自动跳过 revert 对和空提交,自动解决已知的 take-upstream 文件,并在遇到真正的冲突时干净地停止。agent(即你,阅读本文件时)是编排者——PowerShell 脚本是由你一次调用一个的原子操作。当用户要求“同步上游”、“从 microsoft/terminal 拉取”、“运行上游同步”、“跟上上游”,或将其接入调度器(每周/每日)时使用。设计上可在重复无人值守运行时保持安全。
发布说明自动生成
release-notes
为 Intelligent Terminal 生成面向用户的发布说明。当被要求撰写发布说明、变更日志、新特性摘要或准备发布时使用。比较各版本之间的 git 提交,查找与 PR 关联的 issue 和社区贡献者,然后输出格式化的发布说明,包含“动词 + 影响 + 场景”风格的要点、issue 引用和贡献者致谢。
智能终端集成测试设计与验证
pr-integration-test
为指定的拉取请求或回归问题设计、实现并验证智能终端集成测试。当被要求添加 PR 集成测试、将 Bug 修复转化为 E2E 覆盖、证明现有行为仍然有效、将测试映射到发布清单,或核验 E2E 报告已将清单用例标记为完成时。
Windows 界面无障碍审查修复
pr-accessibility
审查并修复原生 Windows WinUI、XAML、C++、UI Automation、键盘、焦点、屏幕阅读器、高对比度、缩放、设置、标签、窗格和 agent-card 的无障碍变更。用于智能终端 UI 拉取请求的无障碍分析以及针对性的本地无障碍检查。
智能终端 PR 安全审查
ghaw-pr-security
审查智能终端(Intelligent Terminal)的 pull request,涵盖 C++/WinRT、COM、WTA、ACP、session MCP、hooks、终端变更、路径、诊断、打包和 GitHub Actions 的安全回归。用于基于证据的不可变 diff 审查和结构化 HIGH/medium/low 分级发现。