[Fix] next-spec-id にADR/DES通し番号共有機能を追加#171
Merged
Merged
Conversation
- scan_spec_ids.py に --share-prefixes オプションを追加(複数prefixを横断して最大番号を計算) - start-design/SKILL.md のADR/DES採番呼び出しを --share-prefixes ADR,DES 付きに更新 - CLAUDE.mdの回避策注意書き(手動でADR/DES横断最大番号を計算)を削除、ツール仕様として保証 - next-spec-id/SKILL.md, adr_format.md, spec_format.md, design_principles_spec.md の ADR採番コマンド例を全て --share-prefixes ADR,DES に統一(セルフレビューで発見した更新漏れ含む) - tests/forge/scripts/test_scan_spec_ids.py に share_prefixes の回帰テストを追加 Closes #160
BlueEventHorizon
marked this pull request as ready for review
July 6, 2026 11:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
next-spec-idスキルが「複数prefixで通し番号を共有する」採番モード(--share-prefixes)をサポートしていなかった問題を修正背景
ADR と DES は同一ディレクトリに配置され通し番号を共有する運用だが、
scan_spec_ids.pyはprefix単位で独立採番するため衝突しうる。これがCLAUDE.mdの重要規約に手動回避策として明文化されており、本リポジトリ自身の「原本を直す、回避策で逃げない」規約と自己矛盾していた。やったこと
scan_spec_ids.pyに--share-prefixesオプションを追加。カンマ区切りで複数prefixを指定すると、それらすべてのファイルを横断スキャンして最大番号を計算し、指定prefixの次番号として返す(shared_withフィールドで共有先を明示)start-design/SKILL.mdのADR/DES採番呼び出しを--share-prefixes ADR,DES付きに更新/forge:review code、2ラウンド)で発見した更新漏れを含め、next-spec-id/SKILL.md・adr_format.md・spec_format.md・design_principles_spec.mdのADR採番コマンド例をすべて--share-prefixes ADR,DESに統一tests/forge/scripts/test_scan_spec_ids.pyにshare_prefixes引数・CLIオプションの回帰テストを追加(既存のtest_adr_id_numbering_guide.pyとの後方互換性を確認済み)やらないこと(このプルリクエストのスコープ外とすること)
.doc_structure.yamlでの宣言的な共有設定(CLIオプションで代替。将来的な拡張候補として残す)レビュー観点
--share-prefixes未指定時に既存の独立採番動作が完全に後方互換であることレビューレベル
Lv0: まったく見ないでAcceptするLv1: ぱっとみて違和感がないかチェックしてAcceptするLv3: 実際に環境で動作確認したうえでAcceptする備考
全1256件のユニットテストがpassすることを確認済み。
Closes #160