docs: document auto-translate URL replacer constraints in CLAUDE.md#1912
docs: document auto-translate URL replacer constraints in CLAUDE.md#1912lacolaco wants to merge 1 commit into
Conversation
Record the non-obvious design constraints of the URL replacer so future sessions do not bump PROMPT_VERSION for rule changes or apply replacement to the ja source: replacement is a deterministic and idempotent post-process on the en output that also runs on the cache-hit path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
PR #1912 changes only CLAUDE.md, adding a "Auto Translate (URL Replacer)" documentation section under Feature Documentation. No application or tool code files are touched (content/, public/images/, manifest.json are also absent). I cross-checked the documented claims against the actual implementation (tools/auto-translate/url-replacer.ts, url-replacer.spec.ts, translator.ts): the UrlReplacer/defaultUrlReplacers extension pattern, the case-insensitive-hostname test guidance, the "no PROMPT_VERSION bump needed" claim (replaceUrls is applied deterministically/idempotently on both the fresh-translation path and the cache-hit path per translator.ts:324-332,406), and the "only applied to en output, never to ja source" claim are all accurate as of the current code. No code-quality, correctness, performance, security, or test-coverage issues exist since there is no code change to evaluate.
PR #1909 で導入した URL 置換機構の非自明な設計制約を Feature Documentation に記録します。
UrlReplacer+defaultUrlReplacers) と、ドメイン判定系 replacer のテストに大文字混在ドメインを含める規律 (PR feat(auto-translate): add pluggable URL replacer for translated output #1909 の CI レビュー指摘の再発防止)将来のセッションが誤って PROMPT_VERSION を bump したり ja 側で置換する設計変更をしたりすることを防ぐための知識固定です。
🤖 Generated with Claude Code