Files
archy/.cursor/rules/21-content-songs.mdc
T
Dorian 43ca3a7837 feat(playwright): integrate Playwright for end-to-end testing and update .gitignore
- Added Playwright as a development dependency for end-to-end testing.
- Updated package.json to include test scripts for Playwright.
- Enhanced .gitignore to exclude Playwright test results and cache files.
- Improved content extraction logic in various components to handle new content types.

Made-with: Cursor
2026-03-02 22:02:19 +00:00

32 lines
1.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: Expert rules for Song content extraction, display, and surfacing
globs: "**/useContentPanel.ts,**/SongCard.vue,**/SongGrid.vue,**/SongDetail.vue,**/mocks/songs*"
alwaysApply: false
---
# Songs Content Surface
## Extraction Priority
1. Tagged: `[[song:s123]]` or `[[song_ext:Title|Artist|YYYY]]`
2. Library match: title + artist within 120 chars
3. Patterns: `"Title" by Artist`, `Title Artist`, `**Title** by Artist`
## looksLikeSong Rejection
Reject when title/artist contains: news phrases, "BIP", "protocol", "web search", "mailing list", "training cutoff", etc. See `looksLikeSong()` blocklist.
- Max length: title 55 chars, artist 40 chars
## Edge Cases
- If `extractFilmIds` or `extractPodcastIds` found → return [] (don't mix film/podcast with song patterns)
- If `isNewsLikeResponse` → return [] (news bullets often look like "X Y")
- Skip if title/artist is 4-digit year
- Skip if contains `[[film` or `[[song` tags
- Dedupe by `title|artist` lowercase
## Strip Rules
- `stripSongTags` removes song tags before displaying text