Skip to content

docs(game-logic): AimIntent 例示を {x, y} arena 座標表現に修正する - #458

Merged
squne121 merged 3 commits into
mainfrom
worktree-issue-443-aimintent-x-y-arena
May 28, 2026
Merged

squne121 merged 3 commits into
mainfrom
worktree-issue-443-aimintent-x-y-arena

Conversation

@squne121

Copy link
Copy Markdown
Owner

Linked Issue

Closes #443

Contract Snapshot

#443 (comment)

変更概要

docs/product/game-logic.md の InputCommand TypeScript code block 内の AimIntent branch を修正。

  • Before: | { type: 'AimIntent'; angle: number; } // radians
  • After: | { type: 'AimIntent'; x: number; y: number; } // arena logical coordinates

PR #440 で docs/product/features/movement-projectile.md が AimIntent の source of truth を {x, y} arena logical coordinates に固定したため、game-logic.md の例示を追従修正。

Allowed Paths

  • docs/product/game-logic.md のみ(## 入力 / Input 内 AimIntent branch のみ変更)

Verification Commands 結果

AC Command Result
AC1 uv run python3 (AimIntent x/y check) PASS
AC2 uv run python3 (angle field absent) PASS
AC3 uv run python3 (radians comment absent) PASS
AC4 uv run python3 (arena/logical comment present) PASS
AC5 pr_review_only (skipped per contract) SKIP
— pnpm typecheck PASS
— pnpm lint PASS
— pnpm build PASS

Runtime Verification Applicability

decision: not_applicable(docs-only single-file edit。実行環境前提・動作検証 AC なし)

PR #440 で movement-projectile spec が AimIntent の source of truth を
{x, y} arena logical coordinates に固定したため、
docs/product/game-logic.md の AimIntent; angle 例示を追従修正する。

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verdict: APPROVE

Mergeability

  • mergeable=MERGEABLE, mergeStateStatus=CLEAN

Evidence Check

  • AC coverage: AC1-AC4 pass(PR 本文の Verification Commands 結果に各 AC の PASS が記録済み)。AC5 は pr_review_only かつ contract 上 SKIP 扱いで正当。
  • Allowed Paths: 遵守。gh pr diff --name-only で変更ファイルは docs/product/game-logic.md 1件のみ。Allowed Paths 定義と完全一致。
  • CI Verification: build / lint / test / typecheck / python-test すべて pass(GitHub Actions 証跡確認済み)。
  • 検証コマンド結果: PR 本文に AC1-AC4 PASS、pnpm typecheck/lint/build PASS が記録されている。
  • Schema Consumer Inventory: 変更は TypeScript type 例示コメント行(docs-only)であり consumer 境界をまたぐ contract 変更ではないため not_schema_change。セクション不要。
  • Safety Claim Gate: changed path は docs/product/game-logic.md のみ。safety-sensitive キーワード非該当。Safety Claim Matrix 不要。
  • AC5(pr_review_only): docs/product/features/movement-projectile.md の aim source of truth 記述「aim の source of truth は logical arena 座標 { x, y } で固定」と、PR 後の AimIntent branch | { type: 'AimIntent'; x: number; y: number; } // arena logical coordinates は整合している。

Blockers

  • なし

Non-blockers

  • なし

LOOP_VERDICT

verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: CLEAN
reviewed_head_sha: 46b4deaa8d75f1ae75b3a7e5b07cded0417c6ecd
recommendations: []
follow_up_issue_requests: []

@squne121

Copy link
Copy Markdown
Owner Author

Verdict

条件付き APPROVE / merge hold。

PR #458 の差分内容は Issue #443 の narrow contract に一致しており、実装仕様の方向性としても妥当です。ただし、PR が Draft のままなので merge readiness は満たしていません。GitHub Docs でも Draft PR は Ready for review に戻すまで merge できない扱いです。([GitHub]1) ([GitHub Docs]2)

確認結果

PR #458 は docs/product/game-logic.md の AimIntent 例示を、angle: number // radians から x: number; y: number // arena logical coordinates に置換する 1 行差分です。([GitHub]3)

Issue #443 の contract は、編集対象を docs/product/game-logic.md の ## 入力 / Input 内 AimIntent branch のみに限定し、期待形も | { type: 'AimIntent'; x: number; y: number; } // arena logical coordinates と明記しています。([GitHub]4) そのため、PR の差分は Allowed Paths / AC1〜AC4 に対して正しいです。([GitHub]4)

上流の根拠も整合しています。PR #440 のレビュー修正では、aim は logical arena 座標 { x, y } を保持し、角度 radians は GameState / InputCommand の source of truth にしない、と固定されています。([GitHub]5) Issue #1 側でも AC8 として「aim の source of truth は { x, y } arena logical 座標。角度は GameState / InputCommand に保持しない」と規定されています。([GitHub]6)

Blocker

B1: Draft 状態のままなので merge 不能。

PR ページ上で #458 は Draft と表示されています。([GitHub]1) GitHub Docs は Draft PR について、Ready for review に戻すまで誰も merge できないと説明しています。([GitHub Docs]2)

対応: AC / CI / review が揃っているなら Ready for review に変更してから merge 判断する。

Non-blocker / follow-up 推奨

N1: game-logic.md の InputCommand 例示は、まだ実コードとは完全一致していない。

PR #458 は AimIntent の座標表現だけを修正しており、これは #443 の範囲内では正しいです。一方、現在の src/input/InputMapper.ts の実コードは type: 'aim', x, y を持つ command を生成しており、game-logic.md の例示は type: 'AimIntent' のままです。さらに Move / Fire も、実コードでは move / fire、axisX / axisY です。([GitHub]7)

これは今回の PR の blocker ではありません。Issue #443 が AimIntent branch の座標表現だけを scope に固定し、他 branch や src/ 変更を out of scope にしているためです。([GitHub]4) ただし、TypeScript の discriminated union は、共通の判別プロパティに正しいリテラル値を持たせることで型安全な分岐を成立させる設計です。公式 Handbook も messaging / state mutation の表現に discriminated unions が有効だと説明しています。([TypeScript]8) したがって、SSOT と実コードの command literal がズレたままだと、後続実装者に「正しい command schema はどちらか」という再汚染を残します。

推奨 follow-up issue:

docs(game-logic): InputCommand 例示を src/input/InputMapper.ts の実 command schema に整合させる

目的:
docs/product/game-logic.md の InputCommand 例示が、現行実装 src/input/InputMapper.ts の discriminated union と一致する状態にする。

背景:
#443 / #458 では AimIntent の angle -> x/y 修正だけを扱った。
しかし実コードは type: 'aim' / 'move' / 'fire'、move は axisX/axisY を使用しており、game-logic.md の 'AimIntent' / 'MoveIntent' / 'FireIntent' 例示とはまだ完全一致していない。

In Scope:
- docs/product/game-logic.md の InputCommand code block 全体
- 実コードの command discriminant / field name との整合
- movement-projectile.md の `{x,y}` aim source of truth との整合維持

Out of Scope:
- src/ 配下の実コード変更
- gameplay behavior 変更
- pointer lifecycle / input adapter 実装変更

最終判断

差分内容は APPROVE。ただし merge 前に最低限:

  1. PR を Draft から Ready for review に変更する。
  2. 最新 head に対して CI / review verdict を再確認する。
  3. 上記の InputCommand 全体整合 follow-up を別 Issue 化する。

この PR 自体に REQUEST_CHANGES 相当の内容不備はありません。

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.

docs(game-logic): AimIntent 例示を {x, y} arena 座標表現に修正する

1 participant