Files
Bewerbungszauberer/openspec/changes/fix-coverletter-template-path/proposal.md
T
gurixandClaude Sonnet 4.5 01b7d5b7a9 fix: use explicit relative path for swiss-letter.tex template
The /convert-cover-letter command was using a placeholder syntax
[path-to-swiss-letter.tex] which caused inconsistent template discovery.
Claude Code would sometimes skip the template or fail to find it, resulting
in cover letters using Pandoc's default template instead of Swiss Norm formatting.

This fix replaces the placeholder with an explicit relative path
(../../../src/.claude/templates/swiss-letter.tex) that reliably resolves
from the typical execution location (applications/pending/[job-folder]/)
to the project root and then to the template directory.

Changes:
- Updated src/.claude/commands/convert-cover-letter.md with explicit template path
- Enhanced specification with template path resolution requirement
- Added clarification about path resolution relative to execution location

Testing:
- Verified PDF generation with Swiss letter template from application folders
- Confirmed consistent template discovery across different working directories
- Validated Swiss Norm formatting (address window positioning, KOMA-Script)

Related: openspec/changes/fix-coverletter-template-path

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 21:47:20 +01:00

1.5 KiB

Change: Fix Cover Letter Template Path Resolution

Why

The /convert-cover-letter command uses a placeholder syntax [path-to-swiss-letter.tex] instead of an explicit path, causing Claude Code to inconsistently locate the Swiss letter template. This results in cover letters sometimes using Pandoc's default template instead of the required Swiss business letter standards (scrlttr2 with Swiss Norm).

The user reported: "Often claude does not take the template swiss-letter.tex" - this is because the placeholder syntax is ambiguous and Claude Code cannot reliably resolve it.

What Changes

  • Fix template path in /convert-cover-letter command from placeholder to explicit path
  • Update specification to require explicit path resolution
  • Add documentation clarifying path must be relative to framework root

This is a single-line bug fix with specification clarification - no architectural changes, no new features.

Impact

Affected specs:

  • cover-letter-pdf-conversion (MODIFIED - Template Management requirement)

Affected code:

  • src/.claude/commands/convert-cover-letter.md:250 (PRIMARY FIX - change placeholder to explicit path)
  • Add clarification about path resolution after line 255

Benefits:

  • Consistent template usage in all scenarios
  • Reliable Swiss Norm formatting (address window positioning)
  • No more fallback to incorrect Pandoc defaults

Risks:

  • LOW - Single-line change, easy to test and verify
  • No breaking changes - existing functionality preserved