ステータス出力ルールのヘッダーを自動生成に変更

- renderStatusRulesHeader() を追加して言語別にヘッダーを生成
- 全ワークフローYAMLから重複していたヘッダー部分を削除
- buildInstruction() で statusRulesPrompt にヘッダーを自動付加
This commit is contained in:
nrslib 2026-01-29 02:38:01 +09:00
parent 8463eb1033
commit 7bb54067b4
14 changed files with 89 additions and 362 deletions

View File

@ -29,11 +29,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
| Situation | Judgment | | Situation | Judgment |
@ -149,11 +144,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
| Situation | Tag | | Situation | Tag |
@ -249,11 +239,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
| Situation | Judgment | | Situation | Judgment |
@ -379,11 +364,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
| Situation | Tag | | Situation | Tag |
@ -452,11 +432,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
| Situation | Judgment | | Situation | Judgment |
@ -565,11 +540,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
| Situation | Tag | | Situation | Tag |
@ -635,11 +605,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
| Situation | Judgment | | Situation | Judgment |
@ -748,11 +713,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
| Situation | Tag | | Situation | Tag |
@ -818,11 +778,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
| Situation | Tag | | Situation | Tag |
@ -887,11 +842,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
| Situation | Judgment | | Situation | Judgment |

View File

@ -41,10 +41,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -127,10 +124,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -212,10 +206,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -302,10 +293,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -359,10 +347,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -449,10 +434,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -506,10 +488,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -592,10 +571,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -647,10 +623,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -734,10 +707,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -801,10 +771,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -888,10 +855,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -960,10 +924,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -1089,10 +1050,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format

View File

@ -41,10 +41,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -127,10 +124,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -212,10 +206,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
@ -317,10 +308,7 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -369,10 +357,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -459,10 +444,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -516,10 +498,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -602,10 +581,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -657,10 +633,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -744,10 +717,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -811,10 +781,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -898,10 +865,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -970,10 +934,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -1099,10 +1060,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format

View File

@ -27,10 +27,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -69,10 +66,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -116,10 +110,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format

View File

@ -31,10 +31,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -95,10 +92,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
@ -163,10 +157,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria

View File

@ -30,11 +30,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
| Situation | Judgment | | Situation | Judgment |
@ -150,11 +145,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Output Format ## Output Format
| Situation | Tag | | Situation | Tag |
@ -250,11 +240,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
| Situation | Judgment | | Situation | Judgment |
@ -365,11 +350,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
| Situation | Judgment | | Situation | Judgment |
@ -475,11 +455,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ REQUIRED: Status Output Rules ⚠️
**Without this tag, the workflow will stop.**
Your final output MUST include a status tag following the rules below.
## Judgment Criteria ## Judgment Criteria
| Situation | Judgment | | Situation | Judgment |

View File

@ -29,11 +29,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
| 状況 | 判定 | | 状況 | 判定 |
@ -149,11 +144,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
| 状況 | タグ | | 状況 | タグ |
@ -254,11 +244,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
| 状況 | 判定 | | 状況 | 判定 |
@ -395,11 +380,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
| 状況 | タグ | | 状況 | タグ |
@ -467,11 +447,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
| 状況 | 判定 | | 状況 | 判定 |
@ -580,11 +555,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
| 状況 | タグ | | 状況 | タグ |
@ -649,11 +619,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
| 状況 | 判定 | | 状況 | 判定 |
@ -762,11 +727,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
| 状況 | タグ | | 状況 | タグ |
@ -831,11 +791,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
| 状況 | タグ | | 状況 | タグ |
@ -899,11 +854,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
| 状況 | 判定 | | 状況 | 判定 |

View File

@ -41,10 +41,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -127,10 +124,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -212,10 +206,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
@ -317,10 +308,7 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -369,10 +357,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -459,10 +444,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -516,10 +498,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -606,10 +585,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -663,10 +639,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -749,10 +722,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -804,10 +774,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -891,10 +858,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -958,10 +922,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -1045,10 +1006,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -1117,10 +1075,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -1248,10 +1203,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット

View File

@ -41,10 +41,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -127,10 +124,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -212,10 +206,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
@ -317,10 +308,7 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -369,10 +357,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -459,10 +444,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -516,10 +498,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -602,10 +581,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -657,10 +633,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -744,10 +717,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -811,10 +781,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -898,10 +865,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -970,10 +934,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -1099,10 +1060,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット

View File

@ -27,10 +27,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -69,10 +66,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -116,10 +110,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット

View File

@ -31,10 +31,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -95,10 +92,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
@ -163,10 +157,7 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準

View File

@ -30,11 +30,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
| 状況 | 判定 | | 状況 | 判定 |
@ -150,11 +145,6 @@ steps:
- WebFetch - WebFetch
permission_mode: acceptEdits permission_mode: acceptEdits
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 出力フォーマット ## 出力フォーマット
| 状況 | タグ | | 状況 | タグ |
@ -250,11 +240,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
| 状況 | 判定 | | 状況 | 判定 |
@ -365,11 +350,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
| 状況 | 判定 | | 状況 | 判定 |
@ -475,11 +455,6 @@ steps:
- WebSearch - WebSearch
- WebFetch - WebFetch
status_rules_prompt: | status_rules_prompt: |
# ⚠️ 必須: ステータス出力ルール ⚠️
**このタグがないとワークフローが停止します。**
最終出力には必ず以下のルールに従ったステータスタグを含めてください。
## 判定基準 ## 判定基準
| 状況 | 判定 | | 状況 | 判定 |

