mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Title: Docs: consolidate Copilot instructions and prompt metadata ## Summary - Consolidated AI guidance into a root AGENTS.md and new `.github/instructions` files, removing older per-folder instructions. - Scoped instruction files for pipelines, common libraries, runner/settings UI, prompts, and simplified `.github/copilot-instructions.md` to point to the sources of truth. - Fixed prompt frontmatter (YAML markers, quoted fields, headings) across built-in prompt files. - Most instructions.md is from https://github.com/github/awesome-copilot ## Testing - Not run (documentation/instructions-only change)
2.4 KiB
2.4 KiB
description, applyTo
| description | applyTo |
|---|---|
| Guidelines for Runner and Settings UI components that communicate via named pipes and manage module lifecycle | src/runner/**,src/settings-ui/** |
Runner & Settings UI – Core Components Guidance
Guidelines for modifying the Runner (tray/module loader) and Settings UI (configuration app). These components communicate via Windows Named Pipes using JSON messages.
Runner (src/runner/)
Scope
- Module bootstrap, hotkey management, settings bridge, update/elevation handling
Guidelines
- If IPC/JSON contracts change, mirror updates in
src/settings-ui/** - Keep module discovery in
src/runner/main.cppin sync when adding/removing modules - Keep startup lean: avoid blocking/network calls in early init path
- Preserve GPO & elevation behaviors; confirm no regression in policy handling
- Ask before modifying update workflow or elevation logic
Acceptance Criteria
- Stable startup, consistent contracts, no unnecessary logging noise
Settings UI (src/settings-ui/)
Scope
- WinUI/WPF UI, communicates with Runner over named pipes; manages persisted settings schema
Guidelines
- Don't break settings schema silently; add migration when shape changes
- If IPC/JSON contracts change, align with
src/runner/**implementation - Keep UI responsive: marshal to UI thread for UI-bound operations
- Reuse existing styles/resources; avoid duplicate theme keys
- Add/adjust migration or serialization tests when changing persisted settings
Acceptance Criteria
- Schema integrity preserved, responsive UI, consistent contracts, no style duplication
Shared Concerns
IPC Contract Changes
When modifying the JSON message format between Runner and Settings UI:
- Update both
src/runner/andsrc/settings-ui/in the same PR - Preserve backward compatibility where possible
- Add migration logic for settings schema changes
- Test both directions of communication
Code Style
- C++ (Runner): Follow
.clang-formatinsrc/ - C# (Settings UI): Follow
src/.editorconfig, use StyleCop.Analyzers - XAML: Use XamlStyler or run
.\.pipelines\applyXamlStyling.ps1 -Main
Validation
- Build Runner:
tools\build\build.cmdfromsrc/runner/ - Build Settings UI:
tools\build\build.cmdfromsrc/settings-ui/ - Test IPC: Launch both Runner and Settings UI, verify communication works
- Schema changes: Run serialization tests if settings shape changed