fix: resolve prompt templates by the configured language - #119
Merged
Merged
Conversation
User prompt templates were stored in a flat ~/.sabori-flow/prompts/ directory regardless of config.yml's language setting, so the language selected at `init` time stuck permanently. Split the user directory into per-language subdirectories and migrate existing flat installations (without discarding user customizations) on worker startup and on `init`. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
nonz250
force-pushed
the
sabori-flow/110-20260731215546
branch
from
August 9, 2026 06:49
eeea3c2 to
ed6232b
Compare
nonz250
marked this pull request as ready for review
August 9, 2026 06:52
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.
Summary
close #110
~/.sabori-flow/prompts/がフラットな単一言語のテンプレート置き場になっており、config.ymlのlanguage設定が実際に送られるプロンプトの言語に反映されない不具合がありました。initを実行した時点の言語がユーザーディレクトリに焼き付いてしまい、以後languageを変更してもテンプレートの言語は変わりません。この PR ではユーザープロンプトディレクトリを言語別に分割し、既存のフラットインストールをカスタマイズ内容を失わずに移行できるようにしました。Changes
ワーカー・CLI 共通ロジック
言語ごとにテンプレートを解決できるようにするための変更です。
~/.sabori-flow/prompts/{lang}/という言語別構成に変更init実行時のテンプレートコピー先を言語別ディレクトリに変更init実行時に、既存のフラットインストール(~/.sabori-flow/prompts/直下のテンプレート)をconfig.ymlのlanguageに基づいて言語別ディレクトリへ自動移行既知の制約
移行処理はフラット側テンプレートの実際の言語を判別できないため、
config.ymlのlanguage値をラベルとしてそのまま採用します。過去に日本語でinitした後にconfig.ymlのlanguageを手動でenに変更していた場合、日本語のカスタム内容がprompts/en/配下に移動されるため、テンプレートの言語ラベルと実際の内容が一致しない状態になり得ます。ファイルが失われることはなく、ユーザーが手動で移動できます。languageを変更した際に実際にテンプレートの言語が切り替わる対応は別 issue で追跡する想定です。Checklist
npm run buildが通ることを確認npm testが全てパスすることを確認(627 テスト)その他
design review(テスト観点・コードレビュー・セキュリティレビュー)と実装後レビュー(コードレビュー・セキュリティレビュー)をいずれも実施し、Critical/High の指摘はありませんでした。
🤖 Generated with Claude Code