Skip to content

#2228 を実装する(スプリント m26-2) - #2308

Merged
takemi-ohama merged 11 commits into
sprint/m26-2from
feat/issue-2228-m26-2
Oct 31, 2026
Merged

takemi-ohama merged 11 commits into
sprint/m26-2from
feat/issue-2228-m26-2

Conversation

@takemi-ohama

Copy link
Copy Markdown
Contributor

ndf プラグインで、スプリント m26-2 の変更をスプリントのブランチへ集める流れを整えました(#2228)。sprint-close.py は最終工程の記録を確かめてから Issue を閉じます。既定ブランチ宛の PR の本文では、Issue を閉じる語を「閉じる予定の参照」へ置き換えます。

利用者向けの変化

  • ndf: 既定ブランチ宛の PR の本文にある closing keywords は、「閉じる予定の参照」に置き換わる
  • ndf: sprint-close.py は、最終工程の記録を確かめてから Issue を閉じる
  • ndf: まとめのプランは「振り返り → Issue を閉じる → 棚卸し」の順に進む
  • ndf: Issue を閉じる時点の決まりは、progress-tracking Skill の「スプリントを閉じる」にまとまっている

移行の手順

  • sprint-close.py の閉じる条件が増える(契約の変更)。呼ぶのは同じ版の plugins/ndf の中のプラン・Skill の本文だけなので、同じ版で呼ぶ側も直す。利用者の手での移行は要らない。この版より前に工程を通り、判定の材料を持たないまま開いている課題の扱いは未決 2(#2228の要求の移行性)

変更の要点

テスト

supervise.py の run のステップの結果です。

ステップ exit 結果
base-sync 0 ベースブランチ sprint/m26-2 を取り込んだ
format 0 整形 1 本が通った(変わったファイルは無い)
sync 0 同期とチェック 5 本が通った
lint-limited 0 範囲テスト 2 本が通った(8.7 秒)
test-limited 0 範囲テスト 1 本が通った(657.8 秒)
design-tests 1 stopped: 設計文書 2 件(issues/issue-2228-design-decisions.md ほか)で止まった
design-specs 0 既存の確定仕様と変更履歴 84 件と照合した(変えたパス 41・シンボル 130)

design-tests は exit 1(stopped)で止まっています。マージの前に確認が要ります。

設計と違う点

設計の箇所 違い 理由
決定 6・構成要素の scripts/sprint-close.py の行・構造の図の sprint_close final_stage_gap は sprint-close.py でなく plugins/ndf/scripts/sprint_close_lib/final_stage.py にある。引数も (stage, body) でなく (stage, body, since)(since は決定 10 の比べる基準) リファクタリングのコミット(bf6f06b8)で、sprint-close.py の行数を抑えるため sprint-close 専用のパッケージへ分けた。共有の lib には置いておらず、決定 6 の「lib に置かない」は守っている。since は決定 10 と入出力の契約の表が求める引数で、構造の図が古い
入出力の契約の「記録の PR の読み」の read_record read_record は sprint-close.py でなく plugins/ndf/scripts/sprint_close_lib/collect.py にある 上と同じリファクタリングで分けた。返すもの(部分ごとの先頭の行とコメントの識別子)は契約のとおり
構成要素の scripts/pr-steps.py・scripts/supervise_lib/pr.py・処理の流れの「Pull Request の本文を送る」 2 つの呼び手は merge_closes_issues と defer_closing を別々に呼ばず、lib/closing.py の defer_for_base(root, base, text) を通して呼ぶ。pr-steps.py の PR の読み書きは plugins/ndf/scripts/pr_steps_lib/gh_pr.py へ分けた 2 つの呼び手で同じ判定と置き換えを繰り返さないよう、共通の関数へ寄せた(522fc96a・bf6f06b8)。判定(lib/repo.py の merge_closes_issues)と置き換え(defer_closing)の振る舞いは設計のとおり

モード: standard / 通した工程: 実装 → 完了判定 → Pull Request

🤖 Generated with Claude Code

takemi-ohama and others added 11 commits October 31, 2026 13:06
lib/closing.py に閉じる予定の参照(最終工程の後に閉じる: #N)と defer_closing を足し、closing-issues.sh と
closing_issues / closing_refs / closing_numbers が 2 つの形を読む。pr-steps.py と supervise_lib/pr.py は、宛先が
既定ブランチ(決められないときを含む)なら本文を置き換えてから送る(lib/repo.py の merge_closes_issues)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--final-stage(配布 / リリース後テスト / 振り返り。省けば振り返り)を受け、閉じる条件 3 を課題ごとに判定する。
振り返りは課題の本文の「振り返り: <コメントの URL>」の行のうち、識別子が記録の PR の最後の配布の記録のコメントの
識別子以上のものを数える(lib/dist_record.py の dist_comment_id。記録の PR の読みは 1 回のまま)。本文を読めなければ
failed で止まる。リリース後テストは --with-verification の有無にかかわらず条件 2 を見る。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
merge →(release-verify)→ retro → close → refine の並びにし、close は --final-stage 振り返りを明示して渡す。
retro の指示に課題を閉じない旨を足す。契約の写し(plans/close/4-close.json)を新しい並びに合わせる。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pr-steps.py と supervise_lib/pr.py が同じ判定(merge_closes_issues → defer_closing)を持たないようにする。
番号で指した PR の宛先は既存の pr_for_report で読む(REST の退避も同じものを使う)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
閉じる条件 3(最終工程の記録)・--final-stage の値と呼ぶ側の対応・まとめのプランの並び・閉じる予定の参照を
正本へ書く。pr・release-verification・retrospective・release・merged と development-workflow の references は
閉じる条件と順序を写さず正本を指す。用語集の「最終工程の記録」をその実行の振り返りに絞り、docs/glossary.md を作り直す。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s.py の PR の読み書きを pr_steps_lib へ分ける(#2228)

- sprint_close_lib/final_stage.py: 閉じる条件 3(final_stage_gap・gap_item と最終工程の定数)
- sprint_close_lib/collect.py: 記録の PR の読み取り(read_record)、スプリントの PR の課題の集め方(sprint_issues)、参照だけの課題(referenced_items)
- pr_steps_lib/gh_pr.py: repo_owner_name・existing_pr・pr_for_report・target_pr・send_body・rest_create
- pr-steps.py が 500 行以下になったため、例外リストの行数の項目を消す

振る舞いは変えない。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYHP7yPdcB8dBzbZpQCnR4
衝突 2 件を両方の変更を残して解いた(sprint-close.py の説明文、4-close.json の release-verify の依頼文と close の位置)。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
設計の構成要素の契約の写しのパスをリポジトリの根からの形に直す。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@takemi-ohama
takemi-ohama marked this pull request as ready for review October 31, 2026 16:40
@takemi-ohama
takemi-ohama merged commit 0239811 into sprint/m26-2 Oct 31, 2026
25 checks passed
@takemi-ohama
takemi-ohama deleted the feat/issue-2228-m26-2 branch October 31, 2026 16:54
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.

1 participant