Files
archy/.cursor/rules/25-content-magazine.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

43 lines
1.3 KiB
Plaintext

---
description: Expert rules for Magazine/Brief content extraction and surfacing
globs: "**/useContentPanel.ts,**/MagazineGrid.vue"
alwaysApply: false
---
# Magazine Content Surface
## Detection
- `hasMagazine` = sections ≥ 1 AND (newsQuery OR newsLikeResponse OR context keywords)
- Context keywords: sentiment, bearish, bull case, macro, %, BTC, bitcoin, BIP, protocol, debate, what's happening
## Section Extraction Order
1. `## Heading` blocks — content until next ## or **Section**
2. `**Pro/Anti camp**` blocks with emoji
3. Bullets: `- **Title**: Content` or `- **Title** — Content` (em/en dash)
4. Attributed: `- **Name** (Role) description`
5. Intro paragraph (before first ##)
6. "Key takeaway" / "This is being called..."
7. "For deeper analysis" / further reading
## Section Rules
- Min: title 2 chars, content 15 chars
- Max content: 2000 chars per section
- Dedupe by title prefix (first 50 chars)
- Skip bullets already inside ## blocks (`blockContents`)
- `addSection` extracts: url, author, imageUrl from content
## Hero Image
1. First markdown image in text
2. First `.jpg|.png|.gif|.webp` URL
3. `webResults[0]?.imgSrc`
4. Picsum fallback seeded by query
## Format & Security
- `formatContent`: escape `&<>`, preserve `**bold**` as `<strong>`, `\n\n` → `</p><p>`
- Meme: imgflip URLs, contextual by topic (bearish, bull, Bitcoin, macro)