diff --git a/.claude/commands/workflow/pull-request.md b/.claude/commands/workflow/pull-request.md index 371c83e39..72c916aaf 100644 --- a/.claude/commands/workflow/pull-request.md +++ b/.claude/commands/workflow/pull-request.md @@ -122,22 +122,34 @@ Closes #456 ## Shell and CLI Handling -### Multiline Content Management +### Multiline Content Management (CRITICAL - HEREDOC RULES) + +**🚨 MANDATORY HEREDOC FORMAT:** ```bash -# Uses cat with heredoc for proper shell escaping -cat <<'EOF' > /tmp/pr-description.md +# ALWAYS use single quotes around EOF delimiter to prevent variable expansion +cat << 'EOF' > /tmp/pr-description.md ## Summary -Comprehensive PR description with proper formatting. +Your PR description content here. + +## Implementation Details +- Bullet points work fine +- Code blocks with `backticks` are safe +- Variables like $VAR will NOT be expanded (good!) -## Details -- Multiple lines -- Code blocks with `backticks` -- No shell interpretation issues +Closes #123 EOF -gh pr create --title "feat: new feature" --body-file /tmp/pr-description.md +# THEN use the file with gh CLI +gh pr create --title "your title" --body-file /tmp/pr-description.md ``` +**🚨 CRITICAL RULES:** +1. **ALWAYS use `cat << 'EOF'`** (with single quotes) +2. **NEVER use `cat < { it('should accept day change and navigate to new day', () => { vi.spyOn(dateUtils, 'getTodayYYYYMMDD').mockReturnValue('2024-01-16') + vi.spyOn(toastManager, 'showPromise').mockResolvedValue([]) + vi.spyOn(user, 'currentUserId').mockReturnValue(1) setDayChangeData({ previousDay: '2024-01-15', @@ -19,5 +23,6 @@ describe('Day Change Detection', () => { acceptDayChange() expect(dayChangeData()).toBeNull() + expect(toastManager.showPromise).toHaveBeenCalled() }) })