Repository navigation
Closed
Labels
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: none
goal_ref: "playtest-log への AI/自動化メタデータ追加による定量観測の効率化"
change_kind: docsParent Issue
none
Parent Goal Ref
- Goal: AI駆動開発において定量的なプレイテスト観測を自動化・スケール可能にする
- Desired Destination:
docs/product/playtest-log.mdが AI/自動化プレイテストの特性(再現性・定量メトリクス)を正確に記録できる構造になっている
Product Spec Context
- diff_rationale: playtest-log テンプレートに AI/自動化実行時の定量メトリクスと再現性データを追加し、AI エージェントによるプレイテスト結果を構造化して記録可能にする。
- affected_sections:
docs/product/playtest-log.mdの YAML テンプレート部分。 - changed_requirement_id: N/A (既存要件の拡張)
Current Validated Scope
docs/product/playtest-log.mdへのautomationブロック追加および既存フィールドとの整合性確保- AI/自動化結果の UX 証拠禁止ポリシーの明記
Remaining Parent Gaps
- なし
Outcome
docs/product/playtest-log.md の既存 session_mode を正本として維持しつつ、AI/自動化用の automation ブロックが構造化されて追加された状態。
In Scope
docs/product/playtest-log.mdの YAML template に任意automationブロックを追加する- 既存
session_mode/validation_methodenum は維持し、execution_modeは新設しない automation.metricsは単位・分母が分かる machine-readable fields とするautomation.artifactsに metrics JSON / trace / replay / input script 参照を置けるようにする- AI/自動化結果は UX・感情証拠ではないことを log 側にも明記する
- UX 影響がある場合は
human_review_required: trueを記録する
Out of Scope
- Playwright / Vitest Browser Mode の導入
- CI artifact upload workflow の実装
- 自動プレイテスト runner の実装
docs/product/playtest-protocol.mdの mode 定義変更- 実セッションログの追加
Acceptance Criteria
- AC1: 既存 human playtest 記録キーを削除・改名しない
- AC2:
execution_modeを追加せず、既存session_modeを正本として使う - AC3:
automation.metricsにruns,success_count,failure_count,success_rate,duration_ms_p50,input_count_total,collision_count_total等の単位付き項目がある - AC4:
automation.random_seed,automation.reproduction_command,automation.artifacts.metrics_json,automation.artifacts.trace_refが記録できる - AC5: AC5:
ai_result_is_ux_evidence: falseまたは同等の明記がある - AC6: AC6:
human_review_requiredの意味が protocol の人間確認ゲートと一致している
Verification Commands
# AC1
# preflight-scope: pr_review_only
$ grep -q "session_mode" docs/product/playtest-log.md
# AC2
# preflight-scope: pr_review_only
$ grep -q "session_mode" docs/product/playtest-log.md
# AC3
$ grep -q "automation:" docs/product/playtest-log.md
# AC4
# preflight-scope: pr_review_only
$ grep -q "automation:" docs/product/playtest-log.md
# AC5
$ grep -q "ai_result_is_ux_evidence: false" docs/product/playtest-log.md
# AC6
$ grep -q "human_review_required:" docs/product/playtest-log.mdRuntime Verification Applicability
decision: not_applicable
Allowed Paths
- docs/product/playtest-log.md
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
- YAML schema design
- Playtest protocol knowledge
Source
- dedupe_key: "follow-up:squne121/loop-protocol:pr/415:1"
- origin_pr: docs: create playtest protocol and log templates (#284) #415
- origin_comment: docs: create playtest protocol and log templates (#284) #415 (comment)
- refinement_anchor: 実装: playtest-log への AI/自動化プレイテスト用メタデータの追加 #417 (comment)
Activity
squne121 commentedon May 26, 2026
Verdict: BLOCK / 作り直し推奨
#417 の目的は妥当です。ただし、現行
mainのdocs/product/playtest-log.mdには既にsession_mode: human_internal | ai_simulation | browser_automation、tester_profile: developer | target_player_layer | ai_agent、validation_method: human_internal | ai_simulation | browser_automation | manual_reproductionが存在します。#417 のexecution_mode: human_developer | ai_agent | scripted_automationをそのまま追加すると、同じ概念を別 enum で二重管理する破壊的な設計になります。([GitHub]1)#417 は「AI結果を感情的UX証拠として扱わない」「protocol と log の責務分離を維持する」ことを AC にしていますが、現行
playtest-protocol.mdは既に AI/自動化の用途、禁止主張、人間確認ゲートを定義しています。つまり #417 は protocol 側で既に決まった判断規則を log 側へどう記録するか に絞るべきで、protocol の再定義や mode enum の新設に踏み込むべきではありません。([GitHub]2) ([GitHub]3)Blocking findings
1.
execution_modeは追加不可。既存session_modeに統合すべき#417 は
execution_modeを任意キーとして追加する想定ですが、現行 log schema は session 単位でsession_modeを既に持っています。human_developerとhuman_internal、ai_agentとai_simulation、scripted_automationとbrowser_automationが意味的に競合します。これは後続のログ集計・検索・検証で false fork を作ります。([GitHub]2) ([GitHub]1)修正要求: #417 の In Scope は「
execution_modeの追加」ではなく、既存session_modeの正本化と、AI/自動化時だけ使うautomationブロック追加に変更してください。2.
automation_metricsが自由記述すぎる#417 の
automation_metrics: 成功率、死亡率、所要時間、入力回数、衝突回数などは粒度・単位・分母が未定義です。成功率の分母がrunsなのかtasksなのか、死亡率が sortie 単位なのか run 単位なのか、所要時間が wall-clock なのか simulation time なのか不明です。これでは定量ログとして比較不能です。([GitHub]2)修正要求: 少なくとも
runs,success_count,failure_count,success_rate,death_count,death_rate,duration_ms_p50,duration_ms_p95,input_count_total,collision_count_totalのように、単位と集計粒度を固定してください。3.
reproduction_commandだけでは再現性が足りない自動化プレイテストでは
random_seedとreproduction_commandだけでは不十分です。現行リポジトリは Vite + TypeScript + Canvas で、README も Canvas 戦闘領域・DOM HUD・固定タイムステップ・Vitest CI を前提にしています。再現には commit、依存関係、browser/headless 条件、入力スクリプト、trace/replay/metrics artifact の参照が必要です。([GitHub]4)Playwright は JSON reporter を使って構造化されたテスト結果を出力でき、trace は CI で失敗時・retry 時の
trace.zipとして保存できます。Vitest も JSON reporter とoutputFileによるファイル出力をサポートしています。つまり log にはコマンド文字列だけでなく、機械可読 result と trace artifact への参照 を置く設計にすべきです。([Playwright]5) ([Playwright]6) ([Vitest]7)4. 現行依存関係では Browser automation 実行基盤が未導入
package.jsonには Vite / Vitest / TypeScript などはありますが、@playwright/testや@vitest/browser-playwrightは見当たりません。Vitest Browser Mode はブラウザ上でテストを実行できますが、CI では Playwright または WebdriverIO provider が必要です。したがって #417 は ログテンプレート改善 issue としては成立しますが、実際のbrowser_automation実装完了を主張してはいけません。([GitHub]8) ([Vitest]9)修正要求: #417 の Out of Scope に「Playwright / Vitest Browser Mode 導入、CI artifact upload、実プレイテスト runner 実装」を明記してください。必要なら別 Issue 化。
5. AI/自動化結果の UX 証拠禁止が log schema に落ちていない
現行 protocol は
ai_simulationを「仕組み・バランス・探索量の検査」とし、「楽しさ・感情の代替」を禁止しています。また UX や設計仮説に影響する場合は human playtest で確認してから分類する、としています。#417 はこれを log 側にも反映する必要があります。([GitHub]3)修正要求:
human_review_requiredだけでなく、ux_evidence_allowed: falseまたはai_result_is_ux_evidence: falseを固定値として追加してください。AI 実行時のemotional_signalはnot_applicableにするか、human-only field と明記すべきです。追加すべき Acceptance Criteria
#417 はこのままでは AC が弱いです。最低限、次を追加してください。
起票し直すなら本文案
最終判断
#417 は close ではなく rewrite が適切です。目的は正しいが、現在の In Scope は既存 schema と衝突します。特に
execution_modeの追加は拒否し、既存session_modeを正本にしたautomationブロック追加へ縮退してください。#417 にはまだ Development branch / PR が紐づいていないため、実装前に本文を修正するのが最小コストです。([GitHub]2)squne121 commentedon May 26, 2026
Refinement Loop Completed
The issue has been refined based on the anchor comment and project standards.
Key Changes:
execution_modeproposal with a structuredautomationblock in existingsession_modecontext.automation.metrics.artifactsandrandom_seedfields.ai_result_is_ux_evidence: false.This issue is now ready for implementation.
[-]改善: playtest-log に AI/自動化プレイテスト用メタデータを追加する[/-][+]実装: playtest-log への AI/自動化プレイテスト用メタデータの追加[/+]squne121 commentedon May 26, 2026
Contract Snapshot (2026-05-26T22:31:00Z)
docs/product/playtest-log.mdの既存session_modeを正本として維持しつつ、AI/自動化用のautomationブロックが構造化されて追加された状態。.claude/worktrees/issue-417-playtest-log-ai-automation-metadataworktree-issue-417-playtest-log-ai-automation-metadatadocs: add automation metadata to playtest-log (#417) (#418)
squne121 commentedon May 27, 2026
Resolved by PR #418. Post-merge cleanup complete. Follow-up issues #419 and #420 have been created.