Skip to content

docs: 仕様書の集約 export コマンドと鮮度チェック CI を追加 (#6906) - #6961

Open
ttokoro20240902 wants to merge 19 commits into
docs/spec-readme-colocationfrom
docs/spec-static-site
Open

docs: 仕様書の集約 export コマンドと鮮度チェック CI を追加 (#6906)#6961
ttokoro20240902 wants to merge 19 commits into
docs/spec-readme-colocationfrom
docs/spec-static-site

Conversation

@ttokoro20240902

Copy link
Copy Markdown
Contributor

概要(Overview・Refs Issue)

Refs #6906(Phase B / 戦略資料 §8.2)。#6909(Phase A)にスタックした PR(base = docs/spec-readme-colocation)。全 README.html を集約・出力する基盤と、顧客提出向けフィルタ、鮮度維持の CI を実装します。

未レビューのまま base(未保護ブランチ)へ手動マージされた旧 #6910 を巻き戻し、レビューを受けるため再提出したものです。内容は旧 #6910 と同一。

  • eccube:docs:export コマンド(--filter=all|customer)+ DocsExportService。全 README.html を出力先へ集約し、--filter=customerdata-customer="true" の章だけを残す。
  • 鮮度維持 CIdocs-check): アプリ起動不要の軽量チェッカー .github/bin/check-readme-docs.php

静的サイト化・本番公開先(サブドメイン/doc4 との統合を含む)は未確定のため、本 PR には含めず Issue #6906 で検討します。顧客提出 PDF は出力 HTML のブラウザ印刷で派生。

方針(Policy)

  • 責務分離: HTML 走査・section フィルタは DocsExportService に集約し、コマンドは薄い入口に(Skill command 準拠)。
  • section フィルタは自己完結 HTML の整形・UTF-8 を保持(DOMDocument の数値実体参照化を避け、開始タグの属性のみで判定=本文が属性名に言及しても誤判定しない)。
  • README.html は自己完結 HTML なので、ローカル閲覧・配布はビルド不要でそのまま開ける。静的サイト化の要否・本番公開先・doc4 との統合方針は Issue [4.4] コード近接の人間向け仕様ドキュメント(README.html)と静的サイト/PDF 化 — 実装設計 #6906 で継続検討(この PR はコマンドと鮮度 CI まで)。

テスト(Test)

  • PHPUnit 6 件(DocsExportServiceTest): customer フィルタで dev 章除去・customer 章保持、構造保持、文字化け防止、除外ディレクトリ、未知フィルタ例外、本文が属性名に言及しても除去。
  • QA: php-cs-fixer / rector(dry-run 差分なし)/ phpstan level 6 / phpunit すべて通過。
  • bin/console eccube:docs:export --filter=customer を end-to-end 実行し、出力・dev 章除去・文字化けなし・整形保持を確認。
  • docs-check CI がグリーン(section 属性・リンク・ポータル列挙)。

🤖 Generated with Claude Code

ttokoro20240902 and others added 18 commits July 8, 2026 16:45
Phase B(戦略資料 §8.2)。全 README.html を集約・出力し、顧客提出向けに
data-customer="true" の章だけを抽出する基盤を実装する。

- eccube:docs:export コマンド(--filter=all|customer)と DocsExportService を追加。
  section フィルタは自己完結 HTML の整形・UTF-8 を保つ(DOMDocument の実体参照化を避ける)。
  DB 非依存の PHPUnit テスト付き(フィルタ・構造保持・文字化け防止・除外ディレクトリ)
- 静的サイトジェネレータ PoC(docs/spec-static-site-poc.md)。VitePress で 27 ファイル集約→
  ビルド成功を実証し第一候補に。Astro Starlight / Antora も評価
- 鮮度維持: PR テンプレートに README 更新チェック項目、CI に docs-check ワークフロー
  (section 属性欠落・相対リンク切れを検出。アプリ起動不要の軽量チェック)
- AGENTS.md の §8.2 記述を実装済みに更新

顧客提出 PDF は出力 HTML のブラウザ印刷で派生。静的サイト本番構築・ホスティングは後続。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
check-readme-docs.php は全リポジトリの README を走査するため、
既存タイポ(href が実在しない html/template/default/install/js/bundle.js を指す)を検出して
docs-check が失敗していた。リンクテキストと同じ実在パス
html/template/install/assets/js/bundle.js へ修正する。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PoC の結論を「専用 SSG は当面導入しない」に更新。各 README.html は自己完結HTMLのため、
リポジトリ取得後ビルド不要で開け、公開もツリー+ルート README.html 目次をそのまま静的配信すればよい。
- docs/spec-static-site-poc.md: 結論を SSG 見送り・静的配信構成へ書き換え
- AGENTS.md §8.2: VitePress 第一候補の記述を削除し SSG 見送り方針へ修正
- check-readme-docs.php: ルート README.html が全 README.html を列挙しているか検査を追加

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
本 PR で追加する eccube:docs:export(README.html 集約出力・顧客フィルタ)を
Command/README.html のコマンド一覧へ掲載する。コマンド実体は本 PR (#6910) に含まれる。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SSG 非採用が確定したため、選定用の docs/spec-static-site-poc.md は役目を終えた。
「SSG を検討して見送った理由・再検討条件」だけを AGENTS.md §8.2 に畳み、ファイルは削除。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
「管理画面の操作が購入と同じ PurchaseFlow 確定を呼び、在庫引当・採番・出荷通知メール
などの副作用が発火する」旨を、意味不明な造語を使わず平易に記述。内容は実コードで裏取り済み
(EditController:158-159,216 / ShippingController:179-180,242)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… (Admin/Order 文言の最終化)

# Conflicts:
#	src/Eccube/Controller/Admin/Order/README.html
… (AGENTS.md §8.2 の薄型化)

# Conflicts:
#	AGENTS.md
… (README.html 妥当性修正の取り込み)
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f5bfe83-4d25-41eb-b602-5f72841bb093

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/spec-static-site

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.

@ttokoro20240902 ttokoro20240902 added this to the 4.4.0 milestone Jul 29, 2026
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.14%. Comparing base (2e77d40) to head (77915d7).

Additional details and impacted files
@@                       Coverage Diff                       @@
##           docs/spec-readme-colocation    #6961      +/-   ##
===============================================================
+ Coverage                        77.08%   77.14%   +0.05%     
===============================================================
  Files                              563      564       +1     
  Lines                            27952    27976      +24     
===============================================================
+ Hits                             21548    21582      +34     
+ Misses                            6404     6394      -10     
Flag Coverage Δ
Unit 77.14% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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