View File

@ -7,6 +7,7 @@ import {
buildInstruction, buildInstruction,
buildExecutionMetadata, buildExecutionMetadata,
renderExecutionMetadata, renderExecutionMetadata,
renderStatusRulesHeader,
type InstructionContext, type InstructionContext,
} from '../workflow/instruction-builder.js'; } from '../workflow/instruction-builder.js';
import type { WorkflowStep } from '../models/types.js'; import type { WorkflowStep } from '../models/types.js';
@ -227,6 +228,68 @@ describe('instruction-builder', () => {
}); });
}); });
describe('renderStatusRulesHeader', () => {
it('should render Japanese header when language is ja', () => {
const header = renderStatusRulesHeader('ja');
expect(header).toContain('# ⚠️ 必須: ステータス出力ルール ⚠️');
expect(header).toContain('このタグがないとワークフローが停止します');
expect(header).toContain('最終出力には必ず以下のルールに従ったステータスタグを含めてください');
});
it('should render English header when language is en', () => {
const header = renderStatusRulesHeader('en');
expect(header).toContain('# ⚠️ Required: Status Output Rules ⚠️');
expect(header).toContain('The workflow will stop without this tag');
expect(header).toContain('Your final output MUST include a status tag');
});
it('should end with trailing empty line', () => {
const header = renderStatusRulesHeader('en');
expect(header).toMatch(/\n$/);
});
});
describe('status_rules_prompt with header', () => {
it('should prepend status header to status_rules_prompt in Japanese', () => {
const step = createMinimalStep('Do work');
step.statusRulesPrompt = '## 出力フォーマット\n| 状況 | タグ |';
const context = createMinimalContext({ language: 'ja' });
const result = buildInstruction(step, context);
expect(result).toContain('# ⚠️ 必須: ステータス出力ルール ⚠️');
expect(result).toContain('## 出力フォーマット');
// Header should come before the step-specific content
const headerIndex = result.indexOf('⚠️ 必須');
const formatIndex = result.indexOf('## 出力フォーマット');
expect(headerIndex).toBeLessThan(formatIndex);
});
it('should prepend status header to status_rules_prompt in English', () => {
const step = createMinimalStep('Do work');
step.statusRulesPrompt = '## Output Format\n| Situation | Tag |';
const context = createMinimalContext({ language: 'en' });
const result = buildInstruction(step, context);
expect(result).toContain('# ⚠️ Required: Status Output Rules ⚠️');
expect(result).toContain('## Output Format');
});
it('should not add header if statusRulesPrompt is not set', () => {
const step = createMinimalStep('Do work');
const context = createMinimalContext({ language: 'en' });
const result = buildInstruction(step, context);
expect(result).not.toContain('⚠️ Required');
expect(result).not.toContain('⚠️ 必須');
});
});
describe('basic placeholder replacement', () => { describe('basic placeholder replacement', () => {
it('should replace {task} placeholder', () => { it('should replace {task} placeholder', () => {
const step = createMinimalStep('Execute: {task}'); const step = createMinimalStep('Execute: {task}');

View File

@ -55,6 +55,29 @@ export function buildExecutionMetadata(context: InstructionContext): ExecutionMe
}; };
} }
/** Localized strings for status rules header */
const STATUS_RULES_HEADER_STRINGS = {
en: {
heading: '# ⚠️ Required: Status Output Rules ⚠️',
warning: '**The workflow will stop without this tag.**',
instruction: 'Your final output MUST include a status tag following the rules below.',
},
ja: {
heading: '# ⚠️ 必須: ステータス出力ルール ⚠️',
warning: '**このタグがないとワークフローが停止します。**',
instruction: '最終出力には必ず以下のルールに従ったステータスタグを含めてください。',
},
} as const;
/**
* Render status rules header.
* Prepended to status_rules_prompt when it exists.
*/
export function renderStatusRulesHeader(language: Language): string {
const strings = STATUS_RULES_HEADER_STRINGS[language];
return [strings.heading, '', strings.warning, strings.instruction, ''].join('\n');
}
/** Localized strings for execution metadata rendering */ /** Localized strings for execution metadata rendering */
const METADATA_STRINGS = { const METADATA_STRINGS = {
en: { en: {
@ -168,9 +191,10 @@ export function buildInstruction(
instruction = instruction.replace(/\{report_dir\}/g, context.reportDir); instruction = instruction.replace(/\{report_dir\}/g, context.reportDir);
} }
// Append status_rules_prompt if present // Append status_rules_prompt with localized header if present
if (step.statusRulesPrompt) { if (step.statusRulesPrompt) {
instruction = `${instruction}\n\n${step.statusRulesPrompt}`; const statusHeader = renderStatusRulesHeader(context.language ?? 'en');
instruction = `${instruction}\n\n${statusHeader}\n${step.statusRulesPrompt}`;
} }
// Prepend execution context metadata so agents see it first. // Prepend execution context metadata so agents see it first.