Skip to content

docs: document auto-translate URL replacer constraints in CLAUDE.md#1912

Open
lacolaco wants to merge 1 commit into
mainfrom
docs/auto-translate-url-replacer
Open

docs: document auto-translate URL replacer constraints in CLAUDE.md#1912
lacolaco wants to merge 1 commit into
mainfrom
docs/auto-translate-url-replacer

Conversation

@lacolaco

Copy link
Copy Markdown
Owner

PR #1909 で導入した URL 置換機構の非自明な設計制約を Feature Documentation に記録します。

  • ルール追加方法 (UrlReplacer + defaultUrlReplacers) と、ドメイン判定系 replacer のテストに大文字混在ドメインを含める規律 (PR feat(auto-translate): add pluggable URL replacer for translated output #1909 の CI レビュー指摘の再発防止)
  • ルール追加・変更時に PROMPT_VERSION の bump は不要 (置換は決定的・冪等でキャッシュヒット経路にも適用され、LLM 再翻訳なしで波及する)
  • ja ソース側では置換しない (en 出力への後処理のみ)

将来のセッションが誤って PROMPT_VERSION を bump したり ja 側で置換する設計変更をしたりすることを防ぐための知識固定です。

🤖 Generated with Claude Code

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>

@github-actions github-actions Bot 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.

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.

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