Skip to content

Refactor agent specifications and unify InputWeave licensing#39

Merged
perditavojo merged 6 commits into
mainfrom
dev
May 26, 2026
Merged

Refactor agent specifications and unify InputWeave licensing#39
perditavojo merged 6 commits into
mainfrom
dev

Conversation

@perditavojo

Copy link
Copy Markdown
Contributor

This pull request refactors and improves the InputBox project's agent and workflow configuration to clarify the authoritative engineering skill chain, ensure legal compliance for the new InputWeave.GameInput NuGet package, and streamline tool-specific instruction files. It updates the main agent entrypoint, introduces a Claude Code skill bridge, removes redundant Copilot instructions, and enhances CI/release workflows for package verification and licensing.

Agent and Skill Chain Refactoring:

  • AGENTS.md: Clarified as the single authoritative entrypoint for all tools, documenting the official skill chain and removing redundant or tool-specific rule duplication. Updated support matrix and instructions to ensure all tools use the same engineering rules.

  • .agents/skills/inputbox-dev/SKILL.md: Refined to emphasize its role as the authoritative engineering skill and updated workflow mandates for clarity and tool-agnostic compliance checks.

  • .claude/skills/inputbox-dev/SKILL.md: Added as a minimal bridge for Claude Code, directing it to the authoritative skill and engineering docs without duplicating rules.

  • .github/copilot-instructions.md: Removed, as Copilot CLI is now directed to use AGENTS.md and the project skill, eliminating redundant maintenance.

CI/CD Workflow and Legal Compliance Improvements:

  • .github/workflows/ci.yml and .github/workflows/release.yml:
    • Added steps to verify the presence and SHA256 hash of InputWeave.GameInput.0.0.1.nupkg before restore/build, ensuring only the correct package is used. [1] [2]
    • Removed legacy GameInput Native Shim build/validation steps, reflecting the new package-based approach. [1] [2]
    • Enhanced artifact and ZIP validation: now checks for forbidden sidecar DLLs and ensures ThirdPartyNotices.txt includes an explicit InputWeave.GameInput license declaration. [1] [2]
    • Automatically appends a detailed InputWeave.GameInput license notice and copies the license file into release artifacts. [1] [2] [3]

Other Notable Changes:

  • Updated workflow triggers and cache paths to include the new NuGet package and config files.
  • Cleaned up environment variables related to the removed Native Shim build.

These changes ensure a single source of truth for engineering standards, robust legal compliance for third-party packages, and a streamlined, maintainable workflow across all supported agent tools.

依 Codex CLI、Claude Code、GitHub Copilot CLI 與 Antigravity CLI 官方文件收斂共同入口。

移除過時 Gemini 與 Copilot mirror 入口,改以 AGENTS.md、.agents/skills 與 Claude thin bridge 維護單一權威鏈。
移除 InputBox 自有 GameInput native shim 與舊 adapter 型別,改由 GameInputGamepadController 直接使用 repo-local InputWeave.GameInput nupkg。

同步更新 CI/release、授權聲明、工程文件與測試,保留 GameInput 失敗退避 XInput、60 FPS polling、callback 喚醒與震動安全邏輯。
將 repo-local InputWeave.GameInput source 改為跨平台路徑,並補上 InputWeave wildcard mapping,讓 GitHub Automatic Dependency Submission 在 Ubuntu runner 上能解析本地 nupkg。
讓 README、測試文件與 release ThirdPartyNotices 的 InputWeave.GameInput 來源、contributors、LICENSE 與 package commit 聲明保持一致。
調整 README、測試文件與發佈聲明的 InputWeave.GameInput 描述,使用中文優先的授權與來源用語,並只在 SPDX 識別脈絡保留 CC0-1.0。
Copilot AI review requested due to automatic review settings May 26, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

這個 PR 主要將 InputBox 的 GameInput 後端從自製 InputBox.GameInput.Native shim 遷移到 repo-local 的 InputWeave.GameInput NuGet 套件,同時重整多個 agent / skill 入口檔,並更新 CI / release workflow 以加入套件與授權的合規守門。

Changes:

  • 移除 InputBox.GameInput.Native(含 vcxproj、shim interop、驗證腳本),改由 InputWeave.GameInput 提供 runtime/client/device/callback/rumble API。
  • 更新核心 GameInput controller、測試與文件,使其改用 InputWeave 型別與 runtime probe/診斷路徑。
  • 更新 CI / release:改驗證 repo-local nupkg SHA256、禁止輸出 sidecar DLL、並補齊 ThirdPartyNotices.txt 與 release artifact 的 InputWeave 授權檔案。

Reviewed changes

