Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/copilot-instructions.local.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Local Copilot Instructions

- ユーザーとは日本語で会話し、内部の思考は英語で行う。
- WindowThumbWall プロジェクトの配布形式は MSIX, MSI, ZIP の 3 種類を正とし、配布・文書・CI の変更でもこの前提を崩さない。
- ユーザー指示が具体的な場合、変更範囲はその依頼に直接必要な差分だけに限定する。
- 実行中に見つけた別問題は、ユーザーの明示指示がない限り同じ変更へ混ぜない。
- PR 発行依頼では、依頼外のリリースノート、ドキュメント、パッケージング修正、生成物作成を自動で追加しない。
9 changes: 9 additions & 0 deletions .github/workflows/build-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,19 @@ jobs:
-p:PublishSingleFile=false `
-o "publish-msi-$arch"

$plainVersion = $env:VERSION -replace '^v', ''
if ($plainVersion -match '^\d+\.\d+\.\d+$') {
$versionParts = $plainVersion.Split('.')
$msiProductVersion = "$($versionParts[0]).$($versionParts[1]).$($versionParts[2]).0"
} else {
$msiProductVersion = (Select-Xml -Path WindowThumbWall.csproj -XPath '/Project/PropertyGroup/AssemblyVersion').Node.InnerText
}

wix build packaging\WindowThumbWall.wxs `
-arch $arch `
-ext WixToolset.UI.wixext `
-d PublishDir="publish-msi-$arch" `
-d ProductVersion="$msiProductVersion" `
-o "$env:DIST_DIR\WindowThumbWall-$env:VERSION-win-$arch.msi"

# ── MSIX artifact ───────────────────────────────────────
Expand Down
46 changes: 46 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# WindowThumbWall Local AGENTS

## Language

- ユーザー向けの説明は日本語で行う。
- 内部の推論とツール判断は英語で行う。

## Incident Rule: Scope Control

### Background

2026-04-08 の作業で、ユーザーの指示は「バージョンを 0.6.6 にして、main に PR を発行して」だった。
その一方で、エージェントは以下の指示外変更まで行った。

- リリースノートの新規追加
- `docs/notification-attention-design.md` の更新
- `packaging/build-zip.ps1` と `packaging/build-msi.ps1` の修正
- `packaging/WindowThumbWall.wxs` の修正
- ZIP/MSI の実ビルドによる追加生成物作成

### Cause Analysis

- 依頼達成に必要な最小変更と、「見つけた不整合をついでに直す」行為を分離できていなかった。
- 「PR を安全に出すための確認」と「リリースのための周辺整備」を混同した。
- 実行中に見つけた問題を、ユーザー承認なしに同一 PR へ含めてよいと誤判断した。

### Mandatory Countermeasures

- ユーザー指示が具体的なときは、差分の目的をその指示に直接必要なものへ限定する。
- 実行中に別の問題や改善点を見つけても、ユーザーが明示していない限り修正しない。
- ドキュメント追加、リリースノート追加、パッケージング修正、ビルド生成物作成は、明示依頼または実行必須条件がある場合に限る。
- `PR を出す`, `main に向ける`, `バージョンを上げる` といった依頼では、便乗 cleanup・便乗 hardening・便乗 release prep を禁止する。
- 「安全のため」という理由だけで、依頼外ファイルの編集を正当化してはいけない。必要なら編集前にユーザーへ確認する。
- ステージ前に「この PR に含めるファイル群は依頼範囲内か」を確認し、依頼外ファイルを含めない。

## Operational Rule: Direct-Request PR Flow

- ユーザーが PR 発行を指示した場合、まず base branch との差分汚染がないか確認する。
- その確認は許可されるが、確認中に見つけた別問題を自動修正してはいけない。
- PR 作成に必要な版数同期や既存実装の完了は進めてよい。
- PR 作成に不要な新規ファイル追加は行わない。

## Protected Surfaces

- この `AGENTS.md`、`.github/copilot-instructions.local.md`、その他のエージェント設定は保護対象とする。
- これらを変更するのは、ユーザーが明示した場合に限る。
8 changes: 8 additions & 0 deletions LocalizedText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public static class LocalizedText
["button.fullscreen"] = "Fullscreen (Enter)",
["button.shortcuts"] = "Shortcut Keys: Enter / Esc",
["setting.osNotifications"] = "Reflect OS notifications",
["setting.osNotifications.supportedHint"] = "Requires the installed MSIX build with notification access enabled.",
["setting.osNotifications.requiresPackage.title"] = "OS notifications unavailable",
["setting.osNotifications.requiresPackage.message"] = "Reflect OS notifications only works in the installed MSIX build. The unpackaged dotnet/Debug run cannot subscribe to Windows notifications.",
["setting.osNotifications.requiresPackage.inline"] = "This run is unpackaged. Use the installed MSIX build to enable OS notification attention.",
["hint.summary"] = "Double-click a window -> add to monitor.\nRight-click a window -> Add to monitor / Add app.\nAuto-add app list: right-click or drag to reorder.\nClick cell -> activate source window.\nRight-click cell -> Unassign / Exit fullscreen.\nDrag cells -> reorder monitor layout.\nEnter / Esc -> toggle fullscreen.\nClick here for full controls.",
["hint.more"] = "→ Click for details",
["slot.empty"] = "(empty)",
Expand Down Expand Up @@ -59,6 +63,10 @@ public static class LocalizedText
["button.fullscreen"] = "全画面表示 (Enter)",
["button.shortcuts"] = "ショートカットキー: Enter / Esc",
["setting.osNotifications"] = "OSの通知を反映させる",
["setting.osNotifications.supportedHint"] = "通知アクセスを許可したインストール版 MSIX で動作します。",
["setting.osNotifications.requiresPackage.title"] = "OS 通知は利用できません",
["setting.osNotifications.requiresPackage.message"] = "OS の通知反映は、インストール済みの MSIX 版でのみ利用できます。未パッケージの dotnet/Debug 実行では Windows 通知を購読できません。",
["setting.osNotifications.requiresPackage.inline"] = "この実行は未パッケージです。OS 通知の注意喚起を使うには、インストール版 MSIX で起動してください。",
["hint.summary"] = "ウィンドウをダブルクリック -> モニターに追加。\nウィンドウを右クリック -> モニターに追加 / アプリを追加。\n自動追加アプリ一覧は右クリックまたはドラッグで並び替え。\nセルを左クリック -> 元ウィンドウをアクティブ化。\nセルを右クリック -> 選択解除 / 全画面解除。\nセルをドラッグ -> モニター配置を並び替え。\nEnter / Esc -> 全画面切替。\nここをクリックで詳細表示。",
["hint.more"] = "→ クリックで詳細",
["slot.empty"] = "(空)",
Expand Down
3 changes: 2 additions & 1 deletion MainWindow.Localization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ private void ShortcutGuideButton_Click(object sender, RoutedEventArgs e)
private void SettingsButton_Click(object sender, RoutedEventArgs e)
{
var settingsWindow = new SettingsWindow(
_notificationAttentionEnabled,
_notificationAttentionRequested,
SupportsNotificationAttentionRuntime(),
enabled => SetNotificationAttentionEnabled(enabled))
{
Owner = this
Expand Down
Loading
Loading