fix(routine): localize agent-authored prose in pipeline routine (#376)#379
Merged
Conversation
A `pipeline` routine generated with `--lang ja` (locale != en) emitted Japanese report bodies (#358) but the agent's own free-form user-facing output — PR title/body, run summary (step 9), commit message body — came out in English: the language-neutral bootstrap prompt (#365 / ADR-0021) and the report-body locale directive (#358) never told the agent to author that prose in the configured locale. Add a `buildLocaleOutputDirective` builder that, for locale != en, emits a hard-constraint bullet (new i18n key `cli.routine.localeOutputDirective`, en/ja parity) instructing the agent to write its free-form user-facing prose in the workspace locale, while keeping the Conventional Commits subject line in English. For `en` the directive is empty and the placeholder line is stripped (no spurious blank line). Scope is pipeline only per the issue; watch is left untouched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ozzy-3
pushed a commit
that referenced
this pull request
May 25, 2026
🤖 I have created a release *beep* *boop* --- ## [0.2.6](v0.2.5...v0.2.6) (2026-05-25) ### Bug Fixes * **routine:** left-align --emit-bootstrap-prompt output ([#377](#377)) ([#378](#378)) ([38c9a73](38c9a73)) * **routine:** localize agent-authored prose in pipeline routine ([#376](#376)) ([#379](#379)) ([df76dc2](df76dc2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Closes #376.
radar routine generate pipeline --lang ja(locale != en)で生成した pipeline routine を実行すると、research/review レポート本文(#358 で locale 追従)は日本語になるが、agent が手順 8/9 で自由文として綴る PR タイトル/本文・実行サマリー・commit message body が英語になっていた。bootstrap プロンプトは設計上言語ニュートラル(#365 / ADR-0021)で、生成instructions:に「user-facing 出力を locale 言語で綴れ」という指示が無いのが原因。変更
buildLocaleOutputDirective(locale, t)を新設。locale != enのとき、## Hard constraintsブロックに「agent 自身が綴る user-facing 出力(PR タイトル/本文・実行サマリー・commit message body)を設定 locale の言語で綴る」よう指示する bullet を 1 行追加する。Conventional Commits の subject 行(型)は英語のままでよい点も明記。enでは directive を出さない(英語が既定)。テンプレートの placeholder 行ごと strip するため、余計な空行は残らない。cli.routine.localeOutputDirectiveをen/ja両カタログに追加(parity 維持)。en値はカタログ parity 用で emit されない。src/templates/{en,ja}/routines/pipeline.yaml.tmplに{{localeOutputDirective}}placeholder を追加。スコープ判断
bootstrapPromptLine*キー・generate-watch.tsの emit ロジック)には一切触れていない。新規キー追加 +generate-pipeline.ts中心に留めた。テスト
buildLocaleOutputDirectiveの単体テスト(en は空文字 / ja は localized bullet・subject 英語維持)。--lang jaで directive が含まれ、--lang enでは含まれず空行も残らないことを assert。🤖 Generated with Claude Code