Skip to content

docs(roadmap): DocumentParser責務別トレイト分割タスクを追加 - #461

Open
yama wants to merge 3 commits into
mainfrom
refactor/document-parser-trait-split
Open

docs(roadmap): DocumentParser責務別トレイト分割タスクを追加#461
yama wants to merge 3 commits into
mainfrom
refactor/document-parser-trait-split

Conversation

@yama

@yama yama commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • パーサー本体2ファイル(document.parser.class.inc.php 6,320行 + document.parser.subparser.trait.php 2,856行)の責務混在を解消するリファクタリングタスクを .agent/roadmap.md へ登録
  • 対応 ExecPlan (.agent/plans/2026-07-14-document-parser-trait-split.md) を追加。既存トレイトは「使用頻度が低い関数」という基準で分離された歴史的経緯を持ち、責務別トレイト11本(責務9本+受け皿2本)への再編方針とメソッド帰属マッピング表を定義済み

本PRはドキュメント登録のみで、コード変更(実際のトレイト分割実装)は含まない。

Test plan

  • .agent/roadmap.md の固定フォーマット(Status/着手予定日/完了日/目的/背景/到達条件/非対象/依存関係/ExecPlan/メモ)が欠落なく記載されていることを確認
  • ExecPlanが .agent/PLANS.md の必須12セクションを満たすことを確認済み(作成時にレビュー済み)
  • コード変更を伴わないため、動作確認は対象外

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • DocumentParser の責務別トレイト分割に向けた実施計画を追加しました。
    • 分割方針、作業手順、受け入れ条件、検証方法、復旧手順を整理しました。
    • ロードマップの更新日と説明内容を反映し、新たな改修項目および進行情報を追加しました。

パーサー本体2ファイル(9,176行)の責務混在を解消するため、ExecPlanと
併せてロードマップへ登録する。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 01:25
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ca5ab84e-9711-42d7-8266-e5599d65a0a6

📥 Commits

Reviewing files that changed from the base of the PR and between 8d7f8ec and ebd5d28.

📒 Files selected for processing (2)
  • .agent/plans/2026-07-14-document-parser-trait-split.md
  • .agent/roadmap.md

📝 Walkthrough

Walkthrough

DocumentParserを11本の責務別トレイトへ分割する実施計画を追加し、分割方針、実施手順、検証方法、受入条件、互換シム方針を定義した。関連タスクをロードマップにも登録した。

Changes

DocumentParserトレイト分割計画

Layer / File(s) Summary
分割方針と対象設計
.agent/plans/2026-07-14-document-parser-trait-split.md
DocumentParserを11本のトレイトへ分割する対象、機械的なメソッド移動、SubParserの廃止方針、subparser互換シム、前提条件を定義。
実施手順と受入検証
.agent/plans/2026-07-14-document-parser-trait-split.md
各マイルストーンの作業手順、構文・合成・棚卸し・スモーク検証、受入条件、冪等性・復旧手順を記載。
ロードマップ登録
.agent/roadmap.md
分割タスクのStatus、予定、目的、達成条件、非対象、ExecPlan、依存関係、判断ログを追加し、更新日を変更。

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed ロードマップとExecPlanの追加という変更内容と一致しており、主変更を簡潔に示しています。
Description check ✅ Passed 概要と確認手順は概ね揃っており、変更内容とテスト計画も記載されています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/document-parser-trait-split

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

DocumentParser の責務混在を解消するための「責務別トレイト分割」リファクタリング作業を、ロードマップ登録と ExecPlan 追加で計画化する変更。

Changes:

  • .agent/roadmap.md に「DocumentParser責務別トレイト分割」タスクを追加し、最終更新日を更新
  • .agent/plans/2026-07-14-document-parser-trait-split.md を新規追加し、分割方針・マイルストーン・検証手順・メソッド帰属マッピング表を定義

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.agent/roadmap.md v1.4.0 以降の大規模改修として DocumentParser トレイト分割タスクを登録
.agent/plans/2026-07-14-document-parser-trait-split.md トレイト11本への再編方針、進め方、検証観測点、メソッドマッピング表を持つ ExecPlan を追加

Comment thread .agent/plans/2026-07-14-document-parser-trait-split.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d7f8ec71b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agent/plans/2026-07-14-document-parser-trait-split.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agent/plans/2026-07-14-document-parser-trait-split.md:
- Line 23: 計画文の「切られた」を「切り離された」など自然で意味が明確な表現に置き換え、DocumentParserSubParserTrait
が低頻度関数を基準に分離された経緯が伝わるように修正してください。
- Around line 175-184: subparser削除後のM10手順に最終検証を追加し、対象PHPファイルのphp
-l構文チェック、DocumentParserのロード確認、CLIスモークテストを実行するよう明記してください。これらはM10コミット単体で実施し、既存の参照検索による削除確認と併せて成功を確認してください。
- Around line 148-152: The method-count comparison in
.agent/plans/2026-07-14-document-parser-trait-split.md lines 148-152 is
insufficient; extend the baseline and post-change checks to compare
declarations, visibility, signatures, and intended trait ownership, not only
names, counts, and duplicates. Update .agent/roadmap.md lines 243-245 to
explicitly require these comparisons as Definition of Done.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ada2284f-b1b1-4bb5-9f0c-bbc056b3ca0f

📥 Commits

Reviewing files that changed from the base of the PR and between 879239a and 8d7f8ec.

📒 Files selected for processing (2)
  • .agent/plans/2026-07-14-document-parser-trait-split.md
  • .agent/roadmap.md

Comment thread .agent/plans/2026-07-14-document-parser-trait-split.md Outdated
Comment thread .agent/plans/2026-07-14-document-parser-trait-split.md Outdated
Comment thread .agent/plans/2026-07-14-document-parser-trait-split.md Outdated
yama and others added 2 commits July 14, 2026 11:15
Codexの指摘で、既存subparserトレイト末尾の@deprecated SubParserクラス
(loadExtension('subparser')と同様に後方互換対象)を削除計画が見落として
いたと判明。新ファイルへ移設し維持する手順をM10へ追記。

CodeRabbitの指摘を反映し、メソッド棚卸し検証をシグネチャ・可視性単位まで
強化、subparser削除後の最終検証手順(php -l・合成チェック・CLIスモーク)を
追加、誤字を修正。Copilotの指摘を反映し、本計画が触れる処理フェーズの
スコープ(移動のみで挙動変更なし)を明記。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CodexレビューでSubParser互換クラス(@deprecated)の維持を提案されたが、
直接参照するプラグインが存在しないためユーザー判断で対応不要とした。
前回コミットで追加した新ファイルへの移設手順を削除し、単純なファイル
削除方針(loadExtension('subparser')シムのみ維持)へ戻す。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants