feat(#496): doc-light モード適用スクリプトを追加(mode 分類に変更種別軸 + doc-light)#503
Conversation
mode-classification.md(HO パス)に「変更種別軸(doc/config/code)+ doc-light モード」を追加するための apply スクリプトを用意する。AI は HO パスを直接編集 できないため、本スクリプト(非HO)を AI が作成し、Human が dry-run で差分確認の うえ適用する(責務4分類: HO 実適用は Human)。 doc-light モード仕様: - 対象: 変更種別=doc かつ ultra-light/light 相当 - スキップ: V-2 / V-3 / V-4 / 単独リリース - 既定: 次回機能リリースに同梱(doc-only で単独 tag/Release を切らない) - 維持: L-0 / doc 専用 V-1(リンク切れ・正本整合・実行例到達性)/ PR / C-4 - 除外(安全側): md/docs 以外を含む / 承認境界周辺の .md(最低 high 優先)/ コード追従を要する API 契約 スクリプトは冪等(doc-light 既存ならスキップ)・dry-run 対応・アンカー検証付き。 Refs #496 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Check PR Issue Link: WARN: no closing keyword found (expected one of: closes #N / fixes #N / resolves #N)
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new shell script, apply-mode-classification-doc-light.sh, which appends a "doc-light" mode section to the mode-classification.md rules file. The review feedback points out that the script's argument validation is insufficient, as any invalid option other than --dry-run would trigger the actual file modification. A code suggestion was provided to strictly validate arguments and prevent accidental writes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| DRY_RUN=0 | ||
| [ "${1:-}" = "--dry-run" ] && DRY_RUN=1 |
There was a problem hiding this comment.
引数の検証が不十分なため、--dry-run 以外の無効なオプション(例: --dryrun や --help などのタイポ)を指定した場合でも、エラーにならずに実適用(ファイルの書き込み)が実行されてしまいます。意図しない書き込みを防ぐため、引数を厳密にチェックして無効なオプションが指定された場合はエラー終了するように改善することを推奨します。
| DRY_RUN=0 | |
| [ "${1:-}" = "--dry-run" ] && DRY_RUN=1 | |
| DRY_RUN=0 | |
| if [ $# -gt 0 ]; then | |
| if [ "$1" = "--dry-run" ] && [ $# -eq 1 ]; then | |
| DRY_RUN=1 | |
| else | |
| echo "ERROR: Invalid arguments. Usage: $0 [--dry-run]" >&2 | |
| exit 1 | |
| fi | |
| fi |
PR #503 の Gemini review(high)反映。--dry-run 以外の無効オプション (--dryrun タイポ等)が実適用をトリガーする問題を修正。引数を厳密検証し、 不正引数は exit 1 で停止する。意図しない HO 書き込みを防ぐ。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gemini 指摘(high)へ対応済み(commit 484d9e2)
意図しない HO 書き込みを防ぐガードとして妥当なご指摘でした。 |
PR #503 の Gemini review(high)反映。--dry-run 以外の無効オプション (--dryrun タイポ等)が実適用をトリガーする問題を修正。引数を厳密検証し、 不正引数は exit 1 で停止する。意図しない HO 書き込みを防ぐ。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(#496): doc-light モード適用スクリプトを追加(mode 分類に変更種別軸 + doc-light)
概要
issue #496 対応。
mode-classification.md(HO パス)に 変更種別軸(doc/config/code)+ doc-light モード を追加するための apply スクリプトを用意する。AI は HO パスを直接編集できない(HO 常時 block)ため、本 PR は 非HO の apply スクリプト 1 本のみを追加する。HO 実適用(mode-classification.md 変更)は Human が dry-run 確認後に実行する(責務4分類: HO 実適用は Human)。
適用フロー(Human)
doc-light モード仕様(スクリプトが挿入する内容)
変更種別軸は 5 段階規模モードと直交する補助軸として追加(既存モード体系は不変)。
スクリプト品質
--dry-runで unified diff プレビュー(書き込みなし)## フェーズ適用マトリクス)が見つからなければ exit 1注記
mode 体系(承認境界周辺)の変更のため、Human の C-3 判断後に適用してください。本 PR マージ後も実適用までは doc-light は有効化されません。Issue は実適用完了後にクローズ想定(本 PR は
Refs #496)。🤖 Generated with Claude Code