fix(routine): left-align --emit-bootstrap-prompt output (#377)#378
Merged
Conversation
The bootstrap prompt body (cli.routine.bootstrapPromptLine1-4) carried a baked-in 7-space leading indent meant for the Web UI paste view, but it leaked into --emit-bootstrap-prompt, whose output is machine-consumed verbatim as a routine's message.content. Move the canonical i18n lines to left-aligned (zero leading indent) and re-add the display indent in the paste view (printPromptModePaste via BOOTSTRAP_PASTE_INDENT). emit is now left-aligned; the paste block keeps its indent under the numbered steps. Reconciled the #365 "paste == emit" byte-for-byte tests (watch + pipeline) to strip the display indent before comparing, and added tests asserting the emit output has zero leading whitespace on every line. 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.
概要
radar routine generate <type> --prompt-mode bootstrap --emit-bootstrap-promptの出力各行に均一な 7 スペースの行頭インデントが乗る問題 (#377) を修正する。--emit-bootstrap-promptは機械消費(routine 登録のmessage.content)向けなので、行頭空白ゼロの左寄せで出力すべきである。原因
bootstrap プロンプト本文 (
cli.routine.bootstrapPromptLine1-4) が i18n に 7 スペース込みで格納され、buildBootstrapPrompt経由で emit と Web UI 貼付表示の両方に共有されていた。貼付表示用の整形が emit にも漏れていた。修正方針
役割を分離する:
buildBootstrapPromptが dedent 済み本文を返す)printPromptModePasteの bootstrap モード) 側で表示用インデントBOOTSTRAP_PASTE_INDENT(7 スペース)を付与するこれにより emit=左寄せ、貼付表示=従来どおり番号付き手順下にインデント、と分離される。watch / pipeline 両ジェネレーターが同一ヘルパーを共有するため両方カバーされる。
テスト
buildBootstrapPromptが左寄せ本文を返すユニットテストを追加検証
paste view は従来どおり 7 スペースインデントを維持。
Closes #377
🤖 Generated with Claude Code