diff --git a/src/__tests__/instructionBuilder.test.ts b/src/__tests__/instructionBuilder.test.ts index a2fa4f8..64ca3ce 100644 --- a/src/__tests__/instructionBuilder.test.ts +++ b/src/__tests__/instructionBuilder.test.ts @@ -199,6 +199,7 @@ describe('instruction-builder', () => { expect(rendered).toContain('- Working Directory: /project'); expect(rendered).toContain('## Execution Rules'); expect(rendered).toContain('Do NOT run git commit'); + expect(rendered).toContain('Do NOT use `cd`'); }); it('should end with a trailing empty line', () => { @@ -214,6 +215,7 @@ describe('instruction-builder', () => { expect(rendered).toContain('- 作業ディレクトリ: /project'); expect(rendered).toContain('## 実行ルール'); expect(rendered).toContain('git commit を実行しないでください'); + expect(rendered).toContain('cd` を使用しないでください'); }); it('should include English note only for en, not for ja', () => { diff --git a/src/workflow/instruction-builder.ts b/src/workflow/instruction-builder.ts index 55ea988..e7487c5 100644 --- a/src/workflow/instruction-builder.ts +++ b/src/workflow/instruction-builder.ts @@ -62,6 +62,7 @@ const METADATA_STRINGS = { workingDirectory: 'Working Directory', rulesHeading: '## Execution Rules', noCommit: '**Do NOT run git commit.** Commits are handled automatically by the system after workflow completion.', + noCd: '**Do NOT use `cd` in Bash commands.** Your working directory is already set correctly. Run commands directly without changing directories.', note: 'Note: This section is metadata. Follow the language used in the rest of the prompt.', }, ja: { @@ -69,6 +70,7 @@ const METADATA_STRINGS = { workingDirectory: '作業ディレクトリ', rulesHeading: '## 実行ルール', noCommit: '**git commit を実行しないでください。** コミットはワークフロー完了後にシステムが自動で行います。', + noCd: '**Bashコマンドで `cd` を使用しないでください。** 作業ディレクトリは既に正しく設定されています。ディレクトリを変更せずにコマンドを実行してください。', note: '', }, } as const; @@ -88,6 +90,7 @@ export function renderExecutionMetadata(metadata: ExecutionMetadata): string { '', strings.rulesHeading, `- ${strings.noCommit}`, + `- ${strings.noCd}`, ]; if (strings.note) { lines.push('');