Copilot reviewed 32 out of 34 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/Validate-GameInputNativeShim.ps1 移除舊 native shim 的 export/probe/lifecycle 驗證腳本。
tests/InputBox.Tests/README.md 更新測試清單與第三方套件授權段落,加入 InputWeave.GameInput 聲明。
tests/InputBox.Tests/InputBox.Tests.csproj 測試專案加入 InputWeave.GameInput 套件參考。
tests/InputBox.Tests/GamepadFaceButtonProfileTests.cs 調整測試註解文字以反映新的 GameInput 裝置識別來源。
tests/InputBox.Tests/GamepadControllerPauseTests.cs 測試改用 InputWeave 的 snapshot / enum 型別以符合新後端。
tests/InputBox.Tests/GamepadControllerFactoryTests.cs 更新 fallback 測試敘述與例外訊息以反映 runtime 不可用語意。
tests/InputBox.Tests/GameInputPrimitivesTests.cs 移除舊 shim interop primitives 的測試。
tests/InputBox.Tests/GameInputDirectUsageTests.cs 新增:驗證 InputBox 直接依賴 InputWeave.GameInput 的 API surface 與關鍵語意守門。
src/InputBox/InputBox.csproj 移除 native shim 建置/發佈 targets,改引用 InputWeave.GameInput 套件。
src/InputBox/Core/Interop/DllResolver.cs 移除 InputBox.GameInput.Native 的自訂載入解析,只保留 XInput 攔截。
src/InputBox/Core/Input/GameInputPrimitives.cs 移除舊 shim 對應的 managed primitives / ABI metadata 模型。
src/InputBox/Core/Input/GameInputNative.cs 移除舊 shim P/Invoke 與 managed wrapper(Create/Probe/Enumerate/Read/Callbacks/Rumble)。
src/InputBox/Core/Input/GameInputGamepadController.cs 核心 controller 改用 InputWeave client/device/snapshot 與 runtime probe,並調整診斷計數與裝置識別。
src/InputBox.GameInput.Native/README.md 移除 native shim 專案說明文件。
src/InputBox.GameInput.Native/InputBox.GameInput.Native.vcxproj 移除 native shim 專案檔。
README.md 更新發佈說明與第三方授權清單,加入 InputWeave.GameInput。
NuGet.config 新增:定義 repo-local eng/nuget source + packageSourceMapping 鎖定 InputWeave.* 還原來源。
InputBox.slnx 方案項目更新:加入 NuGet.config / eng/nuget / Claude bridge,移除 native shim 專案與 copilot-instructions/GEMINI。
GEMINI.md 移除 Gemini/Antigravity 相容入口檔(改由 AGENTS.md 統一)。
ENGINEERING_GUIDELINES.md 更新工程規範索引描述,改為「共同入口 + 權威 skill + 原子化文件」結構。
eng/nuget/InputWeave.GameInput.0.0.1.nupkg.sha256 新增:repo-local nupkg 的 SHA256 權威檔。
eng/nuget/InputWeave.GameInput_LICENSE.txt 新增:InputWeave.GameInput 授權聲明檔,供 release artifact 打包。
docs/engineering/gamepad-api.md 更新 GameInput 政策:改用 InputWeave;更新發佈驗證與供應鏈約束。
docs/engineering/gameinput-hardware-verification.md 更新硬體驗證條目與敘述,改以 InputWeave runtime probe/路徑為準。
CLAUDE.md Claude Code 入口改為薄橋接,匯入 AGENTS.md 並避免重複規範。
AGENTS.md 精簡並明確化「唯一權威入口 + skill chain」,更新支援矩陣與完成前檢查。
.gitignore 允許提交 eng/nuget/*.nupkg,以便 repo-local 套件固定。
.github/workflows/release.yml release 改為驗證 repo-local InputWeave nupkg SHA256、補寫 notices/授權檔、禁止 sidecar DLL。
.github/workflows/ci.yml CI 改為驗證 repo-local InputWeave nupkg SHA256,並更新 paths-filter/cache dependency。
.github/copilot-instructions.md 移除 Copilot instructions(改以 root AGENTS.md 作為 primary instructions)。
.claude/skills/inputbox-dev/SKILL.md 新增:Claude Code discovery 用的最小 skill bridge,指回權威 .agents/skills
.agents/skills/inputbox-dev/SKILL.md 更新權威 skill 的定位與引用方式(避免重複規範/工具耦合)。

Comment thread src/InputBox/Core/Input/GameInputGamepadController.cs
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/release.yml
Agent-Logs-Url: https://github.com/rubujo/InputBox/sessions/db7a8c53-b76f-437a-898e-6a6bc634140f

Co-authored-by: perditavojo <117562794+perditavojo@users.noreply.github.com>
@perditavojo perditavojo merged commit 801d943 into main May 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants