diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 6ef4dfc..683e5f6 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,13 +1,9 @@ { "permissions": { "allow": [ - "WebFetch(domain:www.anthropic.com)", - "WebFetch(domain:www.subtle.so)", - "WebFetch(domain:addyo.substack.com)", - "WebFetch(domain:skiplabs.io)", - "WebFetch(domain:www.16elt.com)", - "WebFetch(domain:meowbark.dev)" + "WebFetch", + "Bash(mkdir:*)" ], "deny": [] } -} \ No newline at end of file +} diff --git a/CLAUDE.md b/CLAUDE.md index 9da27f8..d95183a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -66,6 +66,72 @@ The repository includes a Cursor rule for automated newsletter processing locate When working with newsletter content, follow the established pattern and ensure compliance with the processing rules. +## URL Processing Workflow + +When a URL is provided, Claude should automatically process it according to these rules: + +### URL Processing Steps +1. **Clean URL**: Remove tracking parameters (utm_source, ref, etc.) +2. **Verify accessibility**: Check if URL is reachable +3. **Extract content**: Get original article title and content +4. **Check duplicates**: Ensure article hasn't been covered in existing newsletters +5. **Date handling**: Use current date in YYYY-MM-DD format + +### Newsletter Creation/Update Logic +- **Check existing**: Look for newsletter file for current date in `content/post/YYYY/MM/DD/index.md` +- **If exists**: Append new article section before any bonus content +- **If new**: Create new newsletter with auto-incremented number +- **Directory structure**: Create YYYY/MM/DD structure if needed + +### Content Structure for URL Processing +```markdown +--- +title: "Newsletter #[number]" +date: [current date YYYY-MM-DD] +tags: [ "AI-Assisted", [additional relevant tags] ] +categories: [ "Newsletter" ] +--- + +*Mời bạn thưởng thức Newsletter #[number].* + +## [Original Article Title](clean_url) + +[Vietnamese summary in professional tone - 2-4 paragraphs] + +[Optional bullet points for key takeaways] +``` + +### Quality Standards for URL Processing +- Write Vietnamese summaries in professional tone +- **Language Guidelines**: Use Vietnamese as primary language, only keep essential technical terms in English (like API, framework names, specific technologies). Avoid overusing English terms that have good Vietnamese equivalents +- **Target Audience**: Write for junior developers - use accessible language and explain complex concepts clearly +- **Technical Term Usage**: Prefer Vietnamese equivalents when they exist and are commonly understood (e.g., "bộ thu gom rác" instead of "garbage collector", "tái cấu trúc" instead of "refactoring", "mùi mã" instead of "code smells") +- Include "AI-Assisted" tag and "Newsletter" category +- Maximum 5 tags per newsletter +- Maintain consistent formatting and structure +- Verify all links work properly + +### Vietnamese Writing Guidelines +- **Primary principle**: Write in Vietnamese first, use English technical terms only when necessary +- **Common replacements**: + - "framework" → "khung làm việc" (when context allows) + - "refactoring" → "tái cấu trúc mã" + - "code smells" → "mùi mã" + - "error messages" → "thông báo lỗi" + - "big tech companies" → "các công ty công nghệ lớn" + - "engineers" → "kỹ sư" or "lập trình viên" + - "workload" → "ứng dụng" or "tải công việc" + - "migration" → "di chuyển" + - "embedding models" → "mô hình nhúng" +- **Keep English for**: Specific technology names (React, Java, ZGC), widely-used acronyms (API, REST, HTTP), code examples and commands +- **Tone**: Professional but accessible, suitable for junior developers learning new concepts + +### Error Handling +- Skip inaccessible URLs and notify +- Skip duplicate articles and notify +- Use fallback date methods if primary fails +- Create directory structure as needed + ## File Organization - `content/` - All markdown content and assets